vendor: 5,668 bytes, lines 1-9
1(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))a(h);new MutationObserver(h=>{for(const m of h)if(m.type==="childList")for(const g of m.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&a(g)}).observe(document,{childList:!0,subtree:!0});function i(h){const m={};return h.integrity&&(m.integrity=h.integrity),h.referrerPolicy&&(m.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?m.credentials="include":h.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function a(h){if(h.ep)return;h.ep=!0;const m=i(h);fetch(h.href,m)}})();var ry=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Aa(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function QC(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var t=n.default;if(typeof t=="function"){var i=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(n).forEach(function(a){var h=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(i,a,h.get?h:{enumerable:!0,get:function(){return n[a]}})}),i}var s_={exports:{}},ym={},o_={exports:{}},Xr={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var NS;function JC(){if(NS)return Xr;NS=1;var n=Symbol.for("react.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),g=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),E=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),k=Symbol.iterator;function D(Ue){return Ue===null||typeof Ue!="object"?null:(Ue=k&&Ue[k]||Ue["@@iterator"],typeof Ue=="function"?Ue:null)}var V={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,$={};function Q(Ue,pt,Ft){this.props=Ue,this.context=pt,this.refs=$,this.updater=Ft||V}Q.prototype.isReactComponent={},Q.prototype.setState=function(Ue,pt){if(typeof Ue!="object"&&typeof Ue!="function"&&Ue!=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,Ue,pt,"setState")},Q.prototype.forceUpdate=function(Ue){this.updater.enqueueForceUpdate(this,Ue,"forceUpdate")};function ae(){}ae.prototype=Q.prototype;function le(Ue,pt,Ft){this.props=Ue,this.context=pt,this.refs=$,this.updater=Ft||V}var _e=le.prototype=new ae;_e.constructor=le,F(_e,Q.prototype),_e.isPureReactComponent=!0;var fe=Array.isArray,We=Object.prototype.hasOwnProperty,se={current:null},De={key:!0,ref:!0,__self:!0,__source:!0};function ze(Ue,pt,Ft){var Ht,Gt={},rr=null,or=null;if(pt!=null)for(Ht in pt.ref!==void 0&&(or=pt.ref),pt.key!==void 0&&(rr=""+pt.key),pt)We.call(pt,Ht)&&!De.hasOwnProperty(Ht)&&(Gt[Ht]=pt[Ht]);var fr=arguments.length-2;if(fr===1)Gt.children=Ft;else if(1<fr){for(var Sr=Array(fr),Er=0;Er<fr;Er++)Sr[Er]=arguments[Er+2];Gt.children=Sr}if(Ue&&Ue.defaultProps)for(Ht in fr=Ue.defaultProps,fr)Gt[Ht]===void 0&&(Gt[Ht]=fr[Ht]);return{$$typeof:n,type:Ue,key:rr,ref:or,props:Gt,_owner:se.current}}function je(Ue,pt){return{$$typeof:n,type:Ue.type,key:pt,ref:Ue.ref,props:Ue.props,_owner:Ue._owner}}function ft(Ue){return typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===n}function ot(Ue){var pt={"=":"=0",":":"=2"};return"$"+Ue.replace(/[=:]/g,function(Ft){return pt[Ft]})}var st=/\/+/g;function rt(Ue,pt){return typeof Ue=="object"&&Ue!==null&&Ue.key!=null?ot(""+Ue.key):pt.toString(36)}function Re(Ue,pt,Ft,Ht,Gt){var rr=typeof Ue;(rr==="undefined"||rr==="boolean")&&(Ue=null);var or=!1;if(Ue===null)or=!0;else switch(rr){case"string":case"number":or=!0;break;case"object":switch(Ue.$$typeof){case n:case t:or=!0}}if(or)return or=Ue,Gt=Gt(or),Ue=Ht===""?"."+rt(or,0):Ht,fe(Gt)?(Ft="",Ue!=null&&(Ft=Ue.replace(st,"$&/")+"/"),Re(Gt,pt,Ft,"",function(Er){return Er})):Gt!=null&&(ft(Gt)&&(Gt=je(Gt,Ft+(!Gt.key||or&&or.key===Gt.key?"":(""+Gt.key).replace(st,"$&/")+"/")+Ue)),pt.push(Gt)),1;if(or=0,Ht=Ht===""?".":Ht+":",fe(Ue))for(var fr=0;fr<Ue.length;fr++){rr=Ue[fr];var Sr=Ht+rt(rr,fr);or+=Re(rr,pt,Ft,Sr,Gt)}else if(Sr=D(Ue),typeof Sr=="function")for(Ue=Sr.call(Ue),fr=0;!(rr=Ue.next()).done;)rr=rr.value,Sr=Ht+rt(rr,fr++),or+=Re(rr,pt,Ft,Sr,Gt);else if(rr==="object")throw pt=String(Ue),Error("Objects are not valid as a React child (found: "+(pt==="[object Object]"?"object with keys {"+Object.keys(Ue).join(", ")+"}":pt)+"). If you meant to render a collection of children, use an array instead.");return or}function Yt(Ue,pt,Ft){if(Ue==null)return Ue;var Ht=[],Gt=0;return Re(Ue,Ht,"","",function(rr){return pt.call(Ft,rr,Gt++)}),Ht}function Tt(Ue){if(Ue._status===-1){var pt=Ue._result;pt=pt(),pt.then(function(Ft){(Ue._status===0||Ue._status===-1)&&(Ue._status=1,Ue._result=Ft)},function(Ft){(Ue._status===0||Ue._status===-1)&&(Ue._status=2,Ue._result=Ft)}),Ue._status===-1&&(Ue._status=0,Ue._result=pt)}if(Ue._status===1)return Ue._result.default;throw Ue._result}var _t={current:null},Qe={transition:null},bt={ReactCurrentDispatcher:_t,ReactCurrentBatchConfig:Qe,ReactCurrentOwner:se};
vendor: 5,626 bytes, lines 9-25
9function xt(){throw Error("act(...) is not supported in production builds of React.")}return Xr.Children={map:Yt,forEach:function(Ue,pt,Ft){Yt(Ue,function(){pt.apply(this,arguments)},Ft)},count:function(Ue){var pt=0;return Yt(Ue,function(){pt++}),pt},toArray:function(Ue){return Yt(Ue,function(pt){return pt})||[]},only:function(Ue){if(!ft(Ue))throw Error("React.Children.only expected to receive a single React element child.");return Ue}},Xr.Component=Q,Xr.Fragment=i,Xr.Profiler=h,Xr.PureComponent=le,Xr.StrictMode=a,Xr.Suspense=Y,Xr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bt,Xr.act=xt,Xr.cloneElement=function(Ue,pt,Ft){if(Ue==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+Ue+".");var Ht=F({},Ue.props),Gt=Ue.key,rr=Ue.ref,or=Ue._owner;if(pt!=null){if(pt.ref!==void 0&&(rr=pt.ref,or=se.current),pt.key!==void 0&&(Gt=""+pt.key),Ue.type&&Ue.type.defaultProps)var fr=Ue.type.defaultProps;for(Sr in pt)We.call(pt,Sr)&&!De.hasOwnProperty(Sr)&&(Ht[Sr]=pt[Sr]===void 0&&fr!==void 0?fr[Sr]:pt[Sr])}var Sr=arguments.length-2;if(Sr===1)Ht.children=Ft;else if(1<Sr){fr=Array(Sr);for(var Er=0;Er<Sr;Er++)fr[Er]=arguments[Er+2];Ht.children=fr}return{$$typeof:n,type:Ue.type,key:Gt,ref:rr,props:Ht,_owner:or}},Xr.createContext=function(Ue){return Ue={$$typeof:g,_currentValue:Ue,_currentValue2:Ue,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},Ue.Provider={$$typeof:m,_context:Ue},Ue.Consumer=Ue},Xr.createElement=ze,Xr.createFactory=function(Ue){var pt=ze.bind(null,Ue);return pt.type=Ue,pt},Xr.createRef=function(){return{current:null}},Xr.forwardRef=function(Ue){return{$$typeof:s,render:Ue}},Xr.isValidElement=ft,Xr.lazy=function(Ue){return{$$typeof:I,_payload:{_status:-1,_result:Ue},_init:Tt}},Xr.memo=function(Ue,pt){return{$$typeof:E,type:Ue,compare:pt===void 0?null:pt}},Xr.startTransition=function(Ue){var pt=Qe.transition;Qe.transition={};try{Ue()}finally{Qe.transition=pt}},Xr.unstable_act=xt,Xr.useCallback=function(Ue,pt){return _t.current.useCallback(Ue,pt)},Xr.useContext=function(Ue){return _t.current.useContext(Ue)},Xr.useDebugValue=function(){},Xr.useDeferredValue=function(Ue){return _t.current.useDeferredValue(Ue)},Xr.useEffect=function(Ue,pt){return _t.current.useEffect(Ue,pt)},Xr.useId=function(){return _t.current.useId()},Xr.useImperativeHandle=function(Ue,pt,Ft){return _t.current.useImperativeHandle(Ue,pt,Ft)},Xr.useInsertionEffect=function(Ue,pt){return _t.current.useInsertionEffect(Ue,pt)},Xr.useLayoutEffect=function(Ue,pt){return _t.current.useLayoutEffect(Ue,pt)},Xr.useMemo=function(Ue,pt){return _t.current.useMemo(Ue,pt)},Xr.useReducer=function(Ue,pt,Ft){return _t.current.useReducer(Ue,pt,Ft)},Xr.useRef=function(Ue){return _t.current.useRef(Ue)},Xr.useState=function(Ue){return _t.current.useState(Ue)},Xr.useSyncExternalStore=function(Ue,pt,Ft){return _t.current.useSyncExternalStore(Ue,pt,Ft)},Xr.useTransition=function(){return _t.current.useTransition()},Xr.version="18.3.1",Xr}var zS;function Kw(){return zS||(zS=1,o_.exports=JC()),o_.exports}/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var FS;function eV(){if(FS)return ym;FS=1;var n=Kw(),t=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,h=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function g(s,Y,E){var I,k={},D=null,V=null;E!==void 0&&(D=""+E),Y.key!==void 0&&(D=""+Y.key),Y.ref!==void 0&&(V=Y.ref);for(I in Y)a.call(Y,I)&&!m.hasOwnProperty(I)&&(k[I]=Y[I]);if(s&&s.defaultProps)for(I in Y=s.defaultProps,Y)k[I]===void 0&&(k[I]=Y[I]);return{$$typeof:t,type:s,key:D,ref:V,props:k,_owner:h.current}}return ym.Fragment=i,ym.jsx=g,ym.jsxs=g,ym}var ZS;function tV(){return ZS||(ZS=1,s_.exports=eV()),s_.exports}var O=tV(),de=Kw();const qe=Aa(de);var ny={},l_={exports:{}},Rs={},u_={exports:{}},c_={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var jS;function rV(){return jS||(jS=1,function(n){function t(Qe,bt){var xt=Qe.length;Qe.push(bt);e:for(;0<xt;){var Ue=xt-1>>>1,pt=Qe[Ue];if(0<h(pt,bt))Qe[Ue]=bt,Qe[xt]=pt,xt=Ue;else break e}}function i(Qe){return Qe.length===0?null:Qe[0]}function a(Qe){if(Qe.length===0)return null;var bt=Qe[0],xt=Qe.pop();if(xt!==bt){Qe[0]=xt;e:for(var Ue=0,pt=Qe.length,Ft=pt>>>1;Ue<Ft;){var Ht=2*(Ue+1)-1,Gt=Qe[Ht],rr=Ht+1,or=Qe[rr];if(0>h(Gt,xt))rr<pt&&0>h(or,Gt)?(Qe[Ue]=or,Qe[rr]=xt,Ue=rr):(Qe[Ue]=Gt,Qe[Ht]=xt,Ue=Ht);else if(rr<pt&&0>h(or,xt))Qe[Ue]=or,Qe[rr]=xt,Ue=rr;else break e}}return bt}function h(Qe,bt){var xt=Qe.sortIndex-bt.sortIndex;return xt!==0?xt:Qe.id-bt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var m=performance;n.unstable_now=function(){return m.now()}}else{var g=Date,s=g.now();n.unstable_now=function(){return g.now()-s}}var Y=[],E=[],I=1,k=null,D=3,V=!1,F=!1,$=!1,Q=typeof setTimeout=="function"?setTimeout:null,ae=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _e(Qe){for(var bt=i(E);bt!==null;){if(bt.callback===null)a(E);
vendor: 4,510 bytes, lines 25-33
25else if(bt.startTime<=Qe)a(E),bt.sortIndex=bt.expirationTime,t(Y,bt);else break;bt=i(E)}}function fe(Qe){if($=!1,_e(Qe),!F)if(i(Y)!==null)F=!0,Tt(We);else{var bt=i(E);bt!==null&&_t(fe,bt.startTime-Qe)}}function We(Qe,bt){F=!1,$&&($=!1,ae(ze),ze=-1),V=!0;var xt=D;try{for(_e(bt),k=i(Y);k!==null&&(!(k.expirationTime>bt)||Qe&&!ot());){var Ue=k.callback;if(typeof Ue=="function"){k.callback=null,D=k.priorityLevel;var pt=Ue(k.expirationTime<=bt);bt=n.unstable_now(),typeof pt=="function"?k.callback=pt:k===i(Y)&&a(Y),_e(bt)}else a(Y);k=i(Y)}if(k!==null)var Ft=!0;else{var Ht=i(E);Ht!==null&&_t(fe,Ht.startTime-bt),Ft=!1}return Ft}finally{k=null,D=xt,V=!1}}var se=!1,De=null,ze=-1,je=5,ft=-1;function ot(){return!(n.unstable_now()-ft<je)}function st(){if(De!==null){var Qe=n.unstable_now();ft=Qe;var bt=!0;try{bt=De(!0,Qe)}finally{bt?rt():(se=!1,De=null)}}else se=!1}var rt;if(typeof le=="function")rt=function(){le(st)};else if(typeof MessageChannel<"u"){var Re=new MessageChannel,Yt=Re.port2;Re.port1.onmessage=st,rt=function(){Yt.postMessage(null)}}else rt=function(){Q(st,0)};function Tt(Qe){De=Qe,se||(se=!0,rt())}function _t(Qe,bt){ze=Q(function(){Qe(n.unstable_now())},bt)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Qe){Qe.callback=null},n.unstable_continueExecution=function(){F||V||(F=!0,Tt(We))},n.unstable_forceFrameRate=function(Qe){0>Qe||125<Qe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):je=0<Qe?Math.floor(1e3/Qe):5},n.unstable_getCurrentPriorityLevel=function(){return D},n.unstable_getFirstCallbackNode=function(){return i(Y)},n.unstable_next=function(Qe){switch(D){case 1:case 2:case 3:var bt=3;break;default:bt=D}var xt=D;D=bt;try{return Qe()}finally{D=xt}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(Qe,bt){switch(Qe){case 1:case 2:case 3:case 4:case 5:break;default:Qe=3}var xt=D;D=Qe;try{return bt()}finally{D=xt}},n.unstable_scheduleCallback=function(Qe,bt,xt){var Ue=n.unstable_now();switch(typeof xt=="object"&&xt!==null?(xt=xt.delay,xt=typeof xt=="number"&&0<xt?Ue+xt:Ue):xt=Ue,Qe){case 1:var pt=-1;break;case 2:pt=250;break;case 5:pt=1073741823;break;case 4:pt=1e4;break;default:pt=5e3}return pt=xt+pt,Qe={id:I++,callback:bt,priorityLevel:Qe,startTime:xt,expirationTime:pt,sortIndex:-1},xt>Ue?(Qe.sortIndex=xt,t(E,Qe),i(Y)===null&&Qe===i(E)&&($?(ae(ze),ze=-1):$=!0,_t(fe,xt-Ue))):(Qe.sortIndex=pt,t(Y,Qe),F||V||(F=!0,Tt(We))),Qe},n.unstable_shouldYield=ot,n.unstable_wrapCallback=function(Qe){var bt=D;return function(){var xt=D;D=bt;try{return Qe.apply(this,arguments)}finally{D=xt}}}}(c_)),c_}var BS;function nV(){return BS||(BS=1,u_.exports=rV()),u_.exports}/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var $S;function iV(){if($S)return Rs;$S=1;var n=Kw(),t=nV();function i(c){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+c,w=1;w<arguments.length;w++)p+="&args[]="+encodeURIComponent(arguments[w]);return"Minified React error #"+c+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,h={};function m(c,p){g(c,p),g(c+"Capture",p)}function g(c,p){for(h[c]=p,c=0;c<p.length;c++)a.add(p[c])}var s=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Y=Object.prototype.hasOwnProperty,E=/^[: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]*$/,I={},k={};function D(c){return Y.call(k,c)?!0:Y.call(I,c)?!1:E.test(c)?k[c]=!0:(I[c]=!0,!1)}function V(c,p,w,M){if(w!==null&&w.type===0)return!1;switch(typeof p){case"function":case"symbol":return!0;case"boolean":return M?!1:w!==null?!w.acceptsBooleans:(c=c.toLowerCase().slice(0,5),c!=="data-"&&c!=="aria-");default:return!1}}function F(c,p,w,M){if(p===null||typeof p>"u"||V(c,p,w,M))return!0;
vendor: 9,505 bytes, lines 33-37
33if(M)return!1;if(w!==null)switch(w.type){case 3:return!p;case 4:return p===!1;case 5:return isNaN(p);case 6:return isNaN(p)||1>p}return!1}function $(c,p,w,M,R,z,re){this.acceptsBooleans=p===2||p===3||p===4,this.attributeName=M,this.attributeNamespace=R,this.mustUseProperty=w,this.propertyName=c,this.type=p,this.sanitizeURL=z,this.removeEmptyString=re}var Q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(c){Q[c]=new $(c,0,!1,c,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(c){var p=c[0];Q[p]=new $(p,1,!1,c[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(c){Q[c]=new $(c,2,!1,c.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(c){Q[c]=new $(c,2,!1,c,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(c){Q[c]=new $(c,3,!1,c.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(c){Q[c]=new $(c,3,!0,c,null,!1,!1)}),["capture","download"].forEach(function(c){Q[c]=new $(c,4,!1,c,null,!1,!1)}),["cols","rows","size","span"].forEach(function(c){Q[c]=new $(c,6,!1,c,null,!1,!1)}),["rowSpan","start"].forEach(function(c){Q[c]=new $(c,5,!1,c.toLowerCase(),null,!1,!1)});var ae=/[\-:]([a-z])/g;function le(c){return c[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(c){var p=c.replace(ae,le);Q[p]=new $(p,1,!1,c,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(c){var p=c.replace(ae,le);Q[p]=new $(p,1,!1,c,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(c){var p=c.replace(ae,le);Q[p]=new $(p,1,!1,c,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(c){Q[c]=new $(c,1,!1,c.toLowerCase(),null,!1,!1)}),Q.xlinkHref=new $("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(c){Q[c]=new $(c,1,!1,c.toLowerCase(),null,!0,!0)});function _e(c,p,w,M){var R=Q.hasOwnProperty(p)?Q[p]:null;(R!==null?R.type!==0:M||!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(F(p,w,R,M)&&(w=null),M||R===null?D(p)&&(w===null?c.removeAttribute(p):c.setAttribute(p,""+w)):R.mustUseProperty?c[R.propertyName]=w===null?R.type===3?!1:"":w:(p=R.attributeName,M=R.attributeNamespace,w===null?c.removeAttribute(p):(R=R.type,w=R===3||R===4&&w===!0?"":""+w,M?c.setAttributeNS(M,p,w):c.setAttribute(p,w))))}var fe=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,We=Symbol.for("react.element"),se=Symbol.for("react.portal"),De=Symbol.for("react.fragment"),ze=Symbol.for("react.strict_mode"),je=Symbol.for("react.profiler"),ft=Symbol.for("react.provider"),ot=Symbol.for("react.context"),st=Symbol.for("react.forward_ref"),rt=Symbol.for("react.suspense"),Re=Symbol.for("react.suspense_list"),Yt=Symbol.for("react.memo"),Tt=Symbol.for("react.lazy"),_t=Symbol.for("react.offscreen"),Qe=Symbol.iterator;function bt(c){return c===null||typeof c!="object"?null:(c=Qe&&c[Qe]||c["@@iterator"],typeof c=="function"?c:null)}var xt=Object.assign,Ue;function pt(c){if(Ue===void 0)try{throw Error()}catch(w){var p=w.stack.trim().match(/\n( *(at )?)/);Ue=p&&p[1]||""}return` 34`+Ue+c}var Ft=!1;function Ht(c,p){if(!c||Ft)return"";Ft=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(p)if(p=function(){throw Error()},Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(ut){var M=ut}Reflect.construct(c,[],p)}else{try{p.call()}catch(ut){M=ut}c.call(p.prototype)}else{try{throw Error()}catch(ut){M=ut}c()}}catch(ut){if(ut&&M&&typeof ut.stack=="string"){for(var R=ut.stack.split(` 35`),z=M.stack.split(` 36`),re=R.length-1,Se=z.length-1;1<=re&&0<=Se&&R[re]!==z[Se];)Se--;for(;1<=re&&0<=Se;re--,Se--)if(R[re]!==z[Se]){if(re!==1||Se!==1)do if(re--,Se--,0>Se||R[re]!==z[Se]){var ke=` 37`+R[re].replace(" at new "," at ");return c.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",c.displayName)),ke}while(1<=re&&0<=Se);break}}}finally{Ft=!1,Error.prepareStackTrace=w}return(c=c?c.displayName||c.name:"")?pt(c):""}function Gt(c){switch(c.tag){case 5:return pt(c.type);case 16:return pt("Lazy");case 13:return pt("Suspense");case 19:return pt("SuspenseList");case 0:case 2:case 15:return c=Ht(c.type,!1),c;case 11:return c=Ht(c.type.render,!1),c;case 1:return c=Ht(c.type,!0),c;default:return""}}function rr(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case De:return"Fragment";case se:return"Portal";case je:return"Profiler";case ze:return"StrictMode";case rt:return"Suspense";case Re:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case ot:return(c.displayName||"Context")+".Consumer";case ft:return(c._context.displayName||"Context")+".Provider";case st:var p=c.render;return c=c.displayName,c||(c=p.displayName||p.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case Yt:return p=c.displayName||null,p!==null?p:rr(c.type)||"Memo";case Tt:p=c._payload,c=c._init;try{return rr(c(p))}catch{}}return null}function or(c){var p=c.type;switch(c.tag){case 24:return"Cache";case 9:return(p.displayName||"Context")+".Consumer";case 10:return(p._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=p.render,c=c.displayName||c.name||"",p.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return p;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return rr(p);case 8:return p===ze?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p}return null}function fr(c){switch(typeof c){case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function Sr(c){var p=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function Er(c){var p=Sr(c)?"checked":"value",w=Object.getOwnPropertyDescriptor(c.constructor.prototype,p),M=""+c[p];if(!c.hasOwnProperty(p)&&typeof w<"u"&&typeof w.get=="function"&&typeof w.set=="function"){var R=w.get,z=w.set;return Object.defineProperty(c,p,{configurable:!0,get:function(){return R.call(this)},set:function(re){M=""+re,z.call(this,re)}}),Object.defineProperty(c,p,{enumerable:w.enumerable}),{getValue:function(){return M},setValue:function(re){M=""+re},stopTracking:function(){c._valueTracker=null,delete c[p]}}}}function Gr(c){c._valueTracker||(c._valueTracker=Er(c))}function Wn(c){if(!c)return!1;var p=c._valueTracker;if(!p)return!0;var w=p.getValue(),M="";return c&&(M=Sr(c)?c.checked?"true":"false":c.value),c=M,c!==w?(p.setValue(c),!0):!1}function pn(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}function Yr(c,p){var w=p.checked;return xt({},p,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:w??c._wrapperState.initialChecked})}function xr(c,p){var w=p.defaultValue==null?"":p.defaultValue,M=p.checked!=null?p.checked:p.defaultChecked;w=fr(p.value!=null?p.value:w),c._wrapperState={initialChecked:M,initialValue:w,controlled:p.type==="checkbox"||p.type==="radio"?p.checked!=null:p.value!=null}}function ri(c,p){p=p.checked,p!=null&&_e(c,"checked",p,!1)}function hr(c,p){ri(c,p);var w=fr(p.value),M=p.type;if(w!=null)M==="number"?(w===0&&c.value===""||c.value!=w)&&(c.value=""+w):c.value!==""+w&&(c.value=""+w);else if(M==="submit"||M==="reset"){c.removeAttribute("value");return}p.hasOwnProperty("value")?ui(c,p.type,w):p.hasOwnProperty("defaultValue")&&ui(c,p.type,fr(p.defaultValue)),p.checked==null&&p.defaultChecked!=null&&(c.defaultChecked=!!p.defaultChecked)}
vendor: 4,180 bytes, line 37
37function _i(c,p,w){if(p.hasOwnProperty("value")||p.hasOwnProperty("defaultValue")){var M=p.type;if(!(M!=="submit"&&M!=="reset"||p.value!==void 0&&p.value!==null))return;p=""+c._wrapperState.initialValue,w||p===c.value||(c.value=p),c.defaultValue=p}w=c.name,w!==""&&(c.name=""),c.defaultChecked=!!c._wrapperState.initialChecked,w!==""&&(c.name=w)}function ui(c,p,w){(p!=="number"||pn(c.ownerDocument)!==c)&&(w==null?c.defaultValue=""+c._wrapperState.initialValue:c.defaultValue!==""+w&&(c.defaultValue=""+w))}var Qr=Array.isArray;function an(c,p,w,M){if(c=c.options,p){p={};for(var R=0;R<w.length;R++)p["$"+w[R]]=!0;for(w=0;w<c.length;w++)R=p.hasOwnProperty("$"+c[w].value),c[w].selected!==R&&(c[w].selected=R),R&&M&&(c[w].defaultSelected=!0)}else{for(w=""+fr(w),p=null,R=0;R<c.length;R++){if(c[R].value===w){c[R].selected=!0,M&&(c[R].defaultSelected=!0);return}p!==null||c[R].disabled||(p=c[R])}p!==null&&(p.selected=!0)}}function Jr(c,p){if(p.dangerouslySetInnerHTML!=null)throw Error(i(91));return xt({},p,{value:void 0,defaultValue:void 0,children:""+c._wrapperState.initialValue})}function Fr(c,p){var w=p.value;if(w==null){if(w=p.children,p=p.defaultValue,w!=null){if(p!=null)throw Error(i(92));if(Qr(w)){if(1<w.length)throw Error(i(93));w=w[0]}p=w}p==null&&(p=""),w=p}c._wrapperState={initialValue:fr(w)}}function In(c,p){var w=fr(p.value),M=fr(p.defaultValue);w!=null&&(w=""+w,w!==c.value&&(c.value=w),p.defaultValue==null&&c.defaultValue!==w&&(c.defaultValue=w)),M!=null&&(c.defaultValue=""+M)}function ni(c){var p=c.textContent;p===c._wrapperState.initialValue&&p!==""&&p!==null&&(c.value=p)}function Rn(c){switch(c){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 bn(c,p){return c==null||c==="http://www.w3.org/1999/xhtml"?Rn(p):c==="http://www.w3.org/2000/svg"&&p==="foreignObject"?"http://www.w3.org/1999/xhtml":c}var mn,xi=function(c){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(p,w,M,R){MSApp.execUnsafeLocalFunction(function(){return c(p,w,M,R)})}:c}(function(c,p){if(c.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in c)c.innerHTML=p;else{for(mn=mn||document.createElement("div"),mn.innerHTML="<svg>"+p.valueOf().toString()+"</svg>",p=mn.firstChild;c.firstChild;)c.removeChild(c.firstChild);for(;p.firstChild;)c.appendChild(p.firstChild)}});function bi(c,p){if(p){var w=c.firstChild;if(w&&w===c.lastChild&&w.nodeType===3){w.nodeValue=p;return}}c.textContent=p}var Ln={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},ci=["Webkit","ms","Moz","O"];Object.keys(Ln).forEach(function(c){ci.forEach(function(p){p=p+c.charAt(0).toUpperCase()+c.substring(1),Ln[p]=Ln[c]})});function sn(c,p,w){return p==null||typeof p=="boolean"||p===""?"":w||typeof p!="number"||p===0||Ln.hasOwnProperty(c)&&Ln[c]?(""+p).trim():p+"px"}function Un(c,p){c=c.style;for(var w in p)if(p.hasOwnProperty(w)){var M=w.indexOf("--")===0,R=sn(w,p[w],M);w==="float"&&(w="cssFloat"),M?c.setProperty(w,R):c[w]=R}}var Fe=xt({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 ne(c,p){if(p){if(Fe[c]&&(p.children!=null||p.dangerouslySetInnerHTML!=null))throw Error(i(137,c));if(p.dangerouslySetInnerHTML!=null){if(p.children!=null)throw Error(i(60));if(typeof p.dangerouslySetInnerHTML!="object"||!("__html"in p.dangerouslySetInnerHTML))throw Error(i(61))}if(p.style!=null&&typeof p.style!="object")throw Error(i(62))}}function ie(c,p){if(c.indexOf("-")===-1)return typeof p.is=="str
37ing";switch(c){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 he=null;function we(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var Ve=null,ue=null,$e=null;function Le(c){if(c=eu(c)){if(typeof Ve!="function")throw Error(i(280));var p=c.stateNode;p&&(p=Gs(p),Ve(c.stateNode,c.type,p))}}function Be(c){ue?$e?$e.push(c):$e=[c]:ue=c}function tt(){if(ue){var c=ue,p=$e;if($e=ue=null,Le(c),p)for(c=0;c<p.length;c++)Le(p[c])}}function Ze(c,p){return c(p)}function vt(){}var ge=!1;function Te(c,p,w){if(ge)return c(p,w);ge=!0;try{return Ze(c,p,w)}finally{ge=!1,(ue!==null||$e!==null)&&(vt(),tt())}}function Oe(c,p){var w=c.stateNode;if(w===null)return null;var M=Gs(w);if(M===null)return null;w=M[p];e:switch(p){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(M=!M.disabled)||(c=c.type,M=!(c==="button"||c==="input"||c==="select"||c==="textarea")),c=!M;break e;default:c=!1}if(c)return null;if(w&&typeof w!="function")throw Error(i(231,p,typeof w));return w}var ht=!1;if(s)try{var gt={};Object.defineProperty(gt,"passive",{get:function(){ht=!0}}),window.addEventListener("test",gt,gt),window.removeEventListener("test",gt,gt)}catch{ht=!1}function Xe(c,p,w,M,R,z,re,Se,ke){var ut=Array.prototype.slice.call(arguments,3);try{p.apply(w,ut)}catch(It){this.onError(It)}}var Ot=!1,Mt=null,Dt=!1,Et=null,He={onError:function(c){Ot=!0,Mt=c}};function Wt(c,p,w,M,R,z,re,Se,ke){Ot=!1,Mt=null,Xe.apply(He,arguments)}function Lt(c,p,w,M,R,z,re,Se,ke){if(Wt.apply(this,arguments),Ot){if(Ot){var ut=Mt;Ot=!1,Mt=null}else throw Error(i(198));Dt||(Dt=!0,Et=ut)}}function sr(c){var p=c,w=c;if(c.alternate)for(;p.return;)p=p.return;else{c=p;do p=c,(p.flags&4098)!==0&&(w=p.return),c=p.return;while(c)}return p.tag===3?w:null}function vr(c){if(c.tag===13){var p=c.memoizedState;if(p===null&&(c=c.alternate,c!==null&&(p=c.memoizedState)),p!==null)return p.dehydrated}return null}function Zr(c){if(sr(c)!==c)throw Error(i(188))}function nr(c){var p=c.alternate;if(!p){if(p=sr(c),p===null)throw Error(i(188));return p!==c?null:c}for(var w=c,M=p;;){var R=w.return;if(R===null)break;var z=R.alternate;if(z===null){if(M=R.return,M!==null){w=M;continue}break}if(R.child===z.child){for(z=R.child;z;){if(z===w)return Zr(R),c;if(z===M)return Zr(R),p;z=z.sibling}throw Error(i(188))}if(w.return!==M.return)w=R,M=z;else{for(var re=!1,Se=R.child;Se;){if(Se===w){re=!0,w=R,M=z;break}if(Se===M){re=!0,M=R,w=z;break}Se=Se.sibling}if(!re){for(Se=z.child;Se;){if(Se===w){re=!0,w=z,M=R;break}if(Se===M){re=!0,M=z,w=R;break}Se=Se.sibling}if(!re)throw Error(i(189))}}if(w.alternate!==M)throw Error(i(190))}if(w.tag!==3)throw Error(i(188));return w.stateNode.current===w?c:p}function Tr(c){return c=nr(c),c!==null?ka(c):null}function ka(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){var p=ka(c);if(p!==null)return p;c=c.sibling}return null}var Ci=t.unstable_scheduleCallback,Da=t.unstable_cancelCallback,Cn=t.unstable_shouldYield,ba=t.unstable_requestPaint,gr=t.unstable_now,wi=t.unstable_getCurrentPriorityLevel,Rr=t.unstable_ImmediatePriority,rs=t.unstable_UserBlockingPriority,Pr=t.unstable_NormalPriority,Vi=t.unstable_LowPriority,Yi=t.unstable_IdlePriority,Si=null,Bi=null;function wn(c){if(Bi&&typeof Bi.onCommitFiberRoot=="function")try{Bi.onCommitFiberRoot(Si,c,void 0,(c.current.flags&128)===128)}catch{}}var ii=Math.clz32?Math.clz32:Tp,zs=Math.log,hc=Math.LN2;function Tp(c){return c>>>=0,c===0?32:31-(zs(c)/hc|0)|0}var dc=64,fc=4194304;function Cl(c){switch(c&-c){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 c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function Vl(c,p){var w=c.pendingLanes;if(w===0)return 0;var M=0,R=c.suspendedLanes,z=c.pingedLanes,re=w&268435455;if(re!==0){var Se=re&~R;Se!==0?M=Cl(Se):(z&=re,z!==0&&(M=Cl(z)))}else re=w&~R,re!==0?M=Cl(re):z!==0&&(M=Cl(z));if(M===0)return 0;if(p!==0&&p!==M&&(p&R)===0&&(R=M&-M,z=p&-p,R>=z||R===16&&(z&4194240)!==0))return p;if((M&4)!==0&&(M|=w&16),p=c.entangledLanes,p!==0)for(c=c.entanglements,p&=M;0<p;)w=31-ii(p),R=1<<w,M|=c[w],p&=~R;return M}function $o(c,p){switch(c){case 1:case 2:case 4:return p+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Th(c,p){for(var w=c.suspendedLanes,M=c.pingedLanes,R=c.expirationTimes,z=c.pendingLanes;0<z;){var re=31-ii(z),Se=1<<re,ke=R[re];ke===-1?((Se&w)===0||(Se&M)!==0)&&(R[re]=$o(Se,p)):ke<=p&&(c.expiredLanes|=Se),z&=~Se}}function pc(c){return c=c.pendingLanes&-1073741825,c!==0?c:c&1073741824?1073741824:0}function uo(){var c=dc;return dc<<=1,(dc&4194240)===0&&(dc=64),c}function wu(c){for(var p=[],w=0;31>w;w++)p.push(c);return p}function Yu(c,p,w){c.pendingLanes|=p,p!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,p=31-ii(p),c[p]=w}function Su(c,p){var w=c.pendingLanes&~p;c.pendingLanes=p,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=p,c.mutableReadLanes&=p,c.entangledLanes&=p,p=c.entanglements;var M=c.eventTimes;for(c=c.expirationTimes;0<w;){var R=31-ii(w),z=1<<R;p[R]=0,M[R]=-1,c[R]=-1,w&=~z}}function Go(c,p){var w=c.entangledLanes|=p;for(c=c.entanglements;w;){var M=31-ii(w),R=1<<M;R&p|c[M]&p&&(c[M]|=p),w&=~R}}var qr=0;function Ai(c){return c&=-c,1<c?4<c?(c&268435455)!==0?16:536870912:4:1}var Cr,co,ki,ho,Mr,qo=!1,fo=[],wa=null,On=null,Yn=null,gn=new Map,Xn=new Map,zr=[],Al="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 Di(c,p){switch(c){case"focusin":case"focusout":wa=null;break;case"dragenter":case"dragleave":On=null;break;case"mouseover":case"mouseout":Yn=null;break;case"pointerover":case"pointerout":gn.delete(p.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xn.delete(p.pointerId)}}function Ti(c,p,w,M,R,z){return c===null||c.nativeEvent!==z?(c={blockedOn:p,domEventName:w,eventSystemFlags:M,nativeEvent:z,targetContainers:[R]},p!==null&&(p=eu(p),p!==null&&co(p)),c):(c.eventSystemFlags|=M,p=c.targetContainers,R!==null&&p.indexOf(R)===-1&&p.push(R),c)}function aa(c,p,w,M,R){switch(p){case"focusin":return wa=Ti(wa,c,p,w,M,R),!0;case"dragenter":return On=Ti(On,c,p,w,M,R),!0;case"mouseover":return Yn=Ti(Yn,c,p,w,M,R),!0;case"pointerover":var z=R.pointerId;return gn.set(z,Ti(gn.get(z)||null,c,p,w,M,R)),!0;case"gotpointercapture":return z=R.pointerId,Xn.set(z,Ti(Xn.get(z)||null,c,p,w,M,R)),!0}return!1}function kl(c){var p=So(c.target);if(p!==null){var w=sr(p);if(w!==null){if(p=w.tag,p===13){if(p=vr(w),p!==null){c.blockedOn=p,Mr(c.priority,function(){ki(w)});return}}else if(p===3&&w.stateNode.current.memoizedState.isDehydrated){c.blockedOn=w.tag===3?w.stateNode.containerInfo:null;return}}}c.blockedOn=null}
vendor: 24,380 bytes, lines 37-38
37function jr(c){if(c.blockedOn!==null)return!1;for(var p=c.targetContainers;0<p.length;){var w=mo(c.domEventName,c.eventSystemFlags,p[0],c.nativeEvent);if(w===null){w=c.nativeEvent;var M=new w.constructor(w.type,w);he=M,w.target.dispatchEvent(M),he=null}else return p=eu(w),p!==null&&co(p),c.blockedOn=w,!1;p.shift()}return!0}function Sn(c,p,w){jr(c)&&w.delete(p)}function Ir(){qo=!1,wa!==null&&jr(wa)&&(wa=null),On!==null&&jr(On)&&(On=null),Yn!==null&&jr(Yn)&&(Yn=null),gn.forEach(Sn),Xn.forEach(Sn)}function ur(c,p){c.blockedOn===p&&(c.blockedOn=null,qo||(qo=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ir)))}function xs(c){function p(R){return ur(R,c)}if(0<fo.length){ur(fo[0],c);for(var w=1;w<fo.length;w++){var M=fo[w];M.blockedOn===c&&(M.blockedOn=null)}}for(wa!==null&&ur(wa,c),On!==null&&ur(On,c),Yn!==null&&ur(Yn,c),gn.forEach(p),Xn.forEach(p),w=0;w<zr.length;w++)M=zr[w],M.blockedOn===c&&(M.blockedOn=null);for(;0<zr.length&&(w=zr[0],w.blockedOn===null);)kl(w),w.blockedOn===null&&zr.shift()}var dr=fe.ReactCurrentBatchConfig,Ho=!0;function Ri(c,p,w,M){var R=qr,z=dr.transition;dr.transition=null;try{qr=1,Tu(c,p,w,M)}finally{qr=R,dr.transition=z}}function Wh(c,p,w,M){var R=qr,z=dr.transition;dr.transition=null;try{qr=4,Tu(c,p,w,M)}finally{qr=R,dr.transition=z}}function Tu(c,p,w,M){if(Ho){var R=mo(c,p,w,M);if(R===null)Kl(c,p,M,po,w),Di(c,M);else if(aa(R,c,p,w,M))M.stopPropagation();else if(Di(c,M),p&4&&-1<Al.indexOf(c)){for(;R!==null;){var z=eu(R);if(z!==null&&Cr(z),z=mo(c,p,w,M),z===null&&Kl(c,p,M,po,w),z===R)break;R=z}R!==null&&M.stopPropagation()}else Kl(c,p,M,null,w)}}var po=null;function mo(c,p,w,M){if(po=null,c=we(M),c=So(c),c!==null)if(p=sr(c),p===null)c=null;else if(w=p.tag,w===13){if(c=vr(p),c!==null)return c;c=null}else if(w===3){if(p.stateNode.current.memoizedState.isDehydrated)return p.tag===3?p.stateNode.containerInfo:null;c=null}else p!==c&&(c=null);return po=c,null}function Dl(c){switch(c){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(wi()){case Rr:return 1;case rs:return 4;case Pr:case Vi:return 16;case Yi:return 536870912;default:return 16}default:return 16}}var bs=null,Rl=null,go=null;function yo(){if(go)return go;var c,p=Rl,w=p.length,M,R="value"in bs?bs.value:bs.textContent,z=R.length;for(c=0;c<w&&p[c]===R[c];c++);var re=w-c;for(M=1;M<=re&&p[w-M]===R[z-M];M++);return go=R.slice(c,1<M?1-M:void 0)}function Nn(c){var p=c.keyCode;return"charCode"in c?(c=c.charCode,c===0&&p===13&&(c=13)):c=p,c===10&&(c=13),32<=c||c===13?c:0}function ws(){return!0}function Ll(){return!1}function qn(c){function p(w,M,R,z,re){this._reactName=w,this._targetInst=R,this.type=M,this.nativeEvent=z,this.target=re,this.currentTarget=null;for(var Se in c)c.hasOwnProperty(Se)&&(w=c[Se],this[Se]=w?w(z):z[Se]);return this.isDefaultPrevented=(z.defaultPrevented!=null?z.defaultPrevented:z.returnValue===!1)?ws:Ll,this.isPropagationStopped=Ll,this}return xt(p.prototype,{preventDefault:function(){this.defaultPrevented=!0;var w=this.nativeEvent;w&&(w.preventDefault?w.preventDefault():typeof w.returnValue!="unknown"&&(w.returnValue=!1),this.isDefaultPrevented=ws)},stopPropagation:function(){var w=this.nativeEvent;w&&(w.stopPropagation?w.stopPropagation():typeof w.cancelBubble!="unknown"&&(w.cancelBubble=!0),this.isPropagationStopped=ws)},persist:function(){},isPersistent:ws}),p}var En={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(c){return c.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ol=qn(En),vo=xt({},En,{view:0,detail:0}),Zd=qn(vo),Eh,hi,Fs,Ya=xt({},vo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:La,button:0,buttons:0,relatedTarget:function(c){return c.relatedTarget===void 0?c.fromElement===c.srcElement?c.toElement:c.fromElement:c.relatedTarget},movementX:function(c){return"movementX"in c?c.movementX:(c!==Fs&&(Fs&&c.type==="mousemove"?(Eh=c.screenX-Fs.screenX,hi=c.screenY-Fs.screenY):hi=Eh=0,Fs=c),Eh)},movementY:function(c){return"movementY"in c?c.movementY:hi}}),_o=qn(Ya),Wu=xt({},Ya,{dataTransfer:0}),Ra=qn(Wu),Ko=xt({},vo,{relatedTarget:0}),Xl=qn(Ko),Wp=xt({},En,{animationName:0,elapsedTime:0,pseudoElement:0}),Mh=qn(Wp),Ep=xt({},En,{clipboardData:function(c){return"clipboardData"in c?c.clipboardData:window.clipboardData}}),Mp=qn(Ep),Pp=xt({},En,{data:0}),Eu=qn(Pp),Nl={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mc={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"},gc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yc(c){var p=this.nativeEvent;return p.getModifierState?p.getModifierState(c):(c=gc[c])?!!p[c]:!1}function La(){return yc}var jd=xt({},vo,{key:function(c){if(c.key){var p=Nl[c.key]||c.key;if(p!=="Unidentified")return p}return c.type==="keypress"?(c=Nn(c),c===13?"Enter":String.fromCharCode(c)):c.type==="keydown"||c.type==="keyup"?mc[c.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:La,charCode:function(c){return c.type==="keypress"?Nn(c):0},keyCode:function(c){return c.type==="keydown"||c.type==="keyup"?c.keyCode:0},which:function(c){return c.type==="keypress"?Nn(c):c.type==="keydown"||c.type==="keyup"?c.keyCode:0}}),Ph=qn(jd),Mu=xt({},Ya,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zl=qn(Mu),Ip=xt({},vo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:La}),vc=qn(Ip),Bd=xt({},En,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qo=qn(Bd),$d=xt({},Ya,{deltaX:function(c){return"deltaX"in c?c.deltaX:"wheelDeltaX"in c?-c.wheelDeltaX:0},deltaY:function(c){return"deltaY"in c?c.deltaY:"wheelDeltaY"in c?-c.wheelDeltaY:"wheelDelta"in c?-c.wheelDelta:0},deltaZ:0,deltaMode:0}),Gd=qn($d),Up=[9,13,27,32],_c=s&&"CompositionEvent"in window,Zs=null;s&&"documentMode"in document&&(Zs=document.documentMode);var qd=s&&"TextEvent"in window&&!Zs,Ih=s&&(!_c||Zs&&8<Zs&&11>=Zs),Uh=" ",xc=!1;function js(c,p){switch(c){case"keyup":return Up.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ch(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var Jo=!1;function Fl(c,p){switch(c){case"compositionend":return Ch(p);case"keypress":return p.which!==32?null:(xc=!0,Uh);case"textInput":return c=p.data,c===Uh&&xc?null:c;default:return null}}function Hd(c,p){if(Jo)return c==="compositionend"||!_c&&js(c,p)?(c=yo(),go=Rl=bs=null,Jo=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1<p.char.length)return p.char;if(p.which)return String.fromCharCode(p.which)}return null;case"compositionend":return Ih&&p.locale!=="ko"?null:p.data;default:return null}}var bc={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 Kd(c){var p=c&&c.nodeName&&c.nodeName.toLowerCase();return p==="input"?!!bc[c.type]:p==="textarea"}function Qd(c,p,w,M){Be(M),p=Yo(p,"onChange"),0<p.length&&(w=new Ol("onChange","change",null,w,M),c.push({event:w,listeners:p}))}var el=null,Zl=null;function Jd(c){zh(c,0)}function jl(c){var p=os(c);if(Wn(p))return c}function ef(c,p){if(c==="change")return p}var Dr=!1;if(s){var ns;if(s){var Pu="oninput"in document;if(!Pu){var wc=document.createElement("div");wc.setAttribute("oninput","return;"),Pu=typeof wc.oninput=="function"}ns=Pu}else ns=!1;Dr=ns&&(!document.documentMode||9<document.documentMode)}function Yc(){el&&(el.detachEvent("onpropertychange",Vh),Zl=el=null)}function Vh(c){if(c.propertyName==="value"&&jl(Zl)){var p=[];Qd(p,Zl,c,we(c)),Te(Jd,p)}}function Ah(c,p,w){c==="focusin"?(Yc(),el=p,Zl=w,el.attachEvent("onpropertychange",Vh)):c==="focusout"&&Yc()}function tl(c){if(c==="selectionchange"||c==="keyup"||c==="keydown")return jl(Zl)}function kh(c,p){if(c==="click")return jl(p)}function Cp(c,p){if(c==="input"||c==="change")return jl(p)}function Vp(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var is=typeof Object.is=="function"?Object.is:Vp;function Iu(c,p){if(is(c,p))return!0;if(typeof c!="object"||c===null||typeof p!="object"||p===null)return!1;var w=Object.keys(c),M=Object.keys(p);if(w.length!==M.length)return!1;for(M=0;M<w.length;M++){var R=w[M];if(!Y.call(p,R)||!is(c[R],p[R]))return!1}return!0}function Dh(c){for(;c&&c.firstChild;)c=c.firstChild;return c}function tf(c,p){var w=Dh(c);c=0;for(var M;w;){if(w.nodeType===3){if(M=c+w.textContent.length,c<=p&&M>=p)return{node:w,offset:p-c};c=M}e:{for(;w;){if(w.nextSibling){w=w.nextSibling;break e}w=w.parentNode}w=void 0}w=Dh(w)}}function Rh(c,p){return c&&p?c===p?!0:c&&c.nodeType===3?!1:p&&p.nodeType===3?Rh(c,p.parentNode):"contains"in c?c.contains(p):c.compareDocumentPosition?!!(c.compareDocumentPosition(p)&16):!1:!1}function Uu(){for(var c=window,p=pn();p instanceof c.HTMLIFrameElement;){try{var w=typeof p.contentWindow.location.href=="string"}catch{w=!1}if(w)c=p.contentWindow;else break;p=pn(c.document)}return p}function Bl(c){var p=c&&c.nodeName&&c.nodeName.toLowerCase();return p&&(p==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||p==="textarea"||c.contentEditable==="true")}function Sc(c){var p=Uu(),w=c.focusedElem,M=c.selectionRange;if(p!==w&&w&&w.ownerDocument&&Rh(w.ownerDocument.documentElement,w)){if(M!==null&&Bl(w)){if(p=M.start,c=M.end,c===void 0&&(c=p),"selectionStart"in w)w.selectionStart=p,w.selectionEnd=Math.min(c,w.value.length);else if(c=(p=w.ownerDocument||document)&&p.defaultView||window,c.getSelection){c=c.getSelection();var R=w.textContent.length,z=Math.min(M.start,R);M=M.end===void 0?z:Math.min(M.end,R),!c.extend&&z>M&&(R=M,M=z,z=R),R=tf(w,z);var re=tf(w,M);R&&re&&(c.rangeCount!==1||c.anchorNode!==R.node||c.anchorOffset!==R.offset||c.focusNode!==re.node||c.focusOffset!==re.offset)&&(p=p.createRange(),p.setStart(R.node,R.offset),c.removeAllRanges(),z>M?(c.addRange(p),c.extend(re.node,re.offset)):(p.setEnd(re.node,re.offset),c.addRange(p)))}}for(p=[],c=w;c=c.parentNode;)c.nodeType===1&&p.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<p.length;w++)c=p[w],c.element.scrollLeft=c.left,c.element.scrollTop=c.top}}var Lh=s&&"documentMode"in document&&11>=document.documentMode,Oa=null,$l=null,Ys=null,sa=!1;function Oh(c,p,w){var M=w.window===w?w.document:w.nodeType===9?w:w.ownerDocument;sa||Oa==null||Oa!==pn(M)||(M=Oa,"selectionStart"in M&&Bl(M)?M={start:M.selectionStart,end:M.selectionEnd}:(M=(M.ownerDocument&&M.ownerDocument.defaultView||window).getSelection(),M={anchorNode:M.anchorNode,anchorOffset:M.anchorOffset,focusNode:M.focusNode,focusOffset:M.focusOffset}),Ys&&Iu(Ys,M)||(Ys=M,M=Yo($l,"onSelect"),0<M.length&&(p=new Ol("onSelect","select",null,p,w),c.push({event:p,listeners:M}),p.target=Oa)))}function Cu(c,p){var w={};return w[c.toLowerCase()]=p.toLowerCase(),w["Webkit"+c]="webkit"+p,w["Moz"+c]="moz"+p,w}var xo={animationend:Cu("Animation","AnimationEnd"),animationiteration:Cu("Animation","AnimationIteration"),animationstart:Cu("Animation","AnimationStart"),transitionend:Cu("Transition","TransitionEnd")},Bs={},Vu={};s&&(Vu=document.createElement("div").style,"AnimationEvent"in window||(delete xo.animationend.animation,delete xo.animationiteration.animation,delete xo.animationstart.animation),"TransitionEvent"in window||delete xo.transitionend.transition);function rl(c){if(Bs[c])return Bs[c];if(!xo[c])return c;var p=xo[c],w;for(w in p)if(p.hasOwnProperty(w)&&w in Vu)return Bs[c]=p[w];return c}var Gl=rl("animationend"),Au=rl("animationiteration"),ku=rl("animationstart"),nl=rl("transitionend"),il=new Map,Xh="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 as(c,p){il.set(c,p),m(p,[c])}for(var br=0;br<Xh.length;br++){var ql=Xh[br],Tc=ql.toLowerCase(),Nh=ql[0].toUpperCase()+ql.slice(1);as(Tc,"on"+Nh)}as(Gl,"onAnimationEnd"),as(Au,"onAnimationIteration"),as(ku,"onAnimationStart"),as("dblclick","onDoubleClick"),as("focusin","onFocus"),as("focusout","onBlur"),as(nl,"onTransitionEnd"),g("onMouseEnter",["mouseout","mouseover"]),g("onMouseLeave",["mouseout","mouseover"]),g("onPointerEnter",["pointerout","pointerover"]),g("onPointerLeave",["pointerout","pointerover"]),m("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),m("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),m("onBeforeInput",["compositionend","keypress","textInput","paste"]),m("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),m("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),m("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $s="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(" "),Ap=new Set("cancel close invalid load scroll toggle".split(" ").concat($s));function rf(c,p,w){var M=c.type||"unknown-event";c.currentTarget=w,Lt(M,p,void 0,c),c.currentTarget=null}function zh(c,p){p=(p&4)!==0;for(var w=0;w<c.length;w++){var M=c[w],R=M.event;M=M.listeners;e:{var z=void 0;if(p)for(var re=M.length-1;0<=re;re--){var Se=M[re],ke=Se.instance,ut=Se.currentTarget;if(Se=Se.listener,ke!==z&&R.isPropagationStopped())break e;rf(R,Se,ut),z=ke}else for(re=0;re<M.length;re++){if(Se=M[re],ke=Se.instance,ut=Se.currentTarget,Se=Se.listener,ke!==z&&R.isPropagationStopped())break e;rf(R,Se,ut),z=ke}}}if(Dt)throw c=Et,Dt=!1,Et=null,c}function yn(c,p){var w=p[ol];w===void 0&&(w=p[ol]=new Set);var M=c+"__bubble";w.has(M)||(Wc(p,c,2,!1),w.add(M))}function Hl(c,p,w){var M=0;p&&(M|=4),Wc(w,c,M,p)}var bo="_reactListening"+Math.random().toString(36).slice(2);function wo(c){if(!c[bo]){c[bo]=!0,a.forEach(function(w){w!=="selectionchange"&&(Ap.has(w)||Hl(w,!1,c),Hl(w,!0,c))});var p=c.nodeType===9?c:c.ownerDocument;p===null||p[bo]||(p[bo]=!0,Hl("selectionchange",!1,p))}}function Wc(c,p,w,M){switch(Dl(p)){case 1:var R=Ri;break;case 4:R=Wh;break;default:R=Tu}w=R.bind(null,p,w,c),R=void 0,!ht||p!=="touchstart"&&p!=="touchmove"&&p!=="wheel"||(R=!0),M?R!==void 0?c.addEventListener(p,w,{capture:!0,passive:R}):c.addEventListener(p,w,!0):R!==void 0?c.addEventListener(p,w,{passive:R}):c.addEventListener(p,w,!1)}function Kl(c,p,w,M,R){var z=M;if((p&1)===0&&(p&2)===0&&M!==null)e:for(;;){if(M===null)return;var re=M.tag;if(re===3||re===4){var Se=M.stateNode.containerInfo;if(Se===R||Se.nodeType===8&&Se.parentNode===R)break;if(re===4)for(re=M.return;re!==null;){var ke=re.tag;if((ke===3||ke===4)&&(ke=re.stateNode.containerInfo,ke===R||ke.nodeType===8&&ke.parentNode===R))return;re=re.return}for(;Se!==null;){if(re=So(Se),re===null)return;if(ke=re.tag,ke===5||ke===6){M=z=re;continue e}Se=Se.parentNode}}M=M.return}Te(function(){var ut=z,It=we(w),kt=[];e:{var Ut=il.get(c);if(Ut!==void 0){var Bt=Ol,Qt=c;switch(c){case"keypress":if(Nn(w)===0)break e;case"keydown":case"keyup":Bt=Ph;break;case"focusin":Qt="focus",Bt=Xl;break;case"focusout":Qt="blur",Bt=Xl;break;case"beforeblur":case"afterblur":Bt=Xl;break;case"click":if(w.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Bt=_o;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Bt=Ra;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Bt=vc;break;case Gl:case Au:case ku:Bt=Mh;break;case nl:Bt=Qo;break;case"scroll":Bt=Zd;break;case"wheel":Bt=Gd;break;case"copy":case"cut":case"paste":Bt=Mp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Bt=zl}var Jt=(p&4)!==0,Bn=!Jt&&c==="scroll",Je=Jt?Ut!==null?Ut+"Capture":null:Ut;Jt=[];for(var Ne=ut,nt;Ne!==null;){nt=Ne;var Rt=nt.stateNode;if(nt.tag===5&&Rt!==null&&(nt=Rt,Je!==null&&(Rt=Oe(Ne,Je),Rt!=null&&Jt.push(al(Ne,Rt,nt)))),Bn)break;Ne=Ne.return}0<Jt.length&&(Ut=new Bt(Ut,Qt,null,w,It),kt.push({event:Ut,listeners:Jt}))}}if((p&7)===0){e:{if(Ut=c==="mouseover"||c==="pointerover",Bt=c==="mouseout"||c==="pointerout",Ut&&w!==he&&(Qt=w.relatedTarget||w.fromElement)&&(So(Qt)||Qt[ss]))break e;if((Bt||Ut)&&(Ut=It.window===It?It:(Ut=It.ownerDocument)?Ut.defaultView||Ut.parentWindow:window,Bt?(Qt=w.relatedTarget||w.toElement,Bt=ut,Qt=Qt?So(Qt):null,Qt!==null&&(Bn=sr(Qt),Qt!==Bn||Qt.tag!==5&&Qt.tag!==6)&&(Qt=null)):(Bt=null,Qt=ut),Bt!==Qt)){if(Jt=_o,Rt="onMouseLeave",Je="onMouseEnter",Ne="mouse",(c==="pointerout"||c==="pointerover")&&(Jt=zl,Rt="onPointerLeave",Je="onPointerEnter",Ne="pointer"),Bn=Bt==null?Ut:os(Bt),nt=Qt==null?Ut:os(Qt),Ut=new Jt(Rt,Ne+"leave",Bt,w,It),Ut.target=Bn,Ut.relatedTarget=nt,Rt=null,So(It)===ut&&(Jt=new Jt(Je,Ne+"enter",Qt,w,It),Jt.target=nt,Jt.relatedTarget=Bn,Rt=Jt),Bn=Rt,Bt&&Qt)t:{for(Jt=Bt,Je=Qt,Ne=0,nt=Jt;nt;nt=Ss(nt))Ne++;for(nt=0,Rt=Je;Rt;Rt=Ss(Rt))nt++;for(;0<Ne-nt;)Jt=Ss(Jt),Ne--;for(;0<nt-Ne;)Je=Ss(Je),nt--;for(;Ne--;){if(Jt===Je||Je!==null&&Jt===Je.alternate)break t;Jt=Ss(Jt),Je=Ss(Je)}Jt=null}else Jt=null;Bt!==null&&Ql(kt,Ut,Bt,Jt,!1),Qt!==null&&Bn!==null&&Ql(kt,Bn,Qt,Jt,!0)}}e:{if(Ut=ut?os(ut):window,Bt=Ut.nodeName&&Ut.nodeName.toLowerCase(),Bt==="select"||Bt==="input"&&Ut.type==="file")var er=ef;else if(Kd(Ut))if(Dr)er=Cp;else{er=tl;var cr=Ah}else(Bt=Ut.nodeName)&&Bt.toLowerCase()==="input"&&(Ut.type==="checkbox"||Ut.type==="radio")&&(er=kh);if(er&&(er=er(c,ut))){Qd(kt,er,w,It);break e}cr&&cr(c,Ut,ut),c==="focusout"&&(cr=Ut._wrapperState)&&cr.controlled&&Ut.type==="number"&&ui(Ut,"number",Ut.value)}switch(cr=ut?os(ut):window,c){case"focusin":(Kd(cr)||cr.contentEditable==="true")&&(Oa=cr,$l=ut,Ys=null);break;case"focusout":Ys=$l=Oa=null;break;case"mousedown":sa=!0;break;case"contextmenu":case"mouseup":case"dragend":sa=!1,Oh(kt,w,It);break;case"selectionchange":if(Lh)break;case"keydown":case"keyup":Oh(kt,w,It)}var lr;if(_c)e:{switch(c){case"compositionstart":var yr="onCompositionStart";break e;case"compositionend":yr="onCompositionEnd";break e;case"compositionupdate":yr="onCompositionUpdate";break e}yr=void 0}else Jo?js(c,w)&&(yr="onCompositionEnd"):c==="keydown"&&w.keyCode===229&&(yr="onCompositionStart");yr&&(Ih&&w.locale!=="ko"&&(Jo||yr!=="onCompositionStart"?yr==="onCompositionEnd"&&Jo&&(lr=yo()):(bs=It,Rl="value"in bs?bs.value:bs.textContent,Jo=!0)),cr=Yo(ut,yr),0<cr.length&&(yr=new Eu(yr,c,null,w,It),kt.push({event:yr,listeners:cr}),lr?yr.data=lr:(lr=Ch(w),lr!==null&&(yr.data=lr)))),(lr=qd?Fl(c,w):Hd(c,w))&&(ut=Yo(ut,"onBeforeInput"),0<ut.length&&(It=new Eu("onBeforeInput","beforeinput",null,w,It),kt.push({event:It,listeners:ut}),It.data=lr))}zh(kt,p)})}function al(c,p,w){return{instance:c,listener:p,currentTarget:w}}function Yo(c,p){for(var w=p+"Capture",M=[];c!==null;){var R=c,z=R.stateNode;R.tag===5&&z!==null&&(R=z,z=Oe(c,w),z!=null&&M.unshift(al(c,z,R)),z=Oe(c,p),z!=null&&M.push(al(c,z,R))),c=c.return}return M}function Ss(c){if(c===null)return null;do c=c.return;while(c&&c.tag!==5);return c||null}function Ql(c,p,w,M,R){for(var z=p._reactName,re=[];w!==null&&w!==M;){var Se=w,ke=Se.alternate,ut=Se.stateNode;if(ke!==null&&ke===M)break;Se.tag===5&&ut!==null&&(Se=ut,R?(ke=Oe(w,z),ke!=null&&re.unshift(al(w,ke,Se))):R||(ke=Oe(w,z),ke!=null&&re.push(al(w,ke,Se)))),w=w.return}re.length!==0&&c.push({event:p,listeners:re})}var Fh=/\r\n?/g,Du=/\u0000|\uFFFD/g;function Ru(c){return(typeof c=="string"?c:""+c).replace(Fh,` 38`).replace(Du,"")}function Lu(c,p,w){if(p=Ru(p),Ru(c)!==p&&w)throw Error(i(425))}function sl(){}var Ou=null,Ec=null;function Mc(c,p){return c==="textarea"||c==="noscript"||typeof p.children=="string"||typeof p.children=="number"||typeof p.dangerouslySetInnerHTML=="object"&&p.dangerouslySetInnerHTML!==null&&p.dangerouslySetInnerHTML.__html!=null}var Jl=typeof setTimeout=="function"?setTimeout:void 0,Pc=typeof clearTimeout=="function"?clearTimeout:void 0,Zh=typeof Promise=="function"?Promise:void 0,Xu=typeof queueMicrotask=="function"?queueMicrotask:typeof Zh<"u"?function(c){return Zh.resolve(null).then(c).catch(Vn)}:Jl;function Vn(c){setTimeout(function(){throw c})}function Ts(c,p){var w=p,M=0;do{var R=w.nextSibling;if(c.removeChild(w),R&&R.nodeType===8)if(w=R.data,w==="/$"){if(M===0){c.removeChild(R),xs(p);return}M--}else w!=="$"&&w!=="$?"&&w!=="$!"||M++;w=R}while(w);xs(p)}function Hn(c){for(;c!=null;c=c.nextSibling){var p=c.nodeType;if(p===1||p===3)break;if(p===8){if(p=c.data,p==="$"||p==="$!"||p==="$?")break;if(p==="/$")return null}}return c}function Ic(c){c=c.previousSibling;for(var p=0;c;){if(c.nodeType===8){var w=c.data;if(w==="$"||w==="$!"||w==="$?"){if(p===0)return c;p--}else w==="/$"&&p++}c=c.previousSibling}return null}var Ws=Math.random().toString(36).slice(2),Xa="__reactFiber$"+Ws,oa="__reactProps$"+Ws,ss="__reactContainer$"+Ws,ol="__reactEvents$"+Ws,jh="__reactListeners$"+Ws,nf="__reactHandles$"+Ws;function So(c){var p=c[Xa];if(p)return p;for(var w=c.parentNode;w;){if(p=w[ss]||w[Xa]){if(w=p.alternate,p.child!==null||w!==null&&w.child!==null)for(c=Ic(c);c!==null;){if(w=c[Xa])return w;c=Ic(c)}return p}c=w,w=c.parentNode}return null}function eu(c){return c=c[Xa]||c[ss],!c||c.tag!==5&&c.tag!==6&&c.tag!==13&&c.tag!==3?null:c}function os(c){if(c.tag===5||c.tag===6)return c.stateNode;throw Error(i(33))}function Gs(c){return c[oa]||null}var zn=[],ls=-1;function Es(c){return{current:c}}function hn(c){0>ls||(c.current=zn[ls],zn[ls]=null,ls--)}function on(c,p){ls++,zn[ls]=c.current,c.current=p}var Sa={},di=Es(Sa),Wi=Es(!1),To=Sa;function us(c,p){var w=c.type.contextTypes;if(!w)return Sa;var M=c.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===p)return M.__reactInternalMemoizedMaskedChildContext;var R={},z;for(z in w)R[z]=p[z];return M&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=p,c.__reactInternalMemoizedMaskedChildContext=R),R}function $i(c){return c=c.childContextTypes,c!=null}function ai(){hn(Wi),hn(di)}
vendor: 6,900 bytes, line 38
38function Na(c,p,w){if(di.current!==Sa)throw Error(i(168));on(di,p),on(Wi,w)}function ll(c,p,w){var M=c.stateNode;if(p=p.childContextTypes,typeof M.getChildContext!="function")return w;M=M.getChildContext();for(var R in M)if(!(R in p))throw Error(i(108,or(c)||"Unknown",R));return xt({},w,M)}function la(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||Sa,To=di.current,on(di,c),on(Wi,Wi.current),!0}function ul(c,p,w){var M=c.stateNode;if(!M)throw Error(i(169));w?(c=ll(c,p,To),M.__reactInternalMemoizedMergedChildContext=c,hn(Wi),hn(di),on(di,c)):hn(Wi),on(Wi,w)}var za=null,Uc=!1,Nu=!1;function zu(c){za===null?za=[c]:za.push(c)}function Bh(c){Uc=!0,zu(c)}function Ta(){if(!Nu&&za!==null){Nu=!0;var c=0,p=qr;try{var w=za;for(qr=1;c<w.length;c++){var M=w[c];do M=M(!0);while(M!==null)}za=null,Uc=!1}catch(R){throw za!==null&&(za=za.slice(c+1)),Ci(Rr,Ta),R}finally{qr=p,Nu=!1}}return null}var Gi=[],Xt=0,cl=null,hl=0,Wa=[],Ei=0,cs=null,hs=1,pr="";function Ms(c,p){Gi[Xt++]=hl,Gi[Xt++]=cl,cl=c,hl=p}function af(c,p,w){Wa[Ei++]=hs,Wa[Ei++]=pr,Wa[Ei++]=cs,cs=c;var M=hs;c=pr;var R=32-ii(M)-1;M&=~(1<<R),w+=1;var z=32-ii(p)+R;if(30<z){var re=R-R%5;z=(M&(1<<re)-1).toString(32),M>>=re,R-=re,hs=1<<32-ii(p)+R|w<<R|M,pr=z+c}else hs=1<<z|w<<R|M,pr=c}function Fu(c){c.return!==null&&(Ms(c,1),af(c,1,0))}function Cc(c){for(;c===cl;)cl=Gi[--Xt],Gi[Xt]=null,hl=Gi[--Xt],Gi[Xt]=null;for(;c===cs;)cs=Wa[--Ei],Wa[Ei]=null,pr=Wa[--Ei],Wa[Ei]=null,hs=Wa[--Ei],Wa[Ei]=null}var ua=null,qi=null,ln=!1,Hi=null;function sf(c,p){var w=qa(5,null,null,0);w.elementType="DELETED",w.stateNode=p,w.return=c,p=c.deletions,p===null?(c.deletions=[w],c.flags|=16):p.push(w)}function Zu(c,p){switch(c.tag){case 5:var w=c.type;return p=p.nodeType!==1||w.toLowerCase()!==p.nodeName.toLowerCase()?null:p,p!==null?(c.stateNode=p,ua=c,qi=Hn(p.firstChild),!0):!1;case 6:return p=c.pendingProps===""||p.nodeType!==3?null:p,p!==null?(c.stateNode=p,ua=c,qi=null,!0):!1;case 13:return p=p.nodeType!==8?null:p,p!==null?(w=cs!==null?{id:hs,overflow:pr}:null,c.memoizedState={dehydrated:p,treeContext:w,retryLane:1073741824},w=qa(18,null,null,0),w.stateNode=p,w.return=c,c.child=w,ua=c,qi=null,!0):!1;default:return!1}}function $h(c){return(c.mode&1)!==0&&(c.flags&128)===0}function Gh(c){if(ln){var p=qi;if(p){var w=p;if(!Zu(c,p)){if($h(c))throw Error(i(418));p=Hn(w.nextSibling);var M=ua;p&&Zu(c,p)?sf(M,w):(c.flags=c.flags&-4097|2,ln=!1,ua=c)}}else{if($h(c))throw Error(i(418));c.flags=c.flags&-4097|2,ln=!1,ua=c}}}function Ps(c){for(c=c.return;c!==null&&c.tag!==5&&c.tag!==3&&c.tag!==13;)c=c.return;ua=c}function en(c){if(c!==ua)return!1;if(!ln)return Ps(c),ln=!0,!1;var p;if((p=c.tag!==3)&&!(p=c.tag!==5)&&(p=c.type,p=p!=="head"&&p!=="body"&&!Mc(c.type,c.memoizedProps)),p&&(p=qi)){if($h(c))throw tu(),Error(i(418));for(;p;)sf(c,p),p=Hn(p.nextSibling)}if(Ps(c),c.tag===13){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));e:{for(c=c.nextSibling,p=0;c;){if(c.nodeType===8){var w=c.data;if(w==="/$"){if(p===0){qi=Hn(c.nextSibling);break e}p--}else w!=="$"&&w!=="$!"&&w!=="$?"||p++}c=c.nextSibling}qi=null}}else qi=ua?Hn(c.stateNode.nextSibling):null;return!0}function tu(){for(var c=qi;c;)c=Hn(c.nextSibling)}function Wo(){qi=ua=null,ln=!1}function Vc(c){Hi===null?Hi=[c]:Hi.push(c)}var of=fe.ReactCurrentBatchConfig;function ru(c,p,w){if(c=w.ref,c!==null&&typeof c!="function"&&typeof c!="object"){if(w._owner){if(w=w._owner,w){if(w.tag!==1)throw Error(i(309));var M=w.stateNode}if(!M)throw Error(i(147,c));var R=M,z=""+c;return p!==null&&p.ref!==null&&typeof p.ref=="function"&&p.ref._stringRef===z?p.ref:(p=function(re){var Se=R.refs;re===null?delete Se[z]:Se[z]=re},p._stringRef=z,p)}if(typeof c!="string")throw Error(i(284));if(!w._owner)throw Error(i(290,c))}return c}function Ac(c,p){throw c=Object.prototype.toString.call(p),Error(i(31,c==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":c))}function Li(c){var p=c._init;return p(c._payload)}function ju(c){function p(Je,Ne){if(c){var nt=Je.deletions;nt===null?(Je.deletions=[Ne],Je.flags|=16):nt.push(Ne)}}function w(Je,Ne){if(!c)return null;for(;Ne!==null;)p(Je,Ne),Ne=Ne.sibling;return null}function M(Je,Ne){for(Je=new Map;Ne!==null;)Ne.key!==null?Je.set(Ne.key,Ne):Je.set(Ne.index,Ne),Ne=Ne.sibling;return Je}function R(Je,Ne){return Je=ko(Je,Ne),Je.index=0,Je.sibling=null,Je}function z(Je,Ne,nt){return Je.index=nt,c?(nt=Je.alternate,nt!==null?(nt=nt.index,nt<Ne?(Je.flags|=2,Ne):nt):(Je.flags|=2,Ne)):(Je.flags|=1048576,Ne)}function re(Je){return c&&Je.alternate===null&&(Je.flags|=2),Je}function Se(Je,Ne,nt,Rt){return Ne===null||Ne.tag!==6?(Ne=sm(nt,Je.mode,Rt),Ne.return=Je,Ne):(Ne=R(Ne,nt),Ne.return=Je,Ne)}function ke(Je,Ne,nt,Rt){var er=nt.type;return er===De?It(Je,Ne,nt.props.children,Rt,nt.key):Ne!==null&&(Ne.elementType===er||typeof er=="object"&&er!==null&&er.$$typeof===Tt&&Li(er)===Ne.type)?(Rt=R(Ne,nt.props),Rt.ref=ru(Je,Ne,nt),Rt.return=Je,Rt):(Rt=Qc(nt.type,nt.key,nt.props,null,Je.mode,Rt),Rt.ref=ru(Je,Ne,nt),Rt.return=Je,Rt)}function ut(Je,Ne,nt,Rt){return Ne===null||Ne.tag!==4||Ne.stateNode.containerInfo!==nt.containerInfo||Ne.stateNode.implementation!==nt.implementation?(Ne=om(nt,Je.mode,Rt),Ne.return=Je,Ne):(Ne=R(Ne,nt.children||[]),Ne.return=Je,Ne)}function It(Je,Ne,nt,Rt,er){return Ne===null||Ne.tag!==7?(Ne=ec(nt,Je.mode,Rt,er),Ne.return=Je,Ne):(Ne=R(Ne,nt),Ne.return=Je,Ne)}function kt(Je,Ne,nt){if(typeof Ne=="string"&&Ne!==""||typeof Ne=="number")return Ne=sm(""+Ne,Je.mode,nt),Ne.return=Je,Ne;if(typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case We:return nt=Qc(Ne.type,Ne.key,Ne.props,null,Je.mode,nt),nt.ref=ru(Je,null,Ne),nt.return=Je,nt;case se:return Ne=om(Ne,Je.mode,nt),Ne.return=Je,Ne;case Tt:var Rt=Ne._init;return kt(Je,Rt(Ne._payload),nt)}if(Qr(Ne)||bt(Ne))return Ne=ec(Ne,Je.mode,nt,null),Ne.return=Je,Ne;Ac(Je,Ne)}return null}function Ut(Je,Ne,nt,Rt){var er=Ne!==null?Ne.key:null;if(typeof nt=="string"&&nt!==""||typeof nt=="number")return er!==null?null:Se(Je,Ne,""+nt,Rt);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case We:return nt.key===er?ke(Je,Ne,nt,Rt):null;case se:return nt.key===er?ut(Je,Ne,nt,Rt):null;case Tt:return er=nt._init,Ut(Je,Ne,er(nt._payload),Rt)}if(Qr(nt)||bt(nt))return er!==null?null:It(Je,Ne,nt,Rt,null);Ac(Je,nt)}return null}function Bt(Je,Ne,nt,Rt,er){if(typeof Rt=="string"&&Rt!==""||typeof Rt=="number")return Je=Je.get(nt)||null,Se(Ne,Je,""+Rt,er);if(typeof Rt=="object"&&Rt!==null){switch(Rt.$$typeof){case We:return Je=Je.get(Rt.key===null?nt:Rt.key)||null,ke(Ne,Je,Rt,er);case se:return Je=Je.get(Rt.key===null?nt:Rt.key)||null,ut(Ne,Je,Rt,er);case Tt:var cr=Rt._init;return Bt(Je,Ne,nt,cr(Rt._payload),er)}if(Qr(Rt)||bt(Rt))return Je=Je.get(nt)||null,It(Ne,Je,Rt,er,null);Ac(Ne,Rt)}return null}function Qt(Je,Ne,nt,Rt){for(var er=null,cr=null,lr=Ne,yr=Ne=0,Xi=null;lr!==null&&yr<nt.length;yr++){lr.index>
vendor: 9,546 bytes, line 38
38yr?(Xi=lr,lr=null):Xi=lr.sibling;var Kr=Ut(Je,lr,nt[yr],Rt);if(Kr===null){lr===null&&(lr=Xi);break}c&&lr&&Kr.alternate===null&&p(Je,lr),Ne=z(Kr,Ne,yr),cr===null?er=Kr:cr.sibling=Kr,cr=Kr,lr=Xi}if(yr===nt.length)return w(Je,lr),ln&&Ms(Je,yr),er;if(lr===null){for(;yr<nt.length;yr++)lr=kt(Je,nt[yr],Rt),lr!==null&&(Ne=z(lr,Ne,yr),cr===null?er=lr:cr.sibling=lr,cr=lr);return ln&&Ms(Je,yr),er}for(lr=M(Je,lr);yr<nt.length;yr++)Xi=Bt(lr,Je,yr,nt[yr],Rt),Xi!==null&&(c&&Xi.alternate!==null&&lr.delete(Xi.key===null?yr:Xi.key),Ne=z(Xi,Ne,yr),cr===null?er=Xi:cr.sibling=Xi,cr=Xi);return c&&lr.forEach(function(vl){return p(Je,vl)}),ln&&Ms(Je,yr),er}function Jt(Je,Ne,nt,Rt){var er=bt(nt);if(typeof er!="function")throw Error(i(150));if(nt=er.call(nt),nt==null)throw Error(i(151));for(var cr=er=null,lr=Ne,yr=Ne=0,Xi=null,Kr=nt.next();lr!==null&&!Kr.done;yr++,Kr=nt.next()){lr.index>yr?(Xi=lr,lr=null):Xi=lr.sibling;var vl=Ut(Je,lr,Kr.value,Rt);if(vl===null){lr===null&&(lr=Xi);break}c&&lr&&vl.alternate===null&&p(Je,lr),Ne=z(vl,Ne,yr),cr===null?er=vl:cr.sibling=vl,cr=vl,lr=Xi}if(Kr.done)return w(Je,lr),ln&&Ms(Je,yr),er;if(lr===null){for(;!Kr.done;yr++,Kr=nt.next())Kr=kt(Je,Kr.value,Rt),Kr!==null&&(Ne=z(Kr,Ne,yr),cr===null?er=Kr:cr.sibling=Kr,cr=Kr);return ln&&Ms(Je,yr),er}for(lr=M(Je,lr);!Kr.done;yr++,Kr=nt.next())Kr=Bt(lr,Je,yr,Kr.value,Rt),Kr!==null&&(c&&Kr.alternate!==null&&lr.delete(Kr.key===null?yr:Kr.key),Ne=z(Kr,Ne,yr),cr===null?er=Kr:cr.sibling=Kr,cr=Kr);return c&&lr.forEach(function(jv){return p(Je,jv)}),ln&&Ms(Je,yr),er}function Bn(Je,Ne,nt,Rt){if(typeof nt=="object"&&nt!==null&&nt.type===De&&nt.key===null&&(nt=nt.props.children),typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case We:e:{for(var er=nt.key,cr=Ne;cr!==null;){if(cr.key===er){if(er=nt.type,er===De){if(cr.tag===7){w(Je,cr.sibling),Ne=R(cr,nt.props.children),Ne.return=Je,Je=Ne;break e}}else if(cr.elementType===er||typeof er=="object"&&er!==null&&er.$$typeof===Tt&&Li(er)===cr.type){w(Je,cr.sibling),Ne=R(cr,nt.props),Ne.ref=ru(Je,cr,nt),Ne.return=Je,Je=Ne;break e}w(Je,cr);break}else p(Je,cr);cr=cr.sibling}nt.type===De?(Ne=ec(nt.props.children,Je.mode,Rt,nt.key),Ne.return=Je,Je=Ne):(Rt=Qc(nt.type,nt.key,nt.props,null,Je.mode,Rt),Rt.ref=ru(Je,Ne,nt),Rt.return=Je,Je=Rt)}return re(Je);case se:e:{for(cr=nt.key;Ne!==null;){if(Ne.key===cr)if(Ne.tag===4&&Ne.stateNode.containerInfo===nt.containerInfo&&Ne.stateNode.implementation===nt.implementation){w(Je,Ne.sibling),Ne=R(Ne,nt.children||[]),Ne.return=Je,Je=Ne;break e}else{w(Je,Ne);break}else p(Je,Ne);Ne=Ne.sibling}Ne=om(nt,Je.mode,Rt),Ne.return=Je,Je=Ne}return re(Je);case Tt:return cr=nt._init,Bn(Je,Ne,cr(nt._payload),Rt)}if(Qr(nt))return Qt(Je,Ne,nt,Rt);if(bt(nt))return Jt(Je,Ne,nt,Rt);Ac(Je,nt)}return typeof nt=="string"&&nt!==""||typeof nt=="number"?(nt=""+nt,Ne!==null&&Ne.tag===6?(w(Je,Ne.sibling),Ne=R(Ne,nt),Ne.return=Je,Je=Ne):(w(Je,Ne),Ne=sm(nt,Je.mode,Rt),Ne.return=Je,Je=Ne),re(Je)):w(Je,Ne)}return Bn}var Zt=ju(!0),ir=ju(!1),Eo=Es(null),nu=null,Mo=null,An=null;function Bu(){An=Mo=nu=null}function ca(c){var p=Eo.current;hn(Eo),c._currentValue=p}function kc(c,p,w){for(;c!==null;){var M=c.alternate;if((c.childLanes&p)!==p?(c.childLanes|=p,M!==null&&(M.childLanes|=p)):M!==null&&(M.childLanes&p)!==p&&(M.childLanes|=p),c===w)break;c=c.return}}function Fa(c,p){nu=c,An=Mo=null,c=c.dependencies,c!==null&&c.firstContext!==null&&((c.lanes&p)!==0&&(Ba=!0),c.firstContext=null)}function Lr(c){var p=c._currentValue;if(An!==c)if(c={context:c,memoizedValue:p,next:null},Mo===null){if(nu===null)throw Error(i(308));Mo=c,nu.dependencies={lanes:0,firstContext:c}}else Mo=Mo.next=c;return p}var Hr=null;function Po(c){Hr===null?Hr=[c]:Hr.push(c)}function iu(c,p,w,M){var R=p.interleaved;return R===null?(w.next=w,Po(p)):(w.next=R.next,R.next=w),p.interleaved=w,Ea(c,M)}function Ea(c,p){c.lanes|=p;var w=c.alternate;for(w!==null&&(w.lanes|=p),w=c,c=c.return;c!==null;)c.childLanes|=p,w=c.alternate,w!==null&&(w.childLanes|=p),w=c,c=c.return;return w.tag===3?w.stateNode:null}var ha=!1;function $u(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dc(c,p){c=c.updateQueue,p.updateQueue===c&&(p.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,effects:c.effects})}function da(c,p){return{eventTime:c,lane:p,tag:0,payload:null,callback:null,next:null}}function Is(c,p,w){var M=c.updateQueue;if(M===null)return null;if(M=M.shared,(Br&2)!==0){var R=M.pending;return R===null?p.next=p:(p.next=R.next,R.next=p),M.pending=p,Ea(c,w)}return R=M.interleaved,R===null?(p.next=p,Po(M)):(p.next=R.next,R.next=p),M.interleaved=p,Ea(c,w)}function _(c,p,w){if(p=p.updateQueue,p!==null&&(p=p.shared,(w&4194240)!==0)){var M=p.lanes;M&=c.pendingLanes,w|=M,p.lanes=w,Go(c,w)}}function e(c,p){var w=c.updateQueue,M=c.alternate;if(M!==null&&(M=M.updateQueue,w===M)){var R=null,z=null;if(w=w.firstBaseUpdate,w!==null){do{var re={eventTime:w.eventTime,lane:w.lane,tag:w.tag,payload:w.payload,callback:w.callback,next:null};z===null?R=z=re:z=z.next=re,w=w.next}while(w!==null);z===null?R=z=p:z=z.next=p}else R=z=p;w={baseState:M.baseState,firstBaseUpdate:R,lastBaseUpdate:z,shared:M.shared,effects:M.effects},c.updateQueue=w;return}c=w.lastBaseUpdate,c===null?w.firstBaseUpdate=p:c.next=p,w.lastBaseUpdate=p}function o(c,p,w,M){var R=c.updateQueue;ha=!1;var z=R.firstBaseUpdate,re=R.lastBaseUpdate,Se=R.shared.pending;if(Se!==null){R.shared.pending=null;var ke=Se,ut=ke.next;ke.next=null,re===null?z=ut:re.next=ut,re=ke;var It=c.alternate;It!==null&&(It=It.updateQueue,Se=It.lastBaseUpdate,Se!==re&&(Se===null?It.firstBaseUpdate=ut:Se.next=ut,It.lastBaseUpdate=ke))}if(z!==null){var kt=R.baseState;re=0,It=ut=ke=null,Se=z;do{var Ut=Se.lane,Bt=Se.eventTime;if((M&Ut)===Ut){It!==null&&(It=It.next={eventTime:Bt,lane:0,tag:Se.tag,payload:Se.payload,callback:Se.callback,next:null});e:{var Qt=c,Jt=Se;switch(Ut=p,Bt=w,Jt.tag){case 1:if(Qt=Jt.payload,typeof Qt=="function"){kt=Qt.call(Bt,kt,Ut);break e}kt=Qt;break e;case 3:Qt.flags=Qt.flags&-65537|128;case 0:if(Qt=Jt.payload,Ut=typeof Qt=="function"?Qt.call(Bt,kt,Ut):Qt,Ut==null)break e;kt=xt({},kt,Ut);break e;case 2:ha=!0}}Se.callback!==null&&Se.lane!==0&&(c.flags|=64,Ut=R.effects,Ut===null?R.effects=[Se]:Ut.push(Se))}else Bt={eventTime:Bt,lane:Ut,tag:Se.tag,payload:Se.payload,callback:Se.callback,next:null},It===null?(ut=It=Bt,ke=kt):It=It.next=Bt,re|=Ut;if(Se=Se.next,Se===null){if(Se=R.shared.pending,Se===null)break;Ut=Se,Se=Ut.next,Ut.next=null,R.lastBaseUpdate=Ut,R.shared.pending=null}}while(!0);if(It===null&&(ke=kt),R.baseState=ke,R.firstBaseUpdate=ut,R.lastBaseUpdate=It,p=R.shared.interleaved,p!==null){R=p;do re|=R.lane,R=R.next;while(R!==p)}else z===null&&(R.shared.lanes=0);Hu|=re,c.lanes=re,c.memoizedState=kt}}function f(c,p,w){if(c=p.effects,p.effects=null,c!==null)for(p=0;p<c.length;p++){var M=c[p],R=M.callback;if(R!==null){if(M.callback=null,M=w,typeof R!="function")throw Error(i(191,R));R.call(M)}}}var y={},x=Es(y),T=Es(y),P=Es(y);function C(c){if(c===y)throw Error(i(174));return c}function L(c,p){switch(on(P,p),on(T,c),on(x,y),c=p.nodeType,c){case 9:case 11:p=(p=p.documentElement)?p.namespaceURI:bn(null,"");break;default:c=c===8?p.parentNode:p,p=c.namespaceURI||null,c=c.tagName,p=bn(p,c)}hn(x),on(x,p)}function N(){hn(x),hn(T),hn(P)}function B(c){C(P.current);var p=C(x.current),w=bn(p,c.type);p!==w&&(on(T,c),on(x,w))}function j(c){T.current===c&&(hn(x),hn(T))}var K=Es(0);function ee(c){for(var p=c;p!==null;){if(p.tag===13){var w=p.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||w.data==="$?"||w.data==="$!"))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===c)break;for(;p.sibling===null;){if(p.return===null||p.return===c)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var me=[];function pe(){for(var c=0;c<me.length;c++)me[c]._workInProgressVersionPrimary=null;me.length=0}var ye=fe.ReactCurrentDispatcher,be=fe.ReactCurrentBatchConfig,Ee=0,xe=null,Pe=null,Ie=null,Ce=!1,Ge=!1,ct=0,at=0;function Ke(){throw Error(i(321))}function lt(c,p){if(p===null)return!1;for(var w=0;w<p.length&&w<c.length;w++)if(!is(c[w],p[w]))return!1;return!0}function At(c,p,w,M,R,z){if(Ee=z,xe=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,ye.current=c===null||c.memoizedState===null?Za:Us,c=w(M,R),Ge){z=0;do{if(Ge=!1,ct=0,25<=z)throw Error(i(301));z+=1,Ie=Pe=null,p.updateQueue=null,ye.current=ja,c=w(M,R)}while(Ge)}if(ye.current=Co,p=Pe!==null&&Pe.next!==null,Ee=0,Ie=Pe=xe=null,Ce=!1,p)throw Error(i(300));return c}function Vt(){var c=ct!==0;return ct=0,c}function yt(){var c={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?xe.memoizedState=Ie=c:Ie=Ie.next=c,Ie}function zt(){if(Pe===null){var c=xe.alternate;c=c!==null?c.memoizedState:null}else c=Pe.next;var p=Ie===null?xe.memoizedState:Ie.next;if(p!==null)Ie=p,Pe=c;else{if(c===null)throw Error(i(310));Pe=c,c={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Ie===null?xe.memoizedState=Ie=c:Ie=Ie.next=c}return Ie}function mr(c,p){return typeof p=="function"?p(c):p}function Wr(c){var p=zt(),w=p.queue;if(w===null)throw Error(i(311));w.lastRenderedReducer=c;var M=Pe,R=M.baseQueue,z=w.pending;if(z!==null){if(R!==null){var re=R.next;R.next=z.next,z.next=re}M.baseQueue=R=z,w.pending=null}
vendor: 6,665 bytes, line 38
38if(R!==null){z=R.next,M=M.baseState;var Se=re=null,ke=null,ut=z;do{var It=ut.lane;if((Ee&It)===It)ke!==null&&(ke=ke.next={lane:0,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null}),M=ut.hasEagerState?ut.eagerState:c(M,ut.action);else{var kt={lane:It,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null};ke===null?(Se=ke=kt,re=M):ke=ke.next=kt,xe.lanes|=It,Hu|=It}ut=ut.next}while(ut!==null&&ut!==z);ke===null?re=M:ke.next=Se,is(M,p.memoizedState)||(Ba=!0),p.memoizedState=M,p.baseState=re,p.baseQueue=ke,w.lastRenderedState=M}if(c=w.interleaved,c!==null){R=c;do z=R.lane,xe.lanes|=z,Hu|=z,R=R.next;while(R!==c)}else R===null&&(w.lanes=0);return[p.memoizedState,w.dispatch]}function dn(c){var p=zt(),w=p.queue;if(w===null)throw Error(i(311));w.lastRenderedReducer=c;var M=w.dispatch,R=w.pending,z=p.memoizedState;if(R!==null){w.pending=null;var re=R=R.next;do z=c(z,re.action),re=re.next;while(re!==R);is(z,p.memoizedState)||(Ba=!0),p.memoizedState=z,p.baseQueue===null&&(p.baseState=z),w.lastRenderedState=z}return[z,M]}function tn(){}function vn(c,p){var w=xe,M=zt(),R=p(),z=!is(M.memoizedState,R);if(z&&(M.memoizedState=R,Ba=!0),M=M.queue,dl(Or.bind(null,w,M,c),[c]),M.getSnapshot!==p||z||Ie!==null&&Ie.memoizedState.tag&1){if(w.flags|=2048,Vr(9,nn.bind(null,w,M,R,p),void 0,null),ei===null)throw Error(i(349));(Ee&30)!==0||_n(w,p,R)}return R}function _n(c,p,w){c.flags|=16384,c={getSnapshot:p,value:w},p=xe.updateQueue,p===null?(p={lastEffect:null,stores:null},xe.updateQueue=p,p.stores=[c]):(w=p.stores,w===null?p.stores=[c]:w.push(c))}function nn(c,p,w,M){p.value=w,p.getSnapshot=M,Kn(p)&&si(c)}function Or(c,p,w){return w(function(){Kn(p)&&si(c)})}function Kn(c){var p=c.getSnapshot;c=c.value;try{var w=p();return!is(c,w)}catch{return!0}}function si(c){var p=Ea(c,1);p!==null&&Ds(p,c,1,-1)}function fi(c){var p=yt();return typeof c=="function"&&(c=c()),p.memoizedState=p.baseState=c,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mr,lastRenderedState:c},p.queue=c,c=c.dispatch=lf.bind(null,xe,c),[p.memoizedState,c]}function Vr(c,p,w,M){return c={tag:c,create:p,destroy:w,deps:M,next:null},p=xe.updateQueue,p===null?(p={lastEffect:null,stores:null},xe.updateQueue=p,p.lastEffect=c.next=c):(w=p.lastEffect,w===null?p.lastEffect=c.next=c:(M=w.next,w.next=c,c.next=M,p.lastEffect=c)),c}function qs(){return zt().memoizedState}function Ma(c,p,w,M){var R=yt();xe.flags|=c,R.memoizedState=Vr(1|p,w,void 0,M===void 0?null:M)}function ds(c,p,w,M){var R=zt();M=M===void 0?null:M;var z=void 0;if(Pe!==null){var re=Pe.memoizedState;if(z=re.destroy,M!==null&<(M,re.deps)){R.memoizedState=Vr(p,w,z,M);return}}xe.flags|=c,R.memoizedState=Vr(1|p,w,z,M)}function Io(c,p){return Ma(8390656,8,c,p)}function dl(c,p){return ds(2048,8,c,p)}function Hs(c,p){return ds(4,2,c,p)}function Uo(c,p){return ds(4,4,c,p)}function fa(c,p){if(typeof p=="function")return c=c(),p(c),function(){p(null)};if(p!=null)return c=c(),p.current=c,function(){p.current=null}}function Ks(c,p,w){return w=w!=null?w.concat([c]):null,ds(4,4,fa.bind(null,p,c),w)}function fs(){}function Qs(c,p){var w=zt();p=p===void 0?null:p;var M=w.memoizedState;return M!==null&&p!==null&<(p,M[1])?M[0]:(w.memoizedState=[c,p],c)}function Fn(c,p){var w=zt();p=p===void 0?null:p;var M=w.memoizedState;return M!==null&&p!==null&<(p,M[1])?M[0]:(c=c(),w.memoizedState=[c,p],c)}function Zn(c,p,w){return(Ee&21)===0?(c.baseState&&(c.baseState=!1,Ba=!0),c.memoizedState=w):(is(w,p)||(w=uo(),xe.lanes|=w,Hu|=w,c.baseState=!0),p)}function Ki(c,p){var w=qr;qr=w!==0&&4>w?w:4,c(!0);var M=be.transition;be.transition={};try{c(!1),p()}finally{qr=w,be.transition=M}}function un(){return zt().memoizedState}function Rc(c,p,w){var M=cu(c);if(w={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null},qh(c))uf(p,w);else if(w=iu(c,p,w,M),w!==null){var R=Pa();Ds(w,c,M,R),Lc(w,p,M)}}function lf(c,p,w){var M=cu(c),R={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null};if(qh(c))uf(p,R);else{var z=c.alternate;if(c.lanes===0&&(z===null||z.lanes===0)&&(z=p.lastRenderedReducer,z!==null))try{var re=p.lastRenderedState,Se=z(re,w);if(R.hasEagerState=!0,R.eagerState=Se,is(Se,re)){var ke=p.interleaved;ke===null?(R.next=R,Po(p)):(R.next=ke.next,ke.next=R),p.interleaved=R;return}}catch{}finally{}w=iu(c,p,R,M),w!==null&&(R=Pa(),Ds(w,c,M,R),Lc(w,p,M))}}function qh(c){var p=c.alternate;return c===xe||p!==null&&p===xe}function uf(c,p){Ge=Ce=!0;var w=c.pending;w===null?p.next=p:(p.next=w.next,w.next=p),c.pending=p}function Lc(c,p,w){if((w&4194240)!==0){var M=p.lanes;M&=c.pendingLanes,w|=M,p.lanes=w,Go(c,w)}}var Co={readContext:Lr,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},Za={readContext:Lr,useCallback:function(c,p){return yt().memoizedState=[c,p===void 0?null:p],c},useContext:Lr,useEffect:Io,useImperativeHandle:function(c,p,w){return w=w!=null?w.concat([c]):null,Ma(4194308,4,fa.bind(null,p,c),w)},useLayoutEffect:function(c,p){return Ma(4194308,4,c,p)},useInsertionEffect:function(c,p){return Ma(4,2,c,p)},useMemo:function(c,p){var w=yt();return p=p===void 0?null:p,c=c(),w.memoizedState=[c,p],c},useReducer:function(c,p,w){var M=yt();return p=w!==void 0?w(p):p,M.memoizedState=M.baseState=p,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:p},M.queue=c,c=c.dispatch=Rc.bind(null,xe,c),[M.memoizedState,c]},useRef:function(c){var p=yt();return c={current:c},p.memoizedState=c},useState:fi,useDebugValue:fs,useDeferredValue:function(c){return yt().memoizedState=c},useTransition:function(){var c=fi(!1),p=c[0];return c=Ki.bind(null,c[1]),yt().memoizedState=c,[p,c]},useMutableSource:function(){},useSyncExternalStore:function(c,p,w){var M=xe,R=yt();if(ln){if(w===void 0)throw Error(i(407));w=w()}else{if(w=p(),ei===null)throw Error(i(349));(Ee&30)!==0||_n(M,p,w)}R.memoizedState=w;var z={value:w,getSnapshot:p};return R.queue=z,Io(Or.bind(null,M,z,c),[c]),M.flags|=2048,Vr(9,nn.bind(null,M,z,w,p),void 0,null),w},useId:function(){var c=yt(),p=ei.identifierPrefix;if(ln){var w=pr,M=hs;w=(M&~(1<<32-ii(M)-1)).toString(32)+w,p=":"+p+"R"+w,w=ct++,0<w&&(p+="H"+w.toString(32)),p+=":"}else w=at++,p=":"+p+"r"+w.toString(32)+":";return c.memoizedState=p},unstable_isNewReconciler:!1},Us={readContext:Lr,useCallback:Qs,useContext:Lr,useEffect:dl,useImperativeHandle:Ks,useInsertionEffect:Hs,useLayoutEffect:Uo,useMemo:Fn,useReducer:Wr,useRef:q
vendor: 6,432 bytes, lines 38-40
38s,useState:function(){return Wr(mr)},useDebugValue:fs,useDeferredValue:function(c){var p=zt();return Zn(p,Pe.memoizedState,c)},useTransition:function(){var c=Wr(mr)[0],p=zt().memoizedState;return[c,p]},useMutableSource:tn,useSyncExternalStore:vn,useId:un,unstable_isNewReconciler:!1},ja={readContext:Lr,useCallback:Qs,useContext:Lr,useEffect:dl,useImperativeHandle:Ks,useInsertionEffect:Hs,useLayoutEffect:Uo,useMemo:Fn,useReducer:dn,useRef:qs,useState:function(){return dn(mr)},useDebugValue:fs,useDeferredValue:function(c){var p=zt();return Pe===null?p.memoizedState=c:Zn(p,Pe.memoizedState,c)},useTransition:function(){var c=dn(mr)[0],p=zt().memoizedState;return[c,p]},useMutableSource:tn,useSyncExternalStore:vn,useId:un,unstable_isNewReconciler:!1};function oi(c,p){if(c&&c.defaultProps){p=xt({},p),c=c.defaultProps;for(var w in c)p[w]===void 0&&(p[w]=c[w]);return p}return p}function au(c,p,w,M){p=c.memoizedState,w=w(M,p),w=w==null?p:xt({},p,w),c.memoizedState=w,c.lanes===0&&(c.updateQueue.baseState=w)}var ps={isMounted:function(c){return(c=c._reactInternals)?sr(c)===c:!1},enqueueSetState:function(c,p,w){c=c._reactInternals;var M=Pa(),R=cu(c),z=da(M,R);z.payload=p,w!=null&&(z.callback=w),p=Is(c,z,R),p!==null&&(Ds(p,c,R,M),_(p,c,R))},enqueueReplaceState:function(c,p,w){c=c._reactInternals;var M=Pa(),R=cu(c),z=da(M,R);z.tag=1,z.payload=p,w!=null&&(z.callback=w),p=Is(c,z,R),p!==null&&(Ds(p,c,R,M),_(p,c,R))},enqueueForceUpdate:function(c,p){c=c._reactInternals;var w=Pa(),M=cu(c),R=da(w,M);R.tag=2,p!=null&&(R.callback=p),p=Is(c,R,M),p!==null&&(Ds(p,c,M,w),_(p,c,M))}};function Oc(c,p,w,M,R,z,re){return c=c.stateNode,typeof c.shouldComponentUpdate=="function"?c.shouldComponentUpdate(M,z,re):p.prototype&&p.prototype.isPureReactComponent?!Iu(w,M)||!Iu(R,z):!0}function kp(c,p,w){var M=!1,R=Sa,z=p.contextType;return typeof z=="object"&&z!==null?z=Lr(z):(R=$i(p)?To:di.current,M=p.contextTypes,z=(M=M!=null)?us(c,R):Sa),p=new p(w,z),c.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=ps,c.stateNode=p,p._reactInternals=c,M&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=R,c.__reactInternalMemoizedMaskedChildContext=z),p}function cf(c,p,w,M){c=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(w,M),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(w,M),p.state!==c&&ps.enqueueReplaceState(p,p.state,null)}function hf(c,p,w,M){var R=c.stateNode;R.props=w,R.state=c.memoizedState,R.refs={},$u(c);var z=p.contextType;typeof z=="object"&&z!==null?R.context=Lr(z):(z=$i(p)?To:di.current,R.context=us(c,z)),R.state=c.memoizedState,z=p.getDerivedStateFromProps,typeof z=="function"&&(au(c,p,z,w),R.state=c.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(p=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),p!==R.state&&ps.enqueueReplaceState(R,R.state,null),o(c,w,R,M),R.state=c.memoizedState),typeof R.componentDidMount=="function"&&(c.flags|=4194308)}function Cs(c,p){try{var w="",M=p;do w+=Gt(M),M=M.return;while(M);var R=w}catch(z){R=` 39Error generating stack: `+z.message+` 40`+z.stack}return{value:c,source:p,stack:R,digest:null}}function fl(c,p,w){return{value:c,source:null,stack:w??null,digest:p??null}}function df(c,p){try{console.error(p.value)}catch(w){setTimeout(function(){throw w})}}var Ov=typeof WeakMap=="function"?WeakMap:Map;function ff(c,p,w){w=da(-1,w),w.tag=3,w.payload={element:null};var M=p.value;return w.callback=function(){ld||(ld=!0,qc=M),df(c,p)},w}function Dp(c,p,w){w=da(-1,w),w.tag=3;var M=c.type.getDerivedStateFromError;if(typeof M=="function"){var R=p.value;w.payload=function(){return M(R)},w.callback=function(){df(c,p)}}var z=c.stateNode;return z!==null&&typeof z.componentDidCatch=="function"&&(w.callback=function(){df(c,p),typeof M!="function"&&(ml===null?ml=new Set([this]):ml.add(this));var re=p.stack;this.componentDidCatch(p.value,{componentStack:re!==null?re:""})}),w}function Mg(c,p,w){var M=c.pingCache;if(M===null){M=c.pingCache=new Ov;var R=new Set;M.set(p,R)}else R=M.get(p),R===void 0&&(R=new Set,M.set(p,R));R.has(w)||(R.add(w),c=Zv.bind(null,c,p,w),p.then(c,c))}function Rp(c){do{var p;if((p=c.tag===13)&&(p=c.memoizedState,p=p!==null?p.dehydrated!==null:!0),p)return c;c=c.return}while(c!==null);return null}function Pg(c,p,w,M,R){return(c.mode&1)===0?(c===p?c.flags|=65536:(c.flags|=128,w.flags|=131072,w.flags&=-52805,w.tag===1&&(w.alternate===null?w.tag=17:(p=da(-1,1),p.tag=2,Is(w,p,1))),w.lanes|=1),c):(c.flags|=65536,c.lanes=R,c)}var Lp=fe.ReactCurrentOwner,Ba=!1;function Qi(c,p,w,M){p.child=c===null?ir(p,null,w,M):Zt(p,c.child,w,M)}function Op(c,p,w,M,R){w=w.render;var z=p.ref;return Fa(p,R),M=At(c,p,w,M,z,R),w=Vt(),c!==null&&!Ba?(p.updateQueue=c.updateQueue,p.flags&=-2053,c.lanes&=~R,Vo(c,p,R)):(ln&&w&&Fu(p),p.flags|=1,Qi(c,p,M,R),p.child)}function Xp(c,p,w,M,R){if(c===null){var z=w.type;return typeof z=="function"&&!am(z)&&z.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(p.tag=15,p.type=z,su(c,p,z,M,R)):(c=Qc(w.type,null,M,p,p.mode,R),c.ref=p.ref,c.return=p,p.child=c)}if(z=c.child,(c.lanes&R)===0){var re=z.memoizedProps;if(w=w.compare,w=w!==null?w:Iu,w(re,M)&&c.ref===p.ref)return Vo(c,p,R)}return p.flags|=1,c=ko(z,M),c.ref=p.ref,c.return=p,p.child=c}function su(c,p,w,M,R){if(c!==null){var z=c.memoizedProps;if(Iu(z,M)&&c.ref===p.ref)if(Ba=!1,p.pendingProps=M=z,(c.lanes&R)!==0)(c.flags&131072)!==0&&(Ba=!0);else return p.lanes=c.lanes,Vo(c,p,R)}return Nc(c,p,w,M,R)}function Ig(c,p,w){var M=p.pendingProps,R=M.children,z=c!==null?c.memoizedState:null;if(M.mode==="hidden")if((p.mode&1)===0)p.memoizedState={baseLanes:0,cachePool:null,transitions:null},on($c,Ga),Ga|=w;else{if((w&1073741824)===0)return c=z!==null?z.baseLanes|w:w,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:c,cachePool:null,transitions:null},p.updateQueue=null,on($c,Ga),Ga|=c,null;p.memoizedState={baseLanes:0,cachePool:null,transitions:null},M=z!==null?z.baseLanes:w,on($c,Ga),Ga|=M}else z!==null?(M=z.baseLanes|w,p.memoizedState=null):M=w,on($c,Ga),Ga|=M;return Qi(c,p,R,w),p.child}function Xc(c,p){var w=p.ref;(c===null&&w!==null||c!==null&&c.ref!==w)&&(p.flags|=512,p.flags|=2097152)}
vendor: 37,356 bytes, line 40
40function Nc(c,p,w,M,R){var z=$i(w)?To:di.current;return z=us(p,z),Fa(p,R),w=At(c,p,w,M,z,R),M=Vt(),c!==null&&!Ba?(p.updateQueue=c.updateQueue,p.flags&=-2053,c.lanes&=~R,Vo(c,p,R)):(ln&&M&&Fu(p),p.flags|=1,Qi(c,p,w,R),p.child)}function Hh(c,p,w,M,R){if($i(w)){var z=!0;la(p)}else z=!1;if(Fa(p,R),p.stateNode===null)pa(c,p),kp(p,w,M),hf(p,w,M,R),M=!0;else if(c===null){var re=p.stateNode,Se=p.memoizedProps;re.props=Se;var ke=re.context,ut=w.contextType;typeof ut=="object"&&ut!==null?ut=Lr(ut):(ut=$i(w)?To:di.current,ut=us(p,ut));var It=w.getDerivedStateFromProps,kt=typeof It=="function"||typeof re.getSnapshotBeforeUpdate=="function";kt||typeof re.UNSAFE_componentWillReceiveProps!="function"&&typeof re.componentWillReceiveProps!="function"||(Se!==M||ke!==ut)&&cf(p,re,M,ut),ha=!1;var Ut=p.memoizedState;re.state=Ut,o(p,M,re,R),ke=p.memoizedState,Se!==M||Ut!==ke||Wi.current||ha?(typeof It=="function"&&(au(p,w,It,M),ke=p.memoizedState),(Se=ha||Oc(p,w,Se,M,Ut,ke,ut))?(kt||typeof re.UNSAFE_componentWillMount!="function"&&typeof re.componentWillMount!="function"||(typeof re.componentWillMount=="function"&&re.componentWillMount(),typeof re.UNSAFE_componentWillMount=="function"&&re.UNSAFE_componentWillMount()),typeof re.componentDidMount=="function"&&(p.flags|=4194308)):(typeof re.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=M,p.memoizedState=ke),re.props=M,re.state=ke,re.context=ut,M=Se):(typeof re.componentDidMount=="function"&&(p.flags|=4194308),M=!1)}else{re=p.stateNode,Dc(c,p),Se=p.memoizedProps,ut=p.type===p.elementType?Se:oi(p.type,Se),re.props=ut,kt=p.pendingProps,Ut=re.context,ke=w.contextType,typeof ke=="object"&&ke!==null?ke=Lr(ke):(ke=$i(w)?To:di.current,ke=us(p,ke));var Bt=w.getDerivedStateFromProps;(It=typeof Bt=="function"||typeof re.getSnapshotBeforeUpdate=="function")||typeof re.UNSAFE_componentWillReceiveProps!="function"&&typeof re.componentWillReceiveProps!="function"||(Se!==kt||Ut!==ke)&&cf(p,re,M,ke),ha=!1,Ut=p.memoizedState,re.state=Ut,o(p,M,re,R);var Qt=p.memoizedState;Se!==kt||Ut!==Qt||Wi.current||ha?(typeof Bt=="function"&&(au(p,w,Bt,M),Qt=p.memoizedState),(ut=ha||Oc(p,w,ut,M,Ut,Qt,ke)||!1)?(It||typeof re.UNSAFE_componentWillUpdate!="function"&&typeof re.componentWillUpdate!="function"||(typeof re.componentWillUpdate=="function"&&re.componentWillUpdate(M,Qt,ke),typeof re.UNSAFE_componentWillUpdate=="function"&&re.UNSAFE_componentWillUpdate(M,Qt,ke)),typeof re.componentDidUpdate=="function"&&(p.flags|=4),typeof re.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof re.componentDidUpdate!="function"||Se===c.memoizedProps&&Ut===c.memoizedState||(p.flags|=4),typeof re.getSnapshotBeforeUpdate!="function"||Se===c.memoizedProps&&Ut===c.memoizedState||(p.flags|=1024),p.memoizedProps=M,p.memoizedState=Qt),re.props=M,re.state=Qt,re.context=ke,M=ut):(typeof re.componentDidUpdate!="function"||Se===c.memoizedProps&&Ut===c.memoizedState||(p.flags|=4),typeof re.getSnapshotBeforeUpdate!="function"||Se===c.memoizedProps&&Ut===c.memoizedState||(p.flags|=1024),M=!1)}return pf(c,p,w,M,z,R)}function pf(c,p,w,M,R,z){Xc(c,p);var re=(p.flags&128)!==0;if(!M&&!re)return R&&ul(p,w,!1),Vo(c,p,z);M=p.stateNode,Lp.current=p;var Se=re&&typeof w.getDerivedStateFromError!="function"?null:M.render();return p.flags|=1,c!==null&&re?(p.child=Zt(p,c.child,null,z),p.child=Zt(p,null,Se,z)):Qi(c,p,Se,z),p.memoizedState=M.state,R&&ul(p,w,!0),p.child}function Np(c){var p=c.stateNode;p.pendingContext?Na(c,p.pendingContext,p.pendingContext!==p.context):p.context&&Na(c,p.context,!1),L(c,p.containerInfo)}function Ug(c,p,w,M,R){return Wo(),Vc(R),p.flags|=256,Qi(c,p,w,M),p.child}var zp={dehydrated:null,treeContext:null,retryLane:0};function mf(c){return{baseLanes:c,cachePool:null,transitions:null}}function Fp(c,p,w){var M=p.pendingProps,R=K.current,z=!1,re=(p.flags&128)!==0,Se;if((Se=re)||(Se=c!==null&&c.memoizedState===null?!1:(R&2)!==0),Se?(z=!0,p.flags&=-129):(c===null||c.memoizedState!==null)&&(R|=1),on(K,R&1),c===null)return Gh(p),c=p.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?((p.mode&1)===0?p.lanes=1:c.data==="$!"?p.lanes=8:p.lanes=1073741824,null):(re=M.children,c=M.fallback,z?(M=p.mode,z=p.child,re={mode:"hidden",children:re},(M&1)===0&&z!==null?(z.childLanes=0,z.pendingProps=re):z=Tf(re,M,0,null),c=ec(c,M,w,null),z.return=p,c.return=p,z.sibling=c,p.child=z,p.child.memoizedState=mf(w),p.memoizedState=zp,c):gf(p,re));if(R=c.memoizedState,R!==null&&(Se=R.dehydrated,Se!==null))return Zp(c,p,re,M,Se,R,w);if(z){z=M.fallback,re=p.mode,R=c.child,Se=R.sibling;var ke={mode:"hidden",children:M.children};return(re&1)===0&&p.child!==R?(M=p.child,M.childLanes=0,M.pendingProps=ke,p.deletions=null):(M=ko(R,ke),M.subtreeFlags=R.subtreeFlags&14680064),Se!==null?z=ko(Se,z):(z=ec(z,re,w,null),z.flags|=2),z.return=p,M.return=p,M.sibling=z,p.child=M,M=z,z=p.child,re=c.child.memoizedState,re=re===null?mf(w):{baseLanes:re.baseLanes|w,cachePool:null,transitions:re.transitions},z.memoizedState=re,z.childLanes=c.childLanes&~w,p.memoizedState=zp,M}return z=c.child,c=z.sibling,M=ko(z,{mode:"visible",children:M.children}),(p.mode&1)===0&&(M.lanes=w),M.return=p,M.sibling=null,c!==null&&(w=p.deletions,w===null?(p.deletions=[c],p.flags|=16):w.push(c)),p.child=M,p.memoizedState=null,M}function gf(c,p){return p=Tf({mode:"visible",children:p},c.mode,0,null),p.return=c,c.child=p}function yf(c,p,w,M){return M!==null&&Vc(M),Zt(p,c.child,null,w),c=gf(p,p.pendingProps.children),c.flags|=2,p.memoizedState=null,c}function Zp(c,p,w,M,R,z,re){if(w)return p.flags&256?(p.flags&=-257,M=fl(Error(i(422))),yf(c,p,re,M)):p.memoizedState!==null?(p.child=c.child,p.flags|=128,null):(z=M.fallback,R=p.mode,M=Tf({mode:"visible",children:M.children},R,0,null),z=ec(z,R,re,null),z.flags|=2,M.return=p,z.return=p,M.sibling=z,p.child=M,(p.mode&1)!==0&&Zt(p,c.child,null,re),p.child.memoizedState=mf(re),p.memoizedState=zp,z);if((p.mode&1)===0)return yf(c,p,re,null);if(R.data==="$!"){if(M=R.nextSibling&&R.nextSibling.dataset,M)var Se=M.dgst;return M=Se,z=Error(i(419)),M=fl(z,M,void 0),yf(c,p,re,M)}if(Se=(re&c.childLanes)!==0,Ba||Se){if(M=ei,M!==null){switch(re&-re){case 4:R=2;break;case 16:R=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:R=32;break;case 536870912:R=268435456;break;default:R=0}R=(R&(M.suspendedLanes|re))!==0?0:R,R!==0&&R!==z.retryLane&&(z.retryLane=R,Ea(c,R),Ds(M,c,R,-1))}return Yf(),M=fl(Error(i(421))),yf(c,p,re,M)}return R.data==="$?"?(p.flags|=128,p.child=c.child,p=pd.bind(null,c),R._reactRetry=p,null):(c=z.treeContext,qi=Hn(R.nextSibling),ua=p,ln=!0,Hi=null,c!==null&&(Wa[Ei++]=hs,Wa[Ei++]=pr,Wa[Ei++]=cs,hs=c.id,pr=c.overflow,cs=p),p=gf(p,M.children),p.flags|=4096,p)}function jp(c,p,w){c.lanes|=p;var M=c.alternate;M!==null&&(M.lanes|=p),kc(c.return,p,w)}function Kh(c,p,w,M,R){var z=c.memoizedState;z===null?c.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:M,tail:w,tailMode:R}:(z.isBackwards=p,z.rendering=null,z.renderingStartTime=0,z.last=M,z.tail=w,z.tailMode=R)}function zc(c,p,w){var M=p.pendingProps,R=M.revealOrder,z=M.tail;if(Qi(c,p,M.children,w),M=K.current,(M&2)!==0)M=M&1|2,p.flags|=128;else{if(c!==null&&(c.flags&128)!==0)e:for(c=p.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&jp(c,w,p);else if(c.tag===19)jp(c,w,p);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===p)break e;for(;c.sibling===null;){if(c.return===null||c.return===p)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}M&=1}if(on(K,M),(p.mode&1)===0)p.memoizedState=null;else switch(R){case"forwards":for(w=p.child,R=null;w!==null;)c=w.alternate,c!==null&&ee(c)===null&&(R=w),w=w.sibling;w=R,w===null?(R=p.child,p.child=null):(R=w.sibling,w.sibling=null),Kh(p,!1,R,w,z);break;case"backwards":for(w=null,R=p.child,p.child=null;R!==null;){if(c=R.alternate,c!==null&&ee(c)===null){p.child=R;break}c=R.sibling,R.sibling=w,w=R,R=c}Kh(p,!0,w,null,z);break;case"together":Kh(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function pa(c,p){(p.mode&1)===0&&c!==null&&(c.alternate=null,p.alternate=null,p.flags|=2)}function Vo(c,p,w){if(c!==null&&(p.dependencies=c.dependencies),Hu|=p.lanes,(w&p.childLanes)===0)return null;if(c!==null&&p.child!==c.child)throw Error(i(153));if(p.child!==null){for(c=p.child,w=ko(c,c.pendingProps),p.child=w,w.return=p;c.sibling!==null;)c=c.sibling,w=w.sibling=ko(c,c.pendingProps),w.return=p;w.sibling=null}return p.child}function Bp(c,p,w){switch(p.tag){case 3:Np(p),Wo();break;case 5:B(p);break;case 1:$i(p.type)&&la(p);break;case 4:L(p,p.stateNode.containerInfo);break;case 10:var M=p.type._context,R=p.memoizedProps.value;on(Eo,M._currentValue),M._currentValue=R;break;case 13:if(M=p.memoizedState,M!==null)return M.dehydrated!==null?(on(K,K.current&1),p.flags|=128,null):(w&p.child.childLanes)!==0?Fp(c,p,w):(on(K,K.current&1),c=Vo(c,p,w),c!==null?c.sibling:null);on(K,K.current&1);break;case 19:if(M=(w&p.childLanes)!==0,(c.flags&128)!==0){if(M)return zc(c,p,w);p.flags|=128}if(R=p.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),on(K,K.current),M)break;return null;case 22:case 23:return p.lanes=0,Ig(c,p,w)}return Vo(c,p,w)}var Cg,vf,Vg,Ag;Cg=function(c,p){for(var w=p.child;w!==null;){if(w.tag===5||w.tag===6)c.appendChild(w.stateNode);else if(w.tag!==4&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===p)break;for(;w.sibling===null;){if(w.return===null||w.return===p)return;w=w.return}w.sibling.return=w.return,w=w.sibling}},vf=function(){},Vg=function(c,p,w,M){var R=c.memoizedProps;if(R!==M){c=p.stateNode,C(x.current);var z=null;switch(w){case"input":R=Yr(c,R),M=Yr(c,M),z=[];break;case"select":R=xt({},R,{value:void 0}),M=xt({},M,{value:void 0}),z=[];break;case"textarea":R=Jr(c,R),M=Jr(c,M),z=[];break;default:typeof R.onClick!="function"&&typeof M.onClick=="function"&&(c.onclick=sl)}ne(w,M);var re;w=null;for(ut in R)if(!M.hasOwnProperty(ut)&&R.hasOwnProperty(ut)&&R[ut]!=null)if(ut==="style"){var Se=R[ut];for(re in Se)Se.hasOwnProperty(re)&&(w||(w={}),w[re]="")}else ut!=="dangerouslySetInnerHTML"&&ut!=="children"&&ut!=="suppressContentEditableWarning"&&ut!=="suppressHydrationWarning"&&ut!=="autoFocus"&&(h.hasOwnProperty(ut)?z||(z=[]):(z=z||[]).push(ut,null));for(ut in M){var ke=M[ut];if(Se=R!=null?R[ut]:void 0,M.hasOwnProperty(ut)&&ke!==Se&&(ke!=null||Se!=null))if(ut==="style")if(Se){for(re in Se)!Se.hasOwnProperty(re)||ke&&ke.hasOwnProperty(re)||(w||(w={}),w[re]="");for(re in ke)ke.hasOwnProperty(re)&&Se[re]!==ke[re]&&(w||(w={}),w[re]=ke[re])}else w||(z||(z=[]),z.push(ut,w)),w=ke;else ut==="dangerouslySetInnerHTML"?(ke=ke?ke.__html:void 0,Se=Se?Se.__html:void 0,ke!=null&&Se!==ke&&(z=z||[]).push(ut,ke)):ut==="children"?typeof ke!="string"&&typeof ke!="number"||(z=z||[]).push(ut,""+ke):ut!=="suppressContentEditableWarning"&&ut!=="suppressHydrationWarning"&&(h.hasOwnProperty(ut)?(ke!=null&&ut==="onScroll"&&yn("scroll",c),z||Se===ke||(z=[])):(z=z||[]).push(ut,ke))}w&&(z=z||[]).push("style",w);var ut=z;(p.updateQueue=ut)&&(p.flags|=4)}},Ag=function(c,p,w,M){w!==M&&(p.flags|=4)};function Qh(c,p){if(!ln)switch(c.tailMode){case"hidden":p=c.tail;for(var w=null;p!==null;)p.alternate!==null&&(w=p),p=p.sibling;w===null?c.tail=null:w.sibling=null;break;case"collapsed":w=c.tail;for(var M=null;w!==null;)w.alternate!==null&&(M=w),w=w.sibling;M===null?p||c.tail===null?c.tail=null:c.tail.sibling=null:M.sibling=null}}function ma(c){var p=c.alternate!==null&&c.alternate.child===c.child,w=0,M=0;if(p)for(var R=c.child;R!==null;)w|=R.lanes|R.childLanes,M|=R.subtreeFlags&14680064,M|=R.flags&14680064,R.return=c,R=R.sibling;else for(R=c.child;R!==null;)w|=R.lanes|R.childLanes,M|=R.subtreeFlags,M|=R.flags,R.return=c,R=R.sibling;return c.subtreeFlags|=M,c.childLanes=w,p}function $p(c,p,w){var M=p.pendingProps;switch(Cc(p),p.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ma(p),null;case 1:return $i(p.type)&&ai(),ma(p),null;case 3:return M=p.stateNode,N(),hn(Wi),hn(di),pe(),M.pendingContext&&(M.context=M.pendingContext,M.pendingContext=null),(c===null||c.child===null)&&(en(p)?p.flags|=4:c===null||c.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,Hi!==null&&(Ku(Hi),Hi=null))),vf(c,p),ma(p),null;case 5:j(p);var R=C(P.current);if(w=p.type,c!==null&&p.stateNode!=null)Vg(c,p,w,M,R),c.ref!==p.ref&&(p.flags|=512,p.flags|=2097152);else{if(!M){if(p.stateNode===null)throw Error(i(166));return ma(p),null}if(c=C(x.current),en(p)){M=p.stateNode,w=p.type;var z=p.memoizedProps;switch(M[Xa]=p,M[oa]=z,c=(p.mode&1)!==0,w){case"dialog":yn("cancel",M),yn("close",M);break;case"iframe":case"object":case"embed":yn("load",M);break;case"video":case"audio":for(R=0;R<$s.length;R++)yn($s[R],M);break;case"source":yn("error",M);break;case"img":case"image":case"link":yn("error",M),yn("load",M);break;case"details":yn("toggle",M);break;case"input":xr(M,z),yn("invalid",M);break;case"select":M._wrapperState={wasMultiple:!!z.multiple},yn("invalid",M);break;case"textarea":Fr(M,z),yn("invalid",M)}ne(w,z),R=null;for(var re in z)if(z.hasOwnProperty(re)){var Se=z[re];re==="children"?typeof Se=="string"?M.textContent!==Se&&(z.suppressHydrationWarning!==!0&&Lu(M.textContent,Se,c),R=["children",Se]):typeof Se=="number"&&M.textContent!==""+Se&&(z.suppressHydrationWarning!==!0&&Lu(M.textContent,Se,c),R=["children",""+Se]):h.hasOwnProperty(re)&&Se!=null&&re==="onScroll"&&yn("scroll",M)}switch(w){case"input":Gr(M),_i(M,z,!0);break;case"textarea":Gr(M),ni(M);break;case"select":case"option":break;default:typeof z.onClick=="function"&&(M.onclick=sl)}M=R,p.updateQueue=M,M!==null&&(p.flags|=4)}else{re=R.nodeType===9?R:R.ownerDocument,c==="http://www.w3.org/1999/xhtml"&&(c=Rn(w)),c==="http://www.w3.org/1999/xhtml"?w==="script"?(c=re.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild)):typeof M.is=="string"?c=re.createElement(w,{is:M.is}):(c=re.createElement(w),w==="select"&&(re=c,M.multiple?re.multiple=!0:M.size&&(re.size=M.size))):c=re.createElementNS(c,w),c[Xa]=p,c[oa]=M,Cg(c,p,!1,!1),p.stateNode=c;e:{switch(re=ie(w,M),w){case"dialog":yn("cancel",c),yn("close",c),R=M;break;case"iframe":case"object":case"embed":yn("load",c),R=M;break;case"video":case"audio":for(R=0;R<$s.length;R++)yn($s[R],c);R=M;break;case"source":yn("error",c),R=M;break;case"img":case"image":case"link":yn("error",c),yn("load",c),R=M;break;case"details":yn("toggle",c),R=M;break;case"input":xr(c,M),R=Yr(c,M),yn("invalid",c);break;case"option":R=M;break;case"select":c._wrapperState={wasMultiple:!!M.multiple},R=xt({},M,{value:void 0}),yn("invalid",c);break;case"textarea":Fr(c,M),R=Jr(c,M),yn("invalid",c);break;default:R=M}ne(w,R),Se=R;for(z in Se)if(Se.hasOwnProperty(z)){var ke=Se[z];z==="style"?Un(c,ke):z==="dangerouslySetInnerHTML"?(ke=ke?ke.__html:void 0,ke!=null&&xi(c,ke)):z==="children"?typeof ke=="string"?(w!=="textarea"||ke!=="")&&bi(c,ke):typeof ke=="number"&&bi(c,""+ke):z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&z!=="autoFocus"&&(h.hasOwnProperty(z)?ke!=null&&z==="onScroll"&&yn("scroll",c):ke!=null&&_e(c,z,ke,re))}switch(w){case"input":Gr(c),_i(c,M,!1);break;case"textarea":Gr(c),ni(c);break;case"option":M.value!=null&&c.setAttribute("value",""+fr(M.value));break;case"select":c.multiple=!!M.multiple,z=M.value,z!=null?an(c,!!M.multiple,z,!1):M.defaultValue!=null&&an(c,!!M.multiple,M.defaultValue,!0);break;default:typeof R.onClick=="function"&&(c.onclick=sl)}switch(w){case"button":case"input":case"select":case"textarea":M=!!M.autoFocus;break e;case"img":M=!0;break e;default:M=!1}}M&&(p.flags|=4)}p.ref!==null&&(p.flags|=512,p.flags|=2097152)}return ma(p),null;case 6:if(c&&p.stateNode!=null)Ag(c,p,c.memoizedProps,M);else{if(typeof M!="string"&&p.stateNode===null)throw Error(i(166));if(w=C(P.current),C(x.current),en(p)){if(M=p.stateNode,w=p.memoizedProps,M[Xa]=p,(z=M.nodeValue!==w)&&(c=ua,c!==null))switch(c.tag){case 3:Lu(M.nodeValue,w,(c.mode&1)!==0);break;case 5:c.memoizedProps.suppressHydrationWarning!==!0&&Lu(M.nodeValue,w,(c.mode&1)!==0)}z&&(p.flags|=4)}else M=(w.nodeType===9?w:w.ownerDocument).createTextNode(M),M[Xa]=p,p.stateNode=M}return ma(p),null;case 13:if(hn(K),M=p.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(ln&&qi!==null&&(p.mode&1)!==0&&(p.flags&128)===0)tu(),Wo(),p.flags|=98560,z=!1;else if(z=en(p),M!==null&&M.dehydrated!==null){if(c===null){if(!z)throw Error(i(318));if(z=p.memoizedState,z=z!==null?z.dehydrated:null,!z)throw Error(i(317));z[Xa]=p}else Wo(),(p.flags&128)===0&&(p.memoizedState=null),p.flags|=4;ma(p),z=!1}else Hi!==null&&(Ku(Hi),Hi=null),z=!0;if(!z)return p.flags&65536?p:null}return(p.flags&128)!==0?(p.lanes=w,p):(M=M!==null,M!==(c!==null&&c.memoizedState!==null)&&M&&(p.child.flags|=8192,(p.mode&1)!==0&&(c===null||(K.current&1)!==0?Mi===0&&(Mi=3):Yf())),p.updateQueue!==null&&(p.flags|=4),ma(p),null);case 4:return N(),vf(c,p),c===null&&wo(p.stateNode.containerInfo),ma(p),null;case 10:return ca(p.type._context),ma(p),null;case 17:return $i(p.type)&&ai(),ma(p),null;case 19:if(hn(K),z=p.memoizedState,z===null)return ma(p),null;if(M=(p.flags&128)!==0,re=z.rendering,re===null)if(M)Qh(z,!1);else{if(Mi!==0||c!==null&&(c.flags&128)!==0)for(c=p.child;c!==null;){if(re=ee(c),re!==null){for(p.flags|=128,Qh(z,!1),M=re.updateQueue,M!==null&&(p.updateQueue=M,p.flags|=4),p.subtreeFlags=0,M=w,w=p.child;w!==null;)z=w,c=M,z.flags&=14680066,re=z.alternate,re===null?(z.childLanes=0,z.lanes=c,z.child=null,z.subtreeFlags=0,z.memoizedProps=null,z.memoizedState=null,z.updateQueue=null,z.dependencies=null,z.stateNode=null):(z.childLanes=re.childLanes,z.lanes=re.lanes,z.child=re.child,z.subtreeFlags=0,z.deletions=null,z.memoizedProps=re.memoizedProps,z.memoizedState=re.memoizedState,z.updateQueue=re.updateQueue,z.type=re.type,c=re.dependencies,z.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),w=w.sibling;return on(K,K.current&1|2),p.child}c=c.sibling}z.tail!==null&&gr()>ou&&(p.flags|=128,M=!0,Qh(z,!1),p.lanes=4194304)}else{if(!M)if(c=ee(re),c!==null){if(p.flags|=128,M=!0,w=c.updateQueue,w!==null&&(p.updateQueue=w,p.flags|=4),Qh(z,!0),z.tail===null&&z.tailMode==="hidden"&&!re.alternate&&!ln)return ma(p),null}else 2*gr()-z.renderingStartTime>ou&&w!==1073741824&&(p.flags|=128,M=!0,Qh(z,!1),p.lanes=4194304);z.isBackwards?(re.sibling=p.child,p.child=re):(w=z.last,w!==null?w.sibling=re:p.child=re,z.last=re)}return z.tail!==null?(p=z.tail,z.rendering=p,z.tail=p.sibling,z.renderingStartTime=gr(),p.sibling=null,w=K.current,on(K,M?w&1|2:w&1),p):(ma(p),null);case 22:case 23:return rm(),M=p.memoizedState!==null,c!==null&&c.memoizedState!==null!==M&&(p.flags|=8192),M&&(p.mode&1)!==0?(Ga&1073741824)!==0&&(ma(p),p.subtreeFlags&6&&(p.flags|=8192)):ma(p),null;case 24:return null;case 25:return null}throw Error(i(156,p.tag))}function Gp(c,p){switch(Cc(p),p.tag){case 1:return $i(p.type)&&ai(),c=p.flags,c&65536?(p.flags=c&-65537|128,p):null;case 3:return N(),hn(Wi),hn(di),pe(),c=p.flags,(c&65536)!==0&&(c&128)===0?(p.flags=c&-65537|128,p):null;case 5:return j(p),null;case 13:if(hn(K),c=p.memoizedState,c!==null&&c.dehydrated!==null){if(p.alternate===null)throw Error(i(340));Wo()}return c=p.flags,c&65536?(p.flags=c&-65537|128,p):null;case 19:return hn(K),null;case 4:return N(),null;case 10:return ca(p.type._context),null;case 22:case 23:return rm(),null;case 24:return null;default:return null}}var Jh=!1,Qn=!1,ed=typeof WeakSet=="function"?WeakSet:Set,Kt=null;function Fc(c,p){var w=c.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(M){jn(c,p,M)}else w.current=null}function qp(c,p,w){try{w()}catch(M){jn(c,p,M)}}var kg=!1;function Xv(c,p){if(Ou=Ho,c=Uu(),Bl(c)){if("selectionStart"in c)var w={start:c.selectionStart,end:c.selectionEnd};else e:{w=(w=c.ownerDocument)&&w.defaultView||window;var M=w.getSelection&&w.getSelection();if(M&&M.rangeCount!==0){w=M.anchorNode;var R=M.anchorOffset,z=M.focusNode;M=M.focusOffset;try{w.nodeType,z.nodeType}catch{w=null;break e}var re=0,Se=-1,ke=-1,ut=0,It=0,kt=c,Ut=null;t:for(;;){for(var Bt;kt!==w||R!==0&&kt.nodeType!==3||(Se=re+R),kt!==z||M!==0&&kt.nodeType!==3||(ke=re+M),kt.nodeType===3&&(re+=kt.nodeValue.length),(Bt=kt.firstChild)!==null;)Ut=kt,kt=Bt;for(;;){if(kt===c)break t;if(Ut===w&&++ut===R&&(Se=re),Ut===z&&++It===M&&(ke=re),(Bt=kt.nextSibling)!==null)break;kt=Ut,Ut=kt.parentNode}kt=Bt}w=Se===-1||ke===-1?null:{start:Se,end:ke}}else w=null}w=w||{start:0,end:0}}else w=null;for(Ec={focusedElem:c,selectionRange:w},Ho=!1,Kt=p;Kt!==null;)if(p=Kt,c=p.child,(p.subtreeFlags&1028)!==0&&c!==null)c.return=p,Kt=c;else for(;Kt!==null;){p=Kt;try{var Qt=p.alternate;if((p.flags&1024)!==0)switch(p.tag){case 0:case 11:case 15:break;case 1:if(Qt!==null){var Jt=Qt.memoizedProps,Bn=Qt.memoizedState,Je=p.stateNode,Ne=Je.getSnapshotBeforeUpdate(p.elementType===p.type?Jt:oi(p.type,Jt),Bn);Je.__reactInternalSnapshotBeforeUpdate=Ne}break;case 3:var nt=p.stateNode.containerInfo;nt.nodeType===1?nt.textContent="":nt.nodeType===9&&nt.documentElement&&nt.removeChild(nt.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(Rt){jn(p,p.return,Rt)}if(c=p.sibling,c!==null){c.return=p.return,Kt=c;break}Kt=p.return}return Qt=kg,kg=!1,Qt}function td(c,p,w){var M=p.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var R=M=M.next;do{if((R.tag&c)===c){var z=R.destroy;R.destroy=void 0,z!==void 0&&qp(p,w,z)}R=R.next}while(R!==M)}}function _f(c,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var w=p=p.next;do{if((w.tag&c)===c){var M=w.create;w.destroy=M()}w=w.next}while(w!==p)}}function rd(c){var p=c.ref;if(p!==null){var w=c.stateNode;switch(c.tag){case 5:c=w;break;default:c=w}typeof p=="function"?p(c):p.current=c}}function Dg(c){var p=c.alternate;p!==null&&(c.alternate=null,Dg(p)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(p=c.stateNode,p!==null&&(delete p[Xa],delete p[oa],delete p[ol],delete p[jh],delete p[nf])),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function Hp(c){return c.tag===5||c.tag===3||c.tag===4}function Zc(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||Hp(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function Kp(c,p,w){var M=c.tag;if(M===5||M===6)c=c.stateNode,p?w.nodeType===8?w.parentNode.insertBefore(c,p):w.insertBefore(c,p):(w.nodeType===8?(p=w.parentNode,p.insertBefore(c,w)):(p=w,p.appendChild(c)),w=w._reactRootContainer,w!=null||p.onclick!==null||(p.onclick=sl));else if(M!==4&&(c=c.child,c!==null))for(Kp(c,p,w),c=c.sibling;c!==null;)Kp(c,p,w),c=c.sibling}function Mn(c,p,w){var M=c.tag;if(M===5||M===6)c=c.stateNode,p?w.insertBefore(c,p):w.appendChild(c);else if(M!==4&&(c=c.child,c!==null))for(Mn(c,p,w),c=c.sibling;c!==null;)Mn(c,p,w),c=c.sibling}var Jn=null,Vs=!1;function Js(c,p,w){for(w=w.child;w!==null;)nd(c,p,w),w=w.sibling}function nd(c,p,w){if(Bi&&typeof Bi.onCommitFiberUnmount=="function")try{Bi.onCommitFiberUnmount(Si,w)}catch{}switch(w.tag){case 5:Qn||Fc(w,p);case 6:var M=Jn,R=Vs;Jn=null,Js(c,p,w),Jn=M,Vs=R,Jn!==null&&(Vs?(c=Jn,w=w.stateNode,c.nodeType===8?c.parentNode.removeChild(w):c.removeChild(w)):Jn.removeChild(w.stateNode));break;case 18:Jn!==null&&(Vs?(c=Jn,w=w.stateNode,c.nodeType===8?Ts(c.parentNode,w):c.nodeType===1&&Ts(c,w),xs(c)):Ts(Jn,w.stateNode));break;case 4:M=Jn,R=Vs,Jn=w.stateNode.containerInfo,Vs=!0,Js(c,p,w),Jn=M,Vs=R;break;case 0:case 11:case 14:case 15:if(!Qn&&(M=w.updateQueue,M!==null&&(M=M.lastEffect,M!==null))){R=M=M.next;do{var z=R,re=z.destroy;z=z.tag,re!==void 0&&((z&2)!==0||(z&4)!==0)&&qp(w,p,re),R=R.next}while(R!==M)}Js(c,p,w);break;case 1:if(!Qn&&(Fc(w,p),M=w.stateNode,typeof M.componentWillUnmount=="function"))try{M.props=w.memoizedProps,M.state=w.memoizedState,M.componentWillUnmount()}catch(Se){jn(w,p,Se)}Js(c,p,w);break;case 21:Js(c,p,w);break;case 22:w.mode&1?(Qn=(M=Qn)||w.memoizedState!==null,Js(c,p,w),Qn=M):Js(c,p,w);break;default:Js(c,p,w)}}function jc(c){var p=c.updateQueue;if(p!==null){c.updateQueue=null;var w=c.stateNode;w===null&&(w=c.stateNode=new ed),p.forEach(function(M){var R=Zg.bind(null,c,M);w.has(M)||(w.add(M),M.then(R,R))})}}function As(c,p){var w=p.deletions;if(w!==null)for(var M=0;M<w.length;M++){var R=w[M];try{var z=c,re=p,Se=re;e:for(;Se!==null;){switch(Se.tag){case 5:Jn=Se.stateNode,Vs=!1;break e;case 3:Jn=Se.stateNode.containerInfo,Vs=!0;break e;case 4:Jn=Se.stateNode.containerInfo,Vs=!0;break e}Se=Se.return}if(Jn===null)throw Error(i(160));nd(z,re,R),Jn=null,Vs=!1;var ke=R.alternate;ke!==null&&(ke.return=null),R.return=null}catch(ut){jn(R,p,ut)}}if(p.subtreeFlags&12854)for(p=p.child;p!==null;)Qp(p,c),p=p.sibling}function Qp(c,p){var w=c.alternate,M=c.flags;switch(c.tag){case 0:case 11:case 14:case 15:if(As(p,c),$a(c),M&4){try{td(3,c,c.return),_f(3,c)}catch(Jt){jn(c,c.return,Jt)}try{td(5,c,c.return)}catch(Jt){jn(c,c.return,Jt)}}break;case 1:As(p,c),$a(c),M&512&&w!==null&&Fc(w,w.return);break;case 5:if(As(p,c),$a(c),M&512&&w!==null&&Fc(w,w.return),c.flags&32){var R=c.stateNode;try{bi(R,"")}catch(Jt){jn(c,c.return,Jt)}}if(M&4&&(R=c.stateNode,R!=null)){var z=c.memoizedProps,re=w!==null?w.memoizedProps:z,Se=c.type,ke=c.updateQueue;if(c.updateQueue=null,ke!==null)try{Se==="input"&&z.type==="radio"&&z.name!=null&&ri(R,z),ie(Se,re);var ut=ie(Se,z);for(re=0;re<ke.length;re+=2){var It=ke[re],kt=ke[re+1];It==="style"?Un(R,kt):It==="dangerouslySetInnerHTML"?xi(R,kt):It==="children"?bi(R,kt):_e(R,It,kt,ut)}switch(Se){case"input":hr(R,z);break;case"textarea":In(R,z);break;case"select":var Ut=R._wrapperState.wasMultiple;R._wrapperState.wasMultiple=!!z.multiple;var Bt=z.value;Bt!=null?an(R,!!z.multiple,Bt,!1):Ut!==!!z.multiple&&(z.defaultValue!=null?an(R,!!z.multiple,z.defaultValue,!0):an(R,!!z.multiple,z.multiple?[]:"",!1))}R[oa]=z}catch(Jt){jn(c,c.return,Jt)}}break;case 6:if(As(p,c),$a(c),M&4){if(c.stateNode===null)throw Error(i(162));R=c.stateNode,z=c.memoizedProps;try{R.nodeValue=z}catch(Jt){jn(c,c.return,Jt)}}break;case 3:if(As(p,c),$a(c),M&4&&w!==null&&w.memoizedState.isDehydrated)try{xs(p.containerInfo)}catch(Jt){jn(c,c.return,Jt)}break;case 4:As(p,c),$a(c);break;case 13:As(p,c),$a(c),R=c.child,R.flags&8192&&(z=R.memoizedState!==null,R.stateNode.isHidden=z,!z||R.alternate!==null&&R.alternate.memoizedState!==null||(bf=gr())),M&4&&jc(c);break;case 22:if(It=w!==null&&w.memoizedState!==null,c.mode&1?(Qn=(ut=Qn)||It,As(p,c),Qn=ut):As(p,c),$a(c),M&8192){if(ut=c.memoizedState!==null,(c.stateNode.isHidden=ut)&&!It&&(c.mode&1)!==0)for(Kt=c,It=c.child;It!==null;){for(kt=Kt=It;Kt!==null;){switch(Ut=Kt,Bt=Ut.child,Ut.tag){case 0:case 11:case 14:case 15:td(4,Ut,Ut.return);break;case 1:Fc(Ut,Ut.return);var Qt=Ut.stateNode;if(typeof Qt.componentWillUnmount=="function"){M=Ut,w=Ut.return;try{p=M,Qt.props=p.memoizedProps,Qt.state=p.memoizedState,Qt.componentWillUnmount()}catch(Jt){jn(M,w,Jt)}}break;case 5:Fc(Ut,Ut.return);break;case 22:if(Ut.memoizedState!==null){qu(kt);continue}}Bt!==null?(Bt.return=Ut,Kt=Bt):qu(kt)}It=It.sibling}e:for(It=null,kt=c;;){if(kt.tag===5){if(It===null){It=kt;try{R=kt.stateNode,ut?(z=R.style,typeof z.setProperty=="function"?z.setProperty("display","none","important"):z.display="none"):(Se=kt.stateNode,ke=kt.memoizedProps.style,re=ke!=null&&ke.hasOwnProperty("display")?ke.display:null,Se.style.display=sn("display",re))}catch(Jt){jn(c,c.return,Jt)}}}else if(kt.tag===6){if(It===null)try{kt.stateNode.nodeValue=ut?"":kt.memoizedProps}catch(Jt){jn(c,c.return,Jt)}}else if((kt.tag!==22&&kt.tag!==23||kt.memoizedState===null||kt===c)&&kt.child!==null){kt.child.return=kt,kt=kt.child;continue}if(kt===c)break e;for(;kt.sibling===null;){if(kt.return===null||kt.return===c)break e;It===kt&&(It=null),kt=kt.return}It===kt&&(It=null),kt.sibling.return=kt.return,kt=kt.sibling}}break;case 19:As(p,c),$a(c),M&4&&jc(c);break;case 21:break;default:As(p,c),$a(c)}}function $a(c){var p=c.flags;if(p&2){try{e:{for(var w=c.return;w!==null;){if(Hp(w)){var M=w;break e}w=w.return}throw Error(i(160))}switch(M.tag){case 5:var R=M.stateNode;M.flags&32&&(bi(R,""),M.flags&=-33);var z=Zc(c);Mn(c,z,R);break;case 3:case 4:var re=M.stateNode.containerInfo,Se=Zc(c);Kp(c,Se,re);break;default:throw Error(i(161))}}catch(ke){jn(c,c.return,ke)}c.flags&=-3}p&4096&&(c.flags&=-4097)}function Jp(c,p,w){Kt=c,Gu(c)}function Gu(c,p,w){for(var M=(c.mode&1)!==0;Kt!==null;){var R=Kt,z=R.child;if(R.tag===22&&M){var re=R.memoizedState!==null||Jh;if(!re){var Se=R.alternate,ke=Se!==null&&Se.memoizedState!==null||Qn;Se=Jh;var ut=Qn;if(Jh=re,(Qn=ke)&&!ut)for(Kt=R;Kt!==null;)re=Kt,ke=re.child,re.tag===22&&re.memoizedState!==null?Bc(R):ke!==null?(ke.return=re,Kt=ke):Bc(R);for(;z!==null;)Kt=z,Gu(z),z=z.sibling;Kt=R,Jh=Se,Qn=ut}id(c)}else(R.subtreeFlags&8772)!==0&&z!==null?(z.return=R,Kt=z):id(c)}}function id(c){for(;Kt!==null;){var p=Kt;if((p.flags&8772)!==0){var w=p.alternate;try{if((p.flags&8772)!==0)switch(p.tag){case 0:case 11:case 15:Qn||_f(5,p);break;case 1:var M=p.stateNode;if(p.flags&4&&!Qn)if(w===null)M.componentDidMount();else{var R=p.elementType===p.type?w.memoizedProps:oi(p.type,w.memoizedProps);M.componentDidUpdate(R,w.memoizedState,M.__reactInternalSnapshotBeforeUpdate)}var z=p.updateQueue;z!==null&&f(p,z,M);break;case 3:var re=p.updateQueue;if(re!==null){if(w=null,p.child!==null)switch(p.child.tag){case 5:w=p.child.stateNode;break;case 1:w=p.child.stateNode}f(p,re,w)}break;case 5:var Se=p.stateNode;if(w===null&&p.flags&4){w=Se;var ke=p.memoizedProps;switch(p.type){case"button":case"input":case"select":case"textarea":ke.autoFocus&&w.focus();break;case"img":ke.src&&(w.src=ke.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(p.memoizedState===null){var ut=p.alternate;if(ut!==null){var It=ut.memoizedState;if(It!==null){var kt=It.dehydrated;kt!==null&&xs(kt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}Qn||p.flags&512&&rd(p)}catch(Ut){jn(p,p.return,Ut)}}if(p===c){Kt=null;break}if(w=p.sibling,w!==null){w.return=p.return,Kt=w;break}Kt=p.return}}function qu(c){for(;Kt!==null;){var p=Kt;if(p===c){Kt=null;break}var w=p.sibling;if(w!==null){w.return=p.return,Kt=w;break}Kt=p.return}}function Bc(c){for(;Kt!==null;){var p=Kt;try{switch(p.tag){case 0:case 11:case 15:var w=p.return;try{_f(4,p)}catch(ke){jn(p,w,ke)}break;case 1:var M=p.stateNode;if(typeof M.componentDidMount=="function"){var R=p.return;try{M.componentDidMount()}catch(ke){jn(p,R,ke)}}var z=p.return;try{rd(p)}catch(ke){jn(p,z,ke)}break;case 5:var re=p.return;try{rd(p)}catch(ke){jn(p,re,ke)}}}catch(ke){jn(p,p.return,ke)}if(p===c){Kt=null;break}var Se=p.sibling;if(Se!==null){Se.return=p.return,Kt=Se;break}Kt=p.return}}var Nv=Math.ceil,ad=fe.ReactCurrentDispatcher,pl=fe.ReactCurrentOwner,ks=fe.ReactCurrentBatchConfig,Br=0,ei=null,ti=null,Oi=0,Ga=0,$c=Es(0),Mi=0,sd=null,Hu=0,xf=0,od=0,Gc=null,ga=null,bf=0,ou=1/0,Ao=null,ld=!1,qc=null,ml=null,ud=!1,gl=null,lu=0,cd=0,hd=null,uu=-1,Hc=0;function Pa(){return(Br&6)!==0?gr():uu!==-1?uu:uu=gr()}function cu(c){return(c.mode&1)===0?1:(Br&2)!==0&&Oi!==0?Oi&-Oi:of.transition!==null?(Hc===0&&(Hc=uo()),Hc):(c=qr,c!==0||(c=window.event,c=c===void 0?16:Dl(c.type)),c)}function Ds(c,p,w,M){if(50<cd)throw cd=0,hd=null,Error(i(185));Yu(c,w,M),((Br&2)===0||c!==ei)&&(c===ei&&((Br&2)===0&&(xf|=w),Mi===4&&hu(c,Oi)),Ia(c,M),w===1&&Br===0&&(p.mode&1)===0&&(ou=gr()+500,Uc&&Ta()))}function Ia(c,p){var w=c.callbackNode;Th(c,p);var M=Vl(c,c===ei?Oi:0);if(M===0)w!==null&&Da(w),c.callbackNode=null,c.callbackPriority=0;else if(p=M&-M,c.callbackPriority!==p){if(w!=null&&Da(w),p===1)c.tag===0?Bh(Og.bind(null,c)):zu(Og.bind(null,c)),Xu(function(){(Br&6)===0&&Ta()}),w=null;else{switch(Ai(M)){case 1:w=Rr;break;case 4:w=rs;break;case 16:w=Pr;break;case 536870912:w=Yi;break;default:w=Pr}w=im(w,Rg.bind(null,c))}c.callbackPriority=p,c.callbackNode=w}}function Rg(c,p){if(uu=-1,Hc=0,(Br&6)!==0)throw Error(i(327));var w=c.callbackNode;if(Kc()&&c.callbackNode!==w)return null;var M=Vl(c,c===ei?Oi:0);if(M===0)return null;if((M&30)!==0||(M&c.expiredLanes)!==0||p)p=dd(c,M);else{p=M;var R=Br;Br|=2;var z=wf();(ei!==c||Oi!==p)&&(Ao=null,ou=gr()+500,Ju(c,p));do try{zv();break}catch(Se){nm(c,Se)}while(!0);Bu(),ad.current=z,Br=R,ti!==null?p=0:(ei=null,Oi=0,p=Mi)}if(p!==0){if(p===2&&(R=pc(c),R!==0&&(M=R,p=em(c,R))),p===1)throw w=sd,Ju(c,0),hu(c,M),Ia(c,gr()),w;if(p===6)hu(c,M);else{if(R=c.current.alternate,(M&30)===0&&!Lg(R)&&(p=dd(c,M),p===2&&(z=pc(c),z!==0&&(M=z,p=em(c,z))),p===1))throw w=sd,Ju(c,0),hu(c,M),Ia(c,gr()),w;switch(c.finishedWork=R,c.finishedLanes=M,p){case 0:case 1:throw Error(i(345));case 2:du(c,ga,Ao);break;case 3:if(hu(c,M),(M&130023424)===M&&(p=bf+500-gr(),10<p)){if(Vl(c,0)!==0)break;if(R=c.suspendedLanes,(R&M)!==M){Pa(),c.pingedLanes|=c.suspendedLanes&R;break}c.timeoutHandle=Jl(du.bind(null,c,ga,Ao),p);break}du(c,ga,Ao);break;case 4:if(hu(c,M),(M&4194240)===M)break;for(p=c.eventTimes,R=-1;0<M;){var re=31-ii(M);z=1<<re,re=p[re],re>R&&(R=re),M&=~z}if(M=R,M=gr()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*Nv(M/1960))-M,10<M){c.timeoutHandle=Jl(du.bind(null,c,ga,Ao),M);break}du(c,ga,Ao);break;case 5:du(c,ga,Ao);break;default:throw Error(i(329))}}}return Ia(c,gr()),c.callbackNode===w?Rg.bind(null,c):null}function em(c,p){var w=Gc;return c.current.memoizedState.isDehydrated&&(Ju(c,p).flags|=256),c=dd(c,p),c!==2&&(p=ga,ga=w,p!==null&&Ku(p)),c}function Ku(c){ga===null?ga=c:ga.push.apply(ga,c)}function Lg(c){for(var p=c;;){if(p.flags&16384){var w=p.updateQueue;if(w!==null&&(w=w.stores,w!==null))for(var M=0;M<w.length;M++){var R=w[M],z=R.getSnapshot;R=R.value;try{if(!is(z(),R))return!1}catch{return!1}}}if(w=p.child,p.subtreeFlags&16384&&w!==null)w.return=p,p=w;else{if(p===c)break;for(;p.sibling===null;){if(p.return===null||p.return===c)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function hu(c,p){for(p&=~od,p&=~xf,c.suspendedLanes|=p,c.pingedLanes&=~p,c=c.expirationTimes;0<p;){var w=31-ii(p),M=1<<w;c[w]=-1,p&=~M}}function Og(c){if((Br&6)!==0)throw Error(i(327));Kc();var p=Vl(c,0);if((p&1)===0)return Ia(c,gr()),null;var w=dd(c,p);if(c.tag!==0&&w===2){var M=pc(c);M!==0&&(p=M,w=em(c,M))}if(w===1)throw w=sd,Ju(c,0),hu(c,p),Ia(c,gr()),w;if(w===6)throw Error(i(345));return c.finishedWork=c.current.alternate,c.finishedLanes=p,du(c,ga,Ao),Ia(c,gr()),null}function tm(c,p){var w=Br;Br|=1;try{return c(p)}finally{Br=w,Br===0&&(ou=gr()+500,Uc&&Ta())}}function Qu(c){gl!==null&&gl.tag===0&&(Br&6)===0&&Kc();var p=Br;Br|=1;var w=ks.transition,M=qr;try{if(ks.transition=null,qr=1,c)return c()}finally{qr=M,ks.transition=w,Br=p,(Br&6)===0&&Ta()}}function rm(){Ga=$c.current,hn($c)}function Ju(c,p){c.finishedWork=null,c.finishedLanes=0;var w=c.timeoutHandle;if(w!==-1&&(c.timeoutHandle=-1,Pc(w)),ti!==null)for(w=ti.return;w!==null;){var M=w;switch(Cc(M),M.tag){case 1:M=M.type.childContextTypes,M!=null&&ai();break;case 3:N(),hn(Wi),hn(di),pe();break;case 5:j(M);break;case 4:N();break;case 13:hn(K);break;case 19:hn(K);break;case 10:ca(M.type._context);break;case 22:case 23:rm()}w=w.return}if(ei=c,ti=c=ko(c.current,null),Oi=Ga=p,Mi=0,sd=null,od=xf=Hu=0,ga=Gc=null,Hr!==null){for(p=0;p<Hr.length;p++)if(w=Hr[p],M=w.interleaved,M!==null){w.interleaved=null;var R=M.next,z=w.pending;if(z!==null){var re=z.next;z.next=R,M.next=re}w.pending=M}Hr=null}return c}function nm(c,p){do{var w=ti;try{if(Bu(),ye.current=Co,Ce){for(var M=xe.memoizedState;M!==null;){var R=M.queue;R!==null&&(R.pending=null),M=M.next}Ce=!1}if(Ee=0,Ie=Pe=xe=null,Ge=!1,ct=0,pl.current=null,w===null||w.return===null){Mi=1,sd=p,ti=null;break}e:{var z=c,re=w.return,Se=w,ke=p;if(p=Oi,Se.flags|=32768,ke!==null&&typeof ke=="object"&&typeof ke.then=="function"){var ut=ke,It=Se,kt=It.tag;if((It.mode&1)===0&&(kt===0||kt===11||kt===15)){var Ut=It.alternate;Ut?(It.updateQueue=Ut.updateQueue,It.memoizedState=Ut.memoizedState,It.lanes=Ut.lanes):(It.updateQueue=null,It.memoizedState=null)}var Bt=Rp(re);if(Bt!==null){Bt.flags&=-257,Pg(Bt,re,Se,z,p),Bt.mode&1&&Mg(z,ut,p),p=Bt,ke=ut;var Qt=p.updateQueue;if(Qt===null){var Jt=new Set;Jt.add(ke),p.updateQueue=Jt}else Qt.add(ke);break e}else{if((p&1)===0){Mg(z,ut,p),Yf();break e}ke=Error(i(426))}}else if(ln&&Se.mode&1){var Bn=Rp(re);if(Bn!==null){(Bn.flags&65536)===0&&(Bn.flags|=256),Pg(Bn,re,Se,z,p),Vc(Cs(ke,Se));break e}}z=ke=Cs(ke,Se),Mi!==4&&(Mi=2),Gc===null?Gc=[z]:Gc.push(z),z=re;do{switch(z.tag){case 3:z.flags|=65536,p&=-p,z.lanes|=p;var Je=ff(z,ke,p);e(z,Je);break e;case 1:Se=ke;var Ne=z.type,nt=z.stateNode;if((z.flags&128)===0&&(typeof Ne.getDerivedStateFromError=="function"||nt!==null&&typeof nt.componentDidCatch=="function"&&(ml===null||!ml.has(nt)))){z.flags|=65536,p&=-p,z.lanes|=p;var Rt=Dp(z,Se,p);e(z,Rt);break e}}z=z.return}while(z!==null)}Ng(w)}catch(er){p=er,ti===w&&w!==null&&(ti=w=w.return);continue}break}while(!0)}function wf(){var c=ad.current;return ad.current=Co,c===null?Co:c}function Yf(){(Mi===0||Mi===3||Mi===2)&&(Mi=4),ei===null||(Hu&268435455)===0&&(xf&268435455)===0||hu(ei,Oi)}function dd(c,p){var w=Br;Br|=2;var M=wf();
vendor: 4,374 bytes, line 40
40(ei!==c||Oi!==p)&&(Ao=null,Ju(c,p));do try{Xg();break}catch(R){nm(c,R)}while(!0);if(Bu(),Br=w,ad.current=M,ti!==null)throw Error(i(261));return ei=null,Oi=0,Mi}function Xg(){for(;ti!==null;)fd(ti)}function zv(){for(;ti!==null&&!Cn();)fd(ti)}function fd(c){var p=Sf(c.alternate,c,Ga);c.memoizedProps=c.pendingProps,p===null?Ng(c):ti=p,pl.current=null}function Ng(c){var p=c;do{var w=p.alternate;if(c=p.return,(p.flags&32768)===0){if(w=$p(w,p,Ga),w!==null){ti=w;return}}else{if(w=Gp(w,p),w!==null){w.flags&=32767,ti=w;return}if(c!==null)c.flags|=32768,c.subtreeFlags=0,c.deletions=null;else{Mi=6,ti=null;return}}if(p=p.sibling,p!==null){ti=p;return}ti=p=c}while(p!==null);Mi===0&&(Mi=5)}function du(c,p,w){var M=qr,R=ks.transition;try{ks.transition=null,qr=1,Fv(c,p,w,M)}finally{ks.transition=R,qr=M}return null}function Fv(c,p,w,M){do Kc();while(gl!==null);if((Br&6)!==0)throw Error(i(327));w=c.finishedWork;var R=c.finishedLanes;if(w===null)return null;if(c.finishedWork=null,c.finishedLanes=0,w===c.current)throw Error(i(177));c.callbackNode=null,c.callbackPriority=0;var z=w.lanes|w.childLanes;if(Su(c,z),c===ei&&(ti=ei=null,Oi=0),(w.subtreeFlags&2064)===0&&(w.flags&2064)===0||ud||(ud=!0,im(Pr,function(){return Kc(),null})),z=(w.flags&15990)!==0,(w.subtreeFlags&15990)!==0||z){z=ks.transition,ks.transition=null;var re=qr;qr=1;var Se=Br;Br|=4,pl.current=null,Xv(c,w),Qp(w,c),Sc(Ec),Ho=!!Ou,Ec=Ou=null,c.current=w,Jp(w),ba(),Br=Se,qr=re,ks.transition=z}else c.current=w;if(ud&&(ud=!1,gl=c,lu=R),z=c.pendingLanes,z===0&&(ml=null),wn(w.stateNode),Ia(c,gr()),p!==null)for(M=c.onRecoverableError,w=0;w<p.length;w++)R=p[w],M(R.value,{componentStack:R.stack,digest:R.digest});if(ld)throw ld=!1,c=qc,qc=null,c;return(lu&1)!==0&&c.tag!==0&&Kc(),z=c.pendingLanes,(z&1)!==0?c===hd?cd++:(cd=0,hd=c):cd=0,Ta(),null}function Kc(){if(gl!==null){var c=Ai(lu),p=ks.transition,w=qr;try{if(ks.transition=null,qr=16>c?16:c,gl===null)var M=!1;else{if(c=gl,gl=null,lu=0,(Br&6)!==0)throw Error(i(331));var R=Br;for(Br|=4,Kt=c.current;Kt!==null;){var z=Kt,re=z.child;if((Kt.flags&16)!==0){var Se=z.deletions;if(Se!==null){for(var ke=0;ke<Se.length;ke++){var ut=Se[ke];for(Kt=ut;Kt!==null;){var It=Kt;switch(It.tag){case 0:case 11:case 15:td(8,It,z)}var kt=It.child;if(kt!==null)kt.return=It,Kt=kt;else for(;Kt!==null;){It=Kt;var Ut=It.sibling,Bt=It.return;if(Dg(It),It===ut){Kt=null;break}if(Ut!==null){Ut.return=Bt,Kt=Ut;break}Kt=Bt}}}var Qt=z.alternate;if(Qt!==null){var Jt=Qt.child;if(Jt!==null){Qt.child=null;do{var Bn=Jt.sibling;Jt.sibling=null,Jt=Bn}while(Jt!==null)}}Kt=z}}if((z.subtreeFlags&2064)!==0&&re!==null)re.return=z,Kt=re;else e:for(;Kt!==null;){if(z=Kt,(z.flags&2048)!==0)switch(z.tag){case 0:case 11:case 15:td(9,z,z.return)}var Je=z.sibling;if(Je!==null){Je.return=z.return,Kt=Je;break e}Kt=z.return}}var Ne=c.current;for(Kt=Ne;Kt!==null;){re=Kt;var nt=re.child;if((re.subtreeFlags&2064)!==0&&nt!==null)nt.return=re,Kt=nt;else e:for(re=Ne;Kt!==null;){if(Se=Kt,(Se.flags&2048)!==0)try{switch(Se.tag){case 0:case 11:case 15:_f(9,Se)}}catch(er){jn(Se,Se.return,er)}if(Se===re){Kt=null;break e}var Rt=Se.sibling;if(Rt!==null){Rt.return=Se.return,Kt=Rt;break e}Kt=Se.return}}if(Br=R,Ta(),Bi&&typeof Bi.onPostCommitFiberRoot=="function")try{Bi.onPostCommitFiberRoot(Si,c)}catch{}M=!0}return M}finally{qr=w,ks.transition=p}}return!1}function zg(c,p,w){p=Cs(w,p),p=ff(c,p,1),c=Is(c,p,1),p=Pa(),c!==null&&(Yu(c,1,p),Ia(c,p))}function jn(c,p,w){if(c.tag===3)zg(c,c,w);else for(;p!==null;){if(p.tag===3){zg(p,c,w);break}else if(p.tag===1){var M=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof M.componentDidCatch=="function"&&(ml===null||!ml.has(M))){c=Cs(w,c),c=Dp(p,c,1),p=Is(p,c,1),c=Pa(),p!==null&&(Yu(p,1,c),Ia(p,c));break}}p=p.return}}function Zv(c,p,w){var M=c.pingCache;M!==null&&M.delete(p),p=Pa(),c.pingedLanes|=c.suspendedLanes&w,ei===c&&(Oi&w)===w&&(Mi===4||Mi===3&&(Oi&130023424)===Oi&&500>gr()-bf?Ju(c,0):od|=w),Ia(c,p)}function Fg(c,p){p===0&&((c.mode&1)===0?p=1:(p=fc,fc<<=1,(fc&130023424)===0&&(fc=4194304)));var w=Pa();c=Ea(c,p),c!==null&&(Yu(c,p,w),Ia(c,w))}function pd(c){var p=c.memoizedState,w=0;p!==null&&(w=p.retryLane),Fg(c,w)}function Zg(c,p){var w=0;switch(c.tag){case 13:var M=c.stateNode,R=c.memoizedState;R!==null&&(w=R.retryLane);break;case 19:M=c.stateNode;break;default:throw Error(i(314))}M!==null&&M.delete(p),Fg(c,w)}var Sf;
vendor: 12,724 bytes, line 40
40Sf=function(c,p,w){if(c!==null)if(c.memoizedProps!==p.pendingProps||Wi.current)Ba=!0;else{if((c.lanes&w)===0&&(p.flags&128)===0)return Ba=!1,Bp(c,p,w);Ba=(c.flags&131072)!==0}else Ba=!1,ln&&(p.flags&1048576)!==0&&af(p,hl,p.index);switch(p.lanes=0,p.tag){case 2:var M=p.type;pa(c,p),c=p.pendingProps;var R=us(p,di.current);Fa(p,w),R=At(null,p,M,c,R,w);var z=Vt();return p.flags|=1,typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,$i(M)?(z=!0,la(p)):z=!1,p.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,$u(p),R.updater=ps,p.stateNode=R,R._reactInternals=p,hf(p,M,c,w),p=pf(null,p,M,!0,z,w)):(p.tag=0,ln&&z&&Fu(p),Qi(null,p,R,w),p=p.child),p;case 16:M=p.elementType;e:{switch(pa(c,p),c=p.pendingProps,R=M._init,M=R(M._payload),p.type=M,R=p.tag=jg(M),c=oi(M,c),R){case 0:p=Nc(null,p,M,c,w);break e;case 1:p=Hh(null,p,M,c,w);break e;case 11:p=Op(null,p,M,c,w);break e;case 14:p=Xp(null,p,M,oi(M.type,c),w);break e}throw Error(i(306,M,""))}return p;case 0:return M=p.type,R=p.pendingProps,R=p.elementType===M?R:oi(M,R),Nc(c,p,M,R,w);case 1:return M=p.type,R=p.pendingProps,R=p.elementType===M?R:oi(M,R),Hh(c,p,M,R,w);case 3:e:{if(Np(p),c===null)throw Error(i(387));M=p.pendingProps,z=p.memoizedState,R=z.element,Dc(c,p),o(p,M,null,w);var re=p.memoizedState;if(M=re.element,z.isDehydrated)if(z={element:M,isDehydrated:!1,cache:re.cache,pendingSuspenseBoundaries:re.pendingSuspenseBoundaries,transitions:re.transitions},p.updateQueue.baseState=z,p.memoizedState=z,p.flags&256){R=Cs(Error(i(423)),p),p=Ug(c,p,M,w,R);break e}else if(M!==R){R=Cs(Error(i(424)),p),p=Ug(c,p,M,w,R);break e}else for(qi=Hn(p.stateNode.containerInfo.firstChild),ua=p,ln=!0,Hi=null,w=ir(p,null,M,w),p.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(Wo(),M===R){p=Vo(c,p,w);break e}Qi(c,p,M,w)}p=p.child}return p;case 5:return B(p),c===null&&Gh(p),M=p.type,R=p.pendingProps,z=c!==null?c.memoizedProps:null,re=R.children,Mc(M,R)?re=null:z!==null&&Mc(M,z)&&(p.flags|=32),Xc(c,p),Qi(c,p,re,w),p.child;case 6:return c===null&&Gh(p),null;case 13:return Fp(c,p,w);case 4:return L(p,p.stateNode.containerInfo),M=p.pendingProps,c===null?p.child=Zt(p,null,M,w):Qi(c,p,M,w),p.child;case 11:return M=p.type,R=p.pendingProps,R=p.elementType===M?R:oi(M,R),Op(c,p,M,R,w);case 7:return Qi(c,p,p.pendingProps,w),p.child;case 8:return Qi(c,p,p.pendingProps.children,w),p.child;case 12:return Qi(c,p,p.pendingProps.children,w),p.child;case 10:e:{if(M=p.type._context,R=p.pendingProps,z=p.memoizedProps,re=R.value,on(Eo,M._currentValue),M._currentValue=re,z!==null)if(is(z.value,re)){if(z.children===R.children&&!Wi.current){p=Vo(c,p,w);break e}}else for(z=p.child,z!==null&&(z.return=p);z!==null;){var Se=z.dependencies;if(Se!==null){re=z.child;for(var ke=Se.firstContext;ke!==null;){if(ke.context===M){if(z.tag===1){ke=da(-1,w&-w),ke.tag=2;var ut=z.updateQueue;if(ut!==null){ut=ut.shared;var It=ut.pending;It===null?ke.next=ke:(ke.next=It.next,It.next=ke),ut.pending=ke}}z.lanes|=w,ke=z.alternate,ke!==null&&(ke.lanes|=w),kc(z.return,w,p),Se.lanes|=w;break}ke=ke.next}}else if(z.tag===10)re=z.type===p.type?null:z.child;else if(z.tag===18){if(re=z.return,re===null)throw Error(i(341));re.lanes|=w,Se=re.alternate,Se!==null&&(Se.lanes|=w),kc(re,w,p),re=z.sibling}else re=z.child;if(re!==null)re.return=z;else for(re=z;re!==null;){if(re===p){re=null;break}if(z=re.sibling,z!==null){z.return=re.return,re=z;break}re=re.return}z=re}Qi(c,p,R.children,w),p=p.child}return p;case 9:return R=p.type,M=p.pendingProps.children,Fa(p,w),R=Lr(R),M=M(R),p.flags|=1,Qi(c,p,M,w),p.child;case 14:return M=p.type,R=oi(M,p.pendingProps),R=oi(M.type,R),Xp(c,p,M,R,w);case 15:return su(c,p,p.type,p.pendingProps,w);case 17:return M=p.type,R=p.pendingProps,R=p.elementType===M?R:oi(M,R),pa(c,p),p.tag=1,$i(M)?(c=!0,la(p)):c=!1,Fa(p,w),kp(p,M,R),hf(p,M,R,w),pf(null,p,M,!0,c,w);case 19:return zc(c,p,w);case 22:return Ig(c,p,w)}throw Error(i(156,p.tag))};function im(c,p){return Ci(c,p)}function li(c,p,w,M){this.tag=c,this.key=w,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qa(c,p,w,M){return new li(c,p,w,M)}function am(c){return c=c.prototype,!(!c||!c.isReactComponent)}function jg(c){if(typeof c=="function")return am(c)?1:0;if(c!=null){if(c=c.$$typeof,c===st)return 11;if(c===Yt)return 14}return 2}function ko(c,p){var w=c.alternate;return w===null?(w=qa(c.tag,p,c.key,c.mode),w.elementType=c.elementType,w.type=c.type,w.stateNode=c.stateNode,w.alternate=c,c.alternate=w):(w.pendingProps=p,w.type=c.type,w.flags=0,w.subtreeFlags=0,w.deletions=null),w.flags=c.flags&14680064,w.childLanes=c.childLanes,w.lanes=c.lanes,w.child=c.child,w.memoizedProps=c.memoizedProps,w.memoizedState=c.memoizedState,w.updateQueue=c.updateQueue,p=c.dependencies,w.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},w.sibling=c.sibling,w.index=c.index,w.ref=c.ref,w}function Qc(c,p,w,M,R,z){var re=2;if(M=c,typeof c=="function")am(c)&&(re=1);else if(typeof c=="string")re=5;else e:switch(c){case De:return ec(w.children,R,z,p);case ze:re=8,R|=8;break;case je:return c=qa(12,w,p,R|2),c.elementType=je,c.lanes=z,c;case rt:return c=qa(13,w,p,R),c.elementType=rt,c.lanes=z,c;case Re:return c=qa(19,w,p,R),c.elementType=Re,c.lanes=z,c;case _t:return Tf(w,R,z,p);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case ft:re=10;break e;case ot:re=9;break e;case st:re=11;break e;case Yt:re=14;break e;case Tt:re=16,M=null;break e}throw Error(i(130,c==null?c:typeof c,""))}return p=qa(re,w,p,R),p.elementType=c,p.type=M,p.lanes=z,p}function ec(c,p,w,M){return c=qa(7,c,M,p),c.lanes=w,c}function Tf(c,p,w,M){return c=qa(22,c,M,p),c.elementType=_t,c.lanes=w,c.stateNode={isHidden:!1},c}function sm(c,p,w){return c=qa(6,c,null,p),c.lanes=w,c}function om(c,p,w){return p=qa(4,c.children!==null?c.children:[],c.key,p),p.lanes=w,p.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},p}function Bg(c,p,w,M,R){this.tag=p,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wu(0),this.expirationTimes=wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wu(0),this.identifierPrefix=M,this.onRecoverableError=R,this.mutableSourceEagerHydrationData=null}function Ji(c,p,w,M,R,z,re,Se,ke){return c=new Bg(c,p,w,Se,ke),p===1?(p=1,z===!0&&(p|=8)):p=0,z=qa(3,null,null,p),c.current=z,z.stateNode=c,z.memoizedState={element:M,isDehydrated:w,cache:null,transitions:null,pendingSuspenseBoundaries:null},$u(z),c}function lm(c,p,w){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:se,key:M==null?null:""+M,children:c,containerInfo:p,implementation:w}}function um(c){if(!c)return Sa;c=c._reactInternals;e:{if(sr(c)!==c||c.tag!==1)throw Error(i(170));var p=c;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if($i(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(i(171))}if(c.tag===1){var w=c.type;if($i(w))return ll(c,w,p)}return p}function yl(c,p,w,M,R,z,re,Se,ke){return c=Ji(w,M,!0,c,R,z,re,Se,ke),c.context=um(null),w=c.current,M=Pa(),R=cu(w),z=da(M,R),z.callback=p??null,Is(w,z,R),c.current.lanes=R,Yu(c,R,M),Ia(c,M),c}function tc(c,p,w,M){var R=p.current,z=Pa(),re=cu(R);return w=um(w),p.context===null?p.context=w:p.pendingContext=w,p=da(z,re),p.payload={element:c},M=M===void 0?null:M,M!==null&&(p.callback=M),c=Is(R,p,re),c!==null&&(Ds(c,R,re,z),_(c,R,re)),re}function fu(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return c.child.stateNode;default:return c.child.stateNode}}function rc(c,p){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var w=c.retryLane;c.retryLane=w!==0&&w<p?w:p}}function Jc(c,p){rc(c,p),(c=c.alternate)&&rc(c,p)}function Wf(){return null}var $g=typeof reportError=="function"?reportError:function(c){console.error(c)};function cm(c){this._internalRoot=c}md.prototype.render=cm.prototype.render=function(c){var p=this._internalRoot;if(p===null)throw Error(i(409));tc(c,p,null,null)},md.prototype.unmount=cm.prototype.unmount=function(){var c=this._internalRoot;if(c!==null){this._internalRoot=null;var p=c.containerInfo;Qu(function(){tc(null,c,null,null)}),p[ss]=null}};function md(c){this._internalRoot=c}md.prototype.unstable_scheduleHydration=function(c){if(c){var p=ho();c={blockedOn:null,target:c,priority:p};for(var w=0;w<zr.length&&p!==0&&p<zr[w].priority;w++);zr.splice(w,0,c),w===0&&kl(c)}};function Ef(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)}function Mf(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11&&(c.nodeType!==8||c.nodeValue!==" react-mount-point-unstable "))}function hm(){}function Gg(c,p,w,M,R){if(R){if(typeof M=="function"){var z=M;M=function(){var ut=fu(re);z.call(ut)}}var re=yl(p,M,c,0,null,!1,!1,"",hm);return c._reactRootContainer=re,c[ss]=re.current,wo(c.nodeType===8?c.parentNode:c),Qu(),re}for(;R=c.lastChild;)c.removeChild(R);if(typeof M=="function"){var Se=M;M=function(){var ut=fu(ke);Se.call(ut)}}var ke=Ji(c,0,!1,null,null,!1,!1,"",hm);return c._reactRootContainer=ke,c[ss]=ke.current,wo(c.nodeType===8?c.parentNode:c),Qu(function(){tc(p,ke,w,M)}),ke}function eh(c,p,w,M,R){var z=w._reactRootContainer;if(z){var re=z;if(typeof R=="function"){var Se=R;R=function(){var ke=fu(re);Se.call(ke)}}tc(p,re,c,R)}else re=Gg(w,p,c,R,M);return fu(re)}Cr=function(c){switch(c.tag){case 3:var p=c.stateNode;if(p.current.memoizedState.isDehydrated){var w=Cl(p.pendingLanes);w!==0&&(Go(p,w|1),Ia(p,gr()),(Br&6)===0&&(ou=gr()+500,Ta()))}break;case 13:Qu(function(){var M=Ea(c,1);if(M!==null){var R=Pa();Ds(M,c,1,R)}}),Jc(c,1)}},co=function(c){if(c.tag===13){var p=Ea(c,134217728);if(p!==null){var w=Pa();Ds(p,c,134217728,w)}Jc(c,134217728)}},ki=function(c){if(c.tag===13){var p=cu(c),w=Ea(c,p);if(w!==null){var M=Pa();Ds(w,c,p,M)}Jc(c,p)}},ho=function(){return qr},Mr=function(c,p){var w=qr;try{return qr=c,p()}finally{qr=w}},Ve=function(c,p,w){switch(p){case"input":if(hr(c,w),p=w.name,w.type==="radio"&&p!=null){for(w=c;w.parentNode;)w=w.parentNode;for(w=w.querySelectorAll("input[name="+JSON.stringify(""+p)+'][type="radio"]'),p=0;p<w.length;p++){var M=w[p];if(M!==c&&M.form===c.form){var R=Gs(M);if(!R)throw Error(i(90));Wn(M),hr(M,R)}}}break;case"textarea":In(c,w);break;case"select":p=w.value,p!=null&&an(c,!!w.multiple,p,!1)}},Ze=tm,vt=Qu;var dm={usingClientEntryPoint:!1,Events:[eu,os,Gs,Be,tt,tm]},gd={findFiberByHostInstance:So,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},qg={bundleType:gd.bundleType,version:gd.version,rendererPackageName:gd.rendererPackageName,rendererConfig:gd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:fe.ReactCurrentDispatcher,findHostInstanceByFiber:function(c){return c=Tr(c),c===null?null:c.stateNode},findFiberByHostInstance:gd.findFiberByHostInstance||Wf,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pf.isDisabled&&Pf.supportsFiber)try{Si=Pf.inject(qg),Bi=Pf}catch{}}return Rs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dm,Rs.createPortal=function(c,p){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ef(p))throw Error(i(200));return lm(c,p,null,w)},Rs.createRoot=function(c,p){if(!Ef(c))throw Error(i(299));var w=!1,M="",R=$g;return p!=null&&(p.unstable_strictMode===!0&&(w=!0),p.identifierPrefix!==void 0&&(M=p.identifierPrefix),p.onRecoverableError!==void 0&&(R=p.onRecoverableError)),p=Ji(c,1,!1,null,null,w,!1,M,R),c[ss]=p.current,wo(c.nodeType===8?c.parentNode:c),new cm(p)},Rs.findDOMNode=function(c){if(c==null)return null;if(c.nodeType===1)return c;var p=c._reactInternals;if(p===void 0)throw typeof c.render=="function"?Error(i(188)):(c=Object.keys(c).join(","),Error(i(268,c)));return c=Tr(p),c=c===null?null:c.stateNode,c},Rs.flushSync=function(c){return Qu(c)}
40,Rs.hydrate=function(c,p,w){if(!Mf(p))throw Error(i(200));return eh(null,c,p,!0,w)},Rs.hydrateRoot=function(c,p,w){if(!Ef(c))throw Error(i(405));var M=w!=null&&w.hydratedSources||null,R=!1,z="",re=$g;if(w!=null&&(w.unstable_strictMode===!0&&(R=!0),w.identifierPrefix!==void 0&&(z=w.identifierPrefix),w.onRecoverableError!==void 0&&(re=w.onRecoverableError)),p=yl(p,null,c,1,w??null,R,!1,z,re),c[ss]=p.current,wo(c),M)for(c=0;c<M.length;c++)w=M[c],R=w._getVersion,R=R(w._source),p.mutableSourceEagerHydrationData==null?p.mutableSourceEagerHydrationData=[w,R]:p.mutableSourceEagerHydrationData.push(w,R);return new md(p)},Rs.render=function(c,p,w){if(!Mf(p))throw Error(i(200));return eh(null,c,p,!1,w)},Rs.unmountComponentAtNode=function(c){if(!Mf(c))throw Error(i(40));return c._reactRootContainer?(Qu(function(){eh(null,null,c,!1,function(){c._reactRootContainer=null,c[ss]=null})}),!0):!1},Rs.unstable_batchedUpdates=tm,Rs.unstable_renderSubtreeIntoContainer=function(c,p,w,M){if(!Mf(w))throw Error(i(200));if(c==null||c._reactInternals===void 0)throw Error(i(38));return eh(c,p,w,!1,M)},Rs.version="18.3.1-next-f1338f8080-20240426",Rs}var GS;function KM(){if(GS)return l_.exports;GS=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),l_.exports=iV(),l_.exports}var qS;function aV(){if(qS)return ny;qS=1;var n=KM();return ny.createRoot=n.createRoot,ny.hydrateRoot=n.hydrateRoot,ny}var sV=aV(),vm={},HS;function oV(){if(HS)return vm;HS=1,Object.defineProperty(vm,"__esModule",{value:!0}),vm.parse=g,vm.serialize=E;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,h=Object.prototype.toString,m=(()=>{const D=function(){};return D.prototype=Object.create(null),D})();function g(D,V){const F=new m,$=D.length;if($<2)return F;const Q=(V==null?void 0:V.decode)||I;let ae=0;do{const le=D.indexOf("=",ae);if(le===-1)break;const _e=D.indexOf(";",ae),fe=_e===-1?$:_e;if(le>fe){ae=D.lastIndexOf(";",le-1)+1;continue}const We=s(D,ae,le),se=Y(D,le,We),De=D.slice(We,se);if(F[De]===void 0){let ze=s(D,le+1,fe),je=Y(D,fe,ze);const ft=Q(D.slice(ze,je));F[De]=ft}ae=fe+1}while(ae<$);return F}function s(D,V,F){do{const $=D.charCodeAt(V);if($!==32&&$!==9)return V}while(++V<F);return F}function Y(D,V,F){for(;V>F;){const $=D.charCodeAt(--V);if($!==32&&$!==9)return V+1}return F}function E(D,V,F){const $=(F==null?void 0:F.encode)||encodeURIComponent;if(!n.test(D))throw new TypeError(`argument name is invalid: ${D}`);const Q=$(V);if(!t.test(Q))throw new TypeError(`argument val is invalid: ${V}`);let ae=D+"="+Q;if(!F)return ae;if(F.maxAge!==void 0){if(!Number.isInteger(F.maxAge))throw new TypeError(`option maxAge is invalid: ${F.maxAge}`);ae+="; Max-Age="+F.maxAge}if(F.domain){if(!i.test(F.domain))throw new TypeError(`option domain is invalid: ${F.domain}`);ae+="; Domain="+F.domain}if(F.path){if(!a.test(F.path))throw new TypeError(`option path is invalid: ${F.path}`);ae+="; Path="+F.path}if(F.expires){if(!k(F.expires)||!Number.isFinite(F.expires.valueOf()))throw new TypeError(`option expires is invali
40d: ${F.expires}`);ae+="; Expires="+F.expires.toUTCString()}if(F.httpOnly&&(ae+="; HttpOnly"),F.secure&&(ae+="; Secure"),F.partitioned&&(ae+="; Partitioned"),F.priority)switch(typeof F.priority=="string"?F.priority.toLowerCase():void 0){case"low":ae+="; Priority=Low";break;case"medium":ae+="; Priority=Medium";break;case"high":ae+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${F.priority}`)}if(F.sameSite)switch(typeof F.sameSite=="string"?F.sameSite.toLowerCase():F.sameSite){case!0:case"strict":ae+="; SameSite=Strict";break;case"lax":ae+="; SameSite=Lax";break;case"none":ae+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${F.sameSite}`)}return ae}function I(D){if(D.indexOf("%")===-1)return D;try{return decodeURIComponent(D)}catch{return D}}function k(D){return h.call(D)==="[object Date]"}return vm}oV();/** 41 * react-router v7.5.3 42 * 43 * Copyright (c) Remix Software Inc. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE.md file in the root directory of this source tree. 47 * 48 * @license MIT 49 */var QM=n=>{throw TypeError(n)},lV=(n,t,i)=>t.has(n)||QM("Cannot "+i),h_=(n,t,i)=>(lV(n,t,"read from private field"),i?i.call(n):t.get(n)),uV=(n,t,i)=>t.has(n)?QM("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,i),KS="popstate";function cV(n={}){function t(a,h){let{pathname:m,search:g,hash:s}=a.location;return jm("",{pathname:m,search:g,hash:s},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function i(a,h){return typeof h=="string"?h:mh(h)}return dV(t,i,null,n)}function Nr(n,t){if(n===!1||n===null||typeof n>"u")throw new Error(t)}function Ui(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function hV(){return Math.random().toString(36).substring(2,10)}function QS(n,t){return{usr:n.state,key:n.key,idx:t}}function jm(n,t,i=null,a){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof t=="string"?_h(t):t,state:i,key:t&&t.key||a||hV()}}function mh({pathname:n="/",search:t="",hash:i=""}){return t&&t!=="?"&&(n+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function _h(n){let t={};if(n){let i=n.indexOf("#");i>=0&&(t.hash=n.substring(i),n=n.substring(0,i));let a=n.indexOf("?");a>=0&&(t.search=n.substring(a),n=n.substring(0,a)),n&&(t.pathname=n)}return t}function dV(n,t,i,a={}){let{window:h=document.defaultView,v5Compat:m=!1}=a,g=h.history,s="POP",Y=null,E=I();E==null&&(E=0,g.replaceState({...g.state,idx:E},""));function I(){return(g.state||{idx:null}).idx}function k(){s="POP";let Q=I(),ae=Q==null?null:Q-E;E=Q,Y&&Y({action:s,location:$.location,delta:ae})}function D(Q,ae){s="PUSH";let le=jm($.location,Q,ae);E=I()+1;let _e=QS(le,E),fe=$.createHref(le);try{g.pushState(_e,"",fe)}catch(We){if(We instanceof DOMException&&We.name==="DataCloneError")throw We;h.location.assign(fe)}m&&Y&&Y({action:s,location:$.location,delta:1})}function V(Q,ae){s="REPLACE";let le=jm($.location,Q,ae);E=I();let _e=QS(le,E),fe=$.createHref(le);g.replaceState(_e,"",fe),m&&Y&&Y({action:s,location:$.location,delta:0})}function F(Q){let ae=h.location.origin!=="null"?h.location.origin:h.location.href,le=typeof Q=="string"?Q:mh(Q);return le=le.replace(/ $/,"%20"),Nr(ae,`No window.location.(origin|href) available to create URL for href: ${le}`),new URL(le,ae)}let $={get action(){return s},get location(){return n(h,g)},listen(Q){if(Y)throw new Error("A history only accepts one active listener");return h.addEventListener(KS,k),Y=Q,()=>{h.removeEventListener(KS,k),Y=null}},createHref(Q){return t(h,Q)},createURL:F,encodeLocation(Q){let ae=F(Q);return{pathname:ae.pathname,search:ae.search,hash:ae.hash}},push:D,replace:V,go(Q){return g.go(Q)}};return $}var Pm,JS=class{constructor(n){if(uV(this,Pm,new Map),n)for(let[t,i]of n)this.set(t,i)}get(n){if(h_(this,Pm).has(n))return h_(this,Pm).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,t){h_(this,Pm).set(n,t)}};Pm=new WeakMap;
49var fV=new Set(["lazy","caseSensitive","path","id","index","children"]);function pV(n){return fV.has(n)}var mV=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function gV(n){return mV.has(n)}function yV(n){return n.index===!0}function Xy(n,t,i=[],a={}){return n.map((h,m)=>{let g=[...i,String(m)],s=typeof h.id=="string"?h.id:g.join("-");if(Nr(h.index!==!0||!h.children,"Cannot specify children on an index route"),Nr(!a[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),yV(h)){let Y={...h,...t(h),id:s};return a[s]=Y,Y}else{let Y={...h,...t(h),id:s,children:void 0};return a[s]=Y,h.children&&(Y.children=Xy(h.children,t,g,a)),Y}})}function hh(n,t,i="/"){return by(n,t,i,!1)}function by(n,t,i,a){let h=typeof t=="string"?_h(t):t,m=No(h.pathname||"/",i);if(m==null)return null;let g=JM(n);_V(g);let s=null;for(let Y=0;s==null&&Y<g.length;++Y){let E=IV(m);s=MV(g[Y],E,a)}return s}function vV(n,t){let{route:i,pathname:a,params:h}=n;return{id:i.id,pathname:a,params:h,data:t[i.id],handle:i.handle}}function JM(n,t=[],i=[],a=""){let h=(m,g,s)=>{let Y={relativePath:s===void 0?m.path||"":s,caseSensitive:m.caseSensitive===!0,childrenIndex:g,route:m};Y.relativePath.startsWith("/")&&(Nr(Y.relativePath.startsWith(a),`Absolute route path "${Y.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),Y.relativePath=Y.relativePath.slice(a.length));let E=yu([a,Y.relativePath]),I=i.concat(Y);m.children&&m.children.length>0&&(Nr(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),JM(m.children,t,I,E)),!(m.path==null&&!m.index)&&t.push({path:E,score:WV(E,m.index),routesMeta:I})};return n.forEach((m,g)=>{var s;if(m.path===""||!((s=m.path)!=null&&s.includes("?")))h(m,g);else for(let Y of eP(m.path))h(m,g,Y)}),t}function eP(n){let t=n.split("/");if(t.length===0)return[];let[i,...a]=t,h=i.endsWith("?"),m=i.replace(/\?$/,"");if(a.length===0)return h?[m,""]:[m];let g=eP(a.join("/")),s=[];return s.push(...g.map(Y=>Y===""?m:[m,Y].join("/"))),h&&s.push(...g),s.map(Y=>n.startsWith("/")&&Y===""?"/":Y)}function _V(n){n.sort((t,i)=>t.score!==i.score?i.score-t.score:EV(t.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var xV=/^:[\w-]+$/,bV=3,wV=2,YV=1,SV=10,TV=-2,e1=n=>n==="*";function WV(n,t){let i=n.split("/"),a=i.length;return i.some(e1)&&(a+=TV),t&&(a+=wV),i.filter(h=>!e1(h)).reduce((h,m)=>h+(xV.test(m)?bV:m===""?YV:SV),a)}function EV(n,t){return n.length===t.length&&n.slice(0,-1).every((a,h)=>a===t[h])?n[n.length-1]-t[t.length-1]:0}function MV(n,t,i=!1){let{routesMeta:a}=n,h={},m="/",g=[];for(let s=0;s<a.length;++s){let Y=a[s],E=s===a.length-1,I=m==="/"?t:t.slice(m.length)||"/",k=Ny({path:Y.relativePath,caseSensitive:Y.caseSensitive,end:E},I),D=Y.route;if(!k&&E&&i&&!a[a.length-1].route.index&&(k=Ny({path:Y.relativePath,caseSensitive:Y.caseSensitive,end:!1},I)),!k)return null;
49Object.assign(h,k.params),g.push({params:h,pathname:yu([m,k.pathname]),pathnameBase:VV(yu([m,k.pathnameBase])),route:D}),k.pathnameBase!=="/"&&(m=yu([m,k.pathnameBase]))}return g}function Ny(n,t){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,a]=PV(n.path,n.caseSensitive,n.end),h=t.match(i);if(!h)return null;let m=h[0],g=m.replace(/(.)\/+$/,"$1"),s=h.slice(1);return{params:a.reduce((E,{paramName:I,isOptional:k},D)=>{if(I==="*"){let F=s[D]||"";g=m.slice(0,m.length-F.length).replace(/(.)\/+$/,"$1")}const V=s[D];return k&&!V?E[I]=void 0:E[I]=(V||"").replace(/%2F/g,"/"),E},{}),pathname:m,pathnameBase:g,pattern:n}}function PV(n,t=!1,i=!0){Ui(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let a=[],h="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,s,Y)=>(a.push({paramName:s,isOptional:Y!=null}),Y?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(a.push({paramName:"*"}),h+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?h+="\\/*$":n!==""&&n!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,t?void 0:"i"),a]}function IV(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ui(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),n}}function No(n,t){if(t==="/")return n;if(!n.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,a=n.charAt(i);return a&&a!=="/"?null:n.slice(i)||"/"}function UV(n,t="/"){let{pathname:i,search:a="",hash:h=""}=typeof n=="string"?_h(n):n;return{pathname:i?i.startsWith("/")?i:CV(i,t):t,search:AV(a),hash:kV(h)}}function CV(n,t){let i=t.replace(/\/+$/,"").split("/");return n.split("/").forEach(h=>{h===".."?i.length>1&&i.pop():h!=="."&&i.push(h)}),i.length>1?i.join("/"):"/"}function d_(n,t,i,a){return`Cannot include a '${n}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function tP(n){return n.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function iv(n){let t=tP(n);return t.map((i,a)=>a===t.length-1?i.pathname:i.pathnameBase)}function av(n,t,i,a=!1){let h;typeof n=="string"?h=_h(n):(h={...n},Nr(!h.pathname||!h.pathname.includes("?"),d_("?","pathname","search",h)),Nr(!h.pathname||!h.pathname.includes("#"),d_("#","pathname","hash",h)),Nr(!h.search||!h.search.includes("#"),d_("#","search","hash",h)));let m=n===""||h.pathname==="",g=m?"/":h.pathname,s;if(g==null)s=i;else{let k=t.length-1;if(!a&&g.startsWith("..")){let D=g.split("/");for(;D[0]==="..";)D.shift(),k-=1;h.pathname=D.join("/")}s=k>=0?t[k]:"/"}let Y=UV(h,s),E=g&&g!=="/"&&g.endsWith("/"),I=(m||g===".")&&i.endsWith("/");return!Y.pathname.endsWith("/")&&(E||I)&&(Y.pathname+="/"),Y}var yu=n=>n.join("/").replace(/\/\/+/g,"/"),VV=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),AV=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,kV=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,zy=class{constructor(n,t,i,a=!1){this.status=n,this.statusText=t||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Bm(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var rP=["POST","PUT","PATCH","DELETE"],DV=new Set(rP),RV=["GET",...rP],LV=new Set(RV),OV=new Set([301,302,303,307,308]),XV=new Set([307,308]),f_={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},NV={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_m={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Qw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zV=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),nP="remix-router-transitions",iP=Symbol("ResetLoaderData");function FV(n){const t=n.window?n.window:typeof window<"u"?window:void 0,i=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";Nr(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=n.hydrationRouteProperties||[],h=n.mapRouteProperties||zV,m={}
49,g=Xy(n.routes,h,void 0,m),s,Y=n.basename||"/",E=n.dataStrategy||GV,I={unstable_middleware:!1,...n.future},k=null,D=new Set,V=null,F=null,$=null,Q=n.hydrationData!=null,ae=hh(g,n.history.location,Y),le=!1,_e=null;if(ae==null&&!n.patchRoutesOnNavigation){let ge=Ro(404,{pathname:n.history.location.pathname}),{matches:Te,route:Oe}=d1(g);ae=Te,_e={[Oe.id]:ge}}ae&&!n.hydrationData&&Be(ae,g,n.history.location.pathname).active&&(ae=null);let fe;if(ae)if(ae.some(ge=>ge.route.lazy))fe=!1;else if(!ae.some(ge=>ge.route.loader))fe=!0;else{let ge=n.hydrationData?n.hydrationData.loaderData:null,Te=n.hydrationData?n.hydrationData.errors:null;if(Te){let Oe=ae.findIndex(ht=>Te[ht.route.id]!==void 0);fe=ae.slice(0,Oe+1).every(ht=>!yw(ht.route,ge,Te))}else fe=ae.every(Oe=>!yw(Oe.route,ge,Te))}else{fe=!1,ae=[];let ge=Be(null,g,n.history.location.pathname);ge.active&&ge.matches&&(le=!0,ae=ge.matches)}let We,se={historyAction:n.history.action,location:n.history.location,matches:ae,initialized:fe,navigation:f_,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||_e,fetchers:new Map,blockers:new Map},De="POP",ze=!1,je,ft=!1,ot=new Map,st=null,rt=!1,Re=!1,Yt=new Set,Tt=new Map,_t=0,Qe=-1,bt=new Map,xt=new Set,Ue=new Map,pt=new Map,Ft=new Set,Ht=new Map,Gt,rr=null;function or(){if(k=n.history.listen(({action:ge,location:Te,delta:Oe})=>{if(Gt){Gt(),Gt=void 0;return}Ui(Ht.size===0||Oe!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ht=he({currentLocation:se.location,nextLocation:Te,historyAction:ge});if(ht&&Oe!=null){let gt=new Promise(Xe=>{Gt=Xe});n.history.go(Oe*-1),ie(ht,{state:"blocked",location:Te,proceed(){ie(ht,{state:"proceeding",proceed:void 0,reset:void 0,location:Te}),gt.then(()=>n.history.go(Oe))},reset(){let Xe=new Map(se.blockers);Xe.set(ht,_m),Er({blockers:Xe})}});return}return Yr(ge,Te)}),i){aA(t,ot);let ge=()=>sA(t,ot);t.addEventListener("pagehide",ge),st=()=>t.removeEventListener("pagehide",ge)}return se.initialized||Yr("POP",se.location,{initialHydration:!0}),We}function fr(){k&&k(),st&&st(),D.clear(),je&&je.abort(),se.fetchers.forEach((ge,Te)=>xi(Te)),se.blockers.forEach((ge,Te)=>ne(Te))}function Sr(ge){return D.add(ge),()=>D.delete(ge)}function Er(ge,Te={}){se={...se,...ge};let Oe=[],ht=[];se.fetchers.forEach((gt,Xe)=>{gt.state==="idle"&&(Ft.has(Xe)?Oe.push(Xe):ht.push(Xe))}),Ft.forEach(gt=>{!se.fetchers.has(gt)&&!Tt.has(gt)&&Oe.push(gt)}),[...D].forEach(gt=>gt(se,{deletedFetchers:Oe,viewTransitionOpts:Te.viewTransitionOpts,flushSync:Te.flushSync===!0})),Oe.forEach(gt=>xi(gt)),ht.forEach(gt=>se.fetchers.delete(gt))}function Gr(ge,Te,{flushSync:Oe}={}){var Et,He;let ht=se.actionData!=null&&se.navigation.formMethod!=null&&so(se.navigation.formMethod)&&se.navigation.state==="loading"&&((Et=ge.state)==null?void 0:Et._isRedirect)!==!0,gt;Te.actionData?Object.keys(Te.actionData).length>0?gt=Te.actionData:gt=null:ht?gt=se.actionData:gt=null;let Xe=Te.loaderData?c1(se.loaderData,Te.loaderData,Te.matches||[],Te.errors):se.loaderData,Ot=se.blockers;Ot.size>0&&(Ot=new Map(Ot),Ot.forEach((Wt,Lt)=>Ot.set(Lt,_m)));let Mt=ze===!0||se.navigation.formMethod!=null&&so(se.navigation.formMethod)&&((He=ge.state)==null?void 0:He._isRedirect)!==!0;s&&(g=s,s=void 0),rt||De==="POP"||(De==="PUSH"?n.history.push(ge,ge.state):De==="REPLACE"&&n.history.replace(ge,ge.state));let Dt;if(De==="POP"){let Wt=ot.get(se.location.pathname);Wt&&Wt.has(ge.pathname)?Dt={currentLocation:se.location,nextLocation:ge}:ot.has(ge.pathname)&&(Dt={currentLocation:ge,nextLocation:se.location})}else if(ft){let Wt=ot.get(se.location.pathname);Wt?Wt.add(ge.pathname):(Wt=new Set([ge.pathname]),ot.set(se.location.pathname,Wt)),Dt={currentLocation:se.location,nextLocation:ge}}Er({...Te,actionData:gt,loaderData:Xe,historyAction:De,location:ge,initialized:!0,navigation:f_,revalidation:"idle",restoreScrollPosition:Le(ge,Te.matches||se.matches),preventScrollReset:Mt,blockers:Ot},{viewTransitionOpts:Dt,flushSync:Oe===!0}),De="POP",ze=!1,ft=!1,rt=!1,Re=!1,rr==null||rr.resolve(),rr=null}async function Wn(ge,Te){if(typeof ge=="number"){n.history.go(ge);return}let Oe=gw(se.location,se.matches,Y,ge,Te==null?void 0:Te.fromRouteId,Te==null?void 0:Te.relative),{path:ht,submission:gt,error:Xe}=t1(!1,Oe,Te),Ot=se.location,Mt=jm(se.location,ht,Te&&Te.state);Mt={...Mt,...n.history.encodeLocation(Mt)};let Dt=Te&&Te.replace!=null?Te.replace:void 0,Et="PUSH";
49Dt===!0?Et="REPLACE":Dt===!1||gt!=null&&so(gt.formMethod)&>.formAction===se.location.pathname+se.location.search&&(Et="REPLACE");let He=Te&&"preventScrollReset"in Te?Te.preventScrollReset===!0:void 0,Wt=(Te&&Te.flushSync)===!0,Lt=he({currentLocation:Ot,nextLocation:Mt,historyAction:Et});if(Lt){ie(Lt,{state:"blocked",location:Mt,proceed(){ie(Lt,{state:"proceeding",proceed:void 0,reset:void 0,location:Mt}),Wn(ge,Te)},reset(){let sr=new Map(se.blockers);sr.set(Lt,_m),Er({blockers:sr})}});return}await Yr(Et,Mt,{submission:gt,pendingError:Xe,preventScrollReset:He,replace:Te&&Te.replace,enableViewTransition:Te&&Te.viewTransition,flushSync:Wt})}function pn(){rr||(rr=oA()),ni(),Er({revalidation:"loading"});let ge=rr.promise;return se.navigation.state==="submitting"?ge:se.navigation.state==="idle"?(Yr(se.historyAction,se.location,{startUninterruptedRevalidation:!0}),ge):(Yr(De||se.historyAction,se.navigation.location,{overrideNavigation:se.navigation,enableViewTransition:ft===!0}),ge)}async function Yr(ge,Te,Oe){je&&je.abort(),je=null,De=ge,rt=(Oe&&Oe.startUninterruptedRevalidation)===!0,$e(se.location,se.matches),ze=(Oe&&Oe.preventScrollReset)===!0,ft=(Oe&&Oe.enableViewTransition)===!0;let ht=s||g,gt=Oe&&Oe.overrideNavigation,Xe=Oe!=null&&Oe.initialHydration&&se.matches&&se.matches.length>0&&!le?se.matches:hh(ht,Te,Y),Ot=(Oe&&Oe.flushSync)===!0;if(Xe&&se.initialized&&!Re&&eA(se.location,Te)&&!(Oe&&Oe.submission&&so(Oe.submission.formMethod))){Gr(Te,{matches:Xe},{flushSync:Ot});return}let Mt=Be(Xe,ht,Te.pathname);if(Mt.active&&Mt.matches&&(Xe=Mt.matches),!Xe){let{error:Zr,notFoundMatches:nr,route:Tr}=we(Te.pathname);Gr(Te,{matches:nr,loaderData:{},errors:{[Tr.id]:Zr}},{flushSync:Ot});return}je=new AbortController;let Dt=qf(n.history,Te,je.signal,Oe&&Oe.submission),Et=new JS(n.unstable_getContext?await n.unstable_getContext():void 0),He;if(Oe&&Oe.pendingError)He=[Td(Xe).route.id,{type:"error",error:Oe.pendingError}];else if(Oe&&Oe.submission&&so(Oe.submission.formMethod)){let Zr=await xr(Dt,Te,Oe.submission,Xe,Et,Mt.active,Oe&&Oe.initialHydration===!0,{replace:Oe.replace,flushSync:Ot});if(Zr.shortCircuited)return;if(Zr.pendingActionResult){let[nr,Tr]=Zr.pendingActionResult;if(ao(Tr)&&Bm(Tr.error)&&Tr.error.status===404){je=null,Gr(Te,{matches:Zr.matches,loaderData:{},errors:{[nr]:Tr.error}});return}}Xe=Zr.matches||Xe,He=Zr.pendingActionResult,gt=p_(Te,Oe.submission),Ot=!1,Mt.active=!1,Dt=qf(n.history,Dt.url,Dt.signal)}let{shortCircuited:Wt,matches:Lt,loaderData:sr,errors:vr}=await ri(Dt,Te,Xe,Et,Mt.active,gt,Oe&&Oe.submission,Oe&&Oe.fetcherSubmission,Oe&&Oe.replace,Oe&&Oe.initialHydration===!0,Ot,He);Wt||(je=null,Gr(Te,{matches:Lt||Xe,...h1(He),loaderData:sr,errors:vr}))}async function xr(ge,Te,Oe,ht,gt,Xe,Ot,Mt={}){ni();let Dt=nA(Te,Oe);if(Er({navigation:Dt},{flushSync:Mt.flushSync===!0}),Xe){let Wt=await tt(ht,Te.pathname,ge.signal);if(Wt.type==="aborted")return{shortCircuited:!0};if(Wt.type==="error"){let Lt=Td(Wt.partialMatches).route.id;return{matches:Wt.partialMatches,pendingActionResult:[Lt,{type:"error",error:Wt.error}]}}else if(Wt.matches)ht=Wt.matches;else{let{notFoundMatches:Lt,error:sr,route:vr}=we(Te.pathname);return{matches:Lt,pendingActionResult:[vr.id,{type:"error",error:sr}]}}}let Et,He=Im(ht,Te);if(!He.route.action&&!He.route.lazy)Et={type:"error",error:Ro(405,{method:ge.method,pathname:Te.pathname,routeId:He.route.id})};else{let Wt=Jf(h,m,ge,ht,He,Ot?[]:a,gt),Lt=await Fr(ge,Wt,gt,null);if(Et=Lt[He.route.id],!Et){for(let sr of ht)if(Lt[sr.route.id]){Et=Lt[sr.route.id];break}}if(ge.signal.aborted)return{shortCircuited:!0}}if(Md(Et)){let Wt;return Mt&&Mt.replace!=null?Wt=Mt.replace:Wt=o1(Et.response.headers.get("Location"),new URL(ge.url),Y)===se.location.pathname+se.location.search,await Jr(ge,Et,!0,{submission:Oe,replace:Wt}),{shortCircuited:!0}}if(ao(Et)){let Wt=Td(ht,He.route.id);return(Mt&&Mt.replace)!==!0&&(De="PUSH"),{matches:ht,pendingActionResult:[Wt.route.id,Et,He.route.id]}}return{matches:ht,pendingActionResult:[He.route.id,Et]}}async function ri(ge,Te,Oe,ht,gt,Xe,Ot,Mt,Dt,Et,He,Wt){let Lt=Xe||p_(Te,Ot),sr=Ot||Mt||p1(Lt),vr=!rt&&!Et;if(gt){if(vr){let Vi=hr(Wt);Er({navigation:Lt,...Vi!==void 0?{actionData:Vi}:{}},{flushSync:He})}let Pr=await tt(Oe,Te.pathname,ge.signal);if(Pr.type==="aborted")return{shortCircuited:!0};if(Pr.type==="error"){let Vi=Td(Pr.partialMatches).route.id;return{matches:Pr.partialMatches,loaderData:{},errors:{[Vi]:Pr.error}}}else if(Pr.matches)Oe=Pr.matches;else{let{error:Vi,notFoundMatches:Yi,route:Si}=we(Te.pathname);return{matches:Yi,loaderData:{},errors:{[Si.id]:Vi}}}}let Zr=s||g,{dsMatches:nr,revalidatingFetchers:Tr}=r1(ge,ht,h,m,n.history,se,Oe,sr,Te,Et?[]:a,Et===!0,Re,Yt,Ft,Ue,xt,Zr,Y,Wt);if(Qe=++_t,!n.dataStrategy&&!nr.some(Pr=>Pr.shouldLoad)&&Tr.length===0){let Pr=sn();return Gr(Te,{matches:Oe,loaderData:{},errors:Wt&&ao(Wt[1])?{[Wt[0]]:Wt[1].error}:null,...h1(Wt),...Pr?{fetchers:new Map(se.fetchers)}:{}},{flushSync:He}),{shortCircuited:!0}}if(vr){let Pr={};if(!gt){Pr.navigation=Lt;let Vi=hr(Wt);Vi!==void 0&&(Pr.actionData=Vi)}Tr.length>0&&(Pr.fetchers=_i(Tr)),Er(Pr,{flushSync:He})}Tr.forEach(Pr=>{Ln(Pr.key),Pr.controller&&Tt.set(Pr.key,Pr.controller)});let ka=()=>Tr.forEach(Pr=>Ln(Pr.key));je&&je.signal.addEventListener("abort",ka);let{loaderResults:Ci,fetcherResults:Da}=await In(nr,Tr,ge,ht);if(ge.signal.aborted)return{shortCircuited:!0};je&&je.signal.removeEventListener("abort",ka),Tr.forEach(Pr=>Tt.delete(Pr.key));let Cn=iy(Ci);if(Cn)return await Jr(ge,Cn.result,!0,{replace:Dt}),{shortCircuited:!0};if(Cn=iy(Da),Cn)return xt.add(Cn.key),await Jr(ge,Cn.result,!0,{replace:Dt}),{shortCircuited:!0};let{loaderData:ba,errors:gr}=u1(se,Oe,Ci,Wt,Tr,Da);Et&&se.errors&&(gr={...se.errors,...gr});let wi=sn(),Rr=Un(Qe),rs=wi||Rr||Tr.length>0;return{matches:Oe,loaderData:ba,errors:gr,...rs?{fetchers:new Map(se.fetchers)}:{}}}function hr(ge){if(ge&&!ao(ge[1]))return{[ge[0]]:ge[1].data};if(se.actionData)return Object.keys(se.actionData).length===0?null:se.actionData}function _i(ge){return ge.forEach(Te=>{let Oe=se.fetchers.get(Te.key),ht=xm(void 0,Oe?Oe.data:void 0);se.fetchers.set(Te.key,ht)}),new Map(se.fetchers)}async function ui(ge,Te,Oe,ht){Ln(ge);let gt=(ht&&ht.flushSync)===!0,Xe=s||g,Ot=gw(se.location,se.matches,Y,Oe,Te,ht==null?void 0:ht.relative),Mt=hh(Xe,Ot,Y),Dt=Be(Mt,Xe,Ot);
49if(Dt.active&&Dt.matches&&(Mt=Dt.matches),!Mt){bn(ge,Te,Ro(404,{pathname:Ot}),{flushSync:gt});return}let{path:Et,submission:He,error:Wt}=t1(!0,Ot,ht);if(Wt){bn(ge,Te,Wt,{flushSync:gt});return}let Lt=Im(Mt,Et),sr=new JS(n.unstable_getContext?await n.unstable_getContext():void 0),vr=(ht&&ht.preventScrollReset)===!0;if(He&&so(He.formMethod)){await Qr(ge,Te,Et,Lt,Mt,sr,Dt.active,gt,vr,He);return}Ue.set(ge,{routeId:Te,path:Et}),await an(ge,Te,Et,Lt,Mt,sr,Dt.active,gt,vr,He)}async function Qr(ge,Te,Oe,ht,gt,Xe,Ot,Mt,Dt,Et){ni(),Ue.delete(ge);function He(wn){if(!wn.route.action&&!wn.route.lazy){let ii=Ro(405,{method:Et.formMethod,pathname:Oe,routeId:Te});return bn(ge,Te,ii,{flushSync:Mt}),!0}return!1}if(!Ot&&He(ht))return;let Wt=se.fetchers.get(ge);Rn(ge,iA(Et,Wt),{flushSync:Mt});let Lt=new AbortController,sr=qf(n.history,Oe,Lt.signal,Et);if(Ot){let wn=await tt(gt,Oe,sr.signal,ge);if(wn.type==="aborted")return;if(wn.type==="error"){bn(ge,Te,wn.error,{flushSync:Mt});return}else if(wn.matches){if(gt=wn.matches,ht=Im(gt,Oe),He(ht))return}else{bn(ge,Te,Ro(404,{pathname:Oe}),{flushSync:Mt});return}}Tt.set(ge,Lt);let vr=_t,Zr=Jf(h,m,sr,gt,ht,a,Xe),Tr=(await Fr(sr,Zr,Xe,ge))[ht.route.id];if(sr.signal.aborted){Tt.get(ge)===Lt&&Tt.delete(ge);return}if(Ft.has(ge)){if(Md(Tr)||ao(Tr)){Rn(ge,sh(void 0));return}}else{if(Md(Tr))if(Tt.delete(ge),Qe>vr){Rn(ge,sh(void 0));return}else return xt.add(ge),Rn(ge,xm(Et)),Jr(sr,Tr,!1,{fetcherSubmission:Et,preventScrollReset:Dt});if(ao(Tr)){bn(ge,Te,Tr.error);return}}let ka=se.navigation.location||se.location,Ci=qf(n.history,ka,Lt.signal),Da=s||g,Cn=se.navigation.state!=="idle"?hh(Da,se.navigation.location,Y):se.matches;Nr(Cn,"Didn't find any matches after fetcher action");let ba=++_t;bt.set(ge,ba);let gr=xm(Et,Tr.data);se.fetchers.set(ge,gr);let{dsMatches:wi,revalidatingFetchers:Rr}=r1(Ci,Xe,h,m,n.history,se,Cn,Et,ka,a,!1,Re,Yt,Ft,Ue,xt,Da,Y,[ht.route.id,Tr]);Rr.filter(wn=>wn.key!==ge).forEach(wn=>{let ii=wn.key,zs=se.fetchers.get(ii),hc=xm(void 0,zs?zs.data:void 0);se.fetchers.set(ii,hc),Ln(ii),wn.controller&&Tt.set(ii,wn.controller)}),Er({fetchers:new Map(se.fetchers)});let rs=()=>Rr.forEach(wn=>Ln(wn.key));Lt.signal.addEventListener("abort",rs);let{loaderResults:Pr,fetcherResults:Vi}=await In(wi,Rr,Ci,Xe);
vendor: 8,009 bytes, line 49
49if(Lt.signal.aborted)return;Lt.signal.removeEventListener("abort",rs),bt.delete(ge),Tt.delete(ge),Rr.forEach(wn=>Tt.delete(wn.key));let Yi=iy(Pr);if(Yi)return Jr(Ci,Yi.result,!1,{preventScrollReset:Dt});if(Yi=iy(Vi),Yi)return xt.add(Yi.key),Jr(Ci,Yi.result,!1,{preventScrollReset:Dt});let{loaderData:Si,errors:Bi}=u1(se,Cn,Pr,void 0,Rr,Vi);if(se.fetchers.has(ge)){let wn=sh(Tr.data);se.fetchers.set(ge,wn)}Un(ba),se.navigation.state==="loading"&&ba>Qe?(Nr(De,"Expected pending action"),je&&je.abort(),Gr(se.navigation.location,{matches:Cn,loaderData:Si,errors:Bi,fetchers:new Map(se.fetchers)})):(Er({errors:Bi,loaderData:c1(se.loaderData,Si,Cn,Bi),fetchers:new Map(se.fetchers)}),Re=!1)}async function an(ge,Te,Oe,ht,gt,Xe,Ot,Mt,Dt,Et){let He=se.fetchers.get(ge);Rn(ge,xm(Et,He?He.data:void 0),{flushSync:Mt});let Wt=new AbortController,Lt=qf(n.history,Oe,Wt.signal);if(Ot){let Tr=await tt(gt,Oe,Lt.signal,ge);if(Tr.type==="aborted")return;if(Tr.type==="error"){bn(ge,Te,Tr.error,{flushSync:Mt});return}else if(Tr.matches)gt=Tr.matches,ht=Im(gt,Oe);else{bn(ge,Te,Ro(404,{pathname:Oe}),{flushSync:Mt});return}}Tt.set(ge,Wt);let sr=_t,vr=Jf(h,m,Lt,gt,ht,a,Xe),nr=(await Fr(Lt,vr,Xe,ge))[ht.route.id];if(Tt.get(ge)===Wt&&Tt.delete(ge),!Lt.signal.aborted){if(Ft.has(ge)){Rn(ge,sh(void 0));return}if(Md(nr))if(Qe>sr){Rn(ge,sh(void 0));return}else{xt.add(ge),await Jr(Lt,nr,!1,{preventScrollReset:Dt});return}if(ao(nr)){bn(ge,Te,nr.error);return}Rn(ge,sh(nr.data))}}async function Jr(ge,Te,Oe,{submission:ht,fetcherSubmission:gt,preventScrollReset:Xe,replace:Ot}={}){Te.response.headers.has("X-Remix-Revalidate")&&(Re=!0);let Mt=Te.response.headers.get("Location");Nr(Mt,"Expected a Location header on the redirect Response"),Mt=o1(Mt,new URL(ge.url),Y);let Dt=jm(se.location,Mt,{_isRedirect:!0});if(i){let vr=!1;if(Te.response.headers.has("X-Remix-Reload-Document"))vr=!0;else if(Qw.test(Mt)){const Zr=n.history.createURL(Mt);vr=Zr.origin!==t.location.origin||No(Zr.pathname,Y)==null}if(vr){Ot?t.location.replace(Mt):t.location.assign(Mt);return}}je=null;let Et=Ot===!0||Te.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:He,formAction:Wt,formEncType:Lt}=se.navigation;!ht&&!gt&&He&&Wt&&Lt&&(ht=p1(se.navigation));let sr=ht||gt;if(XV.has(Te.response.status)&&sr&&so(sr.formMethod))await Yr(Et,Dt,{submission:{...sr,formAction:Mt},preventScrollReset:Xe||ze,enableViewTransition:Oe?ft:void 0});else{let vr=p_(Dt,ht);await Yr(Et,Dt,{overrideNavigation:vr,fetcherSubmission:gt,preventScrollReset:Xe||ze,enableViewTransition:Oe?ft:void 0})}}async function Fr(ge,Te,Oe,ht){let gt,Xe={};try{gt=await qV(E,ge,Te,ht,Oe,!1)}catch(Ot){return Te.filter(Mt=>Mt.shouldLoad).forEach(Mt=>{Xe[Mt.route.id]={type:"error",error:Ot}}),Xe}for(let[Ot,Mt]of Object.entries(gt))if(tA(Mt)){let Dt=Mt.result;Xe[Ot]={type:"redirect",response:QV(Dt,ge,Ot,Te,Y)}}else Xe[Ot]=await KV(Mt);return Xe}async function In(ge,Te,Oe,ht){let gt=Fr(Oe,ge,ht,null),Xe=Promise.all(Te.map(async Dt=>{if(Dt.matches&&Dt.match&&Dt.request&&Dt.controller){let He=(await Fr(Dt.request,Dt.matches,ht,Dt.key))[Dt.match.route.id];return{[Dt.key]:He}}else return Promise.resolve({[Dt.key]:{type:"error",error:Ro(404,{pathname:Dt.path})}})})),Ot=await gt,Mt=(await Xe).reduce((Dt,Et)=>Object.assign(Dt,Et),{});return{loaderResults:Ot,fetcherResults:Mt}}function ni(){Re=!0,Ue.forEach((ge,Te)=>{Tt.has(Te)&&Yt.add(Te),Ln(Te)})}function Rn(ge,Te,Oe={}){se.fetchers.set(ge,Te),Er({fetchers:new Map(se.fetchers)},{flushSync:(Oe&&Oe.flushSync)===!0})}function bn(ge,Te,Oe,ht={}){let gt=Td(se.matches,Te);xi(ge),Er({errors:{[gt.route.id]:Oe},fetchers:new Map(se.fetchers)},{flushSync:(ht&&ht.flushSync)===!0})}function mn(ge){return pt.set(ge,(pt.get(ge)||0)+1),Ft.has(ge)&&Ft.delete(ge),se.fetchers.get(ge)||NV}function xi(ge){let Te=se.fetchers.get(ge);Tt.has(ge)&&!(Te&&Te.state==="loading"&&bt.has(ge))&&Ln(ge),Ue.delete(ge),bt.delete(ge),xt.delete(ge),Ft.delete(ge),Yt.delete(ge),se.fetchers.delete(ge)}function bi(ge){let Te=(pt.get(ge)||0)-1;Te<=0?(pt.delete(ge),Ft.add(ge)):pt.set(ge,Te),Er({fetchers:new Map(se.fetchers)})}function Ln(ge){let Te=Tt.get(ge);Te&&(Te.abort(),Tt.delete(ge))}function ci(ge){for(let Te of ge){let Oe=mn(Te),ht=sh(Oe.data);se.fetchers.set(Te,ht)}}function sn(){let ge=[],Te=!1;for(let Oe of xt){let ht=se.fetchers.get(Oe);Nr(ht,`Expected fetcher: ${Oe}`),ht.state==="loading"&&(xt.delete(Oe),ge.push(Oe),Te=!0)}return ci(ge),Te}function Un(ge){let Te=[];for(let[Oe,ht]of bt)if(ht<ge){let gt=se.fetchers.get(Oe);Nr(gt,`Expected fetcher: ${Oe}`),gt.state==="loading"&&(Ln(Oe),bt.delete(Oe),Te.push(Oe))}return ci(Te),Te.length>0}function Fe(ge,Te){let Oe=se.blockers.get(ge)||_m;return Ht.get(ge)!==Te&&Ht.set(ge,Te),Oe}function ne(ge){se.blockers.delete(ge),Ht.delete(ge)}function ie(ge,Te){let Oe=se.blockers.get(ge)||_m;Nr(Oe.state==="unblocked"&&Te.state==="blocked"||Oe.state==="blocked"&&Te.state==="blocked"||Oe.state==="blocked"&&Te.state==="proceeding"||Oe.state==="blocked"&&Te.state==="unblocked"||Oe.state==="proceeding"&&Te.state==="unblocked",`Invalid blocker state transition: ${Oe.state} -> ${Te.state}`);let ht=new Map(se.blockers);ht.set(ge,Te),Er({blockers:ht})}function he({currentLocation:ge,nextLocation:Te,historyAction:Oe}){if(Ht.size===0)return;Ht.size>1&&Ui(!1,"A router only supports one blocker at a time");let ht=Array.from(Ht.entries()),[gt,Xe]=ht[ht.length-1],Ot=se.blockers.get(gt);if(!(Ot&&Ot.state==="proceeding")&&Xe({currentLocation:ge,nextLocation:Te,historyAction:Oe}))return gt}function we(ge){let Te=Ro(404,{pathname:ge}),Oe=s||g,{matches:ht,route:gt}=d1(Oe);return{notFoundMatches:ht,route:gt,error:Te}}function Ve(ge,Te,Oe){if(V=ge,$=Te,F=Oe||null,!Q&&se.navigation===f_){Q=!0;let ht=Le(se.location,se.matches);ht!=null&&Er({restoreScrollPosition:ht})}return()=>{V=null,$=null,F=null}}function ue(ge,Te){return F&&F(ge,Te.map(ht=>vV(ht,se.loaderData)))||ge.key}function $e(ge,Te){if(V&&$){let Oe=ue(ge,Te);V[Oe]=$()}}function Le(ge,Te){if(V){let Oe=ue(ge,Te),ht=V[Oe];if(typeof ht=="number")return ht}return null}function Be(ge,Te,Oe){if(n.patchRoutesOnNavigation)if(ge){if(Object.keys(ge[0].params).length>0)return{active:!0,matches:by(Te,Oe,Y,!0)}}else return{active:!0,matches:by(Te,Oe,Y,!0)||[]};return{active:!1,matches:null}}async function tt(ge,Te,Oe,ht){if(!n.patchRoutesOnNavigation)return{type:"success",matches:ge};let gt=ge;for(;;){let Xe=s==null,Ot=s||g,Mt=m;try{await n.patchRoutesOnNavigation({signal:Oe,path:Te,matches:gt,fetcherKey:ht,patch:(He,Wt)=>{Oe.aborted||n1(He,Wt,Ot,Mt,h)}})}catch(He){return{type:"error",error:He,partialMatches:gt}}finally{Xe&&!Oe.aborted&&(g=[...g])}if(Oe.aborted)return{type:"aborted"};let Dt=hh(Ot,Te,Y);if(Dt)return{type:"success",matches:Dt};let Et=by(Ot,Te,Y,!0);if(!Et||gt.length===Et.length&>.every((He,Wt)=>He.route.id===Et[Wt].route.id))return{type:"success",matches:null};gt=Et}}function Ze(ge){m={},s=Xy(ge,h,void 0,m)}function vt(ge,Te){let Oe=s==null;n1(ge,Te,s||g,m,h),Oe&&(g=[...g],Er({}))}return We={get basename(){return Y},get future(){return I},get state(){return se},get routes(){return g},get window(){return t},initialize:or,subscribe:Sr,enableScrollRestoration:Ve,navigate:Wn,fetch:ui,revalidate:pn,createHref:ge=>n.history.createHref(ge),encodeLocation:ge=>n.history.encodeLocation(ge),getFetcher:mn,deleteFetcher:bi,dispose:fr,getBlocker:Fe,deleteBlocker:ne,patchRoutes:vt,_internalFetchControllers:Tt,_internalSetRoutes:Ze},We}function ZV(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function gw(n,t,i,a,h,m){let g,s;if(h){g=[];for(let E of t)if(g.push(E),E.route.id===h){s=E;break}}else g=t,s=t[t.length-1];let Y=av(a||".",iv(g),No(n.pathname,i)||n.pathname,m==="path");if(a==null&&(Y.search=n.search,Y.hash=n.hash),(a==null||a===""||a===".")&&s){let E=Jw(Y.search);if(s.route.index&&!E)Y.search=Y.search?Y.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&E){let I=new URLSearchParams(Y.search),k=I.getAll("index");I.delete("index"),k.filter(V=>
49V).forEach(V=>I.append("index",V));let D=I.toString();Y.search=D?`?${D}`:""}}return i!=="/"&&(Y.pathname=Y.pathname==="/"?i:yu([i,Y.pathname])),mh(Y)}function t1(n,t,i){if(!i||!ZV(i))return{path:t};if(i.formMethod&&!rA(i.formMethod))return{path:t,error:Ro(405,{method:i.formMethod})};let a=()=>({path:t,error:Ro(400,{type:"invalid-body"})}),m=(i.formMethod||"get").toUpperCase(),g=cP(t);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!so(m))return a();let k=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((D,[V,F])=>`${D}${V}=${F} 50`,""):String(i.body);return{path:t,submission:{formMethod:m,formAction:g,formEncType:i.formEncType,formData:void 0,json:void 0,text:k}}}else if(i.formEncType==="application/json"){if(!so(m))return a();try{let k=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:t,submission:{formMethod:m,formAction:g,formEncType:i.formEncType,formData:void 0,json:k,text:void 0}}}catch{return a()}}}Nr(typeof FormData=="function","FormData is not available in this environment");let s,Y;if(i.formData)s=_w(i.formData),Y=i.formData;else if(i.body instanceof FormData)s=_w(i.body),Y=i.body;else if(i.body instanceof URLSearchParams)s=i.body,Y=l1(s);else if(i.body==null)s=new URLSearchParams,Y=new FormData;else try{s=new URLSearchParams(i.body),Y=l1(s)}catch{return a()}let E={formMethod:m,formAction:g,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:Y,json:void 0,text:void 0};if(so(E.formMethod))return{path:t,submission:E};let I=_h(t);return n&&I.search&&Jw(I.search)&&s.append("index",""),I.search=`?${s}`,{path:mh(I),submission:E}}function r1(n,t,i,a,h,m,g,s,Y,E,I,k,D,V,F,$,Q,ae,le){var st;let _e=le?ao(le[1])?le[1].error:le[1].data:void 0,fe=h.createURL(m.location),We=h.createURL(Y),se;if(I&&m.errors){let rt=Object.keys(m.errors)[0];se=g.findIndex(Re=>Re.route.id===rt)}else if(le&&ao(le[1])){let rt=le[0];se=g.findIndex(Re=>Re.route.id===rt)-1}let De=le?le[1].statusCode:void 0,ze=De&&De>=400,je={currentUrl:fe,currentParams:((st=m.matches[0])==null?void 0:st.params)||{},nextUrl:We,nextParams:g[0].params,...s,actionResult:_e,actionStatus:De},ft=g.map((rt,Re)=>{let{route:Yt}=rt,Tt=null;if(se!=null&&Re>se?Tt=!1:Yt.lazy?Tt=!0:Yt.loader==null?Tt=!1:I?Tt=yw(Yt,m.loaderData,m.errors):jV(m.loaderData,m.matches[Re],rt)&&(Tt=!0),Tt!==null)return vw(i,a,n,rt,E,t,Tt);let _t=ze?!1:k||fe.pathname+fe.search===We.pathname+We.search||fe.search!==We.search||BV(m.matches[Re],rt),Qe={...je,defaultShouldRevalidate:_t},bt=Fy(rt,Qe);return vw(i,a,n,rt,E,t,bt,Qe)}),ot=[];return F.forEach((rt,Re)=>{if(I||!g.some(Ue=>Ue.route.id===rt.routeId)||V.has(Re))return;let Yt=hh(Q,rt.path,ae);if(!Yt){ot.push({key:Re,routeId:rt.routeId,path:rt.path,matches:null,match:null,request:null,controller:null});return}if($.has(Re))return;let Tt=m.fetchers.get(Re),_t=Im(Yt,rt.path),Qe=new AbortController,bt=qf(h,rt.path,Qe.signal),xt=null;if(D.has(Re))D.delete(Re),xt=Jf(i,a,bt,Yt,_t,E,t);else if(Tt&&Tt.state!=="idle"&&Tt.data===void 0)k&&(xt=Jf(i,a,bt,Yt,_t,E,t));else{let Ue={...je,defaultShouldRevalidate:ze?!1:k};Fy(_t,Ue)&&(xt=Jf(i,a,bt,Yt,_t,E,t,Ue))}xt&&ot.push({key:Re,routeId:rt.routeId,path:rt.path,matches:xt,match:_t,request:bt,controller:Qe})}),{dsMatches:ft,revalidatingFetchers:ot}}function yw(n,t,i){if(n.lazy)return!0;if(!n.loader)return!1;let a=t!=null&&t[n.id]!==void 0,h=i!=null&&i[n.id]!==void 0;return!a&&h?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!a&&!h}function jV(n,t,i){let a=!t||i.route.id!==t.route.id,h=!n.hasOwnProperty(i.route.id);return a||h}function BV(n,t){let i=n.route.path;return n.pathname!==t.pathname||i!=null&&i.endsWith("*")&&n.params["*"]!==t.params["*"]}function Fy(n,t){if(n.route.shouldRevalidate){let i=n.route.shouldRevalidate(t);if(typeof i=="boolean")return i}return t.defaultShouldRevalidate}function n1(n,t,i,a,h){let m;if(n){let Y=a[n];Nr(Y,`No route found to patch children into: routeId = ${n}`),Y.children||(Y.children=[]),m=Y.children}else m=i;let g=t.filter(Y=>!m.some(E=>aP(Y,E))),s=Xy(g,h,[n||"_","patch",String((m==null?void 0:m.length)||"0")],a);m.push(...s)}function aP(n,t){return"id"in n&&"id"in t&&n.id===t.id?!0:n.index===t.index&&n.path===t.path&&n.caseSensitive===t.caseSensitive?(!n.children||n.children.length===0)&&(!t.children||t.children.length===0)?!0:n.children.every((i,a)=>{var h;
50return(h=t.children)==null?void 0:h.some(m=>aP(i,m))}):!1}var i1=new WeakMap,sP=({key:n,route:t,manifest:i,mapRouteProperties:a})=>{let h=i[t.id];if(Nr(h,"No route found in manifest"),!h.lazy||typeof h.lazy!="object")return;let m=h.lazy[n];if(!m)return;let g=i1.get(h);g||(g={},i1.set(h,g));let s=g[n];if(s)return s;let Y=(async()=>{let E=pV(n),k=h[n]!==void 0&&n!=="hasErrorBoundary";if(E)Ui(!E,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),g[n]=Promise.resolve();else if(k)Ui(!1,`Route "${h.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let D=await m();D!=null&&(Object.assign(h,{[n]:D}),Object.assign(h,a(h)))}typeof h.lazy=="object"&&(h.lazy[n]=void 0,Object.values(h.lazy).every(D=>D===void 0)&&(h.lazy=void 0))})();return g[n]=Y,Y},a1=new WeakMap;function $V(n,t,i,a,h){let m=i[n.id];if(Nr(m,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let I=a1.get(m);if(I)return{lazyRoutePromise:I,lazyHandlerPromise:I};let k=(async()=>{Nr(typeof n.lazy=="function","No lazy route function found");let D=await n.lazy(),V={};for(let F in D){let $=D[F];if($===void 0)continue;let Q=gV(F),le=m[F]!==void 0&&F!=="hasErrorBoundary";Q?Ui(!Q,"Route property "+F+" is not a supported property to be returned from a lazy route function. This property will be ignored."):le?Ui(!le,`Route "${m.id}" has a static property "${F}" defined but its lazy function is also returning a value for this property. The lazy route property "${F}" will be ignored.`):V[F]=$}Object.assign(m,V),Object.assign(m,{...a(m),lazy:void 0})})();return a1.set(m,k),k.catch(()=>{}),{lazyRoutePromise:k,lazyHandlerPromise:k}}let g=Object.keys(n.lazy),s=[],Y;for(let I of g){if(h&&h.includes(I))continue;let k=sP({key:I,route:n,manifest:i,mapRouteProperties:a});k&&(s.push(k),I===t&&(Y=k))}let E=s.length>0?Promise.all(s).then(()=>{}):void 0;return E==null||E.catch(()=>{}),Y==null||Y.catch(()=>{}),{lazyRoutePromise:E,lazyHandlerPromise:Y}}async function s1(n){let t=n.matches.filter(h=>h.shouldLoad),i={};return(await Promise.all(t.map(h=>h.resolve()))).forEach((h,m)=>{i[t[m].route.id]=h}),i}async function GV(n){return n.matches.some(t=>t.route.unstable_middleware)?oP(n,!1,()=>s1(n),(t,i)=>({[i]:{type:"error",result:t}})):s1(n)}async function oP(n,t,i,a){let{matches:h,request:m,params:g,context:s}=n,Y={handlerResult:void 0};try{let E=h.flatMap(k=>k.route.unstable_middleware?k.route.unstable_middleware.map(D=>[k.route.id,D]):[]),I=await lP({request:m,params:g,context:s},E,t,Y,i);return t?I:Y.handlerResult}catch(E){if(!Y.middlewareError)throw E;let I=await a(Y.middlewareError.error,Y.middlewareError.routeId);return Y.handlerResult?Object.assign(Y.handlerResult,I):I}}async function lP(n,t,i,a,h,m=0){let{request:g}=n;if(g.signal.aborted)throw g.signal.reason?g.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${g.method} ${g.url}`);let s=t[m];if(!s)return a.handlerResult=await h(),a.handlerResult;let[Y,E]=s,I=!1,k,D=async()=>{if(I)throw new Error("You may only call `next()` once per middleware");I=!0,await lP(n,t,i,a,h,m+1)};try{let V=await E({request:n.request,params:n.params,context:n.context},D);return I?V===void 0?k:V:D()}catch(V){throw a.middlewareError?a.middlewareError.error!==V&&(a.middlewareError={routeId:Y,error:V}):a.middlewareError={routeId:Y,error:V},V}}function uP(n,t,i,a,h){let m=sP({key:"unstable_middleware",route:a.route,manifest:t,mapRouteProperties:n}),g=$V(a.route,so(i.method)?"action":"loader",t,n,h);return{middleware:m,route:g.lazyRoutePromise,handler:g.lazyHandlerPromise}}function vw(n,t,i,a,h,m,g,s=null){let Y=!1,E=uP(n,t,i,a,h);return{...a,_lazyPromises:E,shouldLoad:g,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler(I){return Y=!0,s?typeof I=="boolean"?Fy(a,{...s,defaultShouldRevalidate:I}):Fy(a,s):g},resolve(I){return Y||g||I&&i.method==="GET"&&(a.route.lazy||a.route.loader)?HV({request:i,match:a,lazyHandlerPromise:E==null?void 0:E.handler,lazyRoutePromise:E==null?void 0:E.route,handlerOverride:I,scopedContext:m}):Promise.resolve({type:"data",result:void 0})}}}function Jf(n,t,i,a,h,m,g,s=null){return a.map(Y=>Y.route.id!==h.route.id?{...Y,shouldLoad:!1,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:()=>!1,_lazyPromises:uP(n,t,i,Y,m),resolve:()=>Promise.resolve({type:"data",result:void 0})}:vw(n,t,i,Y,m,g,!0,s))}async function qV(n,t,i,a,h,m){i.some(E=>{var I;return(I=E._lazyPromises)==null?void 0:I.middleware})&&await Promise.all(i.map(E=>{var I;return(I=E._lazyPromises)==null?void 0:I.middleware}));let g={request:t,params:i[0].params,context:h,matches:i},Y=await n({...g,fetcherKey:a,unstable_runClientMiddleware:E=>{let I=g;return oP(I,!1,()=>E({...I,fetcherKey:a,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(k,D)=>({[D]:{type:"error",result:k}}))}});try{await Promise.all(i.flatMap(E=>{var I,k;return[(I=E._lazyPromises)==null?void 0:I.handler,(k=E._lazyPromises)==null?void 0:k.route]}))}catch{}return Y}async function HV({request:n,match:t,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:h,scopedContext:m}){let g,s,Y=so(n.method),E=Y?"action":"loader",I=k=>{let D,V=new Promise((Q,ae)=>D=ae);s=()=>D(),n.signal.addEventListener("abort",s);let F=Q=>typeof k!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${E}" [routeId: ${t.route.id}]`)):k({request:n,params:t.params,context:m},...Q!==void 0?[Q]:[]),$=(async()=>{try{return{type:"data",result:await(h?h(ae=>F(ae)):F())}}catch(Q){return{type:"error",result:Q}}})();return Promise.race([$,V])};try{let k=Y?t.route.action:t.route.loader;if(i||a)if(k){let D,[V]=await Promise.all([I(k).catch(F=>{D=F}),i,a]);if(D!==void 0)throw D;g=V}else{await i;let D=Y?t.route.action:t.route.loader;if(D)[g]=await Promise.all([I(D),a]);else if(E==="action"){let V=new URL(n.url),F=V.pathname+V.search;throw Ro(405,{method:n.method,pathname:F,routeId:t.route.id})}else return{type:"data",result:void 0}}else if(k)g=await I(k);else{let D=new URL(n.url),V=D.pathname+D.search;throw Ro(404,{pathname:V})}}catch(k){return{type:"error",result:k}}finally{s&&n.signal.removeEventListener("abort",s)}return g}async function KV(n){var a,h,m,g,s,Y;let{result:t,type:i}=n;if(hP(t)){let E;try{let I=t.headers.get("Content-Type");I&&/\bapplication\/json\b/.test(I)?t.body==null?E=null:E=await t.json():E=await t.text()}catch(I){return{type:"error",error:I}}return i==="error"?{type:"error",error:new zy(t.status,t.statusText,E),statusCode:t.status,headers:t.headers}:{type:"data",data:E,statusCode:t.status,headers:t.headers}}return i==="error"?f1(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(h=t.init)!=null&&h.headers?new Headers(t.init.headers):void 0}
50:{type:"error",error:new zy(((m=t.init)==null?void 0:m.status)||500,void 0,t.data),statusCode:Bm(t)?t.status:void 0,headers:(g=t.init)!=null&&g.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Bm(t)?t.status:void 0}:f1(t)?{type:"data",data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(Y=t.init)!=null&&Y.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function QV(n,t,i,a,h){let m=n.headers.get("Location");if(Nr(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!Qw.test(m)){let g=a.slice(0,a.findIndex(s=>s.route.id===i)+1);m=gw(new URL(t.url),g,h,m),n.headers.set("Location",m)}return n}function o1(n,t,i){if(Qw.test(n)){let a=n,h=a.startsWith("//")?new URL(t.protocol+a):new URL(a),m=No(h.pathname,i)!=null;if(h.origin===t.origin&&m)return h.pathname+h.search+h.hash}return n}function qf(n,t,i,a){let h=n.createURL(cP(t)).toString(),m={signal:i};if(a&&so(a.formMethod)){let{formMethod:g,formEncType:s}=a;m.method=g.toUpperCase(),s==="application/json"?(m.headers=new Headers({"Content-Type":s}),m.body=JSON.stringify(a.json)):s==="text/plain"?m.body=a.text:s==="application/x-www-form-urlencoded"&&a.formData?m.body=_w(a.formData):m.body=a.formData}return new Request(h,m)}function _w(n){let t=new URLSearchParams;for(let[i,a]of n.entries())t.append(i,typeof a=="string"?a:a.name);return t}function l1(n){let t=new FormData;for(let[i,a]of n.entries())t.append(i,a);return t}function JV(n,t,i,a=!1,h=!1){let m={},g=null,s,Y=!1,E={},I=i&&ao(i[1])?i[1].error:void 0;return n.forEach(k=>{if(!(k.route.id in t))return;let D=k.route.id,V=t[D];if(Nr(!Md(V),"Cannot handle redirect results in processLoaderData"),ao(V)){let F=V.error;if(I!==void 0&&(F=I,I=void 0),g=g||{},h)g[D]=F;else{let $=Td(n,D);g[$.route.id]==null&&(g[$.route.id]=F)}a||(m[D]=iP),Y||(Y=!0,s=Bm(V.error)?V.error.status:500),V.headers&&(E[D]=V.headers)}else m[D]=V.data,V.statusCode&&V.statusCode!==200&&!Y&&(s=V.statusCode),V.headers&&(E[D]=V.headers)}),I!==void 0&&i&&(g={[i[0]]:I},i[2]&&(m[i[2]]=void 0)),{loaderData:m,errors:g,statusCode:s||200,loaderHeaders:E}}function u1(n,t,i,a,h,m){let{loaderData:g,errors:s}=JV(t,i,a);return h.filter(Y=>!Y.matches||Y.matches.some(E=>E.shouldLoad)).forEach(Y=>{let{key:E,match:I,controller:k}=Y,D=m[E];if(Nr(D,"Did not find corresponding fetcher result"),!(k&&k.signal.aborted))if(ao(D)){let V=Td(n.matches,I==null?void 0:I.route.id);s&&s[V.route.id]||(s={...s,[V.route.id]:D.error}),n.fetchers.delete(E)}else if(Md(D))Nr(!1,"Unhandled fetcher revalidation redirect");else{let V=sh(D.data);n.fetchers.set(E,V)}}),{loaderData:g,errors:s}}function c1(n,t,i,a){let h=Object.entries(t).filter(([,m])=>m!==iP).reduce((m,[g,s])=>(m[g]=s,m),{});for(let m of i){let g=m.route.id;if(!t.hasOwnProperty(g)&&n.hasOwnProperty(g)&&m.route.loader&&(h[g]=n[g]),a&&a.hasOwnProperty(g))break}return h}function h1(n){return n?ao(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Td(n,t){return(t?n.slice(0,n.findIndex(a=>a.route.id===t)+1):[...n]).reverse().find(a=>a.route.hasErrorBoundary===!0)||n[0]}function d1(n){let t=n.length===1?n[0]:n.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ro(n,{pathname:t,routeId:i,method:a,type:h,message:m}={}){let g="Unknown Server Error",s="Unknown @remix-run/router error";return n===400?(g="Bad Request",a&&t&&i?s=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:h==="invalid-body"&&(s="Unable to encode submission body")):n===403?(g="Forbidden",s=`Route "${i}" does not match URL "${t}"`):n===404?(g="Not Found",s=`No route matches URL "${t}"`):n===405&&(g="Method Not Allowed",a&&t&&i?s=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:a&&(s=`Invalid request method "${a.toUpperCase()}"`)),new zy(n||500,g,new Error(s),!0)}function iy(n){let t=Object.entries(n);for(let i=t.length-1;i>=0;i--){let[a,h]=t[i];if(Md(h))return{key:a,result:h}}}function cP(n){let t=typeof n=="string"?_h(n):n;return mh({...t,hash:""})}function eA(n,t){return n.pathname!==t.pathname||n.search!==t.search?!1:n.hash===""?t.hash!=="":n.hash===t.hash?!0:t.hash!==""}function tA(n){return hP(n.result)&&OV.has(n.result.status)}function ao(n){return n.type==="error"}function Md(n){return(n&&n.type)==="redirect"}function f1(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function hP(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function rA(n){return LV.has(n.toUpperCase())}function so(n){return DV.has(n.toUpperCase())}function Jw(n){return new URLSearchParams(n).getAll("index").some(t=>t==="")}function Im(n,t){let i=typeof t=="string"?_h(t).search:t.search;if(n[n.length-1].route.index&&Jw(i||""))return n[n.length-1];let a=tP(n);return a[a.length-1]}function p1(n){let{formMethod:t,formAction:i,formEncType:a,text:h,formData:m,json:g}=n;if(!(!t||!i||!a)){if(h!=null)return{formMethod:t,formAction:i,formEncType:a,formData:void 0,json:void 0,text:h};if(m!=null)return{formMethod:t,formAction:i,formEncType:a,formData:m,json:void 0,text:void 0};if(g!==void 0)return{formMethod:t,formAction:i,formEncType:a,formData:void 0,json:g,text:void 0}}}function p_(n,t){return t?{state:"loading",location:n,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nA(n,t){return{state:"submitting",location:n,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function xm(n,t){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function iA(n,t){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:t?t.data:void 0}}function sh(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function aA(n,t){try{let i=n.sessionStorage.getItem(nP);if(i){let a=JSON.parse(i);for(let[h,m]of Object.entries(a||{}))m&&Array.isArray(m)&&t.set(h,new Set(m||[]))}}catch{}}function sA(n,t){if(t.size>0){let i={};for(let[a,h]of t)i[a]=[...h];try{n.sessionStorage.setItem(nP,JSON.stringify(i))}catch(a){Ui(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function oA(){let n,t,i=new Promise((a,h)=>{n=async m=>{a(m);try{await i}catch{}},t=async m=>{h(m);try{await i}catch{}}});return{promise:i,resolve:n,reject:t}}var Xd=de.createContext(null);Xd.displayName="DataRouter";var ug=de.createContext(null);
50ug.displayName="DataRouterState";var eY=de.createContext({isTransitioning:!1});eY.displayName="ViewTransition";var dP=de.createContext(new Map);dP.displayName="Fetchers";var lA=de.createContext(null);lA.displayName="Await";var Il=de.createContext(null);Il.displayName="Navigation";var sv=de.createContext(null);sv.displayName="Location";var Zo=de.createContext({outlet:null,matches:[],isDataRoute:!1});Zo.displayName="Route";var tY=de.createContext(null);tY.displayName="RouteError";function uA(n,{relative:t}={}){Nr(fp(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=de.useContext(Il),{hash:h,pathname:m,search:g}=hg(n,{relative:t}),s=m;return i!=="/"&&(s=m==="/"?i:yu([i,m])),a.createHref({pathname:s,search:g,hash:h})}function fp(){return de.useContext(sv)!=null}function xh(){return Nr(fp(),"useLocation() may be used only in the context of a <Router> component."),de.useContext(sv).location}var fP="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function pP(n){de.useContext(Il).static||de.useLayoutEffect(n)}function cg(){let{isDataRoute:n}=de.useContext(Zo);return n?SA():cA()}function cA(){Nr(fp(),"useNavigate() may be used only in the context of a <Router> component.");let n=de.useContext(Xd),{basename:t,navigator:i}=de.useContext(Il),{matches:a}=de.useContext(Zo),{pathname:h}=xh(),m=JSON.stringify(iv(a)),g=de.useRef(!1);return pP(()=>{g.current=!0}),de.useCallback((Y,E={})=>{if(Ui(g.current,fP),!g.current)return;if(typeof Y=="number"){i.go(Y);return}let I=av(Y,JSON.parse(m),h,E.relative==="path");n==null&&t!=="/"&&(I.pathname=I.pathname==="/"?t:yu([t,I.pathname])),(E.replace?i.replace:i.push)(I,E.state,E)},[t,i,m,h,n])}var hA=de.createContext(null);function dA(n){let t=de.useContext(Zo).outlet;return t&&de.createElement(hA.Provider,{value:n},t)}function ov(){let{matches:n}=de.useContext(Zo),t=n[n.length-1];return t?t.params:{}}function hg(n,{relative:t}={}){let{matches:i}=de.useContext(Zo),{pathname:a}=xh(),h=JSON.stringify(iv(i));return de.useMemo(()=>av(n,JSON.parse(h),a,t==="path"),[n,h,a,t])}function fA(n,t,i,a){Nr(fp(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h,static:m}=de.useContext(Il),{matches:g}=de.useContext(Zo),s=g[g.length-1],Y=s?s.params:{},E=s?s.pathname:"/",I=s?s.pathnameBase:"/",k=s&&s.route;{let le=k&&k.path||"";mP(E,!k||le.endsWith("*")||le.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${E}" (under <Route path="${le}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 51 52Please change the parent <Route path="${le}"> to <Route path="${le==="/"?"*":`${le}/*`}">.`)}let D=xh(),V;V=D;let F=V.pathname||"/",$=F;if(I!=="/"){let le=I.replace(/^\//,"").split("/");$="/"+F.replace(/^\//,"").split("/").slice(le.length).join("/")}let Q=!m&&i&&i.matches&&i.matches.length>0?i.matches:hh(n,{pathname:$});return Ui(k||Q!=null,`No routes matched location "${V.pathname}${V.search}${V.hash}" `),Ui(Q==null||Q[Q.length-1].route.element!==void 0||Q[Q.length-1].route.Component!==void 0||Q[Q.length-1].route.lazy!==void 0,`Matched leaf route at location "${V.pathname}${V.search}${V.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),vA(Q&&Q.map(le=>Object.assign({},le,{params:Object.assign({},Y,le.params),pathname:yu([I,h.encodeLocation?h.encodeLocation(le.pathname).pathname:le.pathname]),pathnameBase:le.pathnameBase==="/"?I:yu([I,h.encodeLocation?h.encodeLocation(le.pathnameBase).pathname:le.pathnameBase])})),g,i,a)}function pA(){let n=YA(),t=Bm(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,a="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:a},m={padding:"2px 4px",backgroundColor:a},g=null;return console.error("Error handled by React Router default ErrorBoundary:",n),g=de.createElement(de.Fragment,null,de.createElement("p",null,"ð¿ Hey developer ð"),de.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",de.createElement("code",{style:m},"ErrorBoundary")," or"," ",de.createElement("code",{style:m},"errorElement")," prop on your route.")),de.createElement(de.Fragment,null,de.createElement("h2",null,"Unexpected Application
52Error!"),de.createElement("h3",{style:{fontStyle:"italic"}},t),i?de.createElement("pre",{style:h},i):null,g)}var mA=de.createElement(pA,null),gA=class extends de.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,t){return t.location!==n.location||t.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:t.error,location:t.location,revalidation:n.revalidation||t.revalidation}}componentDidCatch(n,t){console.error("React Router caught the following error during render",n,t)}render(){return this.state.error!==void 0?de.createElement(Zo.Provider,{value:this.props.routeContext},de.createElement(tY.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function yA({routeContext:n,match:t,children:i}){let a=de.useContext(Xd);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),de.createElement(Zo.Provider,{value:n},i)}function vA(n,t=[],i=null,a=null){if(n==null){if(!i)return null;if(i.errors)n=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let h=n,m=i==null?void 0:i.errors;if(m!=null){let Y=h.findIndex(E=>E.route.id&&(m==null?void 0:m[E.route.id])!==void 0);Nr(Y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),h=h.slice(0,Math.min(h.length,Y+1))}let g=!1,s=-1;if(i)for(let Y=0;Y<h.length;Y++){let E=h[Y];if((E.route.HydrateFallback||E.route.hydrateFallbackElement)&&(s=Y),E.route.id){let{loaderData:I,errors:k}=i,D=E.route.loader&&!I.hasOwnProperty(E.route.id)&&(!k||k[E.route.id]===void 0);if(E.route.lazy||D){g=!0,s>=0?h=h.slice(0,s+1):h=[h[0]];break}}}return h.reduceRight((Y,E,I)=>{let k,D=!1,V=null,F=null;i&&(k=m&&E.route.id?m[E.route.id]:void 0,V=E.route.errorElement||mA,g&&(s<0&&I===0?(mP("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),D=!0,F=null):s===I&&(D=!0,F=E.route.hydrateFallbackElement||null)));let $=t.concat(h.slice(0,I+1)),Q=()=>{let ae;return k?ae=V:D?ae=F:E.route.Component?ae=de.createElement(E.route.Component,null):E.route.element?ae=E.route.element:ae=Y,de.createElement(yA,{match:E,routeContext:{outlet:Y,matches:$,isDataRoute:i!=null},children:ae})};return i&&(E.route.ErrorBoundary||E.route.errorElement||I===0)?de.createElement(gA,{location:i.location,revalidation:i.revalidation,component:V,error:k,children:Q(),routeContext:{outlet:null,matches:$,isDataRoute:!0}}):Q()},null)}function rY(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _A(n){let t=de.useContext(Xd);return Nr(t,rY(n)),t}function xA(n){let t=de.useContext(ug);return Nr(t,rY(n)),t}function bA(n){let t=de.useContext(Zo);return Nr(t,rY(n)),t}function nY(n){let t=bA(n),i=t.matches[t.matches.length-1];return Nr(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function wA(){return nY("useRouteId")}function YA(){var a;let n=de.useContext(tY),t=xA("useRouteError"),i=nY("useRouteError");return n!==void 0?n:(a=t.errors)==null?void 0:a[i]}function SA(){let{router:n}=_A("useNavigate"),t=nY("useNavigate"),i=de.useRef(!1);return pP(()=>{i.current=!0}),de.useCallback(async(h,m={})=>{Ui(i.current,fP),i.current&&(typeof h=="number"?n.navigate(h):await n.navigate(h,{fromRouteId:t,...m}))},[n,t])}var m1={};function mP(n,t,i){!t&&!m1[n]&&(m1[n]=!0,Ui(!1,i))}var g1={};function y1(n,t){!n&&!g1[t]&&(g1[t]=!0,console.warn(t))}function TA(n){let t={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&Ui(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:de.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&Ui(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:de.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&Ui(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:de.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),t}var WA=["HydrateFallback","hydrateFallbackElement"],EA=class{constructor(){this.status="pending",this.promise=new Promise((t,i)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",t(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",i(a))}})}};function MA({router:n,flushSync:t}){let[i,a]=de.useState(n.state),[h,m]=de.useState(),[g,s]=de.useState({isTransitioning:!1}),[Y,E]=de.useState(),[I,k]=de.useState(),[D,V]=de.useState(),F=de.useRef(new Map),$=de.useCallback((_e,{deletedFetchers:fe,flushSync:We,viewTransitionOpts:se})=>
52{_e.fetchers.forEach((ze,je)=>{ze.data!==void 0&&F.current.set(je,ze.data)}),fe.forEach(ze=>F.current.delete(ze)),y1(We===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let De=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(y1(se==null||De,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!se||!De){t&&We?t(()=>a(_e)):de.startTransition(()=>a(_e));return}if(t&&We){t(()=>{I&&(Y&&Y.resolve(),I.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:se.currentLocation,nextLocation:se.nextLocation})});let ze=n.window.document.startViewTransition(()=>{t(()=>a(_e))});ze.finished.finally(()=>{t(()=>{E(void 0),k(void 0),m(void 0),s({isTransitioning:!1})})}),t(()=>k(ze));return}I?(Y&&Y.resolve(),I.skipTransition(),V({state:_e,currentLocation:se.currentLocation,nextLocation:se.nextLocation})):(m(_e),s({isTransitioning:!0,flushSync:!1,currentLocation:se.currentLocation,nextLocation:se.nextLocation}))},[n.window,t,I,Y]);de.useLayoutEffect(()=>n.subscribe($),[n,$]),de.useEffect(()=>{g.isTransitioning&&!g.flushSync&&E(new EA)},[g]),de.useEffect(()=>{if(Y&&h&&n.window){let _e=h,fe=Y.promise,We=n.window.document.startViewTransition(async()=>{de.startTransition(()=>a(_e)),await fe});We.finished.finally(()=>{E(void 0),k(void 0),m(void 0),s({isTransitioning:!1})}),k(We)}},[h,Y,n.window]),de.useEffect(()=>{Y&&h&&i.location.key===h.location.key&&Y.resolve()},[Y,I,i.location,h]),de.useEffect(()=>{!g.isTransitioning&&D&&(m(D.state),s({isTransitioning:!0,flushSync:!1,currentLocation:D.currentLocation,nextLocation:D.nextLocation}),V(void 0))},[g.isTransitioning,D]);let Q=de.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:_e=>n.navigate(_e),push:(_e,fe,We)=>n.navigate(_e,{state:fe,preventScrollReset:We==null?void 0:We.preventScrollReset}),replace:(_e,fe,We)=>n.navigate(_e,{replace:!0,state:fe,preventScrollReset:We==null?void 0:We.preventScrollReset})}),[n]),ae=n.basename||"/",le=de.useMemo(()=>({router:n,navigator:Q,static:!1,basename:ae}),[n,Q,ae]);return de.createElement(de.Fragment,null,de.createElement(Xd.Provider,{value:le},de.createElement(ug.Provider,{value:i},de.createElement(dP.Provider,{value:F.current},de.createElement(eY.Provider,{value:g},de.createElement(VA,{basename:ae,location:i.location,navigationType:i.historyAction,navigator:Q},de.createElement(PA,{routes:n.routes,future:n.future,state:i})))))),null)}var PA=de.memo(IA);function IA({routes:n,future:t,state:i}){return fA(n,void 0,i,t)}function UA({to:n,replace:t,state:i,relative:a}){Nr(fp(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=de.useContext(Il);Ui(!h,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:m}=de.useContext(Zo),{pathname:g}=xh(),s=cg(),Y=av(n,iv(m),g,a==="path"),E=JSON.stringify(Y);return de.useEffect(()=>{s(JSON.parse(E),{replace:t,state:i,relative:a})},[s,E,a,t,i]),null}function CA(n){return dA(n.context)}function VA({basename:n="/",children:t=null,location:i,navigationType:a="POP",navigator:h,static:m=!1}){Nr(!fp(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let g=n.replace(/^\/*/,"/"),s=de.useMemo(()=>({basename:g,navigator:h,static:m,future:{}}),[g,h,m]);typeof i=="string"&&(i=_h(i));let{pathname:Y="/",search:E="",hash:I="",state:k=null,key:D="default"}=i,V=de.useMemo(()=>{let F=No(Y,g);return F==null?null:{location:{pathname:F,search:E,hash:I,state:k,key:D},navigationType:a}},[g,Y,E,I,k,D,a]);
52return Ui(V!=null,`<Router basename="${g}"> is not able to match the URL "${Y}${E}${I}" because it does not start with the basename, so the <Router> won't render anything.`),V==null?null:de.createElement(Il.Provider,{value:s},de.createElement(sv.Provider,{children:t,value:V}))}var wy="get",Yy="application/x-www-form-urlencoded";function lv(n){return n!=null&&typeof n.tagName=="string"}function AA(n){return lv(n)&&n.tagName.toLowerCase()==="button"}function kA(n){return lv(n)&&n.tagName.toLowerCase()==="form"}function DA(n){return lv(n)&&n.tagName.toLowerCase()==="input"}function RA(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function LA(n,t){return n.button===0&&(!t||t==="_self")&&!RA(n)}var ay=null;function OA(){if(ay===null)try{new FormData(document.createElement("form"),0),ay=!1}catch{ay=!0}return ay}var XA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function m_(n){return n!=null&&!XA.has(n)?(Ui(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yy}"`),null):n}function NA(n,t){let i,a,h,m,g;if(kA(n)){let s=n.getAttribute("action");a=s?No(s,t):null,i=n.getAttribute("method")||wy,h=m_(n.getAttribute("enctype"))||Yy,m=new FormData(n)}else if(AA(n)||DA(n)&&(n.type==="submit"||n.type==="image")){let s=n.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let Y=n.getAttribute("formaction")||s.getAttribute("action");if(a=Y?No(Y,t):null,i=n.getAttribute("formmethod")||s.getAttribute("method")||wy,h=m_(n.getAttribute("formenctype"))||m_(s.getAttribute("enctype"))||Yy,m=new FormData(s,n),!OA()){let{name:E,type:I,value:k}=n;if(I==="image"){let D=E?`${E}.`:"";m.append(`${D}x`,"0"),m.append(`${D}y`,"0")}else E&&m.append(E,k)}}else{if(lv(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=wy,a=null,h=Yy,g=n}return m&&h==="text/plain"&&(g=m,m=void 0),{action:a,method:i.toLowerCase(),encType:h,formData:m,body:g}}function iY(n,t){if(n===!1||n===null||typeof n>"u")throw new Error(t)}async function zA(n,t){if(n.id in t)return t[n.id];try{let i=await import(n.module);return t[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function FA(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function ZA(n,t,i){let a=await Promise.all(n.map(async h=>{let m=t.routes[h.route.id];if(m){let g=await zA(m,i);return g.links?g.links():[]}return[]}));return GA(a.flat(1).filter(FA).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function v1(n,t,i,a,h,m){let g=(Y,E)=>i[E]?Y.route.id!==i[E].route.id:!0,s=(Y,E)=>{var I;return i[E].pathname!==Y.pathname||((I=i[E].route.path)==null?void 0:I.endsWith("*"))&&i[E].params["*"]!==Y.params["*"]};return m==="assets"?t.filter((Y,E)=>g(Y,E)||s(Y,E)):m==="data"?t.filter((Y,E)=>{var k;let I=a.routes[Y.route.id];if(!I||!I.hasLoader)return!1;if(g(Y,E)||s(Y,E))return!0;if(Y.route.shouldRevalidate){let D=Y.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:((k=i[0])==null?void 0:k.params)||{},nextUrl:new URL(n,window.origin),nextParams:Y.params,defaultShouldRevalidate:!0});if(typeof D=="boolean")return D}return!0}):[]}function jA(n,t,{includeHydrateFallback:i}={}){return BA(n.map(a=>{let h=t.routes[a.route.id];if(!h)return[];let m=[h.module];return h.clientActionModule&&(m=m.concat(h.clientActionModule)),h.clientLoaderModule&&(m=m.concat(h.clientLoaderModule)),i&&h.hydrateFallbackModule&&(m=m.concat(h.hydrateFallbackModule)),h.imports&&(m=m.concat(h.imports)),m}).flat(1))}function BA(n){return[...new Set(n)]}function $A(n){let t={},i=Object.keys(n).sort();for(let a of i)t[a]=n[a];return t}function GA(n,t){let i=new Set;return new Set(t),n.reduce((a,h)=>{let m=JSON.stringify($A(h));return i.has(m)||(i.add(m),a.push({key:m,link:h})),a},[])}var qA=new Set([100,101,204,205]);function HA(n,t){let i=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i.pathname==="/"?i.pathname="_root.data":t&&No(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.data`:i.pathname=`${i.pathname.replace(/\/$/,"")}.data`,i}function gP(){let n=de.useContext(Xd);return iY(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function KA(){let n=de.useContext(ug);return iY(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var aY=de.createContext(void 0);aY.displayName="FrameworkContext";function yP(){let n=de.useContext(aY);return iY(n,"You must render this element inside a <HydratedRouter> element"),n}function QA(n,t){let i=de.useContext(aY),[a,h]=de.useState(!1),[m,g]=de.useState(!1),{onFocus:s,onBlur:Y,onMouseEnter:E,onMouseLeave:I,onTouchStart:k}=t,D=de.useRef(null);de.useEffect(()=>{if(n==="render"&&g(!0),n==="viewport"){let $=ae=>{ae.forEach(le=>{g(le.isIntersecting)})},Q=new IntersectionObserver($,{threshold:.5});return D.current&&Q.observe(D.current),()=>{Q.disconnect()}}},[n]),de.useEffect(()=>{if(a){let $=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout($)}}},[a]);let V=()=>{h(!0)},F=()=>{h(!1),g(!1)};return i?n!=="intent"?[m,D,{}]:[m,D,{onFocus:bm(s,V),onBlur:bm(Y,F),onMouseEnter:bm(E,V),onMouseLeave:bm(I,F),onTouchStart:bm(k,V)}]:[!1,D,{}]}function bm(n,t){return i=>{n&&n(i),i.defaultPrevented||t(i)}}function JA({page:n,...t}){let{router:i}=gP(),a=de.useMemo(()=>hh(i.routes,n,i.basename),[i.routes,n,i.basename]);return a?de.createElement(tk,{page:n,matches:a,...t}):null}function ek(n){let{manifest:t,routeModules:i}=yP(),[a,h]=de.useState([]);return de.useEffect(()=>{let m=!1;return ZA(n,t,i).then(g=>{m||h(g)}),()=>{m=!0}},[n,t,i]),a}function tk({page:n,matches:t,...i}){let a=xh(),{manifest:h,routeModules:m}=yP(),{basename:g}=gP(),{loaderData:s,matches:Y}=KA(),E=de.useMemo(()=>v1(n,t,Y,h,a,"data"),[n,t,Y,h,a]),I=de.useMemo(()=>v1(n,t,Y,h,a,"assets"),[n,t,Y,h,a]),k=de.useMemo(()=>
52{if(n===a.pathname+a.search+a.hash)return[];let F=new Set,$=!1;if(t.forEach(ae=>{var _e;let le=h.routes[ae.route.id];!le||!le.hasLoader||(!E.some(fe=>fe.route.id===ae.route.id)&&ae.route.id in s&&((_e=m[ae.route.id])!=null&&_e.shouldRevalidate)||le.hasClientLoader?$=!0:F.add(ae.route.id))}),F.size===0)return[];let Q=HA(n,g);return $&&F.size>0&&Q.searchParams.set("_routes",t.filter(ae=>F.has(ae.route.id)).map(ae=>ae.route.id).join(",")),[Q.pathname+Q.search]},[g,s,a,h,E,t,n,m]),D=de.useMemo(()=>jA(I,h),[I,h]),V=ek(I);return de.createElement(de.Fragment,null,k.map(F=>de.createElement("link",{key:F,rel:"prefetch",as:"fetch",href:F,...i})),D.map(F=>de.createElement("link",{key:F,rel:"modulepreload",href:F,...i})),V.map(({key:F,link:$})=>de.createElement("link",{key:F,...$})))}function rk(...n){return t=>{n.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var vP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vP&&(window.__reactRouterVersion="7.5.3")}catch{}function nk(n,t){return FV({basename:t==null?void 0:t.basename,unstable_getContext:t==null?void 0:t.unstable_getContext,future:t==null?void 0:t.future,history:cV({window:t==null?void 0:t.window}),hydrationData:ik(),routes:n,mapRouteProperties:TA,hydrationRouteProperties:WA,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function ik(){let n=window==null?void 0:window.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:ak(n.errors)}),n}function ak(n){if(!n)return null;let t=Object.entries(n),i={};for(let[a,h]of t)if(h&&h.__type==="RouteErrorResponse")i[a]=new zy(h.status,h.statusText,h.data,h.internal===!0);else if(h&&h.__type==="Error"){if(h.__subType){let m=window[h.__subType];if(typeof m=="function")try{let g=new m(h.message);g.stack="",i[a]=g}catch{}}if(i[a]==null){let m=new Error(h.message);m.stack="",i[a]=m}}else i[a]=h;return i}var _P=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ca=de.forwardRef(function({onClick:t,discover:i="render",prefetch:a="none",relative:h,reloadDocument:m,replace:g,state:s,target:Y,to:E,preventScrollReset:I,viewTransition:k,...D},V){let{basename:F}=de.useContext(Il),$=typeof E=="string"&&_P.test(E),Q,ae=!1;if(typeof E=="string"&&$&&(Q=E,vP))try{let je=new URL(window.location.href),ft=E.startsWith("//")?new URL(je.protocol+E):new URL(E),ot=No(ft.pathname,F);ft.origin===je.origin&&ot!=null?E=ot+ft.search+ft.hash:ae=!0}catch{Ui(!1,`<Link to="${E}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let le=uA(E,{relative:h}),[_e,fe,We]=QA(a,D),se=uk(E,{replace:g,state:s,target:Y,preventScrollReset:I,relative:h,viewTransition:k});function De(je){t&&t(je),je.defaultPrevented||se(je)}let ze=de.createElement("a",{...D,...We,href:Q||le,onClick:ae||m?t:De,ref:rk(V,fe),target:Y,"data-discover":!$&&i==="render"?"true":void 0});return _e&&!$?de.createElement(de.Fragment,null,ze,de.createElement(JA,{page:le})):ze});Ca.displayName="Link";var sk=de.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:a="",end:h=!1,style:m,to:g,viewTransition:s,children:Y,...E},I){let k=hg(g,{relative:E.relative}),D=xh(),V=de.useContext(ug),{navigator:F,basename:$}=de.useContext(Il),Q=V!=null&&pk(k)&&s===!0,ae=F.encodeLocation?F.encodeLocation(k).pathname:k.pathname,le=D.pathname,_e=V&&V.navigation&&V.navigation.location?V.navigation.location.pathname:null;i||(le=le.toLowerCase(),_e=_e?_e.toLowerCase():null,ae=ae.toLowerCase()),_e&&$&&(_e=No(_e,$)||_e);const fe=ae!=="/"&&ae.endsWith("/")?ae.length-1:ae.length;let We=le===ae||!h&&le.startsWith(ae)&&le.charAt(fe)==="/",se=_e!=null&&(_e===ae||!h&&_e.startsWith(ae)&&_e.charAt(ae.length)==="/"),De={isActive:We,isPending:se,isTransitioning:Q},ze=We?t:void 0,je;typeof a=="function"?je=a(De):je=[a,We?"active":null,se?"pending":null,Q?"transitioning":null].filter(Boolean).join(" ");let ft=typeof m=="function"?m(De):m;return de.createElement(Ca,{...E,"aria-current":ze,className:je,ref:I,style:ft,to:g,viewTransition:s},typeof Y=="function"?Y(De):Y)});sk.displayName="NavLink";var ok=de.forwardRef(({discover:n="render",fetcherKey:t,navigate:i,reloadDocument:a,replace:h,state:m,method:g=wy,action:s,onSubmit:Y,relative:E,preventScrollReset:I,viewTransition:k,...D},V)=>{let F=dk(),$=fk(s,{relative:E}),Q=g.toLowerCase()==="get"?"get":"post",ae=typeof s=="string"&&_P.test(s),le=_e=>{if(Y&&Y(_e),_e.defaultPrevented)return;_e.preventDefault();let fe=_e.nativeEvent.submitter,We=(fe==null?void 0:fe.getAttribute("formmethod"))||g;F(fe||_e.currentTarget,{fetcherKey:t,method:We,navigate:i,replace:h,state:m,relative:E,preventScrollReset:I,viewTransition:k})};return de.createElement("form",{ref:V,method:Q,action:$,onSubmit:a?Y:le,...D,"data-discover":!ae&&n==="render"?"true":void 0})});ok.displayName="Form";function lk(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xP(n){let t=de.useContext(Xd);return Nr(t,lk(n)),t}function uk(n,{target:t,replace:i,state:a,preventScrollReset:h,relative:m,viewTransition:g}={}){let s=cg(),Y=xh(),E=hg(n,{relative:m});return de.useCallback(I=>{if(LA(I,t)){I.preventDefault();let k=i!==void 0?i:mh(Y)===mh(E);s(n,{replace:k,state:a,preventScrollReset:h,relative:m,viewTransition:g})}},[Y,s,E,i,a,t,n,h,m,g])}var ck=0,hk=()=>`__${String(++ck)}__`;function dk(){let{router:n}=xP("useSubmit"),{basename:t}=de.useContext(Il),i=wA();return de.useCallback(async(a,h={})=>{let{action:m,method:g,encType:s,formData:Y,body:E}=NA(a,t);if(h.navigate===!1){let I=h.fetcherKey||hk();await n.fetch(I,i,h.action||m,{preventScrollReset:h.preventScrollReset,formData:Y,body:E,formMethod:h.method||g,formEncType:h.encType||s,flushSync:h.flushSync})}else await n.navigate(h.action||m,{preventScrollReset:h.preventScrollReset,formData:Y,body:E,formMethod:h.method||g,formEncType:h.encType||s,replace:h.replace,state:h.state,fromRouteId:i,flushSync:h.flushSync,viewTransition:h.viewTransition})},[n,t,i])}function fk(n,{relative:t}={}){let{basename:i}=de.useContext(Il),a=de.useContext(Zo);Nr(a,"useFormAction must be used inside a RouteContext");let[h]=a.matches.slice(-1),m={...hg(n||".",{relative:t})},g=xh();if(n==null){m.search=g.search;let s=new URLSearchParams(m.search),Y=s.getAll("index");if(Y.some(I=>I==="")){s.delete("index"),Y.filter(k=>
52k).forEach(k=>s.append("index",k));let I=s.toString();m.search=I?`?${I}`:""}}return(!n||n===".")&&h.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(m.pathname=m.pathname==="/"?i:yu([i,m.pathname])),mh(m)}function pk(n,t={}){let i=de.useContext(eY);Nr(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=xP("useViewTransitionState"),h=hg(n,{relative:t.relative});if(!i.isTransitioning)return!1;let m=No(i.currentLocation.pathname,a)||i.currentLocation.pathname,g=No(i.nextLocation.pathname,a)||i.nextLocation.pathname;return Ny(h.pathname,g)!=null||Ny(h.pathname,m)!=null}new TextEncoder;[...qA];var bP=KM();const wP=Aa(bP);/** 53 * react-router v7.5.3 54 * 55 * Copyright (c) Remix Software Inc. 56 * 57 * This source code is licensed under the MIT license found in the 58 * LICENSE.md file in the root directory of this source tree. 59 * 60 * @license MIT 61 */function mk(n){return de.createElement(MA,{flushSync:bP.flushSync,...n})}const gk="modulepreload",yk=function(n){return"/"+n},_1={},np=function(t,i,a){let h=Promise.resolve();if(i&&i.length>0){let g=function(E){return Promise.all(E.map(I=>Promise.resolve(I).then(k=>({status:"fulfilled",value:k}),k=>({status:"rejected",reason:k}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),Y=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));h=g(i.map(E=>{if(E=yk(E),E in _1)return;_1[E]=!0;const I=E.endsWith(".css"),k=I?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${E}"]${k}`))return;const D=document.createElement("link");if(D.rel=I?"stylesheet":gk,I||(D.as="script"),D.crossOrigin="",D.href=E,Y&&D.setAttribute("nonce",Y),document.head.appendChild(D),I)return new Promise((V,F)=>{D.addEventListener("load",V),D.addEventListener("error",()=>F(new Error(`Unable to preload CSS for ${E}`)))})}))}function m(g){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=g,window.dispatchEvent(s),!s.defaultPrevented)throw g}return h.then(g=>{for(const s of g||[])s.status==="rejected"&&m(s.reason);return t().catch(m)})},vk=n=>{let t;return n?t=n:typeof fetch>"u"?t=(...i)=>np(async()=>{const{default:a}=await Promise.resolve().then(()=>pp);return{default:a}},[]).then(({default:a})=>a(...i)):t=fetch,(...i)=>t(...i)};class sY extends Error{constructor(t,i="FunctionsError",a){super(t),this.name=i,this.context=a}}class _k extends sY{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class xk extends sY{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class bk extends sY{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var xw;(function(n){n.Any="any",n.ApNortheast1="ap-northeast-1",n.ApNortheast2="ap-northeast-2",n.ApSouth1="ap-south-1",n.ApSoutheast1="ap-southeast-1",n.ApSoutheast2="ap-southeast-2",n.CaCentral1="ca-central-1",n.EuCentral1="eu-central-1",n.EuWest1="eu-west-1",n.EuWest2="eu-west-2",n.EuWest3="eu-west-3",n.SaEast1="sa-east-1",n.UsEast1="us-east-1",n.UsWest1="us-west-1",n.UsWest2="us-west-2"})(xw||(xw={}));var wk=function(n,t,i,a){function h(m){return m instanceof i?m:new i(function(g){g(m)})}return new(i||(i=Promise))(function(m,g){function s(I){try{E(a.next(I))}catch(k){g(k)}}function Y(I){try{E(a.throw(I))}catch(k){g(k)}}function E(I){I.done?m(I.value):h(I.value).then(s,Y)}E((a=a.apply(n,t||[])).next())})};class Yk{constructor(t,{headers:i={},customFetch:a,region:h=xw.Any}={}){this.url=t,this.headers=i,this.region=h,this.fetch=vk(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,i={}){var a;return wk(this,void 0,void 0,function*(){try{const{headers:h,method:m,body:g}=i;let s={},{region:Y}=i;Y||(Y=this.region),Y&&Y!=="any"&&(s["x-region"]=Y);let E;g&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)&&(typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(s["Content-Type"]="application/octet-stream",E=g):typeof g=="string"?(s["Content-Type"]="text/plain",E=g):typeof FormData<"u"&&g instanceof FormData?E=g:(s["Content-Type"]="application/json",E=JSON.stringify(g)));const I=yield this.fetch(`${this.url}/${t}`,{method:m||"POST",headers:Object.assign(Object.assign(Object.assign({},s),this.headers),h),body:E}).catch(F=>{throw new _k(F)}),k=I.headers.get("x-relay-error");
61if(k&&k==="true")throw new xk(I);if(!I.ok)throw new bk(I);let D=((a=I.headers.get("Content-Type"))!==null&&a!==void 0?a:"text/plain").split(";")[0].trim(),V;return D==="application/json"?V=yield I.json():D==="application/octet-stream"?V=yield I.blob():D==="text/event-stream"?V=I:D==="multipart/form-data"?V=yield I.formData():V=yield I.text(),{data:V,error:null}}catch(h){return{data:null,error:h}}})}}var _a={},Rf={},Lf={},Of={},Xf={},Nf={},Sk=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},ip=Sk();const Tk=ip.fetch,YP=ip.fetch.bind(ip),SP=ip.Headers,Wk=ip.Request,Ek=ip.Response,pp=Object.freeze(Object.defineProperty({__proto__:null,Headers:SP,Request:Wk,Response:Ek,default:YP,fetch:Tk},Symbol.toStringTag,{value:"Module"})),Mk=QC(pp);var sy={},x1;function TP(){if(x1)return sy;x1=1,Object.defineProperty(sy,"__esModule",{value:!0});class n extends Error{constructor(i){super(i.message),this.name="PostgrestError",this.details=i.details,this.hint=i.hint,this.co
61de=i.code}}return sy.default=n,sy}var b1;function WP(){if(b1)return Nf;b1=1;var n=Nf&&Nf.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(Nf,"__esModule",{value:!0});const t=n(Mk),i=n(TP());class a{constructor(m){this.shouldThrowOnError=!1,this.method=m.method,this.url=m.url,this.headers=m.headers,this.schema=m.schema,this.body=m.body,this.shouldThrowOnError=m.shouldThrowOnError,this.signal=m.signal,this.isMaybeSingle=m.isMaybeSingle,m.fetch?this.fetch=m.fetch:typeof fetch>"u"?this.fetch=t.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(m,g){return this.headers=Object.assign({},this.headers),this.headers[m]=g,this}then(m,g){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const s=this.fetch;let Y=s(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async E=>{var I,k,D;let V=null,F=null,$=null,Q=E.status,ae=E.statusText;if(E.ok){if(this.method!=="HEAD"){const We=await E.text();We===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?F=We:F=JSON.parse(We))}const _e=(I=this.headers.Prefer)===null||I===void 0?void 0:I.match(/count=(exact|planned|estimated)/),fe=(k=E.headers.get("content-range"))===null||k===void 0?void 0:k.split("/");_e&&fe&&fe.length>1&&($=parseInt(fe[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(F)&&(F.length>1?(V={code:"PGRST116",details:`Results contain ${F.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},F=null,$=null,Q=406,ae="Not Acceptable"):F.length===1?F=F[0]:F=null)}else{const _e=await E.text();try{V=JSON.parse(_e),Array.isArray(V)&&E.status===404&&(F=[],V=null,Q=200,ae="OK")}catch{E.status===404&&_e===""?(Q=204,ae="No Content"):V={message:_e}}if(V&&this.isMaybeSingle&&(!((D=V==null?void 0:V.details)===null||D===void 0)&&D.includes("0 rows"))&&(V=null,Q=200,ae="OK"),V&&this.shouldThrowOnError)throw new i.default(V)}return{error:V,data:F,count:$,status:Q,statusText:ae}});return this.shouldThrowOnError||(Y=Y.catch(E=>{var I,k,D;return{error:{message:`${(I=E==null?void 0:E.name)!==null&&I!==void 0?I:"FetchError"}: ${E==null?void 0:E.message}`,details:`${(k=E==null?void 0:E.stack)!==null&&k!==void 0?k:""}`,hint:"",code:`${(D=E==null?void 0:E.code)!==null&&D!==void 0?D:""}`},data:null,count:null,status:0,statusText:""}})),Y.then(m,g)}returns(){return this}overrideTypes(){return this}}return Nf.default=a,Nf}var w1;function EP(){if(w1)return Xf;w1=1;var n=Xf&&Xf.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Xf,"__esModule",{value:!0});const t=n(WP());class i extends t.default{select(h){let m=!1;const g=(h??"*").split("").map(s=>/\s/.test(s)&&!m?"":(s==='"'&&(m=!m),s)).join("");return this.url.searchParams.set("select",g),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(h,{ascending:m=!0,nullsFirst:g,foreignTable:s,referencedTable:Y=s}={}){const E=Y?`${Y}.order`:"order",I=this.url.searchParams.get(E);return this.url.searchParams.set(E,`${I?`${I},`:""}${h}.${m?"asc":"desc"}${g===void 0?"":g?".nullsfirst":".nullslast"}`),this}limit(h,{foreignTable:m,referencedTable:g=m}={}){const s=typeof g>"u"?"limit":`${g}.limit`;return this.url.searchParams.set(s,`${h}`),this}range(h,m,{foreignTable:g,referencedTable:s=g}={}){const Y=typeof s>"u"?"offset":`${s}.offset`,E=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(Y,`${h}`),this.url.searchParams.set(E,`${m-h+1}`),this}abortSignal(h){return this.signal=h,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}
61explain({analyze:h=!1,verbose:m=!1,settings:g=!1,buffers:s=!1,wal:Y=!1,format:E="text"}={}){var I;const k=[h?"analyze":null,m?"verbose":null,g?"settings":null,s?"buffers":null,Y?"wal":null].filter(Boolean).join("|"),D=(I=this.headers.Accept)!==null&&I!==void 0?I:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${E}; for="${D}"; options=${k};`,E==="json"?this:this}rollback(){var h;return((h=this.headers.Prefer)!==null&&h!==void 0?h:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}return Xf.default=i,Xf}var Y1;function oY(){if(Y1)return Of;Y1=1;var n=Of&&Of.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Of,"__esModule",{value:!0});const t=n(EP());class i extends t.default{eq(h,m){return this.url.searchParams.append(h,`eq.${m}`),this}neq(h,m){return this.url.searchParams.append(h,`neq.${m}`),this}gt(h,m){return this.url.searchParams.append(h,`gt.${m}`),this}gte(h,m){return this.url.searchParams.append(h,`gte.${m}`),this}lt(h,m){return this.url.searchParams.append(h,`lt.${m}`),this}lte(h,m){return this.url.searchParams.append(h,`lte.${m}`),this}like(h,m){return this.url.searchParams.append(h,`like.${m}`),this}likeAllOf(h,m){return this.url.searchParams.append(h,`like(all).{${m.join(",")}}`),this}likeAnyOf(h,m){return this.url.searchParams.append(h,`like(any).{${m.join(",")}}`),this}ilike(h,m){return this.url.searchParams.append(h,`ilike.${m}`),this}ilikeAllOf(h,m){return this.url.searchParams.append(h,`ilike(all).{${m.join(",")}}`),this}ilikeAnyOf(h,m){return this.url.searchParams.append(h,`ilike(any).{${m.join(",")}}`),this}is(h,m){return this.url.searchParams.append(h,`is.${m}`),this}in(h,m){const g=Array.from(new Set(m)).map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(h,`in.(${g})`),this}contains(h,m){return typeof m=="string"?this.url.searchParams.append(h,`cs.${m}`):Array.isArray(m)?this.url.searchParams.append(h,`cs.{${m.join(",")}}`):this.url.searchParams.append(h,`cs.${JSON.stringify(m)}`),this}containedBy(h,m){return typeof m=="string"?this.url.searchParams.append(h,`cd.${m}`):Array.isArray(m)?this.url.searchParams.append(h,`cd.{${m.join(",")}}`):this.url.searchParams.append(h,`cd.${JSON.stringify(m)}`),this}rangeGt(h,m){return this.url.searchParams.append(h,`sr.${m}`),this}rangeGte(h,m){return this.url.searchParams.append(h,`nxl.${m}`),this}rangeLt(h,m){return this.url.searchParams.append(h,`sl.${m}`),this}rangeLte(h,m){return this.url.searchParams.append(h,`nxr.${m}`),this}rangeAdjacent(h,m){return this.url.searchParams.append(h,`adj.${m}`),this}overlaps(h,m){return typeof m=="string"?this.url.searchParams.append(h,`ov.${m}`):this.url.searchParams.append(h,`ov.{${m.join(",")}}`),this}textSearch(h,m,{config:g,type:s}={}){let Y="";s==="plain"?Y="pl":s==="phrase"?Y="ph":s==="websearch"&&(Y="w");const E=g===void 0?"":`(${g})`;return this.url.searchParams.append(h,`${Y}fts${E}.${m}`),this}match(h){return Object.entries(h).forEach(([m,g])=>{this.url.searchParams.append(m,`eq.${g}`)}),this}not(h,m,g){return this.url.searchParams.append(h,`not.${m}.${g}`),this}or(h,{foreignTable:m,referencedTable:g=m}={}){const s=g?`${g}.or`:"or";return this.url.searchParams.append(s,`(${h})`),this}filter(h,m,g){return this.url.searchParams.append(h,`${m}.${g}`),this}}return Of.default=i,Of}var S1;function MP(){if(S1)return Lf;S1=1;var n=Lf&&Lf.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Lf,"__esModule",{value:!0});const t=n(oY());class i{constructor(h,{headers:m={},schema:g,fetch:s}){this.url=h,this.headers=m,this.schema=g,this.fetch=s}select(h,{head:m=!1,count:g}={}){const s=m?"HEAD":"GET";let Y=!1;const E=(h??"*").split("").map(I=>/\s/.test(I)&&!Y?"":(I==='"'&&(Y=!Y),I)).join("");return this.url.searchParams.set("select",E),g&&(this.headers.Prefer=`count=${g}`),new t.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(h,{count:m,defaultToNull:g=!0}={}){const s="POST",Y=[];
61if(this.headers.Prefer&&Y.push(this.headers.Prefer),m&&Y.push(`count=${m}`),g||Y.push("missing=default"),this.headers.Prefer=Y.join(","),Array.isArray(h)){const E=h.reduce((I,k)=>I.concat(Object.keys(k)),[]);if(E.length>0){const I=[...new Set(E)].map(k=>`"${k}"`);this.url.searchParams.set("columns",I.join(","))}}return new t.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:h,fetch:this.fetch,allowEmpty:!1})}upsert(h,{onConflict:m,ignoreDuplicates:g=!1,count:s,defaultToNull:Y=!0}={}){const E="POST",I=[`resolution=${g?"ignore":"merge"}-duplicates`];if(m!==void 0&&this.url.searchParams.set("on_conflict",m),this.headers.Prefer&&I.push(this.headers.Prefer),s&&I.push(`count=${s}`),Y||I.push("missing=default"),this.headers.Prefer=I.join(","),Array.isArray(h)){const k=h.reduce((D,V)=>D.concat(Object.keys(V)),[]);if(k.length>0){const D=[...new Set(k)].map(V=>`"${V}"`);this.url.searchParams.set("columns",D.join(","))}}return new t.default({method:E,url:this.url,headers:this.headers,schema:this.schema,body:h,fetch:this.fetch,allowEmpty:!1})}update(h,{count:m}={}){const g="PATCH",s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),m&&s.push(`count=${m}`),this.headers.Prefer=s.join(","),new t.default({method:g,url:this.url,headers:this.headers,schema:this.schema,body:h,fetch:this.fetch,allowEmpty:!1})}delete({count:h}={}){const m="DELETE",g=[];return h&&g.push(`count=${h}`),this.headers.Prefer&&g.unshift(this.headers.Prefer),this.headers.Prefer=g.join(","),new t.default({method:m,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}return Lf.default=i,Lf}var wm={},Ym={},T1;
61function Pk(){return T1||(T1=1,Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.version=void 0,Ym.version="0.0.0-automated"),Ym}var W1;function Ik(){if(W1)return wm;W1=1,Object.defineProperty(wm,"__esModule",{value:!0}),wm.DEFAULT_HEADERS=void 0;const n=Pk();return wm.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${n.version}`},wm}var E1;function Uk(){if(E1)return Rf;E1=1;var n=Rf&&Rf.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(Rf,"__esModule",{value:!0});const t=n(MP()),i=n(oY()),a=Ik();class h{constructor(g,{headers:s={},schema:Y,fetch:E}={}){this.url=g,this.headers=Object.assign(Object.assign({},a.DEFAULT_HEADERS),s),this.schemaName=Y,this.fetch=E}from(g){const s=new URL(`${this.url}/${g}`);return new t.default(s,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(g){return new h(this.url,{headers:this.headers,schema:g,fetch:this.fetch})}rpc(g,s={},{head:Y=!1,get:E=!1,count:I}={}){let k;const D=new URL(`${this.url}/rpc/${g}`);let V;Y||E?(k=Y?"HEAD":"GET",Object.entries(s).filter(([$,Q])=>Q!==void 0).map(([$,Q])=>[$,Array.isArray(Q)?`{${Q.join(",")}}`:`${Q}`]).forEach(([$,Q])=>{D.searchParams.append($,Q)})):(k="POST",V=s);const F=Object.assign({},this.headers);return I&&(F.Prefer=`count=${I}`),new i.default({method:k,url:D,headers:F,schema:this.schemaName,body:V,fetch:this.fetch,allowEmpty:!1})}}return Rf.default=h,Rf}var M1;function Ck(){if(M1)return _a;M1=1;var n=_a&&_a.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(_a,"__esModule",{value:!0}),_a.PostgrestError=_a.PostgrestBuilder=_a.PostgrestTransformBuilder=_a.PostgrestFilterBuilder=_a.PostgrestQueryBuilder=_a.PostgrestClient=void 0;const t=n(Uk());_a.PostgrestClient=t.default;const i=n(MP());_a.PostgrestQueryBuilder=i.default;const a=n(oY());_a.PostgrestFilterBuilder=a.default;const h=n(EP());_a.PostgrestTransformBuilder=h.default;const m=n(WP());_a.PostgrestBuilder=m.default;const g=n(TP());return _a.PostgrestError=g.default,_a.default={PostgrestClient:t.default,PostgrestQueryBuilder:i.default,PostgrestFilterBuilder:a.default,PostgrestTransformBuilder:h.default,PostgrestBuilder:m.default,PostgrestError:g.default},_a}var Vk=Ck();const Ak=Aa(Vk),{PostgrestClient:kk,PostgrestQueryBuilder:fZ,PostgrestFilterBuilder:pZ,PostgrestTransformBuilder:mZ,PostgrestBuilder:gZ,PostgrestError:yZ}=Ak,Dk="2.11.2",Rk={"X-Client-Info":`realtime-js/${Dk}`},Lk="1.0.0",PP=1e4,Ok=1e3;var ep;(function(n){n[n.connecting=0]="connecting",n[n.open=1]="open",n[n.closing=2]="closing",n[n.closed=3]="closed"})(ep||(ep={}));var io;(function(n){n.closed="closed",n.errored="errored",n.joined="joined",n.joining="joining",n.leaving="leaving"})(io||(io={}));var Tl;(function(n){n.close="phx_close",n.error="phx_error",n.join="phx_join",n.reply="phx_reply",n.leave="phx_leave",n.access_token="access_token"})(Tl||(Tl={}));var bw;(function(n){n.websocket="websocket"})(bw||(bw={}));var Wd;(function(n){n.Connecting="connecting",n.Open="open",n.Closing="closing",n.Closed="closed"})(Wd||(Wd={}));class Xk{constructor(){this.HEADER_LENGTH=1}decode(t,i){return t.constructor===ArrayBuffer?i(this._binaryDecode(t)):i(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const i=new DataView(t),a=new TextDecoder;return this._decodeBroadcast(t,i,a)}_decodeBroadcast(t,i,a){const h=i.getUint8(1),m=i.getUint8(2);let g=this.HEADER_LENGTH+2;const s=a.decode(t.slice(g,g+h));g=g+h;const Y=a.decode(t.slice(g,g+m));g=g+m;const E=JSON.parse(a.decode(t.slice(g,t.byteLength)));return{ref:null,topic:s,event:Y,payload:E}}}class IP{constructor(t,i){this.callback=t,this.timerCalc=i,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=i}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Dn;(function(n){n.abstime="abstime",n.bool="bool",n.date="date",n.daterange="daterange",n.float4="float4",n.float8="float8",n.int2="int2",n.int4="int4",n.int4range="int4range",n.int8="int8",n.int8range="int8range",n.json="json",n.jsonb="jsonb",n.money="money",n.numeric="numeric",n.oid="oid",n.reltime="reltime",n.text="text",n.time="time",n.timestamp="timestamp",n.timestamptz="timestamptz",n.timetz="timetz",n.tsrange="tsrange",n.tstzrange="tstzrange"})(Dn||(Dn={}));const P1=(n,t,i={})=>{var a;const h=(a=i.skipTypes)!==null&&a!==void 0?a:[];return Object.keys(t).reduce((m,g)=>(m[g]=Nk(g,n,t,h),m),{})},Nk=(n,t,i,a)=>{const h=t.find(s=>
vendor: 8,272 bytes, line 61
61s.name===n),m=h==null?void 0:h.type,g=i[n];return m&&!a.includes(m)?UP(m,g):ww(g)},UP=(n,t)=>{if(n.charAt(0)==="_"){const i=n.slice(1,n.length);return jk(t,i)}switch(n){case Dn.bool:return zk(t);case Dn.float4:case Dn.float8:case Dn.int2:case Dn.int4:case Dn.int8:case Dn.numeric:case Dn.oid:return Fk(t);case Dn.json:case Dn.jsonb:return Zk(t);case Dn.timestamp:return Bk(t);case Dn.abstime:case Dn.date:case Dn.daterange:case Dn.int4range:case Dn.int8range:case Dn.money:case Dn.reltime:case Dn.text:case Dn.time:case Dn.timestamptz:case Dn.timetz:case Dn.tsrange:case Dn.tstzrange:return ww(t);default:return ww(t)}},ww=n=>n,zk=n=>{switch(n){case"t":return!0;case"f":return!1;default:return n}},Fk=n=>{if(typeof n=="string"){const t=parseFloat(n);if(!Number.isNaN(t))return t}return n},Zk=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch(t){return console.log(`JSON parse error: ${t}`),n}return n},jk=(n,t)=>{if(typeof n!="string")return n;const i=n.length-1,a=n[i];if(n[0]==="{"&&a==="}"){let m;const g=n.slice(1,i);try{m=JSON.parse("["+g+"]")}catch{m=g?g.split(","):[]}return m.map(s=>UP(t,s))}return n},Bk=n=>typeof n=="string"?n.replace(" ","T"):n,CP=n=>{let t=n;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class g_{constructor(t,i,a={},h=PP){this.channel=t,this.event=i,this.payload=a,this.timeout=h,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,i){var a;return this._hasReceived(t)&&i((a=this.receivedResp)===null||a===void 0?void 0:a.response),this.recHooks.push({status:t,callback:i}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=i=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=i,this._matchReceive(i)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,i){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:i})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:i}){this.recHooks.filter(a=>a.status===t).forEach(a=>a.callback(i))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var I1;(function(n){n.SYNC="sync",n.JOIN="join",n.LEAVE="leave"})(I1||(I1={}));class Om{constructor(t,i){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const a=(i==null?void 0:i.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(a.state,{},h=>{const{onJoin:m,onLeave:g,onSync:s}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Om.syncState(this.state,h,m,g),this.pendingDiffs.forEach(Y=>{this.state=Om.syncDiff(this.state,Y,m,g)}),this.pendingDiffs=[],s()}),this.channel._on(a.diff,{},h=>{const{onJoin:m,onLeave:g,onSync:s}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(h):(this.state=Om.syncDiff(this.state,h,m,g),s())}),this.onJoin((h,m,g)=>{this.channel._trigger("presence",{event:"join",key:h,currentPresences:m,newPresences:g})}),this.onLeave((h,m,g)=>{this.channel._trigger("presence",{event:"leave",key:h,currentPresences:m,leftPresences:g})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,i,a,h){const m=this.cloneDeep(t),g=this.transformState(i),s={},Y={};return this.map(m,(E,I)=>{g[E]||(Y[E]=I)}),this.map(g,(E,I)=>{const k=m[E];if(k){const D=I.map(Q=>Q.presence_ref),V=k.map(Q=>Q.presence_ref),F=I.filter(Q=>V.indexOf(Q.presence_ref)<0),$=k.filter(Q=>D.indexOf(Q.presence_ref)<0);F.length>0&&(s[E]=F),$.length>0&&(Y[E]=$)}else s[E]=I}),this.syncDiff(m,{joins:s,leaves:Y},a,h)}static syncDiff(t,i,a,h){const{joins:m,leaves:g}={joins:this.transformState(i.joins),leaves:this.transformState(i.leaves)};return a||(a=()=>{}),h||(h=()=>{}),this.map(m,(s,Y)=>{var E;const I=(E=t[s])!==null&&E!==void 0?E:[];if(t[s]=this.cloneDeep(Y),I.length>0){const k=t[s].map(V=>V.presence_ref),D=I.filter(V=>k.indexOf(V.presence_ref)<0);t[s].unshift(...D)}a(s,I,Y)}),this.map(g,(s,Y)=>{let E=t[s];if(!E)return;const I=Y.map(k=>k.presence_ref);E=E.filter(k=>I.indexOf(k.presence_ref)<0),t[s]=E,h(s,E,Y),E.length===0&&delete t[s]}),t}static map(t,i){return Object.getOwnPropertyNames(t).map(a=>i(a,t[a]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((i,a)=>{const h=t[a];return"metas"in h?i[a]=h.metas.map(m=>(m.presence_ref=m.phx_ref,delete m.phx_ref,delete m.phx_ref_prev,m)):i[a]=h,i},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var U1;(function(n){n.ALL="*",n.INSERT="INSERT",n.UPDATE="UPDATE",n.DELETE="DELETE"})(U1||(U1={}));var C1;(function(n){n.BROADCAST="broadcast",n.PRESENCE="presence",n.POSTGRES_CHANGES="postgres_changes",n.SYSTEM="system"})(C1||(C1={}));var sc;(function(n){n.SUBSCRIBED="SUBSCRIBED",n.TIMED_OUT="TIMED_OUT",n.CLOSED="CLOSED",n.CHANNEL_ERROR="CHANNEL_ERROR"})(sc||(sc={}));class lY{constructor(t,i={config:{}},a){this.topic=t,this.params=i,this.socket=a,this.bindings={},this.state=io.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},i.config),this.timeout=this.socket.timeout,this.joinPush=new g_(this,Tl.join,this.params,this.timeout),this.rejoinTimer=new IP(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=io.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(h=>h.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=io.closed,this.socket._remove(this)}),this._onError(h=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,h),this.state=io.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=io.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Tl.reply,{},(h,m)=>{this._trigger(this._replyEventName(m),h)}),this.presence=new Om(this),this.broadcastEndpointURL=CP(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(t,i=this.timeout){var a,h;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:m,presence:g,private:s}}=this.params;this._onError(I=>t==null?void 0:t(sc.CHANNEL_ERROR,I)),this._onClose(()=>t==null?void 0:t(sc.CLOSED));const Y={},E={broadcast:m,presence:g,postgres_changes:(h=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(I=>I.filter))!==null&&h!==void 0?h:[],private:s};this.socket.accessTokenValue&&(Y.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:E},Y)),this.joinedOnce=!0,this._rejoin(i),this.joinPush.receive("ok",async({postgres_changes:I})=>{var k;if(this.socket.setAuth(),I===void 0){t==null||t(sc.SUBSCRIBED);return}else{const D=this.bindings.postgres_changes,V=(k=D==null?void 0:D.length)!==null&&k!==void 0?k:0,F=[];for(let $=0;$<V;$++){const Q=D[$],{filter:{event:ae,schema:le,table:_e,filter:fe}}=Q,We=I&&I[$];if(We&&We.event===ae&&We.schema===le&&We.table===_e&&We.filter===fe)F.push(Object.assign(Object.assign({}
61,Q),{id:We.id}));else{this.unsubscribe(),t==null||t(sc.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=F,t&&t(sc.SUBSCRIBED);return}}).receive("error",I=>{t==null||t(sc.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(I).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(sc.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,i={}){return await this.send({type:"presence",event:"track",payload:t},i.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,i,a){return this._on(t,i,a)}async send(t,i={}){var a,h;if(!this._canPush()&&t.type==="broadcast"){const{event:m,payload:g}=t,Y={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:m,payload:g,private:this.private}]})};try{const E=await this._fetchWithTimeout(this.broadcastEndpointURL,Y,(a=i.timeout)!==null&&a!==void 0?a:this.timeout);return await((h=E.body)===null||h===void 0?void 0:h.cancel()),E.ok?"ok":"error"}catch(E){return E.name==="AbortError"?"timed out":"error"}}else return new Promise(m=>{var g,s,Y;const E=this._push(t.type,t,i.timeout||this.timeout);t.type==="broadcast"&&!(!((Y=(s=(g=this.params)===null||g===void 0?void 0:g.config)===null||s===void 0?void 0:s.broadcast)===null||Y===void 0)&&Y.ack)&&m("ok"),E.receive("ok",()=>m("ok")),E.receive("error",()=>m("error")),E.receive("timeout",()=>m("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=io.leaving;const i=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Tl.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(a=>{const h=new g_(this,Tl.leave,{},t);h.receive("ok",()=>{i(),a("ok")}).receive("timeout",()=>{i(),a("timed out")}).receive("error",()=>{a("error")}),h.send(),this._canPush()||h.trigger("ok",{})})}async _fetchWithTimeout(t,i,a){const h=new AbortController,m=setTimeout(()=>h.abort(),a),g=await this.socket.fetch(t,Object.assign(Object.assign({},i),{signal:h.signal}));return clearTimeout(m),g}_push(t,i,a=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let h=new g_(this,t,i,a);return this._canPush()?h.send():(h.startTimeout(),this.pushBuffer.push(h)),h}_onMessage(t,i,a){return i}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,i,a){var h,m;const g=t.toLocaleLowerCase(),{close:s,error:Y,leave:E,join:I}=Tl;if(a&&[s,Y,E,I].indexOf(g)>=0&&a!==this._joinRef())return;let D=this._onMessage(g,i,a);if(i&&!D)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(g)?(h=this.bindings.postgres_changes)===null||h===void 0||h.filter(V=>{var F,$,Q;return((F=V.filter)===null||F===void 0?void 0:F.event)==="*"||((Q=($=V.filter)===null||$===void 0?void 0:$.event)===null||Q===void 0?void 0:Q.toLocaleLowerCase())===g}).map(V=>V.callback(D,a)):(m=this.bindings[g])===null||m===void 0||m.filter(V=>{var F,$,Q,ae,le,_e;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in V){const fe=V.id,We=(F=V.filter)===null||F===void 0?void 0:F.event;return fe&&(($=i.ids)===null||$===void 0?void 0:$.includes(fe))&&(We==="*"||(We==null?void 0:We.toLocaleLowerCase())===((Q=i.data)===null||Q===void 0?void 0:Q.type.toLocaleLowerCase()))}else{const fe=(le=(ae=V==null?void 0:V.filter)===null||ae===void 0?void 0:ae.event)===null||le===void 0?void 0:le.toLocaleLowerCase();return fe==="*"||fe===((_e=i==null?void 0:i.event)===null||_e===void 0?void 0:_e.toLocaleLowerCase())}else return V.type.toLocaleLowerCase()===g}).map(V=>{if(typeof D=="object"&&"ids"in D){const F=D.data,{schema:$,table:Q,commit_timestamp:ae,type:le,errors:_e}=F;D=Object.assign(Object.assign({},{schema:$,table:Q,commit_timestamp:ae,eventType:le,new:{},old:{},errors:_e}),this._getPayloadRecords(F))}V.callback(D,a)})}_isClosed(){return this.state===io.closed}_isJoined(){return this.state===io.joined}_isJoining(){return this.state===io.joining}_isLeaving(){return this.state===io.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,i,a){const h=t.toLocaleLowerCase(),m={type:h,filter:i,callback:a};return this.bindings[h]?this.bindings[h].push(m):this.bindings[h]=[m],this}_off(t,i){const a=t.toLocaleLowerCase();return this.bindings[a]=this.bindings[a].filter(h=>{var m;return!(((m=h.type)===null||m===void 0?void 0:m.toLocaleLowerCase())===a&&lY.isEqual(h.filter,i))}),this}
61static isEqual(t,i){if(Object.keys(t).length!==Object.keys(i).length)return!1;for(const a in t)if(t[a]!==i[a])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Tl.close,{},t)}_onError(t){this._on(Tl.error,{},i=>t(i))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=io.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const i={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(i.new=P1(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(i.old=P1(t.columns,t.old_record)),i}}const $k=()=>{},Gk=typeof WebSocket<"u",qk=` 62 addEventListener("message", (e) => { 63 if (e.data.event === "start") { 64 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 65 } 66 });`;class Hk{constructor(t,i){var a;this.accessTokenValue=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=Rk,this.params={},this.timeout=PP,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=$k,this.conn=null,this.sendBuffer=[],this.serializer=new Xk,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=m=>{let g;return m?g=m:typeof fetch>"u"?g=(...s)=>np(async()=>{const{default:Y}=await Promise.resolve().then(()=>pp);return{default:Y}},void 0).then(({default:Y})=>Y(...s)):g=fetch,(...s)=>g(...s)},this.endPoint=`${t}/${bw.websocket}`,this.httpEndpoint=CP(t),i!=null&&i.transport?this.transport=i.transport:this.transport=null,i!=null&&i.params&&(this.params=i.params),i!=null&&i.headers&&(this.headers=Object.assign(Object.assign({},this.headers),i.headers)),i!=null&&i.timeout&&(this.timeout=i.timeout),i!=null&&i.logger&&(this.logger=i.logger),i!=null&&i.heartbeatIntervalMs&&(this.heartbeatIntervalMs=i.heartbeatIntervalMs);const h=(a=i==null?void 0:i.params)===null||a===void 0?void 0:a.apikey;if(h&&(this.accessTokenValue=h,this.apiKey=h),this.reconnectAfterMs=i!=null&&i.reconnectAfterMs?i.reconnectAfterMs:m=>[1e3,2e3,5e3,1e4][m-1]||1e4,this.encode=i!=null&&i.encode?i.encode:(m,g)=>g(JSON.stringify(m)),this.decode=i!=null&&i.decode?i.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new IP(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(i==null?void 0:i.fetch),i!=null&&i.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(i==null?void 0:i.worker)||!1,this.workerUrl=i==null?void 0:i.workerUrl}this.accessToken=(i==null?void 0:i.accessToken)||null}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this.endpointURL(),void 0,{headers:this.headers});return}if(Gk){this.conn=new WebSocket(this.endpointURL()),this.setupConnection();return}this.conn=new Kk(this.endpointURL(),void 0,{close:()=>{this.conn=null}}),np(async()=>{const{default:t}=await import("./browser-DSbno8Tx.js").then(i=>i.b);return{default:t}},[]).then(({default:t})=>{this.conn=new t(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:Lk}))}disconnect(t,i){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,i??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(t){const i=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),i}async removeAllChannels(){const t=await Promise.all(this.channels.map(i=>i.unsubscribe()));return this.disconnect(),t}log(t,i,a){this.logger(t,i,a)}connectionState(){switch(this.conn&&this.conn.readyState){case ep.connecting:return Wd.Connecting;case ep.open:return Wd.Open;case ep.closing:return Wd.Closing;default:return Wd.Closed}}isConnected(){return this.connectionState()===Wd.Open}channel(t,i={config:{}}){const a=new lY(`realtime:${t}`,i,this);return this.channels.push(a),a}push(t){const{topic:i,event:a,payload:h,ref:m}
66=t,g=()=>{this.encode(t,s=>{var Y;(Y=this.conn)===null||Y===void 0||Y.send(s)})};this.log("push",`${i} ${a} (${m})`,h),this.isConnected()?g():this.sendBuffer.push(g)}async setAuth(t=null){let i=t||this.accessToken&&await this.accessToken()||this.accessTokenValue;if(i){let a=null;try{a=JSON.parse(atob(i.split(".")[1]))}catch{}if(a&&a.exp&&!(Math.floor(Date.now()/1e3)-a.exp<0))return this.log("auth",`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${a.exp}`),Promise.reject(`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${a.exp}`);this.accessTokenValue=i,this.channels.forEach(h=>{i&&h.updateJoinPayload({access_token:i}),h.joinedOnce&&h._isJoined()&&h._push(Tl.access_token,{access_token:i})})}}async sendHeartbeat(){var t;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(t=this.conn)===null||t===void 0||t.close(Ok,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth()}}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let i=this.channels.find(a=>a.topic===t&&(a._isJoined()||a._isJoining()));i&&(this.log("transport",`leaving duplicate topic "${t}"`),i.unsubscribe())}_remove(t){this.channels=this.channels.filter(i=>i._joinRef()!==t._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_onConnMessage(t){this.decode(t.data,i=>{let{topic:a,event:h,payload:m,ref:g}=i;g&&g===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${m.status||""} ${a} ${h} ${g&&"("+g+")"||""}`,m),this.channels.filter(s=>s._isMember(a)).forEach(s=>s._trigger(h,m,g)),this.stateChangeCallbacks.message.forEach(s=>s(i))})}async _onConnOpen(){if(this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),!this.worker)this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs);else{this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=i=>{this.log("worker","worker error",i.message),this.workerRef.terminate()},this.workerRef.onmessage=i=>{i.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}this.stateChangeCallbacks.open.forEach(t=>t())}_onConnClose(t){this.log("transport","close",t),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(i=>i(t))}_onConnError(t){this.log("transport",t.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(i=>i(t))}_triggerChanError(){this.channels.forEach(t=>t._trigger(Tl.error))}_appendParams(t,i){if(Object.keys(i).length===0)return t;const a=t.match(/\?/)?"&":"?",h=new URLSearchParams(i);return`${t}${a}${h}`}_workerObjectUrl(t){let i;if(t)i=t;else{const a=new Blob([qk],{type:"application/javascript"});i=URL.createObjectURL(a)}return i}}class Kk{constructor(t,i,a){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=ep.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=a.close}}class uY extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function xa(n){return typeof n=="object"&&n!==null&&"__isStorageError"in n}class Qk extends uY{constructor(t,i){super(t),this.name="StorageApiError",this.status=i}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Yw extends uY{constructor(t,i){super(t),this.name="StorageUnknownError",this.originalError=i}}var Jk=function(n,t,i,a){function h(m){return m instanceof i?m:new i(function(g){g(m)}
66)}return new(i||(i=Promise))(function(m,g){function s(I){try{E(a.next(I))}catch(k){g(k)}}function Y(I){try{E(a.throw(I))}catch(k){g(k)}}function E(I){I.done?m(I.value):h(I.value).then(s,Y)}E((a=a.apply(n,t||[])).next())})};const VP=n=>{let t;return n?t=n:typeof fetch>"u"?t=(...i)=>np(async()=>{const{default:a}=await Promise.resolve().then(()=>pp);return{default:a}},void 0).then(({default:a})=>a(...i)):t=fetch,(...i)=>t(...i)},eD=()=>Jk(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield np(()=>Promise.resolve().then(()=>pp),void 0)).Response:Response}),Sw=n=>{if(Array.isArray(n))return n.map(i=>Sw(i));if(typeof n=="function"||n!==Object(n))return n;const t={};return Object.entries(n).forEach(([i,a])=>{const h=i.replace(/([-_][a-z])/gi,m=>m.toUpperCase().replace(/[-_]/g,""));t[h]=Sw(a)}),t};var Nd=function(n,t,i,a){function h(m){return m instanceof i?m:new i(function(g){g(m)})}return new(i||(i=Promise))(function(m,g){function s(I){try{E(a.next(I))}catch(k){g(k)}}function Y(I){try{E(a.throw(I))}catch(k){g(k)}}function E(I){I.done?m(I.value):h(I.value).then(s,Y)}E((a=a.apply(n,t||[])).next())})};const y_=n=>n.msg||n.message||n.error_description||n.error||JSON.stringify(n),tD=(n,t,i)=>Nd(void 0,void 0,void 0,function*(){const a=yield eD();n instanceof a&&!(i!=null&&i.noResolveJson)?n.json().then(h=>{t(new Qk(y_(h),n.status||500))}).catch(h=>{t(new Yw(y_(h),h))}):t(new Yw(y_(n),n))}),rD=(n,t,i,a)=>{const h={method:n,headers:(t==null?void 0:t.headers)||{}};return n==="GET"?h:(h.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),a&&(h.body=JSON.stringify(a)),Object.assign(Object.assign({},h),i))};function dg(n,t,i,a,h,m){return Nd(this,void 0,void 0,function*(){return new Promise((g,s)=>{n(i,rD(t,a,h,m)).then(Y=>{if(!Y.ok)throw Y;return a!=null&&a.noResolveJson?Y:Y.json()}).then(Y=>g(Y)).catch(Y=>tD(Y,s,a))})})}function Zy(n,t,i,a){return Nd(this,void 0,void 0,function*(){return dg(n,"GET",t,i,a)})}function uh(n,t,i,a,h){return Nd(this,void 0,void 0,function*(){return dg(n,"POST",t,a,h,i)})}function nD(n,t,i,a,h){return Nd(this,void 0,void 0,function*(){return dg(n,"PUT",t,a,h,i)})}function iD(n,t,i,a){return Nd(this,void 0,void 0,function*(){return dg(n,"HEAD",t,Object.assign(Object.assign({},i),{noResolveJson:!0}),a)})}function AP(n,t,i,a,h){return Nd(this,void 0,void 0,function*(){return dg(n,"DELETE",t,a,h,i)})}var Ls=function(n,t,i,a){function h(m){return m instanceof i?m:new i(function(g){g(m)})}return new(i||(i=Promise))(function(m,g){function s(I){try{E(a.next(I))}catch(k){g(k)}}function Y(I){try{E(a.throw(I))}catch(k){g(k)}}function E(I){I.done?m(I.value):h(I.value).then(s,Y)}E((a=a.apply(n,t||[])).next())})};const aD={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},V1={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class sD{constructor(t,i={},a,h){this.url=t,this.headers=i,this.bucketId=a,this.fetch=VP(h)}uploadOrUpdate(t,i,a,h){return Ls(this,void 0,void 0,function*(){try{let m;const g=Object.assign(Object.assign({},V1),h);let s=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(g.upsert)});const Y=g.metadata;typeof Blob<"u"&&a instanceof Blob?(m=new FormData,m.append("cacheControl",g.cacheControl),Y&&m.append("metadata",this.encodeMetadata(Y)),m.a
66ppend("",a)):typeof FormData<"u"&&a instanceof FormData?(m=a,m.append("cacheControl",g.cacheControl),Y&&m.append("metadata",this.encodeMetadata(Y))):(m=a,s["cache-control"]=`max-age=${g.cacheControl}`,s["content-type"]=g.contentType,Y&&(s["x-metadata"]=this.toBase64(this.encodeMetadata(Y)))),h!=null&&h.headers&&(s=Object.assign(Object.assign({},s),h.headers));const E=this._removeEmptyFolders(i),I=this._getFinalPath(E),k=yield this.fetch(`${this.url}/object/${I}`,Object.assign({method:t,body:m,headers:s},g!=null&&g.duplex?{duplex:g.duplex}:{})),D=yield k.json();return k.ok?{data:{path:E,id:D.Id,fullPath:D.Key},error:null}:{data:null,error:D}}catch(m){if(xa(m))return{data:null,error:m};throw m}})}upload(t,i,a){return Ls(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,i,a)})}uploadToSignedUrl(t,i,a,h){return Ls(this,void 0,void 0,function*(){const m=this._removeEmptyFolders(t),g=this._getFinalPath(m),s=new URL(this.url+`/object/upload/sign/${g}`);s.searchParams.set("token",i);try{let Y;const E=Object.assign({upsert:V1.upsert},h),I=Object.assign(Object.assign({},this.headers),{"x-upsert":String(E.upsert)});typeof Blob<"u"&&a instanceof Blob?(Y=new FormData,Y.append("cacheControl",E.cacheControl),Y.append("",a)):typeof FormData<"u"&&a instanceof FormData?(Y=a,Y.append("cacheControl",E.cacheControl)):(Y=a,I["cache-control"]=`max-age=${E.cacheControl}`,I["content-type"]=E.contentType);const k=yield this.fetch(s.toString(),{method:"PUT",body:Y,headers:I}),D=yield k.json();return k.ok?{data:{path:m,fullPath:D.Key},error:null}:{data:null,error:D}}catch(Y){if(xa(Y))return{data:null,error:Y};throw Y}})}createSignedUploadUrl(t,i){return Ls(this,void 0,void 0,function*(){try{let a=this._getFinalPath(t);const h=Object.assign({},this.headers);i!=null&&i.upsert&&(h["x-upsert"]="true");const m=yield uh(this.fetch,`${this.url}/object/upload/sign/${a}`,{},{headers:h}),g=new URL(this.url+m.url),s=g.searchParams.get("token");if(!s)throw new uY("No token returned by API");return{data:{signedUrl:g.toString(),path:t,token:s},error:null}}catch(a){if(xa(a))return{data:null,error:a};throw a}})}update(t,i,a){return Ls(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,i,a)})}move(t,i,a){return Ls(this,void 0,void 0,function*(){try{return{data:yield uh(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:i,destinationBucket:a==null?void 0:a.destinationBucket},{headers:this.headers}),error:null}}catch(h){if(xa(h))return{data:null,error:h};throw h}})}copy(t,i,a){return Ls(this,void 0,void 0,function*(){try{return{data:{path:(yield uh(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:i,destinationBucket:a==null?void 0:a.destinationBucket},{headers:this.headers})).Key},error:null}}catch(h){if(xa(h))return{data:null,error:h};throw h}})}createSignedUrl(t,i,a){return Ls(this,void 0,void 0,function*(){try{let h=this._getFinalPath(t),m=yield uh(this.fetch,`${this.url}/object/sign/${h}`,Object.assign({expiresIn:i},a!=null&&a.transform?{transform:a.transform}:{}),{headers:this.headers});const g=a!=null&&a.download?`&download=${a.download===!0?"":a.download}`:"";return m={signedUrl:encodeURI(`${this.url}${m.signedURL}${g}`)},{data:m,error:null}}catch(h){if(xa(h))return{data:null,error:h};throw h}})}createSignedUrls(t,i,a){return Ls(this,void 0,void 0,function*(){try{const h=yield uh(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:i,paths:t},{headers:this.headers}),m=a!=null&&a.download?`&download=${a.download===!0?"":a.download}`:"";return{data:h.map(g=>Object.assign(Object.assign({},g),{signedUrl:g.signedURL?encodeURI(`${this.url}${g.signedURL}${m}`):null})),error:null}}catch(h){if(xa(h))return{data:null,error:h};throw h}})}download(t,i){return Ls(this,void 0,void 0,function*(){const h=typeof(i==null?void 0:i.transform)<"u"?"render/image/authenticated":"object",m=this.transformOptsToQueryString((i==null?void 0:i.transform)||{}),g=m?`?${m}`:"";try{const s=this._getFinalPath(t);return{data:yield(yield Zy(this.fetch,`${this.url}/${h}/${s}${g}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(s){if(xa(s))return{data:null,error:s};throw s}})}info(t){return Ls(this,void 0,void 0,function*(){const i=this._getFinalPath(t);try{const a=yield Zy(this.fetch,`${this.url}/object/info/${i}`,{headers:this.headers});return{data:Sw(a),error:null}}catch(a){if(xa(a))return{data:null,error:a};throw a}})}exists(t){return Ls(this,void 0,void 0,function*(){const i=this._getFinalPath(t);try{return yield iD(this.fetch,`${this.url}/object/${i}`,{headers:this.headers}),{data:!0,error:null}}catch(a){if(xa(a)&&a instanceof Yw){const h=a.originalError;if([400,404].includes(h==null?void 0:h.status))return{data:!1,error:a}}throw a}})}getPublicUrl(t,i){const a=this._getFinalPath(t),h=[],m=i!=null&&i.download?`download=${i.download===!0?"":i.download}`:"";m!==""&&h.push(m);const s=typeof(i==null?void 0:i.transform)<"u"?"render/image":"object",Y=this.transformOptsToQueryString((i==null?void 0:i.transform)||{});Y!==""&&h.push(Y);let E=h.join("&");return E!==""&&(E=`?${E}`),{data:{publicUrl:encodeURI(`${this.url}/${s}/public/${a}${E}`)}}}remove(t){return Ls(this,void 0,void 0,function*(){try{return{data:yield AP(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(i){if(xa(i))return{data:null,error:i};throw i}})}list(t,i,a){return Ls(this,void 0,void 0,function*(){try{const h=Object.assign(Object.assign(Object.assign({},aD),i),{prefix:t||""});return{data:yield uh(this.fetch,`${this.url}/object/list/${this.bucketId}`,h,{headers:this.headers},a),error:null}}catch(h){if(xa(h))return{data:null,error:h};throw h}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const i=[];return t.width&&i.push(`width=${t.width}`),t.height&&i.push(`height=${t.height}`),t.resize&&i.push(`resize=${t.resize}`),t.format&&i.push(`format=${t.format}`),t.quality&&i.push(`quality=${t.quality}`),i.join("&")}}const oD="2.7.1",lD={"X-Client-Info":`storage-js/${oD}`};var zf=function(n,t,i,a){function h(m){return m instanceof i?m:new i(function(g){g(m)}
66)}return new(i||(i=Promise))(function(m,g){function s(I){try{E(a.next(I))}catch(k){g(k)}}function Y(I){try{E(a.throw(I))}catch(k){g(k)}}function E(I){I.done?m(I.value):h(I.value).then(s,Y)}E((a=a.apply(n,t||[])).next())})};class uD{constructor(t,i={},a){this.url=t,this.headers=Object.assign(Object.assign({},lD),i),this.fetch=VP(a)}listBuckets(){return zf(this,void 0,void 0,function*(){try{return{data:yield Zy(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(xa(t))return{data:null,error:t};throw t}})}getBucket(t){return zf(this,void 0,void 0,function*(){try{return{data:yield Zy(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(i){if(xa(i))return{data:null,error:i};throw i}})}createBucket(t,i={public:!1}){return zf(this,void 0,void 0,function*(){try{return{data:yield uh(this.fetch,`${this.url}/bucket`,{id:t,name:t,public:i.public,file_size_limit:i.fileSizeLimit,allowed_mime_types:i.allowedMimeTypes},{headers:this.headers}),error:null}}catch(a){if(xa(a))return{data:null,error:a};throw a}})}updateBucket(t,i){return zf(this,void 0,void 0,function*(){try{return{data:yield nD(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:i.public,file_size_limit:i.fileSizeLimit,allowed_mime_types:i.allowedMimeTypes},{headers:this.headers}),error:null}}catch(a){if(xa(a))return{data:null,error:a};throw a}})}emptyBucket(t){return zf(this,void 0,void 0,function*(){try{return{data:yield uh(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(i){if(xa(i))return{data:null,error:i};throw i}})}deleteBucket(t){return zf(this,void 0,void 0,function*(){try{return{data:yield AP(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(i){if(xa(i))return{data:null,error:i};throw i}})}}class cD extends uD{constructor(t,i={},a){super(t,i,a)}from(t){return new sD(this.url,this.headers,t,this.fetch)}}const hD="2.49.4";let Um="";typeof Deno<"u"?Um="deno":typeof document<"u"?Um="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Um="react-native":Um="node";const dD={"X-Client-Info":`supabase-js-${Um}/${hD}`},fD={headers:dD},pD={schema:"public"},mD={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},gD={};var yD=function(n,t,i,a){function h(m){return m instanceof i?m:new i(function(g){g(m)})}return new(i||(i=Promise))(function(m,g){function s(I){try{E(a.next(I))}catch(k){g(k)}}function Y(I){try{E(a.throw(I))}catch(k){g(k)}}function E(I){I.done?m(I.value):h(I.value).then(s,Y)}E((a=a.apply(n,t||[])).next())})};const vD=n=>{let t;return n?t=n:typeof fetch>"u"?t=YP:t=fetch,(...i)=>t(...i)},_D=()=>typeof Headers>"u"?SP:Headers,xD=(n,t,i)=>{const a=vD(i),h=_D();return(m,g)=>yD(void 0,void 0,void 0,function*(){var s;const Y=(s=yield t())!==null&&s!==void 0?s:n;let E=new h(g==null?void 0:g.headers);return E.has("apikey")||E.set("apikey",n),E.has("Authorization")||E.set("Authorization",`Bearer ${Y}`),a(m,Object.assign(Object.assign({},g),{headers:E}))})};var bD=function(n,t,i,a){function h(m){return m instanceof i?m:new i(function(g){g(m)})}return new(i||(i=Promise))(function(m,g){function s(I){try{E(a.next(I))}catch(k){g(k)}}function Y(I){try{E(a.throw(I))}catch(k){g(k)}}function E(I){I.done?m(I.value):h(I.value).then(s,Y)}E((a=a.apply(n,t||[])).next())})};function wD(n){return n.replace(/\/$/,"")}function YD(n,t){const{db:i,auth:a,realtime:h,global:m}=n,{db:g,auth:s,realtime:Y,global:E}=t,I={db:Object.assign(Object.assign({},g),i),auth:Object.assign(Object.assign({},s),a),realtime:Object.assign(Object.assign({},Y),h),global:Object.assign(Object.assign({},E),m),accessToken:()=>bD(this,void 0,void 0,function*(){return""})};return n.accessToken?I.accessToken=n.accessToken:delete I.accessToken,I}const kP="2.69.1",Hf=30*1e3,Tw=3,v_=Tw*Hf,SD="http://localhost:9999",TD="supabase.auth.token",WD={"X-Client-Info":`gotrue-js/${kP}`},Ww="X-Supabase-Api-Version",DP={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},ED=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,MD=6e5;
66class cY extends Error{constructor(t,i,a){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=i,this.code=a}}function kr(n){return typeof n=="object"&&n!==null&&"__isAuthError"in n}class PD extends cY{constructor(t,i,a){super(t,i,a),this.name="AuthApiError",this.status=i,this.code=a}}function ID(n){return kr(n)&&n.name==="AuthApiError"}class RP extends cY{constructor(t,i){super(t),this.name="AuthUnknownError",this.originalError=i}}class bh extends cY{constructor(t,i,a,h){super(t,a,h),this.name=i,this.status=a}}class oh extends bh{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function UD(n){return kr(n)&&n.name==="AuthSessionMissingError"}class __ extends bh{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class oy extends bh{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class ly extends bh{constructor(t,i=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=i}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function CD(n){return kr(n)&&n.name==="AuthImplicitGrantRedirectError"}class A1 extends bh{constructor(t,i=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=i}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Ew extends bh{constructor(t,i){super(t,"AuthRetryableFetchError",i,void 0)}}function x_(n){return kr(n)&&n.name==="AuthRetryableFetchError"}class k1 extends bh{constructor(t,i,a){super(t,"AuthWeakPasswordError",i,"weak_password"),this.reasons=a}}class Xm extends bh{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const D1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),R1=` 67\r=`.split(""),VD=(()=>{const n=new Array(128);for(let t=0;t<n.length;t+=1)n[t]=-1;for(let t=0;t<R1.length;t+=1)n[R1[t].charCodeAt(0)]=-2;for(let t=0;t<D1.length;t+=1)n[D1[t].charCodeAt(0)]=t;return n})();function LP(n,t,i){const a=VD[n];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)i(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(n)}"`)}}function L1(n){const t=[],i=g=>{t.push(String.fromCodePoint(g))},a={utf8seq:0,codepoint:0},h={queue:0,queuedBits:0},m=g=>{DD(g,a,i)};for(let g=0;g<n.length;g+=1)LP(n.charCodeAt(g),h,m);return t.join("")}function AD(n,t){if(n<=127){t(n);return}else if(n<=2047){t(192|n>>6),t(128|n&63);return}else if(n<=65535){t(224|n>>12),t(128|n>>6&63),t(128|n&63);return}else if(n<=1114111){t(240|n>>18),t(128|n>>12&63),t(128|n>>6&63),t(128|n&63);return}throw new Error(`Unrecognized Unicode codepoint: ${n.toString(16)}`)}function kD(n,t){for(let i=0;i<n.length;i+=1){let a=n.charCodeAt(i);if(a>55295&&a<=56319){const h=(a-55296)*1024&65535;a=(n.charCodeAt(i+1)-56320&65535|h)+65536,i+=1}AD(a,t)}}function DD(n,t,i){if(t.utf8seq===0){if(n<=127){i(n);return}for(let a=1;a<6;a+=1)if((n>>7-a&1)===0){t.utf8seq=a;break}if(t.utf8seq===2)t.codepoint=n&31;else if(t.utf8seq===3)t.codepoint=n&15;else if(t.utf8seq===4)t.codepoint=n&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(n<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|n&63,t.utf8seq-=1,t.utf8seq===0&&i(t.codepoint)}}function RD(n){const t=[],i={queue:0,queuedBits:0},a=h=>{t.push(h)};for(let h=0;h<n.length;h+=1)LP(n.charCodeAt(h),i,a);return new Uint8Array(t)}function LD(n){const t=[];return kD(n,i=>t.push(i)),new Uint8Array(t)}function OD(n){return Math.round(Date.now()/1e3)+n}function XD(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const t=Math.random()*16|0;return(n=="x"?t:t&3|8).toString(16)})}const mu=()=>typeof window<"u"&&typeof document<"u",xd={tested:!1,writable:!1},Nm=()=>{if(!mu())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(xd.tested)return xd.writable;const n=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(n,n),globalThis.localStorage.removeItem(n),xd.tested=!0,xd.writable=!0}catch{xd.tested=!0,xd.writable=!1}return xd.writable};function ND(n){const t={},i=new URL(n);if(i.hash&&i.hash[0]==="#")try{new URLSearchParams(i.hash.substring(1)).forEac
67h((h,m)=>{t[m]=h})}catch{}return i.searchParams.forEach((a,h)=>{t[h]=a}),t}const OP=n=>{let t;return n?t=n:typeof fetch>"u"?t=(...i)=>np(async()=>{const{default:a}=await Promise.resolve().then(()=>pp);return{default:a}},void 0).then(({default:a})=>a(...i)):t=fetch,(...i)=>t(...i)},zD=n=>typeof n=="object"&&n!==null&&"status"in n&&"ok"in n&&"json"in n&&typeof n.json=="function",XP=async(n,t,i)=>{await n.setItem(t,JSON.stringify(i))},uy=async(n,t)=>{const i=await n.getItem(t);if(!i)return null;try{return JSON.parse(i)}catch{return i}},cy=async(n,t)=>{await n.removeItem(t)};class uv{constructor(){this.promise=new uv.promiseConstructor((t,i)=>{this.resolve=t,this.reject=i})}}uv.promiseConstructor=Promise;function b_(n){const t=n.split(".");if(t.length!==3)throw new Xm("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!ED.test(t[a]))throw new Xm("JWT not in base64url format");return{header:JSON.parse(L1(t[0])),payload:JSON.parse(L1(t[1])),signature:RD(t[2]),raw:{header:t[0],payload:t[1]}}}async function FD(n){return await new Promise(t=>{setTimeout(()=>t(null),n)})}function ZD(n,t){return new Promise((a,h)=>{(async()=>{for(let m=0;m<1/0;m++)try{const g=await n(m);if(!t(m,null,g)){a(g);return}}catch(g){if(!t(m,g)){h(g);return}}})()})}function jD(n){return("0"+n.toString(16)).substr(-2)}function BD(){const t=new Uint32Array(56);if(typeof crypto>"u"){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=i.length;let h="";for(let m=0;m<56;m++)h+=i.charAt(Math.floor(Math.random()*a));return h}return crypto.getRandomValues(t),Array.from(t,jD).join("")}async function $D(n){const i=new TextEncoder().encode(n),a=await crypto.subtle.digest("SHA-256",i),h=new Uint8Array(a);return Array.from(h).map(m=>String.fromCharCode(m)).join("")}async function GD(n){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),n;const i=await $D(n);return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ff(n,t,i=!1){const a=BD();let h=a;i&&(h+="/PASSWORD_RECOVERY"),await XP(n,`${t}-code-verifier`,h);const m=await GD(a);return[m,a===m?"plain":"s256"]}const qD=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function HD(n){const t=n.headers.get(Ww);if(!t||!t.match(qD))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function KD(n){if(!n)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(n<=t)throw new Error("JWT has expired")}function QD(n){switch(n){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}var JD=function(n,t){var i={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&t.indexOf(a)<0&&(i[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,a=Object.getOwnPropertySymbols(n);h<a.length;h++)t.indexOf(a[h])<0&&Object.prototype.propertyIsEnumerable.call(n,a[h])&&(i[a[h]]=n[a[h]]);return i};const Yd=n=>n.msg||n.message||n.error_description||n.error||JSON.stringify(n),eR=[502,503,504];async function O1(n){var t;if(!zD(n))throw new Ew(Yd(n),0);if(eR.includes(n.status))throw new Ew(Yd(n),n.status);let i;try{i=await n.json()}catch(m){throw new RP(Yd(m),m)}let a;const h=HD(n);if(h&&h.getTime()>=DP["2024-01-01"].timestamp&&typeof i=="object"&&i&&typeof i.code=="string"?a=i.code:typeof i=="object"&&i&&typeof i.error_code=="string"&&(a=i.error_code),a){if(a==="weak_password")throw new k1(Yd(i),n.status,((t=i.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new oh}else if(typeof i=="object"&&i&&typeof i.weak_password=="object"&&i.weak_password&&Array.isArray(i.weak_password.reasons)&&i.weak_password.reasons.length&&i.weak_password.reasons.reduce((m,g)=>m&&typeof g=="string",!0))throw new k1(Yd(i),n.status,i.weak_password.reasons);throw new PD(Yd(i),n.status||500,a)}const tR=(n,t,i,a)=>{const h={method:n,headers:(t==null?void 0:t.headers)||{}};return n==="GET"?h:(h.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),h.body=JSON.stringify(a),Object.assign(Object.assign({},h),i))};async function $r(n,t,i,a){var h;const m=Object.assign({},a==null?void 0:a.headers);m[Ww]||(m[Ww]=DP["2024-01-01"].name),a!=null&&a.jwt&&(m.Authorization=`Bearer ${a.jwt}`);const g=(h=a==null?void 0:a.query)!==null&&h!==void 0?h:{};a!=null&&a.redirectTo&&(g.redirect_to=a.redirectTo);const s=Object.keys(g).length?"?"+new URLSearchParams(g).toString():"",Y=await rR(n,t,i+s,{headers:m,noResolveJson:a==null?void 0:a.noResolveJson},{},a==null?void 0:a.body);return a!=null&&a.xform?a==null?void 0:a.xform(Y):{data:Object.assign({},Y),error:null}}async function rR(n,t,i,a,h,m){const g=tR(t,a,h,m);let s;try{s=await n(i,Object.assign({},g))}catch(Y){throw console.error(Y),new Ew(Yd(Y),0)}if(s.ok||await O1(s),a!=null&&a.noResolveJson)return s;try{return await s.json()}catch(Y){await O1(Y)}}function lh(n){var t;let i=null;sR(n)&&(i=Object.assign({},n),n.expires_at||(i.expires_at=OD(n.expires_in)));const a=(t=n.user)!==null&&t!==void 0?t:n;return{data:{session:i,user:a},error:null}}function X1(n){const t=lh(n);return!t.error&&n.weak_password&&typeof n.weak_password=="object"&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.message&&typeof n.weak_password.message=="string"&&n.weak_password.reasons.reduce((i,a)=>
vendor: 4,833 bytes, line 67
67i&&typeof a=="string",!0)&&(t.data.weak_password=n.weak_password),t}function dh(n){var t;return{data:{user:(t=n.user)!==null&&t!==void 0?t:n},error:null}}function nR(n){return{data:n,error:null}}function iR(n){const{action_link:t,email_otp:i,hashed_token:a,redirect_to:h,verification_type:m}=n,g=JD(n,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),s={action_link:t,email_otp:i,hashed_token:a,redirect_to:h,verification_type:m},Y=Object.assign({},g);return{data:{properties:s,user:Y},error:null}}function aR(n){return n}function sR(n){return n.access_token&&n.refresh_token&&n.expires_in}var oR=function(n,t){var i={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&t.indexOf(a)<0&&(i[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,a=Object.getOwnPropertySymbols(n);h<a.length;h++)t.indexOf(a[h])<0&&Object.prototype.propertyIsEnumerable.call(n,a[h])&&(i[a[h]]=n[a[h]]);return i};class lR{constructor({url:t="",headers:i={},fetch:a}){this.url=t,this.headers=i,this.fetch=OP(a),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,i="global"){try{return await $r(this.fetch,"POST",`${this.url}/logout?scope=${i}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(kr(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,i={}){try{return await $r(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:i.data},headers:this.headers,redirectTo:i.redirectTo,xform:dh})}catch(a){if(kr(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:i}=t,a=oR(t,["options"]),h=Object.assign(Object.assign({},a),i);return"newEmail"in a&&(h.new_email=a==null?void 0:a.newEmail,delete h.newEmail),await $r(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:h,headers:this.headers,xform:iR,redirectTo:i==null?void 0:i.redirectTo})}catch(i){if(kr(i))return{data:{properties:null,user:null},error:i};throw i}}async createUser(t){try{return await $r(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:dh})}catch(i){if(kr(i))return{data:{user:null},error:i};throw i}}async listUsers(t){var i,a,h,m,g,s,Y;try{const E={nextPage:null,lastPage:0,total:0},I=await $r(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(i=t==null?void 0:t.page)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:"",per_page:(m=(h=t==null?void 0:t.perPage)===null||h===void 0?void 0:h.toString())!==null&&m!==void 0?m:""},xform:aR});if(I.error)throw I.error;const k=await I.json(),D=(g=I.headers.get("x-total-count"))!==null&&g!==void 0?g:0,V=(Y=(s=I.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&Y!==void 0?Y:[];return V.length>0&&(V.forEach(F=>{const $=parseInt(F.split(";")[0].split("=")[1].substring(0,1)),Q=JSON.parse(F.split(";")[1].split("=")[1]);E[`${Q}Page`]=$}),E.total=parseInt(D)),{data:Object.assign(Object.assign({},k),E),error:null}}catch(E){if(kr(E))return{data:{users:[]},error:E};throw E}}async getUserById(t){try{return await $r(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:dh})}catch(i){if(kr(i))return{data:{user:null},error:i};throw i}}async updateUserById(t,i){try{return await $r(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:i,headers:this.headers,xform:dh})}catch(a){if(kr(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,i=!1){try{return await $r(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:i},xform:dh})}catch(a){if(kr(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){try{const{data:i,error:a}=await $r(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:h=>({data:{factors:h},error:null})});return{data:i,error:a}}catch(i){if(kr(i))return{data:null,error:i};throw i}}async _deleteFactor(t){try{return{data:await $r(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(i){if(kr(i))return{data:null,error:i};throw i}}}const uR={getItem:n=>Nm()?globalThis.localStorage.getItem(n):null,setItem:(n,t)=>{Nm()&&globalThis.localStorage.setItem(n,t)},removeItem:n=>{Nm()&&globalThis.localStorage.removeItem(n)}};function N1(n={}){return{getItem:t=>n[t]||null,setItem:(t,i)=>{n[t]=i},removeItem:t=>{delete n[t]}}}function cR(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const Zf={debug:!!(globalThis&&Nm()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
67class NP extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class hR extends NP{}async function dR(n,t,i){Zf.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",n,t);const a=new globalThis.AbortController;return t>0&&setTimeout(()=>{a.abort(),Zf.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",n)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(n,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:a.signal},async h=>{if(h){Zf.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",n,h.name);try{return await i()}finally{Zf.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",n,h.name)}}else{if(t===0)throw Zf.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",n),new hR(`Acquiring an exclusive Navigator LockManager lock "${n}" immediately failed`);if(Zf.debug)try{const m=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(m,null," "))}catch(m){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",m)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await i()}}))}cR();const fR={url:SD,storageKey:TD,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:WD,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function z1(n,t,i){return await i()}class $m{constructor(t){var i,a;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=$m.nextInstanceID,$m.nextInstanceID+=1,this.instanceID>0&&mu()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const h=Object.assign(Object.assign({},fR),t);if(this.logDebugMessages=!!h.debug,typeof h.debug=="function"&&(this.logger=h.debug),this.persistSession=h.persistSession,this.storageKey=h.storageKey,this.autoRefreshToken=h.autoRefreshToken,this.admin=new lR({url:h.url,headers:h.headers,fetch:h.fetch}),this.url=h.url,this.headers=h.headers,this.fetch=OP(h.fetch),this.lock=h.lock||z1,this.detectSessionInUrl=h.detectSessionInUrl,this.flowType=h.flowType,this.hasCustomAuthorizationHeader=h.hasCustomAuthorizationHeader,h.lock?this.lock=h.lock:mu()&&(!((i=globalThis==null?void 0:globalThis.navigator)===null||i===void 0)&&i.locks)?this.lock=dR:this.lock=z1,this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?h.storage?this.storage=h.storage:Nm()?this.storage=uR:(this.memoryStorage={},this.storage=N1(this.memoryStorage)):(this.memoryStorage={},this.storage=N1(this.memoryStorage)),mu()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(m){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",m)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async m=>{this._debug("received broadcast notification from other tab or client",m),await this._notifyAllSubscribers(m.data.event,m.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${kP}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const i=ND(window.location.href);let a="none";if(this._isImplicitGrantCallback(i)?a="implicit":await this._isPKCECallback(i)&&(a="pkce"),mu()&&this.detectSessionInUrl&&a!=="none"){const{data:h,error:m}=await this._getSessionFromURL(i,a);if(m){if(this._debug("#_initialize()","error detecting session from URL",m),CD(m)){const Y=(t=m.details)===null||t===void 0?void 0:t.code;if(Y==="identity_already_exists"||Y==="identity_not_found"||Y==="single_identity_not_deletable")return{error:m}}return await this._removeSession(),{error:m}}const{session:g,redirectType:s}=h;return this._debug("#_initialize()","detected session in URL",g,"redirect type",s),await this._saveSession(g),setTimeout(async()=>{s==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",g):await this._notifyAllSubscribers("SIGNED_IN",g)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(i){return kr(i)?{error:i}:{error:new RP("Unexpected error during initialization",i)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var i,a,h;try{const m=await $r(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(h=t==null?void 0:t.options)===null||h===void 0?void 0:h.captchaToken}},xform:lh}),{data:g,error:s}=m;if(s||!g)return{data:{user:null,session:null},error:s};const Y=g.session,E=g.user;return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",Y)),{data:{user:E,session:Y},error:null}}catch(m){if(kr(m))return{data:{user:null,session:null},error:m};throw m}}async signUp(t){var i,a,h;try{let m;if("email"in t){const{email:I,password:k,options:D}=t;let V=null,F=null;this.flowType==="pkce"&&([V,F]=await Ff(this.storage,this.storageKey)),m=await $r(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:D==null?void 0:D.emailRedirectTo,body:{email:I,password:k,data:(i=D==null?void 0:D.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:D==null?void 0:D.captchaToken},code_challenge:V,code_challenge_method:F},xform:lh})}else if("phone"in t){const{phone:I,password:k,options:D}=t;m=await $r(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:I,password:k,data:(a=D==null?void 0:D.data)!==null&&a!==void 0?a:{},channel:(h=D==null?void 0:D.channel)!==null&&h!==void 0?h:"sms",gotrue_meta_security:{captcha_token:D==null?void 0:D.captchaToken}},xform:lh})}else throw new oy("You must provide either an email or phone number and a password");const{data:g,error:s}=m;if(s||!g)return{data:{user:null,session:null},error:s};const Y=g.session,E=g.user;return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",Y)),{data:{user:E,session:Y},error:null}}catch(m){if(kr(m))return{data:{user:null,session:null},error:m};throw m}}async signInWithPassword(t){try{let i;if("email"in t){const{email:m,password:g,options:s}=t;i=await $r(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:m,password:g,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:X1})}else if("phone"in t){const{phone:m,password:g,options:s}=t;i=await $r(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:m,password:g,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:X1})}else throw new oy("You must provide either an email or phone number and a password");const{data:a,error:h}=i;return h?{data:{user:null,session:null},error:h}:!a||!a.session||!a.user?{data:{user:null,session:null},error:new __}:(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:h})}catch(i){if(kr(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithOAuth(t){var i,a,h,m;return await this._handleProviderSignIn(t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(h=t.options)===null||h===void 0?void 0:h.queryParams,skipBrowserRedirect:(m=t.options)===null||m===void 0?void 0:m.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async _exchangeCodeForSession(t){const i=await uy(this.storage,`${this.storageKey}-code-verifier`),[a,h]=(i??"").split("/");try{const{data:m,error:g}=await $r(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:lh});if(await cy(this.storage,`${this.storageKey}-code-verifier`),g)throw g;return!m||!m.session||!m.user?{data:{user:null,session:null,redirectType:null},error:new __}:(m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),{data:Object.assign(Object.assign({},m),{redirectType:h??null}),error:g})}catch(m){if(kr(m))return{data:{user:null,session:null,redirectType:null},error:m};throw m}}async signInWithIdToken(t){try{const{options:i,provider:a,token:h,access_token:m,nonce:g}=t,s=await $r(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:h,access_token:m,nonce:g,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:lh}),{data:Y,error:E}=s;return E?{data:{user:null,session:null},error:E}:!Y||!Y.session||!Y.user?{data:{user:null,session:null},error:new __}:(Y.session&&(await this._saveSession(Y.session),await this._notifyAllSubscribers("SIGNED_IN",Y.session)),{data:Y,error:E})}catch(i){if(kr(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithOtp(t){var i,a,h,m,g;try{if("email"in t){const{email:s,options:Y}=t;let E=null,I=null;this.flowType==="pkce"&&([E,I]=await Ff(this.storage,this.storageKey));const{error:k}=await $r(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:s,data:(i=Y==null?void 0:Y.data)!==null&&i!==void 0?i:{},create_user:(a=Y==null?void 0:Y.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:Y==null?void 0:Y.captchaToken},code_challenge:E,code_challenge_method:I},redirectTo:Y==null?void 0:Y.emailRedirectTo});return{data:{user:null,session:null},error:k}}if("phone"in t){const{phone:s,options:Y}=t,{data:E,error:I}=await $r(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:s,data:(h=Y==null?void 0:Y.data)!==null&&h!==void 0?h:{},create_user:(m=Y==null?void 0:Y.shouldCreateUser)!==null&&m!==void 0?m:!0,gotrue_meta_security:{captcha_token:Y==null?void 0:Y.captchaToken},channel:(g=Y==null?void 0:Y.channel)!==null&&g!==void 0?g:"sms"}});return{data:{user:null,session:null,messageId:E==null?void 0:E.message_id},error:I}}throw new oy("You must provide either an email or phone number.")}catch(s){if(kr(s))return{data:{user:null,session:null},error:s};throw s}}async verifyOtp(t){var i,a;try{let h,m;"options"in t&&(h=(i=t.options)===null||i===void 0?void 0:i.redirectTo,m=(a=t.o
67ptions)===null||a===void 0?void 0:a.captchaToken);const{data:g,error:s}=await $r(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:m}}),redirectTo:h,xform:lh});if(s)throw s;if(!g)throw new Error("An error occurred on token verification.");const Y=g.session,E=g.user;return Y!=null&&Y.access_token&&(await this._saveSession(Y),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",Y)),{data:{user:E,session:Y},error:null}}catch(h){if(kr(h))return{data:{user:null,session:null},error:h};throw h}}async signInWithSSO(t){var i,a,h;try{let m=null,g=null;return this.flowType==="pkce"&&([m,g]=await Ff(this.storage,this.storageKey)),await $r(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(a=(i=t.options)===null||i===void 0?void 0:i.redirectTo)!==null&&a!==void 0?a:void 0}),!((h=t==null?void 0:t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:m,code_challenge_method:g}),headers:this.headers,xform:nR})}catch(m){if(kr(m))return{data:null,error:m};throw m}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:i},error:a}=t;if(a)throw a;if(!i)throw new oh;const{error:h}=await $r(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:i.access_token});return{data:{user:null,session:null},error:h}})}catch(t){if(kr(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const i=`${this.url}/resend`;if("email"in t){const{email:a,type:h,options:m}=t,{error:g}=await $r(this.fetch,"POST",i,{headers:this.headers,body:{email:a,type:h,gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}},redirectTo:m==null?void 0:m.emailRedirectTo});return{data:{user:null,session:null},error:g}}else if("phone"in t){const{phone:a,type:h,options:m}=t,{data:g,error:s}=await $r(this.fetch,"POST",i,{headers:this.headers,body:{phone:a,type:h,gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}}});return{data:{user:null,session:null,messageId:g==null?void 0:g.message_id},error:s}}throw new oy("You must provide either an email or phone number and a type")}catch(i){if(kr(i))return{data:{user:null,session:null},error:i};throw i}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async i=>i))}async _acquireLock(t,i){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),h=(async()=>(await a,await i()))();return this.pendingInLock.push((async()=>{try{await h}catch{}})()),h}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=i();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const h=[...this.pendingInLock];await Promise.all(h),this.pendingInLock.splice(0,h.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const i=await this.__loadSession();return await t(i)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const i=await uy(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",i),i!==null&&(this._isValidSession(i)?t=i:(this._debug("#getSession()","session from storage is not val
67id"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<v_:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.storage.isServer){let g=this.suppressGetSessionWarning;t=new Proxy(t,{get:(Y,E,I)=>(!g&&E==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),g=!0,this.suppressGetSessionWarning=!0),Reflect.get(Y,E,I))})}return{data:{session:t},error:null}}const{session:h,error:m}=await this._callRefreshToken(t.refresh_token);return m?{data:{session:null},error:m}:{data:{session:h},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await $r(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:dh}):await this._useSession(async i=>{var a,h,m;const{data:g,error:s}=i;if(s)throw s;return!(!((a=g.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new oh}:await $r(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(m=(h=g.session)===null||h===void 0?void 0:h.access_token)!==null&&m!==void 0?m:void 0,xform:dh})})}catch(i){if(kr(i))return UD(i)&&(await this._removeSession(),await cy(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:i};throw i}}async updateUser(t,i={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,i))}async _updateUser(t,i={}){try{return await this._useSession(async a=>{const{data:h,error:m}=a;if(m)throw m;if(!h.session)throw new oh;const g=h.session;let s=null,Y=null;this.flowType==="pkce"&&t.email!=null&&([s,Y]=await Ff(this.storage,this.storageKey));const{data:E,error:I}=await $r(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:i==null?void 0:i.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:s,code_challenge_method:Y}),jwt:g.access_token,xform:dh});if(I)throw I;return g.user=E.user,await this._saveSession(g),await this._notifyAllSubscribers("USER_UPDATED",g),{data:{user:g.user},error:null}})}catch(a){if(kr(a))return{data:{user:null},error:a};throw a}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new oh;const i=Date.now()/1e3;let a=i,h=!0,m=null;const{payload:g}=b_(t.access_token);if(g.exp&&(a=g.exp,h=a<=i),h){const{session:s,error:Y}=await this._callRefreshToken(t.refresh_token);if(Y)return{data:{user:null,session:null},error:Y};if(!s)return{data:{user:null,session:null},error:null};m=s}else{const{data:s,error:Y}=await this._getUser(t.access_token);if(Y)throw Y;m={access_token:t.access_token,refresh_token:t.refresh_token,user:s.user,token_type:"bearer",expires_in:a-i,expires_at:a},await this._saveSession(m),await this._notifyAllSubscribers("SIGNED_IN",m)}return{data:{user:m.user,session:m},error:null}}catch(i){if(kr(i))return{data:{session:null,user:null},error:i};throw i}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async i=>{var a;if(!t){const{data:g,error:s}=i;if(s)throw s;t=(a=g.session)!==null&&a!==void 0?a:void 0}if(!(t!=null&&t.refresh_token))throw new oh;const{session:h,error:m}=await this._callRefreshToken(t.refresh_token);return m?{data:{user:null,session:null},error:m}:h?{data:{user:h.user,session:h},error:null}:{data:{user:null,session:null},error:null}})}catch(i){if(kr(i))return{data:{user:null,session:null},error:i};throw i}}async _getSessionFromURL(t,i){try{if(!mu())throw new ly("No browser detected.");
67if(t.error||t.error_description||t.error_code)throw new ly(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(i){case"implicit":if(this.flowType==="pkce")throw new A1("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ly("Not a valid implicit grant flow url.");break;default:}if(i==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new A1("No code detected.");const{data:le,error:_e}=await this._exchangeCodeForSession(t.code);if(_e)throw _e;const fe=new URL(window.location.href);return fe.searchParams.delete("code"),window.history.replaceState(window.history.state,"",fe.toString()),{data:{session:le.session,redirectType:null},error:null}}const{provider_token:a,provider_refresh_token:h,access_token:m,refresh_token:g,expires_in:s,expires_at:Y,token_type:E}=t;if(!m||!s||!g||!E)throw new ly("No session defined in URL");const I=Math.round(Date.now()/1e3),k=parseInt(s);let D=I+k;Y&&(D=parseInt(Y));const V=D-I;V*1e3<=Hf&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${V}s, should have been closer to ${k}s`);const F=D-k;I-F>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",F,D,I):I-F<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",F,D,I);const{data:$,error:Q}=await this._getUser(m);if(Q)throw Q;const ae={provider_token:a,provider_refresh_token:h,access_token:m,expires_in:k,expires_at:D,refresh_token:g,token_type:E,user:$.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:ae,redirectType:t.type},error:null}}catch(a){if(kr(a))return{data:{session:null,redirectType:null},error:a};throw a}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const i=await uy(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&i)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async i=>{var a;const{data:h,error:m}=i;if(m)return{error:m};const g=(a=h.session)===null||a===void 0?void 0:a.access_token;if(g){const{error:s}=await this.admin.signOut(g,t);if(s&&!(ID(s)&&(s.status===404||s.status===401||s.status===403)))return{error:s}}return t!=="others"&&(await this._removeSession(),await cy(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const i=XD(),a={id:i,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",i),this.stateChangeEmitters.delete(i)}};return this._debug("#onAuthStateChange()","registered callback with id",i),this.stateChangeEmitters.set(i,a),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(i)})))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async i=>{var a,h;try{const{data:{session:m},error:g}=i;if(g)throw g;await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",m)),this._debug("INITIAL_SESSION","callback id",t,"session",m)}catch(m){await((h=this.stateChangeEmitters.get(t))===null||h===void 0?void 0:h.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",m),console.error(m)}})}async resetPasswordForEmail(t,i={}){let a=null,h=null;this.flowType==="pkce"&&([a,h]=await Ff(this.storage,this.storageKey,!0));try{return await $r(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:h,gotrue_meta_security:{captcha_token:i.captchaToken}},headers:this.headers,redirectTo:i.redirectTo})}catch(m){if(kr(m))return{data:null,error:m};throw m}}async getUserIdentities(){var t;try{const{data:i,error:a}=await this.getUser();if(a)throw a;return{data:{identities:(t=i.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(i){if(kr(i))return{data:null,error:i};throw i}}async linkIdentity(t){var i;try{const{data:a,error:h}=await this._useSession(async m=>{var g,s,Y,E,I;const{data:k,error:D}=m;if(D)throw D;const V=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(g=t.options)===null||g===void 0?void 0:g.redirectTo,scopes:(s=t.options)===null||s===void 0?void 0:s.scopes,queryParams:(Y=t.options)===null||Y===void 0?void 0:Y.queryParams,skipBrowserRedirect:!0});return await $r(this.fetch,"GET",V,{headers:this.headers,jwt:(I=(E=k.session)===null||E===void 0?void 0:E.access_token)!==null&&I!==void 0?I:void 0})});if(h)throw h;return mu()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(a==null?void 0:a.url),{data:{provider:t.provider,url:a==null?void 0:a.url},error:null}}catch(a){if(kr(a))return{data:{provider:t.provider,url:null},error:a};throw a}}async unlinkIdentity(t){try{return await this._useSession(async i=>{var a,h;const{data:m,error:g}=i;if(g)throw g;
67return await $r(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(h=(a=m.session)===null||a===void 0?void 0:a.access_token)!==null&&h!==void 0?h:void 0})})}catch(i){if(kr(i))return{data:null,error:i};throw i}}async _refreshAccessToken(t){const i=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{const a=Date.now();return await ZD(async h=>(h>0&&await FD(200*Math.pow(2,h-1)),this._debug(i,"refreshing attempt",h),await $r(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:lh})),(h,m)=>{const g=200*Math.pow(2,h);return m&&x_(m)&&Date.now()+g-a<Hf})}catch(a){if(this._debug(i,"error",a),kr(a))return{data:{session:null,user:null},error:a};throw a}finally{this._debug(i,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,i){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:i.redirectTo,scopes:i.scopes,queryParams:i.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",i,"url",a),mu()&&!i.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t;const i="#_recoverAndRefresh()";this._debug(i,"begin");try{const a=await uy(this.storage,this.storageKey);if(this._debug(i,"session from storage",a),!this._isValidSession(a)){this._debug(i,"session is not valid"),a!==null&&await this._removeSession();return}const h=((t=a.expires_at)!==null&&t!==void 0?t:1/0)*1e3-Date.now()<v_;if(this._debug(i,`session has${h?"":" not"} expired with margin of ${v_}s`),h){if(this.autoRefreshToken&&a.refresh_token){const{error:m}=await this._callRefreshToken(a.refresh_token);m&&(console.error(m),x_(m)||(this._debug(i,"refresh failed with a non-retryable error, removing the session",m),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",a)}catch(a){this._debug(i,"error",a),console.error(a);return}finally{this._debug(i,"end")}}async _callRefreshToken(t){var i,a;if(!t)throw new oh;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const h=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(h,"begin");try{this.refreshingDeferred=new uv;const{data:m,error:g}=await this._refreshAccessToken(t);if(g)throw g;if(!m.session)throw new oh;await this._saveSession(m.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",m.session);const s={session:m.session,error:null};return this.refreshingDeferred.resolve(s),s}catch(m){if(this._debug(h,"error",m),kr(m)){const g={session:null,error:m};return x_(m)||await this._removeSession(),(i=this.refreshingDeferred)===null||i===void 0||i.resolve(g),g}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(m),m}finally{this.refreshingDeferred=null,this._debug(h,"end")}}async _notifyAllSubscribers(t,i,a=!0){const h=`#_notifyAllSubscribers(${t})`;this._debug(h,"begin",i,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:i});const m=[],g=Array.from(this.stateChangeEmitters.values()).map(async s=>{try{await s.callback(t,i)}catch(Y){m.push(Y)}});if(await Promise.all(g),m.length>0){for(let s=0;s<m.length;s+=1)console.error(m[s]);throw m[0]}}finally{this._debug(h,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await XP(this.storage,this.storageKey,t)}async _removeSession(){this._debug("#_removeSession()"),await cy(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&mu()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(i){console.error("removing visibilitychange callback failed",i)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Hf);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async i=>{const{data:{session:a}}=i;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const h=Math.floor((a.expires_at*1e3-t)/Hf);this._debug("#_autoRefreshTokenTick()",`access token expires in ${h} ticks, a tick lasts ${Hf}ms, refresh threshold is ${Tw} ticks`),h<=Tw&&await this._callRefreshToken(a.refresh_token)})}catch(i){console.error("Auto refresh tick failed with error. This is likely a transient error.",i)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof NP)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!mu()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const i=`#_onVisibilityChanged(${t})`;this._debug(i,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>
67{if(document.visibilityState!=="visible"){this._debug(i,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,i,a){const h=[`provider=${encodeURIComponent(i)}`];if(a!=null&&a.redirectTo&&h.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a!=null&&a.scopes&&h.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[m,g]=await Ff(this.storage,this.storageKey),s=new URLSearchParams({code_challenge:`${encodeURIComponent(m)}`,code_challenge_method:`${encodeURIComponent(g)}`});h.push(s.toString())}if(a!=null&&a.queryParams){const m=new URLSearchParams(a.queryParams);h.push(m.toString())}return a!=null&&a.skipBrowserRedirect&&h.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${t}?${h.join("&")}`}async _unenroll(t){try{return await this._useSession(async i=>{var a;const{data:h,error:m}=i;return m?{data:null,error:m}:await $r(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(a=h==null?void 0:h.session)===null||a===void 0?void 0:a.access_token})})}catch(i){if(kr(i))return{data:null,error:i};throw i}}async _enroll(t){try{return await this._useSession(async i=>{var a,h;const{data:m,error:g}=i;if(g)return{data:null,error:g};const s=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:Y,error:E}=await $r(this.fetch,"POST",`${this.url}/factors`,{body:s,headers:this.headers,jwt:(a=m==null?void 0:m.session)===null||a===void 0?void 0:a.access_token});return E?{data:null,error:E}:(t.factorType==="totp"&&(!((h=Y==null?void 0:Y.totp)===null||h===void 0)&&h.qr_code)&&(Y.totp.qr_code=`data:image/svg+xml;utf-8,${Y.totp.qr_code}`),{data:Y,error:null})})}catch(i){if(kr(i))return{data:null,error:i};throw i}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async i=>{var a;const{data:h,error:m}=i;if(m)return{data:null,error:m};const{data:g,error:s}=await $r(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(a=h==null?void 0:h.session)===null||a===void 0?void 0:a.access_token});return s?{data:null,error:s}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+g.expires_in},g)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",g),{data:g,error:s})})}catch(i){if(kr(i))return{data:null,error:i};throw i}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async i=>{var a;const{data:h,error:m}=i;return m?{data:null,error:m}:await $r(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(a=h==null?void 0:h.session)===null||a===void 0?void 0:a.access_token})})}catch(i){if(kr(i))return{data:null,error:i};throw i}})}async _challengeAndVerify(t){const{data:i,error:a}=await this._challenge({factorId:t.factorId});return a?{data:null,error:a}:await this._verify({factorId:t.factorId,challengeId:i.id,code:t.code})}async _listFactors(){const{data:{user:t},error:i}=await this.getUser();if(i)return{data:null,error:i};const a=(t==null?void 0:t.factors)||[],h=a.filter(g=>g.factor_type==="totp"&&g.status==="verified"),m=a.filter(g=>g.factor_type==="phone"&&g.status==="verified");return{data:{all:a,totp:h,phone:m},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var i,a;const{data:{session:h},error:m}=t;if(m)return{data:null,error:m};if(!h)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:g}=b_(h.access_token);let s=null;g.aal&&(s=g.aal);let Y=s;((a=(i=h.user.factors)===null||i===void 0?void 0:i.filter(k=>k.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(Y="aal2");const I=g.amr||[];return{data:{currentLevel:s,nextLevel:Y,currentAuthenticationMethods:I},error:null}}))}async fetchJwk(t,i={keys:[]}){let a=i.keys.find(g=>g.kid===t);if(a||(a=this.jwks.keys.find(g=>g.kid===t),a&&this.jwks_cached_at+MD>Date.now()))return a;const{data:h,error:m}=await $r(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(m)throw m;if(!h.keys||h.keys.length===0)throw new Xm("JWKS is empty");if(this.jwks=h,this.jwks_cached_at=Date.now(),a=h.keys.find(g=>g.kid===t),!a)throw new Xm("No matching signing key found in JWKS");return a}
67async getClaims(t,i={keys:[]}){try{let a=t;if(!a){const{data:V,error:F}=await this.getSession();if(F||!V.session)return{data:null,error:F};a=V.session.access_token}const{header:h,payload:m,signature:g,raw:{header:s,payload:Y}}=b_(a);if(KD(m.exp),!h.kid||h.alg==="HS256"||!("crypto"in globalThis&&"subtle"in globalThis.crypto)){const{error:V}=await this.getUser(a);if(V)throw V;return{data:{claims:m,header:h,signature:g},error:null}}const E=QD(h.alg),I=await this.fetchJwk(h.kid,i),k=await crypto.subtle.importKey("jwk",I,E,!0,["verify"]);if(!await crypto.subtle.verify(E,k,g,LD(`${s}.${Y}`)))throw new Xm("Invalid JWT signature");return{data:{claims:m,header:h,signature:g},error:null}}catch(a){if(kr(a))return{data:null,error:a};throw a}}}$m.nextInstanceID=0;const pR=$m;class mR extends pR{constructor(t){super(t)}}var gR=function(n,t,i,a){function h(m){return m instanceof i?m:new i(function(g){g(m)})}return new(i||(i=Promise))(function(m,g){function s(I){try{E(a.next(I))}catch(k){g(k)}}function Y(I){try{E(a.throw(I))}catch(k){g(k)}}function E(I){I.done?m(I.value):h(I.value).then(s,Y)}E((a=a.apply(n,t||[])).next())})};class yR{constructor(t,i,a){var h,m,g;if(this.supabaseUrl=t,this.supabaseKey=i,!t)throw new Error("supabaseUrl is required.");if(!i)throw new Error("supabaseKey is required.");const s=wD(t);this.realtimeUrl=`${s}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${s}/auth/v1`,this.storageUrl=`${s}/storage/v1`,this.functionsUrl=`${s}/functions/v1`;const Y=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,E={db:pD,realtime:gD,auth:Object.assign(Object.assign({},mD),{storageKey:Y}),global:fD},I=YD(a??{},E);this.storageKey=(h=I.auth.storageKey)!==null&&h!==void 0?h:"",this.headers=(m=I.global.headers)!==null&&m!==void 0?m:{},I.accessToken?(this.accessToken=I.accessToken,this.auth=new Proxy({},{get:(k,D)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(D)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((g=I.auth)!==null&&g!==void 0?g:{},this.headers,I.global.fetch),this.fetch=xD(i,this._getAccessToken.bind(this),I.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},I.realtime)),this.rest=new kk(`${s}/rest/v1`,{headers:this.headers,schema:I.db.schema,fetch:this.fetch}),I.accessToken||this._listenForAuthEvents()}get functions(){return new Yk(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new cD(this.storageUrl,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,i={},a={}){return this.rest.rpc(t,i,a)}channel(t,i={config:{}}){return this.realtime.channel(t,i)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,i;return gR(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:a}=yield this.auth.getSession();return(i=(t=a.session)===null||t===void 0?void 0:t.access_token)!==null&&i!==void 0?i:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:i,detectSessionInUrl:a,storage:h,storageKey:m,flowType:g,lock:s,debug:Y},E,I){const k={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new mR({url:this.authUrl,headers:Object.assign(Object.assign({},k),E),storageKey:m,autoRefreshToken:t,persistSession:i,detectSessionInUrl:a,storage:h,flowType:g,lock:s,debug:Y,fetch:I,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(t){return new Hk(this.realtimeUrl,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((i,a)=>{this._handleTokenChanged(i,"CLIENT",a==null?void 0:a.access_token)})}_handleTokenChanged(t,i,a){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==a?this.changedAccessToken=a:t==="SIGNED_OUT"&&(this.realtime.setAuth(),i=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const vR=(n,t,i)=>new yR(n,t,i),_R="https://dhwcejtehgqdvdcjjfms.supabase.co/",xR="sb_publishable_PFnMwWgUyjFptn3LamwHDQ_hurZ7_yj",Ur=vR(_R,xR),zP=de.createContext(),bR=({children:n})=>{const[t,i]=de.useState(void 0),[a,h]=de.useState(null),[m,g]=de.useState(!0),s=async V=>{try{const{...F}=V,{data:$,error:Q}=await Ur.functions.invoke("register-user-with-profile",{body:F});return Q?(console.error("Function error:",Q),{success:!1,error:Q.message}):{success:!0,data:$}}catch(F){return console.error("Unexpected error:",F.message),{success:!1,error:"An unexpected error occurred. Please try again."}}},Y=async V=>{try{const{data:F,error:$}=await Ur.auth.signInWithOtp({email:V.toLowerCase(),options:{shouldCreateUser:!1,data:{otp_type:"email"}}});return $?(console.error("OTP send error:",$.message),{success:!1,error:$.message}):{success:!0,data:F}}catch(F){return console.error("Unexpected error during OTP send:",F.message),{success:!1,error:"An unexpected error occurred. Please try again."}}},E=async(V,F)=>{try{const{data:$,error:Q}=await Ur.auth.verifyOtp({email:V.toLowerCase(),token:F,type:"email"});return Q?(console.error("OTP verification error:",Q.message),{success:!1,error:Q.message}):{success:!0,data:$}}catch($){return console.error("Unexpected error during OTP verification:",$.message),{success:!1,error:"An unexpected error occurred. Please try again."}}},I=async()=>{const{error:V}=await Ur.auth.signOut();V&&console.error("Error signing out:",V),h(null)};de.useEffect(()=>{(async()=>{const{data:{session:$}}=await Ur.auth.getSession();i($)})();const{data:F}=Ur.auth.onAuthStateChange(($,Q)=>{i(Q)});return()=>F==null?void 0:F.subscription.unsubscribe()},[]),de.useEffect(()=>{(async()=>
67{if(!(t!=null&&t.user)){h(null),g(!1);return}const{data:F,error:$}=await Ur.from("profiles").select("*").eq("id",t.user.id).single();$?(console.error("Error fetching profile:",$.message),h(null)):h(F),g(!1)})()},[t]);const k=async()=>{if(!(t!=null&&t.user))return;const{data:V,error:F}=await Ur.from("profiles").select("*").eq("id",t.user.id).single();F?console.error("Error refreshing profile:",F.message):h(V)},D=async()=>{const{data:V,error:F}=await Ur.rpc("verify_organization_access");return{hasAccess:V,error:F}};return O.jsx(zP.Provider,{value:{session:t,profile:a,loading:m,signUpNewUser:s,sendOTP:Y,verifyOTP:E,signOut:I,refreshProfile:k,verifyOrganizationAccess:D},children:n})},Ul=()=>de.useContext(zP),wR="/assets/logo-CVu3yhd9.png",YR="/assets/funHead-mLj9kRyC.png",SR=()=>{const[n,t]=de.useState(!1),[i,a]=de.useState(""),{signOut:h}=Ul(),m=cg(),g=async s=>{s.preventDefault();try{await h(),m("/")}catch(Y){a("An unexpected error occurred."),console.error(Y.message)}};return O.jsxs("nav",{className:"fixed top-0 left-0 w-full bg-no-repeat bg-top shadow-lg z-50",style:{backgroundImage:`url(${YR})`,backgroundSize:"100% auto",backgroundColor:"rgba(71, 32, 0, 1)"},children:[O.jsx("div",{className:"mx-auto max-w-7xl px-2 sm:px-6 lg:px-8",children:O.jsxs("div",{className:"flex h-20 items-center justify-between",children:[O.jsxs("div",{className:"flex flex-1 items-center justify-between md:items-stretch",children:[O.jsx(Ca,{className:"flex flex-shrink-0 items-center mr-4",to:"/",children:O.jsx("img",{src:wR,alt:"Our Patch Logo",className:"h-[85px] w-auto rounded-full"})}),O.jsx("div",{className:"md:hidden",children:O.jsx("button",{onClick:()=>t(!n),className:"inline-flex items-center justify-center p-2 rounded-md",children:O.jsx("svg",{className:"h-6 w-6 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:n?O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"}):O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16M4 12h16M4 18h16"})})})})]}),O.jsx("div",{className:"hidden md:block md:ml-auto",children:O.jsx("div",{className:"flex space-x-2",children:O.jsx(F1,{handleSignOut:g})})})]})}),n&&O.jsx("div",{className:"md:hidden absolute right-4 mt-2 w-48 bg-neutral-200 rounded-lg shadow-lg flex flex-col space-y-2 p-3 z-50",children:O.jsx(F1,{mobile:!0,handleSignOut:g})})]})},F1=({mobile:n,handleSignOut:t})=>{const i=cg(),{session:a}=Ul(),h=window.location.pathname,s=n?"block rounded-md px-3 py-2 font-semibold text-base":"rounded-md px-2 py-2 font-semibold text-base shadow-md hover:shadow-xl transition",Y=(E,I,k=!1)=>{const V=h===E?"ring-2 ring-white scale-105 shadow-xl":"";return k?`${s} text-white bg-[#2F92C5] hover:bg-red-600 ${V}`:`${s} text-white ${V} ${I?"bg-[#2F92C5] hover:bg-[#2479A3]":"bg-[#22B145] hover:bg-[#2AA715]"}`};return O.jsxs(O.Fragment,{children:[O.jsx("button",{className:Y("/",!1),onClick:()=>i("/"),children:"Home"}),O.jsx("button",{className:Y("/events",!1),onClick:()=>i("/events"),children:"Events"}),O.jsx("button",{className:Y("/organizations",!1),onClick:()=>i("/organizations"),children:"Organizations"}),O.jsx("button",{className:Y("/resources",!1),onClick:()=>i("/resources"),children:"Resources"}),O.jsx("button",{className:Y("/news",!1),onClick:()=>i("/news"),children:"About"}),a?O.jsxs(O.Fragment,{children:[O.jsx("button",{className:Y("/dashboard",!0),onClick:()=>i("/dashboard"),children:"My Dashboard"}),O.jsx("button",{className:Y("",!0,!0),onClick:t,children:"Sign Out"})]}):O.jsxs(O.Fragment,{children:[O.jsx("button",{className:Y("/signup",!0),onClick:()=>i("/signup"),children:"Sign Up"}),O.jsx("button",{className:Y("/signin",!0),onClick:()=>i("/signin"),children:"Sign In"})]})]})},TR=()=>O.jsxs(O.Fragment,{children:[O.jsx(SR,{}),O.jsx("main",{className:"pt-20 min-h-screen",children:O.jsx(CA,{})})]}),WR="/assets/logovsmall-wofkh3Z4.png";class zd extends Error{}class ER extends zd{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class MR extends zd{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class PR extends zd{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Qf extends zd{}class FP extends zd{constructor(t){super(`Invalid unit ${t}`)}}class Qa extends zd{}class ih extends zd{constructor(){super("Zone is an abstract class")}}const $t="numeric",Ml="short",oo="long",jy={year:$t,month:$t,day:$t},ZP={year:$t,month:Ml,day:$t},IR={year:$t,month:Ml,day:$t,weekday:Ml},jP={year:$t,month:oo,day:$t},BP={year:$t,month:oo,day:$t,weekday:oo},$P={hour:$t,minute:$t},GP={hour:$t,minute:$t,second:$t},qP={hour:$t,minute:$t,second:$t,timeZoneName:Ml},HP={hour:$t,minute:$t,second:$t,timeZoneName:oo},KP={hour:$t,minute:$t,hourCycle:"h23"},QP={hour:$t,minute:$t,second:$t,hourCycle:"h23"},JP={hour:$t,minute:$t,second:$t,hourCycle:"h23",timeZoneName:Ml},eI={hour:$t,minute:$t,second:$t,hourCycle:"h23",timeZoneName:oo},tI={year:$t,month:$t,day:$t,hour:$t,minute:$t}
vendor: 41,753 bytes, line 67
67,rI={year:$t,month:$t,day:$t,hour:$t,minute:$t,second:$t},nI={year:$t,month:Ml,day:$t,hour:$t,minute:$t},iI={year:$t,month:Ml,day:$t,hour:$t,minute:$t,second:$t},UR={year:$t,month:Ml,day:$t,weekday:Ml,hour:$t,minute:$t},aI={year:$t,month:oo,day:$t,hour:$t,minute:$t,timeZoneName:Ml},sI={year:$t,month:oo,day:$t,hour:$t,minute:$t,second:$t,timeZoneName:Ml},oI={year:$t,month:oo,day:$t,weekday:oo,hour:$t,minute:$t,timeZoneName:oo},lI={year:$t,month:oo,day:$t,weekday:oo,hour:$t,minute:$t,second:$t,timeZoneName:oo};class fg{get type(){throw new ih}get name(){throw new ih}get ianaName(){return this.name}get isUniversal(){throw new ih}offsetName(t,i){throw new ih}formatOffset(t,i){throw new ih}offset(t){throw new ih}equals(t){throw new ih}get isValid(){throw new ih}}let w_=null;class cv extends fg{static get instance(){return w_===null&&(w_=new cv),w_}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:i,locale:a}){return _I(t,i,a)}formatOffset(t,i){return zm(this.offset(t),i)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const Mw=new Map;function CR(n){let t=Mw.get(n);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Mw.set(n,t)),t}const VR={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function AR(n,t){const i=n.format(t).replace(/\u200E/g,""),a=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,h,m,g,s,Y,E,I]=a;return[g,h,m,s,Y,E,I]}function kR(n,t){const i=n.formatToParts(t),a=[];for(let h=0;h<i.length;h++){const{type:m,value:g}=i[h],s=VR[m];m==="era"?a[s]=g:_r(s)||(a[s]=parseInt(g,10))}return a}const Y_=new Map;class oc extends fg{static create(t){let i=Y_.get(t);return i===void 0&&Y_.set(t,i=new oc(t)),i}static resetCache(){Y_.clear(),Mw.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=oc.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:i,locale:a}){return _I(t,i,a,this.name)}formatOffset(t,i){return zm(this.offset(t),i)}offset(t){if(!this.valid)return NaN;const i=new Date(t);if(isNaN(i))return NaN;const a=CR(this.name);let[h,m,g,s,Y,E,I]=a.formatToParts?kR(a,i):AR(a,i);s==="BC"&&(h=-Math.abs(h)+1);const D=dv({year:h,month:m,day:g,hour:Y===24?0:Y,minute:E,second:I,millisecond:0});let V=+i;const F=V%1e3;return V-=F>=0?F:1e3+F,(D-V)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let Z1={};function DR(n,t={}){const i=JSON.stringify([n,t]);let a=Z1[i];return a||(a=new Intl.ListFormat(n,t),Z1[i]=a),a}const Pw=new Map;function Iw(n,t={}){const i=JSON.stringify([n,t]);let a=Pw.get(i);return a===void 0&&(a=new Intl.DateTimeFormat(n,t),Pw.set(i,a)),a}const Uw=new Map;function RR(n,t={}){const i=JSON.stringify([n,t]);let a=Uw.get(i);return a===void 0&&(a=new Intl.NumberFormat(n,t),Uw.set(i,a)),a}const Cw=new Map;function LR(n,t={}){const{base:i,...a}=t,h=JSON.stringify([n,a]);let m=Cw.get(h);return m===void 0&&(m=new Intl.RelativeTimeFormat(n,t),Cw.set(h,m)),m}let Cm=null;function OR(){return Cm||(Cm=new Intl.DateTimeFormat().resolvedOptions().locale,Cm)}const Vw=new Map;function uI(n){let t=Vw.get(n);return t===void 0&&(t=new Intl.DateTimeFormat(n).resolvedOptions(),Vw.set(n,t)),t}const Aw=new Map;function XR(n){let t=Aw.get(n);if(!t){const i=new Intl.Locale(n);t="getWeekInfo"in i?i.getWeekInfo():i.weekInfo,"minimalDays"in t||(t={...cI,...t}),Aw.set(n,t)}return t}function NR(n){const t=n.indexOf("-x-");t!==-1&&(n=n.substring(0,t));const i=n.indexOf("-u-");if(i===-1)return[n];{let a,h;try{a=Iw(n).resolvedOptions(),h=n}catch{const Y=n.substring(0,i);a=Iw(Y).resolvedOptions(),h=Y}const{numberingSystem:m,calendar:g}=a;return[h,m,g]}}function zR(n,t,i){return(i||t)&&(n.includes("-u-")||(n+="-u"),i&&(n+=`-ca-${i}`),t&&(n+=`-nu-${t}`)),n}function FR(n){const t=[];for(let i=1;i<=12;i++){const a=wr.utc(2009,i,1);t.push(n(a))}return t}function ZR(n){const t=[];for(let i=1;i<=7;i++){const a=wr.utc(2016,11,13+i);t.push(n(a))}return t}function hy(n,t,i,a){const h=n.listingMode();return h==="error"?null:h==="en"?i(t):a(t)}function jR(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||uI(n.locale).numberingSystem==="latn"}class BR{constructor(t,i,a){this.padTo=a.padTo||0,this.floor=a.floor||!1;const{padTo:h,floor:m,...g}=a;if(!i||Object.keys(g).length>0){const s={useGrouping:!1,...a};a.padTo>0&&(s.minimumIntegerDigits=a.padTo),this.inf=RR(t,s)}}format(t){if(this.inf){const i=this.floor?Math.floor(t):t;return this.inf.format(i)}else{const i=this.floor?Math.floor(t):mY(t,3);return ji(i,this.padTo)}}}class $R{constructor(t,i,a){this.opts=a,this.originalZone=void 0;let h;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const g=-1*(t.offset/60),s=g>=0?`Etc/GMT+${g}`:`Etc/GMT${g}`;t.offset!==0&&oc.create(s).valid?(h=s,this.dt=t):(h="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,h=t.zone.name):(h="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const m={...this.opts};m.timeZone=m.timeZone||h,this.dtf=Iw(i,m)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(i=>{if(i.type==="timeZoneName"){const a=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...i,value:a}}else return i}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class GR{constructor(t,i,a){this.opts={style:"long",...a},!i&&yI()&&(this.rtf=LR(t,a))}format(t,i){return this.rtf?this.rtf.format(t,i):gL(i,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,i){return this.rtf?this.rtf.formatToParts(t,i):[]}}const cI={firstDay:1,minimalDays:4,weekend:[6,7]};class fn{static fromOpts(t){return fn.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,i,a,h,m=!1){const g=t||gi.defaultLocale,s=g||(m?"en-US":OR()),Y=i||gi.defaultNumberingSystem,E=a||gi.defaultOutputCalendar,I=Dw(h)||gi.defaultWeekSettings;return new fn(s,Y,E,I,g)}static resetCache(){Cm=null,Pw.clear(),Uw.clear(),Cw.clear(),Vw.clear(),Aw.clear()}static fromObject({locale:t,numberingSystem:i,outputCalendar:a,weekSettings:h}={}){return fn.create(t,i,a,h)}constructor(t,i,a,h,m){const[g,s,Y]=NR(t);this.locale=g,this.numberingSystem=i||s||null,this.outputCalendar=a||Y||null,this.weekSettings=h,this.intl=zR(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=m,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=jR(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),i=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&i?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:fn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Dw(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,i=!1){return hy(this,t,wI,()=>{const a=this.intl==="ja"||this.intl.startsWith("ja-");i&=!a;const h=i?{month:t,day:"numeric"}:{month:t},m=i?"format":"standalone";if(!this.monthsCache[m][t]){const g=a?s=>this.dtFormatter(s,h).format():s=>this.extract(s,h,"month");this.monthsCache[m][t]=FR(g)}return this.monthsCache[m][t]})}weekdays(t,i=!1){return hy(this,t,TI,()=>{const a=i?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},h=i?"format":"standalone";return this.weekdaysCache[h][t]||(this.weekdaysCache[h][t]=ZR(m=>this.extract(m,a,"weekday"))),this.weekdaysCache[h][t]})}meridiems(){return hy(this,void 0,()=>WI,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[wr.utc(2016,11,13,9),wr.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(t){return hy(this,t,EI,()=>{const i={era:t};return this.eraCache[t]||(this.eraCache[t]=[wr.utc(-40,1,1),wr.utc(2017,1,1)].map(a=>this.extract(a,i,"era"))),this.eraCache[t]})}extract(t,i,a){const h=this.dtFormatter(t,i),m=h.formatToParts(),g=m.find(s=>s.type.toLowerCase()===a);return g?g.value:null}numberFormatter(t={}){return new BR(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,i={}){return new $R(t,this.intl,i)}relFormatter(t={}){return new GR(this.intl,this.isEnglish(),t)}listFormatter(t={}){return DR(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||uI(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:vI()?XR(this.locale):cI}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let S_=null;class _s extends fg{static get utcInstance(){return S_===null&&(S_=new _s(0)),S_}static instance(t){return t===0?_s.utcInstance:new _s(t)}static parseSpecifier(t){if(t){const i=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(i)return new _s(fv(i[1],i[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${zm(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${zm(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,i){return zm(this.fixed,i)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class qR extends fg{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function fh(n,t){if(_r(n)||n===null)return t;if(n instanceof fg)return n;if(tL(n)){const i=n.toLowerCase();return i==="default"?t:i==="local"||i==="system"?cv.instance:i==="utc"||i==="gmt"?_s.utcInstance:_s.parseSpecifier(i)||oc.create(n)}else return ph(n)?_s.instance(n):typeof n=="object"&&"offset"in n&&typeof n.offset=="function"?n:new qR(n)}const hY={arab:"[Ù -Ù©]",arabext:"[Û°-Û¹]",bali:"[á-á]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[ï¼-ï¼]",gujr:"[૦-૯]",hanidec:"[ã|ä¸|äº|ä¸|å|äº|å
|ä¸|å
«|ä¹]",khmr:"[á -á©]",knda:"[೦-೯]",laoo:"[à»-à»]",limb:"[á¥-á¥]",mlym:"[൦-൯]",mong:"[á -á ]",mymr:"[á-á]",orya:"[à¦-à¯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[à¹-à¹]",tibt:"[༠-༩]",latn:"\\d"},j1={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},HR=hY.hanidec.replace(/[\[|\]]/g,"").split("");function KR(n){let t=parseInt(n,10);if(isNaN(t)){t="";for(let i=0;i<n.length;i++){const a=n.charCodeAt(i);if(n[i].search(hY.hanidec)!==-1)t+=HR.indexOf(n[i]);else for(const h in j1){const[m,g]=j1[h];a>=m&&a<=g&&(t+=a-m)}}return parseInt(t,10)}else return t}const kw=new Map;function QR(){kw.clear()}function Yl({numberingSystem:n},t=""){const i=n||"latn";let a=kw.get(i);a===void 0&&(a=new Map,kw.set(i,a));let h=a.get(t);return h===void 0&&(h=new RegExp(`${hY[i]}${t}`),a.set(t,h)),h}let B1=()=>Date.now(),$1="system",G1=null,q1=null,H1=null,K1=60,Q1,J1=null;class gi{static get now(){return B1}static set now(t){B1=t}static set defaultZone(t){$1=t}static get defaultZone(){return fh($1,cv.instance)}static get defaultLocale(){return G1}static set defaultLocale(t){G1=t}static get defaultNumberingSystem(){return q1}static set defaultNumberingSystem(t){q1=t}static get defaultOutputCalendar(){return H1}static set defaultOutputCalendar(t){H1=t}static get defaultWeekSettings(){return J1}static set defaultWeekSettings(t){J1=Dw(t)}static get twoDigitCutoffYear(){return K1}static set twoDigitCutoffYear(t){K1=t%100}static get throwOnInvalid(){return Q1}static set throwOnInvalid(t){Q1=t}static resetCaches(){fn.resetCache(),oc.resetCache(),wr.resetCache(),QR()}}class Wl{constructor(t,i){this.reason=t,this.explanation=i}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const hI=[0,31,59,90,120,151,181,212,243,273,304,334],dI=[0,31,60,91,121,152,182,213,244,274,305,335];function Oo(n,t){return new Wl("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${n}, which is invalid`)}function dY(n,t,i){const a=new Date(Date.UTC(n,t-1,i));n<100&&n>=0&&a.setUTCFullYear(a.getUTCFullYear()-1900);const h=a.getUTCDay();return h===0?7:h}function fI(n,t,i){return i+(pg(n)?dI:hI)[t-1]}function pI(n,t){const i=pg(n)?dI:hI,a=i.findIndex(m=>m<t),h=t-i[a];return{month:a+1,day:h}}function fY(n,t){return(n-t+7)%7+1}function By(n,t=4,i=1){const{year:a,month:h,day:m}=n,g=fI(a,h,m),s=fY(dY(a,h,m),i);let Y=Math.floor((g-s+14-t)/7),E;return Y<1?(E=a-1,Y=Gm(E,t,i)):Y>Gm(a,t,i)?(E=a+1,Y=1):E=a,{weekYear:E,weekNumber:Y,weekday:s,...pv(n)}}function eT(n,t=4,i=1){const{weekYear:a,weekNumber:h,weekday:m}=n,g=fY(dY(a,1,t),i),s=tp(a);let Y=h*7+m-g-7+t,E;Y<1?(E=a-1,Y+=tp(E)):Y>s?(E=a+1,Y-=tp(a)):E=a;const{month:I,day:k}=pI(E,Y);return{year:E,month:I,day:k,...pv(n)}}function T_(n){const{year:t,month:i,day:a}=n,h=fI(t,i,a);return{year:t,ordinal:h,...pv(n)}}function tT(n){const{year:t,ordinal:i}=n,{month:a,day:h}=pI(t,i);return{year:t,month:a,day:h,...pv(n)}}function rT(n,t){if(!_r(n.localWeekday)||!_r(n.localWeekNumber)||!_r(n.localWeekYear)){if(!_r(n.weekday)||!_r(n.weekNumber)||!_r(n.weekYear))throw new Qf("Cannot mix locale-based week fields with ISO-based week fields");return _r(n.localWeekday)||(n.weekday=n.localWeekday),_r(n.localWeekNumber)||(n.weekNumber=n.localWeekNumber),_r(n.localWeekYear)||(n.weekYear=n.localWeekYear),delete n.localWeekday,delete n.localWeekNumber,delete n.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function JR(n,t=4,i=1){const a=hv(n.weekYear),h=Xo(n.weekNumber,1,Gm(n.weekYear,t,i)),m=Xo(n.weekday,1,7);return a?h?m?!1:Oo("weekday",n.weekday):Oo("week",n.weekNumber):Oo("weekYear",n.weekYear)}function eL(n){const t=hv(n.year),i=Xo(n.ordinal,1,tp(n.year));return t?i?!1:Oo("ordinal",n.ordinal):Oo("year",n.year)}function mI(n){const t=hv(n.year),i=Xo(n.month,1,12),a=Xo(n.day,1,$y(n.year,n.month));return t?i?a?!1:Oo("day",n.day):Oo("month",n.month):Oo("year",n.year)}function gI(n){const{hour:t,minute:i,second:a,millisecond:h}=n,m=Xo(t,0,23)||t===24&&i===0&&a===0&&h===0,g=Xo(i,0,59),s=Xo(a,0,59),Y=Xo(h,0,999);return m?g?s?Y?!1:Oo("millisecond",h):Oo("second",a):Oo("minute",i):Oo("hour",t)}function _r(n){return typeof n>"u"}function ph(n){return typeof n=="number"}function hv(n){return typeof n=="number"&&n%1===0}function tL(n){return typeof n=="string"}function rL(n){return Object.prototype.toString.call(n)==="[object Date]"}function yI(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function vI(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function nL(n){return Array.isArray(n)?n:[n]}function nT(n,t,i){if(n.length!==0)return n.reduce((a,h)=>{const m=[t(h),h];return a&&i(a[0],m[0])===a[0]?a:m},null)[1]}function iL(n,t){return t.reduce((i,a)=>(i[a]=n[a],i),{})}function ap(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function Dw(n){if(n==null)return null;if(typeof n!="object")throw new Qa("Week settings must be an object");if(!Xo(n.firstDay,1,7)||!Xo(n.minimalDays,1,7)||!Array.isArray(n.weekend)||n.weekend.some(t=>!Xo(t,1,7)))throw new Qa("Invalid week settings");return{firstDay:n.firstDay,minimalDays:n.minimalDays,weekend:Array.from(n.weekend)}}function Xo(n,t,i){return hv(n)&&n>=t&&n<=i}function aL(n,t){return n-t*Math.floor(n/t)}function ji(n,t=2){const i=n<0;let a;return i?a="-"+(""+-n).padStart(t,"0"):a=(""+n).padStart(t,"0"),a}function ch(n){if(!(_r(n)||n===null||n===""))return parseInt(n,10)}function bd(n){if(!(_r(n)||n===null||n===""))return parseFloat(n)}function pY(n){if(!(_r(n)||n===null||n==="")){const t=parseFloat("0."+n)*1e3;return Math.floor(t)}}function mY(n,t,i="round"){const a=10**t;switch(i){case"expand":return n>0?Math.ceil(n*a)/a:Math.floor(n*a)/a;case"trunc":return Math.trunc(n*a)/a;case"round":return Math.round(n*a)/a;case"floor":return Math.floor(n*a)/a;case"ceil":return Math.ceil(n*a)/a;default:throw new RangeError(`Value rounding ${i} is out of range`)}}function pg(n){return n%4===0&&(n%100!==0||n%400===0)}function tp(n){return pg(n)?366:365}function $y(n,t){const i=aL(t-1,12)+1,a=n+(t-i)/12;return i===2?pg(a)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function dv(n){let t=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(t=new Date(t),t.setUTCFullYear(n.year,n.month-1,n.day)),+t}function iT(n,t,i){return-fY(dY(n,1,t),i)+t-1}function Gm(n,t=4,i=1){const a=iT(n,t,i),h=iT(n+1,t,i);return(tp(n)-a+h)/7}function Rw(n){return n>99?n:n>gi.twoDigitCutoffYear?1900+n:2e3+n}function _I(n,t,i,a=null){const h=new Date(n),m={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};a&&(m.timeZone=a);const g={timeZoneName:t,...m},s=new Intl.DateTimeFormat(i,g).formatToParts(h).find(Y=>Y.type.toLowerCase()==="timezonename");return s?s.value:null}function fv(n,t){let i=parseInt(n,10);Number.isNaN(i)&&(i=0);const a=parseInt(t,10)||0,h=i<0||Object.is(i,-0)?-a:a;return i*60+h}function xI(n){const t=Number(n);if(typeof n=="boolean"||n===""||!Number.isFinite(t))throw new Qa(`Invalid unit value ${n}`);return t}function Gy(n,t){const i={};for(const a in n)if(ap(n,a)){const h=n[a];if(h==null)continue;i[t(a)]=xI(h)}return i}function zm(n,t){const i=Math.trunc(Math.abs(n/60)),a=Math.trunc(Math.abs(n%60)),h=n>=0?"+":"-";switch(t){case"short":return`${h}${ji(i,2)}:${ji(a,2)}`;case"narrow":return`${h}${i}${a>0?`:${a}`:""}`;case"techie":return`${h}${ji(i,2)}${ji(a,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function pv(n){return iL(n,["hour","minute","second","millisecond"])}const sL=["January","February","March","April","May","June","July","August","September","October","November","December"],bI=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],oL=["J","F","M","A","M","J","J","A","S","O","N","D"];function wI(n){switch(n){case"narrow":return[...oL];case"short":return[...bI];case"long":return[...sL];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const YI=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],SI=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],lL=["M","T","W","T","F","S","S"];function TI(n){switch(n){case"narrow":return[...lL];case"short":return[...SI];case"long":return[...YI];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const WI=["AM","PM"],uL=["Before Christ","Anno Domini"],cL=["BC","AD"],hL=["B","A"];function EI(n){switch(n){case"narrow":return[...hL];case"short":return[...cL];case"long":return[...uL];default:return null}}function dL(n){return WI[n.hour<12?0:1]}function fL(n,t){return TI(t)[n.weekday-1]}function pL(n,t){return wI(t)[n.month-1]}function mL(n,t){return EI(t)[n.year<0?0:1]}function gL(n,t,i="always",a=!1){const h={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},m=["hours","minutes","seconds"].indexOf(n)===-1;if(i==="auto"&&m){const k=n==="days";switch(t){case 1:return k?"tomorrow":`next ${h[n][0]}`;case-1:return k?"yesterday":`last ${h[n][0]}`;case 0:return k?"today":`this ${h[n][0]}`}}const g=Object.is(t,-0)||t<0,s=Math.abs(t),Y=s===1,E=h[n],I=a?Y?E[1]:E[2]||E[1]:Y?h[n][0]:n;return g?`${s} ${I} ago`:`in ${s} ${I}`}function aT(n,t){let i="";for(const a of n)a.literal?i+=a.val:i+=t(a.val);return i}const yL={D:jy,DD:ZP,DDD:jP,DDDD:BP,t:$P,tt:GP,ttt:qP,tttt:HP,T:KP,TT:QP,TTT:JP,TTTT:eI,f:tI,ff:nI,fff:aI,ffff:oI,F:rI,FF:iI,FFF:sI,FFFF:lI};class Ja{static create(t,i={}){return new Ja(t,i)}static parseFormat(t){let i=null,a="",h=!1;const m=[];for(let g=0;g<t.length;g++){const s=t.charAt(g);s==="'"?((a.length>0||h)&&m.push({literal:h||/^\s+$/.test(a),val:a===""?"'":a}),i=null,a="",h=!h):h||s===i?a+=s:(a.length>0&&m.push({literal:/^\s+$/.test(a),val:a}),a=s,i=s)}return a.length>0&&m.push({literal:h||/^\s+$/.test(a),val:a}),m}static macroTokenToFormatOpts(t){return yL[t]}constructor(t,i){this.opts=i,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,i){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...i}).format()}dtFormatter(t,i={}){return this.loc.dtFormatter(t,{...this.opts,...i})}formatDateTime(t,i){return this.dtFormatter(t,i).format()}formatDateTimeParts(t,i){return this.dtFormatter(t,i).formatToParts()}formatInterval(t,i){return this.dtFormatter(t.start,i).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,i){return this.dtFormatter(t,i).resolvedOptions()}num(t,i=0,a=void 0){if(this.opts.forceSimple)return ji(t,i);const h={...this.opts};return i>0&&(h.padTo=i),a&&(h.signDisplay=a),this.loc.numberFormatter(h).format(t)}formatDateTimeFromString(t,i){const a=this.loc.listingMode()==="en",h=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",m=(V,F)=>this.loc.extract(t,V,F),g=V=>t.isOffsetFixed&&t.offset===0&&V.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,V.format):"",s=()=>a?dL(t):m({hour:"numeric",hourCycle:"h12"},"dayperiod"),Y=(V,F)=>a?pL(t,V):m(F?{month:V}:{month:V,day:"numeric"},"month"),E=(V,F)=>a?fL(t,V):m(F?{weekday:V}:{weekday:V,month:"long",day:"numeric"},"weekday"),I=V=>{const F=Ja.macroTokenToFormatOpts(V);return F?this.formatWithSystemDefault(t,F):V},k=V=>a?mL(t,V):m({era:V},"era"),D=V=>{switch(V){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return g({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return g({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return g({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return h?m({day:"numeric"},"day"):this.num(t.day);case"dd":return h?m({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return E("short",!0);case"cccc":return E("long",!0);case"ccccc":return E("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return E("short",!1);case"EEEE":return E("long",!1);case"EEEEE":return E("narrow",!1);case"L":return h?m({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return h?m({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return Y("short",!0);case"LLLL":return Y("long",!0);case"LLLLL":return Y("narrow",!0);case"M":return h?m({month:"numeric"},"month"):this.num(t.month);case"MM":return h?m({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return Y("short",!1);case"MMMM":return Y("long",!1);case"MMMMM":return Y("narrow",!1);case"y":return h?m({year:"numeric"},"year"):this.num(t.year);case"yy":return h?m({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return h?m({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return h?m({year:"numeric"},"year"):this.num(t.year,6);case"G":return k("short");case"GG":return k("long");case"GGGGG":return k("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return I(V)}};return aT(Ja.parseFormat(i),D)}formatDurationFromString(t,i){const a=this.opts.signMode==="negativeLargestOnly"?-1:1,h=I=>{switch(I[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},m=(I,k)=>D=>{const V=h(D);if(V){const F=k.isNegativeDuration&&V!==k.largestUnit?a:1;let $;return this.opts.signMode==="negativeLargestOnly"&&V!==k.largestUnit?$="never":this.opts.signMode==="all"?$="always":$="auto",this.num(I.get(V)*F,D.length,$)}else return D},g=Ja.parseFormat(i),s=g.reduce((I,{literal:k,val:D})=>k?I:I.concat(D),[]),Y=t.shiftTo(...s.map(h).filter(I=>I)),E={isNegativeDuration:Y<0,largestUnit:Object.keys(Y.values)[0]};return aT(g,m(Y,E))}}const MI=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function mp(...n){const t=n.reduce((i,a)=>i+a.source,"");return RegExp(`^${t}$`)}function gp(...n){return t=>n.reduce(([i,a,h],m)=>{const[g,s,Y]=m(t,h);return[{...i,...g},s||a,Y]},[{},null,1]).slice(0,2)}function yp(n,...t){if(n==null)return[null,null];for(const[i,a]of t){const h=i.exec(n);if(h)return a(h)}return[null,null]}function PI(...n){return(t,i)=>{const a={};let h;for(h=0;h<n.length;h++)a[n[h]]=ch(t[i+h]);return[a,null,i+h]}}const II=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,vL=`(?:${II.source}?(?:\\[(${MI.source})\\])?)?`,gY=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,UI=RegExp(`${gY.source}${vL}`),yY=RegExp(`(?:[Tt]${UI.source})?`),_L=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,xL=/(\d{4})-?W(\d\d)(?:-?(\d))?/,bL=/(\d{4})-?(\d{3})/,wL=PI("weekYear","weekNumber","weekDay"),YL=PI("year","ordinal"),SL=/(\d{4})-(\d\d)-(\d\d)/,CI=RegExp(`${gY.source} ?(?:${II.source}|(${MI.source}))?`),TL=RegExp(`(?: ${CI.source})?`);function rp(n,t,i){const a=n[t];return _r(a)?i:ch(a)}function WL(n,t){return[{year:rp(n,t),month:rp(n,t+1,1),day:rp(n,t+2,1)},null,t+3]}function vp(n,t){return[{hours:rp(n,t,0),minutes:rp(n,t+1,0),seconds:rp(n,t+2,0),milliseconds:pY(n[t+3])},null,t+4]}function mg(n,t){const i=!n[t]&&!n[t+1],a=fv(n[t+1],n[t+2]),h=i?null:_s.instance(a);return[{},h,t+3]}function gg(n,t){const i=n[t]?oc.create(n[t]):null;return[{},i,t+1]}const EL=RegExp(`^T?${gY.source}$`),ML=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function PL(n){const[t,i,a,h,m,g,s,Y,E]=n,I=t[0]==="-",k=Y&&Y[0]==="-",D=(V,F=!1)=>V!==void 0&&(F||V&&I)?-V:V;return[{years:D(bd(i)),months:D(bd(a)),weeks:D(bd(h)),days:D(bd(m)),hours:D(bd(g)),minutes:D(bd(s)),seconds:D(bd(Y),Y==="-0"),milliseconds:D(pY(E),k)}]}const IL={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function vY(n,t,i,a,h,m,g){const s={year:t.length===2?Rw(ch(t)):ch(t),month:bI.indexOf(i)+1,day:ch(a),hour:ch(h),minute:ch(m)};return g&&(s.second=ch(g)),n&&(s.weekday=n.length>3?YI.indexOf(n)+1:SI.indexOf(n)+1),s}const UL=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function CL(n){const[,t,i,a,h,m,g,s,Y,E,I,k]=n,D=vY(t,h,a,i,m,g,s);let V;return Y?V=IL[Y]:E?V=0:V=fv(I,k),[D,new _s(V)]}function VL(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const AL=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,kL=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,DL=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function sT(n){const[,t,i,a,h,m,g,s]=n;return[vY(t,h,a,i,m,g,s),_s.utcInstance]}function RL(n){const[,t,i,a,h,m,g,s]=n;return[vY(t,s,i,a,h,m,g),_s.utcInstance]}const LL=mp(_L,yY),OL=mp(xL,yY),XL=mp(bL,yY),NL=mp(UI),VI=gp(WL,vp,mg,gg),zL=gp(wL,vp,mg,gg),FL=gp(YL,vp,mg,gg),ZL=gp(vp,mg,gg);function jL(n){return yp(n,[LL,VI],[OL,zL],[XL,FL],[NL,ZL])}function BL(n){return yp(VL(n),[UL,CL])}function $L(n){return yp(n,[AL,sT],[kL,sT],[DL,RL])}function GL(n){return yp(n,[ML,PL])}const qL=gp(vp);function HL(n){return yp(n,[EL,qL])}const KL=mp(SL,TL),QL=mp(CI),JL=gp(vp,mg,gg);function e3(n){return yp(n,[KL,VI],[QL,JL])}const oT="Invalid Duration",AI={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},t3={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...AI},Do=146097/400,jf=146097/4800,r3={years:{quarters:4,months:12,weeks:Do/7,days:Do,hours:Do*24,minutes:Do*24*60,seconds:Do*24*60*60,milliseconds:Do*24*60*60*1e3},quarters:{months:3,weeks:Do/28,days:Do/4,hours:Do*24/4,minutes:Do*24*60/4,seconds:Do*24*60*60/4,milliseconds:Do*24*60*60*1e3/4},months:{weeks:jf/7,days:jf,hours:jf*24,minutes:jf*24*60,seconds:jf*24*60*60,milliseconds:jf*24*60*60*1e3},...AI},Pd=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],n3=Pd.slice(0).reverse();function ic(n,t,i=!1){const a={values:i?t.values:{...n.values,...t.values||{}},loc:n.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||n.conversionAccuracy,matrix:t.matrix||n.matrix};return new rn(a)}function kI(n,t){let i=t.milliseconds??0;for(const a of n3.slice(1))t[a]&&(i+=t[a]*n[a].milliseconds);return i}function lT(n,t){const i=kI(n,t)<0?-1:1;Pd.reduceRight((a,h)=>{if(_r(t[h]))return a;if(a){const m=t[a]*i,g=n[h][a],s=Math.floor(m/g);t[h]+=s*i,t[a]-=s*g*i}return h},null),Pd.reduce((a,h)=>{if(_r(t[h]))return a;if(a){const m=t[a]%1;t[a]-=m,t[h]+=m*n[a][h]}return h},null)}function uT(n){const t={};for(const[i,a]of Object.entries(n))a!==0&&(t[i]=a);return t}class rn{constructor(t){const i=t.conversionAccuracy==="longterm"||!1;let a=i?r3:t3;t.matrix&&(a=t.matrix),this.values=t.values,this.loc=t.loc||fn.create(),this.conversionAccuracy=i?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=a,this.isLuxonDuration=!0}static fromMillis(t,i){return rn.fromObject({milliseconds:t},i)}static fromObject(t,i={}){if(t==null||typeof t!="object")throw new Qa(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new rn({values:Gy(t,rn.normalizeUnit),loc:fn.fromObject(i),conversionAccuracy:i.conversionAccuracy,matrix:i.matrix})}static fromDurationLike(t){if(ph(t))return rn.fromMillis(t);if(rn.isDuration(t))return t;if(typeof t=="object")return rn.fromObject(t);throw new Qa(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,i){const[a]=GL(t);return a?rn.fromObject(a,i):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,i){const[a]=HL(t);return a?rn.fromObject(a,i):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,i=null){if(!t)throw new Qa("need to specify a reason the Duration is invalid");const a=t instanceof Wl?t:new Wl(t,i);if(gi.throwOnInvalid)throw new PR(a);return new rn({invalid:a})}static normalizeUnit(t){const i={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!i)throw new FP(t);return i}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,i={}){const a={...i,floor:i.round!==!1&&i.floor!==!1};return this.isValid?Ja.create(this.loc,a).formatDurationFromString(this,t):oT}toHuman(t={}){if(!this.isValid)return oT;const i=t.showZeros!==!1,a=Pd.map(h=>{const m=this.values[h];return _r(m)||m===0&&!i?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:h.slice(0,-1)}).format(m)}).filter(h=>h);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(a)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=mY(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const i=this.toMillis();return i<0||i>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},wr.fromMillis(i,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?kI(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const i=rn.fromDurationLike(t),a={};for(const h of Pd)(ap(i.values,h)||ap(this.values,h))&&(a[h]=i.get(h)+this.get(h));return ic(this,{values:a},!0)}minus(t){if(!this.isValid)return this;const i=rn.fromDurationLike(t);return this.plus(i.negate())}mapUnits(t){if(!this.isValid)return this;const i={};for(const a of Object.keys(this.values))i[a]=xI(t(this.values[a],a));return ic(this,{values:i},!0)}get(t){return this[rn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const i={...this.values,...Gy(t,rn.normalizeUnit)};return ic(this,{values:i})}reconfigure({locale:t,numberingSystem:i,conversionAccuracy:a,matrix:h}={}){const g={loc:this.loc.clone({locale:t,numberingSystem:i}),matrix:h,conversionAccuracy:a};return ic(this,g)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return lT(this.matrix,t),ic(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=uT(this.normalize().shiftToAll().toObject());return ic(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(g=>rn.normalizeUnit(g));const i={},a={},h=this.toObject();let m;for(const g of Pd)if(t.indexOf(g)>=0){m=g;let s=0;for(const E in a)s+=this.matrix[E][g]*a[E],a[E]=0;ph(h[g])&&(s+=h[g]);const Y=Math.trunc(s);i[g]=Y,a[g]=(s*1e3-Y*1e3)/1e3}else ph(h[g])&&(a[g]=h[g]);for(const g in a)a[g]!==0&&(i[m]+=g===m?a[g]:a[g]/this.matrix[m][g]);return lT(this.matrix,i),ic(this,{values:i},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=this.values[i]===0?0:-this.values[i];return ic(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=uT(this.values);return ic(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function i(a,h){return a===void 0||a===0?h===void 0||h===0:a===h}for(const a of Pd)if(!i(this.values[a],t.values[a]))return!1;return!0}}const Bf="Invalid Interval";function i3(n,t){return!n||!n.isValid?mi.invalid("missing or invalid start"):!t||!t.isValid?mi.invalid("missing or invalid end"):t<n?mi.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${t.toISO()}`):null}class mi{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,i=null){if(!t)throw new Qa("need to specify a reason the Interval is invalid");const a=t instanceof Wl?t:new Wl(t,i);if(gi.throwOnInvalid)throw new MR(a);return new mi({invalid:a})}static fromDateTimes(t,i){const a=Sm(t),h=Sm(i),m=i3(a,h);return m??new mi({start:a,end:h})}static after(t,i){const a=rn.fromDurationLike(i),h=Sm(t);return mi.fromDateTimes(h,h.plus(a))}static before(t,i){const a=rn.fromDurationLike(i),h=Sm(t);return mi.fromDateTimes(h.minus(a),h)}static fromISO(t,i){const[a,h]=(t||"").split("/",2);if(a&&h){let m,g;try{m=wr.fromISO(a,i),g=m.isValid}catch{g=!1}let s,Y;try{s=wr.fromISO(h,i),Y=s.isValid}catch{Y=!1}if(g&&Y)return mi.fromDateTimes(m,s);if(g){const E=rn.fromISO(h,i);if(E.isValid)return mi.after(m,E)}else if(Y){const E=rn.fromISO(a,i);if(E.isValid)return mi.before(s,E)}}return mi.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",i){if(!this.isValid)return NaN;const a=this.start.startOf(t,i);let h;return i!=null&&i.useLocaleWeeks?h=this.end.reconfigure({locale:a.locale}):h=this.end,h=h.startOf(t,i),Math.floor(h.diff(a,t).get(t))+(h.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:i}={}){return this.isValid?mi.fromDateTimes(t||this.s,i||this.e):this}splitAt(...t){if(!this.isValid)return[];const i=t.map(Sm).filter(g=>this.contains(g)).sort((g,s)=>g.toMillis()-s.toMillis()),a=[];let{s:h}=this,m=0;for(;h<this.e;){const g=i[m]||this.e,s=+g>+this.e?this.e:g;a.push(mi.fromDateTimes(h,s)),h=s,m+=1}return a}splitBy(t){const i=rn.fromDurationLike(t);if(!this.isValid||!i.isValid||i.as("milliseconds")===0)return[];let{s:a}=this,h=1,m;const g=[];for(;a<this.e;){const s=this.start.plus(i.mapUnits(Y=>Y*h));m=+s>+this.e?this.e:s,g.push(mi.fromDateTimes(a,m)),a=m,h+=1}return g}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}
vendor: 5,549 bytes, line 67
67overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const i=this.s>t.s?this.s:t.s,a=this.e<t.e?this.e:t.e;return i>=a?null:mi.fromDateTimes(i,a)}union(t){if(!this.isValid)return this;const i=this.s<t.s?this.s:t.s,a=this.e>t.e?this.e:t.e;return mi.fromDateTimes(i,a)}static merge(t){const[i,a]=t.sort((h,m)=>h.s-m.s).reduce(([h,m],g)=>m?m.overlaps(g)||m.abutsStart(g)?[h,m.union(g)]:[h.concat([m]),g]:[h,g],[[],null]);return a&&i.push(a),i}static xor(t){let i=null,a=0;const h=[],m=t.map(Y=>[{time:Y.s,type:"s"},{time:Y.e,type:"e"}]),g=Array.prototype.concat(...m),s=g.sort((Y,E)=>Y.time-E.time);for(const Y of s)a+=Y.type==="s"?1:-1,a===1?i=Y.time:(i&&+i!=+Y.time&&h.push(mi.fromDateTimes(i,Y.time)),i=null);return mi.merge(h)}difference(...t){return mi.xor([this].concat(t)).map(i=>this.intersection(i)).filter(i=>i&&!i.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} â ${this.e.toISO()})`:Bf}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=jy,i={}){return this.isValid?Ja.create(this.s.loc.clone(i),t).formatInterval(this):Bf}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Bf}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Bf}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Bf}toFormat(t,{separator:i=" â "}={}){return this.isValid?`${this.s.toFormat(t)}${i}${this.e.toFormat(t)}`:Bf}toDuration(t,i){return this.isValid?this.e.diff(this.s,t,i):rn.invalid(this.invalidReason)}mapEndpoints(t){return mi.fromDateTimes(t(this.s),t(this.e))}}class dy{static hasDST(t=gi.defaultZone){const i=wr.now().setZone(t).set({month:12});return!t.isUniversal&&i.offset!==i.set({month:6}).offset}static isValidIANAZone(t){return oc.isValidZone(t)}static normalizeZone(t){return fh(t,gi.defaultZone)}static getStartOfWeek({locale:t=null,locObj:i=null}={}){return(i||fn.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:i=null}={}){return(i||fn.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:i=null}={}){return(i||fn.create(t)).getWeekendDays().slice()}static months(t="long",{locale:i=null,numberingSystem:a=null,locObj:h=null,outputCalendar:m="gregory"}={}){return(h||fn.create(i,a,m)).months(t)}static monthsFormat(t="long",{locale:i=null,numberingSystem:a=null,locObj:h=null,outputCalendar:m="gregory"}={}){return(h||fn.create(i,a,m)).months(t,!0)}static weekdays(t="long",{locale:i=null,numberingSystem:a=null,locObj:h=null}={}){return(h||fn.create(i,a,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:i=null,numberingSystem:a=null,locObj:h=null}={}){return(h||fn.create(i,a,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return fn.create(t).meridiems()}static eras(t="short",{locale:i=null}={}){return fn.create(i,null,"gregory").eras(t)}static features(){return{relative:yI(),localeWeek:vI()}}}function cT(n,t){const i=h=>h.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),a=i(t)-i(n);return Math.floor(rn.fromMillis(a).as("days"))}function a3(n,t,i){const a=[["years",(Y,E)=>E.year-Y.year],["quarters",(Y,E)=>E.quarter-Y.quarter+(E.year-Y.year)*4],["months",(Y,E)=>E.month-Y.month+(E.year-Y.year)*12],["weeks",(Y,E)=>{const I=cT(Y,E);return(I-I%7)/7}],["days",cT]],h={},m=n;let g,s;for(const[Y,E]of a)i.indexOf(Y)>=0&&(g=Y,h[Y]=E(n,t),s=m.plus(h),s>t?(h[Y]--,n=m.plus(h),n>t&&(s=n,h[Y]--,n=m.plus(h))):n=s);return[n,h,s,g]}function s3(n,t,i,a){let[h,m,g,s]=a3(n,t,i);const Y=t-h,E=i.filter(k=>["hours","minutes","seconds","milliseconds"].indexOf(k)>=0);E.length===0&&(g<t&&(g=h.plus({[s]:1})),g!==h&&(m[s]=(m[s]||0)+Y/(g-h)));const I=rn.fromObject(m,a);return E.length>0?rn.fromMillis(Y,a).shiftTo(...E).plus(I):I}const o3="missing Intl.DateTimeFormat.formatToParts support";function cn(n,t=i=>i){return{regex:n,deser:([i])=>t(KR(i))}}const l3="Â ",DI=`[ ${l3}]`,RI=new RegExp(DI,"g");function u3(n){return n.replace(/\./g,"\\.?").replace(RI,DI)}function hT(n){return n.replace(/\./g,"").replace(RI," ").toLowerCase()}function Sl(n,t){return n===null?null:{regex:RegExp(n.map(u3).join("|")),deser:([i])=>n.findIndex(a=>hT(i)===hT(a))+t}}function dT(n,t){return{regex:n,deser:([,i,a])=>fv(i,a),groups:t}}function fy(n){return{regex:n,deser:([t])=>t}}function c3(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function h3(n,t){const i=Yl(t),a=Yl(t,"{2}"),h=Yl(t,"{3}"),m=Yl(t,"{4}"),g=Yl(t,"{6}"),s=Yl(t,"{1,2}"),Y=Yl(t,"{1,3}"),E=Yl(t,"{1,6}"),I=Yl(t,"{1,9}"),k=Yl(t,"{2,4}"),D=Yl(t,"{4,6}"),V=Q=>({regex:RegExp(c3(Q.val)),deser:([ae])=>ae,literal:!0}),$=(Q=>{if(n.literal)return V(Q);switch(Q.val){case"G":return Sl(t.eras("short"),0);case"GG":return Sl(t.eras("long"),0);case"y":return cn(E);case"yy":return cn(k,Rw);case"yyyy":return cn(m);case"yyyyy":return cn(D);case"yyyyyy":return cn(g);case"M":return cn(s);case"MM":return cn(a);case"MMM":return Sl(t.months("short",!0),1);case"MMMM":return Sl(t.months("long",!0),1);case"L":return cn(s);case"LL":return cn(a);case"LLL":return Sl(t.months("short",!1),1);case"LLLL":return Sl(t.months("long",!1),1);case"d":return cn(s);case"dd":return cn(a);case"o":return cn(Y);
vendor: 22,453 bytes, line 67
67case"ooo":return cn(h);case"HH":return cn(a);case"H":return cn(s);case"hh":return cn(a);case"h":return cn(s);case"mm":return cn(a);case"m":return cn(s);case"q":return cn(s);case"qq":return cn(a);case"s":return cn(s);case"ss":return cn(a);case"S":return cn(Y);case"SSS":return cn(h);case"u":return fy(I);case"uu":return fy(s);case"uuu":return cn(i);case"a":return Sl(t.meridiems(),0);case"kkkk":return cn(m);case"kk":return cn(k,Rw);case"W":return cn(s);case"WW":return cn(a);case"E":case"c":return cn(i);case"EEE":return Sl(t.weekdays("short",!1),1);case"EEEE":return Sl(t.weekdays("long",!1),1);case"ccc":return Sl(t.weekdays("short",!0),1);case"cccc":return Sl(t.weekdays("long",!0),1);case"Z":case"ZZ":return dT(new RegExp(`([+-]${s.source})(?::(${a.source}))?`),2);case"ZZZ":return dT(new RegExp(`([+-]${s.source})(${a.source})?`),2);case"z":return fy(/[a-z_+-/]{1,256}?/i);case" ":return fy(/[^\S\n\r]/);default:return V(Q)}})(n)||{invalidReason:o3};return $.token=n,$}const d3={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function f3(n,t,i){const{type:a,value:h}=n;if(a==="literal"){const Y=/^\s+$/.test(h);return{literal:!Y,val:Y?" ":h}}const m=t[a];let g=a;a==="hour"&&(t.hour12!=null?g=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?g="hour12":g="hour24":g=i.hour12?"hour12":"hour24");let s=d3[g];if(typeof s=="object"&&(s=s[m]),s)return{literal:!1,val:s}}function p3(n){return[`^${n.map(i=>i.regex).reduce((i,a)=>`${i}(${a.source})`,"")}$`,n]}function m3(n,t,i){const a=n.match(t);if(a){const h={};let m=1;for(const g in i)if(ap(i,g)){const s=i[g],Y=s.groups?s.groups+1:1;!s.literal&&s.token&&(h[s.token.val[0]]=s.deser(a.slice(m,m+Y))),m+=Y}return[a,h]}else return[a,{}]}function g3(n){const t=m=>{switch(m){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let i=null,a;return _r(n.z)||(i=oc.create(n.z)),_r(n.Z)||(i||(i=new _s(n.Z)),a=n.Z),_r(n.q)||(n.M=(n.q-1)*3+1),_r(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),_r(n.u)||(n.S=pY(n.u)),[Object.keys(n).reduce((m,g)=>{const s=t(g);return s&&(m[s]=n[g]),m},{}),i,a]}let W_=null;function y3(){return W_||(W_=wr.fromMillis(1555555555555)),W_}function v3(n,t){if(n.literal)return n;const i=Ja.macroTokenToFormatOpts(n.val),a=NI(i,t);return a==null||a.includes(void 0)?n:a}function LI(n,t){return Array.prototype.concat(...n.map(i=>v3(i,t)))}class OI{constructor(t,i){if(this.locale=t,this.format=i,this.tokens=LI(Ja.parseFormat(i),t),this.units=this.tokens.map(a=>h3(a,t)),this.disqualifyingUnit=this.units.find(a=>a.invalidReason),!this.disqualifyingUnit){const[a,h]=p3(this.units);this.regex=RegExp(a,"i"),this.handlers=h}}explainFromTokens(t){if(this.isValid){const[i,a]=m3(t,this.regex,this.handlers),[h,m,g]=a?g3(a):[null,null,void 0];if(ap(a,"a")&&ap(a,"H"))throw new Qf("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:i,matches:a,result:h,zone:m,specificOffset:g}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function XI(n,t,i){return new OI(n,i).explainFromTokens(t)}function _3(n,t,i){const{result:a,zone:h,specificOffset:m,invalidReason:g}=XI(n,t,i);return[a,h,m,g]}function NI(n,t){if(!n)return null;const a=Ja.create(t,n).dtFormatter(y3()),h=a.formatToParts(),m=a.resolvedOptions();return h.map(g=>f3(g,n,m))}const E_="Invalid DateTime",x3=864e13;function Vm(n){return new Wl("unsupported zone",`the zone "${n.name}" is not supported`)}function M_(n){return n.weekData===null&&(n.weekData=By(n.c)),n.weekData}function P_(n){return n.localWeekData===null&&(n.localWeekData=By(n.c,n.loc.getMinDaysInFirstWeek(),n.loc.getStartOfWeek())),n.localWeekData}function wd(n,t){const i={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new wr({...i,...t,old:i})}function zI(n,t,i){let a=n-t*60*1e3;const h=i.offset(a);if(t===h)return[a,t];a-=(h-t)*60*1e3;const m=i.offset(a);return h===m?[a,h]:[n-Math.min(h,m)*60*1e3,Math.max(h,m)]}function py(n,t){n+=t*60*1e3;const i=new Date(n);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function Sy(n,t,i){return zI(dv(n),t,i)}function fT(n,t){const i=n.o,a=n.c.year+Math.trunc(t.years),h=n.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,m={...n.c,year:a,month:h,day:Math.min(n.c.day,$y(a,h))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},g=rn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=dv(m);let[Y,E]=zI(s,i,n.zone);return g!==0&&(Y+=g,E=n.zone.offset(Y)),{ts:Y,o:E}}function $f(n,t,i,a,h,m){const{setZone:g,zone:s}=i;if(n&&Object.keys(n).length!==0||t){const Y=t||s,E=wr.fromObject(n,{...i,zone:Y,specificOffset:m});return g?E:E.setZone(s)}else return wr.invalid(new Wl("unparsable",`the input "${h}" can't be parsed as ${a}`))}function my(n,t,i=!0){return n.isValid?Ja.create(fn.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(n,t):null}function I_(n,t,i){const a=n.c.year>9999||n.c.year<0;let h="";if(a&&n.c.year>=0&&(h+="+"),h+=ji(n.c.year,a?6:4),i==="year")return h;if(t){if(h+="-",h+=ji(n.c.month),i==="month")return h;h+="-"}else if(h+=ji(n.c.month),i==="month")return h;return h+=ji(n.c.day),h}function pT(n,t,i,a,h,m,g){let s=!i||n.c.millisecond!==0||n.c.second!==0,Y="";switch(g){case"day":case"month":case"year":break;default:if(Y+=ji(n.c.hour),g==="hour")break;if(t){if(Y+=":",Y+=ji(n.c.minute),g==="minute")break;s&&(Y+=":",Y+=ji(n.c.second))}else{if(Y+=ji(n.c.minute),g==="minute")break;s&&(Y+=ji(n.c.second))}if(g==="second")break;s&&(!a||n.c.millisecond!==0)&&(Y+=".",Y+=ji(n.c.millisecond,3))}return h&&(n.isOffsetFixed&&n.offset===0&&!m?Y+="Z":n.o<0?(Y+="-",Y+=ji(Math.trunc(-n.o/60)),Y+=":",Y+=ji(Math.trunc(-n.o%60))):(Y+="+",Y+=ji(Math.trunc(n.o/60)),Y+=":",Y+=ji(Math.trunc(n.o%60)))),m&&(Y+="["+n.zone.ianaName+"]"),Y}const FI={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},b3={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},w3={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ty=["year","month","day","hour","minute","second","millisecond"],Y3=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],S3=["year","ordinal","hour","minute","second","millisecond"];function Wy(n){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!t)throw new FP(n);return t}function mT(n){switch(n.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Wy(n)}}function T3(n){if(Am===void 0&&(Am=gi.now()),n.type!=="iana")return n.offset(Am);const t=n.name;let i=Lw.get(t);return i===void 0&&(i=n.offset(Am),Lw.set(t,i)),i}function gT(n,t){const i=fh(t.zone,gi.defaultZone);if(!i.isValid)return wr.invalid(Vm(i));const a=fn.fromObject(t);let h,m;if(_r(n.year))h=gi.now();else{for(const Y of Ty)_r(n[Y])&&(n[Y]=FI[Y]);const g=mI(n)||gI(n);if(g)return wr.invalid(g);const s=T3(i);[h,m]=Sy(n,s,i)}return new wr({ts:h,zone:i,loc:a,o:m})}function yT(n,t,i){const a=_r(i.round)?!0:i.round,h=_r(i.rounding)?"trunc":i.rounding,m=(s,Y)=>(s=mY(s,a||i.calendary?0:2,i.calendary?"round":h),t.loc.clone(i).relFormatter(i).format(s,Y)),g=s=>i.calendary?t.hasSame(n,s)?0:t.startOf(s).diff(n.startOf(s),s).get(s):t.diff(n,s).get(s);if(i.unit)return m(g(i.unit),i.unit);for(const s of i.units){const Y=g(s);if(Math.abs(Y)>=1)return m(Y,s)}return m(n>t?-0:0,i.units[i.units.length-1])}function vT(n){let t={},i;return n.length>0&&typeof n[n.length-1]=="object"?(t=n[n.length-1],i=Array.from(n).slice(0,n.length-1)):i=Array.from(n),[t,i]}let Am;const Lw=new Map;class wr{constructor(t){const i=t.zone||gi.defaultZone;let a=t.invalid||(Number.isNaN(t.ts)?new Wl("invalid input"):null)||(i.isValid?null:Vm(i));this.ts=_r(t.ts)?gi.now():t.ts;let h=null,m=null;if(!a)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(i))[h,m]=[t.old.c,t.old.o];else{const s=ph(t.o)&&!t.old?t.o:i.offset(this.ts);h=py(this.ts,s),a=Number.isNaN(h.year)?new Wl("invalid input"):null,h=a?null:h,m=a?null:s}this._zone=i,this.loc=t.loc||fn.create(),this.invalid=a,this.weekData=null,this.localWeekData=null,this.c=h,this.o=m,this.isLuxonDateTime=!0}static now(){return new wr({})}static local(){const[t,i]=vT(arguments),[a,h,m,g,s,Y,E]=i;return gT({year:a,month:h,day:m,hour:g,minute:s,second:Y,millisecond:E},t)}static utc(){const[t,i]=vT(arguments),[a,h,m,g,s,Y,E]=i;return t.zone=_s.utcInstance,gT({year:a,month:h,day:m,hour:g,minute:s,second:Y,millisecond:E},t)}static fromJSDate(t,i={}){const a=rL(t)?t.valueOf():NaN;if(Number.isNaN(a))return wr.invalid("invalid input");const h=fh(i.zone,gi.defaultZone);return h.isValid?new wr({ts:a,zone:h,loc:fn.fromObject(i)}):wr.invalid(Vm(h))}static fromMillis(t,i={}){if(ph(t))return t<-864e13||t>x3?wr.invalid("Timestamp out of range"):new wr({ts:t,zone:fh(i.zone,gi.defaultZone),loc:fn.fromObject(i)});throw new Qa(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,i={}){if(ph(t))return new wr({ts:t*1e3,zone:fh(i.zone,gi.defaultZone),loc:fn.fromObject(i)});throw new Qa("fromSeconds requires a numerical input")}static fromObject(t,i={}){t=t||{};const a=fh(i.zone,gi.defaultZone);if(!a.isValid)return wr.invalid(Vm(a));const h=fn.fromObject(i),m=Gy(t,mT),{minDaysInFirstWeek:g,startOfWeek:s}=rT(m,h),Y=gi.now(),E=_r(i.specificOffset)?a.offset(Y):i.specificOffset,I=!_r(m.ordinal),k=!_r(m.year),D=!_r(m.month)||!_r(m.day),V=k||D,F=m.weekYear||m.weekNumber;if((V||I)&&F)throw new Qf("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(D&&I)throw new Qf("Can't mix ordinal dates with month/day");const $=F||m.weekday&&!V;let Q,ae,le=py(Y,E);$?(Q=Y3,ae=b3,le=By(le,g,s)):I?(Q=S3,ae=w3,le=T_(le)):(Q=Ty,ae=FI);let _e=!1;for(const ft of Q){const ot=m[ft];_r(ot)?_e?m[ft]=ae[ft]:m[ft]=le[ft]:_e=!0}const fe=$?JR(m,g,s):I?eL(m):mI(m),We=fe||gI(m);if(We)return wr.invalid(We);const se=$?eT(m,g,s):I?tT(m):m,[De,ze]=Sy(se,E,a),je=new wr({ts:De,zone:a,o:ze,loc:h});return m.weekday&&V&&t.weekday!==je.weekday?wr.invalid("mismatched weekday",`you can't specify both a weekday of ${m.weekday} and a date of ${je.toISO()}`):je.isValid?je:wr.invalid(je.invalid)}static fromISO(t,i={}){const[a,h]=jL(t);return $f(a,h,i,"ISO 8601",t)}static fromRFC2822(t,i={}){const[a,h]=BL(t);return $f(a,h,i,"RFC 2822",t)}static fromHTTP(t,i={}){const[a,h]=$L(t);return $f(a,h,i,"HTTP",i)}static fromFormat(t,i,a={}){if(_r(t)||_r(i))throw new Qa("fromFormat requires an input string and a format");const{locale:h=null,numberingSystem:m=null}=a,g=fn.fromOpts({locale:h,numberingSystem:m,defaultToEN:!0}),[s,Y,E,I]=_3(g,t,i);return I?wr.invalid(I):$f(s,Y,a,`format ${i}`,t,E)}static fromString(t,i,a={}){return wr.fromFormat(t,i,a)}static fromSQL(t,i={}){const[a,h]=e3(t);return $f(a,h,i,"SQL",t)}static invalid(t,i=null){if(!t)throw new Qa("need to specify a reason the DateTime is invalid");const a=t instanceof Wl?t:new Wl(t,i);if(gi.throwOnInvalid)throw new ER(a);return new wr({invalid:a})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,i={}){const a=NI(t,fn.fromObject(i));return a?a.map(h=>h?h.val:null).join(""):null}static expandFormat(t,i={}){return LI(Ja.parseFormat(t),fn.fromObject(i)).map(h=>h.val).join("")}static resetCache(){Am=void 0,Lw.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?M_(this).weekYear:NaN}get weekNumber(){return this.isValid?M_(this).weekNumber:NaN}get weekday(){return this.isValid?M_(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?P_(this).weekday:NaN}get localWeekNumber(){return this.isValid?P_(this).weekNumber:NaN}get localWeekYear(){return this.isValid?P_(this).weekYear:NaN}get ordinal(){return this.isValid?T_(this.c).ordinal:NaN}get monthShort(){return this.isValid?dy.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?dy.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?dy.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?dy.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,i=6e4,a=dv(this.c),h=this.zone.offset(a-t),m=this.zone.offset(a+t),g=this.zone.offset(a-h*i),s=this.zone.offset(a-m*i);if(g===s)return[this];const Y=a-g*i,E=a-s*i,I=py(Y,g),k=py(E,s);return I.hour===k.hour&&I.minute===k.minute&&I.second===k.second&&I.millisecond===k.millisecond?[wd(this,{ts:Y}),wd(this,{ts:E})]:[this]}get isInLeapYear(){return pg(this.year)}get daysInMonth(){return $y(this.year,this.month)}get daysInYear(){return this.isValid?tp(this.year):NaN}get weeksInWeekYear(){return this.isValid?Gm(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Gm(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:i,numberingSystem:a,calendar:h}=Ja.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:i,numberingSystem:a,outputCalendar:h}}toUTC(t=0,i={}){return this.setZone(_s.instance(t),i)}toLocal(){return this.setZone(gi.defaultZone)}setZone(t,{keepLocalTime:i=!1,keepCalendarTime:a=!1}={}){if(t=fh(t,gi.defaultZone),t.equals(this.zone))return this;if(t.isValid){let h=this.ts;if(i||a){const m=t.offset(this.ts),g=this.toObject();[h]=Sy(g,m,t)}return wd(this,{ts:h,zone:t})}else return wr.invalid(Vm(t))}reconfigure({locale:t,numberingSystem:i,outputCalendar:a}={}){const h=this.loc.clone({locale:t,numberingSystem:i,outputCalendar:a});return wd(this,{loc:h})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const i=Gy(t,mT),{minDaysInFirstWeek:a,startOfWeek:h}=rT(i,this.loc),m=!_r(i.weekYear)||!_r(i.weekNumber)||!_r(i.weekday),g=!_r(i.ordinal),s=!_r(i.year),Y=!_r(i.month)||!_r(i.day),E=s||Y,I=i.weekYear||i.weekNumber;if((E||g)&&I)throw new Qf("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Y&&g)throw new Qf("Can't mix ordinal dates with month/day");let k;m?k=eT({...By(this.c,a,h),...i},a,h):_r(i.ordinal)?(k={...this.toObject(),...i},_r(i.day)&&(k.day=Math.min($y(k.year,k.month),k.day))):k=tT({...T_(this.c),...i});const[D,V]=Sy(k,this.o,this.zone);return wd(this,{ts:D,o:V})}plus(t){if(!this.isValid)return this;const i=rn.fromDurationLike(t);return wd(this,fT(this,i))}minus(t){if(!this.isValid)return this;const i=rn.fromDurationLike(t).negate();return wd(this,fT(this,i))}startOf(t,{useLocaleWeeks:i=!1}={}){if(!this.isValid)return this;const a={},h=rn.normalizeUnit(t);switch(h){case"years":a.month=1;case"quarters":case"months":a.day=1;case"weeks":case"days":a.hour=0;case"hours":a.minute=0;case"minutes":a.second=0;case"seconds":a.millisecond=0;break}if(h==="weeks")if(i){const m=this.loc.getStartOfWeek(),{weekday:g}=this;g<m&&(a.weekNumber=this.weekNumber-1),a.weekday=m}else a.weekday=1;if(h==="quarters"){const m=Math.ceil(this.month/3);a.month=(m-1)*3+1}return this.set(a)}endOf(t,i){return this.isValid?this.plus({[t]:1}).startOf(t,i).minus(1):this}toFormat(t,i={}){return this.isValid?Ja.create(this.loc.redefaultToEN(i)).formatDateTimeFromString(this,t):E_}toLocaleString(t=jy,i={}){return this.isValid?Ja.create(this.loc.clone(i),t).formatDateTime(this):E_}toLocaleParts(t={}){return this.isValid?Ja.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:i=!1,suppressMilliseconds:a=!1,includeOffset:h=!0,extendedZone:m=!1,precision:g="milliseconds"}={}){if(!this.isValid)return null;g=Wy(g);const s=t==="extended";let Y=I_(this,s,g);return Ty.indexOf(g)>=3&&(Y+="T"),Y+=pT(this,s,i,a,h,m,g),Y}toISODate({format:t="extended",precision:i="day"}={}){return this.isValid?I_(this,t==="extended",Wy(i)):null}toISOWeekDate(){return my(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:i=!1,includeOffset:a=!0,includePrefix:h=!1,extendedZone:m=!1,format:g="extended",precision:s="milliseconds"}={}){return this.isValid?(s=Wy(s),(h&&Ty.indexOf(s)>=3?"T":"")+pT(this,g==="extended",i,t,a,m,s)):null}toRFC2822(){return my(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return my(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?I_(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:i=!1,includeOffsetSpace:a=!0}={}){let h="HH:mm:ss.SSS";return(i||t)&&(a&&(h+=" "),i?h+="z":t&&(h+="ZZ")),my(this,h,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():E_}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const i={...this.c};return t.includeConfig&&(i.outputCalendar=this.outputCalendar,i.numberingSystem=this.loc.numberingSystem,i.locale=this.loc.locale),i}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,i="milliseconds",a={}){if(!this.isValid||!t.isValid)return rn.invalid("created by diffing an invalid DateTime");const h={locale:this.locale,numberingSystem:this.numberingSystem,...a},m=nL(i).map(rn.normalizeUnit),g=t.valueOf()>this.valueOf(),s=g?this:t,Y=g?t:this,E=s3(s,Y,m,h);return g?E.negate():E}diffNow(t="milliseconds",i={}){return this.diff(wr.now(),t,i)}until(t){return this.isValid?mi.fromDateTimes(this,t):this}hasSame(t,i,a){if(!this.isValid)return!1;const h=t.valueOf(),m=this.setZone(t.zone,{keepLocalTime:!0});return m.startOf(i,a)<=h&&h<=m.endOf(i,a)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const i=t.base||wr.fromObject({},{zone:this.zone}),a=t.padding?this<i?-t.padding:t.padding:0;let h=["years","months","days","hours","minutes","seconds"],m=t.unit;return Array.isArray(t.unit)&&(h=t.unit,m=void 0),yT(i,this.plus(a),{...t,numeric:"always",units:h,unit:m})}toRelativeCalendar(t={}){return this.isValid?yT(t.base||wr.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(wr.isDateTime))throw new Qa("min requires all arguments be DateTimes");return nT(t,i=>i.valueOf(),Math.min)}static max(...t){if(!t.every(wr.isDateTime))throw new Qa("max requires all arguments be DateTimes");return nT(t,i=>i.valueOf(),Math.max)}static fromFormatExplain(t,i,a={}){const{locale:h=null,numberingSystem:m=null}=a,g=fn.fromOpts({locale:h,numberingSystem:m,defaultToEN:!0});return XI(g,t,i)}static fromStringExplain(t,i,a={}){return wr.fromFormatExplain(t,i,a)}static buildFormatParser(t,i={}){const{locale:a=null,numberingSystem:h=null}=i,m=fn.fromOpts({locale:a,numberingSystem:h,defaultToEN:!0});return new OI(m,t)}static fromFormatParser(t,i,a={}){if(_r(t)||_r(i))throw new Qa("fromFormatParser requires an input string and a format parser");const{locale:h=null,numberingSystem:m=null}=a,g=fn.fromOpts({locale:h,numberingSystem:m,defaultToEN:!0});if(!g.equals(i.locale))throw new Qa(`fromFormatParser called with a locale of ${g}, but the format parser was created for ${i.locale}`);const{result:s,zone:Y,specificOffset:E,invalidReason:I}=i.explainFromTokens(t);
67return I?wr.invalid(I):$f(s,Y,a,`format ${i.format}`,t,E)}static get DATE_SHORT(){return jy}static get DATE_MED(){return ZP}static get DATE_MED_WITH_WEEKDAY(){return IR}static get DATE_FULL(){return jP}static get DATE_HUGE(){return BP}static get TIME_SIMPLE(){return $P}static get TIME_WITH_SECONDS(){return GP}static get TIME_WITH_SHORT_OFFSET(){return qP}static get TIME_WITH_LONG_OFFSET(){return HP}static get TIME_24_SIMPLE(){return KP}static get TIME_24_WITH_SECONDS(){return QP}static get TIME_24_WITH_SHORT_OFFSET(){return JP}static get TIME_24_WITH_LONG_OFFSET(){return eI}static get DATETIME_SHORT(){return tI}static get DATETIME_SHORT_WITH_SECONDS(){return rI}static get DATETIME_MED(){return nI}static get DATETIME_MED_WITH_SECONDS(){return iI}static get DATETIME_MED_WITH_WEEKDAY(){return UR}static get DATETIME_FULL(){return aI}static get DATETIME_FULL_WITH_SECONDS(){return sI}static get DATETIME_HUGE(){return oI}static get DATETIME_HUGE_WITH_SECONDS(){return lI}}function Sm(n){if(wr.isDateTime(n))return n;if(n&&n.valueOf&&ph(n.valueOf()))return wr.fromJSDate(n);if(n&&typeof n=="object")return wr.fromObject(n);throw new Qa(`Unknown datetime argument: ${n}, of type ${typeof n}`)}var U_={exports:{}},_T;function W3(){return _T||(_T=1,function(n){function t(i,a){var h
vendor: 65,028 bytes, line 67
67="XIXHXHXGXGXQXQXPXPXOXOXN##U6U6UW#$U%U%U%U%U%XFXEXEXRXRXVXVXWXWXXXXXYXYXZXZY#Y#Y$Y$Y%Y%XSXSXTXTXUXIXHXHXGXGXQXQVAVA#%#&V'#'U6#(#)U%U%U%U%U%#*U%XEXEVLVLVLVLYGYGYGYG#+W=W=W=W=W=W=Y$X+X+X+X+X+XTXUVPUQ#,T*T*#-VAVA#.#/#0#1#2U6U6UWU%U%U%U%U%#3VLVLXEYH#4#5#6YGYGYG#7X.#8W=W=W=#9X,X,#:#;#<#=#>VPVP#?#@#AT*T*#B#C#D#E#F#GV'#H#I#JUWU%U%U%U%X6X6#K#LYH#M#N#O#PYG#Q#R#SX.#T#UW=W=#V#WX,#X#Y#Z$#$$$%$&T)$'$(T*T*$)$*$+TW$,$-$.$/$0$1$2$3U%U%XJXJXF$4$5$6$7$8$9$:YG$;$<$=$>$?$@$A$BW3$C$D$E$F$G$HW8$IT)T)T)XHXGXGXQV=$J$K$L$M$N$O$P$Q$R$SV2XKXJXJXFY4$T$U$V$W$X$Y$Z%#%$%%VN%&%'%(%)%*%+%,%-%.%/%0W8XTT)XIXHXHXGXGXQXQU>%1%2%3TL%4%5%6%7U-XKXKX0X0XF%8%9%:%;%<%=%>%?%@%A%B%C%DX(%E%F%GWU%H%I%J%KXSXTXTXUXIXHXHXGXGXQXQU>%L%M%NTL%OUPXMX1XLXKXKXJX0X5%P%QS0%R%S%T%U%V%W%X%Y%Z&#WUWUWUWUWU&$&%X%XSXSXTXTXU&&ZDZDXGXGXQXQXP&'&(&)&*&+&,UOXLXLXKXKXJXJ&-&.&/S0&0T&&1&2WQ&3&4&5&6&7&8&9&:&;&<&=X%X%XSX%XTXTXUXIZDZDZDXGXQXQXPUI&>&?&@&A&B&C&DXLXKXKXJX3&E&F&G&H&I&J&K&L&M&N&OWEW<W<&P&Q&R&S&T&UY%X%ZUXSXTZYXUXIXHXHXGXGXQXQXPXPXOXO&V&W&X&Y&Z'#XKXKXJX3'$'%'&'''(')'*'+','-VMXXW<'.XZ'/'0'1'2WDZPZ9'3'4ZH'5XUXIXHZEZEXGXQXQXPXPXOXOZ@'6'7'8'9':';XKXJXJXF'<'='>'?'@'A'B'C'DXXXXZ1W'XZ'E'F'G'H'I'JW5Z9'K'L'MZWZ<Z<XHZEXGXQXQXPXPXOXOZ@'N'O'PUB'Q'R'S'TXJXFXFXESQ'U'V'W'X'YXWZ0XX'ZXYXZXZW4(#($(%W5(&ZS('ZB((()(*(+ZTZE(,(-XQXPXPXOXOXNU=U=(.(/(0(1(2(3XJXFX8XEXESN(4(5(6(7(8Z2XXZ+XYXZZ-Y#(9(:(;(<(=(>(?ZB(@(A(BZLZT(CZV(DXQXPXPXOXOXNXNU=(E(F(G(H(IXJXJXFXFX8XE(J(K(L(M(NZ*(OZ2XYXYXZXZY#Y#XCXC(P(QX;X;ZN(RZ>(SXHXHZVZVZA(TZQXPZ:XOXNXNV,(U(V(WV.V.XJXJXFXFXEXET((X(Y(ZZ*Z*XXXXXYXYXZXZY#Y#XCXC)#)$)%)&XT)'XUZ6XHXHXGXGXQXQXPXPXOXOXNXNV,)()))*V.XKXJXJXFX8XEXEXRSE)+SEXWXWXXXXXYXYXZXZY#Y#XC),)-).)/XDXAZ6Z6Z8XHXHXGXGXQXQXPXPXOXOXNXNV,)0)1T.XKXKXJXJXFX8XEXEXRXRXVXVXWXWXXXXXYZ/XZXZY#Y#Y$Y$Y%)2)3XDXTZ6Z6XIXHXHXGXGXQXQXPXPXOXOXNXN)4)5)6X9XKXKXJXJXFXFXEXEXRXRXVSESEZ/Z/XXZ/XYXZXZY#Y#Y$Y$Y%Y%XSXSXTZ6Z6XIXHXHXGXGXQXQXPXPXOXOXNXNV&)7)8X9XKX7X7X7XFXFXEXEXRXRXVXVXWXWXXXXXYXYXZXZY#Y#Y$Y$Y%Y%XSXSVEZ6XUXIXHXHXGXGXQXQXPXPXOXOXNXNVHVH)9):T9T9XJXJXFXFXEXEXRXRVIVIVIVI);VFVFVC)<VKVBVBVBVDVDVDVDVD)=VGXUXIXHXHXGXGXQXQXPXPXOXOXNXNVHVHT9T9T9T9)>VH)?Y&)@VJVJVJ)AVIVIVI)BVFVF)C)DVK)E)F)G)H)I)J)K)L)MVGVGVGVGVGVGXGXQXQXPXPXOXOXNXNVHVHT9T9T9T9)NVH)OY&)PVJVJVJ)QVIVIVI)RVFVF)S)TVKVKVK)UXCXCXCXCXC)VVGVGVGVGVGVGVGVGVGVGVGVGVGVGVG)W)X)Y)Z*#*$*%*&*'*(*)***+*,*-*.*/*0*1*2*3*4*5*6*7*8*9*:*;*<*=*>*?VGVGXNXNV'*?XLXLUWU%*>TF*?TFTFV'TFV'V'*>V'*?U6*?V8V8*?U%V8*@U%U%U%*@XYW=YGXYXHT*UQT*XQXQ*>*?VAVA*?*@*@TF*ATFTF*ATFTF*AV'TFTFV'*A*B*C*CTRV/XFVLVLYH*CYHYH*C*DXVXV*DYGYGX.YG*D*DW=X.*EW=*E*F*GX,X+X,*GX+X+X+*G*G*HWWWW*HWWWWWWXTXTWW*HVPVPVPUQ*GUQUQUQUQT*UQT**FV>*GV>*GVAV>*HVAVA*HVAVA*HVAVA*H*IVAVATFV'VAV'V'*HV'*IU6U6U6*IU6U6*IU6X6XFXFX4XEXEX4Y@YH*GYH*HYUYUYU*H*HY7Y7*I*IYGYGYGYGYG*IYGYGYG*I*J*J*KX.X.X.X.*K*L*LW=*MW=*MX,*N*OX,X,*OX,X,*OX,*P*P*QW;*R*RWW*SWB*S*TWBWB*T*UWB*VVPVPW8*VVPVP*VVPUQUQT)UQ*UT*UQT**U*VXQV0*VV=*WV=*W*XV=*Y*YV)*ZV)V)V?*ZV?V?*ZV?V?V'*ZV;+#U6+#U6V;V;+#V;V;+#U&+$U&XLXLU&V2Y@Y@XF+#Y@Y@+#Y@XEYHY@+#+#+$+%+&YU+&+'+(+(+)+*++YGYG++YG+++,+-+.+.X.+/X.X.X.+/+0X.+0+1+2+2+3+4+5+5+6+7+8W=W=W=+8+8+9W3W3W3+9+:W%X,X,+:+;X,+;X,X+X+X+X++;X+WBWRXSWB+:XSW8W8W8W8T)V=+9+:+;+;+<+=+>+>V)TTTTV)V?+>+?V?V?TL+?V;V;+?+@+@V;V;V;V;V;V;+@V;+@+A+B+BV2+CV2+C+DYIYI+D+EYI+F+F+G+H+I+I+J+K+L+L+M+N+O+O+P+Q+R+R+S+T+U+U+V+W+X+X+Y+ZVR+Z,#,$,%VN,%VNVN,%,&,'X(,',(,)W2X',),*X',*,+X'X',+,,W&,-,-,.WUWU,.,/,0,1X+,1X+,2WRXSWRX)WW,1,2WW,2,3U>,4,4TTTTTTTT,4TTTL,4,5,6,7,7,8UPUP,8UPUPUP,8U-XLXLXF,8XFY>,8,9,:YB,:,;YBYB,;,<YMYM,<,=YM,>,>,?,@,A,A,BY9Y9,B,CY9,D,D,E,F,G,G,HVS,I,I,J,K,L,L,M,N,O,O,P,QX(X(,QWUWU,Q,RWUWU,R,SWUWUWU,SWU,T,TX+,UY%X+X%X%X%,TX)XSXSU>,T,U,V,VTT,W,X,XTL,YTLTL,YTL,ZXF,ZXFS:,Z-#S:-$-$-%-&-'YMY*T&T&Y*-&-'S9-'-(S9-)-)-*-+-,-,X#--X#---.X#X#-.-/-0-1-1-2-3-4-4-5-6-7WUWTWUWT-6X%X%X%ZJZDXIZDV:-5XPUF-5-6UF-7-7-8-9-:TLTL-:UHTL-:UH-;-;UO-<UOXFX2XFSA-;-<-=SZS0S0-=->->T&-?-@-@S9-AS9S9-AS9-B-B-CWQ-DX#-D-E-F-FW9-GW9-G-H-IW<W<-IW<W<-I-JW<-K-K-L-M-N-NWU-O-PWUWU-PWUWUWU-P-QWUX%-QX%UI-QUIXO-Q-RUIUIUIUHUI-R-RU.-SV7-S-T-U-V-VV--W-XV<T+-X-YXF-YX3-Z-ZSZ.#SZ.#S2.$S2.$.%S2SY.%SYSYSYSX.%SXSX.%SH.&SH.&SHSH.'.'WQ.(.)WQWQ.)VM.)WE.*WEW<.*W<XZ.*X-X-X-.*.+.,.-.-WU..././WXWU.0.0Y$WDY$XN.0XNXN.0UAXNTNTDTDUV.0TD.0.1TITI.1TI.2T?XLU,XLXF.1XFS5.1.2.3.4.4.5.6.7.7.8.9SK.9.:SK.;.;SX.<.=SHSH.=.>SH.>.?S/.?.@S/.A.A.BSUSUW<W<W<.BW<.BW<.C.C.D.E.F.FW0W0W0W0WD.FWDZCXSZ9Z9XSXSZ9ZRZHZH.DZHTNXNZ@XN.CTD.DTDTD.DTD.ETI.E.F.G.G.H.I.J.JXKT@[email protected]%[email protected]/.SSWSU.SSUSUXWW<.SXZW4.S.TW4.UW4W4W4.U.U.V.WWCWD.WWC.XY%ZP.X.YZ9ZRXSZRZRZFXTXTZHZHXTZWZ@U=XNU=.U.V.WU=.W.X.Y.Z.ZV+/#V+T@/#T@/$U#U#U#/$XJURU#URSL/#SL/$/$/%/&/'/'/(SO/)/)/*S>S>/*/+/,XWXYZ1Z+Z+W4/+W4/,/,WC/-WCWCW5WC/-W5/-W5/.ZSZ7ZS/.ZKZWXTXTZWZWZ?Z?Z?Z=ZZ/,/,ZT/-ZTZEXGZVZVZIZIZVZV/+/,U=/-/-/.U</////0TPTP/0/1/2/3/3/4T=/5/5XJT=XJSN/5SNSNSO/5/6/7/7S>/8/9S>Z.SR/9Z0Z0/9Z*/9W4Y#Y#/9WCY$Y$WC/9XCXC/9/:/;X>/;/<X>X;/<ZSX;XSZS/<ZSZSZBXT/<ZBXUZ?XUZ>Z>ZX/;ZXZVZV/;ZVZVZVZV/;U=/;U=/<U<U</</=/=/>/?/@/@V./AV.V./AV.V.XR/AXRT(/ASNT(/B/B/CSC/D/D/E/FSRSRZ*XWZ*XXZ2Z4Z2/DX>/EX>X>X;/EX;Z;Z;ZN/EZXZXZ6XIZAZQXQXQXMV,V,/C/C/D/ET0/E/F/G/HT(/H/I/J/J/KSE/L/LSR/MXV/MX>/NX:X>X;X:/NX;X;/N/OX;XS/OXSZNZNZMXTV,/NV,/O/O/P/Q/R/R/S/T/USE/USESEXC/UXCXC/UX:Y%X:X:/UX:/VXDXD/V/W/W/X/YT/T5/Y/ZT5Y%/ZY%Y%/Z0#X@X@XMV,XMV&/Z0#0$0%0%XLT4X9V&0%XMV&T90%XLXLV&V&T9T90$T9T9T9XXXX0$VFXZXZVCVKXTXT0#VGXJXJ0#VHXF0#VH0$0$SE0%SE0%VI0&VI0&VF0'VF0'VC0(VCVCVKVCVK0'0(VKVK0(0)VKVK0)0*0+XC0+0,XCXC0,0-XCXC0-0.XCXC0.0/XCXC0/00XCXC00VG01VG01VH02VHVH02VH0303SE04SE04VI05VI05VF06VF06VC07VCVCVKVCVK06XC07XC07VG08VG08VHVGVGVHVHVGVGT9T9VGVGT9T9VGVGT9T9VGVGT9T9VGVG03VHVGVGVHVHVGVGVH02VGVGY&Y&VGVG01SEVGVGVJVJVGVGVJVJVGVGVJVJVGVG0.VIVGVGVIVIVGVGVIVIVGVGVIVIVGVG0+VFVGVGVFVFVGVGVFVFVGVG0)VCVGVGVCVKVGVGVKVKVGVGVKVKVGVGVKVKVGVG0%XCVGVGXCXCVGVGXCXCVGVGXCXCVGVGXCXCVGVGXCXCVGVG/XVGVGVGXNXNV'U6XOXOVATFVATFVATFV'U6V'U6V'U6V'U6U6U6U6V8UWUWU%U%V8U%V8U%U%U%U%TRT*V>T*V>V>VAV>VAVAVATFTFVAVATFTFVATFVATFVATFTFTFV'V'TFTFV'V'TFTFV'U6V'U6V'V'TFV'V'U6V'U6TRTRU%TRYHYHYUYUYHYH/BY7YHYHY7YG/AYGYGYGYGX./AX.X.W=X.X.X.W=X.X.W=X,W=X,W=W=W=X,W=X,X,X,X,X+X,X+X+X+X+WWX+X+X+WWX+X+WWWWX+XSWWWWWWVPVPVPVPVPVPUQT*V>T*V>T*V>T*V>V>VAV>V>V>VAV>V>VAVAV>VATFTFVAVATFTFVAVATFTFVATFV'U6T<T<V'U6V'U6U6U6U6V;U6U6V;V;YHYH/)YUYUYU/)YUYU/)/*/+YUY7/+Y7Y7Y7/+/,YGYG/,YGYGYGYG/,YGYGYGX.YGYGX.X.YGYGX.X./)X.X.X.X.X.X./)X.X./)X.W=W=X.W=X.W=X.W=W=X,W=X,W=W3W3W3X,X,W3X,X,X,X,/$X+X+X,W;X,/#X,W;X+X+W;W;WWWWW;X)W;X)X+X+WWWWX)WWX)WBX+X+WWWWWWWBWWWWWBWBWWVPWBWBVPVPWBW8WBW8W8W8W8VPW8W8VPVPW8VPUQT*XHXHT*V@XQXQV=U8U8V0.LV=V0V=V0V0V=V=TZTZV=V=TZTZTSTSV=TSV=V=TWV)TWV)TWV)TW.GV).GV).HV'V'V?V'V'U6V'U6V;U6V;V;V;V;U6V;V;U6V;V;UWV;V;V;V;V;U&U&[email protected]'.CYH.C.D.E.EYU.FYU.F.GY,Y,.G.HY,.I.I.JYU.K.K.LZ&Z&.L.MZ&Z&.MYV.N.O.O.P.QYG.Q.R.S.T.T.UYEYE.UYG.V.WYGY=YG.W.W.X.Y.Z.Z/#/$/%YG/%/&/'/'X./(/)/)X./*X.X.X./*WOX.X.WOVNX.X.WIWI/(/)VNVNWIWIVNVN/(X&/)/*X&X&/*X&/*WHVN/+WHWHVY/+X&X&X&/+X&W=X&W=/*/+/,/-WG/-/.//W=//W=W=W=W=//W3W=W=W3W3W3X,W%W%W3W3W3W%W%X,W%/,X,X,/,X,X,X+X+X+X+WRX+WRWBWBW8W8V=V=/)V=V=U>XPU>/(U>U>U>V=/(/)/*TWTW/*/+U>U>U>/+TTTTU>TTTWV)TWV)TT/)TTTTTLTL/)TL/)TLTL/*/*TU/+/,V;V;/,/-V;U6V;V;V;/,/-/.V;TBV;TB/-UKUK/.U-U-U-/.TB/.V2V2V2V2U$UJ/-Y@Y@/.Y@Y@/./////0YI/1/1/2/3/4YI/4YI/5Y,Y,/5Y,Y,/5/6/7/7/8/9/:/:/;/</=/=Z&/>/?Z&Z&/?/@/@/A/B/C/C/D/E/F/F/G/HY</H/IY<Y</I/JY/Y//J/KY//L/L/MY<Y</MYG/N/OY<Y<Y</O/O/P/Q/RYGYG/R/S/S/T/UZ%/U/VYGYG/V/WYGYG/WYQZ%/X/X/YWJWJ/Y/ZYG0#VTVTVT0#0#X.WJVR0#0$VRVRVTVR0$0%X.WOVRWOWOVNWOWOVRVRWPWPVNVNWPWPVY/YVNVNVYVYVNVNVYW=VYVYVNVN/WX(W=W=W2W2W=W=W2W2W2W2X(W2W3W3X'X'W2X'X'X'W3W3/RX'/RW%W%W%W%W%W&W&W%W%/Q/RW&WUWUWU/QWUWUWUWUWUWU/QX,X,/QX,/QX+X+X+WU/QWUWU/QWU/R/SX+WRX+WRX+WRX+/RWWW8WWWWX)WWX)X)U>/PU>U>TETE/P/QU>/QU>TT/QTT/RTT/RTLTLTLTL/RTL/STUTU/S/TTL/TTL/U/UUP/VUPV;/V/W/X/X/YUPUP/YUPUPUP/YU-XLXLYBYBYB/YYBYB/YYBYB/YYB/Z/ZYB0#YBYIYI0#0$YI0$YIYI0$YM0%0&0&0'YMYM0'0(0)0*0*0+0,0-0-0.Y*Y*0.0/000101020304Y*04Y*05Y9Y905Y9XVYRY9Y9YR04Y9Y9YG04Y905YGYG0506Y906Y907YGYG0708VQVQVWVQ0708090:VWVW0:XWVQVQVSVQWSWSWS09VSVS090:WSWP0:WSWPWPWSVNVS09VS0:WS0:0;0<0<VN0=0>VNVN0>0?0?0@0A0B0B0CW,W,VNVN0C0DVNX(X(X(0CX(X(X(X(W2WUWUX'X'WUWUX'X'WUX'X'X'X'0@X'WU0@WUWUWUWU0@0@0AWM0BWU0B0C0DWMWM0DWTX%0DX%X%0D0E0F0GU>0GXPV:0GUYV:U/0GTT0H0IUY0I0J0KTTTTUU0KTT0KTTTLTT0KTLTL0KUP0LUP0LUP0MUPXFY>XFS:0L0MS:S:YB0M0N0OS:0OS0S00OT'0PT'YM0PT'YC0PT'S0T&0PT&T&T&0P0QY*XVT&T&T&S9Y9Y9XV0P0P0Q0R0S0S0T0UVO0U0VW(0W0W0XVUVUVOVUWQ0XVUVUWQVU0WX#0XX#0X0YVU0Z0ZX#X#X#X#0ZX#X#0ZVS1#1$1$1%W7W7W7W71%W7W7W7W71%1%1&W71'1'1(1)1*1*1+W9W9W91+W91,X(X(W9W<X(WUWUWU1*W<W<W<WUWUW<WUWTWT1)1*V:1*UFUFU/U/1*U/TM1*TM1+UFULUF1+1+UE1,1-1-TL1.1/ULUL1/UI1/1011UL11XNULXN11UPXNUPXNUPU.U.UPUPUP10UP1011UOX2S:1112S:S:SA12SASASASZSZS0SZS2S0S0S2S0S0T&S0T&S0T&S0S0T&T&SYT&T&1,T&S9T&S9T&S91+1,1-WQS91-S9S91-1.WQWQ1.X#1/X#1/10WQWQX#X#10X#1011W+1212X#WEWE12W9X#13X#W9WEXXW9W9W9121213W<W<W913W<W<13W:W<1414WU1516WUWU16171718W<19WUWU19W<W<WU19X-191:1;W<1;X-X-X-WUWUX-WU1:WU1;WUWUWUWU1;WUWU1;WUWUWU1;1<WU1<WU1=1=1>WXX%UF1>XOUI1>UIUIUIUI1>UIUIUI1>UIU*UH1>1?TH1?TAU*V7U.U.TKTKU.UOU.U.XMXMV7TDU71<U7XMUOU'U.UZUZ1;XMXMV-1;XMXMV%1;XLTI1;T,UN1<1<SASASZXFSZS=1<SASZSZSZSZSZS=SZSZS2SZS2SZS2SZS2S0S0S2S2S0S0S017S0SYSYSYSXT&SXSXT&SHSXSHSXSHSXSH13SHSHSHSHSHSH1313WQSHWQ13WQS1S1WQ1314VMWQWQVMVMWQWQWQWEWEWEVMWEW<11W<XZW)11XZX-X-111213X*VXX*X*12VX13VX1314VX15VX15VX1616W0X*17WUWUW0WU16WUY$Y$Y$WDWUWD15WDWDWD15U*XNXN1516TYUAUVTDUVTDXMXM1516TD16TD17XL17TIU(TI17TITIS=17S=18S=18S5S<S2S2S218S<S<18SBS<1819S<S2S2S21919T#T#T#191:S-S-T#1:1;S.1;SYT#SY1;SY1<SK1<T$1=1>SYSYSK1>SYSXSK1>SK1>1?S@SXSX1?SX1?SXSX1@SXSXS3S3SHSHS3SFSH1>SFSFSH1>SHS/SHSFSFSF1=1>S/S/1>VM1?1@S/SUS/S/VMVMVMSUVMVMSUSU1=W'1>W'W<XZW<X-XZX-W<VXX-VXX-1<1<1=1>WK1>VXVXVXWKWKVXW0WK1=WK1>WDWDW0Y$ZHZGZHZGUVUVTDXMXMTDU+U+TD1:TDTDTDTDTDUBTIU,TITCTITIUBUBTCTCUBTCU,16U,UXUXUXUXTJU,U,[email protected]@SQS@SL16S@S@SLS7S3S3S315S3S3SJS3S@S7S714S3S314SOSFSFSO1414SOSOSOSOSOSO14S/S/SFS/13SG14SGSGSW14SWS/S/S/SUS/SUSUSUW<W4W4W4VX11W4W>11W>W>W>11W>1213W4W?13WLY$W?1314W?WD14W?W?WCWLWCWD13WCWCWCWCWCW5W5ZPW5W5ZPY%W5W5U+U+1011U+U+11U=U=11U=U=TDTDU=U=TDUBTDUBU=U=U=TXTXUBTXUBUBV+UBUBUBV+UBV+T@U#T@U#1*U#1+U#U#U#1+U#SL1+S7S71+1,1-1.S71.S7SJSJSJSJSO1-SJSNSJ1-SOSJSOSJSOSOSOSO1,SO1-SO1-SOSO1-SG1.S>1.SWS>1/SWSW1/SWSUSUSWXW1.1/S>S>1/WLWLWLW4WLW4W4WLWLWL1.WLWCW4W4WCW5WCW5W5Y%W5ZSW5ZSW5ZSZ7Z7Z7ZBZZXIZZZ5Z=XHZOXHZOXHZ5ZO1&V*U=U=V*TXV*1&U=U<U=U<UB1%U<V$V$UBV$TPV$1$U<U<UBV+TPTPV+V+TPTPT@T@TPT-T-U#T-U#TPT-TPV.T-0W0XT=U#U#T=T=0W0X0Y0ZT=0ZT=T=0Z1#U@U@SNSNSN1#SOSOSOSPSNSPSPSP0Y0ZSPSP0Z1#SPSPSP1#SP1$1$SR1%SRZ.Z.XWZ3Z3Z*Z3Z*W4W4Z,Y#W40ZY$Y$WCW*WCW*W5W5Y%X>W5Y%X>Y%Y%X>XCX>Y%W5X>Y%W5ZSY%X;ZSZSX;XSZBZBZSXSZBZBZ;Z;Z>Z>Z>ZXZTXGXGZVZVZVZVZAU=U<0NU<V,0NV,0OU<U<U<0OU<T;0OT;TPTPU<TGTPTPTGTGT;0MT;TGTGTG0MTG0MV.V.V.0MV.0NV.0NT=0OT=SNSNT(T(SNSN0NT(T(SCT(SCSPSPSC0MSP0M0NSDSDSD0N0OSDSRSDSD0NSRSRSRSD0N0OSRXCX>XCX>XCX>XCX>X>0MX>X>Z;XTZNZNV,T/0L0MT10MT50N0NT;T0T00N0O0P0QT;T;0Q0R0R0S0TV.T0T;T00T0T0U0VV.T(SCT(SCT(T(T(SET(SESESESCSCSC0S0SSESESESESE0S0TSESR0TSR0TSESESEXCX>XCX>XCX:XCX:X:X;X:XDX;X;XDXDX;X;XD0PX;X;0P0Q0QT60R0S0ST30T0UT2T0T70UT0T0T00UT70UT5T50U0V0WT.T00W0X0Y0YV.UM0Z0Z1#T.T.UMUMT.XL0ZSESESEXCXCXCX?0YX:X?Y%X:XDX:0YX:0YX:0ZXDXDXB0ZXDXD0ZXDV,V,V,0Z0ZT5T5T5V,0ZV,V,T.T.0ZT.T/0ZT/T/X:0ZY%Y%XBXBX=0ZXBXBX@X@V,0YV,T40Y0ZT4T4V&T4V&V&T4T40YT40YT/T4T4V&T9V&V&XLX9T9XLT9T9V&T9VIVFVIVFVDVGVDVGXJXJT9VHXFXFVHY&VHY&VHY&Y&SEY&SEY&SEY&SEVJVIVJVIVJVIVJVIVIVFVIVFVIVFVIVFVFVCVFVCVFVCVFVCVBVBVKVKVBVBVKVKVBVBVKVKVBVBVKVKVBVBVKXCVBVBXCXCVKXCVKXCVDVDXCXCVDVDXCXCVDVDXCXCVDVDXCXCVDVDXCXCVDVDXCXCVDVDXCXCVDVDXCXCVDVDXCXCVDVDXCXCVDVGXCVGXCVGXCVGT9VHT9VHT9VHT9VHVHY&VHY&VHY&VHY&Y&SEY&SEY&SEY&SEVJVIVJVIVJVIVJVIVIVFVIVFVIVFVIVFVFVCVFVCVFVCVFVCVKXCVKXCVKXCVKXCXCVGXCVGXCVGXCVGXMVHVGVHT9VHT9VHVHY&VHY&Y&SEY&SEVJVIVJVIVIVFVIVFVFVCVFVCVKXCVKXCXCVGXCVGYHYH/U/VYHYH/VYGYGX.YGYGYHYHYH/UYH/UYHYU/UY7Y7Y7XRY7/UYDY7Y7/UY7YU/UY7Y7Y7Y7/U/VY7/VYGYGYGYG/VYGYGYG/VY=YGX.X.X.X.X./U/VX.X.X&X&X,X,/UW3X,W;X,X,V=V=U8V=TWV)TWV)V)V?V)V?V)/QV)V)Y4Y4Y4/QY@Y@/QY@/Q/RY4Y4Y8/RY@Y@Y'Y,Y'/RYHYHYH/RYHY3Y3Y3Y3/QY3Y3/QYUYUYUYUYUY3YUY3Y3/P/QY3Y3/Q/RY3/RY3Y3YUYU/R/SY,/SY,/TYUYDYUYUYDY7YVYV/R/SYL/T/TYUY3Z&YUXRZ&Z&XRY;/SY;/SZ$Y;/TY7/TYVYVYLYLYL/TYL/TYLYL/T/UYVYG/UYGYGYG/UYGYL/VZ$Z$/VZ$Z$Z$Z$/V/V/WZ&/X/X/YYEYE/YYEYEYE/YYEYEYEYGYGYEYGYE/XYEYEYGYG/XYG/XY=/YYG/YY=Y=Y=Y=Y=Y=/YY=Y=YGY=Y=YN/XYNYGYGYG/XYGYGYG/XYG/XYGYGYXYXYX/X/X/Y/Z0#0#0$YNYNYN0$YN0%Y=X.0%X.YN0%0&0'X.X.0'X.0'0(0)0*0*X.X.X.X.0*X.WOX.X.VNVNX.WIVN0)0)0*0+X&WIX&WIWHX&X&WHWHX&X&WHX&WHWHWIWHWH0'VN0(0(WHVYVYX&X&X&0(WH0(WHWH0(WG0)WGWH0)VYVYVY0)VYVY0)0*W=W=0*WGVYWGWGW=WGW=W=0)W=W30)W3W3W3X,X,WUWUX,X,WUWUV=V=0'0(0(U>U>U>TWTWV=TWV=V=0'0(V=V=0(TOTWTW0(TWTWTWTW0(U>U>U>0(TLTL0(US0(TLTTTL0(TLTLTLTL0(TLTL0(V;TUTU0(TUTLTL0(TU0)0*TU0*TUTU0*V;TU0+V;V;UP0+V;UPV;UPUP0*UP0+V;V;UKUKUKU-UKU-U-0)U-U-U&V20)V2Y4Y4XEY@Y@Y@YIYIY@0'YI0(Y@Y@YIYIY@Y@Y@0'Y@Y'0'0(YI0(YIYIY'Y'0(0)0)0*0+Y,0+0,YIYI0,Y,0-0.YIYIYI0.0.0/YI00Y,Y,00Y,Y,000102Y,02Y,0303YK04YK04Y,0506Y,Y,06070708YM09090:YMYMY,0:0;0<0<0=Z#Z#YM0=YMYM0=0>0?0@Z&Z&0@Z&YK0@0A0B0B0C0D0EZ&Z&0E0FZ&Z&0F0GZ#0GZ#0H0HY-0I0J0J0K0L0M0MY00N0O0O0PY0Y00P0QY00R0R0S0TY+0TY/0UY/0U0VZ&0W0W0XY<Y<0X0YY<Y<0YYEY<Y<YEYEY<Y<0X0YY/Y/Y<0YY/Y/0Y0ZY/1#1#Y<Y21$1$1%1&1'1'1(1)Y<1)Y<Y<Y<YGYGY<1)Y<1)Y<Y<1)1*Y<Y<Y<1*YRYRY<1*1+1,1,Y<Z(1-1-1.YRYRZ(1.YRYG1.1/Y<Y<YGYG1/YGYG1/101111121314Z%Z%YGZ%Y<Y<131414YGYGYGYG14YG15Z%1516YG16YQ171818YQWJWJYQ18YQWJ18X.WJWJ1819YGYGWJWJY)19Y)Y)YGY)VTVTVQVQX.X.17WJX.X.X.17X.X.17X.1718VQVQ18VQVQVQVYVY18VYX(X(18X(X'18X'X'W3W318W%18W%WU1919WUWUWUW%WUWUWUWU18WUWU18X,WUWUX,X+X+X+WUX+WUWUX+X+WUWUWUWU15WU15X+16X+WRWRX%16U>TETETETETEU>U>TETETTTT13TTTTTTTETTTETETETE12TT12TLTLTLTL12TLTUTLTUTL12TUTU12TUTU121314141516U016171819U019U01:U01:1;UPV;V;V;1;1;V;1<UP1<1=UPUPV;V;1=1>V;1>UPUP1>UPUPUP1>U-XLU-YBYB1>1?YBYB1?1@YIYI1@YI1@1AYBYB1AYB1BYB1BYBYBYB1B1CYBYB1C1DYBYBYI1DYI1E1EYM1FYMYIYIYI1F1FYM1GYMYMYMYM1GZ'Z'YMZ'1F1GZ'Z'YPYP1GYPZ'Z'YMYM1F1GYMYJ1GY+YPY+Y+1GY+1H1H1I1J1KY+1K1LYSYWYWY*Y*1K1LY*Y*1LY/1M1NY/Y/1N1OYTYT1O1PYTYT1PYT1P1Q1R1SY/Y/1SXVYTYT1SY9YTXVY9Y9Y*1RY*Y*Y*Y*Y*1R1RY91SY9YRYGXVXVYGYG1RYGWZWZY9Y9WZWZWZ1QWZ1QWZWZ1QX/1R1SY91SY91T1TYG1UWZYGYG1U1V1VVW1W1XVWVWVW1X1X1YX#X#1Y1ZX#X#1ZXW2#X#2#2$VSVSVSVSX#2$VSVS2$2%WSWS2%WSWSWS2%2&VS2&VSVSWSWYWS2&2&2'VSVSWSWSVSWS2&VN2'VNVNVNVN2'VNVN2'2(2(2)2*W#2*2+W#W#WY2+2,2-2-2.2/2020W,21W,W,W,21W7212223W#W#W#W#X(22W#W#W#W#22W#W#W#W#X(X(X'X'WUWUX'WUWUWUWUWUWU2/WU2/20WM20WMWMWMWMWM2021WU21WUWUWUWU21WM2122WMWM22WT23WTX%X)X%X)U>U>U>2222TTUYUYU>22U>U>UYUY22UYU>U>2223U>U>2324TT24UYTTUY24UYUYUY24UY25UY25UYUYU/25U/U/2526U/U/26TTTMUUTTTLTLTLTLTL25TL2526TL272728TLUPTL28TL29TL29TL2:2:YBYB2;YBYB2;YBYBYBS0S02:2;S:S:2;S02<S0S0S0S:S0S0T'2;T'2;T'2<T'YMYMYCYCT'T'S0T'2:T&T&T&Y*2:Y*2;Y9Y92;2<2<2=WFWFY9Y92=Y9Y92=2>2?2?W(WFVZW(W(2?W(XV2?W62@2@W(2A2B2B2CS9W62CY9W(W(2C2DW(W(W(2DW(2E2E2F2GVU2GVUVUVUWQ2GWQWQ2GX#2H2IVU2I2JX#VU2JVUVUX#X#2JX#2JX#VU2KX#2KX#X#X#2KX#X#2K2LX#2MX#W72MW72MW7W7W7VS2MW7W7W72MW7W7X#2MX#X#W7W7W7W9W72LW7W72LW7W7W7W7W72L2MW,W,2MW9W7W9W9W92LW9W9W9W9W9W9W<W7W7W72K2KW92LW92L2MW92NW92N2O2PW<W<2PW<WT2PWTX%2PX%X%X%V:U/V:V:UFU/UFUFTMUUTMTMTMTMTM2MUFULUFUF2LTLTMUETM2L2M2NUEULULULTLTL2MTLUL2MULULTLTL2MTLULUIULUIULUL2LULUL2LULUL2LULUIUL2LXNUEXN2LUPXNXNUPUOUPUOUPUOUPUOUPU.U.U.X2SASASAS:S:SASASAS0SASZ2FS9T&S9S9VO2F2GVOWQWQWQS9WQS9S9WQWQS9WQVUVUWQWQW@2CWQ2DX#X#WQX#WQWQWQ2CWQ2CWQWQ2CWN2D2EX#X#2EX#WNX#W+W+X#2DW+2EW+2EW+WE2EX#2FXXX#2FX#2GX#W9X#W92FW<W<W<W92FW92G2GW<W<W<W9W<W9W9W<2FW<2GW<2GW<W<W:WUW:W:W:W:W<W<W:W:2EW:2EW:W:2FW<X$2F2GW<W<W<2G2G2H2IW)2IW)W<W)X$X$2IW<W<W<W<2IW<W<W)2IW<W<2IW<W)2IW)2JW<X-W<X-X-WU2IWU2IWUX-X-WUWUWU2IWUWUVXWUWUWUWU2HWUWU2HWUWUWU2HWUWUWXY$WXWUWX2GWXWXY$2GX%UFUFUF2GUFUI2GUIUI2GUIUIUHUHUIU*UHTH2FTHUH2FUHTHUH2FU*TAU7UZU7U7UZV-XMV-V-V%XMXM2CV<V5V52CV1U;2DU)U)TVUDXFSAXF2C2CS=S=S=S0SYSYSYS92BSHSHSHS1SHS1XWWQSHWQSHSHS1S1WQWQVM2?WQ2?VMVMW<W)W<W)W)X-2>X-WUWUX-X*X-X-VXVX2<X*VXVXVXVXX-VXX-2;X-VXX*2;VXVXVXX*VX2;VX2;VXVXWUWUVXVXVXVXY#WU29VXX*VX29W0X*W0WU29WUWUWXWXWXWDUI28XNXNU*V7TYTYV7V72728TI28TITITQU;28TITDTITITITITI27TIUDUDV6V4V#V#26TIS=S=262727S=S5S5S=S2S=S2S2S2S<S2XF25XFSBS<S2S<S-SBS<24SVS2T#S2T#S2S2S2T#S2S2S-S-T#T#21T#S.21S.S.S-S.S-21SYSY21SYSYSYSY2121SKSKSK21T$SMT$S.21S.SMT$SKT$SK20SKSKSKSKS@SK2020S@21SXSK21SKS@SXSX21SX21SX22SXSXSXSXS3SHSHSHSFSHS1SHS/S/2/S/S/2/S1S/S/S1VMS1S1S/2.S/S?VMVM2.XWW<W<2.W'W<W'W'W'VXVX2-Y#VXVXVXWK2,VXWKWKVX2,VXVXX-2,X-VXX*W0WKW0WKW0W0W0TITITD2*U,XLU,UXTJXKTJT@SV2(SVSV2(S.S-S.2(S.XES.2(2)2*2+2+SK2,SKSKSKS@S@SKS@2+2,SQSQSLSLS3S3S32+S7SJS7SJ2*S3SOSOSFSF2*SOSOSOSJSOSOSOSO2)SOSGSO2)2)SGSGSGSG2)2*SWVXVXW>2*VXVXVXW>W>W>2)W>W42)W4W42)W4W4W4WL2)WLWLY$W$W?2)2)W?W?W?W?W?WC2)WDWDWDWCXMU+U=U+U+U+2'U+U+U+2'U=U=U+U=U=T@U#T@2&T-U#T-U#U#U#U#2%SLS7SLS7S72$2%2&S7S7SJ2&SN2&XRSN2&SNSNSNS7SJSJSJ2%SJSJSJSJSJSJSOSO2$SO2%2%2&SO2'SOS8SO2'SGSG2'S>2'S>S8S>2'SW2(2)S>SWS>S>SWSW2(SWS>SWS>S>SWXW2'XWWLWLW4WLWLWC2&WCU=V*U=U=V*V*V*U<UBUBUB2$V$V$V$2$T-T=T-T=2#V.V.V.U#V(2#T=V(V(T=2#2#T=T=T=T=2#T=U@T=2#T=T=2#2$2%2&V(V(2&XJSNSNSN2&SO2&SP2'SPSP2'SOSOS>SPSPS>S>2&S>SPSPSP2&2&2'SR2(S6SRS6SRS6SR2'S6WCWC2'WCU=U=2'2(2(U<V,U<V,U<V,U<U<U<2'U<U<U<2'T;2'TGTGTGTGTG2'TG2'V.V.V.TGV.TG2'2'V.V.V.T=T=V.2'V.T=V.V.2&SNT(T(SPSPSC2&SPSPSPSDSPSDSDSDSC2$SCSCSDSDSC2$SRS6SR2$2$SRSDSRSDSD2$SDX>X;X>X;V,V,V,T6T2T2T6T2T1T5T1T51XT5T5T5T51XT5T5T/T/T/1XT8T01XT0T21XT2T21XT0T/T0T0T0T01X1XT;1YT;1YTGT;TGTGV.V.V.T;T;T;1XT0T0T01XT;T01X1YT0V.V.V.1XV.V.V.SC1XSE1YSC1YSCSESE1YSE1Z1ZSESSSESESESE1ZSESTSESEX;X;XDXDX;X;XDXD1W1XXDXDV,T6V,T6V,T6V,T31VT3T3T3V,T3V,T3V,T3T51UT3T31UT51UT01VT0T0T0T01VT7T0T71VT01V1WT.1WT.T.T.1WT.T.T.1W1X1YUMT01Y1Z2#2#UMUMUM2#V.UM2$2$2%UMV.T.2%T.T.2%UMT.2&SE2&SESEXCXCX?2&2&XDXDXDXB2&XBXBXBXB2&XB2&2'XBXB2'XBXBXBV,2'V,2(2(T5T5T5V,T5V,T/T.T.2'T.T5T5T/T/2&XBXBXBX=XSX@X@V,2%V,T4T/T/T42%T/T/2%2&T4T4V&T4T/T/T4T4YU2$YUYU2$Y72%Y7YHYH2%2&YHYHYHYUYUYUYH2%YUY7Y7Y7YUYDYUYDYDY7YDY7YUY7Y7Y7Y7Y7Y71YY7Y7YGYGY7Y7YGYGYGYGY7YG1VY=Y=Y=1V1WX&X&X&1WX&X&X,X,X,W3V?V?V)V?Y4Y4Y41U1UY@Y@1V1V1WY4Y4Y@Y@Y4Y4Y8Y8Y@Y@1U1V1W1XYH1XYUYUY3YUY3Y3YHYU1WYUY,1WY,Y,1WY3Y,1XY3Y31XY,Y3Y3Y31X1XYUY31YYUYUY,Y,Y3Y3Y,Y3Z&Z&1WZ&1WZ&1X1YXRYVYLYLYVYVYLYLYLYLYL1WYUYUY3YUZ&Y;Z&Z&Z$1UZ$Z$Y;Z$Y;Y;Y7Y7YVYVYLYL1SYLYL1SYLYLYVYGYVYVYGYGYV1RYGYG1RYGYVYVYLYLYLYGYLYLZ$Z$Y;Z$Z$Z$Z$YEZ&1NZ&Z&Z$Z$1NYE1NYEZ&YEZ$1NYEYE1NYEYEYEYLYLZ$YEYEYGYEYEYEYGYE1LYEYGYGYG1KY=Y=Y=Y=Y=YGYGYGYGY=1JY=Y=Y=1JY=Y=Y=1JYGYGYG1JYGYGYX1JYGYX1JYX1J1KYQYN1K1LYGYGYN1LYGYGYGYGYG1LYGYGYG1LYXYX1LYNYXYN1LYNYNYNYN1LYNX.X.X.Y=Y=1KYNYNX.YNYNYNYN1J1KYN1KYN1LX.X.1LX.1LYGYGYGYN1LYG1MYGYGYG1MX.X.1MX.X.1MX.X.X.1MX.WOVN1MVNVNX.X.X.1MX.X.X&X&X.1LX&X&WHWH1LWHVYVYVN1LVYWHVYVYX&X&X&WGX&WHWHWHWGWG1IWGWHWGWHWGWHVYVYVYVY1GVYVYWGWGWGW=W=W=1FW=WGWG1FWGW=1FW=W3W=W=1FW3V=V=V=1FV=V=1F1GV=1GU>U>V=V=U>U>V=V=U>1FV=V=1FU>TWTWTTTTTWTWTTTTU>TEU>1DTT1DTTTT1D1ETLTL1ETLTLTLTL1ETLTLV;1EV;V;1ETU1F1GTUTUUGTU1FUG1G1HTUTUTLTLTU1GTUTU1GV;TUV;V;V;TUTU1FUKUPUKUP1FUPUKUP1FUPUPU-U-U-1FTBTBTBV2Y@Y@Y61E1EY6YI1FY@[email protected]'Y'1K1L1L1M1NY,1N1O1P1Q1QY.YI1RY.Y.1RY.Y.Y,1R1S1S1TYIYI1TY,1U1V1V1WZ)Z)YI1W1X1Y1YZ)1ZZ)1Z2#2$2%Y,Y,2%2&Y,2&Y,2'Y,Y,Y,2'Y,2'2(2)2)2*2+YKY,YKY,Y,2*YKYKYKYKYKY,YK2)Y,2*Y,2*2+Z)Z)2+2,Z)Z)2,2-2.Z#2.Y,Z#2/Z)Z)Z)2/Z)Z)2/20YM20YMYMZ)20212222YMYMYMY,Y,Y,2222232425Z#25Z#Z#25Z#Z#Z#2526Z#Z#2627YMYM2728292:2:2;Y?Y?2;2<Z'Z'Y?Y?Z'Z'Z&Z&2;2<YKZ&YKYKYKYKYK2;YKYK2;2<2<Z&YKYKZ&Z&2<2=YKYK2=2>YK2>2?Y-2?2@Y-Y-Z&Z&Y-Y-2?2@Y-Y-2@Z&Y-Y-Z#2@Z#Z#Z#2@2A2B2BY-2C2DY02DY0Y02D2EY0Y0Y?2EY?Y?2E2FZ'Z'2F2GZ'Z'Z'Z'2G2HY0Y0Y02HZ'Z'Z'2HZ'2H2I2JY-Y-2J2KY-2K2L2M2M2NY0Y02N2OY0Y0Y0Y/2OY/Y0Y02O2PY0Y02P2Q2QY+2RY+Y02RY/2SY/Y/Y+2SZ&2SZ&Z&2SYEYEYE2SY<Z&2TYEYE2TY<YEYEY<Y<Z&Z&2SY<2SY<Y<Y<YEYEY<YEYYYY2RYYYYY<2R2SY<Y<Y<2SY<Y<Y/Y/Y<2RY2Y2Y2Y2Y/2RY<Y<2R2S2SY<Y22TY2Y2Y22TY22TY<Y<2TY<2U2VY<Y<2VY/YEYEYE2VYEYEY<Y<2U2VY<Y<YGY<Y<Y<YGYGY<Y<Y<2TY<Y<2T2UY<Y<2UY<Y<Y<Y<Y<Y<2UY<Y<2U2VY<2VY<Y<2VZ(Z(Z(Y<Y<Z(Y<Z(Y<Z(Y<Y<Y<2TY<Z(Z(Y<Z(Z(Y<XVXVYGYGY<2RYGYGY<YGY<2QY<YGYGYGYGYQYGYG2PZ%2P2QZ%Z%YQ2QYQYQ2QYQYQYQYQYQZ%2QYQYQZ%Z%Y<2PY<Y<2PYGYGYGY<2P2Q2R2RZ%Z%Z%YG2RYGYGZ%Z%Z%YG2QYGYGYG2QYQYQYQYQYQ2Q2RYQYQ2RYQZ%WJ2RWJYNYNYQYQYNYNYN2Q2Q2RYGY)Y)WJY)Y)Y)VTY)Y)WJ2PWJWJX.X.VRVR2OX.VRX.VTVTVT2OVTVT2O2PVTVT2PVQVYVYVNVNX(X(2OX(2O2PX'X'2PW%W%W%W%W%W&W%2O2PWUWUW%W%2PWUWU2PWUWU2PX,X,X,WUWUWUX+WUWUWUX+2NX+X+X+WRWRX%X%2MTT2NTTTT2NTTTTTTTTTT2NTLTUTLTU2M2NTL2O2OTUU0U0TUTU2O2PTU2PUPUP2PV;UPUPTLTLTLU0TLU0U0U0TL2NTL2OTLU0TL2OU0U0U5U0TL2NTLTL2NU22OTLU0UPU0UPU02NU02OU0UPUPUP2N2OUPUPV;V;V;2O2OV;V;V;V;UPUPUPV;V;V;UPV;2MUPUPV;V;UPUPV;V;UPUP2KUPUPUP2KUPUPUPUPUKUPUKYB2JY>Y>Y>2JY>Y>2J2KY>Y>YBYB2KYBYIYI2KYIYB2KYBYBYIYIYBYBY>2JY>2KY>2KY>YBY>2KY>YBYIYIYBYBYIYIYB2JYIYI2J2KYIYI2K2L2LYM2M2NYI2NYIYIYMYM2NYM2NYMYIXRYIYIYI2N2NYMYIYMYIYMYIXR2MYMYMYMZ'2MZ'Z'YPYP2MYPYPYPZ'2MZ'2MZ'Z'2M2N2O2P2P2Q2R2SY/Y/Y+Y+Y+2RY+Y+YJYJYJ2RYJ2RYW2SYJ2SXRYWYWYWYW2SY+Y+2SY+2S2TYSYS2T2UYWY*2UY*Y*Y*2UY/Y/Y/2U2V2WYTY/Y/YTYTY/2VYTYT2V2WYTYTYSYTYSYTYTYTYTY*YTYT2UYTY/Y/2UY/Y/Y/2UY/2UYTYTYTYT2UYTYT2U2VYTYT2VY92WY9Y*Y*Y*Y9Y*2VY*Y*Y*Y9Y9Y92UY9Y*Y*YGYGYG2UWZWZY9WZYGYGWZWZY92SY92TY92TY9Y92T2U2VX#2VX#X#X#Y9X#Y9X#YGYGWZYGWZWZ2TWZYGYG2TYGYG2TYGVWX/VWX/VWX/X/2SX/VWVWX/VWVWVW2RVW2R2SX#X#2S2TX#X#2TX#X#X#X#VWX#2TVWVW2TVWX#VWX#X#WSWSVSVSWSWS2R2SVSVSX#X#VSVS2RVSVSVS2RVS2RWS2SWSVS2SVSVSWSWSVSWSVS2RVSVSWSWYWS2R2R2SVS2TWSWS2TWSVNVN2TVNWP2TWPVNVNVNVN2TVNVN2TWYWYW#W#W#2SVNW#W#VNVNW#W#W#W#2R2SVNW#W#W#W#2RW#W#2R2S2TWYWYWY2T2U2U2V2WW,WY2W2X2Y2Y2Z3#3$3$3%W#3&3&3'W#W#W,3'WS3(WS3(WSW,W,W,3(W,3(3)3*3+3+3,3-3.3.3/W#W#3/30W#W#VNVNW#W#3/WUWMWMWUWU3/WMWU3/30WMWU30WMWMWMWMWM30303132WTWUWUWU32WUWUWU32WU32WMWM32X+WMX+WMWMWM323233WTWTU>U>U>33U>TTU>UYU>32U>3333UYUYUYU>33XPV:3334V:V:V:34V:V:V:34V:U/TTTT34TT34TTUYUYTTTTUYTTUYTTUY33UYTTUYTTUYUYU/32UYUYU/U/UYTT31U/3132UUUU32TLTLTLTL32TLTLUPUP3233TLUPTLUPTLTLTL3232UPUPUPUPUP32UP32UP33UP33UPTLUPTLUPUPUP32YBYBYBYBYBS:3232YB33S:S:33S:S:S:S0S:33S0S033S033S0S0S0S033S034S0S0S034S034T'T'T'T&34T&Y9Y93435Y*35Y*Y*35Y9Y*XV35Y9Y*Y9WFW-WFWFW-34WF35Y9Y9W-W-Y9Y93435Y935363737W(W(W(W-W-37WF3738393:VZVZ3:3;3;3<3=W/3=W(3>W(3>3?VOVOW(W(VOVOW.3>S93?3?3@W63AY9Y93A3BY9Y9Y9W(Y93AW(W(W(W(W(3AW(3AVUVU3AY9W(W(3A3BVUVU3BVUVUVU3B3CVUVUWQVUWQWQX#X#3BX#3BX#VU3CX#X#3CX#3CX#X#X#VU3C3D3E3EX#3FX#3FX#VU3GVUVUVU3G3GX#3H3IVSX#X#X#3HVSX#X#VSVSVS3HVSVS3HVS3HVSX#VSX#X#X#W7VSVSW7W73F3GW7W7W73GW7W7W7W7X#3GW,3GW7W73GW7W7W7W7W7W73GW7W73G3HW7W93HW9W7W9W9W9W73GW7W7W73G3H3I3IW9W9W9W93IW93J3JW<3KW<W93KW9W9W93K3L3MW93MW93N3NW<W<W<W<W<3NW<WTWTWT3NWTY%X%Y%TMTMULULUU3LUUUUULUEUL3LTM3LTMUL3LULULULUE3LULUEUETLUE3LTLTLUE3LULUL3LUL3L3MUEUEUIULUI3M3MTLUEUETL3MXNUPT&S9T&3MS9S9S93M3MWQWQWQW@3MW@W@W@W@WQ3MWQWQWQ3MWQ3MWQWQVVWN3MWNWNWNWQWNWNWNW+W+X#X#WEX#X#3JW+3KW+W+W+WE3J3KWEWEWEX#3KX#3KXXWEWE3KW7X#3LX#3LX#X#W9W9W9W<W9W9W93KW9W<W<W<3JW<W<W<W<W<3JW:3JW:W<W<W<W:W<W<3I3JW<W<W:3JW:W:W:W:3JW:W<W<3JW<X$X$W<W<W<W<W<3IW)W)3I3J3JW<W)W)3J3K3LW)3L3MW<W)X$X$W<W<W<W<W<X-W)3KW)W)3KW<W)W<W)W)3KW<W)W<W)W)X-WUWUWU3IWUX-X-WUWUVXVXWUWUWU3HWUWU3HWUWUWU3HWUWUWXWXWXWXY$WXX%UFUFT>3FUFUFUIUIUI3EUIUIUH3EUH3FUHUH3FTHTH3FTHTAV%3FV%V5T+T+T+3FV3T,3FT,XFSASA3FSZSZ3FS=S9S9SHSH3EWQVMVMWQWQVMVM3DX-W)X-X-3DVXVXVXVXX-VXX*X*3C3DVX3DVXVXVX3DVXVXVXVXX*VXW0W0X*W03B3CWUWUUI3CUIU*TYV7TYV7V7V7V7UAT:T:3AT:3ATQTITITDTDTD3A3AV#TITIS=S=3AS4S=3A3B3CS=S=S=3CS<S<XFSBSBSBSBSVS-T#S-S-T#[email protected]@S.S.S.T#SYT#T#SYSYSKSKSYSKSKSKSMT#SM3=SMT$SMT$SYSKSKSKSK3;SKS@SKS@SKS@3:S@S@S@SKS@SKS@39SXSXSXSXSX39SX39SXSXSXS1S1S/S/S1S1S/S/S1S1S?S?S?S?36SUW<W<W<W'35VXVXVXVXVXWKWKVXWKVXWKX-VXX-VXTITITD3232S-S-S-S-S-S-S.S-S-S-S.S.30S.31SMSMSM31S.31S.S.313233SMT$T$T$33T$33T$XESKSKXRSQS@S@SQS@S331S3S3S3S331S331SOSOSOSOSOSO3131SG32SGSOSO32SGSGSWSWSW3132SGSWW>VXW>W>W>W>W431W431W4W4W>31W432W?W?WLW?W?31W?W?Y$W?W$31W?W?WCWCU+U+U=U+U+U+U+U=U#U#3.U#U#U#U#3.S7S7S73.S73.XRSNSNSJ3.SJ3.SJSJSJ3.SJSNSN3.SJSNSNS7S73.SJSOSGSO3.SO3.3/SISOSOSO3/SISISI3/S8S83/S8SOS>SOS>3.S>SISISI3.3/3030SWSWSWS>30S>S>30SWS>SWSWSW30SW30S>S>S>30WCWCWCUB30V$V$V$V$V$30V.30V.V.V(V(T=30V(V(30U@T=30T=T=30U@T=U@T=U@T=T=V(U#3/V(3/U#V(V(V(V(3/V(V(V(V([email protected](U@[email protected]/30S>S>SP30SPS6S6S6SPSPSP3/S6S6S63/SR3/SR30S630SRSRW4WCW4WCU=U=U=3/U=V,V,V,V,U<V,V,U<U<3-T5U<U<T5T53,TGTGTGTGTGTG3,TPTP3,V.TGV.3,V.TG3,TGV.V.T=T=T=SNSNT(T(SD3*SCSDSCSDSCSDSDSDSE3)S6S63)SRSD3)SDSDSDSD3)SDT53)T5T5T5T;T53)T/3)T/T/T83)T8T0T/T/T2T/T/T03(3)T0T0T03)T;T;3)T;3)3*T;T;T;3*T;TGT;3*T;T0T03*3+V.3+T0T0T0T0T0V.V.T0V.3*V.SC3*3+SESCSESESESCSCSC3*SESESE3*3*SSSSSSSESESSSSSESE3)ST3)XDXDXDXD3)XDXDT3T6T3T3T53(T53)T3T33)3*3*3+T73,T7T0T7T0T0T0T03+T0T0T5T5T0T03*T.T0T.T5T.T03)T.T.T5T.T5T.T03(3)UMUM3)UMUM3)UM3*UMT03*T03+T0T03+T0T03+T0UM3+UMUMUMV.V.V.3+V.V.UMUMUMV.UMUMV.V.3)V.3)UMT.T.UMUM3)UMUMUMT.T.3(SSSESEXCX:X?X:X:3'X:XDXD3'XBXBX:XB3'XBXDXD3'XBXDXDXBXBXD3&XB3'V,T5V,T5V,T5V,T5T5T5V,T5T5T.T53$3$XBX:XBV,V,V,T/T43#T4T43#T4T4T4T43#T4T4Y7Y73#3$Y7Y73$Y73$Y7Y7Y7YHYH3$YGYHYH3$3%YHYUYUYUY7Y7YGYGYGY=Y=Y=2Z3#X.X&3#3$X&X&3$X.X&X&Y43$3%Y@Y4Y43%Y@Y@Y@3%Y@Y@Y43%Y4Y43%Y4Y4Y'3%Y'Y'3%Y,3&Y,Y'Y'Y'3&3&Y,3'Y,YH3'YUYUYHYH3'YHY3Y3Y,Y,Y3Y3Y,3&Y,3&Y,Y,3&Y,Y,Y,Y3Y3Y,Y,Y33%Y3Y33%YUYUYUY,Z&Y,Z&Y,3$3%3&3&Z&Y,Y,Z&Z&3&Z&YLYL3&3'YLZ$Z$Z$YLYL3&YLYVYV3&3'YV3'YVYG3'YGYGYGZ&Z$Z&Z&Z&YEZ&YEZ&YEZ&Z&Z$Z$YEYEYEZ$YEYEYE2ZYEYE2Z3#YGYGY=YGY=Y=Y=Y=YNYNYNYN2YYN2YYGYXYXYGYGYXYXYG2XYGYGYXYNYX2XYNYN2XYNYG2XYGYG2XYNYGYGYNYN2XYGYGYGYNYNYGYGYG2WYXYNYNYNYN2VYNYNYN2V2WX.Y=Y=YNYNYN2VYNYG2VYNYNYNYNYN2VX.2VX.YNYNX.X.2VX.YNYGYGYGYN2UX.X.2UX.X.X.YGYGYG2U2UX.2VX.2VYGX.2WX.X.2WX.WIWIVNWIX.X.2V2WX.X&X&X&WHWHWHVYVYVYVNVYWHWGWHWHWGWGVYWG2RW=W=W=WGWGVYWG2QW=W3W3W=W32QW3V=2QV=U>2Q2RU>U>2RV=U>U>U>U>2RU>2RV=U>U>V=V=U>U>2QTETETETLTLTTTTUT2PUTUTTLTLUTTLV?2OTLTLTLTUTL2OV;V;2O2PTUTUUGTUTL2OTLTLUG2OTLTL2OUGTLUGTLTLTL2OUGTU2OTLV;V;TU2OV;V;2OV;UKUK2OUKUPUK2OUKUPUKUP2O2OU$U$U$Y6YIY6YIY6Y6Y62NY:Y:YIYIY@[email protected]'2O2PY.Y.2P2Q2Q2RYI2SY'Y'2S2T2T2UY.Y.2U2VY.Y.Y'Y'2V2WY'2WY'2X2X2Y2ZY,2Z3#Y'3$3$Y,3%Y,3%Y,Y,Y,Y'Y'3%3&3&Y,3'Y,3'3(3)3*Y,Y,3*Y,Y.Y.3*3+Y.Y.YIYI3*Y.YI3+Y.YA3+3,Y,Y,YAY,3+3,YIYI3,3-YIYIY,Y,3-Y,3-3.YIYI3.YIYIYIYIYIYI3.YIYIZ)YIYIZ)Z)3-YI3-YI3.3.YI3/YIZ)Z)3/Z)YIZ)YI3/YI3/YI3030YM31YMYIYI3132YMYM32YM3233YIYI33Y,343535Z&36Z&36Z&37Z&Y,Y,3738Y,Y,Y,38Y,3839YK393:YKYKY,Y,Y,YKY,39YKYK39YKY,YK39YKYKYKYI39YI3:3:Y,3;Y,3;3<3=3>3>3?3@Z)3@3AZ)Z)3A3BZ)Z)3BY,3C3DY,Y,Z#Y,3CZ#Z)Z)Y,Y,Y,Z#Z#Z#Z#3B3BYM3CYMZ)Z)YM3CZ)YM3CYM3CYMYMYMZ)Z)3C3D3DYMYMYM3D3EYMYMZ)YM3EYM3E3FY,3GY,Y,Y,3GY,Y,Z#Z#Z#Z#Z#YMZ#Z#YMYMY,3DZ#Z#Y,3D3EZ#YKYKZ#Z#YKZ#Z#Z#YMZ#YMYMZ#Z#YMYMZ#Z#YMYMZ#Z#3@3AYMY?YM3AY?Y?3AY?Z#Z#3AZ#Z#Z#Z#Y?YM3@3A3B3BY?3C3DYKZ&YKYKZ&Z&3CZ&YKYKZ#YKYKYK3BYKYKYK3B3CZ&Z&YKYK3B3CYKYK3CZ&3D3EYKYK3E3FYKYK3FY-YKYKY-Y-YK3EY-Y-Z&Z&Y-Y-3DZ&Y-Y-Z&Z&Y-Y-Z&Z&Y-Y-Z&Z&Y-Y-Z#3AZ#Z#3A3BZ#Y0Z#Z#Z#3B3BY03CY03CY-Y-Y-3CY-3D3EY-Y-3EY-Y03EY0Y03E3FY0Y03F3GY0Y03GZ#Y?Y?3G3HY?3I3IY03JY0Y?Y?Y?Z'3IZ'Z'Z'Z'Z'YPZ'Z'Z'YPYPY0Y03GY0Z'Z'YPZ'Y0Z'Z'Z'Z'Z'3E3FZ'Z'Z'3FY-Y-3FY03FY0Y0Y0Y-Y-Y-3F3FY0Y0Y03FY0Y0Y0Y-Y-Y0Y0Y-Y-Y0Y0Y-Y-3D3E3E3F3G3HY03H3IY/Y0Y0Y03IY03IY03J3JY0Y+Y+Y03J3K3LZ'Y+Z'Y+Z'Y+Z'3KY0Y03KY/3KY/Y/Y/Y/Y/Y+3KZ&YEZ&3KYEYE3KYEZ&Y<Z&Y<Y<Y<Z&Y<YE3IY<Y<Z&Z&Z&3IZ&Z&Z&Y<YYYYY03HYYYYY/3HYYYY3HYYY<Y<Y/Y/Y<Y<3GY<3GY2Y/Y/3GY<Y2Y2Y<Y<Y23G3GY<3HY<Y<Y<3HY<Y23HY2Y2Y23HY23IY2Y23IY23IY<Y/Y/3I3J3KY/3KY/Y/Y/YEY<Y<Y<3JYEY<Y<YEY<Y<Y<Y<YGY<Y<YGYGY<Y<3GYG3HY<YGYGYG3HY<Y<Y<3HY<Y<Y<Z(Y<Y<Z(Z(Y<Y<3F3GY<Z(3GZ(Y<Y<YRYRYGY<Y<Y<Y<YGY<3EYG3EZ%Z%YGYG3EYGYQYQZ%YQ3D3EYQYQ3EYQYQYQ3EZ%Z%Z%Y<Y<Y<YG3D3EYGYGYGYG3EYGY<Y<Y<3E3EYGYGYGYG3EZ%Z%YGZ%YGYGZ%Z%YGYGYG3CYQYQZ%YQZ%YQYQYQYQZ%YQYQ3AYQZ%Z%[email protected]%Z%Y)Y)3?3@Y)Y)[email protected]@X.VTVTVT3@VTVT3@VQVT3@VQVQ3@VQVQVQ3@X(3AX(W3W33AX'W3W33AX'W3W%W%W%3@3AWUWU3AWUWUWUW%W%W%WUWUX,WU3@X,X,3@X,WUWUWU3@U>TTU>3@U>3@U>TTTETETTTTTTTLTLTLTUTUTU3>TUTUTU3>3>U0U1U0TUTU3>3?TUTUTU3?TUV;3?V;TUTU3?3@TU3@3AUP3AU0TLU03AU03BU03BU53CU5TLU3TLTLU5U5TL3BTL3BTLTLUPUP3BUP3BUPUPUPU9U9U93B3B3C3D3EV;UP3EUP3EV;3FV;3F3G3H3IV;V;3I3J3JUPUPUPYB3J3KY>YBYBY>3KYBYB3KY>YBYBY>Y>Y>3JY>3K3KYI3LYBYBYIYBYBY>YBY>YBY>YBY>YBYBYBY>YBYBYB3HYB3H3IYBYB3IYI3JYBYIYI3JYB3J3KYBYBYIYBYBYB3J3KYIYIYIYMYIYIYMYM3JYMYIYIYI3JYMYM3JYM3JYM3KYMYIYIYI3KYIYMYIYI3J3KYMYMZ'YPZ'Z'Z'YPZ'3JYPYP3JYPZ'3JZ'Z'YPYP3J3KYPYJYPYJZ'3JZ'Z'3JYJZ'YJZ'3JYP3K3KY+3LY+YP3LYPYPY+Y+YPY+Y+3KY+3LYJYJ3LYWY+Y+3LY+Y+Y+3L3M3MYW3NYWYW3NYWYWY+Y+3NYSY+3NYSYS3NYSYSYSYSYSYWYSYSYS3M3NYSYSY*Y*Y/Y/3MY/YT3MYTYT3MY/YTYTYTYTY+Y+Y/Y/YT3LY/Y/3LY/3L3M3NYTYTYTY*Y*Y/Y/Y/3MY/Y/3MY/YT3MYTYTYTY/YTYTY/Y/YT3LY/Y/3LY/YTYTYT3LY*3LY*3MY*3MY*Y*Y9Y9Y*Y93LWZWZWZWZX/3LX/Y9X/X/X/X/X/Y93KX/X/3K3LX/X/3LX/Y9Y9Y93LX#X#Y9X#WZWZWZVWVWYGVW3JYGYGYGVWX/X/3IVW3IVWX#X#3IVWX#X#VWVW3IVWX/X/VWX/3HVWX/X#VWX#X#X#VWVW3GVWVWVW3GVWWSWSVS3GWSWS3GWSVSVSX#X#VSVS3FVSWSWS3FWSVSWSVS3F3FWSVSWSVS3FVSVSWS3FWS3GWSWSVS3GWSWS3GWSVS3GVSVS3GWSVSVSVNVNWP3G3GVNVNVNVNVN3G3H3HWY3IWYVNVN3I3JW#W#3J3KW#W#3KW#3K3LW#W#VNVN3L3M3MWYWYWYVNWYWYWY3L3MW,W,WYWY3M3N3N3OWYWY3O3PW,W,WYW,3PW,WYWYWY3PW,3PW,W,3PW,W,W,WYWY3P3QWY3QWYWYW,3Q3R3S3SWYWY3T3T3UW#W#3UW,W#W#W#W#W,W,W,3T3U3V3V3WW#3XW,W,3XW,WSW,3XW,3XW,WSWSW,W,3XW,3XWYWYWY3X3YWYWYWYWY3YWYWYWYWY3Y3YW#WY3ZW#W#3Z4#4#4$4%W#4%4&W#W#W#4&W#W#4&4'W#W#VNVN4'4(VNVN4(4)WUWUWU4)WUWUWUWM4(4)4*WMWU4*WUWM4*WMWMWMWM4*WTWTWMWMWM4*4*4+WTWT4+WTWTWTWU4+WUWUWUWM4+WM4+WUWMWMWUWU4+X+WMWMWM4+WT4+WTWT4+WTWTWT4+UYU>UYU>UYU>4+4+4,U>UYUYUYU>UYU>U>V:V:U>U>4*4+U>U>V:V:4*4+V:V:4+4,4-UY4-TTTTTTUYTTUYTT4,TTUYTT4,U/U/U/4,U/U/U/UU4,UUUU4,TT4-TT4-TLTLTLTL4-TLTLTL4-TLU:4-UPU:UPTL4-TLUPTLUP4-UPUPUP4-UPUPUP4-4.TLUP4.UP4.UPTLUPYBYB4.YBYBYBS:S:YBYBYB4-YB4-S:S:S:S:S:4-4-4.S:4/S0S04/S04/S0S:S0S0T'S0S0S0T'S0T'S0S0S0T'S0T'T'T'T'T&T'T&4*Y9Y9Y9Y9Y94*Y9Y*4*Y*Y*Y*Y9Y*XVY9Y9Y94)W-W-4)W-4)4*WFWFY9Y9W(W(Y9Y94)Y9Y9Y9Y94)W(4)W(W(Y9W(W(W(W(W(4(W(4(WFWFWFVZ4(VZVZ4(4)VZVZVZVZVZ4)VZVZ4)W(W6VZW6W6VZ4(W6W6W6W6W64(W6W64(4)W64)W64*VZ4*4+W(4+W(W6W(4+4,VO4-W(W(4-W(W6W6W.4-4-W6W6W6W6W6W6W/4,W/W/VOW6VOW64,Y9Y9W(W(4+Y9W(W(Y9Y9Y94+W(4+W(W(W(VU4+VUY9Y94+Y9Y9Y9W(4+Y9Y9VUVU4*VUVUVUY9Y9VU4*Y9Y94*VUX#X#4*X#VUX#VU4*X#X#VUVUX#X#VUX#4(X#VUX#4(X#X#X#VU4(VU4)4)X#4*X#X#X#VUX#4)X#VUVUX#X#VU4)VUX#VUVUVUX#VUVUVUX#VUX#VU4&4'VU4'X#4(X#X#VSX#X#VSVS4'4(VSVS4(4)4)4*X#VSVSVSVSW7VSVSW7W74(WS4)4*X#W7X#X#4)W,4*4+4+W7W7W7W7W74+W9W7W7W9W9W74*W9W9W9W9W7W9W7W7W74)4)4*W7W74*4+4,W9W7W9W9W94+W9W9W9W94+W9W9W94+W9W9W<W<4+W<W<W<W9W<4*W<4+W9W<W<4+W<W9W9W94+W<W<4+W<W9W9W94+W94+W9W<W9W<W<W<W9W<W<W<WTWTWTX%TLTL4(TLUEUEULUETMTMTM4'TM4'TM4(UETLUE4(UE4(UEUETLTL4(TLULUL4(UI4(4)UEUETLTLUE4)UIULUIULTLTL4(UETL4(UPUPS9S9T&S9S94'S9WQ4'WQWQWQ4'4(W@VU4(WQWQWQWQVV4(VV4(VVWQVVVVWNWNWNW+WEW+4'W+4'W+W+W+4'W+WE4'WEWEWE4'W+W+W+4'W+4(WEW7W74(W9W9W94(W94(W9X#W9W9W9W94(W9W<4(W<W<W<W<4(W<4(W<W<W<4(W<W<4(W:W<W:4(WUW:W:W:W:4(W<W<4(W<W)W<4(W<W<W<4(W<W<W)W)W<W)W)W<W)W)W<W<4&W)4&4'W)W)W)W)4'W)W<4'W<W<4'W)W<W)W<W<W)W)W<W<W)W)4%4&4'4(X-WUX-4(WUWU4(4)WUWU4)WUWUWU4)4*UFUF4*UIULUL4*UIUHTH4*TH4*THTHTHUHTHTHTHTHTHTA4)V5V<V54)4)4*4+4,V3V3V3T,SA4+SASZSZSZS=4+WQWQ4+WQW)W)W)X-4*X*VXVXX*X*VX4*X*X*4*VXX*X*4*4+VXX*4+X*WU4+4,WU4,W14-4.4.U*UIU*T:T:TI4.TQTQTITI4-TITDTIV#V#TITIS4S4S44,S=S=4,S4S44,S=S=S4S=S=S=S=S=S5S54*4+S.S.S-S.4+S.SMT$SMT$S@4*S@S@SKS@SKS@4)SXSXSXS@SX4)SXS@4)SXS@4)SUSUSUX-VXX-VXTDTDTD4(S-S-SVS-S.SM4'SM4'SM4(SMSMT$SMT$S.SMS.S.SMSM4&4'SM4'4(4)S.SMS.S.T$T$T$4(T$4(T$T$S3S3S34(S3S3S34(SFSFSOSFSO4'SOSGSGSG4'SG4'SGSOSGSOSOSOSGSGSGSG4&4&SW4'SWW>W>W4W4W>W>W4W>W>W>4%4&4&4'W4W4W?W$W?W?W$W?4&W$U#U#T-4&U#U#V(U#S7S7SNS7S7S7S7SNSNSJSNSJSJ3ZSJSJ3ZSJ4#4$SJSJSNSN4#4$4%SJ4%SG4&SGSGSGSG4&SO4&4'SISO4'SO4(SI4(SISI4(S8SOS8SGSG4(SISISISI4(4(S8S84)S>4)S>S>SGSWSGSWSWSWS>4(SWSW4(SW4(SWS>SWSWS>S>S>WLWC4'WCUBV$V$V$V$4&V$TPV.T-V.V.V(V(4%4&V(V(4&4'4'4(T=T=T=4(T=T=V(U#V(V(U#U#U#4'V(V(U@4'V(V(4'V(SNSOSNSO4&SOSPSO4&SOSPSPSOSOSPSOSPSPSP4%SOSOSPSOS>S>SP4$SP4$SPSPS6S64$S64$S6SR4%SR4%SRSRS6S64%S6U=4%V,V,4%T1T1T5U<U<U<4%TGTG4%TGTPTPTP4%TGTGV.V.TG4$TGV.4$SPSDSDSESDSESES64#SRS6SD4#SDSDSDSD4#SE4#T1T5T5T04#T0T0T8T8T/T8T8T0T8T0T/3YT/T/3YT0T/T0T0T0T03YT;T;T03YT03YT0T03YT;T;T;3YTGT;TG3Y3ZT;4#4#V.V.V.4#V.V.V.T;4#T0T04#V.V.V.SCSC4#SESCSCSC4#SCSESESESESE3Z4#SE4#SE4$SESTSTSTX;X;X;XD3Z4#XDXDT3T34#T34#4$T5T54$T3T54%T3T34%T3T74%T7T7T0T04%T0T7T0T7T04$4%T.T.4%T0T.T.T04%T.T.4%V.4&UMT0UMT0UMV.V.4%4&T0UM4&UM4&UMUMUMT0T0T04&T04&T0T04&T0T.4'T0T0T0UMUMUM4&UMV.V.4&4'V.V.4'V.T0T0T.T.4&UMT.UM4&SSSESSX<X<XDX<XDXD4%XDX:XBX:XBXB4$XBXBXDXD4$4%4%XBXBXBT54%T5T5X:XBX:XB4$4%T4T44%4&T4T4T44&T4T4YU4&YUYU4&4'YU4(Y7Y74(Y74(4)Y7Y7YHYGYGYGYHYHYGYGYHYHYGYGX.4&X.X.4&X.X&X&X.X.4&4'X.X.X&X&X.X.X&4&Y44&Y@Y@Y44&Y@Y@Y44&Y@Y@Y@Y@4&Y@Y44&Y4Y4Y@Y@4&Y@Y'4&Y'Y'Y,Y,Y'Y,Y'Y,Y'Y,4$Y'Y,Y,Y'Y,4$Y,4$Y,Y,Y,YHYUYUYUYHYH4#4$Y3Y3Y34$Y,4$Y,Y,4$Y,Y,Y,4$YUY34%Y3YUY3Y3Y,Z&Y,Z&Y,Y,Y,4#4#Z&4$Z&4$Z&Y,Y,Z&Z&4$Z&4$4%Z$Z$YLYLZ$Z$YLYLZ$Z$YL4#YLYL4#YV4$YVYVYGYVYVYGYG4#YGYEYGYEYEY=Y=YGYGY=Y=YGYGY=YNY=Y=YGYGYGYXYXYXYGYXYXYNYXYXYNYN3TYNYGY=YGYGY=Y=YGYGYNYGYGYGYGYGYGYNYXYNYNYNYNX.3OX.YN3OYNX.YNYNYN3OYNYN3O3PYNYN3P3Q3QX.YNYNX.X.3QX.3QX.X.X.YG3QYGYGYG3QYG3RYGYG3RX.3RX.X.X.3R3SYGYG3SYGX.X.3SX.WOWOX.3SX.X.3S3TX&X&3T3UW=W=W=W=W=3U3UW3W3W3V=V=V=3UV=V=3UV=V=V=V=3UV=V=3UV=V=U>V=U>V=V=3T3UU>TETETEUT3TUTUTV?V?3T3UUGUG3UUGV;V9V;3UV93U3VV;UGUGTLTLTUTUUGUG3TUG3UTLTL3UTLTL3UTU3VTLV;V;TUTUV;V;3UTUUKUK3U3VUPUPUP3VUK3VUPUPU-U$U$U$Y6Y6Y6Y:Y@Y@[email protected]'Y.Y.Y'Y'3QY'Y.Y'Y.Y.3PY.Y.Y.Y.3P3Q3R3R3SYI3TY.3TYIYIY.Y.3T3UYI3UYIYI3UY'Y.Y.3U3VY.Y.Y'Y'3V3W3WY'Y.Y.3WY'Y.3XY'Y'3X3Y3Y3ZY.Y.3Z4#Y.Y.Y'Y'Y'4#4#4$Y'4%Y'Y'4%4&Y'Y'4&Y,Y,Y,4&Y,Y'4&Y'Y'Y'4&Y'Y'4&4'4(Y,4(Y,Y,Y,4(Y,Y,Y,Y'4(4)4*Y'Y'4*4+Y'4+Y'4,4,4-4.4/4/Y,40Y,Y.40414242Y,Y'434344Y.Y.Y'44Y.Y.Y,Y,44Y,YI44YIYI4445YIYI4546YIY.Y.Y.YIYIY.YAY.45YAYA45YAY.45464747YA4849YAYA49YA49Y,4:Y,Y,Y,4:4;YI4;YIYI4;4<YIYI4<Y,YIYIYIYIYIZ)Z)Z)Z)4;YIYIYI4;YI4;YIYI4;4<4=4>4>YIYIYIZ)Z)4>4?Z)Z)YIYIYI4>YMYMYIYMYI4>4>YMYMYMYMYM4>YMYI4>4?YMYIYMYMYM4>YMYMYMY,Y,YIYIY,Y,YI4=Y,Y,4=Y,YI4=4>4?4?Y,Y,Y,4?Z&4@Z&Y,4@Y,4AY,4A4BZ&Y,4BY,Y,Y,Y,YKYKY,YK4AYKY,Y,Y,4A4A4BYKYK4BYKYKYK4BY,4CY,Y,4C4D4EY,Y,Y,YKYKYKY,Y,Y,YKYKYK4B4C4DY,4DY,Y,Y,YIY,4DY,4DY,4EY,4EY,4F4GY,Y,4GY,4G4HZ)Z)4H4IZ)Z)Y,Y,Y,4IY,Y,4IY,4IZ)Z)Z)Z)4IZ)4J4J4KZ)4LY,Y,4LZ)Y,Y,4LZ)Y,Y,4LY,Z)4LZ)Z)4LZ#4MZ#Z)4MZ)4NZ#Z#4NYMZ)Z)Z)YM4MYMYMYM4M4NYMZ)Z)4N4OYM4O4PYMYMZ)4PZ)Z)4PYMYMYM4PZ)YMYMYMZ)YMYMYMYM4OYM4O4PYMYMY,4PY,4Q4Q4RZ#Z#Z#Z#4RZ#Y,Z#Z#Z#4QZ#Y,Y,Y,Y,4Q4RY,Y,Y,4RZ#Z#YMY?Z#Z#Y?4QYM4QYM4RY?Y?4RY?Z#Z#4RZ#YM4RYMYMYMYMYMZ'YMYMZ'4Q4QY?4R4SYM4SY?Y?4SY?Y?Y?Z&Z&YKYKYKYK4RYKYKYK4R4SYKYK4SYKZ&Z&4S4TZ&Z&YK4TZ&Z&4T4UYK4UYKYK4UZ&4V4WYKYKYK4W4WYK4X4YYKYKY-Y-YKY-4XY-Z&Z&Y-Y-Z#4WZ#Z#4W4X4Y4Z4ZZ#Y0Y0Z#4Z5#Y0Z#Y0Y0Y0Z#Y0Y0Y04YY-Z#Y-4YY-Z#4ZZ#4ZZ#5#5#5$Y0Y0Y-Y-Y05$5$5%Y0Y0Y-5%Y0Y05%5&Y0Y05&5'Y0Y05'5(Y0Y0Z#Z#Z#5(Z#Y?5(Y?Y?Y0Y?Y?Y?Y?Y?Z'Y0Y05&Y05&Y0Z'Z'Y?5&Z'Z'Y0Y05&Y0Z'5&Z'YP5&Z'YPYPZ'Z'YP5&Y0Y05&Y0Y-Y-5&Y-Y-Y0Y0Y0Y-Y-5%Y05%5&Y0Y0Y0Y-Y0Y0Y-Y-Y0Y0Y-5$Y-5%5%YYYYYY5%5&5'Y0YYYY5'YYY0Y/5'Y/Y05'Y0Y/Y0Y0Y0Y+Y0Y0Y05&5&Y+Y+Y+Y0Y05&Y0Y0Y05&Y0Y+Y/Y+5&Y/Y/5&Y/Z'Z'Z'Y+Y05%Y0Y0Y0Y/Y/Y/Y+Y/5$Y/Z&YEZ&Z&YEYEZ&5#YEYE5#5$Z&Z&Z&Y<Y0YY5#Y/Y/5#Y/Y/5#YYY/Y/5#5$Y2Y2Y2Y2Y/5$Y25$Y25%Y2Y<Y2Y2Y2Y<Y2Y<Y2Y<Y2Y2Y2Y<4Z5#Y25#Y2Y2Y25#Y25$Y25$Y2Y2Y2Y2Y25$Y/5$Y/Y/Y<Y<Y<5$Y<Y<5$Y/Y/5$Y/Y/Y<5$Y/Y/YEYEY<Y<YGYG5#YGY<5#Y<Y<5#5$Y<Y<Y<YRYRYR5#5$Z(Z(5$5%Z(Z(5%Z(Z(Z(5%YGY<YGYGYGZ%Z%YGYG5$YGYGYGYQYQYGYGYQYQYGYGYQYG4YZ%Z%Z%Y<Y<YGYGY<YGYGYG4WYG4X4YY<Y<Y<4YY<YG4YYGYGYG4YYGYGYGYQYQYQYQ4XYQYNX.X.X.Z%Z%Y)Y)4VY)Y)Y)X.4VWJWJX.X.X.4VVTVT4V4WVTVTVQVQVTVTVQ4VVTVT4VVQX(X(4VX(4VX(X(X(X'4VX'X'4VX'X'X'WU4VWUWU4V4WWUWUW%W%4W4XWUX,WU4XX,X,4XX,WUX+X+X+U>TT4WTT4WTTU>TTTUTU4WTUTUTUTU4WTL4WTLTLTUTU4WTUTUTU4WTUTU4W4XV;4X4YV;V;TUTUTU4YTUTU4Y4Z4ZV;TUV;TUTU4ZUPTLU0TLU0TLU0TLU0TLU0TLU0TLU5TL4W4WU5U5TLTLU4TL4WTL4WTLTLUPUP4WUP4WUPUPUPU9U9U9UPU94VU9U9UPUP4VUPU9U9UPUPU9UPUPUPV;UPV;4T4TV;4UV;4UV;4VV;V;4VV;V;UPUP4VUPV;V;UPUP4UUPUPUPV;V;V;4UV;V;4UUP4UUPUPUPYBYB4UY>4UY>Y>Y>YBYBY>Y>YBYBY>Y>YBYB4SYB4SYBYBYBYBYI4SYI4S4TYBYBYBYB4TYBY(4TY(Y(4TYIYBYBYIYI4T4U4UYIYBYBYBYIYBYBYIYI4T4UYIYI4U4VYI4VYIYIYMYMYIYIYM4UYIYIYI4UYIYIYMYMYIYIYIYM4TYM4TYMYIYMYIYIYIYMYM4SYM4T4TYM4UYMYPYPZ'YPYPYPZ'YP4SYPZ'YPZ'YPZ'Z'YPYP4RYPZ'4RZ'Z'Z'YPZ'4RZ'Y+YPYPYPYPYP4QY+Y+YPY+4PY+Y+Y+YP4PYPY+Y+Y+Y+YTY+YTY+Y+YJYJYJYWYJY+Y+Y+YWY+YWYWY+Y+YWY+YJYWYJYWYJYWYJYWYWYS4H4IY+Y+YS4IY+YSYSYSYSY+YSYSYSYSY*Y*YSYSY*Y*4EY/4F4GYT4GYTY/4GY/Y/Y/Y/Y/YT4GY/Y/4GY/Y/Y/Y/4GY/Y/4GYTY/4GYTYTY/Y/Y/4GY/Y/4GY/YT4GYTYTY/Y/YTYTY/Y/YTYTYTY9Y9Y94DY94EY9Y*Y9Y9Y9Y*4DY*4EYGYGYG4EX/X/Y9X/Y94DY9Y94DY9Y9Y9Y9X/Y9Y9X/X/4CX/Y9X#4C4DVWYGVWVWVWVW4CVWVWVW4C4D4DVWX#X#VWVW4D4EX/VW4EVWVWVWX#X#VWVW4DVW4DWSVSVSWSWSVSVSVSVS4CVS4CWS4DWSWSWSVSWS4CWSVSWSVSWSVS4CWSWSWSWYWS4BWSWSWSWSVSVSWSWSVS4AVS4AVS4BWSWS4BWSVNVN4B4CWPVNVNVNVN4BVN4C4C4DWYWYVNVNVN4D4DWYWYWYVNVNW#W#VNVNW#W#W#W#W#4BW#W#4B4CW#W#WY4CW#4CW#W#VNVN4C4DVNWYVNWY4CWYWYWY4CWYWYWYWYWYWY4CWYWY4CWY4C4DW,W,4D4EW,W,WYWY4E4FWY4FW,W,4F4GW,W,4G4HW,W,WYW,W,W,WYWYWYW,WY4FW,W,4FW,W,W,WYW,W,W,WYWYW,WY4D4EWYWYW,4E4F4GW,WY4G4HWYWY4HWY4HWYWYWYWYWY4H4IW,W,W,4IW,W,4I4JW,W,W#W#WYWY4I4JW#4JW#W#4JW#W#W#4JWY4KW#4KW#4LW#4L4M4N4OW,W,WSWSWSW,WSW,4M4NWSWSW,W,W,4NW#4NWYWYWY4NWYWYW#4N4O4PWYWY4PWYWY4P4QW#W#W#W#4Q4Q4RWYWYW#W#4R4SW#W#4S4TWYWYWY4TWYWY4TWY4TWYW#W#4T4U4V4W4W4XW#W#4X4YW#4ZWY4Z5#W#5#W#W#W#W#5#W#W#5#W#W#W#W#5#W#W#5#W#W#W#WUWU5#5$WUWUWU5$WUWM5$WMWU5$WMWMWU5$WUWMWUWU5$WMWMWMWT5$WM5$WTWTWM5$5%5&WMWMWTWTWMWT5%5&WUX+WU5&WU5&WMWMWUWU5&WMWUWUWUX+WMWT5%WTWM5%WTWTWM5%5&WTU>UYU>UYUYUY5%UYU>5%U>U>5%UYUYUY5%5&V:V:5&V:V:V:U>U>V:5&U>U>5&5'U>5'V:UY5'UYUYUY5'UYU/U/5'5(5)5*UYTTUYTT5)5*U/U/5*5+U/U/5+5,UU5-TTTT5-TT5-TTUUUU5-TLTTTLUPUPTLUPTLTLU:U:U:UPU:U:TL5*UPUPTLUPUPUPTLUP5)UPTLUPTLTLUPUP5(UPTLTLTL5(TL5(TLTL5(YBY>YBYBYB5(YBYBS:5(S:5(S:S:S:S:S0S:5(S0S05(S0S:S0S:S:S0S05'S05'S0S:S0Y9Y9Y*Y*Y9Y9Y*Y*Y*Y9Y*Y*Y9Y9Y9Y*W-W-5#5$WF5$WFWFW-W-WFWFY9Y95#W(Y95#W(W(Y9Y9W(Y94ZW(W(W(W-4ZWFWF4Z5#VZVZ5#5$VZVZ5$5%VZW(VZVZVZ5%VZVZ5%W(VZ5%VZW6W6W6W6W/5$5%W/W/W6W6W6VOW6W/5$W/W6W/W6W6VZW(VZW(VZVZ4Z5#W65#W6W6W6W(VOVOW(W(VO4ZVO4ZVOVO4Z5#VOVO5#W65$W6W.5$S9W6W6W/5$W/5$VO5%VOY9Y9Y9W(Y9Y9W(5$W(W(W(5$W(5$VUVUY9Y95$Y9Y95$VUVUW(VUW(VUVU5#VUVU5#VUVUVU5#X#5$X#X#X#VUX#VUX#VUX#VUVU4Z5#VUVUVU5#VU5#VUVUVUX#5#X#5#X#VUX#VUVUVU5#5#5$VUVU5$5%VU5&VUVU5&VUX#X#5&X#VUX#VU5&VSVSX#5&VSVS5&X#VSVSX#5&VSVS5&VSX#5&X#X#5&VSVSVSWSWSW7WSW75%W7W75%W7W7W7W,W,5%W,W75%W7W75%W,5&W7W7W75&W75&W95'W95'W95(W9W7W9W7W9W75'W7W75'W9W7W9W7W7W75'W7W7W75'W75'5(5)5)W95*W9W9W<W95*W95*W9W9W9W<5*W<W9W<W9W<W9W<W9W95(W<W9W<W95(W95)W<W<5)W<W9W95)5*5*W<W9W<TLTL5*5+TMTMULTMULUL5*UL5*ULTMUL5*TL5+TL5+TL5,5-TLTLUETLUI5,UIUI5,TLUE5-TLTL5-TLUE5-UE5.TLTL5.UETL5.UPUPS9S9S9WQ5-WQWQWQVU5-W@VU5-X#VUVUW@5-WQWQWQWQWQVVWQVVWQVVW+WEW+WEW+WEW+5*W+5*W+5+5+WE5,WEWEWE5,W+5,W+W+W+W+W+W+WEX#W9X#W9W9W95*W95*W9X#X#W9W9W9W<W9W9W9W<W<W<W<5(W<5(W<W:W<W:W<5(W:W:5(W:WUWUW:5(5(5)W<W<W<W<W)W<W<W<W<W)W)W)W<W)W<W<W)W<W<W<W)W)W<W)W)W)W)W)W<W<W<4ZW<W<4ZW)W<W)W)W)W)4Z4ZW<5#W<W)5#W)W)5#W<5$W<WUWU5$5%WUWU5%5&WUWU5&5'WUWU5'WUWUWU5'WX5'WUWXWUT>T>T>5'5'5(UIUIUHTHUHTHUHTHUHTH5&THTATAV<V<V5V5T+T+T+5%T+T+5%UCUCU?U?U?5$V1V1V1SASZ5$SZSZSZS=S=WQWQWQVMX-X-4ZX-X*4ZVX5#X*5#5$VXVX5$VX5%X*X*5%X*VX5%VXVXWU5%WUWU5%5&5'5(5(W1W1W1W1W1WUWUW1W1WUWUUIUIUIU*T:T:TITITD5$TD5%S4S45%S4S=S4S4S4S45$S4S4T#T#S.S.T#T#S.S.S-S-S-S.S@4YS@S@4YSX4ZSXS@4ZS@S@4Z5#S@S@S?S?S?SUTDTI4ZTIS.SMS.SMS.SMS.SMS.SMS.S.4WSMS.4XSMSM4XSM4XT$SMT$SM4XSMSM4XT$T$T$T$4XT$4YT$4YT$4Z4Z5#SJSJS3S35#5$SO5$SOSGSGSG5$SGSO5$SOSOSG5$SGSWSGSGSGSW5#SWSWSWW>W>5#5$W>W>5$5%5%WVWVWVWVWV5%5&W$5&W?W?5&U#5'U#SJS75'S7SNSNSJSJSJSJSNSJSJSJSJSNS75$S75%5%5&SJSJS7SJSJSJSOSG5%5&5&SGSOSGSGSGSISGSOSO5%SISO5%SOSISOSI5%SI5%SISOSOSISISIS8SO5$SOS8SGSGSG5$SIS>SIS>5#5$S8S8S85$S8S85$S>S>S>SWSWS>5$SWSW5$SWS>S>5$SWWLWCWCWCV$5#V$TPT=V(V(V(V(V(4ZV(T=V(T=4ZV(U@U@U@V(4YT=T=4YT=T=T=4YU@T=T=U#V(V(V(V(V(U@U@V(V(U@U@4VSOSPSPSOSPSPSPSP4USPSPS>S>SP4U4US6SPSPS6S64US64US6SRS6S6S6SR4USR4USRSR4US64V4WU=V,V,V,4VT1T1T1U<4VTGTGTGTG4VTGTPTP4VTPTGTGTG4V4VSPSDSPS6S6S64VSDSDSD4V4VSESESET1T1T5T1T0T;T0T0T/4TT/T/4TT0T/T0T0T0T04TT0T;T04TT04TT0T04TT;4UT;4UTGT;TGT;T;T;4UV.V.4UV.4UV.T0T0T04UT0V.T0T04U4VT;T;4V4WT04WV.V.SCSCSCSESCSCSC4VSE4VSSSS4VSSSSSSSESE4VSS4VSSSSSSX;4VXDXD4VXDXDXDT3T3T5T3T54UT5T5T3T34UT5T3T3T54U4U4VT5T5T3T34VT5T0T0T7T0T0T04U4VT04VT0T.4V4WT.4XT0T0T.T.4WT.T.T.T0T04WV.4WUMUMUMUMV.UM4WV.V.4WV.T0T0T04W4WUMT0UMT04WT0T0T04WT04XT0T04XT0T0T0T.4XUMUM4XUMV.V.V.4XV.V.4XV.4XUMUMUMUMUMT.4XSESSSE4XXDXD4X4YXB4YXBXBXDXD4Y4ZXDXD4ZXBXB4ZXBXB4ZT.T5T54Z5#T4T4T/T/T4T4T/4ZT4T44ZT/T4T4T/4ZT4T4YUY7YU4ZY7Y7YUYUY7Y74YY7YU4YYUYU4YY7YUYUYUYUYUY7YU4XY7Y7X.X.X.4XX.X.4X4YX&4YX&X&4YX&X&X&4Y4ZX&X&Y4Y44Z5#5#5$5%Y@5%5&Y@Y@Y@Y@5&5'5'Y4Y4Y4Y@Y@5'5(Y,Y,5(Y,Y'Y'Y,Y,5'Y,5(Y,5(Y,5)Y,YHYH5)5*YHYH5*YHY3Y3Y,Y,Y35)Y,Y,5)Y,Y,Y,YUYUY3YUY3YUY35(Y,Y,Y,Z&Y,Z&Y,Z&5&Z&Z&Z&Y,Z&Y,5&Y,5&Y,Z&YLYLZ$Z$YLYLZ$5%YV5%YLYLYVYV5%YV5%YLYLYL5%5&5'YG5'5(YXYNYNX.X.X.YN5'YNX.YNYNYN5'YNYN5'5(YNYN5(YNYNYN5(5)5)X.5*X.X.X.YNYNX.X.5)X.YNYN5)X.5)5*YGYGYGYGYG5*YG5*YGX.YGYGYG5*5*X.X.X.YG5*X.X.YGYGX.YGYGYGX.5)X.X.WO5)X.X.X.X&5(5)X&X&5)X&X&X&WGWGW=5)5)WGW=W=W35)W3W3W=W=W=W3V=V=V=5(V=V=5(V=V=V=V=5(V=V=5(5)V=V=V=5)V=V=5)V=5)TLUT5*5*5+V?TL5+TLTLTL5+UG5,5-5-V9V;5.5.V;V;V;5.5/V;V;UGUG5/UG5/50TLTLTLUGTL50UGUG50TU50TLTLTL5051TUTUUKUKUK51UKUK51UKUPUKUPUKUKUK50UKY.Y.YI50YI50YIYIY.Y'Y.50Y'Y'Y.Y.Y.Y.5/505051YIYI51YIYIYIY.Y.5152Y.Y.52Y.5253YI54Y.Y.Y.545455YIYI55Y.56Y.56Y.YIYIY'Y'56Y'Y'Y'56575758Y.Y.Y'Y'5859Y'Y.595:Y'Y'Y.Y'Y'Y'Y'Y.Y.Y'Y.Y.57Y.Y.Y.Y.Y'Y.57Y.57Y.Y.Y'Y'57Y.Y'57Y.Y.57Y'5859Y'Y'Y,Y,Y'58Y'Y'Y,Y,Y'Y,Y'57Y'Y'Y'57Y,Y,5758Y,Y,Y'Y'Y,Y,Y,Y,57Y,Y'Y,Y'Y'Y,56Y'57Y'Y'Y'57Y'5758Y,Y'Y,Y,Y,Y,Y,57Y,57Y,Y,Y,Y'57Y'Y'5758Y,Y,58Y,Y,Y,58Y.Y.Y.Y'58Y.59Y'Y'Y'59Y'59Y'5:Y'5:Y'Y'Y,Y,5:Y,Y'Y'Y'5:Y,Y,5:Y,5:5;Y,Y,5;Y,5<Y,5<Y'5=Y'Y.5=5>5?5?Y'Y'Y'5?Y'5@5A5A5BY'5C5C5DY.5EY'Y'5EY'5E5FY'Y,Y,Y,Y.Y,Y.Y.YIYIY.Y.YI5DY.Y.5DY.Y.5DYIYIYIY.YIY.Y.YAY.5CYAYA5CYAY.Y.Y.5CYI5CYIYI5C5DYIYI5DYAYAYAYAYA5D5EYAYAYA5EYAYA5EYIYAYA5E5F5FY,YAY,YI5FYI5GY,Y,5GY,5GY,YIYI5G5H5IYI5I5JYIYIY,Y,5J5KZ)Z)YIYIYI5JZ)Z)Z)5JYIYI5J5K5LZ)5L5MYIYI5MZ)Z)5NZ)YI5N5O5O5PYIYIZ)Z)YIYIZ)Z)YIYIYIYIYMYMYIYMYI5MZ)Z)YMYMYMYM5LYMYIYI5L5MYIYMYIYI5LYMYMYMY,5LYIYIY,Y,5LY,YI5L5M5NYIYI5NY,5NY,Y,Y,5NY,Y,Y,Y,Z&5NZ&5NZ&5OZ&Y,Z&5OZ&5OZ&Y,Y,Y,5OY,5PY,Y,Y,Z&5OZ&5PZ&5PYKYKYKY,Y,Y,5PY,Y,YKYKY,Y,YKYKY,YKYKYKY,Y,5MY,YKY,YKYKY,5L5MZ&Y,5MY,5N5NZ&Z&Z&YIYIYI5NYI5N5OY,YI5OYI5P5P5Q5RY,YIYIYI5RYI5RYIYIYIY,5RY,5RY,YIY,5RY,YI5SY,Y,5SY,Y,Y,Y,5S5SZ)Z)Z)5S5TZ)Z)5T5UZ)Z)Z)5UZ)Z)Y,Y,Y,5UY,Y,5UY,5U5VZ)Z)Z)Y,Z)Z)5UZ)Z)Z)Y,Y,5UY,Y,Y,5UY,Z)Y,Z)Z)Y,Z)Z)Z)5S5TZ)Z)Y,Y,Z)Y,Y,Y,Z)5SY,Y,Z#Z#5RZ#5SZ#Z)Z#Z)5S5SZ#5TYZZ#Z#Z#YMZ)Z)Z)YMZ)Z)YMYMZ)Z)YMZ)Z)Z)Z)YMZ)Z)Z)5O5OZ)5P5QZ)YM5QYMZ)Z)Z)5Q5QYM5RYMYM5RYMYMZ)5RYMYMZ)Z)Z)5RZ)YM5RYMY,Y,Y,5R5RZ#Z#Z#Y,Y,Z#Z#5QZ#Z#Z#Y,Z#Y,5QY,5QY,Z#Y,Y,Y,5QY,Y,5QZ#Y,Y,Y,Z#Y?Z#Y?Y?YMYMYMY?5NY?5O5PY?Y?5PY?Z#Z#Y?Y?YMYMYM5OY?Y?Z'5O5OY?Y?Y?5O5PYMYMY?Y?5P5QYMYM5QYM5QY?5R5SYKYKZ#YKYKYKYKZ#YKYKZ#5QYKYK5QYKZ&Z&YKYKZ&YKYKYKZ&Z&YK5OZ&Z&5O5PZ&Z&5PZ&YK5PYKYK5PZ&YK5QYK5QYKYKZ&Z&5QZ&YKYKYKY-YKYKYK5P5PY-Y-Y-5PY-Y-Y-YKY-Y-Y-YK5OZ#Z#Z#Z#Z#5OZ#Z#5OY0Z#Y0Z#Z#Y0Y0Z#Z#Z#Z#5MZ#Z#Z#5MZ#Z#5MY0Y05MYKZ#YKZ#5MZ#5N5N5OZ#5PZ#5PZ#5QZ#5QZ#Y05QY-Y0Y0Y-Y-Y0Y0Y-Y-Y05PY05PY0Y0Y-Y-Y0Y0Y-Y-Y0Y0Y-Y-Y05NY-Y-5N5OY-Y-5O5PY-5PY0Y05PY-Y0Y05P5QY0Y0Z#5QY?Y?Z#5Q5R5SY0Y05SY05SY0Y?Y?Y?Y?Y?5SY0Y05SY0Z'Z'5S5TZ'Z'5TZ'5TZ'YP5UY0Y05UY0Y-Y-5U5VY05VY0Y0Y-Y0Y0Y05UY0Y0Y0Y-Y-Y-5UY-YYYYYYY-YY5TYYY-Y-Y-5TYYYY5T5U5U5VY0Y0YYYYY0YYY0Y/Y/Y/Y0Y/Y/Y/Y0Y0Y05SY05SY+Y+Y0Y05SY0Y0Y0Y05SY+Y/Y+Y+Y/Y/5R5SY05SY0Y/Y+Y+Y+Y/5RYEZ&5SY<5SY<Y<5SY<Y<Y<Y0Y/Y/Y/YYYYY/5RYYYY5RY/Y<Y<Y2Y2Y<Y<5QY<5QY2Y/Y2Y<Y<Y2Y2Y25PY2Y2Y2Y<Y2Y2Y<Y<Y2Y<5NY<5OY<Y<Y<Y25OY25OY25PY25PY2Y<Y2Y2Y<Y<5OY<5PY<Y<5PY<Y/5PY<Y/Y/5PY/Y/Y/Y<5PY/Y/YGYGY<5P5PYGY<YGYGYGY<Y<YGYGY<Y<Y<Y<Z(Z(Y<5MZ(Z(5MZ(Z(Z(5M5NZ(Z(Y<Y<Z(Z(YGYG5M5NYGYGZ%Z%YQZ%Z%Z%YGYGY<YGY<5K5L5MYGYG5MYGY<YGYGYGY<YG5LYGYGYGYG5LYQYQZ%Z%Z%Z%5KY)X.X.WJWJX.X.VRVRVTVTVQVQVTVTVQVQVT5GVQVQ5GVQVQVQVNX(VN5G5G5HX(X(5HW3X'X'W35H5I5JW%W%WUWUW%W%WU5IW%W%5IW%WUW%WUWUW%W%WUWUWU5GWUWU5G5HWUWUU>U>U>5H5H5IU>U>TUTU5I5JTUTU5J5KTL5KTL5LTUTU5L5MTUTU5M5NTUTU5N5OTU5OTU5PTUTU5PV;TUV;V;V;TUTUTU5OTUTU5O5PTUTU5P5QTU5QTU5RTUTU5RUPTLU55RU5TLU5U5U5TLU4TLU4TL5PTLTLU0UP5PUP5PUPU0UPU9UPU95P5PUPU9U95PUP5QUPTUTUTU5QTU5Q5RV;5RV;5SV;5SV;V;V;5SUPV;V;5SUPV;5TV;UPUPUPV;V;V;5SV;UP5SUPUP5SUPUP5S5TY>Y>YB5T5UY>Y>Y>Y>5U5UYBYBYBYBYBYB5UYB5UYBYB5UYIYBYBY>YB5UYBY(5UY(Y(YIYIY(Y(YI5T5U5VYIYI5VYIYB5VYBYBYIYI5V5WYIYIYBYBYIYI5V5WYIYI5WYIYIYMYIYMYMYM5VYMYIYI5V5WYIYM5WYM5WYMYIYMYMYMYM5WYM5WYMYMYMYM5W5X5X5YYMYM5Y5ZZ'6#6#YPZ'6$6$YPZ'Z'6$YJZ'6%YPYPYP6%YPYPYPY+YPY+YPY+YW6#YW6$6$YSYSYSY+Y+YSYSY/Y/6#Y/Y+6#Y+Y+6#6$Y+Y+YTYT6$Y/YTY/Y/Y/YTY/YTYTY/Y/5Z6#Y/Y/6#6$6$YTYTYT6$YTYTYTY/Y/Y/6$Y/Y/YT6$6$YTYTYT6$Y96%Y9Y*6%Y*6&Y*Y*Y*Y9Y*Y9Y*Y9YGWZYGWZX/X/Y9Y9X/X/Y9Y9X/X/Y9X/Y9Y95X5YX#X#5YX#VWVW5YVWVWVWX#X#5XVWX#X#X#5XX#X#VWVWX#X#VWVW5W5XX/X/5XVWVWVW5X5YWSWSVSVSX#VSX#X#5WWSVSVSVSVSVSWS5VWS5WWSVSWSVSVSWSWS5VW,5VWSVS5WWSWS5WWSVS5WVSVS5WWSVSVSWP5WWPWPVNVNWP5WVNVNVN5WWY5WWYWY5W5X5YWY5Y5ZWYWYVNWYWYWY5Y5ZWYWYW#W#W#5ZW#W#5Z6#6#WYWYWY6#W#WYW#VNVN6#6$W#6$W#W#VNVNW#W#6#6$WYWYVNVNWYWYWYWYWY6#WYWY6#W,W,6#W,W,WYWYW,W,WYWYW,W,WYWYW,W,WY5XWY5Y5YW,W,W,WYWYWY5YWYWY5YWYWYWYW,5YWY5Y5Z6#6#W,6$W,WYWYWY6$WYWYW,W,W#W#WY6#W#W#6#WYW,W,W,6#W,6#W,WY6#6$WYWYW,WYW,W,WYWY6#6$WYWY6$WY6$WYWYWYWYWYWY6$WYWYWY6$W,W,W,W#W,W,W#W#5Z6#W#W#W,6#W,W,6#6$6%W#W#W,W#6%W,W,6%6&WYWY6&W,6&W#W#W#6&W#6'W#6'W#WYW#WYWYW#6'W#W#6'W#W#6'W#W#6'W#W#W#WS6'WSWS6'W,WSWSW,6'W7W7W#6'W#WY6'W#WYW#W#W#6'6(WY6(WYWY6(6)WYWYWYWY6)WYWYWYWYW#WYWY6(6)W#W#6)6*WY6*WYWYW#W#6*W#W#6*WYWY6*W#WYWYW#W#6*6+W#W#WYWYWYWYWYW#WYWYW#WYWYWYW#6(WYWYWY6(WYWY6(6)WY6)6*6+6+W#W#W#6+6,W#W#6,W#W#W#6,WYW#6-6-WY6.W#W#6.W#W#WYWYW#W#6-W#W#W#6-6.W#W#W#6.W#W#6.6/W#W#VNVN6/60VNW#60W#WU60WUWM60WUWMWMWU6061WM61WMWMWM61WM62WMWUWMWUWMWU61WMWM61WMWT6262WT63WTWMWMWM63WM63WTWT63WTWTWTWM63646565WTWTWTWUX+WUX+WUWUWU6464WMWMWMWM64WMWMWMWM64WMWMWM64WTWT64WTWT64UY65UYU>65U>6666UYUYUYU>66V:V:6667V:V:6768V:V:U>68V:V:6869V:V:696:V:V:U>U>6:6;U>UY6;UY6;UY6<6=TTTTUYUYTTTT6<TTUY6<TTTT6<TTTTTTUYUYU/6<UYUY6<6=UYUYU/6=UYUY6=U/TTTT6=6>TTTT6>TT6>6?UUUU6?TTUU6@UU6@UUUUTTTLTTTLTLUPTLUPTLUPTLUPUPUPUP6=TLTLTL6=TLUPTLUPY>6<Y>6=YBYBY5Y5S:S:6<6=S:S:S:6=S:6=S:S:S0S06=S0S:S0S:S:S:S0S:S0W-W-6;6<W-W-6<W-6<W-WFWF6<6=W(W(Y9Y9Y96=Y9Y96=Y96=W-WF6>W(W(VZVZ6=W(VZVZ6=W(VZVZW(W(VZVZVZW(VZ6<W(W(6<W(VZ6<6=W(VZW(W(W(VZW66<W6W6W6W/W/W6W6W/W66:W6W6W6VZVZVZW6VZW(W6W(6869W66:W(W(6:6;VO6;VOVOW(W(VOVOW(W(VOW(69W6W.W.69W6W6W669W6W.W6696:W/W/W6VO6:VO6:VOVOVOY9Y9W(6:W(W(W(6:W(6:VUVUY9Y96:W(Y9Y96:VUVU6:VUVU6:Y9VUVUX#X#VUX#VUX#VUX#VU68VUX#68X#X#X#VUVUVU68VU68VUVU68X#X#X#68X#VUX#VU68VU69X#X#69X#X#X#696:VU6:VUVUX#X#6:X#6:6;VUVUVUVUW@6;6;X#VU6<X#X#6<X#VSVSX#X#VSVSX#X#VS6:X#6;VSVS6;VSX#6;X#X#6;VSVSVS6;6<W76=WSWS6=W7W,W,W76=6=6>W76?W,W,6?W,6?6@W7W76@W76AW76AW96B6CW76CW7W7W7W7W76CW7W9W9W9W76BW7W76B6CW76DW7W7W7W96CW7W9W96CW9W9W9W7W7W76CW9W96CW9W9W96CW9W7W9W7W9W9W<W9W9W96AW9W9W9W96A6B6BW<W9W<W96BW9W9W9W96B6C6CW<W<W<W9W9W96CW9W96CW<W96CW9W<UUTLUUUUTLTL6BTLTMUL6BULULUL6BULTLTL6BTL6BTLUEUETL6BUE6CUE6CUEUE6CTL6DTLUIULUIUITLTLUE6C6CTLUEUETLTLUEUETLTL6B6CUE6CUEUE6CTLUEUE6CTL6DUPS9WQS9WQVU6CVUVU6CX#VUVUW@WQWQWQW+WEW+W+W+W+W+6AW+6AW+W+W+WE6AWE6A6BW+W+6B6CW+W+WE6CW+W+W9W9X#6CX#6CX#X#W<W<W<6CW<6CW<W:W:W:W<W<W:W:6BW:W:6BW:W:W:W:W<W:W:W:W:W<W)W)W<W<W)W)W<W<W)W)W)6>W)6>W)6?W)W<6?W<W)6?W)W)6?W<W<W<W)W<W)W<WUWUWUX-6=X-X-X-WUWUWU6=WUWU6=6>WUWU6>W1WUWUW1W1WUWUW1WUWU6<6=WXWUWUWXWXT>T>T>6<UI6<UIUI6<UIUIUI6<6=TATAT+6=UC6>UCUC6>UCU?UCU?V1SASZ6=SZX-6=6>VXX*X*6>6?VX6?VXX*X*X*6?VX6?6@6AVXX*X*VX6AVX6AVXVX6AX*6BX*VXVXVX6BWUWUWU6BWU6BWU6CWUWUWAWUWU6BWUWU6BWUWUWU6B6CW1W1TD6CTD6DTDTITDTIS4S4S=S=S46BS4S4SXSXS@6BSXSX6BSXS@SXS@SX6ASXS@S@S@6AS@[email protected]$SMSMSMSMSM6DSMSM6DT$T$SKT$6D6DSK6ESK6ESK6FSKSKSK6FSKS3S3S36FS3S36FSJS3S36F6G6GSO6HSO6HSGSGSGSGSGSO6H6HSG6I6JSGSGSG6JSGSWSWSWW>W>W>6IW>6I6J6K6KW>6L6MW>W>6MWVW>WV6MWVWVWVWVW4WVW4W4W46KW$6LW$U#U#T-U#T-6KT-T-SJ6KSJ6LS7S7S76LS7SJSJSJS7S76KSJS7S7SJSJSOSOSO6J6JSGSGSGSO6JSOSOSOSISISISO6ISOSISOSISO6ISO6ISOSI6IS86JS86JSISISIS8SIS8S8SI6ISIS8S86IS8S>6I6JS>S>S>SWS>6JSWSW6JSWS>6JS>S>6JTP6KTPV(V(V(6KT=V(T=6KV(V(V(6K6K6LT=T=6LU@T=T=6LSO6M6NSP6NSPSP6N6OSP6PSP6PSPSPS6S66PS6SRS6S6S6S6S6S66OS66O6PSRS6S6S66P6PSRSRSRSRS6SRSR6O6PT1T1U<6PTGTGT;TG6PTGTPTP6PV.TGV.TGV.SPSP6O6PS66PS6S6SRSR6PSRSE6PSESET/6PT/T/6PT06QT0T06QT06R6RT;6S6TT06TT0T0T;T;6T6UT06UT0T;6UTGT;6VT;6VT;T;V.V.6VV.6V6W6XT0T06X6YV.T0T0T06Y6YV.6ZV.T;6ZT0T06ZT;7#T;T07#V.V.SCSESCSESESESS6Z6ZSESSSSSESESE6Z6ZSSSSSSX;6ZXDXD6ZXDXDXDT3T36Z7#T57#T5T5T5T3T5T5T56ZT57#T3T3T37#7#T5T5T5T0T0T07#T0T07#T0T07#T.T.7#T0T.7$T0T07$T0T.T0T.7$T0T0T0T.T0T07#7$7$7%UMUMUM7%UMUM7%V.7&7'7'UM7(UMT07(T0UMT0UMT07(T0UM7(UM7(UMT0UMT0T07(T07(T.T.T.7(UM7)UMV.7)UMUMV.V.7)V.UM7)UMUMUMUMT.UMSE7(SE7)XDXDXB7)7)XD7*7+7+7,XBXBXDXDXB7,XDXD7,XDXDXD7,XDXB7,XBXB7,7-T5T5T/T/T4T4T/T/T4T4T/T/T4T4T/T/T4T4T/T/T4T47(YUYUYUY7Y77(Y7Y7Y7YU7(Y7Y77(Y7YUY7YUY7X.X.X.X&7&7'X&X&X.X.X&X&7&7'X&X&7'X&X&X&X.X.7'7(X.X.X.7(Y4Y4Y@7(7(Y@7)Y@Y4Y4Y47)Y47)Y@Y@7)Y@Y@Y@Y4Y47)Y@Y4Y4Y@Y@Y@Y@Y4Y4Y@Y@7'Y@7'7(Y4Y4Y47(Y4Y47(Y4Y4Y4Y'Y,Y'Y'Y'Y'Y'7'Y'7'Y'Y,Y'Y,Y'Y,Y'Y,Y,Y,YH7%YUYU7%YUYUYUYHYHYUYHY3Y37$Y,Y,7$Y,Y,Y3YUY3Y3Y,Y,7#Z&Y,7#7$Z&7$Z&Y,7%7%YLZ$Z$YVYVYLYLYLYV7$YVYL7$YLYLYV7$YVYV7$YG7%YGYV7%YVYG7%7&YXYXYNYN7&YNYN7&7'X.YN7'YNYG7'7(YGYG7(7)YGYG7)YNYNYNX.7)X.X.YNYNX.X.YNYNYN7(7(X.X.X.YNX.7(X.YNX.X.X.X.YGYGYGYGX.YGYGYG7%YG7&YG7&YGX.YGYGYGX.YG7%X.X.YGYGX.7%X.YGX.YGX.X.WOX.X.X.X.7#X.X.7#X&X.X&X&X&WGW=W=W=WGWG6Y6ZW=W=W3W=V=V=U>U>V=V=U>U>V=V=U>U>V=V=U>U>V=V=U>U>V=V=U>U>V=V=U>U>6RTLUT6S6STLTLTLV?V?V?6SV?V?6STLV?V?TLTLUGUGTL6RTL6RTLTLUGUGTLUGV;V9V;V9V96PV;V;V;V;6PV;V9V96P6QV9V9V9V;TL6P6QUG6QUGTLTLUGUGTLTLUGUGTL6PUGUGUG6P6P6QTLTLV;6QTUTUV;V;TUTUUKUK6P6QUKUK6QUKUKUKUPUKY.Y.6PY.YI6PYIYI6PY'Y.Y'Y.Y.Y.6PY.Y.6PYIY.Y.YIYIY.Y.6O6P6PYIYIYI6P6QYIYI6Q6RYIYIY.Y.6RY.YI6RYIYIY.Y.YIY.6QY.YIY.Y.Y.YIYIYI6PYIYI6P6QYIYIY.Y.6QY.YI6QYI6RYIY.YIY.Y.6QY.6RY'Y'Y.Y.Y'6QY.Y.Y'Y'Y'6QY'6QY.Y.Y.6Q6RY.6R6SY.Y.Y'Y'Y.Y.Y'Y.Y.Y.Y'Y'Y.Y.6PY'Y.Y'Y'Y'6PY'6PY.Y.Y.Y'Y'6PY.Y'Y'6PY'Y.6PY.6QY'Y'6QY'Y'Y'Y'6QY'Y,Y'Y'Y,Y'Y,6PY'Y'6P6QY'Y'6QY'Y,Y,Y'6QY,Y,Y'Y,Y'6PY'Y'Y'Y'Y'Y,Y'Y'Y,6OY'6OY,Y,Y,Y,6OY,6OY,6PY,Y'Y,Y'Y'Y'6OY,Y,6OY,Y,Y,Y,Y'Y,Y,Y.Y'Y.Y.Y'Y'6MY'Y.6M6NY'Y'Y'Y'Y,Y'Y,Y'6MY'Y'6MY,Y'Y,Y'6M6MY,6NY,Y'Y'Y'6N6NY,Y,Y,Y'Y'Y'6N6NY,Y,Y,Y,Y,6NY'6N6OY,Y,Y.Y.Y.Y'Y.Y'6NY'Y.6NY.6OY.Y.6O6P6P6QY'Y'6QY'Y'Y'Y'Y'6Q6R6RY,Y'6SY,Y,6SY,Y'6SY'6TY,Y,6TY,Y'6TY'6U6UY'Y.6VY'Y'6VY'6VY'6W6X6XY'Y.Y.Y'6XY'Y,6X6YY,Y,YI6YYIYIY.Y.6YY.Y.6YYIYIY.YAY.Y.YAYA6XYAY.Y.Y.6XY.Y.YIYI6W6XYIYI6X6YYI6Z6Z7#Y.7$7$7%YIYI7%7&YIYIYAYA7&7'YAYA7'YIYAYAYA7'YAY,Y,Y,YA7&YAY,Y,Y,7&Y,YI7&YIYIY,Y,7&Y,YI7&YI7'Y,7'Y,7(YI7(YIYIYI7(YIYIYI7(YIYI7(Y,YIYI7(Y,7)7*7*7+YIYIYIYI7+7,7,7-YIYIYIZ)YIYIZ)Z)7,Z)YI7,YIZ)Z)Z)Z)7,Z)YIYIYI7+Z)7,Z)Z)Z)Z)7,Z)7,YIYI7,YIYIYIZ)Z)YIYI7+YIYIYIYIYMYIYIYMYM7*YMYIYIYM7*YIYIYMYMYMYIYMYMY,Y,Y,7(7(Y,YIYIYI7(YIY,YIYIYI7(7(Y,Y,Y,YIYI7(YIYIY,YIY,7'Y,Y,Y,Y,Z&7'Z&7'Z&Y,Z&Y,7'Y,Y,Y,7'Y,7(Y,Z&Y,Y,7'Z&7(Z&7(Z&Z&Z&Z&Z&7(Z&7(Z&Y,Y,Y,YKYKYKY,Y,Y,7'Y,Y,YK7'Y,7'Y,Z&Y,Y,Y,7'Y,Y,Y,7'7'Z&7(7)7)Z&7*Z&YIYIYI7*YIYIYIY,YIYI7)Y,YI7)7*Y,7*Y,7+Y,YI7+YIY,7+Y,Y,Y,YIY,Y,Y,7*Y,7+Y,7+Y,YIYIYIYIYI7+YI7+YIY,7+Y,YI7,7,Y,YI7-Y,Y,7-7.Y,Y,Y,7.YI7.Z)Z)Z)7.Z)7/Y,Y,7/70Y,Y,Z)Z)7/Z)Z)Z)Y,7/Z)Z)Y,7/Z)Z)7/Y,Z)Z)Y,Y,Z)Z)7.7/Z)Z)Z)Z)Y,Y,Z)Z)7.Z)Y,Y,Z)Z)Y,Y,Z)7-Y,Y,7-Z)7-Z#Z)7.Z)7.Z)7/Z)Z)7/Z#Z#Z#7/Z#7/YZYZYZ7/YZ70YZ70YMZ)Z)Z)Z)70Z)YMZ)7071Z)Z)71Z)Z)YM71YMZ)Z)Z)YMZ)Z)70YM70YMYMYMYMZ)YM70Z)YM70YMZ)Z)YMYMZ)Z)7/70Y,7071Z#Y,71Z#Z#7172Z#Z#Y,72Y,7373Z#Z#Z#7374Y,Z#74Z#Z#Z#YMY?74Y?74Y?YMYMY?74YMYM7475YM76YM76YM77Y?Y?Z'77YM7778Y?78Y?YMYMY?Y?YM78YM78YMYM78Y?YM79YMYM797:7:Y?YM7;YMYMYM7;7;Y?Y?Y?YKYKZ#Z#YKYKZ#YKYKZ&YKYKZ&Z&78Z&Z&Z&7879Z&Z&797:7:7;YKYK7;YKYKYK7;Z&7<Z&7<Z&YK7=Z&Z&YK7=YKYKYK7=YK7=Y-Y-Y-7=Y-Y-YKYKZ#Z#Z#Z#Z#7<7<Y07=Y07=7>Y0Y0Z#Z#7>Z#Z#7>7?Y0YKYKZ#YKY-Y-7>Y-Z#Y-Z#Z#7=Y-Z#Z#Y-Y-7=Y-Z#7=Z#Y-Z#Y-Z#Z#Z#Z#Z#7<Z#7<Z#Y0Y-Y-Z#Y07;Y-Y0Y-Y-Y-Y07;Y07;Y0Y07;7<Y0Y07<7=Y0Y07=Y-Y0Y07=Y0Y0Y0Y-Y-7=Y-Y-Y-7=Y-Y-Y-Y-7=Y-7=Y0Y0Z#Z#7=Z#Y?Y?7=Y?7=7>Y?Y?Z#7>Y?Y?Y?Y07>Y07>Y0Y?Y?Y?Y?Z'7>7>Y07?7@Z'Z'Z'7@Z'Z'YP7@Z'Z'YPZ'Z'Z'Z'7?7?Z'YPZ'Y-Y-Y-7?Y-Y-Y-Y07>7?Y0Y0Y07?Y0Y07?7@Y0Y0Y-Y-Y-7@Y-7@YYYYY-7@Y-7AYYYY7A7BYYYY7BYYY-Y-Y0Y07A7BY0Y0Y0Y07B7CY07CY+Y+Y0Y07CY0Y0Y0Y07CY/Y/Y+Y+Y/Y/7BY/Y07BY0Y/YEYEZ&Z&Z&7AZ&YEYE7AY<Y<YEYEY<Y<YYYYYY7@YYYY7@7A7AY<Y2Y27AY2Y/Y2Y<Y<Y2Y2Y<Y<Y2Y<Y27?Y2Y<Y<Y<Y2Y<Y2Y<Y2Y<Y2Y<7=Y<7=Y<Y2Y<7=Y<Y/7>Y/7>Y/Y/7>7?Y<Y/Y<Y<Y/Y/7>Y/Y/Y/Y<Y<Y/Y/YGYG7=7>YGYGY<Y<Y<Y<7=Y<Y<Y<Y<Z(Y<Y<Z(Z(Y<Y<Z(Z(Y<7:Y<Y<7:YGY<Y<7:YG7;YGYGYGY<Y<YGYG7:7;YGYGY<YGY<YG7:YGYGYGYG7:Z%Y)Y)Y)VT79VQVQ797:VQVQVNX(VNX(VNVN797:7:X(X(X(X'W3X'W3W3W3W379W379X'X'79X'X'X'797:WUWUW%W%WUW%797:WUWU7:X,WUWUX,X,WU7:U>TTU>7:U>U>U>TTU>79TTTTTUTUTLTLTUTUTLTLTUTUU0U07677U0U0TLU077U07778TLTL78TUU0U0TUTUU0U07778U0U0TUTUU0U0TUTU7778TUTUV;V;TU77TU7878V;79V;797:V;V;TUTUTU7:TUTU7:7;TUTU7;7<TUTU7<7=TUTU7=7>7>V;7?V;7?V;V;V;TUTUUPUP7>U57?U5U4U4TLU4U0UPU0UPU0UPU0UPUPUPU97<U97<U9U9V;7<V;7=V;7=V;7>TUTUTU7>7>V;7?V;TU7?TU7@TUV;TUV;7?V;TUV;TUV;TUV;V;7>V;7?UPUP7?7@7@UP7AUPV;V;V;UP7@UPUPUPV;UPUPUPYB7?YBY>7?YBY>Y>YBYB7?Y>YB7?Y>Y>Y>YB7?YBY>7?Y>YBYBYBYBYIYB7>YBYBYIYIYBYIY>YBYBYBYIYIY(Y(YIYIYI7;YIYIYBYBYIYB7:YI7:YIYIYIYBYIYBYIYIYIYBYBYIYIYBYBYIYIYBYIYIYI7677YIYI77YIYMYMYI77YI77YI78YIYIYFYIYMYM77YM77YMYIYMYMYMYM77YM77YMYMYMYM77YO77YMYOYMYOYO777878YMYMYM78YPZ'Z'YPYP78YP78YPZ'YPYPYPZ'YPYPYPZ'77Z'YPZ'Z'Z'YJZ'7676YJZ'YJYP76YPY+YWYWYW76YSYSYWYSYW7576YS76Y/Y+7777Y/Y+Y+Y/Y/Y+Y+Y/Y/Y+Y/YT7576Y/76Y/YTYTY/Y/YTYTY/Y/Y/7575YTYTYTY/Y/757676YTYTYTY/Y/76Y/YTY/YTYT75YTYTYTY9Y975Y9Y*Y9Y*Y*Y*Y*Y*74Y*74Y*Y*Y9Y9Y9X#Y973X#X#73X#X#X#VWVWX#73VW7374X#74VWX#VWX#74X#X#7475X#X#X/VWX/X/VWVWVW74VWVW7475VSWSVS75VSVSVS75VS75VSVS75WSWSW,WSWS75WSWSWSVSWSWSWS74757576VSVSWSWSVSWSWPVNWPWP74VNWP75VNVN75WY75WYWYWYVNVN7576VN76WYWY76WYWYWYVNVN7677VN77WYWY7778WYWYVNWYWYWYW#77W#WYWY77WYWY7778WYWYW#WYWYWYW#WYWYWYVNVNW#W#VNVN75VNW#VNW#W#VNVNVN7474WY75WYWY75W,W,75WYW,W,WYWYW,W,WYWYWY74WY74WYWYWYWYW,W,WYWY7374WYWY74W,WYWYW,W,WYWYWY73WYWY7374WYWY747575WYW,W,WY75WY76WYWYW,W,W#W#WY75W#W#75WYW,W,7576W,W,W,7676WYWYWY76WYWYWYW,76W,W,76WYW,W,WYWYW,WYWYWY75WYWYWYWY75WYWYW#W#W,W,W#W#73W#W#W#7374W,W,7475W,W,75W,W,W,W,W,W#W#W#W#W#74W#W,74W,W,W,W,W#WYWY73WYW,W,W,W#WYWYW#W#71W#W#W#7172WYWYW#727374WYWYWYW#W#WYWYWY72WYWYWYWS72WS73W,W,73WSW,W,7374W#WYW#WYWY73WYW#W#W#W#73W#W#WYW#WY72WYWY72WYWYWYWYW#WYWYWYWY7172WYWY72W#72W#W#W#W#W#WYWYW#W#71W#W#W#717272W#WYWYW#W#W#72W#W#727373W#WY747475WYWYWYWYW#WYWYWYWY74WYWYWY74WY7475W#WYWYWY757576W#W#7677W#W#77W#W#W#WYWYWY77WY7778W#78W#W#W#WYWYW#WYWYWYW#W#WYWY767777W#W#W#W#77W#W#WY7778W#WY78WY7979W#7:W#VNVNW#W#VNVNW#W#VNVNW#78W#78W#W#78VNW#W#VNW#W#W#WUWUWU77WUWU77WUWUWUWU77WUWU77WM77WMWMWMWMWM77WMWUWMWMWMWU76WMWMWMWMWT76WT76WTWTWMWMWM767677WTWTWMWMWM77WM7778WT78WTWTWTWMWMWM78WM78WTWT78WTWTWT78WTWTWTWU78WMWMWUWM7879WM79WM7:WMWMWM7:WMWM7:7;WT7;WTWTU>UYU>UYU>7:U>7;U>U>U>7;U>7;U>U>U>UYUYUYU>U>7:7;U>U>7;V:U>U>V:V:U>U>V:V:U>79V:V:U>U>79V:U>U>V:V:U>U>V:V:U>77V:V:77U>V:V:U>77UYUY77U>UYUY7778UYUYV:UYV:78V:UY78U/UYUY7879UYUYUYTTUYUYTTTT77TTTTTTUY77U/U/7778U/U/78U/U/U/U/78U/U/7879U/U/TTTTUUUUTTTTUUUUTTTT77TTUU77UUUUUU77UUUU77TTUU78TTTT78TTUUTTUUUUUPUP77UPTLUP77UP77YBY>YBY>YBY>777778S:79797:S:S:S:7:7;S;S0S07;7<7<S0S:S:W-W-7<7=W-7=7>WFW-W-7>W-WFW-WFWFY9Y9W(7=7=W(W(W(Y9Y9W(7=Y9Y97=Y9W-W-WFW-W-W-WFWFW(W(7;7<W(W(7<7=VZ7=VZW(7=W(W(W(VZVZVZW(VZVZVZW(VZW6VZW6W6W6W6W/W679W6W6W(W(79W(79W(W6W(VO79VOVOW(W(79W(VOW(VOW(W6W6W.78W.W.78W6W.W.W.W6W6W6W/W/W6W/W/W/W6W6W675W6VOW6VO7475W(W(W(VUW(VUW(74W(VU74W(W(W(Y9Y9Y974VU74VUVUY9Y9VUY9X#73X#X#7374X#X#VUVU747575X#VUVU75X#76X#X#X#VUX#VU7576X#X#X#VUX#X#X#7576X#X#X#76X#X#VUVUX#X#VU7575X#VUX#VUX#VUVU7475VUVUVUVUW@W@X#X#74X#X#X#VUX#VU73VU74VSVSX#VSX#73X#X#VSVS73VSX#X#X#7373VSVSVSW773W7W773WSW7WSW773W7W77374W7W77475W77676W,W777W,W,77W,77W,W778W,W,78W,W778W7W778W,W7W,W7W7W,W7W,W7W,W,W7W9W7W9W775W7W7W9W975W975W9W7W7W775W9W97576W7W7W9W9W7W7W9W975W975W9W7W9W7W775W975W9W9W9W7W9W7W974W9W9W9W7W9W7W773W<W<W<W9W9W97373W<W<W<73W<W9W9W9W<W9W9W9W9W972W972W<W<W9W<W<W<W9W9W971W9W9W9W<W970W9W970TLUU71TM7172UL72UL737474TLUE75UE75UEUETLTL75TL75TLUE76UETLUE76TLTL76TL76TLTLTLTLTLUE767677UE78UE78UEUE78TL79TLUE79UEUE797:UEUETLUPTL7:TL7:UPUP7:X#VUVUX#X#7:7;W+W+W+7;W+WEW+W+7:WE7;WEWEWE7;7<WEWE7<7=WEWE7=W+WEW+W+W+WE7<WEW+W9W97<W9X#7<X#W9W<7<W<7=W<W:W<W:7<W:W<W<7<WUW:7=W)W<W)7=W<W<7=W<7=W<W<W<W<W<7=W<W)7=W)7>7>W<W<W<WU7>7?7@WUWUWU7@WUWUWU7@WU7@W1W17@W1W1W1WUWUWUWXWUWXWXWX7>UIUIUIULUL7>7?UL7?7@UITHTHTATATHTHTATHT+T+UCUCUCUCUC7=UCUC7=UCSA7=SASZX-X-X-7=7=VXVXVX7=X*VXVXX*X*7=X*7=X*X*X*X*X*7=X*X*X*X*7=X*X*7=7>X*VXX*VXX*X*VXX*VX7<VXVXX*X*7<X*VX7<VX7=VXX*VXX*WUW1WUW1WUWUWU7;WU7;WU7<WU7<WUWUWAWA7<WAWU7<W1W17<W1W1W17<TI7=TI7=TITDTI7=S4S4S4SX7=S@7>7>SXS@7?S@7?S@S@S@7?S@S@SXSX7?SXS@7?S@S@[email protected]>7?SMSM7?SMS.SMS.SMSM7>SMSMSMSMSM7>7>7?T$T$T$SK7?SKT$7?T$7@T$7@T$7AT$7A7BSKT$SKSKSK7ASKT$SKS3S37A7BS3S3SJSJS3S3S37A7AS3SO7BS3SOS3SO7ASOSOSOSO7A7BSG7BSGSOSOSOSGSOSGSO7ASOSO7ASOSOSOSGSGSWSWW>W>W>WVW>W>W>7?WV7?WVWV7?WVWVWVW>W>7?W>WV7?WVWVW>W>7?7@W>W>WVWVW>WVW>WVW$W$W$W?W$W?W?W?7<U#T-U#SJSJSJ7<SJ7<SJSJS7S77<7=S77=7>SJSOSOSO7>SGSG7>SGSO7>SOSG7>SISISISISI7>SISISISOSISOS8SOS8SOS8SOS8SG7;SG7<SISISIS8S8S8S8S>SISIS>S>SISIS>S>S>78S>S>78SWS>79S>S>S>SWV$TPV$78V$TPV$TPV(V(V(7777U@T=78V(V(T=T=V(V(77T=V(7778T=U@U@78U@SPSOSP78SP78SPSP78SOSPSPSP78SPSPS>S>SPSPS>S>77S>SP77SPSPSPS6SPSPS6S6SRS6S6S6S6SRSRSR74SR7475SRSRS6S67576S676SRSRU<U<U<76U<U<76U<U<TGTGTGT;TGT;TG747576V.SD76SDSDSPSP76SPS6S6S676SRSR76SRSESDSESET/75T/7676T077T077T0T/T0T0T0T077T077T0T0T0T;T077T077T0T0T;T;77T;T0T;T0T07677T0T0T;T;77T;T077T0T;T;77T;78T;TGT;T;T;T;T;7777V.78V.78V.797:V.V.7:V.T0T0T;T0T0T079V.79V.V.V.T0T079V.T0T0T0V.78V.V.V.T;T;7879T;T;79T;T079T0T0T0T079V.SESESSSSSESESESSSESE7778SE78SESSX;X;7879X;X;797:T57:T5T5T3T37:7;7;7<T5T5T5T3T5T3T5T3T5T5T3T37:T3T57:T5T5T0T0T7T7T0T0T7T7T0T.T.T.T.T0T.T.7677T.T.T0T077T0T.77T.T.UMUMT0UMV.V.UMV.T075T0UMUMV.UMUMUMV.UM74V.V.74V.UM74UMUMV.V.UMV.T0UMT0UM72UM73UM7374UMUM74UMT075T0T0T0UMT0UMT0T073T.T.T.T0T073T073UMT0UMT0UM73UMV.V.UM7373V.UM747475UMUMSSSSSE75SESSSSSS74XBXBXBXDXD74XD7475XBXB75XD76XD76XDXBXBXDXBXBXBXDXDXB75XDXD7576XDXD76XD7677XBXB7778T5T5T.T.T5T.YUY7YUYUYUY7YUYUY7Y7YUYUY7Y7YUY7X.X.X&X&X.X.X&X&X&X.X&X&X.X.X&X&X.X&X&X&X.X.X&X&X.X.X&X&X.X.X.X&Y4Y4Y@Y@Y4Y@Y4Y@Y4Y@Y@Y@Y4Y4Y@Y@Y4Y4Y@Y@Y4Y@Y@Y@Y4Y@Y@Y@Y4Y@Y4Y4Y@Y@Y4Y4Y@Y@Y4Y4Y4Y@Y4Y4Y@Y@Y4Y4Y'Y,Y'Y,Y'Y,Y'Y,YHYHYUYUYHYHYUYUY3Y3Y,Y,Y,Y3Y,Y,Y,Y,Y,Z&Z&Z&Y,Z&Y,Y,Y,Z&Z&Z&Y,Z&Z&Z&Y,Z&YLYLZ$Z$YLYVYLYVYVYVYLYLYVYGYVYVYGYGYVYGYVYVYVYGYVYVYVYGYNYNYXYXYNYNYXYNYXYXYXYNYNYNX.X.YNYNYNX.YNYGYNYNYGYNYGYGYNYNYGYGYGYNYGYGYNYNYGYGYNYNYNYGYNYNX.X.YNX.X.X.YNYNX.X.YNX.YNX.YGYGYGX.YGX.YGX.YGYGYGX.YGYGX.X.X.YGX.YGX.X.X.X&X.X&X&X&WGWGW=W=WGWGW=W=UTTLUTUTUTTLUTUTUTTLUTTLV?V?V?TLV?V?TLTLUGUGTLUGTLUGTLTLV9V;V9V;V9V9V9V;V9V9V;V;V9V9V;V;TLUGUGUGTLUGUGUGUGUGTLUGUGUGTLUGUGUGUGTUUGUGTLTLUGTUTLTLV;V;TUV;UKUKUKUPUKUKUPUPUKUKUPUPY.Y.YIY.Y.Y.YIY.Y.Y'Y.Y.Y.Y.YIYIY.YIYIYIY.Y.YIYIY.Y.YIYIY.YIYIYIY.Y.YIY.Y.Y.Y.YIY.Y.YIYIY.Y.YIY.Y.Y.YIY.Y.Y.YIY.YIYIYIY.Y.Y.YIYIY.Y.YIYIY.Y.YIY.Y.Y.YIYIY.Y.YIY.YIY.YIY.Y'Y'Y.Y'Y.Y'Y.Y'Y'Y'Y.Y.Y'Y'Y.Y.Y'Y.Y.Y.Y'Y'Y.Y.Y'Y.Y.Y.Y'Y'Y.Y.Y'Y'Y.Y.Y'Y'Y.Y'Y.Y'Y.Y'Y.Y'Y.Y.Y'Y'Y.Y.Y.Y'Y.Y.Y.Y'Y.Y'Y.Y'Y.Y.Y'Y'Y.Y'Y'Y'Y,Y,Y,Y'Y,Y,Y'Y'Y,Y,Y'Y'Y,Y,Y'Y'Y,Y,Y,Y,Y'Y'Y'Y,Y'Y,Y'Y'Y,Y,Y'Y'Y'Y,Y,Y,Y'Y'Y'Y,Y'Y'Y'Y,Y,Y,Y'Y'Y,Y,Y'Y'Y,Y,Y'Y'Y.Y.Y.Y'Y'Y'Y.Y'Y.Y.Y'Y,Y'Y'Y'Y'Y'Y,Y'Y,Y'Y'Y,Y,Y'Y,Y'Y,Y'Y,Y'Y'Y,Y,Y'Y,Y'Y,Y'Y,Y,Y,Y'Y,Y,Y,Y,Y'Y'Y'Y'Y'Y,Y,Y'Y,Y,Y,Y.Y.Y.Y'Y.Y'Y.Y.Y.Y.Y.Y'Y.Y.Y.Y'Y.Y'Y'Y'Y.Y'Y.Y'Y.Y'Y'Y'Y'Y'Y.Y'Y'Y'Y'Y,Y'Y,Y,Y,Y'Y,Y'Y'Y'Y,Y'Y,Y,Y,Y,Y'Y'Y,Y,Y,Y'Y,Y'Y'Y,Y,Y'Y,Y'Y,Y'Y,Y'Y,Y'Y,Y.Y'Y.Y'Y'Y'Y.Y.Y'Y'Y.Y'Y.Y'Y.Y'Y'Y'Y.Y.Y'Y'Y.Y.Y'Y'Y'Y.Y'Y'Y'Y,Y'Y,Y,Y,Y'Y,Y,Y,Y.Y.YIYIYIY.YIYIY.Y.YIYIY.Y.Y.YAY.YAY.Y.Y.Y.Y.YIY.Y.YIYIY.Y.YIYAY.YAYAYAYIYAYIYAYAYAY.Y.YAYAY.YAY.YAY.YAYAYAYIYIYAYAYIYIYAYAYIYIYAYAYIYAYAYAYAYIYAYAYIYAYAYAYIYIYAY,YAY,YAY,YAY,Y,Y,YIYIYIY,YIYIYIY,YIY,YIY,YIY,Y,Y,YIYIY,YIY,Y,Y,Y,Y,YIY,YIYIYIY,YIYIYIY,Y,YIYIY,Y,YIYIY,Y,YIY,YIY,YIYIY,YIYIYIYIY,YIYIY,Y,YIY,YIYIYIZ)YIYIZ)Z)Z)Z)Z)YIZ)Z)Z)YIYIZ)Z)Z)YIZ)YIZ)Z)Z)Z)YIYIZ)YIZ)YIYIZ)Z)Z)Z)Z)YIZ)Z)Z)YIZ)YIYIYIZ)Z)YIYIYIYMYIYMYMYIYMYMY,Y,YIY,Y,Y,YIYIYIY,YIYIYIY,YIY,YIY,Y,Y,YIYIY,Y,Y,Y,YIY,Y,Z&Z&Z&Y,Z&Y,Z&Y,Z&Y,Z&Y,Z&Y,Z&Y,Y,Y,Z&Y,Y,Y,Z&Y,Z&Z&Z&Z&Z&Y,Z&Y,Z&Y,Z&Y,Z&Y,Y,Y,Z&Y,Z&YKY,YKYKY,Z&Z&Z&Y,Z&Z&Z&Y,Y,Y,Z&Y,Y,Y,Z&Z&Z&YKYKZ&Z&YKYKY,Y,Y,Z&Y,Z&Z&Z&YIYIYIY,YIY,Y,Y,YIY,Y,Y,YIY,YIY,YIY,YIY,YIY,YIY,YIYIYIY,YIY,Y,Y,YIY,YIY,YIY,YIY,YIY,YIY,YIYIYIY,YIY,Y,Y,YIY,YIY,Y,Y,YIY,YIY,YIY,Y,Y,Z)Y,Y,Y,Y,Z)Y,Y,Z)Z)Y,Y,Z)Y,YIYIZ)Z)Z)Z)Y,Y,Z)Y,Z)Z)Y,Y,Z)Z)Y,Z)Z)Z)Y,Z)Z)Z)Y,Y,Y,Z)Y,Y,Y,Z)Y,Y,Z)Y,Y,Y,Y,Z)Y,Y,Z)Z)Z)Z)Y1Y1Y,Y,Z)Z)Y,Y,Z)Z)Z)Z#Z)Z#Z#Z#Z)Z#Z)Z#Z)Z#Z)Z#Z)Z#Z)Z#Z#Z#YZZ#YZZ#Z)YZYZYZYZYZZ)YZZ)YZZ)Z)Z)Z)YMZ)YMZ)YMYMYMZ)YMYMZ)Z)YMYMZ)Z)YMYMZ)YMZ)YMZ)Z)Z)YMZ)YMYMYMYMZ)YMYMZ)Z)Z)YMZ)Z)YMYMZ)YMYMYMY,Y,Y,Z#Y,Y,Y,Z#Y,Y,Z#Z#Y,Y,Y,Z#Y,Y,Z#Z#Y,Z#Y,Y,Y,Z#Z#Z#Y,Z#Z#Z#Y,Y,Y,Z#Y,Y,Z#Z#Y,Z#Z#Z#YMY?Y?Y?YMY?YMYMY?Y?Y?YMY?Y?YMYMY?Y?YMY?YMY?YMY?YMYMYMY?YMY?YMYMZ'Y?Z'Z'YMY?Y?Y?YMY?Y?Y?Y?Y?YMYMYMY?YMYMYMY?YMYMY?Y?YMYMYMY?YMYMYMYMY?Y?YMYMY?YMY?Y?YMY?Y?Y?YMYMYMY?Y?Y?YMYMYMY?Z&Z&YKZ&Z&Z&YKYKZ&Z&YKYKZ&Z&YKYKZ&Z&YKZ&YKZ&YKYKZ&Z&YKYKZ&Z&YKYKYKYKYKZ&Z&Z&YKZ&YKZ&YKYKZ&Z&YKZ&Z&Z&YKYKYKYKY-YKYKYKYKY-Y-YKY-Y-Z#Z#Y0Y0Z#Z#Z#Y0Z#Y0Y0Y0Z#Z#Y0Y0Z#Z#Y0Y0Z#Z#Y0Y0Z#Y0Z#Y0Z#Y0Y0Y0Z#Y-Z#Y-Z#Y-Z#Z#Z#Y-Z#Z#Z#Y-Y-Y-Z#Z#Z#Y0Z#Z#Z#Y0Y0Y-Y0Y0Y0Y-Y0Y0Y0Y-Y0Y0Y-Y-Y0Y0Y-Y-Y0Y0Y-Y-Y0Y0Y-Y-Y0Y0Y-Y-Y-Y0Y-Y-Y0Y0Y-Y-Y0Y-Y-Y-Y-Y0Y-Y-Y0Y0Y-Y0Y0Y0Z#Z#Z#Y?Y?Y?Z#Z#Z#Z#Y?Y?Z#Z#Y?Y?Z#Y?Z#Y?Y?Y0Y0Y0Y0Y0Y?Y0Y?Z'Z'Z'Y0Z'Z'Z'Z'Y0Y0Y0Y0Y0Z'Y0Z'Z'Z'YPYPZ'YPYPYPYPYPZ'Z'Z'YPYPY-Y-Y0Y0Y-Y-Y-Y0Y-Y-Y0Y0Y0Y-Y0Y0Y-Y-Y0Y0Y-Y0Y0Y0Y-Y-Y-YYY-Y-YYYYY-YYY-YYY-YYY-Y-YYYYY0Y0YYY0Y0Y0Y0YYY0Y0Y-Y-Y0Y0Y-Y0Y0Y0Y0Y0Y0Y+Y0Y0Y+Y+Y0Y+Y+Y+Y0Y0Y+Y+Y0Y0Y0Y/Y+Y/Y+Y+Y0Y0Y0Y/YEYEZ&YEYEYEY<Y<YYYYY/Y/YYYYY/Y/YYY/Y/Y/Y<Y<Y2Y2Y2Y2Y/Y2Y2Y<Y2Y2Y2Y<Y<Y<Y2Y<Y2Y<Y<Y<Y/Y/Y/Y<Y/Y<Y/Y<Y/Y/Y<Y<Y<Y/Y<Y<Y/Y/Y<Y/Y/Y/Y<YGY<Y<YGYGY<YGY<Y<Z(Z(YGYGY<Y<YGYGY<YGY<YGY<YGY<Y<Y<YGYGYGY<YGYGYGY<Y<YGYGY<YGYGYGZ%Z%VTVTVTVQVTVTVQVQVTVQVQVQVNVNX(X(VNX(X(X(VNVNVNX(W3W3W3X'W3W3X'X'W3W3X'X'W%W%WUWUW%W%WUW%WUX,WUWUX,X,WUWUX,X,WUWUWUX,WUX,U>TTU>TTU>TTTTTTTUTUU0U0TUTUU0U0TLU0TLU0TLU0TLTLU0U0TLTLTUTUU0U0TUTUU0U0TUTUU0U0TUTUTUV;TUTUV;V;TUTUTUV;TUV;V;V;TUV;TUV;TUV;TUV;TUTUTUV;TUTUV;V;TUTUTUUPTUTUUPUPTUTUUPUPTUTUUPUPTUTUUPUPTUTUUPUPTUTUUPUPTUTUUPUPTUTUUPUPTUV;TUV;TUV;TUV;TUTUTUV;TLTLTLU5TLU5U5U5UPUPU9U9UPUPU9U9V;UPV;UPV;UPV;UPV;UPV;V;V;V;V;UPTUV;V;V;TUV;TUV;TUTUTUV;TUTUTUV;TUV;V;V;TUTUTUV;V;UPV;UPUPUPV;V;UPUPV;V;UPUPV;UPV;UPV;UPV;UPV;UPV;V;UPUPYBYBYBY>YBYBY>Y>YBYBYBY>YBYBYBY>Y>YBYBYBY>YBYBYBYIYIYBYBYIYIYIYBYBYIYBYIYIYIYBYIYIYIYBYBYIYIYBYBYIYIYBYBYMYMYIYMYIYIYIYFYFYFYIYFYMYMYIYMYIYMYIYMYMYMYMYOYMYOYMYOYMYMYOYOYMYMYOYOYOYOYMYMYOYOYMYMYOYOYOYMYPYPZ'Z'YPYPZ'YPZ'YPZ'Z'YPYPZ'YPZ'YJZ'YJYJYJZ'YJYPY+Y+Y+YWYWYSYSYWYSYWYSYWYSYSYSY/Y/Y+Y/Y/Y/Y+Y/Y+Y/Y+Y+YTYTY/Y/YTYTYTY/Y/Y/YTYTY/YTYTYTY/Y/YTYTY/Y/Y/YTY/YTYTYTY/YTYTYTY/Y/Y/YTY/YTYTYTY9Y9Y*Y9Y*Y9Y*Y*Y*Y*Y*Y9Y9Y9X#X#Y9X#X#X#VWVWX#VWVWVWVWX#VWVWX#X#VWVWX#X#VWVWX#X#VWVWX#X#VWVWX#X#VWVWX#X#VWVWX#X#VWVWX#X#WSWSVSVSVSWSVSWSVSWSVSWSWSWSWSW,WSWSVSVSVSWSVSVSWSWSVSWSVSWSVSVSWSWSVSWSVNVNWPVNVNVNWPWPVNVNVNWYVNWYWYWYVNVNVNWYVNWYWYWYVNVNVNWYVNWYVNVNWYVNWYWYVNVNWYWYVNVNWYWYVNVNWYWYVNVNWYWYW#WYWYWYWYW#WYWYW#W#WYWYW#WYWYWYVNVNW#VNVNVNWYWYVNWYVNWYVNWYWYWYWYWYW,W,WYWYW,WYWYWYWYW,W,W,WYW,WYWYW,W,WYWYW,W,WYW,W,W,WYW,WYWYWYWYW,W,WYWYW,W,WYWYW,W,WYWYW,W,WYWYW,W,W,W,WYW,W,W,WYW,W#W#WYWYW#WYWYWYW,W,W,WYW,WYWYWYW,WYWYWYW,W,W,WYW,WYWYWYWYWYW,W,WYWYW,W,WYWYW,WYWYWYW#W#W,W,W#W#W,WYW,W,WYWYW,W,WYWYW,W,WYW,W,W,W,WYW,W,W#W#W#W,W#W,W,W,WYWYWYW,W#WYW#WYW#W#WYWYW#W#WYW#W#WYW#WYW#WYW#W#WYWYW#WYWYW#WYWYWSWSWSW,W,W,WSWSW,W,WSWSW,W,W7W7W,W,W7W7WYW#WYW#W#W#WYWYWYW#WYWYW#WYWYWYWYW#W#W#W#WYW#WYWYWYWYW#WYWYW#W#WYW#WYWYWYW#WYWYW#W#WYW#WYW#WYWYW#W#WYWYW#W#WYWYW#W#WYWYW#W#WYW#WYW#WYWYW#W#W#WYW#WYWYWYWYWYWYW#WYWYW#W#WYWYW#W#WYWYW#W#WYW#WYW#WYWYWYW#WYWYW#W#WYWYW#WYW#W#WYW#WYW#W#W#WYWYWYW#WYWYW#W#WYW#W#W#WYWYW#W#WYWYWYW#WYWYW#W#WYW#WYW#WYWYW#W#WYW#W#W#WYW#W#W#W#W#WYWYWYWYW#W#W#W#WYWYWYWYW#W#W#VNW#W#VNVNW#W#VNVNW#VNWUWUWMWMWMWMWMWUWUWUWUWMWUWUWUWMWUWUWUWMWUWMWUWUWUWUWMWMWMWMWTWTWMWMWTWTWMWTWMWTWMWMWMWTWMWTWTWTWMWMWTWMWMWMWTWTWMWTWTWTWMWMWTWTWMWTWTWTWMWMWMWTWMWMWTWTWMWTWTWTWUWUWMWMWUWMWMWMWMWUWMWMWMWTWMWMWMWTWMWTWMWMWTWMWMWMWMWTWMWMWTWTWMWTWTWTUYUYU>UYU>UYU>UYU>UYUYUYU>UYU>U>U>U>V:V:U>U>V:V:U>U>V:V:U>U>V:V:U>U>V:V:U>U>U>V:U>U>V:V:U>U>UYUYU>U>UYUYU>U>UYUYU>UYUYUYV:UYV:UYV:V:U/U/U/UYU/U/UYUYU/U/UYUYUYTTUYUYU/U/UYUYU/U/UYUYU/U/UYUYU/U/UYUYU/U/UYUYU/U/UYUYU/U/TTTTUUTTTTUUUUUUUUTTUUUUTTTTUUTTTTTTUUTTUUTTUUUUUPUPTLUPTLTLUPUPY>YBY>YBY>YBY>YBS:S;S:S;S:S:S;S;S;S;S:S:S:S:S;S:S:S:S;S:S:S:S;S:S:S;S:S:S:S0S:S:S0S0S:S0S0S0S:S0W-W-WFWFW-WFWFWFW-W-W-WFWFW-WFWFWFW-WFW-Y9Y9W(W(Y9Y9Y9W(W(Y9W(W(W(Y9W(W(W(W(VZVZW(W(VZW(W(W(W(VZW(W(VZW(VZVZW(VZVZW(VZW(W6W(W6W6W6W(W6W(W6W(W6W6VOW(VOW(W(W(VOW(W6W6W.W6W.W.W.W6W6W6W6VOY9Y9W(Y9Y9Y9W(W(W(W(W(VUY9Y9W(W(Y9VUY9VUY9Y9VUY9X#VUX#X#VUVUX#X#VUVUX#X#VUVUVUX#VUX#X#X#X#X#VUX#VUVUVUX#X#X#VUX#VUVUVUX#VUVUX#X#VUX#VUVUX#X#VUX#X#VUVUVUVUX#VUVUVUX#VUX#X#X#X#VUX#X#VUVUVUX#VUVUVUX#VUX#VUX#VUX#X#VSX#X#VSVSX#VSX#X#X#VSX#VSVSVSW7WSW7W7WSWSW7WSWSWSW7WSWSWSWSW7WSWSW7W7W7W,W7W7W,W,W7W,W7W,W7W7W,W,W7W,W7W,W7W7W,W,W7W,W7W,W7W7W7W,W7W7W,W,W7W,W7W,W7W7W,W,W7W,W7W9W7W7W7W9W7W9W7W9W7W7W7W9W9W9W9W9W7W7W9W9W7W9W9W9W7W9W7W9W7W9W7W7W7W9W7W7W7W9W7W9W9W9W9W9W9W<W9W9W<W<W9W9W9W<W9W<W9W<W9W<W<W<W9W9W9W<W9W9W9W<W9W<W9W<TLTLUUTLTLTLUUTLTMULTMULTMTMTMULULULTMULTMULTMTMULULTMULUETLUEUEUETLUETLTLTLUETLTLTLUETLUETLUEUEUETLTLTLTLTLUEUETLTLUETLUETLTLTLUETLUETLTLTLUEUETLTLUETLUETLUEUETLTLUETLTLTLUETLUETLUEUEUETLUEUETLTLUEUETLTLUETLTLUPTLUPTLUPUPUPX#X#VUVUX#X#VUVUX#X#VUX#W+W+W+WEW+W+W+WEW+WEWEWEW+WEW+W+WEWEW+WEWEWEW+W+WEWEW+W+WEW+WEW+W+W+WEW+X#W9X#X#X#W9W9W9W<W<W<W:W<W:W:W:W<W:W<W:WUWUW:W:W:WUW:W:W)W<W)W)W)W<W)W<W)W)W)W<W<W<W)W)W)W)W)W<W)W<W)W<W)W)W<W)WUX-X-X-WUWUX-X-WUX-X-X-WUWUW1WUWUW1W1W1WUWUWUW1WUW1W1W1T>UIUIUIUIULUIUIULULUIULULULUIUIULUIULUIUCUCU?U?UCUCU?U?SASZSASZX-X-X-VXX-VXX-VXX*X*VXVXVXX*VXX*VXX*VXX*X*X*X*VXX*X*X*VXX*X*VXVXX*VXVXVXVXX*VXVXVXX*VXVXX*X*VXX*VXX*VXX*WUWUWUWAWUWAWAWAWUWAWUWAWUWUWUWAWAWAWUWAWUWUWUW1WUW1W1W1TDTITITITITITDTITDTITDTDS4S=S4S4SXSXSXS@SXSXS@S@SXSXS@S@SXSXS@SXSXSXS@SXSXSXS@S@S@SXS@S@S@[email protected]$SMSMSMT$SMSMSMSMSMT$SMSMT$T$T$T$T$SKT$T$T$SKT$SKT$SKT$SKT$SKT$SKT$T$T$SKSKSKT$SKT$SKT$SKT$SKS3SJSJSJSJS3SJSJS3SOS3SOS3S3SOSOSOS3SOSOS3SOS3SOSOSGSGSGSOSOSOSGSOSGSOSOSOSGSOSOSGSGSOSOW>W>WVWVW>W>WVWVW>WVWVWVW>W>WVW>WVW>WVWVWVW>WVWVW>WVWVWVT-U#T-U#SJS7SJS7SJS7SJSJS7S7S7SJS7S7SJSJS7S7S7SJS7S7SJSJSOSGSOSGSOSGSGSGSOSGSOSGSOSOSOSISISISOSISGSGSGSISGSISGSIS>SWS>S>SWSWS>SWSWSWS>S>V$TPTPTPV(V(V(T=T=V(T=T=T=U@T=T=V(V(T=T=V(T=T=T=V(V(T=T=U@U@T=T=SOSOSPSOSPSOSPSPSOSOSOSPSOSPSPSPS>S>SPS>SPS>SPSPS6S6S6SRSRS6SRSRS6S6S6SRS6S6S6SRS6S6SRSRS6S6SRSRU<U<U<T1U<U<T1U<TPTPTPV.TPTPV.V.TPV.V.V.SPSPSDSPSDSPSDSPS6SRS6S6SDSRSDSRT/T/T0T0T/T0T/T/T/T/T0T0T0T0T/T0T/T0T/T0T0T0T;T;T0T;T0T0T;T;T0T;T0T;T0T0T0T;T0T;T0T;T0T0T;T;T0T;T;T;T0T;T;T;T0T;TGTGT;TGT;TGT;T;T;V.T;T;V.V.T;V.T;V.T;V.T;V.T;V.T;V.T;T0V.V.T0T0V.V.T0V.T0T0V.V.T0V.V.V.T0T0T0V.T0V.V.V.T;T;T0T0T;T;T0T0T;T;T0T;T;T;T0T;T0V.V.V.SESESESSSESSSSSSSESSSESSX;XDXDXDXDX;XDXDX;X;XDXDX;XDXDXDT3T3T5T3T5T3T5T5T3T3T5T3T3T3T5T3T3T3T5T5T3T3T5T5T3T3T5T5T.T0T.T.T0T0T.T0T.T0T.T.T.T0T.T.UMUMT0UMUMV.UMUMV.UMUMUMV.V.UMV.T0UMT0UMT0T0T0UMT0T0T0UMT0UMUMUMT0UMT0T0T0UMT0T0T0T0T.T.T.T0T.T.T0UMT0UMT0UMUMUMUMV.UMV.V.V.UMUMUMV.UMUMUMV.UMUMV.V.UMUMSESSSSSSXDXDXBXBXDXDXBXDXBXDXBXDXDXDXBXDXDXDXBXDXBXDXBXBXDXDXBXDXBXDXBXBXDXDXBXBXDXDXBXDXDXDXBXDXBXDXBXBXDXDXBXBT5T.T5T5T.T.T5T5",
67m=["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vincennes","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New_York","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rankin_Inlet","America/Recife","America/Regina","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Et
67c/GMT","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Etc/UTC","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"];if(a=+a,!(-90<=(i=+i)&&i<=90&&-180<=a&&a<=180))throw new RangeError("invalid coordinates");if(90<=i)return"Etc/GMT";var g=-1,s=48*(180+a)/360.00000000000006,Y=24*(90-i)/180.00000000000003,E=0|s,I=0|Y,k=96*I+2*E;for(k=56*h.charCodeAt(k)+h.charCodeAt(k+1)-1995;k+m.length<3136;)k=56*h.charCodeAt(k=8*(g=g+k+1)+4*(I=0|(Y=2*(Y-I)%2))+2*(E=0|(s=2*(s-E)%2))+2304)+h.charCodeAt(k+1)-1995;return m[k+m.length-3136]}n.exports=t}(U_)),U_.exports}var E3=W3();const M3=Aa(E3);function P3(n,t,i,a="ff"){const h=M3(t,i);return wr.fromISO(n,{zone:"utc"}).setZone(h).toFormat(a)}function ys(n,t,i){return t&&i?P3(n,t,i):new Date(n).toLocaleString()}const qy=n=>new Date(n).toISOString(),I3=async(n,t)=>{try{if(!t)throw new Error("User not authenticated");const i={event_title:n.event_title,event_type:n.event_type,street_address:n.street_address,city:n.city,state:n.state,zip_code:n.zip_code,start:n.start,end:n.end,latitude:n.latitude,longitude:n.longitude,county:n.county||null,country:n.country||"us",info_url:n.info_url||null,description:n.description||null,warnings:n.warnings||null},{data:a,error:h}=await Ur.functions.invoke("add-event-manual",{body:i,headers:{Authorization:`Bearer ${t.access_token}`}});if(h)throw h;if(a!=null&&a.error)throw new Error(a.error);return{success:!0,event:a.event}}catch(i){return console.error("Error adding event:",i),{success:!1,error:i.message||"Failed to add event"}}},U3=async(n,t)=>{try{if(!t)throw new Error("User not authenticated");const i={event_title:n.event_title,event_type:n.event_type,street_address:n.street_address,city:n.city,state:n.state,zip_code:n.zip_code,start:n.start,end:n.end,county:n.county||null,country:n.country||"us",info_url:n.info_url||null,description:n.description||null,warnings:n.warnings||null},{data:a,error:h}=await Ur.functions.invoke("add-event-geocode",{body:i,headers:{Authorization:`Bearer ${t.access_token}`}});if(h)throw h;if(a!=null&&a.error)throw new Error(a.error);return{success:!0,event:a.event}}catch(i){return console.error("Error adding event:",i),{success:!1,error:i.message||"Failed to add event"}}},C3=async(n,t,i)=>{try{if(!i)throw new Error("User not authenticated");if(!n)throw new Error("Event ID is required");const a={event_id:n,event_title:t.event_title,event_type:t.event_type,street_address:t.street_address,city:t.city,state:t.state,zip_code:t.zip_code,start:t.start,end:t.end,latitude:t.latitude,longitude:t.longitude,county:t.county||null,country:t.country||"us",info_url:t.info_url||null,description:t.description||null,warnings:t.warnings||null},{data:h,error:m}=await Ur.functions.invoke("edit-event",{body:a,headers:{Authorization:`Bearer ${i.access_token}`},method:"PATCH"});if(m)throw m;if(h!=null&&h.error)throw new Error(h.error);return{success:!0,event:h.event}}catch(a){return console.error("Error updating event:",a),{success:!1,error:a.message||"Failed to update event"}}},V3=async n=>{try{const{error:t,data:i}=await Ur.from("events").delete().eq("id",n).select();if(t)throw new Error(`Failed to delete event: ${t.message}`);return{success:!0,deletedEvent:i==null?void 0:i[0]}}catch(t){throw console.error("Database error in deleteEvent:",t.message),t}},ZI=async n=>{try{const{data:t,error:i}=await Ur.from("events").select("*").eq("id",n).single();if(i)throw new Error(`Failed to fetch event: ${i.message}`);return{data:t,error:null}}catch(t){return console.error("Error in getEvent:",t),{data:null,error:t.message}}},jI=async()=>{try{const{data:n,error:t}=await Ur.from("events").select("*").order("start",{ascending:!0});if(t)throw new Error(`Failed to fetch events: ${t.message}`);return{data:n,error:null}}catch(n){return console.error("Error in getAllEvents:",n),{data:null,error:n.message}}},mv=async n=>{try{const{data:t,error:i}=await Ur.from("events").select("*").eq("user_id",n).order("start",{ascending:!0});if(i)throw new Error(`Failed to fetch events: ${i.message}`);return{data:t,error:null}}catch(t){return console.error("Error in getAllEvents:",t),{data:null,error:t.message}}},BI=({organizationId:n=null,title:t="Upcoming Events",limit:i=10})=>{const[a,h]=de.useState(!0),[m,g]=de.useState([]),[s,Y]=de.useState(null),E=de.useRef(null);de.useEffect(()=>{(async()=>{h(!0),Y(null);try{let V,F;n?{data:V,error:F}=await mv(n):{data:V,error:F}=await jI(),F?(console.error("Error fetching events:",F),Y("Failed to load events. Please try again later.")):g(V||[])}catch(V){console.error("Unexpected error fetching events:",V),Y("An unexpected error occurred. Please try again later.")}h(!1)})()},[n,i]);const I=D=>{E.current&&E.current.scrollBy({left:D==="left"?-300:300,behavior:"smooth"})},k=async D=>{var F,$;const V=`https://ourpatch.social/event/${D.id}`;if(navigator.share)try{await navigator.share({title:D.event_title,text:`Check out this event: ${D.event_title} by ${D.organization}`,url:V})}catch{(F=navigator.clipboard)==null||F.writeText(V)}else($=navigator.clipboard)==null||$.writeText(V)};return O.jsxs("div",{className:"relative px-4 py-6 max-w-7xl mx-auto",children:[O.jsxs("div",{className:"flex justify-between items-center mb-4",children:[O.jsx("h2",{className:"text-2xl font-bold",children:t}),O.jsx(Ca,{to:n?`/org/${n}/events`:"/all-events",className:"text-blue-600 hover:underline hover:text-blue-600",children:"See All"})]}),a?O.jsx("p",{className:"text-gray-500",children:"Loading..."}):s?O.jsx("p",{className:"text-red-500",children:s}):m.length===0?O.jsx("p",{className:"text-gray-500",children:"No events available."}):O.jsxs("div",{className:"relative",children:[O.jsx("button",{onClick:()=>I("left"),className:"absolute -left-8 top-1/2 -translate-y-1/2 z-20 text-gray-400 hover:text-gray-600",children:O.jsx("span",{className:"text-8xl font-bold",children:"â¹"})}),O.jsx("div",{ref:E,className:"flex gap-4 overflow-x-auto no-scrollbar scroll-smooth",children:m.map(D=>O.jsxs("div",{className:"min-w-[280px] max-w-[280px] flex-shrink-0 bg-white rounded-2xl shadow-md border p-4 hover:shadow-lg transition-transform",children:[O.jsx("h4",{className:"text-lg font-semibold mb-1",children:D.event_title}),O.jsx("p",{className:"text-gray-800 font-medium",children:D.organization}),O.jsxs("p",{className:"text-gray-600 text-sm",children:[ys(D.start,D.latitude,D.longitude)," â"," ",ys(D.end,D.latitude,D.longitude)]}),D.address&&O.jsx("p",{className:"text-gray-700 text-sm line-clamp-2 mt-1",children:D.address}),O.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[O.jsx(Ca,{to:`/event/${D.id}`,className:"px-3 py-1 bg-green-500 text-white rounded-full text-sm hover:bg-green-600",children:"Details"}),O.jsx("button",{onClick:()=>k(D),className:"px-2 py-1 bg-blue-500 text-white rounded-full text-sm hover:bg-blue-600",children:"Share"})]})]},D.id))}),O.jsx("button",{onClick:()=>I("right"),className:"absolute -right-8 top-1/2 -translate-y-1/2 z-20 text-gray-400 hover:text-gray-600",children:O.jsx("span",{className:"text-8xl font-bold",children:"âº"})})]})]})};function A3({upcomingEvents:n=[],newsItems:t=[]}){return O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"py-4 flex flex-col items-center text-center",children:[O.jsx("h1",{className:"text-5xl font-bold mb-4 text-gray-800",children:"Welcome to"}),O.jsx("img",{src:WR,alt:"Our Patch Logo",className:"h-[300px] w-auto mb-4"}),O.jsxs("p",{className:"text-lg max-w-xl text-gray-600",children:["Connecting the Tallahassee community to environmental events, resources, and news. This is ",O.jsx("span",{className:"text-green-600 font-semibold",children:"Our Patch"}),", we have to work together to keep it beautiful."]})]}),O.jsx("section",{className:"py-0",children:O.jsx("div",{className:"max-w-7xl mx-auto px-4",children:O.jsx(BI,{})})})]})}var Ey={exports:{}};/** 68 * MapLibre GL JS 69 * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.5.0/LICENSE.txt 70 */var k3=Ey.exports,xT;function D3(){return xT||(xT=1,function(n,t){(function(i,a){n.exports=a()})(k3,function(){var i={},a={};function h(g,s,Y){if(a[g]=Y,g==="index"){var E="var sharedModule = {}; ("+a.shared+")(sharedModule); ("+a.worker+")(sharedModule);",I={};return a.shared(I),a.index(i,I),typeof window<"u"&&i.setWorkerUrl(window.URL.createObjectURL(new Blob([E],{type:"text/javascript"}))),i}}h("shared",["exports"],function(g){function s(u,r,l,d){return new(l||(l=Promise))(function(v,b){function S(A){try{U(d.next(A))}catch(X){b(X)}}function W(A){try{U(d.throw(A))}catch(X){b(X)}}function U(A){var X;A.done?v(A.value):(X=A.value,X instanceof l?X:new l(function(Z){Z(X)})).then(S,W)}U((d=d.apply(u,r||[])).next())})}
vendor: 5,054 bytes, line 70
70function Y(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var E,I;function k(){if(I)return E;function u(r,l){this.x=r,this.y=l}return I=1,E=u,u.prototype={clone:function(){return new u(this.x,this.y)},add:function(r){return this.clone()._add(r)},sub:function(r){return this.clone()._sub(r)},multByPoint:function(r){return this.clone()._multByPoint(r)},divByPoint:function(r){return this.clone()._divByPoint(r)},mult:function(r){return this.clone()._mult(r)},div:function(r){return this.clone()._div(r)},rotate:function(r){return this.clone()._rotate(r)},rotateAround:function(r,l){return this.clone()._rotateAround(r,l)},matMult:function(r){return this.clone()._matMult(r)},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(r){return this.x===r.x&&this.y===r.y},dist:function(r){return Math.sqrt(this.distSqr(r))},distSqr:function(r){var l=r.x-this.x,d=r.y-this.y;return l*l+d*d},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(r){return Math.atan2(this.y-r.y,this.x-r.x)},angleWith:function(r){return this.angleWithSep(r.x,r.y)},angleWithSep:function(r,l){return Math.atan2(this.x*l-this.y*r,this.x*r+this.y*l)},_matMult:function(r){var l=r[2]*this.x+r[3]*this.y;return this.x=r[0]*this.x+r[1]*this.y,this.y=l,this},_add:function(r){return this.x+=r.x,this.y+=r.y,this},_sub:function(r){return this.x-=r.x,this.y-=r.y,this},_mult:function(r){return this.x*=r,this.y*=r,this},_div:function(r){return this.x/=r,this.y/=r,this},_multByPoint:function(r){return this.x*=r.x,this.y*=r.y,this},_divByPoint:function(r){return this.x/=r.x,this.y/=r.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var r=this.y;return this.y=this.x,this.x=-r,this},_rotate:function(r){var l=Math.cos(r),d=Math.sin(r),v=d*this.x+l*this.y;return this.x=l*this.x-d*this.y,this.y=v,this},_rotateAround:function(r,l){var d=Math.cos(r),v=Math.sin(r),b=l.y+v*(this.x-l.x)+d*(this.y-l.y);return this.x=l.x+d*(this.x-l.x)-v*(this.y-l.y),this.y=b,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},u.convert=function(r){return r instanceof u?r:Array.isArray(r)?new u(r[0],r[1]):r},E}typeof SuppressedError=="function"&&SuppressedError;var D,V,F=Y(k()),$=function(){if(V)return D;function u(r,l,d,v){this.cx=3*r,this.bx=3*(d-r)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(v-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=r,this.p1y=l,this.p2x=d,this.p2y=v}return V=1,D=u,u.prototype={sampleCurveX:function(r){return((this.ax*r+this.bx)*r+this.cx)*r},sampleCurveY:function(r){return((this.ay*r+this.by)*r+this.cy)*r},sampleCurveDerivativeX:function(r){return(3*this.ax*r+2*this.bx)*r+this.cx},solveCurveX:function(r,l){if(l===void 0&&(l=1e-6),r<0)return 0;if(r>1)return 1;for(var d=r,v=0;v<8;v++){var b=this.sampleCurveX(d)-r;if(Math.abs(b)<l)return d;var S=this.sampleCurveDerivativeX(d);if(Math.abs(S)<1e-6)break;d-=b/S}var W=0,U=1;for(d=r,v=0;v<20&&(b=this.sampleCurveX(d),!(Math.abs(b-r)<l));v++)r>b?W=d:U=d,d=.5*(U-W)+W;return d},solve:function(r,l){return this.sampleCurveY(this.solveCurveX(r,l))}},D}(),Q=Y($);let ae,le;function _e(){return ae==null&&(ae=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),ae}function fe(){if(le==null&&(le=!1,_e())){const r=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(r){for(let d=0;d<5*5;d++){const v=4*d;r.fillStyle=`rgb(${v},${v+1},${v+2})`,r.fillRect(d%5,Math.floor(d/5),1,1)}const l=r.getImageData(0,0,5,5).data;for(let d=0;d<5*5*4;d++)if(d%4!=3&&l[d]!==d){le=!0;break}}}return le||!1}var We=1e-6,se=typeof Float32Array<"u"?Float32Array:Array;function De(){var u=new se(9);return se!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[5]=0,u[6]=0,u[7]=0),u[0]=1,u[4]=1,u[8]=1,u}function ze(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u}function je(){var u=new se(3);return se!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0),u}function ft(u){return Math.hypot(u[0],u[1],u[2])}function ot(u,r,l){var d=new se(3);return d[0]=u,d[1]=r,d[2]=l,d}Math.hypot||(Math.hypot=function(){for(var u=0,r=arguments.length;r--;)u+=arguments[r]*arguments[r];return Math.sqrt(u)});var st,rt=ft;function Re(u,r,l){var d=r[0],v=r[1],b=r[2],S=r[3];return u[0]=l[0]*d+l[4]*v+l[8]*b+l[12]*S,u[1]=l[1]*d+l[5]*v+l[9]*b+l[13]*S,u[2]=l[2]*d+l[6]*v+l[10]*b+l[14]*S,u[3]=l[3]*d+l[7]*v+l[11]*b+l[15]*S,u}function Yt(){var u=new se(4);return se!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0),u[3]=1,u}function Tt(){var u=new se(2);return se!=Float32Array&&(u[0]=0,u[1]=0),u}function _t(u,r){var l=new se(2);return l[0]=u,l[1]=r,l}je(),st=new se(4),se!=Float32Array&&(st[0]=0,st[1]=0,st[2]=0,st[3]=0),je(),ot(1,0,0),ot(0,1,0),Yt(),Yt(),De(),Tt();const Qe=8192;function bt(u,r,l){return r*(Qe/(u.tileSize*Math.pow(2,l-u.tileID.overscaledZ
vendor: 7,204 bytes, line 70
70)))}function xt(u,r){return(u%r+r)%r}function Ue(u,r,l){return u*(1-l)+r*l}function pt(u){if(u<=0)return 0;if(u>=1)return 1;const r=u*u,l=r*u;return 4*(u<.5?l:3*(u-r)+l-.75)}function Ft(u,r,l,d){const v=new Q(u,r,l,d);return b=>v.solve(b)}const Ht=Ft(.25,.1,.25,1);function Gt(u,r,l){return Math.min(l,Math.max(r,u))}function rr(u,r,l){const d=l-r,v=((u-r)%d+d)%d+r;return v===r?l:v}function or(u,...r){for(const l of r)for(const d in l)u[d]=l[d];return u}let fr=1;function Sr(u,r,l){const d={};for(const v in u)d[v]=r.call(this,u[v],v,u);return d}function Er(u,r,l){const d={};for(const v in u)r.call(this,u[v],v,u)&&(d[v]=u[v]);return d}function Gr(u){return Array.isArray(u)?u.map(Gr):typeof u=="object"&&u?Sr(u,Gr):u}const Wn={};function pn(u){Wn[u]||(typeof console<"u"&&console.warn(u),Wn[u]=!0)}function Yr(u,r,l){return(l.y-u.y)*(r.x-u.x)>(r.y-u.y)*(l.x-u.x)}function xr(u){return typeof WorkerGlobalScope<"u"&&u!==void 0&&u instanceof WorkerGlobalScope}let ri=null;function hr(u){return typeof ImageBitmap<"u"&&u instanceof ImageBitmap}const _i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ui(u,r,l,d,v){return s(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const b=new VideoFrame(u,{timestamp:0});try{const S=b==null?void 0:b.format;if(!S||!S.startsWith("BGR")&&!S.startsWith("RGB"))throw new Error(`Unrecognized format ${S}`);const W=S.startsWith("BGR"),U=new Uint8ClampedArray(d*v*4);if(yield b.copyTo(U,function(A,X,Z,G,H){const J=4*Math.max(1,0),te=(Math.max(0,Z)-Z)*G*4+J,ce=4*G,ve=Math.max(0,X),Ae=Math.max(0,Z);return{rect:{x:ve,y:Ae,width:Math.min(A.width,X+G)-ve,height:Math.min(A.height,Z+H)-Ae},layout:[{offset:te,stride:ce}]}}(u,r,l,d,v)),W)for(let A=0;A<U.length;A+=4){const X=U[A];U[A]=U[A+2],U[A+2]=X}return U}finally{b.close()}})}let Qr,an;function Jr(u,r,l,d){return u.addEventListener(r,l,d),{unsubscribe:()=>{u.removeEventListener(r,l,d)}}}function Fr(u){return u*Math.PI/180}function In(u){return u/Math.PI*180}const ni={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Rn={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},bn="AbortError";function mn(){return new Error(bn)}const xi={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function bi(u){return xi.REGISTERED_PROTOCOLS[u.substring(0,u.indexOf("://"))]}const Ln="global-dispatcher";class ci extends Error{constructor(r,l,d,v){super(`AJAXError: ${l} (${r}): ${d}`),this.status=r,this.statusText=l,this.url=d,this.body=v}}const sn=()=>xr(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Un=function(u,r){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const d=bi(u.url);if(d)return d(u,r);if(xr(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:Ln},r)}if(!(/^file:/.test(l=u.url)||/^file:/.test(sn())&&!/^\w+:/.test(l))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(d,v){return s(this,void 0,void 0,function*(){const b=new Request(d.url,{method:d.method||"GET",body:d.body,credentials:d.credentials,headers:d.headers,cache:d.cache,referrer:sn(),signal:v.signal});let S,W;d.type!=="json"||b.headers.has("Accept")||b.headers.set("Accept","application/json");try{S=yield fetch(b)}catch(A){throw new ci(0,A.message,d.url,new Blob)}if(!S.ok){const A=yield S.blob();throw new ci(S.status,S.statusText,d.url,A)}W=d.type==="arrayBuffer"||d.type==="image"?S.arrayBuffer():d.type==="json"?S.json():S.text();const U=yield W;if(v.signal.aborted)throw mn();return{data:U,cacheControl:S.headers.get("Cache-Control"),expires:S.headers.get("Expires")}})}(u,r);if(xr(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:Ln},r)}var l;return function(d,v){return new Promise((b,S)=>{var W;const U=new XMLHttpRequest;U.open(d.method||"GET",d.url,!0),d.type!=="arrayBuffer"&&d.type!=="image"||(U.responseType="arraybuffer");for(const A in d.headers)U.setRequestHeader(A,d.headers[A]);d.type==="json"&&(U.responseType="text",!((W=d.headers)===null||W===void 0)&&W.Accept||U.setRequestHeader("Accept","application/json")),U.withCredentials=d.credentials==="include",U.onerror=()=>{S(new Error(U.statusText))},U.onload=()=>{if(!v.signal.aborted)if((U.status>=200&&U.status<300||U.status===0)&&U.response!==null){let A=U.response;if(d.type==="json")try{A=JSON.parse(U.response)}catch(X){return void S(X)}b({data:A,cacheControl:U.getResponseHeader("Cache-Control"),expires:U.getResponseHeader("Expires")})}else{const A=new Blob([U.response],{type:U.getResponseHeader("Content-Type")});S(new ci(U.status,U.statusText,d.url,A))}},v.signal.addEventListener("abort",()=>{U.abort(),S(mn())}),U.send(d.body)})}(u,r)};function Fe(u){if(!u||u.indexOf("://")<=0||u.indexOf("data:image/")===0||u.indexOf("blob:")===0)return!0;const r=new URL(u),l=window.location;return r.protocol===l.protocol&&r.host===l.host}function ne(u,r,l){l[u]&&l[u].indexOf(r)!==-1||(l[u]=l[u]||[],l[u].push(r))}function ie(u,r,l){if(l&&l[u]){const d=l[u].indexOf(r);d!==-1&&l[u].splice(d,1)}}class he{constructor(r,l={}){or(this,l),this.type=r}}class we extends he{constructor(r,l={}){super("error",or({error:r},l))}}class Ve{on(r,l){return this._listeners=this._listeners||{},ne(r,l,this._listeners),{unsubscribe:()=>{this.off(r,l)}}}off(r,l){return ie(r,l,this._listeners),ie(r,l,this._oneTimeListeners),this}once(r,l){return l?(this._oneTimeListeners=this._oneTimeListeners||{},ne(r,l,this._oneTimeListeners),this):new Promise(d=>this.once(r,d))}fire(r,l){typeof r=="string"&&(r=new he(r,l||{}));const d=r.type;if(this.listens(d)){r.target=this;const v=this._listeners&&this._listeners[d]?this._listeners[d].slice():[];for(const W of v)W.call(this,r);const b=this._oneTimeListeners&&this._oneTimeListeners[d]?this._oneTimeListeners[d].slice():[];for(const W of b)ie(d,W,this._oneTimeListeners),W.call(this,r);const S=this._eventedParent;S&&(or(r,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),S.fire(r))}else r instanceof we&&console.error(r.error);return this}listens(r){return this._listeners&&this._listeners[r]&&this._listeners[r].length>0||this._oneTimeListeners&&this._oneTimeListeners[r]&&this._oneTimeListeners[r].length>0||this._eventedParent&&this._eventedParent.listens(r)}setEventedParent(r,l){return this._eventedParent=r,this._eventedParentData=l,this}}var ue={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection
vendor: 7,595 bytes, line 70
70"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,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"}
vendor: 4,312 bytes, line 70
70,"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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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"}
vendor: 8,954 bytes, line 70
70,"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":{}}},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},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"}
vendor: 7,960 bytes, line 70
70,"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
70Array",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,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:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",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"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,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"}}};const $e=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Le(u,r){const l={};for(const d in u)d!=="ref"&&(l[d]=u[d]);return $e.forEach(d=>
vendor: 17,639 bytes, line 70
70{d in r&&(l[d]=r[d])}),l}function Be(u,r){if(Array.isArray(u)){if(!Array.isArray(r)||u.length!==r.length)return!1;for(let l=0;l<u.length;l++)if(!Be(u[l],r[l]))return!1;return!0}if(typeof u=="object"&&u!==null&&r!==null){if(typeof r!="object"||Object.keys(u).length!==Object.keys(r).length)return!1;for(const l in u)if(!Be(u[l],r[l]))return!1;return!0}return u===r}function tt(u,r){u.push(r)}function Ze(u,r,l){tt(l,{command:"addSource",args:[u,r[u]]})}function vt(u,r,l){tt(r,{command:"removeSource",args:[u]}),l[u]=!0}function ge(u,r,l,d){vt(u,l,d),Ze(u,r,l)}function Te(u,r,l){let d;for(d in u[l])if(Object.prototype.hasOwnProperty.call(u[l],d)&&d!=="data"&&!Be(u[l][d],r[l][d]))return!1;for(d in r[l])if(Object.prototype.hasOwnProperty.call(r[l],d)&&d!=="data"&&!Be(u[l][d],r[l][d]))return!1;return!0}function Oe(u,r,l,d,v,b){u=u||{},r=r||{};for(const S in u)Object.prototype.hasOwnProperty.call(u,S)&&(Be(u[S],r[S])||l.push({command:b,args:[d,S,r[S],v]}));for(const S in r)Object.prototype.hasOwnProperty.call(r,S)&&!Object.prototype.hasOwnProperty.call(u,S)&&(Be(u[S],r[S])||l.push({command:b,args:[d,S,r[S],v]}))}function ht(u){return u.id}function gt(u,r){return u[r.id]=r,u}class Xe{constructor(r,l,d,v){this.message=(r?`${r}: `:"")+d,v&&(this.identifier=v),l!=null&&l.__line__&&(this.line=l.__line__)}}function Ot(u,...r){for(const l of r)for(const d in l)u[d]=l[d];return u}class Mt extends Error{constructor(r,l){super(l),this.message=l,this.key=r}}class Dt{constructor(r,l=[]){this.parent=r,this.bindings={};for(const[d,v]of l)this.bindings[d]=v}concat(r){return new Dt(this,r)}get(r){if(this.bindings[r])return this.bindings[r];if(this.parent)return this.parent.get(r);throw new Error(`${r} not found in scope.`)}has(r){return!!this.bindings[r]||!!this.parent&&this.parent.has(r)}}const Et={kind:"null"},He={kind:"number"},Wt={kind:"string"},Lt={kind:"boolean"},sr={kind:"color"},vr={kind:"projectionDefinition"},Zr={kind:"object"},nr={kind:"value"},Tr={kind:"collator"},ka={kind:"formatted"},Ci={kind:"padding"},Da={kind:"colorArray"},Cn={kind:"numberArray"},ba={kind:"resolvedImage"},gr={kind:"variableAnchorOffsetCollection"};function wi(u,r){return{kind:"array",itemType:u,N:r}}function Rr(u){if(u.kind==="array"){const r=Rr(u.itemType);return typeof u.N=="number"?`array<${r}, ${u.N}>`:u.itemType.kind==="value"?"array":`array<${r}>`}return u.kind}const rs=[Et,He,Wt,Lt,sr,vr,ka,Zr,wi(nr),Ci,Cn,Da,ba,gr];function Pr(u,r){if(r.kind==="error")return null;if(u.kind==="array"){if(r.kind==="array"&&(r.N===0&&r.itemType.kind==="value"||!Pr(u.itemType,r.itemType))&&(typeof u.N!="number"||u.N===r.N))return null}else{if(u.kind===r.kind)return null;if(u.kind==="value"){for(const l of rs)if(!Pr(l,r))return null}}return`Expected ${Rr(u)} but found ${Rr(r)} instead.`}function Vi(u,r){return r.some(l=>l.kind===u.kind)}function Yi(u,r){return r.some(l=>l==="null"?u===null:l==="array"?Array.isArray(u):l==="object"?u&&!Array.isArray(u)&&typeof u=="object":l===typeof u)}function Si(u,r){return u.kind==="array"&&r.kind==="array"?u.itemType.kind===r.itemType.kind&&typeof u.N=="number":u.kind===r.kind}const Bi=.96422,wn=.82521,ii=4/29,zs=6/29,hc=3*zs*zs,Tp=zs*zs*zs,dc=Math.PI/180,fc=180/Math.PI;function Cl(u){return(u%=360)<0&&(u+=360),u}function Vl([u,r,l,d]){let v,b;const S=Th((.2225045*(u=$o(u))+.7168786*(r=$o(r))+.0606169*(l=$o(l)))/1);u===r&&r===l?v=b=S:(v=Th((.4360747*u+.3850649*r+.1430804*l)/Bi),b=Th((.0139322*u+.0971045*r+.7141733*l)/wn));const W=116*S-16;return[W<0?0:W,500*(v-S),200*(S-b),d]}function $o(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function Th(u){return u>Tp?Math.pow(u,1/3):u/hc+ii}function pc([u,r,l,d]){let v=(u+16)/116,b=isNaN(r)?v:v+r/500,S=isNaN(l)?v:v-l/200;return v=1*wu(v),b=Bi*wu(b),S=wn*wu(S),[uo(3.1338561*b-1.6168667*v-.4906146*S),uo(-.9787684*b+1.9161415*v+.033454*S),uo(.0719453*b-.2289914*v+1.4052427*S),d]}function uo(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function wu(u){return u>zs?u*u*u:hc*(u-ii)}const Yu=Object.hasOwn||function(u,r){return Object.prototype.hasOwnProperty.call(u,r)};function Su(u,r){return Yu(u,r)?u[r]:void 0}function Go(u){return parseInt(u.padEnd(2,u),16)/255}function qr(u,r){return Ai(r?u/100:u,0,1)}function Ai(u,r,l){return Math.min(Math.max(r,u),l)}function Cr(u){return!u.some(Number.isNaN)}const co={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function ki(u,r,l){return u+l*(r-u)}function ho(u,r,l){return u.map((d,v)=>ki(d,r[v],l))}class Mr{constructor(r,l,d,v=1,b=!0){this.r=r,this.g=l,this.b=d,this.a=v,b||(this.r*=v,this.g*=v,this.b*=v,v||this.overwriteGetter("rgb",[r,l,d,v]))}static parse(r){if(r instanceof Mr)return r;if(typeof r!="string")return;const l=function(d){if((d=d.toLowerCase().trim())==="transparent")return[0,0,0,0];const v=Su(co,d);if(v){const[S,W,U]=v;return[S/255,W/255,U/255,1]}if(d.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(d)){const S=d.length<6?1:2;let W=1;return[Go(d.slice(W,W+=S)),Go(d.slice(W,W+=S)),Go(d.slice(W,W+=S)),Go(d.slice(W,W+S)||"ff")]}if(d.startsWith("rgb")){const S=d.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(S){const[W,U,A,X,Z,G,H,J,te,ce,ve,Ae]=S,Ye=[X||" ",H||" ",ce].join("");if(Ye===" "||Ye===" /"||Ye===",,"||Ye===",,,"){const q=[A,G,te].join(""),oe=q==="%%%"?100:q===""?255:0;if(oe){const Me=[Ai(+U/oe,0,1),Ai(+Z/oe,0,1),Ai(+J/oe,0,1),ve?qr(+ve,Ae):1];if(Cr(Me))return Me}}return}}const b=d.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(b){const[S,W,U,A,X,Z,G,H,J]=b,te=[U||" ",X||" ",G].join("");if(te===" "||te===" /"||te===",,"||te===",,,"){const ce=[+W,Ai(+A,0,100),Ai(+Z,0,100),H?qr(+H,J):1];if(Cr(ce))return function([ve,Ae,Ye,q]){function oe(Me){const et=(Me+ve/30)%12,wt=Ae*Math.min(Ye,1-Ye);return Ye-wt*Math.max(-1,Math.min(et-3,9-et,1))}return ve=Cl(ve),Ae/=100,Ye/=100,[oe(0),oe(8),oe(4),q]}(ce)}}}(r);return l?new Mr(...l,!1):void 0}get rgb(){const{r,g:l,b:d,a:v}=this,b=v||1/0;return this.overwriteGetter("rgb",[r/b,l/b,d/b,v])}get hcl(){return this.overwriteGetter("hcl",function(r){const[l,d,v,b]=Vl(r),S=Math.sqrt(d*d+v*v);return[Math.round(1e4*S)?Cl(Math.atan2(v,d)*fc):NaN,S,l,b]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Vl(this.rgb))}overwriteGetter(r,l){return Object.defineProperty(this,r,{value:l}),l}toString(){const[r,l,d,v]=this.rgb;return`rgba(${[r,l,d].map(b=>Math.round(255*b)).join(",")},${v})`}static interpolate(r,l,d,v="rgb"){switch(v){case"rgb":{const[b,S,W,U]=ho(r.rgb,l.rgb,d);return new Mr(b,S,W,U,!1)}case"hcl":{const[b,S,W,U]=r.hcl,[A,X,Z,G]=l.hcl;let H,J;if(isNaN(b)||isNaN(A))isNaN(b)?isNaN(A)?H=NaN:(H=A,W!==1&&W!==0||(J=X)):(H=b,Z!==1&&Z!==0||(J=S));else{let Ye=A-b;A>b&&Ye>180?Ye-=360:A<b&&b-A>180&&(Ye+=360),H=b+d*Ye}const[te,ce,ve,Ae]=function([Ye,q,oe,Me]){return Ye=isNaN(Ye)?0:Ye*dc,pc([oe,Math.cos(Ye)*q,Math.sin(Ye)*q,Me])}([H,J??ki(S,X,d),ki(W,Z,d),ki(U,G,d)]);return new Mr(te,ce,ve,Ae,!1)}case"lab":{const[b,S,W,U]=pc(ho(r.lab,l.lab,d));return new Mr(b,S,W,U,!1)}}}}Mr.black=new Mr(0,0,0,1),Mr.white=new Mr(1,1,1,1),Mr.transparent=new Mr(0,0,0,0),Mr.red=new Mr(1,0,0,1);class qo{constructor(r,l,d){this.sensitivity=r?l?"variant":"case":l?"accent":"base",this.locale=d,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(r,l){return this.collator.compare(r,l)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const fo=["bottom","center","top"];class wa{constructor(r,l,d,v,b,S){this.text=r,this.image=l,this.scale=d,this.fontStack=v,this.textColor=b,this.verticalAlign=S}}class On{constructor(r){this.sections=r}static fromString(r){return new On([new wa(r,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(r=>r.text.length!==0||r.image&&r.image.name.length!==0)}static factory(r){return r instanceof On?r:On.fromString(r)}toString(){return this.sections.length===0?"":this.sections.map(r=>r.text).join("")}}class Yn{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof Yn)return r;if(typeof r=="number")return new Yn([r,r,r,r]);if(Array.isArray(r)&&!(r.length<1||r.length>4)){for(const l of r)if(typeof l!="number")return;switch(r.length){case 1:r=[r[0],r[0],r[0],r[0]];break;case 2:r=[r[0],r[1],r[0],r[1]];break;case 3:r=[r[0],r[1],r[2],r[1]]}return new Yn(r)}}toString(){return JSON.stringify(this.values)}static interpolate(r,l,d){return new Yn(ho(r.values,l.values,d))}}class gn{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof gn)return r;if(typeof r=="number")return new gn([r]);if(Array.isArray(r)){for(const l of r)if(typeof l!="number")return;return new gn(r)}}toString(){return JSON.stringify(this.values)}static interpolate(r,l,d){return new gn(ho(r.values,l.values,d))}}class Xn{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof Xn)return r;if(typeof r=="string"){const d=Mr.parse(r);return d?new Xn([d]):void 0}if(!Array.isArray(r))return;const l=[];for(const d of r){if(typeof d!="string")return;const v=Mr.parse(d);if(!v)return;l.push(v)}return new Xn(l)}toString(){return JSON.stringify(this.values)}static interpolate(r,l,d,v="rgb"){const b=[];if(r.values.length!=l.values.length)throw new Error(`colorArray: Arrays have mismatched length (${r.values.length} vs. ${l.values.length}), cannot interpolate.`);for(let S=0;S<r.values.length;S++)b.push(Mr.interpolate(r.values[S],l.values[S],d,v));return new Xn(b)}}class zr extends Error{constructor(r){super(r),this.name="RuntimeError"}toJSON(){return this.message}}const Al=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Di{constructor(r){this.values=r.slice()}static parse(r){if(r instanceof Di)return r;if(Array.isArray(r)&&!(r.length<1)&&r.length%2==0){for(let l=0;l<r.length;l+=2){const d=r[l],v=r[l+1];if(typeof d!="string"||!Al.has(d)||!Array.isArray(v)||v.length!==2||typeof v[0]!="number"||typeof v[1]!="number")return}return new Di(r)}}toString(){return JSON.stringify(this.values)}static interpolate(r,l,d){const v=r.values,b=l.values;if(v.length!==b.length)throw new zr(`Cannot interpolate values of different length. from: ${r.toString()}, to: ${l.toString()}`);const S=[];for(let W=0;W<v.length;W+=2){if(v[W]!==b[W])throw new zr(`Cannot interpolate values containing mismatched anchors. from[${W}]: ${v[W]}, to[${W}]: ${b[W]}`);S.push(v[W]);const[U,A]=v[W+1],[X,Z]=b[W+1];S.push([ki(U,X,d),ki(A,Z,d)])}return new Di(S)}}class Ti{constructor(r){this.name=r.name,this.available=r.available}toString(){return this.name}static fromString(r){return r?new Ti({name:r,available:!1}):null}}class aa{constructor(r,l,d){this.from=r,this.to=l,this.transition=d}static interpolate(r,l,d){return new aa(r,l,d)}static parse(r){return r instanceof aa?r:Array.isArray(r)&&r.length===3&&typeof r[0]=="string"&&typeof r[1]=="string"&&typeof r[2]=="number"?new aa(r[0],r[1],r[2]):typeof r=="object"&&typeof r.from=="string"&&typeof r.to=="string"&&typeof r.transition=="number"?new aa(r.from,r.to,r.transition):typeof r=="string"?new aa(r,r,1):void 0}}function kl(u,r,l,d){return typeof u=="number"&&u>=0&&u<=255&&typeof r=="number"&&r>=0&&r<=255&&typeof l=="number"&&l>=0&&l<=255?d===void 0||typeof d=="number"&&d>=0&&d<=1?null:`Invalid rgba value [${[u,r,l,d].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof d=="number"?[u,r,l,d]:[u,r,l]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function jr(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof aa||u instanceof Mr||u instanceof qo||u instanceof On||u instanceof Yn||u instanceof gn||u instanceof Xn||u instanceof Di||u instanceof Ti)return!0;if(Array.isArray(u)){for(const r of u)if(!jr(r))return!1;return!0}if(typeof u=="object"){for(const r in u)if(!jr(u[r]))return!1;return!0}return!1}function Sn(u){if(u===null)return Et;if(typeof u=="string")return Wt;if(typeof u=="boolean")return Lt;if(typeof u=="number")return He;if(u instanceof Mr)return sr;if(u instanceof aa)return vr;if(u instanceof qo)return Tr;if(u instanceof On)return ka;if(u instanceof Yn)return Ci;if(u instanceof gn)return Cn;if(u instanceof Xn)return Da;if(u instanceof Di)return gr;if(u instanceof Ti)return ba;if(Array.isArray(u)){const r=u.length;let l;for(const d of u){const v=Sn(d);if(l){if(l===v)continue;l=nr;break}l=v}return wi(l||nr,r)}return Zr}function Ir(u){const r=typeof u;return u===null?"":r==="string"||r==="number"||r==="boolean"?String(u):u instanceof Mr||u instanceof aa||u instanceof On||u instanceof Yn||u instanceof gn||u instanceof Xn||u instanceof Di||u instanceof Ti?u.toString():JSON.stringify(u)}class ur{constructor(r,l){this.type=r,this.value=l}static parse(r,l){if(r.length!==2)return l.error(`'literal' expression requires exactly one argument, but found ${r.length-1} instead.`);if(!jr(r[1]))return l.error("invalid value");const d=r[1];let v=Sn(d);const b=l.expectedType;return v.kind!=="array"||v.N!==0||!b||b.kind!=="array"||typeof b.N=="number"&&b.N!==0||(v=b),new ur(v,d)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const xs={string:Wt,number:He,boolean:Lt,object:Zr};class dr{constructor(r,l){this.type=r,this.args=l}static parse(r,l){if(r.length<2)return l.error("Expected at least one argument.");let d,v=1;const b=r[0];if(b==="array"){let W,U;if(r.length>2){const A=r[1];if(typeof A!="string"||!(A in xs)||A==="object")return l.error('The item type argument of "array" must be one of string, number, boolean',1);W=xs[A],v++}else W=nr;if(r.length>3){if(r[2]!==null&&(typeof r[2]!="number"||r[2]<0||r[2]!==Math.floor(r[2])))return l.error('The length argument to "array" must be a positive integer literal',2);U=r[2],v++}d=wi(W,U)}else{if(!xs[b])throw new Error(`Types doesn't contain name = ${b}`);d=xs[b]}const S=[];for(;v<r.length;v++){const W=l.parse(r[v],v,nr);if(!W)return null;S.push(W)}return new dr(d,S)}evaluate(r){for(let l=0;l<this.args.length;l++){const d=this.args[l].evaluate(r);if(!Pr(this.type,Sn(d)))return d;if(l===this.args.length-1)throw new zr(`Expected value to be of type ${Rr(this.t
70ype)}, but found ${Rr(Sn(d))} instead.`)}throw new Error}eachChild(r){this.args.forEach(r)}outputDefined(){return this.args.every(r=>r.outputDefined())}}const Ho={"to-boolean":Lt,"to-color":sr,"to-number":He,"to-string":Wt};class Ri{constructor(r,l){this.type=r,this.args=l}static parse(r,l){if(r.length<2)return l.error("Expected at least one argument.");const d=r[0];if(!Ho[d])throw new Error(`Can't parse ${d} as it is not part of the known types`);if((d==="to-boolean"||d==="to-string")&&r.length!==2)return l.error("Expected one argument.");const v=Ho[d],b=[];for(let S=1;S<r.length;S++){const W=l.parse(r[S],S,nr);if(!W)return null;b.push(W)}return new Ri(v,b)}evaluate(r){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(r);case"color":{let l,d;for(const v of this.args){if(l=v.evaluate(r),d=null,l instanceof Mr)return l;if(typeof l=="string"){const b=r.parseColor(l);if(b)return b}else if(Array.isArray(l)&&(d=l.length<3||l.length>4?`Invalid rgba value ${JSON.stringify(l)}: expected an array containing either three or four numeric values.`:kl(l[0],l[1],l[2],l[3]),!d))return new Mr(l[0]/255,l[1]/255,l[2]/255,l[3])}throw new zr(d||`Could not parse color from value '${typeof l=="string"?l:JSON.stringify(l)}'`)}case"padding":{let l;for(const d of this.args){l=d.evaluate(r);const v=Yn.parse(l);if(v)return v}throw new zr(`Could not parse padding from value '${typeof l=="string"?l:JSON.stringify(l)}'`)}case"numberArray":{let l;for(const d of this.args){l=d.evaluate(r);const v=gn.parse(l);if(v)return v}throw new zr(`Could not parse numberArray from value '${typeof l=="string"?l:JSON.stringify(l)}'`)}case"colorArray":{let l;for(const d of this.args){l=d.evaluate(r);const v=Xn.parse(l);if(v)return v}throw new zr(`Could not parse colorArray from value '${typeof l=="string"?l:JSON.stringify(l)}'`)}case"variableAnchorOffsetCollection":{let l;for(const d of this.args){l=d.evaluate(r);const v=Di.parse(l);if(v)return v}throw new zr(`Could not parse variableAnchorOffsetCollection from value '${typeof l=="string"?l:JSON.stringify(l)}'`)}case"number":{let l=null;for(const d of this.args){if(l=d.evaluate(r),l===null)return 0;const v=Number(l);if(!isNaN(v))return v}throw new zr(`Could not convert ${JSON.stringify(l)} to number.`)}case"formatted":return On.fromString(Ir(this.args[0].evaluate(r)));case"resolvedImage":return Ti.fromString(Ir(this.args[0].evaluate(r)));case"projectionDefinition":return this.args[0].evaluate(r);default:return Ir(this.args[0].evaluate(r))}}eachChild(r){this.args.forEach(r)}outputDefined(){return this.args.every(r=>r.outputDefined())}}const Wh=["Unknown","Point","LineString","Polygon"];class Tu{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,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"?Wh[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(r){let l=this._parseColorCache.get(r);return l||(l=Mr.parse(r),this._parseColorCache.set(r,l)),l}}class po{constructor(r,l,d=[],v,b=new Dt,S=[]){this.registry=r,this.path=d,this.key=d.map(W=>`[${W}]`).join(""),this.scope=b,this.errors=S,this.expectedType=v,this._isConstant=l}parse(r,l,d,v,b={}){return l?this.concat(l,d,v)._parse(r,b):this._parse(r,b)}_parse(r,l){function d(v,b,S){return S==="assert"?new dr(b,[v]):S==="coerce"?new Ri(b,[v]):v}if(r!==null&&typeof r!="string"&&typeof r!="boolean"&&typeof r!="number"||(r=["literal",r]),Array.isArray(r)){if(r.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const v=r[0];if(typeof v!="string")return this.error(`Expression name must be a string, but found ${typeof v} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const b=this.registry[v];if(b){let S=b.parse(r,this);if(!S)return null;if(this.expectedType){const W=this.expectedType,U=S.type;if(W.kind!=="string"&&W.kind!=="number"&&W.kind!=="boolean"&&W.kind!=="object"&&W.kind!=="array"||U.kind!=="value"){if(W.kind==="projectionDefinition"&&["string","array"].includes(U.kind)||["color","formatted","resolvedImage"].includes(W.kind)&&["value","string"].includes(U.kind)||["padding","numberArray"].includes(W.kind)&&["value","number","array"].includes(U.kind)||W.kind==="colorArray"&&["value","string","array"].includes(U.kind)||W.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(U.kind))S=d(S,W,l.typeAnnotation||"coerce");else if(this.checkSubtype(W,U))return null}else S=d(S,W,l.typeAnnotation||"assert")}if(!(S instanceof ur)&&S.type.kind!=="resolvedImage"&&this._isConstant(S)){const W=new Tu;try{S=new ur(S.type,S.evaluate(W))}catch(U){return this.error(U.message),null}}return S}return this.error(`Unknown expression "${v}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(r===void 0?"'undefined' value invalid. Use null instead.":typeof r=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof r} instead.`)}concat(r,l,d){const v=typeof r=="number"?this.path.concat(r):this.path,b=d?this.scope.concat(d):this.scope;return new po(this.registry,this._isConstant,v,l||null,b,this.errors)}error(r,...l){const d=`${this.key}${l.map(v=>`[${v}]`).join("")}`;this.errors.push(new Mt(d,r))}checkSubtype(r,l){const d=Pr(r,l);return d&&this.error(d),d}}class mo{constructor(r,l){this.type=l.type,this.bindings=[].concat(r),this.result=l}evaluate(r){return this.result.evaluate(r)}eachChild(r){for(const l of this.bindings)r(l[1]);r(this.result)}static parse(r,l){if(r.length<4)return l.error(`Expected at least 3 arguments, but found ${r.length-1} instead.`);const d=[];for(let b=1;b<r.length-1;b+=2){const S=r[b];
vendor: 53,485 bytes, line 70
70if(typeof S!="string")return l.error(`Expected string, but found ${typeof S} instead.`,b);if(/[^a-zA-Z0-9_]/.test(S))return l.error("Variable names must contain only alphanumeric characters or '_'.",b);const W=l.parse(r[b+1],b+1);if(!W)return null;d.push([S,W])}const v=l.parse(r[r.length-1],r.length-1,l.expectedType,d);return v?new mo(d,v):null}outputDefined(){return this.result.outputDefined()}}class Dl{constructor(r,l){this.type=l.type,this.name=r,this.boundExpression=l}static parse(r,l){if(r.length!==2||typeof r[1]!="string")return l.error("'var' expression requires exactly one string literal argument.");const d=r[1];return l.scope.has(d)?new Dl(d,l.scope.get(d)):l.error(`Unknown variable "${d}". Make sure "${d}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(r){return this.boundExpression.evaluate(r)}eachChild(){}outputDefined(){return!1}}class bs{constructor(r,l,d){this.type=r,this.index=l,this.input=d}static parse(r,l){if(r.length!==3)return l.error(`Expected 2 arguments, but found ${r.length-1} instead.`);const d=l.parse(r[1],1,He),v=l.parse(r[2],2,wi(l.expectedType||nr));return d&&v?new bs(v.type.itemType,d,v):null}evaluate(r){const l=this.index.evaluate(r),d=this.input.evaluate(r);if(l<0)throw new zr(`Array index out of bounds: ${l} < 0.`);if(l>=d.length)throw new zr(`Array index out of bounds: ${l} > ${d.length-1}.`);if(l!==Math.floor(l))throw new zr(`Array index must be an integer, but found ${l} instead.`);return d[l]}eachChild(r){r(this.index),r(this.input)}outputDefined(){return!1}}class Rl{constructor(r,l){this.type=Lt,this.needle=r,this.haystack=l}static parse(r,l){if(r.length!==3)return l.error(`Expected 2 arguments, but found ${r.length-1} instead.`);const d=l.parse(r[1],1,nr),v=l.parse(r[2],2,nr);return d&&v?Vi(d.type,[Lt,Wt,He,Et,nr])?new Rl(d,v):l.error(`Expected first argument to be of type boolean, string, number or null, but found ${Rr(d.type)} instead`):null}evaluate(r){const l=this.needle.evaluate(r),d=this.haystack.evaluate(r);if(!d)return!1;if(!Yi(l,["boolean","string","number","null"]))throw new zr(`Expected first argument to be of type boolean, string, number or null, but found ${Rr(Sn(l))} instead.`);if(!Yi(d,["string","array"]))throw new zr(`Expected second argument to be of type array or string, but found ${Rr(Sn(d))} instead.`);return d.indexOf(l)>=0}eachChild(r){r(this.needle),r(this.haystack)}outputDefined(){return!0}}class go{constructor(r,l,d){this.type=He,this.needle=r,this.haystack=l,this.fromIndex=d}static parse(r,l){if(r.length<=2||r.length>=5)return l.error(`Expected 3 or 4 arguments, but found ${r.length-1} instead.`);const d=l.parse(r[1],1,nr),v=l.parse(r[2],2,nr);if(!d||!v)return null;if(!Vi(d.type,[Lt,Wt,He,Et,nr]))return l.error(`Expected first argument to be of type boolean, string, number or null, but found ${Rr(d.type)} instead`);if(r.length===4){const b=l.parse(r[3],3,He);return b?new go(d,v,b):null}return new go(d,v)}evaluate(r){const l=this.needle.evaluate(r),d=this.haystack.evaluate(r);if(!Yi(l,["boolean","string","number","null"]))throw new zr(`Expected first argument to be of type boolean, string, number or null, but found ${Rr(Sn(l))} instead.`);let v;if(this.fromIndex&&(v=this.fromIndex.evaluate(r)),Yi(d,["string"])){const b=d.indexOf(l,v);return b===-1?-1:[...d.slice(0,b)].length}if(Yi(d,["array"]))return d.indexOf(l,v);throw new zr(`Expected second argument to be of type array or string, but found ${Rr(Sn(d))} instead.`)}eachChild(r){r(this.needle),r(this.haystack),this.fromIndex&&r(this.fromIndex)}outputDefined(){return!1}}class yo{constructor(r,l,d,v,b,S){this.inputType=r,this.type=l,this.input=d,this.cases=v,this.outputs=b,this.otherwise=S}static parse(r,l){if(r.length<5)return l.error(`Expected at least 4 arguments, but found only ${r.length-1}.`);if(r.length%2!=1)return l.error("Expected an even number of arguments.");let d,v;l.expectedType&&l.expectedType.kind!=="value"&&(v=l.expectedType);const b={},S=[];for(let A=2;A<r.length-1;A+=2){let X=r[A];const Z=r[A+1];Array.isArray(X)||(X=[X]);const G=l.concat(A);if(X.length===0)return G.error("Expected at least one branch label.");for(const J of X){if(typeof J!="number"&&typeof J!="string")return G.error("Branch labels must be numbers or strings.");if(typeof J=="number"&&Math.abs(J)>Number.MAX_SAFE_INTEGER)return G.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof J=="number"&&Math.floor(J)!==J)return G.error("Numeric branch labels must be integer values.");if(d){if(G.checkSubtype(d,Sn(J)))return null}else d=Sn(J);if(b[String(J)]!==void 0)return G.error("Branch labels must be unique.");b[String(J)]=S.length}const H=l.parse(Z,A,v);if(!H)return null;v=v||H.type,S.push(H)}const W=l.parse(r[1],1,nr);if(!W)return null;const U=l.parse(r[r.length-1],r.length-1,v);return U?W.type.kind!=="value"&&l.concat(1).checkSubtype(d,W.type)?null:new yo(d,v,W,b,S,U):null}evaluate(r){const l=this.input.evaluate(r);return(Sn(l)===this.inputType&&this.outputs[this.cases[l]]||this.otherwise).evaluate(r)}eachChild(r){r(this.input),this.outputs.forEach(r),r(this.otherwise)}outputDefined(){return this.outputs.every(r=>r.outputDefined())&&this.otherwise.outputDefined()}}class Nn{constructor(r,l,d){this.type=r,this.branches=l,this.otherwise=d}static parse(r,l){if(r.length<4)return l.error(`Expected at least 3 arguments, but found only ${r.length-1}.`);if(r.length%2!=0)return l.error("Expected an odd number of arguments.");let d;l.expectedType&&l.expectedType.kind!=="value"&&(d=l.expectedType);const v=[];for(let S=1;S<r.length-1;S+=2){const W=l.parse(r[S],S,Lt);if(!W)return null;const U=l.parse(r[S+1],S+1,d);if(!U)return null;v.push([W,U]),d=d||U.type}const b=l.parse(r[r.length-1],r.length-1,d);if(!b)return null;if(!d)throw new Error("Can't infer output type");return new Nn(d,v,b)}evaluate(r){for(const[l,d]of this.branches)if(l.evaluate(r))return d.evaluate(r);return this.otherwise.evaluate(r)}eachChild(r){for(const[l,d]of this.branches)r(l),r(d);r(this.otherwise)}outputDefined(){return this.branches.every(([r,l])=>l.outputDefined())&&this.otherwise.outputDefined()}}class ws{constructor(r,l,d,v){this.type=r,this.input=l,this.beginIndex=d,this.endIndex=v}static parse(r,l){if(r.length<=2||r.length>=5)return l.error(`Expected 3 or 4 arguments, but found ${r.length-1} instead.`);const d=l.parse(r[1],1,nr),v=l.parse(r[2],2,He);if(!d||!v)return null;if(!Vi(d.type,[wi(nr),Wt,nr]))return l.error(`Expected first argument to be of type array or string, but found ${Rr(d.type)} instead`);if(r.length===4){const b=l.parse(r[3],3,He);return b?new ws(d.type,d,v,b):null}return new ws(d.type,d,v)}evaluate(r){const l=this.input.evaluate(r),d=this.beginIndex.evaluate(r);let v;if(this.endIndex&&(v=this.endIndex.evaluate(r)),Yi(l,["string"]))return[...l].slice(d,v).join("");if(Yi(l,["array"]))return l.slice(d,v);throw new zr(`Expected first argument to be of type array or string, but found ${Rr(Sn(l))} instead.`)}eachChild(r){r(this.input),r(this.beginIndex),this.endIndex&&r(this.endIndex)}outputDefined(){return!1}}function Ll(u,r){const l=u.length-1;let d,v,b=0,S=l,W=0;for(;b<=S;)if(W=Math.floor((b+S)/2),d=u[W],v=u[W+1],d<=r){if(W===l||r<v)return W;b=W+1}else{if(!(d>r))throw new zr("Input is not a number.");S=W-1}return 0}class qn{constructor(r,l,d){this.type=r,this.input=l,this.labels=[],this.outputs=[];for(const[v,b]of d)this.labels.push(v),this.outputs.push(b)}static parse(r,l){if(r.length-1<4)return l.error(`Expected at least 4 arguments, but found only ${r.length-1}.`);if((r.length-1)%2!=0)return l.error("Expected an even number of arguments.");const d=l.parse(r[1],1,He);if(!d)return null;const v=[];let b=null;l.expectedType&&l.expectedType.kind!=="value"&&(b=l.expectedType);for(let S=1;S<r.length;S+=2){const W=S===1?-1/0:r[S],U=r[S+1],A=S,X=S+1;if(typeof W!="number")return l.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',A);if(v.length&&v[v.length-1][0]>=W)return l.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',A);const Z=l.parse(U,X,b);if(!Z)return null;b=b||Z.type,v.push([W,Z])}return new qn(b,d,v)}evaluate(r){const l=this.labels,d=this.outputs;if(l.length===1)return d[0].evaluate(r);const v=this.input.evaluate(r);if(v<=l[0])return d[0].evaluate(r);const b=l.length;return v>=l[b-1]?d[b-1].evaluate(r):d[Ll(l,v)].evaluate(r)}eachChild(r){r(this.input);for(const l of this.outputs)r(l)}outputDefined(){return this.outputs.every(r=>r.outputDefined())}}function En(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Ol,vo,Zd=function(){if(vo)return Ol;function u(r,l,d,v){this.cx=3*r,this.bx=3*(d-r)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(v-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=r,this.p1y=l,this.p2x=d,this.p2y=v}return vo=1,Ol=u,u.prototype={sampleCurveX:function(r){return((this.ax*r+this.bx)*r+this.cx)*r},sampleCurveY:function(r){return((this.ay*r+this.by)*r+this.cy)*r},sampleCurveDerivativeX:function(r){return(3*this.ax*r+2*this.bx)*r+this.cx},solveCurveX:function(r,l){if(l===void 0&&(l=1e-6),r<0)return 0;if(r>1)return 1;for(var d=r,v=0;v<8;v++){var b=this.sampleCurveX(d)-r;if(Math.abs(b)<l)return d;var S=this.sampleCurveDerivativeX(d);if(Math.abs(S)<1e-6)break;d-=b/S}var W=0,U=1;for(d=r,v=0;v<20&&(b=this.sampleCurveX(d),!(Math.abs(b-r)<l));v++)r>b?W=d:U=d,d=.5*(U-W)+W;return d},solve:function(r,l){return this.sampleCurveY(this.solveCurveX(r,l))}},Ol}(),Eh=En(Zd);class hi{constructor(r,l,d,v,b){this.type=r,this.operator=l,this.interpolation=d,this.input=v,this.labels=[],this.outputs=[];for(const[S,W]of b)this.labels.push(S),this.outputs.push(W)}static interpolationFactor(r,l,d,v){let b=0;if(r.name==="exponential")b=Fs(l,r.base,d,v);else if(r.name==="linear")b=Fs(l,1,d,v);else if(r.name==="cubic-bezier"){const S=r.controlPoints;b=new Eh(S[0],S[1],S[2],S[3]).solve(Fs(l,1,d,v))}return b}static parse(r,l){let[d,v,b,...S]=r;if(!Array.isArray(v)||v.length===0)return l.error("Expected an interpolation type expression.",1);if(v[0]==="linear")v={name:"linear"};else if(v[0]==="exponential"){const A=v[1];if(typeof A!="number")return l.error("Exponential interpolation requires a numeric base.",1,1);v={name:"exponential",base:A}}else{if(v[0]!=="cubic-bezier")return l.error(`Unknown interpolation type ${String(v[0])}`,1,0);{const A=v.slice(1);if(A.length!==4||A.some(X=>typeof X!="number"||X<0||X>1))return l.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);v={name:"cubic-bezier",controlPoints:A}}}if(r.length-1<4)return l.error(`Expected at least 4 arguments, but found only ${r.length-1}.`);if((r.length-1)%2!=0)return l.error("Expected an even number of arguments.");if(b=l.parse(b,2,He),!b)return null;const W=[];let U=null;d!=="interpolate-hcl"&&d!=="interpolate-lab"||l.expectedType==Da?l.expectedType&&l.expectedType.kind!=="value"&&(U=l.expectedType):U=sr;for(let A=0;A<S.length;A+=2){const X=S[A],Z=S[A+1],G=A+3,H=A+4;if(typeof X!="number")return l.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',G);if(W.length&&W[W.length-1][0]>=X)return l.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',G);const J=l.parse(Z,H,U);if(!J)return null;U=U||J.type,W.push([X,J])}return Si(U,He)||Si(U,vr)||Si(U,sr)||Si(U,Ci)||Si(U,Cn)||Si(U,Da)||Si(U,gr)||Si(U,wi(He))?new hi(U,d,v,b,W):l.error(`Type ${Rr(U)} is not interpolatable.`)}evaluate(r){const l=this.labels,d=this.outputs;if(l.length===1)return d[0].evaluate(r);const v=this.input.evaluate(r);if(v<=l[0])return d[0].evaluate(r);const b=l.length;if(v>=l[b-1])return d[b-1].evaluate(r);const S=Ll(l,v),W=hi.interpolationFactor(this.interpolation,v,l[S],l[S+1]),U=d[S].evaluate(r),A=d[S+1].evaluate(r);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return ki(U,A,W);case"color":return Mr.interpolate(U,A,W);case"padding":return Yn.interpolate(U,A,W);case"colorArray":return Xn.interpolate(U,A,W);case"numberArray":return gn.interpolate(U,A,W);case"variableAnchorOffsetCollection":return Di.interpolate(U,A,W);case"array":return ho(U,A,W);case"projectionDefinition":return aa.interpolate(U,A,W)}case"interpolate-hcl":switch(this.type.kind){case"color":return Mr.interpolate(U,A,W,"hcl");case"colorArray":return Xn.interpolate(U,A,W,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Mr.interpolate(U,A,W,"lab");case"colorArray":return Xn.interpolate(U,A,W,"lab")}}}eachChild(r){r(this.input);for(const l of this.outputs)r(l)}outputDefined(){return this.outputs.every(r=>r.outputDefined())}}function Fs(u,r,l,d){const v=d-l,b=u-l;return v===0?0:r===1?b/v:(Math.pow(r,b)-1)/(Math.pow(r,v)-1)}const Ya={color:Mr.interpolate,number:ki,padding:Yn.interpolate,numberArray:gn.interpolate,colorArray:Xn.interpolate,variableAnchorOffsetCollection:Di.interpolate,array:ho};class _o{constructor(r,l){this.type=r,this.args=l}static parse(r,l){if(r.length<2)return l.error("Expected at least one argument.");let d=null;const v=l.expectedType;v&&v.kind!=="value"&&(d=v);const b=[];for(const W of r.slice(1)){const U=l.parse(W,1+b.length,d,void 0,{typeAnnotation:"omit"});if(!U)return null;d=d||U.type,b.push(U)}if(!d)throw new Error("No output type");const S=v&&b.some(W=>Pr(v,W.type));return new _o(S?nr:d,b)}evaluate(r){let l,d=null,v=0;for(const b of this.args)if(v++,d=b.evaluate(r),d&&d instanceof Ti&&!d.available&&(l||(l=d.name),d=null,v===this.args.length&&(d=l)),d!==null)break;return d}eachChild(r){this.args.forEach(r)}outputDefined(){return this.args.every(r=>r.outputDefined())}}function Wu(u,r){return u==="=="||u==="!="?r.kind==="boolean"||r.kind==="string"||r.kind==="number"||r.kind==="null"||r.kind==="value":r.kind==="string"||r.kind==="number"||r.kind==="value"}function Ra(u,r,l,d){return d.compare(r,l)===0}function Ko(u,r,l){const d=u!=="=="&&u!=="!=";return class $I{constructor(b,S,W){this.type=Lt,this.lhs=b,this.rhs=S,this.collator=W,this.hasUntypedArgument=b.type.kind==="value"||S.type.kind==="value"}static parse(b,S){if(b.length!==3&&b.length!==4)return S.error("Expected two or three arguments.");const W=b[0];let U=S.parse(b[1],1,nr);if(!U)return null;if(!Wu(W,U.type))return S.concat(1).error(`"${W}" comparisons are not supported for type '${Rr(U.type)}'.`);let A=S.parse(b[2],2,nr);if(!A)return null;if(!Wu(W,A.type))return S.concat(2).error(`"${W}" comparisons are not supported for type '${Rr(A.type)}'.`);if(U.type.kind!==A.type.kind&&U.type.kind!=="value"&&A.type.kind!=="value")return S.error(`Cannot compare types '${Rr(U.type)}' and '${Rr(A.type)}'.`);d&&(U.type.kind==="value"&&A.type.kind!=="value"?U=new dr(A.type,[U]):U.type.kind!=="value"&&A.type.kind==="value"&&(A=new dr(U.type,[A])));let X=null;if(b.length===4){if(U.type.kind!=="string"&&A.type.kind!=="string"&&U.type.kind!=="value"&&A.type.kind!=="value")return S.error("Cannot use collator to compare non-string types.");if(X=S.parse(b[3],3,Tr),!X)return null}return new $I(U,A,X)}evaluate(b){const S=this.lhs.evaluate(b),W=this.rhs.evaluate(b);if(d&&this.hasUntypedArgument){const U=Sn(S),A=Sn(W);if(U.kind!==A.kind||U.kind!=="string"&&U.kind!=="number")throw new zr(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${U.kind}, ${A.kind}) instead.`)}if(this.collator&&!d&&this.hasUntypedArgument){const U=Sn(S),A=Sn(W);if(U.kind!=="string"||A.kind!=="string")return r(b,S,W)}return this.collator?l(b,S,W,this.collator.evaluate(b)):r(b,S,W)}eachChild(b){b(this.lhs),b(this.rhs),this.collator&&b(this.collator)}outputDefined(){return!0}}}const Xl=Ko("==",function(u,r,l){return r===l},Ra),Wp=Ko("!=",function(u,r,l){return r!==l},function(u,r,l,d){return!Ra(0,r,l,d)}),Mh=Ko("<",function(u,r,l){return r<l},function(u,r,l,d){return d.compare(r,l)<0}),Ep=Ko(">",function(u,r,l){return r>l},function(u,r,l,d){return d.compare(r,l)>0}),Mp=Ko("<=",function(u,r,l){return r<=l},function(u,r,l,d){return d.compare(r,l)<=0}),Pp=Ko(">=",function(u,r,l){return r>=l},function(u,r,l,d){return d.compare(r,l)>=0});class Eu{constructor(r,l,d){this.type=Tr,this.locale=d,this.caseSensitive=r,this.diacriticSensitive=l}static parse(r,l){if(r.length!==2)return l.error("Expected one argument.");const d=r[1];if(typeof d!="object"||Array.isArray(d))return l.error("Collator options argument must be an object.");const v=l.parse(d["case-sensitive"]!==void 0&&d["case-sensitive"],1,Lt);if(!v)return null;const b=l.parse(d["diacritic-sensitive"]!==void 0&&d["diacritic-sensitive"],1,Lt);if(!b)return null;let S=null;return d.locale&&(S=l.parse(d.locale,1,Wt),!S)?null:new Eu(v,b,S)}evaluate(r){return new qo(this.caseSensitive.evaluate(r),this.diacriticSensitive.evaluate(r),this.locale?this.locale.evaluate(r):null)}eachChild(r){r(this.caseSensitive),r(this.diacriticSensitive),this.locale&&r(this.locale)}outputDefined(){return!1}}class Nl{constructor(r,l,d,v,b){this.type=Wt,this.number=r,this.locale=l,this.currency=d,this.minFractionDigits=v,this.maxFractionDigits=b}static parse(r,l){if(r.length!==3)return l.error("Expected two arguments.");const d=l.parse(r[1],1,He);if(!d)return null;const v=r[2];if(typeof v!="object"||Array.isArray(v))return l.error("NumberFormat options argument must be an object.");let b=null;if(v.locale&&(b=l.parse(v.locale,1,Wt),!b))return null;let S=null;if(v.currency&&(S=l.parse(v.currency,1,Wt),!S))return null;let W=null;if(v["min-fraction-digits"]&&(W=l.parse(v["min-fraction-digits"],1,He),!W))return null;let U=null;return v["max-fraction-digits"]&&(U=l.parse(v["max-fraction-digits"],1,He),!U)?null:new Nl(d,b,S,W,U)}evaluate(r){return new Intl.NumberFormat(this.locale?this.locale.evaluate(r):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(r):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(r):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(r):void 0}).format(this.number.evaluate(r))}eachChild(r){r(this.number),this.locale&&r(this.locale),this.currency&&r(this.currency),this.minFractionDigits&&r(this.minFractionDigits),this.maxFractionDigits&&r(this.maxFractionDigits)}outputDefined(){return!1}}class mc{constructor(r){this.type=ka,this.sections=r}static parse(r,l){if(r.length<2)return l.error("Expected at least one argument.");const d=r[1];if(!Array.isArray(d)&&typeof d=="object")return l.error("First argument must be an image or text section.");const v=[];let b=!1;for(let S=1;S<=r.length-1;++S){const W=r[S];if(b&&typeof W=="object"&&!Array.isArray(W)){b=!1;let U=null;if(W["font-scale"]&&(U=l.parse(W["font-scale"],1,He),!U))return null;let A=null;if(W["text-font"]&&(A=l.parse(W["text-font"],1,wi(Wt)),!A))return null;let X=null;if(W["text-color"]&&(X=l.parse(W["text-color"],1,sr),!X))return null;let Z=null;if(W["vertical-align"]){if(typeof W["vertical-align"]=="string"&&!fo.includes(W["vertical-align"]))return l.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${W["vertical-align"]}' instead.`);if(Z=l.parse(W["vertical-align"],1,Wt),!Z)return null}const G=v[v.length-1];G.scale=U,G.font=A,G.textColor=X,G.verticalAlign=Z}else{const U=l.parse(r[S],1,nr);if(!U)return null;const A=U.type.kind;if(A!=="string"&&A!=="value"&&A!=="null"&&A!=="resolvedImage")return l.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");b=!0,v.push({content:U,scale:null,font:null,textColor:null,verticalAlign:null})}}return new mc(v)}evaluate(r){return new On(this.sections.map(l=>{const d=l.content.evaluate(r);return Sn(d)===ba?new wa("",d,null,null,null,l.verticalAlign?l.verticalAlign.evaluate(r):null):new wa(Ir(d),null,l.scale?l.scale.evaluate(r):null,l.font?l.font.evaluate(r).join(","):null,l.textColor?l.textColor.evaluate(r):null,l.verticalAlign?l.verticalAlign.evaluate(r):null)}))}eachChild(r){for(const l of this.sections)r(l.content),l.scale&&r(l.scale),l.font&&r(l.font),l.textColor&&r(l.textColor),l.verticalAlign&&r(l.verticalAlign)}outputDefined(){return!1}}class gc{constructor(r){this.type=ba,this.input=r}static parse(r,l){if(r.length!==2)return l.error("Expected two arguments.");const d=l.parse(r[1],1,Wt);return d?new gc(d):l.error("No image name provided.")}evaluate(r){const l=this.input.evaluate(r),d=Ti.fromString(l);return d&&r.availableImages&&(d.available=r.availableImages.indexOf(l)>-1),d}eachChild(r){r(this.input)}outputDefined(){return!1}}class yc{constructor(r){this.type=He,this.input=r}static parse(r,l){if(r.length!==2)return l.error(`Expected 1 argument, but found ${r.length-1} instead.`);const d=l.parse(r[1],1);return d?d.type.kind!=="array"&&d.type.kind!=="string"&&d.type.kind!=="value"?l.error(`Expected argument of type string or array, but found ${Rr(d.type)} instead.`):new yc(d):null}evaluate(r){const l=this.input.evaluate(r);if(typeof l=="string")return[...l].length;if(Array.isArray(l))return l.length;throw new zr(`Expected value to be of type string or array, but found ${Rr(Sn(l))} instead.`)}eachChild(r){r(this.input)}outputDefined(){return!1}}const La=8192;function jd(u,r){const l=(180+u[0])/360,d=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,v=Math.pow(2,r.z);return[Math.round(l*v*La),Math.round(d*v*La)]}function Ph(u,r){const l=Math.pow(2,r.z);return[(v=(u[0]/La+r.x)/l,360*v-180),(d=(u[1]/La+r.y)/l,360/Math.PI*Math.atan(Math.exp((180-360*d)*Math.PI/180))-90)];var d,v}function Mu(u,r){u[0]=Math.min(u[0],r[0]),u[1]=Math.min(u[1],r[1]),u[2]=Math.max(u[2],r[0]),u[3]=Math.max(u[3],r[1])}function zl(u,r){return!(u[0]<=r[0]||u[2]>=r[2]||u[1]<=r[1]||u[3]>=r[3])}function Ip(u,r,l){const d=u[0]-r[0],v=u[1]-r[1],b=u[0]-l[0],S=u[1]-l[1];return d*S-b*v==0&&d*b<=0&&v*S<=0}function vc(u,r,l,d){return(v=[d[0]-l[0],d[1]-l[1]])[0]*(b=[r[0]-u[0],r[1]-u[1]])[1]-v[1]*b[0]!=0&&!(!_c(u,r,l,d)||!_c(l,d,u,r));var v,b}function Bd(u,r,l){for(const d of l)for(let v=0;v<d.length-1;++v)if(vc(u,r,d[v],d[v+1]))return!0;return!1}function Qo(u,r,l=!1){let d=!1;for(const W of r)for(let U=0;U<W.length-1;U++){if(Ip(u,W[U],W[U+1]))return l;(b=W[U])[1]>(v=u)[1]!=(S=W[U+1])[1]>v[1]&&v[0]<(S[0]-b[0])*(v[1]-b[1])/(S[1]-b[1])+b[0]&&(d=!d)}var v,b,S;return d}function $d(u,r){for(const l of r)if(Qo(u,l))return!0;return!1}function Gd(u,r){for(const l of u)if(!Qo(l,r))return!1;for(let l=0;l<u.length-1;++l)if(Bd(u[l],u[l+1],r))return!1;return!0}function Up(u,r){for(const l of r)if(Gd(u,l))return!0;return!1}function _c(u,r,l,d){const v=d[0]-l[0],b=d[1]-l[1],S=(u[0]-l[0])*b-v*(u[1]-l[1]),W=(r[0]-l[0])*b-v*(r[1]-l[1]);return S>0&&W<0||S<0&&W>0}function Zs(u,r,l){const d=[];for(let v=0;v<u.length;v++){const b=[];for(let S=0;S<u[v].length;S++){const W=jd(u[v][S],l);Mu(r,W),b.push(W)}d.push(b)}return d}function qd(u,r,l){const d=[];for(let v=0;v<u.length;v++){const b=Zs(u[v],r,l);d.push(b)}return d}function Ih(u,r,l,d){if(u[0]<l[0]||u[0]>l[2]){const v=.5*d;let b=u[0]-l[0]>v?-d:l[0]-u[0]>v?d:0;b===0&&(b=u[0]-l[2]>v?-d:l[2]-u[0]>v?d:0),u[0]+=b}Mu(r,u)}function Uh(u,r,l,d){const v=Math.pow(2,d.z)*La,b=[d.x*La,d.y*La],S=[];for(const W of u)for(const U of W){const A=[U.x+b[0],U.y+b[1]];Ih(A,r,l,v),S.push(A)}return S}function xc(u,r,l,d){const v=Math.pow(2,d.z)*La,b=[d.x*La,d.y*La],S=[];for(const U of u){const A=[];for(const X of U){const Z=[X.x+b[0],X.y+b[1]];Mu(r,Z),A.push(Z)}S.push(A)}if(r[2]-r[0]<=v/2){(W=r)[0]=W[1]=1/0,W[2]=W[3]=-1/0;for(const U of S)for(const A of U)Ih(A,r,l,v)}var W;return S}class js{constructor(r,l){this.type=Lt,this.geojson=r,this.geometries=l}static parse(r,l){if(r.length!==2)return l.error(`'within' expression requires exactly one argument, but found ${r.length-1} instead.`);if(jr(r[1])){const d=r[1];if(d.type==="FeatureCollection"){const v=[];for(const b of d.features){const{type:S,coordinates:W}=b.geometry;S==="Polygon"&&v.push(W),S==="MultiPolygon"&&v.push(...W)}if(v.length)return new js(d,{type:"MultiPolygon",coordinates:v})}else if(d.type==="Feature"){const v=d.geometry.type;if(v==="Polygon"||v==="MultiPolygon")return new js(d,d.geometry)}else if(d.type==="Polygon"||d.type==="MultiPolygon")return new js(d,d)}return l.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(r){if(r.geometry()!=null&&r.canonicalID()!=null){if(r.geometryType()==="Point")return function(l,d){const v=[1/0,1/0,-1/0,-1/0],b=[1/0,1/0,-1/0,-1/0],S=l.canonicalID();if(d.type==="Polygon"){const W=Zs(d.coordinates,b,S),U=Uh(l.geometry(),v,b,S);if(!zl(v,b))return!1;for(const A of U)if(!Qo(A,W))return!1}if(d.type==="MultiPolygon"){const W=qd(d.coordinates,b,S),U=Uh(l.geometry(),v,b,S);if(!zl(v,b))return!1;for(const A of U)if(!$d(A,W))return!1}return!0}(r,this.geometries);if(r.geometryType()==="LineString")return function(l,d){const v=[1/0,1/0,-1/0,-1/0],b=[1/0,1/0,-1/0,-1/0],S=l.canonicalID();if(d.type==="Polygon"){const W=Zs(d.coordinates,b,S),U=xc(l.geometry(),v,b,S);if(!zl(v,b))return!1;for(const A of U)if(!Gd(A,W))return!1}if(d.type==="MultiPolygon"){const W=qd(d.coordinates,b,S),U=xc(l.geometry(),v,b,S);if(!zl(v,b))return!1;for(const A of U)if(!Up(A,W))return!1}return!0}(r,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Ch=class{constructor(u=[],r=(l,d)=>l<d?-1:l>d?1:0){if(this.data=u,this.length=this.data.length,this.compare=r,this.length>0)for(let l=(this.length>>1)-1;l>=0;l--)this._down(l)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(this.length===0)return;const u=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:r,compare:l}=this,d=r[u];for(;u>0;){const v=u-1>>1,b=r[v];if(l(d,b)>=0)break;r[u]=b,u=v}r[u]=d}_down(u){const{data:r,compare:l}=this,d=this.length>>1,v=r[u];for(;u<d;){let b=1+(u<<1);const S=b+1;if(S<this.length&&l(r[S],r[b])<0&&(b=S),l(r[b],v)>=0)break;r[u]=r[b],u=b}r[u]=v}};function Jo(u,r,l=0,d=u.length-1,v=Hd){for(;d>l;){if(d-l>600){const U=d-l+1,A=r-l+1,X=Math.log(U),Z=.5*Math.exp(2*X/3),G=.5*Math.sqrt(X*Z*(U-Z)/U)*(A-U/2<0?-1:1);Jo(u,r,Math.max(l,Math.floor(r-A*Z/U+G)),Math.min(d,Math.floor(r+(U-A)*Z/U+G)),v)}const b=u[r];let S=l,W=d;for(Fl(u,l,r),v(u[d],b)>0&&Fl(u,l,d);S<W;){for(Fl(u,S,W),S++,W--;v(u[S],b)<0;)S++;for(;v(u[W],b)>0;)W--}v(u[l],b)===0?Fl(u,l,W):(W++,Fl(u,W,d)),W<=r&&(l=W+1),r<=W&&(d=W-1)}}function Fl(u,r,l){const d=u[r];u[r]=u[l],u[l]=d}function Hd(u,r){return u<r?-1:u>r?1:0}function bc(u,r){if(u.length<=1)return[u];const l=[];let d,v;for(const b of u){const S=Qd(b);S!==0&&(b.area=Math.abs(S),v===void 0&&(v=S<0),v===S<0?(d&&l.push(d),d=[b]):d.push(b))}if(d&&l.push(d),r>1)for(let b=0;b<l.length;b++)l[b].length<=r||(Jo(l[b],r,1,l[b].length-1,Kd),l[b]=l[b].slice(0,r));return l}function Kd(u,r){return r.area-u.area}function Qd(u){let r=0;for(let l,d,v=0,b=u.length,S=b-1;v<b;S=v++)l=u[v],d=u[S],r+=(d.x-l.x)*(l.y+d.y);return r}const el=1/298.257223563,Zl=el*(2-el),Jd=Math.PI/180;class jl{constructor(r){const l=6378.137*Jd*1e3,d=Math.cos(r*Jd),v=1/(1-Zl*(1-d*d)),b=Math.sqrt(v);this.kx=l*b*d,this.ky=l*b*v*(1-Zl)}distance(r,l){const d=this.wrap(r[0]-l[0])*this.kx,v=(r[1]-l[1])*this.ky;return Math.sqrt(d*d+v*v)}pointOnLine(r,l){let d,v,b,S,W=1/0;for(let U=0;U<r.length-1;U++){let A=r[U][0],X=r[U][1],Z=this.wrap(r[U+1][0]-A)*this.kx,G=(r[U+1][1]-X)*this.ky,H=0;Z===0&&G===0||(H=(this.wrap(l[0]-A)*this.kx*Z+(l[1]-X)*this.ky*G)/(Z*Z+G*G),H>1?(A=r[U+1][0],X=r[U+1][1]):H>0&&(A+=Z/this.kx*H,X+=G/this.ky*H)),Z=this.wrap(l[0]-A)*this.kx,G=(l[1]-X)*this.ky;const J=Z*Z+G*G;J<W&&(W=J,d=A,v=X,b=U,S=H)}return{point:[d,v],index:b,t:Math.max(0,Math.min(1,S))}}wrap(r){for(;r<-180;)r+=360;for(;r>180;)r-=360;return r}}function ef(u,r){return r[0]-u[0]}function Dr(u){return u[1]-u[0]+1}function ns(u,r){return u[1]>=u[0]&&u[1]<r}function Pu(u,r){if(u[0]>u[1])return[null,null];const l=Dr(u);if(r){if(l===2)return[u,null];const v=Math.floor(l/2);return[[u[0],u[0]+v],[u[0]+v,u[1]]]}if(l===1)return[u,null];const d=Math.floor(l/2)-1;return[[u[0],u[0]+d],[u[0]+d+1,u[1]]]}function wc(u,r){if(!ns(r,u.length))return[1/0,1/0,-1/0,-1/0];const l=[1/0,1/0,-1/0,-1/0];for(let d=r[0];d<=r[1];++d)Mu(l,u[d]);return l}function Yc(u){const r=[1/0,1/0,-1/0,-1/0];for(const l of u)for(const d of l)Mu(r,d);return r}function Vh(u){return u[0]!==-1/0&&u[1]!==-1/0&&u[2]!==1/0&&u[3]!==1/0}function Ah(u,r,l){if(!Vh(u)||!Vh(r))return NaN;let d=0,v=0;return u[2]<r[0]&&(d=r[0]-u[2]),u[0]>r[2]&&(d=u[0]-r[2]),u[1]>r[3]&&(v=u[1]-r[3]),u[3]<r[1]&&(v=r[1]-u[3]),l.distance([0,0],[d,v])}function tl(u,r,l){const d=l.pointOnLine(r,u);return l.distance(u,d.point)}function kh(u,r,l,d,v){const b=Math.min(tl(u,[l,d],v),tl(r,[l,d],v)),S=Math.min(tl(l,[u,r],v),tl(d,[u,r],v));return Math.min(b,S)}function Cp(u,r,l,d,v){if(!ns(r,u.length)||!ns(d,l.length))return 1/0;let b=1/0;for(let S=r[0];S<r[1];++S){const W=u[S],U=u[S+1];for(let A=d[0];A<d[1];++A){const X=l[A],Z=l[A+1];if(vc(W,U,X,Z))return 0;b=Math.min(b,kh(W,U,X,Z,v))}}return b}function Vp(u,r,l,d,v){if(!ns(r,u.length)||!ns(d,l.length))return NaN;let b=1/0;for(let S=r[0];S<=r[1];++S)for(let W=d[0];W<=d[1];++W)if(b=Math.min(b,v.distance(u[S],l[W])),b===0)return b;return b}function is(u,r,l){if(Qo(u,r,!0))return 0;let d=1/0;for(const v of r){const b=v[0],S=v[v.length-1];if(b!==S&&(d=Math.min(d,tl(u,[S,b],l)),d===0))return d;const W=l.pointOnLine(v,u);if(d=Math.min(d,l.distance(u,W.point)),d===0)return d}return d}function Iu(u,r,l,d){if(!ns(r,u.length))return NaN;for(let b=r[0];b<=r[1];++b)if(Qo(u[b],l,!0))return 0;let v=1/0;for(let b=r[0];b<r[1];++b){const S=u[b],W=u[b+1];for(const U of l)for(let A=0,X=U.length,Z=X-1;A<X;Z=A++){const G=U[Z],H=U[A];if(vc(S,W,G,H))return 0;v=Math.min(v,kh(S,W,G,H,d))}}return v}function Dh(u,r){for(const l of u)for(const d of l)if(Qo(d,r,!0))return!0;return!1}function tf(u,r,l,d=1/0){const v=Yc(u),b=Yc(r);if(d!==1/0&&Ah(v,b,l)>=d)return d;if(zl(v,b)){if(Dh(u,r))return 0}else if(Dh(r,u))return 0;let S=1/0;for(const W of u)for(let U=0,A=W.length,X=A-1;U<A;X=U++){const Z=W[X],G=W[U];for(const H of r)for(let J=0,te=H.length,ce=te-1;J<te;ce=J++){const ve=H[ce],Ae=H[J];if(vc(Z,G,ve,Ae))return 0;S=Math.min(S,kh(Z,G,ve,Ae,l))}}return S}function Rh(u,r,l,d,v,b){if(!b)return;const S=Ah(wc(d,b),v,l);S<r&&u.push([S,b,[0,0]])}function Uu(u,r,l,d,v,b,S){if(!b||!S)return;const W=Ah(wc(d,b),wc(v,S),l);W<r&&u.push([W,b,S])}function Bl(u,r,l,d,v=1/0){let b=Math.min(d.distance(u[0],l[0][0]),v);if(b===0)return b;const S=new Ch([[0,[0,u.length-1],[0,0]]],ef),W=Yc(l);for(;S.length>0;){const U=S.pop();if(U[0]>=b)continue;const A=U[1],X=r?50:100;if(Dr(A)<=X){if(!ns(A,u.length))return NaN;if(r){const Z=Iu(u,A,l,d);if(isNaN(Z)||Z===0)return Z;b=Math.min(b,Z)}else for(let Z=A[0];Z<=A[1];++Z){const G=is(u[Z],l,d);if(b=Math.min(b,G),b===0)return 0}}else{const Z=Pu(A,r);Rh(S,b,d,u,W,Z[0]),Rh(S,b,d,u,W,Z[1])}}return b}function Sc(u,r,l,d,v,b=1/0){let S=Math.min(b,v.distance(u[0],l[0]));if(S===0)return S;const W=new Ch([[0,[0,u.length-1],[0,l.length-1]]],ef);for(;W.length>0;){const U=W.pop();if(U[0]>=S)continue;const A=U[1],X=U[2],Z=r?50:100,G=d?50:100;if(Dr(A)<=Z&&Dr(X)<=G){if(!ns(A,u.length)&&ns(X,l.length))return NaN;let H;if(r&&d)H=Cp(u,A,l,X,v),S=Math.min(S,H);else if(r&&!d){const J=u.slice(A[0],A[1]+1);for(let te=X[0];te<=X[1];++te)if(H=tl(l[te],J,v),S=Math.min(S,H),S===0)return S}else if(!r&&d){const J=l.slice(X[0],X[1]+1);for(let te=A[0];te<=A[1];++te)if(H=tl(u[te],J,v),S=Math.min(S,H),S===0)return S}else H=Vp(u,A,l,X,v),S=Math.min(S,H)}else{const H=Pu(A,r),J=Pu(X,d);Uu(W,S,v,u,l,H[0],J[0]),Uu(W,S,v,u,l,H[0],J[1]),Uu(W,S,v,u,l,H[1],J[0]),Uu(W,S,v,u,l,H[1],J[1])}}return S}function Lh(u){return u.type==="MultiPolygon"?u.coordinates.map(r=>({type:"Polygon",coordinates:r})):u.type==="MultiLineString"?u.coordinates.map(r=>({type:"LineString",coordinates:r})):u.type==="MultiPoint"?u.coordinates.map(r=>({type:"Point",coordinates:r})):[u]}class Oa{constructor(r,l){this.type=He,this.geojson=r,this.geometries=l}static parse(r,l){if(r.length!==2)return l.error(`'distance' expression requires exactly one argument, but found ${r.length-1} instead.`);if(jr(r[1])){const d=r[1];if(d.type==="FeatureCollection")return new Oa(d,d.features.map(v=>Lh(v.geometry)).flat());if(d.type==="Feature")return new Oa(d,Lh(d.geometry));if("type"in d&&"coordinates"in d)return new Oa(d,Lh(d))}return l.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(r){if(r.geometry()!=null&&r.canonicalID()!=null){if(r.geometryType()==="Point")return function(l,d){const v=l.geometry(),b=v.flat().map(U=>Ph([U.x,U.y],l.canonical));if(v.length===0)return NaN;const S=new jl(b[0][1]);let W=1/0;for(const U of d){switch(U.type){case"Point":W=Math.min(W,Sc(b,!1,[U.coordinates],!1,S,W));break;case"LineString":W=Math.min(W,Sc(b,!1,U.coordinates,!0,S,W));break;case"Polygon":W=Math.min(W,Bl(b,!1,U.coordinates,S,W))}if(W===0)return W}return W}(r,this.geometries);if(r.geometryType()==="LineString")return function(l,d){const v=l.geometry(),b=v.flat().map(U=>Ph([U.x,U.y],l.canonical));if(v.length===0)return NaN;const S=new jl(b[0][1]);let W=1/0;for(const U of d){switch(U.type){case"Point":W=Math.min(W,Sc(b,!0,[U.coordinates],!1,S,W));break;case"LineString":W=Math.min(W,Sc(b,!0,U.coordinates,!0,S,W));break;case"Polygon":W=Math.min(W,Bl(b,!0,U.coordinates,S,W))}if(W===0)return W}return W}(r,this.geometries);if(r.geometryType()==="Polygon")return function(l,d){const v=l.geometry();if(v.length===0||v[0].length===0)return NaN;const b=bc(v,0).map(U=>U.map(A=>A.map(X=>Ph([X.x,X.y],l.canonical)))),S=new jl(b[0][0][0][1]);let W=1/0;for(const U of d)for(const A of b){switch(U.type){case"Point":W=Math.min(W,Bl([U.coordinates],!1,A,S,W));break;case"LineString":W=Math.min(W,Bl(U.coordinates,!0,A,S,W));break;case"Polygon":W=Math.min(W,tf(A,U.coordinates,S,W))}if(W===0)return W}return W}(r,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class $l{constructor(r){this.type=nr,this.key=r}static parse(r,l){if(r.length!==2)return l.error(`Expected 1 argument, but found ${r.length-1} instead.`);const d=r[1];return d==null?l.error("Global state property must be defined."):typeof d!="string"?l.error(`Global state property must be string, but found ${typeof r[1]} instead.`):new $l(d)}evaluate(r){var l;const d=(l=r.globals)===null||l===void 0?void 0:l.globalState;return d&&Object.keys(d).length!==0?Su(d,this.key):null}eachChild(){}outputDefined(){return!1}}const Ys={"==":Xl,"!=":Wp,">":Ep,"<":Mh,">=":Pp,"<=":Mp,array:dr,at:bs,boolean:dr,case:Nn,coalesce:_o,collator:Eu,format:mc,image:gc,in:Rl,"index-of":go,interpolate:hi,"interpolate-hcl":hi,"interpolate-lab":hi,length:yc,let:mo,literal:ur,match:yo,number:dr,"number-format":Nl,object:dr,slice:ws,step:qn,string:dr,"to-boolean":Ri,"to-color":Ri,"to-number":Ri,"to-string":Ri,var:Dl,within:js,distance:Oa,"global-state":$l};class sa{constructor(r,l,d,v){this.name=r,this.type=l,this._evaluate=d,this.args=v}evaluate(r){return this._evaluate(r,this.args)}eachChild(r){this.args.forEach(r)}outputDefined(){return!1}static parse(r,l){const d=r[0],v=sa.definitions[d];if(!v)return l.error(`Unknown expression "${d}". If you wanted a literal array, use ["literal", [...]].`,0);const b=Array.isArray(v)?v[0]:v.type,S=Array.isArray(v)?[[v[1],v[2]]]:v.overloads,W=S.filter(([A])=>!Array.isArray(A)||A.length===r.length-1);let U=null;for(const[A,X]of W){U=new po(l.registry,Vu,l.path,null,l.scope);const Z=[];let G=!1;for(let H=1;H<r.length;H++){const J=r[H],te=Array.isArray(A)?A[H-1]:A.type,ce=U.parse(J,1+Z.length,te);if(!ce){G=!0;break}Z.push(ce)}if(!G)if(Array.isArray(A)&&A.length!==Z.length)U.error(`Expected ${A.length} arguments, but found ${Z.length} instead.`);else{for(let H=0;H<Z.length;H++){const J=Array.isArray(A)?A[H]:A.type,te=Z[H];U.concat(H+1).checkSubtype(J,te.type)}if(U.errors.length===0)return new sa(d,b,X,Z)}}if(W.length===1)l.errors.push(...U.errors);else{const A=(W.length?W:S).map(([Z])=>{return G=Z,Array.isArray(G)?`(${G.map(Rr).join(", ")})`:`(${Rr(G.type)}...)`;var G}).join(" | "),X=[];for(let Z=1;Z<r.length;Z++){const G=l.parse(r[Z],1+X.length);if(!G)return null;X.push(Rr(G.type))}l.error(`Expected arguments of type ${A}, but found (${X.join(", ")}) instead.`)}return null}static register(r,l){sa.definitions=l;for(const d in l)r[d]=sa}}function Oh(u,[r,l,d,v]){r=r.evaluate(u),l=l.evaluate(u),d=d.evaluate(u);const b=v?v.evaluate(u):1,S=kl(r,l,d,b);if(S)throw new zr(S);return new Mr(r/255,l/255,d/255,b,!1)}function Cu(u,r){return u in r}function xo(u,r){const l=r[u];return l===void 0?null:l}function Bs(u){return{type:u}}function Vu(u){if(u instanceof Dl)return Vu(u.boundExpression);if(u instanceof sa&&u.name==="error"||u instanceof Eu||u instanceof js||u instanceof Oa||u instanceof $l)return!1;const r=u instanceof Ri||u instanceof dr;let l=!0;return u.eachChild(d=>{l=r?l&&Vu(d):l&&d instanceof ur}),!!l&&rl(u)&&Au(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function rl(u){if(u instanceof sa&&(u.name==="get"&&u.args.length===1||u.name==="feature-state"||u.name==="has"&&u.args.length===1||u.name==="properties"||u.name==="geometry-type"||u.name==="id"||/^filter-/.test(u.name))||u instanceof js||u instanceof Oa)return!1;let r=!0;return u.eachChild(l=>{r&&!rl(l)&&(r=!1)}),r}function Gl(u){if(u instanceof sa&&u.name==="feature-state")return!1;let r=!0;return u.eachChild(l=>{r&&!Gl(l)&&(r=!1)}),r}function Au(u,r){if(u instanceof sa&&r.indexOf(u.name)>=0)return!1;let l=!0;return u.eachChild(d=>{l&&!Au(d,r)&&(l=!1)}),l}function ku(u){return{result:"success",value:u}}function nl(u){return{result:"error",value:u}}function il(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function Xh(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function as(u){return!!u.expression&&u.expression.interpolated}function br(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function ql(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)&&Sn(u)===Zr}function Tc(u){return u}function Nh(u,r){const l=u.stops&&typeof u.stops[0][0]=="object",d=l||!(l||u.property!==void 0),v=u.type||(as(r)?"exponential":"interval"),b=function(X){switch(X.type){case"color":return Mr.parse;case"padding":return Yn.parse;case"numberArray":return gn.parse;case"colorArray":return Xn.parse;default:return null}}(r);if(b&&((u=Ot({},u)).stops&&(u.stops=u.stops.map(X=>[X[0],b(X[1])])),u.default=b(u.default?u.default:r.default)),u.colorSpace&&(S=u.colorSpace)!=="rgb"&&S!=="hcl"&&S!=="lab")throw new Error(`Unknown color space: "${u.colorSpace}"`);var S;const W=function(X){switch(X){case"exponential":return zh;case"interval":return rf;case"categorical":return Ap;case"identity":return yn;default:throw new Error(`Unknown function type "${X}"`)}}(v);let U,A;if(v==="categorical"){U=Object.create(null);for(const X of u.stops)U[X[0]]=X[1];A=typeof u.stops[0][0]}if(l){const X={},Z=[];for(let J=0;J<u.stops.length;J++){const te=u.stops[J],ce=te[0].zoom;X[ce]===void 0&&(X[ce]={zoom:ce,type:u.type,property:u.property,default:u.default,stops:[]},Z.push(ce)),X[ce].stops.push([te[0].value,te[1]])}const G=[];for(const J of Z)G.push([X[J].zoom,Nh(X[J],r)]);const H={name:"linear"};return{kind:"composite",interpolationType:H,interpolationFactor:hi.interpolationFactor.bind(void 0,H),zoomStops:G.map(J=>J[0]),evaluate:({zoom:J},te)=>zh({stops:G,base:u.base},r,J).evaluate(J,te)}}if(d){const X=v==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:X,interpolationFactor:hi.interpolationFactor.bind(void 0,X),zoomStops:u.stops.map(Z=>Z[0]),evaluate:({zoom:Z})=>W(u,r,Z,U,A)}}return{kind:"source",evaluate(X,Z){const G=Z&&Z.properties?Z.properties[u.property]:void 0;return G===void 0?$s(u.default,r.default):W(u,r,G,U,A)}}}function $s(u,r,l){return u!==void 0?u:r!==void 0?r:l!==void 0?l:void 0}function Ap(u,r,l,d,v){return $s(typeof l===v?d[l]:void 0,u.default,r.default)}function rf(u,r,l){if(br(l)!=="number")return $s(u.default,r.default);const d=u.stops.length;if(d===1||l<=u.stops[0][0])return u.stops[0][1];if(l>=u.stops[d-1][0])return u.stops[d-1][1];const v=Ll(u.stops.map(b=>b[0]),l);return u.stops[v][1]}function zh(u,r,l){const d=u.base!==void 0?u.base:1;if(br(l)!=="number")return $s(u.default,r.default);const v=u.stops.length;if(v===1||l<=u.stops[0][0])return u.stops[0][1];if(l>=u.stops[v-1][0])return u.stops[v-1][1];const b=Ll(u.stops.map(X=>X[0]),l),S=function(X,Z,G,H){const J=H-G,te=X-G;return J===0?0:Z===1?te/J:(Math.pow(Z,te)-1)/(Math.pow(Z,J)-1)}(l,d,u.stops[b][0],u.stops[b+1][0]),W=u.stops[b][1],U=u.stops[b+1][1],A=Ya[r.type]||Tc;return typeof W.evaluate=="function"?{evaluate(...X){const Z=W.evaluate.apply(void 0,X),G=U.evaluate.apply(void 0,X);if(Z!==void 0&&G!==void 0)return A(Z,G,S,u.colorSpace)}}:A(W,U,S,u.colorSpace)}function yn(u,r,l){switch(r.type){case"color":l=Mr.parse(l);break;case"formatted":l=On.fromString(l.toString());break;case"resolvedImage":l=Ti.fromString(l.toString());break;case"padding":l=Yn.parse(l);break;case"colorArray":l=Xn.parse(l);break;case"numberArray":l=gn.parse(l);break;default:br(l)===r.type||r.type==="enum"&&r.values[l]||(l=void 0)}return $s(l,u.default,r.default)}sa.register(Ys,{error:[{kind:"error"},[Wt],(u,[r])=>{throw new zr(r.evaluate(u))}],typeof:[Wt,[nr],(u,[r])=>Rr(Sn(r.evaluate(u)))],"to-rgba":[wi(He,4),[sr],(u,[r])=>{const[l,d,v,b]=r.evaluate(u).rgb;return[255*l,255*d,255*v,b]}],rgb:[sr,[He,He,He],Oh],rgba:[sr,[He,He,He,He],Oh],has:{type:Lt,overloads:[[[Wt],(u,[r])=>Cu(r.evaluate(u),u.properties())],[[Wt,Zr],(u,[r,l])=>Cu(r.evaluate(u),l.evaluate(u))]]},get:{type:nr,overloads:[[[Wt],(u,[r])=>xo(r.evaluate(u),u.properties())],[[Wt,Zr],(u,[r,l])=>xo(r.evaluate(u),l.evaluate(u))]]},"feature-state":[nr,[Wt],(u,[r])=>xo(r.evaluate(u),u.featureState||{})],properties:[Zr,[],u=>u.properties()],"geometry-type":[Wt,[],u=>u.geometryType()],id:[nr,[],u=>u.id()],zoom:[He,[],u=>u.globals.zoom],"heatmap-density":[He,[],u=>u.globals.heatmapDensity||0],"line-progress":[He,[],u=>u.globals.lineProgress||0],accumulated:[nr,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[He,Bs(He),(u,r)=>{let l=0;for(const d of r)l+=d.evaluate(u);return l}],"*":[He,Bs(He),(u,r)=>{let l=1;for(const d of r)l*=d.evaluate(u);return l}],"-":{type:He,overloads:[[[He,He],(u,[r,l])=>r.evaluate(u)-l.evaluate(u)],[[He],(u,[r])=>-r.evaluate(u)]]},"/":[He,[He,He],(u,[r,l])=>r.evaluate(u)/l.evaluate(u)],"%":[He,[He,He],(u,[r,l])=>r.evaluate(u)%l.evaluate(u)],ln2:[He,[],()=>Math.LN2],pi:[He,[],()=>Math.PI],e:[He,[],()=>Math.E],"^":[He,[He,He],(u,[r,l])=>Math.pow(r.evaluate(u),l.evaluate(u))],sqrt:[He,[He],(u,[r])=>Math.sqrt(r.evaluate(u))],log10:[He,[He],(u,[r])=>Math.log(r.evaluate(u))/Math.LN10],ln:[He,[He],(u,[r])=>Math.log(r.evaluate(u))],log2:[He,[He],(u,[r])=>Math.log(r.evaluate(u))/Math.LN2],sin:[He,[He],(u,[r])=>Math.sin(r.evaluate(u))],cos:[He,[He],(u,[r])=>Math.cos(r.evaluate(u))],tan:[He,[He],(u,[r])=>Math.tan(r.evaluate(u))],asin:[He,[He],(u,[r])=>Math.asin(r.evaluate(u))],acos:[He,[He],(u,[r])=>Math.acos(r.evaluate(u))],atan:[He,[He],(u,[r])=>Math.atan(r.evaluate(u))],min:[He,Bs(He),(u,r)=>Math.min(...r.map(l=>l.evaluate(u)))],max:[He,Bs(He),(u,r)=>Math.max(...r.map(l=>l.evaluate(u)))],abs:[He,[He],(u,[r])=>Math.abs(r.evaluate(u))],round:[He,[He],(u,[r])=>{const l=r.evaluate(u);return l<0?-Math.round(-l):Math.round(l)}],floor:[He,[He],(u,[r])=>Math.floor(r.evaluate(u))],ceil:[He,[He],(u,[r])=>Math.ceil(r.evaluate(u))],"filter-==":[Lt,[Wt,nr],(u,[r,l])=>u.properties()[r.value]===l.value],"filter-id-==":[Lt,[nr],(u,[r])=>u.id()===r.value],"filter-type-==":[Lt,[Wt],(u,[r])=>u.geometryType()===r.value],"filter-<":[Lt,[Wt,nr],(u,[r,l])=>{const d=u.properties()[r.value],v=l.value;return typeof d==typeof v&&d<v}],"filter-id-<":[Lt,[nr],(u,[r])=>{const l=u.id(),d=r.value;return typeof l==typeof d&&l<d}],"filter->":[Lt,[Wt,nr],(u,[r,l])=>{const d=u.properties()[r.value],v=l.value;return typeof d==typeof v&&d>v}],"filter-id->":[Lt,[nr],(u,[r])=>{const l=u.id(),d=r.value;return typeof l==typeof d&&l>d}],"filter-<=":[Lt,[Wt,nr],(u,[r,l])=>{const d=u.properties()[r.value],v=l.value;return typeof d==typeof v&&d<=v}],"filter-id-<=":[Lt,[nr],(u,[r])=>{const l=u.id(),d=r.value;return typeof l==typeof d&&l<=d}],"filter->=":[Lt,[Wt,nr],(u,[r,l])=>{const d=u.properties()[r.value],v=l.value;return typeof d==typeof v&&d>=v}],"filter-id->=":[Lt,[nr],(u,[r])=>{const l=u.id(),d=r.value;return typeof l==typeof d&&l>=d}],"filter-has":[Lt,[nr],(u,[r])=>r.value in u.properties()],"filter-has-id":[Lt,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[Lt,[wi(Wt)],(u,[r])=>r.value.indexOf(u.geometryType())>=0],"filter-id-in":[Lt,[wi(nr)],(u,[r])=>r.value.indexOf(u.id())>=0],"filter-in-small":[Lt,[Wt,wi(nr)],(u,[r,l])=>l.value.indexOf(u.properties()[r.value])>=0],"filter-in-large":[Lt,[Wt,wi(nr)],(u,[r,l])=>function(d,v,b,S){for(;b<=S;){const W=b+S>>1;if(v[W]===d)return!0;v[W]>d?S=W-1:b=W+1}return!1}(u.properties()[r.value],l.value,0,l.value.length-1)],all:{type:Lt,overloads:[[[Lt,Lt],(u,[r,l])=>r.evaluate(u)&&l.evaluate(u)],[Bs(Lt),(u,r)=>{for(const l of r)if(!l.evaluate(u))return!1;return!0}]]},any:{type:Lt,overloads:[[[Lt,Lt],(u,[r,l])=>r.evaluate(u)||l.evaluate(u)],[Bs(Lt),(u,r)=>{for(const l of r)if(l.evaluate(u))return!0;return!1}]]},"!":[Lt,[Lt],(u,[r])=>!r.evaluate(u)],"is-supported-script":[Lt,[Wt],(u,[r])=>{const l=u.globals&&u.globals.isSupportedScript;return!l||l(r.evaluate(u))}],upcase:[Wt,[Wt],(u,[r])=>r.evaluate(u).toUpperCase()],downcase:[Wt,[Wt],(u,[r])=>r.evaluate(u).toLowerCase()],concat:[Wt,Bs(nr),(u,r)=>r.map(l=>Ir(l.evaluate(u))).join("")],"resolved-locale":[Wt,[Tr],(u,[r])=>r.evaluate(u).resolvedLocale()]});class Hl{constructor(r,l){this.expression=r,this._warningHistory={},this._evaluator=new Tu,this._defaultValue=l?function(d){if(d.type==="color"&&ql(d.default))return new Mr(0,0,0,0);switch(d.type){case"color":return Mr.parse(d.default)||null;case"padding":return Yn.parse(d.default)||null;case"numberArray":return gn.parse(d.default)||null;case"colorArray":return Xn.parse(d.default)||null;case"variableAnchorOffsetCollection":return Di.parse(d.default)||null;case"projectionDefinition":return aa.parse(d.default)||null;default:return d.default===void 0?null:d.default}}(l):null,this._enumValues=l&&l.type==="enum"?l.values:null}evaluateWithoutErrorHandling(r,l,d,v,b,S){return this._evaluator.globals=r,this._evaluator.feature=l,this._evaluator.featureState=d,this._evaluator.canonical=v,this._evaluator.availableImages=b||null,this._evaluator.formattedSection=S,this.expression.evaluate(this._evaluator)}evaluate(r,l,d,v,b,S){this._evaluator.globals=r,this._evaluator.feature=l||null,this._evaluator.featureState=d||null,this._evaluator.canonical=v,this._evaluator.availableImages=b||null,this._evaluator.formattedSection=S||null;try{const W=this.expression.evaluate(this._evaluator);if(W==null||typeof W=="number"&&W!=W)return this._defaultValue;if(this._enumValues&&!(W in this._enumValues))throw new zr(`Expected value to be one of ${Object.keys(this._enumValues).map(U=>JSON.stringify(U)).join(", ")}, but found ${JSON.stringify(W)} instead.`);return W}catch(W){return this._warningHistory[W.message]||(this._warningHistory[W.message]=!0,typeof console<"u"&&console.warn(W.message)),this._defaultValue}}}function bo(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in Ys}function wo(u,r){const l=new po(Ys,Vu,[],r?function(v){const b={color:sr,string:Wt,number:He,enum:Wt,boolean:Lt,formatted:ka,padding:Ci,numberArray:Cn,colorArray:Da,projectionDefinition:vr,resolvedImage:ba,variableAnchorOffsetCollection:gr};return v.type==="array"?wi(b[v.value]||nr,v.length):b[v.type]}(r):void 0),d=l.parse(u,void 0,void 0,void 0,r&&r.type==="string"?{typeAnnotation:"coerce"}:void 0);return d?ku(new Hl(d,r)):nl(l.errors)}class Wc{constructor(r,l){this.kind=r,this._styleExpression=l,this.isStateDependent=r!=="constant"&&!Gl(l.expression)}evaluateWithoutErrorHandling(r,l,d,v,b,S){return this._styleExpression.evaluateWithoutErrorHandling(r,l,d,v,b,S)}evaluate(r,l,d,v,b,S){return this._styleExpression.evaluate(r,l,d,v,b,S)}}class Kl{constructor(r,l,d,v){this.kind=r,this.zoomStops=d,this._styleExpression=l,this.isStateDependent=r!=="camera"&&!Gl(l.expression),this.interpolationType=v}evaluateWithoutErrorHandling(r,l,d,v,b,S){return this._styleExpression.evaluateWithoutErrorHandling(r,l,d,v,b,S)}evaluate(r,l,d,v,b,S){return this._styleExpression.evaluate(r,l,d,v,b,S)}interpolationFactor(r,l,d){return this.interpolationType?hi.interpolationFactor(this.interpolationType,r,l,d):0}}function al(u,r){const l=wo(u,r);if(l.result==="error")return l;const d=l.value.expression,v=rl(d);if(!v&&!il(r))return nl([new Mt("","data expressions not supported")]);const b=Au(d,["zoom"]);if(!b&&!Xh(r))return nl([new Mt("","zoom expressions not supported")]);const S=Ss(d);return S||b?S instanceof Mt?nl([S]):S instanceof hi&&!as(r)?nl([new Mt("",'"interpolate" expressions cannot be used with this property')]):ku(S?new Kl(v?"camera":"composite",l.value,S.labels,S instanceof hi?S.interpolation:void 0):new Wc(v?"constant":"source",l.value)):nl([new Mt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Yo{constructor(r,l){this._parameters=r,this._specification=l,Ot(this,Nh(this._parameters,this._specification))}static deserialize(r){return new Yo(r._parameters,r._specification)}static serialize(r){return{_parameters:r._parameters,_specification:r._specification}}}function Ss(u){let r=null;if(u instanceof mo)r=Ss(u.result);else if(u instanceof _o){for(const l of u.args)if(r=Ss(l),r)break}else(u instanceof qn||u instanceof hi)&&u.input instanceof sa&&u.input.name==="zoom"&&(r=u);return r instanceof Mt||u.eachChild(l=>{const d=Ss(l);d instanceof Mt?r=d:!r&&d?r=new Mt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&d&&r!==d&&(r=new Mt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}function Ql(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const r of u.slice(1))if(!Ql(r)&&typeof r!="boolean")return!1;return!0;default:return!0}}const Fh={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Du(u){if(u==null)return{filter:()=>!0,needGeometry:!1};Ql(u)||(u=sl(u));const r=wo(u,Fh);if(r.result==="error")throw new Error(r.value.map(l=>`${l.key}: ${l.message}`).join(", "));return{filter:(l,d,v)=>r.value.evaluate(l,d,{},v),needGeometry:Lu(u)}}function Ru(u,r){return u<r?-1:u>r?1:0}function Lu(u){if(!Array.isArray(u))return!1;if(u[0]==="within"||u[0]==="distance")return!0;for(let r=1;r<u.length;r++)if(Lu(u[r]))return!0;return!1}function sl(u){if(!u)return!0;const r=u[0];return u.length<=1?r!=="any":r==="=="?Ou(u[1],u[2],"=="):r==="!="?Jl(Ou(u[1],u[2],"==")):r==="<"||r===">"||r==="<="||r===">="?Ou(u[1],u[2],r):r==="any"?(l=u.slice(1),["any"].concat(l.map(sl))):r==="all"?["all"].concat(u.slice(1).map(sl)):r==="none"?["all"].concat(u.slice(1).map(sl).map(Jl)):r==="in"?Ec(u[1],u.slice(2)):r==="!in"?Jl(Ec(u[1],u.slice(2))):r==="has"?Mc(u[1]):r!=="!has"||Jl(Mc(u[1]));var l}function Ou(u,r,l){switch(u){case"$type":return[`filter-type-${l}`,r];case"$id":return[`filter-id-${l}`,r];default:return[`filter-${l}`,u,r]}}function Ec(u,r){if(r.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",r]];case"$id":return["filter-id-in",["literal",r]];default:return r.length>200&&!r.some(l=>typeof l!=typeof r[0])?["filter-in-large",u,["literal",r.sort(Ru)]]:["filter-in-small",u,["literal",r]]}}function Mc(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Jl(u){return["!",u]}function Pc(u){const r=typeof u;if(r==="number"||r==="boolean"||r==="string"||u==null)return JSON.stringify(u);if(Array.isArray(u)){let v="[";for(const b of u)v+=`${Pc(b)},`;return`${v}]`}const l=Object.keys(u).sort();let d="{";for(let v=0;v<l.length;v++)d+=`${JSON.stringify(l[v])}:${Pc(u[l[v]])},`;return`${d}}`}function Zh(u){let r="";for(const l of $e)r+=`/${Pc(u[l])}`;return r}function Xu(u){const r=u.value;return r?[new Xe(u.key,r,"constants have been deprecated as of v8")]:[]}function Vn(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function Ts(u){if(Array.isArray(u))return u.map(Ts);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const r={};for(const l in u)r[l]=Ts(u[l]);return r}return Vn(u)}function Hn(u){const r=u.key,l=u.value,d=u.valueSpec||{},v=u.objectElementValidators||{},b=u.style,S=u.styleSpec,W=u.validateSpec;let U=[];const A=br(l);if(A!=="object")return[new Xe(r,l,`object expected, ${A}
70 found`)];for(const X in l){const Z=X.split(".")[0],G=Su(d,Z)||d["*"];let H;if(Su(v,Z))H=v[Z];else if(Su(d,Z))H=W;else if(v["*"])H=v["*"];else{if(!d["*"]){U.push(new Xe(r,l[X],`unknown property "${X}"`));continue}H=W}U=U.concat(H({key:(r&&`${r}.`)+X,value:l[X],valueSpec:G,style:b,styleSpec:S,object:l,objectKey:X,validateSpec:W},l))}for(const X in d)v[X]||d[X].required&&d[X].default===void 0&&l[X]===void 0&&U.push(new Xe(r,l,`missing required property "${X}"`));return U}function Ic(u){const r=u.value,l=u.valueSpec,d=u.style,v=u.styleSpec,b=u.key,S=u.arrayElementValidator||u.validateSpec;if(br(r)!=="array")return[new Xe(b,r,`array expected, ${br(r)} found`)];if(l.length&&r.length!==l.length)return[new Xe(b,r,`array length ${l.length} expected, length ${r.length} found`)];if(l["min-length"]&&r.length<l["min-length"])return[new Xe(b,r,`array length at least ${l["min-length"]} expected, length ${r.length} found`)];let W={type:l.value,values:l.values};v.$version<7&&(W.function=l.function),br(l.value)==="object"&&(W=l.value);let U=[];for(let A=0;A<r.length;A++)U=U.concat(S({array:r,arrayIndex:A,value:r[A],valueSpec:W,validateSpec:u.validateSpec,style:d,styleSpec:v,key:`${b}[${A}]`}));return U}function Ws(u){const r=u.key,l=u.value,d=u.valueSpec;let v=br(l);return v==="number"&&l!=l&&(v="NaN"),v!=="number"?[new Xe(r,l,`number expected, ${v} found`)]:"minimum"in d&&l<d.minimum?[new Xe(r,l,`${l} is less than the minimum value ${d.minimum}`)]:"maximum"in d&&l>d.maximum?[new Xe(r,l,`${l} is greater than the maximum value ${d.maximum}`)]:[]}function Xa(u){const r=u.valueSpec,l=Vn(u.value.type);let d,v,b,S={};const W=l!=="categorical"&&u.value.property===void 0,U=!W,A=br(u.value.stops)==="array"&&br(u.value.stops[0])==="array"&&br(u.value.stops[0][0])==="object",X=Hn({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(H){if(l==="identity")return[new Xe(H.key,H.value,'identity function may not have a "stops" property')];let J=[];const te=H.value;return J=J.concat(Ic({key:H.key,value:te,valueSpec:H.valueSpec,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec,arrayElementValidator:Z})),br(te)==="array"&&te.length===0&&J.push(new Xe(H.key,te,"array must have at least one stop")),J},default:function(H){return H.validateSpec({key:H.key,value:H.value,valueSpec:r,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec})}}});return l==="identity"&&W&&X.push(new Xe(u.key,u.value,'missing required property "property"')),l==="identity"||u.value.stops||X.push(new Xe(u.key,u.value,'missing required property "stops"')),l==="exponential"&&u.valueSpec.expression&&!as(u.valueSpec)&&X.push(new Xe(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(U&&!il(u.valueSpec)?X.push(new Xe(u.key,u.value,"property functions not supported")):W&&!Xh(u.valueSpec)&&X.push(new Xe(u.key,u.value,"zoom functions not supported"))),l!=="categorical"&&!A||u.value.property!==void 0||X.push(new Xe(u.key,u.value,'"property" property is required')),X;function Z(H){let J=[];const te=H.value,ce=H.key;if(br(te)!=="array")return[new Xe(ce,te,`array expected, ${br(te)} found`)];if(te.length!==2)return[new Xe(ce,te,`array length 2 expected, length ${te.length} found`)];if(A){if(br(te[0])!=="object")return[new Xe(ce,te,`object expected, ${br(te[0])} found`)];if(te[0].zoom===void 0)return[new Xe(ce,te,"object stop key must have zoom")];if(te[0].value===void 0)return[new Xe(ce,te,"object stop key must have value")];if(b&&b>Vn(te[0].zoom))return[new Xe(ce,te[0].zoom,"stop zoom values must appear in ascending order")];Vn(te[0].zoom)!==b&&(b=Vn(te[0].zoom),v=void 0,S={}),J=J.concat(Hn({key:`${ce}[0]`,value:te[0],valueSpec:{zoom:{}},validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec,objectElementValidators:{zoom:Ws,value:G}}))}else J=J.concat(G({key:`${ce}[0]`,value:te[0],validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec},te));return bo(Ts(te[1]))?J.concat([new Xe(`${ce}[1]`,te[1],"expressions are not allowed in function stops.")]):J.concat(H.validateSpec({key:`${ce}[1]`,value:te[1],valueSpec:r,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec}))}
vendor: 9,782 bytes, lines 70-71
70function G(H,J){const te=br(H.value),ce=Vn(H.value),ve=H.value!==null?H.value:J;if(d){if(te!==d)return[new Xe(H.key,ve,`${te} stop domain type must match previous stop domain type ${d}`)]}else d=te;if(te!=="number"&&te!=="string"&&te!=="boolean")return[new Xe(H.key,ve,"stop domain value must be a number, string, or boolean")];if(te!=="number"&&l!=="categorical"){let Ae=`number expected, ${te} found`;return il(r)&&l===void 0&&(Ae+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Xe(H.key,ve,Ae)]}return l!=="categorical"||te!=="number"||isFinite(ce)&&Math.floor(ce)===ce?l!=="categorical"&&te==="number"&&v!==void 0&&ce<v?[new Xe(H.key,ve,"stop domain values must appear in ascending order")]:(v=ce,l==="categorical"&&ce in S?[new Xe(H.key,ve,"stop domain values must be unique")]:(S[ce]=!0,[])):[new Xe(H.key,ve,`integer expected, found ${ce}`)]}}function oa(u){const r=(u.expressionContext==="property"?al:wo)(Ts(u.value),u.valueSpec);if(r.result==="error")return r.value.map(d=>new Xe(`${u.key}${d.key}`,u.value,d.message));const l=r.value.expression||r.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!l.outputDefined())return[new Xe(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if(u.expressionContext==="property"&&u.propertyType==="layout"&&!Gl(l))return[new Xe(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!Gl(l))return[new Xe(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!Au(l,["zoom","feature-state"]))return[new Xe(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!rl(l))return[new Xe(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function ss(u){const r=u.key,l=u.value,d=br(l);return d!=="string"?[new Xe(r,l,`color expected, ${d} found`)]:Mr.parse(String(l))?[]:[new Xe(r,l,`color expected, "${l}" found`)]}function ol(u){const r=u.key,l=u.value,d=u.valueSpec,v=[];return Array.isArray(d.values)?d.values.indexOf(Vn(l))===-1&&v.push(new Xe(r,l,`expected one of [${d.values.join(", ")}], ${JSON.stringify(l)} found`)):Object.keys(d.values).indexOf(Vn(l))===-1&&v.push(new Xe(r,l,`expected one of [${Object.keys(d.values).join(", ")}], ${JSON.stringify(l)} found`)),v}function jh(u){return Ql(Ts(u.value))?oa(Ot({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):nf(u)}function nf(u){const r=u.value,l=u.key;if(br(r)!=="array")return[new Xe(l,r,`array expected, ${br(r)} found`)];const d=u.styleSpec;let v,b=[];if(r.length<1)return[new Xe(l,r,"filter array must have at least 1 element")];switch(b=b.concat(ol({key:`${l}[0]`,value:r[0],valueSpec:d.filter_operator,style:u.style,styleSpec:u.styleSpec})),Vn(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&Vn(r[1])==="$type"&&b.push(new Xe(l,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":r.length!==3&&b.push(new Xe(l,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&(v=br(r[1]),v!=="string"&&b.push(new Xe(`${l}[1]`,r[1],`string expected, ${v} found`)));for(let S=2;S<r.length;S++)v=br(r[S]),Vn(r[1])==="$type"?b=b.concat(ol({key:`${l}[${S}]`,value:r[S],valueSpec:d.geometry_type,style:u.style,styleSpec:u.styleSpec})):v!=="string"&&v!=="number"&&v!=="boolean"&&b.push(new Xe(`${l}[${S}]`,r[S],`string, number, or boolean expected, ${v} found`));break;case"any":case"all":case"none":for(let S=1;S<r.length;S++)b=b.concat(nf({key:`${l}[${S}]`,value:r[S],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":v=br(r[1]),r.length!==2?b.push(new Xe(l,r,`filter array for "${r[0]}" operator must have 2 elements`)):v!=="string"&&b.push(new Xe(`${l}[1]`,r[1],`string expected, ${v} found`))}return b}function So(u,r){const l=u.key,d=u.validateSpec,v=u.style,b=u.styleSpec,S=u.value,W=u.objectKey,U=b[`${r}_${u.layerType}`];if(!U)return[];const A=W.match(/^(.*)-transition$/);if(r==="paint"&&A&&U[A[1]]&&U[A[1]].transition)return d({key:l,value:S,valueSpec:b.transition,style:v,styleSpec:b});const X=u.valueSpec||U[W];if(!X)return[new Xe(l,S,`unknown property "${W}"`)];let Z;if(br(S)==="string"&&il(X)&&!X.tokens&&(Z=/^{([^}]+)}$/.exec(S)))return[new Xe(l,S,`"${W}" does not support interpolation syntax 71Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(Z[1])} }\`.`)];const G=[];return u.layerType==="symbol"&&(W==="text-field"&&v&&!v.glyphs&&G.push(new Xe(l,S,'use of "text-field" requires a style "glyphs" property')),W==="text-font"&&ql(Ts(S))&&Vn(S.type)==="identity"&&G.push(new Xe(l,S,'"text-font" does not support identity functions'))),G.concat(d({key:u.key,value:S,valueSpec:X,style:v,styleSpec:b,expressionContext:"property",propertyType:r,propertyKey:W}))}function eu(u){return So(u,"paint")}function os(u){return So(u,"layout")}function Gs(u){let r=[];const l=u.value,d=u.key,v=u.style,b=u.styleSpec;if(br(l)!=="object")return[new Xe(d,l,`object expected, ${br(l)} found`)];l.type||l.ref||r.push(new Xe(d,l,'either "type" or "ref" is required'));let S=Vn(l.type);const W=Vn(l.ref);if(l.id){const U=Vn(l.id);for(let A=0;A<u.arrayIndex;A++){const X=v.layers[A];Vn(X.id)===U&&r.push(new Xe(d,l.id,`duplicate layer id "${l.id}", previously used at line ${X.id.__line__}`))}}if("ref"in l){let U;["type","source","source-layer","filter","layout"].forEach(A=>{A in l&&r.push(new Xe(d,l[A],`"${A}" is prohibited for ref layers`))}),v.layers.forEach(A=>{Vn(A.id)===W&&(U=A)}),U?U.ref?r.push(new Xe(d,l.ref,"ref cannot reference another ref layer")):S=Vn(U.type):r.push(new Xe(d,l.ref,`ref layer "${W}" not found`))}else if(S!=="background")if(l.source){const U=v.sources&&v.sources[l.source],A=U&&Vn(U.type);U?A==="vector"&&S==="raster"?r.push(new Xe(d,l.source,`layer "${l.id}" requires a raster source`)):A!=="raster-dem"&&S==="hillshade"?r.push(new Xe(d,l.source,`layer "${l.id}" requires a raster-dem source`)):A==="raster"&&S!=="raster"?r.push(new Xe(d,l.source,`layer "${l.id}" requires a vector source`)):A!=="vector"||l["source-layer"]?A==="raster-dem"&&S!=="hillshade"?r.push(new Xe(d,l.source,"raster-dem source can only be used with layer type 'hillshade'.")):S!=="line"||!l.paint||!l.paint["line-gradient"]||A==="geojson"&&U.lineMetrics||r.push(new Xe(d,l,`layer "${l.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):r.push(new Xe(d,l,`layer "${l.id}" must specify a "source-layer"`)):r.push(new Xe(d,l.source,`source "${l.source}" not found`))}else r.push(new Xe(d,l,'missing required property "source"'));return r=r.concat(Hn({key:d,value:l,valueSpec:b.layer,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":()=>[],type:()=>u.validateSpec({key:`${d}.type`,value:l.type,valueSpec:b.layer.type,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,object:l,objectKey:"type"}),filter:jh,layout:U=>Hn({layer:l,key:U.key,value:U.value,style:U.style,styleSpec:U.styleSpec,validateSpec:U.validateSpec,objectElementValidators:{"*":A=>os(Ot({layerType:S},A))}}),paint:U=>Hn({layer:l,key:U.key,value:U.value,style:U.style,styleSpec:U.styleSpec,validateSpec:U.validateSpec,objectElementValidators:{"*":A=>eu(Ot({layerType:S},A))}})}})),r}function zn(u){const r=u.value,l=u.key,d=br(r);return d!=="string"?[new Xe(l,r,`string expected, ${d} found`)]:[]}const ls={promoteId:function({key:u,value:r}){if(br(r)==="string")return zn({key:u,value:r});{const l=[];for(const d in r)l.push(...zn({key:`${u}.${d}`,value:r[d]}));return l}}};function Es(u){const r=u.value,l=u.key,d=u.styleSpec,v=u.style,b=u.validateSpec;if(!r.type)return[new Xe(l,r,'"type" is required')];const S=Vn(r.type);let W;switch(S){case"vector":case"raster":return W=Hn({key:l,value:r,valueSpec:d[`source_${S.replace("-","_")}`],style:u.style,styleSpec:d,objectElementValidators:ls,validateSpec:b}),W;case"raster-dem":return W=function(U){var A;const X=(A=U.sourceName)!==null&&A!==void 0?A:"",Z=U.value,G=U.styleSpec,H=G.source_raster_dem,J=U.style;let te=[];const ce=br(Z);if(Z===void 0)return te;if(ce!=="object")return te.push(new Xe("source_raster_dem",Z,`object expected, ${ce} found`)),te;const ve=Vn(Z.encoding)==="custom",Ae=["redFactor","greenFactor","blueFactor","baseShift"],Ye=U.value.encoding?`"${U.value.encoding}"`:"Default";for(const q in Z)!ve&&Ae.includes(q)?te.push(new Xe(q,Z[q],`In "${X}": "${q}" is only valid when "encoding" is set to "custom". ${Ye} encoding found`)):H[q]?te=te.concat(U.validateSpec({key:q,value:Z[q],valueSpec:H[q],validateSpec:U.validateSpec,style:J,styleSpec:G})):te.push(new Xe(q,Z[q],`unknown property "${q}"`));return te}({sourceName:l,value:r,style:u.style,styleSpec:d,validateSpec:b}),W;case"geojson":if(W=Hn({key:l,value:r,valueSpec:d.source_geojson,style:v,styleSpec:d,validateSpec:b,objectElementValidators:ls}),r.cluster)for(const U in r.clusterProperties){const[A,X]=r.clusterProperties[U],Z=typeof A=="string"?[A,["accumulated"],["get",U]]:A;W.push(...oa({key:`${l}.${U}.map`,value:X,expressionContext:"cluster-map"})),W.push(...oa({key:`${l}.${U}.reduce`,value:Z,expressionContext:"cluster-reduce"}))}return W;case"video":return Hn({key:l,value:r,valueSpec:d.source_video,style:v,validateSpec:b,styleSpec:d});case"image":return Hn({key:l,value:r,valueSpec:d.source_image,style:v,validateSpec:b,styleSpec:d});case"canvas":return[new Xe(l,null,"Please use runtime APIs to add canvas sources, rather than
71including them in stylesheets.","source.canvas")];default:return ol({key:`${l}.type`,value:r.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function hn(u){const r=u.value,l=u.styleSpec,d=l.light,v=u.style;let b=[];const S=br(r);if(r===void 0)return b;if(S!=="object")return b=b.concat([new Xe("light",r,`object expected, ${S} found`)]),b;for(const W in r){const U=W.match(/^(.*)-transition$/);b=b.concat(U&&d[U[1]]&&d[U[1]].transition?u.validateSpec({key:W,value:r[W],valueSpec:l.transition,validateSpec:u.validateSpec,style:v,styleSpec:l}):d[W]?u.validateSpec({key:W,value:r[W],valueSpec:d[W],validateSpec:u.validateSpec,style:v,styleSpec:l}):[new Xe(W,r[W],`unknown property "${W}"`)])}return b}function on(u){const r=u.value,l=u.styleSpec,d=l.sky,v=u.style,b=br(r);if(r===void 0)return[];if(b!=="object")return[new Xe("sky",r,`object expected, ${b} found`)];let S=[];for(const W in r)S=S.concat(d[W]?u.validateSpec({key:W,value:r[W],valueSpec:d[W],style:v,styleSpec:l}):[new Xe(W,r[W],`unknown property "${W}"`)]);return S}function Sa(u){const r=u.value,l=u.styleSpec,d=l.terrain,v=u.style;let b=[];const S=br(r);if(r===void 0)return b;if(S!=="object")return b=b.concat([new Xe("terrain",r,`object expected, ${S} found`)]),b;for(const W in r)b=b.concat(d[W]?u.validateSpec({key:W,value:r[W],valueSpec:d[W],validateSpec:u.validateSpec,style:v,styleSpec:l}):[new Xe(W,r[W],`unknown property "${W}"`)]);return b}function di(u){let r=[];const l=u.value,d=u.key;if(Array.isArray(l)){const v=[],b=[];for(const S in l)l[S].id&&v.includes(l[S].id)&&r.push(new Xe(d,l,`all the sprites' ids must be unique, but ${l[S].id} is duplicated`)),v.push(l[S].id),l[S].url&&b.includes(l[S].url)&&r.push(new Xe(d,l,`all the sprites' URLs must be unique, but ${l[S].url} is duplicated`)),b.push(l[S].url),r=r.concat(Hn({key:`${d}[${S}]`,value:l[S],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:u.validateSpec}));return r}return zn({key:d,value:l})}function Wi(u){return r=u.value,r&&r.constructor===Object?[]:[new Xe(u.key,u.value,`object expected, ${br(u.value)} found`)];var r}const To={"*":()=>[],array:Ic,boolean:function(u){const r=u.value,l=u.key,d=br(r);return d!=="boolean"?[new Xe(l,r,`boolean expected, ${d} found`)]:[]},number:Ws,color:ss,constants:Xu,enum:ol,filter:jh,function:Xa,layer:Gs,object:Hn,source:Es,light:hn,sky:on,terrain:Sa,projection:function(u){const r=u.value,l=u.styleSpec,d=l.projection,v=u.style,b=br(r);if(r===void 0)return[];if(b!=="object")return[new Xe("projection",r,`object expected, ${b} found`)];let S=[];for(const W in r)S=S.concat(d[W]?u.validateSpec({key:W,value:r[W],valueSpec:d[W],style:v,styleSpec:l}):[new Xe(W,r[W],`unknown property "${W}"`)]);return S},projectionDefinition:function(u){const r=u.key;let l=u.value;l=l instanceof String?l.valueOf():l;const d=br(l);return d!=="array"||function(v){return Array.isArray(v)&&v.length===3&&typeof v[0]=="string"&&typeof v[1]=="string"&&typeof v[2]=="number"}(l)||function(v){return!!["interpolate","step","literal"].includes(v[0])}(l)?["array","string"].includes(d)?[]:[new Xe(r,l,`projection expected, invalid type "${d}" found`)]:[new Xe(r,l,`projection expected, invalid array ${JSON.stringify(l)} found`)]},string:zn,formatted:function(u){return zn(u).length===0?[]:oa(u)},resolvedImage:function(u){return zn(u).length===0?[]:oa(u)},padding:function(u){const r=u.key,l=u.value;if(br(l)==="array"){if(l.length<1||l.length>4)return[new Xe(r,l,`padding requires 1 to 4 values; ${l.length} values found`)];const d={type:"number"};let v=[];for(let b=0;b<l.length;b++)v=v.concat(u.validateSpec({key:`${r}[${b}]`,value:l[b],validateSpec:u.validateSpec,valueSpec:d}));return v}return Ws({key:r,value:l,valueSpec:{}})},numberArray:function(u){const r=u.key,l=u.value;if(br(l)==="array"){const d={type:"number"};if(l.length<1)return[new Xe(r,l,"array length at least 1 expected, length 0 found")];let v=[];for(let b=0;b<l.length;b++)v=v.concat(u.validateSpec({key:`${r}[${b}]`,value:l[b],validateSpec:u.validateSpec,valueSpec:d}));return v}
vendor: 11,514 bytes, line 71
71return Ws({key:r,value:l,valueSpec:{}})},colorArray:function(u){const r=u.key,l=u.value;if(br(l)==="array"){if(l.length<1)return[new Xe(r,l,"array length at least 1 expected, length 0 found")];let d=[];for(let v=0;v<l.length;v++)d=d.concat(ss({key:`${r}[${v}]`,value:l[v]}));return d}return ss({key:r,value:l})},variableAnchorOffsetCollection:function(u){const r=u.key,l=u.value,d=br(l),v=u.styleSpec;if(d!=="array"||l.length<1||l.length%2!=0)return[new Xe(r,l,"variableAnchorOffsetCollection requires a non-empty array of even length")];let b=[];for(let S=0;S<l.length;S+=2)b=b.concat(ol({key:`${r}[${S}]`,value:l[S],valueSpec:v.layout_symbol["text-anchor"]})),b=b.concat(Ic({key:`${r}[${S+1}]`,value:l[S+1],valueSpec:{length:2,value:"number"},validateSpec:u.validateSpec,style:u.style,styleSpec:v}));return b},sprite:di,state:Wi};function us(u){const r=u.value,l=u.valueSpec,d=u.styleSpec;return u.validateSpec=us,l.expression&&ql(Vn(r))?Xa(u):l.expression&&bo(Ts(r))?oa(u):l.type&&To[l.type]?To[l.type](u):Hn(Ot({},u,{valueSpec:l.type?d[l.type]:l}))}function $i(u){const r=u.value,l=u.key,d=zn(u);return d.length||(r.indexOf("{fontstack}")===-1&&d.push(new Xe(l,r,'"glyphs" url must include a "{fontstack}" token')),r.indexOf("{range}")===-1&&d.push(new Xe(l,r,'"glyphs" url must include a "{range}" token'))),d}function ai(u,r=ue){let l=[];return l=l.concat(us({key:"",value:u,valueSpec:r.$root,styleSpec:r,style:u,validateSpec:us,objectElementValidators:{glyphs:$i,"*":()=>[]}})),u.constants&&(l=l.concat(Xu({key:"constants",value:u.constants}))),ll(l)}function Na(u){return function(r){return u({...r,validateSpec:us})}}function ll(u){return[].concat(u).sort((r,l)=>r.line-l.line)}function la(u){return function(...r){return ll(u.apply(this,r))}}ai.source=la(Na(Es)),ai.sprite=la(Na(di)),ai.glyphs=la(Na($i)),ai.light=la(Na(hn)),ai.sky=la(Na(on)),ai.terrain=la(Na(Sa)),ai.state=la(Na(Wi)),ai.layer=la(Na(Gs)),ai.filter=la(Na(jh)),ai.paintProperty=la(Na(eu)),ai.layoutProperty=la(Na(os));const ul=ai,za=ul.light,Uc=ul.sky,Nu=ul.paintProperty,zu=ul.layoutProperty;function Bh(u,r){let l=!1;if(r&&r.length)for(const d of r)u.fire(new we(new Error(d.message))),l=!0;return l}class Ta{constructor(r,l,d){const v=this.cells=[];if(r instanceof ArrayBuffer){this.arrayBuffer=r;const S=new Int32Array(this.arrayBuffer);r=S[0],this.d=(l=S[1])+2*(d=S[2]);for(let U=0;U<this.d*this.d;U++){const A=S[3+U],X=S[3+U+1];v.push(A===X?null:S.subarray(A,X))}const W=S[3+v.length+1];this.keys=S.subarray(S[3+v.length],W),this.bboxes=S.subarray(W),this.insert=this._insertReadonly}else{this.d=l+2*d;for(let S=0;S<this.d*this.d;S++)v.push([]);this.keys=[],this.bboxes=[]}this.n=l,this.extent=r,this.padding=d,this.scale=l/r,this.uid=0;const b=d/l*r;this.min=-b,this.max=r+b}insert(r,l,d,v,b){this._forEachCell(l,d,v,b,this._insertCell,this.uid++,void 0,void 0),this.keys.push(r),this.bboxes.push(l),this.bboxes.push(d),this.bboxes.push(v),this.bboxes.push(b)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(r,l,d,v,b,S){this.cells[b].push(S)}query(r,l,d,v,b){const S=this.min,W=this.max;if(r<=S&&l<=S&&W<=d&&W<=v&&!b)return Array.prototype.slice.call(this.keys);{const U=[];return this._forEachCell(r,l,d,v,this._queryCell,U,{},b),U}}_queryCell(r,l,d,v,b,S,W,U){const A=this.cells[b];if(A!==null){const X=this.keys,Z=this.bboxes;for(let G=0;G<A.length;G++){const H=A[G];if(W[H]===void 0){const J=4*H;(U?U(Z[J+0],Z[J+1],Z[J+2],Z[J+3]):r<=Z[J+2]&&l<=Z[J+3]&&d>=Z[J+0]&&v>=Z[J+1])?(W[H]=!0,S.push(X[H])):W[H]=!1}}}}_forEachCell(r,l,d,v,b,S,W,U){const A=this._convertToCellCoord(r),X=this._convertToCellCoord(l),Z=this._convertToCellCoord(d),G=this._convertToCellCoord(v);for(let H=A;H<=Z;H++)for(let J=X;J<=G;J++){const te=this.d*J+H;if((!U||U(this._convertFromCellCoord(H),this._convertFromCellCoord(J),this._convertFromCellCoord(H+1),this._convertFromCellCoord(J+1)))&&b.call(this,r,l,d,v,te,S,W,U))return}}_convertFromCellCoord(r){return(r-this.padding)/this.scale}_convertToCellCoord(r){return Math.max(0,Math.min(this.d-1,Math.floor(r*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const r=this.cells,l=3+this.cells.length+1+1;let d=0;for(let S=0;S<this.cells.length;S++)d+=this.cells[S].length;const v=new Int32Array(l+d+this.keys.length+this.bboxes.length);v[0]=this.extent,v[1]=this.n,v[2]=this.padding;let b=l;for(let S=0;S<r.length;S++){const W=r[S];v[3+S]=b,v.set(W,b),b+=W.length}return v[3+r.length]=b,v.set(this.keys,b),b+=this.keys.length,v[3+r.length+1]=b,v.set(this.bboxes,b),b+=this.bboxes.length,v.buffer}static serialize(r,l){const d=r.toArrayBuffer();return l&&l.push(d),{buffer:d}}static deserialize(r){return new Ta(r.buffer)}}const Gi={};function Xt(u,r,l={}){if(Gi[u])throw new Error(`${u} is already registered.`);Object.defineProperty(r,"_classRegistryKey",{value:u,writeable:!1}),Gi[u]={klass:r,omit:l.omit||[],shallow:l.shallow||[]}}Xt("Object",Object),Xt("TransferableGridIndex",Ta),Xt("Color",Mr),Xt("Error",Error),Xt("AJAXError",ci),Xt("ResolvedImage",Ti),Xt("StylePropertyFunction",Yo),Xt("StyleExpression",Hl,{omit:["_evaluator"]}),Xt("ZoomDependentExpression",Kl),Xt("ZoomConstantExpression",Wc),Xt("CompoundExpression",sa,{omit:["_evaluate"]});for(const u in Ys)Ys[u]._classRegistryKey||Xt(`Expression_${u}`,Ys[u]);function cl(u){return u&&typeof ArrayBuffer<"u"&&(u instanceof ArrayBuffer||u.constructor&&u.constructor.name==="ArrayBuffer")}function hl(u){return u.$name||u.constructor._classRegistryKey}function Wa(u){return!function(r){if(r===null||typeof r!="object")return!1;const l=hl(r);return!(!l||l==="Object")}(u)&&(u==null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof Error||cl(u)||hr(u)||ArrayBuffer.isView(u)||u instanceof ImageData)}function Ei(u,r){if(Wa(u))return(cl(u)||hr(u))&&r&&r.push(u),ArrayBuffer.isView(u)&&r&&r.push(u.buffer),u instanceof ImageData&&r&&r.push(u.data.buffer),u;if(Array.isArray(u)){const b=[];for(const S of u)b.push(Ei(S,r));return b}if(typeof u!="object")throw new Error("can't serialize object of type "+typeof u);const l=hl(u);if(!l)throw new Error(`can't serialize object of unregistered class ${u.constructor.name}`);if(!Gi[l])throw new Error(`${l} is not registered.`);const{klass:d}=Gi[l],v=d.serialize?d.serialize(u,r):{};if(d.serialize){if(r&&v===r[r.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const b in u){if(!u.hasOwnProperty(b)||Gi[l].omit.indexOf(b)>=0)continue;const S=u[b];v[b]=Gi[l].shallow.indexOf(b)>=0?S:Ei(S,r)}u instanceof Error&&(v.message=u.message)}if(v.$name)throw new Error("$name property is reserved for worker serialization logic.");return l!=="Object"&&(v.$name=l),v}function cs(u){if(Wa(u))return u;if(Array.isArray(u))return u.map(cs);if(typeof u!="object")throw new Error("can't deserialize object of type "+typeof u);const r=hl(u)||"Object";if(!Gi[r])throw new Error(`can't deserialize unregistered class ${r}`);const{klass:l}=Gi[r];if(!l)throw new Error(`can't deserialize unregistered class ${r}`);if(l.deserialize)return l.deserialize(u);const d=Object.create(l.prototype);for(const v of Object.keys(u)){if(v==="$name")continue;const b=u[v];d[v]=Gi[r].shallow.indexOf(v)>=0?b:cs(b)}return d}class hs{constructor(){this.first=!0}update(r,l){const d=Math.floor(r);return this.first?(this.first=!1,this.lastIntegerZoom=d,this.lastIntegerZoomTime=0,this.lastZoom=r,this.lastFloorZoom=d,!0):(this.lastFloorZoom>d?(this.lastIntegerZoom=d+1,this.lastIntegerZoomTime=l):this.lastFloorZoom<d&&(this.lastIntegerZoom=d,this.lastIntegerZoomTime=l),r!==this.lastZoom&&(this.lastZoom=r,this.lastFloorZoom=d,!0))}}const pr={"Latin-1 Supplement":u=>u>=128&&u<=255,"Hangul Jamo":u=>u>=4352&&u<=4607,Khmer:u=>u>=6016&&u<=6143,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Hiragana:u=>u>=12352&&u<=12447,Katakana:u=>u>=12448&&u<=12543,Kanbun:u=>u>=12688&&u<=12703,"CJK Strokes":u=>u>=12736&&u<=12783,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"CJK Unified Ideographs":u=>u>=19968&&u<=40959,"Hangul Syllables":u=>u>=44032&&u<=55215,"Private Use Area":u=>u>=57344&&u<=63743,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function Ms(u){for(const r of u)if(ln(r.charCodeAt(0)))return!0;return!1}function af(u){for(const r of u)if(!ua(r.charCodeAt(0)))return!1;return!0}function Fu(u){const r=u.map(l=>{try{return new RegExp(`\\p{sc=${l}}`,"u").source}catch{return null}}).filter(l=>l);return new RegExp(r.join("|"),"u")}const Cc=Fu(["Arab","Dupl","Mong","Ougr","Syrc"]);function ua(u){return!Cc.test(String.fromCodePoint(u))}const qi=Fu(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ln(u){return!(u!==746&&u!==747&&(u<4352||!(pr["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||pr["CJK Compatibility"](u)||pr["CJK Strokes"](u)||!(!pr["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||u===12336)||pr["Enclosed CJK Letters and Months"](u)||pr["Ideographic Description Characters"](u)||pr.Kanbun(u)||pr.Katakana(u)&&u!==12540||!(!pr["Halfwidth and Fullwidth Forms"](u)||u===65288||u===65289||u===65293||u>=65306&&u<=65310||u===65339||u===65341||u===65343||u>=65371&&u<=65503||u===65507||u>=65512&&u<=65519)||!(!pr["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||pr["Vertical Forms"](u)||pr["Yijing Hexagram Symbols"](u)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(u))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(u))||qi.test(String.fromCodePoint(u)))))}function Hi(u){return!(ln(u)||function(r){return!!(pr["Latin-1 Supplement"](r)&&(r===167||r===169||r===174||r===177||r===188||r===189||r===190||r===215||r===247)||pr["General Punctuation"](r)&&(r===8214||r===8224||r===8225||r===8240||r===8241||r===8251||r===8252||r===8258||r===8263||r===8264||r===8265||r===8273)||pr["Letterlike Symbols"](r)||pr["Number Forms"](r)||pr["Miscellaneous Technical"](r)&&(r>=8960&&r<=8967||r>=8972&&r<=8991||r>=8996&&r<=9e3||r===9003||r>=9085&&r<=9114||r>=9150&&r<=9165||r===9167||r>=9169&&r<=9179||r>=9186&&r<=9215)||pr["Control Pictures"](r)&&r!==9251||pr["Optical Character Recognition"](r)||pr["Enclosed Alphanumerics"](r)||pr["Geometric Shapes"](r)||pr["Miscellaneous Symbols"](r)&&!(r>=9754&&r<=9759)||pr["Miscellaneous Symbols and Arrows"](r)&&(r>=11026&&r<=11055||r>=11088&&r<=11097||r>=11192&&r<=11243)||pr["CJK Symbols and Punctuation"](r)||pr.Katakana(r)||pr["Private Use Area"](r)||pr["CJK Compatibility Forms"](r)||pr["Small Form Variants"](r)||pr["Halfwidth and Fullwidth Forms"](r)||r===8734||r===8756||r===8757||r>=9984&&r<=10087||r>=10102&&r<=10131||r===65532||r===65533)}(u))}
vendor: 16,738 bytes, line 71
71const sf=Fu(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Zu(u){return sf.test(String.fromCodePoint(u))}function $h(u,r){return!(!r&&Zu(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||pr.Khmer(u))}function Gh(u){for(const r of u)if(Zu(r.charCodeAt(0)))return!0;return!1}const Ps=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(u){this.pluginStatus=u.pluginStatus,this.pluginURL=u.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(u){if(Ps.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=u.applyArabicShaping,this.processBidirectionalText=u.processBidirectionalText,this.processStyledBidirectionalText=u.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(u,r){return s(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(u.pluginStatus!=="loading")return this.setState(u),u;const l=u.pluginURL,d=new Promise(b=>{this.loadScriptResolve=b});r(l);const v=new Promise(b=>setTimeout(()=>b(),this.TIMEOUT));if(yield Promise.race([d,v]),this.isParsed()){const b={pluginStatus:"loaded",pluginURL:l};return this.setState(b),b}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${l}`)})}};class en{constructor(r,l){this.zoom=r,l?(this.now=l.now,this.fadeDuration=l.fadeDuration,this.zoomHistory=l.zoomHistory,this.transition=l.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new hs,this.transition={})}isSupportedScript(r){return function(l,d){for(const v of l)if(!$h(v.charCodeAt(0),d))return!1;return!0}(r,Ps.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const r=this.zoom,l=r-Math.floor(r),d=this.crossFadingFactor();return r>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:l+(1-l)*d}:{fromScale:.5,toScale:1,t:1-(1-d)*l}}}class tu{constructor(r,l){this.property=r,this.value=l,this.expression=function(d,v){if(ql(d))return new Yo(d,v);if(bo(d)){const b=al(d,v);if(b.result==="error")throw new Error(b.value.map(S=>`${S.key}: ${S.message}`).join(", "));return b.value}{let b=d;return v.type==="color"&&typeof d=="string"?b=Mr.parse(d):v.type!=="padding"||typeof d!="number"&&!Array.isArray(d)?v.type!=="numberArray"||typeof d!="number"&&!Array.isArray(d)?v.type!=="colorArray"||typeof d!="string"&&!Array.isArray(d)?v.type==="variableAnchorOffsetCollection"&&Array.isArray(d)?b=Di.parse(d):v.type==="projectionDefinition"&&typeof d=="string"&&(b=aa.parse(d)):b=Xn.parse(d):b=gn.parse(d):b=Yn.parse(d),{kind:"constant",evaluate:()=>b}}}(l===void 0?r.specification.default:l,r.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(r,l,d){return this.property.possiblyEvaluate(this,r,l,d)}}class Wo{constructor(r){this.property=r,this.value=new tu(r,void 0)}transitioned(r,l){return new of(this.property,this.value,l,or({},r.transition,this.transition),r.now)}untransitioned(){return new of(this.property,this.value,null,{},0)}}class Vc{constructor(r){this._properties=r,this._values=Object.create(r.defaultTransitionablePropertyValues)}getValue(r){return Gr(this._values[r].value.value)}setValue(r,l){Object.prototype.hasOwnProperty.call(this._values,r)||(this._values[r]=new Wo(this._values[r].property)),this._values[r].value=new tu(this._values[r].property,l===null?void 0:Gr(l))}getTransition(r){return Gr(this._values[r].transition)}setTransition(r,l){Object.prototype.hasOwnProperty.call(this._values,r)||(this._values[r]=new Wo(this._values[r].property)),this._values[r].transition=Gr(l)||void 0}serialize(){const r={};for(const l of Object.keys(this._values)){const d=this.getValue(l);d!==void 0&&(r[l]=d);const v=this.getTransition(l);v!==void 0&&(r[`${l}-transition`]=v)}return r}transitioned(r,l){const d=new ru(this._properties);for(const v of Object.keys(this._values))d._values[v]=this._values[v].transitioned(r,l._values[v]);return d}untransitioned(){const r=new ru(this._properties);for(const l of Object.keys(this._values))r._values[l]=this._values[l].untransitioned();return r}}class of{constructor(r,l,d,v,b){this.property=r,this.value=l,this.begin=b+v.delay||0,this.end=this.begin+v.duration||0,r.specification.transition&&(v.delay||v.duration)&&(this.prior=d)}possiblyEvaluate(r,l,d){const v=r.now||0,b=this.value.possiblyEvaluate(r,l,d),S=this.prior;if(S){if(v>this.end)return this.prior=null,b;if(this.value.isDataDriven())return this.prior=null,b;if(v<this.begin)return S.possiblyEvaluate(r,l,d);{const W=(v-this.begin)/(this.end-this.begin);return this.property.interpolate(S.possiblyEvaluate(r,l,d),b,pt(W))}}return b}}class ru{constructor(r){this._properties=r,this._values=Object.create(r.defaultTransitioningPropertyValues)}possiblyEvaluate(r,l,d){const v=new ju(this._properties);for(const b of Object.keys(this._values))v._values[b]=this._values[b].possiblyEvaluate(r,l,d);return v}hasTransition(){for(const r of Object.keys(this._values))if(this._values[r].prior)return!0;return!1}}class Ac{constructor(r){this._properties=r,this._values=Object.create(r.defaultPropertyValues)}hasValue(r){return this._values[r].value!==void 0}getValue(r){return Gr(this._values[r].value)}setValue(r,l){this._values[r]=new tu(this._values[r].property,l===null?void 0:Gr(l))}serialize(){const r={};for(const l of Object.keys(this._values)){const d=this.getValue(l);d!==void 0&&(r[l]=d)}return r}possiblyEvaluate(r,l,d){const v=new ju(this._properties);for(const b of Object.keys(this._values))v._values[b]=this._values[b].possiblyEvaluate(r,l,d);return v}}class Li{constructor(r,l,d){this.property=r,this.value=l,this.parameters=d}isConstant(){return this.value.kind==="constant"}constantOr(r){return this.value.kind==="constant"?this.value.value:r}evaluate(r,l,d,v){return this.property.evaluate(this.value,this.parameters,r,l,d,v)}}class ju{constructor(r){this._properties=r,this._values=Object.create(r.defaultPossiblyEvaluatedValues)}get(r){return this._values[r]}}class Zt{constructor(r){this.specification=r}possiblyEvaluate(r,l){if(r.isDataDriven())throw new Error("Value should not be data driven");return r.expression.evaluate(l)}interpolate(r,l,d){const v=Ya[this.specification.type];return v?v(r,l,d):r}}class ir{constructor(r,l){this.specification=r,this.overrides=l}possiblyEvaluate(r,l,d,v){return new Li(this,r.expression.kind==="constant"||r.expression.kind==="camera"?{kind:"constant",value:r.expression.evaluate(l,null,{},d,v)}:r.expression,l)}interpolate(r,l,d){if(r.value.kind!=="constant"||l.value.kind!=="constant")return r;if(r.value.value===void 0||l.value.value===void 0)return new Li(this,{kind:"constant",value:void 0},r.parameters);const v=Ya[this.specification.type];if(v){const b=v(r.value.value,l.value.value,d);return new Li(this,{kind:"constant",value:b},r.parameters)}return r}evaluate(r,l,d,v,b,S){return r.kind==="constant"?r.value:r.evaluate(l,d,v,b,S)}}class Eo extends ir{possiblyEvaluate(r,l,d,v){if(r.value===void 0)return new Li(this,{kind:"constant",value:void 0},l);if(r.expression.kind==="constant"){const b=r.expression.evaluate(l,null,{},d,v),S=r.property.specification.type==="resolvedImage"&&typeof b!="string"?b.name:b,W=this._calculate(S,S,S,l);return new Li(this,{kind:"constant",value:W},l)}if(r.expression.kind==="camera"){const b=this._calculate(r.expression.evaluate({zoom:l.zoom-1}),r.expression.evaluate({zoom:l.zoom}),r.expression.evaluate({zoom:l.zoom+1}),l);return new Li(this,{kind:"constant",value:b},l)}return new Li(this,r.expression,l)}evaluate(r,l,d,v,b,S){if(r.kind==="source"){const W=r.evaluate(l,d,v,b,S);return this._calculate(W,W,W,l)}return r.kind==="composite"?this._calculate(r.evaluate({zoom:Math.floor(l.zoom)-1},d,v),r.evaluate({zoom:Math.floor(l.zoom)},d,v),r.evaluate({zoom:Math.floor(l.zoom)+1},d,v),l):r.value}_calculate(r,l,d,v){return v.zoom>v.zoomHistory.lastIntegerZoom?{from:r,to:l}:{from:d,to:l}}interpolate(r){return r}}class nu{constructor(r){this.specification=r}possiblyEvaluate(r,l,d,v){if(r.value!==void 0){if(r.expression.kind==="constant"){const b=r.expression.evaluate(l,null,{},d,v);return this._calculate(b,b,b,l)}return this._calculate(r.expression.evaluate(new en(Math.floor(l.zoom-1),l)),r.expression.evaluate(new en(Math.floor(l.zoom),l)),r.expression.evaluate(new en(Math.floor(l.zoom+1),l)),l)}}_calculate(r,l,d,v){return v.zoom>v.zoomHistory.lastIntegerZoom?{from:r,to:l}:{from:d,to:l}}interpolate(r){return r}}class Mo{constructor(r){this.specification=r}possiblyEvaluate(r,l,d,v){return!!r.expression.evaluate(l,null,{},d,v)}interpolate(){return!1}}class An{constructor(r){this.properties=r,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const l in r){const d=r[l];d.specification.overridable&&this.overridableProperties.push(l);const v=this.defaultPropertyValues[l]=new tu(d,void 0),b=this.defaultTransitionablePropertyValues[l]=new Wo(d);this.defaultTransitioningPropertyValues[l]=b.untransitioned(),this.defaultPossiblyEvaluatedValues[l]=v.possiblyEvaluate({})}}}Xt("DataDrivenProperty",ir),Xt("DataConstantProperty",Zt),Xt("CrossFadedDataDrivenProperty",Eo),Xt("CrossFadedProperty",nu),Xt("ColorRampProperty",Mo);const Bu="-transition";class ca extends Ve{constructor(r,l){if(super(),this.id=r.id,this.type=r.type,this._featureFilter={filter:()=>!0,needGeometry:!1},r.type!=="custom"&&(this.metadata=r.metadata,this.minzoom=r.minzoom,this.maxzoom=r.maxzoom,r.type!=="background"&&(this.source=r.source,this.sourceLayer=r["source-layer"],this.filter=r.filter),l.layout&&(this._unevaluatedLayout=new Ac(l.layout)),l.paint)){this._transitionablePaint=new Vc(l.paint);for(const d in r.paint)this.setPaintProperty(d,r.paint[d],{validate:!1});for(const d in r.layout)this.setLayoutProperty(d,r.layout[d],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ju(l.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(r){return r==="visibility"?this.visibility:this._unevaluatedLayout.getValue(r)}setLayoutProperty(r,l,d={}){l!=null&&this._validate(zu,`layers.${this.id}.layout.${r}`,r,l,d)||(r!=="visibility"?this._unevaluatedLayout.setValue(r,l):this.visibility=l)}getPaintProperty(r){return r.endsWith(Bu)?this._transitionablePaint.getTransition(r.slice(0,-11)):this._transitionablePaint.getValue(r)}setPaintProperty(r,l,d={}){if(l!=null&&this._validate(Nu,`layers.${this.id}.paint.${r}`,r,l,d))return!1;if(r.endsWith(Bu))return this._transitionablePaint.setTransition(r.slice(0,-11),l||void 0),!1;{const v=this._transitionablePaint._values[r],b=v.property.specification["property-type"]==="cross-faded-data-driven",S=v.value.isDataDriven(),W=v.value;this._transitionablePaint.setValue(r,l),this._handleSpecialPaintPropertyUpdate(r);const U=this._transitionablePaint._values[r].value;return U.isDataDriven()||S||b||this._handleOverridablePaintPropertyUpdate(r,W,U)}}_handleSpecialPaintPropertyUpdate(r){}_handleOverridablePaintPropertyUpdate(r,l,d){return!1}isHidden(r){return!!(this.minzoom&&r<this.minzoom)||!!(this.maxzoom&&r>=this.maxzoom)||this.visibility==="none"}updateTransitions(r){this._transitioningPaint=this._transitionablePaint.transitioned(r,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(r,l){r.getCrossfadeParameters&&(this._crossfadeParameters=r.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(r,void 0,l)),this.paint=this._transitioningPaint.possiblyEvaluate(r,void 0,l)}serialize(){const r={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&&(r.layout=r.layout||{},r.layout.visibility=this.visibility),Er(r,(l,d)=>!(l===void 0||d==="layout"&&!Object.keys(l).length||d==="paint"&&!Object.keys(l).length))}_validate(r,l,d,v,b={}){return(!b||b.validate!==!1)&&Bh(this,r.call(ul,{key:l,layerType:this.type,objectKey:d,value:v,styleSpec:ue,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const r in this.paint._values){const l=this.paint.get(r);if(l instanceof Li&&il(l.property.specification)&&(l.value.kind==="source"||l.value.kind==="composite")&&l.value.isStateDependent)return!0}return!1}}const kc={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Fa{constructor(r,l){this._structArray=r,this._pos1=l*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Lr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(r,l){return r._trim(),l&&(r.isTransferred=!0,l.push(r.arrayBuffer)),{length:r.length,arrayBuffer:r.arrayBuffer}}static deserialize(r){const l=Object.create(this.prototype);return l.arrayBuffer=r.arrayBuffer,l.length=r.length,l.capacity=r.arrayBuffer.byteLength/l.bytesPerElement,l._refreshViews(),l}_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(r){this.reserve(r),this.length=r}reserve(r){if(r>this.capacity){this.capacity=Math.max(r,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const l=this.uint8;this._refreshViews(),l&&this.uint8.set(l)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Hr(u,r=1){let l=0,d=0;return{members:u.map(v=>{const b=kc[v.type].BYTES_PER_ELEMENT,S=l=Po(l,Math.max(r,b)),W=v.components||1;return d=Math.max(d,b),l+=b*W,{name:v.name,type:v.type,components:W,offset:S}}),size:Po(l,Math.max(d,r)),alignment:r}}function Po(u,r){return Math.ceil(u/r)*r}class iu extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,l){const d=this.length;return this.resize(d+1),this.emplace(d,r,l)}emplace(r,l,d){const v=2*r;return this.int16[v+0]=l,this.int16[v+1]=d,r}}iu.prototype.bytesPerElement=4,Xt("StructArrayLayout2i4",iu);class Ea extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,l,d){const v=this.length;return this.resize(v+1),this.emplace(v,r,l,d)}emplace(r,l,d,v){const b=3*r;return this.int16[b+0]=l,this.int16[b+1]=d,this.int16[b+2]=v,r}}Ea.prototype.bytesPerElement=6,Xt("StructArrayLayout3i6",Ea);class ha extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,l,d,v){const b=this.length;return this.resize(b+1),this.emplace(b,r,l,d,v)}emplace(r,l,d,v,b){const S=4*r;return this.int16[S+0]=l,this.int16[S+1]=d,this.int16[S+2]=v,this.int16[S+3]=b,r}}ha.prototype.bytesPerElement=8,Xt("StructArrayLayout4i8",ha);class $u extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,l,d,v,b,S){const W=this.length;return this.resize(W+1),this.emplace(W,r,l,d,v,b,S)}emplace(r,l,d,v,b,S,W){const U=6*r;return this.int16[U+0]=l,this.int16[U+1]=d,this.int16[U+2]=v,this.int16[U+3]=b,this.int16[U+4]=S,this.int16[U+5]=W,r}}$u.prototype.bytesPerElement=12,Xt("StructArrayLayout2i4i12",$u);class Dc extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,l,d,v,b,S){const W=this.length;return this.resize(W+1),this.emplace(W,r,l,d,v,b,S)}emplace(r,l,d,v,b,S,W){const U=4*r,A=8*r;return this.int16[U+0]=l,this.int16[U+1]=d,this.uint8[A+4]=v,this.uint8[A+5]=b,this.uint8[A+6]=S,this.uint8[A+7]=W,r}}
vendor: 10,865 bytes, line 71
71Dc.prototype.bytesPerElement=8,Xt("StructArrayLayout2i4ub8",Dc);class da extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(r,l){const d=this.length;return this.resize(d+1),this.emplace(d,r,l)}emplace(r,l,d){const v=2*r;return this.float32[v+0]=l,this.float32[v+1]=d,r}}da.prototype.bytesPerElement=8,Xt("StructArrayLayout2f8",da);class Is extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r,l,d,v,b,S,W,U,A,X){const Z=this.length;return this.resize(Z+1),this.emplace(Z,r,l,d,v,b,S,W,U,A,X)}emplace(r,l,d,v,b,S,W,U,A,X,Z){const G=10*r;return this.uint16[G+0]=l,this.uint16[G+1]=d,this.uint16[G+2]=v,this.uint16[G+3]=b,this.uint16[G+4]=S,this.uint16[G+5]=W,this.uint16[G+6]=U,this.uint16[G+7]=A,this.uint16[G+8]=X,this.uint16[G+9]=Z,r}}Is.prototype.bytesPerElement=20,Xt("StructArrayLayout10ui20",Is);class _ extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r,l,d,v,b,S,W,U,A,X,Z,G){const H=this.length;return this.resize(H+1),this.emplace(H,r,l,d,v,b,S,W,U,A,X,Z,G)}emplace(r,l,d,v,b,S,W,U,A,X,Z,G,H){const J=12*r;return this.int16[J+0]=l,this.int16[J+1]=d,this.int16[J+2]=v,this.int16[J+3]=b,this.uint16[J+4]=S,this.uint16[J+5]=W,this.uint16[J+6]=U,this.uint16[J+7]=A,this.int16[J+8]=X,this.int16[J+9]=Z,this.int16[J+10]=G,this.int16[J+11]=H,r}}_.prototype.bytesPerElement=24,Xt("StructArrayLayout4i4ui4i24",_);class e extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(r,l,d){const v=this.length;return this.resize(v+1),this.emplace(v,r,l,d)}emplace(r,l,d,v){const b=3*r;return this.float32[b+0]=l,this.float32[b+1]=d,this.float32[b+2]=v,r}}e.prototype.bytesPerElement=12,Xt("StructArrayLayout3f12",e);class o extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(r){const l=this.length;return this.resize(l+1),this.emplace(l,r)}emplace(r,l){return this.uint32[1*r+0]=l,r}}o.prototype.bytesPerElement=4,Xt("StructArrayLayout1ul4",o);class f extends Lr{_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(r,l,d,v,b,S,W,U,A){const X=this.length;return this.resize(X+1),this.emplace(X,r,l,d,v,b,S,W,U,A)}emplace(r,l,d,v,b,S,W,U,A,X){const Z=10*r,G=5*r;return this.int16[Z+0]=l,this.int16[Z+1]=d,this.int16[Z+2]=v,this.int16[Z+3]=b,this.int16[Z+4]=S,this.int16[Z+5]=W,this.uint32[G+3]=U,this.uint16[Z+8]=A,this.uint16[Z+9]=X,r}}f.prototype.bytesPerElement=20,Xt("StructArrayLayout6i1ul2ui20",f);class y extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,l,d,v,b,S){const W=this.length;return this.resize(W+1),this.emplace(W,r,l,d,v,b,S)}emplace(r,l,d,v,b,S,W){const U=6*r;return this.int16[U+0]=l,this.int16[U+1]=d,this.int16[U+2]=v,this.int16[U+3]=b,this.int16[U+4]=S,this.int16[U+5]=W,r}}y.prototype.bytesPerElement=12,Xt("StructArrayLayout2i2i2i12",y);class x extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,l,d,v,b){const S=this.length;return this.resize(S+1),this.emplace(S,r,l,d,v,b)}emplace(r,l,d,v,b,S){const W=4*r,U=8*r;return this.float32[W+0]=l,this.float32[W+1]=d,this.float32[W+2]=v,this.int16[U+6]=b,this.int16[U+7]=S,r}}x.prototype.bytesPerElement=16,Xt("StructArrayLayout2f1f2i16",x);class T extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(r,l,d,v,b,S){const W=this.length;return this.resize(W+1),this.emplace(W,r,l,d,v,b,S)}emplace(r,l,d,v,b,S,W){const U=16*r,A=4*r,X=8*r;return this.uint8[U+0]=l,this.uint8[U+1]=d,this.float32[A+1]=v,this.float32[A+2]=b,this.int16[X+6]=S,this.int16[X+7]=W,r}}T.prototype.bytesPerElement=16,Xt("StructArrayLayout2ub2f2i16",T);class P extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r,l,d){const v=this.length;return this.resize(v+1),this.emplace(v,r,l,d)}emplace(r,l,d,v){const b=3*r;return this.uint16[b+0]=l,this.uint16[b+1]=d,this.uint16[b+2]=v,r}}P.prototype.bytesPerElement=6,Xt("StructArrayLayout3ui6",P);class C extends Lr{_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(r,l,d,v,b,S,W,U,A,X,Z,G,H,J,te,ce,ve){const Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,r,l,d,v,b,S,W,U,A,X,Z,G,H,J,te,ce,ve)}emplace(r,l,d,v,b,S,W,U,A,X,Z,G,H,J,te,ce,ve,Ae){const Ye=24*r,q=12*r,oe=48*r;return this.int16[Ye+0]=l,this.int16[Ye+1]=d,this.uint16[Ye+2]=v,this.uint16[Ye+3]=b,this.uint32[q+2]=S,this.uint32[q+3]=W,this.uint32[q+4]=U,this.uint16[Ye+10]=A,this.uint16[Ye+11]=X,this.uint16[Ye+12]=Z,this.float32[q+7]=G,this.float32[q+8]=H,this.uint8[oe+36]=J,this.uint8[oe+37]=te,this.uint8[oe+38]=ce,this.uint32[q+10]=ve,this.int16[Ye+22]=Ae,r}}C.prototype.bytesPerElement=48,Xt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",C);class L extends Lr{_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(r,l,d,v,b,S,W,U,A,X,Z,G,H,J,te,ce,ve,Ae,Ye,q,oe,Me,et,wt,it,dt,Pt,St){const Ct=this.length;return this.resize(Ct+1),this.emplace(Ct,r,l,d,v,b,S,W,U,A,X,Z,G,H,J,te,ce,ve,Ae,Ye,q,oe,Me,et,wt,it,dt,Pt,St)}emplace(r,l,d,v,b,S,W,U,A,X,Z,G,H,J,te,ce,ve,Ae,Ye,q,oe,Me,et,wt,it,dt,Pt,St,Ct){const mt=32*r,jt=16*r;return this.int16[mt+0]=l,this.int16[mt+1]=d,this.int16[mt+2]=v,this.int16[mt+3]=b,this.int16[mt+4]=S,this.int16[mt+5]=W,this.int16[mt+6]=U,this.int16[mt+7]=A,this.uint16[mt+8]=X,this.uint16[mt+9]=Z,this.uint16[mt+10]=G,this.uint16[mt+11]=H,this.uint16[mt+12]=J,this.uint16[mt+13]=te,this.uint16[mt+14]=ce,this.uint16[mt+15]=ve,this.uint16[mt+16]=Ae,this.uint16[mt+17]=Ye,this.uint16[mt+18]=q,this.uint16[mt+19]=oe,this.uint16[mt+20]=Me,this.uint16[mt+21]=et,this.uint16[mt+22]=wt,this.uint32[jt+12]=it,this.float32[jt+13]=dt,this.float32[jt+14]=Pt,this.uint16[mt+30]=St,this.uint16[mt+31]=Ct,r}}L.prototype.bytesPerElement=64,Xt("StructArrayLayout8i15ui1ul2f2ui64",L);class N extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(r){const l=this.length;return this.resize(l+1),this.emplace(l,r)}emplace(r,l){return this.float32[1*r+0]=l,r}}N.prototype.bytesPerElement=4,Xt("StructArrayLayout1f4",N);class B extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(r,l,d){const v=this.length;return this.resize(v+1),this.emplace(v,r,l,d)}emplace(r,l,d,v){const b=3*r;return this.uint16[6*r+0]=l,this.float32[b+1]=d,this.float32[b+2]=v,r}}B.prototype.bytesPerElement=12,Xt("StructArrayLayout1ui2f12",B);class j extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r,l,d){const v=this.length;return this.resize(v+1),this.emplace(v,r,l,d)}emplace(r,l,d,v){const b=4*r;return this.uint32[2*r+0]=l,this.uint16[b+2]=d,this.uint16[b+3]=v,r}}j.prototype.bytesPerElement=8,Xt("StructArrayLayout1ul2ui8",j);class K extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r,l){const d=this.length;return this.resize(d+1),this.emplace(d,r,l)}emplace(r,l,d){const v=2*r;return this.uint16[v+0]=l,this.uint16[v+1]=d,r}}K.prototype.bytesPerElement=4,Xt("StructArrayLayout2ui4",K);class ee extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(r){const l=this.length;return this.resize(l+1),this.emplace(l,r)}emplace(r,l){return this.uint16[1*r+0]=l,r}}ee.prototype.bytesPerElement=2,Xt("StructArrayLayout1ui2",ee);class me extends Lr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(r,l,d,v){const b=this.length;return this.resize(b+1),this.emplace(b,r,l,d,v)}emplace(r,l,d,v,b){const S=4*r;return this.float32[S+0]=l,this.float32[S+1]=d,this.float32[S+2]=v,this.float32[S+3]=b,r}}me.prototype.bytesPerElement=16,Xt("StructArrayLayout4f16",me);class pe extends Fa{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 F(this.anchorPointX,this.anchorPointY)}}pe.prototype.size=20;class ye extends f{get(r){return new pe(this,r)}}Xt("CollisionBoxArray",ye);class be extends Fa{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(r){this._structArray.uint8[this._pos1+37]=r}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(r){this._structArray.uint8[this._pos1+38]=r}
vendor: 18,175 bytes, line 71
71get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(r){this._structArray.uint32[this._pos4+10]=r}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}be.prototype.size=48;class Ee extends C{get(r){return new be(this,r)}}Xt("PlacedSymbolArray",Ee);class xe extends Fa{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(r){this._structArray.uint32[this._pos4+12]=r}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}xe.prototype.size=64;class Pe extends L{get(r){return new xe(this,r)}}Xt("SymbolInstanceArray",Pe);class Ie extends N{getoffsetX(r){return this.float32[1*r+0]}}Xt("GlyphOffsetArray",Ie);class Ce extends Ea{getx(r){return this.int16[3*r+0]}gety(r){return this.int16[3*r+1]}gettileUnitDistanceFromAnchor(r){return this.int16[3*r+2]}}Xt("SymbolLineVertexArray",Ce);class Ge extends Fa{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Ge.prototype.size=12;class ct extends B{get(r){return new Ge(this,r)}}Xt("TextAnchorOffsetArray",ct);class at extends Fa{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]}}at.prototype.size=8;class Ke extends j{get(r){return new at(this,r)}}Xt("FeatureIndexArray",Ke);class lt extends iu{}class At extends iu{}class Vt extends iu{}class yt extends $u{}class zt extends Dc{}class mr extends da{}class Wr extends Is{}class dn extends _{}class tn extends e{}class vn extends o{}class _n extends y{}class nn extends T{}class Or extends P{}class Kn extends K{}const si=Hr([{name:"a_pos",components:2,type:"Int16"}],4),{members:fi}=si;class Vr{constructor(r=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=r}prepareSegment(r,l,d,v){const b=this.segments[this.segments.length-1];return r>Vr.MAX_VERTEX_ARRAY_LENGTH&&pn(`Max vertices per segment is ${Vr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${r}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Vr.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!b||b.vertexLength+r>Vr.MAX_VERTEX_ARRAY_LENGTH||b.sortKey!==v?this.createNewSegment(l,d,v):b}createNewSegment(r,l,d){const v={vertexOffset:r.length,primitiveOffset:l.length,vertexLength:0,primitiveLength:0,vaos:{}};return d!==void 0&&(v.sortKey=d),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(v),v}getOrCreateLatestSegment(r,l,d){return this.prepareSegment(0,r,l,d)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const r of this.segments)for(const l in r.vaos)r.vaos[l].destroy()}static simpleSegment(r,l,d,v){return new Vr([{vertexOffset:r,primitiveOffset:l,vertexLength:d,primitiveLength:v,vaos:{},sortKey:0}])}}function qs(u,r){return 256*(u=Gt(Math.floor(u),0,255))+Gt(Math.floor(r),0,255)}Vr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Xt("SegmentVector",Vr);const Ma=Hr([{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 ds,Io,dl,Hs={exports:{}},Uo={exports:{}},fa={exports:{}},Ks=function(){if(dl)return Hs.exports;dl=1;var u=(ds||(ds=1,Uo.exports=function(l,d){var v,b,S,W,U,A,X,Z;for(b=l.length-(v=3&l.length),S=d,U=3432918353,A=461845907,Z=0;Z<b;)X=255&l.charCodeAt(Z)|(255&l.charCodeAt(++Z))<<8|(255&l.charCodeAt(++Z))<<16|(255&l.charCodeAt(++Z))<<24,++Z,S=27492+(65535&(W=5*(65535&(S=(S^=X=(65535&(X=(X=(65535&X)*U+(((X>>>16)*U&65535)<<16)&4294967295)<<15|X>>>17))*A+(((X>>>16)*A&65535)<<16)&4294967295)<<13|S>>>19))+((5*(S>>>16)&65535)<<16)&4294967295))+((58964+(W>>>16)&65535)<<16);switch(X=0,v){case 3:X^=(255&l.charCodeAt(Z+2))<<16;case 2:X^=(255&l.charCodeAt(Z+1))<<8;case 1:S^=X=(65535&(X=(X=(65535&(X^=255&l.charCodeAt(Z)))*U+(((X>>>16)*U&65535)<<16)&4294967295)<<15|X>>>17))*A+(((X>>>16)*A&65535)<<16)&4294967295}return S^=l.length,S=2246822507*(65535&(S^=S>>>16))+((2246822507*(S>>>16)&65535)<<16)&4294967295,S=3266489909*(65535&(S^=S>>>13))+((3266489909*(S>>>16)&65535)<<16)&4294967295,(S^=S>>>16)>>>0}),Uo.exports),r=(Io||(Io=1,fa.exports=function(l,d){for(var v,b=l.length,S=d^b,W=0;b>=4;)v=1540483477*(65535&(v=255&l.charCodeAt(W)|(255&l.charCodeAt(++W))<<8|(255&l.charCodeAt(++W))<<16|(255&l.charCodeAt(++W))<<24))+((1540483477*(v>>>16)&65535)<<16),S=1540483477*(65535&S)+((1540483477*(S>>>16)&65535)<<16)^(v=1540483477*(65535&(v^=v>>>24))+((1540483477*(v>>>16)&65535)<<16)),b-=4,++W;switch(b){case 3:S^=(255&l.charCodeAt(W+2))<<16;case 2:S^=(255&l.charCodeAt(W+1))<<8;case 1:S=1540483477*(65535&(S^=255&l.charCodeAt(W)))+((1540483477*(S>>>16)&65535)<<16)}return S=1540483477*(65535&(S^=S>>>13))+((1540483477*(S>>>16)&65535)<<16),(S^=S>>>15)>>>0}),fa.exports);return Hs.exports=u,Hs.exports.murmur3=u,Hs.exports.murmur2=r,Hs.exports}(),fs=Y(Ks);class Qs{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(r,l,d,v){this.ids.push(Fn(r)),this.positions.push(l,d,v)}getPositions(r){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const l=Fn(r);let d=0,v=this.ids.length-1;for(;d<v;){const S=d+v>>1;this.ids[S]>=l?v=S:d=S+1}const b=[];for(;this.ids[d]===l;)b.push({index:this.positions[3*d],start:this.positions[3*d+1],end:this.positions[3*d+2]}),d++;return b}static serialize(r,l){const d=new Float64Array(r.ids),v=new Uint32Array(r.positions);return Zn(d,v,0,d.length-1),l&&l.push(d.buffer,v.buffer),{ids:d,positions:v}}static deserialize(r){const l=new Qs;return l.ids=r.ids,l.positions=r.positions,l.indexed=!0,l}}function Fn(u){const r=+u;return!isNaN(r)&&r<=Number.MAX_SAFE_INTEGER?r:fs(String(u))}function Zn(u,r,l,d){for(;l<d;){const v=u[l+d>>1];let b=l-1,S=d+1;for(;;){do b++;while(u[b]<v);do S--;while(u[S]>v);if(b>=S)break;Ki(u,b,S),Ki(r,3*b,3*S),Ki(r,3*b+1,3*S+1),Ki(r,3*b+2,3*S+2)}S-l<d-S?(Zn(u,r,l,S),l=S+1):(Zn(u,r,S+1,d),d=S)}}function Ki(u,r,l){const d=u[r];u[r]=u[l],u[l]=d}Xt("FeaturePositionMap",Qs);class un{constructor(r,l){this.gl=r.gl,this.location=l}}class Rc extends un{constructor(r,l){super(r,l),this.current=0}set(r){this.current!==r&&(this.current=r,this.gl.uniform1f(this.location,r))}}class lf extends un{constructor(r,l){super(r,l),this.current=[0,0,0,0]}set(r){r[0]===this.current[0]&&r[1]===this.current[1]&&r[2]===this.current[2]&&r[3]===this.current[3]||(this.current=r,this.gl.uniform4f(this.location,r[0],r[1],r[2],r[3]))}}class qh extends un{constructor(r,l){super(r,l),this.current=Mr.transparent}set(r){r.r===this.current.r&&r.g===this.current.g&&r.b===this.current.b&&r.a===this.current.a||(this.current=r,this.gl.uniform4f(this.location,r.r,r.g,r.b,r.a))}}const uf=new Float32Array(16);function Lc(u){return[qs(255*u.r,255*u.g),qs(255*u.b,255*u.a)]}class Co{constructor(r,l,d){this.value=r,this.uniformNames=l.map(v=>`u_${v}`),this.type=d}setUniform(r,l,d){r.set(d.constantOr(this.value))}getBinding(r,l,d){return this.type==="color"?new qh(r,l):new Rc(r,l)}}class Za{constructor(r,l){this.uniformNames=l.map(d=>`u_${d}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(r,l){this.pixelRatioFrom=l.pixelRatio,this.pixelRatioTo=r.pixelRatio,this.patternFrom=l.tlbr,this.patternTo=r.tlbr}setUniform(r,l,d,v){const b=v==="u_pattern_to"?this.patternTo:v==="u_pattern_from"?this.patternFrom:v==="u_pixel_ratio_to"?this.pixelRatioTo:v==="u_pixel_ratio_from"?this.pixelRatioFrom:null;b&&r.set(b)}getBinding(r,l,d){return d.substr(0,9)==="u_pattern"?new lf(r,l):new Rc(r,l)}}class Us{constructor(r,l,d,v){this.expression=r,this.type=d,this.maxValue=0,this.paintVertexAttributes=l.map(b=>({name:`a_${b}`,type:"Float32",components:d==="color"?2:1,offset:0})),this.paintVertexArray=new v}populatePaintArray(r,l,d,v,b){const S=this.paintVertexArray.length,W=this.expression.evaluate(new en(0),l,{},v,[],b);this.paintVertexArray.resize(r),this._setPaintValue(S,r,W)}updatePaintArray(r,l,d,v){const b=this.expression.evaluate({zoom:0},d,v);this._setPaintValue(r,l,b)}_setPaintValue(r,l,d){if(this.type==="color"){const v=Lc(d);for(let b=r;b<l;b++)this.paintVertexArray.emplace(b,v[0],v[1])}else{for(let v=r;v<l;v++)this.paintVertexArray.emplace(v,d);this.maxValue=Math.max(this.maxValue,Math.abs(d))}}upload(r){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=r.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class ja{constructor(r,l,d,v,b,S){this.expression=r,this.uniformNames=l.map(W=>`u_${W}_t`),this.type=d,this.useIntegerZoom=v,this.zoom=b,this.maxValue=0,this.paintVertexAttributes=l.map(W=>({name:`a_${W}`,type:"Float32",components:d==="color"?4:2,offset:0})),this.paintVertexArray=new S}populatePaintArray(r,l,d,v,b){const S=this.expression.evaluate(new en(this.zoom),l,{},v,[],b),W=this.expression.evaluate(new en(this.zoom+1),l,{},v,[],b),U=this.paintVertexArray.length;this.paintVertexArray.resize(r),this._setPaintValue(U,r,S,W)}updatePaintArray(r,l,d,v){const b=this.expression.evaluate({zoom:this.zoom},d,v),S=this.expression.evaluate({zoom:this.zoom+1},d,v);this._setPaintValue(r,l,b,S)}_setPaintValue(r,l,d,v){if(this.type==="color"){const b=Lc(d),S=Lc(v);for(let W=r;W<l;W++)this.paintVertexArray.emplace(W,b[0],b[1],S[0],S[1])}else{for(let b=r;b<l;b++)this.paintVertexArray.emplace(b,d,v);this.maxValue=Math.max(this.maxValue,Math.abs(d),Math.abs(v))}}upload(r){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=r.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(r,l){const d=this.useIntegerZoom?Math.floor(l.zoom):l.zoom,v=Gt(this.expression.interpolationFactor(d,this.zoom,this.zoom+1),0,1);r.set(v)}getBinding(r,l,d){return new Rc(r,l)}}class oi{constructor(r,l,d,v,b,S){this.expression=r,this.type=l,this.useIntegerZoom=d,this.zoom=v,this.layerId=S,this.zoomInPaintVertexArray=new b,this.zoomOutPaintVertexArray=new b}populatePaintArray(r,l,d){const v=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(r),this.zoomOutPaintVertexArray.resize(r),this._setPaintValues(v,r,l.patterns&&l.patterns[this.layerId],d)}updatePaintArray(r,l,d,v,b){this._setPaintValues(r,l,d.patterns&&d.patterns[this.layerId],b)}_setPaintValues(r,l,d,v){if(!v||!d)return;const{min:b,mid:S,max:W}=d,U=v[b],A=v[S],X=v[W];if(U&&A&&X)for(let Z=r;Z<l;Z++)this.zoomInPaintVertexArray.emplace(Z,A.tl[0],A.tl[1],A.br[0],A.br[1],U.tl[0],U.tl[1],U.br[0],U.br[1],A.pixelRatio,U.pixelRatio),this.zoomOutPaintVertexArray.emplace(Z,A.tl[0],A.tl[1],A.br[0],A.br[1],X.tl[0],X.tl[1],X.br[0],X.br[1],A.pixelRatio,X.pixelRatio)}upload(r){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=r.createVertexBuffer(this.zoomInPaintVertexArray,Ma.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=r.createVertexBuffer(this.zoomOutPaintVertexArray,Ma.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class au{constructor(r,l,d){this.binders={},this._buffers=[];const v=[];for(const b in r.paint._values){if(!d(b))continue;const S=r.paint.get(b);if(!(S instanceof Li&&il(S.property.specification)))continue;const W=Oc(b,r.type),U=S.value,A=S.property.specification.type,X=S.property.useIntegerZoom,Z=S.property.specification["property-type"],G=Z==="cross-faded"||Z==="cross-faded-data-driven";if(U.kind==="constant")this.binders[b]=G?new Za(U.value,W):new Co(U.value,W,A),v.push(`/u_${b}`);else if(U.kind==="source"||G){const H=kp(b,A,"source");this.binders[b]=G?new oi(U,A,X,l,H,r.id):new Us(U,W,A,H),v.push(`/a_${b}`)}else{const H=kp(b,A,"composite");this.binders[b]=new ja(U,W,A,X,l,H),v.push(`/z_${b}`)}}this.cacheKey=v.sort().join("")}getMaxValue(r){const l=this.binders[r];return l instanceof Us||l instanceof ja?l.maxValue:0}populatePaintArrays(r,l,d,v,b){for(const S in this.binders){const W=this.binders[S];(W instanceof Us||W instanceof ja||W instanceof oi)&&W.populatePaintArray(r,l,d,v,b)}}setConstantPatternPositions(r,l){for(const d in this.binders){const v=this.binders[d];v instanceof Za&&v.setConstantPatternPositions(r,l)}}updatePaintArrays(r,l,d,v,b){let S=!1;for(const W in r){const U=l.getPositions(W);for(const A of U){const X=d.feature(A.index);for(const Z in this.binders){const G=this.binders[Z];if((G instanceof Us||G instanceof ja||G instanceof oi)&&G.expression.isStateDependent===!0){const H=v.paint.get(Z);G.expression=H.value,G.updatePaintArray(A.start,A.end,X,r[W],b),S=!0}}}}return S}defines(){const r=[];for(const l in this.binders){const d=this.binders[l];(d instanceof Co||d instanceof Za)&&r.push(...d.uniformNames.map(v=>`#define HAS_UNIFORM_${v}`))}return r}getBinderAttributes(){const r=[];for(const l in this.binders){const d=this.binders[l];if(d instanceof Us||d instanceof ja)for(let v=0;v<d.paintVertexAttributes.length;v++)r.push(d.paintVertexAttributes[v].name);else if(d instanceof oi)for(let v=0;v<Ma.members.length;v++)r.push(Ma.members[v].name)}return r}getBinderUniforms(){const r=[];for(const l in this.binders){const d=this.binders[l];if(d instanceof Co||d instanceof Za||d instanceof ja)for(const v of d.uniformNames)r.push(v)}return r}getPaintVertexBuffers(){return this._buffers}getUniforms(r,l){const d=[];for(const v in this.binders){const b=this.binders[v];if(b instanceof Co||b instanceof Za||b instanceof ja){for(const S of b.uniformNames)if(l[S]){const W=b.getBinding(r,l[S],S);d.push({name:S,property:v,binding:W})}}}return d}setUniforms(r,l,d,v){for(const{name:b,property:S,binding:W}of l)this.binders[S].setUniform(W,v,d.get(S),b)}updatePaintBuffers(r){this._buffers=[];for(const l in this.binders){const d=this.binders[l];if(r&&d instanceof oi){const v=r.fromScale===2?d.zoomInPaintVertexBuffer:d.zoomOutPaintVertexBuffer;v&&this._buffers.push(v)}else(d instanceof Us||d instanceof ja)&&d.paintVertexBuffer&&this._buffers.push(d.paintVertexBuffer)}}upload(r){for(const l in this.binders){const d=this.binders[l];(d instanceof Us||d instanceof ja||d instanceof oi)&&d.upload(r)}this.updatePaintBuffers()}destroy(){for(const r in this.binders){const l=this.binders[r];(l instanceof Us||l instanceof ja||l instanceof oi)&&l.destroy()}}}class ps{constructor(r,l,d=()=>!0){this.programConfigurations={};for(const v of r)this.programConfigurations[v.id]=new au(v,l,d);this.needsUpload=!1,this._featureMap=new Qs,this._bufferOffset=0}populatePaintArrays(r,l,d,v,b,S){for(const W in this.programConfigurations)this.programConfigurations[W].populatePaintArrays(r,l,v,b,S);l.id!==void 0&&this._featureMap.add(l.id,d,this._bufferOffset,r),this._bufferOffset=r,this.needsUpload=!0}updatePaintArrays(r,l,d,v){for(const b of d)this.needsUpload=this.programConfigurations[b.id].updatePaintArrays(r,this._featureMap,l,b,v)||this.needsUpload}get(r){return this.programConfigurations[r]}upload(r){if(this.needsUpload){for(const l in this.programConfigurations)this.programConfigurations[l].upload(r);this.needsUpload=!1}}destroy(){for(const r in this.programConfigurations)this.programConfigurations[r].destroy()}}function Oc(u,r){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":["ga
71pwidth"],"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"]}[u]||[u.replace(`${r}-`,"").replace(/-/g,"_")]}function kp(u,r,l){const d={color:{source:da,composite:me},number:{source:N,composite:da}},v=function(b){return{"line-pattern":{source:Wr,composite:Wr},"fill-pattern":{source:Wr,composite:Wr},"fill-extrusion-pattern":{source:Wr,composite:Wr}}[b]}(u);return v&&v[l]||d[r][l]}Xt("ConstantBinder",Co),Xt("CrossFadedConstantBinder",Za),Xt("SourceExpressionBinder",Us),Xt("CrossFadedCompositeBinder",oi),Xt("CompositeExpressionBinder",ja),Xt("ProgramConfiguration",au,{omit:["_buffers"]}),Xt("ProgramConfigurationSet",ps);const cf=Math.pow(2,14)-1,hf=-cf-1;function Cs(u){const r=Qe/u.extent,l=u.loadGeometry();for(let d=0;d<l.length;d++){const v=l[d];for(let b=0;b<v.length;b++){const S=v[b],W=Math.round(S.x*r),U=Math.round(S.y*r);S.x=Gt(W,hf,cf),S.y=Gt(U,hf,cf),(W<S.x||W>S.x+1||U<S.y||U>S.y+1)&&pn("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return l}function fl(u,r){return{type:u.type,id:u.id,properties:u.properties,geometry:r?Cs(u):[]}}const df=-32768;function Ov(u,r,l,d,v){u.emplaceBack(df+8*r+d,df+8*l+v)}class ff{constructor(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(l=>l.id),this.index=r.index,this.hasPattern=!1,this.layoutVertexArray=new At,this.indexArray=new Or,this.segments=new Vr,this.programConfigurations=new ps(r.layers,r.zoom),this.stateDependentLayerIds=this.layers.filter(l=>l.isStateDependent()).map(l=>l.id)}populate(r,l,d){const v=this.layers[0],b=[];let S=null,W=!1,U=v.type==="heatmap";if(v.type==="circle"){const X=v;S=X.layout.get("circle-sort-key"),W=!S.isConstant(),U=U||X.paint.get("circle-pitch-alignment")==="map"}const A=U?l.subdivisionGranularity.circle:1;for(const{feature:X,id:Z,index:G,sourceLayerIndex:H}of r){const J=this.layers[0]._featureFilter.needGeometry,te=fl(X,J);if(!this.layers[0]._featureFilter.filter(new en(this.zoom),te,d))continue;const ce=W?S.evaluate(te,{},d):void 0,ve={id:Z,properties:X.properties,type:X.type,sourceLayerIndex:H,index:G,geometry:J?te.geometry:Cs(X),patterns:{},sortKey:ce};b.push(ve)}W&&b.sort((X,Z)=>X.sortKey-Z.sortKey);for(const X of b){const{geometry:Z,index:G,sourceLayerIndex:H}=X,J=r[G].feature;this.addFeature(X,Z,G,d,A),l.featureIndex.insert(J,Z,G,H,this.index)}}update(r,l,d){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(r,l,this.stateDependentLayers,d)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(r){this.uploaded||(this.layoutVertexBuffer=r.createVertexBuffer(this.layoutVertexArray,fi),this.indexBuffer=r.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(r),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(r,l,d,v,b=1){let S;switch(b){case 1:S=[0,7];break;case 3:S=[0,2,5,7];break;case 5:S=[0,1,3,4,6,7];break;case 7:S=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${b}; valid values are 1, 3, 5, 7.`)}const W=S.length;for(const U of l)for(const A of U){const X=A.x,Z=A.y;if(X<0||X>=Qe||Z<0||Z>=Qe)continue;const G=this.segments.prepareSegment(W*W,this.layoutVertexArray,this.indexArray,r.sortKey),H=G.vertexLength;for(let J=0;J<W;J++)for(let te=0;te<W;te++)Ov(this.layoutVertexArray,X,Z,S[te],S[J]);for(let J=0;J<W-1;J++)for(let te=0;te<W-1;te++){const ce=H+J*W+te,ve=H+(J+1)*W+te;this.indexArray.emplaceBack(ce,ve+1,ce+1),this.indexArray.emplaceBack(ce,ve,ve+1)}G.vertexLength+=W*W,G.primitiveLength+=(W-1)*(W-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,r,d,{},v)}}function Dp(u,r){for(let l=0;l<u.length;l++)if(su(r,u[l]))return!0;for(let l=0;l<r.length;l++)if(su(u,r[l]))return!0;return!!Lp(u,r)}function Mg(u,r,l){return!!su(u,r)||!!Qi(r,u,l)}function Rp(u,r){if(u.length===1)return Xp(r,u[0]);for(let l=0;l<r.length;l++){const d=r[l];for(let v=0;v<d.length;v++)if(su(u,d[v]))return!0}for(let l=0;l<u.length;l++)if(Xp(r,u[l]))return!0;for(let l=0;l<r.length;l++)if(Lp(u,r[l]))return!0;return!1}function Pg(u,r,l){if(u.length>1){if(Lp(u,r))return!0;for(let d=0;d<r.length;d++)if(Qi(r[d],u,l))return!0}for(let d=0;d<u.length;d++)if(Qi(u[d],r,l))return!0;return!1}function Lp(u,r){if(u.length===0||r.length===0)return!1;for(let l=0;l<u.length-1;l++){const d=u[l],v=u[l+1];for(let b=0;b<r.length-1;b++)if(Ba(d,v,r[b],r[b+1]))return!0}return!1}function Ba(u,r,l,d){return Yr(u,l,d)!==Yr(r,l,d)&&Yr(u,r,l)!==Yr(u,r,d)}function Qi(u,r,l){const d=l*l;if(r.length===1)return u.distSqr(r[0])<d;for(let v=1;v<r.length;v++)if(Op(u,r[v-1],r[v])<d)return!0;return!1}function Op(u,r,l){const d=r.distSqr(l);if(d===0)return u.distSqr(r);const v=((u.x-r.x)*(l.x-r.x)+(u.y-r.y)*(l.y-r.y))/d;return u.distSqr(v<0?r:v>1?l:l.sub(r)._mult(v)._add(r))}function Xp(u,r){for(let l=0;l<u.length;l++)if(su(u[l],r))return!0;return!1}function su(u,r){let l=!1;for(let d=0,v=u.length-1;d<u.length;v=d++){const b=u[d],S=u[v];b.y>r.y!=S.y>r.y&&r.x<(S.x-b.x)*(r.y-b.y)/(S.y-b.y)+b.x&&(l=!l)}return l}function Ig(u,r,l){const d=l[0],v=l[2];if(u.x<d.x&&r.x<d.x||u.x>v.x&&r.x>v.x||u.y<d.y&&r.y<d.y||u.y>v.y&&r.y>v.y)return!1;const b=Yr(u,r,l[0]);return b!==Yr(u,r,l[1])||b!==Yr(u,r,l[2])||b!==Yr(u,r,l[3])}function Xc(u,r,l){const d=r.paint.get(u).value;return d.kind==="constant"?d.value:l.programConfigurations.get(r.id).getMaxValue(u)}function Nc(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function Hh(u,r,l,d,v){if(!r[0]&&!r[1])return u;const b=F.convert(r)._mult(v);l==="viewport"&&b._rotate(-d);const S=[];for(let W=0;W<u.length;W++)S.push(u[W].sub(b));return S}let pf,Np;Xt("CircleBucket",ff,{omit:["layers"]});var Ug={get paint(){return Np=Np||new An({"circle-radius":new ir(ue.paint_circle["circle-radius"]),"circle-color":new ir(ue.paint_circle["circle-color"]),"circle-blur":new ir(ue.paint_circle["circle-blur"]),"circle-opacity":new ir(ue.paint_circle["circle-opacity"]),"circle-translate":new Zt(ue.paint_circle["circle-translate"]),"circle-translate-anchor":new Zt(ue.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Zt(ue.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Zt(ue.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new ir(ue.paint_circle["circle-stroke-width"]),"circle-stroke-color":new ir(ue.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new ir(ue.paint_circle["circle-stroke-opacity"])})},get layout(){return pf=pf||new An({"circle-sort-key":new ir(ue.layout_circle["circle-sort-key"])})}};class zp extends ca{constructor(r){super(r,Ug)}createBucket(r){return new ff(r)}queryRadius(r){const l=r;return Xc("circle-radius",this,l)+Xc("circle-stroke-width",this,l)+Nc(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:r,feature:l,featureState:d,geometry:v,transform:b,pixelsToTileUnits:S,unwrappedTileID:W,getElevation:U}){const A=Hh(r,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-b.bearingInRadians,S),X=this.paint.get("circle-radius").evaluate(l,d)+this.paint.get("circle-stroke-width").evaluate(l,d),Z=this.paint.get("circle-pitch-alignment")==="map",G=Z?A:function(J,te,ce,ve){return J.map(Ae=>mf(Ae,te,ce,ve))}(A,b,W,U),H=Z?X*S:X;for(const J of v)for(const te of J){const ce=Z?te:mf(te,b,W,U);let ve=H;const Ae=b.projectTileCoordinates(te.x,te.y,W,U).signedDistanceFromCamera;if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ve*=Ae/b.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ve*=b.cameraToCenterDistance/Ae),Mg(G,ce,ve))return!0}return!1}}function mf(u,r,l,d){const v=r.projectTileCoordinates(u.x,u.y,l,d).point;return new F((.5*v.x+.5)*r.width,(.5*-v.y+.5)*r.height)}class Fp extends ff{}let gf;Xt("HeatmapBucket",Fp,{omit:["layers"]});var yf={get paint(){return gf=gf||new An({"heatmap-radius":new ir(ue.paint_heatmap["heatmap-radius"]),"heatmap-weight":new ir(ue.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Zt(ue.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Mo(ue.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Zt(ue.paint_heatmap["heatmap-opacity"])})}};function Zp(u,{width:r,height:l},d,v){if(v){if(v instanceof Uint8ClampedArray)v=new Uint8Array(v.buffer);else if(v.length!==r*l*d)throw new RangeError(`mismatched image size. expected: ${v.length} but got: ${r*l*d}`)}else v=new Uint8Array(r*l*d);return u.width=r,u.height=l,u.data=v,u}function jp(u,{width:r,height:l}
vendor: 22,070 bytes, line 71
71,d){if(r===u.width&&l===u.height)return;const v=Zp({},{width:r,height:l},d);Kh(u,v,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,r),height:Math.min(u.height,l)},d),u.width=r,u.height=l,u.data=v.data}function Kh(u,r,l,d,v,b){if(v.width===0||v.height===0)return r;if(v.width>u.width||v.height>u.height||l.x>u.width-v.width||l.y>u.height-v.height)throw new RangeError("out of range source coordinates for image copy");if(v.width>r.width||v.height>r.height||d.x>r.width-v.width||d.y>r.height-v.height)throw new RangeError("out of range destination coordinates for image copy");const S=u.data,W=r.data;if(S===W)throw new Error("srcData equals dstData, so image is already copied");for(let U=0;U<v.height;U++){const A=((l.y+U)*u.width+l.x)*b,X=((d.y+U)*r.width+d.x)*b;for(let Z=0;Z<v.width*b;Z++)W[X+Z]=S[A+Z]}return r}class zc{constructor(r,l){Zp(this,r,1,l)}resize(r){jp(this,r,1)}clone(){return new zc({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(r,l,d,v,b){Kh(r,l,d,v,b,1)}}class pa{constructor(r,l){Zp(this,r,4,l)}resize(r){jp(this,r,4)}replace(r,l){l?this.data.set(r):this.data=r instanceof Uint8ClampedArray?new Uint8Array(r.buffer):r}clone(){return new pa({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(r,l,d,v,b){Kh(r,l,d,v,b,4)}}function Vo(u){const r={},l=u.resolution||256,d=u.clips?u.clips.length:1,v=u.image||new pa({width:l,height:d});if(Math.log(l)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${l}`);const b=(S,W,U)=>{r[u.evaluationKey]=U;const A=u.expression.evaluate(r);v.data[S+W+0]=Math.floor(255*A.r/A.a),v.data[S+W+1]=Math.floor(255*A.g/A.a),v.data[S+W+2]=Math.floor(255*A.b/A.a),v.data[S+W+3]=Math.floor(255*A.a)};if(u.clips)for(let S=0,W=0;S<d;++S,W+=4*l)for(let U=0,A=0;U<l;U++,A+=4){const X=U/(l-1),{start:Z,end:G}=u.clips[S];b(W,A,Z*(1-X)+G*X)}else for(let S=0,W=0;S<l;S++,W+=4)b(0,W,S/(l-1));return v}Xt("AlphaImage",zc),Xt("RGBAImage",pa);const Bp="big-fb";class Cg extends ca{createBucket(r){return new Fp(r)}constructor(r){super(r,yf),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(r){r==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Vo({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(Bp)&&this.heatmapFbos.delete(Bp)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let vf;var Vg={get paint(){return vf=vf||new An({"hillshade-illumination-direction":new Zt(ue.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new Zt(ue.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new Zt(ue.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Zt(ue.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Zt(ue.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Zt(ue.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Zt(ue.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new Zt(ue.paint_hillshade["hillshade-method"])})}};class Ag extends ca{constructor(r){super(r,Vg),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let r=this.paint.get("hillshade-illumination-direction").values,l=this.paint.get("hillshade-illumination-altitude").values,d=this.paint.get("hillshade-highlight-color").values,v=this.paint.get("hillshade-shadow-color").values;const b=Math.max(r.length,l.length,d.length,v.length);r=r.concat(Array(b-r.length).fill(r.at(-1))),l=l.concat(Array(b-l.length).fill(l.at(-1))),d=d.concat(Array(b-d.length).fill(d.at(-1))),v=v.concat(Array(b-v.length).fill(v.at(-1)));const S=l.map(Fr);return{directionRadians:r.map(Fr),altitudeRadians:S,shadowColor:v,highlightColor:d}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}const Qh=Hr([{name:"a_pos",components:2,type:"Int16"}],4),{members:ma}=Qh;function $p(u,r,l){const d=l.patternDependencies;let v=!1;for(const b of r){const S=b.paint.get(`${u}-pattern`);S.isConstant()||(v=!0);const W=S.constantOr(null);W&&(v=!0,d[W.to]=!0,d[W.from]=!0)}return v}function Gp(u,r,l,d,v){const b=v.patternDependencies;for(const S of r){const W=S.paint.get(`${u}-pattern`).value;if(W.kind!=="constant"){let U=W.evaluate({zoom:d-1},l,{},v.availableImages),A=W.evaluate({zoom:d},l,{},v.availableImages),X=W.evaluate({zoom:d+1},l,{},v.availableImages);U=U&&U.name?U.name:U,A=A&&A.name?A.name:A,X=X&&X.name?X.name:X,b[U]=!0,b[A]=!0,b[X]=!0,l.patterns[S.id]={min:U,mid:A,max:X}}}return l}function Jh(u,r,l,d,v){let b;if(v===function(S,W,U,A){let X=0;for(let Z=W,G=U-A;Z<U;Z+=A)X+=(S[G]-S[Z])*(S[Z+1]+S[G+1]),G=Z;return X}(u,r,l,d)>0)for(let S=r;S<l;S+=d)b=Qp(S/d|0,u[S],u[S+1],b);else for(let S=l-d;S>=r;S-=d)b=Qp(S/d|0,u[S],u[S+1],b);return b&&Jn(b,b.next)&&($a(b),b=b.next),b}function Qn(u,r){if(!u)return u;r||(r=u);let l,d=u;do if(l=!1,d.steiner||!Jn(d,d.next)&&Mn(d.prev,d,d.next)!==0)d=d.next;else{if($a(d),d=r=d.prev,d===d.next)break;l=!0}while(l||d!==r);return r}function ed(u,r,l,d,v,b,S){if(!u)return;!S&&b&&function(U,A,X,Z){let G=U;do G.z===0&&(G.z=rd(G.x,G.y,A,X,Z)),G.prevZ=G.prev,G.nextZ=G.next,G=G.next;while(G!==U);G.prevZ.nextZ=null,G.prevZ=null,function(H){let J,te=1;do{let ce,ve=H;H=null;let Ae=null;for(J=0;ve;){J++;let Ye=ve,q=0;for(let Me=0;Me<te&&(q++,Ye=Ye.nextZ,Ye);Me++);let oe=te;for(;q>0||oe>0&&Ye;)q!==0&&(oe===0||!Ye||ve.z<=Ye.z)?(ce=ve,ve=ve.nextZ,q--):(ce=Ye,Ye=Ye.nextZ,oe--),Ae?Ae.nextZ=ce:H=ce,ce.prevZ=Ae,Ae=ce;ve=Ye}Ae.nextZ=null,te*=2}while(J>1)}(G)}(u,d,v,b);let W=u;for(;u.prev!==u.next;){const U=u.prev,A=u.next;if(b?Fc(u,d,v,b):Kt(u))r.push(U.i,u.i,A.i),$a(u),u=A.next,W=A.next;else if((u=A)===W){S?S===1?ed(u=qp(Qn(u),r),r,l,d,v,b,2):S===2&&kg(u,r,l,d,v,b):ed(Qn(u),r,l,d,v,b,1);break}}}function Kt(u){const r=u.prev,l=u,d=u.next;if(Mn(r,l,d)>=0)return!1;const v=r.x,b=l.x,S=d.x,W=r.y,U=l.y,A=d.y,X=Math.min(v,b,S),Z=Math.min(W,U,A),G=Math.max(v,b,S),H=Math.max(W,U,A);let J=d.next;for(;J!==r;){if(J.x>=X&&J.x<=G&&J.y>=Z&&J.y<=H&&Zc(v,W,b,U,S,A,J.x,J.y)&&Mn(J.prev,J,J.next)>=0)return!1;J=J.next}return!0}function Fc(u,r,l,d){const v=u.prev,b=u,S=u.next;if(Mn(v,b,S)>=0)return!1;const W=v.x,U=b.x,A=S.x,X=v.y,Z=b.y,G=S.y,H=Math.min(W,U,A),J=Math.min(X,Z,G),te=Math.max(W,U,A),ce=Math.max(X,Z,G),ve=rd(H,J,r,l,d),Ae=rd(te,ce,r,l,d);let Ye=u.prevZ,q=u.nextZ;for(;Ye&&Ye.z>=ve&&q&&q.z<=Ae;){if(Ye.x>=H&&Ye.x<=te&&Ye.y>=J&&Ye.y<=ce&&Ye!==v&&Ye!==S&&Zc(W,X,U,Z,A,G,Ye.x,Ye.y)&&Mn(Ye.prev,Ye,Ye.next)>=0||(Ye=Ye.prevZ,q.x>=H&&q.x<=te&&q.y>=J&&q.y<=ce&&q!==v&&q!==S&&Zc(W,X,U,Z,A,G,q.x,q.y)&&Mn(q.prev,q,q.next)>=0))return!1;q=q.nextZ}for(;Ye&&Ye.z>=ve;){if(Ye.x>=H&&Ye.x<=te&&Ye.y>=J&&Ye.y<=ce&&Ye!==v&&Ye!==S&&Zc(W,X,U,Z,A,G,Ye.x,Ye.y)&&Mn(Ye.prev,Ye,Ye.next)>=0)return!1;Ye=Ye.prevZ}for(;q&&q.z<=Ae;){if(q.x>=H&&q.x<=te&&q.y>=J&&q.y<=ce&&q!==v&&q!==S&&Zc(W,X,U,Z,A,G,q.x,q.y)&&Mn(q.prev,q,q.next)>=0)return!1;q=q.nextZ}return!0}function qp(u,r){let l=u;do{const d=l.prev,v=l.next.next;!Jn(d,v)&&Vs(d,l,l.next,v)&&jc(d,v)&&jc(v,d)&&(r.push(d.i,l.i,v.i),$a(l),$a(l.next),l=u=v),l=l.next}while(l!==u);return Qn(l)}function kg(u,r,l,d,v,b){let S=u;do{let W=S.next.next;for(;W!==S.prev;){if(S.i!==W.i&&Kp(S,W)){let U=As(S,W);return S=Qn(S,S.next),U=Qn(U,U.next),ed(S,r,l,d,v,b,0),void ed(U,r,l,d,v,b,0)}W=W.next}S=S.next}while(S!==u)}function Xv(u,r){let l=u.x-r.x;return l===0&&(l=u.y-r.y,l===0)&&(l=(u.next.y-u.y)/(u.next.x-u.x)-(r.next.y-r.y)/(r.next.x-r.x)),l}function td(u,r){const l=function(v,b){let S=b;const W=v.x,U=v.y;let A,X=-1/0;if(Jn(v,S))return S;do{if(Jn(v,S.next))return S.next;if(U<=S.y&&U>=S.next.y&&S.next.y!==S.y){const te=S.x+(U-S.y)*(S.next.x-S.x)/(S.next.y-S.y);if(te<=W&&te>X&&(X=te,A=S.x<S.next.x?S:S.next,te===W))return A}S=S.next}while(S!==b);if(!A)return null;const Z=A,G=A.x,H=A.y;let J=1/0;S=A;do{if(W>=S.x&&S.x>=G&&W!==S.x&&Hp(U<H?W:X,U,G,H,U<H?X:W,U,S.x,S.y)){const te=Math.abs(U-S.y)/(W-S.x);jc(S,v)&&(te<J||te===J&&(S.x>A.x||S.x===A.x&&_f(A,S)))&&(A=S,J=te)}S=S.next}while(S!==Z);return A}(u,r);if(!l)return r;const d=As(l,u);return Qn(d,d.next),Qn(l,l.next)}function _f(u,r){return Mn(u.prev,u,r.prev)<0&&Mn(r.next,u,u.next)<0}function rd(u,r,l,d,v){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-l)*v|0)|u<<8))|u<<4))|u<<2))|u<<1))|(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=(r-d)*v|0)|r<<8))|r<<4))|r<<2))|r<<1))<<1}function Dg(u){let r=u,l=u;do(r.x<l.x||r.x===l.x&&r.y<l.y)&&(l=r),r=r.next;while(r!==u);return l}function Hp(u,r,l,d,v,b,S,W){return(v-S)*(r-W)>=(u-S)*(b-W)&&(u-S)*(d-W)>=(l-S)*(r-W)&&(l-S)*(b-W)>=(v-S)*(d-W)}function Zc(u,r,l,d,v,b,S,W){return!(u===S&&r===W)&&Hp(u,r,l,d,v,b,S,W)}function Kp(u,r){return u.next.i!==r.i&&u.prev.i!==r.i&&!function(l,d){let v=l;do{if(v.i!==l.i&&v.next.i!==l.i&&v.i!==d.i&&v.next.i!==d.i&&Vs(v,v.next,l,d))return!0;v=v.next}while(v!==l);return!1}(u,r)&&(jc(u,r)&&jc(r,u)&&function(l,d){let v=l,b=!1;const S=(l.x+d.x)/2,W=(l.y+d.y)/2;do v.y>W!=v.next.y>W&&v.next.y!==v.y&&S<(v.next.x-v.x)*(W-v.y)/(v.next.y-v.y)+v.x&&(b=!b),v=v.next;while(v!==l);return b}(u,r)&&(Mn(u.prev,u,r.prev)||Mn(u,r.prev,r))||Jn(u,r)&&Mn(u.prev,u,u.next)>0&&Mn(r.prev,r,r.next)>0)}function Mn(u,r,l){return(r.y-u.y)*(l.x-r.x)-(r.x-u.x)*(l.y-r.y)}function Jn(u,r){return u.x===r.x&&u.y===r.y}function Vs(u,r,l,d){const v=nd(Mn(u,r,l)),b=nd(Mn(u,r,d)),S=nd(Mn(l,d,u)),W=nd(Mn(l,d,r));return v!==b&&S!==W||!(v!==0||!Js(u,l,r))||!(b!==0||!Js(u,d,r))||!(S!==0||!Js(l,u,d))||!(W!==0||!Js(l,r,d))}function Js(u,r,l){return r.x<=Math.max(u.x,l.x)&&r.x>=Math.min(u.x,l.x)&&r.y<=Math.max(u.y,l.y)&&r.y>=Math.min(u.y,l.y)}function nd(u){return u>0?1:u<0?-1:0}function jc(u,r){return Mn(u.prev,u,u.next)<0?Mn(u,r,u.next)>=0&&Mn(u,u.prev,r)>=0:Mn(u,r,u.prev)<0||Mn(u,u.next,r)<0}function As(u,r){const l=Jp(u.i,u.x,u.y),d=Jp(r.i,r.x,r.y),v=u.next,b=r.prev;return u.next=r,r.prev=u,l.next=v,v.prev=l,d.next=l,l.prev=d,b.next=d,d.prev=b,d}function Qp(u,r,l,d){const v=Jp(u,r,l);return d?(v.next=d.next,v.prev=d,d.next.prev=v,d.next=v):(v.prev=v,v.next=v),v}function $a(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function Jp(u,r,l){return{i:u,x:r,y:l,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Gu{constructor(r,l){if(l>r)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=r,this._minGranularity=l}getGranularityForZoomLevel(r){return Math.max(Math.floor(this._baseZoomGranularity/(1<<r)),this._minGranularity,1)}}class id{constructor(r){this.fill=r.fill,this.line=r.line,this.tile=r.tile,this.stencil=r.stencil,this.circle=r.circle}}id.noSubdivision=new id({fill:new Gu(0,0),line:new Gu(0,0),tile:new Gu(0,0),stencil:new Gu(0,0),circle:1}),Xt("SubdivisionGranularityExpression",Gu),Xt("SubdivisionGranularitySetting",id);const qu=-32768,Bc=32767;class Nv{constructor(r,l){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=r,this._granularityCellSize=Qe/r,this._canonical=l}_getKey(r,l){return(r+=32768)<<16|(l+=32768)<<0}_vertexToIndex(r,l){if(r<-32768||l<-32768||r>32767||l>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const d=0|Math.round(r),v=0|Math.round(l),b=this._getKey(d,v);if(this._vertexDictionary.has(b))return this._vertexDictionary.get(b);const S=this._vertexBuffer.length/2;return this._vertexDictionary.set(b,S),this._vertexBuffer.push(d,v),S}_subdivideTrianglesScanline(r){if(this._granularity<2)return function(v,b){const S=[];for(let W=0;W<b.length;W+=3){const U=b[W],A=b[W+1],X=b[W+2],Z=v[2*U],G=v[2*U+1];(v[2*A]-Z)*(v[2*X+1]-G)-(v[2*A+1]-G)*(v[2*X]-Z)>0?(S.push(U),S.push(X),S.push(A)):(S.push(U),S.push(A),S.push(X))}return S}(this._vertexBuffer,r);const l=[],d=r.length;for(let v=0;v<d;v+=3){const b=[r[v+0],r[v+1],r[v+2]],S=[this._vertexBuffer[2*r[v+0]+0],this._vertexBuffer[2*r[v+0]+1],this._vertexBuffer[2*r[v+1]+0],this._vertexBuffer[2*r[v+1]+1],this._vertexBuffer[2*r[v+2]+0],this._vertexBuffer[2*r[v+2]+1]];let W=1/0,U=1/0,A=-1/0,X=-1/0;for(let te=0;te<3;te++){const ce=S[2*te],ve=S[2*te+1];W=Math.min(W,ce),A=Math.max(A,ce),U=Math.min(U,ve),X=Math.max(X,ve)}if(W===A||U===X)continue;const Z=Math.floor(W/this._granularityCellSize),G=Math.ceil(A/this._granularityCellSize),H=Math.floor(U/this._granularityCellSize),J=Math.ceil(X/this._granularityCellSize);if(Z!==G||H!==J)for(let te=H;te<J;te++){const ce=this._scanlineGenerateVertexRingForCellRow(te,S,b);ks(this._vertexBuffer,ce,l)}else l.push(...b)}return l}_scanlineGenerateVertexRingForCellRow(r,l,d){const v=r*this._granularityCellSize,b=v+this._granularityCellSize,S=[];for(let W=0;W<3;W++){const U=l[2*W],A=l[2*W+1],X=l[2*(W+1)%6],Z=l[(2*(W+1)+1)%6],G=l[2*(W+2)%6],H=l[(2*(W+2)+1)%6],J=X-U,te=Z-A,ce=J===0,ve=te===0,Ae=(v-A)/te,Ye=(b-A)/te,q=Math.min(Ae,Ye),oe=Math.max(Ae,Ye);if(!ve&&(q>=1||oe<=0)||ve&&(A<v||A>b)){Z>=v&&Z<=b&&S.push(d[(W+1)%3]);continue}!ve&&q>0&&S.push(this._vertexToIndex(U+J*q,A+te*q));const Me=U+J*Math.max(q,0),et=U+J*Math.min(oe,1);ce||this._generateIntraEdgeVertices(S,U,A,X,Z,Me,et),!ve&&oe<1&&S.push(this._vertexToIndex(U+J*oe,A+te*oe)),(ve||Z>=v&&Z<=b)&&S.push(d[(W+1)%3]),!ve&&(Z<=v||Z>=b)&&this._generateInterEdgeVertices(S,U,A,X,Z,G,H,et,v,b)}return S}_generateIntraEdgeVertices(r,l,d,v,b,S,W){const U=v-l,A=b-d,X=A===0,Z=X?Math.min(l,v):Math.min(S,W),G=X?Math.max(l,v):Math.max(S,W),H=Math.floor(Z/this._granularityCellSize)+1,J=Math.ceil(G/this._granularityCellSize)-1;if(X?l<v:S<W)for(let te=H;te<=J;te++){const ce=te*this._granularityCellSize;r.push(this._vertexToIndex(ce,d+A*(ce-l)/U))}else for(let te=J;te>=H;te--){const ce=te*this._granularityCellSize;r.push(this._vertexToIndex(ce,d+A*(ce-l)/U))}}_generateInterEdgeVertices(r,l,d,v,b,S,W,U,A,X){const Z=b-d,G=S-v,H=W-b,J=(A-b)/H,te=(X-b)/H,ce=Math.min(J,te),ve=Math.max(J,te),Ae=v+G*ce;let Ye=Math.floor(Math.min(Ae,U)/this._granularityCellSize)+1,q=Math.ceil(Math.max(Ae,U)/this._granularityCellSize)-1,oe=U<Ae;const Me=H===0;if(Me&&(W===A||W===X))return;if(Me||ce>=1||ve<=0){const wt=d-W,it=S+(l-S)*Math.min((A-W)/wt,(X-W)/wt);Ye=Math.floor(Math.min(it,U)/this._granularityCellSize)+1,q=Math.ceil(Math.max(it,U)/this._granularityCellSize)-1,oe=U<it}const et=Z>0?X:A;if(oe)for(let wt=Ye;wt<=q;wt++)r.push(this._vertexToIndex(wt*this._granularityCellSize,et));else for(let wt=q;wt>=Ye;wt--)r.push(this._vertexToIndex(wt*this._granularityCellSize,et))}_generateOutline(r){const l=[];for(const d of r){const v=pl(d,this._granularity,!0),b=this._pointArrayToIndices(v),S=[];for(let W=1;W<b.length;W++)S.push(b[W-1]),S.push(b[W]);l.push(S)}return l}_handlePoles(r){let l=!1,d=!1;this._canonical&&(this._canonical.y===0&&(l=!0),this._canonical.y===(1<<this._canonical.z)-1&&(d=!0)),(l||d)&&this._fillPoles(r,l,d)}_ensureNoPoleVertices(){const r=this._vertexBuffer;for(let l=0;l<r.length;l+=2){const d=r[l+1];d===qu&&(r[l+1]=-32767),d===Bc&&(r[l+1]=32766)}}_generatePoleQuad(r,l,d,v,b,S){v>b!=(S===qu)?(r.push(l),r.push(d),r.push(this._vertexToIndex(v,S)),r.push(d),r.push(this._vertexToIndex(b,S)),r.push(this._vertexToIndex(v,S))):(r.push(d),r.push(l),r.push(this._vertexToIndex(v,S)),r.push(this._vertexToIndex(b,S)),r.push(d),r.push(this._vertexToIndex(v,S)))}_fillPoles(r,l,d){const v=this._vertexBuffer,b=Qe,S=r.length;for(let W=2;W<S;W+=3){const U=r[W-2],A=r[W-1],X=r[W],Z=v[2*U],G=v[2*U+1],H=v[2*A],J=v[2*A+1],te=v[2*X],ce=v[2*X+1];l&&(G===0&&J===0&&this._generatePoleQuad(r,U,A,Z,H,qu),J===0&&ce===0&&this._generatePoleQuad(r,A,X,H,te,qu),ce===0&&G===0&&this._generatePoleQuad(r,X,U,te,Z,qu)),d&&(G===b&&J===b&&this._generatePoleQuad(r,U,A,Z,H,Bc),J===b&&ce===b&&this._generatePoleQuad(r,A,X,H,te,Bc),ce===b&&G===b&&this._generatePoleQuad(r,X,U,te,Z,Bc))}}_initializeVertices(r){for(let l=0;l<r.length;l+=2)this._vertexToIndex(r[l],r[l+1])}subdividePolygonInternal(r,l){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;const{flattened:d,holeIndices:v}=function(W){const U=[],A=[];for(const X of W)if(X.length!==0){X!==W[0]&&U.push(A.length/2);for(let Z=0;Z<X.length;Z++)A.push(X[Z].x),A.push(X[Z].y)}return{flattened:A,holeIndices:U}}(r);let b;this._initializeVertices(d);try{const W=function(A,X,Z=2){const G=X&&X.length,H=G?X[0]*Z:A.length;let J=Jh(A,0,H,Z,!0);const te=[];if(!J||J.next===J.prev)return te;let ce,ve,Ae;if(G&&(J=function(Ye,q,oe,Me){const et=[];for(let wt=0,it=q.length;wt<it;wt++){const dt=Jh(Ye,q[wt]*Me,wt<it-1?q[wt+1]*Me:Ye.length,Me,!1);dt===dt.next&&(dt.steiner=!0),et.push(Dg(dt))}et.sort(Xv);for(let wt=0;wt<et.length;wt++)oe=td(et[wt],oe);return oe}(A,X,J,Z)),A.length>80*Z){ce=1/0,ve=1/0;let Ye=-1/0,q=-1/0;for(let oe=Z;oe<H;oe+=Z){const Me=A[oe],et=A[oe+1];Me<ce&&(ce=Me),et<ve&&(ve=et),Me>Ye&&(Ye=Me),et>q&&(q=et)}Ae=Math.max(Ye-ce,q-ve),Ae=Ae!==0?32767/Ae:0}return ed(J,te,Z,ce,ve,Ae,0),te}(d,v),U=this._convertIndices(d,W);b=this._subdivideTrianglesScanline(U)}catch(W){console.error(W)}let S=[];return l&&(S=this._generateOutline(r)),this._ensureNoPoleVertices(),this._handlePoles(b),{verticesFlattened:this._vertexBuffer,indicesTriangles:b,indicesLineList:S}}_convertIndices(r,l){const d=[];for(let v=0;v<l.length;v++)d.push(this._vertexToIndex(r[2*l[v]],r[2*l[v]+1]));return d}_pointArrayToIndices(r){const l=[];for(let d=0;d<r.length;d++){const v=r[d];l.push(this._vertexToIndex(v.x,v.y))}return l}}function ad(u,r,l,d=!0){return new Nv(l,r).subdividePolygonInternal(u,d)}function pl(u,r,l=!1){if(!u||u.length<1)return[];if(u.length<2)return[];const d=u[0],v=u[u.length-1],b=l&&(d.x!==v.x||d.y!==v.y);if(r<2)return b?[...u,u[0]]:[...u];const S=Math.floor(Qe/r),W=[];W.push(new F(u[0].x,u[0].y));const U=u.length,A=b?U:U-1;for(let X=0;X<A;X++){const Z=u[X],G=X<U-1?u[X+1]:u[0],H=Z.x,J=Z.y,te=G.x,ce=G.y,ve=H!==te,Ae=J!==ce;if(!ve&&!Ae)continue;const Ye=te-H,q=ce-J,oe=Math.abs(Ye),Me=Math.abs(q);let et=H,wt=J;for(;;){const dt=Ye>0?(Math.floor(et/S)+1)*S:(Math.ceil(et/S)-1)*S,Pt=q>0?(Math.floor(wt/S)+1)*S:(Math.ceil(wt/S)-1)*S,St=Math.abs(et-dt),Ct=Math.abs(wt-Pt),mt=Math.abs(et-te),jt=Math.abs(wt-ce),ar=ve?St/oe:Number.POSITIVE_INFINITY,tr=Ae?Ct/Me:Number.POSITIVE_INFINITY;if((mt<=St||!ve)&&(jt<=Ct||!Ae))break;if(ar<tr&&ve||!Ae){et=dt,wt+=q*ar;const qt=new F(et,Math.round(wt));W[W.length-1].x===qt.x&&W[W.length-1].y===qt.y||W.push(qt)}else{et+=Ye*tr,wt=Pt;const qt=new F(Math.round(et),wt);W[W.length-1].x===qt.x&&W[W.length-1].y===qt.y||W.push(qt)}}const it=new F(te,ce);W[W.length-1].x===it.x&&W[W.length-1].y===it.y||W.push(it)}return W}function ks(u,r,l){if(r.length===0)throw new Error("Subdivision vertex ring is empty.");let d=0,v=u[2*r[0]];for(let U=1;U<r.length;U++){const A=u[2*r[U]];A<v&&(v=A,d=U)}const b=r.length;let S=d,W=(S+1)%b;for(;;){const U=S-1>=0?S-1:b-1,A=(W+1)%b,X=u[2*r[U]],Z=u[2*r[A]],G=u[2*r[S]],H=u[2*r[S]+1],J=u[2*r[W]+1];let te=!1;if(X<Z)te=!0;else if(X>Z)te=!1;else{const ce=J-H,ve=-(u[2*r[W]]-G),Ae=H<J?1:-1;((X-G)*ce+(u[2*r[U]+1]-H)*ve)*Ae>((Z-G)*ce+(u[2*r[A]+1]-H)*ve)*Ae&&(te=!0)}if(te){const ce=r[U],ve=r[S],Ae=r[W];ce!==ve&&ce!==Ae&&ve!==Ae&&l.push(Ae,ve,ce),S--,S<0&&(S=b-1)}else{const ce=r[A],ve=r[S],Ae=r[W];ce!==ve&&ce!==Ae&&ve!==Ae&&l.push(Ae,ve,ce),W++,W>=b&&(W=0)}if(U===A)break}}function Br(u,r,l,d,v,b,S,W,U){const A=v.length/2,X=S&&W&&U;if(A<Vr.MAX_VERTEX_ARRAY_LENGTH){const Z=r.prepareSegment(A,l,d),G=Z.vertexLength;for(let te=0;te<b.length;te+=3)d.emplaceBack(G+b[te],G+b[te+1],G+b[te+2]);let H,J;Z.vertexLength+=A,Z.primitiveLength+=b.length/3,X&&(J=S.prepareSegment(A,l,W),H=J.vertexLength,J.vertexLength+=A);for(let te=0;te<v.length;te+=2)u(v[te],v[te+1]);if(X)for(let te=0;te<U.length;te++){const ce=U[te];for(let ve=1;ve<ce.length;ve+=2)W.emplaceBack(H+ce[ve-1],H+ce[ve]);J.primitiveLength+=ce.length/2}}else(function(Z,G,H,J,te,ce){const ve=[];for(let Me=0;Me<J.length/2;Me++)ve.push(-1);const Ae={count:0};let Ye=0,q=Z.getOrCreateLatestSegment(G,H),oe=q.vertexLength;for(let Me=2;Me<te.length;Me+=3){const et=te[Me-2],wt=te[Me-1],it=te[Me];let dt=ve[et]<Ye,Pt=ve[wt]<Ye,St=ve[it]<Ye;q.vertexLength+((dt?1:0)+(Pt?1:0)+(St?1:0))>Vr.MAX_VERTEX_ARRAY_LENGTH&&(q=Z.createNewSegment(G,H),Ye=Ae.count,dt=!0,Pt=!0,St=!0,oe=0);const Ct=ei(ve,J,ce,Ae,et,dt,q),mt=ei(ve,J,ce,Ae,wt,Pt,q),jt=ei(ve,J,ce,Ae,it,St,q);H.emplaceBack(oe+Ct-Ye,oe+mt-Ye,oe+jt-Ye),q.primitiveLength++}})(r,l,d,v,b,u),X&&function(Z,G,H,J,te,ce){const ve=[];for(let Me=0;Me<J.length/2;Me++)ve.push(-1);const Ae={count:0};let Ye=0,q=Z.getOrCreateLatestSegment(G,H),oe=q.vertexLength;for(let Me=0;Me<te.length;Me++){const et=te[Me];for(let wt=1;wt<te[Me].length;wt+=2){const it=et[wt-1],dt=et[wt];let Pt=ve[it]<Ye,St=ve[dt]<Ye;q.vertexLength+((Pt?1:0)+(St?1:0))>Vr.MAX_VERTEX_ARRAY_LENGTH&&(q=Z.createNewSegment(G,H),Ye=Ae.count,Pt=!0,St=!0,oe=0);const Ct=ei(ve,J,ce,Ae,it,Pt,q),mt=ei(ve,J,ce,Ae,dt,St,q);H.emplaceBack(oe+Ct-Ye,oe+mt-Ye),q.primitiveLength++}}}(S,l,W,v,U,u),r.forceNewSegmentOnNextPrepare(),S==null||S.forceNewSegmentOnNextPrepare()}function ei(u,r,l,d,v,b,S){if(b){const W=d.count;return l(r[2*v],r[2*v+1]),u[v]=d.count,d.count++,S.vertexLength++,W}return u[v]}class ti{constructor(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(l=>l.id),this.index=r.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Vt,this.indexArray=new Or,this.indexArray2=new Kn,this.programConfigurations=new ps(r.layers,r.zoom),this.segments=new Vr,this.segments2=new Vr,this.stateDependentLayerIds=this.layers.filter(l=>l.isStateDependent()).map(l=>l.id)}populate(r,l,d){this.hasPattern=$p("fill",this.layers,l);const v=this.layers[0].layout.get("fill-sort-key"),b=!v.isConstant(),S=[];for(const{feature:W,id:U,index:A,sourceLayerIndex:X}of r){const Z=this.layers[0]._featureFilter.needGeometry,G=fl(W,Z);if(!this.layers[0]._featureFilter.filter(new en(this.zoom),G,d))continue;const H=b?v.evaluate(G,{}
71,d,l.availableImages):void 0,J={id:U,properties:W.properties,type:W.type,sourceLayerIndex:X,index:A,geometry:Z?G.geometry:Cs(W),patterns:{},sortKey:H};S.push(J)}b&&S.sort((W,U)=>W.sortKey-U.sortKey);for(const W of S){const{geometry:U,index:A,sourceLayerIndex:X}=W;if(this.hasPattern){const Z=Gp("fill",this.layers,W,this.zoom,l);this.patternFeatures.push(Z)}else this.addFeature(W,U,A,d,{},l.subdivisionGranularity);l.featureIndex.insert(r[A].feature,U,A,X,this.index)}}update(r,l,d){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(r,l,this.stateDependentLayers,d)}addFeatures(r,l,d){for(const v of this.patternFeatures)this.addFeature(v,v.geometry,v.index,l,d,r.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(r){this.uploaded||(this.layoutVertexBuffer=r.createVertexBuffer(this.layoutVertexArray,ma),this.indexBuffer=r.createIndexBuffer(this.indexArray),this.indexBuffer2=r.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(r),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(r,l,d,v,b,S){for(const W of bc(l,500)){const U=ad(W,v,S.fill.getGranularityForZoomLevel(v.z)),A=this.layoutVertexArray;Br((X,Z)=>{A.emplaceBack(X,Z)},this.segments,this.layoutVertexArray,this.indexArray,U.verticesFlattened,U.indicesTriangles,this.segments2,this.indexArray2,U.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,r,d,b,v)}}let Oi,Ga;Xt("FillBucket",ti,{omit:["layers","patternFeatures"]});var $c={get paint(){return Ga=Ga||new An({"fill-antialias":new Zt(ue.paint_fill["fill-antialias"]),"fill-opacity":new ir(ue.paint_fill["fill-opacity"]),"fill-color":new ir(ue.paint_fill["fill-color"]),"fill-outline-color":new ir(ue.paint_fill["fill-outline-color"]),"fill-translate":new Zt(ue.paint_fill["fill-translate"]),"fill-translate-anchor":new Zt(ue.paint_fill["fill-translate-anchor"]),"fill-pattern":new Eo(ue.paint_fill["fill-pattern"])})},get layout(){return Oi=Oi||new An({"fill-sort-key":new ir(ue.layout_fill["fill-sort-key"])})}};class Mi extends ca{constructor(r){super(r,$c)}recalculate(r,l){super.recalculate(r,l);const d=this.paint._values["fill-outline-color"];d.value.kind==="constant"&&d.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(r){return new ti(r)}queryRadius(){return Nc(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:r,geometry:l,transform:d,pixelsToTileUnits:v}){return Rp(Hh(r,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-d.bearingInRadians,v),l)}isTileClipped(){return!0}}const sd=Hr([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Hu=Hr([{name:"a_centroid",components:2,type:"Int16"}],4),{members:xf}=sd;var od,Gc,ga,bf,ou,Ao,ld,qc={};function ml(){if(Gc)return od;Gc=1;var u=k();function r(v,b,S,W,U){this.properties={},this.extent=S,this.type=0,this._pbf=v,this._geometry=-1,this._keys=W,this._values=U,v.readFields(l,this,b)}function l(v,b,S){v==1?b.id=S.readVarint():v==2?function(W,U){for(var A=W.readVarint()+W.pos;W.pos<A;){var X=U._keys[W.readVarint()],Z=U._values[W.readVarint()];U.properties[X]=Z}}(S,b):v==3?b.type=S.readVarint():v==4&&(b._geometry=S.pos)}function d(v){for(var b,S,W=0,U=0,A=v.length,X=A-1;U<A;X=U++)W+=((S=v[X]).x-(b=v[U]).x)*(b.y+S.y);return W}return od=r,r.types=["Unknown","Point","LineString","Polygon"],r.prototype.loadGeometry=function(){var v=this._pbf;v.pos=this._geometry;for(var b,S=v.readVarint()+v.pos,W=1,U=0,A=0,X=0,Z=[];v.pos<S;){if(U<=0){var G=v.readVarint();W=7&G,U=G>>3}if(U--,W===1||W===2)A+=v.readSVarint(),X+=v.readSVarint(),W===1&&(b&&Z.push(b),b=[]),b.push(new u(A,X));else{if(W!==7)throw new Error("unknown command "+W);b&&b.push(b[0].clone())}}return b&&Z.push(b),Z},r.prototype.bbox=function(){var v=this._pbf;v.pos=this._geometry;for(var b=v.readVarint()+v.pos,S=1,W=0,U=0,A=0,X=1/0,Z=-1/0,G=1/0,H=-1/0;v.pos<b;){if(W<=0){var J=v.readVarint();S=7&J,W=J>>3}if(W--,S===1||S===2)(U+=v.readSVarint())<X&&(X=U),U>Z&&(Z=U),(A+=v.readSVarint())<G&&(G=A),A>H&&(H=A);else if(S!==7)throw new Error("unknown command "+S)}return[X,G,Z,H]},r.prototype.toGeoJSON=function(v,b,S){var W,U,A=this.extent*Math.pow(2,S),X=this.extent*v,Z=this.extent*b,G=this.loadGeometry(),H=r.types[this.type];function J(ve){for(var Ae=0;Ae<ve.length;Ae++){var Ye=ve[Ae];ve[Ae]=[360*(Ye.x+X)/A-180,360/Math.PI*Math.atan(Math.exp((180-360*(Ye.y+Z)/A)*Math.PI/180)
vendor: 9,133 bytes, line 71
71)-90]}}switch(this.type){case 1:var te=[];for(W=0;W<G.length;W++)te[W]=G[W][0];J(G=te);break;case 2:for(W=0;W<G.length;W++)J(G[W]);break;case 3:for(G=function(ve){var Ae=ve.length;if(Ae<=1)return[ve];for(var Ye,q,oe=[],Me=0;Me<Ae;Me++){var et=d(ve[Me]);et!==0&&(q===void 0&&(q=et<0),q===et<0?(Ye&&oe.push(Ye),Ye=[ve[Me]]):Ye.push(ve[Me]))}return Ye&&oe.push(Ye),oe}(G),W=0;W<G.length;W++)for(U=0;U<G[W].length;U++)J(G[W][U])}G.length===1?G=G[0]:H="Multi"+H;var ce={type:"Feature",geometry:{type:H,coordinates:G},properties:this.properties};return"id"in this&&(ce.id=this.id),ce},od}function ud(){if(bf)return ga;bf=1;var u=ml();function r(d,v){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=d,this._keys=[],this._values=[],this._features=[],d.readFields(l,this,v),this.length=this._features.length}function l(d,v,b){d===15?v.version=b.readVarint():d===1?v.name=b.readString():d===5?v.extent=b.readVarint():d===2?v._features.push(b.pos):d===3?v._keys.push(b.readString()):d===4&&v._values.push(function(S){for(var W=null,U=S.readVarint()+S.pos;S.pos<U;){var A=S.readVarint()>>3;W=A===1?S.readString():A===2?S.readFloat():A===3?S.readDouble():A===4?S.readVarint64():A===5?S.readVarint():A===6?S.readSVarint():A===7?S.readBoolean():null}return W}(b))}return ga=r,r.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 v=this._pbf.readVarint()+this._pbf.pos;return new u(this._pbf,v,this.extent,this._keys,this._values)},ga}function gl(){return ld||(ld=1,qc.VectorTile=function(){if(Ao)return ou;Ao=1;var u=ud();function r(l,d,v){if(l===3){var b=new u(v,v.readVarint()+v.pos);b.length&&(d[b.name]=b)}}return ou=function(l,d){this.layers=l.readFields(r,{},d)},ou}(),qc.VectorTileFeature=ml(),qc.VectorTileLayer=ud()),qc}var lu=Y(gl());const cd=lu.VectorTileFeature.types,hd=Math.pow(2,13);function uu(u,r,l,d,v,b,S,W){u.emplaceBack(r,l,2*Math.floor(d*hd)+S,v*hd*2,b*hd*2,Math.round(W))}class Hc{constructor(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(l=>l.id),this.index=r.index,this.hasPattern=!1,this.layoutVertexArray=new yt,this.centroidVertexArray=new lt,this.indexArray=new Or,this.programConfigurations=new ps(r.layers,r.zoom),this.segments=new Vr,this.stateDependentLayerIds=this.layers.filter(l=>l.isStateDependent()).map(l=>l.id)}populate(r,l,d){this.features=[],this.hasPattern=$p("fill-extrusion",this.layers,l);for(const{feature:v,id:b,index:S,sourceLayerIndex:W}of r){const U=this.layers[0]._featureFilter.needGeometry,A=fl(v,U);if(!this.layers[0]._featureFilter.filter(new en(this.zoom),A,d))continue;const X={id:b,sourceLayerIndex:W,index:S,geometry:U?A.geometry:Cs(v),properties:v.properties,type:v.type,patterns:{}};this.hasPattern?this.features.push(Gp("fill-extrusion",this.layers,X,this.zoom,l)):this.addFeature(X,X.geometry,S,d,{},l.subdivisionGranularity),l.featureIndex.insert(v,X.geometry,S,W,this.index,!0)}}addFeatures(r,l,d){for(const v of this.features){const{geometry:b}=v;this.addFeature(v,b,v.index,l,d,r.subdivisionGranularity)}}update(r,l,d){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(r,l,this.stateDependentLayers,d)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(r){this.uploaded||(this.layoutVertexBuffer=r.createVertexBuffer(this.layoutVertexArray,xf),this.centroidVertexBuffer=r.createVertexBuffer(this.centroidVertexArray,Hu.members,!0),this.indexBuffer=r.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(r),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(r,l,d,v,b,S){for(const W of bc(l,500)){const U={x:0,y:0,sampleCount:0},A=this.layoutVertexArray.length;this.processPolygon(U,v,r,W,S);const X=this.layoutVertexArray.length-A,Z=Math.floor(U.x/U.sampleCount),G=Math.floor(U.y/U.sampleCount);for(let H=0;H<X;H++)this.centroidVertexArray.emplaceBack(Z,G)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,r,d,b,v)}processPolygon(r,l,d,v,b){if(v.length<1||Ds(v[0]))return;for(const Z of v)Z.length!==0&&Pa(r,Z);const S={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},W=b.fill.getGranularityForZoomLevel(l.z),U=cd[d.type]==="Polygon";for(const Z of v){if(Z.length===0||Ds(Z))continue;const G=pl(Z,W,U);this._generateSideFaces(G,S)}if(!U)return;const A=ad(v,l,W,!1),X=this.layoutVertexArray;Br((Z,G)=>{uu(X,Z,G,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,A.verticesFlattened,A.indicesTriangles)}_generateSideFaces(r,l){let d=0;for(let v=1;v<r.length;v++){const b=r[v],S=r[v-1];if(cu(b,S))continue;l.segment.vertexLength+4>Vr.MAX_VERTEX_ARRAY_LENGTH&&(l.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const W=b.sub(S)._perp()._unit(),U=S.dist(b);d+U>32768&&(d=0),uu(this.layoutVertexArray,b.x,b.y,W.x,W.y,0,0,d),uu(this.layoutVertexArray,b.x,b.y,W.x,W.y,0,1,d),d+=U,uu(this.layoutVertexArray,S.x,S.y,W.x,W.y,0,0,d),uu(this.layoutVertexArray,S.x,S.y,W.x,W.y,0,1,d);const A=l.segment.vertexLength;this.indexArray.emplaceBack(A,A+2,A+1),this.indexArray.emplaceBack(A+1,A+2,A+3),l.segment.vertexLength+=4,l.segment.primitiveLength+=2}}}function Pa(u,r){for(let l=0;l<r.length;l++){const d=r[l];l===r.length-1&&r[0].x===d.x&&r[0].y===d.y||(u.x+=d.x,u.y+=d.y,u.sampleCount++)}}function cu(u,r){return u.x===r.x&&(u.x<0||u.x>Qe)||u.y===r.y&&(u.y<0||u.y>Qe)}function Ds(u){return u.every(r=>r.x<0)||u.every(r=>r.x>Qe)||u.every(r=>r.y<0)||u.every(r=>r.y>Qe)}let Ia;Xt("FillExtrusionBucket",Hc,{omit:["layers","features"]});var Rg={get paint(){return Ia=Ia||new An({"fill-extrusion-opacity":new Zt(ue["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ir(ue["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Zt(ue["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Zt(ue["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Eo(ue["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ir(ue["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ir(ue["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Zt(ue["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class em extends ca{constructor(r){super(r,Rg)}createBucket(r){return new Hc(r)}queryRadius(){return Nc(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:r,feature:l,featureState:d,geometry:v,transform:b,pixelsToTileUnits:S,pixelPosMatrix:W}){const U=Hh(r,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-b.bearingInRadians,S),A=this.paint.get("fill-extrusion-height").evaluate(l,d),X=this.paint.get("fill-extrusion-base").evaluate(l,d),Z=function(H,J,te){const ce=[];for(const ve of H){const Ae=[ve.x,ve.y,0,1];Re(Ae,Ae,J),ce.push(new F(Ae[0]/Ae[3],Ae[1]/Ae[3]))}return ce}(U,W),G=function(H,J,te,ce){const ve=[],Ae=[],Ye=ce[8]*J,q=ce[9]*J,oe=ce[10]*J,Me=ce[11]*J,et=ce[8]*te,wt=ce[9]*te,it=ce[10]*te,dt=ce[11]*te;for(const Pt of H){const St=[],Ct=[];for(const mt of Pt){const jt=mt.x,ar=mt.y,tr=ce[0]*jt+ce[4]*ar+ce[12],qt=ce[1]*jt+ce[5]*ar+ce[13],Ar=ce[2]*jt+ce[6]*ar+ce[14],$n=ce[3]*jt+ce[7]*ar+ce[15],Pi=Ar+oe,va=$n+Me,to=tr+et,ms=qt+wt,ea=Ar+it,kn=$n+dt,Ni=new F((tr+Ye)/va,(qt+q)/va);Ni.z=Pi/va,St.push(Ni);const ta=new F(to/kn,ms/kn);ta.z=ea/kn,Ct.push(ta)}ve.push(St),Ae.push(Ct)}return[ve,Ae]}(v,X,A,W);return function(H,J,te){let ce=1/0;Rp(te,J)&&(ce=Lg(te,J[0]));for(let ve=0;ve<J.length;ve++){const Ae=J[ve],Ye=H[ve];for(let q=0;q<Ae.length-1;q++){const oe=Ae[q],Me=[oe,Ae[q+1],Ye[q+1],Ye[q],oe];Dp(te,Me)&&(ce=Math.min(ce,Lg(te,Me)))}}return ce!==1/0&&ce}(G[0],G[1],Z)}}function Ku(u,r){return u.x*r.x+u.y*r.y}function Lg(u,r){if(u.length===1){let l=0;const d=r[l++];let v;for(;!v||d.equals(v);)if(v=r[l++],!v)return 1/0;for(;l<r.length;l++){const b=r[l],S=u[0],W=v.sub(d),U=b.sub(d),A=S.sub(d),X=Ku(W,W),Z=Ku(W,U),G=Ku(U,U),H=Ku(A,W),J=Ku(A,U),te=X*G-Z*Z,ce=(G*H-Z*J)/te,ve=(X*J-Z*H)/te,Ae=d.z*(1-ce-ve)+v.z*ce+b.z*ve;if(isFinite(Ae))return Ae}return 1/0}{let l=1/0;for(const d of r)l=Math.min(l,d.z);return l}}const hu=Hr([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:Og}=hu,tm=Hr([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:Qu}=tm,rm=lu.VectorTileFeature.types,Ju=Math.cos(Math.PI/180*37.5),nm=Math.pow(2,14)/.5;class wf{constructor(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(l=>l.id),this.index=r.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={}
vendor: 5,162 bytes, line 71
71,this.layers.forEach(l=>{this.gradients[l.id]={}}),this.layoutVertexArray=new zt,this.layoutVertexArray2=new mr,this.indexArray=new Or,this.programConfigurations=new ps(r.layers,r.zoom),this.segments=new Vr,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(l=>l.isStateDependent()).map(l=>l.id)}populate(r,l,d){this.hasPattern=$p("line",this.layers,l);const v=this.layers[0].layout.get("line-sort-key"),b=!v.isConstant(),S=[];for(const{feature:W,id:U,index:A,sourceLayerIndex:X}of r){const Z=this.layers[0]._featureFilter.needGeometry,G=fl(W,Z);if(!this.layers[0]._featureFilter.filter(new en(this.zoom),G,d))continue;const H=b?v.evaluate(G,{},d):void 0,J={id:U,properties:W.properties,type:W.type,sourceLayerIndex:X,index:A,geometry:Z?G.geometry:Cs(W),patterns:{},sortKey:H};S.push(J)}b&&S.sort((W,U)=>W.sortKey-U.sortKey);for(const W of S){const{geometry:U,index:A,sourceLayerIndex:X}=W;if(this.hasPattern){const Z=Gp("line",this.layers,W,this.zoom,l);this.patternFeatures.push(Z)}else this.addFeature(W,U,A,d,{},l.subdivisionGranularity);l.featureIndex.insert(r[A].feature,U,A,X,this.index)}}update(r,l,d){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(r,l,this.stateDependentLayers,d)}addFeatures(r,l,d){for(const v of this.patternFeatures)this.addFeature(v,v.geometry,v.index,l,d,r.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(r){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=r.createVertexBuffer(this.layoutVertexArray2,Qu)),this.layoutVertexBuffer=r.createVertexBuffer(this.layoutVertexArray,Og),this.indexBuffer=r.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(r),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(r){if(r.properties&&Object.prototype.hasOwnProperty.call(r.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(r.properties,"mapbox_clip_end"))return{start:+r.properties.mapbox_clip_start,end:+r.properties.mapbox_clip_end}}addFeature(r,l,d,v,b,S){const W=this.layers[0].layout,U=W.get("line-join").evaluate(r,{}),A=W.get("line-cap"),X=W.get("line-miter-limit"),Z=W.get("line-round-limit");this.lineClips=this.lineFeatureClips(r);for(const G of l)this.addLine(G,r,U,A,X,Z,v,S);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,r,d,b,v)}addLine(r,l,d,v,b,S,W,U){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,r=pl(r,W?U.line.getGranularityForZoomLevel(W.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Ye=0;Ye<r.length-1;Ye++)this.totalDistance+=r[Ye].dist(r[Ye+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const A=rm[l.type]==="Polygon";let X=r.length;for(;X>=2&&r[X-1].equals(r[X-2]);)X--;let Z=0;for(;Z<X-1&&r[Z].equals(r[Z+1]);)Z++;if(X<(A?3:2))return;d==="bevel"&&(b=1.05);const G=this.overscaling<=16?15*Qe/(512*this.overscaling):0,H=this.segments.prepareSegment(10*X,this.layoutVertexArray,this.indexArray);let J,te,ce,ve,Ae;this.e1=this.e2=-1,A&&(J=r[X-2],Ae=r[Z].sub(J)._unit()._perp());for(let Ye=Z;Ye<X;Ye++){if(ce=Ye===X-1?A?r[Z+1]:void 0:r[Ye+1],ce&&r[Ye].equals(ce))continue;Ae&&(ve=Ae),J&&(te=J),J=r[Ye],Ae=ce?ce.sub(J)._unit()._perp():ve,ve=ve||Ae;let q=ve.add(Ae);q.x===0&&q.y===0||q._unit();const oe=ve.x*Ae.x+ve.y*Ae.y,Me=q.x*Ae.x+q.y*Ae.y,et=Me!==0?1/Me:1/0,wt=2*Math.sqrt(2-2*Me),it=Me<Ju&&te&&ce,dt=ve.x*Ae.y-ve.y*Ae.x>0;if(it&&Ye>Z){const Ct=J.dist(te);if(Ct>2*G){const mt=J.sub(J.sub(te)._mult(G/Ct)._round());this.updateDistance(te,mt),this.addCurrentVertex(mt,ve,0,0,H),te=mt}}const Pt=te&&ce;let St=Pt?d:A?"butt":v;if(Pt&&St==="round"&&(et<S?St="miter":et<=2&&(St="fakeround")),St==="miter"&&et>b&&(St="bevel"),St==="bevel"&&(et>2&&(St="flipbevel"),et<b&&(St="miter")),te&&this.updateDistance(te,J),St==="miter")q._mult(et),this.addCurrentVertex(J,q,0,0,H);else if(St==="flipbevel"){if(et>100)q=Ae.mult(-1);else{const Ct=et*ve.add(Ae).mag()/ve.sub(Ae).mag();q._perp()._mult(Ct*(dt?-1:1))}this.addCurrentVertex(J,q,0,0,H),this.addCurrentVertex(J,q.mult(-1),0,0,H)}else if(St==="bevel"||St==="fakeround"){const Ct=-Math.sqrt(et*et-1),mt=dt?Ct:0,jt=dt?0:Ct;if(te&&this.addCurrentVertex(J,ve,mt,jt,H),St==="fakeround"){const ar=Math.round(180*wt/Math.PI/20);for(let tr=1;tr<ar;tr++){let qt=tr/ar;if(qt!==.5){const $n=qt-.5;qt+=qt*$n*(qt-1)*((1.0904+oe*(oe*(3.55645-1.43519*oe)-3.2452))*$n*$n+(.848013+oe*(.215638*oe-1.06021)))}const Ar=Ae.sub(ve)._mult(qt)._add(ve)._unit()._mult(dt?-1:1);this.addHalfVertex(J,Ar.x,Ar.y,!1,dt,0,H)}}ce&&this.addCurrentVertex(J,Ae,-mt,-jt,H)}else if(St==="butt")this.addCurrentVertex(J,q,0,0,H);else if(St==="square"){const Ct=te?1:-1;this.addCurrentVertex(J,q,Ct,Ct,H)}else St==="round"&&(te&&(this.addCurrentVertex(J,ve,0,0,H),this.addCurrentVertex(J,ve,1,1,H,!0)),ce&&(this.addCurrentVertex(J,Ae,-1,-1,H,!0),this.addCurrentVertex(J,Ae,0,0,H)));if(it&&Ye<X-1){const Ct=J.dist(ce);if(Ct>
vendor: 9,272 bytes, line 71
712*G){const mt=J.add(ce.sub(J)._mult(G/Ct)._round());this.updateDistance(J,mt),this.addCurrentVertex(mt,Ae,0,0,H),J=mt}}}}addCurrentVertex(r,l,d,v,b,S=!1){const W=l.y*v-l.x,U=-l.y-l.x*v;this.addHalfVertex(r,l.x+l.y*d,l.y-l.x*d,S,!1,d,b),this.addHalfVertex(r,W,U,S,!0,-v,b),this.distance>nm/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(r,l,d,v,b,S))}addHalfVertex({x:r,y:l},d,v,b,S,W,U){const A=.5*(this.lineClips?this.scaledDistance*(nm-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((r<<1)+(b?1:0),(l<<1)+(S?1:0),Math.round(63*d)+128,Math.round(63*v)+128,1+(W===0?0:W<0?-1:1)|(63&A)<<2,A>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const X=U.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,X,this.e2),U.primitiveLength++),S?this.e2=X:this.e1=X}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(r,l){this.distance+=r.dist(l),this.updateScaledDistance()}}let Yf,dd;Xt("LineBucket",wf,{omit:["layers","patternFeatures"]});var Xg={get paint(){return dd=dd||new An({"line-opacity":new ir(ue.paint_line["line-opacity"]),"line-color":new ir(ue.paint_line["line-color"]),"line-translate":new Zt(ue.paint_line["line-translate"]),"line-translate-anchor":new Zt(ue.paint_line["line-translate-anchor"]),"line-width":new ir(ue.paint_line["line-width"]),"line-gap-width":new ir(ue.paint_line["line-gap-width"]),"line-offset":new ir(ue.paint_line["line-offset"]),"line-blur":new ir(ue.paint_line["line-blur"]),"line-dasharray":new nu(ue.paint_line["line-dasharray"]),"line-pattern":new Eo(ue.paint_line["line-pattern"]),"line-gradient":new Mo(ue.paint_line["line-gradient"])})},get layout(){return Yf=Yf||new An({"line-cap":new Zt(ue.layout_line["line-cap"]),"line-join":new ir(ue.layout_line["line-join"]),"line-miter-limit":new Zt(ue.layout_line["line-miter-limit"]),"line-round-limit":new Zt(ue.layout_line["line-round-limit"]),"line-sort-key":new ir(ue.layout_line["line-sort-key"])})}};class zv extends ir{possiblyEvaluate(r,l){return l=new en(Math.floor(l.zoom),{now:l.now,fadeDuration:l.fadeDuration,zoomHistory:l.zoomHistory,transition:l.transition}),super.possiblyEvaluate(r,l)}evaluate(r,l,d,v){return l=or({},l,{zoom:Math.floor(l.zoom)}),super.evaluate(r,l,d,v)}}let fd;class Ng extends ca{constructor(r){super(r,Xg),this.gradientVersion=0,fd||(fd=new zv(Xg.paint.properties["line-width"].specification),fd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(r){if(r==="line-gradient"){const l=this.gradientExpression();this.stepInterpolant=!!function(d){return d._styleExpression!==void 0}(l)&&l._styleExpression.expression instanceof qn,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(r,l){super.recalculate(r,l),this.paint._values["line-floorwidth"]=fd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,r)}createBucket(r){return new wf(r)}queryRadius(r){const l=r,d=du(Xc("line-width",this,l),Xc("line-gap-width",this,l)),v=Xc("line-offset",this,l);return d/2+Math.abs(v)+Nc(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:r,feature:l,featureState:d,geometry:v,transform:b,pixelsToTileUnits:S}){const W=Hh(r,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-b.bearingInRadians,S),U=S/2*du(this.paint.get("line-width").evaluate(l,d),this.paint.get("line-gap-width").evaluate(l,d)),A=this.paint.get("line-offset").evaluate(l,d);return A&&(v=function(X,Z){const G=[];for(let H=0;H<X.length;H++){const J=X[H],te=[];for(let ce=0;ce<J.length;ce++){const ve=J[ce-1],Ae=J[ce],Ye=J[ce+1],q=ce===0?new F(0,0):Ae.sub(ve)._unit()._perp(),oe=ce===J.length-1?new F(0,0):Ye.sub(Ae)._unit()._perp(),Me=q._add(oe)._unit(),et=Me.x*oe.x+Me.y*oe.y;et!==0&&Me._mult(1/et),te.push(Me._mult(Z)._add(Ae))}G.push(te)}return G}(v,A*S)),function(X,Z,G){for(let H=0;H<Z.length;H++){const J=Z[H];if(X.length>=3){for(let te=0;te<J.length;te++)if(su(X,J[te]))return!0}if(Pg(X,J,G))return!0}return!1}(W,v,U)}isTileClipped(){return!0}}function du(u,r){return r>0?r+2*u:u}const Fv=Hr([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Kc=Hr([{name:"a_projected_pos",components:3,type:"Float32"}],4);Hr([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const zg=Hr([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Hr([{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 jn=Hr([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Zv=Hr([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Fg(u,r,l){return u.sections.forEach(d=>{d.text=function(v,b,S){const W=b.layout.get("text-transform").evaluate(S,{});return W==="uppercase"?v=v.toLocaleUpperCase():W==="lowercase"&&(v=v.toLocaleLowerCase()),Ps.applyArabicShaping&&(v=Ps.applyArabicShaping(v)),v}(d.text,r,l)}),u}Hr([{name:"triangle",components:3,type:"Uint16"}]),Hr([{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"}]),Hr([{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",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Hr([{type:"Float32",name:"offsetX"}]),Hr([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Hr([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const pd={"!":"ï¸","#":"ï¼",$:"ï¼","%":"ï¼
","&":"ï¼","(":"︵",")":"︶","*":"ï¼","+":"ï¼",",":"ï¸","-":"︲",".":"ã»","/":"ï¼",":":"ï¸",";":"ï¸","<":"︿","=":"ï¼",">":"ï¹","?":"ï¸","@":"ï¼ ","[":"ï¹","\\":"ï¼¼","]":"ï¹","^":"ï¼¾",_:"︳","`":"ï½","{":"︷","|":"â","}":"︸","~":"ï½","¢":"ï¿ ","£":"ï¿¡","Â¥":"ï¿¥","¦":"¦","¬":"ï¿¢","¯":"ï¿£","â":"︲","â":"︱","â":"ï¹","â":"ï¹","â":"ï¹","â":"ï¹","â¦":"ï¸","â§":"ã»","â©":"₩","ã":"ï¸","ã":"ï¸","ã":"︿","ã":"ï¹","ã":"︽","ã":"︾","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"ï¹","ã":"︻","ã":"︼","ã":"︹","ã":"︺","ã":"ï¸","ã":"ï¸","ï¼":"ï¸","ï¼":"︵","ï¼":"︶","ï¼":"ï¸","ï¼":"︲","ï¼":"ã»","ï¼":"ï¸","ï¼":"ï¸","ï¼":"︿","ï¼":"ï¹","ï¼":"ï¸","ï¼»":"ï¹","ï¼½":"ï¹","_":"︳","ï½":"︷","ï½":"â","ï½":"︸","ï½":"︵","ï½ ":"︶","。":"ï¸","ï½¢":"ï¹","ï½£":"ï¹"};var Zg,Sf,im,li=24,qa={};function am(){return Zg||(Zg=1,qa.read=function(u,r,l,d,v){var b,S,W=8*v-d-1,U=(1<<W)-1,A=U>>1,X=-7,Z=l?v-1:0,G=l?-1:1,H=u[r+Z];for(Z+=G,b=H&(1<<-X)-1,H>>=-X,X+=W;X>0;b=256*b+u[r+Z],Z+=G,X-=8);for(S=b&(1<<-X)-1,b>>=-X,X+=d;X>0;S=256*S+u[r+Z],Z+=G,X-=8);if(b===0)b=1-A;else{if(b===U)return S?NaN:1/0*(H?-1:1);S+=Math.pow(2,d),b-=A}return(H?-1:1)*S*Math.pow(2,b-d)},qa.write=function(u,r,l,d,v,b){var S,W,U,A=8*b-v-1,X=(1<<A)-1,Z=X>>1,G=v===23?Math.pow(2,-24)-Math.pow(2,-77):0,H=d?0:b-1,J=d?1:-1,te=r<0||r===0&&1
vendor: 4,495 bytes, line 71
71/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(W=isNaN(r)?1:0,S=X):(S=Math.floor(Math.log(r)/Math.LN2),r*(U=Math.pow(2,-S))<1&&(S--,U*=2),(r+=S+Z>=1?G/U:G*Math.pow(2,1-Z))*U>=2&&(S++,U/=2),S+Z>=X?(W=0,S=X):S+Z>=1?(W=(r*U-1)*Math.pow(2,v),S+=Z):(W=r*Math.pow(2,Z-1)*Math.pow(2,v),S=0));v>=8;u[l+H]=255&W,H+=J,W/=256,v-=8);for(S=S<<v|W,A+=v;A>0;u[l+H]=255&S,H+=J,S/=256,A-=8);u[l+H-J]|=128*te}),qa}function jg(){if(im)return Sf;im=1,Sf=r;var u=am();function r(q){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(q)?q:new Uint8Array(q||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var l=4294967296,d=1/l,v=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function b(q){return q.type===r.Bytes?q.readVarint()+q.pos:q.pos+1}function S(q,oe,Me){return Me?4294967296*oe+(q>>>0):4294967296*(oe>>>0)+(q>>>0)}function W(q,oe,Me){var et=oe<=16383?1:oe<=2097151?2:oe<=268435455?3:Math.floor(Math.log(oe)/(7*Math.LN2));Me.realloc(et);for(var wt=Me.pos-1;wt>=q;wt--)Me.buf[wt+et]=Me.buf[wt]}function U(q,oe){for(var Me=0;Me<q.length;Me++)oe.writeVarint(q[Me])}function A(q,oe){for(var Me=0;Me<q.length;Me++)oe.writeSVarint(q[Me])}function X(q,oe){for(var Me=0;Me<q.length;Me++)oe.writeFloat(q[Me])}function Z(q,oe){for(var Me=0;Me<q.length;Me++)oe.writeDouble(q[Me])}function G(q,oe){for(var Me=0;Me<q.length;Me++)oe.writeBoolean(q[Me])}function H(q,oe){for(var Me=0;Me<q.length;Me++)oe.writeFixed32(q[Me])}function J(q,oe){for(var Me=0;Me<q.length;Me++)oe.writeSFixed32(q[Me])}function te(q,oe){for(var Me=0;Me<q.length;Me++)oe.writeFixed64(q[Me])}function ce(q,oe){for(var Me=0;Me<q.length;Me++)oe.writeSFixed64(q[Me])}function ve(q,oe){return(q[oe]|q[oe+1]<<8|q[oe+2]<<16)+16777216*q[oe+3]}function Ae(q,oe,Me){q[Me]=oe,q[Me+1]=oe>>>8,q[Me+2]=oe>>>16,q[Me+3]=oe>>>24}function Ye(q,oe){return(q[oe]|q[oe+1]<<8|q[oe+2]<<16)+(q[oe+3]<<24)}return r.prototype={destroy:function(){this.buf=null},readFields:function(q,oe,Me){for(Me=Me||this.length;this.pos<Me;){var et=this.readVarint(),wt=et>>3,it=this.pos;this.type=7&et,q(wt,oe,this),this.pos===it&&this.skip(et)}return oe},readMessage:function(q,oe){return this.readFields(q,oe,this.readVarint()+this.pos)},readFixed32:function(){var q=ve(this.buf,this.pos);return this.pos+=4,q},readSFixed32:function(){var q=Ye(this.buf,this.pos);return this.pos+=4,q},readFixed64:function(){var q=ve(this.buf,this.pos)+ve(this.buf,this.pos+4)*l;return this.pos+=8,q},readSFixed64:function(){var q=ve(this.buf,this.pos)+Ye(this.buf,this.pos+4)*l;return this.pos+=8,q},readFloat:function(){var q=u.read(this.buf,this.pos,!0,23,4);return this.pos+=4,q},readDouble:function(){var q=u.read(this.buf,this.pos,!0,52,8);return this.pos+=8,q},readVarint:function(q){var oe,Me,et=this.buf;return oe=127&(Me=et[this.pos++]),Me<128?oe:(oe|=(127&(Me=et[this.pos++]))<<7,Me<128?oe:(oe|=(127&(Me=et[this.pos++]))<<14,Me<128?oe:(oe|=(127&(Me=et[this.pos++]))<<21,Me<128?oe:function(wt,it,dt){var Pt,St,Ct=dt.buf;if(Pt=(112&(St=Ct[dt.pos++]))>>4,St<128||(Pt|=(127&(St=Ct[dt.pos++]))<<3,St<128)||(Pt|=(127&(St=Ct[dt.pos++]))<<10,St<128)||(Pt|=(127&(St=Ct[dt.pos++]))<<17,St<128)||(Pt|=(127&(St=Ct[dt.pos++]))<<24,St<128)||(Pt|=(1&(St=Ct[dt.pos++]))<<31,St<128))return S(wt,Pt,it);throw new Error("Expected varint not more than 10 bytes")}(oe|=(15&(Me=et[this.pos]))<<28,q,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var q=this.readVarint();return q%2==1?(q+1)/-2:q/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var q=this.readVarint()+this.pos,oe=this.pos;return this.pos=q,q-oe>=12&&v?function(Me,et,wt){return v.decode(Me.subarray(et,wt))}(this.buf,oe,q):function(Me,et,wt){for(var it="",dt=et;dt<wt;){var Pt,St,Ct,mt=Me[dt],jt=null,ar=mt>239?4:mt>223?3:mt>191?2:1;if(dt+ar>wt)break;ar===1?mt<128&&(jt=mt):ar===2?(192&(Pt=Me[dt+1]))==128&&(jt=(31&mt)<<6|63&Pt)<=127&&(jt=null):ar===3?(St=Me[dt+2],(192&(Pt=Me[dt+1]))==128&&(192&St)==128&&((jt=(15&mt)<<12|(63&Pt)<<6|63&St)<=2047||jt>=55296&&jt<=57343)&&(jt=null)):ar===4&&(St=Me[dt+2],Ct=Me[dt+3],(192&(Pt=Me[dt+1]))==128&&(192&St)==128&&(192&Ct)==128&&((jt=(15&mt)<<18|(63&Pt)<<12|(63&St)<<6|63&Ct)<=65535||jt>=1114112)&&(jt=null)),jt===null?(jt=65533,ar=1):jt>65535&&(jt-=65536,it+=String.fromCharCode(jt>>>10&1023|55296),jt=56320|1023&jt),it+=String.fromCharCode(jt),dt+=ar}return it}(this.buf,oe,q)},readBytes:function(){var q=this.readVarint()+this.pos,oe=this.buf.subarray(this.pos,q);return this.pos=q,oe}
vendor: 5,852 bytes, line 71
71,readPackedVarint:function(q,oe){if(this.type!==r.Bytes)return q.push(this.readVarint(oe));var Me=b(this);for(q=q||[];this.pos<Me;)q.push(this.readVarint(oe));return q},readPackedSVarint:function(q){if(this.type!==r.Bytes)return q.push(this.readSVarint());var oe=b(this);for(q=q||[];this.pos<oe;)q.push(this.readSVarint());return q},readPackedBoolean:function(q){if(this.type!==r.Bytes)return q.push(this.readBoolean());var oe=b(this);for(q=q||[];this.pos<oe;)q.push(this.readBoolean());return q},readPackedFloat:function(q){if(this.type!==r.Bytes)return q.push(this.readFloat());var oe=b(this);for(q=q||[];this.pos<oe;)q.push(this.readFloat());return q},readPackedDouble:function(q){if(this.type!==r.Bytes)return q.push(this.readDouble());var oe=b(this);for(q=q||[];this.pos<oe;)q.push(this.readDouble());return q},readPackedFixed32:function(q){if(this.type!==r.Bytes)return q.push(this.readFixed32());var oe=b(this);for(q=q||[];this.pos<oe;)q.push(this.readFixed32());return q},readPackedSFixed32:function(q){if(this.type!==r.Bytes)return q.push(this.readSFixed32());var oe=b(this);for(q=q||[];this.pos<oe;)q.push(this.readSFixed32());return q},readPackedFixed64:function(q){if(this.type!==r.Bytes)return q.push(this.readFixed64());var oe=b(this);for(q=q||[];this.pos<oe;)q.push(this.readFixed64());return q},readPackedSFixed64:function(q){if(this.type!==r.Bytes)return q.push(this.readSFixed64());var oe=b(this);for(q=q||[];this.pos<oe;)q.push(this.readSFixed64());return q},skip:function(q){var oe=7&q;if(oe===r.Varint)for(;this.buf[this.pos++]>127;);else if(oe===r.Bytes)this.pos=this.readVarint()+this.pos;else if(oe===r.Fixed32)this.pos+=4;else{if(oe!==r.Fixed64)throw new Error("Unimplemented type: "+oe);this.pos+=8}},writeTag:function(q,oe){this.writeVarint(q<<3|oe)},realloc:function(q){for(var oe=this.length||16;oe<this.pos+q;)oe*=2;if(oe!==this.length){var Me=new Uint8Array(oe);Me.set(this.buf),this.buf=Me,this.length=oe}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(q){this.realloc(4),Ae(this.buf,q,this.pos),this.pos+=4},writeSFixed32:function(q){this.realloc(4),Ae(this.buf,q,this.pos),this.pos+=4},writeFixed64:function(q){this.realloc(8),Ae(this.buf,-1&q,this.pos),Ae(this.buf,Math.floor(q*d),this.pos+4),this.pos+=8},writeSFixed64:function(q){this.realloc(8),Ae(this.buf,-1&q,this.pos),Ae(this.buf,Math.floor(q*d),this.pos+4),this.pos+=8},writeVarint:function(q){(q=+q||0)>268435455||q<0?function(oe,Me){var et,wt;if(oe>=0?(et=oe%4294967296|0,wt=oe/4294967296|0):(wt=~(-oe/4294967296),4294967295^(et=~(-oe%4294967296))?et=et+1|0:(et=0,wt=wt+1|0)),oe>=18446744073709552e3||oe<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Me.realloc(10),function(it,dt,Pt){Pt.buf[Pt.pos++]=127&it|128,it>>>=7,Pt.buf[Pt.pos++]=127&it|128,it>>>=7,Pt.buf[Pt.pos++]=127&it|128,it>>>=7,Pt.buf[Pt.pos++]=127&it|128,Pt.buf[Pt.pos]=127&(it>>>=7)}(et,0,Me),function(it,dt){var Pt=(7&it)<<4;dt.buf[dt.pos++]|=Pt|((it>>>=3)?128:0),it&&(dt.buf[dt.pos++]=127&it|((it>>>=7)?128:0),it&&(dt.buf[dt.pos++]=127&it|((it>>>=7)?128:0),it&&(dt.buf[dt.pos++]=127&it|((it>>>=7)?128:0),it&&(dt.buf[dt.pos++]=127&it|((it>>>=7)?128:0),it&&(dt.buf[dt.pos++]=127&it)))))}(wt,Me)}(q,this):(this.realloc(4),this.buf[this.pos++]=127&q|(q>127?128:0),q<=127||(this.buf[this.pos++]=127&(q>>>=7)|(q>127?128:0),q<=127||(this.buf[this.pos++]=127&(q>>>=7)|(q>127?128:0),q<=127||(this.buf[this.pos++]=q>>>7&127))))},writeSVarint:function(q){this.writeVarint(q<0?2*-q-1:2*q)},writeBoolean:function(q){this.writeVarint(!!q)},writeString:function(q){q=String(q),this.realloc(4*q.length),this.pos++;var oe=this.pos;this.pos=function(et,wt,it){for(var dt,Pt,St=0;St<wt.length;St++){if((dt=wt.charCodeAt(St))>55295&&dt<57344){if(!Pt){dt>56319||St+1===wt.length?(et[it++]=239,et[it++]=191,et[it++]=189):Pt=dt;continue}if(dt<56320){et[it++]=239,et[it++]=191,et[it++]=189,Pt=dt;continue}dt=Pt-55296<<10|dt-56320|65536,Pt=null}else Pt&&(et[it++]=239,et[it++]=191,et[it++]=189,Pt=null);dt<128?et[it++]=dt:(dt<2048?et[it++]=dt>>6|192:(dt<65536?et[it++]=dt>>12|224:(et[it++]=dt>>18|240,et[it++]=dt>>12&63|128),et[it++]=dt>>6&63|128),et[it++]=63&dt|128)}return it}(this.buf,q,this.pos);var Me=this.pos-oe;Me>=128&&W(oe,Me,this),this.pos=oe-1,this.writeVarint(Me),this.pos+=Me},writeFloat:function(q){this.realloc(4),u.write(this.buf,q,this.pos,!0,23,4),this.pos+=4},writeDouble:function(q){this.realloc(8),u.write(this.buf,q,this.pos,!0,52,8),this.pos+=8},writeBytes:function(q){var oe=q.length;this.writeVarint(oe),this.realloc(oe);for(var Me=0;Me<oe;Me++)this.buf[this.pos++]=q[Me]},writeRawMessage:function(q,oe){this.pos++;var Me=this.pos;q(oe,this);var et=this.pos-Me;et>=128&&W(Me,et,this),this.pos=Me-1,this.writeVarint(et),this.pos+=et},writeMessage:function(q,oe,Me){this.writeTag(q,r.Bytes),this.writeRawMessage(oe,Me)},writePackedVarint:function(q,oe){oe.length&&this.writeMessage(q,U,oe)},writePackedSVarint:function(q,oe){oe.length&&this.writeMessage(q,A,oe)},writePackedBoolean:function(q,oe){oe.length&&this.writeMessage(q,G,oe)},writePackedFloat:function(q,oe){oe.length&&this.writeMessage(q,X,oe)},writePackedDouble:function(q,oe){oe.length&&this.writeMessage(q,Z,oe)},writePackedFixed32:function(q,oe){oe.length&&this.writeMessage(q,H,oe)},writePackedSFixed32:function(q,oe){oe.length&&this.writeMessage(q,J,oe)},writePackedFixed64:function(q,oe){oe.length&&this.writeMessage(q,te,oe)},writePackedSFixed64:function(q,oe){oe.length&&this.writeMessage(q,ce,oe)},writeBytesField:function(q,oe){this.writeTag(q,r.Bytes),this.writeBytes(oe)},writeFixed32Field:function(q,oe){this.writeTag(q,r.Fixed32),this.writeFixed32(oe)},writeSFixed32Field:function(q,oe){this.writeTag(q,r.Fixed32),this.writeSFixed32(oe)},writeFixed64Field:function(q,oe){this.writeTag(q,r.Fixed64),this.writeFixed64
vendor: 11,234 bytes, line 71
71(oe)},writeSFixed64Field:function(q,oe){this.writeTag(q,r.Fixed64),this.writeSFixed64(oe)},writeVarintField:function(q,oe){this.writeTag(q,r.Varint),this.writeVarint(oe)},writeSVarintField:function(q,oe){this.writeTag(q,r.Varint),this.writeSVarint(oe)},writeStringField:function(q,oe){this.writeTag(q,r.Bytes),this.writeString(oe)},writeFloatField:function(q,oe){this.writeTag(q,r.Fixed32),this.writeFloat(oe)},writeDoubleField:function(q,oe){this.writeTag(q,r.Fixed64),this.writeDouble(oe)},writeBooleanField:function(q,oe){this.writeVarintField(q,!!oe)}},Sf}var ko=Y(jg());const Qc=3;function ec(u,r,l){u===1&&l.readMessage(Tf,r)}function Tf(u,r,l){if(u===3){const{id:d,bitmap:v,width:b,height:S,left:W,top:U,advance:A}=l.readMessage(sm,{});r.push({id:d,bitmap:new zc({width:b+2*Qc,height:S+2*Qc},v),metrics:{width:b,height:S,left:W,top:U,advance:A}})}}function sm(u,r,l){u===1?r.id=l.readVarint():u===2?r.bitmap=l.readBytes():u===3?r.width=l.readVarint():u===4?r.height=l.readVarint():u===5?r.left=l.readSVarint():u===6?r.top=l.readSVarint():u===7&&(r.advance=l.readVarint())}const om=Qc;function Bg(u){let r=0,l=0;for(const S of u)r+=S.w*S.h,l=Math.max(l,S.w);u.sort((S,W)=>W.h-S.h);const d=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(r/.95)),l),h:1/0}];let v=0,b=0;for(const S of u)for(let W=d.length-1;W>=0;W--){const U=d[W];if(!(S.w>U.w||S.h>U.h)){if(S.x=U.x,S.y=U.y,b=Math.max(b,S.y+S.h),v=Math.max(v,S.x+S.w),S.w===U.w&&S.h===U.h){const A=d.pop();W<d.length&&(d[W]=A)}else S.h===U.h?(U.x+=S.w,U.w-=S.w):S.w===U.w?(U.y+=S.h,U.h-=S.h):(d.push({x:U.x+S.w,y:U.y,w:U.w-S.w,h:S.h}),U.y+=S.h,U.h-=S.h);break}}return{w:v,h:b,fill:r/(v*b)||0}}const Ji=1;class lm{constructor(r,{pixelRatio:l,version:d,stretchX:v,stretchY:b,content:S,textFitWidth:W,textFitHeight:U}){this.paddedRect=r,this.pixelRatio=l,this.stretchX=v,this.stretchY=b,this.content=S,this.version=d,this.textFitWidth=W,this.textFitHeight=U}get tl(){return[this.paddedRect.x+Ji,this.paddedRect.y+Ji]}get br(){return[this.paddedRect.x+this.paddedRect.w-Ji,this.paddedRect.y+this.paddedRect.h-Ji]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Ji)/this.pixelRatio,(this.paddedRect.h-2*Ji)/this.pixelRatio]}}class um{constructor(r,l){const d={},v={};this.haveRenderCallbacks=[];const b=[];this.addImages(r,d,b),this.addImages(l,v,b);const{w:S,h:W}=Bg(b),U=new pa({width:S||1,height:W||1});for(const A in r){const X=r[A],Z=d[A].paddedRect;pa.copy(X.data,U,{x:0,y:0},{x:Z.x+Ji,y:Z.y+Ji},X.data)}for(const A in l){const X=l[A],Z=v[A].paddedRect,G=Z.x+Ji,H=Z.y+Ji,J=X.data.width,te=X.data.height;pa.copy(X.data,U,{x:0,y:0},{x:G,y:H},X.data),pa.copy(X.data,U,{x:0,y:te-1},{x:G,y:H-1},{width:J,height:1}),pa.copy(X.data,U,{x:0,y:0},{x:G,y:H+te},{width:J,height:1}),pa.copy(X.data,U,{x:J-1,y:0},{x:G-1,y:H},{width:1,height:te}),pa.copy(X.data,U,{x:0,y:0},{x:G+J,y:H},{width:1,height:te})}this.image=U,this.iconPositions=d,this.patternPositions=v}addImages(r,l,d){for(const v in r){const b=r[v],S={x:0,y:0,w:b.data.width+2*Ji,h:b.data.height+2*Ji};d.push(S),l[v]=new lm(S,b),b.hasRenderCallback&&this.haveRenderCallbacks.push(v)}}patchUpdatedImages(r,l){r.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const d in r.updatedImages)this.patchUpdatedImage(this.iconPositions[d],r.getImage(d),l),this.patchUpdatedImage(this.patternPositions[d],r.getImage(d),l)}patchUpdatedImage(r,l,d){if(!r||!l||r.version===l.version)return;r.version=l.version;const[v,b]=r.tl;d.update(l.data,void 0,{x:v,y:b})}}var yl;Xt("ImagePosition",lm),Xt("ImageAtlas",um),g.al=void 0,(yl=g.al||(g.al={}))[yl.none=0]="none",yl[yl.horizontal=1]="horizontal",yl[yl.vertical=2]="vertical",yl[yl.horizontalOnly=3]="horizontalOnly";const tc=-17;class fu{constructor(){this.scale=1,this.fontStack="",this.imageName=null,this.verticalAlign="bottom"}static forText(r,l,d){const v=new fu;return v.scale=r||1,v.fontStack=l,v.verticalAlign=d||"bottom",v}static forImage(r,l){const d=new fu;return d.imageName=r,d.verticalAlign=l||"bottom",d}}class rc{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(r,l){const d=new rc;for(let v=0;v<r.sections.length;v++){const b=r.sections[v];b.image?d.addImageSection(b):d.addTextSection(b,l)}return d}length(){return this.text.length}getSection(r){return this.sections[this.sectionIndex[r]]}getSectionIndex(r){return this.sectionIndex[r]}getCharCode(r){return this.text.charCodeAt(r)}verticalizePunctuation(){this.text=function(r){let l="";for(let d=0;d<r.length;d++){const v=r.charCodeAt(d+1)||null,b=r.charCodeAt(d-1)||null;l+=v&&Hi(v)&&!pd[r[d+1]]||b&&Hi(b)&&!pd[r[d-1]]||!pd[r[d]]?r[d]:pd[r[d]]}return l}(this.text)}trim(){let r=0;for(let d=0;d<this.text.length&&Wf[this.text.charCodeAt(d)];d++)r++;let l=this.text.length;for(let d=this.text.length-1;d>=0&&d>=r&&Wf[this.text.charCodeAt(d)];d--)l--;this.text=this.text.substring(r,l),this.sectionIndex=this.sectionIndex.slice(r,l)}substring(r,l){const d=new rc;return d.text=this.text.substring(r,l),d.sectionIndex=this.sectionIndex.slice(r,l),d.sections=this.sections,d}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((r,l)=>Math.max(r,this.sections[l].scale),0)}getMaxImageSize(r){let l=0,d=0;for(let v=0;v<this.length();v++){const b=this.getSection(v);if(b.imageName){const S=r[b.imageName];if(!S)continue;const W=S.displaySize;l=Math.max(l,W[0]),d=Math.max(d,W[1])}}return{maxImageWidth:l,maxImageHeight:d}}addTextSection(r,l){this.text+=r.text,this.sections.push(fu.forText(r.scale,r.fontStack||l,r.verticalAlign));const d=this.sections.length-1;for(let v=0;v<r.text.length;++v)this.sectionIndex.push(d)}addImageSection(r){const l=r.image?r.image.name:"";if(l.length===0)return void pn("Can't add FormattedSection with an empty image.");const d=this.getNextImageSectionCharCode();d?(this.text+=String.fromCharCode(d),this.sections.push(fu.forImage(l,r.verticalAlign)),this.sectionIndex.push(this.sections.length-1)):pn("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Jc(u,r,l,d,v,b,S,W,U,A,X,Z,G,H,J){const te=rc.fromFeature(u,v);let ce;Z===g.al.vertical&&te.verticalizePunctuation();const{processBidirectionalText:ve,processStyledBidirectionalText:Ae}=Ps;if(ve&&te.sections.length===1){ce=[];const oe=ve(te.toString(),eh(te,A,b,r,d,H));for(const Me of oe){const et=new rc;et.text=Me,et.sections=te.sections;for(let wt=0;wt<Me.length;wt++)et.sectionIndex.push(0);ce.push(et)}}else if(Ae){ce=[];const oe=Ae(te.text,te.sectionIndex,eh(te,A,b,r,d,H));for(const Me of oe){const et=new rc;et.text=Me[0],et.sectionIndex=Me[1],et.sections=te.sections,ce.push(et)}}else ce=function(oe,Me){const et=[],wt=oe.text;let it=0;for(const dt of Me)et.push(oe.substring(it,dt)),it=dt;return it<wt.length&&et.push(oe.substring(it,wt.length)),et}(te,eh(te,A,b,r,d,H));const Ye=[],q={positionedLines:Ye,text:te.toString(),top:X[1],bottom:X[1],left:X[0],right:X[0],writingMode:Z,iconsInText:!1,verticalizable:!1};return function(oe,Me,et,wt,it,dt,Pt,St,Ct,mt,jt,ar){let tr=0,qt=0,Ar=0,$n=0;const Pi=St==="right"?1:St==="left"?0:.5,va=li/ar;let to=0;for(const kn of it){kn.trim();const Ni=kn.getMaxScale(),ta={positionedGlyphs:[],lineOffset:0};oe.positionedLines[to]=ta;const ra=ta.positionedGlyphs;let Ha=0;if(!kn.length()){qt+=dt,++to;continue}const ro=gd(wt,kn,va);for(let gs=0;gs<kn.length();gs++){const Ii=kn.getSection(gs),Fi=kn.getSectionIndex(gs),Zi=kn.getCharCode(gs),pi=Pf(Ct,jt,Zi);let Tn;if(Ii.imageName){if(oe.iconsInText=!0,Ii.scale=Ii.scale*va,Tn=p(Ii,pi,Ni,ro,wt),!Tn)continue;Ha=Math.max(Ha,Tn.imageOffset)}else if(Tn=c(Ii,Zi,pi,ro,Me,et),!Tn)continue;const{rect:_l,metrics:Cf,baselineOffset:xl}=Tn;ra.push({glyph:Zi,imageName:Ii.imageName,x:tr,y:qt+xl+tc,vertical:pi,scale:Ii.scale,fontStack:Ii.fontStack,sectionIndex:Fi,metrics:Cf,rect:_l}),pi?(oe.verticalizable=!0,tr+=(Ii.imageName?Cf.advance:li)*Ii.scale+mt):tr+=Cf.advance*Ii.scale+mt}ra.length!==0&&(Ar=Math.max(tr-mt,Ar),w(ra,0,ra.length-1,Pi)),tr=0,ta.lineOffset=Math.max(Ha,(Ni-1)*li);const zi=dt*Ni+Ha;qt+=zi,$n=Math.max(zi,$n),++to}const{horizontalAlign:ms,verticalAlign:ea}=dm(Pt);(function(kn,Ni,ta,ra,Ha,ro,zi,gs,Ii){const Fi=(Ni-ta)*Ha;let Zi=0;Zi=ro!==zi?-gs*ra-tc:-ra*Ii*zi+.5*zi;for(const pi of kn)for(const Tn of pi.positionedGlyphs)Tn.x+=Fi,Tn.y+=Zi})(oe.positionedLines,Pi,ms,ea,Ar,$n,dt,qt,it.length),oe.top+=-ea*qt,oe.bottom=oe.top+qt,oe.left+=-ms*Ar,oe.right=oe.left+Ar}(q,r,l,d,ce,S,W,U,Z,A,G,J),!function(oe){for(const Me of oe)if(Me.positionedGlyphs.length!==0)return!1;return!0}(Ye)&&q}const Wf={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},$g={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},cm={40:!0};function md(u,r,l,d,v,b){if(r.imageName){const S=d[r.imageName];return S?S.displaySize[0]*r.scale*li/b+v:0}{const S=l[r.fontStack],W=S&&S[u];return W?W.metrics.advance*r.scale+v:0}}function Ef(u,r,l,d){const v=Math.pow(u-r,2);return d?u<r?v/2:2*v:v+Math.abs(l)*l}function Mf(u,r,l){let d=0;return u===10&&(d-=1e4),l&&(d+=150),u!==40&&u!==65288||(d+=50),r!==41&&r!==65289||(d+=50),d}function hm(u,r,l,d,v,b){let S=null,W=Ef(r,l,v,b);for(const U of d){const A=Ef(r-U.x,l,v,b)+U.badness;A<=W&&(S=U,W=A)}return{index:u,x:r,priorBreak:S,badness:W}}function Gg(u){return u?Gg(u.priorBreak).concat(u.index):[]}function eh(u,r,l,d,v,b){if(!u)return[];const S=[],W=function(Z,G,H,J,te,ce){let ve=0;for(let Ae=0;Ae<Z.length();Ae++){const Ye=Z.getSection(Ae);ve+=md(Z.getCharCode(Ae),Ye,J,te,G,ce)}return ve/Math.max(1,Math.ceil(ve/H))}(u,r,l,d,v,b),U=u.text.indexOf("â")>=0;let A=0;for(let Z=0;Z<u.length();Z++){const G=u.getSection(Z),H=u.getCharCode(Z);if(Wf[H]||(A+=md(H,G,d,v,r,b)),Z<u.length()-1){const J=!((X=H)<11904)&&(!!pr["CJK Compatibility Forms"](X)||!!pr["CJK Compatibility"](X)||!!pr["CJK Strokes"](X)||!!pr["CJK Symbols and Punctuation"](X)||!!pr["Enclosed CJK Letters and Months"](X)||!!pr["Halfwidth and Fullwidth Forms"](X)||!!pr["Ideographic Description Characters"](X)||!!pr["Vertical Forms"](X)||qi.test(String.fromCodePoint(X)));($g[H]||J||G.imageName||Z!==u.length()-2&&cm[u.getCharCode(Z+1)])&&S.push(hm(Z+1,A,W,S,Mf(H,u.getCharCode(Z+1),J&&U),!1))}}var X;return Gg(hm(u.length(),A,W,S,0,!0))}function dm(u){let r=.5,l=.5;switch(u){case"right":case"top-right":case"bottom-right":r=1;break;case"left":case"top-left":case"bottom-left":r=0}switch(u){case"bottom":case"bottom-right":case"bottom-left":l=1;break;case"top":case"top-right":case"top-left":l=0}return{horizontalAlign:r,verticalAlign:l}}function gd(u,r,l){const d=r.getMaxScale()*li,{maxImageWidth:v,maxImageHeight:b}=r.getMaxImageSize(u),S=Math.max(d,b*l);return{verticalLineContentWidth:Math.max(d,v*l),horizontalLineContentHeight:S}}function qg(u){switch(u){case"top":return 0;case"center":return .5;default:return 1}}function Pf(u,r,l){return!(u===g.al.horizontal||!r&&!ln(l)||r&&(Wf[l]||(d=l,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(d)))));var d}function c(u,r,l,d,v,b){const S=b[u.fontStack],W=function(A,X,Z,G){if(A&&A.rect)return A;const H=X[Z.fontStack],J=H&&H[G];return J?{rect:null,metrics:J.metrics}:null}(S&&S[r],v,u,r);
vendor: 26,905 bytes, line 71
71if(W===null)return null;let U;if(l)U=d.verticalLineContentWidth-u.scale*li;else{const A=qg(u.verticalAlign);U=(d.horizontalLineContentHeight-u.scale*li)*A}return{rect:W.rect,metrics:W.metrics,baselineOffset:U}}function p(u,r,l,d,v){const b=v[u.imageName];if(!b)return null;const S=b.paddedRect,W=b.displaySize,U={width:W[0],height:W[1],left:Ji,top:-3,advance:r?W[1]:W[0]};let A;if(r)A=d.verticalLineContentWidth-W[1]*u.scale;else{const X=qg(u.verticalAlign);A=(d.horizontalLineContentHeight-W[1]*u.scale)*X}return{rect:S,metrics:U,baselineOffset:A,imageOffset:(r?W[0]:W[1])*u.scale-li*l}}function w(u,r,l,d){if(d===0)return;const v=u[l],b=(u[l].x+v.metrics.advance*v.scale)*d;for(let S=r;S<=l;S++)u[S].x-=b}function M(u,r,l){const{horizontalAlign:d,verticalAlign:v}=dm(l),b=r[0]-u.displaySize[0]*d,S=r[1]-u.displaySize[1]*v;return{image:u,top:S,bottom:S+u.displaySize[1],left:b,right:b+u.displaySize[0]}}function R(u){var r,l;let d=u.left,v=u.top,b=u.right-d,S=u.bottom-v;const W=(r=u.image.textFitWidth)!==null&&r!==void 0?r:"stretchOrShrink",U=(l=u.image.textFitHeight)!==null&&l!==void 0?l:"stretchOrShrink",A=(u.image.content[2]-u.image.content[0])/(u.image.content[3]-u.image.content[1]);if(U==="proportional"){if(W==="stretchOnly"&&b/S<A||W==="proportional"){const X=Math.ceil(S*A);d*=X/b,b=X}}else if(W==="proportional"&&U==="stretchOnly"&&A!==0&&b/S>A){const X=Math.ceil(b/A);v*=X/S,S=X}return{x1:d,y1:v,x2:d+b,y2:v+S}}function z(u,r,l,d,v,b){const S=u.image;let W;if(S.content){const ce=S.content,ve=S.pixelRatio||1;W=[ce[0]/ve,ce[1]/ve,S.displaySize[0]-ce[2]/ve,S.displaySize[1]-ce[3]/ve]}const U=r.left*b,A=r.right*b;let X,Z,G,H;l==="width"||l==="both"?(H=v[0]+U-d[3],Z=v[0]+A+d[1]):(H=v[0]+(U+A-S.displaySize[0])/2,Z=H+S.displaySize[0]);const J=r.top*b,te=r.bottom*b;return l==="height"||l==="both"?(X=v[1]+J-d[0],G=v[1]+te+d[2]):(X=v[1]+(J+te-S.displaySize[1])/2,G=X+S.displaySize[1]),{image:S,top:X,right:Z,bottom:G,left:H,collisionPadding:W}}const re=255,Se=128,ke=re*Se;function ut(u,r){const{expression:l}=r;if(l.kind==="constant")return{kind:"constant",layoutSize:l.evaluate(new en(u+1))};if(l.kind==="source")return{kind:"source"};{const{zoomStops:d,interpolationType:v}=l;let b=0;for(;b<d.length&&d[b]<=u;)b++;b=Math.max(0,b-1);let S=b;for(;S<d.length&&d[S]<u+1;)S++;S=Math.min(d.length-1,S);const W=d[b],U=d[S];return l.kind==="composite"?{kind:"composite",minZoom:W,maxZoom:U,interpolationType:v}:{kind:"camera",minZoom:W,maxZoom:U,minSize:l.evaluate(new en(W)),maxSize:l.evaluate(new en(U)),interpolationType:v}}}function It(u,r,l){let d="never";const v=u.get(r);return v?d=v:u.get(l)&&(d="always"),d}const kt=lu.VectorTileFeature.types,Ut=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Bt(u,r,l,d,v,b,S,W,U,A,X,Z,G){const H=W?Math.min(ke,Math.round(W[0])):0,J=W?Math.min(ke,Math.round(W[1])):0;u.emplaceBack(r,l,Math.round(32*d),Math.round(32*v),b,S,(H<<1)+(U?1:0),J,16*A,16*X,256*Z,256*G)}function Qt(u,r,l){u.emplaceBack(r.x,r.y,l),u.emplaceBack(r.x,r.y,l),u.emplaceBack(r.x,r.y,l),u.emplaceBack(r.x,r.y,l)}function Jt(u){for(const r of u.sections)if(Gh(r.text))return!0;return!1}class Bn{constructor(r){this.layoutVertexArray=new dn,this.indexArray=new Or,this.programConfigurations=r,this.segments=new Vr,this.dynamicLayoutVertexArray=new tn,this.opacityVertexArray=new vn,this.hasVisibleVertices=!1,this.placedSymbolArray=new Ee}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(r,l,d,v){this.isEmpty()||(d&&(this.layoutVertexBuffer=r.createVertexBuffer(this.layoutVertexArray,Fv.members),this.indexBuffer=r.createIndexBuffer(this.indexArray,l),this.dynamicLayoutVertexBuffer=r.createVertexBuffer(this.dynamicLayoutVertexArray,Kc.members,!0),this.opacityVertexBuffer=r.createVertexBuffer(this.opacityVertexArray,Ut,!0),this.opacityVertexBuffer.itemSize=1),(d||v)&&this.programConfigurations.upload(r))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Xt("SymbolBuffers",Bn);class Je{constructor(r,l,d){this.layoutVertexArray=new r,this.layoutAttributes=l,this.indexArray=new d,this.segments=new Vr,this.collisionVertexArray=new nn}upload(r){this.layoutVertexBuffer=r.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=r.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=r.createVertexBuffer(this.collisionVertexArray,zg.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Xt("CollisionBuffers",Je);class Ne{constructor(r){this.collisionBoxArray=r.collisionBoxArray,this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map(S=>S.id),this.index=r.index,this.pixelRatio=r.pixelRatio,this.sourceLayerIndex=r.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const l=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ut(this.zoom,l["text-size"]),this.iconSizeData=ut(this.zoom,l["icon-size"]);const d=this.layers[0].layout,v=d.get("symbol-sort-key"),b=d.get("symbol-z-order");this.canOverlap=It(d,"text-overlap","text-allow-overlap")!=="never"||It(d,"icon-overlap","icon-allow-overlap")!=="never"||d.get("text-ignore-placement")||d.get("icon-ignore-placement"),this.sortFeaturesByKey=b!=="viewport-y"&&!v.isConstant(),this.sortFeaturesByY=(b==="viewport-y"||b==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,d.get("symbol-placement")==="point"&&(this.writingModes=d.get("text-writing-mode").map(S=>g.al[S])),this.stateDependentLayerIds=this.layers.filter(S=>S.isStateDependent()).map(S=>S.id),this.sourceID=r.sourceID}createArrays(){this.text=new Bn(new ps(this.layers,this.zoom,r=>/^text/.test(r))),this.icon=new Bn(new ps(this.layers,this.zoom,r=>/^icon/.test(r))),this.glyphOffsetArray=new Ie,this.lineVertexArray=new Ce,this.symbolInstances=new Pe,this.textAnchorOffsets=new ct}calculateGlyphDependencies(r,l,d,v,b){for(let S=0;S<r.length;S++)if(l[r.charCodeAt(S)]=!0,(d||v)&&b){const W=pd[r.charAt(S)];W&&(l[W.charCodeAt(0)]=!0)}}populate(r,l,d){const v=this.layers[0],b=v.layout,S=b.get("text-font"),W=b.get("text-field"),U=b.get("icon-image"),A=(W.value.kind!=="constant"||W.value.value instanceof On&&!W.value.value.isEmpty()||W.value.value.toString().length>0)&&(S.value.kind!=="constant"||S.value.value.length>0),X=U.value.kind!=="constant"||!!U.value.value||Object.keys(U.parameters).length>0,Z=b.get("symbol-sort-key");if(this.features=[],!A&&!X)return;const G=l.iconDependencies,H=l.glyphDependencies,J=l.availableImages,te=new en(this.zoom);for(const{feature:ce,id:ve,index:Ae,sourceLayerIndex:Ye}of r){const q=v._featureFilter.needGeometry,oe=fl(ce,q);if(!v._featureFilter.filter(te,oe,d))continue;let Me,et;if(q||(oe.geometry=Cs(ce)),A){const it=v.getValueAndResolveTokens("text-field",oe,d,J),dt=On.factory(it),Pt=this.hasRTLText=this.hasRTLText||Jt(dt);(!Pt||Ps.getRTLTextPluginStatus()==="unavailable"||Pt&&Ps.isParsed())&&(Me=Fg(dt,v,oe))}if(X){const it=v.getValueAndResolveTokens("icon-image",oe,d,J);et=it instanceof Ti?it:Ti.fromString(it)}if(!Me&&!et)continue;const wt=this.sortFeaturesByKey?Z.evaluate(oe,{},d):void 0;if(this.features.push({id:ve,text:Me,icon:et,index:Ae,sourceLayerIndex:Ye,geometry:oe.geometry,properties:ce.properties,type:kt[ce.type],sortKey:wt}),et&&(G[et.name]=!0),Me){const it=S.evaluate(oe,{},d).join(","),dt=b.get("text-rotation-alignment")!=="viewport"&&b.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(g.al.vertical)>=0;for(const Pt of Me.sections)if(Pt.image)G[Pt.image.name]=!0;else{const St=Ms(Me.toString()),Ct=Pt.fontStack||it,mt=H[Ct]=H[Ct]||{};this.calculateGlyphDependencies(Pt.text,mt,dt,this.allowVerticalPlacement,St)}}}b.get("symbol-placement")==="line"&&(this.features=function(ce){const ve={},Ae={},Ye=[];let q=0;function oe(it){Ye.push(ce[it]),q++}function Me(it,dt,Pt){const St=Ae[it];return delete Ae[it],Ae[dt]=St,Ye[St].geometry[0].pop(),Ye[St].geometry[0]=Ye[St].geometry[0].concat(Pt[0]),St}function et(it,dt,Pt){const St=ve[dt];return delete ve[dt],ve[it]=St,Ye[St].geometry[0].shift(),Ye[St].geometry[0]=Pt[0].concat(Ye[St].geometry[0]),St}function wt(it,dt,Pt){const St=Pt?dt[0][dt[0].length-1]:dt[0][0];return`${it}:${St.x}:${St.y}`}for(let it=0;it<ce.length;it++){const dt=ce[it],Pt=dt.geometry,St=dt.text?dt.text.toString():null;if(!St){oe(it);continue}const Ct=wt(St,Pt),mt=wt(St,Pt,!0);if(Ct in Ae&&mt in ve&&Ae[Ct]!==ve[mt]){const jt=et(Ct,mt,Pt),ar=Me(Ct,mt,Ye[jt].geometry);delete ve[Ct],delete Ae[mt],Ae[wt(St,Ye[ar].geometry,!0)]=ar,Ye[jt].geometry=null}else Ct in Ae?Me(Ct,mt,Pt):mt in ve?et(Ct,mt,Pt):(oe(it),ve[Ct]=q-1,Ae[mt]=q-1)}return Ye.filter(it=>it.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ce,ve)=>ce.sortKey-ve.sortKey)}update(r,l,d){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(r,l,this.layers,d),this.icon.programConfigurations.updatePaintArrays(r,l,this.layers,d))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(r){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(r),this.iconCollisionBox.upload(r)),this.text.upload(r,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(r,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(r,l){const d=this.lineVertexArray.length;if(r.segment!==void 0){let v=r.dist(l[r.segment+1]),b=r.dist(l[r.segment]);const S={};for(let W=r.segment+1;W<l.length;W++)S[W]={x:l[W].x,y:l[W].y,tileUnitDistanceFromAnchor:v},W<l.length-1&&(v+=l[W+1].dist(l[W]));for(let W=r.segment||0;W>=0;W--)S[W]={x:l[W].x,y:l[W].y,tileUnitDistanceFromAnchor:b},W>0&&(b+=l[W-1].dist(l[W]));for(let W=0;W<l.length;W++){const U=S[W];this.lineVertexArray.emplaceBack(U.x,U.y,U.tileUnitDistanceFromAnchor)}}return{lineStartIndex:d,lineLength:this.lineVertexArray.length-d}}addSymbols(r,l,d,v,b,S,W,U,A,X,Z,G){const H=r.indexArray,J=r.layoutVertexArray,te=r.segments.prepareSegment(4*l.length,J,H,this.canOverlap?S.sortKey:void 0),ce=this.glyphOffsetArray.length,ve=te.vertexLength,Ae=this.allowVerticalPlacement&&W===g.al.vertical?Math.PI/2:0,Ye=S.text&&S.text.sections;for(let q=0;q<l.length;q++){const{tl:oe,tr:Me,bl:et,br:wt,tex:it,pixelOffsetTL:dt,pixelOffsetBR:Pt,minFontScaleX:St,minFontScaleY:Ct,glyphOffset:mt,isSDF:jt,sectionIndex:ar}=l[q],tr=te.vertexLength,qt=mt[1];Bt(J,U.x,U.y,oe.x,qt+oe.y,it.x,it.y,d,jt,dt.x,dt.y,St,Ct),Bt(J,U.x,U.y,Me.x,qt+Me.y,it.x+it.w,it.y,d,jt,Pt.x,dt.y,St,Ct),Bt(J,U.x,U.y,et.x,qt+et.y,it.x,it.y+it.h,d,jt,dt.x,Pt.y,St,Ct),Bt(J,U.x,U.y,wt.x,qt+wt.y,it.x+it.w,it.y+it.h,d,jt,Pt.x,Pt.y,St,Ct),Qt(r.dynamicLayoutVertexArray,U,Ae),H.emplaceBack(tr,tr+2,tr+1),H.emplaceBack(tr+1,tr+2,tr+3),te.vertexLength+=4,te.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(mt[0]),q!==l.length-1&&ar===l[q+1].sectionIndex||r.programConfigurations.populatePaintArrays(J.length,S,S.index,{},G,Ye&&Ye[ar])}r.placedSymbolArray.emplaceBack(U.x,U.y,ce,this.glyphOffsetArray.length-ce,ve,A,X,U.segment,d?d[0]:0,d?d[1]:0,v[0],v[1],W,0,!1,0,Z)}_addCollisionDebugVertex(r,l,d,v,b,S){return l.emplaceBack(0,0),r.emplaceBack(d.x,d.y,v,b,Math.round(S.x),Math.round(S.y))}addCollisionDebugVertices(r,l,d,v,b,S,W){const U=b.segments.prepareSegment(4,b.layoutVertexArray,b.indexArray),A=U.vertexLength,X=b.layoutVertexArray,Z=b.collisionVertexArray,G=W.anchorX,H=W.anchorY;this._addCollisionDebugVertex(X,Z,S,G,H,new F(r,l)),this._addCollisionDebugVertex(X,Z,S,G,H,new F(d,l)),this._addCollisionDebugVertex(X,Z,S,G,H,new F(d,v)),this._addCollisionDebugVertex(X,Z,S,G,H,new F(r,v)),U.vertexLength+=4;const J=b.indexArray;J.emplaceBack(A,A+1),J.emplaceBack(A+1,A+2),J.emplaceBack(A+2,A+3),J.emplaceBack(A+3,A),U.primitiveLength+=4}addDebugCollisionBoxes(r,l,d,v){for(let b=r;b<l;b++){const S=this.collisionBoxArray.get(b);this.addCollisionDebugVertices(S.x1,S.y1,S.x2,S.y2,v?this.textCollisionBox:this.iconCollisionBox,S.anchorPoint,d)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Je(_n,jn.members,Kn),this.iconCollisionBox=new Je(_n,jn.members,Kn);for(let r=0;r<this.symbolInstances.length;r++){const l=this.symbolInstances.get(r);this.addDebugCollisionBoxes(l.textBoxStartIndex,l.textBoxEndIndex,l,!0),this.addDebugCollisionBoxes(l.verticalTextBoxStartIndex,l.verticalTextBoxEndIndex,l,!0),this.addDebugCollisionBoxes(l.iconBoxStartIndex,l.iconBoxEndIndex,l,!1),this.addDebugCollisionBoxes(l.verticalIconBoxStartIndex,l.verticalIconBoxEndIndex,l,!1)}}_deserializeCollisionBoxesForSymbol(r,l,d,v,b,S,W,U,A){const X={};for(let Z=l;Z<d;Z++){const G=r.get(Z);X.textBox={x1:G.x1,y1:G.y1,x2:G.x2,y2:G.y2,anchorPointX:G.anchorPointX,anchorPointY:G.anchorPointY},X.textFeatureIndex=G.featureIndex;break}for(let Z=v;Z<b;Z++){const G=r.get(Z);X.verticalTextBox={x1:G.x1,y1:G.y1,x2:G.x2,y2:G.y2,anchorPointX:G.anchorPointX,anchorPointY:G.anchorPointY},X.verticalTextFeatureIndex=G.featureIndex;break}for(let Z=S;Z<W;Z++){const G=r.get(Z);X.iconBox={x1:G.x1,y1:G.y1,x2:G.x2,y2:G.y2,anchorPointX:G.anchorPointX,anchorPointY:G.anchorPointY},X.iconFeatureIndex=G.featureIndex;break}for(let Z=U;Z<A;Z++){const G=r.get(Z);X.verticalIconBox={x1:G.x1,y1:G.y1,x2:G.x2,y2:G.y2,anchorPointX:G.anchorPointX,anchorPointY:G.anchorPointY},X.verticalIconFeatureIndex=G.featureIndex;break}return X}deserializeCollisionBoxes(r){this.collisionArrays=[];for(let l=0;l<this.symbolInstances.length;l++){const d=this.symbolInstances.get(l);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(r,d.textBoxStartIndex,d.textBoxEndIndex,d.verticalTextBoxStartIndex,d.verticalTextBoxEndIndex,d.iconBoxStartIndex,d.iconBoxEndIndex,d.verticalIconBoxStartIndex,d.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(r,l){const d=r.placedSymbolArray.get(l),v=d.vertexStartIndex+4*d.numGlyphs;for(let b=d.vertexStartIndex;b<v;b+=4)r.indexArray.emplaceBack(b,b+2,b+1),r.indexArray.emplaceBack(b+1,b+2,b+3)}getSortedSymbolIndexes(r){if(this.sortedAngle===r&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const l=Math.sin(r),d=Math.cos(r),v=[],b=[],S=[];for(let W=0;W<this.symbolInstances.length;++W){S.push(W);const U=this.symbolInstances.get(W);v.push(0|Math.round(l*U.anchorX+d*U.anchorY)),b.push(U.featureIndex)}return S.sort((W,U)=>v[W]-v[U]||b[U]-b[W]),S}addToSortKeyRanges(r,l){const d=this.sortKeyRanges[this.sortKeyRanges.length-1];d&&d.sortKey===l?d.symbolInstanceEnd=r+1:this.sortKeyRanges.push({sortKey:l,symbolInstanceStart:r,symbolInstanceEnd:r+1})}sortFeatures(r){if(this.sortFeaturesByY&&this.sortedAngle!==r&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(r),this.sortedAngle=r,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const l of this.symbolInstanceIndexes){const d=this.symbolInstances.get(l);this.featureSortOrder.push(d.featureIndex),[d.rightJustifiedTextSymbolIndex,d.centerJustifiedTextSymbolIndex,d.leftJustifiedTextSymbolIndex].forEach((v,b,S)=>{v>=0&&S.indexOf(v)===b&&this.addIndicesForPlacedSymbol(this.text,v)}),d.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,d.verticalPlacedTextSymbolIndex),d.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,d.placedIconSymbolIndex),d.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,d.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let nt,Rt;Xt("SymbolBucket",Ne,{omit:["layers","collisionBoxArray","features","compareText"]}),Ne.MAX_GLYPHS=65535,Ne.addDynamicAttributes=Qt;var er={get paint(){return Rt=Rt||new An({"icon-opacity":new ir(ue.paint_symbol["icon-opacity"]),"icon-color":new ir(ue.paint_symbol["icon-color"]),"icon-halo-color":new ir(ue.paint_symbol["icon-halo-color"]),"icon-halo-width":new ir(ue.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ir(ue.paint_symbol["icon-halo-blur"]),"icon-translate":new Zt(ue.paint_symbol["icon-translate"]),"icon-translate-anchor":new Zt(ue.paint_symbol["icon-translate-anchor"]),"text-opacity":new ir(ue.paint_symbol["text-opacity"]),"text-color":new ir(ue.paint_symbol["text-color"],{runtimeType:sr,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new ir(ue.paint_symbol["text-halo-color"]),"text-halo-width":new ir(ue.paint_symbol["text-halo-width"]),"text-halo-blur":new ir(ue.paint_symbol["text-halo-blur"]),"text-translate":new Zt(ue.paint_symbol["text-translate"]),"text-translate-anchor":new Zt(ue.paint_symbol["text-translate-anchor"])})},get layout(){return nt=nt||new An({"symbol-placement":new Zt(ue.layout_symbol["symbol-placement"]),"symbol-spacing":new Zt(ue.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Zt(ue.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ir(ue.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Zt(ue.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Zt(ue.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Zt(ue.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Zt(ue.layout_symbol["icon-ignore-placement"]),"icon-optional":new Zt(ue.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Zt(ue.layout_symbol["icon-rotation-alignment"]),"icon-size":new ir(ue.layout_symbol["icon-size"]),"icon-text-fit":new Zt(ue.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Zt(ue.layout_symbol["icon-text-fit-padding"]),"icon-image":new ir(ue.layout_symbol["icon-image"]),"icon-rotate":new ir(ue.layout_symbol["icon-rotate"]),"icon-padding":new ir(ue.layout_symbol["icon-padding"]),"icon-keep-upright":new Zt(ue.layout_symbol["icon-keep-upright"]),"icon-offset":new ir(ue.layout_symbol["icon-offset"]),"icon-anchor":new ir(ue.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Zt(ue.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Zt(ue.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Zt(ue.layout_symbol["text-rotation-alignment"]),"text-field":new ir(ue.layout_symbol["text-field"]),"text-font":new ir(ue.layout_symbol["text-font"]),"text-size":new ir(ue.layout_symbol["text-size"]),"text-max-width":new ir(ue.layout_symbol["text-max-width"]),"text-line-height":new Zt(ue.layout_symbol["text-line-height"]),"text-letter-spacing":new ir(ue.layout_symbol["text-letter-spacing"]),"text-justify":new ir(ue.layout_symbol["text-justify"]),"text-radial-offset":new ir(ue.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Zt(ue.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new ir(ue.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new ir(ue.layout_symbol["text-anchor"]),"text-max-angle":new Zt(ue.layout_symbol["text-max-angle"]),"text-writing-mode":new Zt(ue.layout_symbol["text-writing-mode"]),"text-rotate":new ir(ue.layout_symbol["text-rotate"]),"text-padding":new Zt(ue.layout_symbol["text-padding"]),"text-keep-upright":new Zt(ue.layout_symbol["text-keep-upright"]),"text-transform":new ir(ue.layout_symbol["text-transform"]),"text-offset":new ir(ue.layout_symbol["text-offset"]),"text-allow-overlap":new Zt(ue.layout_symbol["text-allow-overlap"]),"text-overlap":new Zt(ue.layout_symbol["text-overlap"]),"text-ignore-placement":new Zt(ue.layout_symbol["text-ignore-placement"]),"text-optional":new Zt(ue.layout_symbol["text-optional"])})}};class cr{constructor(r){if(r.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=r.property.overrides?r.property.overrides.runtimeType:Et,this.defaultValue=r}evaluate(r){if(r.formattedSection){const l=this.defaultValue.property.overrides;if(l&&l.hasOverride(r.formattedSection))return l.getOverride(r.formattedSection)}return r.feature&&r.featureState?this.defaultValue.evaluate(r.feature,r.featureState):this.defaultValue.property.specification.default}eachChild(r){this.defaultValue.isConstant()||r(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Xt("FormatSectionOverride",cr,{omit:["defaultValue"]});class lr extends ca{constructor(r){super(r,er)}recalculate(r,l){if(super.recalculate(r,l),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 d=this.layout.get("text-writing-mode");if(d){const v=[];for(const b of d)v.indexOf(b)<0&&v.push(b);this.layout._values["text-writing-mode"]=v}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(r,l,d,v){const b=this.layout.get(r).evaluate(l,{},d,v),S=this._unevaluatedLayout._values[r];return S.isDataDriven()||bo(S.value)||!b?b:function(W,U){return U.replace(/{([^{}]+)}/g,(A,X)=>W&&X in W?String(W[X]):"")}(l.properties,b)}createBucket(r){return new Ne(r)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const r of er.paint.overridableProperties){if(!lr.hasPaintOverride(this.layout,r))continue;const l=this.paint.get(r),d=new cr(l),v=new Hl(d,l.property.specification);let b=null;b=l.value.kind==="constant"||l.value.kind==="source"?new Wc("source",v):new Kl("composite",v,l.value.zoomStops),this.paint._values[r]=new Li(l.property,b,l.parameters)}}_handleOverridablePaintPropertyUpdate(r,l,d){return!(!this.layout||l.isDataDriven()||d.isDataDriven())&&lr.hasPaintOverride(this.layout,r)}static hasPaintOverride(r,l){const d=r.get("text-field"),v=er.paint.properties[l];let b=!1;const S=W=>{for(const U of W)if(v.overrides&&v.overrides.hasOverride(U))return void(b=!0)};if(d.value.kind==="constant"&&d.value.value instanceof On)S(d.value.value.sections);else if(d.value.kind==="source"){const W=A=>{b||(A instanceof ur&&Sn(A.value)===ka?S(A.value.sections):A instanceof mc?S(A.sections):A.eachChild(W))},U=d.value;U._styleExpression&&W(U._styleExpression.expression)}return b}}let yr;var Xi={get paint(){return yr=yr||new An({"background-color":new Zt(ue.paint_background["background-color"]),"background-pattern":new nu(ue.paint_background["background-pattern"]),"background-opacity":new Zt(ue.paint_background["background-opacity"])})}};class Kr extends ca{constructor(r){super(r,Xi)}}let vl;var jv={get paint(){return vl=vl||new An({"raster-opacity":new Zt(ue.paint_raster["raster-opacity"]),"raster-hue-rotate":new Zt(ue.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Zt(ue.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Zt(ue.paint_raster["raster-brightness-max"]),"raster-saturation":new Zt(ue.paint_raster["raster-saturation"]),"raster-contrast":new Zt(ue.paint_raster["raster-contrast"]),"raster-resampling":new Zt(ue.paint_raster["raster-resampling"]),"raster-fade-duration":new Zt(ue.paint_raster["raster-fade-duration"])})}};class EC extends ca{constructor(r){super(r,jv)}}class MC extends ca{constructor(r){super(r,{}),this.onAdd=l=>{this.implementation.onAdd&&this.implementation.onAdd(l,l.painter.context.gl)},this.onRemove=l=>{this.implementation.onRemove&&this.implementation.onRemove(l,l.painter.context.gl)},this.implementation=r}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")}}class PC{constructor(r){this._methodToThrottle=r,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const IC={once:!0},Bv=63710088e-1;class th{constructor(r,l){if(isNaN(r)||isNaN(l))throw new Error(`Invalid LngLat object: (${r}, ${l})`);if(this.lng=+r,this.lat=+l,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new th(rr(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(r){const l=Math.PI/180,d=this.lat*l,v=r.lat*l,b=Math.sin(d)*Math.sin(v)+Math.cos(d)*Math.cos(v)*Math.cos((r.lng-this.lng)*l);return Bv*Math.acos(Math.min(b,1))}static convert(r){if(r instanceof th)return r;if(Array.isArray(r)&&(r.length===2||r.length===3))return new th(Number(r[0]),Number(r[1]));if(!Array.isArray(r)&&typeof r=="object"&&r!==null)return new th(Number("lng"in r?r.lng:r.lon),Number(r.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>]")}}const aS=2*Math.PI*Bv;function sS(u){return aS*Math.cos(u*Math.PI/180)}function oS(u){return(180+u)/360}function lS(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function uS(u,r){return u/sS(r)}function $v(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180)
vendor: 9,059 bytes, line 71
71)-90}function cS(u,r){return u*sS($v(r))}class fm{constructor(r,l,d=0){this.x=+r,this.y=+l,this.z=+d}static fromLngLat(r,l=0){const d=th.convert(r);return new fm(oS(d.lng),lS(d.lat),uS(l,d.lat))}toLngLat(){return new th(360*this.x-180,$v(this.y))}toAltitude(){return cS(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/aS*(r=$v(this.y),1/Math.cos(r*Math.PI/180));var r}}function hS(u,r,l){var d=2*Math.PI*6378137/256/Math.pow(2,l);return[u*d-2*Math.PI*6378137/2,r*d-2*Math.PI*6378137/2]}class Gv{constructor(r,l,d){if(!function(v,b,S){return!(v<0||v>25||S<0||S>=Math.pow(2,v)||b<0||b>=Math.pow(2,v))}(r,l,d))throw new Error(`x=${l}, y=${d}, z=${r} outside of bounds. 0<=x<${Math.pow(2,r)}, 0<=y<${Math.pow(2,r)} 0<=z<=25 `);this.z=r,this.x=l,this.y=d,this.key=If(0,r,r,l,d)}equals(r){return this.z===r.z&&this.x===r.x&&this.y===r.y}url(r,l,d){const v=(S=this.y,W=this.z,U=hS(256*(b=this.x),256*(S=Math.pow(2,W)-S-1),W),A=hS(256*(b+1),256*(S+1),W),U[0]+","+U[1]+","+A[0]+","+A[1]);var b,S,W,U,A;const X=function(Z,G,H){let J,te="";for(let ce=Z;ce>0;ce--)J=1<<ce-1,te+=(G&J?1:0)+(H&J?2:0);return te}(this.z,this.x,this.y);return r[(this.x+this.y)%r.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(d==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,l>1?"@2x":"").replace(/{quadkey}/g,X).replace(/{bbox-epsg-3857}/g,v)}isChildOf(r){const l=this.z-r.z;return l>0&&r.x===this.x>>l&&r.y===this.y>>l}getTilePoint(r){const l=Math.pow(2,this.z);return new F((r.x*l-this.x)*Qe,(r.y*l-this.y)*Qe)}toString(){return`${this.z}/${this.x}/${this.y}`}}class dS{constructor(r,l){this.wrap=r,this.canonical=l,this.key=If(r,l.z,l.z,l.x,l.y)}}class eo{constructor(r,l,d,v,b){if(this.terrainRttPosMatrix32f=null,r<d)throw new Error(`overscaledZ should be >= z; overscaledZ = ${r}; z = ${d}`);this.overscaledZ=r,this.wrap=l,this.canonical=new Gv(d,+v,+b),this.key=If(l,r,d,v,b)}clone(){return new eo(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(r){return this.overscaledZ===r.overscaledZ&&this.wrap===r.wrap&&this.canonical.equals(r.canonical)}scaledTo(r){if(r>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${r}; overscaledZ = ${this.overscaledZ}`);const l=this.canonical.z-r;return r>this.canonical.z?new eo(r,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new eo(r,this.wrap,r,this.canonical.x>>l,this.canonical.y>>l)}calculateScaledKey(r,l){if(r>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${r}; overscaledZ = ${this.overscaledZ}`);const d=this.canonical.z-r;return r>this.canonical.z?If(this.wrap*+l,r,this.canonical.z,this.canonical.x,this.canonical.y):If(this.wrap*+l,r,r,this.canonical.x>>d,this.canonical.y>>d)}isChildOf(r){if(r.wrap!==this.wrap)return!1;const l=this.canonical.z-r.canonical.z;return r.overscaledZ===0||r.overscaledZ<this.overscaledZ&&r.canonical.x===this.canonical.x>>l&&r.canonical.y===this.canonical.y>>l}children(r){if(this.overscaledZ>=r)return[new eo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const l=this.canonical.z+1,d=2*this.canonical.x,v=2*this.canonical.y;return[new eo(l,this.wrap,l,d,v),new eo(l,this.wrap,l,d+1,v),new eo(l,this.wrap,l,d,v+1),new eo(l,this.wrap,l,d+1,v+1)]}isLessThan(r){return this.wrap<r.wrap||!(this.wrap>r.wrap)&&(this.overscaledZ<r.overscaledZ||!(this.overscaledZ>r.overscaledZ)&&(this.canonical.x<r.canonical.x||!(this.canonical.x>r.canonical.x)&&this.canonical.y<r.canonical.y))}wrapped(){return new eo(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(r){return new eo(this.overscaledZ,r,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new dS(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(r){return this.canonical.getTilePoint(new fm(r.x-this.wrap,r.y))}}function If(u,r,l,d,v){(u*=2)<0&&(u=-1*u-1);const b=1<<l;return(b*b*u+b*v+d).toString(36)+l.toString(36)+r.toString(36)}Xt("CanonicalTileID",Gv),Xt("OverscaledTileID",eo,{omit:["terrainRttPosMatrix32f"]});class fS{constructor(r,l,d,v=1,b=1,S=1,W=0){if(this.uid=r,l.height!==l.width)throw new RangeError("DEM tiles must be square");if(d&&!["mapbox","terrarium","custom"].includes(d))return void pn(`"${d}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=l.height;const U=this.dim=l.height-2;switch(this.data=new Uint32Array(l.data.buffer),d){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=v,this.greenFactor=b,this.blueFactor=S,this.baseShift=W;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let A=0;A<U;A++)this.data[this._idx(-1,A)]=this.data[this._idx(0,A)],this.data[this._idx(U,A)]=this.data[this._idx(U-1,A)],this.data[this._idx(A,-1)]=this.data[this._idx(A,0)],this.data[this._idx(A,U)]=this.data[this._idx(A,U-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(U,-1)]=this.data[this._idx(U-1,0)],this.data[this._idx(-1,U)]=this.data[this._idx(0,U-1)],this.data[this._idx(U,U)]=this.data[this._idx(U-1,U-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let A=0;A<U;A++)for(let X=0;X<U;X++){const Z=this.get(A,X);Z>this.max&&(this.max=Z),Z<this.min&&(this.min=Z)}}get(r,l){const d=new Uint8Array(this.data.buffer),v=4*this._idx(r,l);return this.unpack(d[v],d[v+1],d[v+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(r,l){if(r<-1||r>=this.dim+1||l<-1||l>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(l+1)*this.stride+(r+1)}unpack(r,l,d){return r*this.redFactor+l*this.greenFactor+d*this.blueFactor-this.baseShift}getPixels(){return new pa({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(r,l,d){if(this.dim!==r.dim)throw new Error("dem dimension mismatch");let v=l*this.dim,b=l*this.dim+this.dim,S=d*this.dim,W=d*this.dim+this.dim;switch(l){case-1:v=b-1;break;case 1:b=v+1}switch(d){case-1:S=W-1;break;case 1:W=S+1}const U=-l*this.dim,A=-d*this.dim;for(let X=S;X<W;X++)for(let Z=v;Z<b;Z++)this.data[this._idx(Z,X)]=r.data[this._idx(Z+U,X+A)]}}Xt("DEMData",fS);class pS{constructor(r){this._stringToNumber={},this._numberToString=[];for(let l=0;l<r.length;l++){const d=r[l];this._stringToNumber[d]=l,this._numberToString[l]=d}}encode(r){return this._stringToNumber[r]}decode(r){if(r>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${r} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[r]}}class mS{constructor(r,l,d,v,b){this.type="Feature",this._vectorTileFeature=r,r._z=l,r._x=d,r._y=v,this.properties=r.properties,this.id=b}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(r){this._geometry=r}toJSON(){const r={geometry:this.geometry};for(const l in this)l!=="_geometry"&&l!=="_vectorTileFeature"&&(r[l]=this[l]);return r}}class gS{constructor(r,l){this.tileID=r,this.x=r.canonical.x,this.y=r.canonical.y,this.z=r.canonical.z,this.grid=new Ta(Qe,16,0),this.grid3D=new Ta(Qe,16,0),this.featureIndexArray=new Ke,this.promoteId=l}insert(r,l,d,v,b,S){const W=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(d,v,b);const U=S?this.grid3D:this.grid;for(let A=0;A<l.length;A++){const X=l[A],Z=[1/0,1/0,-1/0,-1/0];for(let G=0;G<X.length;G++){const H=X[G];Z[0]=Math.min(Z[0],H.x),Z[1]=Math.min(Z[1],H.y),Z[2]=Math.max(Z[2],H.x),Z[3]=Math.max(Z[3],H.y)}Z[0]<Qe&&Z[1]<Qe&&Z[2]>=0&&Z[3]>=0&&U.insert(W,Z[0],Z[1],Z[2],Z[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new lu.VectorTile(new ko(this.rawTileData)).layers,this.sourceLayerCoder=new pS(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(r,l,d,v){this.loadVTLayers();const b=r.params,S=Qe/r.tileSize/r.scale,W=Du(b.filter),U=r.queryGeometry,A=r.queryPadding*S,X=vS(U),Z=this.grid.query(X.minX-A,X.minY-A,X.maxX+A,X.maxY+A),G=vS(r.cameraQueryGeometry),H=this.grid3D.query(G.minX-A,G.minY-A,G.maxX+A,G.maxY+A,(ce,ve,Ae,Ye)=>function(q,oe,Me,et,wt){for(const dt of q)if(oe<=dt.x&&Me<=dt.y&&et>=dt.x&&wt>=dt.y)return!0;const it=[new F(oe,Me),new F(oe,wt),new F(et,wt),new F(et,Me)];if(q.length>2){for(const dt of it)if(su(q,dt))return!0}for(let dt=0;dt<q.length-1;dt++)if(Ig(q[dt],q[dt+1],it))return!0;return!1}(r.cameraQueryGeometry,ce-A,ve-A,Ae+A,Ye+A));for(const ce of H)Z.push(ce);Z.sort(UC);const J={};let te;for(let ce=0;ce<Z.length;ce++){const ve=Z[ce];if(ve===te)continue;te=ve;const Ae=this.featureIndexArray.get(ve);let Ye=null;
vendor: 6,589 bytes, line 71
71this.loadMatchingFeature(J,Ae.bucketIndex,Ae.sourceLayerIndex,Ae.featureIndex,W,b.layers,b.availableImages,l,d,v,(q,oe,Me)=>(Ye||(Ye=Cs(q)),oe.queryIntersectsFeature({queryGeometry:U,feature:q,featureState:Me,geometry:Ye,zoom:this.z,transform:r.transform,pixelsToTileUnits:S,pixelPosMatrix:r.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:r.getElevation})))}return J}loadMatchingFeature(r,l,d,v,b,S,W,U,A,X,Z){const G=this.bucketLayerIDs[l];if(S&&!G.some(ce=>S.has(ce)))return;const H=this.sourceLayerCoder.decode(d),J=this.vtLayers[H].feature(v);if(b.needGeometry){const ce=fl(J,!0);if(!b.filter(new en(this.tileID.overscaledZ),ce,this.tileID.canonical))return}else if(!b.filter(new en(this.tileID.overscaledZ),J))return;const te=this.getId(J,H);for(let ce=0;ce<G.length;ce++){const ve=G[ce];if(S&&!S.has(ve))continue;const Ae=U[ve];if(!Ae)continue;let Ye={};te&&X&&(Ye=X.getState(Ae.sourceLayer||"_geojsonTileLayer",te));const q=or({},A[ve]);q.paint=yS(q.paint,Ae.paint,J,Ye,W),q.layout=yS(q.layout,Ae.layout,J,Ye,W);const oe=!Z||Z(J,Ae,Ye);if(!oe)continue;const Me=new mS(J,this.z,this.x,this.y,te);Me.layer=q;let et=r[ve];et===void 0&&(et=r[ve]=[]),et.push({featureIndex:v,feature:Me,intersectionZ:oe})}}lookupSymbolFeatures(r,l,d,v,b,S,W,U){const A={};this.loadVTLayers();const X=Du(b);for(const Z of r)this.loadMatchingFeature(A,d,v,Z,X,S,W,U,l);return A}hasLayer(r){for(const l of this.bucketLayerIDs)for(const d of l)if(r===d)return!0;return!1}getId(r,l){var d;let v=r.id;return this.promoteId&&(v=r.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[l]],typeof v=="boolean"&&(v=Number(v)),v===void 0&&(!((d=r.properties)===null||d===void 0)&&d.cluster)&&this.promoteId&&(v=Number(r.properties.cluster_id))),v}}function yS(u,r,l,d,v){return Sr(u,(b,S)=>{const W=r instanceof ju?r.get(S):null;return W&&W.evaluate?W.evaluate(l,d,v):W})}function vS(u){let r=1/0,l=1/0,d=-1/0,v=-1/0;for(const b of u)r=Math.min(r,b.x),l=Math.min(l,b.y),d=Math.max(d,b.x),v=Math.max(v,b.y);return{minX:r,minY:l,maxX:d,maxY:v}}function UC(u,r){return r-u}function _S(u,r,l,d,v){const b=[];for(let S=0;S<u.length;S++){const W=u[S];let U;for(let A=0;A<W.length-1;A++){let X=W[A],Z=W[A+1];X.x<r&&Z.x<r||(X.x<r?X=new F(r,X.y+(r-X.x)/(Z.x-X.x)*(Z.y-X.y))._round():Z.x<r&&(Z=new F(r,X.y+(r-X.x)/(Z.x-X.x)*(Z.y-X.y))._round()),X.y<l&&Z.y<l||(X.y<l?X=new F(X.x+(l-X.y)/(Z.y-X.y)*(Z.x-X.x),l)._round():Z.y<l&&(Z=new F(X.x+(l-X.y)/(Z.y-X.y)*(Z.x-X.x),l)._round()),X.x>=d&&Z.x>=d||(X.x>=d?X=new F(d,X.y+(d-X.x)/(Z.x-X.x)*(Z.y-X.y))._round():Z.x>=d&&(Z=new F(d,X.y+(d-X.x)/(Z.x-X.x)*(Z.y-X.y))._round()),X.y>=v&&Z.y>=v||(X.y>=v?X=new F(X.x+(v-X.y)/(Z.y-X.y)*(Z.x-X.x),v)._round():Z.y>=v&&(Z=new F(X.x+(v-X.y)/(Z.y-X.y)*(Z.x-X.x),v)._round()),U&&X.equals(U[U.length-1])||(U=[X],b.push(U)),U.push(Z)))))}}return b}Xt("FeatureIndex",gS,{omit:["rawTileData","sourceLayerCoder"]});class rh extends F{constructor(r,l,d,v){super(r,l),this.angle=d,v!==void 0&&(this.segment=v)}clone(){return new rh(this.x,this.y,this.angle,this.segment)}}function xS(u,r,l,d,v){if(r.segment===void 0||l===0)return!0;let b=r,S=r.segment+1,W=0;for(;W>-l/2;){if(S--,S<0)return!1;W-=u[S].dist(b),b=u[S]}W+=u[S].dist(u[S+1]),S++;const U=[];let A=0;for(;W<l/2;){const X=u[S],Z=u[S+1];if(!Z)return!1;let G=u[S-1].angleTo(X)-X.angleTo(Z);for(G=Math.abs((G+3*Math.PI)%(2*Math.PI)-Math.PI),U.push({distance:W,angleDelta:G}),A+=G;W-U[0].distance>d;)A-=U.shift().angleDelta;if(A>v)return!1;S++,W+=X.dist(Z)}return!0}function bS(u){let r=0;for(let l=0;l<u.length-1;l++)r+=u[l].dist(u[l+1]);return r}function wS(u,r,l){return u?.6*r*l:0}function YS(u,r){return Math.max(u?u.right-u.left:0,r?r.right-r.left:0)}function CC(u,r,l,d,v,b){const S=wS(l,v,b),W=YS(l,d)*b;let U=0;const A=bS(u)/2;for(let X=0;X<u.length-1;X++){const Z=u[X],G=u[X+1],H=Z.dist(G);if(U+H>A){const J=(A-U)/H,te=Ya.number(Z.x,G.x,J),ce=Ya.number(Z.y,G.y,J),ve=new rh(te,ce,G.angleTo(Z),X);return ve._round(),!S||xS(u,ve,W,S,r)?ve:void 0}U+=H}}function VC(u,r,l,d,v,b,S,W,U){const A=wS(d,b,S),X=YS(d,v),Z=X*S,G=u[0].x===0||u[0].x===U||u[0].y===0||u[0].y===U;return r-Z<r/4&&(r=Z+r/4),SS(u,G?r/2*W%r:(X/2+2*b)*S*W%r,r,A,l,Z,G,!1,U)}function SS(u,r,l,d,v,b,S,W,U){const A=b/2,X=bS(u);let Z=0,G=r-l,H=[];for(let J=0;J<u.length-1;J++){const te=u[J],ce=u[J+1],ve=te.dist(ce),Ae=ce.angleTo(te);for(;G+l<Z+ve;){G+=l;const Ye=(G-Z)/ve,q=Ya.number(te.x,ce.x,Ye),oe=Ya.number(te.y,ce.y,Ye);if(q>=0&&q<U&&oe>=0&&oe<U&&G-A>=0&&G+A<=X){const Me=new rh(q,oe,Ae,J);Me._round(),d&&!xS(u,Me,b,d,v)||H.push(Me)}}Z+=ve}return W||H.length||S||(H=SS(u,Z/2,l,d,v,b,S,!0,U)),H}Xt("Anchor",rh);const pm=Ji;function TS(u,r,l,d){const v=[],b=u.image,S=b.pixelRatio,W=b.paddedRect.w-2*pm,U=b.paddedRect.h-2*pm;let A={x1:u.left,y1:u.top,x2:u.right,y2:u.bottom};const X=b.stretchX||[[0,W]],Z=b.stretchY||[[0,U]],G=(mt,jt)=>mt+jt[1]-jt[0],H=X.reduce(G,0),J=Z.reduce(G,0),te=W-H,ce=U-J;let ve=0,Ae=H,Ye=0,q=J,oe=0,Me=te,et=0,wt=ce;if(b.content&&d){const mt=b.content,jt=mt[2]-mt[0],ar=mt[3]-mt[1];(b.textFitWidth||b.textFitHeight)&&(A=R(u)),ve=Hg(X,0,mt[0]),Ye=Hg(Z,0,mt[1]),Ae=Hg(X,mt[0],mt[2]),q=Hg(Z,mt[1],mt[3]),oe=mt[0]-ve,et=mt[1]-Ye,Me=jt-Ae,wt=ar-q}const it=A.x1,dt=A.y1,Pt=A.x2-it,St=A.y2-dt,Ct=(mt,jt,ar,tr)=>{const qt=Kg(mt.stretch-ve,Ae,Pt,it),Ar=Qg(mt.fixed-oe,Me,mt.stretch,H),$n=Kg(jt.stretch-Ye,q,St,dt),Pi=Qg(jt.fixed-et,wt,jt.stretch,J),va=Kg(ar.stretch-ve,Ae,Pt,it),to=Qg(ar.fixed-oe,Me,ar.stretch,H),ms=Kg(tr.stretch-Ye,q,St,dt),ea=Qg(tr.fixed-et,wt,tr.stretch,J),kn=new F(qt,$n),Ni=new F(va,$n),ta=new F(va,ms),ra=new F(qt,ms),Ha=new F(Ar/S,Pi/S),ro=new F(to/S,ea/S),zi=r*Math.PI/180;if(zi){const Fi=Math.sin(zi),Zi=Math.cos(zi),pi=[Zi,-Fi,Fi,Zi];kn._matMult(pi),Ni._matMult(pi),ra._matMult(pi),ta._matMult(pi)}const gs=mt.stretch+mt.fixed,Ii=jt.stretch+jt.fixed;return{tl:kn,tr:Ni,bl:ra,br:ta,tex:{x:b.paddedRect.x+pm+gs,y:b.paddedRect.y+pm+Ii,w:ar.stretch+ar.fixed-gs,h:tr.stretch+tr.fixed-Ii},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ha,pixelOffsetBR:ro,minFontScaleX:Me/S/Pt,minFontScaleY:wt/S/St,isSDF:l}};if(d&&(b.stretchX||b.stretchY)){const mt=WS(X,te,H),jt=WS(Z,ce,J);for(let ar=0;ar<mt.length-1;ar++){const tr=mt[ar],qt=mt[ar+1];for(let Ar=0;Ar<jt.length-1;Ar++)v.push(Ct(tr,jt[Ar],qt,jt[Ar+1]))}}else v.push(Ct({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:W+1},{fixed:0,stretch:U+1}));return v}function Hg(u,r,l){let d=0;for(const v of u)d+=Math.max(r,Math.min(l,v[1]))-Math.max(r,Math.min(l,v[0]));return d}function WS(u,r,l){const d=[{fixed:-1,stretch:0}];for(const[v,b]of u){const S=d[d.length-1];
vendor: 7,897 bytes, line 71
71d.push({fixed:v-S.stretch,stretch:S.stretch}),d.push({fixed:v-S.stretch,stretch:S.stretch+(b-v)})}return d.push({fixed:r+pm,stretch:l}),d}function Kg(u,r,l,d){return u/r*l+d}function Qg(u,r,l,d){return u-r*l/d}class Jg{constructor(r,l,d,v,b,S,W,U,A,X){var Z;if(this.boxStartIndex=r.length,A){let G=S.top,H=S.bottom;const J=S.collisionPadding;J&&(G-=J[1],H+=J[3]);let te=H-G;te>0&&(te=Math.max(10,te),this.circleDiameter=te)}else{const G=!((Z=S.image)===null||Z===void 0)&&Z.content&&(S.image.textFitWidth||S.image.textFitHeight)?R(S):{x1:S.left,y1:S.top,x2:S.right,y2:S.bottom};G.y1=G.y1*W-U[0],G.y2=G.y2*W+U[2],G.x1=G.x1*W-U[3],G.x2=G.x2*W+U[1];const H=S.collisionPadding;if(H&&(G.x1-=H[0]*W,G.y1-=H[1]*W,G.x2+=H[2]*W,G.y2+=H[3]*W),X){const J=new F(G.x1,G.y1),te=new F(G.x2,G.y1),ce=new F(G.x1,G.y2),ve=new F(G.x2,G.y2),Ae=X*Math.PI/180;J._rotate(Ae),te._rotate(Ae),ce._rotate(Ae),ve._rotate(Ae),G.x1=Math.min(J.x,te.x,ce.x,ve.x),G.x2=Math.max(J.x,te.x,ce.x,ve.x),G.y1=Math.min(J.y,te.y,ce.y,ve.y),G.y2=Math.max(J.y,te.y,ce.y,ve.y)}r.emplaceBack(l.x,l.y,G.x1,G.y1,G.x2,G.y2,d,v,b)}this.boxEndIndex=r.length}}class AC{constructor(r=[],l=(d,v)=>d<v?-1:d>v?1:0){if(this.data=r,this.length=this.data.length,this.compare=l,this.length>0)for(let d=(this.length>>1)-1;d>=0;d--)this._down(d)}push(r){this.data.push(r),this._up(this.length++)}pop(){if(this.length===0)return;const r=this.data[0],l=this.data.pop();return--this.length>0&&(this.data[0]=l,this._down(0)),r}peek(){return this.data[0]}_up(r){const{data:l,compare:d}=this,v=l[r];for(;r>0;){const b=r-1>>1,S=l[b];if(d(v,S)>=0)break;l[r]=S,r=b}l[r]=v}_down(r){const{data:l,compare:d}=this,v=this.length>>1,b=l[r];for(;r<v;){let S=1+(r<<1);const W=S+1;if(W<this.length&&d(l[W],l[S])<0&&(S=W),d(l[S],b)>=0)break;l[r]=l[S],r=S}l[r]=b}}function kC(u,r=1,l=!1){let d=1/0,v=1/0,b=-1/0,S=-1/0;const W=u[0];for(let H=0;H<W.length;H++){const J=W[H];(!H||J.x<d)&&(d=J.x),(!H||J.y<v)&&(v=J.y),(!H||J.x>b)&&(b=J.x),(!H||J.y>S)&&(S=J.y)}const U=Math.min(b-d,S-v);let A=U/2;const X=new AC([],DC);if(U===0)return new F(d,v);for(let H=d;H<b;H+=U)for(let J=v;J<S;J+=U)X.push(new Uf(H+A,J+A,A,u));let Z=function(H){let J=0,te=0,ce=0;const ve=H[0];for(let Ae=0,Ye=ve.length,q=Ye-1;Ae<Ye;q=Ae++){const oe=ve[Ae],Me=ve[q],et=oe.x*Me.y-Me.x*oe.y;te+=(oe.x+Me.x)*et,ce+=(oe.y+Me.y)*et,J+=3*et}return new Uf(te/J,ce/J,0,H)}(u),G=X.length;for(;X.length;){const H=X.pop();(H.d>Z.d||!Z.d)&&(Z=H,l&&console.log("found best %d after %d probes",Math.round(1e4*H.d)/1e4,G)),H.max-Z.d<=r||(A=H.h/2,X.push(new Uf(H.p.x-A,H.p.y-A,A,u)),X.push(new Uf(H.p.x+A,H.p.y-A,A,u)),X.push(new Uf(H.p.x-A,H.p.y+A,A,u)),X.push(new Uf(H.p.x+A,H.p.y+A,A,u)),G+=4)}return l&&(console.log(`num probes: ${G}`),console.log(`best distance: ${Z.d}`)),Z.p}function DC(u,r){return r.max-u.max}function Uf(u,r,l,d){this.p=new F(u,r),this.h=l,this.d=function(v,b){let S=!1,W=1/0;for(let U=0;U<b.length;U++){const A=b[U];for(let X=0,Z=A.length,G=Z-1;X<Z;G=X++){const H=A[X],J=A[G];H.y>v.y!=J.y>v.y&&v.x<(J.x-H.x)*(v.y-H.y)/(J.y-H.y)+H.x&&(S=!S),W=Math.min(W,Op(v,H,J))}}return(S?1:-1)*Math.sqrt(W)}(this.p,d),this.max=this.d+this.h*Math.SQRT2}var ya;g.aB=void 0,(ya=g.aB||(g.aB={}))[ya.center=1]="center",ya[ya.left=2]="left",ya[ya.right=3]="right",ya[ya.top=4]="top",ya[ya.bottom=5]="bottom",ya[ya["top-left"]=6]="top-left",ya[ya["top-right"]=7]="top-right",ya[ya["bottom-left"]=8]="bottom-left",ya[ya["bottom-right"]=9]="bottom-right";const nh=7,qv=Number.POSITIVE_INFINITY;function ES(u,r){return r[1]!==qv?function(l,d,v){let b=0,S=0;switch(d=Math.abs(d),v=Math.abs(v),l){case"top-right":case"top-left":case"top":S=v-nh;break;case"bottom-right":case"bottom-left":case"bottom":S=-v+nh}switch(l){case"top-right":case"bottom-right":case"right":b=-d;break;case"top-left":case"bottom-left":case"left":b=d}return[b,S]}(u,r[0],r[1]):function(l,d){let v=0,b=0;d<0&&(d=0);const S=d/Math.SQRT2;switch(l){case"top-right":case"top-left":b=S-nh;break;case"bottom-right":case"bottom-left":b=-S+nh;break;case"bottom":b=-d+nh;break;case"top":b=d-nh}switch(l){case"top-right":case"bottom-right":v=-S;break;case"top-left":case"bottom-left":v=S;break;case"left":v=d;break;case"right":v=-d}return[v,b]}(u,r[0])}function MS(u,r,l){var d;const v=u.layout,b=(d=v.get("text-variable-anchor-offset"))===null||d===void 0?void 0:d.evaluate(r,{},l);if(b){const W=b.values,U=[];for(let A=0;A<W.length;A+=2){const X=U[A]=W[A],Z=W[A+1].map(G=>G*li);X.startsWith("top")?Z[1]-=nh:X.startsWith("bottom")&&(Z[1]+=nh),U[A+1]=Z}return new Di(U)}const S=v.get("text-variable-anchor");if(S){let W;W=u._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[v.get("text-radial-offset").evaluate(r,{},l)*li,qv]:v.get("text-offset").evaluate(r,{},l).map(A=>A*li);const U=[];for(const A of S)U.push(A,ES(A,W));return new Di(U)}return null}function Hv(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function RC(u,r,l,d,v,b,S,W,U,A,X,Z){let G=b.textMaxSize.evaluate(r,{});G===void 0&&(G=S);const H=u.layers[0].layout,J=H.get("icon-offset").evaluate(r,{},X),te=IS(l.horizontal),ce=S/24,ve=u.tilePixelRatio*ce,Ae=u.tilePixelRatio*G/24,Ye=u.tilePixelRatio*W,q=u.tilePixelRatio*H.get("symbol-spacing"),oe=H.get("text-padding")*u.tilePixelRatio,Me=function(ar,tr,qt,Ar=1){const $n=ar.get("icon-padding").evaluate(tr,{},qt),Pi=$n&&$n.values;return[Pi[0]*Ar,Pi[1]*Ar,Pi[2]*Ar,Pi[3]*Ar]}(H,r,X,u.tilePixelRatio),et=H.get("text-max-angle")/180*Math.PI,wt=H.get("text-rotation-alignment")!=="viewport"&&H.get("symbol-placement")!=="point",it=H.get("icon-rotation-alignment")==="map"&&H.get("symbol-placement")!=="point",dt=H.get("symbol-placement"),Pt=q/2,St=H.get("icon-text-fit");let Ct;d&&St!=="none"&&(u.allowVerticalPlacement&&l.vertical&&(Ct=z(d,l.vertical,St,H.get("icon-text-fit-padding"),J,ce)),te&&(d=z(d,te,St,H.get("icon-text-fit-padding"),J,ce)));const mt=X?Z.line.getGranularityForZoomLevel(X.z):1,jt=(ar,tr)=>{tr.x<0||tr.x>=Qe||tr.y<0||tr.y>=Qe||function(qt,Ar,$n,Pi,va,to,ms,ea,kn,Ni,ta,ra,Ha,ro,zi,gs,Ii,Fi,Zi,pi,Tn,_l,Cf,xl,XC){const Vf=qt.addToLineVertexArray(Ar,$n);let yd,Af,kf,Df,AS=0,kS=0,DS=0,RS=0,i_=-1,a_=-1;const nc={};let LS=fs("");if(qt.allowVerticalPlacement&&Pi.vertical){const Ua=ea.layout.get("text-rotate").evaluate(Tn,{},xl)+90;kf=new Jg(kn,Ar,Ni,ta,ra,Pi.vertical,Ha,ro,zi,Ua),ms&&(Df=new Jg(kn,Ar,Ni,ta,ra,ms,Ii,Fi,zi,Ua))}if(va){const Ua=ea.layout.get("icon-rotate").evaluate(Tn,{}),no=ea.layout.get("icon-text-fit")!=="none",vd=TS(va,Ua,Cf,no),wl=ms?TS(ms,Ua,Cf,no):void 0;Af=new Jg(kn,Ar,Ni,ta,ra,va,Ii,Fi,!1,Ua),AS=4*vd.length;const _d=qt.iconSizeData;let pu=null;_d.kind==="source"?(pu=[Se*ea.layout.get("icon-size").evaluate(Tn,{})],pu[0]>ke&&pn(`${qt.layerIds[0]}: Value for "icon-size" is >= ${re}. Reduce your "icon-size".`)):_d.kind==="composite"&&(pu=[Se*_l.compositeIconSizes[0].evaluate(Tn,{},xl),Se*_l.compositeIconSizes[1].evaluate(Tn,{},xl)],(pu[0]>ke||pu[1]>ke)&&pn(`${qt.layerIds[0]}: Value for "icon-size" is >= ${re}. Reduce your "icon-size".`)),qt.addSymbols(qt.icon,vd,pu,pi,Zi,Tn,g.al.none,Ar,Vf.lineStartIndex,Vf.lineLength,-1,xl),i_=qt.icon.placedSymbolArray.length-1,wl&&(kS=4*wl.length,qt.addSymbols(qt.icon,wl,pu,pi,Zi,Tn,g.al.vertical,Ar,Vf.lineStartIndex,Vf.lineLength,-1,xl),a_=qt.icon.placedSymbolArray.length-1)}const OS=Object.keys(Pi.horizontal);for(const Ua of OS){const no=Pi.horizontal[Ua];if(!yd){LS=fs(no.text);const wl=ea.layout.get("text-rotate").evaluate(Tn,{},xl);yd=new Jg(kn,Ar,Ni,ta,ra,no,Ha,ro,zi,wl)}const vd=no.positionedLines.length===1;if(DS+=PS(qt,Ar,no,to,ea,zi,Tn,gs,Vf,Pi.vertical?g.al.horizontal:g.al.horizontalOnly,vd?OS:[Ua],nc,i_,_l,xl),vd)break}Pi.vertical&&(RS+=PS(qt,Ar,Pi.vertical,to,ea,zi,Tn,gs,Vf,g.al.vertical,["vertical"],nc,a_,_l,xl));const NC=yd?yd.boxStartIndex:qt.collisionBoxArray.length,zC=yd?yd.boxEndIndex:qt.collisionBoxArray.length,FC=kf?
vendor: 12,164 bytes, line 71
71kf.boxStartIndex:qt.collisionBoxArray.length,ZC=kf?kf.boxEndIndex:qt.collisionBoxArray.length,jC=Af?Af.boxStartIndex:qt.collisionBoxArray.length,BC=Af?Af.boxEndIndex:qt.collisionBoxArray.length,$C=Df?Df.boxStartIndex:qt.collisionBoxArray.length,GC=Df?Df.boxEndIndex:qt.collisionBoxArray.length;let bl=-1;const ty=(Ua,no)=>Ua&&Ua.circleDiameter?Math.max(Ua.circleDiameter,no):no;bl=ty(yd,bl),bl=ty(kf,bl),bl=ty(Af,bl),bl=ty(Df,bl);const XS=bl>-1?1:0;XS&&(bl*=XC/li),qt.glyphOffsetArray.length>=Ne.MAX_GLYPHS&&pn("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Tn.sortKey!==void 0&&qt.addToSortKeyRanges(qt.symbolInstances.length,Tn.sortKey);const qC=MS(ea,Tn,xl),[HC,KC]=function(Ua,no){const vd=Ua.length,wl=no==null?void 0:no.values;if((wl==null?void 0:wl.length)>0)for(let _d=0;_d<wl.length;_d+=2){const pu=wl[_d+1];Ua.emplaceBack(g.aB[wl[_d]],pu[0],pu[1])}return[vd,Ua.length]}(qt.textAnchorOffsets,qC);qt.symbolInstances.emplaceBack(Ar.x,Ar.y,nc.right>=0?nc.right:-1,nc.center>=0?nc.center:-1,nc.left>=0?nc.left:-1,nc.vertical||-1,i_,a_,LS,NC,zC,FC,ZC,jC,BC,$C,GC,Ni,DS,RS,AS,kS,XS,0,Ha,bl,HC,KC)}(u,tr,ar,l,d,v,Ct,u.layers[0],u.collisionBoxArray,r.index,r.sourceLayerIndex,u.index,ve,[oe,oe,oe,oe],wt,U,Ye,Me,it,J,r,b,A,X,S)};if(dt==="line")for(const ar of _S(r.geometry,0,0,Qe,Qe)){const tr=pl(ar,mt),qt=VC(tr,q,et,l.vertical||te,d,24,Ae,u.overscaling,Qe);for(const Ar of qt)te&&LC(u,te.text,Pt,Ar)||jt(tr,Ar)}else if(dt==="line-center"){for(const ar of r.geometry)if(ar.length>1){const tr=pl(ar,mt),qt=CC(tr,et,l.vertical||te,d,24,Ae);qt&&jt(tr,qt)}}else if(r.type==="Polygon")for(const ar of bc(r.geometry,0)){const tr=kC(ar,16);jt(pl(ar[0],mt,!0),new rh(tr.x,tr.y,0))}else if(r.type==="LineString")for(const ar of r.geometry){const tr=pl(ar,mt);jt(tr,new rh(tr[0].x,tr[0].y,0))}else if(r.type==="Point")for(const ar of r.geometry)for(const tr of ar)jt([tr],new rh(tr.x,tr.y,0))}function PS(u,r,l,d,v,b,S,W,U,A,X,Z,G,H,J){const te=function(Ae,Ye,q,oe,Me,et,wt,it){const dt=oe.layout.get("text-rotate").evaluate(et,{})*Math.PI/180,Pt=[];for(const St of Ye.positionedLines)for(const Ct of St.positionedGlyphs){if(!Ct.rect)continue;const mt=Ct.rect||{};let jt=om+1,ar=!0,tr=1,qt=0;const Ar=(Me||it)&&Ct.vertical,$n=Ct.metrics.advance*Ct.scale/2;if(it&&Ye.verticalizable&&(qt=St.lineOffset/2-(Ct.imageName?-(li-Ct.metrics.width*Ct.scale)/2:(Ct.scale-1)*li)),Ct.imageName){const Fi=wt[Ct.imageName];ar=Fi.sdf,tr=Fi.pixelRatio,jt=Ji/tr}const Pi=Me?[Ct.x+$n,Ct.y]:[0,0];let va=Me?[0,0]:[Ct.x+$n+q[0],Ct.y+q[1]-qt],to=[0,0];Ar&&(to=va,va=[0,0]);const ms=Ct.metrics.isDoubleResolution?2:1,ea=(Ct.metrics.left-jt)*Ct.scale-$n+va[0],kn=(-Ct.metrics.top-jt)*Ct.scale+va[1],Ni=ea+mt.w/ms*Ct.scale/tr,ta=kn+mt.h/ms*Ct.scale/tr,ra=new F(ea,kn),Ha=new F(Ni,kn),ro=new F(ea,ta),zi=new F(Ni,ta);if(Ar){const Fi=new F(-$n,$n-tc),Zi=-Math.PI/2,pi=li/2-$n,Tn=new F(5-tc-pi,-(Ct.imageName?pi:0)),_l=new F(...to);ra._rotateAround(Zi,Fi)._add(Tn)._add(_l),Ha._rotateAround(Zi,Fi)._add(Tn)._add(_l),ro._rotateAround(Zi,Fi)._add(Tn)._add(_l),zi._rotateAround(Zi,Fi)._add(Tn)._add(_l)}if(dt){const Fi=Math.sin(dt),Zi=Math.cos(dt),pi=[Zi,-Fi,Fi,Zi];ra._matMult(pi),Ha._matMult(pi),ro._matMult(pi),zi._matMult(pi)}const gs=new F(0,0),Ii=new F(0,0);Pt.push({tl:ra,tr:Ha,bl:ro,br:zi,tex:mt,writingMode:Ye.writingMode,glyphOffset:Pi,sectionIndex:Ct.sectionIndex,isSDF:ar,pixelOffsetTL:gs,pixelOffsetBR:Ii,minFontScaleX:0,minFontScaleY:0})}return Pt}(0,l,W,v,b,S,d,u.allowVerticalPlacement),ce=u.textSizeData;let ve=null;ce.kind==="source"?(ve=[Se*v.layout.get("text-size").evaluate(S,{})],ve[0]>ke&&pn(`${u.layerIds[0]}: Value for "text-size" is >= ${re}. Reduce your "text-size".`)):ce.kind==="composite"&&(ve=[Se*H.compositeTextSizes[0].evaluate(S,{},J),Se*H.compositeTextSizes[1].evaluate(S,{},J)],(ve[0]>ke||ve[1]>ke)&&pn(`${u.layerIds[0]}: Value for "text-size" is >= ${re}. Reduce your "text-size".`)),u.addSymbols(u.text,te,ve,W,b,S,A,r,U.lineStartIndex,U.lineLength,G,J);for(const Ae of X)Z[Ae]=u.text.placedSymbolArray.length-1;return 4*te.length}function IS(u){for(const r in u)return u[r];return null}function LC(u,r,l,d){const v=u.compareText;if(r in v){const b=v[r];for(let S=b.length-1;S>=0;S--)if(d.dist(b[S])<l)return!0}else v[r]=[];return v[r].push(d),!1}const US=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Kv{static from(r){if(!(r instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[l,d]=new Uint8Array(r,0,2);if(l!==219)throw new Error("Data does not appear to be in a KDBush format.");const v=d>>4;if(v!==1)throw new Error(`Got v${v} data when expected v1.`);const b=US[15&d];if(!b)throw new Error("Unrecognized array type.");const[S]=new Uint16Array(r,2,1),[W]=new Uint32Array(r,4,1);return new Kv(W,S,b,r)}constructor(r,l=64,d=Float64Array,v){if(isNaN(r)||r<0)throw new Error(`Unpexpected numItems value: ${r}.`);this.numItems=+r,this.nodeSize=Math.min(Math.max(+l,2),65535),this.ArrayType=d,this.IndexArrayType=r<65536?Uint16Array:Uint32Array;const b=US.indexOf(this.ArrayType),S=2*r*this.ArrayType.BYTES_PER_ELEMENT,W=r*this.IndexArrayType.BYTES_PER_ELEMENT,U=(8-W%8)%8;if(b<0)throw new Error(`Unexpected typed array class: ${d}.`);v&&v instanceof ArrayBuffer?(this.data=v,this.ids=new this.IndexArrayType(this.data,8,r),this.coords=new this.ArrayType(this.data,8+W+U,2*r),this._pos=2*r,this._finished=!0):(this.data=new ArrayBuffer(8+S+W+U),this.ids=new this.IndexArrayType(this.data,8,r),this.coords=new this.ArrayType(this.data,8+W+U,2*r),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+b]),new Uint16Array(this.data,2,1)[0]=l,new Uint32Array(this.data,4,1)[0]=r)}add(r,l){const d=this._pos>>1;return this.ids[d]=d,this.coords[this._pos++]=r,this.coords[this._pos++]=l,d}finish(){const r=this._pos>>1;if(r!==this.numItems)throw new Error(`Added ${r} items when expected ${this.numItems}.`);return Qv(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(r,l,d,v){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:b,coords:S,nodeSize:W}=this,U=[0,b.length-1,0],A=[];for(;U.length;){const X=U.pop()||0,Z=U.pop()||0,G=U.pop()||0;if(Z-G<=W){for(let ce=G;ce<=Z;ce++){const ve=S[2*ce],Ae=S[2*ce+1];ve>=r&&ve<=d&&Ae>=l&&Ae<=v&&A.push(b[ce])}continue}const H=G+Z>>1,J=S[2*H],te=S[2*H+1];J>=r&&J<=d&&te>=l&&te<=v&&A.push(b[H]),(X===0?r<=J:l<=te)&&(U.push(G),U.push(H-1),U.push(1-X)),(X===0?d>=J:v>=te)&&(U.push(H+1),U.push(Z),U.push(1-X))}return A}within(r,l,d){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:v,coords:b,nodeSize:S}=this,W=[0,v.length-1,0],U=[],A=d*d;for(;W.length;){const X=W.pop()||0,Z=W.pop()||0,G=W.pop()||0;if(Z-G<=S){for(let ce=G;ce<=Z;ce++)VS(b[2*ce],b[2*ce+1],r,l)<=A&&U.push(v[ce]);continue}const H=G+Z>>1,J=b[2*H],te=b[2*H+1];VS(J,te,r,l)<=A&&U.push(v[H]),(X===0?r-d<=J:l-d<=te)&&(W.push(G),W.push(H-1),W.push(1-X)),(X===0?r+d>=J:l+d>=te)&&(W.push(H+1),W.push(Z),W.push(1-X))}return U}}function Qv(u,r,l,d,v,b){if(v-d<=l)return;const S=d+v>>1;CS(u,r,S,d,v,b),Qv(u,r,l,d,S-1,1-b),Qv(u,r,l,S+1,v,1-b)}function CS(u,r,l,d,v,b){for(;v>d;){if(v-d>600){const A=v-d+1,X=l-d+1,Z=Math.log(A),G=.5*Math.exp(2*Z/3),H=.5*Math.sqrt(Z*G*(A-G)/A)*(X-A/2<0?-1:1);CS(u,r,l,Math.max(d,Math.floor(l-X*G/A+H)),Math.min(v,Math.floor(l+(A-X)*G/A+H)),b)}const S=r[2*l+b];let W=d,U=v;for(mm(u,r,d,l),r[2*v+b]>S&&mm(u,r,d,v);W<U;){for(mm(u,r,W,U),W++,U--;r[2*W+b]<S;)W++;for(;r[2*U+b]>S;)U--}r[2*d+b]===S?mm(u,r,d,U):(U++,mm(u,r,U,v)),U<=l&&(d=U+1),l<=U&&(v=U-1)}}function mm(u,r,l,d){Jv(u,l,d),Jv(r,2*l,2*d),Jv(r,2*l+1,2*d+1)}function Jv(u,r,l){const d=u[r];u[r]=u[l],u[l]=d}function VS(u,r,l,d){const v=u-l,b=r-d;return v*v+b*b}var e_;g.co=void 0,(e_=g.co||(g.co={})).create="create",e_.load="load",e_.fullLoad="fullLoad";let ey=null,gm=[];const t_=1e3/60,r_="loadTime",n_="fullLoadTime",OC={mark(u){performance.mark(u)},frame(u){const r=u;ey!=null&&gm.push(r-ey),ey=r},clearMetrics(){ey=null,gm=[],performance.clearMeasures(r_),performance.clearMeasures(n_);for(const u in g.co)performance.clearMarks(g.co[u])},getPerformanceMetrics(){performance.measure(r_,g.co.create,g.co.load),performance.measure(n_,g.co.create,g.co.fullLoad);const u=performance.getEntriesByName(r_)[0].duration,r=performance.getEntriesByName(n_)[0].duration,l=gm.length,d=1/(gm.reduce((b,S)=>b+S,0)/l/1e3),v=gm.filter(b=>b>t_).reduce((b,S)=>b+(S-t_)/t_,0);return{loadTime:u,fullLoadTime:r,fps:d,percentDroppedFrames:v/(l+v)*100,totalFrames:l}}};g.$=fm,g.A=se,g.B=Ya,g.C=en,g.D=Zt,g.E=Ve,g.F=Uc,g.G=function(u){if(ri==null){const r=u.navigator?u.navigator.userAgent:null;ri=!!u.safari||!(!r||!(/\b(iPad|iPhone|iPod)\b/.test(r)||r.match("Safari")&&!r.match("Chrome")))}return ri},g.H=class{constructor(u,r){this.target=u,this.mapId=r,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new PC(()=>this.process()),this.subscription=Jr(this.target,"message",l=>this.receive(l),!1),this.globalScope=xr(self)?u:window}registerMessageHandler(u,r){this.messageHandlers[u]=r}sendAsync(u,r){return new Promise((l,d)=>{const v=Math.round(1e18*Math.random()).toString(36).substring(0,10),b=r?Jr(r.signal,"abort",()=>{b==null||b.unsubscribe(),delete this.resolveRejects[v];const U={id:v,type:"<cancel>",origin:location.origin,targetMapId:u.targetMapId,sourceMapId:this.mapId};this.target.postMessage(U)},IC):null;this.resolveRejects[v]={resolve:U=>{b==null||b.unsubscribe(),l(U)},reject:U=>{b==null||b.unsubscribe(),d(U)}};const S=[],W=Object.assign(Object.assign({},u),{id:v,sourceMapId:this.mapId,origin:location.origin,data:Ei(u.data,S)});this.target.postMessage(W,{transfer:S})})}receive(u){const r=u.data,l=r.id;if(!(r.origin!=="file://"&&location.origin!=="file://"&&r.origin!=="resource://android"&&location.origin!=="resource://android"&&r.origin!==location.origin||r.targetMapId&&this.mapId!==r.targetMapId)){if(r.type==="<cancel>"){delete this.tasks[l];const d=this.abortControllers[l];return delete this.abortControllers[l],void(d&&d.abort())}if(xr(self)||r.mustQueue)return this.tasks[l]=r,this.taskQueue.push(l),void this.invoker.trigger();this.processTask(l,r)}}process(){if(this.taskQueue.length===0)return;const u=this.taskQueue.shift(),r=this.tasks[u];delete this.tasks[u],this.taskQueue.length>0&&this.invoker.trigger(),r&&this.processTask(u,r)}processTask(u,r){return s(this,void 0,void 0,function*(){if(r.type==="<response>"){const v=this.resolveRejects[u];return delete this.resolveRejects[u],v?void(r.error?v.reject(cs(r.error)):v.resolve(cs(r.data))):void 0}if(!this.messageHandlers[r.type])return void this.completeTask(u,new Error(`Could not find a registered handler for ${r.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const l=cs(r.data),d=new AbortController;this.abortControllers[u]=d;try{const v=yield this.messageHandlers[r.type](r.sourceMapId,l,d);this.completeTask(u,null,v)}catch(v){this.completeTask(u,v)}})}completeTask(u,r,l){const d=[];delete this.abortControllers[u];const v={id:u,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:r?Ei(r):null,data:Ei(l,d)};this.target.postMessage(v,{transfer:d})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},g.I=lm,g.J=Ln,g.K=function(){var u=new se(16);return se!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},g.L=function(u,r,l){var d,v,b,S,W,U,A,X,Z,G,H,J,te=l[0],ce=l[1],ve=l[2];return r===u?(u[12]=r[0]*te+r[4]*ce+r[8]*ve+r[12],u[13]=r[1]*te+r[5]*ce+r[9]*ve+r[13],u[14]=r[2]*te+r[6]*ce+r[10]*ve+r[14],u[15]=r[3]*te+r[7]*ce+r[11]*ve+r[15]):(v=r[1],b=r[2],S=r[3],W=r[4],U=r[5],A=r[6],X=r[7],Z=r[8],G=r[9],H=r[10],J=r[11],u[0]=d=r[0],u[1]=v,u[2]=b,u[3]=S,u[4]=W,u[5]=U,u[6]=A,u[7]=X,u[8]=Z,u[9]=G,u[10]=H,u[11]=J,u[12]=d*te+W*ce+Z*ve+r[12],u[13]=v*te+U*ce+G*ve+r[13],u[14]=b*te+A*ce+H*ve+r[14],u[15]=S*te+X*ce+J*ve+r[15]),u},g.M=function(u,r,l){var d=l[0],v=l[1],b=l[2];
vendor: 8,340 bytes, line 71
71return u[0]=r[0]*d,u[1]=r[1]*d,u[2]=r[2]*d,u[3]=r[3]*d,u[4]=r[4]*v,u[5]=r[5]*v,u[6]=r[6]*v,u[7]=r[7]*v,u[8]=r[8]*b,u[9]=r[9]*b,u[10]=r[10]*b,u[11]=r[11]*b,u[12]=r[12],u[13]=r[13],u[14]=r[14],u[15]=r[15],u},g.N=function(u,r,l){var d=r[0],v=r[1],b=r[2],S=r[3],W=r[4],U=r[5],A=r[6],X=r[7],Z=r[8],G=r[9],H=r[10],J=r[11],te=r[12],ce=r[13],ve=r[14],Ae=r[15],Ye=l[0],q=l[1],oe=l[2],Me=l[3];return u[0]=Ye*d+q*W+oe*Z+Me*te,u[1]=Ye*v+q*U+oe*G+Me*ce,u[2]=Ye*b+q*A+oe*H+Me*ve,u[3]=Ye*S+q*X+oe*J+Me*Ae,u[4]=(Ye=l[4])*d+(q=l[5])*W+(oe=l[6])*Z+(Me=l[7])*te,u[5]=Ye*v+q*U+oe*G+Me*ce,u[6]=Ye*b+q*A+oe*H+Me*ve,u[7]=Ye*S+q*X+oe*J+Me*Ae,u[8]=(Ye=l[8])*d+(q=l[9])*W+(oe=l[10])*Z+(Me=l[11])*te,u[9]=Ye*v+q*U+oe*G+Me*ce,u[10]=Ye*b+q*A+oe*H+Me*ve,u[11]=Ye*S+q*X+oe*J+Me*Ae,u[12]=(Ye=l[12])*d+(q=l[13])*W+(oe=l[14])*Z+(Me=l[15])*te,u[13]=Ye*v+q*U+oe*G+Me*ce,u[14]=Ye*b+q*A+oe*H+Me*ve,u[15]=Ye*S+q*X+oe*J+Me*Ae,u},g.O=function(u,r){const l={};for(let d=0;d<r.length;d++){const v=r[d];v in u&&(l[v]=u[v])}return l},g.P=F,g.Q=th,g.R=pa,g.S=lS,g.T=Vc,g.U=oS,g.V=_e,g.W=fe,g.X=ui,g.Y=eo,g.Z=Qe,g._=s,g.a=xi,g.a$=function(u,r,l){var d=Math.sin(l),v=Math.cos(l),b=r[4],S=r[5],W=r[6],U=r[7],A=r[8],X=r[9],Z=r[10],G=r[11];return r!==u&&(u[0]=r[0],u[1]=r[1],u[2]=r[2],u[3]=r[3],u[12]=r[12],u[13]=r[13],u[14]=r[14],u[15]=r[15]),u[4]=b*v+A*d,u[5]=S*v+X*d,u[6]=W*v+Z*d,u[7]=U*v+G*d,u[8]=A*v-b*d,u[9]=X*v-S*d,u[10]=Z*v-W*d,u[11]=G*v-U*d,u},g.a0=25,g.a1=Gv,g.a2=u=>{const r=window.document.createElement("video");return r.muted=!0,new Promise(l=>{r.onloadstart=()=>{l(r)};for(const d of u){const v=window.document.createElement("source");Fe(d)||(r.crossOrigin="Anonymous"),v.src=d,r.appendChild(v)}})},g.a3=Xe,g.a4=function(){return fr++},g.a5=ye,g.a6=Ne,g.a7=Du,g.a8=fl,g.a9=mS,g.aA=function(u,r,l,d,v=!1){if(!l[0]&&!l[1])return[0,0];const b=v?d==="map"?-u.bearingInRadians:0:d==="viewport"?u.bearingInRadians:0;if(b){const S=Math.sin(b),W=Math.cos(b);l=[l[0]*W-l[1]*S,l[0]*S+l[1]*W]}return[v?l[0]:bt(r,l[0],u.zoom),v?l[1]:bt(r,l[1],u.zoom)]},g.aC=It,g.aD=Hv,g.aE=dm,g.aF=Kv,g.aG=Hr,g.aH=id,g.aI=lt,g.aJ=Vr,g.aK=Or,g.aL=rr,g.aM=In,g.aN=cS,g.aO=function(u,r,l){return u[0]=r[0]*l,u[1]=r[1]*l,u[2]=r[2]*l,u},g.aP=function(u,r,l){return u[0]=r[0]+l[0],u[1]=r[1]+l[1],u[2]=r[2]+l[2],u},g.aQ=function(u){var r=new se(3);return r[0]=u[0],r[1]=u[1],r[2]=u[2],r},g.aR=function(u,r,l){return u[0]=r[0]*l[0],u[1]=r[1]*l[1],u[2]=r[2]*l[2],u[3]=r[3]*l[3],u},g.aS=function(u,r,l){return u[0]=r[0]-l[0],u[1]=r[1]-l[1],u[2]=r[2]-l[2],u},g.aT=function(u,r){var l=r[0],d=r[1],v=r[2],b=l*l+d*d+v*v;return b>0&&(b=1/Math.sqrt(b)),u[0]=r[0]*b,u[1]=r[1]*b,u[2]=r[2]*b,u},g.aU=function(u,r,l){var d=r[0],v=r[1],b=r[2],S=l[0],W=l[1],U=l[2];return u[0]=v*U-b*W,u[1]=b*S-d*U,u[2]=d*W-v*S,u},g.aV=function(u,r){return u[0]*r[0]+u[1]*r[1]+u[2]*r[2]},g.aW=dS,g.aX=If,g.aY=function(u,r,l,d,v){var b,S=1/Math.tan(r/2);return u[0]=S/l,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=S,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=-1,u[12]=0,u[13]=0,u[15]=0,v!=null&&v!==1/0?(u[10]=(v+d)*(b=1/(d-v)),u[14]=2*v*d*b):(u[10]=-1,u[14]=-2*d),u},g.aZ=function(u){var r=new se(16);return r[0]=u[0],r[1]=u[1],r[2]=u[2],r[3]=u[3],r[4]=u[4],r[5]=u[5],r[6]=u[6],r[7]=u[7],r[8]=u[8],r[9]=u[9],r[10]=u[10],r[11]=u[11],r[12]=u[12],r[13]=u[13],r[14]=u[14],r[15]=u[15],r},g.a_=function(u,r,l){var d=Math.sin(l),v=Math.cos(l),b=r[0],S=r[1],W=r[2],U=r[3],A=r[4],X=r[5],Z=r[6],G=r[7];return r!==u&&(u[8]=r[8],u[9]=r[9],u[10]=r[10],u[11]=r[11],u[12]=r[12],u[13]=r[13],u[14]=r[14],u[15]=r[15]),u[0]=b*v+A*d,u[1]=S*v+X*d,u[2]=W*v+Z*d,u[3]=U*v+G*d,u[4]=A*v-b*d,u[5]=X*v-S*d,u[6]=Z*v-W*d,u[7]=G*v-U*d,u},g.aa=function(u){const r={};if(u.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(l,d,v,b)=>{const S=v||b;return r[d]=!S||S.toLowerCase(),""}),r["max-age"]){const l=parseInt(r["max-age"],10);isNaN(l)?delete r["max-age"]:r["max-age"]=l}return r},g.ab=Fr,g.ac=function(u){return Math.pow(2,u)},g.ad=ze,g.ae=Gt,g.af=85.051129,g.ag=uS,g.ah=function(u){return Math.log(u)/Math.LN2},g.ai=function(u){var r=u[0],l=u[1];return r*r+l*l},g.aj=function(u,r){const l=[];for(const d in u)d in r||l.push(d);return l},g.ak=function(u,r){let l=0,d=0;if(u.kind==="constant")d=u.layoutSize;else if(u.kind!=="source"){const{interpolationType:v,minZoom:b,maxZoom:S}=u,W=v?Gt(hi.interpolationFactor(v,r,b,S),0,1):0;u.kind==="camera"?d=Ya.number(u.minSize,u.maxSize,W):l=W}return{uSizeT:l,uSize:d}},g.am=function(u,{uSize:r,uSizeT:l},{lowerSize:d,upperSize:v}){return u.kind==="source"?d/Se:u.kind==="composite"?Ya.number(d/Se,v/Se,l):r},g.an=function(u,r){var l=r[0],d=r[1],v=r[2],b=r[3],S=r[4],W=r[5],U=r[6],A=r[7],X=r[8],Z=r[9],G=r[10],H=r[11],J=r[12],te=r[13],ce=r[14],ve=r[15],Ae=l*W-d*S,Ye=l*U-v*S,q=l*A-b*S,oe=d*U-v*W,Me=d*A-b*W,et=v*A-b*U,wt=X*te-Z*J,it=X*ce-G*J,dt=X*ve-H*J,Pt=Z*ce-G*te,St=Z*ve-H*te,Ct=G*ve-H*ce,mt=Ae*Ct-Ye*St+q*Pt+oe*dt-Me*it+et*wt;return mt?(u[0]=(W*Ct-U*St+A*Pt)*(mt=1/mt),u[1]=(v*St-d*Ct-b*Pt)*mt,u[2]=(te*et-ce*Me+ve*oe)*mt,u[3]=(G*Me-Z*et-H*oe)*mt,u[4]=(U*dt-S*Ct-A*it)*mt,u[5]=(l*Ct-v*dt+b*it)*mt,u[6]=(ce*q-J*et-ve*Ye)*mt,u[7]=(X*et-G*q+H*Ye)*mt,u[8]=(S*St-W*dt+A*wt)*mt,u[9]=(d*dt-l*St-b*wt)*mt,u[10]=(J*Me-te*q+ve*Ae)*mt,u[11]=(Z*q-X*Me-H*Ae)*mt,u[12]=(W*it-S*Pt-U*wt)*mt,u[13]=(l*Pt-d*it+v*wt)*mt,u[14]=(te*Ye-J*oe-ce*Ae)*mt,u[15]=(X*oe-Z*Ye+G*Ae)*mt,u):null},g.ao=Tt,g.ap=function(u){return Math.hypot(u[0],u[1])},g.aq=function(u){return u[0]=0,u[1]=0,u},g.ar=function(u,r,l){return u[0]=r[0]*l,u[1]=r[1]*l,u},g.as=Qt,g.at=Re,g.au=function(u,r,l,d){const v=r.y-u.y,b=r.x-u.x,S=d.y-l.y,W=d.x-l.x,U=S*b-W*v;if(U===0)return null;const A=(W*(u.y-l.y)-S*(u.x-l.x))/U;return new F(u.x+A*b,u.y+A*v)},g.av=_S,g.aw=Dp,g.ax=function(u){let r=1/0,l=1/0,d=-1/0,v=-1/0;for(const b of u)r=Math.min(r,b.x),l=Math.min(l,b.y),d=Math.max(d,b.x),v=Math.max(v,b.y);return[r,l,d,v]},g.ay=li,g.az=bt,g.b=hr,g.b$=class extends ee{},g.b0=function(){const u=new Float32Array(16);return ze(u),u},g.b1=function(){const u=new Float64Array(16);return ze(u),u},g.b2=function(){return new Float64Array(16)},g.b3=function(u,r,l){const d=new Float64Array(4);return function(v,b,S,W){var U=.5*Math.PI/180;b*=U,S*=U,W*=U;var A=Math.sin(b),X=Math.cos(b),Z=Math.sin(S),G=Math.cos(S),H=Math.sin(W),J=Math.cos(W);v[0]=A*G*J-X*Z*H,v[1]=X*Z*J+A*G*H,v[2]=X*G*H-A*Z*J,v[3]=X*G*J+A*Z*H}(d,u,r-90,l),d},g.b4=function(u,r,l,d){var v,b,S,W,U,A=r[0],X=r[1],Z=r[2],G=r[3],H=l[0],J=l[1],te=l[2],ce=l[3];return(b=A*H+X*J+Z*te+G*ce)<0&&(b=-b,H=-H,J=-J,te=-te,ce=-ce),1-b>We?(v=Math.acos(b),S=Math.sin(v),W=Math.sin((1-d)*v)/S,U=Math.sin(d*v)/S):(W=1-d,U=d),u[0]=W*A+U*H,u[1]=W*X+U*J,u[2]=W*Z+U*te,u[3]=W*G+U*ce,u},g.b5=function(u){const r=new Float64Array(9);var l,d,v,b,S,W,U,A,X,Z,G,H,J,te,ce,ve,Ae,Ye;Z=(v=(d=u)[0])*(U=v+v),G=(b=d[1])*U,J=(S=d[2])*U,te=S*(A=b+b),ve=(W=d[3])*U,Ae=W*A,Ye=W*(X=S+S),(l=r)[0]=1-(H=b*A)-(ce=S*X),l[3]=G-Ye,l[6]=J+Ae,l[1]=G+Ye,l[4]=1-Z-ce,l[7]=te-ve,l[2]=J-Ae,l[5]=te+ve,l[8]=1-Z-H;const q=In(-Math.asin(Gt(r[2],-1,1)));let oe,Me;return Math.hypot(r[5],r[8])<.001?(oe=0,Me=-In(Math.atan2(r[3],r[4]))):(oe=In(r[5]===0&&r[8]===0?0:Math.atan2(r[5],r[8])),Me=In(r[1]===0&&r[0]===0?0:Math.atan2(r[1],r[0]))),{roll:oe,pitch:q+90,bearing:Me}},g.b6=function(u,r){return u.roll==r.roll&&u.pitch==r.pitch&&u.bearing==r.bearing},g.b7=Mr,g.b8=Rc,g.b9=qu,g.bA=function(u){if(u.type==="custom")return new MC(u);switch(u.type){case"background":return new Kr(u);case"circle":return new zp(u);case"fill":return new Mi(u);case"fill-extrusion":return new em(u);case"heatmap":return new Cg(u);case"hillshade":return new Ag(u);case"line":return new Ng(u);case"raster":return new EC(u);case"symbol":return new lr(u)}},g.bB=Gr,g.bC=function(u,r){if(!u)return[{command:"setStyle",args:[r]}];let l=[];try{if(!Be(u.version,r.version))return[{command:"setStyle",args:[r]}];Be(u.center,r.center)||l.push({command:"setCenter",args:[r.center]}),Be(u.state,r.state)||l.push({command:"setGlobalState",args:[r.state]}),Be(u.centerAltitude,r.centerAltitude)||l.push({command:"setCenterAltitude",args:[r.centerAltitude]}),Be(u.zoom,r.zoom)||l.push({command:"setZoom",args:[r.zoom]}),Be(u.bearing,r.bearing)||l.push({command:"setBearing",args:[r.bearing]}),Be(u.pitch,r.pitch)||l.push({command:"setPitch",args:[r.pitch]}),Be(u.roll,r.roll)||l.push({command:"setRoll",args:[r.roll]}
vendor: 18,860 bytes, line 71
71),Be(u.sprite,r.sprite)||l.push({command:"setSprite",args:[r.sprite]}),Be(u.glyphs,r.glyphs)||l.push({command:"setGlyphs",args:[r.glyphs]}),Be(u.transition,r.transition)||l.push({command:"setTransition",args:[r.transition]}),Be(u.light,r.light)||l.push({command:"setLight",args:[r.light]}),Be(u.terrain,r.terrain)||l.push({command:"setTerrain",args:[r.terrain]}),Be(u.sky,r.sky)||l.push({command:"setSky",args:[r.sky]}),Be(u.projection,r.projection)||l.push({command:"setProjection",args:[r.projection]});const d={},v=[];(function(S,W,U,A){let X;for(X in W=W||{},S=S||{})Object.prototype.hasOwnProperty.call(S,X)&&(Object.prototype.hasOwnProperty.call(W,X)||vt(X,U,A));for(X in W)Object.prototype.hasOwnProperty.call(W,X)&&(Object.prototype.hasOwnProperty.call(S,X)?Be(S[X],W[X])||(S[X].type==="geojson"&&W[X].type==="geojson"&&Te(S,W,X)?tt(U,{command:"setGeoJSONSourceData",args:[X,W[X].data]}):ge(X,W,U,A)):Ze(X,W,U))})(u.sources,r.sources,v,d);const b=[];u.layers&&u.layers.forEach(S=>{"source"in S&&d[S.source]?l.push({command:"removeLayer",args:[S.id]}):b.push(S)}),l=l.concat(v),function(S,W,U){W=W||[];const A=(S=S||[]).map(ht),X=W.map(ht),Z=S.reduce(gt,{}),G=W.reduce(gt,{}),H=A.slice(),J=Object.create(null);let te,ce,ve,Ae,Ye;for(let q=0,oe=0;q<A.length;q++)te=A[q],Object.prototype.hasOwnProperty.call(G,te)?oe++:(tt(U,{command:"removeLayer",args:[te]}),H.splice(H.indexOf(te,oe),1));for(let q=0,oe=0;q<X.length;q++)te=X[X.length-1-q],H[H.length-1-q]!==te&&(Object.prototype.hasOwnProperty.call(Z,te)?(tt(U,{command:"removeLayer",args:[te]}),H.splice(H.lastIndexOf(te,H.length-oe),1)):oe++,Ae=H[H.length-q],tt(U,{command:"addLayer",args:[G[te],Ae]}),H.splice(H.length-q,0,te),J[te]=!0);for(let q=0;q<X.length;q++)if(te=X[q],ce=Z[te],ve=G[te],!J[te]&&!Be(ce,ve))if(Be(ce.source,ve.source)&&Be(ce["source-layer"],ve["source-layer"])&&Be(ce.type,ve.type)){for(Ye in Oe(ce.layout,ve.layout,U,te,null,"setLayoutProperty"),Oe(ce.paint,ve.paint,U,te,null,"setPaintProperty"),Be(ce.filter,ve.filter)||tt(U,{command:"setFilter",args:[te,ve.filter]}),Be(ce.minzoom,ve.minzoom)&&Be(ce.maxzoom,ve.maxzoom)||tt(U,{command:"setLayerZoomRange",args:[te,ve.minzoom,ve.maxzoom]}),ce)Object.prototype.hasOwnProperty.call(ce,Ye)&&Ye!=="layout"&&Ye!=="paint"&&Ye!=="filter"&&Ye!=="metadata"&&Ye!=="minzoom"&&Ye!=="maxzoom"&&(Ye.indexOf("paint.")===0?Oe(ce[Ye],ve[Ye],U,te,Ye.slice(6),"setPaintProperty"):Be(ce[Ye],ve[Ye])||tt(U,{command:"setLayerProperty",args:[te,Ye,ve[Ye]]}));for(Ye in ve)Object.prototype.hasOwnProperty.call(ve,Ye)&&!Object.prototype.hasOwnProperty.call(ce,Ye)&&Ye!=="layout"&&Ye!=="paint"&&Ye!=="filter"&&Ye!=="metadata"&&Ye!=="minzoom"&&Ye!=="maxzoom"&&(Ye.indexOf("paint.")===0?Oe(ce[Ye],ve[Ye],U,te,Ye.slice(6),"setPaintProperty"):Be(ce[Ye],ve[Ye])||tt(U,{command:"setLayerProperty",args:[te,Ye,ve[Ye]]}))}else tt(U,{command:"removeLayer",args:[te]}),Ae=H[H.lastIndexOf(te)+1],tt(U,{command:"addLayer",args:[ve,Ae]})}(b,r.layers,l)}catch(d){console.warn("Unable to compute style diff:",d),l=[{command:"setStyle",args:[r]}]}return l},g.bD=function(u){const r=[],l=u.id;return l===void 0&&r.push({message:`layers.${l}: missing required property "id"`}),u.render===void 0&&r.push({message:`layers.${l}: missing required method "render"`}),u.renderingMode&&u.renderingMode!=="2d"&&u.renderingMode!=="3d"&&r.push({message:`layers.${l}: property "renderingMode" must be either "2d" or "3d"`}),r},g.bE=function u(r,l){if(Array.isArray(r)){if(!Array.isArray(l)||r.length!==l.length)return!1;for(let d=0;d<r.length;d++)if(!u(r[d],l[d]))return!1;return!0}if(typeof r=="object"&&r!==null&&l!==null){if(typeof l!="object"||Object.keys(r).length!==Object.keys(l).length)return!1;for(const d in r)if(!u(r[d],l[d]))return!1;return!0}return r===l},g.bF=Sr,g.bG=Er,g.bH=class extends un{constructor(u,r){super(u,r),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1i(this.location,u))}},g.bI=qh,g.bJ=class extends un{constructor(u,r){super(u,r),this.current=uf}set(u){if(u[12]!==this.current[12]||u[0]!==this.current[0])return this.current=u,void this.gl.uniformMatrix4fv(this.location,!1,u);for(let r=1;r<16;r++)if(u[r]!==this.current[r]){this.current=u,this.gl.uniformMatrix4fv(this.location,!1,u);break}}},g.bK=lf,g.bL=class extends un{constructor(u,r){super(u,r),this.current=[0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]||(this.current=u,this.gl.uniform3f(this.location,u[0],u[1],u[2]))}},g.bM=class extends un{constructor(u,r){super(u,r),this.current=[0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]||(this.current=u,this.gl.uniform2f(this.location,u[0],u[1]))}},g.bN=De,g.bO=function(u,r){var l=Math.sin(r),d=Math.cos(r);return u[0]=d,u[1]=l,u[2]=0,u[3]=-l,u[4]=d,u[5]=0,u[6]=0,u[7]=0,u[8]=1,u},g.bP=function(u,r,l){var d=r[0],v=r[1],b=r[2];return u[0]=d*l[0]+v*l[3]+b*l[6],u[1]=d*l[1]+v*l[4]+b*l[7],u[2]=d*l[2]+v*l[5]+b*l[8],u},g.bQ=function(u,r,l,d,v,b,S){var W=1/(r-l),U=1/(d-v),A=1/(b-S);return u[0]=-2*W,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=-2*U,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=2*A,u[11]=0,u[12]=(r+l)*W,u[13]=(v+d)*U,u[14]=(S+b)*A,u[15]=1,u},g.bR=class extends un{constructor(u,r){super(u,r),this.current=new Array}set(u){if(u!=this.current){this.current=u;const r=new Float32Array(4*u.length);for(let l=0;l<u.length;l++)r[4*l]=u[l].r,r[4*l+1]=u[l].g,r[4*l+2]=u[l].b,r[4*l+3]=u[l].a;this.gl.uniform4fv(this.location,r)}}},g.bS=class extends un{constructor(u,r){super(u,r),this.current=new Array}set(u){if(u!=this.current){this.current=u;const r=new Float32Array(u);this.gl.uniform1fv(this.location,r)}}},g.bT=class extends x{},g.bU=Zv,g.bV=class extends P{},g.bW=Bp,g.bX=function(u){return u<=1?1:Math.pow(2,Math.ceil(Math.log(u)/Math.LN2))},g.bY=Vo,g.bZ=function(u,r,l){var d=r[0],v=r[1],b=r[2],S=l[3]*d+l[7]*v+l[11]*b+l[15];return u[0]=(l[0]*d+l[4]*v+l[8]*b+l[12])/(S=S||1),u[1]=(l[1]*d+l[5]*v+l[9]*b+l[13])/S,u[2]=(l[2]*d+l[6]*v+l[10]*b+l[14])/S,u},g.b_=class extends ha{},g.ba=Bc,g.bb=Gu,g.bc=Ue,g.bd=pt,g.be=aa,g.bf=function(u,r,l,d,v){return Ue(d,v,Gt((u-r)/(l-r),0,1))},g.bg=xt,g.bh=function(){return new Float64Array(3)},g.bi=function(u,r,l,d){return u[0]=r[0]+l[0]*d,u[1]=r[1]+l[1]*d,u[2]=r[2]+l[2]*d,u},g.bj=rt,g.bk=function(){return new Float64Array(4)},g.bl=function(u,r,l,d){var v=[],b=[];return v[0]=r[0]-l[0],v[1]=r[1]-l[1],v[2]=r[2]-l[2],b[0]=v[0]*Math.cos(d)-v[1]*Math.sin(d),b[1]=v[0]*Math.sin(d)+v[1]*Math.cos(d),b[2]=v[2],u[0]=b[0]+l[0],u[1]=b[1]+l[1],u[2]=b[2]+l[2],u},g.bm=function(u,r,l,d){var v=[],b=[];return v[0]=r[0]-l[0],v[1]=r[1]-l[1],v[2]=r[2]-l[2],b[0]=v[0],b[1]=v[1]*Math.cos(d)-v[2]*Math.sin(d),b[2]=v[1]*Math.sin(d)+v[2]*Math.cos(d),u[0]=b[0]+l[0],u[1]=b[1]+l[1],u[2]=b[2]+l[2],u},g.bn=function(u,r,l,d){var v=[],b=[];return v[0]=r[0]-l[0],v[1]=r[1]-l[1],v[2]=r[2]-l[2],b[0]=v[2]*Math.sin(d)+v[0]*Math.cos(d),b[1]=v[1],b[2]=v[2]*Math.cos(d)-v[0]*Math.sin(d),u[0]=b[0]+l[0],u[1]=b[1]+l[1],u[2]=b[2]+l[2],u},g.bo=ft,g.bp=function(u,r,l){var d=Math.sin(l),v=Math.cos(l),b=r[0],S=r[1],W=r[2],U=r[3],A=r[8],X=r[9],Z=r[10],G=r[11];return r!==u&&(u[4]=r[4],u[5]=r[5],u[6]=r[6],u[7]=r[7],u[12]=r[12],u[13]=r[13],u[14]=r[14],u[15]=r[15]),u[0]=b*v-A*d,u[1]=S*v-X*d,u[2]=W*v-Z*d,u[3]=U*v-G*d,u[8]=b*d+A*v,u[9]=S*d+X*v,u[10]=W*d+Z*v,u[11]=U*d+G*v,u},g.bq=function(u,r){const l=xt(u,360),d=xt(r,360),v=d-l,b=d>l?v-360:v+360;return Math.abs(v)<Math.abs(b)?v:b},g.br=function(u){return u[0]=0,u[1]=0,u[2]=0,u},g.bs=function(u,r,l,d){const v=Math.sqrt(u*u+r*r),b=Math.sqrt(l*l+d*d);u/=v,r/=v,l/=b,d/=b;const S=Math.acos(u*l+r*d);return-r*l+u*d>0?S:-S},g.bt=function(u,r){return u[0]*r[0]+u[1]*r[1]+u[2]*r[2]+u[3]},g.bu=Bv,g.bv=function(u,r){const l=xt(u,2*Math.PI),d=xt(r,2*Math.PI);return Math.min(Math.abs(l-d),Math.abs(l-d+2*Math.PI),Math.abs(l-d-2*Math.PI))},g.bw=function(){const u={},r=ue.$version;for(const l in ue.$root){const d=ue.$root[l];if(d.required){let v=null;v=l==="version"?r:d.type==="array"?[]:{},v!=null&&(u[l]=v)}}return u},g.bx=hs,g.by=sn,g.bz=function(u){u=u.slice();const r=Object.create(null);for(let l=0;l<u.length;l++)r[u[l].id]=u[l];for(let l=0;l<u.length;l++)"ref"in u[l]&&(u[l]=Le(u[l],r[u[l].ref]));return u},g.c=mn,g.c0=function(u,r){return u[0]===r[0]&&u[1]===r[1]&&u[2]===r[2]&&u[3]===r[3]&&u[4]===r[4]&&u[5]===r[5]&&u[6]===r[6]&&u[7]===r[7]&&u[8]===r[8]&&u[9]===r[9]&&u[10]===r[10]&&u[11]===r[11]&&u[12]===r[12]&&u[13]===r[13]&&u[14]===r[14]&&u[15]===r[15]},g.c1=function(u,r){var l=u[0],d=u[1],v=u[2],b=u[3],S=u[4],W=u[5],U=u[6],A=u[7],X=u[8],Z=u[9],G=u[10],H=u[11],J=u[12],te=u[13],ce=u[14],ve=u[15],Ae=r[0],Ye=r[1],q=r[2],oe=r[3],Me=r[4],et=r[5],wt=r[6],it=r[7],dt=r[8],Pt=r[9],St=r[10],Ct=r[11],mt=r[12],jt=r[13],ar=r[14],tr=r[15];return Math.abs(l-Ae)<=We*Math.max(1,Math.abs(l),Math.abs(Ae))&&Math.abs(d-Ye)<=We*Math.max(1,Math.abs(d),Math.abs(Ye))&&Math.abs(v-q)<=We*Math.max(1,Math.abs(v),Math.abs(q))&&Math.abs(b-oe)<=We*Math.max(1,Math.abs(b),Math.abs(oe))&&Math.abs(S-Me)<=We*Math.max(1,Math.abs(S),Math.abs(Me))&&Math.abs(W-et)<=We*Math.max(1,Math.abs(W),Math.abs(et))&&Math.abs(U-wt)<=We*Math.max(1,Math.abs(U),Math.abs(wt))&&Math.abs(A-it)<=We*Math.max(1,Math.abs(A),Math.abs(it))&&Math.abs(X-dt)<=We*Math.max(1,Math.abs(X),Math.abs(dt))&&Math.abs(Z-Pt)<=We*Math.max(1,Math.abs(Z),Math.abs(Pt))&&Math.abs(G-St)<=We*Math.max(1,Math.abs(G),Math.abs(St))&&Math.abs(H-Ct)<=We*Math.max(1,Math.abs(H),Math.abs(Ct))&&Math.abs(J-mt)<=We*Math.max(1,Math.abs(J),Math.abs(mt))&&Math.abs(te-jt)<=We*Math.max(1,Math.abs(te),Math.abs(jt))&&Math.abs(ce-ar)<=We*Math.max(1,Math.abs(ce),Math.abs(ar))&&Math.abs(ve-tr)<=We*Math.max(1,Math.abs(ve),Math.abs(tr))},g.c2=function(u,r){return u[0]=r[0],u[1]=r[1],u[2]=r[2],u[3]=r[3],u[4]=r[4],u[5]=r[5],u[6]=r[6],u[7]=r[7],u[8]=r[8],u[9]=r[9],u[10]=r[10],u[11]=r[11],u[12]=r[12],u[13]=r[13],u[14]=r[14],u[15]=r[15],u},g.c3=u=>u.type==="symbol",g.c4=u=>u.type==="circle",g.c5=u=>u.type==="heatmap",g.c6=u=>u.type==="line",g.c7=u=>u.type==="fill",g.c8=u=>u.type==="fill-extrusion",g.c9=u=>u.type==="hillshade",g.cA=ti,g.cB=Hc,g.cC=lu,g.cD=ko,g.cE=class{constructor(u){this._marks={start:[u.url,"start"].join("#"),end:[u.url,"end"].join("#"),measure:u.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let u=performance.getEntriesByName(this._marks.measure);return u.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),u=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),u}},g.cF=function(u,r,l,d,v){return s(this,void 0,void 0,function*(){if(fe())try{return yield ui(u,r,l,d,v)}catch{}return function(b,S,W,U,A){const X=b.width,Z=b.height;Qr&&an||(Qr=new OffscreenCanvas(X,Z),an=Qr.getContext("2d",{willReadFrequently:!0})),Qr.width=X,Qr.height=Z,an.drawImage(b,0,0,X,Z);const G=an.getImageData(S,W,U,A);return an.clearRect(0,0,X,Z),G.data}(u,r,l,d,v)})},g.cG=fS,g.cH=Y,g.cI=k,g.cJ=gl,g.cK=jg,g.cL=wo,g.cM=Ps,g.ca=u=>u.type==="raster",g.cb=u=>u.type==="background",g.cc=u=>u.type==="custom",g.cd=Ft,g.ce=function(u,r,l){const d=_t(r.x-l.x,r.y-l.y),v=_t(u.x-l.x,u.y-l.y);var b,S;return In(Math.atan2(d[0]*v[1]-d[1]*v[0],(b=d)[0]*(S=v)[0]+b[1]*S[1]))},g.cf=Ht,g.cg=function(u,r){return Rn[r]&&(u instanceof MouseEvent||u instanceof WheelEvent)},g.ch=function(u,r){return ni[r]&&"touches"in u},g.ci=function(u){return ni[u]||Rn[u]},g.cj=function(u,r,l){var d=r[0],v=r[1];return u[0]=l[0]*d+l[4]*v+l[12],u[1]=l[1]*d+l[5]*v+l[13],u},g.ck=function(u,r){const{x:l,y:d}=fm.fromLngLat(r);return!(u<0||u>25||d<0||d>=1||l<0||l>=1)},g.cl=function(u,r){return u[0]=r[0],u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=r[1],u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=r[2],u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u},g.cm=class extends Ea{},g.cn=OC,g.cp=function(u){return u.message===bn},g.cq=ci,g.cr=function(u,r){xi.REGISTERED_PROTOCOLS[u]=r},g.cs=function(u){delete xi.REGISTERED_PROTOCOLS[u]},g.ct=function(u,r){const l={};for(let v=0;v<u.length;v++){const b=r&&r[u[v].id]||Zh(u[v]);r&&(r[u[v].id]=b);let S=l[b];S||(S=l[b]=[]),S.push(u[v])}const d=[];for(const v in l)d.push(l[v]);return d},g.cu=Xt,g.cv=pS,g.cw=gS,g.cx=um,g.cy=function(u){u.bucket.createArrays(),u.bucket.tilePixelRatio=Qe/(512*u.bucket.overscaling),u.bucket.compareText={},u.bucket.iconsNeedLinear=!1;const r=u.bucket.layers[0],l=r.layout,d=r._unevaluatedLayout._values,v={layoutIconSize:d["icon-size"].possiblyEvaluate(new en(u.bucket.zoom+1),u.canonical),layoutTextSize:d["text-size"].possiblyEvaluate(new en(u.bucket.zoom+1),u.canonical),textMaxSize:d["text-size"].possiblyEvaluate(new en(18))};if(u.bucket.textSizeData.kind==="composite"){const{minZoom:A,maxZoom:X}=u.bucket.textSizeData;v.compositeTextSizes=[d["text-size"].possiblyEvaluate(new en(A),u.canonical),d["text-size"].possiblyEvaluate(new en(X),u.canonical)]}if(u.bucket.iconSizeData.kind==="composite"){const{minZoom:A,maxZoom:X}=u.bucket.iconSizeData;v.compositeIconSizes=[d["icon-size"].possiblyEvaluate(new en(A),u.canonical),d["icon-size"].possiblyEvaluate(new en(X),u.canonical)]}const b=l.get("text-line-height")*li,S=l.get("text-rotation-alignment")!=="viewport"&&l.get("symbol-placement")!=="point",W=l.get("text-keep-upright"),U=l.get("text-size");for(const A of u.bucket.features){const X=l.get("text-font").evaluate(A,{},u.canonical).join(","),Z=U.evaluate(A,{},u.canonical),G=v.layoutTextSize.evaluate(A,{},u.canonical),H=v.layoutIconSize.evaluate(A,{},u.canonical),J={horizontal:{},vertical:void 0},te=A.text;let ce,ve=[0,0];if(te){const q=te.toString(),oe=l.get("text-letter-spacing").evaluate(A,{},u.canonical)*li,Me=af(q)?oe:0,et=l.get("text-anchor").evaluate(A,{},u.canonical),wt=MS(r,A,u.canonical);if(!wt){const St=l.get("text-radial-offset").evaluate(A,{},u.canonical);ve=St?ES(et,[St*li,qv]):l.get("text-offset").evaluate(A,{},u.canonical).map(Ct=>Ct*li)}let it=S?"center":l.get("text-justify").evaluate(A,{},u.canonical);const dt=l.get("symbol-placement")==="point"?l.get("text-max-width").evaluate(A,{},u.canonical)*li:1/0,Pt=()=>{u.bucket.allowVerticalPlacement&&Ms(q)&&(J.vertical=Jc(te,u.glyphMap,u.glyphPositions,u.imagePositions,X,dt,b,et,"left",Me,ve,g.al.vertical,!0,G,Z))};if(!S&&wt){const St=new Set;if(it==="auto")for(let mt=0;mt<wt.values.length;mt+=2)St.add(Hv(wt.values[mt]));else St.add(it);let Ct=!1;for(const mt of St)if(!J.horizontal[mt])if(Ct)J.horizontal[mt]=J.horizontal[0];else{const jt=Jc(te,u.glyphMap,u.glyphPositions,u.imagePositions,X,dt,b,"center",mt,Me,ve,g.al.horizontal,!1,G,Z);jt&&(J.horizontal[mt]=jt,Ct=jt.positionedLines.length===1)}Pt()}else{it==="auto"&&(it=Hv(et));const St=Jc(te,u.glyphMap,u.glyphPositions,u.imagePositions,X,dt,b,et,it,Me,ve,g.al.horizontal,!1,G,Z);St&&(J.horizontal[it]=St),Pt(),Ms(q)&&S&&W&&(J.vertical=Jc(te,u.glyphMap,u.glyphPositions,u.imagePositions,X,dt,b,et,it,Me,ve,g.al.vertical,!1,G,Z))}}let Ae=!1;if(A.icon&&A.icon.name){const q=u.imageMap[A.icon.name];q&&(ce=M(u.imagePositions[A.icon.name],l.get("icon-offset").evaluate(A,{},u.canonical),l.get("icon-anchor").evaluate(A,{},u.canonical)),Ae=!!q.sdf,u.bucket.sdfIcons===void 0?u.bucket.sdfIcons=Ae:u.bucket.sdfIcons!==Ae&&pn("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(q.pixelRatio!==u.bucket.pixelRatio||l.get("icon-rotate").constantOr(1)!==0)&&(u.bucket.iconsNeedLinear=!0))}const Ye=IS(J.horizontal)||J.vertical;u.bucket.iconsInText=!!Ye&&Ye.iconsInText,(Ye||ce)&&RC(u.bucket,A,J,ce,u.imageMap,v,G,H,ve,Ae,u.canonical,u.subdivisionGranularity)}u.showCollisionBoxes&&u.bucket.generateCollisionDebugBuffers()},g.cz=wf,g.d=Fe,g.e=or,g.f=u=>s(void 0,void 0,void 0,function*(){if(u.byteLength===0)return createImageBitmap(new ImageData(1,1));const r=new Blob([new Uint8Array(u)],{type:"image/png"});try{return createImageBitmap(r)}catch(l){throw new Error(`Could not load image because of ${l.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),g.g=bi,g.h=u=>new Promise((r,l)=>{const d=new Image;d.onload=()=>{r(d),URL.revokeObjectURL(d.src),d.onload=null,window.requestAnimationFrame(()=>{d.src=_i})},d.onerror=()=>l(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 v=new Blob([new Uint8Array(u)],{type:"image/png"});d.src=u.byteLength?URL.createObjectURL(v):_i}),g.i=xr,g.j=(u,r)=>Un(or(u,{type:"json"}),r),g.k=we,g.l=he,g.m=Un,g.n=(u,r)=>Un(or(u,{type:"arrayBuffer"}),r),g.o=function(u){return new ko(u).readFields(ec,[])},g.p=Bg,g.q=zc,g.r=An,g.s=Jr,g.t=za,g.u=pr,g.v=ue,g.w=pn,g.x=Bh,g.y=ul,g.z=function([u,r,l]){return r+=90,r*=Math.PI/180,l*=Math.PI/180,{x:u*Math.cos(r)*Math.sin(l),y:u*Math.sin(r)*Math.sin(l),z:u*Math.cos(l)}}}),h("worker",["./shared"],function(g){class s{constructor(ne){this.keyCache={},ne&&this.replace(ne)}replace(ne){this._layerConfigs={},this._layers={},this.update(ne,[])}update(ne,ie){for(const we of ne){this._layerConfigs[we.id]=we;const Ve=this._layers[we.id]=g.bA(we);Ve._featureFilter=g.a7(Ve.filter),this.keyCache[we.id]&&delete this.keyCache[we.id]}for(const we of ie)delete this.keyCache[we],delete this._layerConfigs[we],delete this._layers[we];this.familiesBySource={};const he=g.ct(Object.values(this._layerConfigs),this.keyCache);for(const we of he){const Ve=we.map(Ze=>this._layers[Ze.id]),ue=Ve[0];if(ue.visibility==="none")continue;const $e=ue.source||"";let Le=this.familiesBySource[$e];Le||(Le=this.familiesBySource[$e]={});const Be=ue.sourceLayer||"_geojsonTileLayer";let tt=Le[Be];tt||(tt=Le[Be]=[]),tt.push(Ve)}}}class Y{constructor(ne){const ie={},he=[];for(const $e in ne){const Le=ne[$e],Be=ie[$e]={};for(const tt in Le){const Ze=Le[+tt];if(!Ze||Ze.bitmap.width===0||Ze.bitmap.height===0)continue;const vt={x:0,y:0,w:Ze.bitmap.width+2,h:Ze.bitmap.height+2};he.push(vt),Be[tt]={rect:vt,metrics:Ze.metrics}}}const{w:we,h:Ve}=g.p(he),ue=new g.q({width:we||1,height:Ve||1});for(const $e in ne){const Le=ne[$e];for(const Be in Le){const tt=Le[+Be];if(!tt||tt.bitmap.width===0||tt.bitmap.height===0)continue;const Ze=ie[$e][Be].rect;g.q.copy(tt.bitmap,ue,{x:0,y:0},{x:Ze.x+1,y:Ze.y+1},tt.bitmap)}}this.image=ue,this.positions=ie}}g.cu("GlyphAtlas",Y);class E{constructor(ne){this.tileID=new g.Y(ne.tileID.overscaledZ,ne.tileID.wrap,ne.tileID.canonical.z,ne.tileID.canonical.x,ne.tileID.canonical.y),this.uid=ne.uid,this.zoom=ne.zoom,this.pixelRatio=ne.pixelRatio,this.tileSize=ne.tileSize,this.source=ne.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=ne.showCollisionBoxes,this.collectResourceTiming=!!ne.collectResourceTiming,this.returnDependencies=!!ne.returnDependencies,this.promoteId=ne.promoteId,this.inFlightDependencies=[]}parse(ne,ie,he,we,Ve){return g._(this,void 0,void 0,function*(){this.status="parsing",this.data=ne,this.collisionBoxArray=new g.a5;
71const ue=new g.cv(Object.keys(ne.layers).sort()),$e=new g.cw(this.tileID,this.promoteId);$e.bucketLayerIDs=[];const Le={},Be={featureIndex:$e,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:he,subdivisionGranularity:Ve},tt=ie.familiesBySource[this.source];for(const Et in tt){const He=ne.layers[Et];if(!He)continue;He.version===1&&g.w(`Vector tile source "${this.source}" layer "${Et}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Wt=ue.encode(Et),Lt=[];for(let sr=0;sr<He.length;sr++){const vr=He.feature(sr),Zr=$e.getId(vr,Et);Lt.push({feature:vr,id:Zr,index:sr,sourceLayerIndex:Wt})}for(const sr of tt[Et]){const vr=sr[0];vr.source!==this.source&&g.w(`layer.source = ${vr.source} does not equal this.source = ${this.source}`),vr.minzoom&&this.zoom<Math.floor(vr.minzoom)||vr.maxzoom&&this.zoom>=vr.maxzoom||vr.visibility!=="none"&&(I(sr,this.zoom,he),(Le[vr.id]=vr.createBucket({index:$e.bucketLayerIDs.length,layers:sr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Wt,sourceID:this.source})).populate(Lt,Be,this.tileID.canonical),$e.bucketLayerIDs.push(sr.map(Zr=>Zr.id)))}}const Ze=g.bF(Be.glyphDependencies,Et=>Object.keys(Et).map(Number));this.inFlightDependencies.forEach(Et=>Et==null?void 0:Et.abort()),this.inFlightDependencies=[];let vt=Promise.resolve({});if(Object.keys(Ze).length){const Et=new AbortController;this.inFlightDependencies.push(Et),vt=we.sendAsync({type:"GG",data:{stacks:Ze,source:this.source,tileID:this.tileID,type:"glyphs"}},Et)}const ge=Object.keys(Be.iconDependencies);let Te=Promise.resolve({});if(ge.length){const Et=new AbortController;this.inFlightDependencies.push(Et),Te=we.sendAsync({type:"GI",data:{icons:ge,source:this.source,tileID:this.tileID,type:"icons"}},Et)}const Oe=Object.keys(Be.patternDependencies);let ht=Promise.resolve({});if(Oe.length){const Et=new AbortController;this.inFlightDependencies.push(Et),ht=we.sendAsync({type:"GI",data:{icons:Oe,source:this.source,tileID:this.tileID,type:"patterns"}},Et)}const[gt,Xe,Ot]=yield Promise.all([vt,Te,ht]),Mt=new Y(gt),Dt=new g.cx(Xe,Ot);for(const Et in Le){const He=Le[Et];He instanceof g.a6?(I(He.layers,this.zoom,he),g.cy({bucket:He,glyphMap:gt,glyphPositions:Mt.positions,imageMap:Xe,imagePositions:Dt.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:Be.subdivisionGranularity})):He.hasPattern&&(He instanceof g.cz||He instanceof g.cA||He instanceof g.cB)&&(I(He.layers,this.zoom,he),He.addFeatures(Be,this.tileID.canonical,Dt.patternPositions))}return this.status="done",{buckets:Object.values(Le).filter(Et=>!Et.isEmpty()),featureIndex:$e,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Mt.image,imageAtlas:Dt,glyphMap:this.returnDependencies?gt:null,iconMap:this.returnDependencies?Xe:null,glyphPositions:this.returnDependencies?Mt.positions:null}})}}function I(Fe,ne,ie){const he=new g.C(ne);for(const we of Fe)we.recalculate(he,ie)}class k{constructor(ne,ie,he){this.actor=ne,this.layerIndex=ie,this.availableImages=he,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(ne,ie){return g._(this,void 0,void 0,function*(){const he=yield g.n(ne.request,ie);try{return{vectorTile:new g.cC.VectorTile(new g.cD(he.data)),rawData:he.data,cacheControl:he.cacheControl,expires:he.expires}}catch(we){const Ve=new Uint8Array(he.data);let ue=`Unable to parse the tile at ${ne.request.url}, `;throw ue+=Ve[0]===31&&Ve[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${we.message}`,new Error(ue)}})}loadTile(ne){return g._(this,void 0,void 0,function*(){const ie=ne.uid,he=!!(ne&&ne.request&&ne.request.collectResourceTiming)&&new g.cE(ne.request),we=new E(ne);this.loading[ie]=we;const Ve=new AbortController;we.abort=Ve;try{const ue=yield this.loadVectorTile(ne,Ve);if(delete this.loading[ie],!ue)return null;const $e=ue.rawData,Le={};ue.expires&&(Le.expires=ue.expires),ue.cacheControl&&(Le.cacheControl=ue.cacheControl);const Be={};if(he){const Ze=he.finish();Ze&&(Be.resourceTiming=JSON.parse(JSON.stringify(Ze)))}we.vectorTile=ue.vectorTile;const tt=we.parse(ue.vectorTile,this.layerIndex,this.availableImages,this.actor,ne.subdivisionGranularity);this.loaded[ie]=we,this.fetching[ie]={rawTileData:$e,cacheControl:Le,resourceTiming:Be};try{const Ze=yield tt;return g.e({rawTileData:$e.slice(0)},Ze,Le,Be)}finally{delete this.fetching[ie]}}catch(ue){throw delete this.loading[ie],we.status="done",this.loaded[ie]=we,ue}})}reloadTile(ne){return g._(this,void 0,void 0,function*(){const ie=ne.uid;if(!this.loaded||!this.loaded[ie])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const he=this.loaded[ie];if(he.showCollisionBoxes=ne.showCollisionBoxes,he.status==="parsing"){const we=yield he.parse(he.vectorTile,this.layerIndex,this.availableImages,this.actor,ne.subdivisionGranularity);let Ve;if(this.fetching[ie]){const{rawTileData:ue,cacheControl:$e,resourceTiming:Le}=this.fetching[ie];delete this.fetching[ie],Ve=g.e({rawTileData:ue.slice(0)},we,$e,Le)}else Ve=we;return Ve}if(he.status==="done"&&he.vectorTile)return he.parse(he.vectorTile,this.layerIndex,this.availableImages,this.actor,ne.subdivisionGranularity)})}abortTile(ne){return g._(this,void 0,void 0,function*(){const ie=this.loading,he=ne.uid;ie&&ie[he]&&ie[he].abort&&(ie[he].abort.abort(),delete ie[he])})}removeTile(ne){return g._(this,void 0,void 0,function*(){this.loaded&&this.loaded[ne.uid]&&delete this.loaded[ne.uid]})}}class D{constructor(){this.loaded={}}loadTile(ne){return g._(this,void 0,void 0,function*(){const{uid:ie,encoding:he,rawImageData:we,redFactor:Ve,greenFactor:ue,blueFactor:$e,baseShift:Le}=ne,Be=we.width+2,tt=we.height+2,Ze=g.b(we)?new g.R({width:Be,height:tt},yield g.cF(we,-1,-1,Be,tt)):we,vt=new g.cG(ie,Ze,he,Ve,ue,$e,Le);return this.loaded=this.loaded||{},this.loaded[ie]=vt,vt})}removeTile(ne){const ie=this.loaded,he=ne.uid;ie&&ie[he]&&delete ie[he]}}var V,F,$=function(){if(F)return V;function Fe(ie,he){if(ie.length!==0){ne(ie[0],he);for(var we=1;we<ie.length;we++)ne(ie[we],!he)}}function ne(ie,he){for(var we=0,Ve=0,ue=0,$e=ie.length,Le=$e-1;ue<$e;Le=ue++){var Be=(ie[ue][0]-ie[Le][0])*(ie[Le][1]+ie[ue][1]),tt=we+Be;Ve+=Math.abs(we)>=Math.abs(Be)?we-tt+Be:Be-tt+we,we=tt}we+Ve>=0!=!!he&&ie.reverse()}return F=1,V=function ie(he,we){var Ve,ue=he&&he.type;if(ue==="FeatureCollection")for(Ve=0;Ve<he.features.length;Ve++)ie(he.features[Ve],we);else if(ue==="GeometryCollection")for(Ve=0;Ve<he.geometries.length;Ve++)ie(he.geometries[Ve],we);else if(ue==="Feature")ie(he.geometry,we);else if(ue==="Polygon")Fe(he.coordinates,we);else if(ue==="MultiPolygon")for(Ve=0;Ve<he.coordinates.length;Ve++)Fe(he.coordinates[Ve],we);return he}}(),Q=g.cH($);const ae=g.cC.VectorTileFeature.prototype.toGeoJSON;class le{constructor(ne){this._feature=ne,this.extent=g.Z,this.type=ne.type,this.properties=ne.tags,"id"in ne&&!isNaN(ne.id)&&(this.id=p
vendor: 6,920 bytes, line 71
71arseInt(ne.id,10))}loadGeometry(){if(this._feature.type===1){const ne=[];for(const ie of this._feature.geometry)ne.push([new g.P(ie[0],ie[1])]);return ne}{const ne=[];for(const ie of this._feature.geometry){const he=[];for(const we of ie)he.push(new g.P(we[0],we[1]));ne.push(he)}return ne}}toGeoJSON(ne,ie,he){return ae.call(this,ne,ie,he)}}class _e{constructor(ne){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=g.Z,this.length=ne.length,this._features=ne}feature(ne){return new le(this._features[ne])}}var fe,We,se,De={exports:{}},ze=function(){if(se)return De.exports;se=1;var Fe=g.cK(),ne=function(){if(We)return fe;We=1;var tt=g.cI(),Ze=g.cJ().VectorTileFeature;function vt(Te,Oe){this.options=Oe||{},this.features=Te,this.length=Te.length}function ge(Te,Oe){this.id=typeof Te.id=="number"?Te.id:void 0,this.type=Te.type,this.rawGeometry=Te.type===1?[Te.geometry]:Te.geometry,this.properties=Te.tags,this.extent=Oe||4096}return fe=vt,vt.prototype.feature=function(Te){return new ge(this.features[Te],this.options.extent)},ge.prototype.loadGeometry=function(){var Te=this.rawGeometry;this.geometry=[];for(var Oe=0;Oe<Te.length;Oe++){for(var ht=Te[Oe],gt=[],Xe=0;Xe<ht.length;Xe++)gt.push(new tt(ht[Xe][0],ht[Xe][1]));this.geometry.push(gt)}return this.geometry},ge.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Te=this.geometry,Oe=1/0,ht=-1/0,gt=1/0,Xe=-1/0,Ot=0;Ot<Te.length;Ot++)for(var Mt=Te[Ot],Dt=0;Dt<Mt.length;Dt++){var Et=Mt[Dt];Oe=Math.min(Oe,Et.x),ht=Math.max(ht,Et.x),gt=Math.min(gt,Et.y),Xe=Math.max(Xe,Et.y)}return[Oe,gt,ht,Xe]},ge.prototype.toGeoJSON=Ze.prototype.toGeoJSON,fe}();function ie(tt){var Ze=new Fe;return function(vt,ge){for(var Te in vt.layers)ge.writeMessage(3,he,vt.layers[Te])}(tt,Ze),Ze.finish()}function he(tt,Ze){var vt;Ze.writeVarintField(15,tt.version||1),Ze.writeStringField(1,tt.name||""),Ze.writeVarintField(5,tt.extent||4096);var ge={keys:[],values:[],keycache:{},valuecache:{}};for(vt=0;vt<tt.length;vt++)ge.feature=tt.feature(vt),Ze.writeMessage(2,we,ge);var Te=ge.keys;for(vt=0;vt<Te.length;vt++)Ze.writeStringField(3,Te[vt]);var Oe=ge.values;for(vt=0;vt<Oe.length;vt++)Ze.writeMessage(4,Be,Oe[vt])}function we(tt,Ze){var vt=tt.feature;vt.id!==void 0&&Ze.writeVarintField(1,vt.id),Ze.writeMessage(2,Ve,tt),Ze.writeVarintField(3,vt.type),Ze.writeMessage(4,Le,vt)}function Ve(tt,Ze){var vt=tt.feature,ge=tt.keys,Te=tt.values,Oe=tt.keycache,ht=tt.valuecache;for(var gt in vt.properties){var Xe=vt.properties[gt],Ot=Oe[gt];if(Xe!==null){Ot===void 0&&(ge.push(gt),Oe[gt]=Ot=ge.length-1),Ze.writeVarint(Ot);var Mt=typeof Xe;Mt!=="string"&&Mt!=="boolean"&&Mt!=="number"&&(Xe=JSON.stringify(Xe));var Dt=Mt+":"+Xe,Et=ht[Dt];Et===void 0&&(Te.push(Xe),ht[Dt]=Et=Te.length-1),Ze.writeVarint(Et)}}}function ue(tt,Ze){return(Ze<<3)+(7&tt)}function $e(tt){return tt<<1^tt>>31}function Le(tt,Ze){for(var vt=tt.loadGeometry(),ge=tt.type,Te=0,Oe=0,ht=vt.length,gt=0;gt<ht;gt++){var Xe=vt[gt],Ot=1;ge===1&&(Ot=Xe.length),Ze.writeVarint(ue(1,Ot));for(var Mt=ge===3?Xe.length-1:Xe.length,Dt=0;Dt<Mt;Dt++){Dt===1&&ge!==1&&Ze.writeVarint(ue(2,Mt-1));var Et=Xe[Dt].x-Te,He=Xe[Dt].y-Oe;Ze.writeVarint($e(Et)),Ze.writeVarint($e(He)),Te+=Et,Oe+=He}ge===3&&Ze.writeVarint(ue(7,1))}}function Be(tt,Ze){var vt=typeof tt;vt==="string"?Ze.writeStringField(1,tt):vt==="boolean"?Ze.writeBooleanField(7,tt):vt==="number"&&(tt%1!=0?Ze.writeDoubleField(3,tt):tt<0?Ze.writeSVarintField(6,tt):Ze.writeVarintField(5,tt))}return De.exports=ie,De.exports.fromVectorTileJs=ie,De.exports.fromGeojsonVt=function(tt,Ze){Ze=Ze||{};var vt={};for(var ge in tt)vt[ge]=new ne(tt[ge].features,Ze),vt[ge].name=ge,vt[ge].version=Ze.version,vt[ge].extent=Ze.extent;return ie({layers:vt})},De.exports.GeoJSONWrapper=ne,De.exports}(),je=g.cH(ze);const ft={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:Fe=>Fe},ot=Math.fround||(st=new Float32Array(1),Fe=>(st[0]=+Fe,st[0]));var st;const rt=3,Re=5,Yt=6;class Tt{constructor(ne){this.options=Object.assign(Object.create(ft),ne),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(ne){const{log:ie,minZoom:he,maxZoom:we}=this.options;ie&&console.time("total time");const Ve=`prepare ${ne.length} points`;ie&&console.time(Ve),this.points=ne;const ue=[];for(let Le=0;Le<ne.length;Le++){const Be=ne[Le];if(!Be.geometry)continue;const[tt,Ze]=Be.geometry.coordinates,vt=ot(bt(tt)),ge=ot(xt(Ze));ue.push(vt,ge,1/0,Le,-1,1),this.options.reduce&&ue.push(0)}let $e=this.trees[we+1]=this._createTree(ue);ie&&console.timeEnd(Ve);for(let Le=we;Le>=he;Le--){const Be=+Date.now();$e=this.trees[Le]=this._createTree(this._cluster($e,Le)),ie&&console.log("z%d: %d clusters in %dms",Le,$e.numItems,+Date.now()-Be)}return ie&&console.timeEnd("total time"),this}getClusters(ne,ie){let he=((ne[0]+180)%360+360)%360-180;const we=Math.max(-90,Math.min(90,ne[1]));let Ve=ne[2]===180?180:((ne[2]+180)%360+360)%360-180;const ue=Math.max(-90,Math.min(90,ne[3]));if(ne[2]-ne[0]>=360)he=-180,Ve=180;else if(he>Ve){const Ze=this.getClusters([he,we,180,ue],ie),vt=this.getClusters([-180,we,Ve,ue],ie);return Ze.concat(vt)}const $e=this.trees[this._limitZoom(ie)],Le=$e.range(bt(he),xt(ue),bt(Ve),xt(we)),Be=$e.data,tt=[];for(const Ze of Le){const vt=this.stride*Ze;tt.push(Be[vt+Re]>1?_t(Be,vt,this.clusterProps):this.points[Be[vt+rt]])}return tt}getChildren(ne){const ie=this._getOriginId(ne),he=this._getOriginZoom(ne),we="No cluster with the specified id.",Ve=this.trees[he];if(!Ve)throw new Error(we);const ue=Ve.data;if(ie*this.stride>=ue.length)throw new Error(we);const $e=this.options.radius/(this.options.extent*Math.pow(2,he-1)),Le=Ve.within(ue[ie*this.stride],ue[ie*this.stride+1],$e),Be=[];for(const tt of Le){const Ze=tt*this.stride;ue[Ze+4]===ne&&Be.push(ue[Ze+Re]>1?_t(ue,Ze,this.clusterProps):this.points[ue[Ze+rt]])}if(Be.length===0)throw new Error(we);return Be}getLeaves(ne,ie,he){const we=[];return this._appendLeaves(we,ne,ie=ie||10,he=he||0,0),we}getTile(ne,ie,he){const we=this.trees[this._limitZoom(ne)],Ve=Math.pow(2,ne),{extent:ue,radius:$e}=this.options,Le=$e/ue,Be=(he-Le)/Ve,tt=(he+1+Le)/Ve,Ze={features:[]};return this._addTileFeatures(we.range((ie-Le)/Ve,Be,(ie+1+Le)/Ve,tt),we.data,ie,he,Ve,Ze),ie===0&&this._addTileFeatures(we.range(1-Le/Ve,Be,1,tt),we.data,Ve,he,Ve,Ze),ie===Ve-1&&this._addTileFeatures(we.range(0,Be,Le/Ve,tt),we.data,-1,he,Ve,Ze),Ze.features.length?Ze:null}getClusterExpansionZoom(ne){let ie=this._getOriginZoom(ne)-1;for(;ie<=this.options.maxZoom;){const he=this.getChildren(ne);if(ie++,he.length!==1)break;ne=he[0].properties.cluster_id}return ie}_appendLeaves(ne,ie,he,we,Ve){const ue=this.getChildren(ie);for(const $e of ue){const Le=$e.properties;if(Le&&Le.cluster?Ve+Le.point_count<=we?Ve+=Le.point_count:Ve=this._appendLeaves(ne,Le.cluster_id,he,we,Ve):Ve<we?Ve++:ne.push($e),ne.length===
vendor: 19,371 bytes, line 71
71he)break}return Ve}_createTree(ne){const ie=new g.aF(ne.length/this.stride|0,this.options.nodeSize,Float32Array);for(let he=0;he<ne.length;he+=this.stride)ie.add(ne[he],ne[he+1]);return ie.finish(),ie.data=ne,ie}_addTileFeatures(ne,ie,he,we,Ve,ue){for(const $e of ne){const Le=$e*this.stride,Be=ie[Le+Re]>1;let tt,Ze,vt;if(Be)tt=Qe(ie,Le,this.clusterProps),Ze=ie[Le],vt=ie[Le+1];else{const Oe=this.points[ie[Le+rt]];tt=Oe.properties;const[ht,gt]=Oe.geometry.coordinates;Ze=bt(ht),vt=xt(gt)}const ge={type:1,geometry:[[Math.round(this.options.extent*(Ze*Ve-he)),Math.round(this.options.extent*(vt*Ve-we))]],tags:tt};let Te;Te=Be||this.options.generateId?ie[Le+rt]:this.points[ie[Le+rt]].id,Te!==void 0&&(ge.id=Te),ue.features.push(ge)}}_limitZoom(ne){return Math.max(this.options.minZoom,Math.min(Math.floor(+ne),this.options.maxZoom+1))}_cluster(ne,ie){const{radius:he,extent:we,reduce:Ve,minPoints:ue}=this.options,$e=he/(we*Math.pow(2,ie)),Le=ne.data,Be=[],tt=this.stride;for(let Ze=0;Ze<Le.length;Ze+=tt){if(Le[Ze+2]<=ie)continue;Le[Ze+2]=ie;const vt=Le[Ze],ge=Le[Ze+1],Te=ne.within(Le[Ze],Le[Ze+1],$e),Oe=Le[Ze+Re];let ht=Oe;for(const gt of Te){const Xe=gt*tt;Le[Xe+2]>ie&&(ht+=Le[Xe+Re])}if(ht>Oe&&ht>=ue){let gt,Xe=vt*Oe,Ot=ge*Oe,Mt=-1;const Dt=((Ze/tt|0)<<5)+(ie+1)+this.points.length;for(const Et of Te){const He=Et*tt;if(Le[He+2]<=ie)continue;Le[He+2]=ie;const Wt=Le[He+Re];Xe+=Le[He]*Wt,Ot+=Le[He+1]*Wt,Le[He+4]=Dt,Ve&&(gt||(gt=this._map(Le,Ze,!0),Mt=this.clusterProps.length,this.clusterProps.push(gt)),Ve(gt,this._map(Le,He)))}Le[Ze+4]=Dt,Be.push(Xe/ht,Ot/ht,1/0,Dt,-1,ht),Ve&&Be.push(Mt)}else{for(let gt=0;gt<tt;gt++)Be.push(Le[Ze+gt]);if(ht>1)for(const gt of Te){const Xe=gt*tt;if(!(Le[Xe+2]<=ie)){Le[Xe+2]=ie;for(let Ot=0;Ot<tt;Ot++)Be.push(Le[Xe+Ot])}}}}return Be}_getOriginId(ne){return ne-this.points.length>>5}_getOriginZoom(ne){return(ne-this.points.length)%32}_map(ne,ie,he){if(ne[ie+Re]>1){const ue=this.clusterProps[ne[ie+Yt]];return he?Object.assign({},ue):ue}const we=this.points[ne[ie+rt]].properties,Ve=this.options.map(we);return he&&Ve===we?Object.assign({},Ve):Ve}}function _t(Fe,ne,ie){return{type:"Feature",id:Fe[ne+rt],properties:Qe(Fe,ne,ie),geometry:{type:"Point",coordinates:[(he=Fe[ne],360*(he-.5)),Ue(Fe[ne+1])]}};var he}function Qe(Fe,ne,ie){const he=Fe[ne+Re],we=he>=1e4?`${Math.round(he/1e3)}k`:he>=1e3?Math.round(he/100)/10+"k":he,Ve=Fe[ne+Yt],ue=Ve===-1?{}:Object.assign({},ie[Ve]);return Object.assign(ue,{cluster:!0,cluster_id:Fe[ne+rt],point_count:he,point_count_abbreviated:we})}function bt(Fe){return Fe/360+.5}function xt(Fe){const ne=Math.sin(Fe*Math.PI/180),ie=.5-.25*Math.log((1+ne)/(1-ne))/Math.PI;return ie<0?0:ie>1?1:ie}function Ue(Fe){const ne=(180-360*Fe)*Math.PI/180;return 360*Math.atan(Math.exp(ne))/Math.PI-90}function pt(Fe,ne,ie,he){let we=he;const Ve=ne+(ie-ne>>1);let ue,$e=ie-ne;const Le=Fe[ne],Be=Fe[ne+1],tt=Fe[ie],Ze=Fe[ie+1];for(let vt=ne+3;vt<ie;vt+=3){const ge=Ft(Fe[vt],Fe[vt+1],Le,Be,tt,Ze);if(ge>we)ue=vt,we=ge;else if(ge===we){const Te=Math.abs(vt-Ve);Te<$e&&(ue=vt,$e=Te)}}we>he&&(ue-ne>3&&pt(Fe,ne,ue,he),Fe[ue+2]=we,ie-ue>3&&pt(Fe,ue,ie,he))}function Ft(Fe,ne,ie,he,we,Ve){let ue=we-ie,$e=Ve-he;if(ue!==0||$e!==0){const Le=((Fe-ie)*ue+(ne-he)*$e)/(ue*ue+$e*$e);Le>1?(ie=we,he=Ve):Le>0&&(ie+=ue*Le,he+=$e*Le)}return ue=Fe-ie,$e=ne-he,ue*ue+$e*$e}function Ht(Fe,ne,ie,he){const we={id:Fe??null,type:ne,geometry:ie,tags:he,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(ne==="Point"||ne==="MultiPoint"||ne==="LineString")Gt(we,ie);else if(ne==="Polygon")Gt(we,ie[0]);else if(ne==="MultiLineString")for(const Ve of ie)Gt(we,Ve);else if(ne==="MultiPolygon")for(const Ve of ie)Gt(we,Ve[0]);return we}function Gt(Fe,ne){for(let ie=0;ie<ne.length;ie+=3)Fe.minX=Math.min(Fe.minX,ne[ie]),Fe.minY=Math.min(Fe.minY,ne[ie+1]),Fe.maxX=Math.max(Fe.maxX,ne[ie]),Fe.maxY=Math.max(Fe.maxY,ne[ie+1])}function rr(Fe,ne,ie,he){if(!ne.geometry)return;const we=ne.geometry.coordinates;if(we&&we.length===0)return;const Ve=ne.geometry.type,ue=Math.pow(ie.tolerance/((1<<ie.maxZoom)*ie.extent),2);let $e=[],Le=ne.id;if(ie.promoteId?Le=ne.properties[ie.promoteId]:ie.generateId&&(Le=he||0),Ve==="Point")or(we,$e);else if(Ve==="MultiPoint")for(const Be of we)or(Be,$e);else if(Ve==="LineString")fr(we,$e,ue,!1);else if(Ve==="MultiLineString"){if(ie.lineMetrics){for(const Be of we)$e=[],fr(Be,$e,ue,!1),Fe.push(Ht(Le,"LineString",$e,ne.properties));return}Sr(we,$e,ue,!1)}else if(Ve==="Polygon")Sr(we,$e,ue,!0);else{if(Ve!=="MultiPolygon"){if(Ve==="GeometryCollection"){for(const Be of ne.geometry.geometries)rr(Fe,{id:Le,geometry:Be,properties:ne.properties},ie,he);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const Be of we){const tt=[];Sr(Be,tt,ue,!0),$e.push(tt)}}Fe.push(Ht(Le,Ve,$e,ne.properties))}function or(Fe,ne){ne.push(Er(Fe[0]),Gr(Fe[1]),0)}function fr(Fe,ne,ie,he){let we,Ve,ue=0;for(let Le=0;Le<Fe.length;Le++){const Be=Er(Fe[Le][0]),tt=Gr(Fe[Le][1]);ne.push(Be,tt,0),Le>0&&(ue+=he?(we*tt-Be*Ve)/2:Math.sqrt(Math.pow(Be-we,2)+Math.pow(tt-Ve,2))),we=Be,Ve=tt}const $e=ne.length-3;ne[2]=1,pt(ne,0,$e,ie),ne[$e+2]=1,ne.size=Math.abs(ue),ne.start=0,ne.end=ne.size}function Sr(Fe,ne,ie,he){for(let we=0;we<Fe.length;we++){const Ve=[];fr(Fe[we],Ve,ie,he),ne.push(Ve)}}function Er(Fe){return Fe/360+.5}function Gr(Fe){const ne=Math.sin(Fe*Math.PI/180),ie=.5-.25*Math.log((1+ne)/(1-ne))/Math.PI;return ie<0?0:ie>1?1:ie}function Wn(Fe,ne,ie,he,we,Ve,ue,$e){if(he/=ne,Ve>=(ie/=ne)&&ue<he)return Fe;if(ue<ie||Ve>=he)return null;const Le=[];for(const Be of Fe){const tt=Be.geometry;let Ze=Be.type;const vt=we===0?Be.minX:Be.minY,ge=we===0?Be.maxX:Be.maxY;if(vt>=ie&&ge<he){Le.push(Be);continue}if(ge<ie||vt>=he)continue;let Te=[];if(Ze==="Point"||Ze==="MultiPoint")pn(tt,Te,ie,he,we);else if(Ze==="LineString")Yr(tt,Te,ie,he,we,!1,$e.lineMetrics);else if(Ze==="MultiLineString")ri(tt,Te,ie,he,we,!1);else if(Ze==="Polygon")ri(tt,Te,ie,he,we,!0);else if(Ze==="MultiPolygon")for(const Oe of tt){const ht=[];ri(Oe,ht,ie,he,we,!0),ht.length&&Te.push(ht)}if(Te.length){if($e.lineMetrics&&Ze==="LineString"){for(const Oe of Te)Le.push(Ht(Be.id,Ze,Oe,Be.tags));continue}Ze!=="LineString"&&Ze!=="MultiLineString"||(Te.length===1?(Ze="LineString",Te=Te[0]):Ze="MultiLineString"),Ze!=="Point"&&Ze!=="MultiPoint"||(Ze=Te.length===3?"Point":"MultiPoint"),Le.push(Ht(Be.id,Ze,Te,Be.tags))}}return Le.length?Le:null}function pn(Fe,ne,ie,he,we){for(let Ve=0;Ve<Fe.length;Ve+=3){const ue=Fe[Ve+we];ue>=ie&&ue<=he&&hr(ne,Fe[Ve],Fe[Ve+1],Fe[Ve+2])}}function Yr(Fe,ne,ie,he,we,Ve,ue){let $e=xr(Fe);const Le=we===0?_i:ui;let Be,tt,Ze=Fe.start;for(let ht=0;ht<Fe.length-3;ht+=3){const gt=Fe[ht],Xe=Fe[ht+1],Ot=Fe[ht+2],Mt=Fe[ht+3],Dt=Fe[ht+4],Et=we===0?gt:Xe,He=we===0?Mt:Dt;let Wt=!1;ue&&(Be=Math.sqrt(Math.pow(gt-Mt,2)+Math.pow(Xe-Dt,2))),Et<ie?He>ie&&(tt=Le($e,gt,Xe,Mt,Dt,ie),ue&&($e.start=Ze+Be*tt)):Et>he?He<he&&(tt=Le($e,gt,Xe,Mt,Dt,he),ue&&($e.start=Ze+Be*tt)):hr($e,gt,Xe,Ot),He<ie&&Et>=ie&&(tt=Le($e,gt,Xe,Mt,Dt,ie),Wt=!0),He>he&&Et<=he&&(tt=Le($e,gt,Xe,Mt,Dt,he),Wt=!0),!Ve&&Wt&&(ue&&($e.end=Ze+Be*tt),ne.push($e),$e=xr(Fe)),ue&&(Ze+=Be)}let vt=Fe.length-3;const ge=Fe[vt],Te=Fe[vt+1],Oe=we===0?ge:Te;Oe>=ie&&Oe<=he&&hr($e,ge,Te,Fe[vt+2]),vt=$e.length-3,Ve&&vt>=3&&($e[vt]!==$e[0]||$e[vt+1]!==$e[1])&&hr($e,$e[0],$e[1],$e[2]),$e.length&&ne.push($e)}function xr(Fe){const ne=[];return ne.size=Fe.size,ne.start=Fe.start,ne.end=Fe.end,ne}function ri(Fe,ne,ie,he,we,Ve){for(const ue of Fe)Yr(ue,ne,ie,he,we,Ve,!1)}function hr(Fe,ne,ie,he){Fe.push(ne,ie,he)}function _i(Fe,ne,ie,he,we,Ve){const ue=(Ve-ne)/(he-ne);return hr(Fe,Ve,ie+(we-ie)*ue,1),ue}function ui(Fe,ne,ie,he,we,Ve){const ue=(Ve-ie)/(we-ie);return hr(Fe,ne+(he-ne)*ue,Ve,1),ue}function Qr(Fe,ne){const ie=[];for(let he=0;he<Fe.length;he++){const we=Fe[he],Ve=we.type;let ue;if(Ve==="Point"||Ve==="MultiPoint"||Ve==="LineString")ue=an(we.geometry,ne);else if(Ve==="MultiLineString"||Ve==="Polygon"){ue=[];for(const $e of we.geometry)ue.push(an($e,ne))}else if(Ve==="MultiPolygon"){ue=[];for(const $e of we.geometry){const Le=[];for(const Be of $e)Le.push(an(Be,ne));ue.push(Le)}}ie.push(Ht(we.id,Ve,ue,we.tags))}return ie}function an(Fe,ne){const ie=[];ie.size=Fe.size,Fe.start!==void 0&&(ie.start=Fe.start,ie.end=Fe.end);for(let he=0;he<Fe.length;he+=3)ie.push(Fe[he]+ne,Fe[he+1],Fe[he+2]);return ie}function Jr(Fe,ne){if(Fe.transformed)return Fe;const ie=1<<Fe.z,he=Fe.x,we=Fe.y;for(const Ve of Fe.features){const ue=Ve.geometry,$e=Ve.type;if(Ve.geometry=[],$e===1)for(let Le=0;Le<ue.length;Le+=2)Ve.geometry.push(Fr(ue[Le],ue[Le+1],ne,ie,he,we));else for(let Le=0;Le<ue.length;Le++){const Be=[];for(let tt=0;tt<ue[Le].length;tt+=2)Be.push(Fr(ue[Le][tt],ue[Le][tt+1],ne,ie,he,we));Ve.geometry.push(Be)}}return Fe.transformed=!0,Fe}function Fr(Fe,ne,ie,he,we,Ve){return[Math.round(ie*(Fe*he-we)),Math.round(ie*(ne*he-Ve))]}function In(Fe,ne,ie,he,we){const Ve=ne===we.maxZoom?0:we.tolerance/((1<<ne)*we.extent),ue={features:[],numPoints:0,numSimplified:0,numFeatures:Fe.length,source:null,x:ie,y:he,z:ne,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const $e of Fe)ni(ue,$e,Ve,we);return ue}function ni(Fe,ne,ie,he){const we=ne.geometry,Ve=ne.type,ue=[];if(Fe.minX=Math.min(Fe.minX,ne.minX),Fe.minY=Math.min(Fe.minY,ne.minY),Fe.maxX=Math.max(Fe.maxX,ne.maxX),Fe.maxY=Math.max(Fe.maxY,ne.maxY),Ve==="Point"||Ve==="MultiPoint")for(let $e=0;$e<we.length;$e+=3)ue.push(we[$e],we[$e+1]),Fe.numPoints++,Fe.numSimplified++;else if(Ve==="LineString")Rn(ue,we,Fe,ie,!1,!1);else if(Ve==="MultiLineString"||Ve==="Polygon")for(let $e=0;$e<we.length;$e++)Rn(ue,we[$e],Fe,ie,Ve==="Polygon",$e===0);else if(Ve==="MultiPolygon")for(let $e=0;$e<we.length;$e++){const Le=we[$e];for(let Be=0;Be<Le.length;Be++)Rn(ue,Le[Be],Fe,ie,!0,Be===0)}if(ue.length){let $e=ne.tags||null;if(Ve==="LineString"&&he.lineMetrics){$e={};for(const Be in ne.tags)$e[Be]=ne.tags[Be];$e.mapbox_clip_start=we.start/we.size,$e.mapbox_clip_end=we.end/we.size}const Le={geometry:ue,type:Ve==="Polygon"||Ve==="MultiPolygon"?3:Ve==="LineString"||Ve==="MultiLineString"?2:1,tags:$e};ne.id!==null&&(Le.id=ne.id),Fe.features.push(Le)}}function Rn(Fe,ne,ie,he,we,Ve){const ue=he*he;if(he>0&&ne.size<(we?ue:he))return void(ie.numPoints+=ne.length/3);const $e=[];for(let Le=0;Le<ne.length;Le+=3)(he===0||ne[Le+2]>ue)&&(ie.numSimplified++,$e.push(ne[Le],ne[Le+1])),ie.numPoints++;we&&function(Le,Be){let tt=0;for(let Ze=0,vt=Le.length,ge=vt-2;Ze<vt;ge=Ze,Ze+=2)tt+=(Le[Ze]-Le[ge])*(Le[Ze+1]+Le[ge+1]);if(tt>0===Be)for(let Ze=0,vt=Le.length;Ze<vt/2;Ze+=2){const ge=Le[Ze],Te=Le[Ze+1];Le[Ze]=Le[vt-2-Ze],Le[Ze+1]=Le[vt-1-Ze],Le[vt-2-Ze]=ge,Le[vt-1-Ze]=Te}}($e,Ve),Fe.push($e)}const bn={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class mn{constructor(ne,ie){const he=(ie=this.options=function(Ve,ue){for(const $e in ue)Ve[$e]=ue[$e];return Ve}(Object.create(bn),ie)).debug;if(he&&console.time("preprocess data"),ie.maxZoom<0||ie.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(ie.promoteId&&ie.generateId)throw new Error("promoteId and generateId cannot be used together.");let we=function(Ve,ue){const $e=[];if(Ve.type==="FeatureCollection")for(let Le=0;Le<Ve.features.length;Le++)rr($e,Ve.features[Le],ue,Le);else rr($e,Ve.type==="Feature"?Ve:{geometry:Ve},ue);return $e}(ne,ie);this.tiles={},this.tileCoords=[],he&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ie.indexMaxZoom,ie.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),we=function(Ve,ue){const $e=ue.buffer/ue.extent;let Le=Ve;const Be=Wn(Ve,1,-1-$e,$e,0,-1,2,ue),tt=Wn(Ve,1,1-$e,2+$e,0,-1,2,ue);return(Be||tt)&&(Le=Wn(Ve,1,-$e,1+$e,0,-1,2,ue)||[],Be&&(Le=Qr(Be,1).concat(Le)),tt&&(Le=Le.concat(Qr(tt,-1)))),Le}(we,ie),we.length&&this.splitTile(we,0,0,0),he&&(we.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)))}splitTile(ne,ie,he,we,Ve,ue,$e){const Le=[ne,ie,he,we],Be=this.options,tt=Be.debug;for(;Le.length;){we=Le.pop(),he=Le.pop(),ie=Le.pop(),ne=Le.pop();const Ze=1<<ie,vt=xi(ie,he,we);let ge=this.tiles[vt];if(!ge&&(tt>1&&console.time("creation"),ge=this.tiles[vt]=In(ne,ie,he,we,Be),this.tileCoords.push({z:ie,x:he,y:we}),tt)){tt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ie,he,we,ge.numFeatures,ge.numPoints,ge.numSimplified),console.timeEnd("creation"));const Wt=`z${ie}`;this.stats[Wt]=(this.stats[Wt]||0)+1,this.total++}if(ge.source=ne,Ve==null){if(ie===Be.indexMaxZoom||ge.numPoints<=Be.indexMaxPoints)continue}else{if(ie===Be.maxZoom||ie===Ve)continue;if(Ve!=null){const Wt=Ve-ie;if(he!==ue>>Wt||we!==$e>>Wt)continue}}if(ge.source=null,ne.length===0)continue;tt>1&&console.time("clipping");const Te=.5*Be.buffer/Be.extent,Oe=.5-Te,ht=.5+Te,gt=1+Te;let Xe=null,Ot=null,Mt=null,Dt=null,Et=Wn(ne,Ze,he-Te,he+ht,0,ge.minX,ge.maxX,Be),He=Wn(ne,Ze,he+Oe,he+gt,0,ge.minX,ge.maxX,Be);ne=null,Et&&(Xe=Wn(Et,Ze,we-Te,we+ht,1,ge.minY,ge.maxY,Be),Ot=Wn(Et,Ze,we+Oe,we+gt,1,ge.minY,ge.maxY,Be),Et=null),He&&(Mt=Wn(He,Ze,we-Te,we+ht,1,ge.minY,ge.maxY,Be),Dt=Wn(He,Ze,we+Oe,we+gt,1,ge.minY,ge.maxY,Be),He=null),tt>1&&console.timeEnd("clipping"),Le.push(Xe||[],ie+1,2*he,2*we),Le.push(Ot||[],ie+1,2*he,2*we+1),Le.push(Mt||[],ie+1,2*he+1,2*we),Le.push(Dt||[],ie+1,2*he+1,2*we+1)}}getTile(ne,ie,he){ne=+ne,ie=+ie,he=+he;const we=this.options,{extent:Ve,debug:ue}=we;if(ne<0||ne>24)return null;const $e=1<<ne,Le=xi(ne,ie=ie+$e&$e-1,he);if(this.tiles[Le])return Jr(this.tiles[Le],Ve);ue>1&&console.log("drilling down to z%d-%d-%d",ne,ie,he);let Be,tt=ne,Ze=ie,vt=he;for(;!Be&&tt>0;)tt--,Ze>>=1,vt>>=1,Be=this.tiles[xi(tt,Ze,vt)];return Be&&Be.source?(ue>1&&(console.log("found parent tile z%d-%d-%d",tt,Ze,vt),console.time("drilling down")),this.splitTile(Be.source,tt,Ze,vt,ne,ie,he),ue>1&&console.timeEnd("drilling down"),this.tiles[Le]?Jr(this.tiles[Le],Ve):null):null}}function xi(Fe,ne,ie){return 32*((1<<Fe)*ie+ne)+Fe}function bi(Fe,ne){return ne?Fe.properties[ne]:Fe.id}function Ln(Fe,ne){if(Fe==null)return!0;if(Fe.type==="Feature")return bi(Fe,ne)!=null;if(Fe.type==="FeatureCollection"){const ie=new Set;for(const he of Fe.features){const we=bi(he,ne);if(we==null||ie.has(we))return!1;ie.add(we)}return!0}return!1}function ci(Fe,ne){const ie=new Map;if(Fe!=null)if(Fe.type==="Feature")ie.set(bi(Fe,ne),Fe);else for(const he of Fe.features)ie.set(bi(he,ne),he);return ie}class sn extends k{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(ne,ie){return g._(this,void 0,void 0,function*(){const he=ne.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const we=this._geoJSONIndex.getTile(he.z,he.x,he.y);if(!we)return null;const Ve=new _e(we.features);let ue=je(Ve);return ue.byteOffset===0&&ue.byteLength===ue.buffer.byteLength||(ue=new Uint8Array(ue)),{vectorTile:Ve,rawData:ue.buffer}})}loadData(ne){return g._(this,void 0,void 0,function*(){var ie;(ie=this._pendingRequest)===null||ie===void 0||ie.abort();const he=!!(ne&&ne.request&&ne.request.collectResourceTiming)&&new g.cE(ne.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(ne,this._pendingRequest),this._geoJSONIndex=ne.cluster?new Tt(function({superclusterOptions:ue,clusterProperties:$e}){if(!$e||!ue)return ue;const Le={},Be={},tt={accumulated:null,zoom:0},Ze={properties:null},vt=Object.keys($e);for(const ge of vt){const[Te,Oe]=$e[ge],ht=g.cL(Oe),gt=g.cL(typeof Te=="string"?[Te,["accumulated"],["get",ge]]:Te);Le[ge]=ht.value,Be[ge]=gt.value}return ue.map=ge=>{Ze.properties=ge;const Te={};for(const Oe of vt)Te[Oe]=Le[Oe].evaluate(tt,Ze);return Te},ue.reduce=(ge,Te)=>{Ze.properties=Te;for(const Oe of vt)tt.accumulated=ge[Oe],ge[Oe]=Be[Oe].evaluate(tt,Ze)},ue}(ne)).load((yield this._pendingData).features):(we=yield this._pendingData,new mn(we,ne.geojsonVtOptions)),this.loaded={};const Ve={};if(he){const ue=he.finish();ue&&(Ve.resourceTiming={},Ve.resourceTiming[ne.source]=JSON.parse(JSON.stringify(ue)))}return Ve}catch(Ve){if(delete this._pendingRequest,g.cp(Ve))return{abandoned:!0};throw Ve}var we})}getData(){return g._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(ne){const ie=this.loaded;return ie&&ie[ne.uid]?super.reloadTile(ne):this.loadTile(ne)}loadAndProcessGeoJSON(ne,ie){return g._(this,void 0,void 0,function*(){let he=yield this.loadGeoJSON(ne,ie);if(delete this._pendingRequest,typeof he!="object")throw new Error(`Input data given to '${ne.source}' is not a valid GeoJSON object.`);if(Q(he,!0),ne.filter){const we=g.cL(ne.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(we.result==="error")throw new Error(we.value.map(ue=>`${ue.key}: ${ue.message}`).join(", "));he={type:"FeatureCollection",features:he.features.filter(ue=>we.value.evaluate({zoom:0},ue))}}return he})}loadGeoJSON(ne,ie){return g._(this,void 0,void 0,function*(){const{promoteId:he}=ne;if(ne.request){const we=yield g.j(ne.request,ie);return this._dataUpdateable=Ln(we.data,he)?ci(we.data,he):void 0,we.data}if(typeof ne.data=="string")try{const we=JSON.parse(ne.data);return this._dataUpdateable=Ln(we,he)?ci(we,he):void 0,we}catch{throw new Error(`Input data given to '${ne.source}' is not a valid GeoJSON object.`)}if(!ne.dataDiff)throw new Error(`Input data given to '${ne.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${ne.source}`);return function(we,Ve,ue){var $e,Le,Be,tt;if(Ve.removeAll&&we.clear(),Ve.remove)for(const Ze of Ve.remove)we.delete(Ze);if(Ve.add)for(const Ze of Ve.add){const vt=bi(Ze,ue);vt!=null&&we.set(vt,Ze)}if(Ve.update)for(const Ze of Ve.update){let vt=we.get(Ze.id);if(vt==null)continue;const ge=!Ze.removeAllProperties&&((($e=Ze.removeProperties)===null||$e===void 0?void 0:$e.length)>0||((Le=Ze.addOrUpdateProperties)===null||Le===void 0?void 0:Le.length)>0);if((Ze.newGeometry||Ze.removeAllProperties||ge)&&(vt=Object.assign({},vt),we.set(Ze.id,vt),ge&&(vt.properties=Object.assign({},vt.properties))),Ze.newGeometry&&(vt.geometry=Ze.newGeometry),Ze.removeAllProperties)vt.properties={};else if(((Be=Ze.removeProperties)===null||Be===void 0?void 0:Be.length)>0)for(const Te of Ze.removeProperties)Object.prototype.hasOwnProperty.call(vt.properties,Te)&&delete vt.properties[Te];if(((tt=Ze.addOrUpdateProperties)===null||tt===void 0?void 0:tt.length)>0)for(const{key:Te,value:Oe}of Ze.addOrUpdateProperties)vt.properties[Te]=Oe}}(this._dataUpdateable,ne.dataDiff,he),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(ne){return g._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(ne){return this._geoJSONIndex.getClusterExpansionZoom(ne.clusterId)}getClusterChildren(ne){return this._geoJSONIndex.getChildren(ne.clusterId)}getClusterLeaves(ne){return this._geoJSONIndex.getLeaves(ne.clusterId,ne.limit,ne.offset)}}class Un{constructor(ne){this.self=ne,this.actor=new g.H(ne),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={}
71,this.self.registerWorkerSource=(ie,he)=>{if(this.externalWorkerSourceTypes[ie])throw new Error(`Worker source with name "${ie}" already registered.`);this.externalWorkerSourceTypes[ie]=he},this.self.addProtocol=g.cr,this.self.removeProtocol=g.cs,this.self.registerRTLTextPlugin=ie=>{g.cM.setMethods(ie)},this.actor.registerMessageHandler("LDT",(ie,he)=>this._getDEMWorkerSource(ie,he.source).loadTile(he)),this.actor.registerMessageHandler("RDT",(ie,he)=>g._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ie,he.source).removeTile(he)})),this.actor.registerMessageHandler("GCEZ",(ie,he)=>g._(this,void 0,void 0,function*(){return this._getWorkerSource(ie,he.type,he.source).getClusterExpansionZoom(he)})),this.actor.registerMessageHandler("GCC",(ie,he)=>g._(this,void 0,void 0,function*(){return this._getWorkerSource(ie,he.type,he.source).getClusterChildren(he)})),this.actor.registerMessageHandler("GCL",(ie,he)=>g._(this,void 0,void 0,function*(){return this._getWorkerSource(ie,he.type,he.source).getClusterLeaves(he)})),this.actor.registerMessageHandler("LD",(ie,he)=>this._getWorkerSource(ie,he.type,he.source).loadData(he)),this.actor.registerMessageHandler("GD",(ie,he)=>this._getWorkerSource(ie,he.type,he.source).getData()),this.actor.registerMessageHandler("LT",(ie,he)=>this._getWorkerSource(ie,he.type,he.source).loadTile(he)),this.actor.registerMessageHandler("RT",(ie,he)=>this._getWorkerSource(ie,he.type,he.source).reloadTile(he)),this.actor.registerMessageHandler("AT",(ie,he)=>this._getWorkerSource(ie,he.type,he.source).abortTile(he)),this.actor.registerMessageHandler("RMT",(ie,he)=>this._getWorkerSource(ie,he.type,he.source).removeTile(he)),this.actor.registerMessageHandler("RS",(ie,he)=>g._(this,void 0,void 0,function*(){if(!this.workerSources[ie]||!this.workerSources[ie][he.type]||!this.workerSources[ie][he.type][he.source])return;const we=this.workerSources[ie][he.type][he.source];delete this.workerSources[ie][he.type][he.source],we.removeSource!==void 0&&we.removeSource(he)})),this.actor.registerMessageHandler("RM",ie=>g._(this,void 0,void 0,function*(){delete this.layerIndexes[ie],delete this.availableImages[ie],delete this.workerSources[ie],delete this.demWorkerSources[ie]})),this.actor.registerMessageHandler("SR",(ie,he)=>g._(this,void 0,void 0,function*(){this.referrer=he})),this.actor.registerMessageHandler("SRPS",(ie,he)=>this._syncRTLPluginState(ie,he)),this.actor.registerMessageHandler("IS",(ie,he)=>g._(this,void 0,void 0,function*(){this.self.importScripts(he)})),this.actor.registerMessageHandler("SI",(ie,he)=>this._setImages(ie,he)),this.actor.registerMessageHandler("UL",(ie,he)=>g._(this,void 0,void 0,function*(){this._getLayerIndex(ie).update(he.layers,he.removedIds)})),this.actor.registerMessageHandler("SL",(ie,he)=>g._(this,void 0,void 0,function*(){this._getLayerIndex(ie).replace(he)}))}_setImages(ne,ie){return g._(this,void 0,void 0,function*(){this.availableImages[ne]=ie;for(const he in this.workerSources[ne]){const we=this.workerSources[ne][he];for(const Ve in we)we[Ve].availableImages=ie}})}_syncRTLPluginState(ne,ie){return g._(this,void 0,void 0,function*(){return yield g.cM.syncState(ie,this.self.importScripts)})}_getAvailableImages(ne){let ie=this.availableImages[ne];return ie||(ie=[]),ie}_getLayerIndex(ne){let ie=this.layerIndexes[ne];return ie||(ie=this.layerIndexes[ne]=new s),ie}_getWorkerSource(ne,ie,he){if(this.workerSources[ne]||(this.workerSources[ne]={}),this.workerSources[ne][ie]||(this.workerSources[ne][ie]={}),!this.workerSources[ne][ie][he]){const we={sendAsync:(Ve,ue)=>(Ve.targetMapId=ne,this.actor.sendAsync(Ve,ue))};switch(ie){case"vector":this.workerSources[ne][ie][he]=new k(we,this._getLayerIndex(ne),this._getAvailableImages(ne));break;case"geojson":this.workerSources[ne][ie][he]=new sn(we,this._getLayerIndex(ne),this._getAvailableImages(ne));break;default:this.workerSources[ne][ie][he]=new this.externalWorkerSourceTypes[ie](we,this._getLayerIndex(ne),this._getAvailableImages(ne))}}return this.workerSources[ne][ie][he]}_getDEMWorkerSource(ne,ie){return this.demWorkerSources[ne]||(this.demWorkerSources[ne]={}),this.demWorkerSources[ne][ie]||(this.demWorkerSources[ne][ie]=new D),this.demWorkerSources[ne][ie]}}return g.i(self)&&(self.worker=new Un(self)),Un}),h("index",["exports","./shared"],function(g,s){var Y="5.5.0";function E(){var _=new s.A(4);return s.A!=Float32Array&&(_[1]=0,_[2]=0),_[0]=1,_[3]=1,_}let I,k;const D={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(_,e,o){const f=requestAnimationFrame(x=>{y(),e(x)}),{unsubscribe:y}=s.s(_.signal,"abort",()=>
vendor: 8,910 bytes, line 71
71{y(),cancelAnimationFrame(f),o(s.c())},!1)},frameAsync(_){return new Promise((e,o)=>{this.frame(_,e,o)})},getImageData(_,e=0){return this.getImageCanvasContext(_).getImageData(-e,-e,_.width+2*e,_.height+2*e)},getImageCanvasContext(_){const e=window.document.createElement("canvas"),o=e.getContext("2d",{willReadFrequently:!0});if(!o)throw new Error("failed to create canvas 2d context");return e.width=_.width,e.height=_.height,o.drawImage(_,0,0,_.width,_.height),o},resolveURL:_=>(I||(I=document.createElement("a")),I.href=_,I.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(k==null&&(k=matchMedia("(prefers-reduced-motion: reduce)")),k.matches)}};class V{static testProp(e){if(!V.docStyle)return e[0];for(let o=0;o<e.length;o++)if(e[o]in V.docStyle)return e[o];return e[0]}static create(e,o,f){const y=window.document.createElement(e);return o!==void 0&&(y.className=o),f&&f.appendChild(y),y}static createNS(e,o){return window.document.createElementNS(e,o)}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(e,o){e.style[V.transformProp]=o}static addEventListener(e,o,f,y={}){e.addEventListener(o,f,"passive"in y?y:y.capture)}static removeEventListener(e,o,f,y={}){e.removeEventListener(o,f,"passive"in y?y:y.capture)}static suppressClickInternal(e){e.preventDefault(),e.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 getScale(e){const o=e.getBoundingClientRect();return{x:o.width/e.offsetWidth||1,y:o.height/e.offsetHeight||1,boundingClientRect:o}}static getPoint(e,o,f){const y=o.boundingClientRect;return new s.P((f.clientX-y.left)/o.x-e.clientLeft,(f.clientY-y.top)/o.y-e.clientTop)}static mousePos(e,o){const f=V.getScale(e);return V.getPoint(e,f,o)}static touchPos(e,o){const f=[],y=V.getScale(e);for(let x=0;x<o.length;x++)f.push(V.getPoint(e,y,o[x]));return f}static mouseButton(e){return e.button}static remove(e){e.parentNode&&e.parentNode.removeChild(e)}static sanitize(e){const o=new DOMParser().parseFromString(e,"text/html").body||document.createElement("body"),f=o.querySelectorAll("script");for(const y of f)y.remove();return V.clean(o),o.innerHTML}static isPossiblyDangerous(e,o){const f=o.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!f.includes("javascript:")&&!f.includes("data:"))||!!e.startsWith("on")||void 0}static clean(e){const o=e.children;for(const f of o)V.removeAttributes(f),V.clean(f)}static removeAttributes(e){for(const{name:o,value:f}of e.attributes)V.isPossiblyDangerous(o,f)&&e.removeAttribute(o)}}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"]);const F={supported:!1,testSupport:function(_){!ae&&Q&&(le?_e(_):$=_)}};let $,Q,ae=!1,le=!1;function _e(_){const e=_.createTexture();_.bindTexture(_.TEXTURE_2D,e);try{if(_.texImage2D(_.TEXTURE_2D,0,_.RGBA,_.RGBA,_.UNSIGNED_BYTE,Q),_.isContextLost())return;F.supported=!0}catch{}_.deleteTexture(e),ae=!0}var fe;typeof document<"u"&&(Q=document.createElement("img"),Q.onload=()=>{$&&_e($),$=null,le=!0},Q.onerror=()=>{ae=!0,$=null},Q.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(_){let e,o,f,y;_.resetRequestQueue=()=>{e=[],o=0,f=0,y={}},_.addThrottleControl=C=>{const L=f++;return y[L]=C,L},_.removeThrottleControl=C=>{delete y[C],T()},_.getImage=(C,L,N=!0)=>new Promise((B,j)=>{F.supported&&(C.headers||(C.headers={}),C.headers.accept="image/webp,*/*"),s.e(C,{type:"image"}),e.push({abortController:L,requestParameters:C,supportImageRefresh:N,state:"queued",onError:K=>{j(K)},onSuccess:K=>{B(K)}}),T()});const x=C=>s._(this,void 0,void 0,function*(){C.state="running";const{requestParameters:L,supportImageRefresh:N,onError:B,onSuccess:j,abortController:K}=C,ee=N===!1&&!s.i(self)&&!s.g(L.url)&&(!L.headers||Object.keys(L.headers).reduce((ye,be)=>ye&&be==="accept",!0));o++;const me=ee?P(L,K):s.m(L,K);try{const ye=yield me;delete C.abortController,C.state="completed",ye.data instanceof HTMLImageElement||s.b(ye.data)?j(ye):ye.data&&j({data:yield(pe=ye.data,typeof createImageBitmap=="function"?s.f(pe):s.h(pe)),cacheControl:ye.cacheControl,expires:ye.expires})}catch(ye){delete C.abortController,B(ye)}finally{o--,T()}var pe}),T=()=>{const C=(()=>{for(const L of Object.keys(y))if(y[L]())return!0;return!1})()?s.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:s.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let L=o;L<C&&e.length>0;L++){const N=e.shift();N.abortController.signal.aborted?L--:x(N)}},P=(C,L)=>new Promise((N,B)=>{const j=new Image,K=C.url,ee=C.credentials;ee&&ee==="include"?j.crossOrigin="use-credentials":(ee&&ee==="same-origin"||!s.d(K))&&(j.crossOrigin="anonymous"),L.signal.addEventListener("abort",()=>{j.src="",B(s.c())}),j.fetchPriority="high",j.onload=()=>{j.onerror=j.onload=null,N({data:j})},j.onerror=()=>{j.onerror=j.onload=null,L.signal.aborted||B(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."))},j.src=K})}(fe||(fe={})),fe.resetRequestQueue();class We{constructor(e){this._transformRequestFn=e}transformRequest(e,o){return this._transformRequestFn&&this._transformRequestFn(e,o)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function se(_){const e=[];if(typeof _=="string")e.push({id:"default",url:_});else if(_&&_.length>0){const o=[];for(const{id:f,url:y}of _){const x=`${f}${y}`;o.indexOf(x)===-1&&(o.push(x),e.push({id:f,url:y}))}}return e}function De(_,e,o){try{const f=new URL(_);return f.pathname+=`${e}${o}`,f.toString()}catch{throw new Error(`Invalid sprite URL "${_}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class ze{constructor(e,o,f,y){this.context=e,this.format=f,this.texture=e.gl.createTexture(),this.update(o,y)}update(e,o,f){const{width:y,height:x}=e,T=!(this.size&&this.size[0]===y&&this.size[1]===x||f),{context:P}=this,{gl:C}=P;if(this.useMipmap=!!(o&&o.useMipmap),C.bindTexture(C.TEXTURE_2D,this.texture),P.pixelStoreUnpackFlipY.set(!1),P.pixelStoreUnpack.set(1),P.pixelStoreUnpackPremultiplyAlpha.set(this.format===C.RGBA&&(!o||o.premultiply!==!1)),T)this.size=[y,x],e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||s.b(e)?C.texImage2D(C.TEXTURE_2D,0,this.format,this.format,C.UNSIGNED_BYTE,e):C.texImage2D(C.TEXTURE_2D,0,this.format,y,x,0,this.format,C.UNSIGNED_BYTE,e.data);else{const{x:L,y:N}=f||{x:0,y:0};e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||s.b(e)?C.texSubImage2D(C.TEXTURE_2D,0,L,N,C.RGBA,C.UNSIGNED_BYTE,e):C.texSubImage2D(C.TEXTURE_2D,0,L,N,y,x,C.RGBA,C.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&C.generateMipmap(C.TEXTURE_2D),P.pixelStoreUnpackFlipY.setDefault(),P.pixelStoreUnpack.setDefault(),P.pixelStoreUnpackPremultiplyAlpha.setDefault()}bind(e,o,f){const{context:y}=this,{gl:x}=y;x.bindTexture(x.TEXTURE_2D,this.texture),f!==x.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(f=x.LINEAR),e!==this.filter&&(x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,e),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,f||e),this.filter=e),o!==this.wrap&&(x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_S,o),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_T,o),this.wrap=o)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}function je(_){const{userImage:e}=_;return!!(e&&e.render&&e.render())&&(_.data.replace(new Uint8Array(e.data.buffer)),!0)}class ft extends s.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:o,promiseResolve:f}of this.requestors)f(this._getImagesForIds(o));this.requestors=[]}}getImage(e){const o=this.images[e];if(o&&!o.data&&o.spriteData){const f=o.spriteData;o.data=new s.R({width:f.width,height:f.height},f.context.getImageData(f.x,f.y,f.width,f.height).data),o.spriteData=null}return o}addImage(e,o){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);
vendor: 9,517 bytes, line 71
71this._validate(e,o)&&(this.images[e]=o)}_validate(e,o){let f=!0;const y=o.data||o.spriteData;return this._validateStretch(o.stretchX,y&&y.width)||(this.fire(new s.k(new Error(`Image "${e}" has invalid "stretchX" value`))),f=!1),this._validateStretch(o.stretchY,y&&y.height)||(this.fire(new s.k(new Error(`Image "${e}" has invalid "stretchY" value`))),f=!1),this._validateContent(o.content,o)||(this.fire(new s.k(new Error(`Image "${e}" has invalid "content" value`))),f=!1),f}_validateStretch(e,o){if(!e)return!0;let f=0;for(const y of e){if(y[0]<f||y[1]<y[0]||o<y[1])return!1;f=y[1]}return!0}_validateContent(e,o){if(!e)return!0;if(e.length!==4)return!1;const f=o.spriteData,y=f&&f.width||o.data.width,x=f&&f.height||o.data.height;return!(e[0]<0||y<e[0]||e[1]<0||x<e[1]||e[2]<0||y<e[2]||e[3]<0||x<e[3]||e[2]<e[0]||e[3]<e[1])}updateImage(e,o,f=!0){const y=this.getImage(e);if(f&&(y.data.width!==o.data.width||y.data.height!==o.data.height))throw new Error(`size mismatch between old image (${y.data.width}x${y.data.height}) and new image (${o.data.width}x${o.data.height}).`);o.version=y.version+1,this.images[e]=o,this.updatedImages[e]=!0}removeImage(e){const o=this.images[e];delete this.images[e],delete this.patterns[e],o.userImage&&o.userImage.onRemove&&o.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise((o,f)=>{let y=!0;if(!this.isLoaded())for(const x of e)this.images[x]||(y=!1);this.isLoaded()||y?o(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:o})})}_getImagesForIds(e){const o={};for(const f of e){let y=this.getImage(f);y||(this.fire(new s.l("styleimagemissing",{id:f})),y=this.getImage(f)),y?o[f]={data:y.data.clone(),pixelRatio:y.pixelRatio,sdf:y.sdf,version:y.version,stretchX:y.stretchX,stretchY:y.stretchY,content:y.content,textFitWidth:y.textFitWidth,textFitHeight:y.textFitHeight,hasRenderCallback:!!(y.userImage&&y.userImage.render)}:s.w(`Image "${f}" 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.`)}return o}getPixelSize(){const{width:e,height:o}=this.atlasImage;return{width:e,height:o}}getPattern(e){const o=this.patterns[e],f=this.getImage(e);if(!f)return null;if(o&&o.position.version===f.version)return o.position;if(o)o.position.version=f.version;else{const y={w:f.data.width+2,h:f.data.height+2,x:0,y:0},x=new s.I(y,f);this.patterns[e]={bin:y,position:x}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){const o=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new ze(e,this.atlasImage,o.RGBA),this.atlasTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE)}_updatePatternAtlas(){const e=[];for(const x in this.patterns)e.push(this.patterns[x].bin);const{w:o,h:f}=s.p(e),y=this.atlasImage;y.resize({width:o||1,height:f||1});for(const x in this.patterns){const{bin:T}=this.patterns[x],P=T.x+1,C=T.y+1,L=this.getImage(x).data,N=L.width,B=L.height;s.R.copy(L,y,{x:0,y:0},{x:P,y:C},{width:N,height:B}),s.R.copy(L,y,{x:0,y:B-1},{x:P,y:C-1},{width:N,height:1}),s.R.copy(L,y,{x:0,y:0},{x:P,y:C+B},{width:N,height:1}),s.R.copy(L,y,{x:N-1,y:0},{x:P-1,y:C},{width:1,height:B}),s.R.copy(L,y,{x:0,y:0},{x:P+N,y:C},{width:1,height:B})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(const o of e){if(this.callbackDispatchedThisFrame[o])continue;this.callbackDispatchedThisFrame[o]=!0;const f=this.getImage(o);f||s.w(`Image with ID: "${o}" was not found`),je(f)&&this.updateImage(o,f)}}}const ot=1e20;function st(_,e,o,f,y,x,T,P,C){for(let L=e;L<e+f;L++)rt(_,o*x+L,x,y,T,P,C);for(let L=o;L<o+y;L++)rt(_,L*x+e,1,f,T,P,C)}function rt(_,e,o,f,y,x,T){x[0]=0,T[0]=-1e20,T[1]=ot,y[0]=_[e];for(let P=1,C=0,L=0;P<f;P++){y[P]=_[e+P*o];const N=P*P;do{const B=x[C];L=(y[P]-y[B]+N-B*B)/(P-B)/2}while(L<=T[C]&&--C>-1);C++,x[C]=P,T[C]=L,T[C+1]=ot}for(let P=0,C=0;P<f;P++){for(;T[C+1]<P;)C++;const L=x[C],N=P-L;_[e+P*o]=y[L]+N*N}}class Re{constructor(e,o){this.requestManager=e,this.localIdeographFontFamily=o,this.entries={}}setURL(e){this.url=e}getGlyphs(e){return s._(this,void 0,void 0,function*(){const o=[];for(const x in e)for(const T of e[x])o.push(this._getAndCacheGlyphsPromise(x,T));const f=yield Promise.all(o),y={};for(const{stack:x,id:T,glyph:P}of f)y[x]||(y[x]={}),y[x][T]=P&&{id:P.id,bitmap:P.bitmap.clone(),metrics:P.metrics};return y})}_getAndCacheGlyphsPromise(e,o){return s._(this,void 0,void 0,function*(){let f=this.entries[e];f||(f=this.entries[e]={glyphs:{},requests:{},ranges:{}});let y=f.glyphs[o];if(y!==void 0)return{stack:e,id:o,glyph:y};if(y=this._tinySDF(f,e,o),y)return f.glyphs[o]=y,{stack:e,id:o,glyph:y};const x=Math.floor(o/256);if(256*x>65535)throw new Error("glyphs > 65535 not supported");if(f.ranges[x])return{stack:e,id:o,glyph:y};if(!this.url)throw new Error("glyphsUrl is not set");if(!f.requests[x]){const P=Re.loadGlyphRange(e,x,this.url,this.requestManager);f.requests[x]=P}const T=yield f.requests[x];for(const P in T)this._doesCharSupportLocalGlyph(+P)||(f.glyphs[+P]=T[+P]);return f.ranges[x]=!0,{stack:e,id:o,glyph:T[o]||null}})}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&(new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(e))||s.u["CJK Unified Ideographs"](e)||s.u["Hangul Syllables"](e)||s.u.Hiragana(e)||s.u.Katakana(e)||s.u["CJK Symbols and Punctuation"](e)||s.u["Halfwidth and Fullwidth Forms"](e))}_tinySDF(e,o,f){const y=this.localIdeographFontFamily;if(!y||!this._doesCharSupportLocalGlyph(f))return;let x=e.tinySDF;if(!x){let P="400";/bold/i.test(o)?P="900":/medium/i.test(o)?P="500":/light/i.test(o)&&(P="200"),x=e.tinySDF=new Re.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:y,fontWeight:P})}const T=x.draw(String.fromCharCode(f));return{id:f,bitmap:new s.q({width:T.width||60,height:T.height||60},T.data),metrics:{width:T.glyphWidth/2||24,height:T.glyphHeight/2||24,left:T.glyphLeft/2+.5||0,top:T.glyphTop/2-27.5||-8,advance:T.glyphAdvance/2||24,isDoubleResolution:!0}}}}Re.loadGlyphRange=function(_,e,o,f){return s._(this,void 0,void 0,function*(){const y=256*e,x=y+255,T=f.transformRequest(o.replace("{fontstack}",_).replace("{range}",`${y}-${x}`),"Glyphs"),P=yield s.n(T,new AbortController);if(!P||!P.data)throw new Error(`Could not load glyph range. range: ${e}, ${y}-${x}`);const C={};for(const L of s.o(P.data))C[L.id]=L;return C})},Re.TinySDF=class{constructor({fontSize:_=24,buffer:e=3,radius:o=8,cutoff:f=.25,fontFamily:y="sans-serif",fontWeight:x="normal",fontStyle:T="normal"}={}){this.buffer=e,this.cutoff=f,this.radius=o;const P=this.size=_+4*e,C=this._createCanvas(P),L=this.ctx=C.getContext("2d",{willReadFrequently:!0});L.font=`${T} ${x} ${_}px ${y}`,L.textBaseline="alphabetic",L.textAlign="left",L.fillStyle="black",this.gridOuter=new Float64Array(P*P),this.gridInner=new Float64Array(P*P),this.f=new Float64Array(P),this.z=new Float64Array(P+1),this.v=new Uint16Array(P)}_createCanvas(_){const e=document.createElement("canvas");return e.width=e.height=_,e}draw(_){const{width:e,actualBoundingBoxAscent:o,actualBoundingBoxDescent:f,actualBoundingBoxLeft:y,actualBoundingBoxRight:x}=this.ctx.measureText(_),T=Math.ceil(o),P=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(x-y))),C=Math.min(this.size-this.buffer,T+Math.ceil(f)),L=P+2*this.buffer,N=C+2*this.buffer,B=Math.max(L*N,0),j=new Uint8ClampedArray(B),K={data:j,width:L,height:N,glyphWidth:P,glyphHeight:C,glyphTop:T,glyphLeft:0,glyphAdvance:e};if(P===0||C===0)return K;const{ctx:ee,buffer:me,gridInner:pe,gridOuter:ye}=this;ee.clearRect(me,me,P,C),ee.fillText(_,me,me+T);const be=ee.getImageData(me,me,P,C);ye.fill(ot,0,B),pe.fill(0,0,B);for(let Ee=0;Ee<C;Ee++)for(let xe=0;xe<P;xe++){const Pe=be.data[4*(Ee*P+xe)+3]/255;if(Pe===0)continue;const Ie=(Ee+me)*L+xe+me;if(Pe===1)ye[Ie]=0,pe[Ie]=ot;else{const Ce=.5-Pe;ye[Ie]=Ce>0?Ce*Ce:0,pe[Ie]=Ce<0?Ce*Ce:0}}st(ye,0,0,L,N,L,this.f,this.v,this.z),st(pe,me,me,P,C,L,this.f,this.v,this.z);for(let Ee=0;Ee<B;Ee++){const xe=Math.sqrt(ye[Ee])-Math.sqrt(pe[Ee]);j[Ee]=Math.round(255-255*(xe/this.radius+this.cutoff))}return K}};class Yt{constructor(){this.specification=s.v.light.position}possiblyEvaluate(e,o){return s.z(e.expression.evaluate(o))}interpolate(e,o,f){return{x:s.B.number(e.x,o.x,f),y:s.B.number(e.y,o.y,f),z:s.B.number(e.z,o.z,f)}}}let Tt;class _t extends s.E{constructor(e){super(),Tt=Tt||new s.r({anchor:new s.D(s.v.light.anchor),position:new Yt,color:new s.D(s.v.light.color),intensity:new s.D(s.v.light.intensity)}),this._transitionable=new s.T(Tt),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(e,o={}){if(!this._validate(s.t,e,o))for(const f in e){const y=e[f];f.endsWith("-transition")?this._transitionable.setTransition(f.slice(0,-11),y):this._transitionable.setValue(f,y)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,o,f){return(!f||f.validate!==!1)&&s.x(this,e.call(s.y,{value:o,style:{glyphs:!0,sprite:!0},styleSpec:s.v}))}}const Qe=new s.r({"sky-color":new s.D(s.v.sky["sky-color"]),"horizon-color":new s.D(s.v.sky["horizon-color"]),"fog-color":new s.D(s.v.sky["fog-color"]),"fog-ground-blend":ne
vendor: 11,312 bytes, line 71
71w s.D(s.v.sky["fog-ground-blend"]),"horizon-fog-blend":new s.D(s.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new s.D(s.v.sky["sky-horizon-blend"]),"atmosphere-blend":new s.D(s.v.sky["atmosphere-blend"])});class bt extends s.E{constructor(e){super(),this._transitionable=new s.T(Qe),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new s.C(0))}setSky(e,o={}){if(!this._validate(s.F,e,o)){e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const f in e){const y=e[f];f.endsWith("-transition")?this._transitionable.setTransition(f.slice(0,-11),y):this._transitionable.setValue(f,y)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,o,f={}){return(f==null?void 0:f.validate)!==!1&&s.x(this,e.call(s.y,s.e({value:o,style:{glyphs:!0,sprite:!0},styleSpec:s.v})))}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}}class xt{constructor(e,o){this.width=e,this.height=o,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,o){const f=e.join(",")+String(o);return this.dashEntry[f]||(this.dashEntry[f]=this.addDash(e,o)),this.dashEntry[f]}getDashRanges(e,o,f){const y=[];let x=e.length%2==1?-e[e.length-1]*f:0,T=e[0]*f,P=!0;y.push({left:x,right:T,isDash:P,zeroLength:e[0]===0});let C=e[0];for(let L=1;L<e.length;L++){P=!P;const N=e[L];x=C*f,C+=N,T=C*f,y.push({left:x,right:T,isDash:P,zeroLength:N===0})}return y}addRoundDash(e,o,f){const y=o/2;for(let x=-f;x<=f;x++){const T=this.width*(this.nextRow+f+x);let P=0,C=e[P];for(let L=0;L<this.width;L++){L/C.right>1&&(C=e[++P]);const N=Math.abs(L-C.left),B=Math.abs(L-C.right),j=Math.min(N,B);let K;const ee=x/f*(y+1);if(C.isDash){const me=y-Math.abs(ee);K=Math.sqrt(j*j+me*me)}else K=y-Math.sqrt(j*j+ee*ee);this.data[T+L]=Math.max(0,Math.min(255,K+128))}}}addRegularDash(e){for(let P=e.length-1;P>=0;--P){const C=e[P],L=e[P+1];C.zeroLength?e.splice(P,1):L&&L.isDash===C.isDash&&(L.left=C.left,e.splice(P,1))}const o=e[0],f=e[e.length-1];o.isDash===f.isDash&&(o.left=f.left-this.width,f.right=o.right+this.width);const y=this.width*this.nextRow;let x=0,T=e[x];for(let P=0;P<this.width;P++){P/T.right>1&&(T=e[++x]);const C=Math.abs(P-T.left),L=Math.abs(P-T.right),N=Math.min(C,L);this.data[y+P]=Math.max(0,Math.min(255,(T.isDash?N:-N)+128))}}addDash(e,o){const f=o?7:0,y=2*f+1;if(this.nextRow+y>this.height)return s.w("LineAtlas out of space"),null;let x=0;for(let P=0;P<e.length;P++)x+=e[P];if(x!==0){const P=this.width/x,C=this.getDashRanges(e,this.width,P);o?this.addRoundDash(C,P,f):this.addRegularDash(C)}const T={y:(this.nextRow+f+.5)/this.height,height:2*f/this.height,width:x};return this.nextRow+=y,this.dirty=!0,T}bind(e){const o=e.gl;this.texture?(o.bindTexture(o.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,o.texSubImage2D(o.TEXTURE_2D,0,0,0,this.width,this.height,o.ALPHA,o.UNSIGNED_BYTE,this.data))):(this.texture=o.createTexture(),o.bindTexture(o.TEXTURE_2D,this.texture),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.REPEAT),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.REPEAT),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texImage2D(o.TEXTURE_2D,0,o.ALPHA,this.width,this.height,0,o.ALPHA,o.UNSIGNED_BYTE,this.data))}}const Ue="maplibre_preloaded_worker_pool";class pt{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.length<pt.workerCount;)this.workers.push(new Worker(s.a.WORKER_URL));return this.active[e]=!0,this.workers.slice()}release(e){delete this.active[e],this.numActive()===0&&(this.workers.forEach(o=>{o.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Ue]}numActive(){return Object.keys(this.active).length}}const Ft=Math.floor(D.hardwareConcurrency/2);let Ht,Gt;function rr(){return Ht||(Ht=new pt),Ht}pt.workerCount=s.G(globalThis)?Math.max(Math.min(Ft,3),1):1;class or{constructor(e,o){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=o;const f=this.workerPool.acquire(o);for(let y=0;y<f.length;y++){const x=new s.H(f[y],o);x.name=`Worker ${y}`,this.actors.push(x)}if(!this.actors.length)throw new Error("No actors found")}broadcast(e,o){const f=[];for(const y of this.actors)f.push(y.sendAsync({type:e,data:o}));return Promise.all(f)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.actors.forEach(o=>{o.remove()}),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,o){for(const f of this.actors)f.registerMessageHandler(e,o)}}function fr(){return Gt||(Gt=new or(rr(),s.J),Gt.registerMessageHandler("GR",(_,e,o)=>s.m(e,o))),Gt}function Sr(_,e){const o=s.K();return s.L(o,o,[1,1,0]),s.M(o,o,[.5*_.width,.5*_.height,1]),_.calculatePosMatrix?s.N(o,o,_.calculatePosMatrix(e.toUnwrapped())):o}function Er(_,e,o,f,y,x,T){var P;const C=function(j,K,ee){if(j)for(const me of j){const pe=K[me];if(pe&&pe.source===ee&&pe.type==="fill-extrusion")return!0}else for(const me in K){const pe=K[me];if(pe.source===ee&&pe.type==="fill-extrusion")return!0}return!1}((P=y==null?void 0:y.layers)!==null&&P!==void 0?P:null,e,_.id),L=x.maxPitchScaleFactor(),N=_.tilesIn(f,L,C);N.sort(Gr);const B=[];for(const j of N)B.push({wrappedTileID:j.tileID.wrapped().key,queryResults:j.tile.queryRenderedFeatures(e,o,_._state,j.queryGeometry,j.cameraQueryGeometry,j.scale,y,x,L,Sr(_.transform,j.tileID),T?(K,ee)=>T(j.tileID,K,ee):void 0)});return function(j,K){for(const ee in j)for(const me of j[ee])Wn(me,K);return j}(function(j){const K={},ee={};for(const me of j){const pe=me.queryResults,ye=me.wrappedTileID,be=ee[ye]=ee[ye]||{};for(const Ee in pe){const xe=pe[Ee],Pe=be[Ee]=be[Ee]||{},Ie=K[Ee]=K[Ee]||[];for(const Ce of xe)Pe[Ce.featureIndex]||(Pe[Ce.featureIndex]=!0,Ie.push(Ce))}}return K}(B),_)}function Gr(_,e){const o=_.tileID,f=e.tileID;return o.overscaledZ-f.overscaledZ||o.canonical.y-f.canonical.y||o.wrap-f.wrap||o.canonical.x-f.canonical.x}function Wn(_,e){const o=_.feature,f=e.getFeatureState(o.layer["source-layer"],o.id);o.source=o.layer.source,o.layer["source-layer"]&&(o.sourceLayer=o.layer["source-layer"]),o.state=f}function pn(_,e,o){return s._(this,void 0,void 0,function*(){let f=_;if(_.url?f=(yield s.j(e.transformRequest(_.url,"Source"),o)).data:yield D.frameAsync(o),!f)return null;const y=s.O(s.e(f,_),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in f&&f.vector_layers&&(y.vectorLayerIds=f.vector_layers.map(x=>x.id)),y})}class Yr{constructor(e,o){e&&(o?this.setSouthWest(e).setNorthEast(o):Array.isArray(e)&&(e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof s.Q?new s.Q(e.lng,e.lat):s.Q.convert(e),this}setSouthWest(e){return this._sw=e instanceof s.Q?new s.Q(e.lng,e.lat):s.Q.convert(e),this}extend(e){const o=this._sw,f=this._ne;let y,x;if(e instanceof s.Q)y=e,x=e;else{if(!(e instanceof Yr))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(Yr.convert(e)):this.extend(s.Q.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(s.Q.convert(e)):this;if(y=e._sw,x=e._ne,!y||!x)return this}return o||f?(o.lng=Math.min(y.lng,o.lng),o.lat=Math.min(y.lat,o.lat),f.lng=Math.max(x.lng,f.lng),f.lat=Math.max(x.lat,f.lat)):(this._sw=new s.Q(y.lng,y.lat),this._ne=new s.Q(x.lng,x.lat)),this}getCenter(){return new s.Q((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 s.Q(this.getWest(),this.getNorth())}getSouthEast(){return new s.Q(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(e){const{lng:o,lat:f}=s.Q.convert(e);let y=this._sw.lng<=o&&o<=this._ne.lng;return this._sw.lng>this._ne.lng&&(y=this._sw.lng>=o&&o>=this._ne.lng),this._sw.lat<=f&&f<=this._ne.lat&&y}static convert(e){return e instanceof Yr?e:e&&new Yr(e)}static fromLngLat(e,o=0){const f=360*o/40075017,y=f/Math.cos(Math.PI/180*e.lat);return new Yr(new s.Q(e.lng-y,e.lat-f),new s.Q(e.lng+y,e.lat+f))}adjustAntiMeridian(){const e=new s.Q(this._sw.lng,this._sw.lat),o=new s.Q(this._ne.lng,this._ne.lat);return new Yr(e,e.lng>o.lng?new s.Q(o.lng+360,o.lat):o)}}class xr{constructor(e,o,f){this.bounds=Yr.convert(this.validateBounds(e)),this.minzoom=o||0,this.maxzoom=f||24}validateBounds(e){return Array.isArray(e)&&e.length===4?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){const o=Math.pow(2,e.z),f=Math.floor(s.U(this.bounds.getWest())*o),y=Math.floor(s.S(this.bounds.getNorth())*o),x=Math.ceil(s.U(this.bounds.getEast())*o),T=Math.ceil(s.S(this.bounds.getSouth())*o);return e.x>=f&&e.x<x&&e.y>=y&&e.y<T}}class ri extends s.E{constructor(e,o,f,y){if(super(),this.id=e,this.dispatcher=f,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,s.e(this,s.O(o,["url","scheme","tileSize","promoteId"])),this._options=s.e({type:"vector"},o),this._collectResourceTiming=o.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(y)}load(){return s._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new s.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const e=yield pn(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),e&&(s.e(this,e),e.bounds&&(this.tileBounds=new xr(e.bounds,this.minzoom,this.maxzoom)),this.fire(new s.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.l("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this.fire(new s.k(e))}})}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.abort(),e(),this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return s.e({},this._options)}loadTile(e){return s._(this,void 0,void 0,function*(){const o=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),f={request:this.map._requestManager.transformRequest(o,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.t
71ype,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};f.request.collectResourceTiming=this._collectResourceTiming;let y="RT";if(e.actor&&e.state!=="expired"){if(e.state==="loading")return new Promise((x,T)=>{e.reloadPromise={resolve:x,reject:T}})}else e.actor=this.dispatcher.getActor(),y="LT";e.abortController=new AbortController;try{const x=yield e.actor.sendAsync({type:y,data:f},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,x)}catch(x){if(delete e.abortController,e.aborted)return;if(x&&x.status!==404)throw x;this._afterTileLoadWorkerResponse(e,null)}})}_afterTileLoadWorkerResponse(e,o){if(o&&o.resourceTiming&&(e.resourceTiming=o.resourceTiming),o&&this.map._refreshExpiredTiles&&e.setExpiryData(o),e.loadVectorData(o,this.map.painter),e.reloadPromise){const f=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(f.resolve).catch(f.reject)}}abortTile(e){return s._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.t
vendor: 5,434 bytes, line 71
71ype,source:this.id}}))})}unloadTile(e){return s._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class hr extends s.E{constructor(e,o,f,y){super(),this.id=e,this.dispatcher=f,this.setEventedParent(y),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=s.e({type:"raster"},o),s.e(this,s.O(o,["url","scheme","tileSize"]))}load(){return s._(this,arguments,void 0,function*(e=!1){this._loaded=!1,this.fire(new s.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const o=yield pn(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,o&&(s.e(this,o),o.bounds&&(this.tileBounds=new xr(o.bounds,this.minzoom,this.maxzoom)),this.fire(new s.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(o){this._tileJSONRequest=null,this.fire(new s.k(o))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return s.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return s._(this,void 0,void 0,function*(){const o=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{const f=yield fe.getImage(this.map._requestManager.transformRequest(o,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(f&&f.data){this.map._refreshExpiredTiles&&(f.cacheControl||f.expires)&&e.setExpiryData({cacheControl:f.cacheControl,expires:f.expires});const y=this.map.painter.context,x=y.gl,T=f.data;e.texture=this.map.painter.getTileTexture(T.width),e.texture?e.texture.update(T,{useMipmap:!0}):(e.texture=new ze(y,T,x.RGBA,{useMipmap:!0}),e.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE,x.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(f){if(delete e.abortController,e.aborted)e.state="unloaded";else if(f)throw e.state="errored",f}})}abortTile(e){return s._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return s._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class _i extends hr{constructor(e,o,f,y){super(e,o,f,y),this.type="raster-dem",this.maxzoom=22,this._options=s.e({type:"raster-dem"},o),this.encoding=o.encoding||"mapbox",this.redFactor=o.redFactor,this.greenFactor=o.greenFactor,this.blueFactor=o.blueFactor,this.baseShift=o.baseShift}loadTile(e){return s._(this,void 0,void 0,function*(){const o=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),f=this.map._requestManager.transformRequest(o,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{const y=yield fe.getImage(f,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(y&&y.data){const x=y.data;this.map._refreshExpiredTiles&&(y.cacheControl||y.expires)&&e.setExpiryData({cacheControl:y.cacheControl,expires:y.expires});const T=s.b(x)&&s.V()?x:yield this.readImageNow(x),P={type:this.type,uid:e.uid,source:this.id,rawImageData:T,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||e.state==="expired"){e.actor=this.dispatcher.getActor();const C=yield e.actor.sendAsync({type:"LDT",data:P});e.dem=C,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(y){if(delete e.abortController,e.aborted)e.state="unloaded";else if(y)throw e.state="errored",y}})}readImageNow(e){return s._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&s.W()){const o=e.width+2,f=e.height+2;try{return new s.R({width:o,height:f},yield s.X(e,-1,-1,o,f))}catch{}}return D.getImageData(e,1)})}_getNeighboringTiles(e){const o=e.canonical,f=Math.pow(2,o.z),y=(o.x-1+f)%f,x=o.x===0?e.wrap-1:e.wrap,T=(o.x+1+f)%f,P=o.x+1===f?e.wrap+1:e.wrap,C={};return C[new s.Y(e.overscaledZ,x,o.z,y,o.y).key]={backfilled:!1},C[new s.Y(e.overscaledZ,P,o.z,T,o.y).key]={backfilled:!1},o.y>0&&(C[new s.Y(e.overscaledZ,x,o.z,y,o.y-1).key]={backfilled:!1},C[new s.Y(e.overscaledZ,e.wrap,o.z,o.x,o.y-1).key]={backfilled:!1},C[new s.Y(e.overscaledZ,P,o.z,T,o.y-1).key]={backfilled:!1}),o.y+1<f&&(C[new s.Y(e.overscaledZ,x,o.z,y,o.y+1).key]={backfilled:!1},C[new s.Y(e.overscaledZ,e.wrap,o.z,o.x,o.y+1).key]={backfilled:!1},C[new s.Y(e.overscaledZ,P,o.z,T,o.y+1).key]={backfilled:!1}),C}unloadTile(e){return s._(this,void 0,void 0,function*(){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&(yield e.actor.sendAsync({type:"RDT",data:{type:this.t
71ype,uid:e.uid,source:this.id}}))})}}class ui extends s.E{constructor(e,o,f,y){super(),this.id=e,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=f.getActor(),this.setEventedParent(y),this._data=o.data,this._options=s.e({},o),this._collectResourceTiming=o.collectResourceTiming,o.maxzoom!==void 0&&(this.maxzoom=o.maxzoom),o.type&&(this.type=o.type),o.attribution&&(this.attribution=o.attribution),this.promoteId=o.promoteId,o.clusterMaxZoom!==void 0&&this.maxzoom<=o.clusterMaxZoom&&s.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${o.clusterMaxZoom}".`),this.workerOptions=s.e({source:this.id,cluster:o.cluster||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(o.buffer!==void 0?o.buffer:128),tolerance:this._pixelsToTileUnits(o.tolerance!==void 0?o.tolerance:.375),extent:s.Z,maxZoom:this.maxzoom,lineMetrics:o.lineMetrics||!1,generateId:o.generateId||!1},superclusterOptions:{maxZoom:o.clusterMaxZoom!==void 0?o.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,o.clusterMinPoints||2),extent:s.Z,radius:this._pixelsToTileUnits(o.clusterRadius||50),log:!1,generateId:o.generateId||!1},clusterProperties:o.clusterProperties,filter:o.filter},o.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}_pixelsToTileUnits(e){return e*(s.Z/this.tileSize)}load(){return s._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e){return this._data=e,this._updateWorkerData(),this}updateData(e){return this._updateWorkerData(e),this}getData(){return s._(this,void 0,void 0,function*(){const e=s.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:e})})}getCoordinatesFromGeometry(e){return e.type==="GeometryCollection"?e.geometries.map(o=>o.coordinates).flat(1/0):e.coordinates.flat(1/0)}getBounds(){return s._(this,void 0,void 0,function*(){const e=new Yr,o=yield this.getData();let f;switch(o.type){case"FeatureCollection":f=o.features.map(y=>this.getCoordinatesFromGeometry(y.geometry)).flat(1/0);break;case"Feature":f=this.getCoordinatesFromGeometry(o.geometry);break;default:f=this.getCoordinatesFromGeometry(o)}if(f.length==0)return e;for(let y=0;y<f.length-1;y+=2)e.extend([f[y],f[y+1]]);return e})}setClusterOptions(e){return this.workerOptions.cluster=e.cluster,e&&(e.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),e.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=e.clusterMa
vendor: 2,449 bytes, line 71
71xZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,o,f){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:o,offset:f}})}_updateWorkerData(e){return s._(this,void 0,void 0,function*(){const o=s.e({type:this.type},this.workerOptions);e?o.dataDiff=e:typeof this._data=="string"?(o.request=this.map._requestManager.transformRequest(D.resolveURL(this._data),"Source"),o.request.collectResourceTiming=this._collectResourceTiming):o.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new s.l("dataloading",{dataType:"source"}));try{const f=yield this.actor.sendAsync({type:"LD",data:o});if(this._pendingLoads--,this._removed||f.abandoned)return void this.fire(new s.l("dataabort",{dataType:"source"}));let y=null;f.resourceTiming&&f.resourceTiming[this.id]&&(y=f.resourceTiming[this.id].slice(0));const x={dataType:"source"};this._collectResourceTiming&&y&&y.length>0&&s.e(x,{resourceTiming:y}),this.fire(new s.l("data",Object.assign(Object.assign({},x),{sourceDataType:"metadata"}))),this.fire(new s.l("data",Object.assign(Object.assign({},x),{sourceDataType:"content"})))}catch(f){if(this._pendingLoads--,this._removed)return void this.fire(new s.l("dataabort",{dataType:"source"}));this.fire(new s.k(f))}})}loaded(){return this._pendingLoads===0}loadTile(e){return s._(this,void 0,void 0,function*(){const o=e.actor?"RT":"LT";e.actor=this.actor;const f={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;const y=yield this.actor.sendAsync({type:o,data:f},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(y,this.map.painter,o==="RT")})}abortTile(e){return s._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return s._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.t
71ype,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return s.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class Qr extends s.E{constructor(e,o,f,y){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=f,this.coordinates=o.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(y),this.options=o}load(e){return s._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new s.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const o=yield fe.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,o&&o.data&&(this.image=o.data,e&&(this.coordinates=e),this._finishLoading())}catch(o){this._request=null,this._loaded=!0,this.fire(new s.k(o))}})}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;const o=e.map(s.$.fromLngLat);var f;return this.tileID=function(y){let x=1/0,T=1/0,P=-1/0,C=-1/0;for(const j of y)x=Math.min(x,j.x),T=Math.min(T,j.y),P=Math.max(P,j.x),C=Math.max(C,j.y);const L=Math.max(P-x,C-T),N=Math.max(0,Math.floor(-Math.log(L)/Math.LN2)),B=Math.pow(2,N);return new s.a1(N,Math.floor((x+P)/2*B),Math.floor((T+C)/2*B))}(o),this.terrainTileRanges=this._getOverlappingTileRanges(o),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=o.map(y=>this.tileID.getTilePoint(y)._round()),this.flippedWindingOrder=((f=this.tileCoords)[1].x-f[0].x)*(f[2].y-f[0].y)-(f[1].y-f[0].y)*(f[2].x-f[0].x)<0,this.fire(new s.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const e=this.map.painter.context,o=e.gl;this.texture||(this.texture=new ze(e,this.image,o.RGBA),this.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE));let f=!1;for(const y in this.tiles){const x=this.tiles[y];x.state!=="loaded"&&(x.state="loaded",x.texture=this.texture,f=!0)}f&&this.fire(new s.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return s._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){let o=1/0,f=1/0,y=-1/0,x=-1/0;for(const P of e)o=Math.min(o,P.x),f=Math.min(f,P.y),y=Math.max(y,P.x),x=Math.max(x,P.y);const T={};for(let P=0;P<=s.a0;P++){const C=Math.pow(2,P),L=Math.floor(o*C),N=Math.floor(f*C),B=Math.floor(y*C),j=Math.floor(x*C);T[P]={minTileX:L,minTileY:N,maxTileX:B,maxTileY:j}}return T}}class an extends Qr{constructor(e,o,f,y){super(e,o,f,y),this.roundZoom=!0,this.type="video",this.options=o}load(){return s._(this,void 0,void 0,function*(){this._loaded=!1;const e=this.options;this.urls=[];for(const o of e.urls)this.urls.push(this.map._requestManager.transformRequest(o,"Source").url);try{const o=yield s.a2(this.urls);if(this._loaded=!0,!o)return;this.video=o,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(o){this.fire(new s.k(o))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){const o=this.video.seekable;e<o.start(0)||e>o.end(0)?this.fire(new s.k(new s.a3(`sources.${this.id}`,null,`Playback for this video can be set only between the ${o.start(0)} and ${o.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}
vendor: 4,129 bytes, line 71
71onAdd(e){this.map||(this.map=e,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 e=this.map.painter.context,o=e.gl;this.texture?this.video.paused||(this.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE),o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,this.video)):(this.texture=new ze(e,this.video,o.RGBA),this.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE));let f=!1;for(const y in this.tiles){const x=this.tiles[y];x.state!=="loaded"&&(x.state="loaded",x.texture=this.texture,f=!0)}f&&this.fire(new s.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Jr extends Qr{constructor(e,o,f,y){super(e,o,f,y),o.coordinates?Array.isArray(o.coordinates)&&o.coordinates.length===4&&!o.coordinates.some(x=>!Array.isArray(x)||x.length!==2||x.some(T=>typeof T!="number"))||this.fire(new s.k(new s.a3(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.k(new s.a3(`sources.${e}`,null,'missing required property "coordinates"'))),o.animate&&typeof o.animate!="boolean"&&this.fire(new s.k(new s.a3(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),o.canvas?typeof o.canvas=="string"||o.canvas instanceof HTMLCanvasElement||this.fire(new s.k(new s.a3(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new s.k(new s.a3(`sources.${e}`,null,'missing required property "canvas"'))),this.options=o,this.animate=o.animate===void 0||o.animate}load(){return s._(this,void 0,void 0,function*(){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 s.k(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(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const o=this.map.painter.context,f=o.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new ze(o,this.canvas,f.RGBA,{premultiply:!0});let y=!1;for(const x in this.tiles){const T=this.tiles[x];T.state!=="loaded"&&(T.state="loaded",T.texture=this.texture,y=!0)}y&&this.fire(new s.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}const Fr={},In=_=>{switch(_){case"geojson":return ui;case"image":return Qr;case"raster":return hr;case"raster-dem":return _i;case"vector":return ri;case"video":return an;case"canvas":return Jr}return Fr[_]},ni="RTLPluginLoaded";class Rn extends s.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=fr()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(o=>{throw this.status="error",o})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return s._(this,arguments,void 0,function*(o,f=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=D.resolveURL(o),!this.url)throw new Error(`requested url ${o}
71 is invalid`);if(this.status==="unavailable"){if(!f)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return s._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new s.l(ni))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let bn=null;function mn(){return bn||(bn=new Rn),bn}class xi{constructor(e,o){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=s.a4(),this.uses=0,this.tileSize=o,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){const o=e+this.timeAdded;o<this.fadeEndTime||(this.fadeEndTime=o)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,o,f){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(y,x){const T={};if(!x)return T;for(const P of y){const C=P.layerIds.map(L=>x.getLayer(L)).filter(Boolean);if(C.length!==0){P.layers=C,P.stateDependentLayerIds&&(P.stateDependentLayers=P.stateDependentLayerIds.map(L=>C.filter(N=>N.id===L)[0]));for(const L of C)T[L.id]=P}}return T}(e.buckets,o==null?void 0:o.style),this.hasSymbolBuckets=!1;for(const y in this.buckets){const x=this.buckets[y];if(x instanceof s.a6){if(this.hasSymbolBuckets=!0,!f)break;x.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const y in this.buckets){const x=this.buckets[y];if(x instanceof s.a6&&x.hasRTLText){this.hasRTLText=!0,mn().lazyLoad();break}}this.queryPadding=0;for(const y in this.buckets){const x=this.buckets[y];this.queryPadding=Math.max(this.queryPadding,o.style.getLayer(y).queryRadius(x))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new s.a5}unloadVectorData(){for(const e in this.buckets)this.buckets[e].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(e){return this.buckets[e.id]}upload(e){for(const f in this.buckets){const y=this.buckets[f];y.uploadPending()&&y.upload(e)}const o=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new ze(e,this.imageAtlas.image,o.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new ze(e,this.glyphAtlasImage,o.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,o,f,y,x,T,P,C,L,N,B){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:y,cameraQueryGeometry:x,scale:T,tileSize:this.tileSize,pixelPosMatrix:N,transform:C,params:P,queryPadding:this.queryPadding*L,getElevation:B},e,o,f):{}}querySourceFeatures(e,o){const f=this.latestFeatureIndex;if(!f||!f.rawTileData)return;const y=f.loadVTLayers(),x=o&&o.sourceLayer?o.sourceLayer:"",T=y._geojsonTileLayer||y[x];if(!T)return;const P=s.a7(o&&o.filter),{z:C,x:L,y:N}=this.tileID.canonical,B={z:C,x:L,y:N};for(let j=0;j<T.length;j++){const K=T.feature(j);if(P.needGeometry){const pe=s.a8(K,!0);if(!P.filter(new s.C(this.tileID.overscaledZ),pe,this.tileID.canonical))continue}else if(!P.filter(new s.C(this.tileID.overscaledZ),K))continue;const ee=f.getId(K,x),me=new s.a9(K,C,L,N,ee);me.tile=B,e.push(me)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){const o=this.expirationTime;
vendor: 9,032 bytes, line 71
71if(e.cacheControl){const f=s.aa(e.cacheControl);f["max-age"]&&(this.expirationTime=Date.now()+1e3*f["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){const f=Date.now();let y=!1;if(this.expirationTime>f)y=!1;else if(o)if(this.expirationTime<o)y=!0;else{const x=this.expirationTime-o;x?this.expirationTime=f+Math.max(x,3e4):y=!0}else y=!0;y?(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(e,o){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(e).length===0)return;const f=this.latestFeatureIndex.loadVTLayers();for(const y in this.buckets){if(!o.style.hasLayer(y))continue;const x=this.buckets[y],T=x.layers[0].sourceLayer||"_geojsonTileLayer",P=f[T],C=e[T];if(!P||!C||Object.keys(C).length===0)continue;x.update(C,P,this.imageAtlas&&this.imageAtlas.patternPositions||{});const L=o&&o.style&&o.style.getLayer(y);L&&(this.queryPadding=Math.max(this.queryPadding,L.queryRadius(x)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<D.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(e){this.symbolFadeHoldUntil=D.now()+e}setDependencies(e,o){const f={};for(const y of o)f[y]=!0;this.dependencies[e]=f}hasDependency(e,o){for(const f of e){const y=this.dependencies[f];if(y){for(const x of o)if(y[x])return!0}}return!1}}class bi{constructor(e,o){this.max=e,this.onRemove=o,this.reset()}reset(){for(const e in this.data)for(const o of this.data[e])o.timeout&&clearTimeout(o.timeout),this.onRemove(o.value);return this.data={},this.order=[],this}add(e,o,f){const y=e.wrapped().key;this.data[y]===void 0&&(this.data[y]=[]);const x={value:o,timeout:void 0};if(f!==void 0&&(x.timeout=setTimeout(()=>{this.remove(e,x)},f)),this.data[y].push(x),this.order.push(y),this.order.length>this.max){const T=this._getAndRemoveByKey(this.order[0]);T&&this.onRemove(T)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){const o=this.data[e].shift();return o.timeout&&clearTimeout(o.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),o.value}getByKey(e){const o=this.data[e];return o?o[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,o){if(!this.has(e))return this;const f=e.wrapped().key,y=o===void 0?0:this.data[f].indexOf(o),x=this.data[f][y];return this.data[f].splice(y,1),x.timeout&&clearTimeout(x.timeout),this.data[f].length===0&&delete this.data[f],this.onRemove(x.value),this.order.splice(this.order.indexOf(f),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this}filter(e){const o=[];for(const f in this.data)for(const y of this.data[f])e(y.value)||o.push(y);for(const f of o)this.remove(f.value.tileID,f)}}class Ln{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,o,f){const y=String(o);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][y]=this.stateChanges[e][y]||{},s.e(this.stateChanges[e][y],f),this.deletedStates[e]===null){this.deletedStates[e]={};for(const x in this.state[e])x!==y&&(this.deletedStates[e][x]=null)}else if(this.deletedStates[e]&&this.deletedStates[e][y]===null){this.deletedStates[e][y]={};for(const x in this.state[e][y])f[x]||(this.deletedStates[e][y][x]=null)}else for(const x in f)this.deletedStates[e]&&this.deletedStates[e][y]&&this.deletedStates[e][y][x]===null&&delete this.deletedStates[e][y][x]}removeFeatureState(e,o,f){if(this.deletedStates[e]===null)return;const y=String(o);if(this.deletedStates[e]=this.deletedStates[e]||{},f&&o!==void 0)this.deletedStates[e][y]!==null&&(this.deletedStates[e][y]=this.deletedStates[e][y]||{},this.deletedStates[e][y][f]=null);else if(o!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][y])for(f in this.deletedStates[e][y]={},this.stateChanges[e][y])this.deletedStates[e][y][f]=null;else this.deletedStates[e][y]=null;else this.deletedStates[e]=null}getState(e,o){const f=String(o),y=s.e({},(this.state[e]||{})[f],(this.stateChanges[e]||{})[f]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){const x=this.deletedStates[e][o];if(x===null)return{};for(const T in x)delete y[T]}return y}initializeTileState(e,o){e.setFeatureState(this.state,o)}coalesceChanges(e,o){const f={};for(const y in this.stateChanges){this.state[y]=this.state[y]||{};const x={};for(const T in this.stateChanges[y])this.state[y][T]||(this.state[y][T]={}),s.e(this.state[y][T],this.stateChanges[y][T]),x[T]=this.state[y][T];f[y]=x}for(const y in this.deletedStates){this.state[y]=this.state[y]||{};const x={};if(this.deletedStates[y]===null)for(const T in this.state[y])x[T]={},this.state[y][T]={};else for(const T in this.deletedStates[y]){if(this.deletedStates[y][T]===null)this.state[y][T]={};else for(const P of Object.keys(this.deletedStates[y][T]))delete this.state[y][T][P];x[T]=this.state[y][T]}f[y]=f[y]||{},s.e(f[y],x)}if(this.stateChanges={},this.deletedStates={},Object.keys(f).length!==0)for(const y in e)e[y].setFeatureState(f,o)}}const ci=89.25;function sn(_,e){const o=s.ae(e.lat,-85.051129,s.af);return new s.P(s.U(e.lng)*_,s.S(o)*_)}function Un(_,e){return new s.$(e.x/_,e.y/_).toLngLat()}function Fe(_){return _.cameraToCenterDistance*Math.min(.85*Math.tan(s.ab(90-_.pitch)),Math.tan(s.ab(ci-_.pitch)))}function ne(_,e){const o=_.canonical,f=e/s.ac(o.z),y=o.x+Math.pow(2,o.z)*_.wrap,x=s.ad(new Float64Array(16));return s.L(x,x,[y*f,o.y*f,0]),s.M(x,x,[f/s.Z,f/s.Z,1]),x}function ie(_,e,o,f,y){const x=s.$.fromLngLat(_,e),T=y*s.ag(1,_.lat),P=T*Math.cos(s.ab(o)),C=Math.sqrt(T*T-P*P),L=C*Math.sin(s.ab(-f)),N=C*Math.cos(s.ab(-f));return new s.$(x.x+L,x.y+N,x.z+P)}function he(_,e,o){const f=e.intersectsFrustum(_);if(!o)return f;const y=e.intersectsPlane(o);return f===0||y===0?0:f===2&&y===2?2:1}function we(_,e,o){let f=0;const y=(o-e)/10;for(let x=0;x<10;x++)f+=y*Math.pow(Math.cos(e+(x+.5)/10*(o-e)),_);return f}function Ve(_,e){return function(o,f,y,x,T){const P=2*((_-1)/s.ah(Math.cos(s.ab(ci-T))/Math.cos(s.ab(ci)))-1),C=Math.acos(y/x),L=2*we(P-1,0,s.ab(T/2)),N=Math.min(s.ab(ci),C+s.ab(T/2)),B=we(P-1,Math.min(N,C-s.ab(T/2)),N),j=Math.atan(f/y),K=Math.hypot(f,y);let ee=o;return ee+=s.ah(x/K/Math.max(.5,Math.cos(s.ab(T/2)))),ee+=P*s.ah(Math.cos(j))/2,ee-=s.ah(Math.max(1,B/L/e))/2,ee}}const ue=Ve(9.314,3);function $e(_,e){const o=(e.roundZoom?Math.round:Math.floor)(_.zoom+s.ah(_.tileSize/e.tileSize));return Math.max(0,o)}function Le(_,e){const o=_.getCameraFrustum(),f=_.getClippingPlane(),y=_.screenPointToMercatorCoordinate(_.getCameraPoint()),x=s.$.fromLngLat(_.center,_.elevation);y.z=x.z+Math.cos(_.pitchInRadians)*_.cameraToCenterDistance/_.worldSize;const T=_.getCoveringTilesDetailsProvider(),P=T.allowVariableZoom(_,e),C=$e(_,e),L=e.minzoom||0,N=e.maxzoom!==void 0?e.maxzoom:_.maxZoom,B=Math.min(Math.max(0,C),N),j=Math.pow(2,B),K=[j*y.x,j*y.y,0],ee=[j*x.x,j*x.y,0],me=Math.hypot(x.x-y.x,x.y-y.y),pe=Math.abs(x.z-y.z),ye=Math.hypot(me,pe),be=Pe=>({zoom:0,x:0,y:0,wrap:Pe,fullyVisible:!1}),Ee=[],xe=[];if(_.renderWorldCopies&&T.allowWorldCopies())for(let Pe=1;Pe<=3;Pe++)Ee.push(be(-Pe)),Ee.push(be(Pe));for(Ee.push(be(0));Ee.length>0;){const Pe=Ee.pop(),Ie=Pe.x,Ce=Pe.y;let Ge=Pe.fullyVisible;const ct={x:Ie,y:Ce,z:Pe.zoom},at=T.getTileAABB(ct,Pe.wrap,_.elevation,e);if(!Ge){const Vt=he(o,at,f);if(Vt===0)continue;Ge=Vt===2}const Ke=T.distanceToTile2d(y.x,y.y,ct,at);let lt=C;P&&(lt=(e.calculateTileZoom||ue)(_.zoom+s.ah(_.tileSize/e.tileSize),Ke,pe,ye,_.fov)),lt=(e.roundZoom?Math.round:Math.floor)(lt),lt=Math.max(0,lt);const At=Math.min(lt,N);if(Pe.wrap=T.getWrap(x,ct,Pe.wrap),Pe.zoom>=At){if(Pe.zoom<L)continue;const Vt=B-Pe.zoom,yt=K[0]-.5-(Ie<<Vt),zt=K[1]-.5-(Ce<<Vt),mr=e.reparseOverscaled?Math.max(Pe.zoom,lt):Pe.zoom;xe.push({tileID:new s.Y(Pe.zoom===N?mr:Pe.zoom,Pe.wrap,Pe.zoom,Ie,Ce),distanceSq:s.ai([ee[0]-.5-Ie,ee[1]-.5-Ce]),tileDistanceToCamera:Math.sqrt(yt*yt+zt*zt)})}else for(let Vt=0;Vt<4;Vt++)Ee.push({zoom:Pe.zoom+1,x:(Ie<<1)+Vt%2,y:(Ce<<1)+(Vt>>1),wrap:Pe.wrap,fullyVisible:Ge})}return xe.sort((Pe,Ie)=>Pe.distanceSq-Ie.distanceSq).map(Pe=>Pe.tileID)}class Be extends s.E{constructor(e,o,f){super(),this.id=e,this.dispatcher=f,this.on("data",y=>this._dataHandler(y)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((y,x,T,P)=>{const C=new(In(x.type))(y,x,T,P);if(C.id!==y)throw new Error(`Expected Source id to be ${y} instead of ${C.id}`);return C})(e,o,f,this),this._tiles={},this._cache=new bi(0,y=>this._unloadTile(y)),this._timers={},this._cacheTimers={}
71,this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Ln,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const e in this._tiles){const o=this._tiles[e];if(o.state!=="loaded"&&o.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,o,f){return s._(this,void 0,void 0,function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,o,f)}catch(y){e.state="errored",y.status!==404?this._source.fire(new s.k(y,{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new s.l("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const o in this._tiles){const f=this._tiles[o];f.upload(e),f.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(e=>e.tileID).sort(tt).map(e=>e.key)}getRenderableIds(e){const o=[];for(const f in this._tiles)this._isIdRenderable(f,e)&&o.push(this._tiles[f]);return e?o.sort((f,y)=>{const x=f.tileID,T=y.tileID,P=new s.P(x.canonical.x,x.canonical.y)._rotate(-this.transform.bearingInRadians),C=new s.P(T.canonical.x,T.canonical.y)._rotate(-this.transform.bearingInRadians);return x.overscaledZ-T.overscaledZ||C.y-P.y||C.x-P.x}).map(f=>f.tileID.key):o.map(f=>f.tileID).sort(tt).map(f=>f.key)}hasRenderableParent(e){const o=this.findLoadedParent(e,0);return!!o&&this._isIdRenderable(o.tileID.key)}_isIdRenderable(e,o){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(o||!this._tiles[e].holdingForFade())}reload(e){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const o in this._tiles)(e||this._tiles[o].state!=="errored")&&this._reloadTile(o,"reloading")}}_reloadTile(e,o){return s._(this,void 0,void 0,function*(){const f=this._tiles[e];f&&(f.state!=="loading"&&(f.state=o),yield this._loadTile(f,e,o))})}_tileLoaded(e,o,f){e.timeAdded=D.now(),f==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(o,e),this.getSource().type==="raster-dem"&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new s.l("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){const o=this.getRenderableIds();for(let y=0;y<o.length;y++){const x=o[y];if(e.neighboringTiles&&e.neighboringTiles[x]){const T=this.getTileByID(x);f(e,T),f(T,e)}}function f(y,x){y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0;let T=x.tileID.canonical.x-y.tileID.canonical.x;const P=x.tileID.canonical.y-y.tileID.canonical.y,C=Math.pow(2,y.tileID.canonical.z),L=x.tileID.key;T===0&&P===0||Math.abs(P)>1||(Math.abs(T)>1&&(Math.abs(T+C)===1?T+=C:Math.abs(T-C)===1&&(T-=C)),x.dem&&y.dem&&(y.dem.backfillBorder(x.dem,T,P),y.neighboringTiles&&y.neighboringTiles[L]&&(y.neighboringTiles[L].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,o,f,y){for(const x in this._tiles){let T=this._tiles[x];if(y[x]||!T.hasData()||T.tileID.overscaledZ<=o||T.tileID.overscaledZ>f)continue;let P=T.tileID;for(;T&&T.tileID.overscaledZ>o+1;){const L=T.tileID.scaledTo(T.tileID.overscaledZ-1);T=this._tiles[L.key],T&&T.hasData()&&(P=L)}let C=P;for(;C.overscaledZ>o;)if(C=C.scaledTo(C.overscaledZ-1),e[C.key]||e[C.canonical.key]){y[P.key]=P;break}}}findLoadedParent(e,o){if(e.key in this._loadedParentTiles){const f=this._loadedParentTiles[e.key];return f&&f.tileID.overscaledZ>=o?f:null}for(let f=e.overscaledZ-1;f>=o;f--){const y=e.scaledTo(f),x=this._getLoadedTile(y);if(x)return x}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){const o=this._tiles[e.key];return o&&o.hasData()?o:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){const o=Math.ceil(e.width/this._source.tileSize)+1,f=Math.ceil(e.height/this._source.tileSize)+1,y=Math.floor(o*f*(this._maxTileC
vendor: 9,190 bytes, line 71
71acheZoomLevels===null?s.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),x=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,y):y;this._cache.setMaxSize(x)}handleWrapJump(e){const o=Math.round((e-(this._prevLng===void 0?e:this._prevLng))/360);if(this._prevLng=e,o){const f={};for(const y in this._tiles){const x=this._tiles[y];x.tileID=x.tileID.unwrapTo(x.tileID.wrap+o),f[x.tileID.key]=x}this._tiles=f;for(const y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(const y in this._tiles)this._setTileReloadTimer(y,this._tiles[y])}}_updateCoveredAndRetainedTiles(e,o,f,y,x,T){const P={},C={},L=Object.keys(e),N=D.now();for(const B of L){const j=e[B],K=this._tiles[B];if(!K||K.fadeEndTime!==0&&K.fadeEndTime<=N)continue;const ee=this.findLoadedParent(j,o),me=this.findLoadedSibling(j),pe=ee||me||null;pe&&(this._addTile(pe.tileID),P[pe.tileID.key]=pe.tileID),C[B]=j}this._retainLoadedChildren(C,y,f,e);for(const B in P)e[B]||(this._coveredTiles[B]=!0,e[B]=P[B]);if(T){const B={},j={};for(const K of x)this._tiles[K.key].hasData()?B[K.key]=K:j[K.key]=K;for(const K in j){const ee=j[K].children(this._source.maxzoom);this._tiles[ee[0].key]&&this._tiles[ee[1].key]&&this._tiles[ee[2].key]&&this._tiles[ee[3].key]&&(B[ee[0].key]=e[ee[0].key]=ee[0],B[ee[1].key]=e[ee[1].key]=ee[1],B[ee[2].key]=e[ee[2].key]=ee[2],B[ee[3].key]=e[ee[3].key]=ee[3],delete j[K])}for(const K in j){const ee=j[K],me=this.findLoadedParent(ee,this._source.minzoom),pe=this.findLoadedSibling(ee),ye=me||pe||null;if(ye){B[ye.tileID.key]=e[ye.tileID.key]=ye.tileID;for(const be in B)B[be].isChildOf(ye.tileID)&&delete B[be]}}for(const K in this._tiles)B[K]||(this._coveredTiles[K]=!0)}}update(e,o){if(!this._sourceLoaded||this._paused)return;let f;this.transform=e,this.terrain=o,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?f=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(N=>new s.Y(N.canonical.z,N.wrap,N.canonical.z,N.canonical.x,N.canonical.y)):(f=Le(e,{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:o,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(f=f.filter(N=>this._source.hasTile(N)))):f=[];const y=$e(e,this._source),x=Math.max(y-Be.maxOverzooming,this._source.minzoom),T=Math.max(y+Be.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const N={};for(const B of f)if(B.canonical.z>this._source.minzoom){const j=B.scaledTo(B.canonical.z-1);N[j.key]=j;const K=B.scaledTo(Math.max(this._source.minzoom,Math.min(B.canonical.z,5)));N[K.key]=K}f=f.concat(Object.values(N))}const P=f.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,P&&this.fire(new s.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const C=this._updateRetainedTiles(f,y);Ze(this._source.type)&&this._updateCoveredAndRetainedTiles(C,x,T,y,f,o);for(const N in C)this._tiles[N].clearFadeHold();const L=s.aj(this._tiles,C);for(const N of L){const B=this._tiles[N];B.hasSymbolBuckets&&!B.holdingForFade()?B.setHoldDuration(this.map._fadeDuration):B.hasSymbolBuckets&&!B.symbolFadeFinished()||this._removeTile(N)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,o){var f;const y={},x={},T=Math.max(o-Be.maxOverzooming,this._source.minzoom),P=Math.max(o+Be.maxUnderzooming,this._source.minzoom),C={};for(const L of e){const N=this._addTile(L);y[L.key]=L,N.hasData()||o<this._source.maxzoom&&(C[L.key]=L)}this._retainLoadedChildren(C,o,P,y);for(const L of e){let N=this._tiles[L.key];if(N.hasData())continue;if(o+1>this._source.maxzoom){const j=L.children(this._source.maxzoom)[0],K=this.getTile(j);if(K&&K.hasData()){y[j.key]=j;continue}}else{const j=L.children(this._source.maxzoom);if(y[j[0].key]&&y[j[1].key]&&y[j[2].key]&&y[j[3].key])continue}let B=N.wasRequested();for(let j=L.overscaledZ-1;j>=T;--j){const K=L.scaledTo(j);if(x[K.key])break;if(x[K.key]=!0,N=this.getTile(K),!N&&B&&(N=this._addTile(K)),N){const ee=N.hasData();if((ee||!(!((f=this.map)===null||f===void 0)&&f.cancelPendingTileRequestsWhileZooming)||B)&&(y[K.key]=K),B=N.wasRequested(),ee)break}}}return y}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const o=[];let f,y=this._tiles[e].tileID;for(;y.overscaledZ>0;){if(y.key in this._loadedParentTiles){f=this._loadedParentTiles[y.key];break}o.push(y.key);const x=y.scaledTo(y.overscaledZ-1);if(f=this._getLoadedTile(x),f)break;y=x}for(const x of o)this._loadedParentTiles[x]=f}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const e in this._tiles){const o=this._tiles[e].tileID,f=this._getLoadedTile(o);this._loadedSiblingTiles[o.key]=f}}_addTile(e){let o=this._tiles[e.key];if(o)return o;o=this._cache.getAndRemove(e),o&&(this._setTileReloadTimer(e.key,o),o.tileID=e,this._state.initializeTileState(o,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,o)));const f=o;return o||(o=new xi(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(o,e.key,o.state)),o.uses++,this._tiles[e.key]=o,f||this._source.fire(new s.l("dataloading",{tile:o,coord:o.tileID,dataType:"source"})),o}_setTileReloadTimer(e,o){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const f=o.getExpiryTimeout();f&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},f))}refreshTiles(e){for(const o in this._tiles)this._isIdRenderable(o)&&e.some(f=>f.equals(this._tiles[o].tileID.canonical))&&this._reloadTile(o,"expired")}_removeTile(e){const o=this._tiles[e];o&&(o.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),o.uses>0||(o.hasData()&&o.state!=="reloading"?this._cache.add(o.tileID,o,o.getExpiryTimeout()):(o.aborted=!0,this._abortTile(o),this._unloadTile(o))))}_dataHandler(e){const o=e.sourceDataType;e.dataType==="source"&&o==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&e.dataType==="source"&&o==="content"&&(this.reload(e.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,o,f){const y=[],x=this.transform;if(!x)return y;const T=f?x.getCameraQueryGeometry(e):e,P=e.map(ee=>x.screenPointToMercatorCoordinate(ee,this.terrain)),C=T.map(ee=>x.screenPointToMercatorCoordinate(ee,this.terrain)),L=this.getIds();let N=1/0,B=1/0,j=-1/0,K=-1/0;for(const ee of C)N=Math.min(N,ee.x),B=Math.min(B,ee.y),j=Math.max(j,ee.x),K=Math.max(K,ee.y);for(let ee=0;ee<L.length;ee++){const me=this._tiles[L[ee]];if(me.holdingForFade())continue;const pe=x.getCoveringTilesDetailsProvider().allowWorldCopies()?me.tileID:me.tileID.unwrapTo(0),ye=Math.pow(2,x.zoom-me.tileID.overscaledZ),be=o*me.queryPadding*s.Z/me.tileSize/ye,Ee=[pe.getTilePoint(new s.$(N,B)),pe.getTilePoint(new s.$(j,K))];if(Ee[0].x-be<s.Z&&Ee[0].y-be<s.Z&&Ee[1].x+be>=0&&Ee[1].y+be>=0){const xe=P.map(Ie=>pe.getTilePoint(Ie)),Pe=C.map(Ie=>pe.getTilePoint(Ie));y.push({tile:me,tileID:pe,queryGeometry:xe,cameraQueryGeometry:Pe,scale:ye})}}return y}getVisibleCoordinates(e){const o=this.getRenderableIds(e).map(f=>this._tiles[f].tileID);return this.transform&&this.transform.populateCache(o),o}hasTransition(){if(this._source.hasTransition())return!0;if(Ze(this._source.type)){const e=D.now();for(const o in this._tiles)if(this._tiles[o].fadeEndTime>=e)return!0}return!1}setFeatureState(e,o,f){this._state.updateState(e=e||"_geojsonTileLayer",o,f)}removeFeatureState(e,o,f){this._state.removeFeatureState(e=e||"_geojsonTileLayer",o,f)}getFeatureState(e,o){return this._state.getState(e=e||"_geojsonTileLayer",o)}setDependencies(e,o,f){const y=this._tiles[e];y&&y.setDependencies(o,f)}reloadTilesForDependencies(e,o){for(const f in this._tiles)this._tiles[f].hasDependency(e,o)&&this._reloadTile(f,"reloading");this._cache.filter(f=>!f.hasDependency(e,o))}}function tt(_,e){const o=Math.abs(2*_.wrap)-+(_.wrap<0),f=Math.abs(2*e.wrap)-+(e.wrap<0);return _.overscaledZ-e.overscaledZ||f-o||e.canonical.y-_.canonical.y||e.canonical.x-_.canonical.x}function Ze(_){return _==="raster"||_==="image"||_==="video"}Be.maxOverzooming=10,Be.maxUnderzooming=3;class vt{constructor(e,o){this.reset(e,o)}reset(e,o){this.points=e||[],this._distances=[0];for(let f=1;f<this.points.length;f++)this._distances[f]=this._distances[f-1]+this.points[f].dist(this.points[f-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(o||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(this.points.length===1)return this.points[0];e=s.ae(e,0,1);let o=1,f=this._distances[o];const y=e*this.paddedLength+this.padding;
vendor: 4,762 bytes, line 71
71for(;f<y&&o<this._distances.length;)f=this._distances[++o];const x=o-1,T=this._distances[x],P=f-T,C=P>0?(y-T)/P:0;return this.points[x].mult(1-C).add(this.points[o].mult(C))}}function ge(_,e){let o=!0;return _==="always"||_!=="never"&&e!=="never"||(o=!1),o}class Te{constructor(e,o,f){const y=this.boxCells=[],x=this.circleCells=[];this.xCellCount=Math.ceil(e/f),this.yCellCount=Math.ceil(o/f);for(let T=0;T<this.xCellCount*this.yCellCount;T++)y.push([]),x.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=o,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/o,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,o,f,y,x){this._forEachCell(o,f,y,x,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(o),this.bboxes.push(f),this.bboxes.push(y),this.bboxes.push(x)}insertCircle(e,o,f,y){this._forEachCell(o-y,f-y,o+y,f+y,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(o),this.circles.push(f),this.circles.push(y)}_insertBoxCell(e,o,f,y,x,T){this.boxCells[x].push(T)}_insertCircleCell(e,o,f,y,x,T){this.circleCells[x].push(T)}_query(e,o,f,y,x,T,P){if(f<0||e>this.width||y<0||o>this.height)return[];const C=[];if(e<=0&&o<=0&&this.width<=f&&this.height<=y){if(x)return[{key:null,x1:e,y1:o,x2:f,y2:y}];for(let L=0;L<this.boxKeys.length;L++)C.push({key:this.boxKeys[L],x1:this.bboxes[4*L],y1:this.bboxes[4*L+1],x2:this.bboxes[4*L+2],y2:this.bboxes[4*L+3]});for(let L=0;L<this.circleKeys.length;L++){const N=this.circles[3*L],B=this.circles[3*L+1],j=this.circles[3*L+2];C.push({key:this.circleKeys[L],x1:N-j,y1:B-j,x2:N+j,y2:B+j})}}else this._forEachCell(e,o,f,y,this._queryCell,C,{hitTest:x,overlapMode:T,seenUids:{box:{},circle:{}}},P);return C}query(e,o,f,y){return this._query(e,o,f,y,!1,null)}hitTest(e,o,f,y,x,T){return this._query(e,o,f,y,!0,x,T).length>0}hitTestCircle(e,o,f,y,x){const T=e-f,P=e+f,C=o-f,L=o+f;if(P<0||T>this.width||L<0||C>this.height)return!1;const N=[];return this._forEachCell(T,C,P,L,this._queryCellCircle,N,{hitTest:!0,overlapMode:y,circle:{x:e,y:o,radius:f},seenUids:{box:{},circle:{}}},x),N.length>0}_queryCell(e,o,f,y,x,T,P,C){const{seenUids:L,hitTest:N,overlapMode:B}=P,j=this.boxCells[x];if(j!==null){const ee=this.bboxes;for(const me of j)if(!L.box[me]){L.box[me]=!0;const pe=4*me,ye=this.boxKeys[me];if(e<=ee[pe+2]&&o<=ee[pe+3]&&f>=ee[pe+0]&&y>=ee[pe+1]&&(!C||C(ye))&&(!N||!ge(B,ye.overlapMode))&&(T.push({key:ye,x1:ee[pe],y1:ee[pe+1],x2:ee[pe+2],y2:ee[pe+3]}),N))return!0}}const K=this.circleCells[x];if(K!==null){const ee=this.circles;for(const me of K)if(!L.circle[me]){L.circle[me]=!0;const pe=3*me,ye=this.circleKeys[me];if(this._circleAndRectCollide(ee[pe],ee[pe+1],ee[pe+2],e,o,f,y)&&(!C||C(ye))&&(!N||!ge(B,ye.overlapMode))){const be=ee[pe],Ee=ee[pe+1],xe=ee[pe+2];if(T.push({key:ye,x1:be-xe,y1:Ee-xe,x2:be+xe,y2:Ee+xe}),N)return!0}}}return!1}_queryCellCircle(e,o,f,y,x,T,P,C){const{circle:L,seenUids:N,overlapMode:B}=P,j=this.boxCells[x];if(j!==null){const ee=this.bboxes;for(const me of j)if(!N.box[me]){N.box[me]=!0;const pe=4*me,ye=this.boxKeys[me];if(this._circleAndRectCollide(L.x,L.y,L.radius,ee[pe+0],ee[pe+1],ee[pe+2],ee[pe+3])&&(!C||C(ye))&&!ge(B,ye.overlapMode))return T.push(!0),!0}}const K=this.circleCells[x];if(K!==null){const ee=this.circles;for(const me of K)if(!N.circle[me]){N.circle[me]=!0;const pe=3*me,ye=this.circleKeys[me];if(this._circlesCollide(ee[pe],ee[pe+1],ee[pe+2],L.x,L.y,L.radius)&&(!C||C(ye))&&!ge(B,ye.overlapMode))return T.push(!0),!0}}}_forEachCell(e,o,f,y,x,T,P,C){const L=this._convertToXCellCoord(e),N=this._convertToYCellCoord(o),B=this._convertToXCellCoord(f),j=this._convertToYCellCoord(y);for(let K=L;K<=B;K++)for(let ee=N;ee<=j;ee++)if(x.call(this,e,o,f,y,this.xCellCount*ee+K,T,P,C))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,o,f,y,x,T){const P=y-e,C=x-o,L=f+T;return L*L>P*P+C*C}_circleAndRectCollide(e,o,f,y,x,T,P){const C=(T-y)/2,L=Math.abs(e-(y+C));if(L>C+f)return!1;const N=(P-x)/2,B=Math.abs(o-(x+N));if(B>N+f)return!1;if(L<=C||B<=N)return!0;const j=L-C,K=B-N;return j*j+K*K<=f*f}}function Oe(_,e,o){const f=s.K();if(!_){const{vecSouth:B,vecEast:j}=gt(e),K=E();K[0]=j[0],K[1]=j[1],K[2]=B[0],K[3]=B[1],y=K,(N=(T=(x=K)[0])*(L=x[3])-(C=x[2])*(P=x[1]))&&(y[0]=L*(N=1/N),y[1]=-P*N,y[2]=-C*N,y[3]=T*N),f[0]=K[0],f[1]=K[1],f[4]=K[2],f[5]=K[3]}var y,x,T,P,C,L,N;return s.M(f,f,[1/o,1/o,1]),f}function ht(_,e,o,f){if(_){const y=s.K();if(!e){const{vecSouth:x,vecEast:T}=gt(o);y[0]=T[0],y[1]=T[1],y[4]=x[0],y[5]=x[1]}return s.M(y,y,[f,f,1]),y}
vendor: 4,832 bytes, line 71
71return o.pixelsToClipSpaceMatrix}function gt(_){const e=Math.cos(_.rollInRadians),o=Math.sin(_.rollInRadians),f=Math.cos(_.pitchInRadians),y=Math.cos(_.bearingInRadians),x=Math.sin(_.bearingInRadians),T=s.ao();T[0]=-y*f*o-x*e,T[1]=-x*f*o+y*e;const P=s.ap(T);P<1e-9?s.aq(T):s.ar(T,T,1/P);const C=s.ao();C[0]=y*f*e-x*o,C[1]=x*f*e+y*o;const L=s.ap(C);return L<1e-9?s.aq(C):s.ar(C,C,1/L),{vecEast:C,vecSouth:T}}function Xe(_,e,o,f){let y;f?(y=[_,e,f(_,e),1],s.at(y,y,o)):(y=[_,e,0,1],ba(y,y,o));const x=y[3];return{point:new s.P(y[0]/x,y[1]/x),signedDistanceFromCamera:x,isOccluded:!1}}function Ot(_,e){return .5+_/e*.5}function Mt(_,e){return _.x>=-e[0]&&_.x<=e[0]&&_.y>=-e[1]&&_.y<=e[1]}function Dt(_,e,o,f,y,x,T,P,C,L,N,B,j){const K=o?_.textSizeData:_.iconSizeData,ee=s.ak(K,e.transform.zoom),me=[256/e.width*2+1,256/e.height*2+1],pe=o?_.text.dynamicLayoutVertexArray:_.icon.dynamicLayoutVertexArray;pe.clear();const ye=_.lineVertexArray,be=o?_.text.placedSymbolArray:_.icon.placedSymbolArray,Ee=e.transform.width/e.transform.height;let xe=!1;for(let Pe=0;Pe<be.length;Pe++){const Ie=be.get(Pe);if(Ie.hidden||Ie.writingMode===s.al.vertical&&!xe){Cn(Ie.numGlyphs,pe);continue}xe=!1;const Ce=new s.P(Ie.anchorX,Ie.anchorY),Ge={getElevation:j,pitchedLabelPlaneMatrix:f,lineVertexArray:ye,pitchWithMap:x,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:e.transform,tileAnchorPoint:Ce,unwrappedTileID:C,width:L,height:N,translation:B},ct=nr(Ie.anchorX,Ie.anchorY,Ge);if(!Mt(ct.point,me)){Cn(Ie.numGlyphs,pe);continue}const at=Ot(e.transform.cameraToCenterDistance,ct.signedDistanceFromCamera),Ke=s.am(K,ee,Ie),lt=x?Ke*e.transform.getPitchedTextCorrection(Ie.anchorX,Ie.anchorY,C)/at:Ke*at,At=Wt({projectionContext:Ge,pitchedLabelPlaneMatrixInverse:y,symbol:Ie,fontSize:lt,flip:!1,keepUpright:T,glyphOffsetArray:_.glyphOffsetArray,dynamicLayoutVertexArray:pe,aspectRatio:Ee,rotateToLine:P});xe=At.useVertical,(At.notEnoughRoom||xe||At.needsFlipping&&Wt({projectionContext:Ge,pitchedLabelPlaneMatrixInverse:y,symbol:Ie,fontSize:lt,flip:!0,keepUpright:T,glyphOffsetArray:_.glyphOffsetArray,dynamicLayoutVertexArray:pe,aspectRatio:Ee,rotateToLine:P}).notEnoughRoom)&&Cn(Ie.numGlyphs,pe)}o?_.text.dynamicLayoutVertexBuffer.updateData(pe):_.icon.dynamicLayoutVertexBuffer.updateData(pe)}function Et(_,e,o,f,y,x,T,P){const C=x.glyphStartIndex+x.numGlyphs,L=x.lineStartIndex,N=x.lineStartIndex+x.lineLength,B=e.getoffsetX(x.glyphStartIndex),j=e.getoffsetX(C-1),K=Ci(_*B,o,f,y,x.segment,L,N,P,T);if(!K)return null;const ee=Ci(_*j,o,f,y,x.segment,L,N,P,T);return ee?P.projectionCache.anyProjectionOccluded?null:{first:K,last:ee}:null}function He(_,e,o,f){return _===s.al.horizontal&&Math.abs(o.y-e.y)>Math.abs(o.x-e.x)*f?{useVertical:!0}:(_===s.al.vertical?e.y<o.y:e.x>o.x)?{needsFlipping:!0}:null}function Wt(_){const{projectionContext:e,pitchedLabelPlaneMatrixInverse:o,symbol:f,fontSize:y,flip:x,keepUpright:T,glyphOffsetArray:P,dynamicLayoutVertexArray:C,aspectRatio:L,rotateToLine:N}=_,B=y/24,j=f.lineOffsetX*B,K=f.lineOffsetY*B;let ee;if(f.numGlyphs>1){const me=f.glyphStartIndex+f.numGlyphs,pe=f.lineStartIndex,ye=f.lineStartIndex+f.lineLength,be=Et(B,P,j,K,x,f,N,e);if(!be)return{notEnoughRoom:!0};const Ee=Zr(be.first.point.x,be.first.point.y,e,o),xe=Zr(be.last.point.x,be.last.point.y,e,o);if(T&&!x){const Pe=He(f.writingMode,Ee,xe,L);if(Pe)return Pe}ee=[be.first];for(let Pe=f.glyphStartIndex+1;Pe<me-1;Pe++)ee.push(Ci(B*P.getoffsetX(Pe),j,K,x,f.segment,pe,ye,e,N));ee.push(be.last)}else{if(T&&!x){const pe=vr(e.tileAnchorPoint.x,e.tileAnchorPoint.y,e).point,ye=f.lineStartIndex+f.segment+1,be=new s.P(e.lineVertexArray.getx(ye),e.lineVertexArray.gety(ye)),Ee=vr(be.x,be.y,e),xe=Ee.signedDistanceFromCamera>0?Ee.point:Lt(e.tileAnchorPoint,be,pe,1,e),Pe=Zr(pe.x,pe.y,e,o),Ie=Zr(xe.x,xe.y,e,o),Ce=He(f.writingMode,Pe,Ie,L);if(Ce)return Ce}const me=Ci(B*P.getoffsetX(f.glyphStartIndex),j,K,x,f.segment,f.lineStartIndex,f.lineStartIndex+f.lineLength,e,N);if(!me||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ee=[me]}for(const me of ee)s.as(C,me.point,me.angle);return{}}function Lt(_,e,o,f,y){const x=_.add(_.sub(e)._unit()),T=vr(x.x,x.y,y).point,P=o.sub(T);return o.add(P._mult(f/P.mag()))}function sr(_,e,o){const f=e.projectionCache;if(f.projections[_])return f.projections[_];const y=new s.P(e.lineVertexArray.getx(_),e.lineVertexArray.gety(_)),x=vr(y.x,y.y,e);if(x.signedDistanceFromCamera>0)return f.projections[_]=x.point,f.anyProjectionOccluded=f.anyProjectionOccluded||x.isOccluded,x.point;const T=_-o.direction;return Lt(o.distanceFromAnchor===0?e.tileAnchorPoint:new s.P(e.lineVertexArray.getx(T),e.lineVertexArray.gety(T)),y,o.previousVertex,o.absOffsetX-o.distanceFromAnchor+1,e)}function vr(_,e,o){const f=_+o.translation[0],y=e+o.translation[1];let x;
vendor: 4,496 bytes, line 71
71return o.pitchWithMap?(x=Xe(f,y,o.pitchedLabelPlaneMatrix,o.getElevation),x.isOccluded=!1):(x=o.transform.projectTileCoordinates(f,y,o.unwrappedTileID,o.getElevation),x.point.x=(.5*x.point.x+.5)*o.width,x.point.y=(.5*-x.point.y+.5)*o.height),x}function Zr(_,e,o,f){if(o.pitchWithMap){const y=[_,e,0,1];return s.at(y,y,f),o.transform.projectTileCoordinates(y[0]/y[3],y[1]/y[3],o.unwrappedTileID,o.getElevation).point}return{x:_/o.width*2-1,y:e/o.height*2-1}}function nr(_,e,o){return o.transform.projectTileCoordinates(_,e,o.unwrappedTileID,o.getElevation)}function Tr(_,e,o){return _._unit()._perp()._mult(e*o)}function ka(_,e,o,f,y,x,T,P,C){if(P.projectionCache.offsets[_])return P.projectionCache.offsets[_];const L=o.add(e);if(_+C.direction<f||_+C.direction>=y)return P.projectionCache.offsets[_]=L,L;const N=sr(_+C.direction,P,C),B=Tr(N.sub(o),T,C.direction),j=o.add(B),K=N.add(B);return P.projectionCache.offsets[_]=s.au(x,L,j,K)||L,P.projectionCache.offsets[_]}function Ci(_,e,o,f,y,x,T,P,C){const L=f?_-e:_+e;let N=L>0?1:-1,B=0;f&&(N*=-1,B=Math.PI),N<0&&(B+=Math.PI);let j,K=N>0?x+y:x+y+1;P.projectionCache.cachedAnchorPoint?j=P.projectionCache.cachedAnchorPoint:(j=vr(P.tileAnchorPoint.x,P.tileAnchorPoint.y,P).point,P.projectionCache.cachedAnchorPoint=j);let ee,me,pe=j,ye=j,be=0,Ee=0;const xe=Math.abs(L),Pe=[];let Ie;for(;be+Ee<=xe;){if(K+=N,K<x||K>=T)return null;be+=Ee,ye=pe,me=ee;const ct={absOffsetX:xe,direction:N,distanceFromAnchor:be,previousVertex:ye};if(pe=sr(K,P,ct),o===0)Pe.push(ye),Ie=pe.sub(ye);else{let at;const Ke=pe.sub(ye);at=Ke.mag()===0?Tr(sr(K+N,P,ct).sub(pe),o,N):Tr(Ke,o,N),me||(me=ye.add(at)),ee=ka(K,at,pe,x,T,me,o,P,ct),Pe.push(me),Ie=ee.sub(me)}Ee=Ie.mag()}const Ce=Ie._mult((xe-be)/Ee)._add(me||ye),Ge=B+Math.atan2(pe.y-ye.y,pe.x-ye.x);return Pe.push(Ce),{point:Ce,angle:C?Ge:0,path:Pe}}const Da=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Cn(_,e){for(let o=0;o<_;o++){const f=e.length;e.resize(f+4),e.float32.set(Da,3*f)}}function ba(_,e,o){const f=e[0],y=e[1];return _[0]=o[0]*f+o[4]*y+o[12],_[1]=o[1]*f+o[5]*y+o[13],_[3]=o[3]*f+o[7]*y+o[15],_}const gr=100;class wi{constructor(e,o=new Te(e.width+200,e.height+200,25),f=new Te(e.width+200,e.height+200,25)){this.transform=e,this.grid=o,this.ignoredGrid=f,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+gr,this.screenBottomBoundary=e.height+gr,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,o,f,y,x,T,P,C,L,N,B,j){const K=this.projectAndGetPerspectiveRatio(e.anchorPointX+C[0],e.anchorPointY+C[1],x,N,j),ee=f*K.perspectiveRatio;let me;if(T||P)me=this._projectCollisionBox(e,ee,y,x,T,P,C,K,N,B,j);else{const Ie=K.x+(B?B.x*ee:0),Ce=K.y+(B?B.y*ee:0);me={allPointsOccluded:!1,box:[Ie+e.x1*ee,Ce+e.y1*ee,Ie+e.x2*ee,Ce+e.y2*ee]}}const[pe,ye,be,Ee]=me.box,xe=T?me.allPointsOccluded:K.isOccluded;let Pe=xe;return Pe||(Pe=K.perspectiveRatio<this.perspectiveRatioCutoff),Pe||(Pe=!this.isInsideGrid(pe,ye,be,Ee)),Pe||o!=="always"&&this.grid.hitTest(pe,ye,be,Ee,o,L)?{box:[pe,ye,be,Ee],placeable:!1,offscreen:!1,occluded:xe}:{box:[pe,ye,be,Ee],placeable:!0,offscreen:this.isOffscreen(pe,ye,be,Ee),occluded:xe}}placeCollisionCircles(e,o,f,y,x,T,P,C,L,N,B,j,K,ee){const me=[],pe=new s.P(o.anchorX,o.anchorY),ye=this.getPerspectiveRatio(pe.x,pe.y,T,ee),be=(L?x*this.transform.getPitchedTextCorrection(o.anchorX,o.anchorY,T)/ye:x*ye)/s.ay,Ee={getElevation:ee,pitchedLabelPlaneMatrix:P,lineVertexArray:f,pitchWithMap:L,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:pe,unwrappedTileID:T,width:this.transform.width,height:this.transform.height,translation:K},xe=Et(be,y,o.lineOffsetX*be,o.lineOffsetY*be,!1,o,!1,Ee);let Pe=!1,Ie=!1,Ce=!0;if(xe){const Ge=.5*B*ye+j,ct=new s.P(-100,-100),at=new s.P(this.screenRightBoundary,this.screenBottomBoundary),Ke=new vt,lt=xe.first,At=xe.last;let Vt=[];for(let mr=lt.path.length-1;mr>=1;mr--)Vt.push(lt.path[mr]);for(let mr=1;mr<At.path.length;mr++)Vt.push(At.path[mr]);const yt=2.5*Ge;if(L){const mr=this.projectPathToScreenSpace(Vt,Ee);Vt=mr.some(Wr=>Wr.signedDistanceFromCamera<=0)?[]:mr.map(Wr=>Wr.point)}let zt=[];if(Vt.length>0){const mr=Vt[0].clone(),Wr=Vt[0].clone();for(let dn=1;dn<Vt.length;dn++)mr.x=Math.min(mr.x,Vt[dn].x),mr.y=Math.min(mr.y,Vt[dn].y),Wr.x=Math.max(Wr.x,Vt[dn].x),Wr.y=Math.max(Wr.y,Vt[dn].y);zt=mr.x>
vendor: 1,128 bytes, line 71
71=ct.x&&Wr.x<=at.x&&mr.y>=ct.y&&Wr.y<=at.y?[Vt]:Wr.x<ct.x||mr.x>at.x||Wr.y<ct.y||mr.y>at.y?[]:s.av([Vt],ct.x,ct.y,at.x,at.y)}for(const mr of zt){Ke.reset(mr,.25*Ge);let Wr=0;Wr=Ke.length<=.5*Ge?1:Math.ceil(Ke.paddedLength/yt)+1;for(let dn=0;dn<Wr;dn++){const tn=dn/Math.max(Wr-1,1),vn=Ke.lerp(tn),_n=vn.x+gr,nn=vn.y+gr;me.push(_n,nn,Ge,0);const Or=_n-Ge,Kn=nn-Ge,si=_n+Ge,fi=nn+Ge;if(Ce=Ce&&this.isOffscreen(Or,Kn,si,fi),Ie=Ie||this.isInsideGrid(Or,Kn,si,fi),e!=="always"&&this.grid.hitTestCircle(_n,nn,Ge,e,N)&&(Pe=!0,!C))return{circles:[],offscreen:!1,collisionDetected:Pe}}}}return{circles:!C&&Pe||!Ie||ye<this.perspectiveRatioCutoff?[]:me,offscreen:Ce,collisionDetected:Pe}}projectPathToScreenSpace(e,o){const f=function(y,x){const T=s.K();return s.an(T,x.pitchedLabelPlaneMatrix),y.map(P=>{const C=Xe(P.x,P.y,T,x.getElevation),L=x.transform.projectTileCoordinates(C.point.x,C.point.y,x.unwrappedTileID,x.getElevation);return L.point.x=(.5*L.point.x+.5)*x.width,L.point.y=(.5*-L.point.y+.5)*x.height,L})}(e,o);return function(y){let x=0,T=0,P=0,C=0;for(let L=0;L<y.length;L++)y[L].isOccluded?(P=L+1,C=0):(C++,C>T&&(T=C,x=P));
vendor: 34,858 bytes, lines 71-138
71return y.slice(x,x+T)}(f)}queryRenderedSymbols(e){if(e.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const o=[];let f=1/0,y=1/0,x=-1/0,T=-1/0;for(const N of e){const B=new s.P(N.x+gr,N.y+gr);f=Math.min(f,B.x),y=Math.min(y,B.y),x=Math.max(x,B.x),T=Math.max(T,B.y),o.push(B)}const P=this.grid.query(f,y,x,T).concat(this.ignoredGrid.query(f,y,x,T)),C={},L={};for(const N of P){const B=N.key;if(C[B.bucketInstanceId]===void 0&&(C[B.bucketInstanceId]={}),C[B.bucketInstanceId][B.featureIndex])continue;const j=[new s.P(N.x1,N.y1),new s.P(N.x2,N.y1),new s.P(N.x2,N.y2),new s.P(N.x1,N.y2)];s.aw(o,j)&&(C[B.bucketInstanceId][B.featureIndex]=!0,L[B.bucketInstanceId]===void 0&&(L[B.bucketInstanceId]=[]),L[B.bucketInstanceId].push(B.featureIndex))}return L}insertCollisionBox(e,o,f,y,x,T){(f?this.ignoredGrid:this.grid).insert({bucketInstanceId:y,featureIndex:x,collisionGroupID:T,overlapMode:o},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,o,f,y,x,T){const P=f?this.ignoredGrid:this.grid,C={bucketInstanceId:y,featureIndex:x,collisionGroupID:T,overlapMode:o};for(let L=0;L<e.length;L+=4)P.insertCircle(C,e[L],e[L+1],e[L+2])}projectAndGetPerspectiveRatio(e,o,f,y,x){if(x){let T;y?(T=[e,o,y(e,o),1],s.at(T,T,x)):(T=[e,o,0,1],ba(T,T,x));const P=T[3];return{x:(T[0]/P+1)/2*this.transform.width+gr,y:(-T[1]/P+1)/2*this.transform.height+gr,perspectiveRatio:.5+this.transform.cameraToCenterDistance/P*.5,isOccluded:!1,signedDistanceFromCamera:P}}{const T=this.transform.projectTileCoordinates(e,o,f,y);return{x:(T.point.x+1)/2*this.transform.width+gr,y:(1-T.point.y)/2*this.transform.height+gr,perspectiveRatio:.5+this.transform.cameraToCenterDistance/T.signedDistanceFromCamera*.5,isOccluded:T.isOccluded,signedDistanceFromCamera:T.signedDistanceFromCamera}}}getPerspectiveRatio(e,o,f,y){const x=this.transform.projectTileCoordinates(e,o,f,y);return .5+this.transform.cameraToCenterDistance/x.signedDistanceFromCamera*.5}isOffscreen(e,o,f,y){return f<gr||e>=this.screenRightBoundary||y<gr||o>this.screenBottomBoundary}isInsideGrid(e,o,f,y){return f>=0&&e<this.gridRightBoundary&&y>=0&&o<this.gridBottomBoundary}getViewportMatrix(){const e=s.ad([]);return s.L(e,e,[-100,-100,0]),e}_projectCollisionBox(e,o,f,y,x,T,P,C,L,N,B){let j=1,K=0,ee=0,me=1;const pe=e.anchorPointX+P[0],ye=e.anchorPointY+P[1];if(T&&!x){const Vt=this.projectAndGetPerspectiveRatio(pe+1,ye,y,L,B),yt=Vt.x-C.x,zt=Math.atan((Vt.y-C.y)/yt)+(yt<0?Math.PI:0),mr=Math.sin(zt),Wr=Math.cos(zt);j=Wr,K=mr,ee=-mr,me=Wr}else if(!T&&x){const Vt=gt(this.transform);j=Vt.vecEast[0],K=Vt.vecEast[1],ee=Vt.vecSouth[0],me=Vt.vecSouth[1]}let be=C.x,Ee=C.y,xe=o;x&&(be=pe,Ee=ye,xe=Math.pow(2,-(this.transform.zoom-f.overscaledZ)),xe*=this.transform.getPitchedTextCorrection(pe,ye,y),N||(xe*=s.ae(.5+C.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),N&&(be+=j*N.x*xe+ee*N.y*xe,Ee+=K*N.x*xe+me*N.y*xe);const Pe=e.x1*xe,Ie=e.x2*xe,Ce=(Pe+Ie)/2,Ge=e.y1*xe,ct=e.y2*xe,at=(Ge+ct)/2,Ke=[{offsetX:Pe,offsetY:Ge},{offsetX:Ce,offsetY:Ge},{offsetX:Ie,offsetY:Ge},{offsetX:Ie,offsetY:at},{offsetX:Ie,offsetY:ct},{offsetX:Ce,offsetY:ct},{offsetX:Pe,offsetY:ct},{offsetX:Pe,offsetY:at}];let lt=[];for(const{offsetX:Vt,offsetY:yt}of Ke)lt.push(new s.P(be+j*Vt+ee*yt,Ee+K*Vt+me*yt));let At=!1;if(x){const Vt=lt.map(yt=>this.projectAndGetPerspectiveRatio(yt.x,yt.y,y,L,B));At=Vt.some(yt=>!yt.isOccluded),lt=Vt.map(yt=>new s.P(yt.x,yt.y))}else At=!0;return{box:s.ax(lt),allPointsOccluded:!At}}}class Rr{constructor(e,o,f,y){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?o:-o))):y&&f?1:0,this.placed=f}isHidden(){return this.opacity===0&&!this.placed}}class rs{constructor(e,o,f,y,x){this.text=new Rr(e?e.text:null,o,f,x),this.icon=new Rr(e?e.icon:null,o,y,x)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Pr{constructor(e,o,f){this.text=e,this.icon=o,this.skipFade=f}}class Vi{constructor(e,o,f,y,x){this.bucketInstanceId=e,this.featureIndex=o,this.sourceLayerIndex=f,this.bucketIndex=y,this.tileID=x}}class Yi{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){const o=++this.maxGroupID;this.collisionGroups[e]={ID:o,predicate:f=>f.collisionGroupID===o}}return this.collisionGroups[e]}}function Si(_,e,o,f,y){const{horizontalAlign:x,verticalAlign:T}=s.aE(_);return new s.P(-(x-.5)*e+f[0]*y,-(T-.5)*o+f[1]*y)}class Bi{constructor(e,o,f,y,x){this.transform=e.clone(),this.terrain=o,this.collisionIndex=new wi(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=f,this.retainedQueryData={},this.collisionGroups=new Yi(y),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=x,x&&(x.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){const o=this.terrain;return o?(f,y)=>o.getElevation(e,f,y):null}getBucketParts(e,o,f,y){const x=f.getBucket(o),T=f.latestFeatureIndex;if(!x||!T||o.id!==x.layerIds[0])return;const P=f.collisionBoxArray,C=x.layers[0].layout,L=x.layers[0].paint,N=Math.pow(2,this.transform.zoom-f.tileID.overscaledZ),B=f.tileSize/s.Z,j=f.tileID.toUnwrapped(),K=C.get("text-rotation-alignment")==="map",ee=s.az(f,1,this.transform.zoom),me=s.aA(this.collisionIndex.transform,f,L.get("text-translate"),L.get("text-translate-anchor")),pe=s.aA(this.collisionIndex.transform,f,L.get("icon-translate"),L.get("icon-translate-anchor")),ye=Oe(K,this.transform,ee);this.retainedQueryData[x.bucketInstanceId]=new Vi(x.bucketInstanceId,T,x.sourceLayerIndex,x.index,f.tileID);const be={bucket:x,layout:C,translationText:me,translationIcon:pe,unwrappedTileID:j,pitchedLabelPlaneMatrix:ye,scale:N,textPixelRatio:B,holdingForFade:f.holdingForFade(),collisionBoxArray:P,partiallyEvaluatedTextSize:s.ak(x.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(x.sourceID)};if(y)for(const Ee of x.sortKeyRanges){const{sortKey:xe,symbolInstanceStart:Pe,symbolInstanceEnd:Ie}=Ee;e.push({sortKey:xe,symbolInstanceStart:Pe,symbolInstanceEnd:Ie,parameters:be})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:x.symbolInstances.length,parameters:be})}attemptAnchorPlacement(e,o,f,y,x,T,P,C,L,N,B,j,K,ee,me,pe,ye,be,Ee,xe){const Pe=s.aB[e.textAnchor],Ie=[e.textOffset0,e.textOffset1],Ce=Si(Pe,f,y,Ie,x),Ge=this.collisionIndex.placeCollisionBox(o,j,C,L,N,P,T,pe,B.predicate,Ee,Ce,xe);if((!be||this.collisionIndex.placeCollisionBox(be,j,C,L,N,P,T,ye,B.predicate,Ee,Ce,xe).placeable)&&Ge.placeable){let ct;if(this.prevPlacement&&this.prevPlacement.variableOffsets[K.crossTileID]&&this.prevPlacement.placements[K.crossTileID]&&this.prevPlacement.placements[K.crossTileID].text&&(ct=this.prevPlacement.variableOffsets[K.crossTileID].anchor),K.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[K.crossTileID]={textOffset:Ie,width:f,height:y,anchor:Pe,textBoxScale:x,prevAnchor:ct},this.markUsedJustification(ee,Pe,K,me),ee.allowVerticalPlacement&&(this.markUsedOrientation(ee,me,K),this.placedOrientations[K.crossTileID]=me),{shift:Ce,placedGlyphBoxes:Ge}}}placeLayerBucketPart(e,o,f){const{bucket:y,layout:x,translationText:T,translationIcon:P,unwrappedTileID:C,pitchedLabelPlaneMatrix:L,textPixelRatio:N,holdingForFade:B,collisionBoxArray:j,partiallyEvaluatedTextSize:K,collisionGroup:ee}=e.parameters,me=x.get("text-optional"),pe=x.get("icon-optional"),ye=s.aC(x,"text-overlap","text-allow-overlap"),be=ye==="always",Ee=s.aC(x,"icon-overlap","icon-allow-overlap"),xe=Ee==="always",Pe=x.get("text-rotation-alignment")==="map",Ie=x.get("text-pitch-alignment")==="map",Ce=x.get("icon-text-fit")!=="none",Ge=x.get("symbol-z-order")==="viewport-y",ct=be&&(xe||!y.hasIconData()||pe),at=xe&&(be||!y.hasTextData()||me);!y.collisionArrays&&j&&y.deserializeCollisionBoxes(j);const Ke=this.retainedQueryData[y.bucketInstanceId].tileID,lt=this._getTerrainElevationFunc(Ke),At=this.transform.getFastPathSimpleProjectionMatrix(Ke),Vt=(yt,zt,mr)=>{var Wr,dn;if(o[yt.crossTileID])return;if(B)return void(this.placements[yt.crossTileID]=new Pr(!1,!1,!1));let tn=!1,vn=!1,_n=!0,nn=null,Or={box:null,placeable:!1,offscreen:null,occluded:!1},Kn={placeable:!1},si=null,fi=null,Vr=null,qs=0,Ma=0,ds=0;zt.textFeatureIndex?qs=zt.textFeatureIndex:yt.useRuntimeCollisionCircles&&(qs=yt.featureIndex),zt.verticalTextFeatureIndex&&(Ma=zt.verticalTextFeatureIndex);const Io=zt.textBox;if(Io){const fa=Fn=>{let Zn=s.al.horizontal;if(y.allowVerticalPlacement&&!Fn&&this.prevPlacement){const Ki=this.prevPlacement.placedOrientations[yt.crossTileID];Ki&&(this.placedOrientations[yt.crossTileID]=Ki,Zn=Ki,this.markUsedOrientation(y,Zn,yt))}return Zn},Ks=(Fn,Zn)=>{if(y.allowVerticalPlacement&&yt.numVerticalGlyphVertices>0&&zt.verticalTextBox){for(const Ki of y.writingModes)if(Ki===s.al.vertical?(Or=Zn(),Kn=Or):Or=Fn(),Or&&Or.placeable)break}else Or=Fn()},fs=yt.textAnchorOffsetStartIndex,Qs=yt.textAnchorOffsetEndIndex;if(Qs===fs){const Fn=(Zn,Ki)=>{const un=this.collisionIndex.placeCollisionBox(Zn,ye,N,Ke,C,Ie,Pe,T,ee.predicate,lt,void 0,At);return un&&un.placeable&&(this.markUsedOrientation(y,Ki,yt),this.placedOrientations[yt.crossTileID]=Ki),un};Ks(()=>Fn(Io,s.al.horizontal),()=>{const Zn=zt.verticalTextBox;return y.allowVerticalPlacement&&yt.numVerticalGlyphVertices>0&&Zn?Fn(Zn,s.al.vertical):{box:null,offscreen:null}}),fa(Or&&Or.placeable)}else{let Fn=s.aB[(dn=(Wr=this.prevPlacement)===null||Wr===void 0?void 0:Wr.variableOffsets[yt.crossTileID])===null||dn===void 0?void 0:dn.anchor];const Zn=(un,Rc,lf)=>{const qh=un.x2-un.x1,uf=un.y2-un.y1,Lc=yt.textBoxScale,Co=Ce&&Ee==="never"?Rc:null;let Za=null,Us=ye==="never"?1:2,ja="never";Fn&&Us++;for(let oi=0;oi<Us;oi++){for(let au=fs;au<Qs;au++){const ps=y.textAnchorOffsets.get(au);if(Fn&&ps.textAnchor!==Fn)continue;const Oc=this.attemptAnchorPlacement(ps,un,qh,uf,Lc,Pe,Ie,N,Ke,C,ee,ja,yt,y,lf,T,P,Co,lt);if(Oc&&(Za=Oc.placedGlyphBoxes,Za&&Za.placeable))return tn=!0,nn=Oc.shift,Za}Fn?Fn=null:ja=ye}return f&&!Za&&(Za={box:this.collisionIndex.placeCollisionBox(Io,"always",N,Ke,C,Ie,Pe,T,ee.predicate,lt,void 0,At).box,offscreen:!1,placeable:!1,occluded:!1}),Za};Ks(()=>Zn(Io,zt.iconBox,s.al.horizontal),()=>{const un=zt.verticalTextBox;return y.allowVerticalPlacement&&(!Or||!Or.placeable)&&yt.numVerticalGlyphVertices>0&&un?Zn(un,zt.verticalIconBox,s.al.vertical):{box:null,occluded:!0,offscreen:null}}),Or&&(tn=Or.placeable,_n=Or.offscreen);const Ki=fa(Or&&Or.placeable);if(!tn&&this.prevPlacement){const un=this.prevPlacement.variableOffsets[yt.crossTileID];un&&(this.variableOffsets[yt.crossTileID]=un,this.markUsedJustification(y,un.anchor,yt,Ki))}}}if(si=Or,tn=si&&si.placeable,_n=si&&si.offscreen,yt.useRuntimeCollisionCircles){const fa=y.text.placedSymbolArray.get(yt.centerJustifiedTextSymbolIndex),Ks=s.am(y.textSizeData,K,fa),fs=x.get("text-padding");fi=this.collisionIndex.placeCollisionCircles(ye,fa,y.lineVertexArray,y.glyphOffsetArray,Ks,C,L,f,Ie,ee.predicate,yt.collisionCircleDiameter,fs,T,lt),fi.circles.length&&fi.collisionDetected&&!f&&s.w("Collisions detected, but collision boxes are not shown"),tn=be||fi.circles.length>0&&!fi.collisionDetected,_n=_n&&fi.offscreen}if(zt.iconFeatureIndex&&(ds=zt.iconFeatureIndex),zt.iconBox){const fa=Ks=>this.collisionIndex.placeCollisionBox(Ks,Ee,N,Ke,C,Ie,Pe,P,ee.predicate,lt,Ce&&nn?nn:void 0,At);Kn&&Kn.placeable&&zt.verticalIconBox?(Vr=fa(zt.verticalIconBox),vn=Vr.placeable):(Vr=fa(zt.iconBox),vn=Vr.placeable),_n=_n&&Vr.offscreen}const dl=me||yt.numHorizontalGlyphVertices===0&&yt.numVerticalGlyphVertices===0,Hs=pe||yt.numIconVertices===0;dl||Hs?Hs?dl||(vn=vn&&tn):tn=vn&&tn:vn=tn=vn&&tn;const Uo=vn&&Vr.placeable;if(tn&&si.placeable&&this.collisionIndex.insertCollisionBox(si.box,ye,x.get("text-ignore-placement"),y.bucketInstanceId,Kn&&Kn.placeable&&Ma?Ma:qs,ee.ID),Uo&&this.collisionIndex.insertCollisionBox(Vr.box,Ee,x.get("icon-ignore-placement"),y.bucketInstanceId,ds,ee.ID),fi&&tn&&this.collisionIndex.insertCollisionCircles(fi.circles,ye,x.get("text-ignore-placement"),y.bucketInstanceId,qs,ee.ID),f&&this.storeCollisionData(y.bucketInstanceId,mr,zt,si,Vr,fi),yt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(y.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[yt.crossTileID]=new Pr((tn||ct)&&!(si!=null&&si.occluded),(vn||at)&&!(Vr!=null&&Vr.occluded),_n||y.justReloaded),o[yt.crossTileID]=!0};if(Ge){if(e.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const yt=y.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let zt=yt.length-1;zt>=0;--zt){const mr=yt[zt];Vt(y.symbolInstances.get(mr),y.collisionArrays[mr],mr)}}else for(let yt=e.symbolInstanceStart;yt<e.symbolInstanceEnd;yt++)Vt(y.symbolInstances.get(yt),y.collisionArrays[yt],yt);y.justReloaded=!1}storeCollisionData(e,o,f,y,x,T){if(f.textBox||f.iconBox){let P,C;this.collisionBoxArrays.has(e)?P=this.collisionBoxArrays.get(e):(P=new Map,this.collisionBoxArrays.set(e,P)),P.has(o)?C=P.get(o):(C={text:null,icon:null},P.set(o,C)),f.textBox&&(C.text=y.box),f.iconBox&&(C.icon=x.box)}if(T){let P=this.collisionCircleArrays[e];P===void 0&&(P=this.collisionCircleArrays[e]=[]);for(let C=0;C<T.circles.length;C+=4)P.push(T.circles[C+0]-gr),P.push(T.circles[C+1]-gr),P.push(T.circles[C+2]),P.push(T.collisionDetected?1:0)}}markUsedJustification(e,o,f,y){let x;x=y===s.al.vertical?f.verticalPlacedTextSymbolIndex:{left:f.leftJustifiedTextSymbolIndex,center:f.centerJustifiedTextSymbolIndex,right:f.rightJustifiedTextSymbolIndex}[s.aD(o)];const T=[f.leftJustifiedTextSymbolIndex,f.centerJustifiedTextSymbolIndex,f.rightJustifiedTextSymbolIndex,f.verticalPlacedTextSymbolIndex];for(const P of T)P>=0&&(e.text.placedSymbolArray.get(P).crossTileID=x>=0&&P!==x?0:f.crossTileID)}markUsedOrientation(e,o,f){const y=o===s.al.horizontal||o===s.al.horizontalOnly?o:0,x=o===s.al.vertical?o:0,T=[f.leftJustifiedTextSymbolIndex,f.centerJustifiedTextSymbolIndex,f.rightJustifiedTextSymbolIndex];for(const P of T)e.text.placedSymbolArray.get(P).placedOrientation=y;f.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(f.verticalPlacedTextSymbolIndex).placedOrientation=x)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const o=this.prevPlacement;let f=!1;this.prevZoomAdjustment=o?o.zoomAdjustment(this.transform.zoom):0;const y=o?o.symbolFadeChange(e):1,x=o?o.opacities:{},T=o?o.variableOffsets:{},P=o?o.placedOrientations:{};for(const C in this.placements){const L=this.placements[C],N=x[C];N?(this.opacities[C]=new rs(N,y,L.text,L.icon),f=f||L.text!==N.text.placed||L.icon!==N.icon.placed):(this.opacities[C]=new rs(null,y,L.text,L.icon,L.skipFade),f=f||L.text||L.icon)}for(const C in x){const L=x[C];if(!this.opacities[C]){const N=new rs(L,y,!1,!1);N.isHidden()||(this.opacities[C]=N,f=f||L.text.placed||L.icon.placed)}}for(const C in T)this.variableOffsets[C]||!this.opacities[C]||this.opacities[C].isHidden()||(this.variableOffsets[C]=T[C]);for(const C in P)this.placedOrientations[C]||!this.opacities[C]||this.opacities[C].isHidden()||(this.placedOrientations[C]=P[C]);if(o&&o.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");f?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=o?o.lastPlacementChangeTime:e)}updateLayerOpacities(e,o){const f={};for(const y of o){const x=y.getBucket(e);x&&y.latestFeatureIndex&&e.id===x.layerIds[0]&&this.updateBucketOpacities(x,y.tileID,f,y.collisionBoxArray)}}updateBucketOpacities(e,o,f,y){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();const x=e.layers[0],T=x.layout,P=new rs(null,0,!1,!1,!0),C=T.get("text-allow-overlap"),L=T.get("icon-allow-overlap"),N=x._unevaluatedLayout.hasValue("text-variable-anchor")||x._unevaluatedLayout.hasValue("text-variable-anchor-offset"),B=T.get("text-rotation-alignment")==="map",j=T.get("text-pitch-alignment")==="map",K=T.get("icon-text-fit")!=="none",ee=new rs(null,0,C&&(L||!e.hasIconData()||T.get("icon-optional")),L&&(C||!e.hasTextData()||T.get("text-optional")),!0);!e.collisionArrays&&y&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(y);const me=(ye,be,Ee)=>{for(let xe=0;xe<be/4;xe++)ye.opacityVertexArray.emplaceBack(Ee);ye.hasVisibleVertices=ye.hasVisibleVertices||Ee!==$o},pe=this.collisionBoxArrays.get(e.bucketInstanceId);for(let ye=0;ye<e.symbolInstances.length;ye++){const be=e.symbolInstances.get(ye),{numHorizontalGlyphVertices:Ee,numVerticalGlyphVertices:xe,crossTileID:Pe}=be;let Ie=this.opacities[Pe];f[Pe]?Ie=P:Ie||(Ie=ee,this.opacities[Pe]=Ie),f[Pe]=!0;const Ce=be.numIconVertices>0,Ge=this.placedOrientations[be.crossTileID],ct=Ge===s.al.vertical,at=Ge===s.al.horizontal||Ge===s.al.horizontalOnly;if(Ee>0||xe>0){const lt=Vl(Ie.text);me(e.text,Ee,ct?$o:lt),me(e.text,xe,at?$o:lt);const At=Ie.text.isHidden();[be.rightJustifiedTextSymbolIndex,be.centerJustifiedTextSymbolIndex,be.leftJustifiedTextSymbolIndex].forEach(zt=>{zt>=0&&(e.text.placedSymbolArray.get(zt).hidden=At||ct?1:0)}),be.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(be.verticalPlacedTextSymbolIndex).hidden=At||at?1:0);const Vt=this.variableOffsets[be.crossTileID];Vt&&this.markUsedJustification(e,Vt.anchor,be,Ge);const yt=this.placedOrientations[be.crossTileID];yt&&(this.markUsedJustification(e,"left",be,yt),this.markUsedOrientation(e,yt,be))}if(Ce){const lt=Vl(Ie.icon),At=!(K&&be.verticalPlacedIconSymbolIndex&&ct);be.placedIconSymbolIndex>=0&&(me(e.icon,be.numIconVertices,At?lt:$o),e.icon.placedSymbolArray.get(be.placedIconSymbolIndex).hidden=Ie.icon.isHidden()),be.verticalPlacedIconSymbolIndex>=0&&(me(e.icon,be.numVerticalIconVertices,At?$o:lt),e.icon.placedSymbolArray.get(be.verticalPlacedIconSymbolIndex).hidden=Ie.icon.isHidden())}const Ke=pe&&pe.has(ye)?pe.get(ye):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){const lt=e.collisionArrays[ye];if(lt){let At=new s.P(0,0);if(lt.textBox||lt.verticalTextBox){let Vt=!0;if(N){const yt=this.variableOffsets[Pe];yt?(At=Si(yt.anchor,yt.width,yt.height,yt.textOffset,yt.textBoxScale),B&&At._rotate(j?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Vt=!1}if(lt.textBox||lt.verticalTextBox){let yt;lt.textBox&&(yt=ct),lt.verticalTextBox&&(yt=at),wn(e.textCollisionBox.collisionVertexArray,Ie.text.placed,!Vt||yt,Ke.text,At.x,At.y)}}if(lt.iconBox||lt.verticalIconBox){const Vt=!!(!at&<.verticalIconBox);let yt;lt.iconBox&&(yt=Vt),lt.verticalIconBox&&(yt=!Vt),wn(e.iconCollisionBox.collisionVertexArray,Ie.icon.placed,yt,Ke.icon,K?At.x:0,K?At.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,o){const f=this.zoomAtLastRecencyCheck===o?1-this.zoomAdjustment(o):1;return this.zoomAtLastRecencyCheck=o,this.commitTime+this.fadeDuration*f>e}setStale(){this.stale=!0}}function wn(_,e,o,f,y,x){f&&f.length!==0||(f=[0,0,0,0]);const T=f[0]-gr,P=f[1]-gr,C=f[2]-gr,L=f[3]-gr;_.emplaceBack(e?1:0,o?1:0,y||0,x||0,T,P),_.emplaceBack(e?1:0,o?1:0,y||0,x||0,C,P),_.emplaceBack(e?1:0,o?1:0,y||0,x||0,C,L),_.emplaceBack(e?1:0,o?1:0,y||0,x||0,T,L)}const ii=Math.pow(2,25),zs=Math.pow(2,24),hc=Math.pow(2,17),Tp=Math.pow(2,16),dc=Math.pow(2,9),fc=Math.pow(2,8),Cl=Math.pow(2,1);function Vl(_){if(_.opacity===0&&!_.placed)return 0;if(_.opacity===1&&_.placed)return 4294967295;const e=_.placed?1:0,o=Math.floor(127*_.opacity);return o*ii+e*zs+o*hc+e*Tp+o*dc+e*fc+o*Cl+e}const $o=0;class Th{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,o,f,y,x){const T=this._bucketParts;for(;this._currentTileIndex<e.length;)if(o.getBucketParts(T,y,e[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,x())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,T.sort((P,C)=>P.sortKey-C.sortKey));this._currentPartIndex<T.length;)if(o.placeLayerBucketPart(T[this._currentPartIndex],this._seenCrossTileIDs,f),this._currentPartIndex++,x())return!0;return!1}}class pc{constructor(e,o,f,y,x,T,P,C){this.placement=new Bi(e,o,T,P,C),this._currentPlacementIndex=f.length-1,this._forceFullPlacement=y,this._showCollisionBoxes=x,this._done=!1}isDone(){return this._done}continuePlacement(e,o,f){const y=D.now(),x=()=>!this._forceFullPlacement&&D.now()-y>2;for(;this._currentPlacementIndex>=0;){const T=o[e[this._currentPlacementIndex]],P=this.placement.collisionIndex.transform.zoom;if(T.type==="symbol"&&(!T.minzoom||T.minzoom<=P)&&(!T.maxzoom||T.maxzoom>P)){if(this._inProgressLayer||(this._inProgressLayer=new Th(T)),this._inProgressLayer.continuePlacement(f[T.source],this.placement,this._showCollisionBoxes,T,x))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const uo=512/s.Z/2;class wu{constructor(e,o,f){this.tileID=e,this.bucketInstanceId=f,this._symbolsByKey={};const y=new Map;for(let x=0;x<o.length;x++){const T=o.get(x),P=T.key,C=y.get(P);C?C.push(T):y.set(P,[T])}for(const[x,T]of y){const P={positions:T.map(C=>({x:Math.floor(C.anchorX*uo),y:Math.floor(C.anchorY*uo)})),crossTileIDs:T.map(C=>C.crossTileID)};if(P.positions.length>128){const C=new s.aF(P.positions.length,16,Uint16Array);for(const{x:L,y:N}of P.positions)C.add(L,N);C.finish(),delete P.positions,P.index=C}this._symbolsByKey[x]=P}}getScaledCoordinates(e,o){const{x:f,y,z:x}=this.tileID.canonical,{x:T,y:P,z:C}=o.canonical,L=uo/Math.pow(2,C-x),N=(P*s.Z+e.anchorY)*L,B=y*s.Z*uo;return{x:Math.floor((T*s.Z+e.anchorX)*L-f*s.Z*uo),y:Math.floor(N-B)}}findMatches(e,o,f){const y=this.tileID.canonical.z<o.canonical.z?1:Math.pow(2,this.tileID.canonical.z-o.canonical.z);for(let x=0;x<e.length;x++){const T=e.get(x);if(T.crossTileID)continue;const P=this._symbolsByKey[T.key];if(!P)continue;const C=this.getScaledCoordinates(T,o);if(P.index){const L=P.index.range(C.x-y,C.y-y,C.x+y,C.y+y).sort();for(const N of L){const B=P.crossTileIDs[N];if(!f[B]){f[B]=!0,T.crossTileID=B;break}}}else if(P.positions)for(let L=0;L<P.positions.length;L++){const N=P.positions[L],B=P.crossTileIDs[L];if(Math.abs(N.x-C.x)<=y&&Math.abs(N.y-C.y)<=y&&!f[B]){f[B]=!0,T.crossTileID=B;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:e})=>e)}}class Yu{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Su{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){const o=Math.round((e-this.lng)/360);if(o!==0)for(const f in this.indexes){const y=this.indexes[f],x={};for(const T in y){const P=y[T];P.tileID=P.tileID.unwrapTo(P.tileID.wrap+o),x[P.tileID.key]=P}this.indexes[f]=x}this.lng=e}addBucket(e,o,f){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===o.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let x=0;x<o.symbolInstances.length;x++)o.symbolInstances.get(x).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});const y=this.usedCrossTileIDs[e.overscaledZ];for(const x in this.indexes){const T=this.indexes[x];if(Number(x)>e.overscaledZ)for(const P in T){const C=T[P];C.tileID.isChildOf(e)&&C.findMatches(o.symbolInstances,e,y)}else{const P=T[e.scaledTo(Number(x)).key];P&&P.findMatches(o.symbolInstances,e,y)}}for(let x=0;x<o.symbolInstances.length;x++){const T=o.symbolInstances.get(x);T.crossTileID||(T.crossTileID=f.generate(),y[T.crossTileID]=!0)}return this.indexes[e.overscaledZ]===void 0&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new wu(e,o.symbolInstances,o.bucketInstanceId),!0}removeBucketCrossTileIDs(e,o){for(const f of o.getCrossTileIDsLists())for(const y of f)delete this.usedCrossTileIDs[e][y]}removeStaleBuckets(e){let o=!1;for(const f in this.indexes){const y=this.indexes[f];for(const x in y)e[y[x].bucketInstanceId]||(this.removeBucketCrossTileIDs(f,y[x]),delete y[x],o=!0)}return o}}class Go{constructor(){this.layerIndexes={},this.crossTileIDs=new Yu,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,o,f){let y=this.layerIndexes[e.id];y===void 0&&(y=this.layerIndexes[e.id]=new Su);let x=!1;const T={};y.handleWrapJump(f);for(const P of o){const C=P.getBucket(e);C&&e.id===C.layerIds[0]&&(C.bucketInstanceId||(C.bucketInstanceId=++this.maxBucketInstanceId),y.addBucket(P.tileID,C,this.crossTileIDs)&&(x=!0),T[C.bucketInstanceId]=!0)}return y.removeStaleBuckets(T)&&(x=!0),x}pruneUnusedLayers(e){const o={};e.forEach(f=>{o[f]=!0});for(const f in this.layerIndexes)o[f]||delete this.layerIndexes[f]}}var qr="void main() {fragColor=vec4(1.0);}";const Ai={prelude:Cr(`#ifdef GL_ES 72precision mediump float; 73#else 74#if !defined(lowp) 75#define lowp 76#endif 77#if !defined(mediump) 78#define mediump 79#endif 80#if !defined(highp) 81#define highp 82#endif 83#endif 84out highp vec4 fragColor;`,`#ifdef GL_ES 85precision highp float; 86#else 87#if !defined(lowp) 88#define lowp 89#endif 90#if !defined(mediump) 91#define mediump 92#endif 93#if !defined(highp) 94#define highp 95#endif 96#endif 97vec2 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 98);}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;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c 99);} 100#ifdef TERRAIN3D 101uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; 102#endif 103const 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) { 104#ifdef TERRAIN3D 105highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); 106#else 107return 1.0; 108#endif 109}float calculate_visibility(vec4 pos) { 110#ifdef TERRAIN3D 111vec3 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; 112#else 113return 1.0; 114#endif 115}float ele(vec2 pos) { 116#ifdef TERRAIN3D 117vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; 118#else 119return 0.0; 120#endif 121}float get_elevation(vec2 pos) { 122#ifdef TERRAIN3D 123#ifdef GLOBE 124if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} 125#endif 126vec2 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_exaggeration; 127#else 128return 0.0; 129#endif 130}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:Cr("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:Cr("",`#define GLOBE_RADIUS 6371008.8 131uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos 132);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); 133if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len 134);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:Cr(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; 135#ifdef OVERDRAW_INSPECTOR 136fragColor=vec4(1.0); 137#endif 138}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:Cr(`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;
138uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; 139#ifdef OVERDRAW_INSPECTOR 140fragColor=vec4(1.0); 141#endif 142}`,"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;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);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:Cr(`in vec3 v_data;in float v_visibility; 143#pragma mapbox: define highp vec4 color 144#pragma mapbox: define mediump float radius 145#pragma mapbox: define lowp float blur 146#pragma mapbox: define lowp float opacity 147#pragma mapbox: define highp vec4 stroke_color 148#pragma mapbox: define mediump float stroke_width 149#pragma mapbox: define lowp float stroke_opacity 150void main() { 151#pragma mapbox: initialize highp vec4 color 152#pragma mapbox: initialize mediump float radius 153#pragma mapbox: initialize lowp float blur 154#pragma mapbox: initialize lowp float opacity 155#pragma mapbox: initialize highp vec4 stroke_color 156#pragma mapbox: initialize mediump float stroke_width 157#pragma mapbox: initialize lowp float stroke_opacity 158vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;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));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} 159#ifdef OVERDRAW_INSPECTOR 160fragColor=vec4(1.0); 161#endif 162}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility; 163#pragma mapbox: define highp vec4 color 164#pragma mapbox: define mediump float radius 165#pragma mapbox: define lowp float blur 166#pragma mapbox: define lowp float opacity 167#pragma mapbox: define highp vec4 stroke_color 168#pragma mapbox: define mediump float stroke_width 169#pragma mapbox: define lowp float stroke_opacity 170void main(void) { 171#pragma mapbox: initialize highp vec4 color 172#pragma mapbox: initialize mediump float radius 173#pragma mapbox: initialize lowp float blur 174#pragma mapbox: initialize lowp float opacity 175#pragma mapbox: initialize highp vec4 stroke_color 176#pragma mapbox: initialize mediump float stroke_width 177#pragma mapbox: initialize lowp float stroke_opacity 178vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { 179#ifdef GLOBE 180vec3 center_vector=projectToSphere(circle_center); 181#endif 182float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else { 183#ifdef GLOBE 184vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); 185#else 186vec4 projected_center=projectTileWithElevation(circle_center,ele); 187#endif 188corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);} 189#ifdef GLOBE 190vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); 191#else 192gl_Position=projectTileWithElevation(corner_position,ele); 193#endif 194} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}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;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Cr(qr,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:Cr(`uniform highp float u_intensity;in vec2 v_extrude; 195#pragma mapbox: define highp float weight 196#define GAUSS_COEF 0.3989422804014327 197void main() { 198#pragma mapbox: initialize highp float weight 199float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0); 200#ifdef OVERDRAW_INSPECTOR 201fragColor=vec4(1.0); 202#endif 203}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude; 204#pragma mapbox: define highp float weight 205#pragma mapbox: define mediump float radius 206const highp float ZERO=1.0/255.0/16.0; 207#define GAUSS_COEF 0.3989422804014327 208void main(void) { 209#pragma mapbox: initialize highp float weight 210#pragma mapbox: initialize mediump float radius 211vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0); 212#ifdef GLOBE 213vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); 214#else 215gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); 216#endif 217}`),heatmapTexture:Cr(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; 218#ifdef OVERDRAW_INSPECTOR 219fragColor=vec4(0.0); 220#endif 221}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out 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:Cr("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Cr("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;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);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {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;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Cr("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:Cr(qr,`in vec2 a_pos;void main() { 222#ifdef GLOBE 223gl_Position=projectTileFor3D(a_pos,0.0); 224#else 225gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); 226#endif 227}`),fill:Cr(`#pragma mapbox: define highp vec4 color 228#pragma mapbox: define lowp float opacity 229void main() { 230#pragma mapbox: initialize highp vec4 color 231#pragma mapbox: initialize lowp float opacity 232fragColor=color*opacity; 233#ifdef OVERDRAW_INSPECTOR 234fragColor=vec4(1.0); 235#endif 236}`,`uniform vec2 u_fill_translate;in vec2 a_pos; 237#pragma mapbox: define highp vec4 color 238#pragma mapbox: define lowp float opacity 239void main() { 240#pragma mapbox: initialize highp vec4 color 241#pragma mapbox: initialize lowp float opacity 242gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:Cr(`in vec2 v_pos; 243#ifdef GLOBE 244in float v_depth; 245#endif 246#pragma mapbox: define highp vec4 outline_color 247#pragma mapbox: define lowp float opacity 248void main() { 249#pragma mapbox: initialize highp vec4 outline_color 250#pragma mapbox: initialize lowp float opacity 251float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); 252#ifdef GLOBE 253if (v_depth > 1.0) {discard;} 254#endif 255#ifdef OVERDRAW_INSPECTOR 256fragColor=vec4(1.0); 257#endif 258}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; 259#ifdef GLOBE 260out float v_depth; 261#endif 262#pragma mapbox: define highp vec4 outline_color 263#pragma mapbox: define lowp float opacity 264void main() { 265#pragma mapbox: initialize highp vec4 outline_color 266#pragma mapbox: initialize lowp float opacity 267gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; 268#ifdef GLOBE 269v_depth=gl_Position.z/gl_Position.w; 270#endif 271}`),fillOutlinePattern:Cr(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; 272#ifdef GLOBE 273in float v_depth; 274#endif 275#pragma mapbox: define lowp float opacity 276#pragma mapbox: define lowp vec4 pattern_from 277#pragma mapbox: define lowp vec4 pattern_to 278void main() { 279#pragma mapbox: initialize lowp float opacity 280#pragma mapbox: initialize mediump vec4 pattern_from 281#pragma mapbox: initialize mediump vec4 pattern_to 282vec2 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=texture(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=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity; 283#ifdef GLOBE 284if (v_depth > 1.0) {discard;} 285#endif 286#ifdef OVERDRAW_INSPECTOR 287fragColor=vec4(1.0); 288#endif 289}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; 290#ifdef GLOBE 291out float v_depth; 292#endif 293#pragma mapbox: define lowp float opacity 294#pragma mapbox: define lowp vec4 pattern_from 295#pragma mapbox: define lowp vec4 pattern_to 296#pragma mapbox: define lowp float pixel_ratio_from 297#pragma mapbox: define lowp float pixel_ratio_to 298void main() { 299#pragma mapbox: initialize lowp float opacity 300#pragma mapbox: initialize mediump vec4 pattern_from 301#pragma mapbox: initialize mediump vec4 pattern_to 302#pragma mapbox: initialize lowp float pixel_ratio_from 303#pragma mapbox: initialize lowp float pixel_ratio_to 304vec2 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=projectTile(a_pos+u_fill_translate,a_pos);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; 305#ifdef GLOBE 306v_depth=gl_Position.z/gl_Position.w; 307#endif 308}`),fillPattern:Cr(`#ifdef GL_ES 309precision highp float; 310#endif 311uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; 312#pragma mapbox: define lowp float opacity 313#pragma mapbox: define lowp vec4 pattern_from 314#pragma mapbox: define lowp vec4 pattern_to 315void main() { 316#pragma mapbox: initialize lowp float opacity 317#pragma mapbox: initialize mediump vec4 pattern_from 318#pragma mapbox: initialize mediump vec4 pattern_to 319vec2 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity; 320#ifdef OVERDRAW_INSPECTOR 321fragColor=vec4(1.0); 322#endif 323}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; 324#pragma mapbox: define lowp float opacity 325#pragma mapbox: define lowp vec4 pattern_from 326#pragma mapbox: define lowp vec4 pattern_to 327#pragma mapbox: define lowp float pixel_ratio_from 328#pragma mapbox: define lowp float pixel_ratio_to 329void main() { 330#pragma mapbox: initialize lowp float opacity 331#pragma mapbox: initialize mediump vec4 pattern_from 332#pragma mapbox: initialize mediump vec4 pattern_to 333#pragma mapbox: initialize lowp float pixel_ratio_from 334#pragma mapbox: initialize lowp float pixel_ratio_to 335vec2 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=projectTile(a_pos+u_fill_translate,a_pos);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:Cr(`in vec4 v_color;void main() {fragColor=v_color; 336#ifdef OVERDRAW_INSPECTOR 337fragColor=vec4(1.0); 338#endif 339}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed; 340#ifdef TERRAIN3D 341in vec2 a_centroid; 342#endif 343out vec4 v_color; 344#pragma mapbox: define highp float base 345#pragma mapbox: define highp float height 346#pragma mapbox: define highp vec4 color 347void main() { 348#pragma mapbox: initialize highp float base 349#pragma mapbox: initialize highp float height 350#pragma mapbox: initialize highp vec4 color 351vec3 normal=a_normal_ed.xyz; 352#ifdef TERRAIN3D 353float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0
353.0 ? 0.0 : 10.0); 354#else 355float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; 356#endif 357base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; 358#ifdef GLOBE 359vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); 360#else 361gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); 362#endif 363float 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;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0); 364#ifdef GLOBE 365mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); 366#endif 367directional=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:Cr(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; 368#pragma mapbox: define lowp float base 369#pragma mapbox: define lowp float height 370#pragma mapbox: define lowp vec4 pattern_from 371#pragma mapbox: define lowp vec4 pattern_to 372#pragma mapbox: define lowp float pixel_ratio_from 373#pragma mapbox: define lowp float pixel_ratio_to 374void main() { 375#pragma mapbox: initialize lowp float base 376#pragma mapbox: initialize lowp float height 377#pragma mapbox: initialize mediump vec4 pattern_from 378#pragma mapbox: initialize mediump vec4 pattern_to 379#pragma mapbox: initialize lowp float pixel_ratio_from 380#pragma mapbox: initialize lowp float pixel_ratio_to 381vec2 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=texture(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=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; 382#ifdef OVERDRAW_INSPECTOR 383fragColor=vec4(1.0); 384#endif 385}`,`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 vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed; 386#ifdef TERRAIN3D 387in vec2 a_centroid; 388#endif 389#ifdef GLOBE 390out vec3 v_sphere_pos; 391#endif 392out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; 393#pragma mapbox: define lowp float base 394#pragma mapbox: define lowp float height 395#pragma mapbox: define lowp vec4 pattern_from 396#pragma mapbox: define lowp vec4 pattern_to 397#pragma mapbox: define lowp float pixel_ratio_from 398#pragma mapbox: define lowp float pixel_ratio_to 399void main() { 400#pragma mapbox: initialize lowp float base 401#pragma mapbox: initialize lowp float height 402#pragma mapbox: initialize mediump vec4 pattern_from 403#pragma mapbox: initialize mediump vec4 pattern_to 404#pragma mapbox: initialize lowp float pixel_ratio_from 405#pragma mapbox: initialize lowp float pixel_ratio_to 406vec2 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; 407#ifdef TERRAIN3D 408float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); 409#else 410float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; 411#endif 412base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; 413#ifdef GLOBE 414vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); 415#else 416gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); 417#endif 418vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 419? a_pos 420: vec2(edgedistance,elevation*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:Cr(`#ifdef GL_ES 421precision highp float; 422#endif 423uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;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))*tileSize/p
423ow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); 424#ifdef OVERDRAW_INSPECTOR 425fragColor=vec4(1.0); 426#endif 427}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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:Cr(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; 428#define PI 3.141592653589793 429#define STANDARD 0 430#define COMBINED 1 431#define IGOR 2 432#define MULTIDIRECTIONAL 3 433#define BASIC 4 434float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;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_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else 435{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else 436{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;switch(u_method){case BASIC: 437basic_hillshade(deriv);break;case COMBINED: 438combined_hillshade(deriv);break;case IGOR: 439igor_hillshade(deriv);break;case MULTIDIRECTIONAL: 440multidirectional_hillshade(deriv);break;case STANDARD: 441default: 442standard_hillshade(deriv);break;} 443#ifdef OVERDRAW_INSPECTOR 444fragColor=vec4(1.0); 445#endif 446}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:Cr(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; 447#ifdef GLOBE 448in float v_depth; 449#endif 450#pragma mapbox: define highp vec4 color 451#pragma mapbox: define lowp float blur 452#pragma mapbox: define lowp float opacity 453void main() { 454#pragma mapbox: initialize highp vec4 color 455#pragma mapbox: initialize lowp float blur 456#pragma mapbox: initialize lowp float opacity 457float 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);fragColor=color*(alpha*opacity); 458#ifdef GLOBE 459if (v_depth > 1.0) {discard;} 460#endif 461#ifdef OVERDRAW_INSPECTOR 462fragColor=vec4(1.0); 463#endif 464}`,` 465#define scale 0.015873016 466in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; 467#ifdef GLOBE 468out float v_depth; 469#endif 470#pragma mapbox: define highp vec4 color 471#pragma mapbox: define lowp float blur 472#pragma mapbox: define lowp float opacity 473#pragma mapbox: define mediump float gapwidth 474#pragma mapbox: define lowp float offset 475#pragma mapbox: define mediump float width 476void main() { 477#pragma mapbox: initialize highp vec4 color 478#pragma mapbox: initialize lowp float blur 479#pragma mapbox: initialize lowp float opacity 480#pragma mapbox: initialize mediump float gapwidth 481#pragma mapbox: initialize lowp float offset 482#pragma mapbox: initialize mediump float width 483float 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);
483float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; 484#ifdef GLOBE 485v_depth=gl_Position.z/gl_Position.w; 486#endif 487#ifdef TERRAIN3D 488v_gamma_scale=1.0; 489#else 490float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 491#endif 492v_width2=vec2(outset,inset);}`),lineGradient:Cr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; 493#ifdef GLOBE 494in float v_depth; 495#endif 496#pragma mapbox: define lowp float blur 497#pragma mapbox: define lowp float opacity 498void main() { 499#pragma mapbox: initialize lowp float blur 500#pragma mapbox: initialize lowp float opacity 501float 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=texture(u_image,v_uv);fragColor=color*(alpha*opacity); 502#ifdef GLOBE 503if (v_depth > 1.0) {discard;} 504#endif 505#ifdef OVERDRAW_INSPECTOR 506fragColor=vec4(1.0); 507#endif 508}`,` 509#define scale 0.015873016 510in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; 511#ifdef GLOBE 512out float v_depth; 513#endif 514#pragma mapbox: define lowp float blur 515#pragma mapbox: define lowp float opacity 516#pragma mapbox: define mediump float gapwidth 517#pragma mapbox: define lowp float offset 518#pragma mapbox: define mediump float width 519void main() { 520#pragma mapbox: initialize lowp float blur 521#pragma mapbox: initialize lowp float opacity 522#pragma mapbox: initialize mediump float gapwidth 523#pragma mapbox: initialize lowp float offset 524#pragma mapbox: initialize mediump float width 525float 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; 526#ifdef GLOBE 527v_depth=gl_Position.z/gl_Position.w; 528#endif 529#ifdef TERRAIN3D 530v_gamma_scale=1.0; 531#else 532float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 533#endif 534v_width2=vec2(outset,inset);}`),linePattern:Cr(`#ifdef GL_ES 535precision highp float; 536#endif 537uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width; 538#ifdef GLOBE 539in float v_depth; 540#endif 541#pragma mapbox: define lowp vec4 pattern_from 542#pragma mapbox: define lowp vec4 pattern_to 543#pragma mapbox: define lowp float pixel_ratio_from 544#pragma mapbox: define lowp float pixel_ratio_to 545#pragma mapbox: define lowp float blur 546#pragma mapbox: define lowp float opacity 547void main() { 548#pragma mapbox: initialize mediump vec4 pattern_from 549#pragma mapbox: initialize mediump vec4 pattern_to 550#pragma mapbox: initialize lowp float pixel_ratio_from 551#pragma mapbox: initialize lowp float pixel_ratio_to 552#pragma mapbox: initialize lowp float blur 553#pragma mapbox: initialize lowp float opacity 554vec2 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(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; 555#ifdef GLOBE 556if (v_depth > 1.0) {discard;} 557#endif 558#ifdef OVERDRAW_INSPECTOR 559fragColor=vec4(1.0); 560#endif 561}`,` 562#define scale 0.015873016 563#define LINE_DISTANCE_SCALE 2.0 564in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width; 565#ifdef GLOBE 566out float v_depth; 567#endif 568#pragma mapbox: define lowp float blur 569#pragma mapbox: define lowp float opacity 570#pragma mapbox: define lowp float offset 571#pragma mapbox: define mediump float gapwidth 572#pragma mapbox: define mediump float width 573#pragma mapbox: define lowp float floorwidth 574#pragma mapbox: define lowp vec4 pattern_from 575#pragma mapbox: define lowp vec4 pattern_to 576#pragma mapbox: define lowp float pixel_ratio_from 577#pragma mapbox: define lowp float pixel_ratio_to 578void main() { 579#pragma mapbox: initialize lowp float blur 580#pragma mapbox: initialize lowp float opacity 581#pragma mapbox: initialize lowp float offset 582#pragma mapbox: initialize mediump float gapwidth 583#pragma mapbox: initialize mediump float width 584#pragma mapbox: initialize lowp float floorwidth 585#pragma mapbox: initialize mediump vec4 pattern_from 586#pragma mapbox: initialize mediump vec4 pattern_to 587#pragma mapbox: initialize lowp float pixel_ratio_from 588#pragma mapbox: initialize lowp float pixel_ratio_to 589float 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);
589float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; 590#ifdef GLOBE 591v_depth=gl_Position.z/gl_Position.w; 592#endif 593#ifdef TERRAIN3D 594v_gamma_scale=1.0; 595#else 596float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 597#endif 598v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Cr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; 599#ifdef GLOBE 600in float v_depth; 601#endif 602#pragma mapbox: define highp vec4 color 603#pragma mapbox: define lowp float blur 604#pragma mapbox: define lowp float opacity 605#pragma mapbox: define mediump float width 606#pragma mapbox: define lowp float floorwidth 607void main() { 608#pragma mapbox: initialize highp vec4 color 609#pragma mapbox: initialize lowp float blur 610#pragma mapbox: initialize lowp float opacity 611#pragma mapbox: initialize mediump float width 612#pragma mapbox: initialize lowp float floorwidth 613float 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=texture(u_image,v_tex_a).a;float sdfdist_b=texture(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);fragColor=color*(alpha*opacity); 614#ifdef GLOBE 615if (v_depth > 1.0) {discard;} 616#endif 617#ifdef OVERDRAW_INSPECTOR 618fragColor=vec4(1.0); 619#endif 620}`,` 621#define scale 0.015873016 622#define LINE_DISTANCE_SCALE 2.0 623in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;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;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; 624#ifdef GLOBE 625out float v_depth; 626#endif 627#pragma mapbox: define highp vec4 color 628#pragma mapbox: define lowp float blur 629#pragma mapbox: define lowp float opacity 630#pragma mapbox: define mediump float gapwidth 631#pragma mapbox: define lowp float offset 632#pragma mapbox: define mediump float width 633#pragma mapbox: define lowp float floorwidth 634void main() { 635#pragma mapbox: initialize highp vec4 color 636#pragma mapbox: initialize lowp float blur 637#pragma mapbox: initialize lowp float opacity 638#pragma mapbox: initialize mediump float gapwidth 639#pragma mapbox: initialize lowp float offset 640#pragma mapbox: initialize mediump float width 641#pragma mapbox: initialize lowp float floorwidth 642float 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; 643#ifdef GLOBE 644v_depth=gl_Position.z/gl_Position.w; 645#endif 646#ifdef TERRAIN3D 647v_gamma_scale=1.0; 648#else 649float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; 650#endif 651v_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:Cr(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in 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=texture(u_image0,v_pos0);vec4 color1=texture(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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); 652#ifdef OVERDRAW_INSPECTOR 653fragColor=vec4(1.0); 654#endif 655}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5; 656#ifdef GLOBE 657if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} 658#endif 659v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:Cr(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity; 660#pragma mapbox: define lowp float opacity 661void main() { 662#pragma mapbox: initialize lowp float opacity 663lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha; 664#ifdef OVERDRAW_INSPECTOR 665fragColor=vec4(1.0); 666#endif 667}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity; 668#pragma mapbox: define lowp float opacity 669void main() { 670#pragma mapbox: initialize lowp float opacity 671vec2 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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? 672camera_to_anchor_distance/u_camera_to_center_distance : 673u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; 674#ifdef GLOBE 675if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} 676#endif 677vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;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:Cr(`#define SDF_PX 8.0 678uniform 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;in vec2 v_data0;in vec3 v_data1; 679#pragma mapbox: define highp vec4 fill_color 680#pragma mapbox: define highp vec4 halo_color 681#pragma mapbox: define lowp float opacity 682#pragma mapbox: define lowp float halo_width 683#pragma mapbox: define lowp float halo_blur 684void main() { 685#pragma mapbox: initialize highp vec4 fill_color 686#pragma mapbox: initialize highp vec4 halo_color 687#pragma mapbox: initialize lowp float opacity 688#pragma mapbox: initialize lowp float halo_width 689#pragma mapbox: initialize lowp float halo_blur 690float 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 inner_edge=(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);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity); 691#ifdef OVERDRAW_INSPECTOR 692fragColor=vec4(1.0); 693#endif 694}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;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_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1; 695#pragma mapbox: define highp vec4 fill_color 696#pragma mapbox: define highp vec4 halo_color 697#pragma mapbox: define lowp float opacity 698#pragma mapbox: define lowp float halo_width 699#pragma mapbox: define lowp float halo_blur 700void main() { 701#pragma mapbox: initialize highp vec4 fill_color 702#pragma mapbox: initialize highp vec4 halo_color 703#pragma mapbox: initialize lowp float opacity 704#pragma mapbox: initialize lowp float halo_width 705#pragma mapbox: initialize lowp float halo_blur 706vec2 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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? 707camera_to_anchor_distance/u_camera_to_center_distance : 708u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; 709#ifdef GLOBE 710if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} 711#endif 712vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;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:Cr(`#define SDF_PX 8.0 713#define SDF 1.0 714#define ICON 0.0 715uniform 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;in vec4 v_data0;in vec4 v_data1; 716#pragma mapbox: define highp vec4 fill_color 717#pragma mapbox: define highp vec4 halo_color 718#pragma mapbox: define lowp float opacity 719#pragma mapbox: define lowp float halo_width 720#pragma mapbox: define lowp float halo_blur 721void main() { 722#pragma mapbox: initialize highp vec4 fill_color 723#pragma mapbox: initialize highp vec4 halo_color 724#pragma mapbox: initialize lowp float opacity 725#pragma mapbox: initialize lowp float halo_width 726#pragma mapbox: initialize lowp float halo_blur 727float fad
727e_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha; 728#ifdef OVERDRAW_INSPECTOR 729fragColor=vec4(1.0); 730#endif 731return;}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=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity); 732#ifdef OVERDRAW_INSPECTOR 733fragColor=vec4(1.0); 734#endif 735}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in 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_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;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1; 736#pragma mapbox: define highp vec4 fill_color 737#pragma mapbox: define highp vec4 halo_color 738#pragma mapbox: define lowp float opacity 739#pragma mapbox: define lowp float halo_width 740#pragma mapbox: define lowp float halo_blur 741void main() { 742#pragma mapbox: initialize highp vec4 fill_color 743#pragma mapbox: initialize highp vec4 halo_color 744#pragma mapbox: initialize lowp float opacity 745#pragma mapbox: initialize lowp float halo_width 746#pragma mapbox: initialize lowp float halo_blur 747vec2 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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? 748camera_to_anchor_distance/u_camera_to_center_distance : 749u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; 750#ifdef GLOBE 751if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} 752#endif 753vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;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:Cr("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);
753float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Cr("in 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() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Cr("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:Cr("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:Cr(`in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 754);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:Cr("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};
vendor: 21,062 bytes, lines 754-803
754function Cr(_,e){const o=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,f=e.match(/in ([\w]+) ([\w]+)/g),y=_.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),x=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),T=x?x.concat(y):y,P={};return{fragmentSource:_=_.replace(o,(C,L,N,B,j)=>(P[j]=!0,L==="define"?` 755#ifndef HAS_UNIFORM_u_${j} 756in ${N} ${B} ${j}; 757#else 758uniform ${N} ${B} u_${j}; 759#endif 760`:` 761#ifdef HAS_UNIFORM_u_${j} 762 ${N} ${B} ${j} = u_${j}; 763#endif 764`)),vertexSource:e=e.replace(o,(C,L,N,B,j)=>{const K=B==="float"?"vec2":"vec4",ee=j.match(/color/)?"color":K;return P[j]?L==="define"?` 765#ifndef HAS_UNIFORM_u_${j} 766uniform lowp float u_${j}_t; 767in ${N} ${K} a_${j}; 768out ${N} ${B} ${j}; 769#else 770uniform ${N} ${B} u_${j}; 771#endif 772`:ee==="vec4"?` 773#ifndef HAS_UNIFORM_u_${j} 774 ${j} = a_${j}; 775#else 776 ${N} ${B} ${j} = u_${j}; 777#endif 778`:` 779#ifndef HAS_UNIFORM_u_${j} 780 ${j} = unpack_mix_${ee}(a_${j}, u_${j}_t); 781#else 782 ${N} ${B} ${j} = u_${j}; 783#endif 784`:L==="define"?` 785#ifndef HAS_UNIFORM_u_${j} 786uniform lowp float u_${j}_t; 787in ${N} ${K} a_${j}; 788#else 789uniform ${N} ${B} u_${j}; 790#endif 791`:ee==="vec4"?` 792#ifndef HAS_UNIFORM_u_${j} 793 ${N} ${B} ${j} = a_${j}; 794#else 795 ${N} ${B} ${j} = u_${j}; 796#endif 797`:` 798#ifndef HAS_UNIFORM_u_${j} 799 ${N} ${B} ${j} = unpack_mix_${ee}(a_${j}, u_${j}_t); 800#else 801 ${N} ${B} ${j} = u_${j}; 802#endif 803`}),staticAttributes:f,staticUniforms:T}}class co{constructor(e,o,f){this.vertexBuffer=e,this.indexBuffer=o,this.segments=f}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var ki=s.aG([{name:"a_pos",type:"Int16",components:2}]);const ho="#define PROJECTION_MERCATOR",Mr="mercator";class qo{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Mr}get shaderDefine(){return ho}get shaderPreludeCode(){return Ai.projectionMercator}get vertexShaderPreludeCode(){return Ai.projectionMercator.vertexSource}get subdivisionGranularity(){return s.aH.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,o,f,y,x){if(this._cachedMesh)return this._cachedMesh;const T=new s.aI;T.emplaceBack(0,0),T.emplaceBack(s.Z,0),T.emplaceBack(0,s.Z),T.emplaceBack(s.Z,s.Z);const P=e.createVertexBuffer(T,ki.members),C=s.aJ.simpleSegment(0,0,4,2),L=new s.aK;L.emplaceBack(1,0,2),L.emplaceBack(1,2,3);const N=e.createIndexBuffer(L);return this._cachedMesh=new co(P,N,C),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class fo{constructor(e=0,o=0,f=0,y=0){if(isNaN(e)||e<0||isNaN(o)||o<0||isNaN(f)||f<0||isNaN(y)||y<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=o,this.left=f,this.right=y}interpolate(e,o,f){return o.top!=null&&e.top!=null&&(this.top=s.B.number(e.top,o.top,f)),o.bottom!=null&&e.bottom!=null&&(this.bottom=s.B.number(e.bottom,o.bottom,f)),o.left!=null&&e.left!=null&&(this.left=s.B.number(e.left,o.left,f)),o.right!=null&&e.right!=null&&(this.right=s.B.number(e.right,o.right,f)),this}getCenter(e,o){const f=s.ae((this.left+e-this.right)/2,0,e),y=s.ae((this.top+o-this.bottom)/2,0,o);return new s.P(f,y)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new fo(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function wa(_,e){if(!_.renderWorldCopies||_.lngRange)return;const o=e.lng-_.center.lng;e.lng+=o>180?-360:o<-180?360:0}function On(_){return Math.max(0,Math.floor(_))}class Yn{constructor(e,o,f,y,x,T){this._callbacks=e,this._tileSize=512,this._renderWorldCopies=T===void 0||!!T,this._minZoom=o||0,this._maxZoom=f||22,this._minPitch=y??0,this._maxPitch=x??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new s.Q(0,0),this._elevation=0,this._zoom=0,this._tileZoom=On(this._zoom),this._scale=s.ac(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new fo,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,o,f){this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=On(this._zoom),this._scale=s.ac(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new fo(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!f&&e.autoCalculateNearFarZ,o&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new s.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){const o=s.aL(e,-180,180)*Math.PI/180;var f,y,x,T,P,C,L,N,B;this._bearingInRadians!==o&&(this._unmodified=!1,this._bearingInRadians=o,this._calcMatrices(),this._rotationMatrix=E(),f=this._rotationMatrix,x=-this._bearingInRadians,T=(y=this._rotationMatrix)[0],P=y[1],C=y[2],L=y[3],N=Math.sin(x),B=Math.cos(x),f[0]=T*B+C*N,f[1]=P*B+L*N,f[2]=T*-N+C*B,f[3]=P*-N+L*B)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){const o=s.ae(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==o&&(this._unmodified=!1,this._pitchInRadians=o,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){const o=e/180*Math.PI;this._rollInRadians!==o&&(this._unmodified=!1,this._rollInRadians=o,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return s.aM(this._fovInRadians)}setFov(e){e=s.ae(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=s.ab(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){const o=this.getConstrained(this._center,e).zoom;this._zoom!==o&&(this._unmodified=!1,this._zoom=o,this._tileZoom=Math.max(0,Math.floor(o)),this._scale=s.ac(o),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,o){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=o,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,o,f){this._unmodified=!1,this._edgeInsets.interpolate(e,o,f),this._constrain(),this._calcMatrices()}resize(e,o,f=!0){this._width=e,this._height=o,f&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new Yr([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-85.051129,s.af])}getConstrained(e,o){return this._callbacks.getConstrained(e,o)}getCameraQueryGeometry(e,o){if(o.length===1)return[o[0],e];{let f=e.x,y=e.y,x=e.x,T=e.y;for(const P of o)f=Math.min(f,P.x),y=Math.min(y,P.y),x=Math.max(x,P.x),T=Math.max(T,P.y);return[new s.P(f,y),new s.P(x,y),new s.P(x,T),new s.P(f,T),new s.P(f,y)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const e=this._unmodified,{center:o,zoom:f}=this.getConstrained(this.center,this.zoom);this.setCenter(o),this.setZoom(f),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=s.ad(new Float64Array(16));s.M(e,e,[this._width/2,-this._height/2,1]),s.L(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=s.ad(new Float64Array(16)),s.M(e,e,[1,-1,1]),s.L(e,e,[-1,-1,0]),s.M(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,o,f,y){const x=f!==void 0?f:this.bearing,T=y=y!==void 0?y:this.pitch,P=s.$.fromLngLat(e,o),C=-Math.cos(s.ab(T)),L=Math.sin(s.ab(T)),N=L*Math.sin(s.ab(x)),B=-L*Math.cos(s.ab(x));let j=this.elevation;const K=o-j;let ee;C*K>=0||Math.abs(C)<.1?(ee=1e4,j=o+ee*C):ee=-K/C;let me,pe,ye=s.aN(1,P.y),be=0;do{if(be+=1,be>10)break;pe=ee/ye,me=new s.$(P.x+N*pe,P.y+B*pe),ye=1/me.meterInMercatorCoordinateUnits()}while(Math.abs(ee-pe*ye)>1e-12);return{center:me.toLngLat(),elevation:j,zoom:s.ah(this.height/2/Math.tan(this.fovInRadians/2)/pe/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;const o=s.ag(1,this.center.lat)*this.worldSize,f=this.cameraToCenterDistance/o,y=s.$.fromLngLat(this.center,this.elevation),x=ie(this.center,this.elevation,this.pitch,this.bearing,f);this._elevation=e;const T=this.calculateCenterFromCameraLngLatAlt(x.toLngLat(),s.aN(x.z,y.y),this.bearing,this.pitch);this._elevation=T.elevation,this._center=T.center,this.setZoom(T.zoom)}getCameraPoint(){const e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const e=s.ag(1,this.center.lat)*this.worldSize;return ie(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];const o=e.canonical.z>=0?1<<e.canonical.z:Math.pow(2,e.canonical.z);return[e.canonical.x/o,e.canonical.y/o,1/o/s.Z,1/o/s.Z]}}class gn{constructor(e,o){this.min=e,this.max=o,this.center=s.aO([],s.aP([],this.min,this.max),.5)}quadrant(e){const o=[e%2==0,e<2],f=s.aQ(this.min),y=s.aQ(this.max);for(let x=0;x<o.length;x++)f[x]=o[x]?this.min[x]:this.center[x],y[x]=o[x]?this.center[x]:this.max[x];return y[2]=this.max[2],new gn(f,y)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}intersectsFrustum(e){let o=!0;for(let f=0;f<e.planes.length;f++){const y=this.intersectsPlane(e.planes[f]);if(y===0)return 0;y===1&&(o=!1)}return o?2:e.aabb.min[0]>this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]<this.min[0]||e.aabb.max[1]<this.min[1]||e.aabb.max[2]<this.min[2]?0:1}intersectsPlane(e){let o=e[3],f=e[3];for(let y=0;y<3;y++)e[y]>0?(o+=e[y]*this.min[y],f+=e[y]*this.max[y]):(f+=e[y]*this.min[y],o+=e[y]*this.max[y]);return o>=0?2:f<0?0:1}}class Xn{distanceToTile2d(e,o,f,y){const x=y.distanceX([e,o]),T=y.distanceY([e,o]);return Math.hypot(x,T)}getWrap(e,o,f){return f}getTileAABB(e,o,f,y){var x,T;let P=f,C=f;if(y.terrain){const N=new s.Y(e.z,o,e.z,e.x,e.y),B=y.terrain.getMinMaxElevation(N);P=(x=B.minElevation)!==null&&x!==void 0?x:f,C=(T=B.maxElevation)!==null&&T!==void 0?T:f}const L=1<<e.z;return new gn([o+e.x/L,e.y/L,P],[o+(e.x+1)/L,(e.y+1)/L,C])}allowVariableZoom(e,o){const f=e.fov*(Math.abs(Math.cos(e.rollInRadians))*e.height+Math.abs(Math.sin(e.rollInRadians))*e.width)/e.height,y=s.ae(78.5-f/2,0,60);return!!o.terrain||e.pitch>y}allowWorldCopies(){return!0}recalculateCache(){}}class zr{constructor(e,o,f){this.points=e,this.planes=o,this.aabb=f}static fromInvProjectionMatrix(e,o=1,f=0){const y=Math.pow(2,f),x=[[-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(L=>{const N=1/(L=s.at([],L,e))[3]/o*y;return s.aR(L,L,[N,N,1/L[3],N])}),T=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(L=>{const N=s.aS([],x[L[0]],x[L[1]]),B=s.aS([],x[L[2]],x[L[1]]),j=s.aT([],s.aU([],N,B)),K=-s.aV(j,x[L[1]]);return j.concat(K)}),P=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],C=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const L of x)for(let N=0;N<3;N++)P[N]=Math.min(P[N],L[N]),C[N]=Math.max(C[N],L[N]);return new zr(x,T,new gn(P,C))}}class Al{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,o,f){return this._helper.interpolatePadding(e,o,f)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,o,f=!0){this._helper.resize(e,o,f)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,o){this._helper.overrideNearFarZ(e,o)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,o){}constructor(e,o,f,y,x){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new Yn({calcMatrices:()=>{this._calcMatrices()},getConstrained:(T,P)=>this.getConstrained(T,P)},e,o,f,y,x),this._coveringTilesDetailsProvider=new Xn}clone(){const e=new Al;return e.apply(this),e}apply(e,o,f){this._helper.apply(e,o,f)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){const o=[new s.aW(0,e)];if(this._helper._renderWorldCopies){const f=this.screenPointToMercatorCoordinate(new s.P(0,0)),y=this.screenPointToMercatorCoordinate(new s.P(this._helper._width,0)),x=this.screenPointToMercatorCoordinate(new s.P(this._helper._width,this._helper._height)),T=this.screenPointToMercatorCoordinate(new s.P(0,this._helper._height)),P=Math.floor(Math.min(f.x,y.x,x.x,T.x)),C=Math.floor(Math.max(f.x,y.x,x.x,T.x)),L=1;for(let N=P-L;N<=C+L;N++)N!==0&&o.push(new s.aW(N,e))}return o}getCameraFrustum(){return zr.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){const o=this.screenPointToLocation(this.centerPoint,e),f=e?e.getElevationForLngLatZoom(o,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(f)}setLocationAtPoint(e,o){const f=s.ag(this.elevation,this.center.lat),y=this.screenPointToMercatorCoordinateAtZ(o,f),x=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,f),T=s.$.fromLngLat(e),P=new s.$(T.x-(y.x-x.x),T.y-(y.y-x.y));this.setCenter(P==null?void 0:P.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,o){return o?this.coordinatePoint(s.$.fromLngLat(e),o.getElevationForLngLatZoom(e,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(s.$.fromLngLat(e))}screenPointToLocation(e,o){var f;return(f=this.screenPointToMercatorCoordinate(e,o))===null||f===void 0?void 0:f.toLngLat()}screenPointToMercatorCoordinate(e,o){if(o){const f=o.pointCoordinate(e);if(f!=null)return f}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,o){const f=o||0,y=[e.x,e.y,0,1],x=[e.x,e.y,1,1];s.at(y,y,this._pixelMatrixInverse),s.at(x,x,this._pixelMatrixInverse);const T=y[3],P=x[3],C=y[1]/T,L=x[1]/P,N=y[2]/T,B=x[2]/P,j=N===B?0:(f-N)/(B-N);return new s.$(s.B.number(y[0]/T,x[0]/P,j)/this.worldSize,s.B.number(C,L,j)/this.worldSize,f)}coordinatePoint(e,o=0,f=this._pixelMatrix){const y=[e.x*this.worldSize,e.y*this.worldSize,o,1];return s.at(y,y,f),new s.P(y[0]/y[3],y[1]/y[3])}getBounds(){const e=Math.max(0,this._helper._height/2-Fe(this));return new Yr().extend(this.screenPointToLocation(new s.P(0,e))).extend(this.screenPointToLocation(new s.P(this._helper._width,e))).extend(this.screenPointToLocation(new s.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new s.P(0,this._helper._height)))}
vendor: 1,444 bytes, line 803
803isPointOnMapSurface(e,o){return o?o.pointCoordinate(e)!=null:e.y>this.height/2-Fe(this)}calculatePosMatrix(e,o=!1,f){var y;const x=(y=e.key)!==null&&y!==void 0?y:s.aX(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),T=o?this._alignedPosMatrixCache:this._posMatrixCache;if(T.has(x)){const L=T.get(x);return f?L.f32:L.f64}const P=ne(e,this.worldSize);s.N(P,o?this._alignedProjMatrix:this._viewProjMatrix,P);const C={f64:P,f32:new Float32Array(P)};return T.set(x,C),f?C.f32:C.f64}calculateFogMatrix(e){const o=e.key,f=this._fogMatrixCacheF32;if(f.has(o))return f.get(o);const y=ne(e,this.worldSize);return s.N(y,this._fogMatrix,y),f.set(o,new Float32Array(y)),f.get(o)}getConstrained(e,o){o=s.ae(+o,this.minZoom,this.maxZoom);const f={center:new s.Q(e.lng,e.lat),zoom:o};let y=this._helper._lngRange;this._helper._renderWorldCopies||y!==null||(y=[-179.9999999999,180-1e-10]);const x=this.tileSize*s.ac(f.zoom);let T=0,P=x,C=0,L=x,N=0,B=0;const{x:j,y:K}=this.size;if(this._helper._latRange){const Ee=this._helper._latRange;T=s.S(Ee[1])*x,P=s.S(Ee[0])*x,P-T<K&&(N=K/(P-T))}y&&(C=s.aL(s.U(y[0])*x,0,x),L=s.aL(s.U(y[1])*x,0,x),L<C&&(L+=x),L-C<j&&(B=j/(L-C)));const{x:ee,y:me}=sn(x,e);let pe,ye;const be=Math.max(B||0,N||0);if(be){const Ee=new s.P(B?(L+C)/2:ee,N?(P+T)/2:me);return f.center=Un(x,Ee).wrap(),f.zoom+=s.ah(be),f}if(this._helper._latRange){const Ee=K/2;me-Ee<T&&(ye=T+Ee),me+Ee>P&&(ye=P-Ee)}if(y){const Ee=(C+L)/2;let xe=ee;
vendor: 17,784 bytes, line 803
803this._helper._renderWorldCopies&&(xe=s.aL(ee,Ee-x/2,Ee+x/2));const Pe=j/2;xe-Pe<C&&(pe=C+Pe),xe+Pe>L&&(pe=L-Pe)}if(pe!==void 0||ye!==void 0){const Ee=new s.P(pe??ee,ye??me);f.center=Un(x,Ee).wrap()}return f}calculateCenterFromCameraLngLatAlt(e,o,f,y){return this._helper.calculateCenterFromCameraLngLatAlt(e,o,f,y)}_calculateNearFarZIfNeeded(e,o,f){if(!this._helper.autoCalculateNearFarZ)return;const y=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),x=e-y*this._helper._pixelPerMeter/Math.cos(o),T=y<0?x:e,P=Math.PI/2+this.pitchInRadians,C=s.ab(this.fov)*(Math.abs(Math.cos(s.ab(this.roll)))*this.height+Math.abs(Math.sin(s.ab(this.roll)))*this.width)/this.height*(.5+f.y/this.height),L=Math.sin(C)*T/Math.sin(s.ae(Math.PI-P-C,.01,Math.PI-.01)),N=Fe(this),B=Math.atan(N/this._helper.cameraToCenterDistance),j=s.ab(.75),K=B>j?2*B*(.5+f.y/(2*N)):j,ee=Math.sin(K)*T/Math.sin(s.ae(Math.PI-P-K,.01,Math.PI-.01)),me=Math.min(L,ee);this._helper._farZ=1.01*(Math.cos(Math.PI/2-o)*me+T),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const e=this.centerOffset,o=sn(this.worldSize,this.center),f=o.x,y=o.y;this._helper._pixelPerMeter=s.ag(1,this.center.lat)*this.worldSize;const x=s.ab(Math.min(this.pitch,ci)),T=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(x));let P;this._calculateNearFarZIfNeeded(T,x,e),P=new Float64Array(16),s.aY(P,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),s.an(this._invProjMatrix,P),P[8]=2*-e.x/this._helper._width,P[9]=2*e.y/this._helper._height,this._projectionMatrix=s.aZ(P),s.M(P,P,[1,-1,1]),s.L(P,P,[0,0,-this._helper.cameraToCenterDistance]),s.a_(P,P,-this.rollInRadians),s.a$(P,P,this.pitchInRadians),s.a_(P,P,-this.bearingInRadians),s.L(P,P,[-f,-y,0]),this._mercatorMatrix=s.M([],P,[this.worldSize,this.worldSize,this.worldSize]),s.M(P,P,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=s.N(new Float64Array(16),this.clipSpaceToPixelsMatrix,P),s.L(P,P,[0,0,-this.elevation]),this._viewProjMatrix=P,this._invViewProjMatrix=s.an([],P);const C=[0,0,-1,1];s.at(C,C,this._invViewProjMatrix),this._cameraPosition=[C[0]/C[3],C[1]/C[3],C[2]/C[3]],this._fogMatrix=new Float64Array(16),s.aY(this._fogMatrix,this.fovInRadians,this.width/this.height,T,this._helper._farZ),this._fogMatrix[8]=2*-e.x/this.width,this._fogMatrix[9]=2*e.y/this.height,s.M(this._fogMatrix,this._fogMatrix,[1,-1,1]),s.L(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),s.a_(this._fogMatrix,this._fogMatrix,-this.rollInRadians),s.a$(this._fogMatrix,this._fogMatrix,this.pitchInRadians),s.a_(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),s.L(this._fogMatrix,this._fogMatrix,[-f,-y,0]),s.M(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),s.L(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=s.N(new Float64Array(16),this.clipSpaceToPixelsMatrix,P);const L=this._helper._width%2/2,N=this._helper._height%2/2,B=Math.cos(this.bearingInRadians),j=Math.sin(-this.bearingInRadians),K=f-Math.round(f)+B*L+j*N,ee=y-Math.round(y)+B*N+j*L,me=new Float64Array(P);if(s.L(me,me,[K>.5?K-1:K,ee>.5?ee-1:ee,0]),this._alignedProjMatrix=me,P=s.an(new Float64Array(16),this._pixelMatrix),!P)throw new Error("failed to invert matrix");this._pixelMatrixInverse=P,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const e=this.screenPointToMercatorCoordinate(new s.P(0,0)),o=[e.x*this.worldSize,e.y*this.worldSize,0,1];return s.at(o,o,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const e=s.ag(1,this.center.lat)*this.worldSize;return ie(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,o){const f=s.$.fromLngLat(e),y=[f.x*this.worldSize,f.y*this.worldSize,o,1];return s.at(y,y,this._viewProjMatrix),y[2]/y[3]}getProjectionData(e){const{overscaledTileID:o,aligned:f,applyTerrainMatrix:y}=e,x=this._helper.getMercatorTileCoordinates(o),T=o?this.calculatePosMatrix(o,f,!0):null;let P;return P=o&&o.terrainRttPosMatrix32f&&y?o.terrainRttPosMatrix32f:T||s.b0(),{mainMatrix:P,tileMercatorCoords:x,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:P}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,o,f){return 1}transformLightDirection(e){return s.aQ(e)}getRayDirectionFromPixel(e){throw new Error("Not implemented.")}projectTileCoordinates(e,o,f,y){const x=this.calculatePosMatrix(f);let T;y?(T=[e,o,y(e,o),1],s.at(T,T,x)):(T=[e,o,0,1],ba(T,T,x));const P=T[3];return{point:new s.P(T[0]/P,T[1]/P),signedDistanceFromCamera:P,isOccluded:!1}}populateCache(e){for(const o of e)this.calculatePosMatrix(o)}getMatrixForModel(e,o){const f=s.$.fromLngLat(e,o),y=f.meterInMercatorCoordinateUnits(),x=s.b1();return s.L(x,x,[f.x,f.y,f.z]),s.a_(x,x,Math.PI),s.a$(x,x,Math.PI/2),s.M(x,x,[-y,y,y]),x}getProjectionDataForCustomLayer(e=!0){const o=new s.Y(0,0,0,0,0),f=this.getProjectionData({overscaledTileID:o,applyGlobeMatrix:e}),y=ne(o,this.worldSize);s.N(y,this._viewProjMatrix,y),f.tileMercatorCoords=[0,0,1,1];const x=[s.Z,s.Z,this.worldSize/this._helper.pixelsPerMeter],T=s.b2();return s.M(T,y,x),f.fallbackMatrix=T,f.mainMatrix=T,f}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function Di(){s.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Ti(_){if(_.useSlerp)if(_.k<1){const e=s.b3(_.startEulerAngles.roll,_.startEulerAngles.pitch,_.startEulerAngles.bearing),o=s.b3(_.endEulerAngles.roll,_.endEulerAngles.pitch,_.endEulerAngles.bearing),f=new Float64Array(4);s.b4(f,e,o,_.k);const y=s.b5(f);_.tr.setRoll(y.roll),_.tr.setPitch(y.pitch),_.tr.setBearing(y.bearing)}else _.tr.setRoll(_.endEulerAngles.roll),_.tr.setPitch(_.endEulerAngles.pitch),_.tr.setBearing(_.endEulerAngles.bearing);else _.tr.setRoll(s.B.number(_.startEulerAngles.roll,_.endEulerAngles.roll,_.k)),_.tr.setPitch(s.B.number(_.startEulerAngles.pitch,_.endEulerAngles.pitch,_.k)),_.tr.setBearing(s.B.number(_.startEulerAngles.bearing,_.endEulerAngles.bearing,_.k))}function aa(_,e,o,f,y){const x=y.padding,T=sn(y.worldSize,o.getNorthWest()),P=sn(y.worldSize,o.getNorthEast()),C=sn(y.worldSize,o.getSouthEast()),L=sn(y.worldSize,o.getSouthWest()),N=s.ab(-f),B=T.rotate(N),j=P.rotate(N),K=C.rotate(N),ee=L.rotate(N),me=new s.P(Math.max(B.x,j.x,ee.x,K.x),Math.max(B.y,j.y,ee.y,K.y)),pe=new s.P(Math.min(B.x,j.x,ee.x,K.x),Math.min(B.y,j.y,ee.y,K.y)),ye=me.sub(pe),be=(y.width-(x.left+x.right+e.left+e.right))/ye.x,Ee=(y.height-(x.top+x.bottom+e.top+e.bottom))/ye.y;if(Ee<0||be<0)return void Di();const xe=Math.min(s.ah(y.scale*Math.min(be,Ee)),_.maxZoom),Pe=s.P.convert(_.offset),Ie=new s.P((e.left-e.right)/2,(e.top-e.bottom)/2).rotate(s.ab(f)),Ce=Pe.add(Ie).mult(y.scale/s.ac(xe));return{center:Un(y.worldSize,T.add(C).div(2).sub(Ce)),zoom:xe,bearing:f}}class kl{get useGlobeControls(){return!1}handlePanInertia(e,o){return{easingOffset:e,easingCenter:o.center}}handleMapControlsRollPitchBearingZoom(e,o){e.bearingDelta&&o.setBearing(o.bearing+e.bearingDelta),e.pitchDelta&&o.setPitch(o.pitch+e.pitchDelta),e.rollDelta&&o.setRoll(o.roll+e.rollDelta),e.zoomDelta&&o.setZoom(o.zoom+e.zoomDelta)}handleMapControlsPan(e,o,f){e.around.distSqr(o.centerPoint)<.01||o.setLocationAtPoint(f,e.around)}cameraForBoxAndBearing(e,o,f,y,x){return aa(e,o,f,y,x)}handleJumpToCenterZoom(e,o){e.zoom!==(o.zoom!==void 0?+o.zoom:e.zoom)&&e.setZoom(+o.zoom),o.center!==void 0&&e.setCenter(s.Q.convert(o.center))}handleEaseTo(e,o){const f=e.zoom,y=e.padding,x={roll:e.roll,pitch:e.pitch,bearing:e.bearing},T={roll:o.roll===void 0?e.roll:o.roll,pitch:o.pitch===void 0?e.pitch:o.pitch,bearing:o.bearing===void 0?e.bearing:o.bearing},P=o.zoom!==void 0,C=!e.isPaddingEqual(o.padding);let L=!1;const N=P?+o.zoom:e.zoom;let B=e.centerPoint.add(o.offsetAsPoint);const j=e.screenPointToLocation(B),{center:K,zoom:ee}=e.getConstrained(s.Q.convert(o.center||j),N??f);wa(e,K);const me=sn(e.worldSize,j),pe=sn(e.worldSize,K).sub(me),ye=s.ac(ee-f);return L=ee!==f,{easeFunc:be=>{if(L&&e.setZoom(s.B.number(f,ee,be)),s.b6(x,T)||Ti({startEulerAngles:x,endEulerAngles:T,tr:e,k:be,useSlerp:x.roll!=T.roll}),C&&(e.interpolatePadding(y,o.padding,be),B=e.centerPoint.add(o.offsetAsPoint)),o.around)e.setLocationAtPoint(o.around,o.aroundPoint);else{const Ee=s.ac(e.zoom-f),xe=ee>f?Math.min(2,ye):Math.max(.5,ye),Pe=Math.pow(xe,1-be),Ie=Un(e.worldSize,me.add(pe.mult(be*Pe)).mult(Ee));e.setLocationAtPoint(e.renderWorldCopies?Ie.wrap():Ie,B)}},isZooming:L,elevationCenter:K}}handleFlyTo(e,o){const f=o.zoom!==void 0,y=e.zoom,x=e.getConstrained(s.Q.convert(o.center||o.locationAtOffset),f?+o.zoom:y),T=x.center,P=x.zoom;wa(e,T);const C=sn(e.worldSize,o.locationAtOffset),L=sn(e.worldSize,T).sub(C),N=L.mag(),B=s.ac(P-y);let j;if(o.minZoom!==void 0){const K=Math.min(+o.minZoom,y,P),ee=e.getConstrained(T,K).zoom;j=s.ac(ee-y)}return{easeFunc:(K,ee,me,pe)=>{e.setZoom(K===1?P:y+s.ah(ee));const ye=K===1?T:Un(e.worldSize,C.add(L.mult(me)).mult(ee));e.setLocationAtPoint(e.renderWorldCopies?ye.wrap():ye,pe)},scaleOfZoom:B,targetCenter:T,scaleOfMinZoom:j,pixelPathLength:N}}}class jr{constructor(e,o,f){this.blendFunction=e,this.blendColor=o,this.mask=f}}jr.Replace=[1,0],jr.disabled=new jr(jr.Replace,s.b7.transparent,[!1,!1,!1,!1]),jr.unblended=new jr(jr.Replace,s.b7.transparent,[!0,!0,!0,!0]),jr.alphaBlended=new jr([1,771],s.b7.transparent,[!0,!0,!0,!0]);const Sn=2305;class Ir{constructor(e,o,f){this.enable=e,this.mode=o,this.frontFace=f}}Ir.disabled=new Ir(!1,1029,Sn),Ir.backCCW=new Ir(!0,1029,Sn),Ir.frontCCW=new Ir(!0,1028,Sn);class ur{constructor(e,o,f){this.func=e,this.mask=o,this.range=f}}ur.ReadOnly=!1,ur.ReadWrite=!0,ur.disabled=new ur(519,ur.ReadOnly,[0,1]);const xs=7680;class dr{constructor(e,o,f,y,x,T){this.test=e,this.ref=o,this.mask=f,this.fail=y,this.depthFail=x,this.pass=T}}dr.disabled=new dr({func:519,mask:0},0,0,xs,xs,xs);const Ho=new WeakMap;function Ri(_){var e;if(Ho.has(_))return Ho.get(_);{const o=(e=_.getParameter(_.VERSION))===null||e===void 0?void 0:e.startsWith("WebGL 2.0");return Ho.set(_,o),o}}class Wh{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;const o=e.context,f=o.gl;this._texFormat=f.RGBA,this._texType=f.UNSIGNED_BYTE;const y=new s.aI;y.emplaceBack(-1,-1),y.emplaceBack(2,-1),y.emplaceBack(-1,2);const x=new s.aK;x.emplaceBack(0,1,2),this._fullscreenTriangle=new co(o.createVertexBuffer(y,ki.members),o.createIndexBuffer(x),s.aJ.simpleSegment(0,0,y.length,x.length)),this._resultBuffer=new Uint8Array(4),o.activeTexture.set(f.TEXTURE1);const T=f.createTexture();f.bindTexture(f.TEXTURE_2D,T),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.NEAREST),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,f.NEAREST),f.texImage2D(f.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=o.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(T),Ri(f)&&(this._pbo=f.createBuffer(),f.bindBuffer(f.PIXEL_PACK_BUFFER,this._pbo),f.bufferData(f.PIXEL_PACK_BUFFER,4,f.STREAM_READ),f.bindBuffer(f.PIXEL_PACK_BUFFER,null))}destroy(){const e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,o){const f=this._updateCount;return this._readbackQueue?f>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():f>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,o),this._updateCount++,this._measuredError}_bindFramebuffer(){const e=this._cachedRenderContext.context,o=e.gl;e.activeTexture.set(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,o){const f=this._cachedRenderContext.context,y=f.gl;if(this._bindFramebuffer(),f.viewport.set([0,0,this._texWidth,this._texHeight]),f.clear({color:s.b7.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(f,y.TRIANGLES,ur.disabled,dr.disabled,jr.unblended,Ir.disabled,((x,T)=>({u_input:x,u_output_expected:T}))(e,o),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Ri(y)){y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.readBuffer(y.COLOR_ATTACHMENT0),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),y.bindBuffer(y.PIXEL_PACK_BUFFER,null);const x=y.fenceSync(y.SYNC_GPU_COMMANDS_COMPLETE,0);y.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:x}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Ri(e)){const o=e.clientWaitSync(this._readbackQueue.sync,0,0);if(o===e.WAIT_FAILED)return s.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(o===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Wh._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let o=0;return o+=e[0]/256,o+=e[1]/65536,o+=e[2]/16777216,e[3]<127&&(o=-o),o/128}}const Tu=s.Z/128;function po(_,e){const o=_.granularity!==void 0?Math.max(_.granularity,1):1,f=o+(_.generateBorders?2:0),y=o+(_.extendToNorthPole||_.generateBorders?1:0)+(_.extendToSouthPole||_.generateBorders?1:0),x=f+1,T=y+1,P=_.generateBorders?-1:0,C=_.generateBorders||_.extendToNorthPole?-1:0,L=o+(_.generateBorders?1:0),N=o+(_.generateBorders||_.extendToSouthPole?1:0),B=x*T,j=f*y*6,K=x*T>65536;if(K&&e==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const ee=K||e==="32bit",me=new Int16Array(2*B);let pe=0;for(let Ee=C;Ee<=N;Ee++)for(let xe=P;xe<=L;xe++){let Pe=xe/o*s.Z;xe===-1&&(Pe=-64),xe===o+1&&(Pe=s.Z+Tu);let Ie=Ee/o*s.Z;Ee===-1&&(Ie=_.extendToNorthPole?s.b9:-64),Ee===o+1&&(Ie=_.extendToSouthPole?s.ba:s.Z+Tu),me[pe++]=Pe,me[pe++]=Ie}const ye=ee?new Uint32Array(j):new Uint16Array(j);let be=0;for(let Ee=0;Ee<y;Ee++)for(let xe=0;xe<f;xe++){const Pe=xe+1+Ee*x,Ie=xe+(Ee+1)*x,Ce=xe+1+(Ee+1)*x;ye[be++]=xe+Ee*x,ye[be++]=Ie,ye[be++]=Pe,ye[be++]=Pe,ye[be++]=Ie,ye[be++]=Ce}return{vertices:me.buffer.slice(0),indices:ye.buffer.slice(0),uses32bitIndices:ee}}const mo=new s.aH({fill:new s.bb(128,2),line:new s.bb(512,0),tile:new s.bb(128,32),stencil:new s.bb(128,1),circle:3});class Dl{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return Ai.projectionGlobe}get vertexShaderPreludeCode(){return Ai.projectionMercator.vertexSource}get subdivisionGranularity(){return mo}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(e){this._errorMeasurement||(this._errorMeasurement=new Wh(e));const o=s.S(this._errorQueryLatitudeDegrees),f=2*Math.atan(Math.exp(Math.PI-o*Math.PI*2))-.5*Math.PI,y=this._errorMeasurement.updateErrorLoop(o,f),x=D.now();y!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=y,this._errorMeasurementLastChangeTime=x);const T=Math.min(Math.max((x-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=s.bc(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,s.bd(T))}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,o,f,y,x){const T=(x==="stencil"?mo.stencil:mo.tile).getGranularityForZoomLevel(o.z);return this._getMesh(e,{granularity:T,generateBorders:f,extendToNorthPole:o.y===0&&y,extendToSouthPole:o.y===(1<<o.z)-1&&y})}_getMesh(e,o){const f=this._getMeshKey(o);if(f in this._tileMeshCache)return this._tileMeshCache[f];const y=function(x,T){const P=po(T,"16bit"),C=s.aI.deserialize({arrayBuffer:P.vertices,length:P.vertices.byteLength/2/2}),L=s.aK.deserialize({arrayBuffer:P.indices,length:P.indices.byteLength/2/3});return new co(x.createVertexBuffer(C,ki.members),x.createIndexBuffer(L),s.aJ.simpleSegment(0,0,C.length,L.length))}(e,o);return this._tileMeshCache[f]=y,y}
vendor: 5,893 bytes, line 803
803recalculate(e){}hasTransition(){const e=D.now();let o=!1;return o=o||(e-this._errorMeasurementLastChangeTime)/1e3<.7,o=o||this._errorMeasurement&&this._errorMeasurement.awaitingQuery,o}setErrorQueryLatitudeDegrees(e){this._errorQueryLatitudeDegrees=e}}const bs=new s.r({type:new s.D(s.v.projection.type)});class Rl extends s.E{constructor(e){super(),this._transitionable=new s.T(bs),this.setProjection(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new s.C(0)),this._mercatorProjection=new qo,this._verticalPerspectiveProjection=new Dl}get transitionState(){const e=this.properties.get("type");if(typeof e=="string"&&e==="mercator")return 0;if(typeof e=="string"&&e==="vertical-perspective")return 1;if(e instanceof s.be){if(e.from==="vertical-perspective"&&e.to==="mercator")return 1-e.transition;if(e.from==="mercator"&&e.to==="vertical-perspective")return e.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,o,f,y,x){return this.currentProjection.getMeshFromTileID(e,o,f,y,x)}setProjection(e){this._transitionable.setValue("type",(e==null?void 0:e.type)||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function go(_){const e=ws(_.worldSize,_.center.lat);return 2*Math.PI*e}function yo(_,e,o,f,y){const x=1/(1<<y),T=e/s.Z*x+f*x,P=s.bg((_/s.Z*x+o*x)*Math.PI*2+Math.PI,2*Math.PI),C=2*Math.atan(Math.exp(Math.PI-T*Math.PI*2))-.5*Math.PI,L=Math.cos(C),N=new Float64Array(3);return N[0]=Math.sin(P)*L,N[1]=Math.sin(C),N[2]=Math.cos(P)*L,N}function Nn(_){return function(e,o){const f=Math.cos(o),y=new Float64Array(3);return y[0]=Math.sin(e)*f,y[1]=Math.sin(o),y[2]=Math.cos(e)*f,y}(_.lng*Math.PI/180,_.lat*Math.PI/180)}function ws(_,e){return _/(2*Math.PI)/Math.cos(e*Math.PI/180)}function Ll(_){const e=Math.asin(_[1])/Math.PI*180,o=Math.sqrt(_[0]*_[0]+_[2]*_[2]);if(o>1e-6){const f=_[0]/o,y=Math.acos(_[2]/o),x=(f>0?y:-y)/Math.PI*180;return new s.Q(s.aL(x,-180,180),e)}return new s.Q(0,e)}function qn(_){return Math.cos(_*Math.PI/180)}function En(_,e){const o=qn(_),f=qn(e);return s.ah(f/o)}function Ol(_,e){const o=_.rotate(e.bearingInRadians),f=e.zoom+En(e.center.lat,0),y=s.bc(1/qn(e.center.lat),1/qn(Math.min(Math.abs(e.center.lat),60)),s.bf(f,7,3,0,1)),x=360/go({worldSize:e.worldSize,center:{lat:e.center.lat}});return new s.Q(e.center.lng-o.x*x*y,s.ae(e.center.lat+o.y*x,-85.051129,s.af))}function vo(_){const e=.5*_,o=Math.sin(e),f=Math.cos(e);return Math.log(o+f)-Math.log(f-o)}function Zd(_,e,o,f){const y=_.lat+o*f;if(Math.abs(o)>1){const x=(Math.sign(_.lat+o)!==Math.sign(_.lat)?-Math.abs(_.lat):Math.abs(_.lat))*Math.PI/180,T=Math.abs(_.lat+o)*Math.PI/180,P=vo(x+f*(T-x)),C=vo(x),L=vo(T);return new s.Q(_.lng+e*((P-C)/(L-C)),y)}return new s.Q(_.lng+e*f,y)}class Eh{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._aabbFactory=e}recalculateCache(){if(!this._hadAnyChanges)return;const e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileAABB(e,o,f,y){const x=`${e.z}_${e.x}_${e.y}`,T=this._cache.get(x);if(T)return T;const P=this._cachePrevious.get(x);if(P)return this._cache.set(x,P),P;const C=this._aabbFactory(e,o,f,y);return this._cache.set(x,C),this._hadAnyChanges=!0,C}}function hi(_,e,o){const f=_-e;return f<0?-f:Math.max(0,f-o)}function Fs(_,e,o,f,y){const x=_-o;let T;return T=x<0?Math.min(-x,1+x-y):x>1?Math.min(Math.max(x-y,0),1-x):0,Math.max(T,hi(e,f,y))}class Ya{constructor(){this._aabbCache=new Eh(this._computeTileAABB)}recalculateCache(){this._aabbCache.recalculateCache()}distanceToTile2d(e,o,f,y){const x=1<<f.z,T=1/x,P=f.x/x,C=f.y/x;let L=2;return L=Math.min(L,Fs(e,o,P,C,T)),L=Math.min(L,Fs(e,o,P+.5,-C-T,T)),L=Math.min(L,Fs(e,o,P+.5,2-C-T,T)),L}getWrap(e,o,f){const y=1<<o.z,x=1/y,T=o.x/y,P=hi(e.x,T,x),C=hi(e.x,T-1,x),L=hi(e.x,T+1,x),N=Math.min(P,C,L);return N===L?1:N===C?-1:0}allowVariableZoom(e,o){return $e(e,o)>4}allowWorldCopies(){return!1}getTileAABB(e,o,f,y){return this._aabbCache.getTileAABB(e,o,f,y)}_computeTileAABB(e,o,f,y){if(e.z<=0)return new gn([-1,-1,-1],[1,1,1]);if(e.z===1)return new gn([e.x===0?-1:0,e.y===0?0:-1,-1],[e.x===0?0:1,e.y===0?1:0,1]);{const x=[yo(0,0,e.x,e.y,e.z),yo(s.Z,0,e.x,e.y,e.z),yo(s.Z,s.Z,e.x,e.y,e.z),yo(0,s.Z,e.x,e.y,e.z)],T=[1,1,1],P=[-1,-1,-1];for(const C of x)for(let L=0;L<3;L++)T[L]=Math.min(T[L],C[L]),P[L]=Math.max(P[L],C[L]);if(e.y===0||e.y===(1<<e.z)-1){const C=[0,e.y===0?1:-1,0];for(let L=0;L<3;L++)T[L]=Math.min(T[L],C[L]),P[L]=Math.max(P[L],C[L])}return new gn(T,P)}}}
vendor: 4,886 bytes, line 803
803class _o{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,o,f){return this._helper.interpolatePadding(e,o,f)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,o){this._helper.resize(e,o)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,o){this._helper.overrideNearFarZ(e,o)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e){}constructor(){this._cachedClippingPlane=s.bk(),this._projectionMatrix=s.b1(),this._globeViewProjMatrix32f=s.b0(),this._globeViewProjMatrixNoCorrection=s.b1(),this._globeViewProjMatrixNoCorrectionInverted=s.b1(),this._globeProjMatrixInverted=s.b1(),this._cameraPosition=s.bh(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new Yn({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,o)=>this.getConstrained(e,o)}),this._coveringTilesDetailsProvider=new Ya}clone(){const e=new _o;return e.apply(this),e}apply(e,o){this._globeLatitudeErrorCorrectionRadians=o||0,this._helper.apply(e)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const e=s.bh();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){const{overscaledTileID:o,applyGlobeMatrix:f}=e,y=this._helper.getMercatorTileCoordinates(o);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:y,clippingPlane:this._cachedClippingPlane,projectionTransition:f?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){const o=this.pitchInRadians,f=this.cameraToCenterDistance/e,y=Math.sin(o)*f,x=Math.cos(o)*f+1,T=1/Math.sqrt(y*y+x*x)*1;let P=-y,C=x;const L=Math.sqrt(P*P+C*C);P/=L,C/=L;const N=[0,P,C];s.bl(N,N,[0,0,0],-this.bearingInRadians),s.bm(N,N,[0,0,0],-1*this.center.lat*Math.PI/180),s.bn(N,N,[0,0,0],this.center.lng*Math.PI/180);const B=1/s.bo(N);return s.aO(N,N,B),[...N,-T*B]}isLocationOccluded(e){return!this.isSurfacePointVisible(Nn(e))}transformLightDirection(e){const o=this._helper._center.lng*Math.PI/180,f=this._helper._center.lat*Math.PI/180,y=Math.cos(f),x=[Math.sin(o)*y,Math.sin(f),Math.cos(o)*y],T=[x[2],0,-x[
vendor: 6,061 bytes, line 803
8030]],P=[0,0,0];s.aU(P,T,x),s.aT(T,T),s.aT(P,P);const C=[0,0,0];return s.aT(C,[T[0]*e[0]+P[0]*e[1]+x[0]*e[2],T[1]*e[0]+P[1]*e[1]+x[1]*e[2],T[2]*e[0]+P[2]*e[1]+x[2]*e[2]]),C}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,o,f){const y=function(P,C,L){const N=1/(1<<L.z);return new s.$(P/s.Z*N+L.x*N,C/s.Z*N+L.y*N)}(e,o,f.canonical),x=(T=y.y,[s.bg(y.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-T*Math.PI*2))-.5*Math.PI]);var T;return this.getCircleRadiusCorrection()/Math.cos(x[1])}projectTileCoordinates(e,o,f,y){const x=f.canonical,T=yo(e,o,x.x,x.y,x.z),P=1+(y?y(e,o):0)/s.bu,C=[T[0]*P,T[1]*P,T[2]*P,1];s.at(C,C,this._globeViewProjMatrixNoCorrection);const L=this._cachedClippingPlane,N=L[0]*T[0]+L[1]*T[1]+L[2]*T[2]+L[3]<0;return{point:new s.P(C[0]/C[3],C[1]/C[3]),signedDistanceFromCamera:C[3],isOccluded:N}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;const e=ws(this.worldSize,this.center.lat),o=s.b2(),f=s.b2();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),s.aY(o,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);const y=this.centerOffset;o[8]=2*-y.x/this._helper._width,o[9]=2*y.y/this._helper._height,this._projectionMatrix=s.aZ(o),this._globeProjMatrixInverted=s.b2(),s.an(this._globeProjMatrixInverted,o),s.L(o,o,[0,0,-this.cameraToCenterDistance]),s.a_(o,o,this.rollInRadians),s.a$(o,o,-this.pitchInRadians),s.a_(o,o,this.bearingInRadians),s.L(o,o,[0,0,-e]);const x=s.bh();x[0]=e,x[1]=e,x[2]=e,s.a$(f,o,this.center.lat*Math.PI/180),s.bp(f,f,-this.center.lng*Math.PI/180),s.M(f,f,x),this._globeViewProjMatrixNoCorrection=f,s.a$(o,o,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),s.bp(o,o,-this.center.lng*Math.PI/180),s.M(o,o,x),this._globeViewProjMatrix32f=new Float32Array(o),this._globeViewProjMatrixNoCorrectionInverted=s.b2(),s.an(this._globeViewProjMatrixNoCorrectionInverted,f);const T=s.bh();this._cameraPosition=s.bh(),this._cameraPosition[2]=this.cameraToCenterDistance/e,s.bl(this._cameraPosition,this._cameraPosition,T,-this.rollInRadians),s.bm(this._cameraPosition,this._cameraPosition,T,this.pitchInRadians),s.bl(this._cameraPosition,this._cameraPosition,T,-this.bearingInRadians),s.aP(this._cameraPosition,this._cameraPosition,[0,0,1]),s.bm(this._cameraPosition,this._cameraPosition,T,-this.center.lat*Math.PI/180),s.bn(this._cameraPosition,this._cameraPosition,T,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);const P=s.aZ(this._globeViewProjMatrixNoCorrectionInverted);s.M(P,P,[1,1,-1]),this._cachedFrustum=zr.fromInvProjectionMatrix(P)}calculateFogMatrix(e){s.w("calculateFogMatrix is not supported on globe projection.");const o=s.b2();return s.ad(o),o}getVisibleUnwrappedCoordinates(e){return[new s.aW(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e&&s.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,o){if(!this._globeViewProjMatrixNoCorrection)return 1;const f=Nn(e);s.aO(f,f,1+o/s.bu);const y=s.bk();return s.at(y,[f[0],f[1],f[2],1],this._globeViewProjMatrixNoCorrection),y[2]/y[3]}populateCache(e){}getBounds(){const e=.5*this.width,o=.5*this.height,f=[new s.P(0,0),new s.P(e,0),new s.P(this.width,0),new s.P(this.width,o),new s.P(this.width,this.height),new s.P(e,this.height),new s.P(0,this.height),new s.P(0,o)],y=[];for(const B of f)y.push(this.unprojectScreenPoint(B));let x=0,T=0,P=0,C=0;const L=this.center;for(const B of y){const j=s.bq(L.lng,B.lng),K=s.bq(L.lat,B.lat);j<T&&(T=j),j>x&&(x=j),K<C&&(C=K),K>P&&(P=K)}const N=[L.lng+T,L.lat+C,L.lng+x,L.lat+P];return this.isSurfacePointOnScreen([0,1,0])&&(N[3]=90,N[0]=-180,N[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(N[1]=-90,N[0]=-180,N[2]=180),new Yr(N)}getConstrained(e,o){const f=s.ae(e.lat,-85.051129,s.af),y=s.ae(+o,this.minZoom+En(0,f),this.maxZoom);return{center:new s.Q(e.lng,f),zoom:y}}calculateCenterFromCameraLngLatAlt(e,o,f,y){return this._helper.calculateCenterFromCameraLngLatAlt(e,o,f,y)}setLocationAtPoint(e,o){const f=Nn(this.unprojectScreenPoint(o)),y=Nn(e),x=s.bh();s.br(x);const T=s.bh();s.bn(T,f,x,-this.center.lng*Math.PI/180),s.bm(T,T,x,this.center.lat*Math.PI/180);const P=y[0]*y[0]+y[2]*y[2],C=T[0]*T[0];if(P<C)return;const L=Math.sqrt(P-C),N=-L,B=s.bs(y[0],y[2],T[0],L),j=s.bs(y[0],y[2],T[0],N),K=s.bh();s.bn(K,y,x,-B);const ee=s.bs(K[1],K[2],T[1],T[2]),me=s.bh();s.bn(me,y,x,-j);const pe=s.bs(me[1],me[2],T[1],T[2]),ye=.5*Math.PI,be=ee>=-ye&&ee<=ye,Ee=pe>=-ye&&pe<=ye;let xe,Pe;if(be&&Ee){const ct=this.center.lng*Math.PI/180,at=this.center.lat*Math.PI/180;s.bv(B,ct)+s.bv(ee,at)<s.bv(j,ct)+s.bv(pe,at)?(xe=B,Pe=ee):(xe=j,Pe=pe)}else if(be)xe=B,Pe=ee;else{if(!Ee)return;xe=j,Pe=pe}const Ie=xe/Math.PI*180,Ce=Pe/Math.PI*180,Ge=this.center.lat;this.setCenter(new s.Q(Ie,s.ae(Ce,-90,90))),this.setZoom(this.zoom+En(Ge,this.center.lat))}locationToScreenPoint(e,o){const f=Nn(e);if(o){const y=o.getElevationForLngLatZoom(e,this._helper._tileZoom);s.aO(f,f,1+y/s.bu)}return this._projectSurfacePointToScreen(f)}_projectSurfacePointToScreen(e){const o=s.bk();return s.at(o,[...e,1],this._globeViewProjMatrixNoCorrection),o[0]/=o[3],o[1]/=o[3],new s.P((.5*o[0]+.5)*this.width,(.5*-o[1]+.5)*this.height)}screenPointToMercatorCoordinate(e,o){if(o){const f=o.pointCoordinate(e);if(f)return f}return s.$.fromLngLat(this.unprojectScreenPoint(e))}screenPointToLocation(e,o){var f;return(f=this.screenPointToMercatorCoordinate(e,o))===null||f===void 0?void 0:f.toLngLat()}
vendor: 9,867 bytes, line 803
803isPointOnMapSurface(e,o){const f=this._cameraPosition,y=this.getRayDirectionFromPixel(e);return!!this.rayPlanetIntersection(f,y)}getRayDirectionFromPixel(e){const o=s.bk();o[0]=e.x/this.width*2-1,o[1]=-1*(e.y/this.height*2-1),o[2]=1,o[3]=1,s.at(o,o,this._globeViewProjMatrixNoCorrectionInverted),o[0]/=o[3],o[1]/=o[3],o[2]/=o[3];const f=s.bh();f[0]=o[0]-this._cameraPosition[0],f[1]=o[1]-this._cameraPosition[1],f[2]=o[2]-this._cameraPosition[2];const y=s.bh();return s.aT(y,f),y}isSurfacePointVisible(e){const o=this._cachedClippingPlane;return o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;const o=s.bk();return s.at(o,[...e,1],this._globeViewProjMatrixNoCorrection),o[0]/=o[3],o[1]/=o[3],o[2]/=o[3],o[0]>-1&&o[0]<1&&o[1]>-1&&o[1]<1&&o[2]>-1&&o[2]<1}rayPlanetIntersection(e,o){const f=s.aV(e,o),y=s.bh(),x=s.bh();s.aO(x,o,f),s.aS(y,e,x);const T=1-s.aV(y,y);if(T<0)return null;const P=s.aV(e,e)-1,C=-f+(f<0?1:-1)*Math.sqrt(T),L=P/C,N=C;return{tMin:Math.min(L,N),tMax:Math.max(L,N)}}unprojectScreenPoint(e){const o=this._cameraPosition,f=this.getRayDirectionFromPixel(e),y=this.rayPlanetIntersection(o,f);if(y){const N=s.bh();s.aP(N,o,[f[0]*y.tMin,f[1]*y.tMin,f[2]*y.tMin]);const B=s.bh();return s.aT(B,N),Ll(B)}const x=this._cachedClippingPlane,T=x[0]*f[0]+x[1]*f[1]+x[2]*f[2],P=-s.bt(x,o)/T,C=s.bh();if(P>0)s.aP(C,o,[f[0]*P,f[1]*P,f[2]*P]);else{const N=s.bh();s.aP(N,o,[2*f[0],2*f[1],2*f[2]]);const B=s.bt(this._cachedClippingPlane,N);s.aS(C,N,[this._cachedClippingPlane[0]*B,this._cachedClippingPlane[1]*B,this._cachedClippingPlane[2]*B])}const L=function(N){const B=s.bh();return B[0]=N[0]*-N[3],B[1]=N[1]*-N[3],B[2]=N[2]*-N[3],{center:B,radius:Math.sqrt(1-N[3]*N[3])}}(x);return Ll(function(N,B,j){const K=s.bh();s.aS(K,j,N);const ee=s.bh();return s.bi(ee,N,K,B/s.bj(K)),ee}(L.center,L.radius,C))}getMatrixForModel(e,o){const f=s.Q.convert(e),y=1/s.bu,x=s.b1();return s.bp(x,x,f.lng/180*Math.PI),s.a$(x,x,-f.lat/180*Math.PI),s.L(x,x,[0,0,1+o/s.bu]),s.a$(x,x,.5*Math.PI),s.M(x,x,[y,y,y]),x}getProjectionDataForCustomLayer(e=!0){const o=this.getProjectionData({overscaledTileID:new s.Y(0,0,0,0,0),applyGlobeMatrix:e});return o.tileMercatorCoords=[0,0,1,1],o}getFastPathSimpleProjectionMatrix(e){}}class Wu{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,o,f){return this._helper.interpolatePadding(e,o,f)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,o,f=!0){this._helper.resize(e,o,f)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,o){this._helper.overrideNearFarZ(e,o)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,o){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=o,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().recalculateCache(),this._mercatorTransform.getCoveringTilesDetailsProvider().recalculateCache()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new Yn({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,o)=>this.getConstrained(e,o)}),this._globeness=1,this._mercatorTransform=new Al,this._verticalPerspectiveTransform=new _o}clone(){const e=new Wu;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this),e}apply(e){this._helper.apply(e),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){const o=this._mercatorTransform.getProjectionData(e),f=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?f.mainMatrix:o.mainMatrix,clippingPlane:f.clippingPlane,tileMercatorCoords:f.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:o.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return s.bc(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return s.bc(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,o,f){const y=this._mercatorTransform.getPitchedTextCorrection(e,o,f),x=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,o,f);return s.bc(y,x,this._globeness)}projectTileCoordinates(e,o,f,y){return this.currentTransform.projectTileCoordinates(e,o,f,y)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,o){return this.currentTransform.lngLatToCameraDepth(e,o)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}getConstrained(e,o){return this.currentTransform.getConstrained(e,o)}calculateCenterFromCameraLngLatAlt(e,o,f,y){return this._helper.calculateCenterFromCameraLngLatAlt(e,o,f,y)}setLocationAtPoint(e,o){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,o),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(e,o),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(e,o){return this.currentTransform.locationToScreenPoint(e,o)}screenPointToMercatorCoordinate(e,o){return this.currentTransform.screenPointToMercatorCoordinate(e,o)}screenPointToLocation(e,o){return this.currentTransform.screenPointToLocation(e,o)}
vendor: 2,615 bytes, line 803
803isPointOnMapSurface(e,o){return this.currentTransform.isPointOnMapSurface(e,o)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,o){return this.currentTransform.getMatrixForModel(e,o)}getProjectionDataForCustomLayer(e=!0){const o=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return o;const f=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return f.fallbackMatrix=o.mainMatrix,f}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class Ra{get useGlobeControls(){return!0}handlePanInertia(e,o){const f=Ol(e,o);return Math.abs(f.lng-o.center.lng)>180&&(f.lng=o.center.lng+179.5*Math.sign(f.lng-o.center.lng)),{easingCenter:f,easingOffset:new s.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,o){const f=e.around,y=o.screenPointToLocation(f);e.bearingDelta&&o.setBearing(o.bearing+e.bearingDelta),e.pitchDelta&&o.setPitch(o.pitch+e.pitchDelta),e.rollDelta&&o.setRoll(o.roll+e.rollDelta);const x=o.zoom;e.zoomDelta&&o.setZoom(o.zoom+e.zoomDelta);const T=o.zoom-x;if(T===0)return;const P=s.bq(o.center.lng,y.lng),C=P/(Math.abs(P/180)+1),L=s.bq(o.center.lat,y.lat),N=o.getRayDirectionFromPixel(f),B=o.cameraPosition,j=-1*s.aV(B,N),K=s.bh();s.aP(K,B,[N[0]*j,N[1]*j,N[2]*j]);const ee=s.bo(K)-1,me=Math.exp(.5*-Math.max(ee-.3,0)),pe=ws(o.worldSize,o.center.lat)/Math.min(o.width,o.height),ye=s.bf(pe,.9,.5,1,.25),be=(1-s.ac(-T))*Math.min(me,ye),Ee=o.center.lat,xe=o.zoom,Pe=new s.Q(o.center.lng+C*be,s.ae(o.center.lat+L*be,-85.051129,s.af));o.setLocationAtPoint(y,f);const Ie=o.center,Ce=s.bf(Math.abs(P),45,85,0,1),Ge=s.bf(pe,.75,.35,0,1),ct=Math.pow(Math.max(Ce,Ge),.25),at=s.bq(Ie.lng,Pe.lng),Ke=s.bq(Ie.lat,Pe.lat);o.setCenter(new s.Q(Ie.lng+at*ct,Ie.lat+Ke*ct).wrap()),o.setZoom(xe+En(Ee,o.center.lat))}handleMapControlsPan(e,o,f){if(!e.panDelta)return;const y=o.center.lat,x=o.zoom;o.setCenter(Ol(e.panDelta,o).wrap()),o.setZoom(x+En(y,o.center.lat))}cameraForBoxAndBearing(e,o,f,y,x){const T=aa(e,o,f,y,x),P=o.left/x.width*2-1,C=(x.width-o.right)/x.width*2-1,L=o.top/x.height*-2+1,N=(x.height-o.bottom)/x.height*-2+1,B=s.bq(f.getWest(),f.getEast())<0,j=B?f.getEast():f.getWest(),K=B?f.getWest():f.getEast(),ee=Math.max(f.getNorth(),f.getSouth()),me=Math.min(f.getNorth(),f.getSouth()),pe=j+.5*s.bq(j,K),ye=ee+.5*s.bq(ee,me),be=x.clone();be.setCenter(T.center),be.setBearing(T.bearing),be.setPitch(0),be.setRoll(0),be.setZoom(T.zoom);const Ee=be.modelViewProjectionMatrix,xe=[Nn(f.getNorthWest()),Nn(f.getNorthEast()),Nn(f.getSouthWest
vendor: 4,067 bytes, line 803
803()),Nn(f.getSouthEast()),Nn(new s.Q(K,ye)),Nn(new s.Q(j,ye)),Nn(new s.Q(pe,ee)),Nn(new s.Q(pe,me))],Pe=Nn(T.center);let Ie=Number.POSITIVE_INFINITY;for(const Ce of xe)P<0&&(Ie=Ra.getLesserNonNegativeNonNull(Ie,Ra.solveVectorScale(Ce,Pe,Ee,"x",P))),C>0&&(Ie=Ra.getLesserNonNegativeNonNull(Ie,Ra.solveVectorScale(Ce,Pe,Ee,"x",C))),L>0&&(Ie=Ra.getLesserNonNegativeNonNull(Ie,Ra.solveVectorScale(Ce,Pe,Ee,"y",L))),N<0&&(Ie=Ra.getLesserNonNegativeNonNull(Ie,Ra.solveVectorScale(Ce,Pe,Ee,"y",N)));if(Number.isFinite(Ie)&&Ie!==0)return T.zoom=be.zoom+s.ah(Ie),T;Di()}handleJumpToCenterZoom(e,o){const f=e.center.lat,y=e.getConstrained(o.center?s.Q.convert(o.center):e.center,e.zoom).center;e.setCenter(y.wrap());const x=o.zoom!==void 0?+o.zoom:e.zoom+En(f,y.lat);e.zoom!==x&&e.setZoom(x)}handleEaseTo(e,o){const f=e.zoom,y=e.center,x=e.padding,T={roll:e.roll,pitch:e.pitch,bearing:e.bearing},P={roll:o.roll===void 0?e.roll:o.roll,pitch:o.pitch===void 0?e.pitch:o.pitch,bearing:o.bearing===void 0?e.bearing:o.bearing},C=o.zoom!==void 0,L=!e.isPaddingEqual(o.padding);let N=!1;const B=o.center?s.Q.convert(o.center):y,j=e.getConstrained(B,f).center;wa(e,j);const K=e.clone();K.setCenter(j),K.setZoom(C?+o.zoom:f+En(y.lat,B.lat)),K.setBearing(o.bearing);const ee=new s.P(s.ae(e.centerPoint.x+o.offsetAsPoint.x,0,e.width),s.ae(e.centerPoint.y+o.offsetAsPoint.y,0,e.height));K.setLocationAtPoint(j,ee);const me=(o.offset&&o.offsetAsPoint.mag())>0?K.center:j,pe=C?+o.zoom:f+En(y.lat,me.lat),ye=f+En(y.lat,0),be=pe+En(me.lat,0),Ee=s.bq(y.lng,me.lng),xe=s.bq(y.lat,me.lat),Pe=s.ac(be-ye);return N=pe!==f,{easeFunc:Ie=>{if(s.b6(T,P)||Ti({startEulerAngles:T,endEulerAngles:P,tr:e,k:Ie,useSlerp:T.roll!=P.roll}),L&&e.interpolatePadding(x,o.padding,Ie),o.around)s.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(o.around,o.aroundPoint);else{const Ce=be>ye?Math.min(2,Pe):Math.max(.5,Pe),Ge=Math.pow(Ce,1-Ie),ct=Zd(y,Ee,xe,Ie*Ge);e.setCenter(ct.wrap())}if(N){const Ce=s.B.number(ye,be,Ie)+En(0,e.center.lat);e.setZoom(Ce)}},isZooming:N,elevationCenter:me}}handleFlyTo(e,o){const f=o.zoom!==void 0,y=e.center,x=e.zoom,T=e.padding,P=!e.isPaddingEqual(o.padding),C=e.getConstrained(s.Q.convert(o.center||o.locationAtOffset),x).center,L=f?+o.zoom:e.zoom+En(e.center.lat,C.lat),N=e.clone();N.setCenter(C),N.setZoom(L),N.setBearing(o.bearing);const B=new s.P(s.ae(e.centerPoint.x+o.offsetAsPoint.x,0,e.width),s.ae(e.centerPoint.y+o.offsetAsPoint.y,0,e.height));N.setLocationAtPoint(C,B);const j=N.center;wa(e,j);const K=function(xe,Pe,Ie){const Ce=Nn(Pe),Ge=Nn(Ie),ct=s.aV(Ce,Ge),at=Math.acos(ct),Ke=go(xe);return at/(2*Math.PI)*Ke}(e,y,j),ee=x+En(y.lat,0),me=L+En(j.lat,0),pe=s.ac(me-ee);let ye;if(typeof o.minZoom=="number"){const xe=+o.minZoom+En(j.lat,0),Pe=Math.min(xe,ee,me)+En(0,j.lat),Ie=e.getConstrained(j,Pe).zoom+En(j.lat,0);ye=s.ac(Ie-ee)}const be=s.bq(y.lng,j.lng),Ee=s.bq(y.lat,j.lat);return{easeFunc:(xe,Pe,Ie,Ce)=>{const Ge=Zd(y,be,Ee,Ie);P&&e.interpolatePadding(T,o.padding,xe);const ct=xe===1?j:Ge;e.setCenter(ct.wrap());const at=ee+s.ah(Pe);e.setZoom(xe===1?L:at+En(0,ct.lat))},scaleOfZoom:pe,targetCenter:j,scaleOfMinZoom:ye,pixelPathLength:K}}static solveVectorScale(e,o,f,y,x){const T=y==="x"?[f[0],f[4],f[8],f[12]]:[f[1],f[5],f[9],f[13]],P=[f[3],f[7],f[11],f[15]],C=e[0]*T[0]+e[1]*T[1]+e[2]*T[2],L=e[0]*P[0]+e[1]*P[1]+e[2]*P[2],N=o[0]*T[0]+o[1]*T[1]+o[2]*T[2],B=o[0]*P[0]+o[1]*P[1]+o[2]*P[2];return N+x*L===C+x*B||P[3]*(C-N)+T[3]*(B-L)+C*B==N*L?null:(N+T[3]-x*B-x*P[3])/(N-C-x*B+x*L)}static getLesserNonNegativeNonNull(e,o){return o!==null&&o>=0&&o<e?o:e}}class Ko{constructor(e){this._globe=e,this._mercatorCameraHelper=new kl,this._verticalPerspectiveCameraHelper=new Ra}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(e,o){return this.currentHelper.handlePanInertia(e,o)}handleMapControlsRollPitchBearingZoom(e,o){return this.currentHelper.handleMapControlsRollPitchBearingZoom(e,o)}
803handleMapControlsPan(e,o,f){this.currentHelper.handleMapControlsPan(e,o,f)}cameraForBoxAndBearing(e,o,f,y,x){return this.currentHelper.cameraForBoxAndBearing(e,o,f,y,x)}handleJumpToCenterZoom(e,o){this.currentHelper.handleJumpToCenterZoom(e,o)}handleEaseTo(e,o){return this.currentHelper.handleEaseTo(e,o)}handleFlyTo(e,o){return this.currentHelper.handleFlyTo(e,o)}}const Xl=(_,e)=>s.x(_,e&&e.filter(o=>o.identifier!=="source.canvas")),Wp=s.bw();class Mh extends s.E{constructor(e,o={}){super(),this._rtlPluginLoaded=()=>{for(const f in this.sourceCaches){const y=this.sourceCaches[f].getSource().type;y!=="vector"&&y!=="geojson"||this.sourceCaches[f].reload()}},this.map=e,this.dispatcher=new or(rr(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(f,y)=>this.getGlyphs(f,y)),this.dispatcher.registerMessageHandler("GI",(f,y)=>this.getImages(f,y)),this.imageManager=new ft,this.imageManager.setEventedParent(this),this.glyphManager=new Re(e._requestManager,o.localIdeographFontFamily),this.lineAtlas=new xt(256,512),this.crossTileSymbolIndex=new Go,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new s.bx,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",s.by()),mn().on(ni,this._rtlPluginLoaded),this.on("data",f=>{if(f.dataType!=="source"||f.sourceDataType!=="metadata")return;const y=this.sourceCaches[f.sourceId];if(!y)return;const x=y.getSource();if(x&&x.vectorLayerIds)for(const T in this._layers){const P=this._layers[T];P.source===x.id&&this._validateLayer(P)}})}loadURL(e,o={},f){this.fire(new s.l("dataloading",{dataType:"style"})),o.validate=typeof o.validate!="boolean"||o.validate;const y=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;const x=this._loadStyleRequest;s.j(y,this._loadStyleRequest).then(T=>{this._loadStyleRequest=null,this._load(T.data,o,f)}).catch(T=>{this._loadStyleRequest=null,T&&!x.signal.aborted&&this.fire(new s.k(T))})}loadJSON(e,o={},f){this.fire(new s.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,D.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,o.validate=o.validate!==!1,this._load(e,o,f)}).catch(()=>{})}loadEmpty(){this.fire(new s.l("dataloading",{dataType:"style"})),this._load(Wp,{validate:!1})}_load(e,o,f){var y,x;const T=o.transformStyle?o.transformStyle(f,e):e;if(!o.validate||!Xl(this,s.y(T))){this._loaded=!0,this.stylesheet=T;for(const P in T.sources)this.addSource(P,T.sources[P],{validate:!1});T.sprite?this._loadSprite(T.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(T.glyphs),this._createLayers(),this.light=new _t(this.stylesheet.light),this._setProjectionInternal(((y=this.stylesheet.projection)===null||y===void 0?void 0:y.type)||"mercator"),this.sky=new bt(this.stylesheet.sky),this.map.setTerrain((x=this.stylesheet.terrain)!==null&&x!==void 0?x:null),this.fire(new s.l("data",{dataType:"style"})),this.fire(new s.l("style.load"))}}_createLayers(){const e=s.bz(this.stylesheet.layers);this.dispatcher.broadcast("SL",e),this._order=e.map(o=>o.id),this._layers={},this._serializedLayers=null;for(const o of e){const f=s.bA(o);f.setEventedParent(this,{layer:{id:o.id}}),this._layers[o.id]=f}}_loadSprite(e,o=!1,f=void 0){let y;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(x,T,P,C){return s._(this,void 0,void 0,function*(){const L=se(x),N=P>1?"@2x":"",B={},j={};for(const{id:K,url:ee}of L){const me=T.transformRequest(De(ee,N,".json"),"SpriteJSON");B[K]=s.j(me,C);const pe=T.transformRequest(De(ee,N,".png"),"SpriteImage");j[K]=fe.getImage(pe,C)}return yield Promise.all([...Object.values(B),...Object.values(j)]),function(K,ee){return s._(this,void 0,void 0,function*(){const me={};for(const pe in K){me[pe]={};const ye=D.getImageCanvasContext((yield ee[pe]).data),be=(yield K[pe]).data;for(const Ee in be){const{width:xe,height:Pe,x:Ie,y:Ce,sdf:Ge,pixelRatio:ct,stretchX:at,stretchY:Ke,content:lt,textFitWidth:At,textFitHeight:Vt}=be[Ee];me[pe][Ee]={data:null,pixelRatio:ct,sdf:Ge,stretchX:at,stretchY:Ke,content:lt,textFitWidth:At,textFitHeight:Vt,spriteData:{width:xe,height:Pe,x:Ie,y:Ce,context:ye}}}}return me})}(B,j)})}(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(x=>
vendor: 13,083 bytes, line 803
803{if(this._spriteRequest=null,x)for(const T in x){this._spritesImagesIds[T]=[];const P=this._spritesImagesIds[T]?this._spritesImagesIds[T].filter(C=>!(C in x)):[];for(const C of P)this.imageManager.removeImage(C),this._changedImages[C]=!0;for(const C in x[T]){const L=T==="default"?C:`${T}:${C}`;this._spritesImagesIds[T].push(L),L in this.imageManager.images?this.imageManager.updateImage(L,x[T][C],!1):this.imageManager.addImage(L,x[T][C]),o&&(this._changedImages[L]=!0)}}}).catch(x=>{this._spriteRequest=null,y=x,this.fire(new s.k(y))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),o&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"})),f&&f(y)})}_unloadSprite(){for(const e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"}))}_validateLayer(e){const o=this.sourceCaches[e.source];if(!o)return;const f=e.sourceLayer;if(!f)return;const y=o.getSource();(y.type==="geojson"||y.vectorLayerIds&&y.vectorLayerIds.indexOf(f)===-1)&&this.fire(new s.k(new Error(`Source layer "${f}" does not exist on source "${y.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,o=!1){const f=this._serializedAllLayers();if(!e||e.length===0)return Object.values(o?s.bB(f):f);const y=[];for(const x of e)if(f[x]){const T=o?s.bB(f[x]):f[x];y.push(T)}return y}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};const o=Object.keys(this._layers);for(const f of o){const y=this._layers[f];y.type!=="custom"&&(e[f]=y.serialize())}return e}hasTransitions(){var e,o,f;if(!((e=this.light)===null||e===void 0)&&e.hasTransition()||!((o=this.sky)===null||o===void 0)&&o.hasTransition()||!((f=this.projection)===null||f===void 0)&&f.hasTransition())return!0;for(const y in this.sourceCaches)if(this.sourceCaches[y].hasTransition())return!0;for(const y in this._layers)if(this._layers[y].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;const o=this._changed;if(o){const y=Object.keys(this._updatedLayers),x=Object.keys(this._removedLayers);(y.length||x.length)&&this._updateWorkerLayers(y,x);for(const T in this._updatedSources){const P=this._updatedSources[T];if(P==="reload")this._reloadSource(T);else{if(P!=="clear")throw new Error(`Invalid action ${P}`);this._clearSource(T)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const T in this._updatedPaintProps)this._layers[T].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}const f={};for(const y in this.sourceCaches){const x=this.sourceCaches[y];f[y]=x.used,x.used=!1}for(const y of this._order){const x=this._layers[y];x.recalculate(e,this._availableImages),!x.isHidden(e.zoom)&&x.source&&(this.sourceCaches[x.source].used=!0)}for(const y in f){const x=this.sourceCaches[y];!!f[y]!=!!x.used&&x.fire(new s.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:y}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,o&&this.fire(new s.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const o in this.sourceCaches)this.sourceCaches[o].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,o){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:o})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,o={}){var f;this._checkLoaded();const y=this.serialize();if(e=o.transformStyle?o.transformStyle(y,e):e,((f=o.validate)===null||f===void 0||f)&&Xl(this,s.y(e)))return!1;(e=s.bB(e)).layers=s.bz(e.layers);const x=s.bC(y,e),T=this._getOperationsToPerform(x);if(T.unimplemented.length>0)throw new Error(`Unimplemented: ${T.unimplemented.join(", ")}.`);if(T.operations.length===0)return!1;for(const P of T.operations)P();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){const o=[],f=[];for(const y of e)switch(y.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":o.push(()=>this.addLayer.apply(this,y.args));break;case"removeLayer":o.push(()=>this.removeLayer.apply(this,y.args));break;case"setPaintProperty":o.push(()=>this.setPaintProperty.apply(this,y.args));break;case"setLayoutProperty":o.push(()=>this.setLayoutProperty.apply(this,y.args));break;case"setFilter":o.push(()=>this.setFilter.apply(this,y.args));break;case"addSource":o.push(()=>this.addSource.apply(this,y.args));break;case"removeSource":o.push(()=>this.removeSource.apply(this,y.args));break;case"setLayerZoomRange":o.push(()=>this.setLayerZoomRange.apply(this,y.args));break;case"setLight":o.push(()=>this.setLight.apply(this,y.args));break;case"setGeoJSONSourceData":o.push(()=>this.setGeoJSONSourceData.apply(this,y.args));break;case"setGlyphs":o.push(()=>this.setGlyphs.apply(this,y.args));break;case"setSprite":o.push(()=>this.setSprite.apply(this,y.args));break;case"setTerrain":o.push(()=>this.map.setTerrain.apply(this,y.args));break;case"setSky":o.push(()=>this.setSky.apply(this,y.args));break;case"setProjection":this.setProjection.apply(this,y.args);break;case"setTransition":o.push(()=>{});break;default:f.push(y.command)}return{operations:o,unimplemented:f}}addImage(e,o){if(this.getImage(e))return this.fire(new s.k(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,o),this._afterImageUpdated(e)}updateImage(e,o){this.imageManager.updateImage(e,o)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new s.k(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,o,f={}){if(this._checkLoaded(),this.sourceCaches[e]!==void 0)throw new Error(`Source "${e}" already exists.`);if(!o.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(o).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(o.type)>=0&&this._validate(s.y.source,`sources.${e}`,o,null,f))return;this.map&&this.map._collectResourceTiming&&(o.collectResourceTiming=!0);const y=this.sourceCaches[e]=new Be(e,o,this.dispatcher);y.style=this,y.setEventedParent(this,()=>({isSourceLoaded:y.loaded(),source:y.serialize(),sourceId:e})),y.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error("There is no source with this ID");for(const f in this._layers)if(this._layers[f].source===e)return this.fire(new s.k(new Error(`Source "${e}" cannot be removed while layer "${f}" is using it.`)));const o=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],o.fire(new s.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),o.setEventedParent(null),o.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,o){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error(`There is no source with this ID=${e}`);const f=this.sourceCaches[e].getSource();if(f.type!=="geojson")throw new Error(`geojsonSource.type is ${f.type}, which is !== 'geojson`);f.setData(o),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,o,f={}){this._checkLoaded();const y=e.id;if(this.getLayer(y))return void this.fire(new s.k(new Error(`Layer "${y}" already exists on this map.`)));let x;if(e.type==="custom"){if(Xl(this,s.bD(e)))return;x=s.bA(e)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(y,e.source),e=s.bB(e),e=s.e(e,{source:y})),this._validate(s.y.layer,`layers.${y}`,e,{arrayIndex:-1},f))return;x=s.bA(e),this._validateLayer(x),x.setEventedParent(this,{layer:{id:y}})}const T=o?this._order.indexOf(o):this._order.length;if(o&&T===-1)this.fire(new s.k(new Error(`Cannot add layer "${y}" before non-existing layer "${o}".`)));else{if(this._order.splice(T,0,y),this._layerOrderChanged=!0,this._layers[y]=x,this._removedLayers[y]&&x.source&&x.type!=="custom"){const P=this._removedLayers[y];delete this._removedLayers[y],P.type!==x.type?this._updatedSources[x.source]="clear":(this._updatedSources[x.source]="reload",this.sourceCaches[x.source].pause())}this._updateLayer(x),x.onAdd&&x.onAdd(this.map)}}moveLayer(e,o){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new s.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===o)return;const f=this._order.indexOf(e);this._order.splice(f,1);const y=o?this._order.indexOf(o):this._order.length;o&&y===-1?this.fire(new s.k(new Error(`Cannot move layer "${e}" before non-existing layer "${o}".`))):(this._order.splice(y,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();const o=this._layers[e];if(!o)return void this.fire(new s.k(new Error(`Cannot remove non-existing layer "${e}".`)));o.setEventedParent(null);const f=this._order.indexOf(e);this._order.splice(f,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=o,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],o.onRemove&&o.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,o,f){this._checkLoaded();const y=this.getLayer(e);y?y.minzoom===o&&y.maxzoom===f||(o!=null&&(y.minzoom=o),f!=null&&(y.maxzoom=f),this._updateLayer(y)):this.fire(new s.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,o,f={}){this._checkLoaded();const y=this.getLayer(e);if(y){if(!s.bE(y.filter,o))return o==null?(y.filter=void 0,void this._updateLayer(y)):void(this._validate(s.y.filter,`layers.${y.id}.filter`,o,null,f)||(y.filter=s.bB(o),this._updateLayer(y)))}else this.fire(new s.k(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return s.bB(this.getLayer(e).filter)}setLayoutProperty(e,o,f,y={}){this._checkLoaded();const x=this.getLayer(e);x?s.bE(x.getLayoutProperty(o),f)||(x.setLayoutProperty(o,f,y),this._updateLayer(x)):this.fire(new s.k(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,o){const f=this.getLayer(e);if(f)return f.getLayoutProperty(o);this.fire(new s.k(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,o,f,y={}){this._checkLoaded();const x=this.getLayer(e);x?s.bE(x.getPaintProperty(o),f)||(x.setPaintProperty(o,f,y)&&this._updateLayer(x),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new s.k(new Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,o){return this.getLayer(e).getPaintProperty(o)}setFeatureState(e,o){this._checkLoaded();const f=e.source,y=e.sourceLayer,x=this.sourceCaches[f];if(x===void 0)return void this.fire(new s.k(new Error(`The source '${f}' does not exist in the map's style.`)));const T=x.getSource().type;T==="geojson"&&y?this.fire(new s.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):T!=="vector"||y?(e.id===void 0&&this.fire(new s.k(new Error("The feature id parameter must be provided."))),x.setFeatureState(y,e.id,o)):this.fire(new s.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,o){this._checkLoaded();const f=e.source,y=this.sourceCaches[f];if(y===void 0)return void this.fire(new s.k(new Error(`The source '${f}' does not exist in the map's style.`)));const x=y.getSource().type,T=x==="vector"?e.sourceLayer:void 0;x!=="vector"||T?o&&typeof e.id!="string"&&typeof e.id!="number"?this.fire(new s.k(new Error("A feature id is required to remove its specific state property."))):y.removeFeatureState(T,e.id,o):this.fire(new s.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();
vendor: 5,720 bytes, line 803
803const o=e.source,f=e.sourceLayer,y=this.sourceCaches[o];if(y!==void 0)return y.getSource().type!=="vector"||f?(e.id===void 0&&this.fire(new s.k(new Error("The feature id parameter must be provided."))),y.getFeatureState(f,e.id)):void this.fire(new s.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new s.k(new Error(`The source '${o}' does not exist in the map's style.`)))}getTransition(){return s.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const e=s.bF(this.sourceCaches,x=>x.serialize()),o=this._serializeByIds(this._order,!0),f=this.map.getTerrain()||void 0,y=this.stylesheet;return s.bG({version:y.version,name:y.name,metadata:y.metadata,light:y.light,sky:y.sky,center:y.center,zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,sprite:y.sprite,glyphs:y.glyphs,transition:y.transition,projection:y.projection,sources:e,layers:o,terrain:f},x=>x!==void 0)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.sourceCaches[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){const o=T=>this._layers[T].type==="fill-extrusion",f={},y=[];for(let T=this._order.length-1;T>=0;T--){const P=this._order[T];if(o(P)){f[P]=T;for(const C of e){const L=C[P];if(L)for(const N of L)y.push(N)}}}y.sort((T,P)=>P.intersectionZ-T.intersectionZ);const x=[];for(let T=this._order.length-1;T>=0;T--){const P=this._order[T];if(o(P))for(let C=y.length-1;C>=0;C--){const L=y[C].feature;if(f[L.layer.id]<T)break;x.push(L),y.pop()}else for(const C of e){const L=C[P];if(L)for(const N of L)x.push(N.feature)}}return x}queryRenderedFeatures(e,o,f){o&&o.filter&&this._validate(s.y.filter,"queryRenderedFeatures.filter",o.filter,null,o);const y={};if(o&&o.layers){if(!(Array.isArray(o.layers)||o.layers instanceof Set))return this.fire(new s.k(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(const L of o.layers){const N=this._layers[L];if(!N)return this.fire(new s.k(new Error(`The layer '${L}' does not exist in the map's style and cannot be queried for features.`))),[];y[N.source]=!0}}const x=[];o.availableImages=this._availableImages;const T=this._serializedAllLayers(),P=o.layers instanceof Set?o.layers:Array.isArray(o.layers)?new Set(o.layers):null,C=Object.assign(Object.assign({},o),{layers:P});for(const L in this.sourceCaches)o.layers&&!y[L]||x.push(Er(this.sourceCaches[L],this._layers,T,e,C,f,this.map.terrain?(N,B,j)=>this.map.terrain.getElevation(N,B,j):void 0));return this.placement&&x.push(function(L,N,B,j,K,ee,me){const pe={},ye=ee.queryRenderedSymbols(j),be=[];for(const Ee of Object.keys(ye).map(Number))be.push(me[Ee]);be.sort(Gr);for(const Ee of be){const xe=Ee.featureIndex.lookupSymbolFeatures(ye[Ee.bucketInstanceId],N,Ee.bucketIndex,Ee.sourceLayerIndex,K.filter,K.layers,K.availableImages,L);for(const Pe in xe){const Ie=pe[Pe]=pe[Pe]||[],Ce=xe[Pe];Ce.sort((Ge,ct)=>{const at=Ee.featureSortOrder;if(at){const Ke=at.indexOf(Ge.featureIndex);return at.indexOf(ct.featureIndex)-Ke}return ct.featureIndex-Ge.featureIndex});for(const Ge of Ce)Ie.push(Ge)}}return function(Ee,xe,Pe){for(const Ie in Ee)for(const Ce of Ee[Ie])Wn(Ce,Pe[xe[Ie].source]);return Ee}(pe,L,B)}(this._layers,T,this.sourceCaches,e,C,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(x)}querySourceFeatures(e,o){o&&o.filter&&this._validate(s.y.filter,"querySourceFeatures.filter",o.filter,null,o);const f=this.sourceCaches[e];return f?function(y,x){const T=y.getRenderableIds().map(L=>y.getTileByID(L)),P=[],C={};for(let L=0;L<T.length;L++){const N=T[L],B=N.tileID.canonical.key;C[B]||(C[B]=!0,N.querySourceFeatures(P,x))}return P}(f,o):[]}getLight(){return this.light.getLight()}setLight(e,o={}){this._checkLoaded();const f=this.light.getLight();let y=!1;for(const T in e)if(!s.bE(e[T],f[T])){y=!0;break}if(!y)return;const x={now:D.now(),transition:s.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,o),this.light.updateTransitions(x)}getProjection(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.projection}setProjection(e){if(this._checkLoaded(),this.projection){if(this.projection.name===e.type)return;this.projection.destroy(),delete this.projection}this.stylesheet.projection=e,this._setProjectionInternal(e.type)}getSky(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.sky}setSky(e,o={}){this._checkLoaded();const f=this.getSky();let y=!1;if(!e&&!f)return;if(e&&!f)y=!0;else if(!e&&f)y=!0;else for(const T in e)if(!s.bE(e[T],f[T])){y=!0;break}if(!y)return;const x={now:D.now(),transition:s.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,o),this.sky.updateTransitions(x)}_setProjectionInternal(e){const o=function(f){if(Array.isArray(f)){const y=new Rl({type:f});return{projection:y,transform:new Wu,cameraHelper:new Ko(y)}}switch(f){case"mercator":return{projection:new qo,transform:new Al,cameraHelper:new kl};case"globe":{const y=new Rl({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:y,transform:new Wu,cameraHelper:new Ko(y)}}case"vertical-perspective":return{projection:new Dl,transform:new _o,cameraHelper:new Ra};default:return s.w(`Unknown projection name: ${f}. Falling back to mercator projection.`),{projection:new qo,transform:new Al,cameraHelper:new kl}}}(e);this.projection=o.projection,this.map.migrateProjection(o.transform,o.cameraHelper);for(const f in this.sourceCaches)this.sourceCaches[f].reload()}
vendor: 16,277 bytes, lines 803-805
803_validate(e,o,f,y,x={}){return(!x||x.validate!==!1)&&Xl(this,e.call(s.y,s.e({key:o,style:this.serialize(),value:f,styleSpec:s.v},y)))}_remove(e=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),mn().off(ni,this._rtlPluginLoaded);for(const o in this._layers)this._layers[o].setEventedParent(null);for(const o in this.sourceCaches){const f=this.sourceCaches[o];f.setEventedParent(null),f.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.sourceCaches[e].clearTiles()}_reloadSource(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()}_updateSources(e){for(const o in this.sourceCaches)this.sourceCaches[o].update(e,this.map.terrain)}_generateCollisionBoxes(){for(const e in this.sourceCaches)this._reloadSource(e)}_updatePlacement(e,o,f,y,x=!1){let T=!1,P=!1;const C={};for(const L of this._order){const N=this._layers[L];if(N.type!=="symbol")continue;if(!C[N.source]){const j=this.sourceCaches[N.source];C[N.source]=j.getRenderableIds(!0).map(K=>j.getTileByID(K)).sort((K,ee)=>ee.tileID.overscaledZ-K.tileID.overscaledZ||(K.tileID.isLessThan(ee.tileID)?-1:1))}const B=this.crossTileSymbolIndex.addLayer(N,C[N.source],e.center.lng);T=T||B}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((x=x||this._layerOrderChanged||f===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(D.now(),e.zoom))&&(this.pauseablePlacement=new pc(e,this.map.terrain,this._order,x,o,f,y,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,C),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(D.now()),P=!0),T&&this.pauseablePlacement.placement.setStale()),P||T)for(const L of this._order){const N=this._layers[L];N.type==="symbol"&&this.placement.updateLayerOpacities(N,C[N.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(D.now())}_releaseSymbolFadeTiles(){for(const e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,o){return s._(this,void 0,void 0,function*(){const f=yield this.imageManager.getImages(o.icons);this._updateTilesForChangedImages();const y=this.sourceCaches[o.source];return y&&y.setDependencies(o.tileID.key,o.type,o.icons),f})}getGlyphs(e,o){return s._(this,void 0,void 0,function*(){const f=yield this.glyphManager.getGlyphs(o.stacks),y=this.sourceCaches[o.source];return y&&y.setDependencies(o.tileID.key,o.type,[""]),f})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,o={}){this._checkLoaded(),e&&this._validate(s.y.glyphs,"glyphs",e,null,o)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,o,f={},y){this._checkLoaded();const x=[{id:e,url:o}],T=[...se(this.stylesheet.sprite),...x];this._validate(s.y.sprite,"sprite",T,null,f)||(this.stylesheet.sprite=T,this._loadSprite(x,!0,y))}removeSprite(e){this._checkLoaded();const o=se(this.stylesheet.sprite);if(o.find(f=>f.id===e)){if(this._spritesImagesIds[e])for(const f of this._spritesImagesIds[e])this.imageManager.removeImage(f),this._changedImages[f]=!0;o.splice(o.findIndex(f=>f.id===e),1),this.stylesheet.sprite=o.length>0?o:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"}))}else this.fire(new s.k(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return se(this.stylesheet.sprite)}setSprite(e,o={},f){this._checkLoaded(),e&&this._validate(s.y.sprite,"sprite",e,null,o)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,f):(this._unloadSprite(),f&&f(null)))}}var Ep=s.aG([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Mp{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,o,f,y,x,T,P,C,L){this.context=e;let N=this.boundPaintVertexBuffers.length!==y.length;for(let B=0;!N&&B<y.length;B++)this.boundPaintVertexBuffers[B]!==y[B]&&(N=!0);!this.vao||this.boundProgram!==o||this.boundLayoutVertexBuffer!==f||N||this.boundIndexBuffer!==x||this.boundVertexOffset!==T||this.boundDynamicVertexBuffer!==P||this.boundDynamicVertexBuffer2!==C||this.boundDynamicVertexBuffer3!==L?this.freshBind(o,f,y,x,T,P,C,L):(e.bindVertexArray.set(this.vao),P&&P.bind(),x&&x.dynamicDraw&&x.bind(),C&&C.bind(),L&&L.bind())}freshBind(e,o,f,y,x,T,P,C){const L=e.numAttributes,N=this.context,B=N.gl;this.vao&&this.destroy(),this.vao=N.createVertexArray(),N.bindVertexArray.set(this.vao),this.boundProgram=e,this.boundLayoutVertexBuffer=o,this.boundPaintVertexBuffers=f,this.boundIndexBuffer=y,this.boundVertexOffset=x,this.boundDynamicVertexBuffer=T,this.boundDynamicVertexBuffer2=P,this.boundDynamicVertexBuffer3=C,o.enableAttributes(B,e);for(const j of f)j.enableAttributes(B,e);T&&T.enableAttributes(B,e),P&&P.enableAttributes(B,e),C&&C.enableAttributes(B,e),o.bind(),o.setVertexAttribPointers(B,e,x);for(const j of f)j.bind(),j.setVertexAttribPointers(B,e,x);T&&(T.bind(),T.setVertexAttribPointers(B,e,x)),y&&y.bind(),P&&(P.bind(),P.setVertexAttribPointers(B,e,x)),C&&(C.bind(),C.setVertexAttribPointers(B,e,x)),N.currentNumAttributes=L}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const Pp=(_,e,o,f,y)=>({u_texture:0,u_ele_delta:_,u_fog_matrix:e,u_fog_color:o?o.properties.get("fog-color"):s.b7.white,u_fog_ground_blend:o?o.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:y?0:o?o.calculateFogBlendOpacity(f):0,u_horizon_color:o?o.properties.get("horizon-color"):s.b7.white,u_horizon_fog_blend:o?o.properties.get("horizon-fog-blend"):1,u_is_globe_mode:y?1:0}),Eu={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function Nl(_){const e=[];for(let o=0;o<_.length;o++){if(_[o]===null)continue;const f=_[o].split(" ");e.push(f.pop())}return e}class mc{constructor(e,o,f,y,x,T,P,C,L=[]){const N=e.gl;this.program=N.createProgram();const B=Nl(o.staticAttributes),j=f?f.getBinderAttributes():[],K=B.concat(j),ee=Ai.prelude.staticUniforms?Nl(Ai.prelude.staticUniforms):[],me=P.staticUniforms?Nl(P.staticUniforms):[],pe=o.staticUniforms?Nl(o.staticUniforms):[],ye=f?f.getBinderUniforms():[],be=ee.concat(me).concat(pe).concat(ye),Ee=[];for(const at of be)Ee.indexOf(at)<0&&Ee.push(at);const xe=f?f.defines():[];Ri(N)&&xe.unshift("#version 300 es"),x&&xe.push("#define OVERDRAW_INSPECTOR;"),T&&xe.push("#define TERRAIN3D;"),C&&xe.push(C),L&&xe.push(...L);let Pe=xe.concat(Ai.prelude.fragmentSource,P.fragmentSource,o.fragmentSource).join(` 804`),Ie=xe.concat(Ai.prelude.vertexSource,P.vertexSource,o.vertexSource).join(` 805`);Ri(N)||(Pe=function(at){return at.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(Pe),Ie=function(at){return at.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Ie));const Ce=N.createShader(N.FRAGMENT_SHADER);if(N.isContextLost())return void(this.failedToCreate=!0);if(N.shaderSource(Ce,Pe),N.compileShader(Ce),!N.getShaderParameter(Ce,N.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${N.getShaderInfoLog(Ce)}`);N.attachShader(this.program,Ce);const Ge=N.createShader(N.VERTEX_SHADER);if(N.isContextLost())return void(this.failedToCreate=!0);if(N.shaderSource(Ge,Ie),N.compileShader(Ge),!N.getShaderParameter(Ge,N.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${N.getShaderInfoLog(Ge)}`);N.attachShader(this.program,Ge),this.attributes={};const ct={};this.numAttributes=K.length;for(let at=0;at<this.numAttributes;at++)K[at]&&(N.bindAttribLocation(this.program,at,K[at]),this.attributes[K[at]]=at);if(N.linkProgram(this.program),!N.getProgramParameter(this.program,N.LINK_STATUS))throw new Error(`Program failed to link: ${N.getProgramInfoLog(this.program)}`);N.deleteShader(Ge),N.deleteShader(Ce);for(let at=0;at<Ee.length;at++){const Ke=Ee[at];if(Ke&&!ct[Ke]){const lt=N.getUniformLocation(this.program,Ke);lt&&(ct[Ke]=lt)}}this.fixedUniforms=y(e,ct),this.terrainUniforms=((at,Ke)=>({u_depth:new s.bH(at,Ke.u_depth),u_terrain:new s.bH(at,Ke.u_terrain),u_terrain_dim:new s.b8(at,Ke.u_terrain_dim),u_terrain_matrix:new s.bJ(at,Ke.u_terrain_matrix),u_terrain_unpack:new s.bK(at,Ke.u_terrain_unpack),u_terrain_exaggeration:new s.b8(at,Ke.u_terrain_exaggeration)}))(e,ct),this.projectionUniforms=((at,Ke)=>({u_projection_matrix:new s.bJ(at,Ke.u_projection_matrix),u_projection_tile_mercator_coords:new s.bK(at,Ke.u_projection_tile_mercator_coords),u_projection_clipping_plane:new s.bK(at,Ke.u_projection_clipping_plane),u_projection_transition:new s.b8(at,Ke.u_projection_transition),u_projection_fallback_matrix:new s.bJ(at,Ke.u_projection_fallback_matrix)}))(e,ct),this.binderUniforms=f?f.getUniforms(e,ct):[]}draw(e,o,f,y,x,T,P,C,L,N,B,j,K,ee,me,pe,ye,be,Ee){const xe=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(f),e.setStencilMode(y),e.setColorMode(x),e.setCullFace(T),C){e.activeTexture.set(xe.TEXTURE2),xe.bindTexture(xe.TEXTURE_2D,C.depthTexture),e.activeTexture.set(xe.TEXTURE3),xe.bindTexture(xe.TEXTURE_2D,C.texture);for(const Ie in this.terrainUniforms)this.terrainUniforms[Ie].set(C[Ie])}if(L)for(const Ie in L)this.projectionUniforms[Eu[Ie]].set(L[Ie]);if(P)for(const Ie in this.fixedUniforms)this.fixedUniforms[Ie].set(P[Ie]);pe&&pe.setUniforms(e,this.binderUniforms,ee,{zoom:me});let Pe=0;switch(o){case xe.LINES:Pe=2;break;case xe.TRIANGLES:Pe=3;break;case xe.LINE_STRIP:Pe=1}for(const Ie of K.get()){const Ce=Ie.vaos||(Ie.vaos={});(Ce[N]||(Ce[N]=new Mp)).bind(e,this,B,pe?pe.getPaintVertexBuffers():[],j,Ie.vertexOffset,ye,be,Ee),xe.drawElements(o,Ie.primitiveLength*Pe,xe.UNSIGNED_SHORT,Ie.primitiveOffset*Pe*2)}}}function gc(_,e,o){const f=1/s.az(o,1,e.transform.tileZoom),y=Math.pow(2,o.tileID.overscaledZ),x=o.tileSize*Math.pow(2,e.transform.tileZoom)/y,T=x*(o.tileID.canonical.x+o.tileID.wrap*y),P=x*o.tileID.canonical.y;return{u_image:0,u_texsize:o.imageAtlasTexture.size,u_scale:[f,_.fromScale,_.toScale],u_fade:_.t,u_pixel_coord_upper:[T>>16,P>>16],u_pixel_coord_lower:[65535&T,65535&P]}}const yc=(_,e,o,f)=>{const y=_.style.light,x=y.properties.get("position"),T=[x.x,x.y,x.z],P=s.bN();y.properties.get("anchor")==="viewport"&&s.bO(P,_.transform.bearingInRadians),s.bP(T,T,P);const C=_.transform.transformLightDirection(T),L=y.properties.get("color");return{u_lightpos:T,u_lightpos_globe:C,u_lightintensity:y.properties.get("intensity"),u_lightcolor:[L.r,L.g,L.b],u_vertical_gradient:+e,u_opacity:o,u_fill_translate:f}},La=(_,e,o,f,y,x,T)=>s.e(yc(_,e,o,f),gc(x,_,T),{u_height_factor:-Math.pow(2,y.overscaledZ)/T.tileSize/8}),jd=(_,e,o,f)=>s.e(gc(e,_,o),{u_fill_translate:f}),Ph=(_,e)=>({u_world:_,u_fill_translate:e}),Mu=(_,e,o,f,y)=>s.e(jd(_,e,o,y),{u_world:f}),zl=(_,e,o,f,y)=>{const x=_.transform;let T,P,C=0;if(o.paint.get("circle-pitch-alignment")==="map"){const L=s.az(e,1,x.zoom);T=!0,P=[L,L],C=L/(s.Z*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*y}else T=!1,P=x.pixelsToGLUnits;return{u_camera_to_center_distance:x.cameraToCenterDistance,u_scale_with_map:+(o.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+T,u_device_pixel_ratio:_.pixelRatio,u_extrude_scale:P,u_globe_extrude_scale:C,u_translate:f}},Ip=_=>({u_pixel_extrude_scale:[1/_.width,1/_.height]}),vc=_=>({u_viewport_size:[_.width,_.height]}),Bd=(_,e=1)=>({u_color:_,u_overlay:0,u_overlay_scale:e}),Qo=(_,e,o,f)=>{const y=s.az(_,1,e)/(s.Z*Math.pow(2,_.tileID.overscaledZ))*2*Math.PI*f;return{u_extrude_scale:s.az(_,1,e),u_intensity:o,u_globe_extrude_scale:y}},$d=(_,e,o,f)=>{const y=s.K();s.bQ(y,0,_.width,_.height,0,0,1);const x=_.context.gl;return{u_matrix:y,u_world:[x.drawingBufferWidth,x.drawingBufferHeight],u_image:o,u_color_ramp:f,u_opacity:e.paint.get("heatmap-opacity")}},Gd=(_,e,o)=>{const f=o.paint.get("hillshade-accent-color");let y;switch(o.paint.get("hillshade-method")){case"basic":y=4;break;case"combined":y=1;break;case"igor":y=2;break;case"multidirectional":y=3;break;default:y=0}const x=o.getIlluminationProperties();for(let T=0;T<x.directionRadians.length;T++)o.paint.get("hillshade-illumination-anchor")==="viewport"&&(x.directionRadians[T]+=_.transform.bearingInRadians);return{u_image:0,u_latrange:_c(0,e.tileID),u_exaggeration:o.paint.get("hillshade-exaggeration"),u_altitudes:x.altitudeRadians,u_azimuths:x.directionRadians,u_accent:f,u_method:y,u_highlights:x.highlightColor,u_shadows:x.shadowColor}},Up=(_,e)=>{const o=e.stride,f=s.K();return s.bQ(f,0,s.Z,-8192,0,0,1),s.L(f,f,[0,-8192,0]),{u_matrix:f,u_image:1,u_dimension:[o,o],u_zoom:_.overscaledZ,u_unpack:e.getUnpackVector()}};function _c(_,e){const o=Math.pow(2,e.canonical.z),f=e.canonical.y;return[new s.$(0,f/o).toLngLat().lat,new s.$(0,(f+1)/o).toLngLat().lat]}const Zs=(_,e,o,f)=>{const y=_.transform;return{u_translation:js(_,e,o),u_ratio:f/s.az(e,1,y.zoom),u_device_pixel_ratio:_.pixelRatio,u_units_to_pixels:[1/y.pixelsToGLUnits[0],1/y.pixelsToGLUnits[1]]}},qd=(_,e,o,f,y)=>s.e(Zs(_,e,o,f),{u_image:0,u_image_height:y}),Ih=(_,e,o,f,y)=>{const x=_.transform,T=xc(e,x);return{u_translation:js(_,e,o),u_texsize:e.imageAtlasTexture.size,u_ratio:f/s.az(e,1,x.zoom),u_device_pixel_ratio:_.pixelRatio,u_image:0,u_scale:[T,y.fromScale,y.toScale],u_fade:y.t,u_units_to_pixels:[1/x.pixelsToGLUnits[0],1/x.pixelsToGLUnits[1]]}},Uh=(_,e,o,f,y,x)=>{const T=_.lineAtlas,P=xc(e,_.transform),C=o.layout.get("line-cap")==="round",L=T.getDash(y.from,C),N=T.getDash(y.to,C),B=L.width*x.fromScale,j=N.width*x.toScale;return s.e(Zs(_,e,o,f),{u_patternscale_a:[P/B,-L.height/2],u_patternscale_b:[P/j,-N.height/2],u_sdfgamma:T.width/(256*Math.min(B,j)*_.pixelRatio)/2,u_image:0,u_tex_y_a:L.y,u_tex_y_b:N.y,u_mix:x.t})};function xc(_,e){return 1/s.az(_,1,e.tileZoom)}function js(_,e,o){return s.aA(_.transform,e,o.paint.get("line-translate"),o.paint.get("line-translate-anchor"))}const Ch=(_,e,o,f,y)=>{return{u_tl_parent:_,u_scale_parent:e,u_buffer_scale:1,u_fade_t:o.mix,u_opacity:o.opacity*f.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:f.paint.get("raster-brightness-min"),u_brightness_high:f.paint.get("raster-brightness-max"),u_saturation_factor:(T=f.paint.get("raster-saturation"),T>0?1-1/(1.001-T):-T),u_contrast_factor:(x=f.paint.get("raster-contrast"),x>0?1/(1-x):1+x),u_spin_weights:Jo(f.paint.get("raster-hue-rotate")),u_coords_top:[y[0].x,y[0].y,y[1].x,y[1].y],u_coords_bottom:[y[3].x,y[3].y,y[2].x,y[2].y]};var x,T};function Jo(_){_*=Math.PI/180;const e=Math.sin(_),o=Math.cos(_);return[(2*o+1)/3,(-Math.sqrt(3)*e-o+1)/3,(Math.sqrt(3)*e-o+1)/3]}const Fl=(_,e,o,f,y,x,T,P,C,L,N,B,j)=>{const K=T.transform;return{u_is_size_zoom_constant:+(_==="constant"||_==="source"),u_is_size_feature_constant:+(_==="constant"||_==="camera"),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:K.cameraToCenterDistance,u_pitch:K.pitch/360*2*Math.PI,u_rotate_symbol:+o,u_aspect_ratio:K.width/K.height,u_fade_change:T.options.fadeDuration?T.symbolFadeChange:1,u_label_plane_matrix:P,u_coord_matrix:C,u_is_text:+N,u_pitch_with_map:+f,u_is_along_line:y,u_is_variable_anchor:x,u_texsize:B,u_texture:0,u_translation:L,u_pitched_scale:j}},Hd=(_,e,o,f,y,x,T,P,C,L,N,B,j,K)=>{const ee=T.transform;return s.e(Fl(_,e,o,f,y,x,T,P,C,L,N,B,K),{u_gamma_scale:f?Math.cos(ee.pitch*Math.PI/180)*ee.cameraToCenterDistance:1,u_device_pixel_ratio:T.pixelRatio,u_is_halo:1})},bc=(_,e,o,f,y,x,T,P,C,L,N,B,j)=>s.e(Hd(_,e,o,f,y,x,T,P,C,L,!0,N,0,j),{u_texsize_icon:B,u_texture_icon:1}),Kd=(_,e)=>({u_opacity:_,u_color:e}),Qd=(_,e,o,f,y)=>
vendor: 6,401 bytes, line 805
805s.e(function(x,T,P,C){const L=P.imageManager.getPattern(x.from.toString()),N=P.imageManager.getPattern(x.to.toString()),{width:B,height:j}=P.imageManager.getPixelSize(),K=Math.pow(2,C.tileID.overscaledZ),ee=C.tileSize*Math.pow(2,P.transform.tileZoom)/K,me=ee*(C.tileID.canonical.x+C.tileID.wrap*K),pe=ee*C.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:L.tl,u_pattern_br_a:L.br,u_pattern_tl_b:N.tl,u_pattern_br_b:N.br,u_texsize:[B,j],u_mix:T.t,u_pattern_size_a:L.displaySize,u_pattern_size_b:N.displaySize,u_scale_a:T.fromScale,u_scale_b:T.toScale,u_tile_units_to_pixels:1/s.az(C,1,P.transform.tileZoom),u_pixel_coord_upper:[me>>16,pe>>16],u_pixel_coord_lower:[65535&me,65535&pe]}}(o,y,e,f),{u_opacity:_}),el=(_,e)=>{},Zl={fillExtrusion:(_,e)=>({u_lightpos:new s.bL(_,e.u_lightpos),u_lightpos_globe:new s.bL(_,e.u_lightpos_globe),u_lightintensity:new s.b8(_,e.u_lightintensity),u_lightcolor:new s.bL(_,e.u_lightcolor),u_vertical_gradient:new s.b8(_,e.u_vertical_gradient),u_opacity:new s.b8(_,e.u_opacity),u_fill_translate:new s.bM(_,e.u_fill_translate)}),fillExtrusionPattern:(_,e)=>({u_lightpos:new s.bL(_,e.u_lightpos),u_lightpos_globe:new s.bL(_,e.u_lightpos_globe),u_lightintensity:new s.b8(_,e.u_lightintensity),u_lightcolor:new s.bL(_,e.u_lightcolor),u_vertical_gradient:new s.b8(_,e.u_vertical_gradient),u_height_factor:new s.b8(_,e.u_height_factor),u_opacity:new s.b8(_,e.u_opacity),u_fill_translate:new s.bM(_,e.u_fill_translate),u_image:new s.bH(_,e.u_image),u_texsize:new s.bM(_,e.u_texsize),u_pixel_coord_upper:new s.bM(_,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bM(_,e.u_pixel_coord_lower),u_scale:new s.bL(_,e.u_scale),u_fade:new s.b8(_,e.u_fade)}),fill:(_,e)=>({u_fill_translate:new s.bM(_,e.u_fill_translate)}),fillPattern:(_,e)=>({u_image:new s.bH(_,e.u_image),u_texsize:new s.bM(_,e.u_texsize),u_pixel_coord_upper:new s.bM(_,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bM(_,e.u_pixel_coord_lower),u_scale:new s.bL(_,e.u_scale),u_fade:new s.b8(_,e.u_fade),u_fill_translate:new s.bM(_,e.u_fill_translate)}),fillOutline:(_,e)=>({u_world:new s.bM(_,e.u_world),u_fill_translate:new s.bM(_,e.u_fill_translate)}),fillOutlinePattern:(_,e)=>({u_world:new s.bM(_,e.u_world),u_image:new s.bH(_,e.u_image),u_texsize:new s.bM(_,e.u_texsize),u_pixel_coord_upper:new s.bM(_,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bM(_,e.u_pixel_coord_lower),u_scale:new s.bL(_,e.u_scale),u_fade:new s.b8(_,e.u_fade),u_fill_translate:new s.bM(_,e.u_fill_translate)}),circle:(_,e)=>({u_camera_to_center_distance:new s.b8(_,e.u_camera_to_center_distance),u_scale_with_map:new s.bH(_,e.u_scale_with_map),u_pitch_with_map:new s.bH(_,e.u_pitch_with_map),u_extrude_scale:new s.bM(_,e.u_extrude_scale),u_device_pixel_ratio:new s.b8(_,e.u_device_pixel_ratio),u_globe_extrude_scale:new s.b8(_,e.u_globe_extrude_scale),u_translate:new s.bM(_,e.u_translate)}),collisionBox:(_,e)=>({u_pixel_extrude_scale:new s.bM(_,e.u_pixel_extrude_scale)}),collisionCircle:(_,e)=>({u_viewport_size:new s.bM(_,e.u_viewport_size)}),debug:(_,e)=>({u_color:new s.bI(_,e.u_color),u_overlay:new s.bH(_,e.u_overlay),u_overlay_scale:new s.b8(_,e.u_overlay_scale)}),depth:el,clippingMask:el,heatmap:(_,e)=>({u_extrude_scale:new s.b8(_,e.u_extrude_scale),u_intensity:new s.b8(_,e.u_intensity),u_globe_extrude_scale:new s.b8(_,e.u_globe_extrude_scale)}),heatmapTexture:(_,e)=>({u_matrix:new s.bJ(_,e.u_matrix),u_world:new s.bM(_,e.u_world),u_image:new s.bH(_,e.u_image),u_color_ramp:new s.bH(_,e.u_color_ramp),u_opacity:new s.b8(_,e.u_opacity)}),hillshade:(_,e)=>({u_image:new s.bH(_,e.u_image),u_latrange:new s.bM(_,e.u_latrange),u_exaggeration:new s.b8(_,e.u_exaggeration),u_altitudes:new s.bS(_,e.u_altitudes),u_azimuths:new s.bS(_,e.u_azimuths),u_accent:new s.bI(_,e.u_accent),u_method:new s.bH(_,e.u_method),u_shadows:new s.bR(_,e.u_shadows),u_highlights:new s.bR(_,e.u_highlights)}),hillshadePrepare:(_,e)=>({u_matrix:new s.bJ(_,e.u_matrix),u_image:new s.bH(_,e.u_image),u_dimension:new s.bM(_,e.u_dimension),u_zoom:new s.b8(_,e.u_zoom),u_unpack:new s.bK(_,e.u_unpack)}),line:(_,e)=>({u_translation:new s.bM(_,e.u_translation),u_ratio:new s.b8(_,e.u_ratio),u_device_pixel_ratio:new s.b8(_,e.u_device_pixel_ratio),u_units_to_pixels:new s.bM(_,e.u_units_to_pixels)}),lineGradient:(_,e)=>({u_translation:new s.bM(_,e.u_translation),u_ratio:new s.b8(_,e.u_ratio),u_device_pixel_ratio:new s.b8(_,e.u_device_pixel_ratio),u_units_to_pixels:new s.bM(_,e.u_units_to_pixels),u_image:new s.bH(_,e.u_image),u_image_height:new s.b8(_,e.u_image_height)}),linePattern:(_,e)=>({u_translation:new s.bM(_,e.u_translation),u_texsize:new s.bM(_,e.u_texsize),u_ratio:new s.b8(_,e.u_ratio),u_device_pixel_ratio:new s.b8(_,e.u_device_pixel_ratio),u_image:new s.bH(_,e.u_image),u_units_to_pixels:new s.bM(_,e.u_units_to_pixels),u_scale:new s.bL(_,e.u_scale),u_fade:new s.b8(_,e.u_fade)}),lineSDF:(_,e)=>({u_translation:new s.bM(_,e.u_translation),u_ratio:new s.b8(_,e.u_ratio),u_device_pixel_ratio:new s.b8(_,e.u_device_pixel_ratio),u_units_to_pixels:new s.bM(_,e.u_units_to_pixels),u_patternscale_a:new s.bM(_,e.u_patternscale_a),u_patternscale_b:new s.bM(_,e.u_patternscale_b),u_sdfgamma:new s.b8(_,e.u_sdfgamma),u_image:new s.bH(_,e.u_image),u_tex_y_a:new s.b8(_,e.u_tex_y_a),u_tex_y_b:new s.b8(_,e.u_tex_y_b),u_mix:new s.b8(_,e.u_mix)}),raster:(_,e)=>({u_tl_parent:new s.bM(_,e.u_tl_parent),u_scale_parent:new s.b8(_,e.u_scale_parent),u_buffer_scale:new s.b8(_,e.u_buffer_scale),u_fade_t:new s.b8(_,e.u_fade_t),u_opacity:new s.b8(_,e.u_opacity),u_image0:new s.bH(_,e.u_image0),u_image1:new s.bH(_,e.u_image1),u_brightness_low:new s.b8(_,e.u_brightness_low),u_brightness_high:new s.b8(_,e.u_brightness_high),u_saturation_factor:new s.b8(_,e.u_saturation_factor),u_contrast_factor:new s.b8(_,e.u_contrast_factor),u_spin_weights:new s.bL(_,e.u_spin_weights),u_coords_top:new s.bK(_,e.u_coords_top),u_coords_bottom:new s.bK(_,e.u_coords_bottom)}),symbolIcon:(_,e)=>({u_is_size_zoom_constant:new s.bH(_,e.u_is_size_zoom_constant),u_is_size_feature_constant:new s.bH(_,e.u_is_size_feature_constant),u_size_t:new s.b8(_,e.u_size_t),u_size:new s.b8(_,e.u_size),u_camera_to_center_distance:new s.b8(_,e.u_camera_to_center_distance),u_pitch:new s.b8(_,e.u_pitch),u_rotate_symbol:new s.bH(_,e.u_rotate_symbol),u_aspect_ratio:new s.b8(_,e.u_aspect_ratio),u_fade_change:new s.b8(_,e.u_fade_change),u_label_plane_matrix:new s.bJ(_,e.u_label_plane_matrix
vendor: 32,861 bytes, line 805
805),u_coord_matrix:new s.bJ(_,e.u_coord_matrix),u_is_text:new s.bH(_,e.u_is_text),u_pitch_with_map:new s.bH(_,e.u_pitch_with_map),u_is_along_line:new s.bH(_,e.u_is_along_line),u_is_variable_anchor:new s.bH(_,e.u_is_variable_anchor),u_texsize:new s.bM(_,e.u_texsize),u_texture:new s.bH(_,e.u_texture),u_translation:new s.bM(_,e.u_translation),u_pitched_scale:new s.b8(_,e.u_pitched_scale)}),symbolSDF:(_,e)=>({u_is_size_zoom_constant:new s.bH(_,e.u_is_size_zoom_constant),u_is_size_feature_constant:new s.bH(_,e.u_is_size_feature_constant),u_size_t:new s.b8(_,e.u_size_t),u_size:new s.b8(_,e.u_size),u_camera_to_center_distance:new s.b8(_,e.u_camera_to_center_distance),u_pitch:new s.b8(_,e.u_pitch),u_rotate_symbol:new s.bH(_,e.u_rotate_symbol),u_aspect_ratio:new s.b8(_,e.u_aspect_ratio),u_fade_change:new s.b8(_,e.u_fade_change),u_label_plane_matrix:new s.bJ(_,e.u_label_plane_matrix),u_coord_matrix:new s.bJ(_,e.u_coord_matrix),u_is_text:new s.bH(_,e.u_is_text),u_pitch_with_map:new s.bH(_,e.u_pitch_with_map),u_is_along_line:new s.bH(_,e.u_is_along_line),u_is_variable_anchor:new s.bH(_,e.u_is_variable_anchor),u_texsize:new s.bM(_,e.u_texsize),u_texture:new s.bH(_,e.u_texture),u_gamma_scale:new s.b8(_,e.u_gamma_scale),u_device_pixel_ratio:new s.b8(_,e.u_device_pixel_ratio),u_is_halo:new s.bH(_,e.u_is_halo),u_translation:new s.bM(_,e.u_translation),u_pitched_scale:new s.b8(_,e.u_pitched_scale)}),symbolTextAndIcon:(_,e)=>({u_is_size_zoom_constant:new s.bH(_,e.u_is_size_zoom_constant),u_is_size_feature_constant:new s.bH(_,e.u_is_size_feature_constant),u_size_t:new s.b8(_,e.u_size_t),u_size:new s.b8(_,e.u_size),u_camera_to_center_distance:new s.b8(_,e.u_camera_to_center_distance),u_pitch:new s.b8(_,e.u_pitch),u_rotate_symbol:new s.bH(_,e.u_rotate_symbol),u_aspect_ratio:new s.b8(_,e.u_aspect_ratio),u_fade_change:new s.b8(_,e.u_fade_change),u_label_plane_matrix:new s.bJ(_,e.u_label_plane_matrix),u_coord_matrix:new s.bJ(_,e.u_coord_matrix),u_is_text:new s.bH(_,e.u_is_text),u_pitch_with_map:new s.bH(_,e.u_pitch_with_map),u_is_along_line:new s.bH(_,e.u_is_along_line),u_is_variable_anchor:new s.bH(_,e.u_is_variable_anchor),u_texsize:new s.bM(_,e.u_texsize),u_texsize_icon:new s.bM(_,e.u_texsize_icon),u_texture:new s.bH(_,e.u_texture),u_texture_icon:new s.bH(_,e.u_texture_icon),u_gamma_scale:new s.b8(_,e.u_gamma_scale),u_device_pixel_ratio:new s.b8(_,e.u_device_pixel_ratio),u_is_halo:new s.bH(_,e.u_is_halo),u_translation:new s.bM(_,e.u_translation),u_pitched_scale:new s.b8(_,e.u_pitched_scale)}),background:(_,e)=>({u_opacity:new s.b8(_,e.u_opacity),u_color:new s.bI(_,e.u_color)}),backgroundPattern:(_,e)=>({u_opacity:new s.b8(_,e.u_opacity),u_image:new s.bH(_,e.u_image),u_pattern_tl_a:new s.bM(_,e.u_pattern_tl_a),u_pattern_br_a:new s.bM(_,e.u_pattern_br_a),u_pattern_tl_b:new s.bM(_,e.u_pattern_tl_b),u_pattern_br_b:new s.bM(_,e.u_pattern_br_b),u_texsize:new s.bM(_,e.u_texsize),u_mix:new s.b8(_,e.u_mix),u_pattern_size_a:new s.bM(_,e.u_pattern_size_a),u_pattern_size_b:new s.bM(_,e.u_pattern_size_b),u_scale_a:new s.b8(_,e.u_scale_a),u_scale_b:new s.b8(_,e.u_scale_b),u_pixel_coord_upper:new s.bM(_,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bM(_,e.u_pixel_coord_lower),u_tile_units_to_pixels:new s.b8(_,e.u_tile_units_to_pixels)}),terrain:(_,e)=>({u_texture:new s.bH(_,e.u_texture),u_ele_delta:new s.b8(_,e.u_ele_delta),u_fog_matrix:new s.bJ(_,e.u_fog_matrix),u_fog_color:new s.bI(_,e.u_fog_color),u_fog_ground_blend:new s.b8(_,e.u_fog_ground_blend),u_fog_ground_blend_opacity:new s.b8(_,e.u_fog_ground_blend_opacity),u_horizon_color:new s.bI(_,e.u_horizon_color),u_horizon_fog_blend:new s.b8(_,e.u_horizon_fog_blend),u_is_globe_mode:new s.b8(_,e.u_is_globe_mode)}),terrainDepth:(_,e)=>({u_ele_delta:new s.b8(_,e.u_ele_delta)}),terrainCoords:(_,e)=>({u_texture:new s.bH(_,e.u_texture),u_terrain_coords_id:new s.b8(_,e.u_terrain_coords_id),u_ele_delta:new s.b8(_,e.u_ele_delta)}),projectionErrorMeasurement:(_,e)=>({u_input:new s.b8(_,e.u_input),u_output_expected:new s.b8(_,e.u_output_expected)}),atmosphere:(_,e)=>({u_sun_pos:new s.bL(_,e.u_sun_pos),u_atmosphere_blend:new s.b8(_,e.u_atmosphere_blend),u_globe_position:new s.bL(_,e.u_globe_position),u_globe_radius:new s.b8(_,e.u_globe_radius),u_inv_proj_matrix:new s.bJ(_,e.u_inv_proj_matrix)}),sky:(_,e)=>({u_sky_color:new s.bI(_,e.u_sky_color),u_horizon_color:new s.bI(_,e.u_horizon_color),u_horizon:new s.bM(_,e.u_horizon),u_horizon_normal:new s.bM(_,e.u_horizon_normal),u_sky_horizon_blend:new s.b8(_,e.u_sky_horizon_blend),u_sky_blend:new s.b8(_,e.u_sky_blend)})};class Jd{constructor(e,o,f){this.context=e;const y=e.gl;this.buffer=y.createBuffer(),this.dynamicDraw=!!f,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),y.bufferData(y.ELEMENT_ARRAY_BUFFER,o.arrayBuffer,this.dynamicDraw?y.DYNAMIC_DRAW:y.STATIC_DRAW),this.dynamicDraw||delete o.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){const o=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),o.bufferSubData(o.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const jl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class ef{constructor(e,o,f,y){this.length=o.length,this.attributes=f,this.itemSize=o.bytesPerElement,this.dynamicDraw=y,this.context=e;const x=e.gl;this.buffer=x.createBuffer(),e.bindVertexBuffer.set(this.buffer),x.bufferData(x.ARRAY_BUFFER,o.arrayBuffer,this.dynamicDraw?x.DYNAMIC_DRAW:x.STATIC_DRAW),this.dynamicDraw||delete o.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);const o=this.context.gl;this.bind(),o.bufferSubData(o.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,o){for(let f=0;f<this.attributes.length;f++){const y=o.attributes[this.attributes[f].name];y!==void 0&&e.enableVertexAttribArray(y)}}setVertexAttribPointers(e,o,f){for(let y=0;y<this.attributes.length;y++){const x=this.attributes[y],T=o.attributes[x.name];T!==void 0&&e.vertexAttribPointer(T,x.components,e[jl[x.type]],!1,this.itemSize,x.offset+this.itemSize*(f||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Dr{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ns extends Dr{getDefault(){return s.b7.transparent}set(e){const o=this.current;(e.r!==o.r||e.g!==o.g||e.b!==o.b||e.a!==o.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class Pu extends Dr{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class wc extends Dr{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class Yc extends Dr{getDefault(){return[!0,!0,!0,!0]}set(e){const o=this.current;(e[0]!==o[0]||e[1]!==o[1]||e[2]!==o[2]||e[3]!==o[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class Vh extends Dr{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class Ah extends Dr{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class tl extends Dr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){const o=this.current;(e.func!==o.func||e.ref!==o.ref||e.mask!==o.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class kh extends Dr{getDefault(){const e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){const o=this.current;(e[0]!==o[0]||e[1]!==o[1]||e[2]!==o[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class Cp extends Dr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;e?o.enable(o.STENCIL_TEST):o.disable(o.STENCIL_TEST),this.current=e,this.dirty=!1}}class Vp extends Dr{getDefault(){return[0,1]}set(e){const o=this.current;(e[0]!==o[0]||e[1]!==o[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class is extends Dr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;e?o.enable(o.DEPTH_TEST):o.disable(o.DEPTH_TEST),this.current=e,this.dirty=!1}}class Iu extends Dr{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class Dh extends Dr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;e?o.enable(o.BLEND):o.disable(o.BLEND),this.current=e,this.dirty=!1}}class tf extends Dr{getDefault(){const e=this.gl;return[e.ONE,e.ZERO]}set(e){const o=this.current;(e[0]!==o[0]||e[1]!==o[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class Rh extends Dr{getDefault(){return s.b7.transparent}set(e){const o=this.current;(e.r!==o.r||e.g!==o.g||e.b!==o.b||e.a!==o.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class Uu extends Dr{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class Bl extends Dr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;e?o.enable(o.CULL_FACE):o.disable(o.CULL_FACE),this.current=e,this.dirty=!1}}class Sc extends Dr{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class Lh extends Dr{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class Oa extends Dr{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class $l extends Dr{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class Ys extends Dr{getDefault(){const e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){const o=this.current;(e[0]!==o[0]||e[1]!==o[1]||e[2]!==o[2]||e[3]!==o[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class sa extends Dr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;o.bindFramebuffer(o.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class Oh extends Dr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;o.bindRenderbuffer(o.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class Cu extends Dr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;o.bindTexture(o.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class xo extends Dr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;o.bindBuffer(o.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class Bs extends Dr{getDefault(){return null}set(e){const o=this.gl;o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class Vu extends Dr{getDefault(){return null}set(e){var o;if(e===this.current&&!this.dirty)return;const f=this.gl;Ri(f)?f.bindVertexArray(e):(o=f.getExtension("OES_vertex_array_object"))===null||o===void 0||o.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class rl extends Dr{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;o.pixelStorei(o.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class Gl extends Dr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class Au extends Dr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const o=this.gl;o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class ku extends Dr{constructor(e,o){super(e),this.context=e,this.parent=o}getDefault(){return null}}class nl extends ku{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const o=this.gl;o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class il extends ku{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const o=this.gl;o.framebufferRenderbuffer(o.FRAMEBUFFER,o.DEPTH_ATTACHMENT,o.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class Xh extends ku{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const o=this.gl;o.framebufferRenderbuffer(o.FRAMEBUFFER,o.DEPTH_STENCIL_ATTACHMENT,o.RENDERBUFFER,e),this.current=e,this.dirty=!1}}const as="Framebuffer is not complete";class br{constructor(e,o,f,y,x){this.context=e,this.width=o,this.height=f;const T=e.gl,P=this.framebuffer=T.createFramebuffer();if(this.colorAttachment=new nl(e,P),y)this.depthAttachment=x?new Xh(e,P):new il(e,P);else if(x)throw new Error("Stencil cannot be set without depth");if(T.checkFramebufferStatus(T.FRAMEBUFFER)!==T.FRAMEBUFFER_COMPLETE)throw new Error(as)}destroy(){const e=this.context.gl,o=this.colorAttachment.get();if(o&&e.deleteTexture(o),this.depthAttachment){const f=this.depthAttachment.get();f&&e.deleteRenderbuffer(f)}e.deleteFramebuffer(this.framebuffer)}}class ql{constructor(e){var o,f;if(this.gl=e,this.clearColor=new ns(this),this.clearDepth=new Pu(this),this.clearStencil=new wc(this),this.colorMask=new Yc(this),this.depthMask=new Vh(this),this.stencilMask=new Ah(this),this.stencilFunc=new tl(this),this.stencilOp=new kh(this),this.stencilTest=new Cp(this),this.depthRange=new Vp(this),this.depthTest=new is(this),this.depthFunc=new Iu(this),this.blend=new Dh(this),this.blendFunc=new tf(this),this.blendColor=new Rh(this),this.blendEquation=new Uu(this),this.cullFace=new Bl(this),this.cullFaceSide=new Sc(this),this.frontFace=new Lh(this),this.program=new Oa(this),this.activeTexture=new $l(this),this.viewport=new Ys(this),this.bindFramebuffer=new sa(this),this.bindRenderbuffer=new Oh(this),this.bindTexture=new Cu(this),this.bindVertexBuffer=new xo(this),this.bindElementBuffer=new Bs(this),this.bindVertexArray=new Vu(this),this.pixelStoreUnpack=new rl(this),this.pixelStoreUnpackPremultiplyAlpha=new Gl(this),this.pixelStoreUnpackFlipY=new Au(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),Ri(e)){this.HALF_FLOAT=e.HALF_FLOAT;const y=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(o=e.RGBA16F)!==null&&o!==void 0?o:y==null?void 0:y.RGBA16F_EXT,this.RGB16F=(f=e.RGB16F)!==null&&f!==void 0?f:y==null?void 0:y.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");const y=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=y==null?void 0:y.HALF_FLOAT_OES}}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.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,o){return new Jd(this,e,o)}createVertexBuffer(e,o,f){return new ef(this,e,o,f)}createRenderbuffer(e,o,f){const y=this.gl,x=y.createRenderbuffer();return this.bindRenderbuffer.set(x),y.renderbufferStorage(y.RENDERBUFFER,e,o,f),this.bindRenderbuffer.set(null),x}createFramebuffer(e,o,f,y){return new br(this,e,o,f,y)}clear({color:e,depth:o,stencil:f}){const y=this.gl;let x=0;e&&(x|=y.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),o!==void 0&&(x|=y.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(o),this.depthMask.set(!0)),f!==void 0&&(x|=y.STENCIL_BUFFER_BIT,this.clearStencil.set(f),this.stencilMask.set(255)),y.clear(x)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){s.bE(e.blendFunction,jr.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){var e;return Ri(this.gl)?this.gl.createVertexArray():(e=this.gl.getExtension("OES_vertex_array_object"))===null||e===void 0?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var o;return Ri(this.gl)?this.gl.deleteVertexArray(e):(o=this.gl.getExtension("OES_vertex_array_object"))===null||o===void 0?void 0:o.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}let Tc;function Nh(_,e,o,f,y){const x=_.context,T=_.transform,P=x.gl,C=_.useProgram("collisionBox"),L=[];let N=0,B=0;for(let ye=0;ye<f.length;ye++){const be=f[ye],Ee=e.getTile(be).getBucket(o);if(!Ee)continue;const xe=y?Ee.textCollisionBox:Ee.iconCollisionBox,Pe=Ee.collisionCircleArray;Pe.length>0&&(L.push({circleArray:Pe,circleOffset:B,coord:be}),N+=Pe.length/4,B=N),xe&&C.draw(x,P.LINES,ur.disabled,dr.disabled,_.colorModeForRenderPass(),Ir.disabled,Ip(_.transform),_.style.map.terrain&&_.style.map.terrain.getTerrainData(be),T.getProjectionData({overscaledTileID:be,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),o.id,xe.layoutVertexBuffer,xe.indexBuffer,xe.segments,null,_.transform.zoom,null,null,xe.collisionVertexBuffer)}if(!y||!L.length)return;const j=_.useProgram("collisionCircle"),K=new s.bT;K.resize(4*N),K._trim();let ee=0;for(const ye of L)for(let be=0;be<ye.circleArray.length/4;be++){const Ee=4*be,xe=ye.circleArray[Ee+0],Pe=ye.circleArray[Ee+1],Ie=ye.circleArray[Ee+2],Ce=ye.circleArray[Ee+3];K.emplace(ee++,xe,Pe,Ie,Ce,0),K.emplace(ee++,xe,Pe,Ie,Ce,1),K.emplace(ee++,xe,Pe,Ie,Ce,2),K.emplace(ee++,xe,Pe,Ie,Ce,3)}(!Tc||Tc.length<2*N)&&(Tc=function(ye){const be=2*ye,Ee=new s.bV;Ee.resize(be),Ee._trim();for(let xe=0;xe<be;xe++){const Pe=6*xe;Ee.uint16[Pe+0]=4*xe+0,Ee.uint16[Pe+1]=4*xe+1,Ee.uint16[Pe+2]=4*xe+2,Ee.uint16[Pe+3]=4*xe+2,Ee.uint16[Pe+4]=4*xe+3,Ee.uint16[Pe+5]=4*xe+0}return Ee}(N));const me=x.createIndexBuffer(Tc,!0),pe=x.createVertexBuffer(K,s.bU.members,!0);for(const ye of L){const be=vc(_.transform);j.draw(x,P.TRIANGLES,ur.disabled,dr.disabled,_.colorModeForRenderPass(),Ir.disabled,be,_.style.map.terrain&&_.style.map.terrain.getTerrainData(ye.coord),null,o.id,pe,me,s.aJ.simpleSegment(0,2*ye.circleOffset,ye.circleArray.length,ye.circleArray.length/2),null,_.transform.zoom,null,null,null)}pe.destroy(),me.destroy()}const $s=s.ad(new Float32Array(16));function Ap(_,e,o,f,y,x){const{horizontalAlign:T,verticalAlign:P}=s.aE(_);return new s.P((-(T-.5)*e/y+f[0])*x,(-(P-.5)*o/y+f[1])*x)}function rf(_,e,o,f,y,x){const T=e.tileAnchorPoint.add(new s.P(e.translation[0],e.translation[1]));if(e.pitchWithMap){let P=f.mult(x);o||(P=P.rotate(-y));const C=T.add(P);return Xe(C.x,C.y,e.pitchedLabelPlaneMatrix,e.getElevation).point}if(o){const P=vr(e.tileAnchorPoint.x+1,e.tileAnchorPoint.y,e).point.sub(_),C=Math.atan(P.y/P.x)+(P.x<0?Math.PI:0);return _.add(f.rotate(C))}return _.add(f)}function zh(_,e,o,f,y,x,T,P,C,L,N,B){const j=_.text.placedSymbolArray,K=_.text.dynamicLayoutVertexArray,ee=_.icon.dynamicLayoutVertexArray,me={};K.clear();for(let pe=0;pe<j.length;pe++){const ye=j.get(pe),be=ye.hidden||!ye.crossTileID||_.allowVerticalPlacement&&!ye.placedOrientation?null:f[ye.crossTileID];if(be){const Ee=new s.P(ye.anchorX,ye.anchorY),xe={getElevation:B,width:y.width,height:y.height,pitchedLabelPlaneMatrix:x,pitchWithMap:o,transform:y,tileAnchorPoint:Ee,translation:L,unwrappedTileID:N},Pe=o?nr(Ee.x,Ee.y,xe):vr(Ee.x,Ee.y,xe),Ie=Ot(y.cameraToCenterDistance,Pe.signedDistanceFromCamera);let Ce=s.am(_.textSizeData,P,ye)*Ie/s.ay;o&&(Ce*=_.tilePixelRatio/T);const{width:Ge,height:ct,anchor:at,textOffset:Ke,textBoxScale:lt}=be,At=Ap(at,Ge,ct,Ke,lt,Ce),Vt=y.getPitchedTextCorrection(Ee.x+L[0],Ee.y+L[1],N),yt=rf(Pe.point,xe,e,At,-y.bearingInRadians,Vt),zt=_.allowVerticalPlacement&&ye.placedOrientation===s.al.vertical?Math.PI/2:0;for(let mr=0;mr<ye.numGlyphs;mr++)s.as(K,yt,zt);C&&ye.associatedIconIndex>=0&&(me[ye.associatedIconIndex]={shiftedAnchor:yt,angle:zt})}else Cn(ye.numGlyphs,K)}if(C){ee.clear();const pe=_.icon.placedSymbolArray;for(let ye=0;ye<pe.length;ye++){const be=pe.get(ye);if(be.hidden)Cn(be.numGlyphs,ee);else{const Ee=me[ye];if(Ee)for(let xe=0;xe<be.numGlyphs;xe++)s.as(ee,Ee.shiftedAnchor,Ee.angle);else Cn(be.numGlyphs,ee)}}_.icon.dynamicLayoutVertexBuffer.updateData(ee)}_.text.dynamicLayoutVertexBuffer.updateData(K)}function yn(_,e,o){return o.iconsInText&&e?"symbolTextAndIcon":_?"symbolSDF":"symbolIcon"}function Hl(_,e,o,f,y,x,T,P,C,L,N,B,j){const K=_.context,ee=K.gl,me=_.transform,pe=P==="map",ye=C==="map",be=P!=="viewport"&&o.layout.get("symbol-placement")!=="point",Ee=pe&&!ye&&!be,xe=!o.layout.get("symbol-sort-key").isConstant();let Pe=!1;const Ie=_.getDepthModeForSublayer(0,ur.ReadOnly),Ce=o._unevaluatedLayout.hasValue("text-variable-anchor")||o._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ge=[],ct=me.getCircleRadiusCorrection();for(const at of f){const Ke=e.getTile(at),lt=Ke.getBucket(o);if(!lt)continue;const At=y?lt.text:lt.icon;if(!At||!At.segments.get().length||!At.hasVisibleVertices)continue;const Vt=At.programConfigurations.get(o.id),yt=y||lt.sdfIcons,zt=y?lt.textSizeData:lt.iconSizeData,mr=ye||me.pitch!==0,Wr=_.useProgram(yn(yt,y,lt),Vt),dn=s.ak(zt,me.zoom),tn=_.style.map.terrain&&_.style.map.terrain.getTerrainData(at);let vn,_n,nn,Or,Kn=[0,0],si=null;if(y)_n=Ke.glyphAtlasTexture,nn=ee.LINEAR,vn=Ke.glyphAtlasTexture.size,lt.iconsInText&&(Kn=Ke.imageAtlasTexture.size,si=Ke.imageAtlasTexture,Or=mr||_.options.rotating||_.options.zooming||zt.kind==="composite"||zt.kind==="camera"?ee.LINEAR:ee.NEAREST);else{const Fn=o.layout.get("icon-size").constantOr(0)!==1||lt.iconsNeedLinear;_n=Ke.imageAtlasTexture,nn=yt||_.options.rotating||_.options.zooming||Fn||mr?ee.LINEAR:ee.NEAREST,vn=Ke.imageAtlasTexture.size}const fi=s.az(Ke,1,_.transform.zoom),Vr=Oe(pe,_.transform,fi),qs=s.K();s.an(qs,Vr);const Ma=ht(ye,pe,_.transform,fi),ds=s.aA(me,Ke,x,T),Io=me.getProjectionData({overscaledTileID:at,applyGlobeMatrix:!j,applyTerrainMatrix:!0}),dl=Ce&<.hasTextData(),Hs=o.layout.get("icon-text-fit")!=="none"&&dl&<.hasIconData();if(be){const Fn=_.style.map.terrain?(Ki,un)=>_.style.map.terrain.getElevation(at,Ki,un):null,Zn=o.layout.get("text-rotation-alignment")==="map";Dt(lt,_,y,Vr,qs,ye,L,Zn,at.toUnwrapped(),me.width,me.height,ds,Fn)}const Uo=y&&Ce||Hs,fa=be||Uo?$s:ye?Vr:_.transform.clipSpaceToPixelsMatrix,Ks=yt&&o.paint.get(y?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let fs;fs=yt?lt.iconsInText?bc(zt.kind,dn,Ee,ye,be,Uo,_,fa,Ma,ds,vn,Kn,ct):Hd(zt.kind,dn,Ee,ye,be,Uo,_,fa,Ma,ds,y,vn,0,ct):Fl(zt.kind,dn,Ee,ye,be,Uo,_,fa,Ma,ds,y,vn,ct);const Qs={program:Wr,buffers:At,uniformValues:fs,projectionData:Io,atlasTexture:_n,atlasTextureIcon:si,atlasInterpolation:nn,atlasInterpolationIcon:Or,isSDF:yt,hasHalo:Ks};if(xe&<.canOverlap){Pe=!0;const Fn=At.segments.get();for(const Zn of Fn)Ge.push({segments:new s.aJ([Zn]),sortKey:Zn.sortKey,state:Qs,terrainData:tn})}else Ge.push({segments:At.segments,sortKey:0,state:Qs,terrainData:tn})}Pe&&Ge.sort((at,Ke)=>at.sortKey-Ke.sortKey);for(const at of Ge){const Ke=at.state;if(K.activeTexture.set(ee.TEXTURE0),Ke.atlasTexture.bind(Ke.atlasInterpolation,ee.CLAMP_TO_EDGE),Ke.atlasTextureIcon&&(K.activeTexture.set(ee.TEXTURE1),Ke.atlasTextureIcon&&Ke.atlasTextureIcon.bind(Ke.atlasInterpolationIcon,ee.CLAMP_TO_EDGE)),Ke.isSDF){const lt=Ke.uniformValues;Ke.hasHalo&&(lt.u_is_halo=1,bo(Ke.buffers,at.segments,o,_,Ke.program,Ie,N,B,lt,Ke.projectionData,at.terrainData)),lt.u_is_halo=0}bo(Ke.buffers,at.segments,o,_,Ke.program,Ie,N,B,Ke.uniformValues,Ke.projectionData,at.terrainData)}}function bo(_,e,o,f,y,x,T,P,C,L,N){const B=f.context;y.draw(B,B.gl.TRIANGLES,x,T,P,Ir.backCCW,C,N,L,o.id,_.layoutVertexBuffer,_.indexBuffer,e,o.paint,f.transform.zoom,_.programConfigurations.get(o.id),_.dynamicLayoutVertexBuffer,_.opacityVertexBuffer)}function wo(_,e,o,f,y){const x=_.context,T=x.gl,P=dr.disabled,C=new jr([T.ONE,T.ONE],s.b7.transparent,[!0,!0,!0,!0]),L=e.getBucket(o);if(!L)return;const N=f.key;let B=o.heatmapFbos.get(N);B||(B=Kl(x,e.tileSize,e.tileSize),o.heatmapFbos.set(N,B)),x.bindFramebuffer.set(B.framebuffer),x.viewport.set([0,0,e.tileSize,e.tileSize]),x.clear({color:s.b7.transparent});const j=L.programConfigurations.get(o.id),K=_.useProgram("heatmap",j,!y),ee=_.transform.getProjectionData({overscaledTileID:e.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),me=_.style.map.terrain.getTerrainData(f);K.draw(x,T.TRIANGLES,ur.disabled,P,C,Ir.disabled,Qo(e,_.transform.zoom,o.paint.get("heatmap-intensity"),1),me,ee,o.id,L.layoutVertexBuffer,L.indexBuffer,L.segments,o.paint,_.transform.zoom,j)}function Wc(_,e,o,f,y){const x=_.context,T=x.gl,P=_.transform;x.setColorMode(_.colorModeForRenderPass());const C=al(x,e),L=o.key,N=e.heatmapFbos.get(L);if(!N)return;x.activeTexture.set(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,N.colorAttachment.get()),x.activeTexture.set(T.TEXTURE1),C.bind(T.LINEAR,T.CLAMP_TO_EDGE);const B=P.getProjectionData({overscaledTileID:o,applyTerrainMatrix:y,applyGlobeMatrix:!f});_.useProgram("heatmapTexture").draw(x,T.TRIANGLES,ur.disabled,dr.disabled,_.colorModeForRenderPass(),Ir.disabled,$d(_,e,0,1),null,B,e.id,_.rasterBoundsBuffer,_.quadTriangleIndexBuffer,_.rasterBoundsSegments,e.paint,P.zoom),N.destroy(),e.heatmapFbos.delete(L)}function Kl(_,e,o){var f,y;const x=_.gl,T=x.createTexture();x.bindTexture(x.TEXTURE_2D,T),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_S,x.CLAMP_TO_EDGE),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_T,x.CLAMP_TO_EDGE),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,x.LINEAR),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,x.LINEAR);const P=(f=_.HALF_FLOAT)!==null&&f!==void 0?f:x.UNSIGNED_BYTE,C=(y=_.RGBA16F)!==null&&y!==void 0?y:x.RGBA;x.texImage2D(x.TEXTURE_2D,0,C,e,o,0,x.RGBA,P,null);const L=_.createFramebuffer(e,o,!1,!1);return L.colorAttachment.set(T),L}function al(_,e){return e.colorRampTexture||(e.colorRampTexture=new ze(_,e.colorRamp,_.gl.RGBA)),e.colorRampTexture}function Yo(_,e,o,f,y){if(!o||!f||!f.imageAtlas)return;const x=f.imageAtlas.patternPositions;let T=x[o.to.toString()],P=x[o.from.toString()];if(!T&&P&&(T=P),!P&&T&&(P=T),!T||!P){const C=y.getPaintProperty(e);T=x[C],P=x[C]}T&&P&&_.setConstantPatternPositions(T,P)}function Ss(_,e,o,f,y,x,T,P){const C=_.context.gl,L="fill-pattern",N=o.paint.get(L),B=N&&N.constantOr(1),j=o.getCrossfadeParameters();let K,ee,me,pe,ye;const be=_.transform,Ee=o.paint.get("fill-translate"),xe=o.paint.get("fill-translate-anchor");T?(ee=B&&!o.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",K=C.LINES):(ee=B?"fillPattern":"fill",K=C.TRIANGLES);const Pe=N.constantOr(null);for(const Ie of f){const Ce=e.getTile(Ie);if(B&&!Ce.patternsLoaded())continue;const Ge=Ce.getBucket(o);if(!Ge)continue;const ct=Ge.programConfigurations.get(o.id),at=_.useProgram(ee,ct),Ke=_.style.map.terrain&&_.style.map.terrain.getTerrainData(Ie);B&&(_.context.activeTexture.set(C.TEXTURE0),Ce.imageAtlasTexture.bind(C.LINEAR,C.CLAMP_TO_EDGE),ct.updatePaintBuffers(j)),Yo(ct,L,Pe,Ce,o);const lt=be.getProjectionData({overscaledTileID:Ie,applyGlobeMatrix:!P,applyTerrainMatrix:!0}),At=s.aA(be,Ce,Ee,xe);if(T){pe=Ge.indexBuffer2,ye=Ge.segments2;const yt=[C.drawingBufferWidth,C.drawingBufferHeight];me=ee==="fillOutlinePattern"&&B?Mu(_,j,Ce,yt,At):Ph(yt,At)}else pe=Ge.indexBuffer,ye=Ge.segments,me=B?jd(_,j,Ce,At):{u_fill_translate:At};const Vt=_.stencilModeForClipping(Ie);at.draw(_.context,K,y,Vt,x,Ir.backCCW,me,Ke,lt,o.id,Ge.layoutVertexBuffer,pe,ye,o.paint,_.transform.zoom,ct)}}function Ql(_,e,o,f,y,x,T,P){const C=_.context,L=C.gl,N="fill-extrusion-pattern",B=o.paint.get(N),j=B.constantOr(1),K=o.getCrossfadeParameters(),ee=o.paint.get("fill-extrusion-opacity"),me=B.constantOr(null),pe=_.transform;for(const ye of f){const be=e.getTile(ye),Ee=be.getBucket(o);if(!Ee)continue;const xe=_.style.map.terrain&&_.style.map.terrain.getTerrainData(ye),Pe=Ee.programConfigurations.get(o.id),Ie=_.useProgram(j?"fillExtrusionPattern":"fillExtrusion",Pe);j&&(_.context.activeTexture.set(L.TEXTURE0),be.imageAtlasTexture.bind(L.LINEAR,L.CLAMP_TO_EDGE),Pe.updatePaintBuffers(K));const Ce=pe.getProjectionData({overscaledTileID:ye,applyGlobeMatrix:!P,applyTerrainMatrix:!0});Yo(Pe,N,me,be,o);const Ge=s.aA(pe,be,o.paint.get("fill-extrusion-translate"),o.paint.get("fill-extrusion-translate-anchor")),ct=o.paint.get("fill-extrusion-vertical-gradient"),at=j?La(_,ct,ee,Ge,ye,K,be):yc(_,ct,ee,Ge);Ie.draw(C,C.gl.TRIANGLES,y,x,T,Ir.backCCW,at,xe,Ce,o.id,Ee.layoutVertexBuffer,Ee.indexBuffer,Ee.segments,o.paint,_.transform.zoom,Pe,_.style.map.terrain&&Ee.centroidVertexBuffer)}}function Fh(_,e,o,f,y,x,T,P,C){var L;const N=_.style.projection,B=_.context,j=_.transform,K=B.gl,ee=[`#define NUM_ILLUMINATION_SOURCES ${o.paint.get("hillshade-highlight-color").values.length}`],me=_.useProgram("hillshade",null,!1,ee),pe=!_.options.moving;for(const ye of f){const be=e.getTile(ye),Ee=be.fbo;if(!Ee)continue;const xe=N.getMeshFromTileID(B,ye.canonical,P,!0,"raster"),Pe=(L=_.style.map.terrain)===null||L===void 0?void 0:L.getTerrainData(ye);B.activeTexture.set(K.TEXTURE0),K.bindTexture(K.TEXTURE_2D,Ee.colorAttachment.get());const Ie=j.getProjectionData({overscaledTileID:ye,aligned:pe,applyGlobeMatrix:!C,applyTerrainMatrix:!0});me.draw(B,K.TRIANGLES,x,y[ye.overscaledZ],T,Ir.backCCW,Gd(_,be,o),Pe,Ie,o.id,xe.vertexBuffer,xe.indexBuffer,xe.segments)}}const Du=[new s.P(0,0),new s.P(s.Z,0),new s.P(s.Z,s.Z),new s.P(0,s.Z)];function Ru(_,e,o,f,y,x,T,P,C=!1,L=!1){const N=f[f.length-1].overscaledZ,B=_.context,j=B.gl,K=_.useProgram("raster"),ee=_.transform,me=_.style.projection,pe=_.colorModeForRenderPass(),ye=!_.options.moving;for(const be of f){const Ee=_.getDepthModeForSublayer(be.overscaledZ-N,o.paint.get("raster-opacity")===1?ur.ReadWrite:ur.ReadOnly,j.LESS),xe=e.getTile(be);xe.registerFadeDuration(o.paint.get("raster-fade-duration"));const Pe=e.findLoadedParent(be,0),Ie=e.findLoadedSibling(be),Ce=Lu(xe,Pe||Ie||null,e,o,_.transform,_.style.map.terrain);let Ge,ct;const at=o.paint.get("raster-resampling")==="nearest"?j.NEAREST:j.LINEAR;B.activeTexture.set(j.TEXTURE0),xe.texture.bind(at,j.CLAMP_TO_EDGE,j.LINEAR_MIPMAP_NEAREST),B.activeTexture.set(j.TEXTURE1),Pe?(Pe.texture.bind(at,j.CLAMP_TO_EDGE,j.LINEAR_MIPMAP_NEAREST),Ge=Math.pow(2,Pe.tileID.overscaledZ-xe.tileID.overscaledZ
vendor: 5,410 bytes, line 805
805),ct=[xe.tileID.canonical.x*Ge%1,xe.tileID.canonical.y*Ge%1]):xe.texture.bind(at,j.CLAMP_TO_EDGE,j.LINEAR_MIPMAP_NEAREST),xe.texture.useMipmap&&B.extTextureFilterAnisotropic&&_.transform.pitch>20&&j.texParameterf(j.TEXTURE_2D,B.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,B.extTextureFilterAnisotropicMax);const Ke=_.style.map.terrain&&_.style.map.terrain.getTerrainData(be),lt=ee.getProjectionData({overscaledTileID:be,aligned:ye,applyGlobeMatrix:!L,applyTerrainMatrix:!0}),At=Ch(ct||[0,0],Ge||1,Ce,o,P),Vt=me.getMeshFromTileID(B,be.canonical,x,T,"raster");K.draw(B,j.TRIANGLES,Ee,y?y[be.overscaledZ]:dr.disabled,pe,C?Ir.frontCCW:Ir.backCCW,At,Ke,lt,o.id,Vt.vertexBuffer,Vt.indexBuffer,Vt.segments)}}function Lu(_,e,o,f,y,x){const T=f.paint.get("raster-fade-duration");if(!x&&T>0){const P=D.now(),C=(P-_.timeAdded)/T,L=e?(P-e.timeAdded)/T:-1,N=o.getSource(),B=$e(y,{tileSize:N.tileSize,roundZoom:N.roundZoom}),j=!e||Math.abs(e.tileID.overscaledZ-B)>Math.abs(_.tileID.overscaledZ-B),K=j&&_.refreshedUponExpiration?1:s.ae(j?C:1-L,0,1);return _.refreshedUponExpiration&&C>=1&&(_.refreshedUponExpiration=!1),e?{opacity:1,mix:1-K}:{opacity:K,mix:0}}return{opacity:1,mix:0}}const sl=new s.b7(1,0,0,1),Ou=new s.b7(0,1,0,1),Ec=new s.b7(0,0,1,1),Mc=new s.b7(1,0,1,1),Jl=new s.b7(0,1,1,1);function Pc(_,e,o,f){Xu(_,0,e+o/2,_.transform.width,o,f)}function Zh(_,e,o,f){Xu(_,e-o/2,0,o,_.transform.height,f)}function Xu(_,e,o,f,y,x){const T=_.context,P=T.gl;P.enable(P.SCISSOR_TEST),P.scissor(e*_.pixelRatio,o*_.pixelRatio,f*_.pixelRatio,y*_.pixelRatio),T.clear({color:x}),P.disable(P.SCISSOR_TEST)}function Vn(_,e,o){const f=_.context,y=f.gl,x=_.useProgram("debug"),T=ur.disabled,P=dr.disabled,C=_.colorModeForRenderPass(),L="$debug",N=_.style.map.terrain&&_.style.map.terrain.getTerrainData(o);f.activeTexture.set(y.TEXTURE0);const B=e.getTileByID(o.key).latestRawTileData,j=Math.floor((B&&B.byteLength||0)/1024),K=e.getTile(o).tileSize,ee=512/Math.min(K,512)*(o.overscaledZ/_.transform.zoom)*.5;let me=o.canonical.toString();o.overscaledZ!==o.canonical.z&&(me+=` => ${o.overscaledZ}`),function(ye,be){ye.initDebugOverlayCanvas();const Ee=ye.debugOverlayCanvas,xe=ye.context.gl,Pe=ye.debugOverlayCanvas.getContext("2d");Pe.clearRect(0,0,Ee.width,Ee.height),Pe.shadowColor="white",Pe.shadowBlur=2,Pe.lineWidth=1.5,Pe.strokeStyle="white",Pe.textBaseline="top",Pe.font="bold 36px Open Sans, sans-serif",Pe.fillText(be,5,5),Pe.strokeText(be,5,5),ye.debugOverlayTexture.update(Ee),ye.debugOverlayTexture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE)}(_,`${me} ${j}kB`);const pe=_.transform.getProjectionData({overscaledTileID:o,applyGlobeMatrix:!0,applyTerrainMatrix:!0});x.draw(f,y.TRIANGLES,T,P,jr.alphaBlended,Ir.disabled,Bd(s.b7.transparent,ee),null,pe,L,_.debugBuffer,_.quadTriangleIndexBuffer,_.debugSegments),x.draw(f,y.LINE_STRIP,T,P,C,Ir.disabled,Bd(s.b7.red),N,pe,L,_.debugBuffer,_.tileBorderIndexBuffer,_.debugSegments)}function Ts(_,e,o,f){const{isRenderingGlobe:y}=f,x=_.context,T=x.gl,P=_.transform,C=_.colorModeForRenderPass(),L=_.getDepthModeFor3D(),N=_.useProgram("terrain");x.bindFramebuffer.set(null),x.viewport.set([0,0,_.width,_.height]);for(const B of o){const j=e.getTerrainMesh(B.tileID),K=_.renderToTexture.getTexture(B),ee=e.getTerrainData(B.tileID);x.activeTexture.set(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,K.texture);const me=e.getMeshFrameDelta(P.zoom),pe=P.calculateFogMatrix(B.tileID.toUnwrapped()),ye=Pp(me,pe,_.style.sky,P.pitch,y),be=P.getProjectionData({overscaledTileID:B.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});N.draw(x,T.TRIANGLES,L,dr.disabled,C,Ir.backCCW,ye,ee,be,"terrain",j.vertexBuffer,j.indexBuffer,j.segments)}}function Hn(_,e){if(!e.mesh){const o=new s.aI;o.emplaceBack(-1,-1),o.emplaceBack(1,-1),o.emplaceBack(1,1),o.emplaceBack(-1,1);const f=new s.aK;f.emplaceBack(0,1,2),f.emplaceBack(0,2,3),e.mesh=new co(_.createVertexBuffer(o,ki.members),_.createIndexBuffer(f),s.aJ.simpleSegment(0,0,o.length,f.length))}return e.mesh}class Ic{constructor(e,o){this.context=new ql(e),this.transform=o,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:s.ad(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Be.maxUnderzooming+Be.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Go}resize(e,o,f){if(this.width=Math.floor(e*f),this.height=Math.floor(o*f),this.pixelRatio=f,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const y of this.style._order)this.style._layers[y].resize()}setup(){const e=this.context,o=new s.aI;o.emplaceBack(0,0),o.emplaceBack(s.Z,0),o.emplaceBack(0,s.Z),o.emplaceBack(s.Z,s.Z),this.tileExtentBuffer=e.createVertexBuffer(o,ki.members),this.tileExtentSegments=s.aJ.simpleSegment(0,0,4,2);const f=new s.aI;f.emplaceBack(0,0),f.emplaceBack(s.Z,0),f.emplaceBack(0,s.Z),f.emplaceBack(s.Z,s.Z),this.debugBuffer=e.createVertexBuffer(f,ki.members),this.debugSegments=s.aJ.simpleSegment(0,0,4,5);const y=new s.b_;y.emplaceBack(0,0,0,0),y.emplaceBack(s.Z,0,s.Z,0),y.emplaceBack(0,s.Z,0,s.Z),y.emplaceBack(s.Z,s.Z,s.Z,s.Z),this.rasterBoundsBuffer=e.createVertexBuffer(y,Ep.members),this.rasterBoundsSegments=s.aJ.simpleSegment(0,0,4,2);const x=new s.aI;x.emplaceBack(0,0),x.emplaceBack(s.Z,0),x.emplaceBack(0,s.Z),x.emplaceBack(s.Z,s.Z),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(x,ki.members),this.rasterBoundsSegmentsPosOnly=s.aJ.simpleSegment(0,0,4,5);const T=new s.aI;
vendor: 8,335 bytes, line 805
805T.emplaceBack(0,0),T.emplaceBack(1,0),T.emplaceBack(0,1),T.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(T,ki.members),this.viewportSegments=s.aJ.simpleSegment(0,0,4,2);const P=new s.b$;P.emplaceBack(0),P.emplaceBack(1),P.emplaceBack(3),P.emplaceBack(2),P.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(P);const C=new s.aK;C.emplaceBack(1,0,2),C.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(C);const L=this.context.gl;this.stencilClearMode=new dr({func:L.ALWAYS,mask:0},0,255,L.ZERO,L.ZERO,L.ZERO),this.tileExtentMesh=new co(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const e=this.context,o=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const f=s.K();s.bQ(f,0,this.width,this.height,0,0,1),s.M(f,f,[o.drawingBufferWidth,o.drawingBufferHeight,0]);const y={mainMatrix:f,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:f};this.useProgram("clippingMask",null,!0).draw(e,o.TRIANGLES,ur.disabled,this.stencilClearMode,jr.disabled,Ir.disabled,null,null,y,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,o,f){if(this.currentStencilSource===e.source||!e.isTileClipped()||!o||!o.length)return;this.currentStencilSource=e.source,this.nextStencilID+o.length>256&&this.clearStencil();const y=this.context;y.setColorMode(jr.disabled),y.setDepthMode(ur.disabled);const x={};for(const T of o)x[T.key]=this.nextStencilID++;this._renderTileMasks(x,o,f,!0),this._renderTileMasks(x,o,f,!1),this._tileClippingMaskIDs=x}_renderTileMasks(e,o,f,y){const x=this.context,T=x.gl,P=this.style.projection,C=this.transform,L=this.useProgram("clippingMask");for(const N of o){const B=e[N.key],j=this.style.map.terrain&&this.style.map.terrain.getTerrainData(N),K=P.getMeshFromTileID(this.context,N.canonical,y,!0,"stencil"),ee=C.getProjectionData({overscaledTileID:N,applyGlobeMatrix:!f,applyTerrainMatrix:!0});L.draw(x,T.TRIANGLES,ur.disabled,new dr({func:T.ALWAYS,mask:0},B,255,T.KEEP,T.KEEP,T.REPLACE),jr.disabled,f?Ir.disabled:Ir.backCCW,null,j,ee,"$clipping",K.vertexBuffer,K.indexBuffer,K.segments)}}_renderTilesDepthBuffer(){const e=this.context,o=e.gl,f=this.style.projection,y=this.transform,x=this.useProgram("depth"),T=this.getDepthModeFor3D(),P=Le(y,{tileSize:y.tileSize});for(const C of P){const L=this.style.map.terrain&&this.style.map.terrain.getTerrainData(C),N=f.getMeshFromTileID(this.context,C.canonical,!0,!0,"raster"),B=y.getProjectionData({overscaledTileID:C,applyGlobeMatrix:!0,applyTerrainMatrix:!0});x.draw(e,o.TRIANGLES,T,dr.disabled,jr.disabled,Ir.backCCW,null,L,B,"$clipping",N.vertexBuffer,N.indexBuffer,N.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,o=this.context.gl;return new dr({func:o.NOTEQUAL,mask:255},e,255,o.KEEP,o.KEEP,o.REPLACE)}stencilModeForClipping(e){const o=this.context.gl;return new dr({func:o.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,o.KEEP,o.KEEP,o.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){const o=this.context.gl,f=e.sort((T,P)=>P.overscaledZ-T.overscaledZ),y=f[f.length-1].overscaledZ,x=f[0].overscaledZ-y+1;if(x>1){this.currentStencilSource=void 0,this.nextStencilID+x>256&&this.clearStencil();const T={};for(let P=0;P<x;P++)T[P+y]=new dr({func:o.GEQUAL,mask:255},P+this.nextStencilID,255,o.KEEP,o.KEEP,o.REPLACE);return this.nextStencilID+=x,[T,f]}return[{[y]:dr.disabled},f]}stencilConfigForOverlapTwoPass(e){const o=this.context.gl,f=e.sort((T,P)=>P.overscaledZ-T.overscaledZ),y=f[f.length-1].overscaledZ,x=f[0].overscaledZ-y+1;if(this.clearStencil(),x>1){const T={},P={};for(let C=0;C<x;C++)T[C+y]=new dr({func:o.GREATER,mask:255},x+1+C,255,o.KEEP,o.KEEP,o.REPLACE),P[C+y]=new dr({func:o.GREATER,mask:255},1+C,255,o.KEEP,o.KEEP,o.REPLACE);return this.nextStencilID=2*x+1,[T,P,f]}return this.nextStencilID=3,[{[y]:new dr({func:o.GREATER,mask:255},2,255,o.KEEP,o.KEEP,o.REPLACE)},{[y]:new dr({func:o.GREATER,mask:255},1,255,o.KEEP,o.KEEP,o.REPLACE)},f]}colorModeForRenderPass(){const e=this.context.gl;return this._showOverdrawInspector?new jr([e.CONSTANT_COLOR,e.ONE],new s.b7(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?jr.unblended:jr.alphaBlended}getDepthModeForSublayer(e,o,f){if(!this.opaquePassEnabledForLayer())return ur.disabled;const y=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new ur(f||this.context.gl.LEQUAL,o,[y,y])}getDepthModeFor3D(){return new ur(this.context.gl.LEQUAL,ur.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(e,o){var f,y;this.style=e,this.options=o,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(D.now()),this.imageManager.beginFrame();const x=this.style._order,T=this.style.sourceCaches,P={},C={},L={},N={isRenderingToTexture:!1,isRenderingGlobe:((f=e.projection)===null||f===void 0?void 0:f.transitionState)>0};for(const j in T){const K=T[j];K.used&&K.prepare(this.context),P[j]=K.getVisibleCoordinates(!1),C[j]=P[j].slice().reverse(),L[j]=K.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let j=0;j<x.length;j++)if(this.style._layers[x[j]].is3D()){this.opaquePassCutoff=j;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const j of x){const K=this.style._layers[j];if(!K.hasOffscreenPass()||K.isHidden(this.transform.zoom))continue;const ee=C[K.source];(K.type==="custom"||ee.length)&&this.renderLayer(this,T[K.source],K,ee,N)}if((y=this.style.projection)===null||y===void 0||y.updateGPUdependent({context:this.context,useProgram:j=>this.useProgram(j)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:o.showOverdrawInspector?s.b7.black:s.b7.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(j,K){const ee=j.context,me=ee.gl,pe=((Ie,Ce,Ge)=>{const ct=Math.cos(Ce.rollInRadians),at=Math.sin(Ce.rollInRadians),Ke=Fe(Ce),lt=Ce.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:Ie.properties.get("sky-color"),u_horizon_color:Ie.properties.get("horizon-color"),u_horizon:[(Ce.width/2-Ke*at)*Ge,(Ce.height/2+Ke*ct)*Ge],u_horizon_normal:[-at,ct],u_sky_horizon_blend:Ie.properties.get("sky-horizon-blend")*Ce.height/2*Ge,u_sky_blend:lt}})(K,j.style.map.transform,j.pixelRatio),ye=new ur(me.LEQUAL,ur.ReadWrite,[0,1]),be=dr.disabled,Ee=j.colorModeForRenderPass(),xe=j.useProgram("sky"),Pe=Hn(ee,K);xe.draw(ee,me.TRIANGLES,ye,be,Ee,Ir.disabled,pe,null,void 0,"sky",Pe.vertexBuffer,Pe.indexBuffer,Pe.segments)}(this,this.style.sky),this._showOverdrawInspector=o.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=x.length-1;this.currentLayer>=0;this.currentLayer--){const j=this.style._layers[x[this.currentLayer]],K=T[j.source],ee=P[j.source];this._renderTileClippingMasks(j,ee,!1),this.renderLayer(this,K,j,ee,N)}this.renderPass="translucent";let B=!1;for(this.currentLayer=0;this.currentLayer<x.length;this.currentLayer++){const j=this.style._layers[x[this.currentLayer]],K=T[j.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(j,N))continue;this.opaquePassEnabledForLayer()||B||(B=!0,N.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());const ee=(j.type==="symbol"?L:C)[j.source];this._renderTileClippingMasks(j,P[j.source],!!this.renderToTexture),this.renderLayer(this,K,j,ee,N)}if(N.isRenderingGlobe&&function(j,K,ee){const me=j.context,pe=me.gl,ye=j.useProgram("atmosphere"),be=new ur(pe.LEQUAL,ur.ReadOnly,[0,1]),Ee=j.transform,xe=function(lt,At){const Vt=lt.properties.get("position"),yt=[-Vt.x,-Vt.y,-Vt.z],zt=s.ad(new Float64Array(16));return lt.properties.get("anchor")==="map"&&(s.a_(zt,zt,At.rollInRadians),s.a$(zt,zt,-At.pitchInRadians),s.a_(zt,zt,At.bearingInRadians),s.a$(zt,zt,At.center.lat*Math.PI/180),s.bp(zt,zt,-At.center.lng*Math.PI/180)
vendor: 4,720 bytes, line 805
805),s.bZ(yt,yt,zt),yt}(ee,j.transform),Pe=Ee.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Ie=K.properties.get("atmosphere-blend")*Pe.projectionTransition;if(Ie===0)return;const Ce=ws(Ee.worldSize,Ee.center.lat),Ge=Ee.inverseProjectionMatrix,ct=new Float64Array(4);ct[3]=1,s.at(ct,ct,Ee.modelViewProjectionMatrix),ct[0]/=ct[3],ct[1]/=ct[3],ct[2]/=ct[3],ct[3]=1,s.at(ct,ct,Ge),ct[0]/=ct[3],ct[1]/=ct[3],ct[2]/=ct[3],ct[3]=1;const at=((lt,At,Vt,yt,zt)=>({u_sun_pos:lt,u_atmosphere_blend:At,u_globe_position:Vt,u_globe_radius:yt,u_inv_proj_matrix:zt}))(xe,Ie,[ct[0],ct[1],ct[2]],Ce,Ge),Ke=Hn(me,K);ye.draw(me,pe.TRIANGLES,be,dr.disabled,jr.alphaBlended,Ir.disabled,at,null,null,"atmosphere",Ke.vertexBuffer,Ke.indexBuffer,Ke.segments)}(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const j=function(K,ee){let me=null;const pe=Object.values(K._layers).flatMap(xe=>xe.source&&!xe.isHidden(ee)?[K.sourceCaches[xe.source]]:[]),ye=pe.filter(xe=>xe.getSource().type==="vector"),be=pe.filter(xe=>xe.getSource().type!=="vector"),Ee=xe=>{(!me||me.getSource().maxzoom<xe.getSource().maxzoom)&&(me=xe)};return ye.forEach(xe=>Ee(xe)),me||be.forEach(xe=>Ee(xe)),me}(this.style,this.transform.zoom);j&&function(K,ee,me){for(let pe=0;pe<me.length;pe++)Vn(K,ee,me[pe])}(this,j,j.getVisibleCoordinates())}this.options.showPadding&&function(j){const K=j.transform.padding;Pc(j,j.transform.height-(K.top||0),3,sl),Pc(j,K.bottom||0,3,Ou),Zh(j,K.left||0,3,Ec),Zh(j,j.transform.width-(K.right||0),3,Mc);const ee=j.transform.centerPoint;(function(me,pe,ye,be){Xu(me,pe-1,ye-10,2,20,be),Xu(me,pe-10,ye-1,20,2,be)})(j,ee.x,j.transform.height-ee.y,Jl)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(e){if(!this.style||!this.style.map||!this.style.map.terrain)return;const o=this.terrainFacilitator.matrix,f=this.transform.modelViewProjectionMatrix;let y=this.terrainFacilitator.dirty;y||(y=e?!s.c0(o,f):!s.c1(o,f)),y||(y=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),y&&(s.c2(o,f),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(x,T){const P=x.context,C=P.gl,L=x.transform,N=jr.unblended,B=new ur(C.LEQUAL,ur.ReadWrite,[0,1]),j=T.sourceCache.getRenderableTiles(),K=x.useProgram("terrainDepth");P.bindFramebuffer.set(T.getFramebuffer("depth").framebuffer),P.viewport.set([0,0,x.width/devicePixelRatio,x.height/devicePixelRatio]),P.clear({color:s.b7.transparent,depth:1});for(const ee of j){const me=T.getTerrainMesh(ee.tileID),pe=T.getTerrainData(ee.tileID),ye=L.getProjectionData({overscaledTileID:ee.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),be={u_ele_delta:T.getMeshFrameDelta(L.zoom)};K.draw(P,C.TRIANGLES,B,dr.disabled,N,Ir.backCCW,be,pe,ye,"terrain",me.vertexBuffer,me.indexBuffer,me.segments)}P.bindFramebuffer.set(null),P.viewport.set([0,0,x.width,x.height])}(this,this.style.map.terrain),function(x,T){const P=x.context,C=P.gl,L=x.transform,N=jr.unblended,B=new ur(C.LEQUAL,ur.ReadWrite,[0,1]),j=T.getCoordsTexture(),K=T.sourceCache.getRenderableTiles(),ee=x.useProgram("terrainCoords");P.bindFramebuffer.set(T.getFramebuffer("coords").framebuffer),P.viewport.set([0,0,x.width/devicePixelRatio,x.height/devicePixelRatio]),P.clear({color:s.b7.transparent,depth:1}),T.coordsIndex=[];for(const me of K){const pe=T.getTerrainMesh(me.tileID),ye=T.getTerrainData(me.tileID);P.activeTexture.set(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,j.texture);const be={u_terrain_coords_id:(255-T.coordsIndex.length)/255,u_texture:0,u_ele_delta:T.getMeshFrameDelta(L.zoom)},Ee=L.getProjectionData({overscaledTileID:me.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ee.draw(P,C.TRIANGLES,B,dr.disabled,N,Ir.backCCW,be,ye,Ee,"terrain",pe.vertexBuffer,pe.indexBuffer,pe.segments),T.coordsIndex.push(me.tileID.key)}P.bindFramebuffer.set(null),P.viewport.set([0,0,x.width,x.height])}(this,this.style.map.terrain))}renderLayer(e,o,f,y,x){f.isHidden(this.transform.zoom)||(f.type==="background"||f.type==="custom"||(y||[]).length)&&(this.id=f.id,s.c3(f)?function(T,P,C,L,N,B){if(T.renderPass!=="translucent")return;const{isRenderingToTexture:j}=B,K=dr.disabled,ee=T.colorModeForRenderPass();(C._unevaluatedLayout.hasValue("text-variable-anchor")||C._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(me,pe,ye,be,Ee,xe,Pe,Ie,Ce){const Ge=pe.transform,ct=pe.style.map.terrain,at=Ee==="map",Ke=xe==="map";for(const lt of me){const At=be.getTile(lt),Vt=At.getBucket(ye);if(!Vt||!Vt.text||!Vt.text.segments.get().length)continue;const yt=s.ak(Vt.textSizeData,Ge.zoom),zt=s.az(At,1,pe.transform.zoom),mr=Oe(at,pe.transform,zt),Wr=ye.layout.get("icon-text-fit")!=="none"&&Vt.hasIconData();
vendor: 4,573 bytes, line 805
805if(yt){const dn=Math.pow(2,Ge.zoom-At.tileID.overscaledZ),tn=ct?(vn,_n)=>ct.getElevation(lt,vn,_n):null;zh(Vt,at,Ke,Ce,Ge,mr,dn,yt,Wr,s.aA(Ge,At,Pe,Ie),lt.toUnwrapped(),tn)}}}(L,T,C,P,C.layout.get("text-rotation-alignment"),C.layout.get("text-pitch-alignment"),C.paint.get("text-translate"),C.paint.get("text-translate-anchor"),N),C.paint.get("icon-opacity").constantOr(1)!==0&&Hl(T,P,C,L,!1,C.paint.get("icon-translate"),C.paint.get("icon-translate-anchor"),C.layout.get("icon-rotation-alignment"),C.layout.get("icon-pitch-alignment"),C.layout.get("icon-keep-upright"),K,ee,j),C.paint.get("text-opacity").constantOr(1)!==0&&Hl(T,P,C,L,!0,C.paint.get("text-translate"),C.paint.get("text-translate-anchor"),C.layout.get("text-rotation-alignment"),C.layout.get("text-pitch-alignment"),C.layout.get("text-keep-upright"),K,ee,j),P.map.showCollisionBoxes&&(Nh(T,P,C,L,!0),Nh(T,P,C,L,!1))}(e,o,f,y,this.style.placement.variableOffsets,x):s.c4(f)?function(T,P,C,L,N){if(T.renderPass!=="translucent")return;const{isRenderingToTexture:B}=N,j=C.paint.get("circle-opacity"),K=C.paint.get("circle-stroke-width"),ee=C.paint.get("circle-stroke-opacity"),me=!C.layout.get("circle-sort-key").isConstant();if(j.constantOr(1)===0&&(K.constantOr(1)===0||ee.constantOr(1)===0))return;const pe=T.context,ye=pe.gl,be=T.transform,Ee=T.getDepthModeForSublayer(0,ur.ReadOnly),xe=dr.disabled,Pe=T.colorModeForRenderPass(),Ie=[],Ce=be.getCircleRadiusCorrection();for(let Ge=0;Ge<L.length;Ge++){const ct=L[Ge],at=P.getTile(ct),Ke=at.getBucket(C);if(!Ke)continue;const lt=C.paint.get("circle-translate"),At=C.paint.get("circle-translate-anchor"),Vt=s.aA(be,at,lt,At),yt=Ke.programConfigurations.get(C.id),zt=T.useProgram("circle",yt),mr=Ke.layoutVertexBuffer,Wr=Ke.indexBuffer,dn=T.style.map.terrain&&T.style.map.terrain.getTerrainData(ct),tn={programConfiguration:yt,program:zt,layoutVertexBuffer:mr,indexBuffer:Wr,uniformValues:zl(T,at,C,Vt,Ce),terrainData:dn,projectionData:be.getProjectionData({overscaledTileID:ct,applyGlobeMatrix:!B,applyTerrainMatrix:!0})};if(me){const vn=Ke.segments.get();for(const _n of vn)Ie.push({segments:new s.aJ([_n]),sortKey:_n.sortKey,state:tn})}else Ie.push({segments:Ke.segments,sortKey:0,state:tn})}me&&Ie.sort((Ge,ct)=>Ge.sortKey-ct.sortKey);for(const Ge of Ie){const{programConfiguration:ct,program:at,layoutVertexBuffer:Ke,indexBuffer:lt,uniformValues:At,terrainData:Vt,projectionData:yt}=Ge.state;at.draw(pe,ye.TRIANGLES,Ee,xe,Pe,Ir.backCCW,At,Vt,yt,C.id,Ke,lt,Ge.segments,C.paint,T.transform.zoom,ct)}}(e,o,f,y,x):s.c5(f)?function(T,P,C,L,N){if(C.paint.get("heatmap-opacity")===0)return;const B=T.context,{isRenderingToTexture:j,isRenderingGlobe:K}=N;if(T.style.map.terrain){for(const ee of L){const me=P.getTile(ee);P.hasRenderableParent(ee)||(T.renderPass==="offscreen"?wo(T,me,C,ee,K):T.renderPass==="translucent"&&Wc(T,C,ee,j,K))}B.viewport.set([0,0,T.width,T.height])}else T.renderPass==="offscreen"?function(ee,me,pe,ye){const be=ee.context,Ee=be.gl,xe=ee.transform,Pe=dr.disabled,Ie=new jr([Ee.ONE,Ee.ONE],s.b7.transparent,[!0,!0,!0,!0]);(function(Ce,Ge,ct){const at=Ce.gl;Ce.activeTexture.set(at.TEXTURE1),Ce.viewport.set([0,0,Ge.width/4,Ge.height/4]);let Ke=ct.heatmapFbos.get(s.bW);Ke?(at.bindTexture(at.TEXTURE_2D,Ke.colorAttachment.get()),Ce.bindFramebuffer.set(Ke.framebuffer)):(Ke=Kl(Ce,Ge.width/4,Ge.height/4),ct.heatmapFbos.set(s.bW,Ke))})(be,ee,pe),be.clear({color:s.b7.transparent});for(let Ce=0;Ce<ye.length;Ce++){const Ge=ye[Ce];if(me.hasRenderableParent(Ge))continue;const ct=me.getTile(Ge),at=ct.getBucket(pe);if(!at)continue;const Ke=at.programConfigurations.get(pe.id),lt=ee.useProgram("heatmap",Ke),At=xe.getProjectionData({overscaledTileID:Ge,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Vt=xe.getCircleRadiusCorrection();lt.draw(be,Ee.TRIANGLES,ur.disabled,Pe,Ie,Ir.backCCW,Qo(ct,xe.zoom,pe.paint.get("heatmap-intensity"),Vt),null,At,pe.id,at.layoutVertexBuffer,at.indexBuffer,at.segments,pe.paint,xe.zoom,Ke)}be.viewport.set([0,0,ee.width,ee.height])}(T,P,C,L):T.renderPass==="translucent"&&function(ee,me){const pe=ee.context,ye=pe.gl;pe.setColorMode(ee.colorModeForRenderPass());const be=me.heatmapFbos.get(s.bW);be&&(pe.activeTexture.set(ye.TEXTURE0),ye.bindTexture(ye.TEXTURE_2D,be.colorAttachment.get()),pe.activeTexture.set(ye.TEXTURE1),al(pe,me).bind(ye.LINEAR,ye.CLAMP_TO_EDGE),ee.useProgram("heatmapTexture").draw(pe,ye.TRIANGLES,ur.disabled,dr.disabled,ee.colorModeForRenderPass(),Ir.disabled,$d(ee,me,0,1),null,null,me.id,ee.viewportBuffer,ee.quadTriangleIndexBuffer,ee.viewportSegments,me.paint,ee.transform.zoom))}(T,C)}
805(e,o,f,y,x):s.c6(f)?function(T,P,C,L,N){if(T.renderPass!=="translucent")return;const{isRenderingToTexture:B}=N,j=C.paint.get("line-opacity"),K=C.paint.get("line-width");if(j.constantOr(1)===0||K.constantOr(1)===0)return;const ee=T.getDepthModeForSublayer(0,ur.ReadOnly),me=T.colorModeForRenderPass(),pe=C.paint.get("line-dasharray"),ye=C.paint.get("line-pattern"),be=ye.constantOr(1),Ee=C.paint.get("line-gradient"),xe=C.getCrossfadeParameters(),Pe=be?"linePattern":pe?"lineSDF":Ee?"lineGradient":"line",Ie=T.context,Ce=Ie.gl,Ge=T.transform;let ct=!0;for(const at of L){const Ke=P.getTile(at);if(be&&!Ke.patternsLoaded())continue;const lt=Ke.getBucket(C);if(!lt)continue;const At=lt.programConfigurations.get(C.id),Vt=T.context.program.get(),yt=T.useProgram(Pe,At),zt=ct||yt.program!==Vt,mr=T.style.map.terrain&&T.style.map.terrain.getTerrainData(at),Wr=ye.constantOr(null);if(Wr&&Ke.imageAtlas){const nn=Ke.imageAtlas,Or=nn.patternPositions[Wr.to.toString()],Kn=nn.patternPositions[Wr.from.toString()];Or&&Kn&&At.setConstantPatternPositions(Or,Kn)}const dn=Ge.getProjectionData({overscaledTileID:at,applyGlobeMatrix:!B,applyTerrainMatrix:!0}),tn=Ge.getPixelScale(),vn=be?Ih(T,Ke,C,tn,xe):pe?Uh(T,Ke,C,tn,pe,xe):Ee?qd(T,Ke,C,tn,lt.lineClipsArray.length):Zs(T,Ke,C,tn);if(be)Ie.activeTexture.set(Ce.TEXTURE0),Ke.imageAtlasTexture.bind(Ce.LINEAR,Ce.CLAMP_TO_EDGE),At.updatePaintBuffers(xe);else if(pe&&(zt||T.lineAtlas.dirty))Ie.activeTexture.set(Ce.TEXTURE0),T.lineAtlas.bind(Ie);else if(Ee){const nn=lt.gradients[C.id];let Or=nn.texture;if(C.gradientVersion!==nn.version){let Kn=256;if(C.stepInterpolant){const si=P.getSource().maxzoom,fi=at.canonical.z===si?Math.ceil(1<<T.transform.maxZoom-at.canonical.z):1;Kn=s.ae(s.bX(lt.maxLineLength/s.Z*1024*fi),256,Ie.maxTextureSize)}nn.gradient=s.bY({expression:C.gradientExpression(),evaluationKey:"lineProgress",resolution:Kn,image:nn.gradient||void 0,clips:lt.lineClipsArray}),nn.texture?nn.texture.update(nn.gradient):nn.texture=new ze(Ie,nn.gradient,Ce.RGBA),nn.version=C.gradientVersion,Or=nn.texture}Ie.activeTexture.set(Ce.TEXTURE0),Or.bind(C.stepInterpolant?Ce.NEAREST:Ce.LINEAR,Ce.CLAMP_TO_EDGE)}const _n=T.stencilModeForClipping(at);yt.draw(Ie,Ce.TRIANGLES,ee,_n,me,Ir.disabled,vn,mr,dn,C.id,lt.layoutVertexBuffer,lt.indexBuffer,lt.segments,C.paint,T.transform.zoom,At,lt.layoutVertexBuffer2),ct=!1}}(e,o,f,y,x):s.c7(f)?function(T,P,C,L,N){const B=C.paint.get("fill-color"),j=C.paint.get("fill-opacity");if(j.constantOr(1)===0)return;const{isRenderingToTexture:K}=N,ee=T.colorModeForRenderPass(),me=C.paint.get("fill-pattern"),pe=T.opaquePassEnabledForLayer()&&!me.constantOr(1)&&B.constantOr(s.b7.transparent).a===1&&j.constantOr(0)===1?"opaque":"translucent";if(T.renderPass===pe){const ye=T.getDepthModeForSublayer(1,T.renderPass==="opaque"?ur.ReadWrite:ur.ReadOnly);Ss(T,P,C,L,ye,ee,!1,K)}if(T.renderPass==="translucent"&&C.paint.get("fill-antialias")){const ye=T.getDepthModeForSublayer(C.getPaintProperty("fill-outline-color")?2:0,ur.ReadOnly);Ss(T,P,C,L,ye,ee,!0,K)}}(e,o,f,y,x):s.c8(f)?function(T,P,C,L,N){const B=C.paint.get("fill-extrusion-opacity");if(B===0)return;const{isRenderingToTexture:j}=N;if(T.renderPass==="translucent"){const K=new ur(T.context.gl.LEQUAL,ur.ReadWrite,T.depthRangeFor3D);if(B!==1||C.paint.get("fill-extrusion-pattern").constantOr(1))Ql(T,P,C,L,K,dr.disabled,jr.disabled,j),Ql(T,P,C,L,K,T.stencilModeFor3D(),T.colorModeForRenderPass(),j);else{const ee=T.colorModeForRenderPass();Ql(T,P,C,L,K,dr.disabled,ee,j)}}}(e,o,f,y,x):s.c9(f)?function(T,P,C,L,N){if(T.renderPass!=="offscreen"&&T.renderPass!=="translucent")return;const{isRenderingToTexture:B}=N,j=T.context,K=T.style.projection.useSubdivision,ee=T.getDepthModeForSublayer(0,ur.ReadOnly),me=T.colorModeForRenderPass();if(T.renderPass==="offscreen")(function(pe,ye,be,Ee,xe,Pe,Ie){const Ce=pe.context,Ge=Ce.gl;for(const ct of be){const at=ye.getTile(ct),Ke=at.dem;if(!Ke||!Ke.data||!at.needsHillshadePrepare)continue;const lt=Ke.dim,At=Ke.stride,Vt=Ke.getPixels();if(Ce.activeTexture.set(Ge.TEXTURE1),Ce.pixelStoreUnpackPremultiplyAlpha.set(!1),at.demTexture=at.demTexture||pe.getTileTexture(At),at.demTexture){const zt
vendor: 42,086 bytes, lines 805-807
805=at.demTexture;zt.update(Vt,{premultiply:!1}),zt.bind(Ge.NEAREST,Ge.CLAMP_TO_EDGE)}else at.demTexture=new ze(Ce,Vt,Ge.RGBA,{premultiply:!1}),at.demTexture.bind(Ge.NEAREST,Ge.CLAMP_TO_EDGE);Ce.activeTexture.set(Ge.TEXTURE0);let yt=at.fbo;if(!yt){const zt=new ze(Ce,{width:lt,height:lt,data:null},Ge.RGBA);zt.bind(Ge.LINEAR,Ge.CLAMP_TO_EDGE),yt=at.fbo=Ce.createFramebuffer(lt,lt,!0,!1),yt.colorAttachment.set(zt.texture)}Ce.bindFramebuffer.set(yt.framebuffer),Ce.viewport.set([0,0,lt,lt]),pe.useProgram("hillshadePrepare").draw(Ce,Ge.TRIANGLES,xe,Pe,Ie,Ir.disabled,Up(at.tileID,Ke),null,null,Ee.id,pe.rasterBoundsBuffer,pe.quadTriangleIndexBuffer,pe.rasterBoundsSegments),at.needsHillshadePrepare=!1}})(T,P,L,C,ee,dr.disabled,me),j.viewport.set([0,0,T.width,T.height]);else if(T.renderPass==="translucent")if(K){const[pe,ye,be]=T.stencilConfigForOverlapTwoPass(L);Fh(T,P,C,be,pe,ee,me,!1,B),Fh(T,P,C,be,ye,ee,me,!0,B)}else{const[pe,ye]=T.getStencilConfigForOverlapAndUpdateStencilID(L);Fh(T,P,C,ye,pe,ee,me,!1,B)}}(e,o,f,y,x):s.ca(f)?function(T,P,C,L,N){if(T.renderPass!=="translucent"||C.paint.get("raster-opacity")===0||!L.length)return;const{isRenderingToTexture:B}=N,j=P.getSource(),K=T.style.projection.useSubdivision;if(j instanceof Qr)Ru(T,P,C,L,null,!1,!1,j.tileCoords,j.flippedWindingOrder,B);else if(K){const[ee,me,pe]=T.stencilConfigForOverlapTwoPass(L);Ru(T,P,C,pe,ee,!1,!0,Du,!1,B),Ru(T,P,C,pe,me,!0,!0,Du,!1,B)}else{const[ee,me]=T.getStencilConfigForOverlapAndUpdateStencilID(L);Ru(T,P,C,me,ee,!1,!0,Du,!1,B)}}(e,o,f,y,x):s.cb(f)?function(T,P,C,L,N){const B=C.paint.get("background-color"),j=C.paint.get("background-opacity");if(j===0)return;const{isRenderingToTexture:K}=N,ee=T.context,me=ee.gl,pe=T.style.projection,ye=T.transform,be=ye.tileSize,Ee=C.paint.get("background-pattern");if(T.isPatternMissing(Ee))return;const xe=!Ee&&B.a===1&&j===1&&T.opaquePassEnabledForLayer()?"opaque":"translucent";if(T.renderPass!==xe)return;const Pe=dr.disabled,Ie=T.getDepthModeForSublayer(0,xe==="opaque"?ur.ReadWrite:ur.ReadOnly),Ce=T.colorModeForRenderPass(),Ge=T.useProgram(Ee?"backgroundPattern":"background"),ct=L||Le(ye,{tileSize:be,terrain:T.style.map.terrain});Ee&&(ee.activeTexture.set(me.TEXTURE0),T.imageManager.bind(T.context));const at=C.getCrossfadeParameters();for(const Ke of ct){const lt=ye.getProjectionData({overscaledTileID:Ke,applyGlobeMatrix:!K,applyTerrainMatrix:!0}),At=Ee?Qd(j,T,Ee,{tileID:Ke,tileSize:be},at):Kd(j,B),Vt=T.style.map.terrain&&T.style.map.terrain.getTerrainData(Ke),yt=pe.getMeshFromTileID(ee,Ke.canonical,!1,!0,"raster");Ge.draw(ee,me.TRIANGLES,Ie,Pe,Ce,Ir.backCCW,At,Vt,lt,C.id,yt.vertexBuffer,yt.indexBuffer,yt.segments)}}(e,0,f,y,x):s.cc(f)&&function(T,P,C,L){const{isRenderingGlobe:N}=L,B=T.context,j=C.implementation,K=T.style.projection,ee=T.transform,me=ee.getProjectionDataForCustomLayer(N),pe={farZ:ee.farZ,nearZ:ee.nearZ,fov:ee.fov*Math.PI/180,modelViewProjectionMatrix:ee.modelViewProjectionMatrix,projectionMatrix:ee.projectionMatrix,shaderData:{variantName:K.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; 806uniform mat4 u_projection_matrix; 807${K.shaderPreludeCode.vertexSource}`,define:K.shaderDefine},defaultProjectionData:me},ye=j.renderingMode?j.renderingMode:"2d";if(T.renderPass==="offscreen"){const be=j.prerender;be&&(T.setCustomLayerDefaults(),B.setColorMode(T.colorModeForRenderPass()),be.call(j,B.gl,pe),B.setDirty(),T.setBaseState())}else if(T.renderPass==="translucent"){T.setCustomLayerDefaults(),B.setColorMode(T.colorModeForRenderPass()),B.setStencilMode(dr.disabled);const be=ye==="3d"?T.getDepthModeFor3D():T.getDepthModeForSublayer(0,ur.ReadOnly);B.setDepthMode(be),j.render(B.gl,pe),B.setDirty(),T.setBaseState(),B.bindFramebuffer.set(null)}}(e,0,f,x))}saveTileTexture(e){const o=this._tileTextures[e.size[0]];o?o.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){const o=this._tileTextures[e];return o&&o.length>0?o.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;const o=this.imageManager.getPattern(e.from.toString()),f=this.imageManager.getPattern(e.to.toString());return!o||!f}useProgram(e,o,f=!1,y=[]){this.cache=this.cache||{};const x=!!this.style.map.terrain,T=this.style.projection,P=f?Ai.projectionMercator:T.shaderPreludeCode,C=f?ho:T.shaderDefine,L=e+(o?o.cacheKey:"")+`/${f?Mr:T.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(x?"/terrain":"")+(y?`/${y.join("/")}`:"");return this.cache[L]||(this.cache[L]=new mc(this.context,Ai[e],o,Zl[e],this._showOverdrawInspector,x,P,C,y)),this.cache[L]}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 e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new ze(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:e,drawingBufferHeight:o}=this.context.gl;return this.width!==e||this.height!==o}}function Ws(_,e){let o,f=!1,y=null,x=null;const T=()=>{y=null,f&&(_.apply(x,o),y=setTimeout(T,e),f=!1)};return(...P)=>(f=!0,x=this,o=P,y||T(),y)}class Xa{constructor(e){this._getCurrentHash=()=>{const o=window.location.hash.replace("#","");if(this._hashName){let f;return o.split("&").map(y=>y.split("=")).forEach(y=>{y[0]===this._hashName&&(f=y)}),(f&&f[1]||"").split("/")}return o.split("/")},this._onHashChange=()=>{const o=this._getCurrentHash();if(!this._isValidHash(o))return!1;const f=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(o[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+o[2],+o[1]],zoom:+o[0],bearing:f,pitch:+(o[4]||0)}),!0},this._updateHashUnthrottled=()=>{const o=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,o)},this._removeHash=()=>{const o=this._getCurrentHash();if(o.length===0)return;const f=o.join("/");let y=f;y.split("&").length>0&&(y=y.split("&")[0]),this._hashName&&(y=`${this._hashName}=${f}`);let x=window.location.hash.replace(y,"");x.startsWith("#&")?x=x.slice(0,1)+x.slice(2):x==="#"&&(x="");let T=window.location.href.replace(/(#.+)?$/,x);T=T.replace("&&","&"),window.history.replaceState(window.history.state,null,T)},this._updateHash=Ws(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,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()),this._removeHash(),delete this._map,this}getHashString(e){const o=this._map.getCenter(),f=Math.round(100*this._map.getZoom())/100,y=Math.ceil((f*Math.LN2+Math.log(512/360/.5))/Math.LN10),x=Math.pow(10,y),T=Math.round(o.lng*x)/x,P=Math.round(o.lat*x)/x,C=this._map.getBearing(),L=this._map.getPitch();let N="";if(N+=e?`/${T}/${P}/${f}`:`${f}/${P}/${T}`,(C||L)&&(N+="/"+Math.round(10*C)/10),L&&(N+=`/${Math.round(L)}`),this._hashName){const B=this._hashName;let j=!1;const K=window.location.hash.slice(1).split("&").map(ee=>{const me=ee.split("=")[0];return me===B?(j=!0,`${me}=${N}`):ee}).filter(ee=>ee);return j||K.push(`${B}=${N}`),`#${K.join("&")}`}return`#${N}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new s.Q(+e[2],+e[1])}catch{return!1}const o=+e[0],f=+(e[3]||0),y=+(e[4]||0);return o>=this._map.getMinZoom()&&o<=this._map.getMaxZoom()&&f>=-180&&f<=180&&y>=this._map.getMinPitch()&&y<=this._map.getMaxPitch()}}const oa={linearity:.3,easing:s.cd(0,0,.3,1)},ss=s.e({deceleration:2500,maxSpeed:1400},oa),ol=s.e({deceleration:20,maxSpeed:1400},oa),jh=s.e({deceleration:1e3,maxSpeed:360},oa),nf=s.e({deceleration:1e3,maxSpeed:90},oa),So=s.e({deceleration:1e3,maxSpeed:360},oa);class eu{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:D.now(),settings:e})}_drainInertiaBuffer(){const e=this._inertiaBuffer,o=D.now();for(;e.length>0&&o-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const o={zoom:0,bearing:0,pitch:0,roll:0,pan:new s.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:x}of this._inertiaBuffer)o.zoom+=x.zoomDelta||0,o.bearing+=x.bearingDelta||0,o.pitch+=x.pitchDelta||0,o.roll+=x.rollDelta||0,x.panDelta&&o.pan._add(x.panDelta),x.around&&(o.around=x.around),x.pinchAround&&(o.pinchAround=x.pinchAround);const f=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,y={};if(o.pan.mag()){const x=Gs(o.pan.mag(),f,s.e({},ss,e||{})),T=o.pan.mult(x.amount/o.pan.mag()),P=this._map.cameraHelper.handlePanInertia(T,this._map.transform);y.center=P.easingCenter,y.offset=P.easingOffset,os(y,x)}if(o.zoom){const x=Gs(o.zoom,f,ol);y.zoom=this._map.transform.zoom+x.amount,os(y,x)}if(o.bearing){const x=Gs(o.bearing,f,jh);y.bearing=this._map.transform.bearing+s.ae(x.amount,-179,179),os(y,x)}if(o.pitch){const x=Gs(o.pitch,f,nf);y.pitch=this._map.transform.pitch+x.amount,os(y,x)}if(o.roll){const x=Gs(o.roll,f,So);y.roll=this._map.transform.roll+s.ae(x.amount,-179,179),os(y,x)}if(y.zoom||y.bearing){const x=o.pinchAround===void 0?o.around:o.pinchAround;y.around=x?this._map.unproject(x):this._map.getCenter()}return this.clear(),s.e(y,{noMoveStart:!0})}}function os(_,e){(!_.duration||_.duration<e.duration)&&(_.duration=e.duration,_.easing=e.easing)}function Gs(_,e,o){const{maxSpeed:f,linearity:y,deceleration:x}=o,T=s.ae(_*y/(e/1e3),-f,f),P=Math.abs(T)/(x*y);return{easing:o.easing,duration:1e3*P,amount:T*(P/2)}}class zn extends s.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,o,f,y={}){f=f instanceof MouseEvent?f:new MouseEvent(e,f);const x=V.mousePos(o.getCanvas(),f),T=o.unproject(x);super(e,s.e({point:x,lngLat:T,originalEvent:f},y)),this._defaultPrevented=!1,this.target=o}}class ls extends s.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,o,f){const y=e==="touchend"?f.changedTouches:f.touches,x=V.touchPos(o.getCanvasContainer(),y),T=x.map(C=>o.unproject(C)),P=x.reduce((C,L,N,B)=>C.add(L.div(B.length)),new s.P(0,0));super(e,{points:x,point:P,lngLats:T,lngLat:o.unproject(P),originalEvent:f}),this._defaultPrevented=!1}}class Es extends s.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,o,f){super(e,{originalEvent:f}),this._defaultPrevented=!1}}class hn{constructor(e,o){this._map=e,this._clickTolerance=o.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new Es(e.type,this._map,e))}mousedown(e,o){return this._mousedownPos=o,this._firePreventable(new zn(e.type,this._map,e))}mouseup(e){this._map.fire(new zn(e.type,this._map,e))}click(e,o){this._mousedownPos&&this._mousedownPos.dist(o)>=this._clickTolerance||this._map.fire(new zn(e.type,this._map,e))}dblclick(e){return this._firePreventable(new zn(e.type,this._map,e))}mouseover(e){this._map.fire(new zn(e.type,this._map,e))}mouseout(e){this._map.fire(new zn(e.type,this._map,e))}touchstart(e){return this._firePreventable(new ls(e.type,this._map,e))}touchmove(e){this._map.fire(new ls(e.type,this._map,e))}touchend(e){this._map.fire(new ls(e.type,this._map,e))}touchcancel(e){this._map.fire(new ls(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class on{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new zn(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new zn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new zn(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Sa{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(s.P.convert(e),this._map.terrain)}}class di{constructor(e,o){this._map=e,this._tr=new Sa(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=o.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,o){this.isEnabled()&&e.shiftKey&&e.button===0&&(V.disableDrag(),this._startPos=this._lastPos=o,this._active=!0)}mousemoveWindow(e,o){if(!this._active)return;const f=o;if(this._lastPos.equals(f)||!this._box&&f.dist(this._startPos)<this._clickTolerance)return;const y=this._startPos;this._lastPos=f,this._box||(this._box=V.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",e));const x=Math.min(y.x,f.x),T=Math.max(y.x,f.x),P=Math.min(y.y,f.y),C=Math.max(y.y,f.y);V.setTransform(this._box,`translate(${x}px,${P}px)`),this._box.style.width=T-x+"px",this._box.style.height=C-P+"px"}mouseupWindow(e,o){if(!this._active||e.button!==0)return;const f=this._startPos,y=o;if(this.reset(),V.suppressClick(),f.x!==y.x||f.y!==y.y)return this._map.fire(new s.l("boxzoomend",{originalEvent:e})),{cameraAnimation:x=>x.fitScreenCoordinates(f,y,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(V.remove(this._box),this._box=null),V.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,o){return this._map.fire(new s.l(e,{originalEvent:o}))}}function Wi(_,e){if(_.length!==e.length)throw new Error(`The number of touches and points are not equal - touches ${_.length}, points ${e.length}`);const o={};for(let f=0;f<_.length;f++)o[_[f].identifier]=e[f];return o}class To{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,o,f){(this.centroid||f.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=e.timeStamp),f.length===this.numTouches&&(this.centroid=function(y){const x=new s.P(0,0);for(const T of y)x._add(T);return x.div(y.length)}(o),this.touches=Wi(f,o)))}touchmove(e,o,f){if(this.aborted||!this.centroid)return;const y=Wi(f,o);for(const x in this.touches){const T=y[x];(!T||T.dist(this.touches[x])>30)&&(this.aborted=!0)}}touchend(e,o,f){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),f.length===0){const y=!this.aborted&&this.centroid;if(this.reset(),y)return y}}}class us{constructor(e){this.singleTap=new To(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,o,f){this.singleTap.touchstart(e,o,f)}touchmove(e,o,f){this.singleTap.touchmove(e,o,f)}touchend(e,o,f){const y=this.singleTap.touchend(e,o,f);if(y){const x=e.timeStamp-this.lastTime<500,T=!this.lastTap||this.lastTap.dist(y)<30;if(x&&T||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=y,this.count===this.numTaps)return this.reset(),y}}}class $i{constructor(e){this._tr=new Sa(e),this._zoomIn=new us({numTouches:1,numTaps:2}),this._zoomOut=new us({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,o,f){this._zoomIn.touchstart(e,o,f),this._zoomOut.touchstart(e,o,f)}touchmove(e,o,f){this._zoomIn.touchmove(e,o,f),this._zoomOut.touchmove(e,o,f)}touchend(e,o,f){const y=this._zoomIn.touchend(e,o,f),x=this._zoomOut.touchend(e,o,f),T=this._tr;return y?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:P=>P.easeTo({duration:300,zoom:T.zoom+1,around:T.unproject(y)},{originalEvent:e})}):x?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:P=>P.easeTo({duration:300,zoom:T.zoom-1,around:T.unproject(x)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ai{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){const o=this._moveFunction(...e);if(o.bearingDelta||o.pitchDelta||o.rollDelta||o.around||o.panDelta)return this._active=!0,o}dragStart(e,o){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(o)?o[0]:o,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,o){if(!this.isEnabled())return;const f=this._lastPoint;if(!f)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);const y=Array.isArray(o)?o[0]:o;return!this._moved&&y.dist(f)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=y,this._move(f,y))}dragEnd(e){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(e)&&(this._moved&&V.suppressClick(),this.reset(e))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const Na={0:1,2:2};class ll{constructor(e){this._correctEvent=e.checkCorrectEvent}startMove(e){const o=V.mouseButton(e);this._eventButton=o}endMove(e){delete this._eventButton}isValidStartEvent(e){return this._correctEvent(e)}isValidMoveEvent(e){return!function(o,f){const y=Na[f];return o.buttons===void 0||(o.buttons&y)!==y}(e,this._eventButton)}isValidEndEvent(e){return V.mouseButton(e)===this._eventButton}}class la{constructor(){this._firstTouch=void 0}_isOneFingerTouch(e){return e.targetTouches.length===1}_isSameTouchEvent(e){return e.targetTouches[0].identifier===this._firstTouch}startMove(e){this._firstTouch=e.targetTouches[0].identifier}endMove(e){delete this._firstTouch}isValidStartEvent(e){return this._isOneFingerTouch(e)}isValidMoveEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}isValidEndEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}}class ul{constructor(e=new ll({checkCorrectEvent:()=>!0}),o=new la){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=o}_executeRelevantHandler(e,o,f){return e instanceof MouseEvent?o(e):typeof TouchEvent<"u"&&e instanceof TouchEvent?f(e):void 0}startMove(e){this._executeRelevantHandler(e,o=>this.mouseMoveStateManager.startMove(o),o=>this.oneFingerTouchMoveStateManager.startMove(o))}endMove(e){this._executeRelevantHandler(e,o=>this.mouseMoveStateManager.endMove(o),o=>this.oneFingerTouchMoveStateManager.endMove(o))}isValidStartEvent(e){return this._executeRelevantHandler(e,o=>this.mouseMoveStateManager.isValidStartEvent(o),o=>this.oneFingerTouchMoveStateManager.isValidStartEvent(o))}isValidMoveEvent(e){return this._executeRelevantHandler(e,o=>this.mouseMoveStateManager.isValidMoveEvent(o),o=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(o))}isValidEndEvent(e){return this._executeRelevantHandler(e,o=>this.mouseMoveStateManager.isValidEndEvent(o),o=>this.oneFingerTouchMoveStateManager.isValidEndEvent(o))}}const za=_=>{_.mousedown=_.dragStart,_.mousemoveWindow=_.dragMove,_.mouseup=_.dragEnd,_.contextmenu=e=>{e.preventDefault()}};class Uc{constructor(e,o){this._clickTolerance=e.clickTolerance||1,this._map=o,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new s.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,o,f){return this._calculateTransform(e,o,f)}touchmove(e,o,f){if(this._active){if(!this._shouldBePrevented(f.length))return e.preventDefault(),this._calculateTransform(e,o,f);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,o,f){this._calculateTransform(e,o,f),this._active&&this._shouldBePrevented(f.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,o,f){f.length>0&&(this._active=!0);const y=Wi(f,o),x=new s.P(0,0),T=new s.P(0,0);let P=0;for(const L in y){const N=y[L],B=this._touches[L];B&&(x._add(N),T._add(N.sub(B)),P++,y[L]=N)}if(this._touches=y,this._shouldBePrevented(P)||!T.mag())return;const C=T.div(P);return this._sum._add(C),this._sum.mag()<this._clickTolerance?void 0:{around:x.div(P),panDelta:C}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Nu{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(e,o,f){this._firstTwoTouches||f.length<2||(this._firstTwoTouches=[f[0].identifier,f[1].identifier],this._start([o[0],o[1]]))}touchmove(e,o,f){if(!this._firstTwoTouches)return;e.preventDefault();const[y,x]=this._firstTwoTouches,T=zu(f,o,y),P=zu(f,o,x);if(!T||!P)return;const C=this._aroundCenter?null:T.add(P).div(2);return this._move([T,P],C,e)}touchend(e,o,f){if(!this._firstTwoTouches)return;const[y,x]=this._firstTwoTouches,T=zu(f,o,y),P=zu(f,o,x);T&&P||(this._active&&V.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&e.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function zu(_,e,o){for(let f=0;f<_.length;f++)if(_[f].identifier===o)return e[f]}function Bh(_,e){return Math.log(_/e)/Math.LN2}class Ta extends Nu{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,o){const f=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(Bh(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Bh(this._distance,f),pinchAround:o}}}function Gi(_,e){return 180*_.angleWith(e)/Math.PI}class Xt extends Nu{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,o,f){const y=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Gi(this._vector,y),pinchAround:o}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());const o=25/(Math.PI*this._minDiameter)*360,f=Gi(e,this._startVector);return Math.abs(f)<o}}function cl(_){return Math.abs(_.y)>Math.abs(_.x)}class hl extends Nu{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,o,f){super.touchstart(e,o,f),this._currentTouchCount=f.length}_start(e){this._lastPoints=e,cl(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,o,f){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const y=e[0].sub(this._lastPoints[0]),x=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(y,x,f.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(y.y+x.y)/2*-.5}):void 0}gestureBeginsVertically(e,o,f){if(this._valid!==void 0)return this._valid;const y=e.mag()>=2,x=o.mag()>=2;if(!y&&!x)return;if(!y||!x)return this._firstMove===void 0&&(this._firstMove=f),f-this._firstMove<100&&void 0;const T=e.y>0==o.y>0;return cl(e)&&cl(o)&&T}}const Wa={panStep:100,bearingStep:15,pitchStep:10};class Ei{constructor(e){this._tr=new Sa(e);const o=Wa;this._panStep=o.panStep,this._bearingStep=o.bearingStep,this._pitchStep=o.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let o=0,f=0,y=0,x=0,T=0;switch(e.keyCode){case 61:case 107:case 171:case 187:o=1;break;case 189:case 109:case 173:o=-1;break;case 37:e.shiftKey?f=-1:(e.preventDefault(),x=-1);break;case 39:e.shiftKey?f=1:(e.preventDefault(),x=1);break;case 38:e.shiftKey?y=1:(e.preventDefault(),T=-1);break;case 40:e.shiftKey?y=-1:(e.preventDefault(),T=1);break;default:return}return this._rotationDisabled&&(f=0,y=0),{cameraAnimation:P=>{const C=this._tr;P.easeTo({duration:300,easeId:"keyboardHandler",easing:cs,zoom:o?Math.round(C.zoom)+o*(e.shiftKey?2:1):C.zoom,bearing:C.bearing+f*this._bearingStep,pitch:C.pitch+y*this._pitchStep,offset:[-x*this._panStep,-T*this._panStep],center:C.center},{originalEvent:e})}}}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 cs(_){return _*(2-_)}const hs=4.000244140625;class pr{constructor(e,o){this._onTimeout=f=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(f)},this._map=e,this._tr=new Sa(e),this._triggerRenderFrame=o,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let o=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY;const f=D.now(),y=f-(this._lastWheelEventTime||0);this._lastWheelEventTime=f,o!==0&&o%hs==0?this._type="wheel":o!==0&&Math.abs(o)<4?this._type="trackpad":y>400?(this._type=null,this._lastValue=o,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(y*o)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,o+=this._lastValue)),e.shiftKey&&o&&(o/=4),this._type&&(this._lastWheelEvent=e,this._delta-=o,this._active||this._start(e)),e.preventDefault()}_start(e){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 o=V.mousePos(this._map.getCanvas(),e),f=this._tr;this._aroundPoint=this._aroundCenter?f.transform.locationToScreenPoint(s.Q.convert(f.center)):o,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const P=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=P),typeof this._targetZoom=="number"&&(this._targetZoom+=P)}if(this._delta!==0){const P=this._type==="wheel"&&Math.abs(this._delta)>hs?this._wheelZoomRate:this._defaultZoomRate;let C=2/(1+Math.exp(-Math.abs(this._delta*P)));this._delta<0&&C!==0&&(C=1/C);const L=typeof this._targetZoom!="number"?e.scale:s.ac(this._targetZoom);this._targetZoom=e.getConstrained(e.getCameraLngLat(),s.ah(L*C)).zoom,this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const o=typeof this._targetZoom!="number"?e.zoom:this._targetZoom,f=this._startZoom,y=this._easing;let x,T=!1;if(this._type==="wheel"&&f&&y){const P=D.now()-this._lastWheelEventTime,C=Math.min((P+5)/200,1),L=y(C);x=s.B.number(f,o,L),C<1?this._frameId||(this._frameId=!0):T=!0}else x=o,T=!0;return this._active=!0,T&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=x,{noInertia:!0,needsRenderFrame:!T,zoomDelta:x-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let o=s.cf;if(this._prevEase){const f=this._prevEase,y=(D.now()-f.start)/f.duration,x=f.easing(y+.01)-f.easing(y),T=.27/Math.sqrt(x*x+1e-4)*.01,P=Math.sqrt(.0729-T*T);o=s.cd(T,P,.25,1)}return this._prevEase={start:D.now(),duration:e,easing:o},o}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ms{constructor(e,o){this._clickZoom=e,this._tapZoom=o}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 af{constructor(e){this._tr=new Sa(e),this.reset()}reset(){this._active=!1}dblclick(e,o){return e.preventDefault(),{cameraAnimation:f=>{f.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(o)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Fu{constructor(){this._tap=new us({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,o,f){if(!this._swipePoint)if(this._tapTime){const y=o[0],x=e.timeStamp-this._tapTime<500,T=this._tapPoint.dist(y)<30;x&&T?f.length>0&&(this._swipePoint=y,this._swipeTouch=f[0].identifier):this.reset()}else this._tap.touchstart(e,o,f)}touchmove(e,o,f){if(this._tapTime){if(this._swipePoint){if(f[0].identifier!==this._swipeTouch)return;const y=o[0],x=y.y-this._swipePoint.y;return this._swipePoint=y,e.preventDefault(),this._active=!0,{zoomDelta:x/128}}}else this._tap.touchmove(e,o,f)}touchend(e,o,f){if(this._tapTime)this._swipePoint&&f.length===0&&this.reset();else{const y=this._tap.touchend(e,o,f);y&&(this._tapTime=e.timeStamp,this._tapPoint=y)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Cc{constructor(e,o,f){this._el=e,this._mousePan=o,this._touchPan=f}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class ua{constructor(e,o,f,y){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=o,this._mousePitch=f,this._mouseRoll=y}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class qi{constructor(e,o,f,y){this._el=e,this._touchZoom=o,this._touchRotate=f,this._tapDragZoom=y,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-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()}}class ln{constructor(e,o){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=e,this._options=o,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=V.create("div","maplibregl-cooperative-gesture-screen",e);let o=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(o=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const f=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),y=document.createElement("div");y.className="maplibregl-desktop-message",y.textContent=o,this._container.appendChild(y);const x=document.createElement("div");x.className="maplibregl-mobile-message",x.textContent=f,this._container.appendChild(x),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(V.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,o){this._enabled&&(this._map.fire(new s.l("cooperativegestureprevented",{gestureType:e,originalEvent:o})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Hi=_=>_.zoom||_.drag||_.roll||_.pitch||_.rotate;class sf extends s.l{}function Zu(_){return _.panDelta&&_.panDelta.mag()||_.zoomDelta||_.bearingDelta||_.pitchDelta||_.rollDelta}class $h{constructor(e,o){this.handleWindowEvent=y=>{this.handleEvent(y,`${y.type}Window`)},this.handleEvent=(y,x)=>{if(y.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const T=y.type==="renderFrame"?void 0:y,P={needsRenderFrame:!1},C={},L={};for(const{handlerName:j,handler:K,allowed:ee}of this._handlers){if(!K.isEnabled())continue;let me;if(this._blockedByActive(L,ee,j))K.reset();else if(K[x||y.type]){if(s.cg(y,x||y.type)){const pe=V.mousePos(this._map.getCanvas(),y);me=K[x||y.type](y,pe)}else if(s.ch(y,x||y.type)){const pe=this._getMapTouches(y.touches),ye=V.touchPos(this._map.getCanvas(),pe);me=K[x||y.type](y,ye,pe)}else s.ci(x||y.type)||(me=K[x||y.type](y));this.mergeHandlerResult(P,C,me,j,T),me&&me.needsRenderFrame&&this._triggerRenderFrame()}(me||K.isActive())&&(L[j]=K)}const N={};for(const j in this._previousActiveHandlers)L[j]||(N[j]=T);this._previousActiveHandlers=L,(Object.keys(N).length||Zu(P))&&(this._changes.push([P,C,N]),this._triggerRenderFrame()),(Object.keys(L).length||Zu(P))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:B}=P;B&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],B(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new eu(e),this._bearingSnap=o.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(o);const f=this._el;this._listeners=[[f,"touchstart",{passive:!0}],[f,"touchmove",{passive:!1}],[f,"touchend",void 0],[f,"touchcancel",void 0],[f,"mousedown",void 0],[f,"mousemove",void 0],[f,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[f,"mouseover",void 0],[f,"mouseout",void 0],[f,"dblclick",void 0],[f,"click",void 0],[f,"keydown",{capture:!1}],[f,"keyup",void 0],[f,"wheel",{passive:!1}],[f,"contextmenu",void 0],[window,"blur",void 0]];for(const[y,x,T]of this._listeners)V.addEventListener(y,x,y===document?this.handleWindowEvent:this.handleEvent,T)}destroy(){for(const[e,o,f]of this._listeners)V.removeEventListener(e,o,e===document?this.handleWindowEvent:this.handleEvent,f)}_addDefaultHandlers(e){const o=this._map,f=o.getCanvasContainer();this._add("mapEvent",new hn(o,e));const y=o.boxZoom=new di(o,e);this._add("boxZoom",y),e.interactive&&e.boxZoom&&y.enable();const x=o.cooperativeGestures=new ln(o,e.cooperativeGestures);this._add("cooperativeGestures",x),e.cooperativeGestures&&x.enable();const T=new $i(o),P=new af(o);o.doubleClickZoom=new Ms(P,T),this._add("tapZoom",T),this._add("clickZoom",P),e.interactive&&e.doubleClickZoom&&o.doubleClickZoom.enable();const C=new Fu;this._add("tapDragZoom",C);const L=o.touchPitch=new hl(o);this._add("touchPitch",L),e.interactive&&e.touchPitch&&o.touchPitch.enable(e.touchPitch);const N=()=>o.project(o.getCenter()),B=function({enable:xe,clickTolerance:Pe,aroundCenter:Ie=!0,minPixelCenterThreshold:Ce=100,rotateDegreesPerPixelMoved:Ge=.8},ct){const at=new ll({checkCorrectEvent:Ke=>V.mouseButton(Ke)===0&&Ke.ctrlKey||V.mouseButton(Ke)===2&&!Ke.ctrlKey});return new ai({clickTolerance:Pe,move:(Ke,lt)=>{const At=ct();if(Ie&&Math.abs(At.y-Ke.y)>Ce)return{bearingDelta:s.ce(new s.P(Ke.x,lt.y),lt,At)};let Vt=(lt.x-Ke.x)*Ge;return Ie&<.y<At.y&&(Vt=-Vt),{bearingDelta:Vt}},moveStateManager:at,enable:xe,assignEvents:za})}(e,N),j=function({enable:xe,clickTolerance:Pe,pitchDegreesPerPixelMoved:Ie=-.5}){const Ce=new ll({checkCorrectEvent:Ge=>V.mouseButton(Ge)===0&&Ge.ctrlKey||V.mouseButton(Ge)===2});return new ai({clickTolerance:Pe,move:(Ge,ct)=>({pitchDelta:(ct.y-Ge.y)*Ie}),moveStateManager:Ce,enable:xe,assignEvents:za})}(e),K=function({enable:xe,clickTolerance:Pe,rollDegreesPerPixelMoved:Ie=.3},Ce){const Ge=new ll({checkCorrectEvent:ct=>V.mouseButton(ct)===2&&ct.ctrlKey});return new ai({clickTolerance:Pe,move:(ct,at)=>{const Ke=Ce();let lt=(at.x-ct.x)*Ie;return at.y<Ke.y&&(lt=-lt),{rollDelta:lt}},moveStateManager:Ge,enable:xe,assignEvents:za})}(e,N);o.dragRotate=new ua(e,B,j,K),this._add("mouseRotate",B,["mousePitch"]),this._add("mousePitch",j,["mouseRotate","mouseRoll"]),this._add("mouseRoll",K,["mousePitch"]),e.interactive&&e.dragRotate&&o.dragRotate.enable();const ee=function({enable:xe,clickTolerance:Pe}){const Ie=new ll({checkCorrectEvent:Ce=>V.mouseButton(Ce)===0&&!Ce.ctrlKey});return new ai({clickTolerance:Pe,move:(Ce,Ge)=>({around:Ge,panDelta:Ge.sub(Ce)}),activateOnStart:!0,moveStateManager:Ie,enable:xe,assignEvents:za})}(e),me=new Uc(e,o);o.dragPan=new Cc(f,ee,me),this._add("mousePan",ee),this._add("touchPan",me,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&o.dragPan.enable(e.dragPan);const pe=new Xt,ye=new Ta;o.touchZoomRotate=new qi(f,ye,pe,C),this._add("touchRotate",pe,["touchPan","touchZoom"]),this._add("touchZoom",ye,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&o.touchZoomRotate.enable(e.touchZoomRotate);const be=o.scrollZoom=new pr(o,()=>this._triggerRenderFrame());this._add("scrollZoom",be,["mousePan"]),e.interactive&&e.scrollZoom&&o.scrollZoom.enable(e.scrollZoom);const Ee=o.keyboard=new Ei(o);this._add("keyboard",Ee),e.interactive&&e.keyboard&&o.keyboard.enable(),this._add("blockableMapEvent",new on(o))}_add(e,o,f){this._handlers.push({handlerName:e,handler:o,allowed:f}),this._handlersById[e]=o}stop(e){if(!this._updatingCamera){for(const{handler:o}of this._handlers)o.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Hi(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,o,f){for(const y in e)if(y!==f&&(!o||o.indexOf(y)<0))return!0;return!1}_getMapTouches(e){const o=[];for(const f of e)this._el.contains(f.target)&&o.push(f);return o}mergeHandlerResult(e,o,f,y,x){if(!f)return;s.e(e,f);const T={handlerName:y,originalEvent:f.originalEvent||x};f.zoomDelta!==void 0&&(o.zoom=T),f.panDelta!==void 0&&(o.drag=T),f.rollDelta!==void 0&&(o.roll=T),f.pitchDelta!==void 0&&(o.pitch=T),f.bearingDelta!==void 0&&(o.rotate=T)}_applyChanges(){const e={},o={},f={};for(const[y,x,T]of this._changes)y.panDelta&&(e.panDelta=(e.panDelta||new s.P(0,0))._add(y.panDelta)),y.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+y.zoomDelta),y.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+y.bearingDelta),y.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+y.pitchDelta),y.rollDelta&&(e.rollDelta=(e.rollDelta||0)+y.rollDelta),y.around!==void 0&&(e.around=y.around),y.pinchAround!==void 0&&(e.pinchAround=y.pinchAround),y.noInertia&&(e.noInertia=y.noInertia),s.e(o,x),s.e(f,T);this._updateMapTransform(e,o,f),this._changes=[]}_updateMapTransform(e,o,f){const y=this._map,x=y._getTransformForUpdate(),T=y.terrain;if(!(Zu(e)||T&&this._terrainMovement))return this._fireEvents(o,f,!0);y._stop(!0);let{panDelta:P,zoomDelta:C,bearingDelta:L,pitchDelta:N,rollDelta:B,around:j,pinchAround:K}=e;
vendor: 2,574 bytes, line 807
807K!==void 0&&(j=K),j=j||y.transform.centerPoint,T&&!x.isPointOnMapSurface(j)&&(j=x.centerPoint);const ee={panDelta:P,zoomDelta:C,rollDelta:B,pitchDelta:N,bearingDelta:L,around:j};this._map.cameraHelper.useGlobeControls&&!x.isPointOnMapSurface(j)&&(j=x.centerPoint);const me=j.distSqr(x.centerPoint)<.01?x.center:x.screenPointToLocation(P?j.sub(P):j);T?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(ee,x),this._terrainMovement||!o.drag&&!o.zoom?o.drag&&this._terrainMovement?x.setCenter(x.screenPointToLocation(x.centerPoint.sub(P))):this._map.cameraHelper.handleMapControlsPan(ee,x,me):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(ee,x,me))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(ee,x),this._map.cameraHelper.handleMapControlsPan(ee,x,me)),y._applyUpdatedTransform(x),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(o,f,!0)}_fireEvents(e,o,f){const y=Hi(this._eventsInProgress),x=Hi(e),T={};for(const B in e){const{originalEvent:j}=e[B];this._eventsInProgress[B]||(T[`${B}start`]=j),this._eventsInProgress[B]=e[B]}!y&&x&&this._fireEvent("movestart",x.originalEvent);for(const B in T)this._fireEvent(B,T[B]);x&&this._fireEvent("move",x.originalEvent);for(const B in e){const{originalEvent:j}=e[B];this._fireEvent(B,j)}const P={};let C;for(const B in this._eventsInProgress){const{handlerName:j,originalEvent:K}=this._eventsInProgress[B];this._handlersById[j].isActive()||(delete this._eventsInProgress[B],C=o[j]||K,P[`${B}end`]=C)}for(const B in P)this._fireEvent(B,P[B]);const L=Hi(this._eventsInProgress),N=(y||x)&&!L;if(N&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const B=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&B.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(B)}if(f&&N){this._updatingCamera=!0;const B=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),j=K=>K!==0&&-this._bearingSnap<K&&K<this._bearingSnap;!B||!B.essential&&D.prefersReducedMotion?(this._map.fire(new s.l("moveend",{originalEvent:C})),j(this._map.getBearing())&&this._map.resetNorth()):(j(B.bearing||this._map.getBearing())&&(B.bearing=0),B.freezeElevation=!0,this._map.easeTo(B,{originalEvent:C})),this._updatingCamera=!1}}_fireEvent(e,o){this._map.fire(new s.l(e,o?{originalEvent:o}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(e=>{delete this._frameId,this.handleEvent(new sf("renderFrame",{timeStamp:e})),this._applyChanges()})}
vendor: 14,878 bytes, line 807
807_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Gh extends s.E{constructor(e,o,f){super(),this._renderFrameCallback=()=>{const y=Math.min((D.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(y)),y<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=f.bearingSnap,this.cameraHelper=o,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,o){e.apply(this.transform),this.transform=e,this.cameraHelper=o}getCenter(){return new s.Q(this.transform.center.lng,this.transform.center.lat)}setCenter(e,o){return this.jumpTo({center:e},o)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,o){return this.jumpTo({elevation:e},o),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,o,f){return e=s.P.convert(e).mult(-1),this.panTo(this.transform.center,s.e({offset:e},o),f)}panTo(e,o,f){return this.easeTo(s.e({center:e},o),f)}getZoom(){return this.transform.zoom}setZoom(e,o){return this.jumpTo({zoom:e},o),this}zoomTo(e,o,f){return this.easeTo(s.e({zoom:e},o),f)}zoomIn(e,o){return this.zoomTo(this.getZoom()+1,e,o),this}zoomOut(e,o){return this.zoomTo(this.getZoom()-1,e,o),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,o){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new s.l("movestart",o)).fire(new s.l("move",o)).fire(new s.l("moveend",o))),this}getBearing(){return this.transform.bearing}setBearing(e,o){return this.jumpTo({bearing:e},o),this}getPadding(){return this.transform.padding}setPadding(e,o){return this.jumpTo({padding:e},o),this}rotateTo(e,o,f){return this.easeTo(s.e({bearing:e},o),f)}resetNorth(e,o){return this.rotateTo(0,s.e({duration:1e3},e),o),this}resetNorthPitch(e,o){return this.easeTo(s.e({bearing:0,pitch:0,roll:0,duration:1e3},e),o),this}snapToNorth(e,o){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,o):this}getPitch(){return this.transform.pitch}setPitch(e,o){return this.jumpTo({pitch:e},o),this}getRoll(){return this.transform.roll}setRoll(e,o){return this.jumpTo({roll:e},o),this}cameraForBounds(e,o){e=Yr.convert(e).adjustAntiMeridian();const f=o&&o.bearing||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),f,o)}_cameraForBoxAndBearing(e,o,f,y){const x={top:0,bottom:0,right:0,left:0};if(typeof(y=s.e({padding:x,offset:[0,0],maxZoom:this.transform.maxZoom},y)).padding=="number"){const L=y.padding;y.padding={top:L,bottom:L,right:L,left:L}}const T=s.e(x,y.padding);y.padding=T;const P=this.transform,C=new Yr(e,o);return this.cameraHelper.cameraForBoxAndBearing(y,T,C,f,P)}fitBounds(e,o,f){return this._fitInternal(this.cameraForBounds(e,o),o,f)}fitScreenCoordinates(e,o,f,y,x){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(s.P.convert(e)),this.transform.screenPointToLocation(s.P.convert(o)),f,y),y,x)}_fitInternal(e,o,f){return e?(delete(o=s.e(e,o)).padding,o.linear?this.easeTo(o,f):this.flyTo(o,f)):this}jumpTo(e,o){this.stop();const f=this._getTransformForUpdate();let y=!1,x=!1,T=!1;const P=f.zoom;this.cameraHelper.handleJumpToCenterZoom(f,e);const C=f.zoom!==P;return"elevation"in e&&f.elevation!==+e.elevation&&f.setElevation(+e.elevation),"bearing"in e&&f.bearing!==+e.bearing&&(y=!0,f.setBearing(+e.bearing)),"pitch"in e&&f.pitch!==+e.pitch&&(x=!0,f.setPitch(+e.pitch)),"roll"in e&&f.roll!==+e.roll&&(T=!0,f.setRoll(+e.roll)),e.padding==null||f.isPaddingEqual(e.padding)||f.setPadding(e.padding),this._applyUpdatedTransform(f),this.fire(new s.l("movestart",o)).fire(new s.l("move",o)),C&&this.fire(new s.l("zoomstart",o)).fire(new s.l("zoom",o)).fire(new s.l("zoomend",o)),y&&this.fire(new s.l("rotatestart",o)).fire(new s.l("rotate",o)).fire(new s.l("rotateend",o)),x&&this.fire(new s.l("pitchstart",o)).fire(new s.l("pitch",o)).fire(new s.l("pitchend",o)),T&&this.fire(new s.l("rollstart",o)).fire(new s.l("roll",o)).fire(new s.l("rollend",o)),this.fire(new s.l("moveend",o))}calculateCameraOptionsFromTo(e,o,f,y=0){const x=s.$.fromLngLat(e,o),T=s.$.fromLngLat(f,y),P=T.x-x.x,C=T.y-x.y,L=T.z-x.z,N=Math.hypot(P,C,L);if(N===0)throw new Error("Can't calculate camera options with same From and To");const B=Math.hypot(P,C),j=s.ah(this.transform.cameraToCenterDistance/N/this.transform.tileSize),K=180*Math.atan2(P,-C)/Math.PI;let ee=180*Math.acos(B/N)/Math.PI;return ee=L<0?90-ee:90+ee,{center:T.toLngLat(),elevation:y,zoom:j,pitch:ee,bearing:K}}calculateCameraOptionsFromCameraLngLatAltRotation(e,o,f,y,x){const T=this.transform.calculateCenterFromCameraLngLatAlt(e,o,f,y);return{center:T.center,elevation:T.elevation,zoom:T.zoom,bearing:f,pitch:y,roll:x}}easeTo(e,o){this._stop(!1,e.easeId),((e=s.e({offset:[0,0],duration:500,easing:s.cf},e)).animate===!1||!e.essential&&D.prefersReducedMotion)&&(e.duration=0);const f=this._getTransformForUpdate(),y=this.getBearing(),x=f.pitch,T=f.roll,P="bearing"in e?this._normalizeBearing(e.bearing,y):y,C="pitch"in e?+e.pitch:x,L="roll"in e?this._normalizeBearing(e.roll,T):T,N="padding"in e?e.padding:f.padding,B=s.P.convert(e.offset);let j,K;e.around&&(j=s.Q.convert(e.around),K=f.locationToScreenPoint(j));const ee={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},me=this.cameraHelper.handleEaseTo(f,{bearing:P,pitch:C,roll:L,padding:N,around:j,aroundPoint:K,offsetAsPoint:B,offset:e.offset,zoom:e.zoom,center:e.center});return this._rotating=this._rotating||y!==P,this._pitching=this._pitching||C!==x,this._rolling=this._rolling||L!==T,this._padding=!f.isPaddingEqual(N),this._zooming=this._zooming||me.isZooming,this._easeId=e.easeId,this._prepareEase(o,e.noMoveStart,ee),this.terrain&&this._prepareElevation(me.elevationCenter),this._ease(pe=>{me.easeFunc(pe),this.terrain&&!e.freezeElevation&&this._updateElevation(pe),this._applyUpdatedTransform(f),this._fireMoveEvents(o)},pe=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(o,pe)},e),this}_prepareEase(e,o,f={}){this._moving=!0,o||f.moving||this.fire(new s.l("movestart",e)),this._zooming&&!f.zooming&&this.fire(new s.l("zoomstart",e)),this._rotating&&!f.rotating&&this.fire(new s.l("rotatestart",e)),this._pitching&&!f.pitching&&this.fire(new s.l("pitchstart",e)),this._rolling&&!f.rolling&&this.fire(new s.l("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const o=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&o!==this._elevationTarget){const f=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(f-(o-(f*e+this._elevationStart))/(1-e)),this._elevationTarget=o}this.transform.setElevation(s.B.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};const o=e.getCameraLngLat(),f=e.getCameraAltitude(),y=this.terrain?this.terrain.getElevationForLngLatZoom(o,e.zoom):0;if(f<y){const x=this.calculateCameraOptionsFromTo(o,y,e.center,e.elevation);return{pitch:x.pitch,zoom:x.zoom}}return{}}_applyUpdatedTransform(e){const o=[];if(o.push(y=>this._elevateCameraIfInsideTerrain(y)),this.transformCameraUpdate&&o.push(y=>this.transformCameraUpdate(y)),!o.length)return;const f=e.clone();for(const y of o){const x=f.clone(),{center:T,zoom:P,roll:C,pitch:L,bearing:N,elevation:B}=y(x);T&&x.setCenter(T),B!==void 0&&x.setElevation(B),P!==void 0&&x.setZoom(P),C!==void 0&&x.setRoll(C),L!==void 0&&x.setPitch(L),N!==void 0&&x.setBearing(N),f.apply(x)}this.transform.apply(f)}_fireMoveEvents(e){this.fire(new s.l("move",e)),this._zooming&&this.fire(new s.l("zoom",e)),this._rotating&&this.fire(new s.l("rotate",e)),this._pitching&&this.fire(new s.l("pitch",e)),this._rolling&&this.fire(new s.l("roll",e))}_afterEase(e,o){if(this._easeId&&o&&this._easeId===o)return;delete this._easeId;const f=this._zooming,y=this._rotating,x=this._pitching,T=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,f&&this.fire(new s.l("zoomend",e)),y&&this.fire(new s.l("rotateend",e)),x&&this.fire(new s.l("pitchend",e)),T&&this.fire(new s.l("rollend",e)),this.fire(new s.l("moveend",e))}flyTo(e,o){if(!e.essential&&D.prefersReducedMotion){const lt=s.O(e,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(lt,o)}this.stop(),e=s.e({offset:[0,0],speed:1.2,curve:1.42,easing:s.cf},e);const f=this._getTransformForUpdate(),y=f.bearing,x=f.pitch,T=f.roll,P=f.padding,C="bearing"in e?this._normalizeBearing(e.bearing,y):y,L="pitch"in e?+e.pitch:x,N="roll"in e?this._normalizeBearing(e.roll,T):T,B="padding"in e?e.padding:f.padding,j=s.P.convert(e.offset);let K=f.centerPoint.add(j);const ee=f.screenPointToLocation(K),me=this.cameraHelper.handleFlyTo(f,{bearing:C,pitch:L,roll:N,padding:B,locationAtOffset:ee,offsetAsPoint:j,center:e.center,minZoom:e.minZoom,zoom:e.zoom});let pe=e.curve;const ye=Math.max(f.width,f.height),be=ye/me.scaleOfZoom,Ee=me.pixelPathLength;typeof me.scaleOfMinZoom=="number"&&(pe=Math.sqrt(ye/me.scaleOfMinZoom/Ee*2));const xe=pe*pe;function Pe(lt){const At=(be*be-ye*ye+(lt?-1:1)*xe*xe*Ee*Ee)/(2*(lt?be:ye)*xe*Ee);return Math.log(Math.sqrt(At*At+1)-At)}function Ie(lt){return(Math.exp(lt)-Math.exp(-lt))/2}function Ce(lt){return(Math.exp(lt)+Math.exp(-lt))/2}const Ge=Pe(!1);let ct=function(lt){return Ce(Ge)/Ce(Ge+pe*lt)},at=function(lt){return ye*((Ce(Ge)*(Ie(At=Ge+pe*lt)/Ce(At))-Ie(Ge))/xe)/Ee;var At},Ke=(Pe(!0)-Ge)/pe;if(Math.abs(Ee)<2e-6||!isFinite(Ke)){if(Math.abs(ye-be)<1e-6)return this.easeTo(e,o);const lt=be<ye?-1:1;Ke=Math.abs(Math.log(be/ye))/pe,at=()=>0,ct=At=>Math.exp(lt*pe*At)}return e.duration="duration"in e?+e.duration:1e3*Ke/("screenSpeed"in e?+e.screenSpeed/pe:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=y!==C,this._pitching=L!==x,this._rolling=N!==T,this._padding=!f.isPaddingEqual(B),this._prepareEase(o,!1),this.terrain&&this._prepareElevation(me.targetCenter),this._ease(lt=>{const At=lt*Ke,Vt=1/ct(At),yt=at(At);this._rotating&&f.setBearing(s.B.number(y,C,lt)),this._pitching&&f.setPitch(s.B.number(x,L,lt)),this._rolling&&f.setRoll(s.B.number(T,N,lt)),this._padding&&(f.interpolatePadding(P,B,lt),K=f.centerPoint.add(j)),me.easeFunc(lt,Vt,yt,K),this.terrain&&!e.freezeElevation&&this._updateElevation(lt),this._applyUpdatedTransform(f),this._fireMoveEvents(o)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(o)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,o){var f;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const y=this._onEaseEnd;delete this._onEaseEnd,y.call(this,o)}return e||(f=this.handlers)===null||f===void 0||f.stop(!1),this}_ease(e,o,f){f.animate===!1||f.duration===0?(e(1),o()):(this._easeStart=D.now(),this._easeOptions=f,this._onEaseFrame=e,this._onEaseEnd=o,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,o){e=s.aL(e,-180,180);const f=Math.abs(e-o);return Math.abs(e-360-o)<f&&(e-=360),Math.abs(e+360-o)<f&&(e+=360),e}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLatZoom(s.Q.convert(e),this.transform.tileZoom):null}}const Ps={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class en{constructor(e=Ps){this._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")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=o=>{!o||o.sourceDataType!=="metadata"&&o.sourceDataType!=="visibility"&&o.dataType!=="style"&&o.type!=="terrain"||this._updateAttributions()},this._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","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=V.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=V.create("summary","maplibregl-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",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(e,o){const f=this._map._getUIString(`AttributionControl.${o}`);e.title=f,e.setAttribute("aria-label",f)}_updateAttributions(){if(!this._map.style)return;let e=[];
vendor: 11,198 bytes, line 807
807if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(y=>typeof y!="string"?"":y)):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const y=this._map.style.stylesheet;this.styleOwner=y.owner,this.styleId=y.id}const o=this._map.style.sourceCaches;for(const y in o){const x=o[y];if(x.used||x.usedForTerrain){const T=x.getSource();T.attribution&&e.indexOf(T.attribution)<0&&e.push(T.attribution)}}e=e.filter(y=>String(y).trim()),e.sort((y,x)=>y.length-x.length),e=e.filter((y,x)=>{for(let T=x+1;T<e.length;T++)if(e[T].indexOf(y)>=0)return!1;return!0});const f=e.join(" | ");f!==this._attribHTML&&(this._attribHTML=f,e.length?(this._innerContainer.innerHTML=V.sanitize(f),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class tu{constructor(e={}){this._updateCompact=()=>{const o=this._container.children;if(o.length){const f=o[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&f.classList.add("maplibregl-compact"):f.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=V.create("div","maplibregl-ctrl");const o=V.create("a","maplibregl-ctrl-logo");return o.target="_blank",o.rel="noopener nofollow",o.href="https://maplibre.org/",o.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),o.setAttribute("rel","noopener nofollow"),this._container.appendChild(o),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}}class Wo{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const o=++this._id;return this._queue.push({callback:e,id:o,cancelled:!1}),o}remove(e){const o=this._currentlyRunning,f=o?this._queue.concat(o):this._queue;for(const y of f)if(y.id===e)return void(y.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const o=this._currentlyRunning=this._queue;this._queue=[];for(const f of o)if(!f.cancelled&&(f.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Vc=s.aG([{name:"a_pos3d",type:"Int16",components:3}]);class of extends s.E{constructor(e){super(),this._lastTilesetChange=D.now(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,o){this.sourceCache.update(e,o),this._renderableTilesKeys=[];const f={};for(const y of Le(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:o,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))f[y.key]=!0,this._renderableTilesKeys.push(y.key),this._tiles[y.key]||(y.terrainRttPosMatrix32f=new Float64Array(16),s.bQ(y.terrainRttPosMatrix32f,0,s.Z,s.Z,0,0,1),this._tiles[y.key]=new xi(y,this.tileSize),this._lastTilesetChange=D.now());for(const y in this._tiles)f[y]||delete this._tiles[y]}freeRtt(e){for(const o in this._tiles){const f=this._tiles[o];(!e||f.tileID.equals(e)||f.tileID.isChildOf(e)||e.isChildOf(f.tileID))&&(f.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,o){return o?this._getTerrainCoordsForTileRanges(e,o):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){const o={};for(const f of this._renderableTilesKeys){const y=this._tiles[f].tileID,x=e.clone(),T=s.b2();if(y.canonical.equals(e.canonical))s.bQ(T,0,s.Z,s.Z,0,0,1);else if(y.canonical.isChildOf(e.canonical)){const P=y.canonical.z-e.canonical.z,C=y.canonical.x-(y.canonical.x>>P<<P),L=y.canonical.y-(y.canonical.y>>P<<P),N=s.Z>>P;s.bQ(T,0,N,N,0,0,1),s.L(T,T,[-C*N,-L*N,0])}else{if(!e.canonical.isChildOf(y.canonical))continue;{const P=e.canonical.z-y.canonical.z,C=e.canonical.x-(e.canonical.x>>P<<P),L=e.canonical.y-(e.canonical.y>>P<<P),N=s.Z>>P;s.bQ(T,0,s.Z,s.Z,0,0,1),s.L(T,T,[C*N,L*N,0]),s.M(T,T,[1/2**P,1/2**P,0])}}x.terrainRttPosMatrix32f=new Float32Array(T),o[f]=x}return o}_getTerrainCoordsForTileRanges(e,o){const f={};for(const y of this._renderableTilesKeys){const x=this._tiles[y].tileID;if(!this._isWithinTileRanges(x,o))continue;const T=e.clone(),P=s.b2();if(x.canonical.z===e.canonical.z){const C=e.canonical.x-x.canonical.x,L=e.canonical.y-x.canonical.y;s.bQ(P,0,s.Z,s.Z,0,0,1),s.L(P,P,[C*s.Z,L*s.Z,0])}else if(x.canonical.z>e.canonical.z){const C=x.canonical.z-e.canonical.z,L=x.canonical.x-(x.canonical.x>>C<<C),N=x.canonical.y-(x.canonical.y>>C<<C),B=e.canonical.x-(x.canonical.x>>C),j=e.canonical.y-(x.canonical.y>>C),K=s.Z>>C;s.bQ(P,0,K,K,0,0,1),s.L(P,P,[-L*K+B*s.Z,-N*K+j*s.Z,0])}else{const C=e.canonical.z-x.canonical.z,L=e.canonical.x-(e.canonical.x>>C<<C),N=e.canonical.y-(e.canonical.y>>C<<C),B=(e.canonical.x>>C)-x.canonical.x,j=(e.canonical.y>>C)-x.canonical.y,K=s.Z<<C;s.bQ(P,0,K,K,0,0,1),s.L(P,P,[L*s.Z+B*K,N*s.Z+j*K,0])}T.terrainRttPosMatrix32f=new Float32Array(P),f[y]=T}return f}getSourceTile(e,o){const f=this.sourceCache._source;let y=e.overscaledZ-this.deltaZoom;if(y>f.maxzoom&&(y=f.maxzoom),y<f.minzoom)return null;this._sourceTileCache[e.key]||(this._sourceTileCache[e.key]=e.scaledTo(y).key);let x=this.sourceCache.getTileByID(this._sourceTileCache[e.key]);if((!x||!x.dem)&&o)for(;y>=f.minzoom&&(!x||!x.dem);)x=this.sourceCache.getTileByID(e.scaledTo(y--).key);return x}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,o){return o[e.canonical.z]&&e.canonical.x>=o[e.canonical.z].minTileX&&e.canonical.x<=o[e.canonical.z].maxTileX&&e.canonical.y>=o[e.canonical.z].minTileY&&e.canonical.y<=o[e.canonical.z].maxTileY}}class ru{constructor(e,o,f){this._meshCache={},this.painter=e,this.sourceCache=new of(o),this.options=f,this.exaggeration=typeof f.exaggeration=="number"?f.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,o,f,y=s.Z){var x;if(!(o>=0&&o<y&&f>=0&&f<y))return 0;const T=this.getTerrainData(e),P=(x=T.tile)===null||x===void 0?void 0:x.dem;if(!P)return 0;const C=s.cj([],[o/y*s.Z,f/y*s.Z],T.u_terrain_matrix),L=[C[0]*P.dim,C[1]*P.dim],N=Math.floor(L[0]),B=Math.floor(L[1]),j=L[0]-N,K=L[1]-B;return P.get(N,B)*(1-j)*(1-K)+P.get(N+1,B)*j*(1-K)+P.get(N,B+1)*(1-j)*K+P.get(N+1,B+1)*j*K}getElevationForLngLatZoom(e,o){if(!s.ck(o,e.wrap()))return 0;const{tileID:f,mercatorX:y,mercatorY:x}=this._getOverscaledTileIDFromLngLatZoom(e,o);return this.getElevation(f,y%s.Z,x%s.Z,s.Z)}getElevation(e,o,f,y=s.Z){return this.getDEMElevation(e,o,f,y)*this.exaggeration}getTerrainData(e){if(!this._emptyDemTexture){const y=this.painter.context,x=new s.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new ze(y,x,y.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new ze(y,new s.R({width:1,height:1}),y.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=s.ad([])}const o=this.sourceCache.getSourceTile(e,!0);if(o&&o.dem&&(!o.demTexture||o.needsTerrainPrepare)){const y=this.painter.context;o.demTexture=this.painter.getTileTexture(o.dem.stride),o.demTexture?o.demTexture.update(o.dem.getPixels(),{premultiply:!1}):o.demTexture=new ze(y,o.dem.getPixels(),y.gl.RGBA,{premultiply:!1}),o.demTexture.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),o.needsTerrainPrepare=!1}const f=o&&o+o.tileID.key+e.key;if(f&&!this._demMatrixCache[f]){const y=this.sourceCache.sourceCache._source.maxzoom;let x=e.canonical.z-o.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=y?x=e.canonical.z-y:s.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const T=e.canonical.x-(e.canonical.x>>x<<x),P=e.canonical.y-(e.canonical.y>>x<<x),C=s.cl(new Float64Array(16),[1/(s.Z<<x),1/(s.Z<<x),0]);s.L(C,C,[T*s.Z,P*s.Z,0]),this._demMatrixCache[e.key]={matrix:C,coord:e}}return{u_depth:2,u_terrain:3,u_terrain_dim:o&&o.dem&&o.dem.dim||1,u_terrain_matrix:f?this._demMatrixCache[e.key].matrix:this._emptyDemMatrix,u_terrain_unpack:o&&o.dem&&o.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(o&&o.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:o}}getFramebuffer(e){const o=this.painter,f=o.width/devicePixelRatio,y=o.height/devicePixelRatio;return!this._fbo||this._fbo.width===f&&this._fbo.height===y||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new ze(o.context,{width:f,height:y,data:null},o.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(o.context.gl.NEAREST,o.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new ze(o.context,{width:f,height:y,data:null},o.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(o.context.gl.NEAREST,o.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=o.context.createFramebuffer(f,y,!0,!1),this._fbo.depthAttachment.set(o.context.createRenderbuffer(o.context.gl.DEPTH_COMPONENT16,f,y))),this._fbo.colorAttachment.set(e==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const e=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const o=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let x=0,T=0;x<this._coordsTextureSize;x++)for(let P=0;P<this._coordsTextureSize;P++,T+=4)o[T+0]=255&P,o[T+1]=255&x,o[T+2]=P>>8<<4|x>>8,o[T+3]=0;const f=new s.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(o.buffer)),y=new ze(e,f,e.gl.RGBA,{premultiply:!1});return y.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=y,y}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);const o=new Uint8Array(4),f=this.painter.context,y=f.gl,x=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),T=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),P=Math.round(this.painter.height/devicePixelRatio);f.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),y.readPixels(x,P-T-1,1,1,y.RGBA,y.UNSIGNED_BYTE,o),f.bindFramebuffer.set(null);const C=o[0]+(o[2]>>4<<8),L=o[1]+((15&o[2])<<8),N=this.coordsIndex[255-o[3]],B=N&&this.sourceCache.getTileByID(N);if(!B)return null;const j=this._coordsTextureSize,K=(1<<B.tileID.canonical.z)*j;return new s.$((B.tileID.canonical.x*j+C)/K+B.tileID.wrap,(B.tileID.canonical.y*j+L)/K,this.getElevation(B.tileID,C,L,j)
vendor: 4,162 bytes, line 807
807)}depthAtPoint(e){const o=new Uint8Array(4),f=this.painter.context,y=f.gl;return f.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),y.readPixels(e.x,this.painter.height/devicePixelRatio-e.y-1,1,1,y.RGBA,y.UNSIGNED_BYTE,o),f.bindFramebuffer.set(null),(o[0]/16777216+o[1]/65536+o[2]/256+o[3])/256}getTerrainMesh(e){var o;const f=((o=this.painter.style.projection)===null||o===void 0?void 0:o.transitionState)>0,y=f&&e.canonical.y===0,x=f&&e.canonical.y===(1<<e.canonical.z)-1,T=`m_${y?"n":""}_${x?"s":""}`;if(this._meshCache[T])return this._meshCache[T];const P=this.painter.context,C=new s.cm,L=new s.aK,N=this.meshSize,B=s.Z/N,j=N*N;for(let Ce=0;Ce<=N;Ce++)for(let Ge=0;Ge<=N;Ge++)C.emplaceBack(Ge*B,Ce*B,0);for(let Ce=0;Ce<j;Ce+=N+1)for(let Ge=0;Ge<N;Ge++)L.emplaceBack(Ge+Ce,N+Ge+Ce+1,N+Ge+Ce+2),L.emplaceBack(Ge+Ce,N+Ge+Ce+2,Ge+Ce+1);const K=C.length,ee=K+(N+1),me=(N+1)*N,pe=y?s.b9:0,ye=y?0:1,be=x?s.ba:s.Z,Ee=x?0:1;for(let Ce=0;Ce<=N;Ce++)C.emplaceBack(Ce*B,pe,ye);for(let Ce=0;Ce<=N;Ce++)C.emplaceBack(Ce*B,be,Ee);for(let Ce=0;Ce<N;Ce++)L.emplaceBack(me+Ce,ee+Ce,ee+Ce+1),L.emplaceBack(me+Ce,ee+Ce+1,me+Ce+1),L.emplaceBack(0+Ce,K+Ce+1,K+Ce),L.emplaceBack(0+Ce,0+Ce+1,K+Ce+1);const xe=C.length,Pe=xe+2*(N+1);for(const Ce of[0,1])for(let Ge=0;Ge<=N;Ge++)for(const ct of[0,1])C.emplaceBack(Ce*s.Z,Ge*B,ct);for(let Ce=0;Ce<2*N;Ce+=2)L.emplaceBack(xe+Ce,xe+Ce+1,xe+Ce+3),L.emplaceBack(xe+Ce,xe+Ce+3,xe+Ce+2),L.emplaceBack(Pe+Ce,Pe+Ce+3,Pe+Ce+1),L.emplaceBack(Pe+Ce,Pe+Ce+2,Pe+Ce+3);const Ie=new co(P.createVertexBuffer(C,Vc.members),P.createIndexBuffer(L),s.aJ.simpleSegment(0,0,C.length,L.length));return this._meshCache[T]=Ie,Ie}getMeshFrameDelta(e){return 2*Math.PI*s.bu/Math.pow(2,Math.max(e,0))/5}getMinTileElevationForLngLatZoom(e,o){var f;const{tileID:y}=this._getOverscaledTileIDFromLngLatZoom(e,o);return(f=this.getMinMaxElevation(y).minElevation)!==null&&f!==void 0?f:0}getMinMaxElevation(e){const o=this.getTerrainData(e).tile,f={minElevation:null,maxElevation:null};return o&&o.dem&&(f.minElevation=o.dem.min*this.exaggeration,f.maxElevation=o.dem.max*this.exaggeration),f}_getOverscaledTileIDFromLngLatZoom(e,o){const f=s.$.fromLngLat(e.wrap()),y=(1<<o)*s.Z,x=f.x*y,T=f.y*y,P=Math.floor(x/s.Z),C=Math.floor(T/s.Z);return{tileID:new s.Y(o,0,o,P,C),mercatorX:x,mercatorY:T}}}class Ac{constructor(e,o,f){this._context=e,this._size=o,this._tileSize=f,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const e of this._objects)e.texture.destroy(),e.fbo.destroy()}_createObject(e){const o=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),f=new ze(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return f.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),o.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),o.colorAttachment.set(f.texture),{id:e,fbo:o,texture:f,stamp:-1,inUse:!1}}getObjectForId(e){return this._objects[e]}useObject(e){e.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(o=>e.id!==o),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(const o of this._recentlyUsed)if(!this._objects[o].inUse)return this._objects[o];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(const e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(e=>!e.inUse)===!1}}const Li={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ju{constructor(e,o){this.painter=e,this.terrain=o,this.pool=new Ac(e.context,30,o.sourceCache.tileSize*o.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}
vendor: 4,230 bytes, line 807
807prepareForRender(e,o){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter(f=>!e._layers[f].isHidden(o)),this._coordsAscending={};for(const f in e.sourceCaches){this._coordsAscending[f]={};const y=e.sourceCaches[f].getVisibleCoordinates(),x=e.sourceCaches[f].getSource(),T=x instanceof Qr?x.terrainTileRanges:null;for(const P of y){const C=this.terrain.sourceCache.getTerrainCoords(P,T);for(const L in C)this._coordsAscending[f][L]||(this._coordsAscending[f][L]=[]),this._coordsAscending[f][L].push(C[L])}}this._coordsAscendingStr={};for(const f of e._order){const y=e._layers[f],x=y.source;if(Li[y.type]&&!this._coordsAscendingStr[x]){this._coordsAscendingStr[x]={};for(const T in this._coordsAscending[x])this._coordsAscendingStr[x][T]=this._coordsAscending[x][T].map(P=>P.key).sort().join()}}for(const f of this._renderableTiles)for(const y in this._coordsAscendingStr){const x=this._coordsAscendingStr[y][f.tileID.key];x&&x!==f.rttCoords[y]&&(f.rtt=[])}}renderLayer(e,o){if(e.isHidden(this.painter.transform.zoom))return!1;const f=Object.assign(Object.assign({},o),{isRenderingToTexture:!0}),y=e.type,x=this.painter,T=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(Li[y]&&(this._prevType&&Li[this._prevType]||this._stacks.push([]),this._prevType=y,this._stacks[this._stacks.length-1].push(e.id),!T))return!0;if(Li[this._prevType]||Li[y]&&T){this._prevType=y;const P=this._stacks.length-1,C=this._stacks[P]||[];for(const L of this._renderableTiles){if(this.pool.isFull()&&(Ts(this.painter,this.terrain,this._rttTiles,f),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(L),L.rtt[P]){const B=this.pool.getObjectForId(L.rtt[P].id);if(B.stamp===L.rtt[P].stamp){this.pool.useObject(B);continue}}const N=this.pool.getOrCreateFreeObject();this.pool.useObject(N),this.pool.stampObject(N),L.rtt[P]={id:N.id,stamp:N.stamp},x.context.bindFramebuffer.set(N.fbo.framebuffer),x.context.clear({color:s.b7.transparent,stencil:0}),x.currentStencilSource=void 0;for(let B=0;B<C.length;B++){const j=x.style._layers[C[B]],K=j.source?this._coordsAscending[j.source][L.tileID.key]:[L.tileID];x.context.viewport.set([0,0,N.fbo.width,N.fbo.height]),x._renderTileClippingMasks(j,K,!0),x.renderLayer(x,x.style.sourceCaches[j.source],j,K,f),j.source&&(L.rttCoords[j.source]=this._coordsAscendingStr[j.source][L.tileID.key])}}return Ts(this.painter,this.terrain,this._rttTiles,f),this._rttTiles=[],this.pool.freeAllObjects(),Li[y]}return!1}}const Zt={"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":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use â + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},ir=Y,Eo={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Ps,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileC
vendor: 21,839 bytes, line 807
807acheSize:null,maxTileCacheZoomLevels:s.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0},nu={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Mo{constructor(e,o,f=!1){this.mousedown=x=>{this.startMove(x,V.mousePos(this.element,x)),V.addEventListener(window,"mousemove",this.mousemove),V.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=x=>{this.move(x,V.mousePos(this.element,x))},this.mouseup=x=>{this._rotatePitchHanlder.dragEnd(x),this.offTemp()},this.touchstart=x=>{x.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=V.touchPos(this.element,x.targetTouches)[0],this.startMove(x,this._startPos),V.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),V.addEventListener(window,"touchend",this.touchend))},this.touchmove=x=>{x.targetTouches.length!==1?this.reset():(this._lastPos=V.touchPos(this.element,x.targetTouches)[0],this.move(x,this._lastPos))},this.touchend=x=>{x.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=o;const y=new ul;this._rotatePitchHanlder=new ai({clickTolerance:3,move:(x,T)=>{const P=o.getBoundingClientRect(),C=new s.P((P.bottom-P.top)/2,(P.right-P.left)/2);return{bearingDelta:s.ce(new s.P(x.x,T.y),T,C),pitchDelta:f?-.5*(T.y-x.y):void 0}},moveStateManager:y,enable:!0,assignEvents:()=>{}}),this.map=e,V.addEventListener(o,"mousedown",this.mousedown),V.addEventListener(o,"touchstart",this.touchstart,{passive:!1}),V.addEventListener(o,"touchcancel",this.reset)}startMove(e,o){this._rotatePitchHanlder.dragStart(e,o),V.disableDrag()}move(e,o){const f=this.map,{bearingDelta:y,pitchDelta:x}=this._rotatePitchHanlder.dragMove(e,o)||{};y&&f.setBearing(f.getBearing()+y),x&&f.setPitch(f.getPitch()+x)}off(){const e=this.element;V.removeEventListener(e,"mousedown",this.mousedown),V.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),V.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),V.removeEventListener(window,"touchend",this.touchend),V.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){V.enableDrag(),V.removeEventListener(window,"mousemove",this.mousemove),V.removeEventListener(window,"mouseup",this.mouseup),V.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),V.removeEventListener(window,"touchend",this.touchend)}}let An;function Bu(_,e,o,f=!1){if(f||!o.getCoveringTilesDetailsProvider().allowWorldCopies())return _==null?void 0:_.wrap();const y=new s.Q(_.lng,_.lat);if(_=new s.Q(_.lng,_.lat),e){const x=new s.Q(_.lng-360,_.lat),T=new s.Q(_.lng+360,_.lat),P=o.locationToScreenPoint(_).distSqr(e);o.locationToScreenPoint(x).distSqr(e)<P?_=x:o.locationToScreenPoint(T).distSqr(e)<P&&(_=T)}for(;Math.abs(_.lng-o.center.lng)>180;){const x=o.locationToScreenPoint(_);if(x.x>=0&&x.y>=0&&x.x<=o.width&&x.y<=o.height)break;_.lng>o.center.lng?_.lng-=360:_.lng+=360}return _.lng!==y.lng&&o.isPointOnMapSurface(o.locationToScreenPoint(_))?_:y}const ca={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 kc(_,e,o){const f=_.classList;for(const y in ca)f.remove(`maplibregl-${o}-anchor-${y}`);f.add(`maplibregl-${o}-anchor-${e}`)}class Fa extends s.E{constructor(e){if(super(),this._onKeyPress=o=>{const f=o.code,y=o.charCode||o.keyCode;f!=="Space"&&f!=="Enter"&&y!==32&&y!==13||this.togglePopup()},this._onMapClick=o=>{const f=o.originalEvent.target,y=this._element;this._popup&&(f===y||y.contains(f))&&this.togglePopup()},this._update=o=>{if(!this._map)return;const f=this._map.loaded()&&!this._map.isMoving();((o==null?void 0:o.type)==="terrain"||(o==null?void 0:o.type)==="render"&&!f)&&this._map.once("render",this._update),this._lngLat=Bu(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let y="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?y=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(y=`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)`),this._subpixelPositioning||o&&o.type!=="moveend"||(this._pos=this._pos.round()),V.setTransform(this._element,`${ca[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${x} ${y}`),D.frameAsync(new AbortController).then(()=>{this._updateOpacity(o&&o.type==="moveend")}).catch(()=>{})},this._onMove=o=>{if(!this._isDragging){const f=this._clickTolerance||this._map._clickTolerance;this._isDragging=o.point.dist(this._pointerdownPos)>=f}this._isDragging&&(this._pos=o.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 s.l("dragstart"))),this.fire(new s.l("drag")))},this._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 s.l("dragend")),this._state="inactive"},this._addDragHandler=o=>{this._element.contains(o.originalEvent.target)&&(o.preventDefault(),this._positionDelta=o.point.sub(this._pos).add(this._offset),this._pointerdownPos=o.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))},this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e==null?void 0:e.opacity,e==null?void 0:e.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=s.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=V.create("div");const o=V.createNS("http://www.w3.org/2000/svg","svg"),f=41,y=27;o.setAttributeNS(null,"display","block"),o.setAttributeNS(null,"height",`${f}px`),o.setAttributeNS(null,"width",`${y}px`),o.setAttributeNS(null,"viewBox",`0 0 ${y} ${f}`);const x=V.createNS("http://www.w3.org/2000/svg","g");x.setAttributeNS(null,"stroke","none"),x.setAttributeNS(null,"stroke-width","1"),x.setAttributeNS(null,"fill","none"),x.setAttributeNS(null,"fill-rule","evenodd");const T=V.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"fill-rule","nonzero");const P=V.createNS("http://www.w3.org/2000/svg","g");P.setAttributeNS(null,"transform","translate(3.0, 29.0)"),P.setAttributeNS(null,"fill","#000000");const C=[{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 ye of C){const be=V.createNS("http://www.w3.org/2000/svg","ellipse");be.setAttributeNS(null,"opacity","0.04"),be.setAttributeNS(null,"cx","10.5"),be.setAttributeNS(null,"cy","5.80029008"),be.setAttributeNS(null,"rx",ye.rx),be.setAttributeNS(null,"ry",ye.ry),P.appendChild(be)}const L=V.createNS("http://www.w3.org/2000/svg","g");L.setAttributeNS(null,"fill",this._color);const N=V.createNS("http://www.w3.org/2000/svg","path");N.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"),L.appendChild(N);const B=V.createNS("http://www.w3.org/2000/svg","g");B.setAttributeNS(null,"opacity","0.25"),B.setAttributeNS(null,"fill","#000000");const j=V.createNS("http://www.w3.org/2000/svg","path");j.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"),B.appendChild(j);const K=V.createNS("http://www.w3.org/2000/svg","g");K.setAttributeNS(null,"transform","translate(6.0, 7.0)"),K.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 me=V.createNS("http://www.w3.org/2000/svg","circle");me.setAttributeNS(null,"fill","#000000"),me.setAttributeNS(null,"opacity","0.25"),me.setAttributeNS(null,"cx","5.5"),me.setAttributeNS(null,"cy","5.5"),me.setAttributeNS(null,"r","5.4999962");const pe=V.createNS("http://www.w3.org/2000/svg","circle");pe.setAttributeNS(null,"fill","#FFFFFF"),pe.setAttributeNS(null,"cx","5.5"),pe.setAttributeNS(null,"cy","5.5"),pe.setAttributeNS(null,"r","5.4999962"),ee.appendChild(me),ee.appendChild(pe),T.appendChild(P),T.appendChild(L),T.appendChild(B),T.appendChild(K),T.appendChild(ee),o.appendChild(T),o.setAttributeNS(null,"height",f*this._scale+"px"),o.setAttributeNS(null,"width",y*this._scale+"px"),this._element.appendChild(o),this._offset=s.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",o=>{o.preventDefault()}),this._element.addEventListener("mousedown",o=>{o.preventDefault()}),kc(this._element,this._anchor,"marker"),e&&e.className)for(const o of e.className.split(" "))this._element.classList.add(o);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",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("terrain",this._update),this._map.off("projectiontransition",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(e){return this._lngLat=s.Q.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const y=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[y,-1*(38.1-13.5+y)],"bottom-right":[-y,-1*(38.1-13.5+y)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){const e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var o,f;const y=(o=this._map)===null||o===void 0?void 0:o.terrain,x=this._map.transform.isLocationOccluded(this._lngLat);if(!y||x){const K=x?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==K&&(this._element.style.opacity=K))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const T=this._map,P=T.terrain.depthAtPoint(this._pos),C=T.terrain.getElevationForLngLatZoom(this._lngLat,T.transform.tileZoom);if(T.transform.lngLatToCameraDepth(this._lngLat,C)-P<.006)return void(this._element.style.opacity=this._opacity);const L=-this._offset.y/T.transform.pixelsPerMeter,N=Math.sin(T.getPitch()*Math.PI/180)*L,B=T.terrain.depthAtPoint(new s.P(this._pos.x,this._pos.y-this._offset.y)),j=T.transform.lngLatToCameraDepth(this._lngLat,C+N)-B>.006;!((f=this._popup)===null||f===void 0)&&f.isOpen()&&j&&this._popup.remove(),this._element.style.opacity=j?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=s.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(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(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,o){return(this._opacity===void 0||e===void 0&&o===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=e),o!==void 0&&(this._opacityWhenCovered=o),this._map&&this._updateOpacity(!0),this}}const Lr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Hr=0,Po=!1;const iu={maxWidth:100,unit:"metric"};function Ea(_,e,o){const f=o&&o.maxWidth||100,y=_._container.clientHeight/2,x=_._container.clientWidth/2,T=_.unproject([x-f/2,y]),P=_.unproject([x+f/2,y]),C=Math.round(_.project(P).x-_.project(T).x),L=Math.min(f,C,_._container.clientWidth),N=T.distanceTo(P);if(o&&o.unit==="imperial"){const B=3.2808*N;B>5280?ha(e,L,B/5280,_._getUIString("ScaleControl.Miles")):ha(e,L,B,_._getUIString("ScaleControl.Feet"))}else o&&o.unit==="nautical"?ha(e,L,N/1852,_._getUIString("ScaleControl.NauticalMiles")):N>=1e3?ha(e,L,N/1e3,_._getUIString("ScaleControl.Kilometers")):ha(e,L,N,_._getUIString("ScaleControl.Meters"))}function ha(_,e,o,f){const y=function(x){const T=Math.pow(10,`${Math.floor(x)}`.length-1);let P=x/T;return P=P>=10?10:P>=5?5:P>=3?3:P>=2?2:P>=1?1:function(C){const L=Math.pow(10,Math.ceil(-Math.log(C)/Math.LN10));return Math.round(C*L)/L}(P),T*P}(o);_.style.width=e*(y/o)+"px",_.innerHTML=`${y} ${f}`}const $u={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},Dc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function da(_){if(_){if(typeof _=="number"){const e=Math.round(Math.abs(_)/Math.SQRT2);return{center:new s.P(0,0),top:new s.P(0,_),"top-left":new s.P(e,e),"top-right":new s.P(-e,e),bottom:new s.P(0,-_),"bottom-left":new s.P(e,-e),"bottom-right":new s.P(-e,-e),left:new s.P(_,0),right:new s.P(-_,0)}}if(_ instanceof s.P||Array.isArray(_)){const e=s.P.convert(_);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:s.P.convert(_.center||[0,0]),top:s.P.convert(_.top||[0,0]),"top-left":s.P.convert(_["top-left"]||[0,0]),"top-right":s.P.convert(_["top-right"]||[0,0]),bottom:s.P.convert(_.bottom||[0,0]),"bottom-left":s.P.convert(_["bottom-left"]||[0,0]),"bottom-right":s.P.convert(_["bottom-right"]||[0,0]),left:s.P.convert(_.left||[0,0]),right:s.P.convert(_.right||[0,0])}}return da(new s.P(0,0))}const Is=Y;g.AJAXError=s.cq,g.Event=s.l,g.Evented=s.E,g.LngLat=s.Q,g.MercatorCoordinate=s.$,g.Point=s.P,g.addProtocol=s.cr,g.config=s.a,g.removeProtocol=s.cs,g.AttributionControl=en,g.BoxZoomHandler=di,g.CanvasSource=Jr,g.CooperativeGesturesHandler=ln,g.DoubleClickZoomHandler=Ms,g.DragPanHandler=Cc,g.DragRotateHandler=ua,g.EdgeInsets=fo,g.FullscreenControl=class extends s.E{constructor(_={}){super(),this._onFullscreenChange=()=>{var e;let o=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((e=o==null?void 0:o.shadowRoot)===null||e===void 0)&&e.fullscreenElement;)o=o.shadowRoot.fullscreenElement;o===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,_&&_.container&&(_.container instanceof HTMLElement?this._container=_.container:s.w("Full screen control 'container' must be a DOM element.")),"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(_){return this._map=_,this._container||(this._container=this._map.getContainer()),this._controlContainer=V.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){V.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const _=this._fullscreenButton=V.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);V.create("span","maplibregl-ctrl-icon",_).setAttribute("aria-hidden","true"),_.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const _=this._getTitle();this._fullscreenButton.setAttribute("aria-label",_),this._fullscreenButton.title=_}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new s.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new s.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){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._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},g.GeoJSONSource=ui,g.GeolocateControl=class extends s.E{constructor(_){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new s.l("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_E
807RROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(e),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new s.l("geolocate",e)),this._finish()}},this._updateCamera=e=>{const o=new s.Q(e.coords.longitude,e.coords.latitude),f=e.coords.accuracy,y=this._map.getBearing(),x=s.e({bearing:y},this.options.fitBoundsOptions),T=Yr.fromLngLat(o,f);this._map.fitBounds(T,x,{geolocateSource:!0})},this._updateMarker=e=>{if(e){const o=new s.Q(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(o).addTo(this._map),this._userLocationDotMarker.setLngLat(o).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=e=>{if(this._map){if(e.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const o=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(e.code===3&&Po)return;this.options.trackUserLocation&&this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new s.l("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=V.create("button","maplibregl-ctrl-geolocate",this._container),V.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(e===!1){s.w("Geolocation support is not available so the GeolocateControl will be disabled.");const o=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}else{const o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=V.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Fa({element:this._dotElement}),this._circleElement=V.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Fa({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",o=>{o.geolocateSource||this._watchState!=="ACTIVE_LOCK"||o.originalEvent&&o.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new s.l("trackuserlocationend")),this.fire(new s.l("userlocationlostfocus")))})}},this.options=s.e({},Lr,_)}onAdd(_){return this._map=_,this._container=V.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return s._(this,arguments,void 0,function*(e=!1){if(An!==void 0&&!e)return An;if(window.navigator.permissions===void 0)return An=!!window.navigator.geolocation,An;try{An=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{An=!!window.navigator.geolocation}return An})}().then(e=>this._finishSetupUI(e)),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,Hr=0,Po=!1}_isOutOfMapMaxBounds(_){const e=this._map.getMaxBounds(),o=_.coords;return e&&(o.longitude<e.getWest()||o.longitude>e.getEast()||o.latitude<e.getSouth()||o.latitude>e.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
807RROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const _=this._map.getBounds(),e=_.getSouthEast(),o=_.getNorthEast(),f=e.distanceTo(o),y=Math.ceil(this._accuracy/(f/this._map._container.clientHeight)*2);this._circleElement.style.width=`${y}px`,this._circleElement.style.height=`${y}px`}trigger(){if(!this._setup)return s.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new s.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Hr--,Po=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new s.l("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new s.l("trackuserlocationstart")),this.fire(new s.l("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-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 _;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Hr++,Hr>1?(_={maximumAge:6e5,timeout:0},Po=!0):(_=this.options.positionOptions,Po=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,_)}}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"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},g.GlobeControl=class{constructor(){this._toggleProjection=()=>{var _;const e=(_=this._map.getProjection())===null||_===void 0?void 0:_.type;this._map.setProjection(e!=="mercator"&&e?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var _;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((_
vendor: 22,055 bytes, line 807
807=this._map.getProjection())===null||_===void 0?void 0:_.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(_){return this._map=_,this._container=V.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=V.create("button","maplibregl-ctrl-globe",this._container),V.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){V.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},g.Hash=Xa,g.ImageSource=Qr,g.KeyboardHandler=Ei,g.LngLatBounds=Yr,g.LogoControl=tu,g.Map=class extends Gh{constructor(_){var e,o;s.cn.mark(s.co.create);const f=Object.assign(Object.assign(Object.assign({},Eo),_),{canvasContextAttributes:Object.assign(Object.assign({},Eo.canvasContextAttributes),_.canvasContextAttributes)});if(f.minZoom!=null&&f.maxZoom!=null&&f.minZoom>f.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(f.minPitch!=null&&f.maxPitch!=null&&f.minPitch>f.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(f.minPitch!=null&&f.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(f.maxPitch!=null&&f.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const y=new Al,x=new kl;if(f.minZoom!==void 0&&y.setMinZoom(f.minZoom),f.maxZoom!==void 0&&y.setMaxZoom(f.maxZoom),f.minPitch!==void 0&&y.setMinPitch(f.minPitch),f.maxPitch!==void 0&&y.setMaxPitch(f.maxPitch),f.renderWorldCopies!==void 0&&y.setRenderWorldCopies(f.renderWorldCopies),super(y,x,{bearingSnap:f.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Wo,this._controls=[],this._mapId=s.a4(),this._contextLost=P=>{P.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new s.l("webglcontextlost",{originalEvent:P}))},this._contextRestored=P=>{this._setupPainter(),this.resize(),this._update(),this.fire(new s.l("webglcontextrestored",{originalEvent:P}))},this._onMapScroll=P=>{if(P.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=f.interactive,this._maxTileCacheSize=f.maxTileCacheSize,this._maxTileCacheZoomLevels=f.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},f.canvasContextAttributes),this._trackResize=f.trackResize===!0,this._bearingSnap=f.bearingSnap,this._centerClampedToGround=f.centerClampedToGround,this._refreshExpiredTiles=f.refreshExpiredTiles===!0,this._fadeDuration=f.fadeDuration,this._crossSourceCollisions=f.crossSourceCollisions===!0,this._collectResourceTiming=f.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Zt),f.locale),this._clickTolerance=f.clickTolerance,this._overridePixelRatio=f.pixelRatio,this._maxCanvasSize=f.maxCanvasSize,this.transformCameraUpdate=f.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=f.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=fe.addThrottleControl(()=>this.isMoving()),this._requestManager=new We(f.transformRequest),typeof f.container=="string"){if(this._container=document.getElementById(f.container),!this._container)throw new Error(`Container '${f.container}' not found.`)}else{if(!(f.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=f.container}if(f.maxBounds&&this.setMaxBounds(f.maxBounds),this._setupContainer(),this._setupPainter(),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)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let P=!1;const C=Ws(L=>{this._trackResize&&!this._removed&&(this.resize(L),this.redraw())},50);this._resizeObserver=new ResizeObserver(L=>{P?C(L):P=!0}),this._resizeObserver.observe(this._container)}this.handlers=new $h(this,f),this._hash=f.hash&&new Xa(typeof f.hash=="string"&&f.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:f.center,elevation:f.elevation,zoom:f.zoom,bearing:f.bearing,pitch:f.pitch,roll:f.roll}),f.bounds&&(this.resize(),this.fitBounds(f.bounds,s.e({},f.fitBoundsOptions,{duration:0}))));const T=typeof f.style=="string"||((o=(e=f.style)===null||e===void 0?void 0:e.projection)===null||o===void 0?void 0:o.type)!=="globe";this.resize(null,T),this._localIdeographFontFamily=f.localIdeographFontFamily,this._validateStyle=f.validateStyle,f.style&&this.setStyle(f.style,{localIdeographFontFamily:f.localIdeographFontFamily}),f.attributionControl&&this.addControl(new en(typeof f.attributionControl=="boolean"?void 0:f.attributionControl)),f.maplibreLogo&&this.addControl(new tu,f.logoPosition),this.on("style.load",()=>{if(T||this._resizeTransform(),this.transform.unmodified){const P=s.O(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(P)}}),this.on("data",P=>{this._update(P.dataType==="style"),this.fire(new s.l(`${P.dataType}data`,P))}),this.on("dataloading",P=>{this.fire(new s.l(`${P.dataType}dataloading`,P))}),this.on("dataabort",P=>{this.fire(new s.l("sourcedataabort",P))})}_getMapId(){return this._mapId}addControl(_,e){if(e===void 0&&(e=_.getDefaultPosition?_.getDefaultPosition():"top-right"),!_||!_.onAdd)return this.fire(new s.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const o=_.onAdd(this);this._controls.push(_);const f=this._controlPositions[e];return e.indexOf("bottom")!==-1?f.insertBefore(o,f.firstChild):f.appendChild(o),this}removeControl(_){if(!_||!_.onRemove)return this.fire(new s.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const e=this._controls.indexOf(_);return e>-1&&this._controls.splice(e,1),_.onRemove(this),this}hasControl(_){return this._controls.indexOf(_)>-1}calculateCameraOptionsFromTo(_,e,o,f){return f==null&&this.terrain&&(f=this.terrain.getElevationForLngLatZoom(o,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(_,e,o,f)}resize(_,e=!0){const[o,f]=this._containerDimensions(),y=this._getClampedPixelRatio(o,f);if(this._resizeCanvas(o,f,y),this.painter.resize(o,f,y),this.painter.overLimit()){const T=this.painter.context.gl;this._maxCanvasSize=[T.drawingBufferWidth,T.drawingBufferHeight];const P=this._getClampedPixelRatio(o,f);this._resizeCanvas(o,f,P),this.painter.resize(o,f,P)}this._resizeTransform(e);const x=!this._moving;return x&&(this.stop(),this.fire(new s.l("movestart",_)).fire(new s.l("move",_))),this.fire(new s.l("resize",_)),x&&this.fire(new s.l("moveend",_)),this}_resizeTransform(_=!0){var e;const[o,f]=this._containerDimensions();this.transform.resize(o,f,_),(e=this._requestedCameraState)===null||e===void 0||e.resize(o,f,_)}_getClampedPixelRatio(_,e){const{0:o,1:f}=this._maxCanvasSize,y=this.getPixelRatio(),x=_*y,T=e*y;return Math.min(x>o?o/x:1,T>f?f/T:1)*y}getPixelRatio(){var _;return(_=this._overridePixelRatio)!==null&&_!==void 0?_:devicePixelRatio}setPixelRatio(_){this._overridePixelRatio=_,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(_){return this.transform.setMaxBounds(Yr.convert(_)),this._update()}setMinZoom(_){if((_=_??-2)>=-2&&_<=this.transform.maxZoom)return this.transform.setMinZoom(_),this._update(),this.getZoom()<_&&this.setZoom(_),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(_){if((_=_??22)>=this.transform.minZoom)return this.transform.setMaxZoom(_),this._update(),this.getZoom()>_&&this.setZoom(_),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(_){if((_=_??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(_>=0&&_<=this.transform.maxPitch)return this.transform.setMinPitch(_),this._update(),this.getPitch()<_&&this.setPitch(_),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(_){if((_=_??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(_>=this.transform.minPitch)return this.transform.setMaxPitch(_),this._update(),this.getPitch()>_&&this.setPitch(_),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(_){return this.transform.setRenderWorldCopies(_),this._update()}project(_){return this.transform.locationToScreenPoint(s.Q.convert(_),this.style&&this.terrain)}unproject(_){return this.transform.screenPointToLocation(s.P.convert(_),this.terrain)}isMoving(){var _;return this._moving||((_=this.handlers)===null||_===void 0?void 0:_.isMoving())}isZooming(){var _;return this._zooming||((_=this.handlers)===null||_===void 0?void 0:_.isZooming())}isRotating(){var _;return this._rotating||((_=this.handlers)===null||_===void 0?void 0:_.isRotating())}_createDelegatedListener(_,e,o){if(_==="mouseenter"||_==="mouseover"){let f=!1;return{layers:e,listener:o,delegates:{mousemove:x=>{const T=e.filter(C=>this.getLayer(C)),P=T.length!==0?this.queryRenderedFeatures(x.point,{layers:T}):[];P.length?f||(f=!0,o.call(this,new zn(_,this,x.originalEvent,{features:P}))):f=!1},mouseout:()=>{f=!1}}}}if(_==="mouseleave"||_==="mouseout"){let f=!1;return{layers:e,listener:o,delegates:{mousemove:T=>{const P=e.filter(C=>this.getLayer(C));(P.length!==0?this.queryRenderedFeatures(T.point,{layers:P}):[]).length?f=!0:f&&(f=!1,o.call(this,new zn(_,this,T.originalEvent)))},mouseout:T=>{f&&(f=!1,o.call(this,new zn(_,this,T.originalEvent)))}}}}{const f=y=>{const x=e.filter(P=>this.getLayer(P)),T=x.length!==0?this.queryRenderedFeatures(y.point,{layers:x}):[];T.length&&(y.features=T,o.call(this,y),delete y.features)};return{layers:e,listener:o,delegates:{[_]:f}}}}_saveDelegatedListener(_,e){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[_]=this._delegatedListeners[_]||[],this._delegatedListeners[_].push(e)}_removeDelegatedListener(_,e,o){if(!this._delegatedListeners||!this._delegatedListeners[_])return;const f=this._delegatedListeners[_];for(let y=0;y<f.length;y++){const x=f[y];if(x.listener===o&&x.layers.length===e.length&&x.layers.every(T=>e.includes(T))){for(const T in x.delegates)this.off(T,x.delegates[T]);return void f.splice(y,1)}}}on(_,e,o){if(o===void 0)return super.on(_,e);const f=typeof e=="string"?[e]:e,y=this._createDelegatedListener(_,f,o);this._saveDelegatedListener(_,y);for(const x in y.delegates)this.on(x,y.delegates[x]);return{unsubscribe:()=>{this._removeDelegatedListener(_,f,o)}}}once(_,e,o){if(o===void 0)return super.once(_,e);const f=typeof e=="string"?[e]:e,y=this._createDelegatedListener(_,f,o);for(const x in y.delegates){const T=y.delegates[x];y.delegates[x]=(...P)=>{this._removeDelegatedListener(_,f,o),T(...P)}}this._saveDelegatedListener(_,y);for(const x in y.delegates)this.once(x,y.delegates[x]);return this}off(_,e,o){return o===void 0?super.off(_,e):(this._removeDelegatedListener(_,typeof e=="string"?[e]:e,o),this)}queryRenderedFeatures(_,e){if(!this.style)return[];let o;const f=_ instanceof s.P||Array.isArray(_),y=f?_:[[0,0],[this.transform.width,this.transform.height]];if(e=e||(f?{}:_)||{},y instanceof s.P||typeof y[0]=="number")o=[s.P.convert(y)];else{const x=s.P.convert(y[0]),T=s.P.convert(y[1]);o=[x,new s.P(T.x,x.y),T,new s.P(x.x,T.y),x]}return this.style.queryRenderedFeatures(o,e,this.transform)}querySourceFeatures(_,e){return this.style.querySourceFeatures(_,e)}setStyle(_,e){return(e=s.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},e)).diff!==!1&&e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&_?(this._diffStyle(_,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._updateStyle(_,e))}setTransformRequest(_){return this._requestManager.setTransformRequest(_),this}_getUIString(_){const e=this._locale[_];if(e==null)throw new Error(`Missing UI string '${_}'`);return e}_updateStyle(_,e){var o,f;if(e.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(_,e));const y=this.style&&e.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!_)),_?(this.style=new Mh(this,e||{}),this.style.setEventedParent(this,{style:this.style}),typeof _=="string"?this.style.loadURL(_,e,y):this.style.loadJSON(_,e,y),this):((f=(o=this.style)===null||o===void 0?void 0:o.projection)===null||f===void 0||f.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Mh(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(_,e){if(typeof _=="string"){const o=this._requestManager.transformRequest(_,"Style");s.j(o,new AbortController).then(f=>{this._updateDiff(f.data,e)}).catch(f=>{f&&this.fire(new s.k(f))})}else typeof _=="object"&&this._updateDiff(_,e)}_updateDiff(_,e){try{this.style.setState(_,e)&&this._update(!0)}catch(o){s.w(`Unable to perform style diff: ${o.message||o.error||o}. Rebuilding the style from scratch.`),this._updateStyle(_,e)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():s.w("There is no style added to the map.")}addSource(_,e){return this._lazyInitEmptyStyle(),this.style.addSource(_,e),this._update(!0)}isSourceLoaded(_){const e=this.style&&this.style.sourceCaches[_];if(e!==void 0)return e.loaded();this.fire(new s.k(new Error(`There is no source with ID '${_}'`)))}setTerrain(_){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),_){const e=this.style.sourceCaches[_.source];if(!e)throw new Error(`cannot load terrain, because there exists no source with ID: ${_.source}`);this.terrain===null&&e.reload();for(const o in this.style._layers){const f=this.style._layers[o];f.type==="hillshade"&&f.source===_.source&&s.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new ru(this.painter,e,_),this.painter.renderToTexture=new ju(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=o=>{var f;o.dataType==="style"?this.terrain.sourceCache.freeRtt():o.dataType==="source"&&o.tile&&(o.sourceId!==_.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((f=o.source)===null||f===void 0?void 0:f.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(o.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new s.l("terrain",{terrain:_})),this}getTerrain(){var _,e;return(e=(_=this.terrain)===null||_===void 0?void 0:_.options)!==null&&e!==void 0?e:null}areTilesLoaded(){const _=this.style&&this.style.sourceCaches;for(const e in _){const o=_[e]._tiles;for(const f in o){const y=o[f];if(y.state!=="loaded"&&y.state!=="errored")return!1}}return!0}removeSource(_){return this.style.removeSource(_),this._update(!0)}getSource(_){return this.style.getSource(_)}setSourceTileLodParams(_,e,o){if(o){const f=this.getSource(o);if(!f)throw new Error(`There is no source with ID "${o}", cannot set LOD parameters`);f.calculateTileZoom=Ve(Math.max(1,_),Math.max(1,e))}else for(const f in this.style.sourceCaches)this.style.sourceCaches[f].getSource().calculateTileZoom=Ve(Math.max(1,_),Math.max(1,e));return this._update(!0),this}refreshTiles(_,e){const o=this.style.sourceCaches[_];if(!o)throw new Error(`There is no source cache with ID "${_}", cannot refresh tile`);e===void 0?o.reload():o.refreshTiles(e.map(f=>new s.a1(f.z,f.x,f.y)))}addImage(_,e,o={}){const{pixelRatio:f=1,sdf:y=!1,stretchX:x,stretchY:T,content:P,textFitWidth:C,textFitHeight:L}=o;if(this._lazyInitEmptyStyle(),!(e instanceof HTMLImageElement||s.b(e))){if(e.width===void 0||e.height===void 0)return this.fire(new s.k(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:N,height:B,data:j}=e,K=e;return this.style.addImage(_,{data:new s.R({width:N,height:B},new Uint8Array(j)),pixelRatio:f,stretchX:x,stretchY:T,content:P,textFitWidth:C,textFitHeight:L,sdf:y,version:0,userImage:K}),K.onAdd&&K.onAdd(this,_),this}}{const{width:N,height:B,data:j}=D.getImageData(e);this.style.addImage(_,{data:new s.R({width:N,height:B},j),pixelRatio:f,stretchX:x,stretchY:T,content:P,textFitWidth:C,textFitHeight:L,sdf:y,version:0})}}updateImage(_,e){const o=this.style.getImage(_);if(!o)return this.fire(new s.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const f=e instanceof HTMLImageElement||s.b(e)?D.getImageData(e):e,{width:y,height:x,data:T}=f;if(y===void 0||x===void 0)return this.fire(new s.k(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(y!==o.data.width||x!==o.data.height)return this.fire(new s.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const P=!(e instanceof HTMLImageElement||s.b(e));return o.data.replace(T,P),this.style.updateImage(_,o),this}getImage(_){return this.style.getImage(_)}hasImage(_){return _?!!this.style.getImage(_):(this.fire(new s.k(new Error("Missing required image id"))),!1)}removeImage(_){this.style.removeImage(_)}loadImage(_){return fe.getImage(this._requestManager.transformRequest(_,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(_,e){return this._lazyInitEmptyStyle(),this.style.addLayer(_,e),this._update(!0)}moveLayer(_,e){return this.style.moveLayer(_,e),this._update(!0)}removeLayer(_){return this.style.removeLayer(_),this._update(!0)}getLayer(_){return this.style.getLayer(_)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(_,e,o){return this.style.setLayerZoomRange(_,e,o),this._update(!0)}setFilter(_,e,o={}){return this.style.setFilter(_,e,o),this._update(!0)}getFilter(_){return this.style.getFilter(_)}setPaintProperty(_,e,o,f={}){return this.style.setPaintProperty(_,e,o,f),this._update(!0)}getPaintProperty(_,e){return this.style.getPaintProperty(_,e)}setLayoutProperty(_,e,o,f={}){return this.style.setLayoutProperty(_,e,o,f),this._update(!0)}getLayoutProperty(_,e){return this.style.getLayoutProperty(_,e)}setGlyphs(_,e={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(_,e),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(_,e,o={}){return this._lazyInitEmptyStyle(),this.style.addSprite(_,e,o,f=>{f||this._update(!0)}),this}removeSprite(_){return this._lazyInitEmptyStyle(),this.style.removeSprite(_),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(_,e={}){return this._lazyInitEmptyStyle(),this.style.setSprite(_,e,o=>{o||this._update(!0)}),this}setLight(_,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(_,e),this._update(!0)}getLight(){return this.style.getLight()}setSky(_,e={}){return this._lazyInitEmptyStyle(),this.style.setSky(_,e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(_,e){return this.style.setFeatureState(_,e),this._update()}removeFeatureState(_,e){return this.style.removeFeatureState(_,e),this._update()}getFeatureState(_){return this.style.getFeatureState(_)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let _=0,e=0;return this._container&&(_=this._container.clientWidth||400,e=this._container.clientHeight||300),[_,e]}_setupContainer(){const _=this._container;_.classList.add("maplibregl-map");const e=this._canvasContainer=V.create("div","maplibregl-canvas-container",_);this._interactive&&e.classList.add("maplibregl-interactive"),this._canvas=V.create("canvas","maplibregl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","regi
807on");const o=this._containerDimensions(),f=this._getClampedPixelRatio(o[0],o[1]);this._resizeCanvas(o[0],o[1],f);const y=this._controlContainer=V.create("div","maplibregl-control-container",_),x=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(T=>{x[T]=V.create("div",`maplibregl-ctrl-${T} `,y)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(_,e,o){this._canvas.width=Math.floor(o*_),this._canvas.height=Math.floor(o*e),this._canvas.style.width=`${_}px`,this._canvas.style.height=`${e}px`}_setupPainter(){const _=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let e=null;this._canvas.addEventListener("webglcontextcreationerror",f=>{e={requestedAttributes:_},f&&(e.statusMessage=f.statusMessage,e.type=f.type)},{once:!0});let o=null;if(o=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,_):this._canvas.getContext("webgl2",_)||this._canvas.getContext("webgl",_),!o){const f="Failed to initialize WebGL";throw e?(e.message=f,new Error(JSON.stringify(e))):new Error(f)}this.painter=new Ic(o,this.transform),F.testSupport(o)}migrateProjection(_,e){super.migrateProjection(_,e),this.painter.transform=_,this.fire(new s.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(_){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||_,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(_){return this._update(),this._renderTaskQueue.add(_)}_cancelRenderFrame(_){this._renderTaskQueue.remove(_)}_render(_){var e,o,f,y,x;const T=this._idleTriggered?this._fadeDuration:0,P=((e=this.style.projection)===null||e===void 0?void 0:e.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(_),this._removed)return;let C=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const B=this.transform.zoom,j=D.now();this.style.zoomHistory.update(B,j);const K=new s.C(B,{now:j,fadeDuration:T,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),ee=K.crossFadingFactor();ee===1&&ee===this._crossFadingFactor||(C=!0,this._crossFadingFactor=ee),this.style.update(K)}const L=((o=this.style.projection)===null||o===void 0?void 0:o.transitionState)>0!==P;(f=this.style.projection)===null||f===void 0||f.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((y=this.style.projection)===null||y===void 0?void 0:y.transitionState,(x=this.style.projection)===null||x===void 0?void 0:x.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||L)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,T,this._crossSourceCollisions,L),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:T,showPadding:this.showPadding}),this.fire(new s.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,s.cn.mark(s.co.load),this.fire(new s.l("load"))),this.style&&(this.style.hasTransitions()||C)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const N=this._sourcesDirty||this._styleDirty||this._placementDirty;return N||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new s.l("idle")),!this._loaded||this._fullyLoaded||N||(this._fullyLoaded=!0,s.cn.mark(s.co.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var _;this._hash&&this._hash.remove();for(const o of this._controls)o.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),fe.removeThrottleControl(this._imageQueueHandle),(_=this._resizeObserver)===null||_===void 0||_.disconnect();const e=this.painter.context.gl.getExtension("WEBGL_lose_context");e!=null&&e.loseContext&&e.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),V.remove(this._canvasContainer),V.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),s.cn.clearMetrics(),this._removed=!0,this.fire(new s.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,D.frame(this._frameRequest,_=>{s.cn.frame(_),this._frameRequest=null;try{this._render(_)}catch(e){if(!s.cp(e)&&!function(o){return o.message===as}(e))throw e}},()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(_){this._showTileBoundaries!==_&&(this._showTileBoundaries=_,this._update())}get showPadding(){return!!this._showPadding}set showPadding(_){this._showPadding!==_&&(this._showPadding=_,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(_){this._showCollisionBoxes!==_&&(this._showCollisionBoxes=_,_?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(_){this._showOverdrawInspector!==_&&(this._showOverdrawInspector=_,this._update())}get repaint(){return!!this._repaint}set repaint(_){this._repaint!==_&&(this._repaint=_,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(_){this._vertices=_,this._update()}get version(){return ir}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(_){return this._lazyInitEmptyStyle(),this.style.setProjection(_),this._update(!0)}}
vendor: 8,699 bytes, line 807
807,g.MapMouseEvent=zn,g.MapTouchEvent=ls,g.MapWheelEvent=Es,g.Marker=Fa,g.NavigationControl=class{constructor(_){this._updateZoomButtons=()=>{const e=this._map.getZoom(),o=e===this._map.getMaxZoom(),f=e===this._map.getMinZoom();this._zoomInButton.disabled=o,this._zoomOutButton.disabled=f,this._zoomInButton.setAttribute("aria-disabled",o.toString()),this._zoomOutButton.setAttribute("aria-disabled",f.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,o)=>{const f=this._map._getUIString(`NavigationControl.${o}`);e.title=f,e.setAttribute("aria-label",f)},this.options=s.e({},nu,_),this._container=V.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),V.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),V.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=V.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(_){return this._map=_,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.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Mo(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.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(_,e){const o=V.create("button",_,this._container);return o.type="button",o.addEventListener("click",e),o}},g.Popup=class extends s.E{constructor(_){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:void 0)},this.remove=()=>(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),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new s.l("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=V.create("div","maplibregl-popup",this._map.getContainer()),this._tip=V.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const T of this.options.className.split(" "))this._container.classList.add(T);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Bu(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!e)return;const o=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let f=this.options.anchor;const y=da(this.options.offset);if(!f){const T=this._container.offsetWidth,P=this._container.offsetHeight;let C;C=o.y+y.bottom.y<P?["top"]:o.y>this._map.transform.height-P?["bottom"]:[],o.x<T/2?C.push("left"):o.x>this._map.transform.width-T/2&&C.push("right"),f=C.length===0?"bottom":C.join("-")}let x=o.add(y[f]);this.options.subpixelPositioning||(x=x.round()),V.setTransform(this._container,`${ca[f]} translate(${x.x}px,${x.y}px)`),kc(this._container,f,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=s.e(Object.create($u),_)}addTo(_){return this._map&&this.remove(),this._map=_,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"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new s.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(_){return this._lngLat=s.Q.convert(_),this._pos=null,this._flatPos=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"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=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"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(_){return this.setDOMContent(document.createTextNode(_))}setHTML(_){const e=document.createDocumentFragment(),o=document.createElement("body");let f;for(o.innerHTML=_;f=o.firstChild,f;)e.appendChild(f);return this.setDOMContent(e)}getMaxWidth(){var _;return(_=this._container)===null||_===void 0?void 0:_.style.maxWidth}setMaxWidth(_){return this.options.maxWidth=_,this._update(),this}setDOMContent(_){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",this._container);return this._content.appendChild(_),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(_){return this._container&&this._container.classList.add(_),this}removeClassName(_){return this._container&&this._container.classList.remove(_),this}setOffset(_){return this.options.offset=_,this._update(),this}toggleClassName(_){if(this._container)return this._container.classList.toggle(_)}setSubpixelPositioning(_){this.options.subpixelPositioning=_}_createCloseButton(){this.options.closeButton&&(this._closeButton=V.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const _=this._container.querySelector(Dc);_&&_.focus()}}
807,g.RasterDEMTileSource=_i,g.RasterTileSource=hr,g.ScaleControl=class{constructor(_){this._onMove=()=>{Ea(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Ea(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},iu),_)}getDefaultPosition(){return"bottom-left"}onAdd(_){return this._map=_,this._container=V.create("div","maplibregl-ctrl maplibregl-ctrl-scale",_.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}},g.ScrollZoomHandler=pr,g.Style=Mh,g.TerrainControl=class{constructor(_){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=_}onAdd(_){return this._map=_,this._container=V.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=V.create("button","maplibregl-ctrl-terrain",this._container),V.create("span","maplibregl-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}},g.TwoFingersTouchPitchHandler=hl,g.TwoFingersTouchRotateHandler=Xt,g.TwoFingersTouchZoomHandler=Ta,g.TwoFingersTouchZoomRotateHandler=qi,g.VectorTileSource=ri,g.VideoSource=an,g.addSourceType=(_,e)=>s._(void 0,void 0,void 0,function*(){if(In(_))throw new Error(`A source type called "${_}" already exists.`);((o,f)=>{Fr[o]=f})(_,e)}),g.clearPrewarmedResources=function(){const _=Ht;_&&(_.isPreloaded()&&_.numActive()===1?(_.release(Ue),Ht=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()"))},g.createTileMesh=po,g.getMaxParallelImageRequests=function(){return s.a.MAX_PARALLEL_IMAGE_REQUESTS},g.getRTLTextPluginStatus=function(){return mn().getRTLTextPluginStatus()},g.getVersion=function(){return Is},g.getWorkerCount=function(){return pt.workerCount},g.getWorkerUrl=function(){return s.a.WORKER_URL},g.importScriptInWorkers=function(_){return fr().broadcast("IS",_)},g.prewarm=function(){rr().acquire(Ue)},g.setMaxParallelImageRequests=function(_){s.a.MAX_PARALLEL_IMAGE_REQUESTS=_},g.setRTLTextPlugin=function(_,e){return mn().setRTLTextPlugin(_,e)},g.setWorkerCount=function(_){pt.workerCount=_},g.setWorkerUrl=function(_){s.a.WORKER_URL=_}});var m=i;return m})}(Ey)),Ey.exports}var R3=D3();const El=Aa(R3),GI=()=>{const n=de.useRef(null),t=de.useRef(null),[i,a]=de.useState([]);return de.useEffect(()=>{(async()=>{const{data:m,error:g}=await Ur.from("events").select("*");g?console.error("Error fetching events:",g.message):a(m)})()},[]),de.useEffect(()=>(t.current=new El.Map({container:n.current,style:"https://tiles.openfreemap.org/styles/liberty",center:[-84.2806,30.4382],zoom:11}),t.current.addControl(new El.NavigationControl,"top-right"),()=>t.current.remove()),[]),de.useEffect(()=>{!t.current||i.length===0||i.forEach(({id:h,longitude:m,latitude:g,event_title:s,organization:Y,event_type:E,start:I,end:k,info_url:D})=>{if(!m||!g)return;const V=new El.Popup({offset:25}).setHTML(` 808 <div style=" 809 color: #1f2937; /* dark text for readability */ 810 font-family: 'Inter', sans-serif; 811 font-size: 14px; 812 line-height: 1.5; 813 padding: 8px; 814 "> 815 <h4 style="margin:0 0 6px 0; font-size:16px; font-weight:600;"> 816 ${s} 817 </h4> 818 <p style="margin:2px 0;"><strong>Org:</strong> ${Y}</p> 819 <p style="margin:2px 0;"><strong>Type:</strong> ${E}</p> 820 <p style="margin:2px 0;"> 821 <strong>Time:</strong> ${ys(I,g,m)} â ${ys(k,g,m)} 822 </p> 823 <a href="/event/${h}" style="color:#0a74da; text-decoration:underline;">
823Details</a> 824 </div> 825 `);new El.Marker().setLngLat([m,g]).setPopup(V).addTo(t.current)})},[i]),O.jsx("div",{ref:n,style:{width:"100%",height:"500px"}})};function lc(n){"@babel/helpers - typeof";return lc=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},lc(n)}function L3(n,t){if(lc(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var a=i.call(n,t);if(lc(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function qI(n){var t=L3(n,"string");return lc(t)=="symbol"?t:t+""}function Ed(n,t,i){return(t=qI(t))in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function bT(n,t){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);t&&(a=a.filter(function(h){return Object.getOwnPropertyDescriptor(n,h).enumerable})),i.push.apply(i,a)}return i}function Pn(n){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?bT(Object(i),!0).forEach(function(a){Ed(n,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):bT(Object(i)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(i,a))})}return n}function gv(n,t){if(n==null)return{};var i={};for(var a in n)if({}.hasOwnProperty.call(n,a)){if(t.indexOf(a)!==-1)continue;i[a]=n[a]}return i}function xu(n,t){if(n==null)return{};var i,a,h=gv(n,t);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(n);for(a=0;a<m.length;a++)i=m[a],t.indexOf(i)===-1&&{}.propertyIsEnumerable.call(n,i)&&(h[i]=n[i])}return h}function na(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function wT(n,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,qI(a.key),a)}}function ia(n,t,i){return t&&wT(n.prototype,t),i&&wT(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function Hy(n){return Hy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hy(n)}function HI(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(HI=function(){return!!n})()}function O3(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function X3(n,t){if(t&&(lc(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O3(n)}function es(n,t,i){return t=Hy(t),X3(n,HI()?Reflect.construct(t,i||[],Hy(n).constructor):t.apply(n,i))}function Ky(n,t){return Ky=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},Ky(n,t)}function ts(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&Ky(n,t)}function KI(n){if(Array.isArray(n))return n}function N3(n,t){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var a,h,m,g,s=[],Y=!0,E=!1;try{if(m=(i=i.call(n)).next,t!==0)for(;!(Y=(a=m.call(i)).done)&&(s.push(a.value),s.length!==t);Y=!0);}catch(I){E=!0,h=I}finally{try{if(!Y&&i.return!=null&&(g=i.return(),Object(g)!==g))return}finally{if(E)throw h}}return s}}function Ow(n,t){(t==null||t>n.length)&&(t=n.length);for(var i=0,a=Array(t);i<t;i++)a[i]=n[i];return a}function _Y(n,t){if(n){if(typeof n=="string")return Ow(n,t);var i={}.toString.call(n).slice(8,-1);return i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set"?Array.from(n):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ow(n,t):void 0}}
825function QI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 826In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cd(n,t){return KI(n)||N3(n,t)||_Y(n,t)||QI()}function JI(n){var t,i,a="";if(typeof n=="string"||typeof n=="number")a+=n;else if(typeof n=="object")if(Array.isArray(n))for(t=0;t<n.length;t++)n[t]&&(i=JI(n[t]))&&(a&&(a+=" "),a+=i);else for(t in n)n[t]&&(a&&(a+=" "),a+=t);return a}function vi(){for(var n,t,i=0,a="";i<arguments.length;)(n=arguments[i++])&&(t=JI(n))&&(a&&(a+=" "),a+=t);return a}function yi(){return yi=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var a in i)({}).hasOwnProperty.call(i,a)&&(n[a]=i[a])}return n},yi.apply(null,arguments)}var C_,YT;function z3(){if(YT)return C_;YT=1;var n=function(t,i,a,h,m,g,s,Y){if(!t){var E;if(i===void 0)E=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var I=[a,h,m,g,s,Y],k=0;E=new Error(i.replace(/%s/g,function(){return I[k++]})),E.name="Invariant Violation"}throw E.framesToPop=1,E}};return C_=n,C_}var F3=z3();const qm=Aa(F3);var Z3=function(){};function j3(n,t){var i={};return Object.keys(n).forEach(function(a){i[My(a)]=Z3}),i}function ST(n,t){return n[t]!==void 0}function My(n){return"default"+n.charAt(0).toUpperCase()+n.substr(1)}function B3(n){return!!n&&(typeof n!="function"||n.prototype&&n.prototype.isReactComponent)}function $3(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,Ky(n,t)}function eU(){var n=this.constructor.getDerivedStateFromProps(this.props,this.state);n!=null&&this.setState(n)}function tU(n){function t(i){var a=this.constructor.getDerivedStateFromProps(n,i);return a??null}this.setState(t.bind(this))}function rU(n,t){try{var i=this.props,a=this.state;this.props=n,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(i,a)}finally{this.props=i,this.state=a}}eU.__suppressDeprecationWarning=!0;tU.__suppressDeprecationWarning=!0;rU.__suppressDeprecationWarning=!0;function G3(n){var t=n.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof n.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return n;var i=null,a=null,h=null;if(typeof t.componentWillMount=="function"?i="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(i="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?a="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(a="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?h="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(h="UNSAFE_componentWillUpdate"),i!==null||a!==null||h!==null){var m=n.displayName||n.name,g=typeof n.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. 827 828`+m+" uses "+g+" but also contains the following legacy lifecycles:"+(i!==null?` 829 `+i:"")+(a!==null?` 830 `+a:"")+(h!==null?` 831 `+h:"")+` 832 833The above lifecycles should be removed. Learn more about this warning here: 834https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof n.getDerivedStateFromProps=="function"&&(t.componentWillMount=eU,t.componentWillReceiveProps=tU),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=rU;var s=t.componentDidUpdate;t.componentDidUpdate=function(E,I,k){var D=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:k;s.call(this,E,I,D)}}return n}var q3="/Users/jquense/src/uncontrollable/src/uncontrollable.js";function nU(n,t,i){i===void 0&&(i=[]);var a=n.displayName||n.name||"Component",h=B3(n),m=Object.keys(t),g=m.map(My);h||!i.length||qm(!1);var s=function(E){$3(I,E);function I(){for(var D,V=arguments.length,F=new Array(V),$=0;$<V;$++)F[$]=arguments[$];D=E.call.apply(E,[this].concat(F))||this,D.handlers=Object.create(null),m.forEach(function(ae){var le=t[ae],_e=function(We){if(D.props[le]){var se;D._notifying=!0;for(var De=arguments.length,ze=new Array(De>1?De-1:0),je=1;je<De;je++)ze[je-1]=arguments[je];(se=D.props)[le].apply(se,[We].concat(ze)),D._notifying=!1}D.unmounted||D.setState(function(ft){var ot,st=ft.values;return{values:yi(Object.create(null),st,(ot={},ot[ae]=We,ot))}})};D.handlers[le]=_e}
834),i.length&&(D.attachRef=function(ae){D.inner=ae});var Q=Object.create(null);return m.forEach(function(ae){Q[ae]=D.props[My(ae)]}),D.state={values:Q,prevProps:{}},D}var k=I.prototype;return k.shouldComponentUpdate=function(){return!this._notifying},I.getDerivedStateFromProps=function(V,F){var $=F.values,Q=F.prevProps,ae={values:yi(Object.create(null),$),prevProps:{}};return m.forEach(function(le){ae.prevProps[le]=V[le],!ST(V,le)&&ST(Q,le)&&(ae.values[le]=V[My(le)])}),ae},k.componentWillUnmount=function(){this.unmounted=!0},k.render=function(){var V=this,F=this.props,$=F.innerRef,Q=gv(F,["innerRef"]);g.forEach(function(le){delete Q[le]});var ae={};return m.forEach(function(le){var _e=V.props[le];ae[le]=_e!==void 0?_e:V.state.values[le]}),qe.createElement(n,yi({},Q,ae,this.handlers,{ref:$||this.attachRef}))},I}(qe.Component);G3(s),s.displayName="Uncontrolled("+a+")",s.propTypes=yi({innerRef:function(){}},j3(t)),i.forEach(function(E){s.prototype[E]=function(){var k;return(k=this.inner)[E].apply(k,arguments)}});var Y=s;return qe.forwardRef&&(Y=qe.forwardRef(function(E,I){return qe.createElement(s,yi({},E,{innerRef:I,__source:{fileName:q3,lineNumber:128},__self:this}))}),Y.propTypes=s.propTypes),Y.ControlledComponent=n,Y.deferControlTo=function(E,I,k){return I===void 0&&(I={}),nU(E,yi({},t,I),k)},Y}var V_={exports:{}},A_,TT;function H3(){if(TT)return A_;TT=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return A_=n,A_}var k_,WT;function K3(){if(WT)return k_;WT=1;var n=H3();function t(){}function i(){}return i.resetWarningCache=t,k_=function(){function a(g,s,Y,E,I,k){if(k!==n){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}}a.isRequired=a;function h(){return a}var m={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:h,element:a,elementType:a,instanceOf:h,node:a,objectOf:h,oneOf:h,oneOfType:h,shape:h,exact:h,checkPropTypes:i,resetWarningCache:t};return m.PropTypes=m,m},k_}var ET;function Q3(){return ET||(ET=1,V_.exports=K3()()),V_.exports}var J3=Q3();const Nt=Aa(J3);var Qy="milliseconds",Hm="seconds",Km="minutes",Qm="hours",Vd="day",sp="week",Jm="month",Ad="year",kd="decade",Dd="century",iU={milliseconds:1,seconds:1e3,minutes:60*1e3,hours:60*60*1e3,day:24*60*60*1e3,week:7*24*60*60*1e3},eO={month:1,year:12,decade:10*12,century:100*12};function tO(n){return[31,rO(n),31,30,31,30,31,31,30,31,30,31]}function rO(n){return n%4===0&&n%100!==0||n%400===0?29:28}function Pl(n,t,i){switch(n=new Date(n),i){case Qy:case Hm:case Km:case Qm:case Vd:case sp:return nO(n,t*iU[i]);case Jm:case Ad:case kd:case Dd:return iO(n,t*eO[i])}throw new TypeError('Invalid units: "'+i+'"')}function nO(n,t){var i=new Date(+n+t);return aO(n,i)}function iO(n,t){var i=n.getFullYear(),a=n.getMonth(),h=n.getDate(),m=i*12+a+t,g=Math.trunc(m/12),s=m%12,Y=Math.min(h,tO(g)[s]),E=new Date(n);return E.setFullYear(g),E.setDate(1),E.setMonth(s),E.setDate(Y),E}function aO(n,t){var i=n.getTimezoneOffset(),a=t.getTimezoneOffset(),h=a-i;return new Date(+t+h*iU.minutes)}function eg(n,t,i){return Pl(n,-t,i)}function Va(n,t,i){switch(n=new Date(n),t){case Dd:case kd:case Ad:n=ev(n,0);case Jm:n=uU(n,1);case sp:case Vd:n=ng(n,0);case Qm:n=op(n,0);case Km:n=rg(n,0);case Hm:n=tg(n,0)}return t===kd&&(n=eg(n,Rd(n)%10,"year")),t===Dd&&(n=eg(n,Rd(n)%100,"year")),t===sp&&(n=cU(n,0,i)),n}function Jy(n,t,i){switch(n=new Date(n),n=Va(n,t,i),t){case Dd:case kd:case Ad:case Jm:case sp:n=Pl(n,1,t),n=eg(n,1,Vd),n.setHours(23,59,59,999);break;case Vd:n.setHours(23,59,59,999);break;case Qm:case Km:case Hm:n=Pl(n,1,t),n=eg(n,1,Qy)}return n}var _p=bp(function(n,t){return n===t}),xY=bp(function(n,t){return n!==t}),yv=bp(function(n,t){return n>t}),yg=bp(function(n,t){return n>=t}),bY=bp(function(n,t){return n<t}),xp=bp(function(n,t){return n<=t});function aU(){return new Date(Math.min.apply(Math,arguments))}function sU(){return new Date(Math.max.apply(Math,arguments))}function oU(n,t,i,a){return a=a||"day",(!t||yg(n,t,a))&&(!i||xp(n,i,a))}var tg=wh("Milliseconds"),rg=wh("Seconds"),op=wh("Minutes"),ng=wh("Hours"),lU=wh("Day"),uU=wh("Date"),ev=wh("Month"),Rd=wh("FullYear");function sO(n,t){return t===void 0?Rd(Va(n,kd)):Pl(n,t+10,Ad)}function oO(n,t){return t===void 0?Rd(Va(n,Dd)):Pl(n,t+100,Ad)}function cU(n,t,i){var a=(lU(n)+7-(i||0))%7;return t===void 0?a:Pl(n,t-a,Vd)}function lO(n,t,i,a){var h,m,g;switch(i){case Qy:case Hm:case Km:case Qm:case Vd:case sp:h=t.getTime()-n.getTime();break;case Jm:case Ad:case kd:case Dd:h=(Rd(t)-Rd(n))*12+ev(t)-ev(n);break;default:throw new TypeError('Invalid units: "'+i+'"')}switch(i){case Qy:m=1;break;case Hm:m=1e3;break;case Km:m=1e3*60;break;case Qm:m=1e3*60*60;break;case Vd:m=1e3*60*60*24;break;case sp:m=1e3*60*60*24*7;break;case Jm:m=1;break;case Ad:m=12;break;case kd:m=120;break;case Dd:m=1200;break;default:throw new TypeError('Invalid units: "'+i+'"')}return g=h/m,a?g:Math.round(g)}function wh(n){var t=function(i){switch(i){case"Milliseconds":return 36e5;case"Seconds":return 3600;case"Minutes":return 60;case"Hours":return 1;default:return null}}(n);return function(i,a){if(a===void 0)return i["get"+n]();var h=new Date(i);return h["set"+n](a),t&&h["get"+n]()!=a&&(n==="Hours"||a>=t&&h.getHours()-i.getHours()<Math.floor(a/t))&&h["set"+n](a+t),h}}function bp(n){return function(t,i,a){return n(+Va(t,a),+Va(i,a))}}const MT=Object.freeze(Object.defineProperty({__proto__:null,add:Pl,century:oO,date:uU,day:lU,decade:sO,diff:lO,endOf:Jy,eq:_p,gt:yv,gte:yg,hours:ng,inRange:oU,lt:bY,lte:xp,max:sU,milliseconds:tg,min:aU,minutes:op,month:ev,neq:xY,seconds:rg,startOf:Va,subtract:eg,weekday:cU,year:Rd},Symbol.toStringTag,{value:"Module"}));function uO(n){if(Array.isArray(n))return Ow(n)}function hU(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function cO(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 835In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Py(n){return uO(n)||hU(n)||_Y(n)||cO()}var D_,PT;function dU(){if(PT)return D_;PT=1;function n(t,i,a){var h=-1,m=t.length;i<0&&(i=-i>m?0:m+i),a=a>m?m:a,a<0&&(a+=m),m=i>a?0:a-i>>>0,i>>>=0;for(var g=Array(m);++h<m;)g[h]=t[h+i];return g}return D_=n,D_}var R_,IT;function vg(){if(IT)return R_;
vendor: 1,435 bytes, line 835
835IT=1;function n(t,i){return t===i||t!==t&&i!==i}return R_=n,R_}var L_,UT;function fU(){if(UT)return L_;UT=1;var n=typeof ry=="object"&&ry&&ry.Object===Object&&ry;return L_=n,L_}var O_,CT;function bu(){if(CT)return O_;CT=1;var n=fU(),t=typeof self=="object"&&self&&self.Object===Object&&self,i=n||t||Function("return this")();return O_=i,O_}var X_,VT;function wp(){if(VT)return X_;VT=1;var n=bu(),t=n.Symbol;return X_=t,X_}var N_,AT;function hO(){if(AT)return N_;AT=1;var n=wp(),t=Object.prototype,i=t.hasOwnProperty,a=t.toString,h=n?n.toStringTag:void 0;function m(g){var s=i.call(g,h),Y=g[h];try{g[h]=void 0;var E=!0}catch{}var I=a.call(g);return E&&(s?g[h]=Y:delete g[h]),I}return N_=m,N_}var z_,kT;function dO(){if(kT)return z_;kT=1;var n=Object.prototype,t=n.toString;function i(a){return t.call(a)}return z_=i,z_}var F_,DT;function Yp(){if(DT)return F_;DT=1;var n=wp(),t=hO(),i=dO(),a="[object Null]",h="[object Undefined]",m=n?n.toStringTag:void 0;function g(s){return s==null?s===void 0?h:a:m&&m in Object(s)?t(s):i(s)}return F_=g,F_}var Z_,RT;function cc(){if(RT)return Z_;RT=1;function n(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}return Z_=n,Z_}var j_,LT;function wY(){if(LT)return j_;LT=1;var n=Yp(),t=cc(),i="[object AsyncFunction]",a="[object Function]",h="[object GeneratorFunction]",m="[object Proxy]";function g(s){if(!t(s))return!1;var Y=n(s);return Y==a||Y==h||Y==i||Y==m}return j_=g,j_}var B_,OT;
835function YY(){if(OT)return B_;OT=1;var n=9007199254740991;function t(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}return B_=t,B_}var $_,XT;function _g(){if(XT)return $_;XT=1;var n=wY(),t=YY();function i(a){return a!=null&&t(a.length)&&!n(a)}return $_=i,$_}var G_,NT;function SY(){if(NT)return G_;NT=1;var n=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function i(a,h){var m=typeof a;return h=h??n,!!h&&(m=="number"||m!="symbol"&&t.test(a))&&a>-1&&a%1==0&&a<h}return G_=i,G_}var q_,zT;function vv(){if(zT)return q_;zT=1;var n=vg(),t=_g(),i=SY(),a=cc();function h(m,g,s){if(!a(s))return!1;var Y=typeof g;return(Y=="number"?t(s)&&i(g,s.length):Y=="string"&&g in s)?n(s[g],m):!1}return q_=h,q_}var H_,FT;function fO(){if(FT)return H_;FT=1;var n=/\s/;function t(i){for(var a=i.length;a--&&n.test(i.charAt(a)););return a}return H_=t,H_}var K_,ZT;function pO(){if(ZT)return K_;ZT=1;var n=fO(),t=/^\s+/;function i(a){return a&&a.slice(0,n(a)+1).replace(t,"")}return K_=i,K_}var Q_,jT;function Yh(){if(jT)return Q_;jT=1;function n(t){return t!=null&&typeof t=="object"}return Q_=n,Q_}var J_,BT;function xg(){if(BT)return J_;BT=1;var n=Yp(),t=Yh(),i="[object Symbol]";function a(h){return typeof h=="symbol"||t(h)&&n(h)==i}return J_=a,J_}var e0,$T;function mO(){if($T)return e0;$T=1;var n=pO(),t=cc(),i=xg(),a=NaN,h=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,g=/^0o[0-7]+$/i,s=parseInt;function Y(E){if(typeof E=="number")return E;if(i(E))return a;if(t(E)){var I=typeof E.valueOf=="function"?E.valueOf():E;E=t(I)?I+"":I}if(typeof E!="string")return E===0?E:+E;E=n(E);var k=m.test(E);return k||g.test(E)?s(E.slice(2),k?2:8):h.test(E)?a:+E}return e0=Y,e0}var t0,GT;function pU(){if(GT)return t0;GT=1;var n=mO(),t=1/0,i=17976931348623157e292;function a(h){if(!h)return h===0?h:0;if(h=n(h),h===t||h===-1/0){var m=h<0?-1:1;return m*i}return h===h?h:0}return t0=a,t0}var r0,qT;function mU(){if(qT)return r0;qT=1;var n=pU();function t(i){var a=n(i),h=a%1;return a===a?h?a-h:a:0}return r0=t,r0}var n0,HT;function gO(){if(HT)return n0;HT=1;var n=dU(),t=vv(),i=mU(),a=Math.ceil,h=Math.max;function m(g,s,Y){(Y?t(g,s,Y):s===void 0)?s=1:s=h(i(s),0);var E=g==null?0:g.length;if(!E||s<1)return[];for(var I=0,k=0,D=Array(a(E/s));I<E;)D[k++]=n(g,I,I+=s);return D}return n0=m,n0}var yO=gO();const vO=Aa(yO);function bg(n){return n&&n.ownerDocument||document}function _O(n){var t=bg(n);return t&&t.defaultView||window}function xO(n,t){return _O(n).getComputedStyle(n,t)}var bO=/([A-Z])/g;function wO(n){return n.replace(bO,"-$1").toLowerCase()}var YO=/^ms-/;function gy(n){return wO(n).replace(YO,"-ms-")}var SO=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function TO(n){return!!(n&&SO.test(n))}function Kf(n,t){var i="",a="";if(typeof t=="string")return n.style.getPropertyValue(gy(t))||xO(n).getPropertyValue(gy(t));Object.keys(t).forEach(function(h){var m=t[h];!m&&m!==0?n.style.removeProperty(gy(h)):TO(h)?a+=h+"("+m+") ":i+=gy(h)+": "+m+";"}),a&&(i+="transform: "+a+";"),n.style.cssText+=";"+i}function ig(n,t){if(n.contains)return n.contains(t);if(n.compareDocumentPosition)return n===t||!!(n.compareDocumentPosition(t)&16)}function WO(n){return"nodeType"in n&&n.nodeType===document.DOCUMENT_NODE}function TY(n){return"window"in n&&n.window===n?n:WO(n)&&n.defaultView||!1}function gU(n){var t=n==="pageXOffset"?"scrollLeft":"scrollTop";function i(a,h){var m=TY(a);if(h===void 0)return m?m[n]:a[t];m?m.scrollTo(m[n],h):a[t]=h}return i}const yU=gU("pageXOffset"),vU=gU("pageYOffset");function Id(n){var t=bg(n),i={top:0,left:0,height:0,width:0},a=t&&t.documentElement;return!a||!ig(a,n)||(n.getBoundingClientRect!==void 0&&(i=n.getBoundingClientRect()),i={top:i.top+vU(a)-(a.clientTop||0),left:i.left+yU(a)-(a.clientLeft||0),width:i.width,height:i.height}),i}var EO=function(t){return!!t&&"offsetParent"in t};function MO(n){for(var t=bg(n),i=n&&n.offsetParent;EO(i)&&i.nodeName!=="HTML"&&Kf(i,"position")==="static";)i=i.offsetParent;return i||t.documentElement}var PO=function(t){return t.nodeName&&t.nodeName.toLowerCase()};function _U(n,t){var i={top:0,left:0},a;if(Kf(n,"position")==="fixed")a=n.getBoundingClientRect();else{var h=t||MO(n);a=Id(n),PO(h)!=="html"&&(i=Id(h));var m=String(Kf(h,"borderTopWidth")||0);i.top+=parseInt(m,10)-vU(h)||0;var g=String(Kf(h,"borderLeftWidth")||0);i.left+=parseInt(g,10)-yU(h)||0}var s=String(Kf(n,"marginTop")||0),Y=String(Kf(n,"marginLeft")||0);return yi({}
835,a,{top:a.top-i.top-(parseInt(s,10)||0),left:a.left-i.left-(parseInt(Y,10)||0)})}const WY=!!(typeof window<"u"&&window.document&&window.document.createElement);var KT=new Date().getTime();function IO(n){var t=new Date().getTime(),i=Math.max(0,16-(t-KT)),a=setTimeout(n,i);return KT=t,a}var UO=["","webkit","moz","o","ms"],Xw="clearTimeout",Nw=IO,QT=function(t,i){return t+(t?i[0].toUpperCase()+i.substr(1):i)+"AnimationFrame"};WY&&UO.some(function(n){var t=QT(n,"request");return t in window&&(Xw=QT(n,"cancel"),Nw=function(a){return window[t](a)}),!!Nw});var JT=function(t){typeof window[Xw]=="function"&&window[Xw](t)},xU=Nw,i0;function CO(n,t){if(!i0){var i=document.body,a=i.matches||i.matchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector;i0=function(m,g){return a.call(m,g)}}return i0(n,t)}var VO=Function.prototype.bind.call(Function.prototype.call,[].slice);function AO(n,t){return VO(n.querySelectorAll(t))}var zw=!1,Fw=!1;try{var a0={get passive(){return zw=!0},get once(){return Fw=zw=!0}};WY&&(window.addEventListener("test",a0,a0),window.removeEventListener("test",a0,!0))}catch{}function kO(n,t,i,a){if(a&&typeof a!="boolean"&&!Fw){var h=a.once,m=a.capture,g=i;!Fw&&h&&(g=i.__once||function s(Y){this.removeEventListener(t,s,m),i.call(this,Y)},i.__once=g),n.addEventListener(t,g,zw?a:m)}n.addEventListener(t,i,a)}function DO(n){const t=de.useRef(n);return de.useEffect(()=>{t.current=n},[n]),t}function eW(n){const t=DO(n);return de.useCallback(function(...i){return t.current&&t.current(...i)},[t])}function tW(){return de.useState(null)}function RO(){const n=de.useRef(!0),t=de.useRef(()=>n.current);return de.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),t.current}function LO(n){const t=RO();return[n[0],de.useCallback(i=>{if(t())return n[1](i)},[t,n[1]])]}var Os="top",zo="bottom",Fo="right",Xs="left",EY="auto",wg=[Os,zo,Fo,Xs],lp="start",ag="end",OO="clippingParents",bU="viewport",Tm="popper",XO="reference",rW=wg.reduce(function(n,t){return n.concat([t+"-"+lp,t+"-"+ag])},[]),MY=[].concat(wg,[EY]).reduce(function(n,t){return n.concat([t,t+"-"+lp,t+"-"+ag])},[]),NO="beforeRead",zO="read",FO="afterRead",ZO="beforeMain",jO="main",BO="afterMain",$O="beforeWrite",GO="write",qO="afterWrite",HO=[NO,zO,FO,ZO,jO,BO,$O,GO,qO];function vu(n){return n.split("-")[0]}function lo(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function Ld(n){var t=lo(n).Element;return n instanceof t||n instanceof Element}function _u(n){var t=lo(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function PY(n){if(typeof ShadowRoot>"u")return!1;var t=lo(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}var Ud=Math.max,tv=Math.min,up=Math.round;function Zw(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function wU(){return!/^((?!chrome|android).)*safari/i.test(Zw())}function cp(n,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var a=n.getBoundingClientRect(),h=1,m=1;t&&_u(n)&&(h=n.offsetWidth>0&&up(a.width)/n.offsetWidth||1,m=n.offsetHeight>0&&up(a.height)/n.offsetHeight||1);var g=Ld(n)?lo(n):window,s=g.visualViewport,Y=!wU()&&i,E=(a.left+(Y&&s?s.offsetLeft:0))/h,I=(a.top+(Y&&s?s.offsetTop:0))/m,k=a.width/h,D=a.height/m;return{width:k,height:D,top:I,right:E+k,bottom:I+D,left:E,x:E,y:I}}function IY(n){var t=cp(n),i=n.offsetWidth,a=n.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-a)<=1&&(a=t.height),{x:n.offsetLeft,y:n.offsetTop,width:i,height:a}}function YU(n,t){var i=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(i&&PY(i)){var a=t;do{if(a&&n.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function gh(n){return n?(n.nodeName||"").toLowerCase():null}function uc(n){return lo(n).getComputedStyle(n)}function KO(n){return["table","td","th"].indexOf(gh(n))>=0}function Sh(n){return((Ld(n)?n.ownerDocument:n.document)||window.document).documentElement}function _v(n){return gh(n)==="html"?n:n.assignedSlot||n.parentNode||(PY(n)?n.host:null)||Sh(n)}function nW(n){return!_u(n)||uc(n).position==="fixed"?null:n.offsetParent}function QO(n){var t=/firefox/i.test(Zw()),i=/Trident/i.test(Zw());if(i&&_u(n)){var a=uc(n);if(a.position==="fixed")return null}var h=_v(n);for(PY(h)&&(h=h.host);_u(h)&&["html","body"].indexOf(gh(h))<0;){var m=uc(h);if(m.transform!=="none"||m.perspective!=="none"||m.contain==="paint"||["transform","perspective"].indexOf(m.willChange)!==-1||t&&m.willChange==="filter"||t&&m.filter&&m.filter!=="none")return h;h=h.parentNode}return null}function Yg(n){for(var t=lo(n),i=nW(n);i&&KO(i)&&uc(i).position==="static";)i=nW(i);return i&&(gh(i)==="html"||gh(i)==="body"&&uc(i).position==="static")?t:i||QO(n)||t}function UY(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Fm(n,t,i){return Ud(n,tv(t,i))}
vendor: 13,689 bytes, line 835
835function JO(n,t,i){var a=Fm(n,t,i);return a>i?i:a}function SU(){return{top:0,right:0,bottom:0,left:0}}function TU(n){return Object.assign({},SU(),n)}function WU(n,t){return t.reduce(function(i,a){return i[a]=n,i},{})}var e4=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,TU(typeof t!="number"?t:WU(t,wg))};function t4(n){var t,i=n.state,a=n.name,h=n.options,m=i.elements.arrow,g=i.modifiersData.popperOffsets,s=vu(i.placement),Y=UY(s),E=[Xs,Fo].indexOf(s)>=0,I=E?"height":"width";if(!(!m||!g)){var k=e4(h.padding,i),D=IY(m),V=Y==="y"?Os:Xs,F=Y==="y"?zo:Fo,$=i.rects.reference[I]+i.rects.reference[Y]-g[Y]-i.rects.popper[I],Q=g[Y]-i.rects.reference[Y],ae=Yg(m),le=ae?Y==="y"?ae.clientHeight||0:ae.clientWidth||0:0,_e=$/2-Q/2,fe=k[V],We=le-D[I]-k[F],se=le/2-D[I]/2+_e,De=Fm(fe,se,We),ze=Y;i.modifiersData[a]=(t={},t[ze]=De,t.centerOffset=De-se,t)}}function r4(n){var t=n.state,i=n.options,a=i.element,h=a===void 0?"[data-popper-arrow]":a;h!=null&&(typeof h=="string"&&(h=t.elements.popper.querySelector(h),!h)||YU(t.elements.popper,h)&&(t.elements.arrow=h))}const n4={name:"arrow",enabled:!0,phase:"main",fn:t4,effect:r4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function hp(n){return n.split("-")[1]}var i4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function a4(n,t){var i=n.x,a=n.y,h=t.devicePixelRatio||1;return{x:up(i*h)/h||0,y:up(a*h)/h||0}}function iW(n){var t,i=n.popper,a=n.popperRect,h=n.placement,m=n.variation,g=n.offsets,s=n.position,Y=n.gpuAcceleration,E=n.adaptive,I=n.roundOffsets,k=n.isFixed,D=g.x,V=D===void 0?0:D,F=g.y,$=F===void 0?0:F,Q=typeof I=="function"?I({x:V,y:$}):{x:V,y:$};V=Q.x,$=Q.y;var ae=g.hasOwnProperty("x"),le=g.hasOwnProperty("y"),_e=Xs,fe=Os,We=window;if(E){var se=Yg(i),De="clientHeight",ze="clientWidth";if(se===lo(i)&&(se=Sh(i),uc(se).position!=="static"&&s==="absolute"&&(De="scrollHeight",ze="scrollWidth")),se=se,h===Os||(h===Xs||h===Fo)&&m===ag){fe=zo;var je=k&&se===We&&We.visualViewport?We.visualViewport.height:se[De];$-=je-a.height,$*=Y?1:-1}if(h===Xs||(h===Os||h===zo)&&m===ag){_e=Fo;var ft=k&&se===We&&We.visualViewport?We.visualViewport.width:se[ze];V-=ft-a.width,V*=Y?1:-1}}var ot=Object.assign({position:s},E&&i4),st=I===!0?a4({x:V,y:$},lo(i)):{x:V,y:$};if(V=st.x,$=st.y,Y){var rt;return Object.assign({},ot,(rt={},rt[fe]=le?"0":"",rt[_e]=ae?"0":"",rt.transform=(We.devicePixelRatio||1)<=1?"translate("+V+"px, "+$+"px)":"translate3d("+V+"px, "+$+"px, 0)",rt))}return Object.assign({},ot,(t={},t[fe]=le?$+"px":"",t[_e]=ae?V+"px":"",t.transform="",t))}function s4(n){var t=n.state,i=n.options,a=i.gpuAcceleration,h=a===void 0?!0:a,m=i.adaptive,g=m===void 0?!0:m,s=i.roundOffsets,Y=s===void 0?!0:s,E={placement:vu(t.placement),variation:hp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:h,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,iW(Object.assign({},E,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:g,roundOffsets:Y})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,iW(Object.assign({},E,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:Y})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const o4={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:s4,data:{}};var yy={passive:!0};function l4(n){var t=n.state,i=n.instance,a=n.options,h=a.scroll,m=h===void 0?!0:h,g=a.resize,s=g===void 0?!0:g,Y=lo(t.elements.popper),E=[].concat(t.scrollParents.reference,t.scrollParents.popper);return m&&E.forEach(function(I){I.addEventListener("scroll",i.update,yy)}),s&&Y.addEventListener("resize",i.update,yy),function(){m&&E.forEach(function(I){I.removeEventListener("scroll",i.update,yy)}),s&&Y.removeEventListener("resize",i.update,yy)}}const u4={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:l4,data:{}};var c4={left:"right",right:"left",bottom:"top",top:"bottom"};function Iy(n){return n.replace(/left|right|bottom|top/g,function(t){return c4[t]})}var h4={start:"end",end:"start"};function aW(n){return n.replace(/start|end/g,function(t){return h4[t]})}function CY(n){var t=lo(n),i=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:i,scrollTop:a}}function VY(n){return cp(Sh(n)).left+CY(n).scrollLeft}function d4(n,t){var i=lo(n),a=Sh(n),h=i.visualViewport,m=a.clientWidth,g=a.clientHeight,s=0,Y=0;if(h){m=h.width,g=h.height;var E=wU();(E||!E&&t==="fixed")&&(s=h.offsetLeft,Y=h.offsetTop)}return{width:m,height:g,x:s+VY(n),y:Y}}function f4(n){var t,i=Sh(n),a=CY(n),h=(t=n.ownerDocument)==null?void 0:t.body,m=Ud(i.scrollWidth,i.clientWidth,h?h.scrollWidth:0,h?h.clientWidth:0),g=Ud(i.scrollHeight,i.clientHeight,h?h.scrollHeight:0,h?h.clientHeight:0),s=-a.scrollLeft+VY(n),Y=-a.scrollTop;return uc(h||i).direction==="rtl"&&(s+=Ud(i.clientWidth,h?h.clientWidth:0)-m),{width:m,height:g,x:s,y:Y}}function AY(n){var t=uc(n),i=t.overflow,a=t.overflowX,h=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+h+a)}function EU(n){return["html","body","#document"].indexOf(gh(n))>=0?n.ownerDocument.body:_u(n)&&AY(n)?n:EU(_v(n))}function Zm(n,t){var i;t===void 0&&(t=[]);var a=EU(n),h=a===((i=n.ownerDocument)==null?void 0:i.body),m=lo(a),g=h?[m].concat(m.visualViewport||[],AY(a)?a:[]):a,s=t.concat(g);return h?s:s.concat(Zm(_v(g)))}function jw(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function p4(n,t){var i=cp(n,!1,t==="fixed");return i.top=i.top+n.clientTop,i.left=i.left+n.clientLeft,i.bottom=i.top+n.clientHeight,i.right=i.left+n.clientWidth,i.width=n.clientWidth,i.height=n.clientHeight,i.x=i.left,i.y=i.top,i}function sW(n,t,i){return t===bU?jw(d4(n,i)):Ld(t)?p4(t,i):jw(f4(Sh(n)))}function m4(n){var t=Zm(_v(n)),i=["absolute","fixed"].indexOf(uc(n).position)>=0,a=i&&_u(n)?Yg(n):n;return Ld(a)?t.filter(function(h){return Ld(h)&&YU(h,a)&&gh(h)!=="body"}):[]}function g4(n,t,i,a){var h=t==="clippingParents"?m4(n):[].concat(t),m=[].concat(h,[i]),g=m[0],s=m.reduce(function(Y,E){var I=sW(n,E,a);return Y.top=Ud(I.top,Y.top),Y.right=tv(I.right,Y.right),Y.bottom=tv(I.bottom,Y.bottom),Y.left=Ud(I.left,Y.left),Y},sW(n,g,a));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function MU(n){var t=n.reference,i=n.element,a=n.placement,h=a?vu(a):null,m=a?hp(a):null,g=t.x+t.width/2-i.width/2,s=t.y+t.height/2-i.height/2,Y;switch(h){case Os:Y={x:g,y:t.y-i.height};break;case zo:Y={x:g,y:t.y+t.height};break;case Fo:Y={x:t.x+t.width,y:s};break;case Xs:Y={x:t.x-i.width,y:s};break;default:Y={x:t.x,y:t.y}}var E=h?UY(h):null;if(E!=null){var I=E==="y"?"height":"width";switch(m){case lp:Y[E]=Y[E]-(t[I]/2-i[I]/2);break;case ag:Y[E]=Y[E]+(t[I]/2-i[I]/2);break}}return Y}function sg(n,t){t===void 0&&(t={});var i=t,a=i.placement,h=a===void 0?n.placement:a,m=i.strategy,g=m===void 0?n.strategy:m,s=i.boundary,Y=s===void 0?OO:s,E=i.rootBoundary,I=E===void 0?bU:E,k=i.elementContext,D=k===void 0?Tm:k,V=i.altBoundary,F=V===void 0?!1:V,$=i.padding,Q=$===void 0?0:$,ae=TU(typeof Q!="number"?Q:WU(Q,wg)),le=D===Tm?XO:Tm,_e=n.rects.popper,fe=n.elements[F?le:D],We=g4(Ld(fe)?fe:fe.contextElement||Sh(n.elements.popper),Y,I,g),se=cp(n.elements.reference),De=MU({reference:se,element:_e,placement:h}),ze=jw(Object.assign({},_e,De)),je=D===Tm?ze:se,ft={top:We.top-je.top+ae.top,bottom:je.bottom-We.bottom+ae.bottom,left:We.left-je.left+ae.left,right:je.right-We.right+ae.right},ot=n.modifiersData.offset;if(D===Tm&&ot){var st=ot[h];Object.keys(ft).forEach(function(rt){var Re=[Fo,zo].indexOf(rt)>=0?1:-1,Yt=[Os,zo].indexOf(rt)>=0?"y":"x";ft[rt]+=st[Yt]*Re})}return ft}function y4(n,t){t===void 0&&(t={});var i=t,a=i.placement,h=i.boundary,m=i.rootBoundary,g=i.padding,s=i.flipVariations,Y=i.allowedAutoPlacements,E=Y===void 0?MY:Y,I=hp(a),k=I?s?rW:rW.filter(function(F){return hp(F)===I}):wg,D=k.filter(function(F){return E.indexOf(F)>=0});D.length===0&&(D=k);var V=D.reduce(function(F,$){return F[$]=sg(n,{placement:$,boundary:h,rootBoundary:m,padding:g})[vu($)],F},{});return Object.keys(V).sort(function(F,$){return V[F]-V[$]})}function v4(n){if(vu(n)===EY)return[];var t=Iy(n);return[aW(n),t,aW(t)]}function _4(n){var t=n.state,i=n.options,a=n.name;if(!t.modifiersData[a]._skip){for(var h=i.mainAxis,m=h===void 0?!0:h,g=i.altAxis,s=g===void 0?!0:g,Y=i.fallbackPlacements,E=i.padding,I=i.boundary,k=i.rootBoundary,D=i.altBoundary,V=i.flipVariations,F=V===void 0?!0:V,$=i.allowedAutoPlacements,Q=t.options.placement,ae=vu(Q),le=ae===Q,_e=Y||(le||!F?[Iy(Q)]:v4(Q)),fe=[Q].concat(_e).reduce(function(Ht,Gt){return Ht.concat(vu(Gt)===EY?y4(t,{placement:Gt,boundary:I,rootBoundary:k,padding:E,flipVariations:F,allowedAutoPlacements:$}):Gt)},[]),We=t.rects.reference,se=t.rects.popper,De=new Map,ze=!0,je=fe[0],ft=0;ft<fe.length;ft++){var ot=fe[ft],st=vu(ot),rt=hp(ot)===lp,Re=[Os,zo].indexOf(st)>=0,Yt=Re?"width":"height",Tt=sg(t,{placement:ot,boundary:I,rootBoundary:k,altBoundary:D,padding:E}),_t=Re?rt?Fo:Xs:rt?zo:Os;We[Yt]>se[Yt]&&(_t=Iy(_t));var Qe=Iy(_t),bt=[];if(m&&bt.push(Tt[st]<=0),s&&bt.push(Tt[_t]<=0,Tt[Qe]<=0),bt.every(function(Ht){return Ht})){je=ot,ze=!1;break}De.set(ot,bt)}if(ze)for(var xt=F?3:1,Ue=function(Gt){var rr=fe.find(function(or){var fr=De.get(or);if(fr)return fr.slice(0,Gt).every(function(Sr){return Sr})});if(rr)return je=rr,"break"},pt=xt;pt>0;pt--){var Ft=Ue(pt);if(Ft==="break")break}t.placement!==je&&(t.modifiersData[a]._skip=!0,t.placement=je,t.reset=!0)}}const x4={name:"flip",enabled:!0,phase:"main",fn:_4,requiresIfExists:["offset"],data:{_skip:!1}};function oW(n,t,i){return i===void 0&&(i={x:0,y:0}),{top:n.top-t.height-i.y,right:n.right-t.width+i.x,bottom:n.bottom-t.height+i.y,left:n.left-t.width-i.x}}function lW(n){return[Os,Fo,zo,Xs].some(function(t){return n[t]>=0})}function b4(n){var t=n.state,i=n.name,a=t.rects.reference,h=t.rects.popper,m=t.modifiersData.preventOverflow,g=sg(t,{elementContext:"reference"}),s=sg(t,{altBoundary:!0}),Y=oW(g,a),E=oW(s,h,m),I=lW(Y),k=lW(E);t.modifiersData[i]={referenceClippingOffsets:Y,popperEscapeOffsets:E,isReferenceHidden:I,hasPopperEscaped:k},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":I,"data-popper-escaped":k})}const w4={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:b4};function Y4(n,t,i){var a=vu(n),h=[Xs,Os].indexOf(a)>=0?-1:1,m=typeof i=="function"?i(Object.assign({},t,{placement:n})):i,g=m[0],s=m[1];return g=g||0,s=(s||0)*h,[Xs,Fo].indexOf(a)>=0?{x:s,y:g}:{x:g,y:s}}function S4(n){var t=n.state,i=n.options,a=n.name,h=i.offset,m=h===void 0?[0,0]:h,g=MY.reduce(function(I,k){return I[k]=Y4(k,t.rects,m),I},{}),s=g[t.placement],Y=s.x,E=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=Y,t.modifiersData.popperOffsets.y+=E),t.modifiersData[a]=g}const T4={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:S4};function W4(n){var t=n.state,i=n.name;t.modifiersData[i]=MU({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const E4={name:"popperOffsets",enabled:!0,phase:"read",fn:W4,data:{}};function M4(n){return n==="x"?"y":"x"}function P4(n){var t=n.state,i=n.options,a=n.name,h=i.mainAxis,m=h===void 0?!0:h,g=i.altAxis,s=g===void 0?!1:g,Y=i.boundary,E=i.rootBoundary,I=i.altBoundary,k=i.padding,D=i.tether,V=D===void 0?!0:D,F=i.tetherOffset,$=F===void 0?0:F,Q=sg(t,{boundary:Y,rootBoundary:E,padding:k,altBoundary:I}),ae=vu(t.placement),le=hp(t.placement),_e=!le,fe=UY(ae),We=M4(fe),se=t.modifiersData.popperOffsets,De=t.rects.reference,ze=t.rects.popper,je=typeof $=="function"?$(Object.assign({},t.rects,{placement:t.placement})):$,ft=typeof je=="number"?{mainAxis:je,altAxis:je}:Object.assign({mainAxis:0,altAxis:0},je),ot=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,st={x:0,y:0};if(se){if(m){var rt,Re=fe==="y"?Os:Xs,Yt=fe==="y"?zo:Fo,Tt=fe==="y"?"height":"width",_t=se[fe],Qe=_t+Q[Re],bt=_t-Q[Yt],xt=V?-ze[Tt]/2:0,Ue=le===lp?De[Tt]:ze[Tt],pt=le===lp?-ze[Tt]:-De[Tt],Ft=t.elements.arrow,Ht=V&&Ft?IY(Ft):{width:0,height:0},Gt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:SU(),rr=Gt[Re],or=Gt[Yt],fr=Fm(0,De[Tt],Ht[Tt]),Sr=_e?De[Tt]/2-xt-fr-rr-ft.mainAxis:Ue-fr-rr-ft.mainAxis,Er=_e?-De[Tt]/2+xt+fr+or+ft.mainAxis:pt+fr+or+ft.mainAxis,Gr=t.elements.arrow&&Yg(t.elements.arrow),Wn=Gr?fe==="y"?Gr.clientTop||0:Gr.clientLeft||0:0,pn=(rt=ot==null?void 0:ot[fe])!=null?rt:0,Yr=_t+Sr-pn-Wn,xr=_t+Er-pn,ri=Fm(V?tv(Qe,Yr):Qe,_t,V?Ud(bt,xr):bt);se[fe]=ri,st[fe]=ri-_t}if(s){var hr,_i=fe==="x"?Os:Xs,ui=fe==="x"?zo:Fo,Qr=se[We],an=We==="y"?"height":"width",Jr=Qr+Q[_i],Fr=Qr-Q[ui],In=[Os,Xs].indexOf(ae)!==-1,ni=(hr=ot==null?void 0:ot[We])!=null?hr:0,Rn=In?Jr:Qr-De[an]-ze[an]-ni+ft.altAxis,bn=In?Qr+De[an]+ze[an]-ni-ft.altAxis:Fr,mn=V&&In?JO(Rn,Qr,bn):Fm(V?Rn:Jr,Qr,V?bn:Fr);se[We]=mn,st[We]=mn-Qr}t.modifiersData[a]=st}}const I4={name:"preventOverflow",enabled:!0,phase:"main",fn:P4,requiresIfExists:["offset"]};function U4(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function C4(n){return n===lo(n)||!_u(n)?CY(n):U4(n)}function V4(n){var t=n.getBoundingClientRect(),i=up(t.width)/n.offsetWidth||1,a=up(t.height)/n.offsetHeight||1;return i!==1||a!==1}function A4(n,t,i){i===void 0&&(i=!1);var a=_u(t),h=_u(t)&&V4(t),m=Sh(t),g=cp(n,h,i),s={scrollLeft:0,scrollTop:0},Y={x:0,y:0};return(a||!a&&!i)&&((gh(t)!=="body"||AY(m))&&(s=C4(t)),_u(t)?(Y=cp(t,!0),Y.x+=t.clientLeft,Y.y+=t.clientTop):m&&(Y.x=VY(m))),{x:g.left+s.scrollLeft-Y.x,y:g.top+s.scrollTop-Y.y,width:g.width,height:g.height}}function k4(n){var t=new Map,i=new Set,a=[];
vendor: 3,977 bytes, line 835
835n.forEach(function(m){t.set(m.name,m)});function h(m){i.add(m.name);var g=[].concat(m.requires||[],m.requiresIfExists||[]);g.forEach(function(s){if(!i.has(s)){var Y=t.get(s);Y&&h(Y)}}),a.push(m)}return n.forEach(function(m){i.has(m.name)||h(m)}),a}function D4(n){var t=k4(n);return HO.reduce(function(i,a){return i.concat(t.filter(function(h){return h.phase===a}))},[])}function R4(n){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(n())})})),t}}function L4(n){var t=n.reduce(function(i,a){var h=i[a.name];return i[a.name]=h?Object.assign({},h,a,{options:Object.assign({},h.options,a.options),data:Object.assign({},h.data,a.data)}):a,i},{});return Object.keys(t).map(function(i){return t[i]})}var uW={placement:"bottom",modifiers:[],strategy:"absolute"};function cW(){for(var n=arguments.length,t=new Array(n),i=0;i<n;i++)t[i]=arguments[i];return!t.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function O4(n){n===void 0&&(n={});var t=n,i=t.defaultModifiers,a=i===void 0?[]:i,h=t.defaultOptions,m=h===void 0?uW:h;return function(s,Y,E){E===void 0&&(E=m);var I={placement:"bottom",orderedModifiers:[],options:Object.assign({},uW,m),modifiersData:{},elements:{reference:s,popper:Y},attributes:{},styles:{}},k=[],D=!1,V={state:I,setOptions:function(ae){var le=typeof ae=="function"?ae(I.options):ae;$(),I.options=Object.assign({},m,I.options,le),I.scrollParents={reference:Ld(s)?Zm(s):s.contextElement?Zm(s.contextElement):[],popper:Zm(Y)};var _e=D4(L4([].concat(a,I.options.modifiers)));return I.orderedModifiers=_e.filter(function(fe){return fe.enabled}),F(),V.update()},forceUpdate:function(){if(!D){var ae=I.elements,le=ae.reference,_e=ae.popper;if(cW(le,_e)){I.rects={reference:A4(le,Yg(_e),I.options.strategy==="fixed"),popper:IY(_e)},I.reset=!1,I.placement=I.options.placement,I.orderedModifiers.forEach(function(ft){return I.modifiersData[ft.name]=Object.assign({},ft.data)});for(var fe=0;fe<I.orderedModifiers.length;fe++){if(I.reset===!0){I.reset=!1,fe=-1;continue}var We=I.orderedModifiers[fe],se=We.fn,De=We.options,ze=De===void 0?{}:De,je=We.name;typeof se=="function"&&(I=se({state:I,options:ze,name:je,instance:V})||I)}}}},update:R4(function(){return new Promise(function(Q){V.forceUpdate(),Q(I)})}),destroy:function(){$(),D=!0}};if(!cW(s,Y))return V;V.setOptions(E).then(function(Q){!D&&E.onFirstUpdate&&E.onFirstUpdate(Q)});function F(){I.orderedModifiers.forEach(function(Q){var ae=Q.name,le=Q.options,_e=le===void 0?{}:le,fe=Q.effect;if(typeof fe=="function"){var We=fe({state:I,name:ae,instance:V,options:_e}),se=function(){};k.push(We||se)}})}function $(){k.forEach(function(Q){return Q()}),k=[]}return V}}var X4=O4({defaultModifiers:[w4,E4,o4,u4,T4,x4,I4,n4]}),hW=function(t){return{position:t,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},N4={name:"applyStyles",enabled:!1},z4={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(t){var i=t.state;return function(){var a=i.elements,h=a.reference,m=a.popper;if("removeAttribute"in h){var g=(h.getAttribute("aria-describedby")||"").split(",").filter(function(s){return s.trim()!==m.id});g.length?h.setAttribute("aria-describedby",g.join(",")):h.removeAttribute("aria-describedby")}}},fn:function(t){var i,a=t.state,h=a.elements,m=h.popper,g=h.reference,s=(i=m.getAttribute("role"))==null?void 0:i.toLowerCase();if(m.id&&s==="tooltip"&&"setAttribute"in g){var Y=g.getAttribute("aria-describedby");if(Y&&Y.split(",").indexOf(m.id)!==-1)return;g.setAttribute("aria-describedby",Y?Y+","+m.id:m.id)}}},F4=[];function Z4(n,t,i){var a=i===void 0?{}:i,h=a.enabled,m=h===void 0?!0:h,g=a.placement,s=g===void 0?"bottom":g,Y=a.strategy,E=Y===void 0?"absolute":Y,I=a.modifiers,k=I===void 0?F4:I,D=gv(a,["enabled","placement","strategy","modifiers"]),V=de.useRef(),F=de.useCallback(function(){var fe;(fe=V.current)==null||fe.update()},[]),$=de.useCallback(function(){var fe;(fe=V.current)==null||fe.forceUpdate()}
835,[]),Q=LO(de.useState({placement:s,update:F,forceUpdate:$,attributes:{},styles:{popper:hW(E),arrow:{}}})),ae=Q[0],le=Q[1],_e=de.useMemo(function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(We){var se=We.state,De={},ze={};Object.keys(se.elements).forEach(function(je){De[je]=se.styles[je],ze[je]=se.attributes[je]}),le({state:se,styles:De,attributes:ze,update:F,forceUpdate:$,placement:se.placement})}}},[F,$,le]);return de.useEffect(function(){!V.current||!m||V.current.setOptions({placement:s,strategy:E,modifiers:[].concat(k,[_e,N4])})},[E,s,_e,m]),de.useEffect(function(){if(!(!m||n==null||t==null))return V.current=X4(n,t,yi({},D,{placement:s,strategy:E,modifiers:[].concat(k,[z4,_e])})),function(){V.current!=null&&(V.current.destroy(),V.current=void 0,le(function(fe){return yi({},fe,{attributes:{},styles:{popper:hW(E)}})}))}},[m,n,t]),ae}function j4(n,t,i,a){var h=a&&typeof a!="boolean"?a.capture:a;n.removeEventListener(t,i,h),i.__once&&n.removeEventListener(t,i.__once,h)}function km(n,t,i,a){return kO(n,t,i,a),function(){j4(n,t,i,a)}}var s0,dW;function B4(){if(dW)return s0;dW=1;var n=function(){};return s0=n,s0}var $4=B4();const G4=Aa($4);function q4(n){return n&&"setState"in n?wP.findDOMNode(n):n??null}const H4=function(n){return bg(q4(n))};var K4=27,fW=function(){};function Q4(n){return n.button===0}function J4(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var pW=function(t){return t&&("current"in t?t.current:t)};function eX(n,t,i){var a=i===void 0?{}:i,h=a.disabled,m=a.clickTrigger,g=m===void 0?"click":m,s=de.useRef(!1),Y=t||fW,E=de.useCallback(function(D){var V,F=pW(n);G4(!!F,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),s.current=!F||J4(D)||!Q4(D)||!!ig(F,(V=D.composedPath==null?void 0:D.composedPath()[0])!=null?V:D.target)},[n]),I=eW(function(D){s.current||Y(D)}),k=eW(function(D){D.keyCode===K4&&Y(D)});de.useEffect(function(){if(!(h||n==null)){var D=window.event,V=H4(pW(n)),F=km(V,g,E,!0),$=km(V,g,function(le){if(le===D){D=void 0;return}I(le)}),Q=km(V,"keyup",function(le){if(le===D){D=void 0;return}k(le)}),ae=[];return"ontouchstart"in V.documentElement&&(ae=[].slice.call(V.body.children).map(function(le){return km(le,"mousemove",fW)})),function(){F(),$(),Q(),ae.forEach(function(le){return le()})}}},[n,h,g,E,I,k])}function tX(n){var t={};return Array.isArray(n)?(n==null||n.forEach(function(i){t[i.name]=i}),t):n||t}function rX(n){return n===void 0&&(n={}),Array.isArray(n)?n:Object.keys(n).map(function(t){return n[t].name=t,n[t]})}function nX(n){var t,i,a,h,m=n.enabled,g=n.enableEvents,s=n.placement,Y=n.flip,E=n.offset,I=n.fixed,k=n.containerPadding,D=n.arrowElement,V=n.popperConfig,F=V===void 0?{}:V,$=tX(F.modifiers);return yi({},F,{placement:s,enabled:m,strategy:I?"fixed":F.strategy,modifiers:rX(yi({},$,{eventListeners:{enabled:g},preventOverflow:yi({},$.preventOverflow,{options:k?yi({padding:k},(t=$.preventOverflow)==null?void 0:t.options):(i=$.preventOverflow)==null?void 0:i.options}),offset:{options:yi({offset:E},(a=$.offset)==null?void 0:a.options)},arrow:yi({},$.arrow,{enabled:!!D,options:yi({},(h=$.arrow)==null?void 0:h.options,{element:D})}),flip:yi({enabled:!!Y},$.flip)}))})}function iX(n,t){return n.classList?n.classList.contains(t):(" "+(n.className.baseVal||n.className)+" ").indexOf(" "+t+" ")!==-1}function aX(n,t){n.classList?n.classList.add(t):iX(n,t)||(typeof n.className=="string"?n.className=n.className+" "+t:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+t))}
835function mW(n,t){return n.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function sX(n,t){n.classList?n.classList.remove(t):typeof n.className=="string"?n.className=mW(n.className,t):n.setAttribute("class",mW(n.className&&n.className.baseVal||"",t))}var vy;function kY(n){if((!vy&&vy!==0||n)&&WY){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),vy=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return vy}var o0=function(t){var i;return typeof document>"u"?null:t==null?bg().body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),(i=t)!=null&&i.nodeType&&t||null)};function gW(n,t){var i=de.useState(function(){return o0(n)}),a=i[0],h=i[1];if(!a){var m=o0(n);m&&h(m)}return de.useEffect(function(){},[t,a]),de.useEffect(function(){var g=o0(n);g!==a&&h(g)},[n,a]),a}const yW=n=>!n||typeof n=="function"?n:t=>{n.current=t};function oX(n,t){const i=yW(n),a=yW(t);return h=>{i&&i(h),a&&a(h)}}function lX(n,t){return de.useMemo(()=>oX(n,t),[n,t])}var DY=qe.forwardRef(function(n,t){var i=n.flip,a=n.offset,h=n.placement,m=n.containerPadding,g=m===void 0?5:m,s=n.popperConfig,Y=s===void 0?{}:s,E=n.transition,I=tW(),k=I[0],D=I[1],V=tW(),F=V[0],$=V[1],Q=lX(D,t),ae=gW(n.container),le=gW(n.target),_e=de.useState(!n.show),fe=_e[0],We=_e[1],se=Z4(le,k,nX({placement:h,enableEvents:!!n.show,containerPadding:g||5,flip:i,offset:a,arrowElement:F,popperConfig:Y})),De=se.styles,ze=se.attributes,je=gv(se,["styles","attributes"]);n.show?fe&&We(!1):!n.transition&&!fe&&We(!0);var ft=function(){We(!0),n.onExited&&n.onExited.apply(n,arguments)},ot=n.show||E&&!fe;if(eX(k,n.onHide,{disabled:!n.rootClose||n.rootCloseDisabled,clickTrigger:n.rootCloseEvent}),!ot)return null;var st=n.children(yi({},je,{show:!!n.show,props:yi({},ze.popper,{style:De.popper,ref:Q}),arrowProps:yi({},ze.arrow,{style:De.arrow,ref:$})}));if(E){var rt=n.onExit,Re=n.onExiting,Yt=n.onEnter,Tt=n.onEntering,_t=n.onEntered;st=qe.createElement(E,{in:n.show,appear:!0,onExit:rt,onExiting:Re,onExited:ft,onEnter:Yt,onEntering:Tt,onEntered:_t},st)}return ae?wP.createPortal(st,ae):null});DY.displayName="Overlay";DY.propTypes={show:Nt.bool,placement:Nt.oneOf(MY),target:Nt.any,container:Nt.any,flip:Nt.bool,children:Nt.func.isRequired,containerPadding:Nt.number,popperConfig:Nt.object,rootClose:Nt.bool,rootCloseEvent:Nt.oneOf(["click","mousedown"]),rootCloseDisabled:Nt.bool,onHide:function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),h=1;h<i;h++)a[h-1]=arguments[h];if(t.rootClose){var m;return(m=Nt.func).isRequired.apply(m,[t].concat(a))}return Nt.func.apply(Nt,[t].concat(a))},transition:Nt.elementType,onEnter:Nt.func,onEntering:Nt.func,onEntered:Nt.func,onExit:Nt.func,onExiting:Nt.func,onExited:Nt.func};var l0,vW;function uX(){if(vW)return l0;vW=1;function n(){this.__data__=[],this.size=0}return l0=n,l0}var u0,_W;function xv(){if(_W)return u0;_W=1;var n=vg();function t(i,a){for(var h=i.length;h--;)if(n(i[h][0],a))return h;return-1}return u0=t,u0}var c0,xW;function cX(){if(xW)return c0;xW=1;var n=xv(),t=Array.prototype,i=t.splice;function a(h){var m=this.__data__,g=n(m,h);if(g<0)return!1;var s=m.length-1;return g==s?m.pop():i.call(m,g,1),--this.size,!0}return c0=a,c0}var h0,bW;function hX(){if(bW)return h0;bW=1;var n=xv();function t(i){var a=this.__data__,h=n(a,i);return h<0?void 0:a[h][1]}return h0=t,h0}var d0,wW;function dX(){if(wW)return d0;wW=1;var n=xv();function t(i){return n(this.__data__,i)>-1}return d0=t,d0}var f0,YW;function fX(){if(YW)return f0;YW=1;var n=xv();function t(i,a){var h=this.__data__,m=n(h,i);return m<0?(++this.size,h.push([i,a])):h[m][1]=a,this}return f0=t,f0}var p0,SW;function bv(){if(SW)return p0;SW=1;var n=uX(),t=cX(),i=hX(),a=dX(),h=fX();function m(g){var s=-1,Y=g==null?0:g.length;for(this.clear();++s<Y;){var E=g[s];this.set(E[0],E[1])}}return m.prototype.clear=n,m.prototype.delete=t,m.prototype.get=i,m.prototype.has=a,m.prototype.set=h,p0=m,p0}var m0,TW;function pX(){if(TW)return m0;TW=1;var n=bv();function t(){this.__data__=new n,this.size=0}return m0=t,m0}var g0,WW;function mX(){if(WW)return g0;WW=1;function n(t){var i=this.__data__,a=i.delete(t);return this.size=i.size,a}return g0=n,g0}var y0,EW;function gX(){if(EW)return y0;EW=1;function n(t){return this.__data__.get(t)}return y0=n,y0}var v0,MW;function yX(){if(MW)return v0;MW=1;function n(t){return this.__data__.has(t)}return v0=n,v0}var _0,PW;function vX(){if(PW)return _0;PW=1;var n=bu(),t=n["__core-js_shared__"];return _0=t,_0}var x0,IW;function _X(){if(IW)return x0;IW=1;var n=vX(),t=function(){var a=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");
vendor: 13,452 bytes, line 835
835return a?"Symbol(src)_1."+a:""}();function i(a){return!!t&&t in a}return x0=i,x0}var b0,UW;function PU(){if(UW)return b0;UW=1;var n=Function.prototype,t=n.toString;function i(a){if(a!=null){try{return t.call(a)}catch{}try{return a+""}catch{}}return""}return b0=i,b0}var w0,CW;function xX(){if(CW)return w0;CW=1;var n=wY(),t=_X(),i=cc(),a=PU(),h=/[\\^$.*+?()[\]{}|]/g,m=/^\[object .+?Constructor\]$/,g=Function.prototype,s=Object.prototype,Y=g.toString,E=s.hasOwnProperty,I=RegExp("^"+Y.call(E).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function k(D){if(!i(D)||t(D))return!1;var V=n(D)?I:m;return V.test(a(D))}return w0=k,w0}var Y0,VW;function bX(){if(VW)return Y0;VW=1;function n(t,i){return t==null?void 0:t[i]}return Y0=n,Y0}var S0,AW;function Fd(){if(AW)return S0;AW=1;var n=xX(),t=bX();function i(a,h){var m=t(a,h);return n(m)?m:void 0}return S0=i,S0}var T0,kW;function RY(){if(kW)return T0;kW=1;var n=Fd(),t=bu(),i=n(t,"Map");return T0=i,T0}var W0,DW;function wv(){if(DW)return W0;DW=1;var n=Fd(),t=n(Object,"create");return W0=t,W0}var E0,RW;function wX(){if(RW)return E0;RW=1;var n=wv();function t(){this.__data__=n?n(null):{},this.size=0}return E0=t,E0}var M0,LW;function YX(){if(LW)return M0;LW=1;function n(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}return M0=n,M0}var P0,OW;function SX(){if(OW)return P0;OW=1;var n=wv(),t="__lodash_hash_undefined__",i=Object.prototype,a=i.hasOwnProperty;function h(m){var g=this.__data__;if(n){var s=g[m];return s===t?void 0:s}return a.call(g,m)?g[m]:void 0}return P0=h,P0}var I0,XW;function TX(){if(XW)return I0;XW=1;var n=wv(),t=Object.prototype,i=t.hasOwnProperty;function a(h){var m=this.__data__;return n?m[h]!==void 0:i.call(m,h)}return I0=a,I0}var U0,NW;function WX(){if(NW)return U0;NW=1;var n=wv(),t="__lodash_hash_undefined__";function i(a,h){var m=this.__data__;return this.size+=this.has(a)?0:1,m[a]=n&&h===void 0?t:h,this}return U0=i,U0}var C0,zW;function EX(){if(zW)return C0;zW=1;var n=wX(),t=YX(),i=SX(),a=TX(),h=WX();function m(g){var s=-1,Y=g==null?0:g.length;for(this.clear();++s<Y;){var E=g[s];this.set(E[0],E[1])}}return m.prototype.clear=n,m.prototype.delete=t,m.prototype.get=i,m.prototype.has=a,m.prototype.set=h,C0=m,C0}var V0,FW;function MX(){if(FW)return V0;FW=1;var n=EX(),t=bv(),i=RY();function a(){this.size=0,this.__data__={hash:new n,map:new(i||t),string:new n}}return V0=a,V0}var A0,ZW;function PX(){if(ZW)return A0;ZW=1;function n(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}return A0=n,A0}var k0,jW;function Yv(){if(jW)return k0;jW=1;var n=PX();function t(i,a){var h=i.__data__;return n(a)?h[typeof a=="string"?"string":"hash"]:h.map}return k0=t,k0}var D0,BW;function IX(){if(BW)return D0;BW=1;var n=Yv();function t(i){var a=n(this,i).delete(i);return this.size-=a?1:0,a}return D0=t,D0}var R0,$W;function UX(){if($W)return R0;$W=1;var n=Yv();function t(i){return n(this,i).get(i)}return R0=t,R0}var L0,GW;function CX(){if(GW)return L0;GW=1;var n=Yv();function t(i){return n(this,i).has(i)}return L0=t,L0}var O0,qW;function VX(){if(qW)return O0;qW=1;var n=Yv();function t(i,a){var h=n(this,i),m=h.size;return h.set(i,a),this.size+=h.size==m?0:1,this}return O0=t,O0}var X0,HW;function LY(){if(HW)return X0;HW=1;var n=MX(),t=IX(),i=UX(),a=CX(),h=VX();function m(g){var s=-1,Y=g==null?0:g.length;for(this.clear();++s<Y;){var E=g[s];this.set(E[0],E[1])}}return m.prototype.clear=n,m.prototype.delete=t,m.prototype.get=i,m.prototype.has=a,m.prototype.set=h,X0=m,X0}var N0,KW;function AX(){if(KW)return N0;KW=1;var n=bv(),t=RY(),i=LY(),a=200;function h(m,g){var s=this.__data__;if(s instanceof n){var Y=s.__data__;if(!t||Y.length<a-1)return Y.push([m,g]),this.size=++s.size,this;s=this.__data__=new i(Y)}return s.set(m,g),this.size=s.size,this}return N0=h,N0}var z0,QW;function OY(){if(QW)return z0;QW=1;var n=bv(),t=pX(),i=mX(),a=gX(),h=yX(),m=AX();function g(s){var Y=this.__data__=new n(s);this.size=Y.size}return g.prototype.clear=t,g.prototype.delete=i,g.prototype.get=a,g.prototype.has=h,g.prototype.set=m,z0=g,z0}var F0,JW;function kX(){if(JW)return F0;JW=1;var n="__lodash_hash_undefined__";function t(i){return this.__data__.set(i,n),this}return F0=t,F0}var Z0,e2;function DX(){if(e2)return Z0;e2=1;function n(t){return this.__data__.has(t)}return Z0=n,Z0}var j0,t2;function RX(){if(t2)return j0;t2=1;var n=LY(),t=kX(),i=DX();function a(h){var m=-1,g=h==null?0:h.length;for(this.__data__=new n;++m<g;)this.add(h[m])}return a.prototype.add=a.prototype.push=t,a.prototype.has=i,j0=a,j0}var B0,r2;function LX(){if(r2)return B0;r2=1;function n(t,i){for(var a=-1,h=t==null?0:t.length;++a<h;)if(i(t[a],a,t))return!0;return!1}return B0=n,B0}var $0,n2;function OX(){if(n2)return $0;n2=1;function n(t,i){return t.has(i)}return $0=n,$0}var G0,i2;function IU(){if(i2)return G0;i2=1;var n=RX(),t=LX(),i=OX(),a=1,h=2;function m(g,s,Y,E,I,k){var D=Y&a,V=g.length,F=s.length;if(V!=F&&!(D&&F>V))return!1;var $=k.get(g),Q=k.get(s);if($&&Q)return $==s&&Q==g;var ae=-1,le=!0,_e=Y&h?new n:void 0;for(k.set(g,s),k.set(s,g);++ae<V;){var fe=g[ae],We=s[ae];if(E)var se=D?E(We,fe,ae,s,g,k):E(fe,We,ae,g,s,k);if(se!==void 0){if(se)continue;le=!1;break}if(_e){if(!t(s,function(De,ze){if(!i(_e,ze)&&(fe===De||I(fe,De,Y,E,k)))return _e.push(ze)})){le=!1;break}}else if(!(fe===We||I(fe,We,Y,E,k))){le=!1;break}}return k.delete(g),k.delete(s),le}return G0=m,G0}var q0,a2;function UU(){if(a2)return q0;a2=1;var n=bu(),t=n.Uint8Array;return q0=t,q0}var H0,s2;function XX(){if(s2)return H0;s2=1;function n(t){var i=-1,a=Array(t.size);return t.forEach(function(h,m){a[++i]=[m,h]}),a}return H0=n,H0}var K0,o2;function NX(){if(o2)return K0;o2=1;function n(t){var i=-1,a=Array(t.size);return t.forEach(function(h){a[++i]=h}),a}return K0=n,K0}var Q0,l2;function zX(){if(l2)return Q0;l2=1;var n=wp(),t=UU(),i=vg(),a=IU(),h=XX(),m=NX(),g=1,s=2,Y="[object Boolean]",E="[object Date]",I="[object Error]",k="[object Map]",D="[object Number]",V="[object RegExp]",F="[object Set]",$="[object String]",Q="[object Symbol]",ae="[object ArrayBuffer]",le="[object DataView]",_e=n?n.prototype:void 0,fe=_e?_e.valueOf:void 0;function We(se,De,ze,je,ft,ot,st){switch(ze){case le:if(se.byteLength!=De.byteLength||se.byteOffset!=De.byteOffset)return!1;se=se.buffer,De=De.buffer;case ae:return!(se.byteLength!=De.byteLength||!ot(new t(se),new t(De)));case Y:case E:case D:return i(+se,+De);case I:return se.name==De.name&&se.message==De.message;case V:case $:return se==De+"";case k:var rt=h;case F:var Re=je&g;if(rt||(rt=m),se.size!=De.size&&!Re)return!1;var Yt=st.get(se);if(Yt)return Yt==De;je|=s,st.set(se,De);var Tt=a(rt(se),rt(De),je,ft,ot,st);return st.delete(se),Tt;case Q:if(fe)return fe.call(se)==fe.call(De)}return!1}return Q0=We,Q0}var J0,u2;function XY(){if(u2)return J0;u2=1;function n(t,i){for(var a=-1,h=i.length,m=t.length;++a<h;)t[m+a]=i[a];return t}return J0=n,J0}var ex,c2;function jo(){if(c2)return ex;c2=1;var n=Array.isArray;return ex=n,ex}var tx,h2;function CU(){if(h2)return tx;h2=1;var n=XY(),t=jo();function i(a,h,m){var g=h(a);return t(a)?g:n(g,m(a))}return tx=i,tx}var rx,d2;function FX(){if(d2)return rx;d2=1;function n(t,i){for(var a=-1,h=t==null?0:t.length,m=0,g=[];++a<h;){var s=t[a];i(s,a,t)&&(g[m++]=s)}return g}return rx=n,rx}var nx,f2;function VU(){if(f2)return nx;f2=1;function n(){return[]}return nx=n,nx}var ix,p2;function NY(){if(p2)return ix;p2=1;var n=FX(),t=VU(),i=Object.prototype,a=i.propertyIsEnumerable,h=Object.getOwnPropertySymbols,m=h?function(g){return g==null?[]:(g=Object(g),n(h(g),function(s){return a.call(g,s)}))}:t;return ix=m,ix}var ax,m2;function ZX(){if(m2)return ax;m2=1;function n(t,i){for(var a=-1,h=Array(t);++a<t;)h[a]=i(a);return h}return ax=n,ax}var sx,g2;function jX(){if(g2)return sx;g2=1;var n=Yp(),t=Yh(),i="[object Arguments]";function a(h){return t(h)&&n(h)==i}return sx=a,sx}var ox,y2;function zY(){if(y2)return ox;y2=1;var n=jX(),t=Yh(),i=Object.prototype,a=i.hasOwnProperty,h=i.propertyIsEnumerable,m=n(function(){return arguments}())?n:function(g){return t(g)&&a.call(g,"callee")&&!h.call(g,"callee")};return ox=m,ox}var Dm={exports:{}},lx,v2;function BX(){if(v2)return lx;v2=1;function n(){return!1}return lx=n,lx}Dm.exports;var _2;function Sv(){return _2||(_2=1,function(n,t){var i=bu(),a=BX(),h=t&&!t.nodeType&&t,m=h&&!0&&n&&!n.nodeType&&n,g=m&&m.exports===h,s=g?i.Buffer:void 0,Y=s?s.isBuffer:void 0,E=Y||a;n.exports=E}(Dm,Dm.exports)),Dm.exports}var ux,x2;function $X(){if(x2)return ux;x2=1;var n=Yp(),t=YY(),i=Yh(),a="[object Arguments]",h="[object Array]",m="[object Boolean]",g="[object Date]",s="[object Error]",Y="[object Function]",E="[object Map]",I="[object Number]",k="[object Object]",D="[object RegExp]",V="[object Set]",F="[object String]",$="[object WeakMap]",Q="[object ArrayBuffer]",ae="[object DataView]",le="[object Float32Array]",_e="[object Float64Array]",fe="[object Int8Array]",We="[object Int16Array]",se="[object Int32Array]",De="[object Uint8Array]",ze="[object Uint8ClampedArray]",je="[object Uint16Array]",ft="[object Uint32Array]",ot={};ot[le]=ot[_e]=ot[fe]=ot[We]=ot[se]=ot[De]=ot[ze]=ot[je]=ot[ft]=!0,ot[a]=ot[h]=ot[Q]=ot[m]=ot[ae]=ot[g]=ot[s]=ot[Y]=ot[E]=ot[I]=ot[k]=ot[D]=ot[V]=ot[F]=ot[$]=!1;function st(rt){return i(rt)&&t(rt.length)&&!!ot[n(rt)]}return ux=st,ux}var cx,b2;function Tv(){if(b2)return cx;b2=1;function n(t){return function(i){return t(i)}}return cx=n,cx}var Rm={exports:{}};Rm.exports;var w2;function FY(){return w2||(w2=1,function(n,t){var i=fU(),a=t&&!t.nodeType&&t,h=a&&!0&&n&&!n.nodeType&&n,m=h&&h.exports===a,g=m&&i.process,s=function(){try{var Y=h&&h.require&&h.require("util").types;return Y||g&&g.binding&&g.binding("util")}catch{}}();n.exports=s}(Rm,Rm.exports)),Rm.exports}var hx,Y2;function ZY(){if(Y2)return hx;Y2=1;var n=$X(),t=Tv(),i=FY(),a=i&&i.isTypedArray,h=a?t(a):n;return hx=h,hx}var dx,S2;function AU(){if(S2)return dx;S2=1;var n=ZX(),t=zY(),i=jo(),a=Sv(),h=SY(),m=ZY(),g=Object.prototype,s=g.hasOwnProperty;function Y(E,I){var k=i(E),D=!k&&t(E),V=!k&&!D&&a(E),F=!k&&!D&&!V&&m(E),$=k||D||V||F,Q=$?n(E.length,String):[],ae=Q.length;for(var le in E)(I||s.call(E,le))&&!($&&(le=="length"||V&&(le=="offset"||le=="parent")||F&&(le=="buffer"||le=="byteLength"||le=="byteOffset")||h(le,ae)))&&Q.push(le);return Q}return dx=Y,dx}var fx,T2;function jY(){if(T2)return fx;T2=1;var n=Object.prototype;function t(i){var a=i&&i.constructor,h=typeof a=="function"&&a.prototype||n;return i===h}return fx=t,fx}var px,W2;function kU(){if(W2)return px;W2=1;function n(t,i){return function(a){return t(i(a))}}return px=n,px}var mx,E2;function GX(){if(E2)return mx;E2=1;var n=kU(),t=n(Object.keys,Object);return mx=t,mx}var gx,M2;function qX(){if(M2)return gx;M2=1;var n=jY(),t=GX(),i=Object.prototype,a=i.hasOwnProperty;function h(m){if(!n(m))return t(m);var g=[];for(var s in Object(m))a.call(m,s)&&s!="constructor"&&g.push(s);return g}return gx=h,gx}var yx,P2;function Sg(){if(P2)return yx;P2=1;var n=AU(),t=qX(),i=_g();function a(h){return i(h)?n(h):t(h)}return yx=a,yx}var vx,I2;function DU(){if(I2)return vx;I2=1;var n=CU(),t=NY(),i=Sg();function a(h){return n(h,i,t)}return vx=a,vx}var _x,U2;function HX(){if(U2)return _x;U2=1;var n=DU(),t=1,i=Object.prototype,a=i.hasOwnProperty;function h(m,g,s,Y,E,I){var k=s&t,D=n(m),V=D.length,F=n(g),$=F.length;if(V!=$&&!k)return!1;for(var Q=V;Q--;){var ae=D[Q];if(!(k?ae in g:a.call(g,ae)))return!1}var le=I.get(m),_e=I.get(g);if(le&&_e)return le==g&&_e==m;var fe=!0;I.set(m,g),I.set(g,m);for(var We=k;++Q<V;){ae=D[Q];var se=m[ae],De=g[ae];if(Y)var ze=k?Y(De,se,ae,g,m,I):Y(se,De,ae,m,g,I);if(!(ze===void 0?se===De||E(se,De,s,Y,I):ze)){fe=!1;break}We||(We=ae=="constructor")}if(fe&&!We){var je=m.constructor,ft=g.constructor;je!=ft&&"constructor"in m&&"constructor"in g&&!(typeof je=="function"&&je instanceof je&&typeof ft=="function"&&ft instanceof ft)&&(fe=!1)}return I.delete(m),I.delete(g),fe}return _x=h,_x}var xx,C2;function KX(){if(C2)return xx;C2=1;var n=Fd(),t=bu(),i=n(t,"DataView");return xx=i,xx}var bx,V2;function QX(){if(V2)return bx;V2=1;var n=Fd(),t=bu(),i=n(t,"Promise");return bx=i,bx}var wx,A2;function JX(){if(A2)return wx;A2=1;var n=Fd(),t=bu(),i=n(t,"Set");return wx=i,wx}var Yx,k2;function eN(){if(k2)return Yx;k2=1;var n=Fd(),t=bu(),i=n(t,"WeakMap");return Yx=i,Yx}var Sx,D2;function Wv(){if(D2)return Sx;D2=1;var n=KX(),t=RY(),i=QX(),a=JX(),h=eN(),m=Yp(),g=PU(),s="[object Map]",Y="[object Object]",E="[object Promise]",I="[object Set]",k="[object WeakMap]",D="[object DataView]",V=g(n),F=g(t),$=g(i),Q=g(a),ae=g(h),le=m;return(n&&le(new n(new ArrayBuffer(1)))!=D||t&&le(new t)!=s||i&&le(i.resolve())!=E||a&&le(new a)!=I||h&&le(new h)!=k)&&(le=function(_e){var fe=m(_e),We=fe==Y?_e.constructor:void 0,se=We?g(We):"";if(se)switch(se){case V:return D;case F:return s;case $:return E;case Q:return I;case ae:return k}return fe}),Sx=le,Sx}var Tx,R2;function tN(){if(R2)return Tx;R2=1;var n=OY(),t=IU(),i=zX(),a=HX(),h=Wv(),m=jo(),g=Sv(),s=ZY(),Y=1,E="[object Arguments]",I="[object Array]",k="[object Object]",D=Object.prototype,V=D.hasOwnProperty;function F($,Q,ae,le,_e,fe){var We=m($),se=m(Q),De=We?I:h($),ze=se?I:h(Q);De=De==E?k:De,ze=ze==E?k:ze;var je=De==k,ft=ze==k,ot=De==ze;if(ot&&g($)){if(!g(Q))return!1;We=!0,je=!1}if(ot&&!je)return fe||(fe=new n),We||s($)?t($,Q,ae,le,_e,fe):i($,Q,De,ae,le,_e,fe);if(!(ae&Y)){var st=je&&V.call($,"__wrapped__"),rt=ft&&V.call(Q,"__wrapped__");
vendor: 8,352 bytes, line 835
835if(st||rt){var Re=st?$.value():$,Yt=rt?Q.value():Q;return fe||(fe=new n),_e(Re,Yt,ae,le,fe)}}return ot?(fe||(fe=new n),a($,Q,ae,le,_e,fe)):!1}return Tx=F,Tx}var Wx,L2;function BY(){if(L2)return Wx;L2=1;var n=tN(),t=Yh();function i(a,h,m,g,s){return a===h?!0:a==null||h==null||!t(a)&&!t(h)?a!==a&&h!==h:n(a,h,m,g,i,s)}return Wx=i,Wx}var Ex,O2;function rN(){if(O2)return Ex;O2=1;var n=BY();function t(i,a){return n(i,a)}return Ex=t,Ex}var nN=rN();const iN=Aa(nN);function Mx(n,t){var i=TY(n);return i?i.innerHeight:Id(n).height}function RU(n,t,i){n.closest&&!i&&n.closest(t);var a=n;do{if(CO(a,t))return a;a=a.parentElement}while(a&&a!==i&&a.nodeType===document.ELEMENT_NODE);return null}var Px,X2;function aN(){if(X2)return Px;X2=1;function n(t,i,a,h){for(var m=t.length,g=a+(h?1:-1);h?g--:++g<m;)if(i(t[g],g,t))return g;return-1}return Px=n,Px}var Ix,N2;function sN(){if(N2)return Ix;N2=1;var n=OY(),t=BY(),i=1,a=2;function h(m,g,s,Y){var E=s.length,I=E,k=!Y;if(m==null)return!I;for(m=Object(m);E--;){var D=s[E];if(k&&D[2]?D[1]!==m[D[0]]:!(D[0]in m))return!1}for(;++E<I;){D=s[E];var V=D[0],F=m[V],$=D[1];if(k&&D[2]){if(F===void 0&&!(V in m))return!1}else{var Q=new n;if(Y)var ae=Y(F,$,V,m,g,Q);if(!(ae===void 0?t($,F,i|a,Y,Q):ae))return!1}}return!0}return Ix=h,Ix}var Ux,z2;function LU(){if(z2)return Ux;z2=1;var n=cc();function t(i){return i===i&&!n(i)}return Ux=t,Ux}var Cx,F2;function oN(){if(F2)return Cx;F2=1;var n=LU(),t=Sg();function i(a){for(var h=t(a),m=h.length;m--;){var g=h[m],s=a[g];h[m]=[g,s,n(s)]}return h}return Cx=i,Cx}var Vx,Z2;function OU(){if(Z2)return Vx;Z2=1;function n(t,i){return function(a){return a==null?!1:a[t]===i&&(i!==void 0||t in Object(a))}}return Vx=n,Vx}var Ax,j2;function lN(){if(j2)return Ax;j2=1;var n=sN(),t=oN(),i=OU();function a(h){var m=t(h);return m.length==1&&m[0][2]?i(m[0][0],m[0][1]):function(g){return g===h||n(g,h,m)}}return Ax=a,Ax}var kx,B2;function $Y(){if(B2)return kx;B2=1;var n=jo(),t=xg(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function h(m,g){if(n(m))return!1;var s=typeof m;return s=="number"||s=="symbol"||s=="boolean"||m==null||t(m)?!0:a.test(m)||!i.test(m)||g!=null&&m in Object(g)}return kx=h,kx}var Dx,$2;function uN(){if($2)return Dx;$2=1;var n=LY(),t="Expected a function";function i(a,h){if(typeof a!="function"||h!=null&&typeof h!="function")throw new TypeError(t);var m=function(){var g=arguments,s=h?h.apply(this,g):g[0],Y=m.cache;if(Y.has(s))return Y.get(s);var E=a.apply(this,g);return m.cache=Y.set(s,E)||Y,E};return m.cache=new(i.Cache||n),m}return i.Cache=n,Dx=i,Dx}var Rx,G2;function cN(){if(G2)return Rx;G2=1;var n=uN(),t=500;function i(a){var h=n(a,function(g){return m.size===t&&m.clear(),g}),m=h.cache;return h}return Rx=i,Rx}var Lx,q2;function hN(){if(q2)return Lx;q2=1;var n=cN(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n(function(h){var m=[];return h.charCodeAt(0)===46&&m.push(""),h.replace(t,function(g,s,Y,E){m.push(Y?E.replace(i,"$1"):s||g)}),m});return Lx=a,Lx}var Ox,H2;function GY(){if(H2)return Ox;H2=1;function n(t,i){for(var a=-1,h=t==null?0:t.length,m=Array(h);++a<h;)m[a]=i(t[a],a,t);return m}return Ox=n,Ox}var Xx,K2;function dN(){if(K2)return Xx;K2=1;var n=wp(),t=GY(),i=jo(),a=xg(),h=n?n.prototype:void 0,m=h?h.toString:void 0;function g(s){if(typeof s=="string")return s;if(i(s))return t(s,g)+"";if(a(s))return m?m.call(s):"";var Y=s+"";return Y=="0"&&1/s==-1/0?"-0":Y}return Xx=g,Xx}var Nx,Q2;function fN(){if(Q2)return Nx;Q2=1;var n=dN();function t(i){return i==null?"":n(i)}return Nx=t,Nx}var zx,J2;function Ev(){if(J2)return zx;J2=1;var n=jo(),t=$Y(),i=hN(),a=fN();function h(m,g){return n(m)?m:t(m,g)?[m]:i(a(m))}return zx=h,zx}var Fx,eE;function Tg(){if(eE)return Fx;eE=1;var n=xg();function t(i){if(typeof i=="string"||n(i))return i;var a=i+"";return a=="0"&&1/i==-1/0?"-0":a}return Fx=t,Fx}var Zx,tE;function Mv(){if(tE)return Zx;tE=1;var n=Ev(),t=Tg();function i(a,h){h=n(h,a);for(var m=0,g=h.length;a!=null&&m<g;)a=a[t(h[m++])];return m&&m==g?a:void 0}return Zx=i,Zx}var jx,rE;function pN(){if(rE)return jx;rE=1;var n=Mv();function t(i,a,h){var m=i==null?void 0:n(i,a);return m===void 0?h:m}return jx=t,jx}var Bx,nE;function mN(){if(nE)return Bx;nE=1;function n(t,i){return t!=null&&i in Object(t)}return Bx=n,Bx}var $x,iE;function gN(){if(iE)return $x;iE=1;var n=Ev(),t=zY(),i=jo(),a=SY(),h=YY(),m=Tg();function g(s,Y,E){Y=n(Y,s);for(var I=-1,k=Y.length,D=!1;++I<k;){var V=m(Y[I]);if(!(D=s!=null&&E(s,V)))break;s=s[V]}return D||++I!=k?D:(k=s==null?0:s.length,!!k&&h(k)&&a(V,k)&&(i(s)||t(s)))}return $x=g,$x}var Gx,aE;function yN(){if(aE)return Gx;aE=1;var n=mN(),t=gN();function i(a,h){return a!=null&&t(a,h,n)}return Gx=i,Gx}var qx,sE;function vN(){if(sE)return qx;sE=1;var n=BY(),t=pN(),i=yN(),a=$Y(),h=LU(),m=OU(),g=Tg(),s=1,Y=2;function E(I,k){return a(I)&&h(k)?m(g(I),k):function(D){var V=t(D,I);return V===void 0&&V===k?i(D,I):n(k,V,s|Y)}}return qx=E,qx}var Hx,oE;function Pv(){if(oE)return Hx;oE=1;function n(t){return t}return Hx=n,Hx}var Kx,lE;function _N(){if(lE)return Kx;lE=1;function n(t){return function(i){return i==null?void 0:i[t]}}return Kx=n,Kx}var Qx,uE;function xN(){if(uE)return Qx;uE=1;var n=Mv();function t(i){return function(a){return n(a,i)}}return Qx=t,Qx}var Jx,cE;function bN(){if(cE)return Jx;cE=1;var n=_N(),t=xN(),i=$Y(),a=Tg();function h(m){return i(m)?n(a(m)):t(m)}return Jx=h,Jx}var eb,hE;function Iv(){if(hE)return eb;hE=1;var n=lN(),t=vN(),i=Pv(),a=jo(),h=bN();function m(g){return typeof g=="function"?g:g==null?i:typeof g=="object"?a(g)?t(g[0],g[1]):n(g):h(g)}return eb=m,eb}var tb,dE;function wN(){if(dE)return tb;dE=1;var n=aN(),t=Iv(),i=mU(),a=Math.max;function h(m,g,s){var Y=m==null?0:m.length;if(!Y)return-1;var E=s==null?0:i(s);return E<0&&(E=a(Y+E,0)),n(m,t(g,3),E)}return tb=h,tb}var YN=wN();const SN=Aa(YN);var rb,fE;function TN(){if(fE)return rb;fE=1;var n=Math.ceil,t=Math.max;function i(a,h,m,g){for(var s=-1,Y=t(n((h-a)/(m||1)),0),E=Array(Y);Y--;)E[g?Y:++s]=a,a+=m;return E}return rb=i,rb}var nb,pE;function WN(){if(pE)return nb;pE=1;var n=TN(),t=vv(),i=pU();function a(h){return function(m,g,s){return s&&typeof s!="number"&&t(m,g,s)&&(g=s=void 0),m=i(m),g===void 0?(g=m,m=0):g=i(g),s=s===void 0?m<g?1:-1:i(s),n(m,g,s,h)}}return nb=a,nb}var ib,mE;function EN(){if(mE)return ib;mE=1;var n=WN(),t=n();return ib=t,ib}var MN=EN();const PN=Aa(MN);var gE=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function IN(n,t){return!!(n===t||gE(n)&&gE(t))}function UN(n,t){if(n.length!==t.length)return!1;for(var i=0;i<n.length;i++)if(!IN(n[i],t[i]))return!1;return!0}function XU(n,t){t===void 0&&(t=UN);var i=null;function a(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];if(i&&i.lastThis===this&&t(h,i.lastArgs))return i.lastResult;var g=n.apply(this,h);return i={lastResult:g,lastArgs:h,lastThis:this},g}return a.clear=function(){i=null},a}function Bw(n,t){var i=TY(n);return i?i.innerWidth:Id(n).width}var ab,yE;function CN(){if(yE)return ab;yE=1;var n=wp(),t=zY(),i=jo(),a=n?n.isConcatSpreadable:void 0;function h(m){return i(m)||t(m)||!!(a&&m&&m[a])}return ab=h,ab}var sb,vE;function NU(){if(vE)return sb;vE=1;var n=XY(),t=CN();function i(a,h,m,g,s){var Y=-1,E=a.length;for(m||(m=t),s||(s=[]);++Y<E;){var I=a[Y];h>0&&m(I)?h>1?i(I,h-1,m,g,s):n(s,I):g||(s[s.length]=I)}return s}return sb=i,sb}var ob,_E;function VN(){if(_E)return ob;_E=1;function n(t){return function(i,a,h){for(var m=-1,g=Object(i),s=h(i),Y=s.length;Y--;){var E=s[t?Y:++m];if(a(g[E],E,g)===!1)break}return i}}return ob=n,ob}var lb,xE;function AN(){if(xE)return lb;xE=1;var n=VN(),t=n();return lb=t,lb}var ub,bE;function qY(){if(bE)return ub;bE=1;var n=AN(),t=Sg();function i(a,h){return a&&n(a,h,t)}return ub=i,ub}var cb,wE;function kN(){if(wE)return cb;wE=1;var n=_g();function t(i,a){return function(h,m){if(h==null)return h;if(!n(h))return i(h,m);for(var g=h.length,s=a?g:-1,Y=Object(h);(a?s--:++s<g)&&m(Y[s],s,Y)!==!1;);return h}}return cb=t,cb}var hb,YE;function DN(){if(YE)return hb;YE=1;var n=qY(),t=kN(),i=t(n);return hb=i,hb}var db,SE;function RN(){if(SE)return db;SE=1;var n=DN(),t=_g();function i(a,h){var m=-1,g=t(a)?Array(a.length):[];return n(a,function(s,Y,E){g[++m]=h(s,Y,E)}),g}return db=i,db}var fb,TE;function LN(){if(TE)return fb;TE=1;function n(t,i){var a=t.length;for(t.sort(i);a--;
835)t[a]=t[a].value;return t}return fb=n,fb}var pb,WE;function ON(){if(WE)return pb;WE=1;var n=xg();function t(i,a){if(i!==a){var h=i!==void 0,m=i===null,g=i===i,s=n(i),Y=a!==void 0,E=a===null,I=a===a,k=n(a);if(!E&&!k&&!s&&i>a||s&&Y&&I&&!E&&!k||m&&Y&&I||!h&&I||!g)return 1;if(!m&&!s&&!k&&i<a||k&&h&&g&&!m&&!s||E&&h&&g||!Y&&g||!I)return-1}return 0}return pb=t,pb}var mb,EE;function XN(){if(EE)return mb;EE=1;var n=ON();function t(i,a,h){for(var m=-1,g=i.criteria,s=a.criteria,Y=g.length,E=h.length;++m<Y;){var I=n(g[m],s[m]);if(I){if(m>=E)return I;var k=h[m];return I*(k=="desc"?-1:1)}}return i.index-a.index}return mb=t,mb}var gb,ME;function NN(){if(ME)return gb;ME=1;var n=GY(),t=Mv(),i=Iv(),a=RN(),h=LN(),m=Tv(),g=XN(),s=Pv(),Y=jo();function E(I,k,D){k.length?k=n(k,function($){return Y($)?function(Q){return t(Q,$.length===1?$[0]:$)}:$}):k=[s];var V=-1;k=n(k,m(i));var F=a(I,function($,Q,ae){var le=n(k,function(_e){return _e($)});return{criteria:le,index:++V,value:$}});return h(F,function($,Q){return g($,Q,D)})}return gb=E,gb}var yb,PE;function zN(){if(PE)return yb;PE=1;function n(t,i,a){switch(a.length){case 0:return t.call(i);case 1:return t.call(i,a[0]);case 2:return t.call(i,a[0],a[1]);case 3:return t.call(i,a[0],a[1],a[2])}return t.apply(i,a)}return yb=n,yb}var vb,IE;function zU(){if(IE)return vb;IE=1;var n=zN(),t=Math.max;function i(a,h,m){return h=t(h===void 0?a.length-1:h,0),function(){for(var g=arguments,s=-1,Y=t(g.length-h,0),E=Array(Y);++s<Y;)E[s]=g[h+s];s=-1;for(var I=Array(h+1);++s<h;)I[s]=g[s];return I[h]=m(E),n(a,this,I)}}return vb=i,vb}var _b,UE;function FN(){if(UE)return _b;UE=1;function n(t){return function(){return t}}return _b=n,_b}var xb,CE;function FU(){if(CE)return xb;CE=1;var n=Fd(),t=function(){try{var i=n(Object,"defineProperty");return i({},"",{}),i}catch{}}();return xb=t,xb}var bb,VE;function ZN(){if(VE)return bb;VE=1;var n=FN(),t=FU(),i=Pv(),a=t?function(h,m){return t(h,"toString",{configurable:!0,enumerable:!1,value:n(m),writable:!0})}:i;return bb=a,bb}var wb,AE;function jN(){if(AE)return wb;AE=1;var n=800,t=16,i=Date.now;function a(h){var m=0,g=0;return function(){var s=i(),Y=t-(s-g);if(g=s,Y>0){if(++m>=n)return arguments[0]}else m=0;return h.apply(void 0,arguments)}}return wb=a,wb}var Yb,kE;function ZU(){if(kE)return Yb;kE=1;var n=ZN(),t=jN(),i=t(n);return Yb=i,Yb}var Sb,DE;function jU(){if(DE)return Sb;DE=1;var n=Pv(),t=zU(),i=ZU();function a(h,m){return i(t(h,m,n),h+"")}return Sb=a,Sb}var Tb,RE;function BN(){if(RE)return Tb;RE=1;var n=NU(),t=NN(),i=jU(),a=vv(),h=i(function(m,g){if(m==null)return[];var s=g.length;return s>1&&a(m,g[0],g[1])?g=[]:s>2&&a(g[0],g[1],g[2])&&(g=[g[0]]),t(m,n(g,1),[])});return Tb=h,Tb}var $N=BN();const GN=Aa($N);function BU(n){return KI(n)||hU(n)||_Y(n)||QI()}var Wb,LE;function qN(){if(LE)return Wb;LE=1;function n(t){var i=[];if(t!=null)for(var a in Object(t))i.push(a);return i}return Wb=n,Wb}var Eb,OE;function HN(){if(OE)return Eb;OE=1;var n=cc(),t=jY(),i=qN(),a=Object.prototype,h=a.hasOwnProperty;function m(g){if(!n(g))return i(g);var s=t(g),Y=[];for(var E in g)E=="constructor"&&(s||!h.call(g,E))||Y.push(E);return Y}return Eb=m,Eb}var Mb,XE;function Uv(){if(XE)return Mb;XE=1;var n=AU(),t=HN(),i=_g();function a(h){return i(h)?n(h,!0):t(h)}return Mb=a,Mb}var Pb,NE;function KN(){if(NE)return Pb;NE=1;var n=jU(),t=vg(),i=vv(),a=Uv(),h=Object.prototype,m=h.hasOwnProperty,g=n(function(s,Y){s=Object(s);var E=-1,I=Y.length,k=I>2?Y[2]:void 0;for(k&&i(Y[0],Y[1],k)&&(I=1);++E<I;)for(var D=Y[E],V=a(D),F=-1,$=V.length;++F<$;){var Q=V[F],ae=s[Q];(ae===void 0||t(ae,h[Q])&&!m.call(s,Q))&&(s[Q]=D[Q])}return s});return Pb=g,Pb}var QN=KN();const JN=Aa(QN);var Ib,zE;function HY(){if(zE)return Ib;zE=1;var n=FU();function t(i,a,h){a=="__proto__"&&n?n(i,a,{configurable:!0,enumerable:!0,value:h,writable:!0}):i[a]=h}return Ib=t,Ib}var Ub,FE;function e5(){if(FE)return Ub;FE=1;var n=HY(),t=qY(),i=Iv();function a(h,m){var g={};return m=i(m,3),t(h,function(s,Y,E){n(g,Y,m(s,Y,E))}),g}return Ub=a,Ub}var t5=e5();const r5=Aa(t5);var Cb,ZE;function $U(){if(ZE)return Cb;ZE=1;function n(t,i){for(var a=-1,h=t==null?0:t.length;++a<h&&i(t[a],a,t)!==!1;);return t}return Cb=n,Cb}var Vb,jE;function GU(){if(jE)return Vb;jE=1;var n=HY(),t=vg(),i=Object.prototype,a=i.hasOwnProperty;function h(m,g,s){var Y=m[g];(!(a.call(m,g)&&t(Y,s))||s===void 0&&!(g in m))&&n(m,g,s)}return Vb=h,Vb}var Ab,BE;function Wg(){if(BE)return Ab;BE=1;var n=GU(),t=HY();function i(a,h,m,g){var s=!m;m||(m={});for(var Y=-1,E=h.length;++Y<E;){var I=h[Y],k=g?g(m[I],a[I],I,m,a):void 0;k===void 0&&(k=a[I]),s?t(m,I,k):n(m,I,k)}return m}return Ab=i,Ab}var kb,$E;function n5(){if($E)return kb;$E=1;var n=Wg(),t=Sg();function i(a,h){return a&&n(h,t(h),a)}return kb=i,kb}var Db,GE;function i5(){if(GE)return Db;GE=1;var n=Wg(),t=Uv();function i(a,h){return a&&n(h,t(h),a)}return Db=i,Db}var Lm={exports:{}};Lm.exports;var qE;function a5(){return qE||(qE=1,function(n,t){var i=bu(),a=t&&!t.nodeType&&t,h=a&&!0&&n&&!n.nodeType&&n,m=h&&h.exports===a,g=m?i.Buffer:void 0,s=g?g.allocUnsafe:void 0;function Y(E,I){if(I)return E.slice();var k=E.length,D=s?s(k):new E.constructor(k);return E.copy(D),D}n.exports=Y}(Lm,Lm.exports)),Lm.exports}var Rb,HE;function s5(){if(HE)return Rb;HE=1;function n(t,i){var a=-1,h=t.length;for(i||(i=Array(h));++a<h;)i[a]=t[a];return i}return Rb=n,Rb}var Lb,KE;function o5(){if(KE)return Lb;KE=1;var n=Wg(),t=NY();function i(a,h){return n(a,t(a),h)}return Lb=i,Lb}var Ob,QE;
835function Cv(){if(QE)return Ob;QE=1;var n=kU(),t=n(Object.getPrototypeOf,Object);return Ob=t,Ob}var Xb,JE;function qU(){if(JE)return Xb;JE=1;var n=XY(),t=Cv(),i=NY(),a=VU(),h=Object.getOwnPropertySymbols,m=h?function(g){for(var s=[];g;)n(s,i(g)),g=t(g);return s}:a;return Xb=m,Xb}var Nb,eM;function l5(){if(eM)return Nb;eM=1;var n=Wg(),t=qU();function i(a,h){return n(a,t(a),h)}return Nb=i,Nb}var zb,tM;function HU(){if(tM)return zb;tM=1;var n=CU(),t=qU(),i=Uv();function a(h){return n(h,i,t)}return zb=a,zb}var Fb,rM;function u5(){if(rM)return Fb;rM=1;var n=Object.prototype,t=n.hasOwnProperty;function i(a){var h=a.length,m=new a.constructor(h);return h&&typeof a[0]=="string"&&t.call(a,"index")&&(m.index=a.index,m.input=a.input),m}return Fb=i,Fb}var Zb,nM;function KY(){if(nM)return Zb;nM=1;var n=UU();function t(i){var a=new i.constructor(i.byteLength);return new n(a).set(new n(i)),a}return Zb=t,Zb}var jb,iM;function c5(){if(iM)return jb;iM=1;var n=KY();function t(i,a){var h=a?n(i.buffer):i.buffer;return new i.constructor(h,i.byteOffset,i.byteLength)}return jb=t,jb}var Bb,aM;function h5(){if(aM)return Bb;aM=1;var n=/\w*$/;function t(i){var a=new i.constructor(i.source,n.exec(i));return a.lastIndex=i.lastIndex,a}return Bb=t,Bb}var $b,sM;function d5(){if(sM)return $b;sM=1;var n=wp(),t=n?n.prototype:void 0,i=t?t.valueOf:void 0;function a(h){return i?Object(i.call(h)):{}}return $b=a,$b}var Gb,oM;function f5(){if(oM)return Gb;oM=1;var n=KY();function t(i,a){var h=a?n(i.buffer):i.buffer;return new i.constructor(h,i.byteOffset,i.length)}return Gb=t,Gb}var qb,lM;function p5(){if(lM)return qb;lM=1;var n=KY(),t=c5(),i=h5(),a=d5(),h=f5(),m="[object Boolean]",g="[object Date]",s="[object Map]",Y="[object Number]",E="[object RegExp]",I="[object Set]",k="[object String]",D="[object Symbol]",V="[object ArrayBuffer]",F="[object DataView]",$="[object Float32Array]",Q="[object Float64Array]",ae="[object Int8Array]",le="[object Int16Array]",_e="[object Int32Array]",fe="[object Uint8Array]",We="[object Uint8ClampedArray]",se="[object Uint16Array]",De="[object Uint32Array]";function ze(je,ft,ot){var st=je.constructor;switch(ft){case V:return n(je);case m:case g:return new st(+je);case F:return t(je,ot);case $:case Q:case ae:case le:case _e:case fe:case We:case se:case De:return h(je,ot);case s:return new st;case Y:case k:return new st(je);case E:return i(je);case I:return new st;case D:return a(je)}}return qb=ze,qb}var Hb,uM;function KU(){if(uM)return Hb;uM=1;var n=cc(),t=Object.create,i=function(){function a(){}return function(h){if(!n(h))return{};if(t)return t(h);a.prototype=h;var m=new a;return a.prototype=void 0,m}}();return Hb=i,Hb}var Kb,cM;function m5(){if(cM)return Kb;cM=1;var n=KU(),t=Cv(),i=jY();function a(h){return typeof h.constructor=="function"&&!i(h)?n(t(h)):{}}return Kb=a,Kb}var Qb,hM;function g5(){if(hM)return Qb;hM=1;var n=Wv(),t=Yh(),i="[object Map]";function a(h){return t(h)&&n(h)==i}return Qb=a,Qb}var Jb,dM;function y5(){if(dM)return Jb;dM=1;var n=g5(),t=Tv(),i=FY(),a=i&&i.isMap,h=a?t(a):n;return Jb=h,Jb}var ew,fM;function v5(){if(fM)return ew;fM=1;var n=Wv(),t=Yh(),i="[object Set]";function a(h){return t(h)&&n(h)==i}return ew=a,ew}var tw,pM;function _5(){if(pM)return tw;pM=1;var n=v5(),t=Tv(),i=FY(),a=i&&i.isSet,h=a?t(a):n;return tw=h,tw}var rw,mM;function x5(){if(mM)return rw;mM=1;var n=OY(),t=$U(),i=GU(),a=n5(),h=i5(),m=a5(),g=s5(),s=o5(),Y=l5(),E=DU(),I=HU(),k=Wv(),D=u5(),V=p5(),F=m5(),$=jo(),Q=Sv(),ae=y5(),le=cc(),_e=_5(),fe=Sg(),We=Uv(),se=1,De=2,ze=4,je="[object Arguments]",ft="[object Array]",ot="[object Boolean]",st="[object Date]",rt="[object Error]",Re="[object Function]",Yt="[object GeneratorFunction]",Tt="[object Map]",_t="[object Number]",Qe="[object Object]",bt="[object RegExp]",xt="[object Set]",Ue="[object String]",pt="[object Symbol]",Ft="[object WeakMap]",Ht="[object ArrayBuffer]",Gt="[object DataView]",rr="[object Float32Array]",or="[object Float64Array]",fr="[object Int8Array]",Sr="[object Int16Array]",Er="[object Int32Array]",Gr="[object Uint8Array]",Wn="[object Uint8ClampedArray]",pn="[object Uint16Array]",Yr="[object Uint32Array]",xr={};xr[je]=xr[ft]=xr[Ht]=xr[Gt]=xr[ot]=xr[st]=xr[rr]=xr[or]=xr[fr]=xr[Sr]=xr[Er]=xr[Tt]=xr[_t]=xr[Qe]=xr[bt]=xr[xt]=xr[Ue]=xr[pt]=xr[Gr]=xr[Wn]=xr[pn]=xr[Yr]=!0,xr[rt]=xr[Re]=xr[Ft]=!1;function ri(hr,_i,ui,Qr,an,Jr){var Fr,In=_i&se,ni=_i&De,Rn=_i&ze;if(ui&&(Fr=an?ui(hr,Qr,an,Jr):ui(hr)),Fr!==void 0)return Fr;
835if(!le(hr))return hr;var bn=$(hr);if(bn){if(Fr=D(hr),!In)return g(hr,Fr)}else{var mn=k(hr),xi=mn==Re||mn==Yt;if(Q(hr))return m(hr,In);if(mn==Qe||mn==je||xi&&!an){if(Fr=ni||xi?{}:F(hr),!In)return ni?Y(hr,h(Fr,hr)):s(hr,a(Fr,hr))}else{if(!xr[mn])return an?hr:{};Fr=V(hr,mn,In)}}Jr||(Jr=new n);var bi=Jr.get(hr);if(bi)return bi;Jr.set(hr,Fr),_e(hr)?hr.forEach(function(sn){Fr.add(ri(sn,_i,ui,sn,hr,Jr))}):ae(hr)&&hr.forEach(function(sn,Un){Fr.set(Un,ri(sn,_i,ui,Un,hr,Jr))});var Ln=Rn?ni?I:E:ni?We:fe,ci=bn?void 0:Ln(hr);return t(ci||hr,function(sn,Un){ci&&(Un=sn,sn=hr[Un]),i(Fr,Un,ri(sn,_i,ui,Un,hr,Jr))}),Fr}return rw=ri,rw}var nw,gM;function b5(){if(gM)return nw;gM=1;function n(t){var i=t==null?0:t.length;return i?t[i-1]:void 0}return nw=n,nw}var iw,yM;function w5(){if(yM)return iw;yM=1;var n=Mv(),t=dU();function i(a,h){return h.length<2?a:n(a,t(h,0,-1))}return iw=i,iw}var aw,vM;function Y5(){if(vM)return aw;vM=1;var n=Ev(),t=b5(),i=w5(),a=Tg();function h(m,g){return g=n(g,m),m=i(m,g),m==null||delete m[a(t(g))]}return aw=h,aw}var sw,_M;function S5(){if(_M)return sw;_M=1;var n=Yp(),t=Cv(),i=Yh(),a="[object Object]",h=Function.prototype,m=Object.prototype,g=h.toString,s=m.hasOwnProperty,Y=g.call(Object);function E(I){if(!i(I)||n(I)!=a)return!1;var k=t(I);if(k===null)return!0;var D=s.call(k,"constructor")&&k.constructor;return typeof D=="function"&&D instanceof D&&g.call(D)==Y}return sw=E,sw}var ow,xM;function T5(){if(xM)return ow;xM=1;var n=S5();function t(i){return n(i)?void 0:i}return ow=t,ow}var lw,bM;function W5(){if(bM)return lw;bM=1;var n=NU();function t(i){var a=i==null?0:i.length;return a?n(i,1):[]}return lw=t,lw}var uw,wM;function E5(){if(wM)return uw;wM=1;var n=W5(),t=zU(),i=ZU();function a(h){return i(t(h,void 0,n),h+"")}return uw=a,uw}var cw,YM;function M5(){if(YM)return cw;YM=1;var n=GY(),t=x5(),i=Y5(),a=Ev(),h=Wg(),m=T5(),g=E5(),s=HU(),Y=1,E=2,I=4,k=g(function(D,V){var F={};if(D==null)return F;var $=!1;V=n(V,function(ae){return ae=a(ae,D),$||($=ae.length>1),ae}),h(D,s(D),F),$&&(F=t(F,Y|E|I,m));for(var Q=V.length;Q--;)i(F,V[Q]);return F});return cw=k,cw}var P5=M5();const I5=Aa(P5);var hw,SM;function U5(){if(SM)return hw;SM=1;var n=$U(),t=KU(),i=qY(),a=Iv(),h=Cv(),m=jo(),g=Sv(),s=wY(),Y=cc(),E=ZY();function I(k,D,V){var F=m(k),$=F||g(k)||E(k);if(D=a(D,4),V==null){var Q=k&&k.constructor;$?V=F?new Q:[]:Y(k)?V=s(Q)?t(h(k)):{}:V={}}return($?n:i)(k,function(ae,le,_e){return D(V,ae,le,_e)}),V}return hw=I,hw}var C5=U5();const V5=Aa(C5);var Uy={exports:{}},A5=Uy.exports,TM;function k5(){return TM||(TM=1,function(n,t){(function(i,a){n.exports=a()})(A5,function(){return function(i,a,h){a.prototype.isBetween=function(m,g,s,Y){var E=h(m),I=h(g),k=(Y=Y||"()")[0]==="(",D=Y[1]===")";return(k?this.isAfter(E,s):!this.isBefore(E,s))&&(D?this.isBefore(I,s):!this.isAfter(I,s))||(k?this.isBefore(E,s):!this.isAfter(E,s))&&(D?this.isAfter(I,s):!this.isBefore(I,s))}}})}(Uy)),Uy.exports}k5();var Cy={exports:{}},D5=Cy.exports,WM;function R5(){return WM||(WM=1,function(n,t){(function(i,a){n.exports=a()})(D5,function(){return function(i,a){a.prototype.isSameOrAfter=function(h,m){return this.isSame(h,m)||this.isAfter(h,m)}}})}(Cy)),Cy.exports}R5();var Vy={exports:{}},L5=Vy.exports,EM;function O5(){return EM||(EM=1,function(n,t){(function(i,a){n.exports=a()})(L5,function(){return function(i,a){a.prototype.isSameOrBefore=function(h,m){return this.isSame(h,m)||this.isBefore(h,m)}}})}(Vy)),Vy.exports}O5();var Ay={exports:{}},X5=Ay.exports,MM;function N5(){return MM||(MM=1,function(n,t){(function(i,a){n.exports=a()})(X5,function(){return function(i,a,h){var m=a.prototype,g=function(k){return k&&(k.indexOf?k:k.s)},s=function(k,D,V,F,$){var Q=k.name?k:k.$locale(),ae=g(Q[D]),le=g(Q[V]),_e=ae||le.map(function(We){return We.slice(0,F)});if(!$)return _e;var fe=Q.weekStart;return _e.map(function(We,se){return _e[(se+(fe||0))%7]})},Y=function(){return h.Ls[h.locale()]},E=function(k,D){return k.formats[D]||function(V){return V.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,$,Q){return $||Q.slice(1)})}(k.formats[D.toUpperCase()])},I=function(){var k=this;return{months:function(D){return D?D.format("MMMM"):s(k,"months")},monthsShort:function(D){return D?D.format("MMM"):s(k,"monthsShort","months",3)},firstDayOfWeek:function(){return k.$locale().weekStart||0},weekdays:function(D){return D?D.format("dddd"):s(k,"weekdays")},weekdaysMin:function(D){return D?D.format("dd"):s(k,"weekdaysMin","weekdays",2)},weekdaysShort:function(D){return D?D.format("ddd"):s(k,"weekdaysShort","weekdays",3)},longDateFormat:function(D){return E(k.$locale(),D)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};m.localeData=function(){return I.bind(this)()},h.localeData=function(){var k=Y();return{firstDayOfWeek:function(){return k.weekStart||0},weekdays:function(){return h.weekdays()},weekdaysShort:function(){return h.weekdaysShort()},weekdaysMin:function(){return h.weekdaysMin()},months:function(){return h.months()},monthsShort:function(){return h.monthsShort()},longDateFormat:function(D){return E(k,D)},meridiem:k.meridiem,ordinal:k.ordinal}},h.months=function(){return s(Y(),"months")},h.monthsShort=function(){return s(Y(),"monthsShort","months",3)},h.weekdays=function(k){return s(Y(),"weekdays",null,null,k)},h.weekdaysShort=function(k){return s(Y(),"weekdaysShort","weekdays",3,k)},h.weekdaysMin=function(k){return s(Y(),"weekdaysMin","weekdays",2,k)}}})}(Ay)),Ay.exports}N5();var ky={exports:{}},z5=ky.exports,PM;function F5(){return PM||(PM=1,function(n,t){(function(i,a){n.exports=a()})(z5,function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(a,h,m){var g=h.prototype,s=g.format;m.en.formats=i,g.format=function(Y){Y===void 0&&(Y="YYYY-MM-DDTHH:mm:ssZ");var E=this.$locale().formats,I=function(k,D){return k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(V,F,$){var Q=$&&$.toUpperCase();return F||D[$]||i[$]||D[Q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ae,le,_e){return le||_e.slice(1)})})}(Y,E===void 0?{}:E);return s.call(this,I)}}})}(ky)),ky.exports}F5();var Dy={exports:{}},Z5=Dy.exports,IM;function j5(){return IM||(IM=1,function(n,t){(function(i,a){n.exports=a()})(Z5,function(){return function(i,a,h){var m=function(g,s){if(!s||!s.length||s.length===1&&!s[0]||s.length===1&&Array.isArray(s[0])&&!s[0].length)return null;var Y;s.length===1&&s[0].length>0&&(s=s[0]),Y=(s=s.filter(function(I){return I}))[0];for(var E=1;E<s.length;E+=1)s[E].isValid()&&!s[E][g](Y)||(Y=s[E]);return Y};h.max=function(){var g=[].slice.call(arguments,0);return m("isAfter",g)},h.min=function(){var g=[].slice.call(arguments,0);return m("isBefore",g)}}})}(Dy)),Dy.exports}j5();var Ry={exports:{}},B5=Ry.exports,UM;function $5(){return UM||(UM=1,function(n,t){(function(i,a){n.exports=a()})(B5,function(){var i="minute",a=/[+-]\d\d(?::?\d\d)?/g,h=/([+-]|\d\d)/g;return function(m,g,s){var Y=g.prototype;s.utc=function($){var Q={date:$,utc:!0,args:arguments};return new g(Q)},Y.utc=function($){var Q=s(this.toDate(),{locale:this.$L,utc:!0});return $?Q.add(this.utcOffset(),i):Q},Y.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var E=Y.parse;Y.parse=function($){$.utc&&(this.$u=!0),this.$utils().u($.$offset)||(this.$offset=$.$offset),E.call(this,$)};var I=Y.init;Y.init=function(){if(this.$u){var $=this.$d;this.$y=$.getUTCFullYear(),this.$M=$.getUTCMonth(),this.$D=$.getUTCDate(),this.$W=$.getUTCDay(),this.$H=$.getUTCHours(),this.$m=$.getUTCMinutes(),this.$s=$.getUTCSeconds(),this.$ms=$.getUTCMilliseconds()}else I.call(this)};var k=Y.utcOffset;Y.utcOffset=function($,Q){var ae=this.$utils().u;if(ae($))return this.$u?0:ae(this.$offset)?k.call(this):this.$offset;if(typeof $=="string"&&($=function(We){We===void 0&&(We="");var se=We.match(a);if(!se)return null;var De=(""+se[0]).match(h)||["-",0,0],ze=De[0],je=60*+De[1]+ +De[2];return je===0?0:ze==="+"?je:-je}($),$===null))return this;var le=Math.abs($)<=16?60*$:$,_e=this;if(Q)return _e.$offset=le,_e.$u=$===0,_e;if($!==0){var fe=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(_e=this.local().add(le+fe,i)).$offset=le,_e.$x.$localOffset=fe}else _e=this.utc();return _e};var D=Y.format;Y.format=function($){var Q=$||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return D.call(this,Q)},Y.valueOf=function(){var $=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*$},Y.isUTC=function(){return!!this.$u},Y.toISOString=function(){return this.toDate().toISOString()},Y.toString=function(){return this.toDate().toUTCString()};var V=Y.toDate;Y.toDate=function($){return $==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():V.call(this)};var F=Y.diff;Y.diff=function($,Q,ae){if($&&this.$u===$.$u)return F.call(this,$,Q,ae);var le=this.local(),_e=s($).local();return F.call(le,_e,Q,ae)}}})}(Ry)),Ry.exports}$5();var Ly={exports:{}},G5=Ly.exports,CM;function q5(){return CM||(CM=1,function(n,t){(function(i,a){n.exports=a()})(G5,function(){return function(i,a){a.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}})}(Ly)),Ly.exports}q5();function gu(n){return n.children}var Ns={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"},vs={MONTH:"month",WEEK:"week",WORK_WEEK:"work_week",DAY:"day",AGENDA:"agenda"},VM=Object.keys(vs).map(function(n){return vs[n]});Nt.oneOfType([Nt.string,Nt.func]);Nt.any;Nt.func;Nt.oneOfType([Nt.arrayOf(Nt.oneOf(VM)),Nt.objectOf(function(n,t){var i=VM.indexOf(t)!==-1&&typeof n[t]=="boolean";if(i)return null;for(var a=arguments.length,h=new Array(a>2?a-2:0),m=2;m<a;m++)h[m-2]=arguments[m];return Nt.elementType.apply(Nt,[n,t].concat(h))})]);
835Nt.oneOfType([Nt.oneOf(["overlap","no-overlap"]),Nt.func]);var AM={seconds:1e3,minutes:1e3*60,hours:1e3*60*60,day:1e3*60*60*24};function QU(n,t){var i=Va(n,"month");return Va(i,"week",t.startOfWeek())}function JU(n,t){var i=Jy(n,"month");return Jy(i,"week",t.startOfWeek())}function H5(n,t){for(var i=QU(n,t),a=JU(n,t),h=[];xp(i,a,"day");)h.push(i),i=Pl(i,1,"day");return h}function K5(n,t){var i=Va(n,t);return _p(i,n)?i:Pl(i,1,t)}function Q5(n,t){for(var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",a=n,h=[];xp(a,t,i);)h.push(a),a=Pl(a,1,i);return h}function J5(n,t){return t==null&&n==null?null:(t==null&&(t=new Date),n==null&&(n=new Date),n=Va(n,"day"),n=ng(n,ng(t)),n=op(n,op(t)),n=rg(n,rg(t)),tg(n,tg(t)))}function kM(n){return ng(n)===0&&op(n)===0&&rg(n)===0&&tg(n)===0}function ez(n,t,i,a){return i==="day"&&(i="date"),Math.abs(MT[i](n,void 0,a)-MT[i](t,void 0,a))}function QY(n,t,i){return!i||i==="milliseconds"?Math.abs(+n-+t):Math.round(Math.abs(+Va(n,i)/AM[i]-+Va(t,i)/AM[i]))}var tz=Nt.oneOfType([Nt.string,Nt.func]);function rz(n,t,i,a,h){var m=typeof a=="function"?a(i,h,n):t.call(n,i,a,h);return qm(m==null||typeof m=="string","`localizer format(..)` must return a string, null, or undefined"),m}function nz(n,t,i){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,t+i,0,0)}function JY(n,t){return n.getTimezoneOffset()-t.getTimezoneOffset()}function iz(n,t){return QY(n,t,"minutes")+JY(n,t)}function az(n){var t=Va(n,"day");return QY(t,n,"minutes")+JY(t,n)}function sz(n,t){return bY(n,t,"day")}function oz(n,t,i){var a=_p(n,t,"minutes");return a?yg(t,i,"minutes"):yv(t,i,"minutes")}function $w(n,t){return ez(n,t,"day")}function lz(n){var t=n.evtA,i=t.start,a=t.end,h=t.allDay,m=n.evtB,g=m.start,s=m.end,Y=m.allDay,E=+Va(i,"day")-+Va(g,"day"),I=$w(i,a),k=$w(g,s);return E||k-I||!!Y-!!h||+i-+g||+a-+s}function uz(n){var t=n.event,i=t.start,a=t.end,h=n.range,m=h.start,g=h.end,s=Va(i,"day"),Y=xp(s,g,"day"),E=xY(s,a,"minutes"),I=E?yv(a,m,"minutes"):yg(a,m,"minutes");return Y&&I}function cz(n,t){return _p(n,t,"day")}function hz(n,t){return kM(n)&&kM(t)}var dz=ia(function n(t){var i=this;na(this,n),qm(typeof t.format=="function","date localizer `format(..)` must be a function"),qm(typeof t.firstOfWeek=="function","date localizer `firstOfWeek(..)` must be a function"),this.propType=t.propType||tz,this.formats=t.formats,this.format=function(){for(var a=arguments.length,h=new Array(a),m=0;m<a;m++)h[m]=arguments[m];return rz.apply(void 0,[i,t.format].concat(h))},this.startOfWeek=t.firstOfWeek,this.merge=t.merge||J5,this.inRange=t.inRange||oU,this.lt=t.lt||bY,this.lte=t.lte||xp,this.gt=t.gt||yv,this.gte=t.gte||yg,this.eq=t.eq||_p,this.neq=t.neq||xY,this.startOf=t.startOf||Va,this.endOf=t.endOf||Jy,this.add=t.add||Pl,this.range=t.range||Q5,this.diff=t.diff||QY,this.ceil=t.ceil||K5,this.min=t.min||aU,this.max=t.max||sU,this.minutes=t.minutes||op,this.daySpan=t.daySpan||$w,this.firstVisibleDay=t.firstVisibleDay||QU,this.lastVisibleDay=t.lastVisibleDay||JU,this.visibleDays=t.visibleDays||H5,this.getSlotDate=t.getSlotDate||nz,this.getTimezoneOffset=t.getTimezoneOffset||function(a){return a.getTimezoneOffset()},this.getDstOffset=t.getDstOffset||JY,this.getTotalMin=t.getTotalMin||iz,this.getMinutesFromMidnight=t.getMinutesFromMidnight||az,this.continuesPrior=t.continuesPrior||sz,this.continuesAfter=t.continuesAfter||oz,this.sortEvents=t.sortEvents||lz,this.inEventRange=t.inEventRange||uz,this.isSameDate=t.isSameDate||cz,this.startAndEndAreDateOnly=t.startAndEndAreDateOnly||hz,this.segmentOffset=t.browserTZOffset?t.browserTZOffset():0});function fz(n,t,i,a){var h=Pn(Pn({},n.formats),i);return Pn(Pn({},n),{},{messages:a,startOfWeek:function(){return n.startOfWeek(t)},format:function(g,s){return n.format(g,h[s]||s,t)}})}var pz=function(n){function t(){var i;na(this,t);for(var a=arguments.length,h=new Array(a),m=0;m<a;m++)h[m]=arguments[m];return i=es(this,t,[].concat(h)),i.navigate=function(g){i.props.onNavigate(g)},i.view=function(g){i.props.onView(g)},i}return ts(t,n),ia(t,[{key:"render",value:function(){var a=this.props,h=a.localizer.messages,m=a.label;return qe.createElement("div",{className:"rbc-toolbar"},qe.createElement("span",{className:"rbc-btn-group"},qe.createElement("button",{type:"button",onClick:this.navigate.bind(null,Ns.TODAY)},h.today),qe.createElement("button",{type:"button",onClick:this.navigate.bind(null,Ns.PREVIOUS)},h.previous),qe.createElement("button",{type:"button",onClick:this.navigate.bind(null,Ns.NEXT)},h.next)),qe.createElement("span",{className:"rbc-toolbar-label"},m),qe.createElement("span",{className:"rbc-btn-group"},this.viewNamesGroup(h)))}},{key:"viewNamesGroup",value:function(a){var h=this,m=this.props.views,g=this.props.view;if(m.length>1)return m.map(function(s){return qe.createElement("button",{type:"button",key:s,className:vi({"rbc-active":g===s}),onClick:h.view.bind(null,s)},a[s])})}}])}(qe.Component);function Gn(n,t){n&&n.apply(null,[].concat(t))}var mz={date:"Date",time:"Time",event:"Event",allDay:"All Day",week:"Week",work_week:"Work Week",day:"Day",month:"Month",previous:"Back",next:"Next",yesterday:"Yesterday",tomorrow:"Tomorrow",today:"Today",agenda:"Agenda",noEventsInRange:"There are no events in this range.",showMore:function(t){return"+".concat(t," more")}};function gz(n){return Pn(Pn({},mz),n)}function yz(n){var t=n.ref,i=n.callback;de.useEffect(function(){var a=function(m){t.current&&!t.current.contains(m.target)&&i()};return document.addEventListener("mousedown",a),function(){document.removeEventListener("mousedown",a)}},[t,i])}var vz=["style","className","event","selected","isAllDay","onSelect","onDoubleClick","onKeyPress","localizer","continuesPrior","continuesAfter","accessors","getters","children","components","slotStart","slotEnd"],eC=function(n){function t(){return na(this,t),es(this,t,arguments)}return ts(t,n),ia(t,[{key:"render",value:function(){var a=this.props,h=a.style,m=a.className,g=a.event,s=a.selected,Y=a.isAllDay,E=a.onSelect,I=a.onDoubleClick,k=a.onKeyPress,D=a.localizer,V=a.continuesPrior,F=a.continuesAfter,$=a.accessors,Q=a.getters,ae=a.children,le=a.components,_e=le.event,fe=le.eventWrapper,We=a.slotStart,se=a.slotEnd,De=xu(a,vz);delete De.resizable;var ze=$.title(g),je=$.tooltip(g),ft=$.end(g),ot=$.start(g),st=$.allDay(g),rt=Y||st||D.diff(ot,D.ceil(ft,"day"),"day")>1,Re=Q.eventProp(g,ot,ft,s),Yt=qe.createElement("div",{className:"rbc-event-content",title:je||void 0},_e?qe.createElement(_e,{event:g,continuesPrior:V,continuesAfter:F,title:ze,isAllDay:st,localizer:D,slotStart:We,slotEnd:se}):ze);return qe.createElement(fe,Object.assign({},this.props,{type:"date"}),qe.createElement("div",Object.assign({},De,{style:Pn(Pn({},Re.style),h),className:vi("rbc-event",m,Re.className,{"rbc-selected":s,"rbc-event-allday":rt,"rbc-event-continues-prior":V,"rbc-event-continues-after":F}),onClick:function(_t){return E&&E(g,_t)},onDoubleClick:function(_t){return I&&I(g,_t)},onKeyDown:function(_t){return k&&k(g,_t)}}),typeof ae=="function"?ae(Yt):Yt))}}])}(qe.Component);function Vv(n,t){return!n||t==null?!1:iN(n,t)}function tC(n,t){var i=n.right-n.left,a=i/t;return a}function rC(n,t,i,a){var h=tC(n,a);return i?a-1-Math.floor((t-n.left)/h):Math.floor((t-n.left)/h)}function _z(n,t){var i=t.x,a=t.y;return a>=n.top&&a<=n.bottom&&i>=n.left&&i<=n.right}function xz(n,t,i,a,h){var m=-1,g=-1,s=a-1,Y=tC(t,a),E=rC(t,i.x,h,a),I=t.to
835p<i.y&&t.bottom>i.y,k=t.top<n.y&&t.bottom>n.y,D=n.y>t.bottom,V=t.top>n.y,F=i.top<t.top&&i.bottom>t.bottom;return F&&(m=0,g=s),I&&(V?(m=0,g=E):D&&(m=E,g=s)),k&&(m=g=h?s-Math.floor((n.x-t.left)/Y):Math.floor((n.x-t.left)/Y),I?E<m?m=E:g=E:n.y<i.y?g=s:m=0),{startIdx:m,endIdx:g}}function bz(n){var t=n.target,i=n.offset,a=n.container,h=n.box,m=Id(t),g=m.top,s=m.left,Y=m.width,E=m.height,I=Id(a),k=I.top,D=I.left,V=I.width,F=I.height,$=Id(h),Q=$.width,ae=$.height,le=k+F,_e=D+V,fe=g+ae,We=s+Q,se=i.x,De=i.y,ze=fe>le?g-ae-De:g+De+E,je=We>_e?s+se-Q+Y:s+se;return{topOffset:ze,leftOffset:je}}function wz(n){var t=n.containerRef,i=n.accessors,a=n.getters,h=n.selected,m=n.components,g=n.localizer,s=n.position,Y=n.show,E=n.events,I=n.slotStart,k=n.slotEnd,D=n.onSelect,V=n.onDoubleClick,F=n.onKeyPress,$=n.handleDragStart,Q=n.popperRef,ae=n.target,le=n.offset;yz({ref:Q,callback:Y}),de.useLayoutEffect(function(){var We=bz({target:ae,offset:le,container:t.current,box:Q.current}),se=We.topOffset,De=We.leftOffset;Q.current.style.top="".concat(se,"px"),Q.current.style.left="".concat(De,"px")},[le.x,le.y,ae]);var _e=s.width,fe={minWidth:_e+_e/2};return qe.createElement("div",{style:fe,className:"rbc-overlay",ref:Q},qe.createElement("div",{className:"rbc-overlay-header"},g.format(I,"dayHeaderFormat")),E.map(function(We,se){return qe.createElement(eC,{key:se,type:"popup",localizer:g,event:We,getters:a,onSelect:D,accessors:i,components:m,onDoubleClick:V,onKeyPress:F,continuesPrior:g.lt(i.end(We),I,"day"),continuesAfter:g.gte(i.start(We),k,"day"),slotStart:I,slotEnd:k,selected:Vv(We,h),draggable:!0,onDragStart:function(){return $(We)},onDragEnd:function(){return Y()}})}))}var nC=qe.forwardRef(function(n,t){return qe.createElement(wz,Object.assign({},n,{popperRef:t}))});nC.propTypes={accessors:Nt.object.isRequired,getters:Nt.object.isRequired,selected:Nt.object,components:Nt.object.isRequired,localizer:Nt.object.isRequired,position:Nt.object.isRequired,show:Nt.func.isRequired,events:Nt.array.isRequired,slotStart:Nt.instanceOf(Date).isRequired,slotEnd:Nt.instanceOf(Date),onSelect:Nt.func,onDoubleClick:Nt.func,onKeyPress:Nt.func,handleDragStart:Nt.func,style:Nt.object,offset:Nt.shape({x:Nt.number,y:Nt.number})};function Yz(n){var t=n.containerRef,i=n.popupOffset,a=i===void 0?5:i,h=n.overlay,m=n.accessors,g=n.localizer,s=n.components,Y=n.getters,E=n.selected,I=n.handleSelectEvent,k=n.handleDoubleClickEvent,D=n.handleKeyPressEvent,V=n.handleDragStart,F=n.onHide,$=n.overlayDisplay,Q=de.useRef(null);if(!h.position)return null;var ae=a;isNaN(a)||(ae={x:a,y:a});var le=h.position,_e=h.events,fe=h.date,We=h.end;return qe.createElement(DY,{rootClose:!0,flip:!0,show:!0,placement:"bottom",onHide:F,target:h.target},function(se){var De=se.props;return qe.createElement(nC,Object.assign({},De,{containerRef:t,ref:Q,target:h.target,offset:ae,accessors:m,getters:Y,selected:E,components:s,localizer:g,position:le,show:$,events:_e,slotStart:fe,slotEnd:We,onSelect:I,onDoubleClick:k,onKeyPress:D,handleDragStart:V}))})}var eS=qe.forwardRef(function(n,t){return qe.createElement(Yz,Object.assign({},n,{containerRef:t}))});eS.propTypes={popupOffset:Nt.oneOfType([Nt.number,Nt.shape({x:Nt.number,y:Nt.number})]),overlay:Nt.shape({position:Nt.object,events:Nt.array,date:Nt.instanceOf(Date),end:Nt.instanceOf(Date)}),accessors:Nt.object.isRequired,localizer:Nt.object.isRequired,components:Nt.object.isRequired,getters:Nt.object.isRequired,selected:Nt.object,handleSelectEvent:Nt.func,handleDoubleClickEvent:Nt.func,handleKeyPressEvent:Nt.func,handleDragStart:Nt.func,onHide:Nt.func,overlayDisplay:Nt.func};function Ka(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document;return km(i,n,t,{passive:!1})}function Sz(n,t,i){return!n||ig(n,document.elementFromPoint(t,i))}function Tz(n,t){var i=t.clientX,a=t.clientY,h=document.elementFromPoint(i,a);return RU(h,".rbc-event",n)}function Wz(n,t){var i=t.clientX,a=t.clientY,h=document.elementFromPoint(i,a);return RU(h,".rbc-show-more",n)}function rv(n,t){return!!Tz(n,t)}function Ez(n,t){return!!Wz(n,t)}function Wm(n){var t=n;return n.touches&&n.touches.length&&(t=n.touches[0]),{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY}}var DM=5,Mz=250,iC=function(){function n(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.global,h=a===void 0?!1:a,m=i.longPressThreshold,g=m===void 0?250:m,s=i.validContainers,Y=s===void 0?[]:s;na(this,n),this._initialEvent=null,this.selecting=!1,this.isDetached=!1,this.container=t,this.globalMouse=!t||h,this.longPressThreshold=g,this.validContainers=Y,this._listeners=Object.create(null),this._handleInitialEvent=this._handleInitialEvent.bind(this),this._handleMoveEvent=this._handleMoveEvent.bind(this),this._handleTerminatingEvent=this._handleTerminatingEvent.bind(this),this._keyListener=this._keyListener.bind(this),this._dropFromOutsideListener=this._dropFromOutsideListener.bind(this),this._dragOverFromOutsideListener=this._dragOverFromOutsideListener.bind(this),this._removeTouchMoveWindowListener=Ka("touchmove",function(){},window),this._removeKeyDownListener=Ka("keydown",this._keyListener),this._removeKeyUpListener=Ka("keyup",this._keyListener),this._removeDropFromOutsideListener=Ka("drop",this._dropFromOutsideListener),this._removeDragOverFromOutsideListener=Ka("dragover",this._dragOverFromOutsideListener),this._addInitialEventListener()}return ia(n,[{key:"on",value:function(i,a){var h=this._listeners[i]||(this._listeners[i]=[]);return h.push(a),{remove:function(){var g=h.indexOf(a);g!==-1&&h.splice(g,1)}}}},{key:"emit",value:function(i){for(var a=arguments.length,h=new Array(a>1?a-1:0),m=1;m<a;m++)h[m-1]=arguments[m];var g,s=this._listeners[i]||[];
835return s.forEach(function(Y){g===void 0&&(g=Y.apply(void 0,h))}),g}},{key:"teardown",value:function(){this._initialEvent=null,this._initialEventData=null,this._selectRect=null,this.selecting=!1,this._lastClickData=null,this.isDetached=!0,this._listeners=Object.create(null),this._removeTouchMoveWindowListener&&this._removeTouchMoveWindowListener(),this._removeInitialEventListener&&this._removeInitialEventListener(),this._removeEndListener&&this._removeEndListener(),this._onEscListener&&this._onEscListener(),this._removeMoveListener&&this._removeMoveListener(),this._removeKeyUpListener&&this._removeKeyUpListener(),this._removeKeyDownListener&&this._removeKeyDownListener(),this._removeDropFromOutsideListener&&this._removeDropFromOutsideListener(),this._removeDragOverFromOutsideListener&&this._removeDragOverFromOutsideListener()}},{key:"isSelected",value:function(i){var a=this._selectRect;return!a||!this.selecting?!1:RM(a,Od(i))}},{key:"filter",value:function(i){var a=this._selectRect;return!a||!this.selecting?[]:i.filter(this.isSelected,this)}},{key:"_addLongPressListener",value:function(i,a){var h=this,m=null,g=null,s=null,Y=function(D){m=setTimeout(function(){I(),i(D)},h.longPressThreshold),g=Ka("touchmove",function(){return I()}),s=Ka("touchend",function(){return I()})},E=Ka("touchstart",Y),I=function(){m&&clearTimeout(m),g&&g(),s&&s(),m=null,g=null,s=null};return a&&Y(a),function(){I(),E()}}},{key:"_addInitialEventListener",value:function(){var i=this,a=Ka("mousedown",function(m){i._removeInitialEventListener(),i._handleInitialEvent(m),i._removeInitialEventListener=Ka("mousedown",i._handleInitialEvent)}),h=Ka("touchstart",function(m){i._removeInitialEventListener(),i._removeInitialEventListener=i._addLongPressListener(i._handleInitialEvent,m)});this._removeInitialEventListener=function(){a(),h()}}},{key:"_dropFromOutsideListener",value:function(i){var a=Wm(i),h=a.pageX,m=a.pageY,g=a.clientX,s=a.clientY;this.emit("dropFromOutside",{x:h,y:m,clientX:g,clientY:s}),i.preventDefault()}},{key:"_dragOverFromOutsideListener",value:function(i){var a=Wm(i),h=a.pageX,m=a.pageY,g=a.clientX,s=a.clientY;this.emit("dragOverFromOutside",{x:h,y:m,clientX:g,clientY:s}),i.preventDefault()}},{key:"_handleInitialEvent",value:function(i){if(this._initialEvent=i,!this.isDetached){var a=Wm(i),h=a.clientX,m=a.clientY,g=a.pageX,s=a.pageY,Y=this.container(),E,I;if(!(i.which===3||i.button===2||!Sz(Y,h,m))){if(!this.globalMouse&&Y&&!ig(Y,i.target)){var k=Pz(0),D=k.top,V=k.left,F=k.bottom,$=k.right;if(I=Od(Y),E=RM({top:I.top-D,left:I.left-V,bottom:I.bottom+F,right:I.right+$},{top:s,left:g}),!E)return}var Q=this.emit("beforeSelect",this._initialEventData={isTouch:/^touch/.test(i.type),x:g,y:s,clientX:h,clientY:m});if(Q!==!1)switch(i.type){case"mousedown":this._removeEndListener=Ka("mouseup",this._handleTerminatingEvent),this._onEscListener=Ka("keydown",this._handleTerminatingEvent),this._removeMoveListener=Ka("mousemove",this._handleMoveEvent);break;case"touchstart":this._handleMoveEvent(i),this._removeEndListener=Ka("touchend",this._handleTerminatingEvent),this._removeMoveListener=Ka("touchmove",this._handleMoveEvent);break}}}}},{key:"_isWithinValidContainer",value:function(i){var a=i.target,h=this.validContainers;return!h||!h.length||!a?!0:h.some(function(m){return!!a.closest(m)})}},{key:"_handleTerminatingEvent",value:function(i){var a=this.selecting,h=this._selectRect;if(!a&&i.type.includes("key")&&(i=this._initialEvent),this.selecting=!1,this._removeEndListener&&this._removeEndListener(),this._removeMoveListener&&this._removeMoveListener(),this._selectRect=null,this._initialEvent=null,this._initialEventData=null,!!i){var m=!this.container||ig(this.container(),i.target),g=this._isWithinValidContainer(i);return i.key==="Escape"||!g?this.emit("reset"):!a&&m?this._handleClickEvent(i):a?this.emit("select",h):this.emit("reset")}}},{key:"_handleClickEvent",value:function(i){var a=Wm(i),h=a.pageX,m=a.pageY,g=a.clientX,s=a.clientY,Y=new Date().getTime();return this._lastClickData&&Y-this._lastClickData.timestamp<Mz?(this._lastClickData=null,this.emit("doubleClick",{x:h,y:m,clientX:g,clientY:s})):(this._lastClickData={timestamp:Y}
835,this.emit("click",{x:h,y:m,clientX:g,clientY:s}))}},{key:"_handleMoveEvent",value:function(i){if(!(this._initialEventData===null||this.isDetached)){var a=this._initialEventData,h=a.x,m=a.y,g=Wm(i),s=g.pageX,Y=g.pageY,E=Math.abs(h-s),I=Math.abs(m-Y),k=Math.min(s,h),D=Math.min(Y,m),V=this.selecting,F=this.isClick(s,Y);F&&!V&&!(E||I)||(!V&&!F&&this.emit("selectStart",this._initialEventData),F||(this.selecting=!0,this._selectRect={top:D,left:k,x:s,y:Y,right:k+E,bottom:D+I},this.emit("selecting",this._selectRect)),i.preventDefault())}}},{key:"_keyListener",value:function(i){this.ctrl=i.metaKey||i.ctrlKey}},{key:"isClick",value:function(i,a){var h=this._initialEventData,m=h.x,g=h.y,s=h.isTouch;return!s&&Math.abs(i-m)<=DM&&Math.abs(a-g)<=DM}}])}();function Pz(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return lc(n)!=="object"&&(n={top:n,left:n,right:n,bottom:n}),n}function RM(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=Od(n),h=a.top,m=a.left,g=a.right,s=g===void 0?m:g,Y=a.bottom,E=Y===void 0?h:Y,I=Od(t),k=I.top,D=I.left,V=I.right,F=V===void 0?D:V,$=I.bottom,Q=$===void 0?k:$;return!(E-i<k||h+i>Q||s-i<D||m+i>F)}function Od(n){if(!n.getBoundingClientRect)return n;
835var t=n.getBoundingClientRect(),i=t.left+LM("left"),a=t.top+LM("top");return{top:a,left:i,right:(n.offsetWidth||0)+i,bottom:(n.offsetHeight||0)+a}}function LM(n){if(n==="left")return window.pageXOffset||document.body.scrollLeft||0;if(n==="top")return window.pageYOffset||document.body.scrollTop||0}var Iz=function(n){function t(i,a){var h;return na(this,t),h=es(this,t,[i,a]),h.state={selecting:!1},h.containerRef=de.createRef(),h}return ts(t,n),ia(t,[{key:"componentDidMount",value:function(){this.props.selectable&&this._selectable()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable()}},{key:"componentDidUpdate",value:function(a){!a.selectable&&this.props.selectable&&this._selectable(),a.selectable&&!this.props.selectable&&this._teardownSelectable()}},{key:"render",value:function(){var a=this.props,h=a.range,m=a.getNow,g=a.getters,s=a.date,Y=a.components.dateCellWrapper,E=a.localizer,I=this.state,k=I.selecting,D=I.startIdx,V=I.endIdx,F=m();return qe.createElement("div",{className:"rbc-row-bg",ref:this.containerRef},h.map(function($,Q){var ae=k&&Q>=D&&Q<=V,le=g.dayProp($),_e=le.className,fe=le.style;return qe.createElement(Y,{key:Q,value:$,range:h},qe.createElement("div",{style:fe,className:vi("rbc-day-bg",_e,ae&&"rbc-selected-cell",E.isSameDate($,F)&&"rbc-today",s&&E.neq(s,$,"month")&&"rbc-off-range-bg")}))}))}},{key:"_selectable",value:function(){var a=this,h=this.containerRef.current,m=this._selector=new iC(this.props.container,{longPressThreshold:this.props.longPressThreshold}),g=function(Y,E){if(!rv(h,Y)&&!Ez(h,Y)){var I=Od(h),k=a.props,D=k.range,V=k.rtl;if(_z(I,Y)){var F=rC(I,Y.x,V,D.length);a._selectSlot({startIdx:F,endIdx:F,action:E,box:Y})}}a._initial={},a.setState({selecting:!1})};m.on("selecting",function(s){var Y=a.props,E=Y.range,I=Y.rtl,k=-1,D=-1;if(a.state.selecting||(Gn(a.props.onSelectStart,[s]),a._initial={x:s.x,y:s.y}),m.isSelected(h)){var V=Od(h),F=xz(a._initial,V,s,E.length,I);k=F.startIdx,D=F.endIdx}a.setState({selecting:!0,startIdx:k,endIdx:D})}),m.on("beforeSelect",function(s){if(a.props.selectable==="ignoreEvents")return!rv(a.containerRef.current,s)}),m.on("click",function(s){return g(s,"click")}),m.on("doubleClick",function(s){return g(s,"doubleClick")}),m.on("select",function(s){a._selectSlot(Pn(Pn({},a.state),{},{action:"select",bounds:s})),a._initial={},a.setState({selecting:!1}),Gn(a.props.onSelectEnd,[a.state])})}},{key:"_teardownSelectable",value:function(){this._selector&&(this._selector.teardown(),this._selector=null)}},{key:"_selectSlot",value:function(a){var h=a.endIdx,m=a.startIdx,g=a.action,s=a.bounds,Y=a.box;h!==-1&&m!==-1&&this.props.onSelectSlot&&this.props.onSelectSlot({start:m,end:h,action:g,bounds:s,box:Y,resourceId:this.props.resourceId})}}])}(qe.Component),Lo={propTypes:{slotMetrics:Nt.object.isRequired,selected:Nt.object,isAllDay:Nt.bool,accessors:Nt.object.isRequired,localizer:Nt.object.isRequired,components:Nt.object.isRequired,getters:Nt.object.isRequired,onSelect:Nt.func,onDoubleClick:Nt.func,onKeyPress:Nt.func},defaultProps:{segments:[],selected:{}},renderEvent:function(t,i){var a=t.selected;t.isAllDay;var h=t.accessors,m=t.getters,g=t.onSelect,s=t.onDoubleClick,Y=t.onKeyPress,E=t.localizer,I=t.slotMetrics,k=t.components,D=t.resizable,V=I.continuesPrior(i),F=I.continuesAfter(i);return qe.createElement(eC,{event:i,getters:m,localizer:E,accessors:h,components:k,onSelect:g,onDoubleClick:s,onKeyPress:Y,continuesPrior:V,continuesAfter:F,slotStart:I.first,slotEnd:I.last,selected:Vv(i,a),resizable:D})},renderSpan:function(t,i,a){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",m=Math.abs(i)/t*100+"%";return qe.createElement("div",{key:a,className:"rbc-row-segment",style:{WebkitFlexBasis:m,flexBasis:m,maxWidth:m}},h)}},aC=function(n){function t(){return na(this,t),es(this,t,arguments)}return ts(t,n),ia(t,[{key:"render",value:function(){var a=this,h=this.props,m=h.segments,g=h.slotMetrics.slots,s=h.className,Y=1;return qe.createElement("div",{className:vi(s,"rbc-row")},m.reduce(function(E,I,k){var D=I.event,V=I.left,F=I.right,$=I.span,Q="_lvl_"+k,ae=V-Y,le=Lo.renderEvent(a.props,D);return ae&&E.push(Lo.renderSpan(g,ae,"".concat(Q,"_gap"))),E.push(Lo.renderSpan(g,$,Q,le)),Y=F+1,E},[]))}}])}(qe.Component);aC.defaultProps=Pn({},Lo.defaultProps);function sC(n){var t=n.dateRange,i=n.unit,a=i===void 0?"day":i,h=n.localizer;return{first:t[0],last:h.add(t[t.length-1],1,a)}}function Uz(n,t,i,a){var h=sC({dateRange:t,localizer:a}),m=h.first,g=h.last,s=a.diff(m,g,"day"),Y=a.max(a.startOf(i.start(n),"day"),m),E=a.min(a.ceil(i.end(n),"day"),g),I=SN(t,function(D){return a.isSameDate(D,Y)}),k=a.diff(Y,E,"day");return k=Math.min(k,s),k=Math.max(k-a.segmentOffset,1),{event:n,span:k,left:I+1,right:Math.max(I+k,1)}}function Gw(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,i,a,h,m=[],g=[];for(i=0;i<n.length;i++){for(h=n[i],a=0;a<m.length&&Cz(h,m[a]);a++);a>=t?g.push(h):(m[a]||(m[a]=[])).push(h)}for(i=0;i<m.length;i++)m[i].sort(function(s,Y){return s.left-Y.left});return{levels:m,extra:g}}function og(n,t,i,a,h){var m={start:a.start(n),end:a.end(n)},g={start:t,end:i};return h.inEventRange({event:m,range:g})}function Cz(n,t){return t.some(function(i){return i.left<=n.right&&i.right>=n.left})}function Vz(n,t,i){var a=Py(n),h=[],m=[];a.forEach(function(Y){var E=t.start(Y),I=t.end(Y);i.daySpan(E,I)>1?h.push(Y):m.push(Y)});var g=h.sort(function(Y,E){return qw(Y,E,t,i)}),s=m.sort(function(Y,E){return qw(Y,E,t,i)});return[].concat(Py(g),Py(s))}function qw(n,t,i,a){var h={start:i.start(n),end:i.end(n),allDay:i.allDay(n)},m={start:i.start(t),end:i.end(t),allDay:i.allDay(t)};return a.sortEvents({evtA:h,evtB:m})}var Hw=function(t,i){return t.left<=i&&t.right>=i},dw=function(t,i){return t.filter(function(a){return Hw(a,i)}).map(function(a){return a.event})},oC=function(n){function t(){return na(this,t),es(this,t,arguments)}return ts(t,n),ia(t,[{key:"render",value:function(){for(var a=this.props,h=a.segments,m=a.slotMetrics.slots,g=Gw(h).levels[0],s=1,Y=1,E=[];s<=m;){var I="_lvl_"+s,k=g.filter(function(fe){return Hw(fe,s)})[0]||{}
835,D=k.event,V=k.left,F=k.right,$=k.span;if(!D){var Q=this.getHiddenEventsForSlot(h,s);if(Q.length>0){var ae=s-Y;ae&&E.push(Lo.renderSpan(m,ae,I+"_gap")),E.push(Lo.renderSpan(m,1,I,this.renderShowMore(h,s))),Y=s=s+1;continue}s++;continue}var le=Math.max(0,V-Y);if(this.canRenderSlotEvent(V,$)){var _e=Lo.renderEvent(this.props,D);le&&E.push(Lo.renderSpan(m,le,I+"_gap")),E.push(Lo.renderSpan(m,$,I,_e)),Y=s=F+1}else le&&E.push(Lo.renderSpan(m,le,I+"_gap")),E.push(Lo.renderSpan(m,1,I,this.renderShowMore(h,s))),Y=s=s+1}return qe.createElement("div",{className:"rbc-row"},E)}},{key:"getHiddenEventsForSlot",value:function(a,h){var m=dw(a,h),g=Gw(a).levels[0],s=g.filter(function(Y){return Hw(Y,h)}).map(function(Y){return Y.event});return m.filter(function(Y){return!s.some(function(E){return E===Y})})}},{key:"canRenderSlotEvent",value:function(a,h){var m=this.props.segments;return PN(a,a+h).every(function(g){var s=dw(m,g).length;return s===1})}},{key:"renderShowMore",value:function(a,h){var m=this,g=this.props,s=g.localizer,Y=g.slotMetrics,E=g.components,I=Y.getEventsForSlot(h),k=dw(a,h),D=k.length;if(E!=null&&E.showMore){var V=E.showMore,F=Y.getDateForSlot(h-1);return D?qe.createElement(V,{localizer:s,slotDate:F,slot:h,count:D,events:I,remainingEvents:k}):!1}return D?qe.createElement("button",{type:"button",key:"sm_"+h,className:vi("rbc-button-link","rbc-show-more"),onClick:function(Q){return m.showMore(h,Q)}},s.messages.showMore(D,k,I)):!1}},{key:"showMore",value:function(a,h){h.preventDefault(),h.stopPropagation(),this.props.onShowMore(a,h.target)}}])}(qe.Component);oC.defaultProps=Pn({},Lo.defaultProps);var Az=function(t){var i=t.children;return qe.createElement("div",{className:"rbc-row-content-scroll-container"},i)},kz=function(t,i){return t.left<=i&&t.right>=i},Dz=function(t,i){return t[0].range===i[0].range&&t[0].events===i[0].events};function lC(){return XU(function(n){for(var t=n.range,i=n.events,a=n.maxRows,h=n.minRows,m=n.accessors,g=n.localizer,s=sC({dateRange:t,localizer:g}),Y=s.first,E=s.last,I=i.map(function($){return Uz($,t,m,g)}),k=Gw(I,Math.max(a-1,1)),D=k.levels,V=k.extra,F=V.length>0?h-1:h;D.length<F;)D.push([]);return{first:Y,last:E,levels:D,extra:V,range:t,slots:t.length,clone:function(Q){var ae=lC();return ae(Pn(Pn({},n),Q))},getDateForSlot:function(Q){return t[Q]},getSlotForDate:function(Q){return t.find(function(ae){return g.isSameDate(ae,Q)})},getEventsForSlot:function(Q){return I.filter(function(ae){return kz(ae,Q)}).map(function(ae){return ae.event})},continuesPrior:function(Q){return g.continuesPrior(m.start(Q),Y)},continuesAfter:function(Q){var ae=m.start(Q),le=m.end(Q);return g.continuesAfter(ae,le,E)}}},Dz)}var lg=function(n){function t(){var i;na(this,t);for(var a=arguments.length,h=new Array(a),m=0;m<a;m++)h[m]=arguments[m];return i=es(this,t,[].concat(h)),i.handleSelectSlot=function(g){var s=i.props,Y=s.range,E=s.onSelectSlot;E(Y.slice(g.start,g.end+1),g)},i.handleShowMore=function(g,s){var Y=i.props,E=Y.range,I=Y.onShowMore,k=i.slotMetrics(i.props),D=AO(i.containerRef.current,".rbc-row-bg")[0],V;D&&(V=D.children[g-1]);var F=k.getEventsForSlot(g);I(F,E[g-1],V,g,s)},i.getContainer=function(){var g=i.props.container;return g?g():i.containerRef.current},i.renderHeadingCell=function(g,s){var Y=i.props,E=Y.renderHeader,I=Y.getNow,k=Y.localizer;return E({date:g,key:"header_".concat(s),className:vi("rbc-date-cell",k.isSameDate(g,I())&&"rbc-now")})},i.renderDummy=function(){var g=i.props,s=g.className,Y=g.range,E=g.renderHeader,I=g.showAllEvents;return qe.createElement("div",{className:s,ref:i.containerRef},qe.createElement("div",{className:vi("rbc-row-content",I&&"rbc-row-content-scrollable")},E&&qe.createElement("div",{className:"rbc-row",ref:i.headingRowRef},Y.map(i.renderHeadingCell)),qe.createElement("div",{className:"rbc-row",ref:i.eventRowRef},qe.createElement("div",{className:"rbc-row-segment"},qe.createElement("div",{className:"rbc-event"},qe.createElement("div",{className:"rbc-event-content"},"Â "))))))},i.containerRef=de.createRef(),i.headingRowRef=de.createRef(),i.eventRowRef=de.createRef(),i.slotMetrics=lC(),i}return ts(t,n),ia(t,[{key:"getRowLimit",value:function(){var a,h=Mx(this.eventRowRef.current),m=(a=this.headingRowRef)!==null&&a!==void 0&&a.current?Mx(this.headingRowRef.current):0,g=Mx(this.containerRef.current)-m;return Math.max(Math.floor(g/h),1)}},{key:"render",value:function(){var a=this.props,h=a.date,m=a.rtl,g=a.range,s=a.className,Y=a.selected,E=a.selectable,I=a.renderForMeasure,k=a.accessors,D=a.getters,V=a.c
835omponents,F=a.getNow,$=a.renderHeader,Q=a.onSelect,ae=a.localizer,le=a.onSelectStart,_e=a.onSelectEnd,fe=a.onDoubleClick,We=a.onKeyPress,se=a.resourceId,De=a.longPressThreshold,ze=a.isAllDay,je=a.resizable,ft=a.showAllEvents;if(I)return this.renderDummy();var ot=this.slotMetrics(this.props),st=ot.levels,rt=ot.extra,Re=ft?Az:gu,Yt=V.weekWrapper,Tt={selected:Y,accessors:k,getters:D,localizer:ae,components:V,onSelect:Q,onDoubleClick:fe,onKeyPress:We,resourceId:se,slotMetrics:ot,resizable:je};return qe.createElement("div",{className:s,role:"rowgroup",ref:this.containerRef},qe.createElement(Iz,{localizer:ae,date:h,getNow:F,rtl:m,range:g,selectable:E,container:this.getContainer,getters:D,onSelectStart:le,onSelectEnd:_e,onSelectSlot:this.handleSelectSlot,components:V,longPressThreshold:De,resourceId:se}),qe.createElement("div",{className:vi("rbc-row-content",ft&&"rbc-row-content-scrollable"),role:"row"},$&&qe.createElement("div",{className:"rbc-row ",ref:this.headingRowRef},g.map(this.renderHeadingCell)),qe.createElement(Re,null,qe.createElement(Yt,Object.assign({isAllDay:ze},Tt,{rtl:this.props.rtl}),st.map(function(_t,Qe){return qe.createElement(aC,Object.assign({key:Qe,segments:_t},Tt))}),!!rt.length&&qe.createElement(oC,Object.assign({segments:rt,onShowMore:this.handleShowMore},Tt))))))}}])}(qe.Component);lg.defaultProps={minRows:0,maxRows:1/0};var tS=function(t){var i=t.label;return qe.createElement("span",{role:"columnheader","aria-sort":"none"},i)},Rz=function(t){var i=t.label,a=t.drilldownView,h=t.onDrillDown;return a?qe.createElement("button",{type:"button",className:"rbc-button-link",onClick:h},i):qe.createElement("span",null,i)},Lz=["date","className"],Oz=function(t,i,a,h,m){return t.filter(function(g){return og(g,i,a,h,m)})},Av=function(n){function t(){var i;na(this,t);for(var a=arguments.length,h=new Array(a),m=0;m<a;m++)h[m]=arguments[m];return i=es(this,t,[].concat(h)),i.getContainer=function(){return i.containerRef.current},i.renderWeek=function(g,s){var Y=i.props,E=Y.events,I=Y.components,k=Y.selectable,D=Y.getNow,V=Y.selected,F=Y.date,$=Y.localizer,Q=Y.longPressThreshold,ae=Y.accessors,le=Y.getters,_e=Y.showAllEvents,fe=i.state,We=fe.needLimitMeasure,se=fe.rowLimit,De=Oz(Py(E),g[0],g[g.length-1],ae,$),ze=Vz(De,ae,$);return qe.createElement(lg,{key:s,ref:s===0?i.slotRowRef:void 0,container:i.getContainer,className:"rbc-month-row",getNow:D,date:F,range:g,events:ze,maxRows:_e?1/0:se,selected:V,selectable:k,components:I,accessors:ae,getters:le,localizer:$,renderHeader:i.readerDateHeading,renderForMeasure:We,onShowMore:i.handleShowMore,onSelect:i.handleSelectEvent,onDoubleClick:i.handleDoubleClickEvent,onKeyPress:i.handleKeyPressEvent,onSelectSlot:i.handleSelectSlot,longPressThreshold:Q,rtl:i.props.rtl,resizable:i.props.resizable,showAllEvents:_e})},i.readerDateHeading=function(g){var s=g.date,Y=g.className,E=xu(g,Lz),I=i.props,k=I.date,D=I.getDrilldownView,V=I.localizer,F=V.neq(k,s,"month"),$=V.isSameDate(s,k),Q=D(s),ae=V.format(s,"dateFormat"),le=i.props.components.dateHeader||Rz;return qe.createElement("div",Object.assign({},E,{className:vi(Y,F&&"rbc-off-range",$&&"rbc-current"),role:"cell"}),qe.createElement(le,{label:ae,date:s,drilldownView:Q,isOffRange:F,onDrillDown:function(fe){return i.handleHeadingClick(s,Q,fe)}}))},i.handleSelectSlot=function(g,s){i._pendingSelection=i._pendingSelection.concat(g),clearTimeout(i._selectTimer),i._selectTimer=setTimeout(function(){return i.selectDates(s)})},i.handleHeadingClick=function(g,s,Y){Y.preventDefault(),i.clearSelection(),Gn(i.props.onDrillDown,[g,s])},i.handleSelectEvent=function(){i.clearSelection();for(var g=arguments.length,s=new Array(g),Y=0;Y<g;Y++)s[Y]=arguments[Y];Gn(i.props.onSelectEvent,s)},i.handleDoubleClickEvent=function(){i.clearSelection();for(var g=arguments.length,s=new Array(g),Y=0;Y<g;Y++)s[Y]=arguments[Y];Gn(i.props.onDoubleClickEvent,s)},i.handleKeyPressEvent=function(){i.clearSelection();for(var g=arguments.length,s=new Array(g),Y=0;Y<g;Y++)s[Y]=arguments[Y];Gn(i.props.onKeyPressEvent,s)},i.handleShowMore=function(g,s,Y,E,I){var k=i.props,D=k.popup,V=k.onDrillDown,F=k.onShowMore,$=k.getDrilldownView,Q=k.doShowMoreDrillDown;
vendor: 5,133 bytes, line 835
835if(i.clearSelection(),D){var ae=_U(Y,i.containerRef.current);i.setState({overlay:{date:s,events:g,position:ae,target:I}})}else Q&&Gn(V,[s,$(s)||vs.DAY]);Gn(F,[g,s,E])},i.overlayDisplay=function(){i.setState({overlay:null})},i.state={rowLimit:5,needLimitMeasure:!0,date:null},i.containerRef=de.createRef(),i.slotRowRef=de.createRef(),i._bgRows=[],i._pendingSelection=[],i}return ts(t,n),ia(t,[{key:"componentDidMount",value:function(){var a=this,h;this.state.needLimitMeasure&&this.measureRowLimit(this.props),window.addEventListener("resize",this._resizeListener=function(){h||xU(function(){h=!1,a.setState({needLimitMeasure:!0})})},!1)}},{key:"componentDidUpdate",value:function(){this.state.needLimitMeasure&&this.measureRowLimit(this.props)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this._resizeListener,!1)}},{key:"render",value:function(){var a=this.props,h=a.date,m=a.localizer,g=a.className,s=m.visibleDays(h,m),Y=vO(s,7);return this._weekCount=Y.length,qe.createElement("div",{className:vi("rbc-month-view",g),role:"table","aria-label":"Month View",ref:this.containerRef},qe.createElement("div",{className:"rbc-row rbc-month-header",role:"row"},this.renderHeaders(Y[0])),Y.map(this.renderWeek),this.props.popup&&this.renderOverlay())}},{key:"renderHeaders",value:function(a){var h=this.props,m=h.localizer,g=h.components,s=a[0],Y=a[a.length-1],E=g.header||tS;return m.range(s,Y,"day").map(function(I,k){return qe.createElement("div",{key:"header_"+k,className:"rbc-header"},qe.createElement(E,{date:I,localizer:m,label:m.format(I,"weekdayFormat")}))})}},{key:"renderOverlay",value:function(){var a,h,m=this,g=(a=(h=this.state)===null||h===void 0?void 0:h.overlay)!==null&&a!==void 0?a:{},s=this.props,Y=s.accessors,E=s.localizer,I=s.components,k=s.getters,D=s.selected,V=s.popupOffset,F=s.handleDragStart,$=function(){return m.setState({overlay:null})};return qe.createElement(eS,{overlay:g,accessors:Y,localizer:E,components:I,getters:k,selected:D,popupOffset:V,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:F,show:!!g.position,overlayDisplay:this.overlayDisplay,onHide:$})}},{key:"measureRowLimit",value:function(){this.setState({needLimitMeasure:!1,rowLimit:this.slotRowRef.current.getRowLimit()})}},{key:"selectDates",value:function(a){var h=this._pendingSelection.slice();this._pendingSelection=[],h.sort(function(s,Y){return+s-+Y});var m=new Date(h[0]),g=new Date(h[h.length-1]);g.setDate(h[h.length-1].getDate()+1),Gn(this.props.onSelectSlot,{slots:h,start:m,end:g,action:a.action,bounds:a.bounds,box:a.box})}},{key:"clearSelection",value:function(){clearTimeout(this._selectTimer),this._pendingSelection=[]}}],[{key:"getDerivedStateFromProps",value:function(a,h){var m=a.date,g=a.localizer;return{date:m,needLimitMeasure:g.neq(m,h.date,"month")}}}])}(qe.Component);Av.range=function(n,t){var i=t.localizer,a=i.firstVisibleDay(n,i),h=i.lastVisibleDay(n,i);return{start:a,end:h}};Av.navigate=function(n,t,i){var a=i.localizer;switch(t){case Ns.PREVIOUS:return a.add(n,-1,"month");case Ns.NEXT:return a.add(n,1,"month");default:return n}};Av.title=function(n,t){var i=t.localizer;return i.format(n,"monthHeaderFormat")};var OM=function(t){var i=t.min,a=t.max,h=t.step,m=t.slots,g=t.localizer;return"".concat(+g.startOf(i,"minutes"))+"".concat(+g.startOf(a,"minutes"))+"".concat(h,"-").concat(m)};function rS(n){for(var t=n.min,i=n.max,a=n.step,h=n.timeslots,m=n.localizer,g=OM({step:a,localizer:m}),s=1+m.getTotalMin(t,i),Y=m.getMinutesFromMidnight(t),E=Math.ceil((s-1)/(a*h)),I=E*h,k=new Array(E),D=new Array(I),V=0;V<E;V++){k[V]=new Array(h);for(var F=0;F<h;F++){var $=V*h+F,Q=$*a;D[$]=k[V][F]=m.getSlotDate(t,Y,Q)}}var ae=D.length*a;D.push(m.getSlotDate(t,Y,ae));function le(_e){var fe=m.diff(t,_e,"minutes")+m.getDstOffset(t,_e);return Math.min(fe,s)}return{groups:k,update:function(fe){return OM(fe)!==g?rS(fe):this},dateIsInGroup:function(fe,We){var se=k[We+1];return m.inRange(fe,k[We][0],se?se[0]:i,"minutes")},nextSlot:function(fe){var We=D[Math.min(D.findIndex(function(se){return se===fe||m.eq(se,fe)})+1,D.length-1)];return m.eq(We,fe)&&(We=m.add(fe,a,"minutes")),We},closestSlotToPosition:function(fe){var We=Math.min(D.length-1,Math.max(0,Math.floor(fe*I)));return D[We]},closestSlotFromPoint:function(fe,We){var se=Math.abs(We.top-We.bottom);return this.closestSlotToPosition((fe.y-We.top)/se)},closestSlotFromDate:function(fe){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(m.lt(fe,t,"minutes"))return D[0];if(m.gt(fe,i,"minutes"))return D[D.length-1];var se=m.diff(t,fe,"minutes");return D[(se-se%a)/a+We]},startsBeforeDay:function(fe){return m.lt(fe,t,"day")},startsAfterDay:function(fe){return m.gt(fe,i,"day")},startsBefore:function(fe){return m.lt(m.merge(t,fe),t,"minutes")},startsAfter:function(fe){return m.gt(m.merge(i,fe),i,"minutes")},getRange:function(fe,We,se,De){se||(fe=m.min(i,m.max(t,fe))),De||(We=m.min(i,m.max(t,We)));var ze=le(fe),je=le(We),ft=je>a*I&&!m.eq(i,We)?(ze-a)/(a*I)*100:ze/(a*I)*100;
835return{top:ft,height:je/(a*I)*100-ft,start:le(fe),startDate:fe,end:le(We),endDate:We}},getCurrentTimePosition:function(fe){var We=le(fe),se=We/(a*I)*100;return se}}}var Xz=function(){function n(t,i){var a=i.accessors,h=i.slotMetrics;na(this,n);var m=h.getRange(a.start(t),a.end(t)),g=m.start,s=m.startDate,Y=m.end,E=m.endDate,I=m.top,k=m.height;this.start=g,this.end=Y,this.startMs=+s,this.endMs=+E,this.top=I,this.height=k,this.data=t}return ia(n,[{key:"_width",get:function(){if(this.rows){var i=this.rows.reduce(function(h,m){return Math.max(h,m.leaves.length+1)},0)+1;return 100/i}if(this.leaves){var a=100-this.container._width;return a/(this.leaves.length+1)}return this.row._width}},{key:"width",get:function(){var i=this._width,a=Math.min(100,this._width*1.7);if(this.rows)return a;if(this.leaves)return this.leaves.length>0?a:i;var h=this.row.leaves,m=h.indexOf(this);return m===h.length-1?i:a}},{key:"xOffset",get:function(){if(this.rows)return 0;if(this.leaves)return this.container._width;var i=this.row,a=i.leaves,h=i.xOffset,m=i._width,g=a.indexOf(this)+1;return h+g*m}}])}();function Nz(n,t,i){return Math.abs(t.start-n.start)<i||t.start>n.start&&t.start<n.end}function zz(n){for(var t=GN(n,["startMs",function(s){return-s.endMs}]),i=[];t.length>0;){var a=t.shift();i.push(a);for(var h=0;h<t.length;h++){var m=t[h];if(!(a.endMs>m.startMs)){if(h>0){var g=t.splice(h,1)[0];i.push(g)}break}}}return i}function uC(n){for(var t=n.events,i=n.minimumStartDifference,a=n.slotMetrics,h=n.accessors,m=t.map(function(I){return new Xz(I,{slotMetrics:a,accessors:h})}),g=zz(m),s=[],Y=function(){var k=g[E],D=s.find(function($){return $.end>k.start||Math.abs(k.start-$.start)<i});if(!D)return k.rows=[],s.push(k),1;k.container=D;for(var V=null,F=D.rows.length-1;!V&&F>=0;F--)Nz(D.rows[F],k,i)&&(V=D.rows[F]);V?(V.leaves.push(k),k.row=V):(k.leaves=[],D.rows.push(k))},E=0;E<g.length;E++)Y();return g.map(function(I){return{event:I.data,style:{top:I.top,height:I.height,width:I.width,xOffset:Math.max(0,I.xOffset)}}})}function cC(n,t,i){for(var a=0;a<n.friends.length;++a)if(!(i.indexOf(n.friends[a])>-1)){t=t>n.friends[a].idx?t:n.friends[a].idx,i.push(n.friends[a]);var h=cC(n.friends[a],t,i);t=t>h?t:h}return t}function Fz(n){var t=n.events,i=n.minimumStartDifference,a=n.slotMetrics,h=n.accessors,m=uC({events:t,minimumStartDifference:i,slotMetrics:a,accessors:h});m.sort(function(Yt,Tt){return Yt=Yt.style,Tt=Tt.style,Yt.top!==Tt.top?Yt.top>Tt.top?1:-1:Yt.height!==Tt.height?Yt.top+Yt.height<Tt.top+Tt.height?1:-1:0});for(var g=0;g<m.length;++g)m[g].friends=[],delete m[g].style.left,delete m[g].style.left,delete m[g].idx,delete m[g].size;for(var s=0;s<m.length-1;++s)for(var Y=m[s],E=Y.style.top,I=Y.style.top+Y.style.height,k=s+1;k<m.length;++k){var D=m[k],V=D.style.top,F=D.style.top+D.style.height;(V>=E&&F<=I||F>E&&F<=I||V>=E&&V<I)&&(Y.friends.push(D),D.friends.push(Y))}for(var $=0;$<m.length;++$){for(var Q=m[$],ae=[],le=0;le<100;++le)ae.push(1);for(var _e=0;_e<Q.friends.length;++_e)Q.friends[_e].idx!==void 0&&(ae[Q.friends[_e].idx]=0);Q.idx=ae.indexOf(1)}for(var fe=0;fe<m.length;++fe){var We=0;
835if(!m[fe].size){var se=[],De=cC(m[fe],0,se);We=100/(De+1),m[fe].size=We;for(var ze=0;ze<se.length;++ze)se[ze].size=We}}for(var je=0;je<m.length;++je){var ft=m[je];ft.style.left=ft.idx*ft.size;for(var ot=0,st=0;st<ft.friends.length;++st){var rt=ft.friends[st].idx;ot=ot>rt?ot:rt}ot<=ft.idx&&(ft.size=100-ft.idx*ft.size);var Re=ft.idx===0?0:3;ft.style.width="calc(".concat(ft.size,"% - ").concat(Re,"px)"),ft.style.height="calc(".concat(ft.style.height,"% - 2px)"),ft.style.xOffset="calc(".concat(ft.style.left,"% + ").concat(Re,"px)")}return m}var XM={overlap:uC,"no-overlap":Fz};function Zz(n){return!!(n&&n.constructor&&n.call&&n.apply)}function jz(n){n.events,n.minimumStartDifference,n.slotMetrics,n.accessors;var t=n.dayLayoutAlgorithm,i=t;return t in XM&&(i=XM[t]),Zz(i)?i.apply(this,arguments):[]}var hC=function(n){function t(){return na(this,t),es(this,t,arguments)}return ts(t,n),ia(t,[{key:"render",value:function(){var a=this.props,h=a.renderSlot,m=a.resource,g=a.group,s=a.getters,Y=a.components,E=Y===void 0?{}:Y,I=E.timeSlotWrapper,k=I===void 0?gu:I,D=s?s.slotGroupProp(g):{};return qe.createElement("div",Object.assign({className:"rbc-timeslot-group"},D),g.map(function(V,F){var $=s?s.slotProp(V,m):{};return qe.createElement(k,{key:F,value:V,resource:m},qe.createElement("div",Object.assign({},$,{className:vi("rbc-time-slot",$.className)}),h&&h(V,F)))}))}}])}(de.Component);function _y(n){return typeof n=="string"?n:n+"%"}function Bz(n){var t=n.style,i=n.className,a=n.event,h=n.accessors,m=n.rtl,g=n.selected,s=n.label,Y=n.continuesPrior,E=n.continuesAfter,I=n.getters,k=n.onClick,D=n.onDoubleClick,V=n.isBackgroundEvent,F=n.onKeyPress,$=n.components,Q=$.event,ae=$.eventWrapper,le=h.title(a),_e=h.tooltip(a),fe=h.end(a),We=h.start(a),se=I.eventProp(a,We,fe,g),De=[qe.createElement("div",{key:"1",className:"rbc-event-label"},s),qe.createElement("div",{key:"2",className:"rbc-event-content"},Q?qe.createElement(Q,{event:a,title:le}):le)],ze=t.height,je=t.top,ft=t.width,ot=t.xOffset,st=Pn(Pn({},se.style),{},Ed({top:_y(je),height:_y(ze),width:_y(ft)},m?"right":"left",_y(ot)));return qe.createElement(ae,Object.assign({type:"time"},n),qe.createElement("div",{role:"button",tabIndex:0,onClick:k,onDoubleClick:D,style:st,onKeyDown:F,title:_e?(typeof s=="string"?s+": ":"")+_e:void 0,className:vi(V?"rbc-background-event":"rbc-event",i,se.className,{"rbc-selected":g,"rbc-event-continues-earlier":Y,"rbc-event-continues-later":E})},De))}var $z=function(t){var i=t.children,a=t.className,h=t.style,m=t.innerRef;return qe.createElement("div",{className:a,style:h,ref:m},i)},Gz=qe.forwardRef(function(n,t){return qe.createElement($z,Object.assign({},n,{innerRef:t}))}),qz=["dayProp"],Hz=["eventContainerWrapper","timeIndicatorWrapper"],dC=function(n){function t(){var i;na(this,t);for(var a=arguments.length,h=new Array(a),m=0;m<a;m++)h[m]=arguments[m];return i=es(this,t,[].concat(h)),i.state={selecting:!1,timeIndicatorPosition:null},i.intervalTriggered=!1,i.renderEvents=function(g){var s=g.events,Y=g.isBackgroundEvent,E=i.props,I=E.rtl,k=E.selected,D=E.accessors,V=E.localizer,F=E.getters,$=E.components,Q=E.step,ae=E.timeslots,le=E.dayLayoutAlgorithm,_e=E.resizable,fe=i,We=fe.slotMetrics,se=V.messages,De=jz({events:s,accessors:D,slotMetrics:We,minimumStartDifference:Math.ceil(Q*ae/2),dayLayoutAlgorithm:le});return De.map(function(ze,je){var ft,ot=ze.event,st=ze.style,rt=D.end(ot),Re=D.start(ot),Yt=(ft=D.eventId(ot))!==null&&ft!==void 0?ft:"evt_"+je,Tt="eventTimeRangeFormat",_t,Qe=We.startsBeforeDay(Re),bt=We.startsAfterDay(rt);Qe?Tt="eventTimeRangeEndFormat":bt&&(Tt="eventTimeRangeStartFormat"),Qe&&bt?_t=se.allDay:_t=V.format({start:Re,end:rt},Tt);var xt=Qe||We.startsBefore(Re),Ue=bt||We.startsAfter(rt);return qe.createElement(Bz,{style:st,event:ot,label:_t,key:Yt,getters:F,rtl:I,components:$,continuesPrior:xt,continuesAfter:Ue,accessors:D,resource:i.props.resource,selected:Vv(ot,k),onClick:function(Ft){return i._select(Pn(Pn(Pn({},ot),i.props.resource&&{sourceResource:i.props.resource}),Y&&{isBackgroundEvent:!0}),Ft)},onDoubleClick:function(Ft){return i._doubleClick(ot,Ft)}
835,isBackgroundEvent:Y,onKeyPress:function(Ft){return i._keyPress(ot,Ft)},resizable:_e})})},i._selectable=function(){var g=i.containerRef.current,s=i.props,Y=s.longPressThreshold,E=s.localizer,I=i._selector=new iC(function(){return g},{longPressThreshold:Y}),k=function($){var Q=i.props.onSelecting,ae=i.state||{},le=D($),_e=le.startDate,fe=le.endDate;Q&&(E.eq(ae.startDate,_e,"minutes")&&E.eq(ae.endDate,fe,"minutes")||Q({start:_e,end:fe,resourceId:i.props.resource})===!1)||(i.state.start!==le.start||i.state.end!==le.end||i.state.selecting!==le.selecting)&&i.setState(le)},D=function($){var Q=i.slotMetrics.closestSlotFromPoint($,Od(g));i.state.selecting||(i._initialSlot=Q);var ae=i._initialSlot;E.lte(ae,Q)?Q=i.slotMetrics.nextSlot(Q):E.gt(ae,Q)&&(ae=i.slotMetrics.nextSlot(ae));var le=i.slotMetrics.getRange(E.min(ae,Q),E.max(ae,Q));return Pn(Pn({},le),{},{selecting:!0,top:"".concat(le.top,"%"),height:"".concat(le.height,"%")})},V=function($,Q){if(!rv(i.containerRef.current,$)){var ae=D($),le=ae.startDate,_e=ae.endDate;i._selectSlot({startDate:le,endDate:_e,action:Q,box:$})}i.setState({selecting:!1})};I.on("selecting",k),I.on("selectStart",k),I.on("beforeSelect",function(F){if(i.props.selectable==="ignoreEvents")return!rv(i.containerRef.current,F)}),I.on("click",function(F){return V(F,"click")}),I.on("doubleClick",function(F){return V(F,"doubleClick")}),I.on("select",function(F){i.state.selecting&&(i._selectSlot(Pn(Pn({},i.state),{},{action:"select",bounds:F})),i.setState({selecting:!1}))}),I.on("reset",function(){i.state.selecting&&i.setState({selecting:!1})})},i._teardownSelectable=function(){i._selector&&(i._selector.teardown(),i._selector=null)},i._selectSlot=function(g){for(var s=g.startDate,Y=g.endDate,E=g.action,I=g.bounds,k=g.box,D=s,V=[];i.props.localizer.lte(D,Y);)V.push(D),D=new Date(+D+i.props.step*60*1e3);Gn(i.props.onSelectSlot,{slots:V,start:s,end:Y,resourceId:i.props.resource,action:E,bounds:I,box:k})},i._select=function(){for(var g=arguments.length,s=new Array(g),Y=0;Y<g;Y++)s[Y]=arguments[Y];Gn(i.props.onSelectEvent,s)},i._doubleClick=function(){for(var g=arguments.length,s=new Array(g),Y=0;Y<g;Y++)s[Y]=arguments[Y];Gn(i.props.onDoubleClickEvent,s)},i._keyPress=function(){for(var g=arguments.length,s=new Array(g),Y=0;Y<g;Y++)s[Y]=arguments[Y];Gn(i.props.onKeyPressEvent,s)},i.slotMetrics=rS(i.props),i.containerRef=de.createRef(),i}return ts(t,n),ia(t,[{key:"componentDidMount",value:function(){this.props.selectable&&this._selectable(),this.props.isNow&&this.setTimeIndicatorPositionUpdateInterval()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable(),this.clearTimeIndicatorInterval()}},{key:"componentDidUpdate",value:function(a,h){this.props.selectable&&!a.selectable&&this._selectable(),!this.props.selectable&&a.selectable&&this._teardownSelectable();var m=this.props,g=m.getNow,s=m.isNow,Y=m.localizer,E=m.date,I=m.min,k=m.max,D=Y.neq(a.getNow(),g(),"minutes");if(a.isNow!==s||D){if(this.clearTimeIndicatorInterval(),s){var V=!D&&Y.eq(a.date,E,"minutes")&&h.timeIndicatorPosition===this.state.timeIndicatorPosition;this.setTimeIndicatorPositionUpdateInterval(V)}}else s&&(Y.neq(a.min,I,"minutes")||Y.neq(a.max,k,"minutes"))&&this.positionTimeIndicator()}},{key:"setTimeIndicatorPositionUpdateInterval",value:function(){var a=this,h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;!this.intervalTriggered&&!h&&this.positionTimeIndicator(),this._timeIndicatorTimeout=window.setTimeout(function(){a.intervalTriggered=!0,a.positionTimeIndicator(),a.setTimeIndicatorPositionUpdateInterval()},6e4)}},{key:"clearTimeIndicatorInterval",value:function(){this.intervalTriggered=!1,window.clearTimeout(this._timeIndicatorTimeout)}},{key:"positionTimeIndicator",value:function(){var a=this.props,h=a.min,m=a.max,g=a.getNow,s=g();if(s>=h&&s<=m){var Y=this.slotMetrics.getCurrentTimePosition(s);this.intervalTriggered=!0,this.setState({timeIndicatorPosition:Y})}else this.clearTimeIndicatorInterval()}},{key:"render",value:function(){var a=this.props,h=a.date,m=a.max,g=a.rtl,s=a.isNow,Y=a.resource,E=a.accessors,I=a.localizer,k=a.getters,D=k.dayProp,V=xu(k,qz),F=a.components,$=F.eventContainerWrapper,Q=F.timeIndicatorWrapper,ae=xu(F,Hz);this.slotMetrics=this.slotMetrics.update(this.props);var le=this.slotMetrics,_e=this.state,fe=_e.selecting,We=_e.top,se=_e.height,De=_e.startDate,ze=_e.endDate,je={start:De,end:ze},ft=D(m,Y),ot=ft.className,st=ft.style,rt={className:"rbc-current-time-indicator",style:{to
vendor: 18,909 bytes, line 835
835p:"".concat(this.state.timeIndicatorPosition,"%")}},Re=ae.dayColumnWrapper||Gz;return qe.createElement(Re,{ref:this.containerRef,date:h,style:st,className:vi(ot,"rbc-day-slot","rbc-time-column",s&&"rbc-now",s&&"rbc-today",fe&&"rbc-slot-selecting"),slotMetrics:le,resource:Y},le.groups.map(function(Yt,Tt){return qe.createElement(hC,{key:Tt,group:Yt,resource:Y,getters:V,components:ae})}),qe.createElement($,{localizer:I,resource:Y,accessors:E,getters:V,components:ae,slotMetrics:le},qe.createElement("div",{className:vi("rbc-events-container",g&&"rtl")},this.renderEvents({events:this.props.backgroundEvents,isBackgroundEvent:!0}),this.renderEvents({events:this.props.events}))),fe&&qe.createElement("div",{className:"rbc-slot-selection",style:{top:We,height:se}},qe.createElement("span",null,I.format(je,"selectRangeFormat"))),s&&this.intervalTriggered&&qe.createElement(Q,rt,qe.createElement("div",rt)))}}])}(qe.Component);dC.defaultProps={dragThroughEvents:!0,timeslots:2};var fC=function(t){var i=t.label;return qe.createElement(qe.Fragment,null,i)},Kz=function(n){function t(){var i;na(this,t);for(var a=arguments.length,h=new Array(a),m=0;m<a;m++)h[m]=arguments[m];return i=es(this,t,[].concat(h)),i.handleHeaderClick=function(g,s,Y){Y.preventDefault(),Gn(i.props.onDrillDown,[g,s])},i.renderRow=function(g){var s=i.props,Y=s.events,E=s.rtl,I=s.selectable,k=s.getNow,D=s.range,V=s.getters,F=s.localizer,$=s.accessors,Q=s.components,ae=s.resizable,le=$.resourceId(g),_e=g?Y.filter(function(fe){return $.resource(fe)===le}):Y;return qe.createElement(lg,{isAllDay:!0,rtl:E,getNow:k,minRows:2,maxRows:i.props.allDayMaxRows+1,range:D,events:_e,resourceId:le,className:"rbc-allday-cell",selectable:I,selected:i.props.selected,components:Q,accessors:$,getters:V,localizer:F,onSelect:i.props.onSelectEvent,onShowMore:i.props.onShowMore,onDoubleClick:i.props.onDoubleClickEvent,onKeyPress:i.props.onKeyPressEvent,onSelectSlot:i.props.onSelectSlot,longPressThreshold:i.props.longPressThreshold,resizable:ae})},i}return ts(t,n),ia(t,[{key:"renderHeaderCells",value:function(a){var h=this,m=this.props,g=m.localizer,s=m.getDrilldownView,Y=m.getNow,E=m.getters.dayProp,I=m.components.header,k=I===void 0?tS:I,D=Y();return a.map(function(V,F){var $=s(V),Q=g.format(V,"dayFormat"),ae=E(V),le=ae.className,_e=ae.style,fe=qe.createElement(k,{date:V,label:Q,localizer:g});return qe.createElement("div",{key:F,style:_e,className:vi("rbc-header",le,g.isSameDate(V,D)&&"rbc-today")},$?qe.createElement("button",{type:"button",className:"rbc-button-link",onClick:function(se){return h.handleHeaderClick(V,$,se)}},fe):qe.createElement("span",null,fe))})}},{key:"render",value:function(){var a=this,h=this.props,m=h.width,g=h.rtl,s=h.resources,Y=h.range,E=h.events,I=h.getNow,k=h.accessors,D=h.selectable,V=h.components,F=h.getters,$=h.scrollRef,Q=h.localizer,ae=h.isOverflowing,le=h.components,_e=le.timeGutterHeader,fe=le.resourceHeader,We=fe===void 0?fC:fe,se=h.resizable,De={};ae&&(De[g?"marginLeft":"marginRight"]="".concat(kY()-1,"px"));var ze=s.groupEvents(E);return qe.createElement("div",{style:De,ref:$,className:vi("rbc-time-header",ae&&"rbc-overflowing")},qe.createElement("div",{className:"rbc-label rbc-time-header-gutter",style:{width:m,minWidth:m,maxWidth:m}},_e&&qe.createElement(_e,null)),s.map(function(je,ft){var ot=Cd(je,2),st=ot[0],rt=ot[1];return qe.createElement("div",{className:"rbc-time-header-content",key:st||ft},rt&&qe.createElement("div",{className:"rbc-row rbc-row-resource",key:"resource_".concat(ft)},qe.createElement("div",{className:"rbc-header"},qe.createElement(We,{index:ft,label:k.resourceTitle(rt),resource:rt}))),qe.createElement("div",{className:"rbc-row rbc-time-header-cell".concat(Y.length<=1?" rbc-time-header-cell-single-day":"")},a.renderHeaderCells(Y)),qe.createElement(lg,{isAllDay:!0,rtl:g,getNow:I,minRows:2,maxRows:a.props.allDayMaxRows+1,range:Y,events:ze.get(st)||[],resourceId:rt&&st,className:"rbc-allday-cell",selectable:D,selected:a.props.selected,components:V,accessors:k,getters:F,localizer:Q,onSelect:a.props.onSelectEvent,onShowMore:a.props.onShowMore,onDoubleClick:a.props.onDoubleClickEvent,onKeyDown:a.props.onKeyPressEvent,onSelectSlot:a.props.onSelectSlot,longPressThreshold:a.props.longPressThreshold,resizable:se}))}))}}])}(qe.Component),Qz=function(n){function t(){var i;na(this,t);for(var a=arguments.length,h=new Array(a),m=0;m<a;m++)h[m]=arguments[m];return i=es(this,t,[].concat(h)),i.handleHeaderClick=function(g,s,Y){Y.preventDefault(),Gn(i.props.onDrillDown,[g,s])},i}return ts(t,n),ia(t,[{key:"renderHeaderCells",value:function(a){var h=this,m=this.props,g=m.localizer,s=m.getDrilldownView,Y=m.getNow,E=m.getters.dayProp,I=m.components,k=I.header,D=k===void 0?tS:k,V=I.resourceHeader,F=V===void 0?fC:V,$=m.resources,Q=m.accessors,ae=m.events,le=m.rtl,_e=m.selectable,fe=m.components,We=m.getters,se=m.resizable,De=Y(),ze=$.groupEvents(ae);return a.map(function(je,ft){var ot=s(je),st=g.format(je,"dayFormat"),rt=E(je),Re=rt.className,Yt=rt.style,Tt=qe.createElement(D,{date:je,label:st,localizer:g});return qe.createElement("div",{key:ft,className:"rbc-time-header-content rbc-resource-grouping"},qe.createElement("div",{className:"rbc-row rbc-time-header-cell".concat(a.length<=1?" rbc-time-header-cell-single-day":"")},qe.createElement("div",{style:Yt,className:vi("rbc-header",Re,g.isSameDate(je,De)&&"rbc-today")},ot?qe.createElement("button",{type:"button",className:"rbc-button-link",onClick:function(Qe){return h.handleHeaderClick(je,ot,Qe)}},Tt):qe.createElement("span",null,Tt))),qe.createElement("div",{className:"rbc-row"},$.map(function(_t,Qe){var bt=Cd(_t,2),xt=bt[0],Ue=bt[1];return qe.createElement("div",{key:"resource_".concat(xt,"_").concat(Qe),className:vi("rbc-header",Re,g.isSameDate(je,De)&&"rbc-today")},qe.createElement(F,{index:Qe,label:Q.resourceTitle(Ue),resource:Ue}))})),qe.createElement("div",{className:"rbc-row rbc-m-b-negative-3 rbc-h-full"},$.map(function(_t,Qe){var bt=Cd(_t,2),xt=bt[0],Ue=bt[1],pt=(ze.get(xt)||[]).filter(function(Ft){return g.isSameDate(Ft.start,je)||g.isSameDate(Ft.end,je)});return qe.createElement(lg,{key:"resource_".concat(xt,"_").concat(Qe),isAllDay:!0,rtl:le,getNow:Y,minRows:2,maxRows:h.props.allDayMaxRows+1,range:[je],events:pt,resourceId:Ue&&xt,className:"rbc-allday-cell",selectable:_e,selected:h.props.selected,components:fe,accessors:Q,getters:We,localizer:g,onSelect:h.props.onSelectEvent,onShowMore:h.props.onShowMore,onDoubleClick:h.props.onDoubleClickEvent,onKeyDown:h.props.onKeyPressEvent,onSelectSlot:h.props.onSelectSlot,longPressThreshold:h.props.longPressThreshold,resizable:se})})))})}},{key:"render",value:function(){var a=this.props,h=a.width,m=a.rtl,g=a.range,s=a.scrollRef,Y=a.isOverflowing,E=a.components.timeGutterHeader,I={};return Y&&(I[m?"marginLeft":"marginRight"]="".concat(kY()-1,"px")),qe.createElement("div",{style:I,ref:s,className:vi("rbc-time-header",Y&&"rbc-overflowing")},qe.createElement("div",{className:"rbc-label rbc-time-header-gutter",style:{width:h,minWidth:h,maxWidth:h}},E&&qe.createElement(E,null)),this.renderHeaderCells(g))}}])}(qe.Component);function Jz(n){var t=n.min,i=n.max,a=n.localizer;return a.getTimezoneOffset(t)!==a.getTimezoneOffset(i)?{start:a.add(t,-1,"day"),end:a.add(i,-1,"day")}:{start:t,end:i}}var eF=function(t){var i=t.min,a=t.max,h=t.timeslots,m=t.step,g=t.localizer,s=t.getNow,Y=t.resource,E=t.components,I=t.getters,k=t.gutterRef,D=E.timeGutterWrapper,V=de.useMemo(function(){return Jz({min:i,max:a,localizer:g})},[i==null?void 0:i.toISOString(),a==null?void 0:a.toISOString(),g]),F=V.start,$=V.end,Q=de.useState(rS({min:F,max:$,timeslots:h,step:m,localizer:g})),ae=Cd(Q,2),le=ae[0],_e=ae[1];de.useEffect(function(){le&&_e(le.update({min:F,max:$,timeslots:h,step:m,localizer:g}))},[F==null?void 0:F.toISOString(),$==null?void 0:$.toISOString(),h,m]);var fe=de.useCallback(function(We,se){if(se)return null;var De=le.dateIsInGroup(s(),se);return qe.createElement("span",{className:vi("rbc-label",De&&"rbc-now")},g.format(We,"timeGutterFormat"))},[le,g,s]);return qe.createElement(D,{slotMetrics:le},qe.createElement("div",{className:"rbc-time-gutter rbc-time-column",ref:k},le.groups.map(function(We,se){return qe.createElement(hC,{key:se,group:We,resource:Y,components:E,renderSlot:fe,getters:I})})))},tF=qe.forwardRef(function(n,t){return qe.createElement(eF,Object.assign({gutterRef:t},n))}),fw={};function rF(n,t){return{map:function(a){return n?n.map(function(h,m){return a([t.resourceId(h),h],m)}):[a([fw,null],0)]},groupEvents:function(a){var h=new Map;return n?(a.forEach(function(m){var g=t.resource(m)||fw;if(Array.isArray(g))g.forEach(function(Y){var E=h.get(Y)||[];E.push(m),h.set(Y,E)});else{var s=h.get(g)||[];s.push(m),h.set(g,s)}}),h):(h.set(fw,a),h)}}}var Sp=function(n){function t(i){var a;return na(this,t),a=es(this,t,[i]),a.handleScroll=function(h){a.scrollRef.current&&(a.scrollRef.current.scrollLeft=h.target.scrollLeft)},a.handleResize=function(){JT(a.rafHandle),a.rafHandle=xU(a.checkOverflow)},a.handleKeyPressEvent=function(){a.clearSelection();for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];Gn(a.props.onKeyPressEvent,m)},a.handleSelectEvent=function(){a.clearSelection();for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];Gn(a.props.onSelectEvent,m)},a.handleDoubleClickEvent=function(){a.clearSelection();for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];Gn(a.props.onDoubleClickEvent,m)},a.handleShowMore=function(h,m,g,s,Y){var E=a.props,I=E.popup,k=E.onDrillDown,D=E.onShowMore,V=E.getDrilldownView,F=E.doShowMoreDrillDown;if(a.clearSelection(),I){var $=_U(g,a.containerRef.current);a.setState({overlay:{date:m,events:h,position:Pn(Pn({},$),{},{width:"200px"}),target:Y}})}else F&&Gn(k,[m,V(m)||vs.DAY]);Gn(D,[h,m,s])},a.handleSelectAllDaySlot=function(h,m){var g=a.props.onSelectSlot,s=new Date(h[0]),Y=new Date(h[h.length-1]);Y.setDate(h[h.length-1].getDate()+1),Gn(g,{slots:h,start:s,end:Y,action:m.action,resourceId:m.resourceId})},a.overlayDisplay=function(){a.setState({overlay:null})},a.checkOverflow=function(){if(!a._updatingOverflow){var h=a.contentRef.current;if(h!=null&&h.scrollHeight){var m=h.scrollHeight>h.clientHeight;a.state.isOverflowing!==m&&(a._updatingOverflow=!0,a.setState({isOverflowing:m},function(){a._updatingOverflow=!1}))}}},a.memoizedResources=XU(function(h,m){return rF(h,m)}),a.state={gutterWidth:void 0,isOverflowing:null},a.scrollRef=qe.createRef(),a.contentRef=qe.createRef(),a.containerRef=qe.createRef(),a._scrollRatio=null,a.gutterRef=de.createRef(),a}return ts(t,n),ia(t,[{key:"getSnapshotBeforeUpdate",value:function(){return this.checkOverflow(),null}},{key:"componentDidMount",value:function(){this.props.width==null&&this.measureGutter(),this.calculateScroll(),this.applyScroll(),window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize),JT(this.rafHandle),this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest)}},{key:"componentDidUpdate",value:function(){this.applyScroll()}},{key:"renderDayColumn",value:function(a,h,m,g,s,Y,E,I,k,D){var V=this.props,F=V.min,$=V.max,Q=(g.get(h)||[]).filter(function(le){return Y.inRange(a,E.start(le),E.end(le),"day")}),ae=(s.get(h)||[]).filter(function(le){return Y.inRange(a,E.start(le),E.end(le),"day")});return qe.createElement(dC,Object.assign({},this.props,{localizer:Y,min:Y.merge(a,F),max:Y.merge(a,$),resource:m&&h,components:I,isNow:Y.isSameDate(a,D),key:"".concat(h,"-").concat(a),date:a,events:Q,backgroundEvents:ae,dayLayoutAlgorithm:k}))}},{key:"renderResourcesFirst",value:function(a,h,m,g,s,Y,E,I,k){var D=this;return h.map(function(V){var F=Cd(V,2),$=F[0],Q=F[1];return a.map(function(ae){return D.renderDayColumn(ae,$,Q,m,g,s,Y,I,k,E)})})}},{key:"renderRangeFirst",value:function(a,h,m,g,s,Y,E,I,k){var D=this;return a.map(function(V){return qe.createElement("div",{style:{display:"flex",minHeight:"100%",flex:1},key:V},h.map(function(F){var $=Cd(F,2),Q=$[0],ae=$[1];return qe.createElement("div",{style:{flex:1},key:Y.resourceId(ae)},D.renderDayColumn(V,Q,ae,m,g,s,Y,I,k,E))}))})}},{key:"renderEvents",value:function(a,h,m,g){var s=this.props,Y=s.accessors,E=s.localizer,I=s.resourceGroupingLayout,k=s.components,D=s.dayLayoutAlgorithm,V=this.memoizedResources(this.props.resources,Y),F=V.groupEvents(h),$=V.groupEvents(m);return I?this.renderRangeFirst(a,V,F,$,E,Y,g,k,D):this.renderResourcesFirst(a,V,F,$,E,Y,g,k,D)}},{key:"render",value:function(){var a,h=this.props,m=h.events,g=h.backgroundEvents,s=h.range,Y=h.width,E=h.rtl,I=h.selected,k=h.getNow,D=h.resources,V=h.components,F=h.accessors,$=h.getters,Q=h.localizer,ae=h.min,le=h.max,_e=h.showMultiDayTimes,fe=h.longPressThreshold,We=h.resizable,se=h.resourceGroupingLayout;Y=Y||this.state.gutterWidth;var De=s[0],ze=s[s.length-1];this.slots=s.length;var je=[],ft=[],ot=[];m.forEach(function(rt){if(og(rt,De,ze,F,Q)){var Re=F.start(rt),Yt=F.end(rt);F.allDay(rt)||Q.startAndEndAreDateOnly(Re,Yt)||!_e&&!Q.isSameDate(Re,Yt)?je.push(rt):ft.push(rt)}}),g.forEach(function(rt){og(rt,De,ze,F,Q)&&ot.push(rt)}),je.sort(function(rt,Re){return qw(rt,Re,F,Q)});var st={range:s,events:je,width:Y,rtl:E,getNow:k,localizer:Q,selected:I,allDayMaxRows:this.props.showAllEvents?1/0:(a=this.props.allDayMaxRows)!==null&&a!==void 0?a:1/0,resources:this.memoizedResources(D,F),selectable:this.props.selectable,accessors:F,getters:$,components:V,scrollRef:this.scrollRef,isOverflowing:this.state.isOverflowing,longPressThreshold:fe,onSelectSlot:this.handleSelectAllDaySlot,onSelectEvent:this.handleSelectEvent,onShowMore:this.handleShowMore,onDoubleClickEvent:this.props.onDoubleClickEvent,onKeyPressEvent:this.props.onKeyPressEvent,onDrillDown:this.props.onDrillDown,getDrilldownView:this.props.getDrilldownView,resizable:We};return qe.createElement("div",{className:vi("rbc-time-view",D&&"rbc-time-view-resources"),ref:this.containerRef},D&&D.length>1&&se?qe.createElement(Qz,st):qe.createElement(Kz,st),this.props.popup&&this.renderOverlay(),qe.createElement("div",{ref:this.contentRef,className:"rbc-time-content",onScroll:this.handleScroll},qe.createElement(tF,{date:De,ref:this.gutterRef,localizer:Q,min:Q.merge(De,ae),max:Q.merge(De,le),step:this.props.step,getNow:this.props.getNow,timeslots:this.props.timeslots,components:V,className:"rbc-time-gutter",getters:$}),this.renderEvents(s,ft,ot,k())))}},{key:"renderOverlay",value:function(){var a,h,m=this,g=(a=(h=this.state)===null||h===void 0?void 0:h.overlay)!==null&&a!==void 0?a:{},s=this.props,Y=s.accessors,E=s.localizer,I=s.components,k=s.getters,D=s.selected,V=s.popupOffset,F=s.handleDragStart,$=function(){return m.setState({overlay:null})};return qe.createElement(eS,{overlay:g,accessors:Y,localizer:E,components:I,getters:k,selected:D,popupOffset:V,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:F,show:!!g.position,overlayDisplay:this.overlayDisplay,onHide:$})}},{key:"clearSelection",value:function(){clearTimeout(this._selectTimer),this._pendingSelection=[]}},{key:"measureGutter",value:function(){var a=this;this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest),this.measureGutterAnimationFrameRequest=window.requestAnimationFrame(function(){var h,m=(h=a.gutterRef)!==null&&h!==void 0&&h.current?Bw(a.gutterRef.current):void 0;m&&a.state.gutterWidth!==m&&a.setState({gutterWidth:m})})}},{key:"applyScroll",value:function(){if(this._scrollRatio!=null&&this.props.enableAutoScroll===!0){var a=this.contentRef.current;a.scrollTop=a.scrollHeight*this._scrollRatio,this._scrollRatio=null}}},{key:"calculateScroll",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,h=a.min,m=a.max,g=a.scrollToTime,s=a.localizer,Y=s.diff(s.merge(g,h),g,"milliseconds"),E=s.diff(h,m,"milliseconds");this._scrollRatio=Y/E}}])}(de.Component);Sp.defaultProps={step:30,timeslots:2,resourceGroupingLayout:!1};var nF=["date","localizer","min","max","scrollToTime","enableAutoScroll"],kv=function(n){function t(){return na(this,t),es(this,t,arguments)}return ts(t,n),ia(t,[{key:"render",value:function(){var a=this.props,h=a.date,m=a.localizer,g=a.min,s=g===void 0?m.startOf(new Date,"day"):g,Y=a.max,E=Y===void 0?m.endOf(new Date,"day"):Y,I=a.scrollToTime,k=I===void 0?m.startOf(new Date,"day"):I,D=a.enableAutoScroll,V=D===void 0?!0:D,F=xu(a,nF),$=t.range(h,{localizer:m});return qe.createElement(Sp,Object.assign({},F,{range:$,eventOffset:10,localizer:m,min:s,max:E,scrollToTime:k,enableAutoScroll:V}))}}])}(qe.Component);kv.range=function(n,t){var i=t.localizer;return[i.startOf(n,"day")]};kv.navigate=function(n,t,i){var a=i.localizer;switch(t){case Ns.PREVIOUS:return a.add(n,-1,"day");case Ns.NEXT:return a.add(n,1,"day");default:return n}};kv.title=function(n,t){var i=t.localizer;return i.format(n,"dayHeaderFormat")};var iF=["date","localizer","min","max","scrollToTime","enableAutoScroll"],yh=function(n){function t(){return na(this,t),es(this,t,arguments)}return ts(t,n),ia(t,[{key:"render",value:function(){var a=this.props,h=a.date,m=a.localizer,g=a.min,s=g===void 0?m.startOf(new Date,"day"):g,Y=a.max,E=Y===void 0?m.endOf(new Date,"day"):Y,I=a.scrollToTime,k=I===void 0?m.startOf(new Date,"day"):I,D=a.enableAutoScroll,V=D===void 0?!0:D,F=xu(a,iF),$=t.range(h,this.props);return qe.createElement(Sp,Object.assign({},F,{range:$,eventOffset:15,localizer:m,min:s,max:E,scrollToTime:k,enableAutoScroll:V}))}}])}(qe.Component);yh.defaultProps=Sp.defaultProps;yh.navigate=function(n,t,i){var a=i.localizer;switch(t){case Ns.PREVIOUS:return a.add(n,-1,"week");case Ns.NEXT:return a.add(n,1,"week");default:return n}};yh.range=function(n,t){var i=t.localizer,a=i.startOfWeek(),h=i.startOf(n,"week",a),m=i.endOf(n,"week",a);return i.range(h,m)};yh.title=function(n,t){var i=t.localizer,a=yh.range(n,{localizer:i}),h=BU(a),m=h[0],g=h.slice(1);return i.format({start:m,end:g.pop()},"dayRangeHeaderFormat")};var aF=["date","localizer","min","max","scrollToTime","enableAutoScroll"];function nS(n,t){return yh.range(n,t).filter(function(i){return[6,0].indexOf(i.getDay())===-1})}var Eg=function(n){function t(){return na(this,t),es(this,t,arguments)}return ts(t,n),ia(t,[{key:"render",value:function(){var a=this.props,h=a.date,m=a.localizer,g=a.min,s=g===void 0?m.startOf(new Date,"day"):g,Y=a.max,E=Y===void 0?m.endOf(new Date,"day"):Y,I=a.scrollToTime,k=I===void 0?m.startOf(new Date,"day"):I,D=a.enableAutoScroll,V=D===void 0?!0:D,F=xu(a,aF),$=nS(h,this.props);return qe.createElement(Sp,Object.assign({},F,{range:$,eventOffset:15,localizer:m,min:s,max:E,scrollToTime:k,enableAutoScroll:V}))}}])}(qe.Component);Eg.defaultProps=Sp.defaultProps;Eg.range=nS;
835Eg.navigate=yh.navigate;Eg.title=function(n,t){var i=t.localizer,a=nS(n,{localizer:i}),h=BU(a),m=h[0],g=h.slice(1);return i.format({start:m,end:g.pop()},"dayRangeHeaderFormat")};var Dv=30;function Rv(n){var t=n.accessors,i=n.components,a=n.date,h=n.events,m=n.getters,g=n.length,s=g===void 0?Dv:g,Y=n.localizer,E=n.onDoubleClickEvent,I=n.onSelectEvent,k=n.selected,D=de.useRef(null),V=de.useRef(null),F=de.useRef(null),$=de.useRef(null),Q=de.useRef(null);de.useEffect(function(){_e()});var ae=function(ze,je,ft){var ot=i.event,st=i.date;return je=je.filter(function(rt){return og(rt,Y.startOf(ze,"day"),Y.endOf(ze,"day"),t,Y)}),je.map(function(rt,Re){var Yt=t.title(rt),Tt=t.end(rt),_t=t.start(rt),Qe=m.eventProp(rt,_t,Tt,Vv(rt,k)),bt=Re===0&&Y.format(ze,"agendaDateFormat"),xt=Re===0?qe.createElement("td",{rowSpan:je.length,className:"rbc-agenda-date-cell"},st?qe.createElement(st,{day:ze,label:bt}):bt):!1;return qe.createElement("tr",{key:ft+"_"+Re,className:Qe.className,style:Qe.style},xt,qe.createElement("td",{className:"rbc-agenda-time-cell"},le(ze,rt)),qe.createElement("td",{className:"rbc-agenda-event-cell",onClick:function(pt){return I&&I(rt,pt)},onDoubleClick:function(pt){return E&&E(rt,pt)}},ot?qe.createElement(ot,{event:rt,title:Yt}):Yt))},[])},le=function(ze,je){var ft="",ot=i.time,st=Y.messages.allDay,rt=t.end(je),Re=t.start(je);return t.allDay(je)||(Y.eq(Re,rt)?st=Y.format(Re,"agendaTimeFormat"):Y.isSameDate(Re,rt)?st=Y.format({start:Re,end:rt},"agendaTimeRangeFormat"):Y.isSameDate(ze,Re)?st=Y.format(Re,"agendaTimeFormat"):Y.isSameDate(ze,rt)&&(st=Y.format(rt,"agendaTimeFormat"))),Y.gt(ze,Re,"day")&&(ft="rbc-continues-prior"),Y.lt(ze,rt,"day")&&(ft+=" rbc-continues-after"),qe.createElement("span",{className:ft.trim()},ot?qe.createElement(ot,{event:je,day:ze,label:st}):st)},_e=function(){if(Q.current){var ze=D.current,je=Q.current.firstChild;if(je){var ft=$.current.scrollHeight>$.current.clientHeight,ot=[],st=ot;ot=[Bw(je.children[0]),Bw(je.children[1])],(st[0]!==ot[0]||st[1]!==ot[1])&&(V.current.style.width=ot[0]+"px",F.current.style.width=ot[1]+"px"),ft?(aX(ze,"rbc-header-overflowing"),ze.style.marginRight=kY()+"px"):sX(ze,"rbc-header-overflowing")}}},fe=Y.messages,We=Y.add(a,s,"day"),se=Y.range(a,We,"day");return h=h.filter(function(De){return og(De,Y.startOf(a,"day"),Y.endOf(We,"day"),t,Y)}),h.sort(function(De,ze){return+t.start(De)-+t.start(ze)}),qe.createElement("div",{className:"rbc-agenda-view"},h.length!==0?qe.createElement(qe.Fragment,null,qe.createElement("table",{ref:D,className:"rbc-agenda-table"},qe.createElement("thead",null,qe.createElement("tr",null,qe.createElement("th",{className:"rbc-header",ref:V},fe.date),qe.createElement("th",{className:"rbc-header",ref:F},fe.time),qe.createElement("th",{className:"rbc-header"},fe.event)))),qe.createElement("div",{className:"rbc-agenda-content",ref:$},qe.createElement("table",{className:"rbc-agenda-table"},qe.createElement("tbody",{ref:Q},se.map(function(De,ze){return ae(De,h,ze)}))))):qe.createElement("span",{className:"rbc-agenda-empty"},fe.noEventsInRange))}Rv.range=function(n,t){var i=t.length,a=i===void 0?Dv:i,h=t.localizer,m=h.add(n,a,"day");return{start:n,end:m}};Rv.navigate=function(n,t,i){var a=i.length,h=a===void 0?Dv:a,m=i.localizer;switch(t){case Ns.PREVIOUS:return m.add(n,-h,"day");case Ns.NEXT:return m.add(n,h,"day");default:return n}};Rv.title=function(n,t){var i=t.length,a=i===void 0?Dv:i,h=t.localizer,m=h.add(n,a,"day");return h.format({start:n,end:m},"agendaHeaderFormat")};var Oy=Ed(Ed(Ed(Ed(Ed({},vs.MONTH,Av),vs.WEEK,yh),vs.WORK_WEEK,Eg),vs.DAY,kv),vs.AGENDA,Rv),sF=["action","date","today"];function oF(n,t){var i=t.action,a=t.date,h=t.today,m=xu(t,sF);switch(n=typeof n=="string"?Oy[n]:n,i){case Ns.TODAY:a=h||new Date;break;case Ns.DATE:break;default:qm(n&&typeof n.navigate=="function","Calendar View components must implement a static `.navigate(date, action)` method.s"),a=n.navigate(a,i,m)}return a}function lF(n,t){var i=null;return typeof t=="function"?i=t(n):typeof t=="string"&&lc(n)==="object"&&n!=null&&t in n&&(i=n[t]),i}var ac=function(t){return function(i){return lF(i,t)}},uF=["view","date","getNow","onNavigate"],cF=["view","toolbar","events","backgroundEvents","resourceGroupingLayout","style","className","elementProps","date","getNow","length","showMultiDayTimes","onShowMore","doShowMoreDrillDown","components","formats","messages","culture"];function pC(n){if(Array.isArray(n))return n;for(var t=[],i=0,a=Object.entries(n);i<a.length;i++){var h=Cd(a[i],2),m=h[0],g=h[1];g&&t.push(m)}return t}function hF(n,t){var i=t.views,a=pC(i);return a.indexOf(n)!==-1}var mC=function(n){function t(){var i;na(this,t);for(var a=arguments.length,h=new Array(a),m=0;m<a;m++)h[m]=arguments[m];return i=es(this,t,[].concat(h)),i.getViews=function(){var g=i.props.views;return Array.isArray(g)?V5(g,function(s,Y){return s[Y]=Oy[Y]},{}):lc(g)==="object"?r5(g,function(s,Y){return s===!0?Oy[Y]:s}):Oy},i.getView=function(){var g=i.getViews();return g[i.props.view]},i.getDrilldownView=function(g){var s=i.props,Y=s.view,E=s.drilldownView,I=s.getDrilldownView;return I?I(g,Y,Object.keys(i.getViews())):E},i.handleRangeChange=function(g,s,Y){var E=i.props,I=E.onRangeChange,k=E.localizer;I&&s.range&&I(s.range(g,{localizer:k}),Y)},i.handleNavigate=function(g,s){var Y=i.props,E=Y.view,I=Y.date,k=Y.getNow,D=Y.onNavigate,V=xu(Y,uF),F=i.getView(),$=k();I=oF(F,Pn(Pn({},V),{},{action:g,date:s||I||$,today:$})),D(I,E,g),i.handleRangeChange(I,F)},i.handleViewChange=function(g){g!==i.props.view&&hF(g,i.props)&&i.props.onView(g);var s=i.getViews();i.handleRangeChange(i.props.date||i.props.getNow(),s[g],g)},i.handleSelectEvent=function(){for(var g=arguments.length,s=new Array(g),Y=0;Y<g;Y++)s[Y]=arguments[Y];Gn(i.props.onSelectEvent,s)},i.handleDoubleClickEvent=function(){for(var g=arguments.length,s=new Array(g),Y=0;Y<g;Y++)s[Y]=arguments[Y];Gn(i.props.onDoubleClickEvent,s)},i.handleKeyPressEvent=function(){for(var g=arguments.length,s=new Array(g),Y=0;Y<g;Y++)s[Y]=arguments[Y];Gn(i.props.onKeyPressEvent,s)},i.handleSelectSlot=function(g){Gn(i.props.onSelectSlot,g)},i.handleDrillDown=function(g,s){var Y=i.props.onDrillDown;
835if(Y){Y(g,s,i.drilldownView);return}s&&i.handleViewChange(s),i.handleNavigate(Ns.DATE,g)},i.state={context:t.getContext(i.props)},i}return ts(t,n),ia(t,[{key:"render",value:function(){var a=this.props,h=a.view,m=a.toolbar,g=a.events,s=a.backgroundEvents,Y=a.resourceGroupingLayout,E=a.style,I=a.className,k=a.elementProps,D=a.date,V=a.getNow,F=a.length,$=a.showMultiDayTimes,Q=a.onShowMore,ae=a.doShowMoreDrillDown;a.components,a.formats,a.messages,a.culture;var le=xu(a,cF);D=D||V();var _e=this.getView(),fe=this.state.context,We=fe.accessors,se=fe.components,De=fe.getters,ze=fe.localizer,je=fe.viewNames,ft=se.toolbar||pz,ot=_e.title(D,{localizer:ze,length:F});return qe.createElement("div",Object.assign({},k,{className:vi(I,"rbc-calendar",le.rtl&&"rbc-rtl"),style:E}),m&&qe.createElement(ft,{date:D,view:h,views:je,label:ot,onView:this.handleViewChange,onNavigate:this.handleNavigate,localizer:ze}),qe.createElement(_e,Object.assign({},le,{events:g,backgroundEvents:s,date:D,getNow:V,length:F,localizer:ze,getters:De,components:se,accessors:We,showMultiDayTimes:$,getDrilldownView:this.getDrilldownView,onNavigate:this.handleNavigate,onDrillDown:this.handleDrillDown,onSelectEvent:this.handleSelectEvent,onDoubleClickEvent:this.handleDoubleClickEvent,onKeyPressEvent:this.handleKeyPressEvent,onSelectSlot:this.handleSelectSlot,onShowMore:Q,doShowMoreDrillDown:ae,resourceGroupingLayout:Y})))}}],[{key:"getDerivedStateFromProps",value:function(a){return{context:t.getContext(a)}}},{key:"getContext",value:function(a){var h=a.startAccessor,m=a.endAccessor,g=a.allDayAccessor,s=a.tooltipAccessor,Y=a.titleAccessor,E=a.resourceAccessor,I=a.resourceIdAccessor,k=a.resourceTitleAccessor,D=a.eventIdAccessor,V=a.eventPropGetter,F=a.backgroundEventPropGetter,$=a.slotPropGetter,Q=a.slotGroupPropGetter,ae=a.dayPropGetter,le=a.view,_e=a.views,fe=a.localizer,We=a.culture,se=a.messages,De=se===void 0?{}:se,ze=a.components,je=ze===void 0?{}:ze,ft=a.formats,ot=ft===void 0?{}:ft,st=pC(_e),rt=gz(De);return{viewNames:st,localizer:fz(fe,We,ot,rt),getters:{eventProp:function(){return V&&V.apply(void 0,arguments)||{}},backgroundEventProp:function(){return F&&F.apply(void 0,arguments)||{}},slotProp:function(){return $&&$.apply(void 0,arguments)||{}},slotGroupProp:function(){return Q&&Q.apply(void 0,arguments)||{}},dayProp:function(){return ae&&ae.apply(void 0,arguments)||{}}},components:JN(je[le]||{},I5(je,st),{eventWrapper:gu,backgroundEventWrapper:gu,eventContainerWrapper:gu,dateCellWrapper:gu,weekWrapper:gu,timeSlotWrapper:gu,timeGutterWrapper:gu,timeIndicatorWrapper:gu}),accessors:{start:ac(h),end:ac(m),allDay:ac(g),tooltip:ac(s),title:ac(Y),resource:ac(E),resourceId:ac(I),resourceTitle:ac(k),eventId:ac(D)}}}}])}(qe.Component);mC.defaultProps={events:[],backgroundEvents:[],elementProps:{},popup:!1,toolbar:!0,view:vs.MONTH,views:[vs.MONTH,vs.WEEK,vs.DAY,vs.AGENDA],step:30,length:30,allDayMaxRows:1/0,doShowMoreDrillDown:!0,drilldownView:vs.DAY,titleAccessor:"title",tooltipAccessor:"title",allDayAccessor:"allDay",startAccessor:"start",endAccessor:"end",resourceAccessor:"resourceId",resourceIdAccessor:"id",resourceTitleAccessor:"title",eventIdAccessor:"id",longPressThreshold:250,getNow:function(){return new Date},dayLayoutAlgorithm:"overlap"};var dF=nU(mC,{view:"onView",date:"onNavigate",selected:"onSelectEvent"}),fF=function(t,i,a){var h=t.start,m=t.end;return"".concat(a.format(h,"P",i)," â ").concat(a.format(m,"P",i))},pw=function(t,i,a){var h=t.start,m=t.end;return"".concat(a.format(h,"p",i)," â ").concat(a.format(m,"p",i))},pF=function(t,i,a){var h=t.start;return"".concat(a.format(h,"h:mma",i)," â ")},mF=function(t,i,a){var h=t.end;return" â ".concat(a.format(h,"h:mma",i))},gF=function(t,i,a){var h=t.start,m=t.end;return"".concat(a.format(h,"MMMM dd",i)," â ").concat(a.format(m,_p(h,m,"month")?"dd":"MMMM dd",i))},yF={dateFormat:"dd",dayFormat:"dd eee",weekdayFormat:"ccc",selectRangeFormat:pw,eventTimeRangeFormat:pw,eventTimeRangeStartFormat:pF,eventTimeRangeEndFormat:mF,timeGutterFormat:"p",monthHeaderFormat:"MMMM yyyy",dayHeaderFormat:"cccc MMM dd",dayRangeHeaderFormat:gF,agendaHeaderFormat:fF,agendaDateFormat:"ccc MMM dd",agendaTimeFormat:"p",agendaTimeRangeFormat:pw},vF=function(t){var i=t.startOfWeek,a=t.getDay,h=t.format,m=t.locales;return new dz({formats:yF,firstOfWeek:function(s){return a(i(new Date,{locale:m[s]}))},format:function(s,Y,E){return h(new Date(s),Y,{locale:m[E]})}})};const gC=6048e5,_F=864e5,NM=Symbol.for("constructDateFrom");function vh(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&NM in n?n[NM](t):n instanceof Date?new n.constructor(t):new Date(t)}function Bo(n,t){return vh(t||n,n)}let xF={};function Lv(){return xF}function dp(n,t){var s,Y,E,I;const i=Lv(),a=(t==null?void 0:t.weekStartsOn)??((Y=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:Y.weekStartsOn)??i.weekStartsOn??((I=(E=i.locale)==null?void 0:E.options)==null?void 0:I.weekStartsOn)??0,h=Bo(n,t==null?void 0:t.in),m=h.getDay(),g=(m<a?7:0)+m-a;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function nv(n,t){return dp(n,{...t,weekStartsOn:1}
vendor: 14,975 bytes, line 835
835)}function yC(n,t){const i=Bo(n,t==null?void 0:t.in),a=i.getFullYear(),h=vh(i,0);h.setFullYear(a+1,0,4),h.setHours(0,0,0,0);const m=nv(h),g=vh(i,0);g.setFullYear(a,0,4),g.setHours(0,0,0,0);const s=nv(g);return i.getTime()>=m.getTime()?a+1:i.getTime()>=s.getTime()?a:a-1}function zM(n){const t=Bo(n),i=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return i.setUTCFullYear(t.getFullYear()),+n-+i}function bF(n,...t){const i=vh.bind(null,t.find(a=>typeof a=="object"));return t.map(i)}function FM(n,t){const i=Bo(n,t==null?void 0:t.in);return i.setHours(0,0,0,0),i}function wF(n,t,i){const[a,h]=bF(i==null?void 0:i.in,n,t),m=FM(a),g=FM(h),s=+m-zM(m),Y=+g-zM(g);return Math.round((s-Y)/_F)}function YF(n,t){const i=yC(n,t),a=vh(n,0);return a.setFullYear(i,0,4),a.setHours(0,0,0,0),nv(a)}function SF(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function TF(n){return!(!SF(n)&&typeof n!="number"||isNaN(+Bo(n)))}function WF(n,t){const i=Bo(n,t==null?void 0:t.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}const EF={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},MF=(n,t,i)=>{let a;const h=EF[n];return typeof h=="string"?a=h:t===1?a=h.one:a=h.other.replace("{{count}}",t.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+a:a+" ago":a};function mw(n){return(t={})=>{const i=t.width?String(t.width):n.defaultWidth;return n.formats[i]||n.formats[n.defaultWidth]}}const PF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},IF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},UF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CF={date:mw({formats:PF,defaultWidth:"full"}),time:mw({formats:IF,defaultWidth:"full"}),dateTime:mw({formats:UF,defaultWidth:"full"})},VF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},AF=(n,t,i,a)=>VF[n];function Em(n){return(t,i)=>{const a=i!=null&&i.context?String(i.context):"standalone";let h;if(a==="formatting"&&n.formattingValues){const g=n.defaultFormattingWidth||n.defaultWidth,s=i!=null&&i.width?String(i.width):g;h=n.formattingValues[s]||n.formattingValues[g]}else{const g=n.defaultWidth,s=i!=null&&i.width?String(i.width):n.defaultWidth;h=n.values[s]||n.values[g]}const m=n.argumentCallback?n.argumentCallback(t):t;return h[m]}}const kF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},DF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},RF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},LF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},OF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},XF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},NF=(n,t)=>{const i=Number(n),a=i%100;if(a>20||a<10)switch(a%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},zF={ordinalNumber:NF,era:Em({values:kF,defaultWidth:"wide"}),quarter:Em({values:DF,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Em({values:RF,defaultWidth:"wide"}),day:Em({values:LF,defaultWidth:"wide"}),dayPeriod:Em({values:OF,defaultWidth:"wide",formattingValues:XF,defaultFormattingWidth:"wide"})};function Mm(n){return(t,i={})=>{const a=i.width,h=a&&n.matchPatterns[a]||n.matchPatterns[n.defaultMatchWidth],m=t.match(h);if(!m)return null;const g=m[0],s=a&&n.parsePatterns[a]||n.parsePatterns[n.defaultParseWidth],Y=Array.isArray(s)?ZF(s,k=>k.test(g)):FF(s,k=>k.test(g));let E;E=n.valueCallback?n.valueCallback(Y):Y,E=i.valueCallback?i.valueCallback(E):E;const I=t.slice(g.length);return{value:E,rest:I}}}function FF(n,t){for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&t(n[i]))return i}function ZF(n,t){for(let i=0;i<n.length;i++)if(t(n[i]))return i}function jF(n){return(t,i={})=>{const a=t.match(n.matchPattern);if(!a)return null;const h=a[0],m=t.match(n.parsePattern);if(!m)return null;let g=n.valueCallback?n.valueCallback(m[0]):m[0];g=i.valueCallback?i.valueCallback(g):g;const s=t.slice(h.length);return{value:g,rest:s}}}const BF=/^(\d+)(th|st|nd|rd)?/i,$F=/\d+/i,GF={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},qF={any:[/^b/i,/^(a|c)/i]},HF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},KF={any:[/1/i,/2/i,/3/i,/4/i]},QF={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},JF={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},e6={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},t6={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},r6={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},n6={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},i6={ordinalNumber:jF({matchPattern:BF,parsePattern:$F,valueCallback:n=>parseInt(n,10)}),era:Mm({matchPatterns:GF,defaultMatchWidth:"wide",parsePatterns:qF,defaultParseWidth:"any"}),quarter:Mm({matchPatterns:HF,defaultMatchWidth:"wide",parsePatterns:KF,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Mm({matchPatterns:QF,defaultMatchWidth:"wide",parsePatterns:JF,defaultParseWidth:"any"}),day:Mm({matchPatterns:e6,defaultMatchWidth:"wide",parsePatterns:t6,defaultParseWidth:"any"}),dayPeriod:Mm({matchPatterns:r6,defaultMatchWidth:"any",parsePatterns:n6,defaultParseWidth:"any"})},vC={code:"en-US",formatDistance:MF,formatLong:CF,formatRelative:AF,localize:zF,match:i6,options:{weekStartsOn:0,firstWeekContainsDate:1}};function a6(n,t){const i=Bo(n,t==null?void 0:t.in);return wF(i,WF(i))+1}function s6(n,t){const i=Bo(n,t==null?void 0:t.in),a=+nv(i)-+YF(i);return Math.round(a/gC)+1}function _C(n,t){var I,k,D,V;const i=Bo(n,t==null?void 0:t.in),a=i.getFullYear(),h=Lv(),m=(t==null?void 0:t.firstWeekContainsDate)??((k=(I=t==null?void 0:t.locale)==null?void 0:I.options)==null?void 0:k.firstWeekContainsDate)??h.firstWeekContainsDate??((V=(D=h.locale)==null?void 0:D.options)==null?void 0:V.firstWeekContainsDate)??1,g=vh((t==null?void 0:t.in)||n,0);g.setFullYear(a+1,0,m),g.setHours(0,0,0,0);const s=dp(g,t),Y=vh((t==null?void 0:t.in)||n,0);Y.setFullYear(a,0,m),Y.setHours(0,0,0,0);const E=dp(Y,t);return+i>=+s?a+1:+i>=+E?a:a-1}function o6(n,t){var s,Y,E,I;const i=Lv(),a=(t==null?void 0:t.firstWeekContainsDate)??((Y=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:Y.firstWeekContainsDate)??i.firstWeekContainsDate??((I=(E=i.locale)==null?void 0:E.options)==null?void 0:I.firstWeekContainsDate)??1,h=_C(n,t),m=vh((t==null?void 0:t.in)||n,0);return m.setFullYear(h,0,a),m.setHours(0,0,0,0),dp(m,t)}function l6(n,t){const i=Bo(n,t==null?void 0:t.in),a=+dp(i,t)-+o6(i,t);return Math.round(a/gC)+1}function xn(n,t){const i=n<0?"-":"",a=Math.abs(n).toString().padStart(t,"0");return i+a}const ah={y(n,t){const i=n.getFullYear(),a=i>0?i:1-i;return xn(t==="yy"?a%100:a,t.length)},M(n,t){const i=n.getMonth();return t==="M"?String(i+1):xn(i+1,2)},d(n,t){return xn(n.getDate(),t.length)},a(n,t){const i=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h(n,t){return xn(n.getHours()%12||12,t.length)},H(n,t){return xn(n.getHours(),t.length)},m(n,t){return xn(n.getMinutes(),t.length)},s(n,t){return xn(n.getSeconds(),t.length)},S(n,t){const i=t.length,a=n.getMilliseconds(),h=Math.trunc(a*Math.pow(10,i-3));return xn(h,t.length)}},Gf={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ZM={G:function(n,t,i){const a=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(a,{width:"abbreviated"});case"GGGGG":return i.era(a,{width:"narrow"});case"GGGG":default:return i.era(a,{width:"wide"})}},y:function(n,t,i){if(t==="yo"){const a=n.getFullYear(),h=a>0?a:1-a;return i.ordinalNumber(h,{unit:"year"})}return ah.y(n,t)},Y:function(n,t,i,a){const h=_C(n,a),m=h>0?h:1-h;if(t==="YY"){const g=m%100;return xn(g,2)}return t==="Yo"?i.ordinalNumber(m,{unit:"year"}):xn(m,t.length)},R:function(n,t){const i=yC(n);return xn(i,t.length)},u:function(n,t){const i=n.getFullYear();return xn(i,t.length)},Q:function(n,t,i){const a=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return xn(a,2);case"Qo":return i.ordinalNumber(a,{unit:"quarter"});case"QQQ":return i.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(a,{width:"wide",context:"formatting"})}},q:function(n,t,i){const a=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return xn(a,2);case"qo":return i.ordinalNumber(a,{unit:"quarter"});case"qqq":return i.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(a,{width:"wide",context:"standalone"})}},M:function(n,t,i){const a=n.getMonth();switch(t){case"M":case"MM":return ah.M(n,t);case"Mo":return i.ordinalNumber(a+1,{unit:"month"});case"MMM":return i.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(a,{width:"wide",context:"formatting"})}},L:function(n,t,i){const a=n.getMonth();switch(t){case"L":return String(a+1);case"LL":return xn(a+1,2);case"Lo":return i.ordinalNumber(a+1,{unit:"month"});case"LLL":return i.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(a,{width:"wide",context:"standalone"})}},w:function(n,t,i,a){const h=l6(n,a);return t==="wo"?i.ordinalNumber(h,{unit:"week"}):xn(h,t.length)},I:function(n,t,i){const a=s6(n);return t==="Io"?i.ordinalNumber(a,{unit:"week"}):xn(a,t.length)},d:function(n,t,i){return t==="do"?i.ordinalNumber(n.getDate(),{unit:"date"}):ah.d(n,t)},D:function(n,t,i){const a=a6(n);return t==="Do"?i.ordinalNumber(a,{unit:"dayOfYear"}):xn(a,t.length)},E:function(n,t,i){const a=n.getDay();switch(t){case"E":case"EE":case"EEE":return i.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(a,{width:"short",context:"formatting"});case"EEEE":default:return i.day(a,{width:"wide",context:"formatting"})}},e:function(n,t,i,a){const h=n.getDay(),m=(h-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(m);case"ee":return xn(m,2);case"eo":return i.ordinalNumber(m,{unit:"day"});case"eee":return i.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(h,{width:"short",context:"formatting"});case"eeee":default:return i.day(h,{width:"wide",context:"formatting"})}},c:function(n,t,i,a){const h=n.getDay(),m=(h-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(m);case"cc":return xn(m,t.length);case"co":return i.ordinalNumber(m,{unit:"day"});case"ccc":return i.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(h,{width:"narrow",context:"standalone"});case"cccccc":return i.day(h,{width:"short",context:"standalone"});case"cccc":default:return i.day(h,{width:"wide",context:"standalone"})}},i:function(n,t,i){const a=n.getDay(),h=a===0?7:a;switch(t){case"i":return String(h);case"ii":return xn(h,t.length);case"io":return i.ordinalNumber(h,{unit:"day"});case"iii":return i.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(a,{width:"short",context:"formatting"});case"iiii":default:return i.day(a,{width:"wide",context:"formatting"})}},a:function(n,t,i){const h=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(h,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(h,{width:"wide",context:"formatting"})}},b:function(n,t,i){const a=n.getHours();let h;switch(a===12?h=Gf.noon:a===0?h=Gf.midnight:h=a/12>
vendor: 4,706 bytes, line 835
835=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(h,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(n,t,i){const a=n.getHours();let h;switch(a>=17?h=Gf.evening:a>=12?h=Gf.afternoon:a>=4?h=Gf.morning:h=Gf.night,t){case"B":case"BB":case"BBB":return i.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(h,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(n,t,i){if(t==="ho"){let a=n.getHours()%12;return a===0&&(a=12),i.ordinalNumber(a,{unit:"hour"})}return ah.h(n,t)},H:function(n,t,i){return t==="Ho"?i.ordinalNumber(n.getHours(),{unit:"hour"}):ah.H(n,t)},K:function(n,t,i){const a=n.getHours()%12;return t==="Ko"?i.ordinalNumber(a,{unit:"hour"}):xn(a,t.length)},k:function(n,t,i){let a=n.getHours();return a===0&&(a=24),t==="ko"?i.ordinalNumber(a,{unit:"hour"}):xn(a,t.length)},m:function(n,t,i){return t==="mo"?i.ordinalNumber(n.getMinutes(),{unit:"minute"}):ah.m(n,t)},s:function(n,t,i){return t==="so"?i.ordinalNumber(n.getSeconds(),{unit:"second"}):ah.s(n,t)},S:function(n,t){return ah.S(n,t)},X:function(n,t,i){const a=n.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return BM(a);case"XXXX":case"XX":return Sd(a);case"XXXXX":case"XXX":default:return Sd(a,":")}},x:function(n,t,i){const a=n.getTimezoneOffset();switch(t){case"x":return BM(a);case"xxxx":case"xx":return Sd(a);case"xxxxx":case"xxx":default:return Sd(a,":")}},O:function(n,t,i){const a=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+jM(a,":");case"OOOO":default:return"GMT"+Sd(a,":")}},z:function(n,t,i){const a=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+jM(a,":");case"zzzz":default:return"GMT"+Sd(a,":")}},t:function(n,t,i){const a=Math.trunc(+n/1e3);return xn(a,t.length)},T:function(n,t,i){return xn(+n,t.length)}};function jM(n,t=""){const i=n>0?"-":"+",a=Math.abs(n),h=Math.trunc(a/60),m=a%60;return m===0?i+String(h):i+String(h)+t+xn(m,2)}function BM(n,t){return n%60===0?(n>0?"-":"+")+xn(Math.abs(n)/60,2):Sd(n,t)}function Sd(n,t=""){const i=n>0?"-":"+",a=Math.abs(n),h=xn(Math.trunc(a/60),2),m=xn(a%60,2);return i+h+t+m}const $M=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},xC=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},u6=(n,t)=>{const i=n.match(/(P+)(p+)?/)||[],a=i[1],h=i[2];if(!h)return $M(n,t);let m;switch(a){case"P":m=t.dateTime({width:"short"});break;case"PP":m=t.dateTime({width:"medium"});break;case"PPP":m=t.dateTime({width:"long"});break;case"PPPP":default:m=t.dateTime({width:"full"});break}return m.replace("{{date}}",$M(a,t)).replace("{{time}}",xC(h,t))},c6={p:xC,P:u6},h6=/^D+$/,d6=/^Y+$/,f6=["D","DD","YY","YYYY"];function p6(n){return h6.test(n)}function m6(n){return d6.test(n)}function g6(n,t,i){const a=y6(n,t,i);if(console.warn(a),f6.includes(n))throw new RangeError(a)}function y6(n,t,i){const a=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${a} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const v6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,x6=/^'([^]*?)'?$/,b6=/''/g,w6=/[a-zA-Z]/;function Y6(n,t,i){var I,k,D,V,F,$,Q,ae;const a=Lv(),h=(i==null?void 0:i.locale)??a.locale??vC,m=(i==null?void 0:i.firstWeekContainsDate)??((k=(I=i==null?void 0:i.locale)==null?void 0:I.options)==null?void 0:k.firstWeekContainsDate)??a.firstWeekContainsDate??((V=(D=a.locale)==null?void 0:D.options)==null?void 0:V.firstWeekContainsDate)??1,g=(i==null?void 0:i.weekStartsOn)??(($=(F=i==null?void 0:i.locale)==null?void 0:F.options)==null?void 0:$.weekStartsOn)??a.weekStartsOn??((ae=(Q=a.locale)==null?void 0:Q.options)==null?void 0:ae.weekStartsOn)??0,s=Bo(n,i==null?void 0:i.in);if(!TF(s))throw new RangeError("Invalid time value");let Y=t.match(_6).map(le=>{const _e=le[0];if(_e==="p"||_e==="P"){const fe=c6[_e];return fe(le,h.formatLong)}return le}).join("").match(v6).map(le=>{if(le==="''")return{isToken:!1,value:"'"};const _e=le[0];if(_e==="'")return{isToken:!1,value:S6(le)};if(ZM[_e])return{isToken:!0,value:le};
835if(_e.match(w6))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_e+"`");return{isToken:!1,value:le}});h.localize.preprocessor&&(Y=h.localize.preprocessor(s,Y));const E={firstWeekContainsDate:m,weekStartsOn:g,locale:h};return Y.map(le=>{if(!le.isToken)return le.value;const _e=le.value;(!(i!=null&&i.useAdditionalWeekYearTokens)&&m6(_e)||!(i!=null&&i.useAdditionalDayOfYearTokens)&&p6(_e))&&g6(_e,t,String(n));const fe=ZM[_e[0]];return fe(s,_e,h.localize,E)}).join("")}function S6(n){const t=n.match(x6);return t?t[1].replace(b6,"'"):n}function T6(n,t){return Bo(n,t==null?void 0:t.in).getDay()}const W6={"en-US":vC},E6=vF({format:Y6,startOfWeek:()=>dp(new Date,{weekStartsOn:1}),getDay:T6,locales:W6});function M6(){const[n,t]=de.useState(!0),[i,a]=de.useState([]);return de.useEffect(()=>{(async()=>{if(!Ur)return;const{data:m,error:g}=await Ur.from("events").select("*");if(g)console.error("Error fetching events:",g.message);else{const s=m.map(Y=>({id:Y.id,title:`${Y.event_title} (${Y.event_type}) - ${Y.organization}`,start:new Date(Y.start.replace(" ","T")),end:new Date(Y.end.replace(" ","T"))}));a(s)}t(!1)})()},[]),console.log(i),n?O.jsx("div",{children:"Loading calendar..."}):O.jsx("div",{className:"p-4",children:O.jsx(dF,{localizer:E6,events:i,startAccessor:"start",endAccessor:"end",style:{height:600}})})}function P6(){return O.jsx("div",{className:"min-h-screen bg-cover bg-center",children:O.jsxs("div",{className:"relative z-10 p-0",children:[O.jsx(GI,{}),O.jsx("section",{className:"py-6",children:O.jsx("div",{className:"max-w-7xl mx-auto px-4",children:O.jsx(BI,{})})}),O.jsx("div",{className:"bg-white rounded-lg p-4 mt-6 text-gray-900",children:O.jsx(M6,{})})]})})}const bC=({organizationId:n=null})=>{const[t,i]=de.useState(!0),[a,h]=de.useState([]),[m,g]=de.useState(null),[s,Y]=de.useState([]),[E,I]=de.useState(""),[k,D]=de.useState(""),[V,F]=de.useState([]),[$,Q]=de.useState(""),[ae,le]=de.useState(50),[_e,fe]=de.useState(null),[We,se]=de.useState(""),[De,ze]=de.useState("asc"),[je,ft]=de.useState(!1);de.useEffect(()=>{(async()=>{i(!0),g(null);try{let Yt,Tt;n?{data:Yt,error:Tt}=await mv(n):{data:Yt,error:Tt}=await jI(),Tt?(console.error("Error fetching events:",Tt),g("Failed to load events. Please try again later.")):h(Yt||[])}catch(Yt){console.error("Unexpected error fetching events:",Yt),g("An unexpected error occurred. Please try again later.")}i(!1)})()},[n]),de.useEffect(()=>{var Re;(Re=navigator.geolocation)==null||Re.getCurrentPosition(Yt=>fe({lat:Yt.coords.latitude,lon:Yt.coords.longitude}),()=>console.warn("Location blocked"))},[]),de.useEffect(()=>{if(!a)return;const Re=a.filter(Yt=>{const Tt=new Date(Yt.start);if(E||k){const _t=new Date(Yt.start),Qe=new Date(Yt.end||Yt.start),bt=E?new Date(E):null,xt=k?new Date(k):null;if(!((!bt||Qe>=bt)&&(!xt||_t<=xt)))return!1}if(V.length>0&&!V.includes(Tt.getDay())||$&&Yt.event_type!==$)return!1;if(_e&&Yt.latitude&&Yt.longitude){const _t=Ft=>Ft*Math.PI/180,bt=_t(Yt.latitude-_e.lat),xt=_t(Yt.longitude-_e.lon),Ue=Math.sin(bt/2)**2+Math.cos(_t(_e.lat))*Math.cos(_t(Yt.latitude))*Math.sin(xt/2)**2;if(3958.8*(2*Math.atan2(Math.sqrt(Ue),Math.sqrt(1-Ue)))>ae)return!1}return!0});Y(Re)},[a,E,k,V,$,ae,_e]);const ot=async Re=>{const Yt=`undefined/event/${Re.id}`;if(navigator.share)try{await navigator.share({title:Re.event_title,text:`Check out this event: ${Re.event_title} by ${Re.organization}. ${ys(Re.start,Re.latitude,Re.longitude)} to ${ys(Re.end,Re.latitude,Re.longitude)} at ${Re.address}`,url:Yt||window.location.href})}catch(Tt){Tt.name!=="AbortError"&&(console.error("Error sharing:",Tt),st(Re))}else st(Re)},st=Re=>{const Yt=`Check out this event: ${Re.event_title} by ${Re.organization}. ${ys(Re.start,Re.latitude,Re.longitude)} to ${ys(Re.end,Re.latitude,Re.longitude)} at ${Re.address}. More info: ${Re.info_url||window.location.href}`;navigator.clipboard?navigator.clipboard.writeText(Yt).then(()=>{alert("Event details copied to clipboard!")}).catch(()=>{alert(`Share this event: 836 837${Yt}`)}):alert(`Share this event: 838 839${Yt}`)},rt=()=>n?"Upcoming Events":"All Events";return O.jsxs("div",{className:"px-4 py-8 max-w-7xl mx-auto",children:[O.jsx("h2",{className:"text-2xl font-bold mb-6 text-center",children:rt()}),O.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-center gap-4 mb-6",children:[O.jsx("input",{type:"text",placeholder:"Search events...",value:We,onChange:Re=>se(Re.target.value),className:"w-full sm:w-1/2 border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-blue-500"}),O.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 mb-4",children:[O.jsxs("div",{className:"flex flex-col w-full",children:[O.jsx("label",{className:"text-sm font-medium mb-1",children:"Start Date"}),O.jsx("input",{type:"date",value:E,onChange:Re=>I(Re.target.value),className:"border border-gray-300 rounded-lg px-3 py-2"})]}),O.jsxs("div",{className:"flex flex-col w-full",children:[O.jsx("label",{className:"text-sm font-medium mb-1",children:"End Date"}),O.jsx("input",{type:"date",value:k,onChange:Re=>D(Re.target.value),className:"border border-gray-300 rounded-lg px-3 py-2"})]})]}),O.jsxs("div",{className:"mb-4 relative",children:[O.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Day of Week"}),O.jsx("div",{className:"border border-gray-300 rounded-lg px-3 py-2 cursor-pointer bg-white",onClick:()=>ft(Re=>!Re),children:V.length===0?"Day":V.map(Re=>["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][Re]).join(", ")}),je&&O.jsx("div",{className:"absolute mt-1 bg-white shadow-lg border rounded-lg p-3 z-50 flex flex-wrap gap-2 w-full",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((Re,Yt)=>O.jsx("button",{onClick:Tt=>{Tt.stopPropagation(),F(_t=>_t.includes(Yt)?_t.filter(Qe=>Qe!==Yt):[..._t,Yt])},className:`w-8 h-8 flex items-center justify-center rounded-full border text-xs font-medium 840 ${V.includes(Yt)?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300"}`,children:Re.slice(0,3)},Re))})]}),O.jsxs("div",{className:"mb-6",children:[O.jsxs("label",{className:"text-sm font-medium block mb-1",children:["Within ",ae," miles"]}),O.jsx("input",{type:"range",min:"1",max:"100",value:ae,onChange:Re=>le(Number(Re.target.value)),className:"w-full"})]})]}),t?O.jsx("p",{className:"text-center text-gray-500",children:"Loading..."}):m?O.jsxs("div",{className:"text-center",children:[O.jsx("p",{className:"text-red-500 mb-4",children:m}),O.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]}):a.length===0?O.jsx("p",{className:"text-center text-gray-500",children:n?"No events found for this organization.":"No events found."}):O.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:s.filter(Re=>{var Yt;return Re.event_title.toLowerCase().includes(We.toLowerCase())||(((Yt=Re.description)==null?void 0:Yt.toLowerCase())||"").includes(We.toLowerCase())}).sort((Re,Yt)=>De==="asc"?new Date(Re.start)-new Date(Yt.start):new Date(Yt.start)-new Date(Re.start)).map(Re=>O.jsxs("div",{className:"relative bg-white rounded-3xl shadow-lg border border-gray-200 p-6 hover:shadow-2xl hover:scale-[1.02] transition-transform duration-200",children:[O.jsx("h4",{className:"text-2xl font-semibold mb-1 text-gray-900",children:Re.event_title}),O.jsx("p",{className:"text-sm text-gray-500 mb-2",children:Re.event_type||"General Event"}),Re.organization&&O.jsxs("p",{className:"text-gray-800 font-medium mb-2",children:["Hosted by ",Re.organization]}),O.jsxs("p",{className:"text-gray-700 mb-2",children:[O.jsx("span",{className:"font-medium",children:"When:"})," ",ys(Re.start,Re.latitude,Re.longitude)," â"," ",ys(Re.end,Re.latitude,Re.longitude)]}),Re.address?O.jsxs("p",{className:"text-gray-700 mb-2",children:[O.jsx("span",{className:"font-medium",children:"Where:"})," ",Re.address]}):(Re.street_address||Re.city||Re.state||Re.zip_code)&&O.jsxs("p",{className:"text-gray-700 mb-2",children:[O.jsx("span",{className:"font-medium",children:"Where:"})," ",[Re.street_address||Re.location||"",Re.city,Re.state,Re.zip_code].filter(
840Boolean).join(", ")]}),Re.description&&O.jsx("p",{className:"text-gray-700 mb-8 pr-4 line-clamp-3",children:Re.description}),Re.info_url&&O.jsx("a",{href:Re.info_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 text-sm underline mb-6 inline-block hover:text-blue-800",children:"More event info"}),O.jsxs("div",{className:"absolute bottom-4 right-4 flex gap-2",children:[O.jsx(Ca,{to:`/event/${Re.id}`,rel:"noopener noreferrer",className:"px-4 py-2 bg-green-500 text-white rounded-full hover:bg-green-600 hover:text-white transition-colors text-sm font-medium",children:"Details"}),O.jsx("button",{onClick:()=>ot(Re),className:"px-3 py-2 bg-blue-500 text-white rounded-full hover:bg-blue-600 transition-colors text-sm font-medium",children:"Share"})]})]},Re.id))})]})};function GM(){return O.jsx("div",{className:"min-h-screen bg-cover bg-center text-black",children:O.jsxs("div",{className:"relative z-10 p-0",children:[O.jsx(GI,{}),O.jsx(bC,{})]})})}const wC=({email:n,onBack:t,onResend:i,title:a="Enter Verification Code",subtitle:h=null,submitButtonText:m="Verify Code",loadingText:g="Verifying...",redirectPath:s="/dashboard"})=>{const[Y,E]=de.useState(""),[I,k]=de.useState(null),[D,V]=de.useState(!1),[F,$]=de.useState(null),{verifyOTP:Q}=Ul(),ae=cg(),le=async fe=>{fe.preventDefault(),V(!0),k(null),$(null);const{success:We,error:se}=await Q(n,Y);if(!We){k(se||"Invalid or expired OTP"),V(!1);return}$("Successfully verified!"),ae(s),V(!1)},_e=async()=>{V(!0),k(null),$(null);try{await i(),$("A new code has been sent to your email.")}catch{k("Failed to resend code. Please try again.")}V(!1)};return O.jsx("div",{children:O.jsxs("form",{onSubmit:le,className:"max-w-md m-auto pt-24",children:[O.jsx("h2",{className:"font-bold pb-2",children:a}),O.jsx("p",{className:"pb-4",children:h||`We sent a 6-digit code to ${n}`}),O.jsx("div",{className:"flex flex-col py-4",children:O.jsx("input",{onChange:fe=>E(fe.target.value),className:"p-3 mt-2 text-center text-2xl tracking-widest",type:"text",name:"otp",id:"otp",placeholder:"000000",maxLength:"6",pattern:"[0-9]{6}",required:!0,value:Y,autoComplete:"one-time-code"})}),O.jsx("button",{className:"w-full mt-4",disabled:D||Y.length!==6,children:D?g:m}),t&&O.jsx("div",{className:"text-center mt-4",children:O.jsx("button",{type:"button",onClick:t,className:"text-blue-600 underline",disabled:D,children:"Back"})}),O.jsx("div",{className:"text-center mt-2",children:O.jsx("button",{type:"button",onClick:_e,className:"text-blue-600 underline",disabled:D,children:"Resend code"})}),I&&O.jsx("p",{className:"text-red-600 text-center pt-4",children:I}),F&&O.jsx("p",{className:"text-green-600 text-center pt-4",children:F})]})})};function I6(){const{signUpNewUser:n}=Ul(),[t,i]=de.useState({email:"",username:"",full_name:"",bio:"",external_url:""}),[a,h]=de.useState(!1),[m,g]=de.useState(null),[s,Y]=de.useState("signup"),E=V=>{const{name:F,value:$}=V.target;i(Q=>({...Q,[F]:$}))},I=async V=>{V.preventDefault(),h(!0),g(null);const F=await n(t);F.success?Y("otp"):g(F.error),h(!1)},k=()=>{Y("signup"),g(null)},D=async()=>{const V=await n(t);if(!V.success)throw new Error(V.error)};return s==="otp"?O.jsx(wC,{email:t.email,onBack:k,onResend:D,title:"Verify Your Email",subtitle:`We sent a 6-digit code to ${t.email}`,submitButtonText:"Complete Registration",loadingText:"Completing...",redirectPath:"/dashboard"}):O.jsx("div",{children:O.jsxs("form",{onSubmit:I,className:"max-w-md m-auto pt-24",children:[O.jsx("h2",{className:"font-bold pb-2",children:"Sign up today!"}),O.jsxs("p",{children:["Already have an account? ",O.jsx(Ca,{to:"/signin",children:"Sign in"})]}),O.jsxs("div",{className:"flex flex-col py-4",children:[O.jsx("label",{htmlFor:"email",children:"Email * (outlook is known to have problems)"}),O.jsx("input",{type:"email",id:"email",name:"email",value:t.email,onChange:E,required:!0})]}),O.jsxs("div",{className:"flex flex-col py-4",children:[O.jsx("label",{htmlFor:"username",children:"Username * (all usernames will be converted to lowercase. Usernames can contain only letters, numbers, underscores _, dashes -, and periods .)"}),O.jsx("input",{type:"text",id:"username",name:"username",value:t.username,onChange:E,required:!0})]}),O.jsxs("div",{className:"flex flex-col py-4",children:[O.jsx("label",{htmlFor:"full_name",children:"Full Name *"}),O.jsx("input",{type:"text",id:"full_name",name:"full_name",value:t.full_name,onChange:E,required:!0})]}),O.jsxs("div",{className:"flex flex-col py-4",children:[O.jsx("label",{htmlFor:"bio",children:"Bio"}),O.jsx("textarea",{id:"bio",name:"bio",value:t.bio,onChange:E,rows:"3"})]}),O.jsxs("div",{className:"flex flex-col py-4",children:[O.jsx("label",{htmlFor:"external_url",children:"Website URL"}),O.jsx("input",{type:"url",id:"external_url",name:"external_url",value:t.external_url,onChange:E,placeholder:"https://example.com"})]}),O.jsx("button",{type:"submit",disabled:a,className:"w-full mt-4",children:a?"Creating Account...":"Create Account"}),m&&O.jsxs("div",{className:"mt-4 p-4 bg-red-100 border border-red-400 rounded",children:[O.jsx("h2",{className:"font-bold text-red-700",children:"Error"}),O.jsx("p",{className:"text-red-600",children:m})]})]})})}const U6=()=>{const[n,t]=de.useState(""),[i,a]=de.useState(null),[h,m]=de.useState(!1),[g,s]=de.useState(null),[Y,E]=de.useState("email"),{sendOTP:I}=Ul(),k=async F=>{F.preventDefault(),m(!0),a(null),s(null);const{success:$,error:Q}=await I(n);if(!$){a(Q||"Failed to send OTP"),m(!1);return}s("A 6-digit code has been sent to your email. Please check your inbox."),E("otp"),m(!1)},D=()=>{E("email"),a(null),s(null)},V=async()=>{const{success:F,error:$}=await I(n);if(!F)throw new Error($||"Failed to send OTP")};return Y==="otp"?O.jsx(wC,{email:n,onBack:D,onResend:V,title:"Enter Verification Code",subtitle:`We sent a 6-digit code to ${n}`,submitButtonText:"Sign In",loadingText:"Signing in...",redirectPath:"/dashboard"}):O.jsx("div",{children:O.jsxs("form",{onSubmit:k,className:"max-w-md m-auto pt-24",children:[O.jsx("h2",{className:"font-bold pb-2",children:"Sign in with Email Code"}),O.jsxs("p",{children:["Don't have an account yet? ",O.jsx(Ca,{to:"/signup",children:"Sign up"})]}),O.jsx("div",{className:"flex flex-col py-4",children:O.jsx("input",{onChange:F=>t(F.target.value),className:"p-3 mt-2",type:"email",name:"email",id:"email",placeholder:"Email",required:!0,value:n})}),O.jsx("button",{className:"w-full mt-4",disabled:h,children:h?"Sending code...":"Send Verification Code"}),i&&O.jsx("p",{className:"text-red-600 text-center pt-4",children:i}),g&&O.jsx("p",{className:"text-green-600 text-center pt-4",children:g})]})})};function YC({session:n,onSuccess:t,onCancel:i}){const a=["Trash Clean-Up","Invasive Species Pull","Environmental Policy Activism","Community Improvement","Wildlife Rescue/Rehab","Other"],h=["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],[m,g]=de.useState({event_title:"",event_type:"",street_address:"",city:"",state:"",zip_code:"",county:"",country:"us",start_date:"",start_time:"",end_date:"",end_time:"",info_url:"",description:"",warnings:""}),[s,Y]=de.useState(!1),[E,I]=de.useState(null),k=V=>{const{name:F,value:$}=V.target;g(Q=>({...Q,[F]:$}))},D=async V=>{V.preventDefault(),Y(!0),I(null);const F=`${m.start_date}T${m.start_time}`,$=`${m.end_date}T${m.end_time}`,Q={event_title:m.event_title,event_type:m.event_type,street_address:m.street_address,city:m.city,state:m.state,zip_code:m.zip_code,county:m.county,country:m.country,info_url:m.info_url,description:m.description,warnings:m.warnings,start:qy(F),end:qy($)};try{const ae=await U3(Q,n);ae.success?(g({event_title:"",event_type:"",street_address:"",city:"",state:"",zip_code:"",county:"",country:"us",start_date:"",start_time:"",end_date:"",end_time:"",info_url:"",description:"",warnings:""}),t&&t(ae.event)):I(ae.error)}catch(ae){I(ae.message||"An unexpected error occurred")}finally{Y(!1)}};return O.jsx("div",{className:"max-w-2xl mx-auto p-6",children:O.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[O.jsx("h2",{className:"text-2xl font-bold mb-6 text-gray-800",children:"Create New Event"}),E&&O.jsx("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:O.jsx("p",{className:"text-red-800 text-sm",children:E})}),O.jsxs("form",{onSubmit:D,className:"space-y-4",children:[O.jsxs("div",{children:[O.jsx("label",{htmlFor:"event_title",className:"block text-sm font-medium text-gray-700 mb-1",children:"Event Title *"}),O.jsx("input",{type:"text",id:"event_title",name:"event_title",value:m.event_title,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Enter event title"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"event_type",className:"block text-sm font-medium text-gray-700 mb-1",children:"Event Type *"}),O.jsxs("select",{id:"event_type",name:"event_type",value:m.event_type,onCh
840ange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[O.jsx("option",{value:"",children:"Select event type..."}),a.map(V=>O.jsx("option",{value:V,children:V},V))]})]}),O.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[O.jsxs("div",{className:"md:col-span-2",children:[O.jsx("label",{htmlFor:"street_address",className:"block text-sm font-medium text-gray-700 mb-1",children:"Street Address *"}),O.jsx("input",{type:"text",id:"street_address",name:"street_address",value:m.street_address,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"123 Main St"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"city",className:"block text-sm font-medium text-gray-700 mb-1",children:"City *"}),O.jsx("input",{type:"text",id:"city",name:"city",value:m.city,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"City"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"state",className:"block text-sm font-medium text-gray-700 mb-1",children:"State *"}),O.jsxs("select",{type:"text",id:"state",name:"state",value:m.state,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"State",maxLength:"2",children:[O.jsx("option",{value:"",children:"Select state..."}),h.map(V=>O.jsx("option",{value:V,children:V},V))]})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"zip_code",className:"block text-sm font-medium text-gray-700 mb-1",children:"ZIP Code *"}),O.jsx("input",{type:"text",id:"zip_code",name:"zip_code",value:m.zip_code,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"12345"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"county",className:"block text-sm font-medium text-gray-700 mb-1",children:"County"}),O.jsx("input",{type:"text",id:"county",name:"county",value:m.county,onChange:k,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional"})]})]}),O.jsxs("div",{children:[O.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Start Date & Time *"}),O.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[O.jsx("div",{children:O.jsx("input",{type:"date",id:"start_date",name:"start_date",value:m.start_date,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})}),O.jsx("div",{children:O.jsx("input",{type:"time",id:"start_time",name:"start_time",value:m.start_time,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})})]})]}),O.jsxs("div",{children:[O.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"End Date & Time *"}),O.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[O.jsx("div",{children:O.jsx("input",{type:"date",id:"end_date",name:"end_date",value:m.end_date,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})}),O.jsx("div",{children:O.jsx("input",{type:"time",id:"end_time",name:"end_time",value:m.end_time,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})})]})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"info_url",className:"block text-sm font-medium text-gray-700 mb-1",children:"Event URL"}),O.jsx("input",{type:"url",id:"info_url",name:"info_url",value:m.info_url,onChange:k,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"https://example.com/event"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),O.jsx("textarea",{id:"description",name:"description",value:m.description,onChange:k,rows:"4",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Enter event description..."})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"warnings",className:"block text-sm font-medium text-gray-700 mb-1",children:"Warnings"}),O.jsx("textarea",{id:"warnings",name:"warnings",value:m.warnings,onChange:k,rows:"2",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Any warnings or special notes..."})]}),O.jsxs("div",{className:"flex gap-3 pt-4",children:[O.jsx("button",{type:"submit",disabled:s,className:"flex-1 bg-blue-600 text-white py-2 px-4 roun
840ded-md hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors font-medium",children:s?"Creating Event...":"Create Event"}),i&&O.jsx("button",{type:"button",onClick:i,disabled:s,className:"px-6 py-2 border border-gray-300 rounded-md hover:bg-gray-200 hover:text-gray-800 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",children:"Cancel"})]})]})]})})}function C6({session:n,onSuccess:t,onCancel:i}){const a=["Trash Clean-Up","Invasive Species Pull","Environmental Policy Activism","Community Improvement","Wildlife Rescue/Rehab","Other"],h=["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],[m,g]=de.useState({event_title:"",event_type:"",street_address:"",city:"",state:"",zip_code:"",county:"",country:"us",latitude:"",longitude:"",start_date:"",start_time:"",end_date:"",end_time:"",info_url:"",description:"",warnings:""}),[s,Y]=de.useState(!1),[E,I]=de.useState(null),k=V=>{const{name:F,value:$}=V.target;g(Q=>({...Q,[F]:$}))},D=async V=>{V.preventDefault(),Y(!0),I(null);const F=`${m.start_date}T${m.start_time}`,$=`${m.end_date}T${m.end_time}`,Q={...m,start:qy(F),end:qy($)};try{const ae=await I3(Q,n);ae.success?(g({event_title:"",event_type:"",street_address:"",city:"",state:"",zip_code:"",county:"",country:"us",latitude:"",longitude:"",start_date:"",start_time:"",end_date:"",end_time:"",info_url:"",description:"",warnings:""}),t&&t(ae.event)):I(ae.error)}catch(ae){I(ae.message||"An unexpected error occurred")}finally{Y(!1)}};return O.jsx("div",{className:"max-w-2xl mx-auto p-6",children:O.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[O.jsx("h2",{className:"text-2xl font-bold mb-6 text-gray-800",children:"Create New Event"}),E&&O.jsx("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:O.jsx("p",{className:"text-red-800 text-sm",children:E})}),O.jsxs("form",{onSubmit:D,className:"space-y-4",children:[O.jsxs("div",{children:[O.jsx("label",{htmlFor:"event_title",className:"block text-sm font-medium text-gray-700 mb-1",children:"Event Title *"}),O.jsx("input",{type:"text",id:"event_title",name:"event_title",value:m.event_title,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Enter event title"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"event_type",className:"block text-sm font-medium text-gray-700 mb-1",children:"Event Type *"}),O.jsxs("select",{id:"event_type",name:"event_type",value:m.event_type,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[O.jsx("option",{value:"",children:"Select event type..."}),a.map(V=>O.jsx("option",{value:V,children:V},V))]})]}),O.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[O.jsxs("div",{className:"md:col-span-2",children:[O.jsx("label",{htmlFor:"street_address",className:"block text-sm font-medium text-gray-700 mb-1",children:"Street Address *"}),O.jsx("input",{type:"text",id:"street_address",name:"street_address",value:m.street_address,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"123 Main St"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"city",className:"block text-sm font-medium text-gray-700 mb-1",children:"City *"}),O.jsx("input",{type:"text",id:"city",name:"city",value:m.city,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"City"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"state",className:"block text-sm font-medium text-gray-700 mb-1",children:"State *"}),O.jsxs("select",{type:"text",id:"state",name:"state",value:m.state,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"State",maxLength:"2",children:[O.jsx("option",{value:"",children:"Select state..."}),h.map(V=>O.jsx("option",{value:V,children:V},V))]})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"zip_code",className:"block text-sm font-medium text-gray-700 mb-1",children:"ZIP Co
840de *"}),O.jsx("input",{type:"text",id:"zip_code",name:"zip_code",value:m.zip_code,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"12345"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"county",className:"block text-sm font-medium text-gray-700 mb-1",children:"County"}),O.jsx("input",{type:"text",id:"county",name:"county",value:m.county,onChange:k,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional"})]})]}),O.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[O.jsxs("div",{children:[O.jsx("label",{htmlFor:"latitude",className:"block text-sm font-medium text-gray-700 mb-1",children:"Latitude *"}),O.jsx("input",{type:"number",id:"latitude",name:"latitude",value:m.latitude,onChange:k,required:!0,step:"any",min:"-90",max:"90",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., 37.7749"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"longitude",className:"block text-sm font-medium text-gray-700 mb-1",children:"Longitude *"}),O.jsx("input",{type:"number",id:"longitude",name:"longitude",value:m.longitude,onChange:k,required:!0,step:"any",min:"-180",max:"180",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., -122.4194"})]})]}),O.jsxs("div",{children:[O.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Start Date & Time *"}),O.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[O.jsx("div",{children:O.jsx("input",{type:"date",id:"start_date",name:"start_date",value:m.start_date,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})}),O.jsx("div",{children:O.jsx("input",{type:"time",id:"start_time",name:"start_time",value:m.start_time,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})})]})]}),O.jsxs("div",{children:[O.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"End Date & Time *"}),O.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[O.jsx("div",{children:O.jsx("input",{type:"date",id:"end_date",name:"end_date",value:m.end_date,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})}),O.jsx("div",{children:O.jsx("input",{type:"time",id:"end_time",name:"end_time",value:m.end_time,onChange:k,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})})]})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"info_url",className:"block text-sm font-medium text-gray-700 mb-1",children:"Event URL"}),O.jsx("input",{type:"url",id:"info_url",name:"info_url",value:m.info_url,onChange:k,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"https://example.com/event"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),O.jsx("textarea",{id:"description",name:"description",value:m.description,onChange:k,rows:"4",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Enter event description..."})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"warnings",className:"block text-sm font-medium text-gray-700 mb-1",children:"Warnings"}),O.jsx("textarea",{id:"warnings",name:"warnings",value:m.warnings,onChange:k,rows:"2",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Any warnings or special notes..."})]}),O.jsxs("div",{className:"flex gap-3 pt-4",children:[O.jsx("button",{type:"submit",disabled:s,className:"flex-1 bg-blue-600 text-white py-2 px-4 roun
840ded-md hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors font-medium",children:s?"Creating Event...":"Create Event"}),i&&O.jsx("button",{type:"button",onClick:i,disabled:s,className:"px-6 py-2 border border-gray-300 rounded-md hover:bg-gray-200 hover:text-gray-800 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",children:"Cancel"})]})]})]})})}function V6({session:n,onSuccess:t,onCancel:i}){const[a,h]=de.useState([]),[m,g]=de.useState(!0),[s,Y]=de.useState(""),[E,I]=de.useState(!1),[k,D]=de.useState(!1),[V,F]=de.useState({event_title:"",event_type:"",street_address:"",city:"",state:"",zip_code:"",county:"",country:"us",latitude:"",longitude:"",start:"",end:"",info_url:"",description:"",warnings:""}),[$,Q]=de.useState(!1),[ae,le]=de.useState(!1),[_e,fe]=de.useState(null),We=de.useRef(null),se=de.useRef(null),De=de.useRef(null);de.useEffect(()=>{je()},[n]),de.useEffect(()=>(E&&V.latitude&&V.longitude&&We.current&&!se.current&&ze(),()=>{se.current&&(se.current.remove(),se.current=null,De.current=null)}),[E,V.latitude,V.longitude]);const ze=()=>{const _t=parseFloat(V.latitude),Qe=parseFloat(V.longitude);if(isNaN(_t)||isNaN(Qe))return;se.current=new El.Map({container:We.current,style:"https://tiles.openfreemap.org/styles/liberty",center:[Qe,_t],zoom:14});const bt=document.createElement("div");bt.className="marker",bt.style.backgroundImage="url(https://docs.mapbox.com/mapbox-gl-js/assets/custom_marker.png)",bt.style.width="32px",bt.style.height="40px",bt.style.backgroundSize="100%",bt.style.cursor="grab",De.current=new El.Marker({element:bt,draggable:!0}).setLngLat([Qe,_t]).addTo(se.current),De.current.on("dragend",()=>{const xt=De.current.getLngLat();F(Ue=>({...Ue,latitude:xt.lat.toFixed(6),longitude:xt.lng.toFixed(6)}))}),se.current.addControl(new El.NavigationControl,"top-right")};de.useEffect(()=>{if(De.current&&V.latitude&&V.longitude){const _t=parseFloat(V.latitude),Qe=parseFloat(V.longitude);!isNaN(_t)&&!isNaN(Qe)&&(De.current.setLngLat([Qe,_t]),se.current&&se.current.setCenter([Qe,_t]))}},[V.latitude,V.longitude]);const je=async()=>{var _t;if(!((_t=n==null?void 0:n.user)!=null&&_t.id)){fe("No user session found"),g(!1);return}g(!0),fe(null);try{const{data:Qe,error:bt}=await mv(n.user.id);if(bt)throw new Error(bt);h(Qe||[])}catch(Qe){fe(Qe.message)}finally{g(!1)}},ft=async _t=>{var Qe,bt,xt;le(!0),fe(null);try{const{data:Ue,error:pt}=await ZI(_t);if(pt)throw pt;if(!Ue)throw new Error("Event not found");const Ht=((Qe=Ue.address.split(",")[0])==null?void 0:Qe.trim())||"",Gt=rr=>{if(!rr)return"";const or=new Date(rr),fr=or.getFullYear(),Sr=String(or.getMonth()+1).padStart(2,"0"),Er=String(or.getDate()).padStart(2,"0"),Gr=String(or.getHours()).padStart(2,"0"),Wn=String(or.getMinutes()).padStart(2,"0");return`${fr}-${Sr}-${Er}T${Gr}:${Wn}`};F({event_title:Ue.event_title||"",event_type:Ue.event_type||"",street_address:Ht,city:Ue.city||"",state:Ue.state||"",zip_code:Ue.zip_code||"",county:Ue.county||"",country:"us",latitude:((bt=Ue.latitude)==null?void 0:bt.toString())||"",longitude:((xt=Ue.longitude)==null?void 0:xt.toString())||"",start:Gt(Ue.start),end:Gt(Ue.end),info_url:Ue.info_url||"",description:Ue.description||"",warnings:Ue.warnings||""}),I(!0)}catch(Ue){fe(Ue.message)}finally{le(!1)}},ot=_t=>{Y(_t),ft(_t)},st=_t=>{const{name:Qe,value:bt}=_t.target;F(xt=>({...xt,[Qe]:bt}))},rt=async _t=>{_t.preventDefault(),Q(!0),fe(null);try{const Qe={...V,start:V.start?new Date(V.start).toISOString():"",end:V.end?new Date(V.end).toISOString():""},bt=await C3(s,Qe,n);bt.success?(F({event_title:"",event_type:"",street_address:"",city:"",state:"",zip_code:"",county:"",country:"us",latitude:"",longitude:"",start:"",end:"",info_url:"",description:"",warnings:""}),Y(""),I(!1),await je(),t&&t(bt.event)):fe(bt.error)}catch(Qe){fe(Qe.message||"An unexpected error occurred")}finally{Q(!1)}},Re=()=>{Y(""),I(!1),F({event_title:"",event_type:"",street_address:"",city:"",state:"",zip_code:"",county:"",country:"us",latitude:"",longitude:"",start:"",end:"",info_url:"",description:"",warnings:""}),fe(null),se.current&&(se.current.remove(),se.current=null,De.current=null)},Yt=_t=>_t?new Date(_t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}):"N/A",Tt=async()=>
840{if(window.confirm("Are you certain you want to delete this event? This action cannot be undone.")){D(!0),fe(null);try{(await V3(s)).success&&(Re(),await je(),t&&t(null))}catch(_t){fe(_t.message||"Failed to delete event")}finally{D(!1)}}};return E?O.jsx("div",{className:"max-w-4xl mx-auto p-6",children:O.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[O.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[O.jsx("h2",{className:"text-2xl font-bold text-gray-800",children:"Edit or Delete an Event"}),O.jsxs("p",{className:"text-sm text-gray-600",children:["Event ID: ",O.jsxs("span",{className:"font-mono font-semibold",children:[s.slice(0,8),"..."]})]}),O.jsx("button",{type:"button",onClick:Tt,disabled:$||k,className:"mt-2 text-xs font-bold text-red-600 hover:text-red-800 uppercase tracking-wider disabled:text-gray-400",children:k?"Deleting...":"Permanently Delete Event"})]}),_e&&O.jsx("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:O.jsx("p",{className:"text-red-800 text-sm",children:_e})}),O.jsxs("form",{onSubmit:rt,className:"space-y-6",children:[O.jsxs("div",{children:[O.jsx("label",{htmlFor:"event_title",className:"block text-sm font-medium text-gray-700 mb-1",children:"Event Title *"}),O.jsx("input",{type:"text",id:"event_title",name:"event_title",value:V.event_title,onChange:st,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Enter event title"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"event_type",className:"block text-sm font-medium text-gray-700 mb-1",children:"Event Type *"}),O.jsx("input",{type:"text",id:"event_type",name:"event_type",value:V.event_type,onChange:st,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Concert, Conference, Workshop"})]}),O.jsxs("div",{className:"border-2 border-gray-200 rounded-lg p-4 bg-gray-50",children:[O.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Event Location"}),O.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Drag the pin on the map to set the exact location, or enter coordinates manually below"}),O.jsx("div",{ref:We,className:"w-full h-96 rounded-lg mb-4 border border-gray-300",style:{minHeight:"384px"}}),O.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[O.jsxs("div",{children:[O.jsx("label",{htmlFor:"latitude",className:"block text-sm font-medium text-gray-700 mb-1",children:"Latitude *"}),O.jsx("input",{type:"number",id:"latitude",name:"latitude",value:V.latitude,onChange:st,required:!0,step:"any",min:"-90",max:"90",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., 37.7749"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"longitude",className:"block text-sm font-medium text-gray-700 mb-1",children:"Longitude *"}),O.jsx("input",{type:"number",id:"longitude",name:"longitude",value:V.longitude,onChange:st,required:!0,step:"any",min:"-180",max:"180",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., -122.4194"})]})]})]}),O.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[O.jsxs("div",{className:"md:col-span-2",children:[O.jsx("label",{htmlFor:"street_address",className:"block text-sm font-medium text-gray-700 mb-1",children:"Street Address *"}),O.jsx("input",{type:"text",id:"street_address",name:"street_address",value:V.street_address,onChange:st,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"123 Main St"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"city",className:"block text-sm font-medium text-gray-700 mb-1",children:"City *"}),O.jsx("input",{type:"text",id:"city",name:"city",value:V.city,onChange:st,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"City"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"state",className:"block text-sm font-medium text-gray-700 mb-1",children:"State *"}),O.jsx("input",{type:"text",id:"state",name:"state",value:V.state,onChange:st,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"CA",maxLength:"2"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"zip_code",className:"block text-sm font-medium text-gray-700 mb-1",children:"ZIP Co
840de *"}),O.jsx("input",{type:"text",id:"zip_code",name:"zip_code",value:V.zip_code,onChange:st,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"12345"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"county",className:"block text-sm font-medium text-gray-700 mb-1",children:"County"}),O.jsx("input",{type:"text",id:"county",name:"county",value:V.county,onChange:st,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional"})]})]}),O.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[O.jsxs("div",{children:[O.jsx("label",{htmlFor:"start",className:"block text-sm font-medium text-gray-700 mb-1",children:"Start Date/Time *"}),O.jsx("input",{type:"datetime-local",id:"start",name:"start",value:V.start,onChange:st,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"end",className:"block text-sm font-medium text-gray-700 mb-1",children:"End Date/Time *"}),O.jsx("input",{type:"datetime-local",id:"end",name:"end",value:V.end,onChange:st,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"info_url",className:"block text-sm font-medium text-gray-700 mb-1",children:"Event URL"}),O.jsx("input",{type:"url",id:"info_url",name:"info_url",value:V.info_url,onChange:st,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"https://example.com/event"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),O.jsx("textarea",{id:"description",name:"description",value:V.description,onChange:st,rows:"4",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Enter event description..."})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"warnings",className:"block text-sm font-medium text-gray-700 mb-1",children:"Warnings"}),O.jsx("textarea",{id:"warnings",name:"warnings",value:V.warnings,onChange:st,rows:"2",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Any warnings or special notes..."})]}),O.jsxs("div",{className:"flex gap-3 pt-4",children:[O.jsx("button",{type:"submit",disabled:$,className:"flex-1 bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors font-medium",children:$?"Updating Event...":"Update Event"}),O.jsx("button",{type:"button",onClick:Re,disabled:$,className:"px-6 py-2 border border-gray-300 rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",children:"Cancel Edits"}),O.jsx("button",{type:"button",onClick:Tt,disabled:$||k,className:"sm:flex-none px-6 py-2 bg-red-50 text-red-600 border border-red-200 rounded-md hover:bg-red-600 hover:text-white disabled:opacity-50 disabled:cursor-not-allowed transition-all font-medium",children:k?"Deleting...":"Delete"})]})]})]})}):O.jsx("div",{className:"max-w-4xl mx-auto p-6",children:O.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[O.jsx("h2",{className:"text-2xl font-bold mb-6 text-gray-800",children:"Edit Events"}),_e&&O.jsx("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:O.jsx("p",{className:"text-red-800 text-sm",children:_e})}),m?O.jsxs("div",{className:"text-center py-8",children:[O.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"}),O.jsx("p",{className:"mt-2 text-gray-600",children:"Loading events..."})]}):a.length===0?O.jsxs("div",{className:"text-center py-8",children:[O.jsx("p",{className:"text-gray-600",children:"No events found for your organization."}),i&&O.jsx("button",{onClick:i,className:"mt-4 px-6 py-2 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors font-medium",children:"Go Back"})]}):O.jsxs("div",{className:"space-y-4",children:[O.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["Select an event to edit (",a.length," event",a.length!==1?"s":""," found)"]}),O.jsx("div",{className:"space-y-2 max-h-96 overflow-y-auto",children:a.map(_t=>O.jsx("button",{onClick:()=>ot(_t.id),disabled:ae,className:"w-full text-left p-4 border border-gray-200 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:O.jsxs("div",{className:"flex justify-between items-start",children:[O.jsxs("div",{className:"flex-1",children:[O.jsx("h3",{className:"font-semibold text-gray-900",children:_t.event_title}),O.jsx("p",{className:"text-sm text-gray-600 mt-1",children:_t.event_type}),O.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[_t.city,", ",_t.state]}),O.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:[Yt(_t.start)," - ",Yt(_t.end)]})]}),O.jsxs("div",{className:"text-xs text-gray-400 font-mono ml-4",children:["ID: ",_t.id.slice(0,8),"..."]})]})},_t.id))}),i&&O.jsx("div",{className:"flex justify-end pt-4",children:O.jsx("button",{onClick:i,disabled:ae,className:"px-6 py-2 border border-gray-300 rounded-md hover:bg-gray-200 hover:text-gray-800 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",children:"Cancel"})})]})]})})}const A6=async n=>{try{const{data:t,error:i}=await Ur.from("profiles").select("*").eq("slug",n).eq("is_organization",!0).single();if(i)throw new Error(`Failed to fetch organization: ${i.message}`);return{data:t,error:null}}catch(t){return console.error("Error in getOrganizationProfile:",t),{data:null,error:t.message}}},k6=async()=>{try{const{data:n,error:t}=await Ur.from("profiles").select("id, username, full_name, bio, slug, profile_image_url").eq("is_organization",!0);if(t)throw new Error(`Failed to fetch organizations: ${t.message}`);return{data:n,error:null}}catch(n){return console.error("Error in getAllOrganizations:",n),{data:null,error:n.message}}},D6=async n=>{try{const{data:t,error:i}=await Ur.from("profiles").select("*").eq("slug",n).eq("is_organization",!1).single();if(i)throw new Error(`Failed to fetch user: ${i.message}`);return{data:t,error:null}}catch(t){return console.error("Error in getUserProfile:",t),{data:null,error:t.message}}},R6=async(n,t)=>{try{const{data:i,error:a}=await Ur.from("profiles").update(n).eq("id",t);if(a)throw new Error(`Failed to update profile: ${a.message}`);return{data:i,error:null}}catch(i){return console.error("Error in updateProfileAttribute:",i),{data:null,error:i.message}}},L6=async n=>{try{if(!n)throw new Error("No file provided");
840if(!["image/jpeg","image/jpg","image/png","image/webp"].includes(n.type))throw new Error("Invalid file type. Please upload a JPEG, PNG, or WebP image.");const i=5*1024*1024;if(n.size>i)throw new Error("File size exceeds 5MB limit");const{data:{user:a},error:h}=await Ur.auth.getUser();if(h||!a)throw new Error("User not authenticated");const m=n.name.split(".").pop(),g=`${a.id}/profile-image.${m}`,{data:s,error:Y}=await Ur.storage.from("profile-images").upload(g,n,{upsert:!0,contentType:n.type,cacheControl:"3600"});if(Y)throw Y;const{data:{publicUrl:E}}=Ur.storage.from("profile-images").getPublicUrl(g),{error:I}=await Ur.from("profiles").update({profile_image_url:E}).eq("id",a.id);if(I)throw I;return{success:!0,path:s.path,url:E}}catch(t){return console.error("Error updating profile image:",t),{success:!1,error:t.message}}},SC=({onUploadSuccess:n,onUploadError:t})=>{const[i,a]=de.useState(!1),[h,m]=de.useState(null),[g,s]=de.useState(null),[Y,E]=de.useState(null),I=V=>{const F=V.target.files[0];if(!F)return;if(!F.type.startsWith("image/")){m({type:"error",text:"Please select an image file"});return}if(F.size>5*1024*1024){m({type:"error",text:"File size must be less than 5MB"});return}s(F),m(null);const $=new FileReader;$.onloadend=()=>{E($.result)},$.readAsDataURL(F)},k=async V=>{if(V.preventDefault(),!g){m({type:"error",text:"Please select a file first"});return}a(!0),m(null);try{const{data:F,error:$,imageUrl:Q}=await L6(g);$?(m({type:"error",text:$}),t&&t($)):(m({type:"success",text:"Profile image updated successfully!"}),s(null),E(null),n&&n(Q))}catch{const $="An unexpected error occurred";m({type:"error",text:$}),t&&t($)}finally{a(!1)}},D=()=>{s(null),E(null),m(null)};return O.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[O.jsx("h3",{className:"text-lg font-semibold mb-4 text-gray-800",children:"Update Profile Image"}),O.jsxs("div",{onSubmit:k,className:"space-y-4",children:[O.jsxs("div",{className:"flex flex-col items-center gap-4",children:[Y&&O.jsxs("div",{className:"relative",children:[O.jsx("img",{src:Y,alt:"Preview",className:"w-32 h-32 object-cover rounded-full border-4 border-gray-200"}),O.jsx("button",{type:"button",onClick:D,className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full w-6 h-6 flex items-center justify-center hover:bg-red-600",children:"Ã"})]}),O.jsx("div",{className:"w-full",children:O.jsxs("label",{htmlFor:"file-upload",className:"flex flex-col items-center justify-center w-full h-32 border-2 border-dashed border-gray-300 rounded-lg cursor-pointer hover:bg-gray-50 transition-colors",children:[O.jsxs("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[O.jsx("span",{className:"text-3xl mb-2",children:"ð·"}),O.jsxs("p",{className:"text-sm text-gray-600",children:[O.jsx("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),O.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"PNG, JPG, GIF up to 5MB"})]}),O.jsx("input",{id:"file-upload",type:"file",accept:"image/*",onChange:I,className:"hidden",disabled:i})]})}),g&&O.jsxs("p",{className:"text-sm text-gray-600",children:["Selected: ",g.name]})]}),h&&O.jsx("div",{className:`p-3 rounded-lg ${h.type==="error"?"bg-red-50 text-red-700 border border-red-200":"bg-green-50 text-green-700 border border-green-200"}`,children:h.text}),O.jsx("button",{type:"button",onClick:k,disabled:!g||i,className:`w-full py-3 px-4 rounded-lg font-medium transition-all ${!g||i?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-blue-600 text-white hover:bg-blue-700 shadow-md"}`,children:i?"Uploading...":"Upload Profile Image"})]})]})};/** 841 * @license lucide-react v0.553.0 - ISC 842 * 843 * This source code is licensed under the ISC license. 844 * See the LICENSE file in the root directory of this source tree. 845 */const O6=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),X6=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,a)=>a?a.toUpperCase():i.toLowerCase()),qM=n=>{const t=X6(n);return t.charAt(0).toUpperCase()+t.slice(1)},TC=(...n)=>n.filter((t,i,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===i).join(" ").trim(),N6=n=>{for(const t in n)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** 846 * @license lucide-react v0.553.0 - ISC 847 * 848 * This source code is licensed under the ISC license. 849 * See the LICENSE file in the root directory of this source tree. 850 */var z6={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 851 * @license lucide-react v0.553.0 - ISC 852 * 853 * This source code is licensed under the ISC license. 854 * See the LICENSE file in the root directory of this source tree. 855 */const F6=de.forwardRef(({color:n="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:h="",children:m,iconNode:g,...s},Y)=>de.createElement("svg",{ref:Y,...z6,width:t,height:t,stroke:n,strokeWidth:a?Number(i)*24/Number(t):i,className:TC("lucide",h),...!m&&!N6(s)&&{"aria-hidden":"true"},...s},[...g.map(([E,I])=>de.createElement(E,I)),...Array.isArray(m)?m:[m]]));/** 856 * @license lucide-react v0.553.0 - ISC 857 * 858 * This source code is licensed under the ISC license. 859 * See the LICENSE file in the root directory of this source tree. 860 */const iS=(n,t)=>{const i=de.forwardRef(({className:a,...h},m)=>de.createElement(F6,{ref:m,iconNode:t,className:TC(`lucide-${O6(qM(n))}`,`lucide-${n}`,a),...h}));return i.displayName=qM(n),i};/** 861 * @license lucide-react v0.553.0 - ISC 862 * 863 * This source code is licensed under the ISC license. 864 * See the LICENSE file in the root directory of this source tree. 865 */const Z6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],j6=iS("circle-alert",Z6);/** 866 * @license lucide-react v0.553.0 - ISC 867 * 868 * This source code is licensed under the ISC license. 869 * See the LICENSE file in the root directory of this source tree. 870 */const B6=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],$6=iS("circle-check-big",B6);/** 871 * @license lucide-react v0.553.0 - ISC 872 * 873 * This source code is licensed under the ISC license. 874 * See the LICENSE file in the root directory of this source tree. 875 */const G6=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],HM=iS("loader-circle",G6),WC=({profile:n,onUpdateSuccess:t})=>{const[i,a]=de.useState({username:"",full_name:"",external_url:"",bio:""}),[h,m]=de.useState(!1),[g,s]=de.useState({type:"",text:""}),[Y,E]=de.useState({});de.useEffect(()=>{n&&a({username:n.username||"",full_name:n.full_name||"",external_url:n.external_url||"",bio:n.bio||""})},[n]);const I=()=>{const V={};if(i.username.trim()?/^[a-z0-9._-]+$/.test(i.username)||(V.username="(all usernames will be converted to lowercase. Usernames can contain only letters, numbers, underscores _, dashes -, and periods .)"):V.username="Username is required",i.full_name.trim()||(V.full_name="Full name is required"),i.external_url&&i.external_url.trim())try{new URL(i.external_url)}catch{V.external_url="Please enter a valid URL"}return E(V),Object.keys(V).length===0},k=V=>{const{name:F,value:$}=V.target,Q=F==="username"?$.toLowerCase().replace(/[^a-z0-9._-]/g,""):$;a(ae=>({...ae,[F]:Q})),Y[F]&&E(ae=>({...ae,[F]:""}))},D=async()=>
875{if(I()){m(!0),s({type:"",text:""});try{const V={username:i.username.trim(),full_name:i.full_name.trim(),external_url:i.external_url.trim()||null,bio:i.bio.trim()||null,slug:i.username.trim()},{data:F,error:$}=await R6(V,n.id);$?s({type:"error",text:$}):(s({type:"success",text:"Profile updated successfully!"}),t&&t(F))}catch{s({type:"error",text:"An unexpected error occurred"})}finally{m(!1)}}};return n?O.jsxs("div",{className:"max-w-2xl mx-auto p-6",children:[O.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"Edit Profile"}),O.jsxs("div",{className:"space-y-6",children:[O.jsxs("div",{children:[O.jsx("label",{htmlFor:"username",className:"block text-sm font-medium text-gray-700 mb-1",children:"Username *"}),O.jsx("input",{type:"text",id:"username",name:"username",value:i.username,onChange:k,className:`w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent ${Y.username?"border-red-500":"border-gray-300"}`,disabled:h}),Y.username&&O.jsx("p",{className:"mt-1 text-sm text-red-600",children:Y.username}),O.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Your slug will match your username (lowercase letters and numbers only)"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"full_name",className:"block text-sm font-medium text-gray-700 mb-1",children:"Full Name *"}),O.jsx("input",{type:"text",id:"full_name",name:"full_name",value:i.full_name,onChange:k,className:`w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent ${Y.full_name?"border-red-500":"border-gray-300"}`,disabled:h}),Y.full_name&&O.jsx("p",{className:"mt-1 text-sm text-red-600",children:Y.full_name})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"external_url",className:"block text-sm font-medium text-gray-700 mb-1",children:"Website"}),O.jsx("input",{type:"url",id:"external_url",name:"external_url",value:i.external_url,onChange:k,placeholder:"https://example.com",className:`w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent ${Y.external_url?"border-red-500":"border-gray-300"}`,disabled:h}),Y.external_url&&O.jsx("p",{className:"mt-1 text-sm text-red-600",children:Y.external_url})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"bio",className:"block text-sm font-medium text-gray-700 mb-1",children:"Bio"}),O.jsx("textarea",{id:"bio",name:"bio",value:i.bio,onChange:k,rows:4,className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",placeholder:"Tell us about yourself...",disabled:h}),O.jsxs("p",{className:"mt-1 text-sm text-gray-500",children:[i.bio.length," characters"]})]}),O.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:[O.jsxs("p",{className:"text-sm text-gray-600 mb-2",children:[O.jsx("strong",{children:"Account Type:"})," ",n.is_organization?"Organization":"Individual"]}),O.jsxs("p",{className:"text-sm text-gray-600",children:[O.jsx("strong",{children:"Member Since:"})," ",new Date(n.created_at).toLocaleDateString()]})]}),g.text&&O.jsxs("div",{className:`flex items-start gap-2 p-4 rounded-lg ${g.type==="success"?"bg-green-50 text-green-800":"bg-red-50 text-red-800"}`,children:[g.type==="success"?O.jsx($6,{className:"w-5 h-5 flex-shrink-0 mt-0.5"}):O.jsx(j6,{className:"w-5 h-5 flex-shrink-0 mt-0.5"}),O.jsx("p",{className:"text-sm",children:g.text})]}),O.jsx("div",{className:"flex gap-3",children:O.jsx("button",{onClick:D,disabled:h,className:"flex-1 bg-blue-600 text-white py-2 px-4 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed font-medium transition-colors flex items-center justify-center gap-2",children:h?O.jsxs(O.Fragment,{children:[O.jsx(HM,{className:"w-4 h-4 animate-spin"}),"Saving..."]}):"Save Changes"})})]})]}):O.jsx("div",{className:"flex items-center justify-center p-8",children:O.jsx(HM,{className:"w-6 h-6 animate-spin text-gray-400"})})},q6=()=>{const{session:n,profile:t,loading:i,refreshProfile:a}=Ul(),[h,m]=de.useState("geocode"),g=I=>{console.log("Event created successfully:",I)},s=I=>{console.log("File uploaded successfully",I),a()},Y=I=>{console.log("Error with file upload",I)},E=I=>{console.log("Profile updated successfully:",I),a()};return O.jsxs("div",{className:"max-w-4xl mx-auto p-4",children:[O.jsxs("div",{className:"text-center mb-8",children:[O.jsx("h1",{className:"text-2xl font-bold",children:"Dashboard"}),O.jsxs("h2",{children:["Welcome, ",t==null?void 0:t.username]})]}),O.jsxs("div",{className:"mb-8 bg-white rounded-lg shadow-md p-6",children:[O.jsx("h3",{className:"text-xl font-semibold mb-4 text-gray-800",children:"Profile Settings"}),O.jsx(SC,{onUploadSuccess:s,onUploadError:Y}),O.jsx("div",{className:"mt-6",children:i?O.jsx("div",{className:"text-center py-8",children:O.jsx("p",{className:"text-gray-500",children:"Loading profile..."})}):O.jsx(WC,{profile:t,onUpdateSuccess:E})})]}),O.jsxs("div",{className:"mb-6 bg-white rounded-lg shadow-md p-4",children:[O.jsx("h3",{className:"text-lg font-semibold mb-3 text-gray-800",children:"Choose Event Creation Method"}),O.jsxs("div",{className:"flex gap-4",children:[O.jsx("button",{onClick:()=>
875m("geocode"),className:`flex-1 py-3 px-4 rounded-lg font-medium transition-all ${h==="geocode"?"bg-blue-600 text-white shadow-md":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:O.jsxs("div",{className:"flex flex-col items-center gap-1",children:[O.jsx("span",{className:"text-lg",children:"ð"}),O.jsx("span",{children:"Auto-Geocode"}),O.jsx("span",{className:"text-xs opacity-80",children:"Address automatically converted to coordinates"})]})}),O.jsx("button",{onClick:()=>m("manual"),className:`flex-1 py-3 px-4 rounded-lg font-medium transition-all ${h==="manual"?"bg-blue-600 text-white shadow-md":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:O.jsxs("div",{className:"flex flex-col items-center gap-1",children:[O.jsx("span",{className:"text-lg",children:"ðºï¸"}),O.jsx("span",{children:"Manual Coordinates"}),O.jsx("span",{className:"text-xs opacity-80",children:"Provide exact latitude and longitude"})]})})]})]}),h==="geocode"?O.jsx(YC,{session:n,onSuccess:g}):O.jsx(C6,{session:n,onSuccess:g}),O.jsx(V6,{session:n,onSuccess:g})]})},H6=()=>{const{session:n,profile:t,loading:i,refreshProfile:a}=Ul(),[h,m]=de.useState([]),g=I=>{console.log("File uploaded successfully",I),a()},s=I=>{console.log("Error with file upload",I)},Y=I=>{console.log("Profile updated successfully:",I),a()};de.useEffect(()=>{(async()=>{var k;if((k=n==null?void 0:n.user)!=null&&k.id)try{const{data:D,error:V}=await Ur.from("event_attendees").select(` 876 events:event_id (*) 877 `).eq("user_id",n.user.id).order("saved_at",{ascending:!1});if(!V&&D){const F=D.map($=>$.events).filter(Boolean);m(F)}else m([])}catch(D){console.error("Error fetching user data:",D)}finally{setLoading(!1)}})()},[n]);const E=async I=>{try{const{error:k}=await Ur.from("event_attendees").delete().eq("user_id",n.user.id).eq("event_id",I);k||m(D=>D.filter(V=>V.id!==I))}catch(k){console.error("Error removing saved event:",k)}};return i?O.jsx("div",{className:"p-4",children:O.jsx("p",{children:"Loading..."})}):O.jsxs("div",{className:"p-4 max-w-6xl mx-auto",children:[O.jsxs("div",{className:"mb-8",children:[O.jsxs("h1",{className:"text-2xl font-bold mb-2",children:["Welcome back, ",(t==null?void 0:t.username)||"User","!"]}),(t==null?void 0:t.bio)&&O.jsx("p",{className:"text-gray-600",children:t.bio})]}),O.jsxs("div",{className:"mb-8",children:[O.jsxs("h2",{className:"text-xl font-semibold mb-4",children:["My Saved Events (",h.length,")"]}),h.length===0?O.jsxs("div",{className:"bg-gray-50 rounded-lg p-6 text-center",children:[O.jsx("p",{className:"text-gray-600 mb-2",children:"No saved events yet!"}),O.jsx("p",{className:"text-sm text-gray-500",children:"Browse events and save the ones you're interested in."})]}):O.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:h.map(I=>O.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow",children:[O.jsxs("div",{className:"flex justify-between items-start mb-3",children:[O.jsxs("div",{className:"flex-1",children:[O.jsx("h3",{className:"font-semibold text-lg mb-1 line-clamp-2",children:I.event_title}),O.jsx("p",{className:"text-sm text-gray-600 mb-2",children:I.organization}),O.jsx("p",{className:"text-xs text-gray-500 mb-2",children:I.event_type})]}),O.jsx("button",{onClick:()=>E(I.id),className:"text-gray-400 hover:text-red-500 transition-colors ml-2",title:"Remove from saved events",children:"â"})]}),O.jsxs("div",{className:"text-sm text-gray-600 mb-3",children:[O.jsxs("p",{className:"mb-1",children:["ð ",ys(I.start,I.latitude,I.longitude)]}),O.jsxs("p",{className:"mb-1",children:["ð ",I.address]})]}),O.jsxs("div",{className:"flex gap-2",children:[O.jsx(Ca,{to:`/event/${I.id}`,className:"flex-1 text-center px-3 py-2 bg-blue-600 text-white text-sm rounded hover:bg-blue-700 transition-colors",children:"View Details"}),I.info_url&&O.jsx("a",{href:I.info_url,target:"_blank",rel:"noopener noreferrer",className:"px-3 py-2 border border-gray-300 text-gray-700 text-sm rounded hover:bg-gray-50 transition-colors",children:"Info"})]})]},I.id))})]}),O.jsxs("div",{className:"bg-blue-50 rounded-lg p-4",children:[O.jsx("h3",{className:"font-medium mb-2",children:"Qu
877ick Actions"}),O.jsx("div",{className:"flex gap-2",children:O.jsx(Ca,{to:"/events",className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"Browse Events"})})]}),O.jsxs("div",{className:"mb-8 bg-white rounded-lg shadow-md p-6",children:[O.jsx("h3",{className:"text-xl font-semibold mb-4 text-gray-800",children:"Profile Settings"}),(t==null?void 0:t.is_organization)&&O.jsx(SC,{onUploadSuccess:g,onUploadError:s}),O.jsx("div",{className:"mt-6",children:i?O.jsx("div",{className:"text-center py-8",children:O.jsx("p",{className:"text-gray-500",children:"Loading profile..."})}):O.jsx(WC,{profile:t,onUpdateSuccess:Y})})]})]})},K6=()=>{const{session:n,profile:t,loading:i,verifyOrganizationAccess:a}=Ul(),[h,m]=de.useState(null),[g,s]=de.useState(!0);return de.useEffect(()=>{n&&t&&(async()=>{if(!n||!t)return;const{hasAccess:E,error:I}=await a();I&&console.error("verifyOrganizationAccess error:",I),m(E),s(!1)})()},[n,t,a]),i||g?O.jsx("div",{children:"Loading..."}):!n||!t?O.jsx(UA,{to:"/signin",replace:!0}):h?O.jsx(q6,{}):O.jsx(H6,{})},Q6="/assets/flowers-W0mNM1O2.jpeg",J6="/assets/paper-DLkBcIfx.png",eZ=()=>{const{slug:n}=ov(),{session:t,profile:i}=Ul(),a=(i==null?void 0:i.is_organization)&&(i==null?void 0:i.slug)===n,[h,m]=de.useState(null),[g,s]=de.useState([]),[Y,E]=de.useState(!0),[I,k]=de.useState(null),[D,V]=de.useState(!1),[F,$]=de.useState(!1),[Q,ae]=de.useState(0),[le,_e]=de.useState([]),[fe,We]=de.useState(!1),[se,De]=de.useState(!1);de.useEffect(()=>{async function st(){const{data:rt,error:Re}=await A6(n);if(Re)console.error("Error fetching account:",Re),k(Re);else{m(rt);const{data:Yt}=await mv(rt.id);s(Yt||[])}E(!1)}st()},[n]),de.useEffect(()=>{async function st(){var Re;if(!((Re=t==null?void 0:t.user)!=null&&Re.id)||!(h!=null&&h.id))return;const{data:rt}=await Ur.from("organization_followers").select("id").eq("follower_id",t.user.id).eq("organization_id",h.id).single();V(!!rt)}st()},[t,h]),de.useEffect(()=>{async function st(){if(!(h!=null&&h.id))return;const{data:rt}=await Ur.from("organization_followers").select(` 878 profiles:follower_id ( 879 id, 880 username, 881 full_name, 882 slug 883 ) 884 `).eq("organization_id",h.id).order("followed_at",{ascending:!1}).limit(10);rt&&_e(rt.map(Yt=>Yt.profiles).filter(Boolean));const{count:Re}=await Ur.from("organization_followers").select("*",{count:"exact",head:!0}).eq("organization_id",h.id);ae(Re||0)}st()},[h,D]);const ze=async()=>{var st;if(!(!((st=t==null?void 0:t.user)!=null&&st.id)||!(h!=null&&h.id))){$(!0);try{if(D){const{error:rt}=await Ur.from("organization_followers").delete().eq("follower_id",t.user.id).eq("organization_id",h.id);rt||V(!1)}else{const{error:rt}=await Ur.from("organization_followers").insert({follower_id:t.user.id,organization_id:h.id});rt||V(!0)}}catch(rt){console.error("Error toggling follow:",rt)}finally{$(!1)}}},je=async()=>{if(!(h!=null&&h.id))return;De(!0),We(!0);const{data:st,error:rt}=await Ur.from("organization_followers").select(` 885 follower_id, 886 profiles:follower_id ( 887 id, 888 username, 889 full_name, 890 slug 891 ) 892 `).eq("organization_id",h.id).order("followed_at",{ascending:!1});!rt&&st&&_e(st.map(Re=>Re.profiles).filter(Boolean)),De(!1)},ft=st=>st?st.match(/^https?:\/\//i)?st:`https://${st}`:null,ot=st=>st?st.replace(/^https?:\/\//i,""):"";return Y?O.jsx("p",{className:"text-center text-gray-500 mt-10",children:"Loading..."}):I?O.jsxs("p",{className:"text-center text-red-500 mt-10",children:["Error: ",I]}):h?O.jsxs("div",{className:"min-h-screen bg-cover bg-center",children:[O.jsxs("div",{className:"relative text-white py-20",style:{backgroundImage:`url(${Q6})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"},children:[O.jsx("div",{className:"absolute inset-0 bg-green-800/40"}),O.jsxs("div",{className:"relative max-w-6xl mx-auto flex flex-col md:flex-row items-center gap-8 px-6 p-6 rounded-3xl",children:[O.jsx("div",{className:"flex-shrink-0 h-36 w-36 rounded-full bg-white overflow-hidden shadow-2xl border-4 border-white z-10",children:h.profile_image_url?O.jsx("img",{src:h.profile_image_url,alt:h.username,className:"h-full w-full object-cover"}):O.jsx("div",{className:"h-full w-full flex items-center justify-center text-5xl font-bold text-gray-700",children:h.username[0]})}),O.jsxs("div",{className:"text-center md:text-left z-10",children:[O.jsx("h1",{className:"text-5xl md:text-6xl font-extrabold drop-shadow-lg",children:h.username}),h.tagline&&O.jsx("p",{className:"text-lg md:text-xl mt-3 opacity-90",children:h.tagline}),h.external_url&&O.jsxs("a",{href:ft(h.external_url),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 mt-3 px-4 py-2 bg-white text-green-600 font-semibold rounded-full shadow-md hover:bg-gray-100 transition",children:[O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),ot(h.external_url)]}),O.jsxs("div",{className:"flex items-center gap-4 mt-4 justify-center md:justify-start",children:[(t==null?void 0:t.user)&&!a&&O.jsx("button",{onClick:ze,disabled:F,className:`px-6 py-2 font-semibold rounded-full shadow-md transition ${D?"bg-gray-200 text-gray-700 hover:bg-gray-300":"bg-white text-green-600 hover:bg-gray-100"} ${F?"opacity-50 cursor-not-allowed":""}`,children:F?"...":D?"Following":"Follow"}),Q>0&&O.jsxs("button",{onClick:je,className:"text-white text-sm font-medium bg-black/30 px-3 py-1 rounded-full hover:bg-black/50 transition cursor-pointer",children:[Q," ",Q===1?"Follower":"Followers"]})]})]})]})]}
892),O.jsxs("section",{className:"max-w-4xl mx-auto shadow-lg p-10 mt-[-4rem] relative z-10",style:{backgroundImage:`url(${J6})`,backgroundSize:"150% auto",backgroundPosition:"center"},children:[O.jsx("h2",{className:"text-3xl font-semibold mb-4 text-gray-800 border-b pb-2 border-gray-200",children:"About Us"}),O.jsx("p",{className:"text-gray-700 leading-relaxed text-lg",children:h.bio||"This organization hasn't added a bio yet."})]}),O.jsx("section",{children:O.jsx("div",{className:"relative z-10 p-6",children:O.jsx(bC,{organizationId:h.id})})}),fe&&O.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:()=>We(!1),children:O.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full max-h-[80vh] overflow-hidden",onClick:st=>st.stopPropagation(),children:[O.jsxs("div",{className:"p-4 border-b flex justify-between items-center",children:[O.jsx("h3",{className:"text-xl font-semibold text-gray-800",children:"Followers"}),O.jsx("button",{onClick:()=>We(!1),className:"text-gray-500 hover:text-gray-700 text-2xl",children:"Ã"})]}),O.jsx("div",{className:"overflow-y-auto max-h-[calc(80vh-5rem)] p-4",children:se?O.jsx("p",{className:"text-center text-gray-500 py-8",children:"Loading..."}):le.length===0?O.jsx("p",{className:"text-center text-gray-500 py-8",children:"No followers yet"}):O.jsx("div",{className:"space-y-3",children:le.map(st=>{var rt,Re;return O.jsxs(Ca,{to:`/u/${st.slug||st.username||st.id}`,className:"flex items-center gap-3 p-3 rounded-lg hover:bg-gray-100 transition",onClick:()=>We(!1),children:[O.jsx("div",{className:"h-12 w-12 rounded-full bg-green-500 flex items-center justify-center text-white font-semibold",children:((Re=(rt=st.username)==null?void 0:rt[0])==null?void 0:Re.toUpperCase())||"?"}),O.jsxs("div",{children:[O.jsx("p",{className:"font-medium text-gray-800",children:st.username}),st.full_name&&O.jsx("p",{className:"text-sm text-gray-500",children:st.full_name})]})]},st.id)})})})]})})]}):O.jsx("p",{className:"text-center mt-10",children:"Account not found."})},tZ=()=>{const[n,t]=de.useState(!0),[i,a]=de.useState([]),[h,m]=de.useState(null),[g,s]=de.useState("asc"),[Y,E]=de.useState("");return de.useEffect(()=>{(async()=>{const{data:k,error:D}=await k6();D?(console.error("Error fetching Organizations:",D),m(D)):(console.log("Organizations data:",k),a(k||[])),t(!1)})()},[]),n?O.jsx("div",{className:"text-center mt-10",children:"Loading organizations..."}):h?O.jsxs("div",{className:"text-center text-red-500 mt-10",children:["Error: ",h]}):O.jsxs("div",{className:"min-h-screen pt-10 px-6",children:[O.jsx("h1",{className:"text-4xl font-extrabold text-center mb-10 text-black drop-shadow-sm",children:"Explore Organizations"}),O.jsxs("div",{className:"max-w-7xl p-6 mx-auto flex flex-col sm:flex-row justify-between items-center mb-6 gap-4",children:[O.jsx("input",{type:"text",placeholder:"Search organizations...",value:Y,onChange:I=>E(I.target.value),className:"border border-gray-300 rounded-lg px-3 py-2 w-full sm:w-1/2 focus:ring-2 focus:ring-blue-500"}),O.jsxs("select",{value:g,onChange:I=>s(I.target.value),className:"border border-gray-300 rounded-lg px-3 py-2 text-sm",children:[O.jsx("option",{value:"asc",children:"Sort: A â Z"}),O.jsx("option",{value:"desc",children:"Sort: Z â A"})]})]}),O.jsx("div",{className:"max-w-7xl mx-auto p-8 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-10",children:[...i].filter(I=>{var k;return(k=I.username)==null?void 0:k.toLowerCase().includes(Y.toLowerCase())}).sort((I,k)=>{var F,$;const D=((F=I.username)==null?void 0:F.toLowerCase())||"",V=(($=k.username)==null?void 0:$.toLowerCase())||"";return g==="asc"?D.localeCompare(V):V.localeCompare(D)}).map(I=>O.jsxs("div",{className:"bg-white rounded-3xl shadow-lg border border-gray-200 p-8 flex flex-col items-center text-center hover:shadow-2xl hover:-translate-y-1 transition-transform duration-200",children:[O.jsx("div",{className:"h-28 w-28 rounded-full overflow-hidden shadow-md border-4 border-white -mt-14 bg-gray-100 flex items-center justify-center text-4xl font-bold text-gray-600",children:I.profile_image_url?O.jsx("img",{src:I.profile_image_url,alt:I.username,className:"h-full w-full object-cover"}):I.username[0]}),O.jsx("h3",{className:"text-2xl font-bold mt-6 mb-2 text-gray-900",children:I.username}),O.jsx("p",{className:"text-gray-700 mb-6 line-clamp-3 max-w-sm",children:I.bio||"This organization hasn't added a bio yet."}),O.jsx(Ca,{to:`/org/${I.slug}`,className:"mt-auto px-6 py-2 bg-blue-500 rounded-full hover:bg-blue-600 transition-colors font-semibold shadow-md text-white",children:"View Profile"})]},I.username))})]})},rZ=()=>{const{slug:n}=ov(),[t,i]=de.useState(null),[a,h]=de.useState(!0),[m,g]=de.useState(null);return de.useEffect(()=>{async function s(){const{data:Y,error:E}=await D6(n);E?(console.error("Error fetching account:",E),g(E)):i(Y),h(!1)}s()},[n]),a?O.jsx("p",{children:"Loading..."}):m?O.jsxs("p",{children:["Error: ",m]}):t?O.jsxs("div",{children:[O.jsx("h1",{children:t.username}),O.jsxs("p",{children:["Bio: ",t.bio]})]}):O.jsx("p",{children:"Account not found."})},xy=({url:n,iframeTitle:t,cardTitle:i,description:a})=>O.jsxs("div",{className:"bg-white rounded-2xl shadow-md border border-gray-200 hover:shadow-lg transition-shadow overflow-hidden",children:[O.jsx("div",{className:"relative w-full h-96",children:O.jsx("iframe",{src:n,className:"w-full h-full border-0",title:t})}),O.jsxs("div",{className:"p-8",children:[O.jsx("h2",{className:"text-xl font-semibold mb-2",children:i}),O.jsx("p",{className:"text-gray-600",children:a}),O.jsx(Ca,{className:"mt-4 inline-block px-4 py-2 bg-green-500 text-white rounded-full hover:bg-green-600 hover:text-white transition-colors text-sm font-medium",to:`${n}`,target:"_blank",children:"Website"})]})]}),nZ=()=>O.jsxs("div",{className:"min-h-screen px-4 py-10",style:{},children:[O.jsxs("div",{className:"text-center mb-12 max-w-3xl mx-auto",children:[O.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-4",children:"Visualize Environmental C
892oncerns"}),O.jsx("p",{className:"text-lg md:text-xl text-gray-700",children:"Explore key environmental data like deforestation, air quality, climate change, and more through interactive resources."})]}),O.jsxs("div",{className:"grid gap-8 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 max-w-7xl mx-auto",children:[O.jsx(xy,{url:"https://www.globalforestwatch.org/map/",iframeTitle:"global forest watch",cardTitle:"Global Forest Watch",description:"View changes in forests such as deforestation, land use, wildfires, and more!"}),O.jsx(xy,{url:"https://resourcewatch.org/",iframeTitle:"resource watch",cardTitle:"Resource Watch",description:"Provides hundreds of datasets about planet's resources in an interactive way."}),O.jsx(xy,{url:"https://earth.nullschool.net/",iframeTitle:"nullschool earth",cardTitle:"Nullschool Earth",description:"Visualize current and historic wind, weather, ocean, and pollution conditions globally."}),O.jsx(xy,{url:"https://www.protectedplanet.net/en/thematic-areas/oecms?tab=OECMs",iframeTitle:"protected planet",cardTitle:"Protected Planet",description:"The most comprehensive database of global protected areas."})]})]}),iZ=()=>{const{slug:n}=ov(),{session:t,profile:i,loading:a}=Ul(),[h,m]=de.useState(null),[g,s]=de.useState(null),[Y,E]=de.useState(!0),[I,k]=de.useState(!1),[D,V]=de.useState(!1),[F,$]=de.useState([]),[Q,ae]=de.useState(0),le=de.useRef(null),_e=de.useRef(null);de.useEffect(()=>{(async()=>{E(!0),s(null);try{const{data:De,error:ze}=await ZI(n);ze?s("Failed to load event."):m(De)}catch{s("Unexpected error occurred.")}finally{E(!1)}})()},[n]),de.useEffect(()=>{(async()=>{var ze;if(!((ze=t==null?void 0:t.user)!=null&&ze.id)||!(h!=null&&h.id))return;const{data:De}=await Ur.from("event_attendees").select("id").eq("user_id",t.user.id).eq("event_id",h.id).single();k(!!De)})()},[t,h]),de.useEffect(()=>{(async()=>{if(!(h!=null&&h.id))return;const{data:De}=await Ur.from("event_attendees").select(` 893 profiles:user_id ( 894 id, 895 username, 896 full_name, 897 slug 898 ) 899 `).eq("event_id",h.id).order("saved_at",{ascending:!1}).limit(10);De&&$(De.map(je=>je.profiles).filter(Boolean));const{count:ze}=await Ur.from("event_attendees").select("*",{count:"exact",head:!0}).eq("event_id",h.id);ae(ze||0)})()},[h,I]),de.useEffect(()=>{if(!(!(h!=null&&h.latitude)||!(h!=null&&h.longitude)))return _e.current=new El.Map({container:le.current,style:"https://tiles.openfreemap.org/styles/liberty",center:[h.longitude,h.latitude],zoom:12}),_e.current.addControl(new El.NavigationControl,"top-right"),new El.Marker().setLngLat([h.longitude,h.latitude]).setPopup(new El.Popup({offset:25}).setHTML(` 900 <div style=" 901 color: #1f2937; /* dark text for readability */ 902 font-family: 'Inter', sans-serif; 903 font-size: 14px; 904 line-height: 1.5; 905 padding: 8px; 906 "> 907 <h4 style="margin:0 0 6px 0; font-size:16px; font-weight:600;"> 908 ${h.event_title} 909 </h4> 910 <p style="margin:2px 0;"><strong>Org:</strong> ${h.organization}</p> 911 <p style="margin:2px 0;"><strong>Type:</strong> ${h.event_type}</p> 912 <p style="margin:2px 0;"> 913 <strong>Time:</strong> ${ys(h.start,h.latitude,h.longitude)} â ${ys(h.end,h.latitude,h.longitude)} 914 </p> 915 <a href="${h.info_url}" style="color:#0a74da; text-decoration:underline;">Details</a> 916 </div> 917 `)).addTo(_e.current),()=>{var se;return(se=_e.current)==null?void 0:se.remove()}},[h]);const fe=async()=>{var se;if(!(!((se=t==null?void 0:t.user)!=null&&se.id)||!(h!=null&&h.id))){if(i!=null&&i.is_organization){alert("Organizations cannot register for events.");return}V(!0);try{I?(await Ur.from("event_attendees").delete().eq("user_id",t.user.id).eq("event_id",h.id),k(!1)):(await Ur.from("event_attendees").insert({user_id:t.user.id,event_id:h.id}),k(!0))}finally{V(!1)}}},We=async()=>{var De,ze;const se=`https://ourpatch.social/event/${h.id}`;if(navigator.share)try{await navigator.share({title:h.event_title,text:`Check out this event: ${h.event_title} by ${h.organization}`,url:se})}catch{(De=navigator.clipboard)==null||De.writeText(se)}else(ze=navigator.clipboard)==null||ze.writeText(se)};return Y||a?O.jsx("p",{children:"Loading..."}):g?O.jsx("p",{children:g}):h?O.jsxs("div",{className:"px-4 py-8 max-w-5xl mx-auto",children:[O.jsxs("div",{className:"flex items-start justify-between mb-4",children:[O.jsxs("div",{children:[O.jsx("h1",{className:"text-3xl font-bold",children:h.event_title}),h.organization_slug?O.jsx(Ca,{to:`/org/${h.organization_slug}`,className:"text-lg font-medium text-[#2F92C5] hover:underline",children:h.organization}):O.jsx("p",{className:"text-lg font-medium",children:h.organization})]}),h.organization_slug&&O.jsx(Ca,{to:`/org/${h.organization_slug}`,className:"px-4 py-2 bg-[#2F92C5] text-white rounded-lg",children:"Organizer Info"})]}),O.jsxs("div",{className:"flex gap-3 mb-6",children:[(t==null?void 0:t.user)&&i&&!i.is_organization&&O.jsx("button",{onClick:fe,disabled:D,className:`px-4 py-2 rounded-lg ${I?"bg-[#22B145] text-white":"bg-gray-200 text-gray-700"}`,children:D?"Registering...":I?"â Registered":"Register"}),O.jsx("button",{onClick:We,className:"px-4 py-2 bg-[#2F92C5] text-white rounded-lg",children:"Share"}),O.jsx("div",{className:"px-4 py-2 bg-[#2F92C5] text-white rounded-lg",children:O.jsx("a",{href:h.info_url,className:"text-white",children:"Visit External Site"})})]}),O.jsxs("p",{className:"text-gray-700 mb-1",children:["Event type: ",h.event_type]}),O.jsxs("p",{className:"text-gray-600",children:[ys(h.start,h.latitude,h.longitude)," to"," ",ys(h.end,h.latitude,h.longitude)]}),O.jsx("p",{className:"text-gray-600",children:h.address}),h.description&&O.jsxs("div",{className:"my-6",children:[O.jsx("h3",{className:"text-xl font-semibold mb-2",children:"About this Event"}),O.jsx("p",{className:"text-gray-700 whitespace-pre-line",children:h.description})]}),Q>0&&O.jsxs("div",{className:"my-6 p-4 bg-gray-50 rounded-lg",children:[O.jsxs("h3",{className:"text-lg font-semibold mb-3",children:["Who's Going (",Q,")"]}),O.jsx("div",{className:"flex flex-wrap gap-2",children:F.map(se=>{var De,ze;return O.jsxs(Ca,{to:`/u/${se.slug||se.username||se.id}`,className:"flex items-center gap-2 bg-white px-3 py-2 rounded-full border",children:[O.jsx("div",{className:"w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center text-white text-xs font-bold",children:((De=se.full_name)==null?void 0:De.charAt(0))||((ze=se.username)==null?void 0:ze.charAt(0))||"?"}),O.jsx("span",{className:"text-sm font-medium",children:se.full_name||se.username||"Anonymous"})]},se.id)})})]}
917),O.jsx("div",{ref:le,className:"my-6",style:{width:"100%",height:"400px"}})]}):O.jsx("p",{children:"Event not found."})},aZ=async()=>{try{const{data:n,error:t}=await Ur.from("articles").select("*").order("created_at",{ascending:!1});if(t)throw new Error(`Failed to fetch articles: ${t.message}`);return{data:n,error:null}}catch(n){return console.error("Error in getAllArticles:",n),{data:null,error:n.message}}},sZ=async n=>{try{const{data:t,error:i}=await Ur.from("articles").select("*").eq("id",n).single();if(i)throw new Error(`Failed to fetch article: ${i.message}`);return{data:t,error:null}}catch(t){return console.error("Error in getArticle:",t),{data:null,error:t.message}}},oZ=()=>{const[n,t]=de.useState(!0),[i,a]=de.useState([]),[h,m]=de.useState(null);de.useEffect(()=>{(async()=>{t(!0),m(null);try{const{data:E,error:I}=await aZ();I?(console.error("Error fetching articles:",I),m("Failed to load articles. Please try again later.")):a(E||[])}catch(E){console.error("Unexpected error fetching articles:",E),m("An unexpected error occurred. Please try again later.")}t(!1)})()},[]);const g=async Y=>{const E=`undefined/article/${Y.id}`;if(navigator.share)try{await navigator.share({title:Y.article_title,text:`Check out this article: ${Y.article_title} by ${Y.organization} about ${Y.topic}`,url:E||window.location.href})}catch(I){I.name!=="AbortError"&&s(Y)}else s(Y)},s=Y=>{const E=`Check out this article: ${Y.article_title} by ${Y.organization} about ${Y.topic}`;navigator.clipboard?navigator.clipboard.writeText(E).then(()=>{alert("Article details copied to clipboard!")}).catch(()=>alert(`Share this article: 918 919${E}`)):alert(`Share this article: 920 921${E}`)};return O.jsx("div",{className:"px-4 py-4 max-w-7xl mx-auto",children:n?O.jsx("p",{className:"text-center text-gray-500",children:"Loading..."}):h?O.jsxs("div",{className:"text-center",children:[O.jsx("p",{className:"text-red-500 mb-4",children:h}),O.jsx("button",{onClick:()=>window.location.reload(),className:"px-6 py-2 bg-green-600 text-white rounded-full hover:bg-green-700 transition-colors",children:"Retry"})]}):i.length===0?O.jsx("p",{className:"text-center text-gray-500",children:"No articles found."}):O.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",children:i.map(Y=>O.jsxs("div",{className:"bg-white rounded-2xl shadow-md border border-gray-200 p-6 hover:shadow-xl hover:-translate-y-1 transition-transform duration-200",children:[O.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:Y.article_title}),O.jsxs("p",{className:"text-gray-800 font-medium mb-1",children:["By: ",Y.organization]}),O.jsxs("p",{className:"text-gray-700 mb-1",children:["Topic: ",Y.topic]}),O.jsxs("p",{className:"text-gray-600 text-sm mb-4",children:["Published: ",Y.created_at]}),O.jsxs("div",{className:"flex justify-between items-center mt-4",children:[O.jsx(Ca,{to:`/article/${Y.id}`,className:"text-green-600 font-semibold hover:underline hover:text-green-800 text-sm",children:"Read Article"}),O.jsx("button",{onClick:()=>g(Y),className:"px-3 py-1 bg-green-600 text-white rounded-full hover:bg-green-700 transition-colors text-sm",title:"Share this article",children:"Share"})]})]},Y.id))})})};function lZ(){const n=[{id:1,name:"Colby Jacobs",title:"Co-Director",image:"/path/to/image1.jpg"},{id:2,name:"Nelson Munoz-Traxler",title:"Co-Director",image:"/path/to/image2.jpg"},{id:3,name:"Daniel Niebla",title:"Web Developer",image:"/path/to/image3.jpg"},{id:4,name:"Lily Masa",title:"Graphic Designer",image:"/path/to/image4.jpg"},{id:5,name:"Kayla Varghese",title:"UI/UX Designer",image:"/path/to/image5.jpg"}],t=[{id:1,name:"Student Innovators at FSU",logo:"/path/to/partner1logo.png",initials:"SI"},{id:2,name:"Environmental Service Program at FSU",logo:"/path/to/partner2logo.png",initials:"ESP"}];return O.jsxs("div",{className:"min-h-screen text-gray-700",children:[O.jsx("div",{className:"px-4 py-1 pt-12 pb-16 max-w-4xl mx-auto",children:O.jsx("h1",{className:"text-5xl md:text-6xl font-bold mb-6 text-center text-gray-800",children:"About Us"})}),O.jsxs("div",{className:"px-4 py-1 max-w-6xl mx-auto",children:[O.jsxs("div",{className:"bg-white rounded-2xl p-8 md:p-12 mb-12 border border-green-300",children:[O.jsx("h2",{className:"text-3xl font-bold mb-6 text-gray-900",children:"Who are we?"}),O.jsx("p",{className:"text-lg leading-relaxed mb-4 text-gray-900",children:"OurPatch is a community-driven platform dedicated to fostering environmental awareness and action in Tallahassee, Florida. Founded by passionate individuals committed to making a positive impact, we strive to connect residents with local environmental events, resources, and news. OurPatch began as a part of the Student Innovators program at the Florida State University Innovation Hub and has since expanded to serve the entire Tallahassee community."}),O.jsx("p",{className:"text-lg leading-relaxed text-gray-900",children:"Our work spans climate action, biodiversity conservation, sustainable development, and environmental justice. We believe that every individual has the power to make a difference, and together, we can create lasting change."})]}),O.jsxs("div",{className:"mb-12",children:[O.jsx("h2",{className:"text-3xl font-bold mb-8 text-gray-900",children:"Our Team"}),O.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:n.map(i=>O.jsxs("div",{className:"bg-white rounded-xl p-6 border border-green-300 hover:shadow-lg transition-shadow flex flex-col items-center text-center",children:[O.jsx("div",{className:"mb-4",children:O.jsx("div",{className:"w-32 h-32 rounded-full bg-green-200 overflow-hidden",children:O.jsx("img",{src:i.image,alt:i.name,className:"w-full h-full object-cover",onError:a=>{a.target.style.display="none",a.target.parentElement.innerHTML=`<div class="w-full h-full flex items-center justify-center text-4xl font-bold text-green-700">${i.name.split(" ").map(h=>h[0]).join("")}</div>`}})})}),O.jsxs("div",{children:[O.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:i.name}),O.jsx("p",{className:"text-gray-600",children:i.title})]})]},i.id))})]}),O.jsxs("div",{className:"mb-12",children:[O.jsx("h2",{className:"text-3xl font-bold mb-8 text-gray-900",children:"Our Partners"}),O.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map(i=>O.jsxs("div",{className:"bg-white rounded-xl p-6 border border-green-300 hover:shadow-lg transition-shadow flex flex-col items-center text-center",children:[O.jsx("div",{className:"mb-4",children:O.jsx("div",{className:"w-32 h-32 rounded-full bg-green-200 overflow-hidden",children:O.jsx("img",{src:i.logo,alt:i.name,className:"w-full h-full object-cover",onError:a=>{a.target.style.display="none";const h=i.initials||i.name.split(" ").slice(0,i.initialsCount||2).map(m=>m[0]).join("");a.target.parentElement.innerHTML=`<div class="w-full h-full flex items-center justify-center text-4xl font-bold text-green-700">${h}</div>`}})})}),O.jsx("div",{children:O.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:i.name})})]},i.id))})]}),O.jsxs("div",{className:"mb-12",children:[O.jsx("h2",{className:"text-3xl font-bold mb-6 text-gray-900",children:"Contact Us"}),O.jsxs("div",{className:"bg-white rounded-2xl p-8 md:p-12 border border-green-300",children:[O.jsx("p",{className:"text-lg leading-relaxed mb-6 text-gray-900",children:"Have questions, suggestions, or want to register as an organization to post events? We'd love to hear from you!"}),O.jsxs("div",{className:"space-y-4",children:[O.jsxs("div",{className:"flex items-start gap-3",children:[O.jsx("span",{className:"text-green-700 font-semibold text-lg",children:"ð§"}),O.jsxs("div",{children:[O.jsx("p",{className:"font-semibold text-gray-900",children:"Email"}),O.jsx("a",{href:"mailto:[email protected]",className:"text-blue-600 hover:underline",children:"[email protected]"})]})]}),O.jsxs("div",{className:"flex items-start gap-3",children:[O.jsx("span",{className:"text-green-700 font-semibold text-lg",children:"ð"}),O.jsxs("div",{children:[O.jsx("p",{className:"font-semibold text-gray-900",children:"Social Media"}),O.jsx("div",{className:"flex gap-4 mt-2",children:O.jsx("a",{href:"https://www.instagram.com/ourpatch.social/",className:"text-blue-600 hover:underline",children:"Instagram"})})]})]})]})]})]})]}),O.jsx("div",{className:"py-12 bg-green-100/50 mt-12",children:O.jsxs("div",{className:"px-4 max-w-7xl mx-auto",children:[O.jsx("h2",{className:"text-3xl font-bold mb-6 text-gray-900",children:"Newsletters"}),O.jsx("p",{className:"text-lg text-gray-700 mb-6",children:"See what your community has been up to!"}),O.jsx("div",{className:"overflow-x-auto pb-4 -mx-4 px-4 no-scrollbar",children:O.jsx("div",{className:"inline-block min-w-full",children:O.jsx(oZ,{})})})]})})]})}const uZ=()=>{const{slug:n}=ov(),[t,i]=de.useState(null),[a,h]=de.useState(!0),[m,g]=de.useState(null);return de.useEffect(()=>{async function s(){const{data:Y,error:E}=await sZ(n);E?(console.error("Error fetching article:",E),g(E)):i(Y),h(!1)}s()},[n]),a?O.jsx("p",{className:"text-center text-gray-500 mt-10",children:"Loading..."}):m?O.jsxs("p",{className:"text-center text-red-500 mt-10",children:["Error: ",m]}):t?O.jsxs("div",{className:"prose lg:prose-xl max-w-4xl mx-auto px-4 py-10 text-gray-800",children:[O.jsx("h1",{className:"text-4xl font-bold mb-4",children:t.article_title}),O.jsxs("div",{className:"text-gray-500 mb-6",children:[O.jsxs("span",{className:"font-medium",children:["By: ",t.organization]})," |"," ",O.jsxs("span",{children:["Topics: ",t.topic]})," |"," ",O.jsxs("span",{children:["Published: ",new Date(t.created_at).toLocaleDateString()]})]}),O.jsx("div",{className:"mt-6",children:O.jsx("p",{children:t.content})})]}):O.jsx("p",{className:"text-center mt-10",children:"Article not found."})};function cZ(){var a;const{session:n}=Ul(),t=h=>{console.log("Event created successfully:",h)},i=()=>{console.log("Form cancelled")};return O.jsx(YC,{userId:(a=n==null?void 0:n.user)==null?void 0:a.id,session:n,onSuccess:t,onCancel:i})}const hZ=nk([{path:"/",element:O.jsx(TR,{}),children:[{path:"/",element:O.jsx(A3,{})},{path:"/dashboard",element:O.jsx(K6,{})},{path:"/events",element:O.jsx(P6,{})},{path:"/all-events",element:O.jsx(GM,{})},{path:"/event/:slug",element:O.jsx(iZ,{})},{path:"/org/:slug/events",element:O.jsx(GM,{})},{path:"/organizations",element:O.jsx(tZ,{})},{path:"/org/:slug",element:O.jsx(eZ,{})},{path:"/u/:slug",element:O.jsx(rZ,{})},{path:"/resources",element:O.jsx(nZ,{})},{path:"/news",element:O.jsx(lZ,{})},{path:"/article/:slug",element:O.jsx(uZ,{})},{path:"/testform",element:O.jsx(cZ,{})}]},{path:"/signup",element:O.jsx(I6,{})},{path:"/signin",element:O.jsx(U6,{})}]);sV.createRoot(document.getElementById("root")).render(O.jsx(de.StrictMode,{children:O.jsx(O.Fragment,{children:O.jsx(bR,{children:O.jsx(mk,{router:hZ})})})}));export{Aa as g};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.