/*! For license information please see 562.1729519854554.js.LICENSE.txt */ (self.webpackChunkdataneo=self.webpackChunkdataneo||[]).push([[562],{dIZR:(e,t,r)=>{"use strict";r.d(t,{L:()=>ji});var n={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},o=console,i={};Object.keys(n).forEach((function(e){i[e]=o[e]}));var a="Datadog Browser SDK:",s={debug:i.debug.bind(o,a),log:i.log.bind(o,a),info:i.info.bind(o,a),warn:i.warn.bind(o,a),error:i.error.bind(o,a)};function l(e,t){return function(){for(var r=[],n=0;n=0;return r||t.push(e),r}}}()),void 0===t)return e;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var n=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,n)}if(!r.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var o=Array.isArray(e)?e:[],i=0;i"}finally{n(),o(),i(),a()}}function z(e){var t=e,r=t.toJSON;return r?(delete t.toJSON,function(){t.toJSON=r}):P}function B(e,t){var r;void 0===t&&(t=225280);var n=z(Object.prototype),o=z(Array.prototype),i=[],a=new WeakMap,s=j(e,"$",void 0,i,a),l=(null===(r=JSON.stringify(s))||void 0===r?void 0:r.length)||0;if(!(l>t)){for(;i.length>0&&lt){U(t,"truncated",e);break}c.target[d]=f}else for(var d in c.source)if(Object.prototype.hasOwnProperty.call(c.source,d)){var f;if(void 0!==(f=j(c.source[d],c.path,d,i,a))&&(l+=JSON.stringify(f).length+u+d.length+3,u=1),l>t){U(t,"truncated",e);break}c.target[d]=f}}return n(),o(),s}U(t,"discarded",e)}function j(e,t,r,n,o){var i,a=function(e){var t=e;if(t&&"function"==typeof t.toJSON)try{return t.toJSON()}catch(e){}return e}(e);if(!a||"object"!=typeof a)return"bigint"==typeof(i=a)?"[BigInt] ".concat(i.toString()):"function"==typeof i?"[Function] ".concat(i.name||"unknown"):"symbol"==typeof i?"[Symbol] ".concat(i.description||i.toString()):i;var s=function(e){try{if(e instanceof Event)return{isTrusted:e.isTrusted};var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return"[".concat(t[1],"]")}catch(e){}return"[Unserializable]"}(a);if("[Object]"!==s&&"[Array]"!==s&&"[Error]"!==s)return s;var l=e;if(o.has(l))return"[Reference seen at ".concat(o.get(l),"]");var c=void 0!==r?"".concat(t,".").concat(r):t,u=Array.isArray(a)?[]:{};return o.set(l,c),n.push({source:a,target:u,path:c}),u}function U(e,t,r){s.warn("The data provided has been ".concat(t," as it is over the limit of ").concat(e," characters:"),r)}var $,V=function(){function e(e){this.onFirstSubscribe=e,this.observers=[]}return e.prototype.subscribe=function(e){var t=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(e),{unsubscribe:function(){t.observers=t.observers.filter((function(t){return e!==t})),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},e.prototype.notify=function(e){this.observers.forEach((function(t){return t(e)}))},e}();function G(){for(var e=[],t=0;t3072&&(s.warn("The ".concat(H[t]," data exceeds the recommended ").concat(3,"KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-3kib-warning")),!0)}function q(e,t){void 0===t&&(t=C);var r,n={},o=!1,i=new V,a=R((function(n){r=t(F(n)),o||(o=W(r,e))}),200).throttled,s={getBytesCount:function(){return r},get:function(){return n},add:function(e,t){n[e]=t,a(n),i.notify()},remove:function(e){delete n[e],a(n),i.notify()},set:function(e){a(n=e),i.notify()},getContext:function(){return D(n)},setContext:function(e){"object"===O(e)?(n=B(e),a(n)):s.clearContext(),i.notify()},setContextProperty:function(e,t){n[e]=B(t),a(n),i.notify()},removeContextProperty:function(e){delete n[e],a(n),i.notify()},clearContext:function(){n={},r=0,i.notify()},changeObservable:i};return s}var X=function(){function e(){this.buffer=[]}return e.prototype.add=function(e){this.buffer.push(e)>500&&this.buffer.splice(0,1)},e.prototype.drain=function(){this.buffer.forEach((function(e){return e()})),this.buffer.length=0},e}();function Z(e){return 0!==e&&100*Math.random()<=e}function Y(e,t){return+e.toFixed(t)}function K(e){return J(e)&&e>=0&&e<=100}function J(e){return"number"==typeof e}var Q,ee,te=1e3,re=6e4;function ne(e){return{relative:e,timeStamp:(t=e,r=ie()-performance.now(),r>pe()?Math.round(de(r,t)):function(e){return Math.round(de(pe(),e))}(t))};var t,r}function oe(e){return J(e)?Y(1e6*e,0):e}function ie(){return(new Date).getTime()}function ae(){return ie()}function se(){return performance.now()}function le(){return{relative:se(),timeStamp:ae()}}function ce(){return{relative:0,timeStamp:pe()}}function ue(e,t){return t-e}function de(e,t){return e+t}function fe(e){return e-pe()}function pe(){return void 0===Q&&(Q=performance.timing.navigationStart),Q}function he(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,he)}function me(e,t){var r=new RegExp("(?:^|;)\\s*".concat(t,"\\s*=\\s*([^;]+)")).exec(e);return r?r[1]:void 0}function ge(e,t,r){void 0===r&&(r="");var n=e.charCodeAt(t-1),o=n>=55296&&n<=56319?t+1:t;return e.length<=o?e:"".concat(e.slice(0,o)).concat(r)}function ye(e,t,r,n){var o=new Date;o.setTime(o.getTime()+r);var i="expires=".concat(o.toUTCString()),a=n&&n.crossSite?"none":"strict",s=n&&n.domain?";domain=".concat(n.domain):"",l=n&&n.secure?";secure":"";document.cookie="".concat(e,"=").concat(t,";").concat(i,";path=/;samesite=").concat(a).concat(s).concat(l)}function ve(e){return me(document.cookie,e)}function be(e,t){ye(e,"",0,t)}function _e(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||ve("datadog-synthetics-injects-rum"))}function xe(){var e=A().DatadogEventBridge;if(e)return{getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,r){e.send(JSON.stringify({eventType:t,event:r}))}}}function we(e){var t;void 0===e&&(e=null===(t=A().location)||void 0===t?void 0:t.hostname);var r=xe();return!!r&&r.getAllowedWebViewHosts().some((function(t){return e===t||(r=e,n=".".concat(t),r.slice(-n.length)===n);var r,n}))}function Ae(e,t,r,n,o){return Se(0,t,[r],n,o)}function Se(e,t,r,n,o){var i=void 0===o?{}:o,a=i.once,s=i.capture,l=i.passive,c=f(a?function(e){p(),n(e)}:n),u=l?{capture:s,passive:l}:s,d=E(t,"addEventListener");function p(){var e=E(t,"removeEventListener");r.forEach((function(r){return e.call(t,r,c,u)}))}return r.forEach((function(e){return d.call(t,e,c,u)})),{stop:p}}var Ce=[];function Ee(e,t,r,n){void 0===n&&(n=C);var o=function(e,t){return"".concat("_dd_c","_").concat(e,"_").concat(t)}(t,r),i=q(r,n);return a(),Ce.push(Ae(0,window,"storage",(function(e){var t=e.key;o===t&&a()}))),i.changeObservable.subscribe((function(){localStorage.setItem(o,JSON.stringify(i.getContext()))})),i;function a(){var e=localStorage.getItem(o),t=null!==e?JSON.parse(e):{};i.setContext(t)}}var Te="?";function Ie(e){var t=[],r=Fe(e,"stack"),n=String(e);return r&&_(r,n)&&(r=r.slice(n.length)),r&&r.split("\n").forEach((function(e){var r=function(e){var t=Re.exec(e);if(t){var r=t[2]&&0===t[2].indexOf("native"),n=t[2]&&0===t[2].indexOf("eval"),o=Pe.exec(t[2]);return n&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{args:r?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Te,line:t[3]?+t[3]:void 0,url:r?void 0:t[2]}}}(e)||function(e){var t=Oe.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:Te,line:t[2]?+t[2]:void 0,url:t[1]}}(e)||function(e){var t=Le.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Te,line:+t[3],url:t[2]}}(e)||function(e){var t=De.exec(e);if(t){var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Ne.exec(t[3]);return r&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||Te,line:t[4]?+t[4]:void 0,url:t[3]}}}(e);r&&(!r.func&&r.line&&(r.func=Te),t.push(r))})),{message:Fe(e,"message"),name:Fe(e,"name"),stack:t}}var ke="((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet||\\w+\\.|\\/).*?)",Me="(?::(\\d+))",Re=new RegExp("^\\s*at (.*?) ?\\(".concat(ke).concat(Me,"?").concat(Me,"?\\)?\\s*$"),"i"),Pe=new RegExp("\\((\\S*)".concat(Me).concat(Me,"\\)")),Oe=new RegExp("^\\s*at ?".concat(ke).concat(Me,"?").concat(Me,"??\\s*$"),"i"),Le=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,De=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Ne=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Fe(e,t){if("object"==typeof e&&e&&t in e){var r=e[t];return"string"==typeof r?r:void 0}}var ze,Be="No stack, consider using an instance of Error";function je(e){var t=e.stackTrace,r=e.originalError,n=e.handlingStack,o=e.startClocks,i=e.nonErrorPrefix,a=e.source,s=e.handling,l=r instanceof Error,c=function(e,t,r,n){return(null==e?void 0:e.message)&&(null==e?void 0:e.name)?e.message:t?"Empty message":"".concat(r," ").concat(F(B(n)))}(t,l,i,r),u=function(e,t){return void 0!==t&&(!!e||t.stack.length>0&&(t.stack.length>1||void 0!==t.stack[0].url))}(l,t)?$e(t):Be,d=l?function(e,t){for(var r=e,n=[];(null==r?void 0:r.cause)instanceof Error&&n.length<10;){var o=Ie(r.cause);n.push({message:r.cause.message,source:t,type:null==o?void 0:o.name,stack:o&&$e(o)}),r=r.cause}return n.length?n:void 0}(r,a):void 0;return{startClocks:o,source:a,handling:s,handlingStack:n,originalError:r,type:null==t?void 0:t.name,message:c,stack:u,causes:d,fingerprint:Ue(r)}}function Ue(e){return e instanceof Error&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function $e(e){var t=Ve(e);return e.stack.forEach((function(e){var r="?"===e.func?"":e.func,n=e.args&&e.args.length>0?"(".concat(e.args.join(", "),")"):"",o=e.line?":".concat(e.line):"",i=e.line&&e.column?":".concat(e.column):"";t+="\n at ".concat(r).concat(n," @ ").concat(e.url).concat(o).concat(i)})),t}function Ve(e){return"".concat(e.name||"Error",": ").concat(e.message)}function Ge(){var e,t=new Error;if(!t.stack)try{throw t}catch(e){}return p((function(){var r=Ie(t);r.stack=r.stack.slice(2),e=$e(r)})),e}function He(e){var t=w({},e);return["id","name","email"].forEach((function(e){e in t&&(t[e]=String(t[e]))})),t}!function(e){e.PAGEHIDE="pagehide",e.FEATURE_FLAGS="feature_flags",e.RESOURCE_PAGE_STATES="resource_page_states",e.PAGE_STATES="page_states",e.COLLECT_FLUSH_REASON="collect_flush_reason",e.NO_RESOURCE_DURATION_FROZEN_STATE="no_resource_duration_frozen_state",e.SCROLLMAP="scrollmap",e.INTERACTION_TO_NEXT_PAINT="interaction_to_next_paint",e.WEB_VITALS_ATTRIBUTION="web_vitals_attribution",e.DISABLE_REPLAY_INLINE_CSS="disable_replay_inline_css"}(ze||(ze={}));var We=new Set;function qe(e){return We.has(e)}function Xe(e){return w({},e)}function Ze(e,t){return Object.keys(e).some((function(r){return e[r]===t}))}function Ye(e){return 0===Object.keys(e).length}var Ke,Je,Qe,et=144e5,tt=9e5,rt="_dd_s",nt=/^([a-z]+)=([a-z0-9-]+)$/;function ot(e){return Ye(e)}function it(e){e.expire=String(ie()+tt)}function at(e){return b(e).map((function(e){var t=e[0],r=e[1];return"".concat(t,"=").concat(r)})).join("&")}function st(e){var t={};return function(e){return!!e&&(-1!==e.indexOf("&")||nt.test(e))}(e)&&e.split("&").forEach((function(e){var r=nt.exec(e);if(null!==r){var n=r[1],o=r[2];t[n]=o}})),t}function lt(){return st(ve(rt))}function ct(e){return function(){be(rt,e)}}function ut(e){localStorage.setItem(rt,at(e))}function dt(){return st(localStorage.getItem(rt))}function ft(){localStorage.removeItem(rt)}var pt,ht=[];function mt(e,t,r){var n;void 0===r&&(r=0);var o=t.isLockEnabled,i=t.retrieveSession,a=t.persistSession,s=t.clearSession;if(pt||(pt=e),e===pt)if(o&&r>=100)yt(t);else{var l,c=i();if(o){if(c.lock)return void gt(e,t,r);if(l=he(),c.lock=l,a(c),(c=i()).lock!==l)return void gt(e,t,r)}var u=e.process(c);if(o&&(c=i()).lock!==l)gt(e,t,r);else{if(u&&(ot(u)?s():(it(u),a(u))),o&&(!u||!ot(u))){if((c=i()).lock!==l)return void gt(e,t,r);delete c.lock,a(c),u=c}null===(n=e.after)||void 0===n||n.call(e,u||c),yt(t)}}else ht.push(e)}function gt(e,t,r){T((function(){mt(e,t,r+1)}),10)}function yt(e){pt=void 0;var t=ht.shift();t&&mt(t,e)}var vt=te;function bt(e){var t=function(e){var t=function(e){var t={};return t.secure=!!e.useSecureSessionCookie||!!e.useCrossSiteSessionCookie,t.crossSite=!!e.useCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=function(){if(void 0===ee){for(var e="dd_site_test_".concat(he()),t=window.location.hostname.split("."),r=t.pop();t.length&&!ve(e);)r="".concat(t.pop(),".").concat(r),ye(e,"test",te,{domain:r});be(e,{domain:r}),ee=r}return ee}()),t}(e);return function(e){if(void 0===document.cookie||null===document.cookie)return!1;try{var t="dd_cookie_test_".concat(he()),r="test";ye(t,r,re,e);var n=ve(t)===r;return be(t,e),n}catch(e){return s.error(e),!1}}(t)?{type:"Cookie",cookieOptions:t}:void 0}(e);return!t&&e.allowFallbackToLocalStorage&&(t=function(){try{var e=he(),t="".concat("_dd_test_").concat(e);localStorage.setItem(t,e);var r=localStorage.getItem(t);return localStorage.removeItem(t),e===r?{type:"LocalStorage"}:void 0}catch(e){return}}()),t}function _t(e,t,r){var n,o,i,a,s=new V,l=new V,c="Cookie"===e.type?(o=e.cookieOptions,a={isLockEnabled:null!=Je?Je:Je=!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent),persistSession:(i=o,function(e){ye(rt,at(e),tt,i)}),retrieveSession:lt,clearSession:ct(o)},function(e){if(!ve(rt)){var t=ve("_dd"),r=ve("_dd_r"),n=ve("_dd_l"),o={};t&&(o.id=t),n&&/^[01]$/.test(n)&&(o.logs=n),r&&/^[012]$/.test(r)&&(o.rum=r),ot(o)||(it(o),e.persistSession(o))}}(a),a):{isLockEnabled:!1,persistSession:ut,retrieveSession:dt,clearSession:ft},u=c.clearSession,d=c.retrieveSession,f=k((function(){mt({process:function(e){return g(e)?void 0:{}},after:h},c)}),vt),p=g(n=d())?n:{};function h(e){return g(e)||(e={}),m()&&(function(e){return p.id!==e.id||p[t]!==e[t]}(e)?(p={},l.notify()):p=e),e}function m(){return void 0!==p[t]}function g(e){return(void 0===e.created||ie()-Number(e.created)r||Pt.test(t))&&s.warn("".concat(e," value doesn't meet tag requirements and will be sanitized"));var n=t.replace(/,/g,"_");return"".concat(e,":").concat(n)}var Lt={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function Dt(e){var t,r,n;if(e&&e.clientToken){var o=null!==(t=e.sessionSampleRate)&&void 0!==t?t:e.sampleRate;if(void 0===o||K(o))if(void 0===e.telemetrySampleRate||K(e.telemetrySampleRate)){if(void 0===e.telemetryConfigurationSampleRate||K(e.telemetryConfigurationSampleRate))return Array.isArray(e.enableExperimentalFeatures)&&e.enableExperimentalFeatures.filter((function(e){return Ze(ze,e)})).forEach((function(e){We.add(e)})),w({beforeSend:e.beforeSend&&l(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:bt(e),sessionSampleRate:null!=o?o:100,telemetrySampleRate:null!==(r=e.telemetrySampleRate)&&void 0!==r?r:20,telemetryConfigurationSampleRate:null!==(n=e.telemetryConfigurationSampleRate)&&void 0!==n?n:5,service:e.service,silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144},function(e){var t=function(e){var t=e.env,r=e.service,n=e.version,o=e.datacenter,i=[];return t&&i.push(Ot("env",t)),r&&i.push(Ot("service",r)),n&&i.push(Ot("version",n)),o&&i.push(Ot("datacenter",o)),i}(e),r=function(e,t){return{logsEndpointBuilder:Rt(e,"logs",t),rumEndpointBuilder:Rt(e,"rum",t),sessionReplayEndpointBuilder:Rt(e,"sessionReplay",t)}}(e,t),n=v(r).map((function(e){return e.urlPrefix})),o=function(e,t,r){if(e.replica){var n=w({},e,{site:It,clientToken:e.replica.clientToken}),o={logsEndpointBuilder:Rt(n,"logs",r),rumEndpointBuilder:Rt(n,"rum",r)};return t.push.apply(t,v(o).map((function(e){return e.urlPrefix}))),w({applicationId:e.replica.applicationId},o)}}(e,n,t);return w({isIntakeUrl:function(e){return n.some((function(t){return 0===e.indexOf(t)}))},replica:o,site:e.site||It},r)}(e));s.error("Telemetry Configuration Sample Rate should be a number between 0 and 100")}else s.error("Telemetry Sample Rate should be a number between 0 and 100");else s.error("Session Sample Rate should be a number between 0 and 100")}else s.error("Client Token is not configured, we will not send any data.")}function Nt(e){var t=O(e);return"string"===t||"function"===t||e instanceof RegExp}function Ft(e,t,r){return void 0===r&&(r=!1),e.some((function(e){try{if("function"==typeof e)return e(t);if(e instanceof RegExp)return e.test(t);if("string"==typeof e)return r?_(t,e):e===t}catch(e){s.error(e)}return!1}))}function zt(e){0!==e.status||e.isAborted||(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function Bt(e,t,r,n){if(void 0!==jt()&&r.findTrackedSession()){var o,i,a,s,l,c=y(e.allowedTracingUrls,(function(e){return Ft([e.match],t.url,!0)}));c&&(t.traceId=new Ut,t.spanId=new Ut,t.traceSampled=!J(e.traceSampleRate)||Z(e.traceSampleRate),n((o=t.traceId,i=t.spanId,a=t.traceSampled,s=c.propagatorTypes,l={},s.forEach((function(e){switch(e){case"datadog":w(l,{"x-datadog-origin":"rum","x-datadog-parent-id":i.toDecimalString(),"x-datadog-sampling-priority":a?"1":"0","x-datadog-trace-id":o.toDecimalString()});break;case"tracecontext":w(l,{traceparent:"00-0000000000000000".concat(o.toPaddedHexadecimalString(),"-").concat(i.toPaddedHexadecimalString(),"-0").concat(a?"1":"0")});break;case"b3":w(l,{b3:"".concat(o.toPaddedHexadecimalString(),"-").concat(i.toPaddedHexadecimalString(),"-").concat(a?"1":"0")});break;case"b3multi":w(l,{"X-B3-TraceId":o.toPaddedHexadecimalString(),"X-B3-SpanId":i.toPaddedHexadecimalString(),"X-B3-Sampled":a?"1":"0"})}})),l)))}}function jt(){return window.crypto||window.msCrypto}var Ut=function(){function e(){this.buffer=new Uint8Array(8),jt().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}return e.prototype.toString=function(e){var t=this.readInt32(0),r=this.readInt32(4),n="";do{var o=t%e*4294967296+r;t=Math.floor(t/e),r=Math.floor(o/e),n=(o%e).toString(e)+n}while(t||r);return n},e.prototype.toDecimalString=function(){return this.toString(10)},e.prototype.toPaddedHexadecimalString=function(){var e=this.toString(16);return Array(17-e.length).join("0")+e},e.prototype.readInt32=function(e){return 16777216*this.buffer[e]+(this.buffer[e+1]<<16)+(this.buffer[e+2]<<8)+this.buffer[e+3]},e}();function $t(e){var t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach((function(e){Nt(e)?t.add("datadog"):"object"===O(e)&&Array.isArray(e.propagatorTypes)&&e.propagatorTypes.forEach((function(e){return t.add(e)}))})),Array.isArray(e.allowedTracingOrigins)&&e.allowedTracingOrigins.length>0&&t.add("datadog"),g(t)}function Vt(e,t,r){return{context:e.getContext(),user:t.getContext(),hasReplay:!!r.isRecording()||void 0}}function Gt(e,t){var r=window.__ddBrowserSdkExtensionCallback;r&&r({type:e,payload:t})}var Ht,Wt="configuration",qt=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost",""],Xt=["ddog-gov.com"],Zt={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1};function Yt(e,t){h(n.debug,e,t),Jt(w({type:"log",message:e,status:"debug"},t))}function Kt(e,t){Jt(w({type:"log",status:"error"},function(e){if(e instanceof Error){var t=Ie(e);return{error:{kind:t.name,stack:$e(Qt(t))},message:t.message}}return{error:{stack:Be},message:"".concat("Uncaught"," ").concat(F(e))}}(e),t))}function Jt(e){Ht&&Zt.sentEventCounte[r])return!1;return!0}function lr(e){var t=cr(e);if(t){var r=t.startTime,n=t.fetchStart,o=t.redirectStart,i=t.redirectEnd,a=t.domainLookupStart,s=t.domainLookupEnd,l=t.connectStart,c=t.secureConnectionStart,u=t.connectEnd,d=t.requestStart,f=t.responseStart,p={download:dr(r,f,t.responseEnd),first_byte:dr(r,d,f)};return u!==n&&(p.connect=dr(r,l,u),sr(l,c,u)&&(p.ssl=dr(r,c,u))),s!==n&&(p.dns=dr(r,a,s)),ur(e)&&(p.redirect=dr(r,o,i)),p}}function cr(e){if(sr(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd)){if(!ur(e))return e;var t=e.redirectStart,r=e.redirectEnd;if(t=0;t-=1){var r,n=e.body.childNodes[t];if(r=wr(n))return r;if(!hr(n))break}}(e);if(t)return xr(me(t,"trace-id"),me(t,"trace-time"))}(e);if(t&&!(t.traceTime<=ie()-12e4))return t.traceId}function xr(e,t){var r=t&&Number(t);if(e&&r)return{traceId:e,traceTime:r}}function wr(e){if(e&&function(e){return e.nodeType===Node.COMMENT_NODE}(e)){var t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Ar(){return void 0!==window.performance&&"getEntries"in performance}function Sr(e){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(e)}function Cr(e,t){if(n=function(r){Tr(e,t,[r])},nr(0,"interactive",(function(){var e,t={entryType:or.RESOURCE,initiatorType:ir,traceId:_r(document),toJSON:function(){return w({},e,{toJSON:void 0})}};if(Sr(or.NAVIGATION)&&performance.getEntriesByType(or.NAVIGATION).length>0){var r=performance.getEntriesByType(or.NAVIGATION)[0];e=w(r.toJSON(),t)}else{var o=Er();e=w(o,{decodedBodySize:0,duration:o.responseEnd,name:window.location.href,startTime:0},t)}n(e)})),Ar()){var r=performance.getEntries();T((function(){return Tr(e,t,r)}))}var n;if(window.PerformanceObserver){var o=f((function(r){return Tr(e,t,r.getEntries())})),i=[or.RESOURCE,or.NAVIGATION,or.LONG_TASK,or.PAINT],a=[or.LARGEST_CONTENTFUL_PAINT,or.FIRST_INPUT,or.LAYOUT_SHIFT,or.EVENT];try{a.forEach((function(e){new window.PerformanceObserver(o).observe({type:e,buffered:!0,durationThreshold:40})}))}catch(e){i.push.apply(i,a)}new PerformanceObserver(o).observe({entryTypes:i}),Ar()&&"addEventListener"in performance&&Ae(0,performance,"resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}Sr(or.NAVIGATION)||function(e,t){function r(){t(w(Er(),{entryType:or.NAVIGATION}))}nr(0,"complete",(function(){T(r)}))}(0,(function(r){Tr(e,t,[r])})),Sr(or.FIRST_INPUT)||function(e,t){var r=ie(),n=!1,o=Se(0,window,["click","mousedown","keydown","touchstart","pointerdown"],(function(e){if(e.cancelable){var t={entryType:or.FIRST_INPUT,processingStart:se(),processingEnd:se(),startTime:e.timeStamp,duration:0,name:""};"pointerdown"===e.type?function(e,t){Se(0,window,["pointerup","pointercancel"],(function(e){"pointerup"===e.type&&i(t)}),{once:!0})}(0,t):i(t)}}),{passive:!0,capture:!0}).stop;function i(e){if(!n){n=!0,o();var i=e.processingStart-e.startTime;i>=0&&i=0&&r.entries.splice(e,1)},close:function(e){n.endTime=e}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(n),n},e.prototype.find=function(e){void 0===e&&(e=Br);for(var t=0,r=this.entries;t0&&this.entries[this.entries.length-1].endTimer.bytesLimit}t()}!function e(){n.read().then(f((function(t){t.done?a():(r.collectStreamBody&&o.push(t.value),(i+=t.value.length)>r.bytesLimit?a():e())})),f((function(e){return t()})))}()}(r.body,(function(){t(ue(e.startClocks.timeStamp,ae()))}),{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1}):t(ue(e.startClocks.timeStamp,ae()))}(o,(function(t){r.clearTracingIfNeeded(o),e.notify(6,{duration:t,method:o.method,requestIndex:o.requestIndex,responseType:o.responseType,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:"fetch",url:o.url,response:o.response,init:o.init,input:o.input})}))}}))}(e,t,n)}function tn(){var e=Qr;return Qr+=1,e}function rn(e){var t=e.lifeCycle,r=e.isChildEvent,n=e.onChange,o=void 0===n?P:n,i={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},a=t.subscribe(11,(function(e){var t;if("view"!==e.type&&r(e))switch(e.type){case"error":i.errorCount+=1,o();break;case"action":i.actionCount+=1,e.action.frustration&&(i.frustrationCount+=e.action.frustration.type.length),o();break;case"long_task":i.longTaskCount+=1,o();break;case"resource":(null===(t=e._dd)||void 0===t?void 0:t.discarded)||(i.resourceCount+=1,o())}}));return{stop:function(){a.unsubscribe()},eventCounts:i}}function nn(e,t,r,n,o){var i=function(e,t,r){var n=new V((function(){var o,i=[],a=0;i.push(t.subscribe(c),e.subscribe(0,(function(e){e.some((function(e){return e.entryType===or.RESOURCE&&!on(r,e.name)}))&&c()})),e.subscribe(5,(function(e){on(r,e.url)||(void 0===o&&(o=e.requestIndex),a+=1,c())})),e.subscribe(6,(function(e){on(r,e.url)||void 0===o||e.requestIndex0})}}));return n}(e,t,r);return function(e,t,r){var n,o=!1,i=T(f((function(){return c({hadActivity:!1})})),100),a=void 0!==r?T(f((function(){return c({hadActivity:!0,end:ae()})})),r):void 0,s=e.subscribe((function(e){var t=e.isBusy;I(i),I(n);var r=ae();t||(n=T(f((function(){return c({hadActivity:!0,end:r})})),100))})),l=function(){o=!0,I(i),I(n),I(a),s.unsubscribe()};function c(e){o||(l(),t(e))}return{stop:l}}(i,n,o)}function on(e,t){return Ft(e.excludedActivityUrls,t)}var an="data-dd-action-name";function sn(e,t){var r;if(void 0===cn&&(cn="closest"in HTMLElement.prototype),cn)r=e.closest("[".concat(t,"]"));else for(var n=e;n;){if(n.hasAttribute(t)){r=n;break}n=n.parentElement}if(r)return mn(hn(r.getAttribute(t).trim()))}var ln,cn,un=[function(e,t){if(void 0===ln&&(ln="labels"in HTMLInputElement.prototype),ln){if("labels"in e&&e.labels&&e.labels.length>0)return gn(e.labels[0],t)}else if(e.id){var r=e.ownerDocument&&y(e.ownerDocument.querySelectorAll("label"),(function(t){return t.htmlFor===e.id}));return r&&gn(r,t)}},function(e){if("INPUT"===e.nodeName){var t=e,r=t.getAttribute("type");if("button"===r||"submit"===r||"reset"===r)return t.value}},function(e,t){if("BUTTON"===e.nodeName||"LABEL"===e.nodeName||"button"===e.getAttribute("role"))return gn(e,t)},function(e){return e.getAttribute("aria-label")},function(e,t){var r=e.getAttribute("aria-labelledby");if(r)return r.split(/\s+/).map((function(t){return function(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}(e,t)})).filter((function(e){return Boolean(e)})).map((function(e){return gn(e,t)})).join(" ")},function(e){return e.getAttribute("alt")},function(e){return e.getAttribute("name")},function(e){return e.getAttribute("title")},function(e){return e.getAttribute("placeholder")},function(e,t){if("options"in e&&e.options.length>0)return gn(e.options[0],t)}],dn=[function(e,t){return gn(e,t)}],fn=10;function pn(e,t,r){for(var n=e,o=0;o<=fn&&n&&"BODY"!==n.nodeName&&"HTML"!==n.nodeName&&"HEAD"!==n.nodeName;){for(var i=0,a=r;i100?"".concat(ge(e,100)," [...]"):e}function gn(e,t){if(!e.isContentEditable){if("innerText"in e){var r=e.innerText,n=function(t){for(var n=e.querySelectorAll(t),o=0;o0&&(r=r.replace(a,""))}}};return(null!=Ke?Ke:Ke=Boolean(document.documentMode))&&n("script, style"),n("[".concat(an,"]")),t&&n("[".concat(t,"]")),r}return e.textContent}}var yn,vn=[an,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],bn=[An,function(e){if(e.id&&!wn(e.id))return"#".concat(x(e.id))}],_n=[An,function(e){if("BODY"!==e.tagName&&e.classList.length>0)for(var t=0;t").concat(t):e}var kn=te;function Mn(){var e=window.getSelection();return!e||e.isCollapsed}function Rn(e){return e.target instanceof Element&&!1!==e.isPrimary}var Pn='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function On(e){return!e.hasPageActivity&&!e.getUserActivity().input&&(t=e.event.target,r=Pn,!(t.matches?t.matches(r):t.msMatchesSelector&&t.msMatchesSelector(r)));var t,r}function Ln(e,t,r){var n,o=new jr(3e5),i=new V;e.subscribe(8,(function(){o.reset()})),e.subscribe(4,l);var a=function(e,t){var r,n,o=t.onPointerDown,i=t.onPointerUp,a={selection:!1,input:!1},s=[Ae(0,window,"pointerdown",(function(e){Rn(e)&&(r=Mn(),a={selection:!1,input:!1},n=o(e))}),{capture:!0}),Ae(0,window,"selectionchange",(function(){r&&Mn()||(a.selection=!0)}),{capture:!0}),Ae(0,window,"pointerup",(function(e){if(Rn(e)&&n){var t=a;i(n,e,(function(){return t})),n=void 0}}),{capture:!0}),Ae(0,window,"input",(function(){a.input=!0}),{capture:!0})];return{stop:function(){s.forEach((function(e){return e.stop()}))}}}(0,{onPointerDown:function(n){return function(e,t,r,n,o){if(e.trackFrustrations||!n.find()){var i,a,s,l,c,u=(s=o,l=e.actionNameAttribute,c=s.target.getBoundingClientRect(),{type:"click",target:{width:Math.round(c.width),height:Math.round(c.height),selector:xn(s.target,l)},position:{x:Math.round(s.clientX-c.left),y:Math.round(s.clientY-c.top)},name:(i=s.target,a=l,sn(i,an)||a&&sn(i,a)||pn(i,a,un)||pn(i,a,dn)||"")});if(e.trackFrustrations||u.name){var d=!1;return nn(t,r,e,(function(e){d=e.hadActivity}),100),{clickActionBase:u,hadActivityOnPointerDown:function(){return d}}}}}(r,e,t,o,n)},onPointerUp:function(n,a,l){var c=n.clickActionBase,u=n.hadActivityOnPointerDown;return function(e,t,r,n,o,i,a,s,l,c){var u=Dn(t,n,l,a,s);e.trackFrustrations&&i(u);var d=nn(t,r,e,(function(t){t.hadActivity&&t.end0&&(t=n[n.length-1].event,r=e.event,!(t.target===r.target&&(a=t,l=r,Math.sqrt(Math.pow(a.clientX-l.clientX,2)+Math.pow(a.clientY-l.clientY,2))<=100)&&t.timeStamp-r.timeStamp<=kn))?(s(),!1):(i(e),!0));var t,r,a,l},stop:function(){s()}}}(e,(function(e){!function(e,t){var r=function(e,t){if(function(e){if(e.some((function(e){return e.getUserActivity().selection})))return!1;for(var t=0;t0},get hasPageActivity(){return void 0!==i},getUserActivity:r,addFrustration:function(e){d.push(e)},startClocks:s,isStopped:function(){return 1===u||2===u},clone:function(){return Dn(e,t,r,n,o)},validate:function(t){if(p(),1===u){var r=c.eventCounts,l=r.resourceCount,f=r.errorCount,h=r.longTaskCount,m=w({type:"click",duration:i&&ue(s.timeStamp,i),startClocks:s,id:a,frustrationTypes:d,counts:{resourceCount:l,errorCount:f,longTaskCount:h},events:null!=t?t:[o],event:o},n);e.notify(1,m),u=2}},discard:function(){p(),u=2}}}function Nn(e,t){var r=Fn(e)?{action:{id:e.id,loading_time:oe(e.duration),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position}}}:void 0;return{customerContext:Fn(e)?void 0:e.context,rawRumEvent:N({action:{id:he(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:"action",view:{in_foreground:t.isInActivePageStateAt(e.startClocks.relative)}},r),startTime:e.startClocks.relative,domainContext:Fn(e)?{event:e.event,events:e.events}:{}}}function Fn(e){return"custom"!==e.type}var zn=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;var Bn={};var jn,Un="csp_violation";function $n(e,t,r,n,o){return r?$e({name:e,message:t,stack:[{func:"?",url:r,line:null!=n?n:void 0,column:null!=o?o:void 0}]}):void 0}function Vn(e,t,r,i){var a=new V;return function(e){var t,r;(t=[n.error],r=t.map((function(e){return Bn[e]||(Bn[e]=function(e){var t=new V((function(){var r=o[e];return o[e]=function(){for(var o=[],i=0;i=n-1&&Gn(r)<=de(o,1);var r,n,o}));return 1===r.length?r[0]:void 0}}}(e),s=a?ne(a.startTime):e.startClocks,l=a?qn(a):void 0,c=function(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toDecimalString(),trace_id:e.traceId.toDecimalString(),rule_psr:Xn(t)}}}(e,t),u=Zn(r,s),d=function(e,t,r){var n;return qe(ze.NO_RESOURCE_DURATION_FROZEN_STATE)&&(null===(n=e.findAll(t.relative,r))||void 0===n?void 0:n.some((function(e){return"frozen"===e.state})))?void 0:oe(r)}(n,s,e.duration),f=Yn(n,s,null!==(o=null==a?void 0:a.duration)&&void 0!==o?o:e.duration),p=N({date:s.timeStamp,resource:{id:he(),type:i,duration:d,method:e.method,status_code:e.status,url:e.url},type:"resource"},c,l,u,f);return{startTime:s.relative,rawRumEvent:p,domainContext:{performanceEntry:a&&a,xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error}}}(o,t,r,n))})),e.subscribe(0,(function(o){for(var i=0,a=o;i=0?o.start:0,s=i?i.start:oe(t);r.push({start:a,duration:s-a})}}return r}function Jn(e,t,r,n){var o,i,a,s={},l=function(e){return{stop:e.subscribe(0,(function(e){for(var t=0,o=e;t=0&&i.responseStart<=se()?i.responseStart:void 0},r(a.loadEvent),s.navigationTimings=a,n())}var a})).unsubscribe}}(e).stop,c=(void 0===o&&(o=window),"hidden"===document.visibilityState?i=0:(i=1/0,a=Se(0,o,["pagehide","visibilitychange"],(function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||(i=e.timeStamp,a())}),{capture:!0}).stop),{get timeStamp(){return i},stop:function(){null==a||a()}}),u=function(e,t){return{stop:e.subscribe(0,(function(e){var r,o=y(e,(function(e){return e.entryType===or.PAINT&&"first-contentful-paint"===e.name&&e.startTime=0;t-=1){var n=e[t];if((o=n).entryType===or.LARGEST_CONTENTFUL_PAINT&&o.startTime=0?a:0,time:i.startTime,targetSelector:l},s.firstInput=o,n()}})).unsubscribe}}(e,t,c).stop;return{stop:function(){l(),u(),d(),f(),c.stop()},initialViewMetrics:s}}var Qn,eo=0,to=1/0,ro=0,no=function(){return jn?eo:window.performance.interactionCount||0};function oo(){var e,t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(e)}function io(){var e,t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(e)}function ao(e){return Qn||(t=new V((function(){var e=R((function(){t.notify(so())}),200).throttled;return Ae(0,window,"resize",e,{capture:!0,passive:!0}).stop})),Qn=t),Qn;var t}function so(){var e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}function lo(e,t,r,n,o,i){var a={},s=function(e,t,r,o,i){var s="initial_load"===o,l=!0,c=[];function u(){var e;!l&&!s&&c.length>0&&(e=Math.max.apply(Math,c),a.loadingTime=e,n())}return{stop:nn(e,t,r,(function(e){l&&(l=!1,e.hadActivity&&c.push(ue(i.timeStamp,e.end)),u())})).stop,setLoadEvent:function(e){s&&(s=!1,c.push(e),u())}}}(e,t,r,o,i),l=s.stop,c=s.setLoadEvent,u=function(e,t,r,n){void 0===n&&(n=function(e,t){void 0===t&&(t=1e3);var r=new V((function(){if(window.ResizeObserver){var e=R((function(){var e,t;r.notify((e=io(),t=so().height,{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}))}),t,{leading:!1,trailing:!0}),n=document.scrollingElement||document.documentElement,o=new ResizeObserver(f(e.throttled));o.observe(n);var i=Ae(0,window,"scroll",e.throttled,{passive:!0});return function(){e.cancel(),o.unobserve(n),i.stop()}}}));return r}());var o=0,i=0,a=0,s=n.subscribe((function(e){var n=e.scrollDepth,s=e.scrollTop,l=e.scrollHeight,c=!1;if(n>o&&(o=n,c=!0),l>i){i=l;var u=se();a=ue(t.relative,u),c=!0}c&&r({maxDepth:Math.min(o,i),maxDepthScrollTop:s,maxScrollHeight:i,maxScrollHeightTime:a})}));return{stop:function(){return s.unsubscribe()}}}(0,i,(function(e){a.scroll=e})).stop,d=function(e,t,r){if(!Sr(or.LAYOUT_SHIFT))return{stop:P};var n=0;r({value:0});var o=function(){var e,t,r,n,o=0,i=0;return{update:function(a){var s,l;void 0===e||a.startTime-t>=te||a.startTime-e>=5e3?(e=t=a.startTime,o=a.value,i=0,r=void 0):(o+=a.value,t=a.startTime),a.value>i&&(i=a.value,n=a.startTime,r=(null===(s=a.sources)||void 0===s?void 0:s.length)?null===(l=y(a.sources,(function(e){return!!e.node&&mr(e.node)})))||void 0===l?void 0:l.node:void 0)},value:function(){return o},largestLayoutShiftTarget:function(){return r},largestLayoutShiftTime:function(){return n}}}();return{stop:t.subscribe(0,(function(t){for(var i=0,a=t;in)){var l=Y(n=o.value(),4),c=o.largestLayoutShiftTarget(),u=void 0;qe(ze.WEB_VITALS_ATTRIBUTION)&&c&&(u=xn(c,e.actionNameAttribute)),r({value:l,targetSelector:u})}}})).unsubscribe}}(r,e,(function(e){a.cumulativeLayoutShift=e,n()})).stop,p=function(e,t,r,n){if(!(Sr(or.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&qe(ze.INTERACTION_TO_NEXT_PAINT)))return{getInteractionToNextPaint:function(){},stop:P};var o,i=function(e){"interactionCount"in performance||jn||(jn=new window.PerformanceObserver(f((function(e){e.getEntries().forEach((function(e){var t=e;t.interactionId&&(to=Math.min(to,t.interactionId),ro=Math.max(ro,t.interactionId),eo=(ro-to)/7+1)}))})))).observe({type:"event",buffered:!0,durationThreshold:0});var t="initial_load"===e?0:no();return{getViewInteractionCount:function(){return no()-t}}}(r).getViewInteractionCount,a=function(e){var t=[];function r(){t.sort((function(e,t){return t.duration-e.duration})).splice(10)}return{process:function(e){var n=t.findIndex((function(t){return e.interactionId===t.interactionId})),o=t[t.length-1];-1!==n?e.duration>t[n].duration&&(t[n]=e,r()):(t.length<10||e.duration>o.duration)&&(t.push(e),r())},estimateP98Interaction:function(){var r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}(i),s=-1,l=!1,c=n.subscribe(0,(function(r){for(var n,i=0,c=r;i6e5&&!l&&(l=!0,Yt("INP outlier",{inp:s,interaction:{timeFromViewStart:ue(t.relative,d.startTime),duration:d.duration,startTime:d.startTime,processingStart:d.processingStart,processingEnd:d.processingEnd,interactionId:d.interactionId,name:d.name,targetNodeName:null===(n=d.target)||void 0===n?void 0:n.nodeName}})),o=qe(ze.WEB_VITALS_ATTRIBUTION)&&d.target&&mr(d.target)?xn(d.target,e.actionNameAttribute):void 0)})).unsubscribe;return{getInteractionToNextPaint:function(){return s>=0?{value:s,targetSelector:o}:i()?{value:0}:void 0},stop:c}}(r,i,o,e),h=p.stop,m=p.getInteractionToNextPaint;return{stop:function(){l(),d(),u(),h()},setLoadEvent:c,getCommonViewMetrics:function(){return a.interactionToNextPaint=m(),a}}}function co(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}function uo(e,t,r,n,o,i,a,l,c){return e.subscribe(3,(function(r){return e.notify(10,function(e,t,r,n,o){var i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_=n.getReplayStats(e.id),x=r.findFeatureFlagEvaluations(e.startClocks.relative),w=qe(ze.PAGE_STATES),A=o.findAll(e.startClocks.relative,e.duration),S={_dd:{document_version:e.documentVersion,replay_stats:_,page_states:w?A:void 0},date:e.startClocks.timeStamp,type:"view",view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:null===(i=e.commonViewMetrics.cumulativeLayoutShift)||void 0===i?void 0:i.value,cumulative_layout_shift_target_selector:null===(a=e.commonViewMetrics.cumulativeLayoutShift)||void 0===a?void 0:a.targetSelector,first_byte:oe(null===(s=e.initialViewMetrics.navigationTimings)||void 0===s?void 0:s.firstByte),dom_complete:oe(null===(l=e.initialViewMetrics.navigationTimings)||void 0===l?void 0:l.domComplete),dom_content_loaded:oe(null===(c=e.initialViewMetrics.navigationTimings)||void 0===c?void 0:c.domContentLoaded),dom_interactive:oe(null===(u=e.initialViewMetrics.navigationTimings)||void 0===u?void 0:u.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:oe(e.initialViewMetrics.firstContentfulPaint),first_input_delay:oe(null===(d=e.initialViewMetrics.firstInput)||void 0===d?void 0:d.delay),first_input_time:oe(null===(f=e.initialViewMetrics.firstInput)||void 0===f?void 0:f.time),first_input_target_selector:null===(p=e.initialViewMetrics.firstInput)||void 0===p?void 0:p.targetSelector,interaction_to_next_paint:oe(null===(h=e.commonViewMetrics.interactionToNextPaint)||void 0===h?void 0:h.value),interaction_to_next_paint_target_selector:null===(m=e.commonViewMetrics.interactionToNextPaint)||void 0===m?void 0:m.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:oe(null===(g=e.initialViewMetrics.largestContentfulPaint)||void 0===g?void 0:g.value),largest_contentful_paint_target_selector:null===(y=e.initialViewMetrics.largestContentfulPaint)||void 0===y?void 0:y.targetSelector,load_event:oe(null===(v=e.initialViewMetrics.navigationTimings)||void 0===v?void 0:v.loadEvent),loading_time:(b=oe(e.commonViewMetrics.loadingTime),J(b)&&b<0?void 0:b),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},resource:{count:e.eventCounts.resourceCount},time_spent:oe(e.duration),in_foreground_periods:!w&&A?Kn(A,e.duration):void 0},feature_flags:x&&!Ye(x)?x:void 0,display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:oe(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:!!_||void 0,is_active:!!e.sessionIsActive&&void 0},privacy:{replay_level:t.defaultPrivacyLevel}};return Ye(e.customTimings)||(S.view.custom_timings=function(e,t){for(var r={},n=0,o=Object.keys(e);n=this.messageBytesLimit?s.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(t)&&this.remove(t),this.push(n,o,t))},e.prototype.process=function(e){var t=F(e);return{processedMessage:t,messageBytesCount:C(t)}},e.prototype.push=function(e,t,r){var n=this.flushController.messagesCount>0?1:0;this.flushController.notifyBeforeAddMessage(t+n),void 0!==r?this.upsertBuffer[r]=e:this.pushOnlyBuffer.push(e),this.flushController.notifyAfterAddMessage()},e.prototype.remove=function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var r=C(t),n=this.flushController.messagesCount>1?1:0;this.flushController.notifyAfterRemoveMessage(r+n)},e.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},e}(),yo=te;function vo(e,t,r,n,o){0===t.transportStatus&&0===t.queuedPayloads.size()&&t.bandwidthMonitor.canHandle(e)?_o(e,t,r,{onSuccess:function(){return xo(0,t,r,n,o)},onFailure:function(){t.queuedPayloads.enqueue(e),bo(t,r,n,o)}}):t.queuedPayloads.enqueue(e)}function bo(e,t,r,n){2===e.transportStatus&&T((function(){_o(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=yo,xo(1,e,t,r,n)},onFailure:function(){e.currentBackoffTime=Math.min(6e4,2*e.currentBackoffTime),bo(e,t,r,n)}})}),e.currentBackoffTime)}function _o(e,t,r,n){var o=n.onSuccess,i=n.onFailure;t.bandwidthMonitor.add(e),r(e,(function(r){t.bandwidthMonitor.remove(e),function(e){return"opaque"!==e.type&&(0===e.status&&!navigator.onLine||408===e.status||429===e.status||e.status>=500)}(r)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:r.status},i()):(t.transportStatus=0,o())}))}function xo(e,t,r,n,o){0===e&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:"Reached max ".concat(n," events size queued for upload: ").concat(3,"MiB"),source:Ir,startClocks:le()}),t.queueFullReported=!0);var i=t.queuedPayloads;for(t.queuedPayloads=wo();i.size()>0;)vo(i.dequeue(),t,r,n,o)}function wo(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=3145728}}}function Ao(e,t,r,n){var o={transportStatus:0,currentBackoffTime:yo,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return 0===this.ongoingRequestCount||this.ongoingByteCount+e.bytesCount<=81920&&this.ongoingRequestCount<32},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}},queuedPayloads:wo(),queueFullReported:!1},i=function(n,o){return function(e,t,r,n,o){if(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}()&&n.bytesCount=n&&f("bytes_limit"),d+=1,u+=e,void 0===t&&(t=T((function(){f("duration_limit")}),o))},notifyAfterAddMessage:function(){d>=r?f("messages_limit"):u>=n&&f("bytes_limit")},notifyAfterRemoveMessage:function(e){u-=e,0==(d-=1)&&p()}}}({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:o,sessionExpireObservable:i}),e.messageBytesLimit)}return{flushObservable:a.flushController.flushObservable,add:function(e,t){void 0===t&&(t=!0),a.add(e),s&&t&&s.add(r.transformMessage?r.transformMessage(e):e)},upsert:function(e,t){a.upsert(e,t),s&&s.upsert(r.transformMessage?r.transformMessage(e):e,t)},stop:function(){a.stop(),null==s||s.stop()}}}(e,{endpoint:e.rumEndpointBuilder},a&&{endpoint:a.rumEndpointBuilder,transformMessage:function(e){return N(e,{application:{id:a.applicationId}})}},n,o,i);return t.subscribe(11,(function(e){"view"===e.type?s.upsert(e,e.view.id):s.add(e)})),r.subscribe((function(t){return s.add(t,function(e){return e.site===Tt}(e))})),s}var To=et;var Io,ko,Mo,Ro=et;function Po(){0!==Io.batchCount&&(Yt("Customer data measures",Io),Do())}function Oo(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function Lo(e,t){e.sum+=t.sum,e.min=Math.min(e.min,t.min),e.max=Math.max(e.max,t.max)}function Do(){Io={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0},globalContextBytes:{min:1/0,max:0,sum:0},userContextBytes:{min:1/0,max:0,sum:0},featureFlagBytes:{min:1/0,max:0,sum:0}}}function No(){Mo=!1,ko={globalContextBytes:{min:1/0,max:0,sum:0},userContextBytes:{min:1/0,max:0,sum:0},featureFlagBytes:{min:1/0,max:0,sum:0}}}var Fo=et;function zo(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}function Bo(e,t){return{data:w({source:e},t),type:3,timestamp:ae()}}var jo={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Lt.ALLOW,MASK:Lt.MASK,MASK_USER_INPUT:Lt.MASK_USER_INPUT},Uo="data-dd-privacy",$o="hidden",Vo="***",Go={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function Ho(e,t){var r=br(e),n=r?Ho(r,t):t;return Wo(qo(e),n)}function Wo(e,t){switch(t){case jo.HIDDEN:case jo.IGNORE:return t}switch(e){case jo.ALLOW:case jo.MASK:case jo.MASK_USER_INPUT:case jo.HIDDEN:case jo.IGNORE:return e;default:return t}}function qo(e){if(mr(e)){var t=e.getAttribute(Uo);if("BASE"===e.tagName)return jo.ALLOW;if("INPUT"===e.tagName){var r=e;if("password"===r.type||"email"===r.type||"tel"===r.type)return jo.MASK;if("hidden"===r.type)return jo.MASK;var n=r.getAttribute("autocomplete");if(n&&0===n.indexOf("cc-"))return jo.MASK}return t===$o||e.classList.contains("dd-privacy-hidden")?jo.HIDDEN:"mask"===t||e.classList.contains("dd-privacy-mask")?jo.MASK:"mask-user-input"===t||e.classList.contains("dd-privacy-mask-user-input")?jo.MASK_USER_INPUT:"allow"===t||e.classList.contains("dd-privacy-allow")?jo.ALLOW:function(e){if("SCRIPT"===e.nodeName)return!0;if("LINK"===e.nodeName){var t=o("rel");return/preload|prefetch/i.test(t)&&"script"===o("as")||"shortcut icon"===t||"icon"===t}if("META"===e.nodeName){var r=o("name"),n=(t=o("rel"),o("property"));return/^msapplication-tile(image|color)$/.test(r)||"application-name"===r||"icon"===t||"apple-touch-icon"===t||"shortcut icon"===t||"keywords"===r||"description"===r||/^(og|twitter|fb):/.test(n)||/^(og|twitter):/.test(r)||"pinterest"===r||"robots"===r||"googlebot"===r||"bingbot"===r||e.hasAttribute("http-equiv")||"author"===r||"generator"===r||"framework"===r||"publisher"===r||"progid"===r||/^article:/.test(n)||/^product:/.test(n)||"google-site-verification"===r||"yandex-verification"===r||"csrf-token"===r||"p:domain_verify"===r||"verify-v1"===r||"verification"===r||"shopify-checkout-api-token"===r}function o(t){return(e.getAttribute(t)||"").toLowerCase()}return!1}(e)?jo.IGNORE:void 0}}function Xo(e,t){switch(t){case jo.MASK:case jo.HIDDEN:case jo.IGNORE:return!0;case jo.MASK_USER_INPUT:return hr(e)?Zo(e.parentNode):Zo(e);default:return!1}}function Zo(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;var t=e;if("INPUT"===t.tagName)switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!Go[t.tagName]}function Yo(e,t,r){var n,o=null===(n=e.parentElement)||void 0===n?void 0:n.tagName,i=e.textContent||"";if(!t||i.trim()){if("SCRIPT"===o)i=Vo;else if(r===jo.HIDDEN)i=Vo;else if(Xo(e,r))if("DATALIST"===o||"SELECT"===o||"OPTGROUP"===o){if(!i.trim())return}else i="OPTION"===o?Vo:i.replace(/\S/g,"x");return i}}var Ko=new WeakMap;function Jo(e){return Ko.has(e)}function Qo(e){return Ko.get(e)}function ei(e,t){var r=e.tagName,n=e.value;if(Xo(e,t)){var o=e.type;if("INPUT"===r&&("button"===o||"submit"===o||"reset"===o))return n;if(!n||"OPTION"===r)return;return Vo}return"OPTION"===r||"SELECT"===r?e.value:"INPUT"===r||"TEXTAREA"===r?n:void 0}var ti=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,ri=/^[A-Za-z]+:|^\/\//,ni=/^data:.*,/i;var oi=/[^a-z1-6-_]/;function ii(e){var t=e.toLowerCase().trim();return oi.test(t)?"div":t}function ai(e){if(void 0!==e&&0!==e.length)return e.map((function(e){var t=e.cssRules||e.rules;return{cssRules:Array.from(t,(function(e){return e.cssText})),disabled:e.disabled||void 0,media:e.media.length>0?Array.from(e.media):void 0}}))}function si(e,t,r,n){if(t===jo.HIDDEN)return null;var o=e.getAttribute(r);if(t===jo.MASK&&r!==Uo&&!vn.includes(r)&&r!==n.actionNameAttribute){var i=e.tagName;switch(r){case"title":case"alt":case"placeholder":return Vo}if(!("IMG"!==i&&"SOURCE"!==i||"src"!==r&&"srcset"!==r))return"data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==";if("A"===i&&"href"===r)return Vo;if(o&&_(r,"data-"))return Vo}return o&&"string"==typeof o&&o.length>1e5&&"data:"===o.slice(0,5)?"data:truncated":o}function li(e){if(!e)return null;var t,r,n;try{t=e.rules||e.cssRules}catch(e){}return t?(r=Array.from(t,(null!=Qe?Qe:Qe=/^((?!chrome|android).)*safari/i.test(navigator.userAgent))?ci:ui).join(""),n=e.href,r.replace(ti,(function(e,t,r,o,i,a){var s=r||i||a;if(!n||!s||ri.test(s)||ni.test(s))return e;var l=t||o||"";return"url(".concat(l).concat(function(e,t){try{return At(e,t).href}catch(t){return e}}(s,n)).concat(l,")")}))):null}function ci(e){return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")?e.cssText.replace(/(\[[\w-]+[^\\])(:[^\]]+\])/g,"$1\\$2"):ui(e)}function ui(e){return function(e){return"styleSheet"in e}(e)&&li(e.styleSheet)||e.cssText}function di(e,t){var r=function(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return function(e,t){return{type:0,childNodes:pi(e,t),adoptedStyleSheets:ai(e.adoptedStyleSheets)}}(e,t);case e.DOCUMENT_FRAGMENT_NODE:return function(e,t){var r=yr(e);return r&&t.serializationContext.shadowRootsController.addShadowRoot(e),{type:11,childNodes:pi(e,t),isShadowRoot:r,adoptedStyleSheets:r?ai(e.adoptedStyleSheets):void 0}}(e,t);case e.DOCUMENT_TYPE_NODE:return{type:1,name:(r=e).name,publicId:r.publicId,systemId:r.systemId};case e.ELEMENT_NODE:return function(e,t){var r,n,o=ii(e.tagName),i="svg"===(n=e).tagName||n instanceof SVGElement||void 0,a=Wo(qo(e),t.parentNodePrivacyLevel);if(a===jo.HIDDEN){var s=e.getBoundingClientRect(),l=s.width,c=s.height;return{type:2,tagName:o,attributes:(r={rr_width:"".concat(l,"px"),rr_height:"".concat(c,"px")},r[Uo]=$o,r),childNodes:[],isSVG:i}}if(a!==jo.IGNORE){var u=function(e,t,r){var n;if(t===jo.HIDDEN)return{};for(var o={},i=ii(e.tagName),a=e.ownerDocument,s=0;s0||gr(e)}(e)&&"style"!==o&&(d=pi(e,t.parentNodePrivacyLevel===a&&t.ignoreWhiteSpace===("head"===o)?t:w({},t,{parentNodePrivacyLevel:a,ignoreWhiteSpace:"head"===o}))),{type:2,tagName:o,attributes:u,childNodes:d,isSVG:i}}}(e,t);case e.TEXT_NODE:return function(e,t){var r=Yo(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(void 0!==r)return{type:3,textContent:r}}(e,t);case e.CDATA_SECTION_NODE:return{type:4,textContent:""}}var r}(e,t);if(!r)return null;var n=Qo(e)||fi++,o=r;return o.id=n,function(e,t){Ko.set(e,t)}(e,n),t.serializedNodeIds&&t.serializedNodeIds.add(n),o}var fi=1;function pi(e,t){var r=[];return vr(e,(function(e){var n=di(e,t);n&&r.push(n)})),r}function hi(e,t,r){return di(e,{serializationContext:r,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function mi(e){return Boolean(e.changedTouches)}function gi(e){return!0===e.composed&&gr(e.target)?e.composedPath()[0]:e.target}var yi,vi=function(e){return{scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width}};function bi(e){var t,r,n,o,i=mi(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;if(window.visualViewport){var l=(t=a,r=s,n=window.visualViewport,o={layoutViewportX:t,layoutViewportY:r,visualViewportX:t,visualViewportY:r},n?(function(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>25||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>25}(n)?(o.layoutViewportX=Math.round(t+n.offsetLeft),o.layoutViewportY=Math.round(r+n.offsetTop)):(o.visualViewportX=Math.round(t-n.offsetLeft),o.visualViewportY=Math.round(r-n.offsetTop)),o):o);a=l.visualViewportX,s=l.visualViewportY}if(Number.isFinite(a)&&Number.isFinite(s))return{x:a,y:s};e.isTrusted&&Yt("mouse/touch event without x/y")}var _i,xi=((yi={}).pointerup=0,yi.mousedown=1,yi.click=2,yi.contextmenu=3,yi.dblclick=4,yi.focus=5,yi.blur=6,yi.touchstart=7,yi.touchend=9,yi);function wi(e,t,r){void 0===r&&(r=document);var n,o=e.defaultPrivacyLevel,i=new WeakMap,a=r!==document,s=Se(0,r,a?["change"]:["input","change"],(function(e){var t=gi(e);(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&c(t)}),{capture:!0,passive:!0}).stop;if(a)n=P;else{var l=[Gr(HTMLInputElement.prototype,"value",c),Gr(HTMLInputElement.prototype,"checked",c),Gr(HTMLSelectElement.prototype,"value",c),Gr(HTMLTextAreaElement.prototype,"value",c),Gr(HTMLSelectElement.prototype,"selectedIndex",c)];n=function(){l.forEach((function(e){return e.stop()}))}}return function(){n(),s()};function c(e){var t=Ho(e,o);if(t!==jo.HIDDEN){var r,n=e.type;if("radio"===n||"checkbox"===n){if(Xo(e,t))return;r={isChecked:e.checked}}else{var i=ei(e,t);if(void 0===i)return;r={text:i}}u(e,r);var a,s,l=e.name;"radio"===n&&l&&e.checked&&(a=document.querySelectorAll('input[type="radio"][name="'.concat(x(l),'"]')),s=function(t){t!==e&&u(t,{isChecked:!1})},Array.prototype.forEach.call(a,s))}}function u(e,r){if(Jo(e)){var n=i.get(e);n&&n.text===r.text&&n.isChecked===r.isChecked||(i.set(e,r),t(w({id:Qo(e)},r)))}}}function Ai(e){for(var t=[],r=e;r.parentRule;){var n=Array.from(r.parentRule.cssRules).indexOf(r);t.unshift(n),r=r.parentRule}if(r.parentStyleSheet){var o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);return t.unshift(o),t}}function Si(e,t,r,n){var o=rr();if(!o)return{stop:P,flush:P};var i=function(e){var t=P,r=[];function n(){t(),e(r),r=[]}return{addMutations:function(e){0===r.length&&(t=function(e){if(window.requestIdleCallback&&window.cancelIdleCallback){var t=window.requestIdleCallback(f(e),{timeout:100});return function(){return window.cancelIdleCallback(t)}}var r=window.requestAnimationFrame(f(e));return function(){return window.cancelAnimationFrame(r)}}(n)),r.push.apply(r,e)},flush:n,stop:function(){t()}}}((function(n){!function(e,t,r,n){e.filter((function(e){return"childList"===e.type})).forEach((function(e){e.removedNodes.forEach((function(e){Ci(e,n.removeShadowRoot)}))}));var o=e.filter((function(e){return e.target.isConnected&&function(e){for(var t=e;t;){if(!Jo(t)&&!yr(t))return!1;t=br(t)}return!0}(e.target)&&Ho(e.target,r.defaultPrivacyLevel)!==jo.HIDDEN})),i=function(e,t,r){for(var n=new Set,o=new Map,i=function(e){e.addedNodes.forEach((function(e){n.add(e)})),e.removedNodes.forEach((function(t){n.has(t)||o.set(t,e.target),n.delete(t)}))},a=0,s=e;a10&&function(){if(_i)if(_i.keys)_i.delete(_i.keys().next().value);else{var e=!0;_i.forEach((function(t,r){e&&(_i.delete(r),e=!1)}))}}()),t}var ki=function(){function e(e,t,r){this.encoder=e;var n=t.view.id;this.metadata=w({start:1/0,end:-1/0,creation_reason:r,records_count:0,has_full_snapshot:!1,index_in_view:Ti(n),source:"browser"},t),function(e){Ii(e).segments_count+=1}(n)}return e.prototype.addRecord=function(e,t){var r;this.metadata.start=Math.min(this.metadata.start,e.timestamp),this.metadata.end=Math.max(this.metadata.end,e.timestamp),this.metadata.records_count+=1,(r=this.metadata).has_full_snapshot||(r.has_full_snapshot=2===e.type),Gt("record",{record:e,segment:this.metadata}),Ii(this.metadata.view.id).records_count+=1;var n=1===this.metadata.records_count?'{"records":[':",";this.encoder.write(n+JSON.stringify(e),t)},e.prototype.flush=function(e){var t=this;if(0===this.metadata.records_count)throw new Error("Empty segment flushed");this.encoder.write("],".concat(JSON.stringify(this.metadata).slice(1),"\n"),(function(){var r,n;r=t.metadata.view.id,n=t.encoder.rawBytesCount,Ii(r).segments_total_raw_size+=n,e(t.metadata)})),this.encoder.reset()},e}(),Mi=6e4;function Ri(e,t,r,n,o,i){return function(e,o,i,a){var s={status:0,nextSegmentCreationReason:"init"},l=e.subscribe(2,(function(){u("view_change")})).unsubscribe,c=e.subscribe(9,(function(e){u(e.reason)})).unsubscribe;function u(e){1===s.status&&(s.segment.flush((function(t){var r=function(e,t,r){var n=new FormData;n.append("segment",new Blob([e],{type:"application/octet-stream"}),"".concat(t.session.id,"-").concat(t.start));var o=w({raw_segment_size:r,compressed_segment_size:e.byteLength},t),i=JSON.stringify(o);return n.append("event",new Blob([i],{type:"application/json"})),{data:n,bytesCount:e.byteLength}}(a.encodedBytes,t,a.rawBytesCount);tr(e)?i.sendOnExit(r):i.send(r)})),I(s.expirationTimeoutId)),s="stop"!==e?{status:0,nextSegmentCreationReason:e}:{status:2}}return{addRecord:function(e){if(2!==s.status){if(0===s.status){var o=function(e,t,r){var n=t.findTrackedSession(),o=r.findView();if(n&&o)return{application:{id:e},session:{id:n.id},view:{id:o.id}}}(t.applicationId,r,n);if(!o)return;s={status:1,segment:new ki(a,o,s.nextSegmentCreationReason),expirationTimeoutId:T((function(){u("segment_duration_limit")}),3e4)}}var i=s.segment;i.addRecord(e,(function(){1===s.status&&s.segment===i&&a.encodedBytesCount>6e4&&u("segment_bytes_limit")}))}},stop:function(){u("stop"),l(),c()}}}(e,0,o,i)}function Pi(){return"function"==typeof Array.from&&"function"==typeof CSSSupportsRule&&"function"==typeof URL.createObjectURL&&"forEach"in NodeList.prototype}function Oi(e,t,r,n){var o=t.findTrackedSession(),i=function(e,t){return Pi()?e?e.sessionReplayAllowed?t?void 0:"replay-not-started":"incorrect-session-plan":"rum-not-tracked":"browser-not-supported"}(o,n);return function(e,t){var r=t.session,n=t.viewContext,o=t.errorType,i=r?r.id:"no-session-id",a=[];void 0!==o&&a.push("error-type=".concat(o)),n&&(a.push("seed=".concat(n.id)),a.push("from=".concat(n.startClocks.timeStamp)));var s,l,c,u=(l=(s=e).site,c=s.subdomain||function(e){switch(e.site){case It:case"datadoghq.eu":return"app";case Tt:return"dd";default:return}}(s),"https://".concat(c?"".concat(c,"."):"").concat(l)),d="/rum/replay/sessions/".concat(i);return"".concat(u).concat(d,"?").concat(a.join("&"))}(e,{viewContext:r.findView(),errorType:i,session:o})}function Li(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['!function(){"use strict";function t(t){for(var e=t.reduce((function(t,e){return t+e.length}),0),a=new Uint8Array(e),n=0,r=0,i=t;r=0;)t[e]=0}var a=256,n=286,r=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),_=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),l=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,v=new Array(r);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(v);var y=function(t){return t<256?u[t]:u[256+(t>>>7)]},k=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},z=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,r,s=new Array(16),_=0;for(n=1;n<=i;n++)s[n]=_=_+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=A(s[h]++,h))}},Z=function(t){var e;for(e=0;e8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var r=2*e,i=2*a;return t[r]>1;a>=1;a--)R(t,s,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*r]=s[2*a]+s[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=r,t.heap[1]=r++,R(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,s,_,h,l=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=l[2*l[2*(n=t.heap[a])+1]+1]+1)>p&&(s=p,g++),l[2*n+1]=s,n>o||(t.bl_count[s]++,_=0,n>=c&&(_=f[n-c]),h=l[2*n],t.opt_len+=h*(s+_),u&&(t.static_len+=h*(d[2*n+1]+_)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--a])>o||(l[2*r+1]!==s&&(t.opt_len+=(s-l[2*r+1])*l[2*r],l[2*r+1]=s),n--)}}(t,e),E(s,o,t.bl_count)},T=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++_0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?O(t,e,n,r):4===t.strategy||s===i?(z(t,2+(r?1:0),3),L(t,o,d)):(z(t,4+(r?1:0),3),function(t,e,a,n){var r;for(z(t,e-257,5),z(t,a-1,5),z(t,n-4,4),r=0;r>=7;l>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+a+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){z(t,2,3),x(t,256,o),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0},H=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),M=function(t,e,a,n){var r=H,i=n+a;t^=-1;for(var s=n;s>>8^r[255&(t^e[s])];return-1^t},Y={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},P=B._tr_init,j=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,rt=K.Z_BUF_ERROR,it=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,_t=K.Z_HUFFMAN_ONLY,ht=K.Z_RLE,lt=K.Z_FIXED,ot=K.Z_DEFAULT_STRATEGY,dt=K.Z_UNKNOWN,ut=K.Z_DEFLATED,ft=258,ct=262,pt=103,gt=113,wt=666,vt=function(t,e){return t.msg=Y[e],e},bt=function(t){return(t<<1)-(t>4?9:0)},mt=function(t){for(var e=t.length;--e>=0;)t[e]=0},yt=function(t,e,a){return(e<t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,kt(t.strm)},xt=function(t,e){t.pending_buf[t.pending++]=e},At=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,_=t.nice_match,h=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,l=t.window,o=t.w_mask,d=t.prev,u=t.strstart+ft,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&is){if(t.match_start=e,s=n,n>=_)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&o])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead},Zt=function(t){var e,a,n,r,i,s,_,h,l,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-ct)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,_=t.window,h=t.strstart+t.lookahead,l=r,o=void 0,(o=s.avail_in)>l&&(o=l),a=0===o?0:(s.avail_in-=o,_.set(s.input.subarray(s.next_in,s.next_in+o),h),1===s.state.wrap?s.adler=C(s.adler,_,o,h):2===s.state.wrap&&(s.adler=M(s.adler,_,o,h)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2},St=function(t,e){for(var a,n,r;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Lt=[new Rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Zt(t),0===t.lookahead&&e===q)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,zt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(zt(t,!1),t.strm.avail_out),1)})),new Rt(4,4,8,4,Ut),new Rt(4,5,16,8,Ut),new Rt(4,6,32,32,Ut),new Rt(4,4,16,16,St),new Rt(8,16,32,32,St),new Rt(8,16,128,128,St),new Rt(8,32,128,256,St),new Rt(32,128,258,1024,St),new Rt(32,258,258,4096,St)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ut,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Tt=function(t){if(!t||!t.state)return vt(t,at);t.total_in=t.total_out=0,t.data_type=dt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:gt,t.adler=2===e.wrap?0:1,e.last_flush=q,P(e),tt},It=function(t){var e,a=Tt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,mt(e.head),e.max_lazy_match=Lt[e.level].max_lazy,e.good_match=Lt[e.level].good_length,e.nice_match=Lt[e.level].nice_length,e.max_chain_length=Lt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Nt=function(t,e,a,n,r,i){if(!t)return at;var s=1;if(e===it&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==ut||n<8||n>15||e<0||e>9||i<0||i>lt)return vt(t,at);8===n&&(n=9);var _=new Ft;return t.state=_,_.strm=t,_.wrap=s,_.gzhead=null,_.w_bits=n,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<$||e<0)return t?vt(t,at):at;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===wt&&e!==V)return vt(t,0===t.avail_out?rt:at);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,xt(r,31),xt(r,139),xt(r,8),r.gzhead?(xt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xt(r,255&r.gzhead.time),xt(r,r.gzhead.time>>8&255),xt(r,r.gzhead.time>>16&255),xt(r,r.gzhead.time>>24&255),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xt(r,255&r.gzhead.extra.length),xt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=M(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,3),r.status=gt);else{var s=ut+(r.w_bits-8<<4)<<8;s|=(r.strategy>=_t||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=gt,At(r,s),0!==r.strstart&&(At(r,t.adler>>>16),At(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending!==r.pending_buf_size));)xt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindexa&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindexa&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=pt)}else r.status=pt;if(r.status===pt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&kt(t),r.pending+2<=r.pending_buf_size&&(xt(r,255&t.adler),xt(r,t.adler>>8&255),t.adler=0,r.status=gt)):r.status=gt),0!==r.pending){if(kt(t),0===t.avail_out)return r.last_flush=-1,tt}else if(0===t.avail_in&&bt(e)<=bt(i)&&e!==V)return vt(t,rt);if(r.status===wt&&0!==t.avail_in)return vt(t,rt);if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==wt){var _=r.strategy===_t?function(t,e){for(var a;;){if(0===t.lookahead&&(Zt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===ht?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=ft){if(Zt(t),t.lookahead<=ft&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+ft;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Lt[r.level].func(r,e);if(3!==_&&4!==_||(r.status=wt),1===_||3===_)return 0===t.avail_out&&(r.last_flush=-1),tt;if(2===_&&(e===J?W(r):e!==$&&(j(r,0,0,!1),e===Q&&(mt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),kt(t),0===t.avail_out))return r.last_flush=-1,tt}return e!==V?tt:r.wrap<=0?et:(2===r.wrap?(xt(r,255&t.adler),xt(r,t.adler>>8&255),xt(r,t.adler>>16&255),xt(r,t.adler>>24&255),xt(r,255&t.total_in),xt(r,t.total_in>>8&255),xt(r,t.total_in>>16&255),xt(r,t.total_in>>24&255)):(At(r,t.adler>>>16),At(r,65535&t.adler)),kt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?tt:et)},deflateEnd:function(t){if(!t||!t.state)return at;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==pt&&e!==gt&&e!==wt?vt(t,at):(t.state=null,e===gt?vt(t,nt):tt)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return at;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return at;if(1===r&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(mt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,_=t.next_in,h=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Zt(n);n.lookahead>=3;){var l=n.strstart,o=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[l+3-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++}while(--o);n.strstart=l,n.lookahead=2,Zt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=_,t.input=h,t.avail_in=s,n.wrap=r,tt},deflateInfo:"pako deflate (from Nodeca project)"};for(var Dt=new Uint8Array(256),Bt=0;Bt<256;Bt++)Dt[Bt]=Bt>=252?6:Bt>=248?5:Bt>=240?4:Bt>=224?3:Bt>=192?2:1;Dt[254]=Dt[254]=1;var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Ht=Object.prototype.toString,Mt=K.Z_NO_FLUSH,Yt=K.Z_SYNC_FLUSH,Kt=K.Z_FULL_FLUSH,Pt=K.Z_FINISH,jt=K.Z_OK,Gt=K.Z_STREAM_END,Xt=K.Z_DEFAULT_COMPRESSION,Wt=K.Z_DEFAULT_STRATEGY,qt=K.Z_DEFLATED;function Jt(){this.options={level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;var e=Ot.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==jt)throw new Error(Y[e]);if(t.header&&Ot.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="[object ArrayBuffer]"===Ht.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Ot.deflateSetDictionary(this.strm,a))!==jt)throw new Error(Y[e]);this._dict_set=!0}}function Qt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:String(e),streamId:a})}}function Vt(t){var e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}Jt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Pt:Mt,"[object ArrayBuffer]"===Ht.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Yt||n===Kt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Ot.deflate(r,n))===Gt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Ot.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===jt;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===jt&&(this.result=function(t){for(var e=0,a=0,n=t.length;a>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,K.Z_SYNC_FLUSH),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:Vt(n),additionalBytesCount:i.length};case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){Qt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){Qt(e,t)}}()}();'])))}var Di={status:0};function Ni(e,t,r,n){switch(void 0===n&&(n=Li),0===Di.status&&function(e,t,r){void 0===r&&(r=Li);try{var n=r(e),o=Ae(0,n,"error",(function(r){zi(e,t,r)})).stop,i=Ae(0,n,"message",(function(r){var n,o=r.data;"errored"===o.type?zi(e,t,o.error,o.streamId):"initialized"===o.type&&(n=o.version,1===Di.status&&(Di={status:3,worker:Di.worker,stop:Di.stop,version:n}))})).stop;n.postMessage({action:"init"}),T((function(){return function(e){1===Di.status&&(s.error("".concat(e," failed to start: a timeout occurred while initializing the Worker")),Di.initializationFailureCallbacks.forEach((function(e){return e()})),Di={status:2})}(t)}),1e4),Di={status:1,worker:n,stop:function(){o(),i()},initializationFailureCallbacks:[]}}catch(r){zi(e,t,r)}}(e,t,n),Di.status){case 1:return Di.initializationFailureCallbacks.push(r),Di.worker;case 3:return Di.worker}}function Fi(){return Di.status}function zi(e,t,r,n){if(1===Di.status||0===Di.status){if(s.error("".concat(t," failed to start: an error occurred while creating the Worker:"),r),r instanceof Event||r instanceof Error&&(m(i=r.message,"Content Security Policy")||m(i,"requires 'TrustedScriptURL'"))){var o;o=e.workerUrl?"Please make sure the Worker URL ".concat(e.workerUrl," is correct and CSP is correctly configured."):"Please make sure CSP is correctly configured.",s.error("".concat(o," See documentation at https://docs.datadoghq.com/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay"))}else Kt(r);1===Di.status&&Di.initializationFailureCallbacks.forEach((function(e){return e()})),Di={status:2}}else Kt(r,{worker_version:3===Di.status&&Di.version,stream_id:n});var i}var Bi=function(){if(we()||!Pi())return{start:P,stop:P,getReplayStats:function(){},onRumStart:P,isRecording:function(){return!1},getSessionReplayLink:function(){}};var e={status:0},t=function(){e={status:1}},r=function(){e={status:0}};return{start:function(){return t()},stop:function(){return r()},getSessionReplayLink:function(t,r,n){return Oi(t,r,n,0!==e.status)},onRumStart:function(n,o,i,a){n.subscribe(7,(function(){2!==e.status&&3!==e.status||(r(),e={status:1})})),n.subscribe(8,(function(){1===e.status&&t()})),t=function(){var t=i.findTrackedSession();t&&t.sessionReplayAllowed?2!==e.status&&3!==e.status&&(e={status:2},nr(0,"interactive",(function(){if(2===e.status){var t=Ni(o,"Datadog Session Replay",(function(){r()}),undefined);if(t){var s=function(e,t,r,n,o,i){var a=i||Ao(t,t.sessionReplayEndpointBuilder,Mi,(function(t){e.notify(12,{error:t}),Yt("Error reported to customer",{"error.message":t.message})})),s=Ri(e,t,r,n,a,o),l=s.addRecord,c=s.stop,u=Ei({emit:l,configuration:t,lifeCycle:e}),d=u.stop,f=u.takeSubsequentFullSnapshot,p=u.flushMutations,h=e.subscribe(4,(function(){p(),l({timestamp:ae(),type:7})})).unsubscribe,m=e.subscribe(2,(function(e){f(e.startClocks.timeStamp)})).unsubscribe;return{stop:function(){h(),m(),d(),c()}}}(n,o,i,a,function(e,t,r){var n,o=0,i=[],a=0,s=[],l=Ae(0,t,"message",(function(e){var t=e.data;if("wrote"===t.type&&t.streamId===r){var a=s.shift();a&&a.id===t.id?(0===t.id?(o=t.additionalBytesCount,i=[t.result]):(o+=t.additionalBytesCount,i.push(t.result)),n=t.trailer,a.callback()):(l(),Yt("Worker responses received out of order."))}})).stop;return{get encodedBytes(){return i.length?function(e){for(var t=e.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(t),n=0,o=0,i=e;o=a;s--){var l=o[s],c=ue(e,l.startTime);i.push({state:l.state,start:oe(c)})}return i}},isInActivePageStateAt:function(e){var t=n.find(e);return void 0!==t&&"active"===t.state},addPageState:i,stop:function(){o(),n.stop()}}}(),f=function(e,t,r,n){e.subscribe(1,(function(t){return e.notify(10,Nn(t,n))}));var o={findActionId:P};return r.trackUserInteractions&&(o=Ln(e,t,r).actionContexts),{addAction:function(t,r){e.notify(10,w({savedCommonContext:r},Nn(t,n)))},actionContexts:o}}(e,i,t,d),p=f.addAction,h=f.actionContexts,m=(l=so(),{get:function(){return{viewport:l}},stop:ao().subscribe((function(e){l=e})).unsubscribe});return Nr(t,e,n,c,u,h,m,a,s),{viewContexts:c,pageStateHistory:d,urlContexts:u,addAction:p,actionContexts:h,stop:function(){m.stop(),d.stop(),u.stop(),c.stop(),d.stop()}}}(s,t,location,v,x,_,(function(){return Vt(n,o,r)}),u),S=A.viewContexts,E=A.pageStateHistory,T=A.urlContexts,I=A.actionContexts,M=A.addAction,O=A.stop;a.push(O),function(e){Zt.telemetryConfigurationEnabled&&Jt({type:Wt,configuration:e})}(function(e){var t,r,n=function(e){var t,r,n=null!==(t=e.proxy)&&void 0!==t?t:e.proxyUrl;return{session_sample_rate:null!==(r=e.sessionSampleRate)&&void 0!==r?r:e.sampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,use_before_send:!!e.beforeSend,use_cross_site_session_cookie:e.useCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:void 0!==n?!!n:void 0,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_resources:e.trackResources,track_long_task:e.trackLongTasks,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages}}(e);return w({premium_sample_rate:e.premiumSampleRate,replay_sample_rate:e.replaySampleRate,session_replay_sample_rate:e.sessionReplaySampleRate,trace_sample_rate:null!==(t=e.traceSampleRate)&&void 0!==t?t:e.tracingSampleRate,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_origins:Array.isArray(e.allowedTracingOrigins)&&e.allowedTracingOrigins.length>0,use_allowed_tracing_urls:Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0,selected_tracing_propagators:$t(e),default_privacy_level:e.defaultPrivacyLevel,use_excluded_activity_urls:Array.isArray(e.excludedActivityUrls)&&e.excludedActivityUrls.length>0,use_worker_url:!!e.workerUrl,track_frustrations:e.trackFrustrations,track_views_manually:e.trackViewsManually,track_user_interactions:null!==(r=e.trackUserInteractions)&&void 0!==r?r:e.trackInteractions},n)}(e)),function(e,t){e.subscribe(0,(function(r){for(var n=0,o=r;n{"use strict";r.d(t,{A:()=>ne});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?u(_,--v):0,g--,10===b&&(g=1,m--),b}function S(){return b=v2||I(b)>3?"":" "}function O(e,t){for(;--t&&S()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return T(e,E()+(t<6&&32==C()&&32==S()))}function L(e){for(;S();)switch(b){case e:return v;case 34:case 39:34!==e&&39!==e&&L(b);break;case 40:41===e&&L(e);break;case 92:S()}return v}function D(e,t){for(;S()&&e+b!==57&&(e+b!==84||47!==C()););return"/*"+T(t,v-1)+"*"+i(47===e?e:S())}function N(e){for(;!I(C());)S();return T(e,v)}var F="-ms-",z="-moz-",B="-webkit-",j="comm",U="rule",$="decl",V="@keyframes";function G(e,t){for(var r="",n=p(e),o=0;o0&&f(z)-y&&h(b>32?Y(z+";",n,r,y-1):Y(l(z," ","")+";",n,r,y-2),p);break;case 59:z+=";";default:if(h(F=X(z,t,r,m,g,o,d,k,M=[],L=[],y),a),123===I)if(0===g)q(z,t,F,F,M,a,y,d,L);else switch(99===v&&110===u(z,3)?100:v){case 100:case 108:case 109:case 115:q(e,F,F,n&&h(X(e,F,F,0,0,o,d,k,o,M=[],y),L),o,L,y,d,n?M:L);break;default:q(z,F,F,F,[""],L,0,d,L)}}m=g=b=0,x=T=1,k=z="",y=s;break;case 58:y=1+f(z),b=_;default:if(x<1)if(123==I)--x;else if(125==I&&0==x++&&125==A())continue;switch(z+=i(I),I*x){case 38:T=g>0?1:(z+="\f",-1);break;case 44:d[m++]=(f(z)-1)*T,T=1;break;case 64:45===C()&&(z+=R(S())),v=C(),g=y=f(k=z+=N(E())),I++;break;case 45:45===_&&2==f(z)&&(x=0)}}return a}function X(e,t,r,n,i,a,c,u,f,h,m){for(var g=i-1,y=0===i?a:[""],v=p(y),b=0,_=0,w=0;b0?y[A]+" "+S:l(S,/&\f/g,y[A])))&&(f[w++]=C);return x(e,t,r,0===i?U:u,f,h,m)}function Z(e,t,r){return x(e,t,r,j,i(b),d(e,2,-2),0)}function Y(e,t,r,n){return x(e,t,r,$,d(e,0,n),d(e,n+1,-1),n)}var K=function(e,t,r){for(var n=0,o=0;n=o,o=C(),38===n&&12===o&&(t[r]=1),!I(o);)S();return T(e,v)},J=new WeakMap,Q=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(r))&&!n){J.set(e,!0);for(var o=[],a=function(e,t){return M(function(e,t){var r=-1,n=44;do{switch(I(n)){case 0:38===n&&12===C()&&(t[r]=1),e[r]+=K(v-1,t,r);break;case 2:e[r]+=R(n);break;case 4:if(44===n){e[++r]=58===C()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=i(n)}}while(n=S());return e}(k(e),t))}(t,o),s=r.props,l=0,c=0;l6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+z+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?te(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,f(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+B)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===u(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+F+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return B+e+F+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+F+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+F+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+F+e+e}return e}var re=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case $:e.return=te(e.value,e.length);break;case V:return G([w(e,{value:l(e.value,"@","@"+B)})],n);case U:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return G([w(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return G([w(e,{props:[l(t,/:(plac\w+)/,":"+B+"input-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,F+"input-$1")]})],n)}return""}))}}],ne=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,a=e.stylisPlugins||re,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r{"use strict";r.d(t,{A:()=>i});var n=r("fezH"),o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=(0,n.A)((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}))},fezH:(e,t,r)=>{"use strict";function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}r.d(t,{A:()=>n})},xSbz:(e,t,r)=>{"use strict";r.d(t,{C:()=>a,T:()=>l,w:()=>s});var n=r("q1tI"),o=r("EwZD"),i=(r("zd00"),r("xLBD"),n.createContext("undefined"!=typeof HTMLElement?(0,o.A)({key:"css"}):null)),a=i.Provider,s=function(e){return(0,n.forwardRef)((function(t,r){var o=(0,n.useContext)(i);return e(t,o,r)}))},l=n.createContext({})},AeFk:(e,t,r)=>{"use strict";r.d(t,{AH:()=>c,i7:()=>u,mL:()=>l});var n=r("xSbz"),o=r("q1tI"),i=r("eVQB"),a=r("xLBD"),s=r("zd00"),l=(r("EwZD"),r("2mql"),(0,n.w)((function(e,t){var r=e.styles,l=(0,s.J)([r],void 0,o.useContext(n.T)),c=o.useRef();return(0,a.i)((function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),n=!1,o=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==o&&(n=!0,o.setAttribute("data-emotion",e),r.hydrate([o])),c.current=[r,n],function(){r.flush()}}),[t]),(0,a.i)((function(){var e=c.current,r=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,i.sk)(t,l.next,!0),r.tags.length){var n=r.tags[r.tags.length-1].nextElementSibling;r.before=n,r.flush()}t.insert("",l,r,!1)}}),[t,l.name]),null})));function c(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";r.d(t,{J:()=>g});var n={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=r("fezH"),i=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!=typeof e},u=(0,o.A)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,(function(e,t,r){return h={name:t,styles:r,next:h},t}))}return 1===n[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"},f="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function p(e,t,r){if(null==r)return"";var n=r;if(void 0!==n.__emotion_styles)return n;switch(typeof r){case"boolean":return"";case"object":var o=r;if(1===o.anim)return h={name:o.name,styles:o.styles,next:h},o.name;var a=r;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)h={name:s.name,styles:s.styles,next:h},s=s.next;return a.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:h}}},xLBD:(e,t,r)=>{"use strict";var n;r.d(t,{i:()=>s,s:()=>a});var o=r("q1tI"),i=!!(n||(n=r.t(o,2))).useInsertionEffect&&(n||(n=r.t(o,2))).useInsertionEffect,a=i||function(e){return e()},s=i||o.useLayoutEffect},eVQB:(e,t,r)=>{"use strict";function n(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):r&&(n+=r+" ")})),n}r.d(t,{Rk:()=>n,SF:()=>o,sk:()=>i});var o=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},i=function(e,t,r){o(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},VPSz:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline")},"5zhj":(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},ByUY:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 7V3H2v18h20V7zM6 19H4v-2h2zm0-4H4v-2h2zm0-4H4V9h2zm0-4H4V5h2zm4 12H8v-2h2zm0-4H8v-2h2zm0-4H8V9h2zm0-4H8V5h2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8zm-2-8h-2v2h2zm0 4h-2v2h2z"}),"Business")},PivD:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined")},MLTJ:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M22 7h-9v2h9zm0 8h-9v2h9zM5.54 11 2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}),"Checklist")},"+kmO":(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear")},H6AK:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},NQch:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"CloudUploadOutlined")},Omwb:(e,t,r)=>{"use strict";var n=r("JMD1");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r("jelL")),i=r("nKUr");t.default=(0,o.default)((0,i.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord")},IbSg:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m6-1.8C18 6.57 15.35 4 12 4s-6 2.57-6 6.2c0 2.34 1.95 5.44 6 9.14 4.05-3.7 6-6.8 6-9.14M12 2c4.2 0 8 3.22 8 8.2 0 3.32-2.67 7.25-8 11.8-5.33-4.55-8-8.48-8-11.8C4 5.22 7.8 2 12 2"}),"FmdGoodOutlined")},AaLx:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79zm9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75zM7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1"}),"LocalPhoneOutlined")},QUIK:(e,t,r)=>{"use strict";var n=r("JMD1");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r("jelL")),i=r("nKUr");t.default=(0,o.default)((0,i.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore")},nEB7:(e,t,r)=>{"use strict";var n=r("JMD1");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r("jelL")),i=r("nKUr");t.default=(0,o.default)((0,i.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext")},iasa:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"}),"PersonOutline")},sQkp:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"Place")},LUv1:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow")},stHU:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M7 11v2h10v-2zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"RemoveCircleOutline")},a3PL:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save")},Nb3f:(e,t,r)=>{"use strict";var n=r("JMD1");t.A=void 0;var o=n(r("jelL")),i=r("nKUr");t.A=(0,o.default)((0,i.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search")},"8k4i":(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"}),"PhoneIphone")},jelL:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r("dzX4")},vZhi:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("xeev"),s=r("DSU1"),l=r("aGM9"),c=r("Vn7y"),u=r("W9AN"),d=r("5I82"),f=r("bann"),p=r("yXLF"),h=r("d70t"),m=r("TkYO");function g(e){return(0,m.Ay)("MuiLoadingButton",e)}const y=(0,r("PYeY").A)("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var v=r("nKUr");const b=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],_=(0,c.Ay)(d.A,{shouldForwardProp:e=>(e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e)(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${y.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${y.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})((({ownerState:e,theme:t})=>(0,o.A)({[`& .${y.startIconLoadingStart}, & .${y.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${y.loading}`]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${y.startIconLoadingStart}, & .${y.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${y.startIconLoadingStart}, & .${y.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}}))),x=(0,c.Ay)("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.loadingIndicator,t[`loadingIndicator${(0,a.A)(r.loadingPosition)}`]]}})((({theme:e,ownerState:t})=>(0,o.A)({position:"absolute",visibility:"visible",display:"flex"},"start"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{left:"small"===t.size?10:14},"start"===t.loadingPosition&&"text"===t.variant&&{left:6},"center"===t.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},"end"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{right:"small"===t.size?10:14},"end"===t.loadingPosition&&"text"===t.variant&&{right:6},"start"===t.loadingPosition&&t.fullWidth&&{position:"relative",left:-10},"end"===t.loadingPosition&&t.fullWidth&&{position:"relative",right:-10}))),w=i.forwardRef((function(e,t){const r=i.useContext(f.A),c=(0,h.A)(r,e),d=(0,u.b)({props:c,name:"MuiLoadingButton"}),{children:m,disabled:y=!1,id:w,loading:A=!1,loadingIndicator:S,loadingPosition:C="center",variant:E="text"}=d,T=(0,n.A)(d,b),I=(0,s.A)(w),k=null!=S?S:(0,v.jsx)(p.A,{"aria-labelledby":I,color:"inherit",size:16}),M=(0,o.A)({},d,{disabled:y,loading:A,loadingIndicator:k,loadingPosition:C,variant:E}),R=(e=>{const{loading:t,loadingPosition:r,classes:n}=e,i={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${(0,a.A)(r)}`],endIcon:[t&&`endIconLoading${(0,a.A)(r)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${(0,a.A)(r)}`]},s=(0,l.A)(i,g,n);return(0,o.A)({},n,s)})(M),P=A?(0,v.jsx)(x,{className:R.loadingIndicator,ownerState:M,children:k}):null;return(0,v.jsxs)(_,(0,o.A)({disabled:y||A,id:I,ref:t},T,{variant:E,classes:R,ownerState:M,children:["end"===M.loadingPosition?m:P,"end"===M.loadingPosition?P:m]}))}))},aipG:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=(r("TOwV"),r("juqV")),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("awfS"),d=r("G43+"),f=r("nPiN"),p=r("1vOf"),h=r("AcvT"),m=r("wDxH"),g=r("nKUr");const y=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],v=(0,l.Ay)(d.A,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${m.A.region}`]:t.region},t.root,!r.square&&t.rounded,!r.disableGutters&&t.gutters]}})((({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${m.A.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${m.A.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),(({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${m.A.expanded}`]:{margin:"16px 0"}}}]}))),b=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiAccordion"}),{children:l,className:d,defaultExpanded:b=!1,disabled:_=!1,disableGutters:x=!1,expanded:w,onChange:A,square:S=!1,slots:C={},slotProps:E={},TransitionComponent:T,TransitionProps:I}=r,k=(0,o.A)(r,y),[M,R]=(0,p.A)({controlled:w,default:b,name:"Accordion",state:"expanded"}),P=i.useCallback((e=>{R(!M),A&&A(e,!M)}),[M,A,R]),[O,...L]=i.Children.toArray(l),D=i.useMemo((()=>({expanded:M,disabled:_,disableGutters:x,toggle:P})),[M,_,x,P]),N=(0,n.A)({},r,{square:S,disabled:_,disableGutters:x,expanded:M}),F=(e=>{const{classes:t,square:r,expanded:n,disabled:o,disableGutters:i}=e,a={root:["root",!r&&"rounded",n&&"expanded",o&&"disabled",!i&&"gutters"],region:["region"]};return(0,s.A)(a,m.d,t)})(N),z=(0,n.A)({transition:T},C),B=(0,n.A)({transition:I},E),[j,U]=(0,h.A)("transition",{elementType:u.A,externalForwardedProps:{slots:z,slotProps:B},ownerState:N});return(0,g.jsxs)(v,(0,n.A)({className:(0,a.A)(F.root,d),ref:t,ownerState:N,square:S},k,{children:[(0,g.jsx)(f.A.Provider,{value:D,children:O}),(0,g.jsx)(j,(0,n.A)({in:M,timeout:"auto"},U,{children:(0,g.jsx)("div",{"aria-labelledby":O.props.id,id:O.props["aria-controls"],role:"region",className:F.region,children:L})}))]}))}))},nPiN:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext({})},wDxH:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,d:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAccordion",e)}const a=(0,n.A)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"])},fQ5S:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("zD2o"),d=r("nKUr");const f=["className"],p=(0,l.Ay)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({padding:e.spacing(1,2,2)}))),h=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiAccordionDetails"}),{className:i}=r,l=(0,o.A)(r,f),h=r,m=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},u.n,t)})(h);return(0,d.jsx)(p,(0,n.A)({className:(0,a.A)(m.root,i),ref:t,ownerState:h},l))}))},zD2o:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,n:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAccordionDetails",e)}const a=(0,n.A)("MuiAccordionDetails",["root"])},"1MYv":(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("+8pU"),d=r("nPiN"),f=r("33M2"),p=r("nKUr");const h=["children","className","expandIcon","focusVisibleClassName","onClick"],m=(0,l.Ay)(u.A,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${f.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${f.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${f.A.disabled})`]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{[`&.${f.A.expanded}`]:{minHeight:64}}}]}})),g=(0,l.Ay)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})((({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${f.A.expanded}`]:{margin:"20px 0"}}}]}))),y=(0,l.Ay)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})((({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${f.A.expanded}`]:{transform:"rotate(180deg)"}}))),v=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiAccordionSummary"}),{children:l,className:u,expandIcon:v,focusVisibleClassName:b,onClick:_}=r,x=(0,o.A)(r,h),{disabled:w=!1,disableGutters:A,expanded:S,toggle:C}=i.useContext(d.A),E=(0,n.A)({},r,{expanded:S,disabled:w,disableGutters:A}),T=(e=>{const{classes:t,expanded:r,disabled:n,disableGutters:o}=e,i={root:["root",r&&"expanded",n&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",r&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",r&&"expanded"]};return(0,s.A)(i,f.T,t)})(E);return(0,p.jsxs)(m,(0,n.A)({focusRipple:!1,disableRipple:!0,disabled:w,component:"div","aria-expanded":S,className:(0,a.A)(T.root,u),focusVisibleClassName:(0,a.A)(T.focusVisible,b),onClick:e=>{C&&C(e),_&&_(e)},ref:t,ownerState:E},x,{children:[(0,p.jsx)(g,{className:T.content,ownerState:E,children:l}),v&&(0,p.jsx)(y,{className:T.expandIconWrapper,ownerState:E,children:v})]}))}))},"33M2":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,T:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAccordionSummary",e)}const a=(0,n.A)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"])},gwor:(e,t,r)=>{"use strict";r.d(t,{A:()=>k});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("W9AN"),d=r("AcvT"),f=r("xeev"),p=r("G43+"),h=r("0g/e"),m=r("OGDC"),g=r("M7pN"),y=r("nKUr");const v=(0,g.A)((0,y.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),b=(0,g.A)((0,y.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),_=(0,g.A)((0,y.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),x=(0,g.A)((0,y.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined");var w=r("2i9d");const A=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],S=(0,c.Ay)(p.A,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,f.A)(r.color||r.severity)}`]]}})((({theme:e})=>{const t="light"===e.palette.mode?l.e$:l.a,r="light"===e.palette.mode?l.a:l.e$;return(0,o.A)({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter((([,e])=>e.main&&e.light)).map((([n])=>({props:{colorSeverity:n,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${n}StandardBg`]:r(e.palette[n].light,.9),[`& .${h.A.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}}))),...Object.entries(e.palette).filter((([,e])=>e.main&&e.light)).map((([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${h.A.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}}))),...Object.entries(e.palette).filter((([,e])=>e.main&&e.dark)).map((([t])=>({props:{colorSeverity:t,variant:"filled"},style:(0,o.A)({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)})})))]})})),C=(0,c.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),E=(0,c.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),T=(0,c.Ay)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),I={success:(0,y.jsx)(v,{fontSize:"inherit"}),warning:(0,y.jsx)(b,{fontSize:"inherit"}),error:(0,y.jsx)(_,{fontSize:"inherit"}),info:(0,y.jsx)(x,{fontSize:"inherit"})},k=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiAlert"}),{action:i,children:l,className:c,closeText:p="Close",color:g,components:v={},componentsProps:b={},icon:_,iconMapping:x=I,onClose:k,role:M="alert",severity:R="success",slotProps:P={},slots:O={},variant:L="standard"}=r,D=(0,n.A)(r,A),N=(0,o.A)({},r,{color:g,severity:R,variant:L,colorSeverity:g||R}),F=(e=>{const{variant:t,color:r,severity:n,classes:o}=e,i={root:["root",`color${(0,f.A)(r||n)}`,`${t}${(0,f.A)(r||n)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,s.A)(i,h.X,o)})(N),z={slots:(0,o.A)({closeButton:v.CloseButton,closeIcon:v.CloseIcon},O),slotProps:(0,o.A)({},b,P)},[B,j]=(0,d.A)("closeButton",{elementType:m.A,externalForwardedProps:z,ownerState:N}),[U,$]=(0,d.A)("closeIcon",{elementType:w.A,externalForwardedProps:z,ownerState:N});return(0,y.jsxs)(S,(0,o.A)({role:M,elevation:0,ownerState:N,className:(0,a.A)(F.root,c),ref:t},D,{children:[!1!==_?(0,y.jsx)(C,{ownerState:N,className:F.icon,children:_||x[R]||I[R]}):null,(0,y.jsx)(E,{ownerState:N,className:F.message,children:l}),null!=i?(0,y.jsx)(T,{ownerState:N,className:F.action,children:i}):null,null==i&&k?(0,y.jsx)(T,{ownerState:N,className:F.action,children:(0,y.jsx)(B,(0,o.A)({size:"small","aria-label":p,title:p,color:"inherit",onClick:k},j,{children:(0,y.jsx)(U,(0,o.A)({fontSize:"small"},$))}))}):null]}))}))},"0g/e":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,X:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAlert",e)}const a=(0,n.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"])},rzlW:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("Gqia"),d=r("SKrR"),f=r("nKUr");const p=["className"],h=(0,l.Ay)(u.A,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),m=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiAlertTitle"}),{className:i}=r,l=(0,o.A)(r,p),u=r,m=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.x,t)})(u);return(0,f.jsx)(h,(0,n.A)({gutterBottom:!0,component:"div",ownerState:u,ref:t,className:(0,a.A)(m.root,i)},l))}))},SKrR:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,x:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAlertTitle",e)}const a=(0,n.A)("MuiAlertTitle",["root"])},"8cYg":(e,t,r)=>{"use strict";r.d(t,{A:()=>G});var n,o,i=r("Nlia"),a=r("+9dH"),s=r("q1tI"),l=r("juqV"),c=r("aGM9"),u=r("dcYk"),d=r("RI6h"),f=r("usZy"),p=r("BkAX"),h=r("G43+"),m=r("OGDC"),g=r("Ifci"),y=r("Zqw4"),v=r("G5wc"),b=r("y9Q0"),_=r("XYkD"),x=r("2i9d"),w=r("smxg"),A=r("Vn7y"),S=r("W9AN"),C=r("zkiJ"),E=r("xeev"),T=r("ZfBw"),I=r("nKUr");const k=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],M=["ref"],R=["key"],P=["key"],O=(0,A.Ay)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{fullWidth:n,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=r;return[{[`& .${C.A.tag}`]:t.tag},{[`& .${C.A.tag}`]:t[`tagSize${(0,E.A)(s)}`]},{[`& .${C.A.inputRoot}`]:t.inputRoot},{[`& .${C.A.input}`]:t.input},{[`& .${C.A.input}`]:a&&t.inputFocused},t.root,n&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${C.A.focused} .${C.A.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${C.A.clearIndicator}`]:{visibility:"visible"}},[`& .${C.A.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${C.A.inputRoot}`]:{[`.${C.A.hasPopupIcon}&, .${C.A.hasClearIcon}&`]:{paddingRight:30},[`.${C.A.hasPopupIcon}.${C.A.hasClearIcon}&`]:{paddingRight:56},[`& .${C.A.input}`]:{width:0,minWidth:30}},[`& .${y.A.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${y.A.root}.${v.A.sizeSmall}`]:{[`& .${y.A.input}`]:{padding:"2px 4px 3px 0"}},[`& .${b.A.root}`]:{padding:9,[`.${C.A.hasPopupIcon}&, .${C.A.hasClearIcon}&`]:{paddingRight:39},[`.${C.A.hasPopupIcon}.${C.A.hasClearIcon}&`]:{paddingRight:65},[`& .${C.A.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${C.A.endAdornment}`]:{right:9}},[`& .${b.A.root}.${v.A.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${C.A.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${_.A.root}`]:{paddingTop:19,paddingLeft:8,[`.${C.A.hasPopupIcon}&, .${C.A.hasClearIcon}&`]:{paddingRight:39},[`.${C.A.hasPopupIcon}.${C.A.hasClearIcon}&`]:{paddingRight:65},[`& .${_.A.input}`]:{padding:"7px 4px"},[`& .${C.A.endAdornment}`]:{right:9}},[`& .${_.A.root}.${v.A.sizeSmall}`]:{paddingBottom:1,[`& .${_.A.input}`]:{padding:"2.5px 4px"}},[`& .${v.A.hiddenLabel}`]:{paddingTop:8},[`& .${_.A.root}.${v.A.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${C.A.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${_.A.root}.${v.A.hiddenLabel}.${v.A.sizeSmall}`]:{[`& .${C.A.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${C.A.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${C.A.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${C.A.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${C.A.inputRoot}`]:{flexWrap:"wrap"}}}]}),L=(0,A.Ay)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),D=(0,A.Ay)(m.A,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),N=(0,A.Ay)(m.A,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>(0,a.A)({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),F=(0,A.Ay)(f.A,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${C.A.option}`]:t.option},t.popper,r.disablePortal&&t.popperDisablePortal]}})((({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),z=(0,A.Ay)(h.A,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>(0,a.A)({},e.typography.body1,{overflow:"auto"}))),B=(0,A.Ay)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),j=(0,A.Ay)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),U=(0,A.Ay)("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${C.A.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${C.A.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${C.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,u.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${C.A.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,u.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${C.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,u.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),$=(0,A.Ay)(p.A,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),V=(0,A.Ay)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${C.A.option}`]:{paddingLeft:24}}),G=s.forwardRef((function(e,t){var r,u,p,m;const y=(0,S.b)({props:e,name:"MuiAutocomplete"}),{autoComplete:v=!1,autoHighlight:b=!1,autoSelect:_=!1,blurOnSelect:A=!1,ChipProps:G,className:H,clearIcon:W=n||(n=(0,I.jsx)(x.A,{fontSize:"small"})),clearOnBlur:q=!y.freeSolo,clearOnEscape:X=!1,clearText:Z="Clear",closeText:Y="Close",componentsProps:K={},defaultValue:J=(y.multiple?[]:null),disableClearable:Q=!1,disableCloseOnSelect:ee=!1,disabled:te=!1,disabledItemsFocusable:re=!1,disableListWrap:ne=!1,disablePortal:oe=!1,filterSelectedOptions:ie=!1,forcePopupIcon:ae="auto",freeSolo:se=!1,fullWidth:le=!1,getLimitTagsText:ce=e=>`+${e}`,getOptionLabel:ue,groupBy:de,handleHomeEndKeys:fe=!y.freeSolo,includeInputInList:pe=!1,limitTags:he=-1,ListboxComponent:me="ul",ListboxProps:ge,loading:ye=!1,loadingText:ve="Loading…",multiple:be=!1,noOptionsText:_e="No options",openOnFocus:xe=!1,openText:we="Open",PaperComponent:Ae=h.A,PopperComponent:Se=f.A,popupIcon:Ce=o||(o=(0,I.jsx)(w.A,{})),readOnly:Ee=!1,renderGroup:Te,renderInput:Ie,renderOption:ke,renderTags:Me,selectOnFocus:Re=!y.freeSolo,size:Pe="medium",slotProps:Oe={}}=y,Le=(0,i.A)(y,k),{getRootProps:De,getInputProps:Ne,getInputLabelProps:Fe,getPopupIndicatorProps:ze,getClearProps:Be,getTagProps:je,getListboxProps:Ue,getOptionProps:$e,value:Ve,dirty:Ge,expanded:He,id:We,popupOpen:qe,focused:Xe,focusedTag:Ze,anchorEl:Ye,setAnchorEl:Ke,inputValue:Je,groupedOptions:Qe}=(0,d.A)((0,a.A)({},y,{componentName:"Autocomplete"})),et=!Q&&!te&&Ge&&!Ee,tt=(!se||!0===ae)&&!1!==ae,{onMouseDown:rt}=Ne(),{ref:nt}=null!=ge?ge:{},ot=Ue(),{ref:it}=ot,at=(0,i.A)(ot,M),st=(0,T.A)(it,nt),lt=ue||(e=>{var t;return null!=(t=e.label)?t:e}),ct=(0,a.A)({},y,{disablePortal:oe,expanded:He,focused:Xe,fullWidth:le,getOptionLabel:lt,hasClearIcon:et,hasPopupIcon:tt,inputFocused:-1===Ze,popupOpen:qe,size:Pe}),ut=(e=>{const{classes:t,disablePortal:r,expanded:n,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:d}=e,f={root:["root",n&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${(0,E.A)(d)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",r&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,c.A)(f,C.r,t)})(ct);let dt;if(be&&Ve.length>0){const e=e=>(0,a.A)({className:ut.tag,disabled:te},je(e));dt=Me?Me(Ve,e,ct):Ve.map(((t,r)=>{const n=e({index:r}),{key:o}=n,s=(0,i.A)(n,R);return(0,I.jsx)(g.A,(0,a.A)({label:lt(t),size:Pe},s,G),o)}))}if(he>-1&&Array.isArray(dt)){const e=dt.length-he;!Xe&&e>0&&(dt=dt.splice(0,he),dt.push((0,I.jsx)("span",{className:ut.tag,children:ce(e)},dt.length)))}const ft=Te||(e=>(0,I.jsxs)("li",{children:[(0,I.jsx)($,{className:ut.groupLabel,ownerState:ct,component:"div",children:e.group}),(0,I.jsx)(V,{className:ut.groupUl,ownerState:ct,children:e.children})]},e.key)),pt=ke||((e,t)=>{const{key:r}=e,n=(0,i.A)(e,P);return(0,I.jsx)("li",(0,a.A)({},n,{children:lt(t)}),r)}),ht=(e,t)=>{const r=$e({option:e,index:t});return pt((0,a.A)({},r,{className:ut.option}),e,{selected:r["aria-selected"],index:t,inputValue:Je},ct)},mt=null!=(r=Oe.clearIndicator)?r:K.clearIndicator,gt=null!=(u=Oe.paper)?u:K.paper,yt=null!=(p=Oe.popper)?p:K.popper,vt=null!=(m=Oe.popupIndicator)?m:K.popupIndicator,bt=e=>(0,I.jsx)(F,(0,a.A)({as:Se,disablePortal:oe,style:{width:Ye?Ye.clientWidth:null},ownerState:ct,role:"presentation",anchorEl:Ye,open:qe},yt,{className:(0,l.A)(ut.popper,null==yt?void 0:yt.className),children:(0,I.jsx)(z,(0,a.A)({ownerState:ct,as:Ae},gt,{className:(0,l.A)(ut.paper,null==gt?void 0:gt.className),children:e}))}));let _t=null;return Qe.length>0?_t=bt((0,I.jsx)(U,(0,a.A)({as:me,className:ut.listbox,ownerState:ct},at,ge,{ref:st,children:Qe.map(((e,t)=>de?ft({key:e.key,group:e.group,children:e.options.map(((t,r)=>ht(t,e.index+r)))}):ht(e,t)))}))):ye&&0===Qe.length?_t=bt((0,I.jsx)(B,{className:ut.loading,ownerState:ct,children:ve})):0!==Qe.length||se||ye||(_t=bt((0,I.jsx)(j,{className:ut.noOptions,ownerState:ct,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:_e}))),(0,I.jsxs)(s.Fragment,{children:[(0,I.jsx)(O,(0,a.A)({ref:t,className:(0,l.A)(ut.root,H),ownerState:ct},De(Le),{children:Ie({id:We,disabled:te,fullWidth:!0,size:"small"===Pe?"small":void 0,InputLabelProps:Fe(),InputProps:(0,a.A)({ref:Ke,className:ut.inputRoot,startAdornment:dt,onClick:e=>{e.target===e.currentTarget&&rt(e)}},(et||tt)&&{endAdornment:(0,I.jsxs)(L,{className:ut.endAdornment,ownerState:ct,children:[et?(0,I.jsx)(D,(0,a.A)({},Be(),{"aria-label":Z,title:Z,ownerState:ct},mt,{className:(0,l.A)(ut.clearIndicator,null==mt?void 0:mt.className),children:W})):null,tt?(0,I.jsx)(N,(0,a.A)({},ze(),{disabled:te,"aria-label":qe?Y:we,title:qe?Y:we,ownerState:ct},vt,{className:(0,l.A)(ut.popupIndicator,null==vt?void 0:vt.className),children:Ce})):null]})}),inputProps:(0,a.A)({className:ut.input,disabled:te,readOnly:Ee},Ne())})})),Ye?_t:null]})}))},zkiJ:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,r:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAutocomplete",e)}const a=(0,n.A)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"])},PgD1:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("M7pN"),d=r("nKUr");const f=(0,u.A)((0,d.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");var p=r("/9V9"),h=r("AcvT");const m=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],g=(0,l.Ay)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],r.colorDefault&&t.colorDefault]}})((({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,o.A)({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:(0,o.A)({backgroundColor:e.palette.grey[400]},e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})))}]}))),y=(0,l.Ay)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),v=(0,l.Ay)(f,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"}),b=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiAvatar"}),{alt:l,children:u,className:f,component:b="div",slots:_={},slotProps:x={},imgProps:w,sizes:A,src:S,srcSet:C,variant:E="circular"}=r,T=(0,n.A)(r,m);let I=null;const k=function({crossOrigin:e,referrerPolicy:t,src:r,srcSet:n}){const[o,a]=i.useState(!1);return i.useEffect((()=>{if(!r&&!n)return;a(!1);let o=!0;const i=new Image;return i.onload=()=>{o&&a("loaded")},i.onerror=()=>{o&&a("error")},i.crossOrigin=e,i.referrerPolicy=t,i.src=r,n&&(i.srcset=n),()=>{o=!1}}),[e,t,r,n]),o}((0,o.A)({},w,{src:S,srcSet:C})),M=S||C,R=M&&"error"!==k,P=(0,o.A)({},r,{colorDefault:!R,component:b,variant:E}),O=(e=>{const{classes:t,variant:r,colorDefault:n}=e,o={root:["root",r,n&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,s.A)(o,p.k,t)})(P),[L,D]=(0,h.A)("img",{className:O.img,elementType:y,externalForwardedProps:{slots:_,slotProps:{img:(0,o.A)({},w,x.img)}},additionalProps:{alt:l,src:S,srcSet:C,sizes:A},ownerState:P});return I=R?(0,d.jsx)(L,(0,o.A)({},D)):u||0===u?u:M&&l?l[0]:(0,d.jsx)(v,{ownerState:P,className:O.fallback}),(0,d.jsx)(g,(0,o.A)({as:b,ownerState:P,className:(0,a.A)(O.root,f),ref:t},T,{children:I}))}))},"/9V9":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,k:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAvatar",e)}const a=(0,n.A)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"])},FLH5:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=(r("TOwV"),r("juqV")),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("/9V9"),d=r("PgD1"),f=r("mFFh"),p=r("nKUr");const h=["children","className","component","componentsProps","max","renderSurplus","slotProps","spacing","total","variant"],m={small:-16,medium:null},g=(0,l.Ay)("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>(0,o.A)({[`& .${f.A.avatar}`]:t.avatar},t.root)})((({theme:e,ownerState:t})=>{const r=t.spacing&&void 0!==m[t.spacing]?m[t.spacing]:-t.spacing;return{[`& .${u.A.root}`]:{border:`2px solid ${(e.vars||e).palette.background.default}`,boxSizing:"content-box",marginLeft:null!=r?r:-8,"&:last-child":{marginLeft:0}},display:"flex",flexDirection:"row-reverse"}})),y=i.forwardRef((function(e,t){var r;const l=(0,c.b)({props:e,name:"MuiAvatarGroup"}),{children:u,className:m,component:y="div",componentsProps:v={},max:b=5,renderSurplus:_,slotProps:x={},spacing:w="medium",total:A,variant:S="circular"}=l,C=(0,n.A)(l,h);let E=b<2?2:b;const T=(0,o.A)({},l,{max:b,spacing:w,component:y,variant:S}),I=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],avatar:["avatar"]},f.n,t)})(T),k=i.Children.toArray(u).filter((e=>i.isValidElement(e))),M=A||k.length;M===E&&(E+=1),E=Math.min(M+1,E);const R=Math.min(k.length,E-1),P=Math.max(M-E,M-R,0),O=_?_(P):`+${P}`,L=null!=(r=x.additionalAvatar)?r:v.additionalAvatar;return(0,p.jsxs)(g,(0,o.A)({as:y,ownerState:T,className:(0,a.A)(I.root,m),ref:t},C,{children:[P?(0,p.jsx)(d.A,(0,o.A)({variant:S},L,{className:(0,a.A)(I.avatar,null==L?void 0:L.className),children:O})):null,k.slice(0,R).reverse().map((e=>i.cloneElement(e,{className:(0,a.A)(e.props.className,I.avatar),variant:e.props.variant||S})))]}))}))},mFFh:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,n:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiAvatarGroup",e)}const a=(0,n.A)("MuiAvatarGroup",["root","avatar"])},"Sk+A":(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("hGmu"),d=r("/LIu"),f=r("nKUr");const p=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],h=(0,l.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})((({ownerState:e})=>(0,o.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),m=i.forwardRef((function(e,t){var r,i,l;const m=(0,c.b)({props:e,name:"MuiBackdrop"}),{children:g,className:y,component:v="div",components:b={},componentsProps:_={},invisible:x=!1,open:w,slotProps:A={},slots:S={},TransitionComponent:C=u.A,transitionDuration:E}=m,T=(0,n.A)(m,p),I=(0,o.A)({},m,{component:v,invisible:x}),k=(e=>{const{classes:t,invisible:r}=e,n={root:["root",r&&"invisible"]};return(0,s.A)(n,d.R,t)})(I),M=null!=(r=A.root)?r:_.root;return(0,f.jsx)(C,(0,o.A)({in:w,timeout:E},T,{children:(0,f.jsx)(h,(0,o.A)({"aria-hidden":!0},M,{as:null!=(i=null!=(l=S.root)?l:b.Root)?i:v,className:(0,a.A)(k.root,y,null==M?void 0:M.className),ownerState:(0,o.A)({},I,null==M?void 0:M.ownerState),classes:k,ref:t,children:g}))}))}))},"/LIu":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,R:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiBackdrop",e)}const a=(0,n.A)("MuiBackdrop",["root","invisible"])},"Ow/F":(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("VGa/"),l=r("aGM9"),c=r("0Ydi");var u=r("Vn7y"),d=r("W9AN"),f=r("xeev"),p=r("k30w"),h=r("nKUr");const m=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],g=(0,u.Ay)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),y=(0,u.Ay)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.badge,t[r.variant],t[`anchorOrigin${(0,f.A)(r.anchorOrigin.vertical)}${(0,f.A)(r.anchorOrigin.horizontal)}${(0,f.A)(r.overlap)}`],"default"!==r.color&&t[`color${(0,f.A)(r.color)}`],r.invisible&&t.invisible]}})((({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(t=e.vars)?t:e).palette).filter((t=>{var r,n;return(null!=(r=e.vars)?r:e).palette[t].main&&(null!=(n=e.vars)?n:e).palette[t].contrastText})).map((t=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${p.A.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}})),v=i.forwardRef((function(e,t){var r,i,u,v,b,_;const x=(0,d.b)({props:e,name:"MuiBadge"}),{anchorOrigin:w={vertical:"top",horizontal:"right"},className:A,component:S,components:C={},componentsProps:E={},children:T,overlap:I="rectangular",color:k="default",invisible:M=!1,max:R=99,badgeContent:P,slots:O,slotProps:L,showZero:D=!1,variant:N="standard"}=x,F=(0,o.A)(x,m),{badgeContent:z,invisible:B,max:j,displayValue:U}=function(e){const{badgeContent:t,invisible:r=!1,max:n=99,showZero:o=!1}=e,i=(0,s.A)({badgeContent:t,max:n});let a=r;!1!==r||0!==t||o||(a=!0);const{badgeContent:l,max:c=n}=a?i:e;return{badgeContent:l,invisible:a,max:c,displayValue:l&&Number(l)>c?`${c}+`:l}}({max:R,invisible:M,badgeContent:P,showZero:D}),$=(0,s.A)({anchorOrigin:w,color:k,overlap:I,variant:N,badgeContent:P}),V=B||null==z&&"dot"!==N,{color:G=k,overlap:H=I,anchorOrigin:W=w,variant:q=N}=V?$:x,X="dot"!==q?U:void 0,Z=(0,n.A)({},x,{badgeContent:z,invisible:V,max:j,displayValue:X,showZero:D,anchorOrigin:W,color:G,overlap:H,variant:q}),Y=(e=>{const{color:t,anchorOrigin:r,invisible:n,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,n&&"invisible",`anchorOrigin${(0,f.A)(r.vertical)}${(0,f.A)(r.horizontal)}`,`anchorOrigin${(0,f.A)(r.vertical)}${(0,f.A)(r.horizontal)}${(0,f.A)(o)}`,`overlap${(0,f.A)(o)}`,"default"!==t&&`color${(0,f.A)(t)}`]};return(0,l.A)(s,p.w,a)})(Z),K=null!=(r=null!=(i=null==O?void 0:O.root)?i:C.Root)?r:g,J=null!=(u=null!=(v=null==O?void 0:O.badge)?v:C.Badge)?u:y,Q=null!=(b=null==L?void 0:L.root)?b:E.root,ee=null!=(_=null==L?void 0:L.badge)?_:E.badge,te=(0,c.A)({elementType:K,externalSlotProps:Q,externalForwardedProps:F,additionalProps:{ref:t,as:S},ownerState:Z,className:(0,a.A)(null==Q?void 0:Q.className,Y.root,A)}),re=(0,c.A)({elementType:J,externalSlotProps:ee,ownerState:Z,className:(0,a.A)(Y.badge,null==ee?void 0:ee.className)});return(0,h.jsxs)(K,(0,n.A)({},te,{children:[T,(0,h.jsx)(J,(0,n.A)({},re,{children:X}))]}))}))},k30w:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,w:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiBadge",e)}const a=(0,n.A)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"])},U831:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("n+sr"),l=r("xTOY"),c=r("0kTp"),u=r("aoPf"),d=r("nKUr");const f=["className","component"];var p=r("Oory"),h=r("BlEZ"),m=r("WTO6"),g=r("ht/8");const y=(0,h.A)(),v=function(e={}){const{themeId:t,defaultTheme:r,defaultClassName:p="MuiBox-root",generateClassName:h}=e,m=(0,s.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(l.A);return i.forwardRef((function(e,i){const s=(0,u.A)(r),l=(0,c.A)(e),{className:g,component:y="div"}=l,v=(0,o.A)(l,f);return(0,d.jsx)(m,(0,n.A)({as:y,ref:i,className:(0,a.A)(g,h?h(p):p),theme:t&&s[t]||s},v))}))}({themeId:m.A,defaultTheme:y,defaultClassName:g.A.root,generateClassName:p.A.generate}),b=v},"ht/8":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=(0,r("PYeY").A)("MuiBox",["root"])},"5I82":(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("d70t"),l=r("aGM9"),c=r("dcYk"),u=r("Vn7y"),d=r("XM18"),f=r("W9AN"),p=r("+8pU"),h=r("xeev"),m=r("0ANx"),g=r("bann"),y=r("6z4e"),v=r("nKUr");const b=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],_=e=>(0,o.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),x=(0,u.Ay)(p.A,{shouldForwardProp:e=>(0,d.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,h.A)(r.color)}`],t[`size${(0,h.A)(r.size)}`],t[`${r.variant}Size${(0,h.A)(r.size)}`],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var r,n;const i="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],a="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return(0,o.A)({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":(0,o.A)({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":(0,o.A)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${m.A.focusVisible}`]:(0,o.A)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${m.A.disabled}`]:(0,o.A)({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${(0,c.X4)(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(r=(n=e.palette).getContrastText)?void 0:r.call(n,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${m.A.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${m.A.disabled}`]:{boxShadow:"none"}})),w=(0,u.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${(0,h.A)(r.size)}`]]}})((({ownerState:e})=>(0,o.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},_(e)))),A=(0,u.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${(0,h.A)(r.size)}`]]}})((({ownerState:e})=>(0,o.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},_(e)))),S=i.forwardRef((function(e,t){const r=i.useContext(g.A),c=i.useContext(y.A),u=(0,s.A)(r,e),d=(0,f.b)({props:u,name:"MuiButton"}),{children:p,color:_="primary",component:S="button",className:C,disabled:E=!1,disableElevation:T=!1,disableFocusRipple:I=!1,endIcon:k,focusVisibleClassName:M,fullWidth:R=!1,size:P="medium",startIcon:O,type:L,variant:D="text"}=d,N=(0,n.A)(d,b),F=(0,o.A)({},d,{color:_,component:S,disabled:E,disableElevation:T,disableFocusRipple:I,fullWidth:R,size:P,type:L,variant:D}),z=(e=>{const{color:t,disableElevation:r,fullWidth:n,size:i,variant:a,classes:s}=e,c={root:["root",a,`${a}${(0,h.A)(t)}`,`size${(0,h.A)(i)}`,`${a}Size${(0,h.A)(i)}`,`color${(0,h.A)(t)}`,r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${(0,h.A)(i)}`],endIcon:["icon","endIcon",`iconSize${(0,h.A)(i)}`]},u=(0,l.A)(c,m.B,s);return(0,o.A)({},s,u)})(F),B=O&&(0,v.jsx)(w,{className:z.startIcon,ownerState:F,children:O}),j=k&&(0,v.jsx)(A,{className:z.endIcon,ownerState:F,children:k}),U=c||"";return(0,v.jsxs)(x,(0,o.A)({ownerState:F,className:(0,a.A)(r.className,z.root,C,U),component:S,disabled:E,focusRipple:!I,focusVisibleClassName:(0,a.A)(z.focusVisible,M),ref:t,type:L},N,{classes:z,children:[B,p,j]}))}))},"0ANx":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,B:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiButton",e)}const a=(0,n.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"])},"+8pU":(e,t,r)=>{"use strict";r.d(t,{A:()=>O});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("ZfBw"),d=r("KXty"),f=r("8rms"),p=r("DLU/"),h=r("AeFk"),m=r("J13E"),g=r("nKUr");var y=r("Bz0O");const v=["center","classes","className"];let b,_,x,w,A=e=>e;const S=(0,h.i7)(b||(b=A` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `)),C=(0,h.i7)(_||(_=A` 0% { opacity: 1; } 100% { opacity: 0; } `)),E=(0,h.i7)(x||(x=A` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `)),T=(0,l.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),I=(0,l.Ay)((function(e){const{className:t,classes:r,pulsate:n=!1,rippleX:o,rippleY:s,rippleSize:l,in:c,onExited:u,timeout:d}=e,[f,p]=i.useState(!1),h=(0,a.A)(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),m={width:l,height:l,top:-l/2+s,left:-l/2+o},y=(0,a.A)(r.child,f&&r.childLeaving,n&&r.childPulsate);return c||f||p(!0),i.useEffect((()=>{if(!c&&null!=u){const e=setTimeout(u,d);return()=>{clearTimeout(e)}}}),[u,c,d]),(0,g.jsx)("span",{className:h,style:m,children:(0,g.jsx)("span",{className:y})})}),{name:"MuiTouchRipple",slot:"Ripple"})(w||(w=A` opacity: 0; position: absolute; &.${0} { opacity: 0.3; transform: scale(1); animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } &.${0} { animation-duration: ${0}ms; } & .${0} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${0} { opacity: 0; animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } & .${0} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${0}; animation-duration: 2500ms; animation-timing-function: ${0}; animation-iteration-count: infinite; animation-delay: 200ms; } `),y.A.rippleVisible,S,550,(({theme:e})=>e.transitions.easing.easeInOut),y.A.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),y.A.child,y.A.childLeaving,C,550,(({theme:e})=>e.transitions.easing.easeInOut),y.A.childPulsate,E,(({theme:e})=>e.transitions.easing.easeInOut)),k=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiTouchRipple"}),{center:s=!1,classes:l={},className:u}=r,d=(0,o.A)(r,v),[f,h]=i.useState([]),b=i.useRef(0),_=i.useRef(null);i.useEffect((()=>{_.current&&(_.current(),_.current=null)}),[f]);const x=i.useRef(!1),w=(0,m.A)(),A=i.useRef(null),S=i.useRef(null),C=i.useCallback((e=>{const{pulsate:t,rippleX:r,rippleY:n,rippleSize:o,cb:i}=e;h((e=>[...e,(0,g.jsx)(I,{classes:{ripple:(0,a.A)(l.ripple,y.A.ripple),rippleVisible:(0,a.A)(l.rippleVisible,y.A.rippleVisible),ripplePulsate:(0,a.A)(l.ripplePulsate,y.A.ripplePulsate),child:(0,a.A)(l.child,y.A.child),childLeaving:(0,a.A)(l.childLeaving,y.A.childLeaving),childPulsate:(0,a.A)(l.childPulsate,y.A.childPulsate)},timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:o},b.current)])),b.current+=1,_.current=i}),[l]),E=i.useCallback(((e={},t={},r=()=>{})=>{const{pulsate:n=!1,center:o=s||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&x.current)return void(x.current=!1);"touchstart"===(null==e?void 0:e.type)&&(x.current=!0);const a=i?null:S.current,l=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:r}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(r-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===A.current&&(A.current=()=>{C({pulsate:n,rippleX:c,rippleY:u,rippleSize:d,cb:r})},w.start(80,(()=>{A.current&&(A.current(),A.current=null)}))):C({pulsate:n,rippleX:c,rippleY:u,rippleSize:d,cb:r})}),[s,C,w]),k=i.useCallback((()=>{E({},{pulsate:!0})}),[E]),M=i.useCallback(((e,t)=>{if(w.clear(),"touchend"===(null==e?void 0:e.type)&&A.current)return A.current(),A.current=null,void w.start(0,(()=>{M(e,t)}));A.current=null,h((e=>e.length>0?e.slice(1):e)),_.current=t}),[w]);return i.useImperativeHandle(t,(()=>({pulsate:k,start:E,stop:M})),[k,E,M]),(0,g.jsx)(T,(0,n.A)({className:(0,a.A)(y.A.root,l.root,u),ref:S},d,{children:(0,g.jsx)(p.A,{component:null,exit:!0,children:f})}))}));var M=r("fy4x");const R=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],P=(0,l.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${M.A.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),O=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiButtonBase"}),{action:l,centerRipple:p=!1,children:h,className:m,component:y="button",disabled:v=!1,disableRipple:b=!1,disableTouchRipple:_=!1,focusRipple:x=!1,LinkComponent:w="a",onBlur:A,onClick:S,onContextMenu:C,onDragLeave:E,onFocus:T,onFocusVisible:I,onKeyDown:O,onKeyUp:L,onMouseDown:D,onMouseLeave:N,onMouseUp:F,onTouchEnd:z,onTouchMove:B,onTouchStart:j,tabIndex:U=0,TouchRippleProps:$,touchRippleRef:V,type:G}=r,H=(0,o.A)(r,R),W=i.useRef(null),q=i.useRef(null),X=(0,u.A)(q,V),{isFocusVisibleRef:Z,onFocus:Y,onBlur:K,ref:J}=(0,f.A)(),[Q,ee]=i.useState(!1);v&&Q&&ee(!1),i.useImperativeHandle(l,(()=>({focusVisible:()=>{ee(!0),W.current.focus()}})),[]);const[te,re]=i.useState(!1);i.useEffect((()=>{re(!0)}),[]);const ne=te&&!b&&!v;function oe(e,t,r=_){return(0,d.A)((n=>(t&&t(n),!r&&q.current&&q.current[e](n),!0)))}i.useEffect((()=>{Q&&x&&!b&&te&&q.current.pulsate()}),[b,x,Q,te]);const ie=oe("start",D),ae=oe("stop",C),se=oe("stop",E),le=oe("stop",F),ce=oe("stop",(e=>{Q&&e.preventDefault(),N&&N(e)})),ue=oe("start",j),de=oe("stop",z),fe=oe("stop",B),pe=oe("stop",(e=>{K(e),!1===Z.current&&ee(!1),A&&A(e)}),!1),he=(0,d.A)((e=>{W.current||(W.current=e.currentTarget),Y(e),!0===Z.current&&(ee(!0),I&&I(e)),T&&T(e)})),me=()=>{const e=W.current;return y&&"button"!==y&&!("A"===e.tagName&&e.href)},ge=i.useRef(!1),ye=(0,d.A)((e=>{x&&!ge.current&&Q&&q.current&&" "===e.key&&(ge.current=!0,q.current.stop(e,(()=>{q.current.start(e)}))),e.target===e.currentTarget&&me()&&" "===e.key&&e.preventDefault(),O&&O(e),e.target===e.currentTarget&&me()&&"Enter"===e.key&&!v&&(e.preventDefault(),S&&S(e))})),ve=(0,d.A)((e=>{x&&" "===e.key&&q.current&&Q&&!e.defaultPrevented&&(ge.current=!1,q.current.stop(e,(()=>{q.current.pulsate(e)}))),L&&L(e),S&&e.target===e.currentTarget&&me()&&" "===e.key&&!e.defaultPrevented&&S(e)}));let be=y;"button"===be&&(H.href||H.to)&&(be=w);const _e={};"button"===be?(_e.type=void 0===G?"button":G,_e.disabled=v):(H.href||H.to||(_e.role="button"),v&&(_e["aria-disabled"]=v));const xe=(0,u.A)(t,J,W),we=(0,n.A)({},r,{centerRipple:p,component:y,disabled:v,disableRipple:b,disableTouchRipple:_,focusRipple:x,tabIndex:U,focusVisible:Q}),Ae=(e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,i={root:["root",t&&"disabled",r&&"focusVisible"]},a=(0,s.A)(i,M.W,o);return r&&n&&(a.root+=` ${n}`),a})(we);return(0,g.jsxs)(P,(0,n.A)({as:be,className:(0,a.A)(Ae.root,m),ownerState:we,onBlur:pe,onClick:S,onContextMenu:ae,onFocus:he,onKeyDown:ye,onKeyUp:ve,onMouseDown:ie,onMouseLeave:ce,onMouseUp:le,onDragLeave:se,onTouchEnd:de,onTouchMove:fe,onTouchStart:ue,ref:xe,tabIndex:v?-1:U,type:G},_e,H,{children:[h,ne?(0,g.jsx)(k,(0,n.A)({ref:X,center:p},$)):null]}))}))},fy4x:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,W:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiButtonBase",e)}const a=(0,n.A)("MuiButtonBase",["root","disabled","focusVisible"])},Bz0O:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,O:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTouchRipple",e)}const a=(0,n.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"])},"6z4e":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext(void 0)},bann:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext({})},wYCo:(e,t,r)=>{"use strict";r.d(t,{A:()=>C});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("J1Ai"),u=r("M7pN"),d=r("nKUr");const f=(0,u.A)((0,d.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),p=(0,u.A)((0,d.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,u.A)((0,d.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var m=r("xeev"),g=r("W9AN"),y=r("Vn7y"),v=r("XM18"),b=r("Ifs3");const _=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],x=(0,y.Ay)(c.A,{shouldForwardProp:e=>(0,v.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${(0,m.A)(r.size)}`],"default"!==r.color&&t[`color${(0,m.A)(r.color)}`]]}})((({theme:e,ownerState:t})=>(0,o.A)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${b.A.checked}, &.${b.A.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${b.A.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),w=(0,d.jsx)(p,{}),A=(0,d.jsx)(f,{}),S=(0,d.jsx)(h,{}),C=i.forwardRef((function(e,t){var r,l;const c=(0,g.b)({props:e,name:"MuiCheckbox"}),{checkedIcon:u=w,color:f="primary",icon:p=A,indeterminate:h=!1,indeterminateIcon:y=S,inputProps:v,size:C="medium",className:E}=c,T=(0,n.A)(c,_),I=h?y:p,k=h?y:u,M=(0,o.A)({},c,{color:f,indeterminate:h,size:C}),R=(e=>{const{classes:t,indeterminate:r,color:n,size:i}=e,a={root:["root",r&&"indeterminate",`color${(0,m.A)(n)}`,`size${(0,m.A)(i)}`]},l=(0,s.A)(a,b.w,t);return(0,o.A)({},t,l)})(M);return(0,d.jsx)(x,(0,o.A)({type:"checkbox",inputProps:(0,o.A)({"data-indeterminate":h},v),icon:i.cloneElement(I,{fontSize:null!=(r=I.props.fontSize)?r:C}),checkedIcon:i.cloneElement(k,{fontSize:null!=(l=k.props.fontSize)?l:C}),ownerState:M,ref:t,className:(0,a.A)(R.root,E)},T,{classes:R}))}))},Ifs3:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,w:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiCheckbox",e)}const a=(0,n.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"])},Ifci:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("M7pN"),u=r("nKUr");const d=(0,c.A)((0,u.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");var f=r("ZfBw"),p=r("xeev"),h=r("+8pU"),m=r("W9AN"),g=r("Vn7y"),y=r("wmaj");const v=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],b=(0,g.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{color:n,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=r;return[{[`& .${y.A.avatar}`]:t.avatar},{[`& .${y.A.avatar}`]:t[`avatar${(0,p.A)(s)}`]},{[`& .${y.A.avatar}`]:t[`avatarColor${(0,p.A)(n)}`]},{[`& .${y.A.icon}`]:t.icon},{[`& .${y.A.icon}`]:t[`icon${(0,p.A)(s)}`]},{[`& .${y.A.icon}`]:t[`iconColor${(0,p.A)(o)}`]},{[`& .${y.A.deleteIcon}`]:t.deleteIcon},{[`& .${y.A.deleteIcon}`]:t[`deleteIcon${(0,p.A)(s)}`]},{[`& .${y.A.deleteIcon}`]:t[`deleteIconColor${(0,p.A)(n)}`]},{[`& .${y.A.deleteIcon}`]:t[`deleteIcon${(0,p.A)(l)}Color${(0,p.A)(n)}`]},t.root,t[`size${(0,p.A)(s)}`],t[`color${(0,p.A)(n)}`],i&&t.clickable,i&&"default"!==n&&t[`clickableColor${(0,p.A)(n)})`],a&&t.deletable,a&&"default"!==n&&t[`deletableColor${(0,p.A)(n)}`],t[l],t[`${l}${(0,p.A)(n)}`]]}})((({theme:e,ownerState:t})=>{const r="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return(0,o.A)({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${y.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${y.A.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:r,fontSize:e.typography.pxToRem(12)},[`& .${y.A.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${y.A.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${y.A.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${y.A.icon}`]:(0,o.A)({marginLeft:5,marginRight:-6},"small"===t.size&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&(0,o.A)({color:e.vars?e.vars.palette.Chip.defaultIconColor:r},"default"!==t.color&&{color:"inherit"})),[`& .${y.A.deleteIcon}`]:(0,o.A)({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:(0,l.X4)(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,l.X4)(e.palette.text.primary,.4)}},"small"===t.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==t.color&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:(0,l.X4)(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},"small"===t.size&&{height:24},"default"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${y.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&"default"!==t.color&&{[`&.${y.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})}),(({theme:e,ownerState:t})=>(0,o.A)({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${y.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&"default"!==t.color&&{[`&:hover, &.${y.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})),(({theme:e,ownerState:t})=>(0,o.A)({},"outlined"===t.variant&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${y.A.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${y.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${y.A.avatar}`]:{marginLeft:4},[`& .${y.A.avatarSmall}`]:{marginLeft:2},[`& .${y.A.icon}`]:{marginLeft:4},[`& .${y.A.iconSmall}`]:{marginLeft:2},[`& .${y.A.deleteIcon}`]:{marginRight:5},[`& .${y.A.deleteIconSmall}`]:{marginRight:3}},"outlined"===t.variant&&"default"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,l.X4)(e.palette[t.color].main,.7)}`,[`&.${y.A.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${y.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,l.X4)(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${y.A.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,l.X4)(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}}))),_=(0,g.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:r}=e,{size:n}=r;return[t.label,t[`label${(0,p.A)(n)}`]]}})((({ownerState:e})=>(0,o.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===e.variant&&{paddingLeft:11,paddingRight:11},"small"===e.size&&{paddingLeft:8,paddingRight:8},"small"===e.size&&"outlined"===e.variant&&{paddingLeft:7,paddingRight:7})));function x(e){return"Backspace"===e.key||"Delete"===e.key}const w=i.forwardRef((function(e,t){const r=(0,m.b)({props:e,name:"MuiChip"}),{avatar:l,className:c,clickable:g,color:w="default",component:A,deleteIcon:S,disabled:C=!1,icon:E,label:T,onClick:I,onDelete:k,onKeyDown:M,onKeyUp:R,size:P="medium",variant:O="filled",tabIndex:L,skipFocusWhenDisabled:D=!1}=r,N=(0,n.A)(r,v),F=i.useRef(null),z=(0,f.A)(F,t),B=e=>{e.stopPropagation(),k&&k(e)},j=!(!1===g||!I)||g,U=j||k?h.A:A||"div",$=(0,o.A)({},r,{component:U,disabled:C,size:P,color:w,iconColor:i.isValidElement(E)&&E.props.color||w,onDelete:!!k,clickable:j,variant:O}),V=(e=>{const{classes:t,disabled:r,size:n,color:o,iconColor:i,onDelete:a,clickable:l,variant:c}=e,u={root:["root",c,r&&"disabled",`size${(0,p.A)(n)}`,`color${(0,p.A)(o)}`,l&&"clickable",l&&`clickableColor${(0,p.A)(o)}`,a&&"deletable",a&&`deletableColor${(0,p.A)(o)}`,`${c}${(0,p.A)(o)}`],label:["label",`label${(0,p.A)(n)}`],avatar:["avatar",`avatar${(0,p.A)(n)}`,`avatarColor${(0,p.A)(o)}`],icon:["icon",`icon${(0,p.A)(n)}`,`iconColor${(0,p.A)(i)}`],deleteIcon:["deleteIcon",`deleteIcon${(0,p.A)(n)}`,`deleteIconColor${(0,p.A)(o)}`,`deleteIcon${(0,p.A)(c)}Color${(0,p.A)(o)}`]};return(0,s.A)(u,y.f,t)})($),G=U===h.A?(0,o.A)({component:A||"div",focusVisibleClassName:V.focusVisible},k&&{disableRipple:!0}):{};let H=null;k&&(H=S&&i.isValidElement(S)?i.cloneElement(S,{className:(0,a.A)(S.props.className,V.deleteIcon),onClick:B}):(0,u.jsx)(d,{className:(0,a.A)(V.deleteIcon),onClick:B}));let W=null;l&&i.isValidElement(l)&&(W=i.cloneElement(l,{className:(0,a.A)(V.avatar,l.props.className)}));let q=null;return E&&i.isValidElement(E)&&(q=i.cloneElement(E,{className:(0,a.A)(V.icon,E.props.className)})),(0,u.jsxs)(b,(0,o.A)({as:U,className:(0,a.A)(V.root,c),disabled:!(!j||!C)||void 0,onClick:I,onKeyDown:e=>{e.currentTarget===e.target&&x(e)&&e.preventDefault(),M&&M(e)},onKeyUp:e=>{e.currentTarget===e.target&&(k&&x(e)?k(e):"Escape"===e.key&&F.current&&F.current.blur()),R&&R(e)},ref:z,tabIndex:D&&C?-1:L,ownerState:$},G,N,{children:[W||q,(0,u.jsx)(_,{className:(0,a.A)(V.label),ownerState:$,children:T}),H]}))}))},wmaj:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,f:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiChip",e)}const a=(0,n.A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"])},yXLF:(e,t,r)=>{"use strict";r.d(t,{A:()=>C});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("AeFk"),c=r("xeev"),u=r("W9AN"),d=r("Vn7y"),f=r("SYse"),p=r("nKUr");const h=["className","color","disableShrink","size","style","thickness","value","variant"];let m,g,y,v,b=e=>e;const _=(0,l.i7)(m||(m=b` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `)),x=(0,l.i7)(g||(g=b` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } `)),w=(0,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,c.A)(r.color)}`]]}})((({ownerState:e,theme:t})=>(0,o.A)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main})),(({ownerState:e})=>"indeterminate"===e.variant&&(0,l.AH)(y||(y=b` animation: ${0} 1.4s linear infinite; `),_))),A=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),S=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${(0,c.A)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})((({ownerState:e,theme:t})=>(0,o.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})),(({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&(0,l.AH)(v||(v=b` animation: ${0} 1.4s ease-in-out infinite; `),x))),C=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiCircularProgress"}),{className:i,color:l="primary",disableShrink:d=!1,size:m=40,style:g,thickness:y=3.6,value:v=0,variant:b="indeterminate"}=r,_=(0,n.A)(r,h),x=(0,o.A)({},r,{color:l,disableShrink:d,size:m,thickness:y,value:v,variant:b}),C=(e=>{const{classes:t,variant:r,color:n,disableShrink:o}=e,i={root:["root",r,`color${(0,c.A)(n)}`],svg:["svg"],circle:["circle",`circle${(0,c.A)(r)}`,o&&"circleDisableShrink"]};return(0,s.A)(i,f.b,t)})(x),E={},T={},I={};if("determinate"===b){const e=2*Math.PI*((44-y)/2);E.strokeDasharray=e.toFixed(3),I["aria-valuenow"]=Math.round(v),E.strokeDashoffset=`${((100-v)/100*e).toFixed(3)}px`,T.transform="rotate(-90deg)"}return(0,p.jsx)(w,(0,o.A)({className:(0,a.A)(C.root,i),style:(0,o.A)({width:m,height:m},T,g),ownerState:x,ref:t,role:"progressbar"},I,_,{children:(0,p.jsx)(A,{className:C.svg,ownerState:x,viewBox:"22 22 44 44",children:(0,p.jsx)(S,{className:C.circle,style:E,ownerState:x,cx:44,cy:44,r:(44-y)/2,fill:"none",strokeWidth:y})})}))}))},SYse:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,b:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiCircularProgress",e)}const a=(0,n.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"])},zX2i:(e,t,r)=>{"use strict";r.d(t,{x:()=>c});var n=r("q1tI"),o=r("N0rN"),i=r("nXnS"),a=r("p4lV"),s=r("nKUr");function l(e){return e.substring(2).toLowerCase()}function c(e){const{children:t,disableReactTree:r=!1,mouseEvent:c="onClick",onClickAway:u,touchEvent:d="onTouchEnd"}=e,f=n.useRef(!1),p=n.useRef(null),h=n.useRef(!1),m=n.useRef(!1);n.useEffect((()=>(setTimeout((()=>{h.current=!0}),0),()=>{h.current=!1})),[]);const g=(0,o.A)(t.ref,p),y=(0,i.A)((e=>{const t=m.current;m.current=!1;const n=(0,a.A)(p.current);if(!h.current||!p.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth-1:!n.documentElement.contains(e.target)||p.current.contains(e.target),o||!r&&t||u(e)})),v=e=>r=>{m.current=!0;const n=t.props[e];n&&n(r)},b={ref:g};return!1!==d&&(b[d]=v(d)),n.useEffect((()=>{if(!1!==d){const e=l(d),t=(0,a.A)(p.current),r=()=>{f.current=!0};return t.addEventListener(e,y),t.addEventListener("touchmove",r),()=>{t.removeEventListener(e,y),t.removeEventListener("touchmove",r)}}}),[y,d]),!1!==c&&(b[c]=v(c)),n.useEffect((()=>{if(!1!==c){const e=l(c),t=(0,a.A)(p.current);return t.addEventListener(e,y),()=>{t.removeEventListener(e,y)}}}),[y,c]),(0,s.jsx)(n.Fragment,{children:n.cloneElement(t,b)})}},awfS:(e,t,r)=>{"use strict";r.d(t,{A:()=>A});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("XOob"),l=r("J13E"),c=r("aGM9"),u=r("Vn7y"),d=r("W9AN"),f=r("hqVE"),p=r("AiGX"),h=r("UnQg"),m=r("ZfBw"),g=r("LwNo"),y=r("nKUr");const v=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],b=(0,u.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],"entered"===r.state&&t.entered,"exited"===r.state&&!r.in&&"0px"===r.collapsedSize&&t.hidden]}})((({theme:e,ownerState:t})=>(0,o.A)({height:0,overflow:"hidden",transition:e.transitions.create("height")},"horizontal"===t.orientation&&{height:"auto",width:0,transition:e.transitions.create("width")},"entered"===t.state&&(0,o.A)({height:"auto",overflow:"visible"},"horizontal"===t.orientation&&{width:"auto"}),"exited"===t.state&&!t.in&&"0px"===t.collapsedSize&&{visibility:"hidden"}))),_=(0,u.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})((({ownerState:e})=>(0,o.A)({display:"flex",width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"}))),x=(0,u.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})((({ownerState:e})=>(0,o.A)({width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"}))),w=i.forwardRef((function(e,t){const r=(0,d.b)({props:e,name:"MuiCollapse"}),{addEndListener:u,children:w,className:A,collapsedSize:S="0px",component:C,easing:E,in:T,onEnter:I,onEntered:k,onEntering:M,onExit:R,onExited:P,onExiting:O,orientation:L="vertical",style:D,timeout:N=f.p0.standard,TransitionComponent:F=s.Ay}=r,z=(0,n.A)(r,v),B=(0,o.A)({},r,{orientation:L,collapsedSize:S}),j=(e=>{const{orientation:t,classes:r}=e,n={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,c.A)(n,g.E,r)})(B),U=(0,h.A)(),$=(0,l.A)(),V=i.useRef(null),G=i.useRef(),H="number"==typeof S?`${S}px`:S,W="horizontal"===L,q=W?"width":"height",X=i.useRef(null),Z=(0,m.A)(t,X),Y=e=>t=>{if(e){const r=X.current;void 0===t?e(r):e(r,t)}},K=()=>V.current?V.current[W?"clientWidth":"clientHeight"]:0,J=Y(((e,t)=>{V.current&&W&&(V.current.style.position="absolute"),e.style[q]=H,I&&I(e,t)})),Q=Y(((e,t)=>{const r=K();V.current&&W&&(V.current.style.position="");const{duration:n,easing:o}=(0,p.c)({style:D,timeout:N,easing:E},{mode:"enter"});if("auto"===N){const t=U.transitions.getAutoHeightDuration(r);e.style.transitionDuration=`${t}ms`,G.current=t}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[q]=`${r}px`,e.style.transitionTimingFunction=o,M&&M(e,t)})),ee=Y(((e,t)=>{e.style[q]="auto",k&&k(e,t)})),te=Y((e=>{e.style[q]=`${K()}px`,R&&R(e)})),re=Y(P),ne=Y((e=>{const t=K(),{duration:r,easing:n}=(0,p.c)({style:D,timeout:N,easing:E},{mode:"exit"});if("auto"===N){const r=U.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${r}ms`,G.current=r}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[q]=H,e.style.transitionTimingFunction=n,O&&O(e)}));return(0,y.jsx)(F,(0,o.A)({in:T,onEnter:J,onEntered:ee,onEntering:Q,onExit:te,onExited:re,onExiting:ne,addEndListener:e=>{"auto"===N&&$.start(G.current||0,e),u&&u(X.current,e)},nodeRef:X,timeout:"auto"===N?null:N},z,{children:(e,t)=>(0,y.jsx)(b,(0,o.A)({as:C,className:(0,a.A)(j.root,A,{entered:j.entered,exited:!T&&"0px"===H&&j.hidden}[e]),style:(0,o.A)({[W?"minWidth":"minHeight"]:H},D),ref:Z},t,{ownerState:(0,o.A)({},B,{state:e}),children:(0,y.jsx)(_,{ownerState:(0,o.A)({},B,{state:e}),className:j.wrapper,ref:V,children:(0,y.jsx)(x,{ownerState:(0,o.A)({},B,{state:e}),className:j.wrapperInner,children:w})})}))}))}));w.muiSupportAuto=!0;const A=w},LwNo:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,E:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiCollapse",e)}const a=(0,n.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"])},"8JWP":(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("TkYO"),l=r("aGM9"),c=r("unMj"),u=r("sdrl"),d=r("M82X"),f=r("Tazo"),p=r("nKUr");const h=["className","component","disableGutters","fixed","maxWidth","classes"],m=(0,f.A)(),g=(0,d.A)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${(0,c.A)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),y=e=>(0,u.A)({props:e,name:"MuiContainer",defaultTheme:m});var v=r("xeev"),b=r("Vn7y"),_=r("W9AN");const x=function(e={}){const{createStyledComponent:t=g,useThemeProps:r=y,componentName:u="MuiContainer"}=e,d=t((({theme:e,ownerState:t})=>(0,o.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}})),(({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce(((t,r)=>{const n=r,o=e.breakpoints.values[n];return 0!==o&&(t[e.breakpoints.up(n)]={maxWidth:`${o}${e.breakpoints.unit}`}),t}),{})),(({theme:e,ownerState:t})=>(0,o.A)({},"xs"===t.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},t.maxWidth&&"xs"!==t.maxWidth&&{[e.breakpoints.up(t.maxWidth)]:{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`}}))),f=i.forwardRef((function(e,t){const i=r(e),{className:f,component:m="div",disableGutters:g=!1,fixed:y=!1,maxWidth:v="lg"}=i,b=(0,n.A)(i,h),_=(0,o.A)({},i,{component:m,disableGutters:g,fixed:y,maxWidth:v}),x=((e,t)=>{const{classes:r,fixed:n,disableGutters:o,maxWidth:i}=e,a={root:["root",i&&`maxWidth${(0,c.A)(String(i))}`,n&&"fixed",o&&"disableGutters"]};return(0,l.A)(a,(e=>(0,s.Ay)(t,e)),r)})(_,u);return(0,p.jsx)(d,(0,o.A)({as:m,ownerState:_,className:(0,a.A)(x.root,f),ref:t},b))}));return f}({createStyledComponent:(0,b.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${(0,v.A)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,_.b)({props:e,name:"MuiContainer"})}),w=x},L9aa:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>u,qy:()=>l,rf:()=>c});var n=r("+9dH"),o=r("q1tI"),i=r("W9AN"),a=r("SIzN"),s=r("nKUr");const l=(e,t)=>(0,n.A)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),c=e=>(0,n.A)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),u=function(e){const t=(0,i.b)({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:u=!1}=t;return(0,s.jsxs)(o.Fragment,{children:[(0,s.jsx)(a.A,{styles:e=>((e,t=!1)=>{var r;const o={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach((([t,r])=>{var n;o[e.getColorSchemeSelector(t).replace(/\s*&/,"")]={colorScheme:null==(n=r.palette)?void 0:n.mode}}));let i=(0,n.A)({html:l(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,n.A)({margin:0},c(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},o);const a=null==(r=e.components)||null==(r=r.MuiCssBaseline)?void 0:r.styleOverrides;return a&&(i=[i,a]),i})(e,u)}),r]})}},W9AN:(e,t,r)=>{"use strict";r.d(t,{b:()=>o}),r("q1tI");var n=r("jAoP");function o(e){return(0,n.b)(e)}r("nKUr")},umvS:(e,t,r)=>{"use strict";r.d(t,{A:()=>C});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("A3c4"),c=r("xeev"),u=r("X6EC"),d=r("hGmu"),f=r("G43+"),p=r("W9AN"),h=r("Vn7y"),m=r("plnp"),g=r("aMd+"),y=r("Sk+A"),v=r("UnQg"),b=r("nKUr");const _=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],x=(0,h.Ay)(y.A,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),w=(0,h.Ay)(u.A,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),A=(0,h.Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.container,t[`scroll${(0,c.A)(r.scroll)}`]]}})((({ownerState:e})=>(0,o.A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),S=(0,h.Ay)(f.A,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`scrollPaper${(0,c.A)(r.scroll)}`],t[`paperWidth${(0,c.A)(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})((({theme:e,ownerState:t})=>(0,o.A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===t.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===t.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===t.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${m.A.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&"xs"!==t.maxWidth&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${m.A.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${m.A.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}))),C=i.forwardRef((function(e,t){const r=(0,p.b)({props:e,name:"MuiDialog"}),u=(0,v.A)(),h={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{"aria-describedby":y,"aria-labelledby":C,BackdropComponent:E,BackdropProps:T,children:I,className:k,disableEscapeKeyDown:M=!1,fullScreen:R=!1,fullWidth:P=!1,maxWidth:O="sm",onBackdropClick:L,onClick:D,onClose:N,open:F,PaperComponent:z=f.A,PaperProps:B={},scroll:j="paper",TransitionComponent:U=d.A,transitionDuration:$=h,TransitionProps:V}=r,G=(0,n.A)(r,_),H=(0,o.A)({},r,{disableEscapeKeyDown:M,fullScreen:R,fullWidth:P,maxWidth:O,scroll:j}),W=(e=>{const{classes:t,scroll:r,maxWidth:n,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${(0,c.A)(r)}`],paper:["paper",`paperScroll${(0,c.A)(r)}`,`paperWidth${(0,c.A)(String(n))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return(0,s.A)(a,m.f,t)})(H),q=i.useRef(),X=(0,l.A)(C),Z=i.useMemo((()=>({titleId:X})),[X]);return(0,b.jsx)(w,(0,o.A)({className:(0,a.A)(W.root,k),closeAfterTransition:!0,components:{Backdrop:x},componentsProps:{backdrop:(0,o.A)({transitionDuration:$,as:E},T)},disableEscapeKeyDown:M,onClose:N,open:F,ref:t,onClick:e=>{D&&D(e),q.current&&(q.current=null,L&&L(e),N&&N(e,"backdropClick"))},ownerState:H},G,{children:(0,b.jsx)(U,(0,o.A)({appear:!0,in:F,timeout:$,role:"presentation"},V,{children:(0,b.jsx)(A,{className:(0,a.A)(W.container),onMouseDown:e=>{q.current=e.target===e.currentTarget},ownerState:H,children:(0,b.jsx)(S,(0,o.A)({as:z,elevation:24,role:"dialog","aria-describedby":y,"aria-labelledby":X},B,{className:(0,a.A)(W.paper,B.className),ownerState:H,children:(0,b.jsx)(g.A.Provider,{value:Z,children:I})}))})}))}))}))},"aMd+":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext({})},plnp:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,f:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDialog",e)}const a=(0,n.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"])},TFnf:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("CnVR"),d=r("nKUr");const f=["className","disableSpacing"],p=(0,l.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})((({ownerState:e})=>(0,o.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}}))),h=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:l=!1}=r,h=(0,n.A)(r,f),m=(0,o.A)({},r,{disableSpacing:l}),g=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,s.A)(n,u.C,t)})(m);return(0,d.jsx)(p,(0,o.A)({className:(0,a.A)(g.root,i),ownerState:m,ref:t},h))}))},CnVR:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,C:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDialogActions",e)}const a=(0,n.A)("MuiDialogActions",["root","spacing"])},GVSF:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("KUP3"),d=r("HaXu"),f=r("nKUr");const p=["className","dividers"],h=(0,l.Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dividers&&t.dividers]}})((({theme:e,ownerState:t})=>(0,o.A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${d.A.root} + &`]:{paddingTop:0}}))),m=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiDialogContent"}),{className:i,dividers:l=!1}=r,d=(0,n.A)(r,p),m=(0,o.A)({},r,{dividers:l}),g=(e=>{const{classes:t,dividers:r}=e,n={root:["root",r&&"dividers"]};return(0,s.A)(n,u.E,t)})(m);return(0,f.jsx)(h,(0,o.A)({className:(0,a.A)(g.root,i),ownerState:m,ref:t},d))}))},KUP3:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,E:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDialogContent",e)}const a=(0,n.A)("MuiDialogContent",["root","dividers"])},akmu:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("XM18"),u=r("W9AN"),d=r("Gqia"),f=r("PTxh"),p=r("nKUr");const h=["children","className"],m=(0,l.Ay)(d.A,{shouldForwardProp:e=>(0,c.A)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),g=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiDialogContentText"}),{className:i}=r,l=(0,n.A)(r,h),c=(e=>{const{classes:t}=e,r=(0,s.A)({root:["root"]},f.D,t);return(0,o.A)({},t,r)})(l);return(0,p.jsx)(m,(0,o.A)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:l,className:(0,a.A)(c.root,i)},r,{classes:c}))}))},PTxh:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,D:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDialogContentText",e)}const a=(0,n.A)("MuiDialogContentText",["root"])},b7jQ:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Gqia"),c=r("Vn7y"),u=r("W9AN"),d=r("HaXu"),f=r("aMd+"),p=r("nKUr");const h=["className","id"],m=(0,c.Ay)(l.A,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),g=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiDialogTitle"}),{className:l,id:c}=r,g=(0,o.A)(r,h),y=r,v=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.t,t)})(y),{titleId:b=c}=i.useContext(f.A);return(0,p.jsx)(m,(0,n.A)({component:"h2",className:(0,a.A)(v.root,l),ownerState:y,ref:t,variant:"h6",id:null!=c?c:b},g))}))},HaXu:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,t:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDialogTitle",e)}const a=(0,n.A)("MuiDialogTitle",["root"])},"A+QN":(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("W9AN"),d=r("WOV/"),f=r("nKUr");const p=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],h=(0,c.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})((({theme:e,ownerState:t})=>(0,o.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,l.X4)(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:e})=>(0,o.A)({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>(0,o.A)({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}})),(({theme:e,ownerState:t})=>(0,o.A)({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}})),(({ownerState:e})=>(0,o.A)({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),m=(0,c.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>(0,o.A)({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}))),g=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiDivider"}),{absolute:i=!1,children:l,className:c,component:g=(l?"div":"hr"),flexItem:y=!1,light:v=!1,orientation:b="horizontal",role:_=("hr"!==g?"separator":void 0),textAlign:x="center",variant:w="fullWidth"}=r,A=(0,n.A)(r,p),S=(0,o.A)({},r,{absolute:i,component:g,flexItem:y,light:v,orientation:b,role:_,textAlign:x,variant:w}),C=(e=>{const{absolute:t,children:r,classes:n,flexItem:o,light:i,orientation:a,textAlign:l,variant:c}=e,u={root:["root",t&&"absolute",c,i&&"light","vertical"===a&&"vertical",o&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===l&&"vertical"!==a&&"textAlignRight","left"===l&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]};return(0,s.A)(u,d.K,n)})(S);return(0,f.jsx)(h,(0,o.A)({as:g,className:(0,a.A)(C.root,c),role:_,ref:t,ownerState:S},A,{children:l?(0,f.jsx)(m,{className:C.wrapper,ownerState:S,children:l}):null}))}));g.muiSkipListHighlight=!0;const y=g},"WOV/":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,K:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiDivider",e)}const a=(0,n.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"])},hGmu:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("XOob"),s=r("UnQg"),l=r("AiGX"),c=r("ZfBw"),u=r("nKUr");const d=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],f={entering:{opacity:1},entered:{opacity:1}},p=i.forwardRef((function(e,t){const r=(0,s.A)(),p={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:h,appear:m=!0,children:g,easing:y,in:v,onEnter:b,onEntered:_,onEntering:x,onExit:w,onExited:A,onExiting:S,style:C,timeout:E=p,TransitionComponent:T=a.Ay}=e,I=(0,o.A)(e,d),k=i.useRef(null),M=(0,c.A)(k,g.ref,t),R=e=>t=>{if(e){const r=k.current;void 0===t?e(r):e(r,t)}},P=R(x),O=R(((e,t)=>{(0,l.q)(e);const n=(0,l.c)({style:C,timeout:E,easing:y},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),b&&b(e,t)})),L=R(_),D=R(S),N=R((e=>{const t=(0,l.c)({style:C,timeout:E,easing:y},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),w&&w(e)})),F=R(A);return(0,u.jsx)(T,(0,n.A)({appear:m,in:v,nodeRef:k,onEnter:O,onEntered:L,onEntering:P,onExit:N,onExited:F,onExiting:D,addEndListener:e=>{h&&h(k.current,e)},timeout:E},I,{children:(e,t)=>i.cloneElement(g,(0,n.A)({style:(0,n.A)({opacity:0,visibility:"exited"!==e||v?void 0:"hidden"},f[e],C,g.props.style),ref:M},t))}))}))},fJ4Q:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("w9Qe"),s=r("aGM9"),l=r("kmWS"),c=r("Vn7y"),u=r("XM18"),d=r("W9AN"),f=r("XYkD"),p=r("nKUr");const h=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],m=(0,c.Ay)(l.Sh,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...(0,l.WC)(e,t),!r.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{var r;const n="light"===e.palette.mode,i=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,o.A)({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a}},[`&.${f.A.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a},[`&.${f.A.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(r=(e.vars||e).palette[t.color||"primary"])?void 0:r.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${f.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${f.A.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${f.A.disabled}, .${f.A.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${f.A.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&(0,o.A)({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))})),g=(0,c.Ay)(l.f3,{name:"MuiFilledInput",slot:"Input",overridesResolver:l.Oj})((({theme:e,ownerState:t})=>(0,o.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}))),y=i.forwardRef((function(e,t){var r,i,c,u;const y=(0,d.b)({props:e,name:"MuiFilledInput"}),{components:v={},componentsProps:b,fullWidth:_=!1,inputComponent:x="input",multiline:w=!1,slotProps:A,slots:S={},type:C="text"}=y,E=(0,n.A)(y,h),T=(0,o.A)({},y,{fullWidth:_,inputComponent:x,multiline:w,type:C}),I=(e=>{const{classes:t,disableUnderline:r}=e,n={root:["root",!r&&"underline"],input:["input"]},i=(0,s.A)(n,f.N,t);return(0,o.A)({},t,i)})(y),k={root:{ownerState:T},input:{ownerState:T}},M=(null!=A?A:b)?(0,a.A)(k,null!=A?A:b):k,R=null!=(r=null!=(i=S.root)?i:v.Root)?r:m,P=null!=(c=null!=(u=S.input)?u:v.Input)?c:g;return(0,p.jsx)(l.Ay,(0,o.A)({slots:{root:R,input:P},componentsProps:M,fullWidth:_,inputComponent:x,multiline:w,ref:t,type:C},E,{classes:I}))}));y.muiName="Input";const v=y},XYkD:(e,t,r)=>{"use strict";r.d(t,{A:()=>l,N:()=>s});var n=r("+9dH"),o=r("PYeY"),i=r("TkYO"),a=r("G5wc");function s(e){return(0,i.Ay)("MuiFilledInput",e)}const l=(0,n.A)({},a.A,(0,o.A)("MuiFilledInput",["root","underline","input"]))},"Fg+5":(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("Vn7y"),u=r("AOhz"),d=r("xeev"),f=r("M3M6"),p=r("i8Gg"),h=r("XR1s"),m=r("nKUr");const g=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],y=(0,c.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,o.A)({},t.root,t[`margin${(0,d.A)(e.margin)}`],e.fullWidth&&t.fullWidth)})((({ownerState:e})=>(0,o.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"}))),v=i.forwardRef((function(e,t){const r=(0,l.b)({props:e,name:"MuiFormControl"}),{children:c,className:v,color:b="primary",component:_="div",disabled:x=!1,error:w=!1,focused:A,fullWidth:S=!1,hiddenLabel:C=!1,margin:E="none",required:T=!1,size:I="medium",variant:k="outlined"}=r,M=(0,n.A)(r,g),R=(0,o.A)({},r,{color:b,component:_,disabled:x,error:w,fullWidth:S,hiddenLabel:C,margin:E,required:T,size:I,variant:k}),P=(e=>{const{classes:t,margin:r,fullWidth:n}=e,o={root:["root","none"!==r&&`margin${(0,d.A)(r)}`,n&&"fullWidth"]};return(0,s.A)(o,h.c,t)})(R),[O,L]=i.useState((()=>{let e=!1;return c&&i.Children.forEach(c,(t=>{if(!(0,f.A)(t,["Input","Select"]))return;const r=(0,f.A)(t,["Select"])?t.props.input:t;r&&(0,u.gr)(r.props)&&(e=!0)})),e})),[D,N]=i.useState((()=>{let e=!1;return c&&i.Children.forEach(c,(t=>{(0,f.A)(t,["Input","Select"])&&((0,u.lq)(t.props,!0)||(0,u.lq)(t.props.inputProps,!0))&&(e=!0)})),e})),[F,z]=i.useState(!1);x&&F&&z(!1);const B=void 0===A||x?F:A;let j;const U=i.useMemo((()=>({adornedStart:O,setAdornedStart:L,color:b,disabled:x,error:w,filled:D,focused:B,fullWidth:S,hiddenLabel:C,size:I,onBlur:()=>{z(!1)},onEmpty:()=>{N(!1)},onFilled:()=>{N(!0)},onFocus:()=>{z(!0)},registerEffect:j,required:T,variant:k})),[O,b,x,w,D,B,S,C,j,T,I,k]);return(0,m.jsx)(p.A.Provider,{value:U,children:(0,m.jsx)(y,(0,o.A)({as:_,ownerState:R,className:(0,a.A)(P.root,v),ref:t},M,{children:c}))})}))},i8Gg:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext(void 0)},XR1s:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,c:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiFormControl",e)}const a=(0,n.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"])},"1ODS":(e,t,r)=>{"use strict";function n({props:e,states:t,muiFormControl:r}){return t.reduce(((t,n)=>(t[n]=e[n],r&&void 0===e[n]&&(t[n]=r[n]),t)),{})}r.d(t,{A:()=>n})},"7EOP":(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("i8Gg");function i(){return n.useContext(o.A)}},O3LO:(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("7EOP"),c=r("1eI8"),u=r("Gqia"),d=r("xeev"),f=r("Vn7y"),p=r("W9AN"),h=r("1L54"),m=r("1ODS"),g=r("nKUr");const y=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],v=(0,f.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${h.A.label}`]:t.label},t.root,t[`labelPlacement${(0,d.A)(r.labelPlacement)}`]]}})((({theme:e,ownerState:t})=>(0,o.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${h.A.disabled}`]:{cursor:"default"}},"start"===t.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===t.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===t.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${h.A.label}`]:{[`&.${h.A.disabled}`]:{color:(e.vars||e).palette.text.disabled}}}))),b=(0,f.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((({theme:e})=>({[`&.${h.A.error}`]:{color:(e.vars||e).palette.error.main}}))),_=i.forwardRef((function(e,t){var r,f;const _=(0,p.b)({props:e,name:"MuiFormControlLabel"}),{className:x,componentsProps:w={},control:A,disabled:S,disableTypography:C,label:E,labelPlacement:T="end",required:I,slotProps:k={}}=_,M=(0,n.A)(_,y),R=(0,l.A)(),P=null!=(r=null!=S?S:A.props.disabled)?r:null==R?void 0:R.disabled,O=null!=I?I:A.props.required,L={disabled:P,required:O};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===A.props[e]&&void 0!==_[e]&&(L[e]=_[e])}));const D=(0,m.A)({props:_,muiFormControl:R,states:["error"]}),N=(0,o.A)({},_,{disabled:P,labelPlacement:T,required:O,error:D.error}),F=(e=>{const{classes:t,disabled:r,labelPlacement:n,error:o,required:i}=e,a={root:["root",r&&"disabled",`labelPlacement${(0,d.A)(n)}`,o&&"error",i&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,s.A)(a,h.u,t)})(N),z=null!=(f=k.typography)?f:w.typography;let B=E;return null==B||B.type===u.A||C||(B=(0,g.jsx)(u.A,(0,o.A)({component:"span"},z,{className:(0,a.A)(F.label,null==z?void 0:z.className),children:B}))),(0,g.jsxs)(v,(0,o.A)({className:(0,a.A)(F.root,x),ownerState:N,ref:t},M,{children:[i.cloneElement(A,L),O?(0,g.jsxs)(c.A,{display:"block",children:[B,(0,g.jsxs)(b,{ownerState:N,"aria-hidden":!0,className:F.asterisk,children:[" ","*"]})]}):B]}))}))},"1L54":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,u:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiFormControlLabel",e)}const a=(0,n.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"])},"4ycN":(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("C559"),d=r("7EOP"),f=r("1ODS"),p=r("nKUr");const h=["className","row"],m=(0,l.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.row&&t.row]}})((({ownerState:e})=>(0,o.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"}))),g=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiFormGroup"}),{className:i,row:l=!1}=r,g=(0,n.A)(r,h),y=(0,d.A)(),v=(0,f.A)({props:r,muiFormControl:y,states:["error"]}),b=(0,o.A)({},r,{row:l,error:v.error}),_=(e=>{const{classes:t,row:r,error:n}=e,o={root:["root",r&&"row",n&&"error"]};return(0,s.A)(o,u.c,t)})(b);return(0,p.jsx)(m,(0,o.A)({className:(0,a.A)(_.root,i),ownerState:b,ref:t},g))}))},C559:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,c:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiFormGroup",e)}const a=(0,n.A)("MuiFormGroup",["root","row","error"])},sbgx:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n,o=r("Nlia"),i=r("+9dH"),a=r("q1tI"),s=r("juqV"),l=r("aGM9"),c=r("1ODS"),u=r("7EOP"),d=r("Vn7y"),f=r("xeev"),p=r("Vv3p"),h=r("W9AN"),m=r("nKUr");const g=["children","className","component","disabled","error","filled","focused","margin","required","variant"],y=(0,d.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size&&t[`size${(0,f.A)(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})((({theme:e,ownerState:t})=>(0,i.A)({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${p.A.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${p.A.error}`]:{color:(e.vars||e).palette.error.main}},"small"===t.size&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14}))),v=a.forwardRef((function(e,t){const r=(0,h.b)({props:e,name:"MuiFormHelperText"}),{children:a,className:d,component:v="p"}=r,b=(0,o.A)(r,g),_=(0,u.A)(),x=(0,c.A)({props:r,muiFormControl:_,states:["variant","size","disabled","error","filled","focused","required"]}),w=(0,i.A)({},r,{component:v,contained:"filled"===x.variant||"outlined"===x.variant,variant:x.variant,size:x.size,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required}),A=(e=>{const{classes:t,contained:r,size:n,disabled:o,error:i,filled:a,focused:s,required:c}=e,u={root:["root",o&&"disabled",i&&"error",n&&`size${(0,f.A)(n)}`,r&&"contained",s&&"focused",a&&"filled",c&&"required"]};return(0,l.A)(u,p.h,t)})(w);return(0,m.jsx)(y,(0,i.A)({as:v,ownerState:w,className:(0,s.A)(A.root,d),ref:t},b,{children:" "===a?n||(n=(0,m.jsx)("span",{className:"notranslate",children:"​"})):a}))}))},Vv3p:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,h:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiFormHelperText",e)}const a=(0,n.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"])},VEoa:(e,t,r)=>{"use strict";r.d(t,{A:()=>v,d:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("1ODS"),c=r("7EOP"),u=r("xeev"),d=r("W9AN"),f=r("Vn7y"),p=r("4Qvy"),h=r("nKUr");const m=["children","className","color","component","disabled","error","filled","focused","required"],g=(0,f.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,o.A)({},t.root,"secondary"===e.color&&t.colorSecondary,e.filled&&t.filled)})((({theme:e,ownerState:t})=>(0,o.A)({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${p.A.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${p.A.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${p.A.error}`]:{color:(e.vars||e).palette.error.main}}))),y=(0,f.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((({theme:e})=>({[`&.${p.A.error}`]:{color:(e.vars||e).palette.error.main}}))),v=i.forwardRef((function(e,t){const r=(0,d.b)({props:e,name:"MuiFormLabel"}),{children:i,className:f,component:v="label"}=r,b=(0,n.A)(r,m),_=(0,c.A)(),x=(0,l.A)({props:r,muiFormControl:_,states:["color","required","focused","disabled","error","filled"]}),w=(0,o.A)({},r,{color:x.color||"primary",component:v,disabled:x.disabled,error:x.error,filled:x.filled,focused:x.focused,required:x.required}),A=(e=>{const{classes:t,color:r,focused:n,disabled:o,error:i,filled:a,required:l}=e,c={root:["root",`color${(0,u.A)(r)}`,o&&"disabled",i&&"error",a&&"filled",n&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return(0,s.A)(c,p.Z,t)})(w);return(0,h.jsxs)(g,(0,o.A)({as:v,ownerState:w,className:(0,a.A)(A.root,f),ref:t},b,{children:[i,x.required&&(0,h.jsxs)(y,{ownerState:w,"aria-hidden":!0,className:A.asterisk,children:[" ","*"]})]}))}))},"4Qvy":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,Z:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiFormLabel",e)}const a=(0,n.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"])},SIzN:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r("+9dH"),o=(r("q1tI"),r("2TcN")),i=r("aoPf"),a=r("nKUr");const s=function({styles:e,themeId:t,defaultTheme:r={}}){const n=(0,i.A)(r),s="function"==typeof e?e(t&&n[t]||n):e;return(0,a.jsx)(o.A,{styles:s})};var l=r("j5nT"),c=r("WTO6");const u=function(e){return(0,a.jsx)(s,(0,n.A)({},e,{defaultTheme:l.A,themeId:c.A}))}},UVCh:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("J13E"),s=r("XOob"),l=r("UnQg"),c=r("AiGX"),u=r("ZfBw"),d=r("nKUr");const f=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function p(e){return`scale(${e}, ${e**2})`}const h={entering:{opacity:1,transform:p(1)},entered:{opacity:1,transform:"none"}},m="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),g=i.forwardRef((function(e,t){const{addEndListener:r,appear:g=!0,children:y,easing:v,in:b,onEnter:_,onEntered:x,onEntering:w,onExit:A,onExited:S,onExiting:C,style:E,timeout:T="auto",TransitionComponent:I=s.Ay}=e,k=(0,o.A)(e,f),M=(0,a.A)(),R=i.useRef(),P=(0,l.A)(),O=i.useRef(null),L=(0,u.A)(O,y.ref,t),D=e=>t=>{if(e){const r=O.current;void 0===t?e(r):e(r,t)}},N=D(w),F=D(((e,t)=>{(0,c.q)(e);const{duration:r,delay:n,easing:o}=(0,c.c)({style:E,timeout:T,easing:v},{mode:"enter"});let i;"auto"===T?(i=P.transitions.getAutoHeightDuration(e.clientHeight),R.current=i):i=r,e.style.transition=[P.transitions.create("opacity",{duration:i,delay:n}),P.transitions.create("transform",{duration:m?i:.666*i,delay:n,easing:o})].join(","),_&&_(e,t)})),z=D(x),B=D(C),j=D((e=>{const{duration:t,delay:r,easing:n}=(0,c.c)({style:E,timeout:T,easing:v},{mode:"exit"});let o;"auto"===T?(o=P.transitions.getAutoHeightDuration(e.clientHeight),R.current=o):o=t,e.style.transition=[P.transitions.create("opacity",{duration:o,delay:r}),P.transitions.create("transform",{duration:m?o:.666*o,delay:m?r:r||.333*o,easing:n})].join(","),e.style.opacity=0,e.style.transform=p(.75),A&&A(e)})),U=D(S);return(0,d.jsx)(I,(0,n.A)({appear:g,in:b,nodeRef:O,onEnter:F,onEntered:z,onEntering:N,onExit:j,onExited:U,onExiting:B,addEndListener:e=>{"auto"===T&&M.start(R.current||0,e),r&&r(O.current,e)},timeout:"auto"===T?null:T},k,{children:(e,t)=>i.cloneElement(y,(0,n.A)({style:(0,n.A)({opacity:0,transform:p(.75),visibility:"exited"!==e||b?void 0:"hidden"},h[e],E,y.props.style),ref:L},t))}))}));g.muiSupportAuto=!0;const y=g},OGDC:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("W9AN"),d=r("+8pU"),f=r("xeev"),p=r("5iV1"),h=r("nKUr");const m=["edge","children","className","color","disabled","disableFocusRipple","size"],g=(0,c.Ay)(d.A,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"default"!==r.color&&t[`color${(0,f.A)(r.color)}`],r.edge&&t[`edge${(0,f.A)(r.edge)}`],t[`size${(0,f.A)(r.size)}`]]}})((({theme:e,ownerState:t})=>(0,o.A)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var r;const n=null==(r=(e.vars||e).palette)?void 0:r[t.color];return(0,o.A)({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&(0,o.A)({color:null==n?void 0:n.main},!t.disableRipple&&{"&:hover":(0,o.A)({},n&&{backgroundColor:e.vars?`rgba(${n.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(n.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${p.A.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),y=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiIconButton"}),{edge:i=!1,children:l,className:c,color:d="default",disabled:y=!1,disableFocusRipple:v=!1,size:b="medium"}=r,_=(0,n.A)(r,m),x=(0,o.A)({},r,{edge:i,color:d,disabled:y,disableFocusRipple:v,size:b}),w=(e=>{const{classes:t,disabled:r,color:n,edge:o,size:i}=e,a={root:["root",r&&"disabled","default"!==n&&`color${(0,f.A)(n)}`,o&&`edge${(0,f.A)(o)}`,`size${(0,f.A)(i)}`]};return(0,s.A)(a,p.G,t)})(x);return(0,h.jsx)(g,(0,o.A)({className:(0,a.A)(w.root,c),centerRipple:!0,focusRipple:!v,disabled:y,ref:t},_,{ownerState:x,children:l}))}))},"5iV1":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,G:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiIconButton",e)}const a=(0,n.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"])},WdHY:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("aGM9"),s=r("w9Qe"),l=r("kmWS"),c=r("Vn7y"),u=r("XM18"),d=r("W9AN"),f=r("Zqw4"),p=r("nKUr");const h=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],m=(0,c.Ay)(l.Sh,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...(0,l.WC)(e,t),!r.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{let r="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),(0,o.A)({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${f.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${f.A.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${f.A.disabled}, .${f.A.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${f.A.disabled}:before`]:{borderBottomStyle:"dotted"}})})),g=(0,c.Ay)(l.f3,{name:"MuiInput",slot:"Input",overridesResolver:l.Oj})({}),y=i.forwardRef((function(e,t){var r,i,c,u;const y=(0,d.b)({props:e,name:"MuiInput"}),{disableUnderline:v,components:b={},componentsProps:_,fullWidth:x=!1,inputComponent:w="input",multiline:A=!1,slotProps:S,slots:C={},type:E="text"}=y,T=(0,n.A)(y,h),I=(e=>{const{classes:t,disableUnderline:r}=e,n={root:["root",!r&&"underline"],input:["input"]},i=(0,a.A)(n,f.B,t);return(0,o.A)({},t,i)})(y),k={root:{ownerState:{disableUnderline:v}}},M=(null!=S?S:_)?(0,s.A)(null!=S?S:_,k):k,R=null!=(r=null!=(i=C.root)?i:b.Root)?r:m,P=null!=(c=null!=(u=C.input)?u:b.Input)?c:g;return(0,p.jsx)(l.Ay,(0,o.A)({slots:{root:R,input:P},slotProps:M,fullWidth:x,inputComponent:w,multiline:A,ref:t,type:E},T,{classes:I}))}));y.muiName="Input";const v=y},Zqw4:(e,t,r)=>{"use strict";r.d(t,{A:()=>l,B:()=>s});var n=r("+9dH"),o=r("PYeY"),i=r("TkYO"),a=r("G5wc");function s(e){return(0,i.Ay)("MuiInput",e)}const l=(0,n.A)({},a.A,(0,o.A)("MuiInput",["root","underline","input"]))},EfzM:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n,o=r("Nlia"),i=r("+9dH"),a=r("q1tI"),s=r("juqV"),l=r("aGM9"),c=r("xeev"),u=r("Gqia"),d=r("i8Gg"),f=r("7EOP"),p=r("Vn7y"),h=r("S9h2"),m=r("W9AN"),g=r("nKUr");const y=["children","className","component","disablePointerEvents","disableTypography","position","variant"],v=(0,p.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,c.A)(r.position)}`],!0===r.disablePointerEvents&&t.disablePointerEvents,t[r.variant]]}})((({theme:e,ownerState:t})=>(0,i.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${h.A.positionStart}&:not(.${h.A.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),b=a.forwardRef((function(e,t){const r=(0,m.b)({props:e,name:"MuiInputAdornment"}),{children:p,className:b,component:_="div",disablePointerEvents:x=!1,disableTypography:w=!1,position:A,variant:S}=r,C=(0,o.A)(r,y),E=(0,f.A)()||{};let T=S;S&&E.variant,E&&!T&&(T=E.variant);const I=(0,i.A)({},r,{hiddenLabel:E.hiddenLabel,size:E.size,disablePointerEvents:x,position:A,variant:T}),k=(e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:o,size:i,variant:a}=e,s={root:["root",r&&"disablePointerEvents",o&&`position${(0,c.A)(o)}`,a,n&&"hiddenLabel",i&&`size${(0,c.A)(i)}`]};return(0,l.A)(s,h.P,t)})(I);return(0,g.jsx)(d.A.Provider,{value:null,children:(0,g.jsx)(v,(0,i.A)({as:_,ownerState:I,className:(0,s.A)(k.root,b),ref:t},C,{children:"string"!=typeof p||w?(0,g.jsxs)(a.Fragment,{children:["start"===A?n||(n=(0,g.jsx)("span",{className:"notranslate",children:"​"})):null,p]}):(0,g.jsx)(u.A,{color:"text.secondary",children:p})}))})}))},S9h2:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,P:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiInputAdornment",e)}const a=(0,n.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"])},kmWS:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>k,Oj:()=>C,Sh:()=>E,WC:()=>S,f3:()=>T});var n=r("Nlia"),o=r("+9dH"),i=r("KRkT"),a=r("q1tI"),s=r("juqV"),l=r("aGM9"),c=r("gU+W"),u=r("ICY4"),d=r("1ODS"),f=r("i8Gg"),p=r("7EOP"),h=r("Vn7y"),m=r("W9AN"),g=r("xeev"),y=r("ZfBw"),v=r("6q60"),b=r("SIzN"),_=r("AOhz"),x=r("G5wc"),w=r("nKUr");const A=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],S=(e,t)=>{const{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,"small"===r.size&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${(0,g.A)(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},C=(e,t)=>{const{ownerState:r}=e;return[t.input,"small"===r.size&&t.inputSizeSmall,r.multiline&&t.inputMultiline,"search"===r.type&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]},E=(0,h.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:S})((({theme:e,ownerState:t})=>(0,o.A)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${x.A.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&(0,o.A)({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"}))),T=(0,h.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:C})((({theme:e,ownerState:t})=>{const r="light"===e.palette.mode,n=(0,o.A)({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),i={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,o.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${x.A.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${x.A.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})})),I=(0,w.jsx)(b.A,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),k=a.forwardRef((function(e,t){var r;const h=(0,m.b)({props:e,name:"MuiInputBase"}),{"aria-describedby":b,autoComplete:S,autoFocus:C,className:k,components:M={},componentsProps:R={},defaultValue:P,disabled:O,disableInjectingGlobalStyles:L,endAdornment:D,fullWidth:N=!1,id:F,inputComponent:z="input",inputProps:B={},inputRef:j,maxRows:U,minRows:$,multiline:V=!1,name:G,onBlur:H,onChange:W,onClick:q,onFocus:X,onKeyDown:Z,onKeyUp:Y,placeholder:K,readOnly:J,renderSuffix:Q,rows:ee,slotProps:te={},slots:re={},startAdornment:ne,type:oe="text",value:ie}=h,ae=(0,n.A)(h,A),se=null!=B.value?B.value:ie,{current:le}=a.useRef(null!=se),ce=a.useRef(),ue=a.useCallback((e=>{}),[]),de=(0,y.A)(ce,j,B.ref,ue),[fe,pe]=a.useState(!1),he=(0,p.A)(),me=(0,d.A)({props:h,muiFormControl:he,states:["color","disabled","error","hiddenLabel","size","required","filled"]});me.focused=he?he.focused:fe,a.useEffect((()=>{!he&&O&&fe&&(pe(!1),H&&H())}),[he,O,fe,H]);const ge=he&&he.onFilled,ye=he&&he.onEmpty,ve=a.useCallback((e=>{(0,_.lq)(e)?ge&&ge():ye&&ye()}),[ge,ye]);(0,v.A)((()=>{le&&ve({value:se})}),[se,ve,le]),a.useEffect((()=>{ve(ce.current)}),[]);let be=z,_e=B;V&&"input"===be&&(_e=ee?(0,o.A)({type:void 0,minRows:ee,maxRows:ee},_e):(0,o.A)({type:void 0,maxRows:U,minRows:$},_e),be=u.A),a.useEffect((()=>{he&&he.setAdornedStart(Boolean(ne))}),[he,ne]);const xe=(0,o.A)({},h,{color:me.color||"primary",disabled:me.disabled,endAdornment:D,error:me.error,focused:me.focused,formControl:he,fullWidth:N,hiddenLabel:me.hiddenLabel,multiline:V,size:me.size,startAdornment:ne,type:oe}),we=(e=>{const{classes:t,color:r,disabled:n,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:f,size:p,startAdornment:h,type:m}=e,y={root:["root",`color${(0,g.A)(r)}`,n&&"disabled",o&&"error",c&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${(0,g.A)(p)}`,d&&"multiline",h&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",n&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",h&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return(0,l.A)(y,x.g,t)})(xe),Ae=re.root||M.Root||E,Se=te.root||R.root||{},Ce=re.input||M.Input||T;return _e=(0,o.A)({},_e,null!=(r=te.input)?r:R.input),(0,w.jsxs)(a.Fragment,{children:[!L&&I,(0,w.jsxs)(Ae,(0,o.A)({},Se,!(0,c.A)(Ae)&&{ownerState:(0,o.A)({},xe,Se.ownerState)},{ref:t,onClick:e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),q&&q(e)}},ae,{className:(0,s.A)(we.root,Se.className,k,J&&"MuiInputBase-readOnly"),children:[ne,(0,w.jsx)(f.A.Provider,{value:null,children:(0,w.jsx)(Ce,(0,o.A)({ownerState:xe,"aria-invalid":me.error,"aria-describedby":b,autoComplete:S,autoFocus:C,defaultValue:P,disabled:me.disabled,id:F,onAnimationStart:e=>{ve("mui-auto-fill-cancel"===e.animationName?ce.current:{value:"x"})},name:G,placeholder:K,readOnly:J,required:me.required,rows:ee,value:se,onKeyDown:Z,onKeyUp:Y,type:oe},_e,!(0,c.A)(Ce)&&{as:be,ownerState:(0,o.A)({},xe,_e.ownerState)},{ref:de,className:(0,s.A)(we.input,_e.className,J&&"MuiInputBase-readOnly"),onBlur:e=>{H&&H(e),B.onBlur&&B.onBlur(e),he&&he.onBlur?he.onBlur(e):pe(!1)},onChange:(e,...t)=>{if(!le){const t=e.target||ce.current;if(null==t)throw new Error((0,i.A)(1));ve({value:t.value})}B.onChange&&B.onChange(e,...t),W&&W(e,...t)},onFocus:e=>{me.disabled?e.stopPropagation():(X&&X(e),B.onFocus&&B.onFocus(e),he&&he.onFocus?he.onFocus(e):pe(!0))}}))}),D,Q?Q((0,o.A)({},me,{startAdornment:ne})):null]}))]})}))},G5wc:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,g:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiInputBase",e)}const a=(0,n.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"])},AOhz:(e,t,r)=>{"use strict";function n(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function o(e,t=!1){return e&&(n(e.value)&&""!==e.value||t&&n(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}r.d(t,{gr:()=>i,lq:()=>o})},kQF4:(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("aGM9"),s=r("juqV"),l=r("1ODS"),c=r("7EOP"),u=r("VEoa"),d=r("4Qvy"),f=r("W9AN"),p=r("xeev"),h=r("Vn7y"),m=r("XM18"),g=r("eKIA"),y=r("nKUr");const v=["disableAnimation","margin","shrink","variant","className"],b=(0,h.Ay)(u.A,{shouldForwardProp:e=>(0,m.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${d.A.asterisk}`]:t.asterisk},t.root,r.formControl&&t.formControl,"small"===r.size&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,r.focused&&t.focused,t[r.variant]]}})((({theme:e,ownerState:t})=>(0,o.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===t.size&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},"filled"===t.variant&&(0,o.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&(0,o.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===t.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===t.variant&&(0,o.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"})))),_=i.forwardRef((function(e,t){const r=(0,f.b)({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:u,className:d}=r,h=(0,n.A)(r,v),m=(0,c.A)();let _=u;void 0===_&&m&&(_=m.filled||m.focused||m.adornedStart);const x=(0,l.A)({props:r,muiFormControl:m,states:["size","variant","required","focused"]}),w=(0,o.A)({},r,{disableAnimation:i,formControl:m,shrink:_,size:x.size,variant:x.variant,required:x.required,focused:x.focused}),A=(e=>{const{classes:t,formControl:r,size:n,shrink:i,disableAnimation:s,variant:l,required:c}=e,u={root:["root",r&&"formControl",!s&&"animated",i&&"shrink",n&&"normal"!==n&&`size${(0,p.A)(n)}`,l],asterisk:[c&&"asterisk"]},d=(0,a.A)(u,g.R,t);return(0,o.A)({},t,d)})(w);return(0,y.jsx)(b,(0,o.A)({"data-shrink":_,ownerState:w,ref:t,className:(0,s.A)(A.root,d)},h,{classes:A}))}))},eKIA:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,R:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiInputLabel",e)}const a=(0,n.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"])},"4WJT":(e,t,r)=>{"use strict";r.d(t,{A:()=>P});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("AeFk"),c=r("dcYk"),u=r("St5x"),d=r("xeev"),f=r("Vn7y"),p=r("W9AN"),h=r("HkBA"),m=r("nKUr");const g=["className","color","value","valueBuffer","variant"];let y,v,b,_,x,w,A=e=>e;const S=(0,l.i7)(y||(y=A` 0% { left: -35%; right: 100%; } 60% { left: 100%; right: -90%; } 100% { left: 100%; right: -90%; } `)),C=(0,l.i7)(v||(v=A` 0% { left: -200%; right: 100%; } 60% { left: 107%; right: -8%; } 100% { left: 107%; right: -8%; } `)),E=(0,l.i7)(b||(b=A` 0% { opacity: 1; background-position: 0 -23px; } 60% { opacity: 0; background-position: 0 -23px; } 100% { opacity: 1; background-position: -200px -23px; } `)),T=(e,t)=>"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,c.a)(e.palette[t].main,.62):(0,c.e$)(e.palette[t].main,.5),I=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${(0,d.A)(r.color)}`],t[r.variant]]}})((({ownerState:e,theme:t})=>(0,o.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:T(t,e.color)},"inherit"===e.color&&"buffer"!==e.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===e.variant&&{backgroundColor:"transparent"},"query"===e.variant&&{transform:"rotate(180deg)"}))),k=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.dashed,t[`dashedColor${(0,d.A)(r.color)}`]]}})((({ownerState:e,theme:t})=>{const r=T(t,e.color);return(0,o.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===e.color&&{opacity:.3},{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,l.AH)(_||(_=A` animation: ${0} 3s infinite linear; `),E)),M=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.bar,t[`barColor${(0,d.A)(r.color)}`],("indeterminate"===r.variant||"query"===r.variant)&&t.bar1Indeterminate,"determinate"===r.variant&&t.bar1Determinate,"buffer"===r.variant&&t.bar1Buffer]}})((({ownerState:e,theme:t})=>(0,o.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===e.color?"currentColor":(t.vars||t).palette[e.color].main},"determinate"===e.variant&&{transition:"transform .4s linear"},"buffer"===e.variant&&{zIndex:1,transition:"transform .4s linear"})),(({ownerState:e})=>("indeterminate"===e.variant||"query"===e.variant)&&(0,l.AH)(x||(x=A` width: auto; animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; `),S))),R=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.bar,t[`barColor${(0,d.A)(r.color)}`],("indeterminate"===r.variant||"query"===r.variant)&&t.bar2Indeterminate,"buffer"===r.variant&&t.bar2Buffer]}})((({ownerState:e,theme:t})=>(0,o.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==e.variant&&{backgroundColor:"inherit"===e.color?"currentColor":(t.vars||t).palette[e.color].main},"inherit"===e.color&&{opacity:.3},"buffer"===e.variant&&{backgroundColor:T(t,e.color),transition:"transform .4s linear"})),(({ownerState:e})=>("indeterminate"===e.variant||"query"===e.variant)&&(0,l.AH)(w||(w=A` width: auto; animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; `),C))),P=i.forwardRef((function(e,t){const r=(0,p.b)({props:e,name:"MuiLinearProgress"}),{className:i,color:l="primary",value:c,valueBuffer:f,variant:y="indeterminate"}=r,v=(0,n.A)(r,g),b=(0,o.A)({},r,{color:l,variant:y}),_=(e=>{const{classes:t,variant:r,color:n}=e,o={root:["root",`color${(0,d.A)(n)}`,r],dashed:["dashed",`dashedColor${(0,d.A)(n)}`],bar1:["bar",`barColor${(0,d.A)(n)}`,("indeterminate"===r||"query"===r)&&"bar1Indeterminate","determinate"===r&&"bar1Determinate","buffer"===r&&"bar1Buffer"],bar2:["bar","buffer"!==r&&`barColor${(0,d.A)(n)}`,"buffer"===r&&`color${(0,d.A)(n)}`,("indeterminate"===r||"query"===r)&&"bar2Indeterminate","buffer"===r&&"bar2Buffer"]};return(0,s.A)(o,h.l,t)})(b),x=(0,u.I)(),w={},A={bar1:{},bar2:{}};if(("determinate"===y||"buffer"===y)&&void 0!==c){w["aria-valuenow"]=Math.round(c),w["aria-valuemin"]=0,w["aria-valuemax"]=100;let e=c-100;x&&(e=-e),A.bar1.transform=`translateX(${e}%)`}if("buffer"===y&&void 0!==f){let e=(f||0)-100;x&&(e=-e),A.bar2.transform=`translateX(${e}%)`}return(0,m.jsxs)(I,(0,o.A)({className:(0,a.A)(_.root,i),ownerState:b,role:"progressbar"},w,{ref:t},v,{children:["buffer"===y?(0,m.jsx)(k,{className:_.dashed,ownerState:b}):null,(0,m.jsx)(M,{className:_.bar1,ownerState:b,style:A.bar1}),"determinate"===y?null:(0,m.jsx)(R,{className:_.bar2,ownerState:b,style:A.bar2})]}))}))},HkBA:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,l:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiLinearProgress",e)}const a=(0,n.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"])},H9le:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("cwku"),d=r("sK9B"),f=r("nKUr");const p=["children","className","component","dense","disablePadding","subheader"],h=(0,l.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})((({ownerState:e})=>(0,o.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),m=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiList"}),{children:l,className:m,component:g="ul",dense:y=!1,disablePadding:v=!1,subheader:b}=r,_=(0,n.A)(r,p),x=i.useMemo((()=>({dense:y})),[y]),w=(0,o.A)({},r,{component:g,dense:y,disablePadding:v}),A=(e=>{const{classes:t,disablePadding:r,dense:n,subheader:o}=e,i={root:["root",!r&&"padding",n&&"dense",o&&"subheader"]};return(0,s.A)(i,d.H,t)})(w);return(0,f.jsx)(u.A.Provider,{value:x,children:(0,f.jsxs)(h,(0,o.A)({as:g,className:(0,a.A)(A.root,m),ref:t,ownerState:w},_,{children:[b,l]}))})}))},cwku:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext({})},sK9B:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,H:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiList",e)}const a=(0,n.A)("MuiList",["root","padding","dense","subheader"])},ZvkB:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>C});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("gU+W"),u=r("Vn7y"),d=r("W9AN"),f=r("+8pU"),p=r("M3M6"),h=r("6q60"),m=r("ZfBw"),g=r("cwku"),y=r("wCeY"),v=r("6l0j"),b=r("DFFc"),_=r("nKUr");const x=["className"],w=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],A=(0,u.Ay)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters,!r.disablePadding&&t.padding,r.button&&t.button,r.hasSecondaryAction&&t.secondaryAction]}})((({theme:e,ownerState:t})=>(0,o.A)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&(0,o.A)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${v.A.root}`]:{paddingRight:48}},{[`&.${y.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${y.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${y.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${y.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${y.A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48}))),S=(0,u.Ay)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),C=i.forwardRef((function(e,t){const r=(0,d.b)({props:e,name:"MuiListItem"}),{alignItems:l="center",autoFocus:u=!1,button:v=!1,children:C,className:E,component:T,components:I={},componentsProps:k={},ContainerComponent:M="li",ContainerProps:{className:R}={},dense:P=!1,disabled:O=!1,disableGutters:L=!1,disablePadding:D=!1,divider:N=!1,focusVisibleClassName:F,secondaryAction:z,selected:B=!1,slotProps:j={},slots:U={}}=r,$=(0,n.A)(r.ContainerProps,x),V=(0,n.A)(r,w),G=i.useContext(g.A),H=i.useMemo((()=>({dense:P||G.dense||!1,alignItems:l,disableGutters:L})),[l,G.dense,P,L]),W=i.useRef(null);(0,h.A)((()=>{u&&W.current&&W.current.focus()}),[u]);const q=i.Children.toArray(C),X=q.length&&(0,p.A)(q[q.length-1],["ListItemSecondaryAction"]),Z=(0,o.A)({},r,{alignItems:l,autoFocus:u,button:v,dense:H.dense,disabled:O,disableGutters:L,disablePadding:D,divider:N,hasSecondaryAction:X,selected:B}),Y=(e=>{const{alignItems:t,button:r,classes:n,dense:o,disabled:i,disableGutters:a,disablePadding:l,divider:c,hasSecondaryAction:u,selected:d}=e,f={root:["root",o&&"dense",!a&&"gutters",!l&&"padding",c&&"divider",i&&"disabled",r&&"button","flex-start"===t&&"alignItemsFlexStart",u&&"secondaryAction",d&&"selected"],container:["container"]};return(0,s.A)(f,y._,n)})(Z),K=(0,m.A)(W,t),J=U.root||I.Root||A,Q=j.root||k.root||{},ee=(0,o.A)({className:(0,a.A)(Y.root,Q.className,E),disabled:O},V);let te=T||"li";return v&&(ee.component=T||"div",ee.focusVisibleClassName=(0,a.A)(y.A.focusVisible,F),te=f.A),X?(te=ee.component||T?te:"div","li"===M&&("li"===te?te="div":"li"===ee.component&&(ee.component="div")),(0,_.jsx)(g.A.Provider,{value:H,children:(0,_.jsxs)(S,(0,o.A)({as:M,className:(0,a.A)(Y.container,R),ref:K,ownerState:Z},$,{children:[(0,_.jsx)(J,(0,o.A)({},Q,!(0,c.A)(J)&&{as:te,ownerState:(0,o.A)({},Z,Q.ownerState)},ee,{children:q})),q.pop()]}))})):(0,_.jsx)(g.A.Provider,{value:H,children:(0,_.jsxs)(J,(0,o.A)({},Q,{as:te,ref:K},!(0,c.A)(J)&&{ownerState:(0,o.A)({},Z,Q.ownerState)},ee,{children:[q,z&&(0,_.jsx)(b.A,{children:z})]}))})}))},wCeY:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,_:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItem",e)}const a=(0,n.A)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"])},a6xD:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("cwku"),c=r("Vn7y"),u=r("W9AN"),d=r("FUPx"),f=r("nKUr");const p=["className"],h=(0,c.Ay)("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})((({ownerState:e})=>(0,o.A)({minWidth:56,flexShrink:0},"flex-start"===e.alignItems&&{marginTop:8}))),m=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiListItemAvatar"}),{className:c}=r,m=(0,n.A)(r,p),g=i.useContext(l.A),y=(0,o.A)({},r,{alignItems:g.alignItems}),v=(e=>{const{alignItems:t,classes:r}=e,n={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,s.A)(n,d.Z,r)})(y);return(0,f.jsx)(h,(0,o.A)({className:(0,a.A)(v.root,c),ownerState:y,ref:t},m))}))},FUPx:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,Z:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItemAvatar",e)}const a=(0,n.A)("MuiListItemAvatar",["root","alignItemsFlexStart"])},"6l0j":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,Y:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItemButton",e)}const a=(0,n.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"])},mkGA:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("xkXe"),d=r("cwku"),f=r("nKUr");const p=["className"],h=(0,l.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>(0,o.A)({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),m=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiListItemIcon"}),{className:l}=r,m=(0,n.A)(r,p),g=i.useContext(d.A),y=(0,o.A)({},r,{alignItems:g.alignItems}),v=(e=>{const{alignItems:t,classes:r}=e,n={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,s.A)(n,u.f,r)})(y);return(0,f.jsx)(h,(0,o.A)({className:(0,a.A)(v.root,l),ownerState:y,ref:t},m))}))},xkXe:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,f:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItemIcon",e)}const a=(0,n.A)("MuiListItemIcon",["root","alignItemsFlexStart"])},DFFc:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("cwku"),d=r("RD6q"),f=r("nKUr");const p=["className"],h=(0,l.Ay)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.disableGutters&&t.disableGutters]}})((({ownerState:e})=>(0,o.A)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0}))),m=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiListItemSecondaryAction"}),{className:l}=r,m=(0,n.A)(r,p),g=i.useContext(u.A),y=(0,o.A)({},r,{disableGutters:g.disableGutters}),v=(e=>{const{disableGutters:t,classes:r}=e,n={root:["root",t&&"disableGutters"]};return(0,s.A)(n,d.g,r)})(y);return(0,f.jsx)(h,(0,o.A)({className:(0,a.A)(v.root,l),ownerState:y,ref:t},m))}));m.muiName="ListItemSecondaryAction";const g=m},RD6q:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,g:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItemSecondaryAction",e)}const a=(0,n.A)("MuiListItemSecondaryAction",["root","disableGutters"])},T4Ez:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Gqia"),c=r("cwku"),u=r("W9AN"),d=r("Vn7y"),f=r("R6o4"),p=r("nKUr");const h=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],m=(0,d.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${f.A.primary}`]:t.primary},{[`& .${f.A.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})((({ownerState:e})=>(0,o.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}))),g=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiListItemText"}),{children:d,className:g,disableTypography:y=!1,inset:v=!1,primary:b,primaryTypographyProps:_,secondary:x,secondaryTypographyProps:w}=r,A=(0,n.A)(r,h),{dense:S}=i.useContext(c.A);let C=null!=b?b:d,E=x;const T=(0,o.A)({},r,{disableTypography:y,inset:v,primary:!!C,secondary:!!E,dense:S}),I=(e=>{const{classes:t,inset:r,primary:n,secondary:o,dense:i}=e,a={root:["root",r&&"inset",i&&"dense",n&&o&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,s.A)(a,f.b,t)})(T);return null==C||C.type===l.A||y||(C=(0,p.jsx)(l.A,(0,o.A)({variant:S?"body2":"body1",className:I.primary,component:null!=_&&_.variant?void 0:"span",display:"block"},_,{children:C}))),null==E||E.type===l.A||y||(E=(0,p.jsx)(l.A,(0,o.A)({variant:"body2",className:I.secondary,color:"text.secondary",display:"block"},w,{children:E}))),(0,p.jsxs)(m,(0,o.A)({className:(0,a.A)(I.root,g),ownerState:T,ref:t},A,{children:[C,E]}))}))},R6o4:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,b:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListItemText",e)}const a=(0,n.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"])},BkAX:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("xeev"),d=r("cXnk"),f=r("nKUr");const p=["className","color","component","disableGutters","disableSticky","inset"],h=(0,l.Ay)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"default"!==r.color&&t[`color${(0,u.A)(r.color)}`],!r.disableGutters&&t.gutters,r.inset&&t.inset,!r.disableSticky&&t.sticky]}})((({theme:e,ownerState:t})=>(0,o.A)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},"primary"===t.color&&{color:(e.vars||e).palette.primary.main},"inherit"===t.color&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}))),m=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiListSubheader"}),{className:i,color:l="default",component:m="li",disableGutters:g=!1,disableSticky:y=!1,inset:v=!1}=r,b=(0,n.A)(r,p),_=(0,o.A)({},r,{color:l,component:m,disableGutters:g,disableSticky:y,inset:v}),x=(e=>{const{classes:t,color:r,disableGutters:n,inset:o,disableSticky:i}=e,a={root:["root","default"!==r&&`color${(0,u.A)(r)}`,!n&&"gutters",o&&"inset",!i&&"sticky"]};return(0,s.A)(a,d.g,t)})(_);return(0,f.jsx)(h,(0,o.A)({as:m,className:(0,a.A)(x.root,i),ref:t,ownerState:_},b))}));m.muiSkipListHighlight=!0;const g=m},cXnk:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,g:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiListSubheader",e)}const a=(0,n.A)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"])},"4enW":(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=(r("TOwV"),r("juqV")),s=r("aGM9"),l=r("St5x"),c=r("0Ydi"),u=r("IXjO"),d=r("FZC7"),f=r("Vn7y"),p=r("XM18"),h=r("W9AN"),m=r("k/XA"),g=r("nKUr");const y=["onEntering"],v=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],b={vertical:"top",horizontal:"right"},_={vertical:"top",horizontal:"left"},x=(0,f.Ay)(d.Ay,{shouldForwardProp:e=>(0,p.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),w=(0,f.Ay)(d.IJ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),A=(0,f.Ay)(u.A,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),S=i.forwardRef((function(e,t){var r,u;const d=(0,h.b)({props:e,name:"MuiMenu"}),{autoFocus:f=!0,children:p,className:S,disableAutoFocusItem:C=!1,MenuListProps:E={},onClose:T,open:I,PaperProps:k={},PopoverClasses:M,transitionDuration:R="auto",TransitionProps:{onEntering:P}={},variant:O="selectedMenu",slots:L={},slotProps:D={}}=d,N=(0,o.A)(d.TransitionProps,y),F=(0,o.A)(d,v),z=(0,l.I)(),B=(0,n.A)({},d,{autoFocus:f,disableAutoFocusItem:C,MenuListProps:E,onEntering:P,PaperProps:k,transitionDuration:R,TransitionProps:N,variant:O}),j=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],paper:["paper"],list:["list"]},m.e,t)})(B),U=f&&!C&&I,$=i.useRef(null);let V=-1;i.Children.map(p,((e,t)=>{i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===O&&e.props.selected||-1===V)&&(V=t))}));const G=null!=(r=L.paper)?r:w,H=null!=(u=D.paper)?u:k,W=(0,c.A)({elementType:L.root,externalSlotProps:D.root,ownerState:B,className:[j.root,S]}),q=(0,c.A)({elementType:G,externalSlotProps:H,ownerState:B,className:j.paper});return(0,g.jsx)(x,(0,n.A)({onClose:T,anchorOrigin:{vertical:"bottom",horizontal:z?"right":"left"},transformOrigin:z?b:_,slots:{paper:G,root:L.root},slotProps:{root:W,paper:q},open:I,ref:t,transitionDuration:R,TransitionProps:(0,n.A)({onEntering:(e,t)=>{$.current&&$.current.adjustStyleForScrollbar(e,{direction:z?"rtl":"ltr"}),P&&P(e,t)}},N),ownerState:B},F,{classes:M,children:(0,g.jsx)(A,(0,n.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),T&&T(e,"tabKeyDown"))},actions:$,autoFocus:f&&(-1===V||C),autoFocusItem:U,variant:O},E,{className:(0,a.A)(j.list,E.className),children:p}))}))}))},"k/XA":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,e:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiMenu",e)}const a=(0,n.A)("MuiMenu",["root","paper","list"])},LutX:(e,t,r)=>{"use strict";r.d(t,{A:()=>A});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("XM18"),d=r("W9AN"),f=r("cwku"),p=r("+8pU"),h=r("6q60"),m=r("ZfBw"),g=r("WOV/"),y=r("xkXe"),v=r("R6o4"),b=r("BCtw"),_=r("nKUr");const x=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],w=(0,c.Ay)(p.A,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>(0,o.A)({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${b.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${b.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${b.A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${b.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${b.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${g.A.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${g.A.inset}`]:{marginLeft:52},[`& .${v.A.root}`]:{marginTop:0,marginBottom:0},[`& .${v.A.inset}`]:{paddingLeft:36},[`& .${y.A.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&(0,o.A)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${y.A.root} svg`]:{fontSize:"1.25rem"}})))),A=i.forwardRef((function(e,t){const r=(0,d.b)({props:e,name:"MuiMenuItem"}),{autoFocus:l=!1,component:c="li",dense:u=!1,divider:p=!1,disableGutters:g=!1,focusVisibleClassName:y,role:v="menuitem",tabIndex:A,className:S}=r,C=(0,n.A)(r,x),E=i.useContext(f.A),T=i.useMemo((()=>({dense:u||E.dense||!1,disableGutters:g})),[E.dense,u,g]),I=i.useRef(null);(0,h.A)((()=>{l&&I.current&&I.current.focus()}),[l]);const k=(0,o.A)({},r,{dense:T.dense,divider:p,disableGutters:g}),M=(e=>{const{disabled:t,dense:r,divider:n,disableGutters:i,selected:a,classes:l}=e,c={root:["root",r&&"dense",t&&"disabled",!i&&"gutters",n&&"divider",a&&"selected"]},u=(0,s.A)(c,b.Z,l);return(0,o.A)({},l,u)})(r),R=(0,m.A)(I,t);let P;return r.disabled||(P=void 0!==A?A:-1),(0,_.jsx)(f.A.Provider,{value:T,children:(0,_.jsx)(w,(0,o.A)({ref:R,role:v,tabIndex:P,component:c,focusVisibleClassName:(0,a.A)(M.focusVisible,y),className:(0,a.A)(M.root,S)},C,{ownerState:k,classes:M}))})}))},BCtw:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,Z:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiMenuItem",e)}const a=(0,n.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"])},IXjO:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=(r("TOwV"),r("rdfb")),s=r("H9le");const l=r("Omxi").A;var c=r("ZfBw"),u=r("6q60"),d=r("nKUr");const f=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function p(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function h(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function m(e,t){if(void 0===t)return!0;let r=e.innerText;return void 0===r&&(r=e.textContent),r=r.trim().toLowerCase(),0!==r.length&&(t.repeating?r[0]===t.keys[0]:0===r.indexOf(t.keys.join("")))}function g(e,t,r,n,o,i){let a=!1,s=o(e,t,!!t&&r);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!n&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&m(s,i)&&!t)return s.focus(),!0;s=o(e,s,r)}return!1}const y=i.forwardRef((function(e,t){const{actions:r,autoFocus:y=!1,autoFocusItem:v=!1,children:b,className:_,disabledItemsFocusable:x=!1,disableListWrap:w=!1,onKeyDown:A,variant:S="selectedMenu"}=e,C=(0,o.A)(e,f),E=i.useRef(null),T=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,u.A)((()=>{y&&E.current.focus()}),[y]),i.useImperativeHandle(r,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const r=!E.current.style.width;if(e.clientHeight{i.isValidElement(e)?(e.props.disabled||("selectedMenu"===S&&e.props.selected||-1===k)&&(k=t),k===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(k+=1,k>=b.length&&(k=-1))):k===t&&(k+=1,k>=b.length&&(k=-1))}));const M=i.Children.map(b,((e,t)=>{if(t===k){const t={};return v&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===S&&(t.tabIndex=0),i.cloneElement(e,t)}return e}));return(0,d.jsx)(s.A,(0,n.A)({role:"menu",ref:I,className:_,onKeyDown:e=>{const t=E.current,r=e.key,n=(0,a.A)(t).activeElement;if("ArrowDown"===r)e.preventDefault(),g(t,n,w,x,p);else if("ArrowUp"===r)e.preventDefault(),g(t,n,w,x,h);else if("Home"===r)e.preventDefault(),g(t,null,w,x,p);else if("End"===r)e.preventDefault(),g(t,null,w,x,h);else if(1===r.length){const o=T.current,i=r.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=n&&!o.repeating&&m(n,o);o.previousKeyMatched&&(s||g(t,n,!1,x,p,o))?e.preventDefault():o.previousKeyMatched=!1}A&&A(e)},tabIndex:y?0:-1},C,{children:M}))}))},X6EC:(e,t,r)=>{"use strict";r.d(t,{A:()=>E});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("0Ydi"),c=r("qSC9"),u=r("Cc46"),d=r("Vn7y"),f=r("W9AN"),p=r("Sk+A"),h=r("N0rN"),m=r("p4lV"),g=r("nXnS"),y=r("zhWT"),v=r("OrJ7"),b=r("fEft");const _=new b.P;var x=r("bEEB"),w=r("nKUr");const A=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],S=(0,d.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})((({theme:e,ownerState:t})=>(0,o.A)({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),C=(0,d.Ay)(p.A,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),E=i.forwardRef((function(e,t){var r,d,p,E,T,I;const k=(0,f.b)({name:"MuiModal",props:e}),{BackdropComponent:M=C,BackdropProps:R,className:P,closeAfterTransition:O=!1,children:L,container:D,component:N,components:F={},componentsProps:z={},disableAutoFocus:B=!1,disableEnforceFocus:j=!1,disableEscapeKeyDown:U=!1,disablePortal:$=!1,disableRestoreFocus:V=!1,disableScrollLock:G=!1,hideBackdrop:H=!1,keepMounted:W=!1,onBackdropClick:q,open:X,slotProps:Z,slots:Y}=k,K=(0,n.A)(k,A),J=(0,o.A)({},k,{closeAfterTransition:O,disableAutoFocus:B,disableEnforceFocus:j,disableEscapeKeyDown:U,disablePortal:$,disableRestoreFocus:V,disableScrollLock:G,hideBackdrop:H,keepMounted:W}),{getRootProps:Q,getBackdropProps:ee,getTransitionProps:te,portalRef:re,isTopModal:ne,exited:oe,hasTransition:ie}=function(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,manager:a=_,closeAfterTransition:s=!1,onTransitionEnter:l,onTransitionExited:c,children:u,onClose:d,open:f,rootRef:p}=e,x=i.useRef({}),w=i.useRef(null),A=i.useRef(null),S=(0,h.A)(A,p),[C,E]=i.useState(!f),T=function(e){return!!e&&e.props.hasOwnProperty("in")}(u);let I=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(I=!1);const k=()=>(x.current.modalRef=A.current,x.current.mount=w.current,x.current),M=()=>{a.mount(k(),{disableScrollLock:n}),A.current&&(A.current.scrollTop=0)},R=(0,g.A)((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,m.A)(w.current).body;a.add(k(),e),A.current&&M()})),P=i.useCallback((()=>a.isTopModal(k())),[a]),O=(0,g.A)((e=>{w.current=e,e&&(f&&P()?M():A.current&&(0,b.M)(A.current,I))})),L=i.useCallback((()=>{a.remove(k(),I)}),[I,a]);i.useEffect((()=>()=>{L()}),[L]),i.useEffect((()=>{f?R():T&&s||L()}),[f,L,T,s,R]);const D=e=>t=>{var n;null==(n=e.onKeyDown)||n.call(e,t),"Escape"===t.key&&229!==t.which&&P()&&(r||(t.stopPropagation(),d&&d(t,"escapeKeyDown")))},N=e=>t=>{var r;null==(r=e.onClick)||r.call(e,t),t.target===t.currentTarget&&d&&d(t,"backdropClick")};return{getRootProps:(t={})=>{const r=(0,v.A)(e);delete r.onTransitionEnter,delete r.onTransitionExited;const n=(0,o.A)({},r,t);return(0,o.A)({role:"presentation"},n,{onKeyDown:D(n),ref:S})},getBackdropProps:(e={})=>{const t=e;return(0,o.A)({"aria-hidden":!0},t,{onClick:N(t),open:f})},getTransitionProps:()=>({onEnter:(0,y.A)((()=>{E(!1),l&&l()}),null==u?void 0:u.props.onEnter),onExited:(0,y.A)((()=>{E(!0),c&&c(),s&&L()}),null==u?void 0:u.props.onExited)}),rootRef:S,portalRef:O,isTopModal:P,exited:C,hasTransition:T}}((0,o.A)({},J,{rootRef:t})),ae=(0,o.A)({},J,{exited:oe}),se=(e=>{const{open:t,exited:r,classes:n}=e,o={root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]};return(0,s.A)(o,x.M,n)})(ae),le={};if(void 0===L.props.tabIndex&&(le.tabIndex="-1"),ie){const{onEnter:e,onExited:t}=te();le.onEnter=e,le.onExited=t}const ce=null!=(r=null!=(d=null==Y?void 0:Y.root)?d:F.Root)?r:S,ue=null!=(p=null!=(E=null==Y?void 0:Y.backdrop)?E:F.Backdrop)?p:M,de=null!=(T=null==Z?void 0:Z.root)?T:z.root,fe=null!=(I=null==Z?void 0:Z.backdrop)?I:z.backdrop,pe=(0,l.A)({elementType:ce,externalSlotProps:de,externalForwardedProps:K,getSlotProps:Q,additionalProps:{ref:t,as:N},ownerState:ae,className:(0,a.A)(P,null==de?void 0:de.className,null==se?void 0:se.root,!ae.open&&ae.exited&&(null==se?void 0:se.hidden))}),he=(0,l.A)({elementType:ue,externalSlotProps:fe,additionalProps:R,getSlotProps:e=>ee((0,o.A)({},e,{onClick:t=>{q&&q(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,a.A)(null==fe?void 0:fe.className,null==R?void 0:R.className,null==se?void 0:se.backdrop),ownerState:ae});return W||X||ie&&!oe?(0,w.jsx)(u.A,{ref:re,container:D,disablePortal:$,children:(0,w.jsxs)(ce,(0,o.A)({},pe,{children:[!H&&M?(0,w.jsx)(ue,(0,o.A)({},he)):null,(0,w.jsx)(c.A,{disableEnforceFocus:j,disableAutoFocus:B,disableRestoreFocus:V,isEnabled:ne,open:X,children:i.cloneElement(L,le)})]}))}):null}))},fEft:(e,t,r)=>{"use strict";r.d(t,{M:()=>a,P:()=>u});var n=r("p4lV"),o=r("4bZc"),i=r("Omxi");function a(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function s(e){return parseInt((0,o.A)(e).getComputedStyle(e).paddingRight,10)||0}function l(e,t,r,n,o){const i=[t,r,...n];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),r=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),r="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||r}(e);t&&r&&a(e,o)}))}function c(e,t){let r=-1;return e.some(((e,n)=>!!t(e)&&(r=n,!0))),r}class u{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&a(e.modalRef,!1);const n=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);l(t,e.mount,e.modalRef,n,!0);const o=c(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),r)}mount(e,t){const r=c(this.containers,(t=>-1!==t.modals.indexOf(e))),a=this.containers[r];a.restore||(a.restore=function(e,t){const r=[],a=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,n.A)(e);return t.body===e?(0,o.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(a)){const e=(0,i.A)((0,n.A)(a));r.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${s(a)+e}px`;const t=(0,n.A)(a).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{r.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${s(t)+e}px`}))}let e;if(a.parentNode instanceof DocumentFragment)e=(0,n.A)(a).body;else{const t=a.parentElement,r=(0,o.A)(a);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===r.getComputedStyle(t).overflowY?t:a}r.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{r.forEach((({value:e,el:t,property:r})=>{e?t.style.setProperty(r,e):t.style.removeProperty(r)}))}}(a,t))}remove(e,t=!0){const r=this.modals.indexOf(e);if(-1===r)return r;const n=c(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[n];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&a(e.modalRef,t),l(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(n,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&a(e.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}},bEEB:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,M:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiModal",e)}const a=(0,n.A)("MuiModal",["root","hidden","backdrop"])},"82Iz":(e,t,r)=>{"use strict";r.d(t,{Ay:()=>v,Ku:()=>h,XV:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("xeev"),c=r("F/mX"),u=r("Vn7y"),d=r("XM18"),f=r("nKUr");const p=["className","disabled","error","IconComponent","inputRef","variant"],h=({ownerState:e,theme:t})=>(0,o.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,o.A)({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${c.A.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),m=(0,u.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:d.A,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.select,t[r.variant],r.error&&t.error,{[`&.${c.A.multiple}`]:t.multiple}]}})(h),g=({ownerState:e,theme:t})=>(0,o.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${c.A.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),y=(0,u.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${(0,l.A)(r.variant)}`],r.open&&t.iconOpen]}})(g),v=i.forwardRef((function(e,t){const{className:r,disabled:u,error:d,IconComponent:h,inputRef:g,variant:v="standard"}=e,b=(0,n.A)(e,p),_=(0,o.A)({},e,{disabled:u,variant:v,error:d}),x=(e=>{const{classes:t,variant:r,disabled:n,multiple:o,open:i,error:a}=e,u={select:["select",r,n&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${(0,l.A)(r)}`,i&&"iconOpen",n&&"disabled"]};return(0,s.A)(u,c.w,t)})(_);return(0,f.jsxs)(i.Fragment,{children:[(0,f.jsx)(m,(0,o.A)({ownerState:_,className:(0,a.A)(x.select,r),disabled:u,ref:g||t},b)),e.multiple?null:(0,f.jsx)(y,{as:h,ownerState:_,className:x.icon})]})}))},"F/mX":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,w:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiNativeSelect",e)}const a=(0,n.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"])},"6j3M":(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n,o=r("Nlia"),i=r("+9dH"),a=r("q1tI"),s=r("aGM9"),l=r("Vn7y"),c=r("XM18"),u=r("nKUr");const d=["children","classes","className","label","notched"],f=(0,l.Ay)("fieldset",{shouldForwardProp:c.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),p=(0,l.Ay)("legend",{shouldForwardProp:c.A})((({ownerState:e,theme:t})=>(0,i.A)({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&(0,i.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))));var h=r("7EOP"),m=r("1ODS"),g=r("y9Q0"),y=r("kmWS"),v=r("W9AN");const b=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],_=(0,l.Ay)(y.Sh,{shouldForwardProp:e=>(0,c.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:y.WC})((({theme:e,ownerState:t})=>{const r="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,i.A)({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${g.A.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${g.A.focused} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${g.A.error} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${g.A.disabled} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&(0,i.A)({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))})),x=(0,l.Ay)((function(e){const{className:t,label:r,notched:a}=e,s=(0,o.A)(e,d),l=null!=r&&""!==r,c=(0,i.A)({},e,{notched:a,withLabel:l});return(0,u.jsx)(f,(0,i.A)({"aria-hidden":!0,className:t,ownerState:c},s,{children:(0,u.jsx)(p,{ownerState:c,children:l?(0,u.jsx)("span",{children:r}):n||(n=(0,u.jsx)("span",{className:"notranslate",children:"​"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),w=(0,l.Ay)(y.f3,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:y.Oj})((({theme:e,ownerState:t})=>(0,i.A)({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0}))),A=a.forwardRef((function(e,t){var r,n,l,c,d;const f=(0,v.b)({props:e,name:"MuiOutlinedInput"}),{components:p={},fullWidth:A=!1,inputComponent:S="input",label:C,multiline:E=!1,notched:T,slots:I={},type:k="text"}=f,M=(0,o.A)(f,b),R=(e=>{const{classes:t}=e,r=(0,s.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},g.v,t);return(0,i.A)({},t,r)})(f),P=(0,h.A)(),O=(0,m.A)({props:f,muiFormControl:P,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),L=(0,i.A)({},f,{color:O.color||"primary",disabled:O.disabled,error:O.error,focused:O.focused,formControl:P,fullWidth:A,hiddenLabel:O.hiddenLabel,multiline:E,size:O.size,type:k}),D=null!=(r=null!=(n=I.root)?n:p.Root)?r:_,N=null!=(l=null!=(c=I.input)?c:p.Input)?l:w;return(0,u.jsx)(y.Ay,(0,i.A)({slots:{root:D,input:N},renderSuffix:e=>(0,u.jsx)(x,{ownerState:L,className:R.notchedOutline,label:null!=C&&""!==C&&O.required?d||(d=(0,u.jsxs)(a.Fragment,{children:[C," ","*"]})):C,notched:void 0!==T?T:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:A,inputComponent:S,multiline:E,ref:t,type:k},M,{classes:(0,i.A)({},R,{notchedOutline:null})}))}));A.muiName="Input";const S=A},y9Q0:(e,t,r)=>{"use strict";r.d(t,{A:()=>l,v:()=>s});var n=r("+9dH"),o=r("PYeY"),i=r("TkYO"),a=r("G5wc");function s(e){return(0,i.Ay)("MuiOutlinedInput",e)}const l=(0,n.A)({},a.A,(0,o.A)("MuiOutlinedInput",["root","notchedOutline","input"]))},"G43+":(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("UwZ0"),d=r("W9AN"),f=r("ntv0"),p=r("nKUr");const h=["className","component","elevation","square","variant"],m=(0,c.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,"elevation"===r.variant&&t[`elevation${r.elevation}`]]}})((({theme:e,ownerState:t})=>{var r;return(0,o.A)({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&(0,o.A)({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${(0,l.X4)("#fff",(0,u.A)(t.elevation))}, ${(0,l.X4)("#fff",(0,u.A)(t.elevation))})`},e.vars&&{backgroundImage:null==(r=e.vars.overlays)?void 0:r[t.elevation]}))})),g=i.forwardRef((function(e,t){const r=(0,d.b)({props:e,name:"MuiPaper"}),{className:i,component:l="div",elevation:c=1,square:u=!1,variant:g="elevation"}=r,y=(0,n.A)(r,h),v=(0,o.A)({},r,{component:l,elevation:c,square:u,variant:g}),b=(e=>{const{square:t,elevation:r,variant:n,classes:o}=e,i={root:["root",n,!t&&"rounded","elevation"===n&&`elevation${r}`]};return(0,s.A)(i,f.j,o)})(v);return(0,p.jsx)(m,(0,o.A)({as:l,ownerState:v,className:(0,a.A)(b.root,i),ref:t},y))}))},ntv0:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,j:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiPaper",e)}const a=(0,n.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"])},FZC7:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>M,Dy:()=>S,IJ:()=>k,fB:()=>C,yt:()=>I});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("0Ydi"),c=r("gU+W"),u=r("Vn7y"),d=r("W9AN"),f=r("7yHM"),p=r("rdfb"),h=r("WFZb"),m=r("ZfBw"),g=r("UVCh"),y=r("X6EC"),v=r("G43+"),b=r("NzyO"),_=r("nKUr");const x=["onEntering"],w=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],A=["slotProps"];function S(e,t){let r=0;return"number"==typeof t?r=t:"center"===t?r=e.height/2:"bottom"===t&&(r=e.height),r}function C(e,t){let r=0;return"number"==typeof t?r=t:"center"===t?r=e.width/2:"right"===t&&(r=e.width),r}function E(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function T(e){return"function"==typeof e?e():e}const I=(0,u.Ay)(y.A,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),k=(0,u.Ay)(v.A,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),M=i.forwardRef((function(e,t){var r,u,y;const v=(0,d.b)({props:e,name:"MuiPopover"}),{action:M,anchorEl:R,anchorOrigin:P={vertical:"top",horizontal:"left"},anchorPosition:O,anchorReference:L="anchorEl",children:D,className:N,container:F,elevation:z=8,marginThreshold:B=16,open:j,PaperProps:U={},slots:$,slotProps:V,transformOrigin:G={vertical:"top",horizontal:"left"},TransitionComponent:H=g.A,transitionDuration:W="auto",TransitionProps:{onEntering:q}={},disableScrollLock:X=!1}=v,Z=(0,o.A)(v.TransitionProps,x),Y=(0,o.A)(v,w),K=null!=(r=null==V?void 0:V.paper)?r:U,J=i.useRef(),Q=(0,m.A)(J,K.ref),ee=(0,n.A)({},v,{anchorOrigin:P,anchorReference:L,elevation:z,marginThreshold:B,externalPaperSlotProps:K,transformOrigin:G,TransitionComponent:H,transitionDuration:W,TransitionProps:Z}),te=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],paper:["paper"]},b.K,t)})(ee),re=i.useCallback((()=>{if("anchorPosition"===L)return O;const e=T(R),t=(e&&1===e.nodeType?e:(0,p.A)(J.current).body).getBoundingClientRect();return{top:t.top+S(t,P.vertical),left:t.left+C(t,P.horizontal)}}),[R,P.horizontal,P.vertical,O,L]),ne=i.useCallback((e=>({vertical:S(e,G.vertical),horizontal:C(e,G.horizontal)})),[G.horizontal,G.vertical]),oe=i.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},r=ne(t);if("none"===L)return{top:null,left:null,transformOrigin:E(r)};const n=re();let o=n.top-r.vertical,i=n.left-r.horizontal;const a=o+t.height,s=i+t.width,l=(0,h.A)(T(R)),c=l.innerHeight-B,u=l.innerWidth-B;if(null!==B&&oc){const e=a-c;o-=e,r.vertical+=e}if(null!==B&&iu){const e=s-u;i-=e,r.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:E(r)}}),[R,L,re,ne,B]),[ie,ae]=i.useState(j),se=i.useCallback((()=>{const e=J.current;if(!e)return;const t=oe(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,ae(!0)}),[oe]);i.useEffect((()=>(X&&window.addEventListener("scroll",se),()=>window.removeEventListener("scroll",se))),[R,X,se]),i.useEffect((()=>{j&&se()})),i.useImperativeHandle(M,(()=>j?{updatePosition:()=>{se()}}:null),[j,se]),i.useEffect((()=>{if(!j)return;const e=(0,f.A)((()=>{se()})),t=(0,h.A)(R);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[R,j,se]);let le=W;"auto"!==W||H.muiSupportAuto||(le=void 0);const ce=F||(R?(0,p.A)(T(R)).body:void 0),ue=null!=(u=null==$?void 0:$.root)?u:I,de=null!=(y=null==$?void 0:$.paper)?y:k,fe=(0,l.A)({elementType:de,externalSlotProps:(0,n.A)({},K,{style:ie?K.style:(0,n.A)({},K.style,{opacity:0})}),additionalProps:{elevation:z,ref:Q},ownerState:ee,className:(0,a.A)(te.paper,null==K?void 0:K.className)}),pe=(0,l.A)({elementType:ue,externalSlotProps:(null==V?void 0:V.root)||{},externalForwardedProps:Y,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:ce,open:j},ownerState:ee,className:(0,a.A)(te.root,N)}),{slotProps:he}=pe,me=(0,o.A)(pe,A);return(0,_.jsx)(ue,(0,n.A)({},me,!(0,c.A)(ue)&&{slotProps:he,disableScrollLock:X},{children:(0,_.jsx)(H,(0,n.A)({appear:!0,in:j,onEntering:(e,t)=>{q&&q(e,t),se()},onExited:()=>{ae(!1)},timeout:le},Z,{children:(0,_.jsx)(de,(0,n.A)({},fe,{children:D}))}))}))}))},NzyO:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,K:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiPopover",e)}const a=(0,n.A)("MuiPopover",["root","paper"])},usZy:(e,t,r)=>{"use strict";r.d(t,{A:()=>Oe});var n=r("+9dH"),o=r("Nlia"),i=r("847q"),a=r("q1tI"),s=r("N0rN"),l=r("XgeM"),c=r("p4lV");function u(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function d(e){return e instanceof u(e).Element||e instanceof Element}function f(e){return e instanceof u(e).HTMLElement||e instanceof HTMLElement}function p(e){return"undefined"!=typeof ShadowRoot&&(e instanceof u(e).ShadowRoot||e instanceof ShadowRoot)}var h=Math.max,m=Math.min,g=Math.round;function y(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function v(){return!/^((?!chrome|android).)*safari/i.test(y())}function b(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&f(e)&&(o=e.offsetWidth>0&&g(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&g(n.height)/e.offsetHeight||1);var a=(d(e)?u(e):window).visualViewport,s=!v()&&r,l=(n.left+(s&&a?a.offsetLeft:0))/o,c=(n.top+(s&&a?a.offsetTop:0))/i,p=n.width/o,h=n.height/i;return{width:p,height:h,top:c,right:l+p,bottom:c+h,left:l,x:l,y:c}}function _(e){var t=u(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function x(e){return e?(e.nodeName||"").toLowerCase():null}function w(e){return((d(e)?e.ownerDocument:e.document)||window.document).documentElement}function A(e){return b(w(e)).left+_(e).scrollLeft}function S(e){return u(e).getComputedStyle(e)}function C(e){var t=S(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function E(e,t,r){void 0===r&&(r=!1);var n,o,i=f(t),a=f(t)&&function(e){var t=e.getBoundingClientRect(),r=g(t.width)/e.offsetWidth||1,n=g(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),s=w(t),l=b(e,a,r),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(i||!i&&!r)&&(("body"!==x(t)||C(s))&&(c=(n=t)!==u(n)&&f(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:_(n)),f(t)?((d=b(t,!0)).x+=t.clientLeft,d.y+=t.clientTop):s&&(d.x=A(s))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function T(e){var t=b(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function I(e){return"html"===x(e)?e:e.assignedSlot||e.parentNode||(p(e)?e.host:null)||w(e)}function k(e){return["html","body","#document"].indexOf(x(e))>=0?e.ownerDocument.body:f(e)&&C(e)?e:k(I(e))}function M(e,t){var r;void 0===t&&(t=[]);var n=k(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=u(n),a=o?[i].concat(i.visualViewport||[],C(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(M(I(a)))}function R(e){return["table","td","th"].indexOf(x(e))>=0}function P(e){return f(e)&&"fixed"!==S(e).position?e.offsetParent:null}function O(e){for(var t=u(e),r=P(e);r&&R(r)&&"static"===S(r).position;)r=P(r);return r&&("html"===x(r)||"body"===x(r)&&"static"===S(r).position)?t:r||function(e){var t=/firefox/i.test(y());if(/Trident/i.test(y())&&f(e)&&"fixed"===S(e).position)return null;var r=I(e);for(p(r)&&(r=r.host);f(r)&&["html","body"].indexOf(x(r))<0;){var n=S(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var L="top",D="bottom",N="right",F="left",z="auto",B=[L,D,N,F],j="start",U="end",$="viewport",V="popper",G=B.reduce((function(e,t){return e.concat([t+"-"+j,t+"-"+U])}),[]),H=[].concat(B,[z]).reduce((function(e,t){return e.concat([t,t+"-"+j,t+"-"+U])}),[]),W=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}var X={placement:"bottom",modifiers:[],strategy:"absolute"};function Z(){for(var e=arguments.length,t=new Array(e),r=0;r=0?"x":"y"}function te(e){var t,r=e.reference,n=e.element,o=e.placement,i=o?J(o):null,a=o?Q(o):null,s=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(i){case L:t={x:s,y:r.y-n.height};break;case D:t={x:s,y:r.y+r.height};break;case N:t={x:r.x+r.width,y:l};break;case F:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=i?ee(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case j:t[c]=t[c]-(r[u]/2-n[u]/2);break;case U:t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}var re={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,h=void 0===p?0:p,m=a.y,y=void 0===m?0:m,v="function"==typeof d?d({x:h,y}):{x:h,y};h=v.x,y=v.y;var b=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),x=F,A=L,C=window;if(c){var E=O(r),T="clientHeight",I="clientWidth";E===u(r)&&"static"!==S(E=w(r)).position&&"absolute"===s&&(T="scrollHeight",I="scrollWidth"),(o===L||(o===F||o===N)&&i===U)&&(A=D,y-=(f&&E===C&&C.visualViewport?C.visualViewport.height:E[T])-n.height,y*=l?1:-1),o!==F&&(o!==L&&o!==D||i!==U)||(x=N,h-=(f&&E===C&&C.visualViewport?C.visualViewport.width:E[I])-n.width,h*=l?1:-1)}var k,M=Object.assign({position:s},c&&re),R=!0===d?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:g(r*o)/o||0,y:g(n*o)/o||0}}({x:h,y},u(r)):{x:h,y};return h=R.x,y=R.y,l?Object.assign({},M,((k={})[A]=_?"0":"",k[x]=b?"0":"",k.transform=(C.devicePixelRatio||1)<=1?"translate("+h+"px, "+y+"px)":"translate3d("+h+"px, "+y+"px, 0)",k)):Object.assign({},M,((t={})[A]=_?y+"px":"",t[x]=b?h+"px":"",t.transform="",t))}var oe={left:"right",right:"left",bottom:"top",top:"bottom"};function ie(e){return e.replace(/left|right|bottom|top/g,(function(e){return oe[e]}))}var ae={start:"end",end:"start"};function se(e){return e.replace(/start|end/g,(function(e){return ae[e]}))}function le(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&p(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ce(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ue(e,t,r){return t===$?ce(function(e,t){var r=u(e),n=w(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=v();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+A(e),y:l}}(e,r)):d(t)?function(e,t){var r=b(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):ce(function(e){var t,r=w(e),n=_(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=h(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=h(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+A(e),l=-n.scrollTop;return"rtl"===S(o||r).direction&&(s+=h(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(w(e)))}function de(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function fe(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function pe(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,i=r.strategy,a=void 0===i?e.strategy:i,s=r.boundary,l=void 0===s?"clippingParents":s,c=r.rootBoundary,u=void 0===c?$:c,p=r.elementContext,g=void 0===p?V:p,y=r.altBoundary,v=void 0!==y&&y,_=r.padding,A=void 0===_?0:_,C=de("number"!=typeof A?A:fe(A,B)),E=g===V?"reference":V,T=e.rects.popper,k=e.elements[v?E:g],R=function(e,t,r,n){var o="clippingParents"===t?function(e){var t=M(I(e)),r=["absolute","fixed"].indexOf(S(e).position)>=0&&f(e)?O(e):e;return d(r)?t.filter((function(e){return d(e)&&le(e,r)&&"body"!==x(e)})):[]}(e):[].concat(t),i=[].concat(o,[r]),a=i[0],s=i.reduce((function(t,r){var o=ue(e,r,n);return t.top=h(o.top,t.top),t.right=m(o.right,t.right),t.bottom=m(o.bottom,t.bottom),t.left=h(o.left,t.left),t}),ue(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(d(k)?k:k.contextElement||w(e.elements.popper),l,u,a),P=b(e.elements.reference),F=te({reference:P,element:T,strategy:"absolute",placement:o}),z=ce(Object.assign({},T,F)),j=g===V?z:P,U={top:R.top-j.top+C.top,bottom:j.bottom-R.bottom+C.bottom,left:R.left-j.left+C.left,right:j.right-R.right+C.right},G=e.modifiersData.offset;if(g===V&&G){var H=G[o];Object.keys(U).forEach((function(e){var t=[N,D].indexOf(e)>=0?1:-1,r=[L,D].indexOf(e)>=0?"y":"x";U[e]+=H[r]*t}))}return U}function he(e,t,r){return h(e,m(t,r))}function me(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ge(e){return[L,N,D,F].some((function(t){return e[t]>=0}))}var ye=Y({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=void 0===o||o,a=n.resize,s=void 0===a||a,l=u(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",r.update,K)})),s&&l.addEventListener("resize",r.update,K),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",r.update,K)})),s&&l.removeEventListener("resize",r.update,K)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=te({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,a=void 0===i||i,s=r.roundOffsets,l=void 0===s||s,c={placement:J(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];f(o)&&x(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});f(n)&&x(n)&&(Object.assign(n.style,i),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=void 0===o?[0,0]:o,a=H.reduce((function(e,r){return e[r]=function(e,t,r){var n=J(e),o=[F,L].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},t,{placement:e})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[F,N].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(r,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0===a||a,l=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,f=r.altBoundary,p=r.flipVariations,h=void 0===p||p,m=r.allowedAutoPlacements,g=t.options.placement,y=J(g),v=l||(y!==g&&h?function(e){if(J(e)===z)return[];var t=ie(e);return[se(e),t,se(t)]}(g):[ie(g)]),b=[g].concat(v).reduce((function(e,r){return e.concat(J(r)===z?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?H:l,u=Q(n),d=u?s?G:G.filter((function(e){return Q(e)===u})):B,f=d.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,r){return t[r]=pe(e,{placement:r,boundary:o,rootBoundary:i,padding:a})[J(r)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:r,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):r)}),[]),_=t.rects.reference,x=t.rects.popper,w=new Map,A=!0,S=b[0],C=0;C=0,M=k?"width":"height",R=pe(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=k?I?N:F:I?D:L;_[M]>x[M]&&(P=ie(P));var O=ie(P),U=[];if(i&&U.push(R[T]<=0),s&&U.push(R[P]<=0,R[O]<=0),U.every((function(e){return e}))){S=E,A=!1;break}w.set(E,U)}if(A)for(var $=function(e){var t=b.find((function(t){var r=w.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},V=h?3:1;V>0&&"break"!==$(V);V--);t.placement!==S&&(t.modifiersData[n]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0!==a&&a,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,f=r.tether,p=void 0===f||f,g=r.tetherOffset,y=void 0===g?0:g,v=pe(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=J(t.placement),_=Q(t.placement),x=!_,w=ee(b),A="x"===w?"y":"x",S=t.modifiersData.popperOffsets,C=t.rects.reference,E=t.rects.popper,I="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,k="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(S){if(i){var P,z="y"===w?L:F,B="y"===w?D:N,U="y"===w?"height":"width",$=S[w],V=$+v[z],G=$-v[B],H=p?-E[U]/2:0,W=_===j?C[U]:E[U],q=_===j?-E[U]:-C[U],X=t.elements.arrow,Z=p&&X?T(X):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=Y[z],te=Y[B],re=he(0,C[U],Z[U]),ne=x?C[U]/2-H-re-K-k.mainAxis:W-re-K-k.mainAxis,oe=x?-C[U]/2+H+re+te+k.mainAxis:q+re+te+k.mainAxis,ie=t.elements.arrow&&O(t.elements.arrow),ae=ie?"y"===w?ie.clientTop||0:ie.clientLeft||0:0,se=null!=(P=null==M?void 0:M[w])?P:0,le=$+oe-se,ce=he(p?m(V,$+ne-se-ae):V,$,p?h(G,le):G);S[w]=ce,R[w]=ce-$}if(s){var ue,de="x"===w?L:F,fe="x"===w?D:N,me=S[A],ge="y"===A?"height":"width",ye=me+v[de],ve=me-v[fe],be=-1!==[L,F].indexOf(b),_e=null!=(ue=null==M?void 0:M[A])?ue:0,xe=be?ye:me-C[ge]-E[ge]-_e+k.altAxis,we=be?me+C[ge]+E[ge]-_e-k.altAxis:ve,Ae=p&&be?function(e,t,r){var n=he(e,t,r);return n>r?r:n}(xe,me,we):he(p?xe:ye,me,p?we:ve);S[A]=Ae,R[A]=Ae-me}t.modifiersData[n]=R}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=J(r.placement),l=ee(s),c=[F,N].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return de("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:fe(e,B))}(o.padding,r),d=T(i),f="y"===l?L:F,p="y"===l?D:N,h=r.rects.reference[c]+r.rects.reference[l]-a[l]-r.rects.popper[c],m=a[l]-r.rects.reference[l],g=O(i),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=h/2-m/2,b=u[f],_=y-d[c]-u[p],x=y/2-d[c]/2+v,w=he(b,x,_),A=l;r.modifiersData[n]=((t={})[A]=w,t.centerOffset=w-x,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&le(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=pe(t,{elementContext:"reference"}),s=pe(t,{altBoundary:!0}),l=me(a,n),c=me(s,o,i),u=ge(l),d=ge(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),ve=r("aGM9"),be=r("0Ydi"),_e=r("Cc46"),xe=r("zFdC"),we=r("nKUr");const Ae=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Se=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Ce(e){return"function"==typeof e?e():e}const Ee={},Te=a.forwardRef((function(e,t){var r;const{anchorEl:i,children:c,direction:u,disablePortal:d,modifiers:f,open:p,placement:h,popperOptions:m,popperRef:g,slotProps:y={},slots:v={},TransitionProps:b}=e,_=(0,o.A)(e,Ae),x=a.useRef(null),w=(0,s.A)(x,t),A=a.useRef(null),S=(0,s.A)(A,g),C=a.useRef(S);(0,l.A)((()=>{C.current=S}),[S]),a.useImperativeHandle(g,(()=>A.current),[]);const E=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(h,u),[T,I]=a.useState(E),[k,M]=a.useState(Ce(i));a.useEffect((()=>{A.current&&A.current.forceUpdate()})),a.useEffect((()=>{i&&M(Ce(i))}),[i]),(0,l.A)((()=>{if(!k||!p)return;let e=[{name:"preventOverflow",options:{altBoundary:d}},{name:"flip",options:{altBoundary:d}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{I(e.placement)}}];null!=f&&(e=e.concat(f)),m&&null!=m.modifiers&&(e=e.concat(m.modifiers));const t=ye(k,x.current,(0,n.A)({placement:E},m,{modifiers:e}));return C.current(t),()=>{t.destroy(),C.current(null)}}),[k,d,f,p,m,E]);const R={placement:T};null!==b&&(R.TransitionProps=b);const P=(e=>{const{classes:t}=e;return(0,ve.A)({root:["root"]},xe.b,t)})(e),O=null!=(r=v.root)?r:"div",L=(0,be.A)({elementType:O,externalSlotProps:y.root,externalForwardedProps:_,additionalProps:{role:"tooltip",ref:w},ownerState:e,className:P.root});return(0,we.jsx)(O,(0,n.A)({},L,{children:"function"==typeof c?c(R):c}))})),Ie=a.forwardRef((function(e,t){const{anchorEl:r,children:i,container:s,direction:l="ltr",disablePortal:u=!1,keepMounted:d=!1,modifiers:f,open:p,placement:h="bottom",popperOptions:m=Ee,popperRef:g,style:y,transition:v=!1,slotProps:b={},slots:_={}}=e,x=(0,o.A)(e,Se),[w,A]=a.useState(!0);if(!d&&!p&&(!v||w))return null;let S;if(s)S=s;else if(r){const e=Ce(r);S=e&&void 0!==e.nodeType?(0,c.A)(e).body:(0,c.A)(null).body}const C=p||!d||v&&!w?void 0:"none",E=v?{in:p,onEnter:()=>{A(!1)},onExited:()=>{A(!0)}}:void 0;return(0,we.jsx)(_e.A,{disablePortal:u,container:S,children:(0,we.jsx)(Te,(0,n.A)({anchorEl:r,direction:l,disablePortal:u,modifiers:f,ref:t,open:v?!w:p,placement:h,popperOptions:m,popperRef:g,slotProps:b,slots:_},x,{style:(0,n.A)({position:"fixed",top:0,left:0,display:C},y),TransitionProps:E,children:i}))})}));var ke=r("Vn7y"),Me=r("W9AN");const Re=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Pe=(0,ke.Ay)(Ie,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Oe=a.forwardRef((function(e,t){var r;const a=(0,i.A)(),s=(0,Me.b)({props:e,name:"MuiPopper"}),{anchorEl:l,component:c,components:u,componentsProps:d,container:f,disablePortal:p,keepMounted:h,modifiers:m,open:g,placement:y,popperOptions:v,popperRef:b,transition:_,slots:x,slotProps:w}=s,A=(0,o.A)(s,Re),S=null!=(r=null==x?void 0:x.root)?r:null==u?void 0:u.Root,C=(0,n.A)({anchorEl:l,container:f,disablePortal:p,keepMounted:h,modifiers:m,open:g,placement:y,popperOptions:v,popperRef:b,transition:_},A);return(0,we.jsx)(Pe,(0,n.A)({as:c,direction:null==a?void 0:a.direction,slots:{root:S},slotProps:null!=w?w:d},C,{ref:t}))}))},zFdC:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiPopper",e)}(0,n.A)("MuiPopper",["root"])},Cc46:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r("q1tI"),o=r("i8i4"),i=r("N0rN"),a=r("XgeM"),s=r("1YXj"),l=r("nKUr");const c=n.forwardRef((function(e,t){const{children:r,container:c,disablePortal:u=!1}=e,[d,f]=n.useState(null),p=(0,i.A)(n.isValidElement(r)?r.ref:null,t);if((0,a.A)((()=>{u||f(function(e){return"function"==typeof e?e():e}(c)||document.body)}),[c,u]),(0,a.A)((()=>{if(d&&!u)return(0,s.A)(t,d),()=>{(0,s.A)(t,null)}}),[t,d,u]),u){if(n.isValidElement(r)){const e={ref:p};return n.cloneElement(r,e)}return(0,l.jsx)(n.Fragment,{children:r})}return(0,l.jsx)(n.Fragment,{children:d?o.createPortal(r,d):d})}))},d4Oc:(e,t,r)=>{"use strict";r.d(t,{A:()=>k});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("J1Ai"),u=r("W9AN"),d=r("M7pN"),f=r("nKUr");const p=(0,d.A)((0,f.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),h=(0,d.A)((0,f.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");var m=r("Vn7y"),g=r("XM18");const y=(0,m.Ay)("span",{shouldForwardProp:g.A})({position:"relative",display:"flex"}),v=(0,m.Ay)(p)({transform:"scale(1)"}),b=(0,m.Ay)(h)((({theme:e,ownerState:t})=>(0,o.A)({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},t.checked&&{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}))),_=function(e){const{checked:t=!1,classes:r={},fontSize:n}=e,i=(0,o.A)({},e,{checked:t});return(0,f.jsxs)(y,{className:r.root,ownerState:i,children:[(0,f.jsx)(v,{fontSize:n,className:r.background,ownerState:i}),(0,f.jsx)(b,{fontSize:n,className:r.dot,ownerState:i})]})};var x=r("xeev"),w=r("j3nj"),A=r("l+/q"),S=r("N7Sv");const C=["checked","checkedIcon","color","icon","name","onChange","size","className"],E=(0,m.Ay)(c.A,{shouldForwardProp:e=>(0,g.A)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"medium"!==r.size&&t[`size${(0,x.A)(r.size)}`],t[`color${(0,x.A)(r.color)}`]]}})((({theme:e,ownerState:t})=>(0,o.A)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${S.A.checked}`]:{color:(e.vars||e).palette[t.color].main}},{[`&.${S.A.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),T=(0,f.jsx)(_,{checked:!0}),I=(0,f.jsx)(_,{}),k=i.forwardRef((function(e,t){var r,l;const c=(0,u.b)({props:e,name:"MuiRadio"}),{checked:d,checkedIcon:p=T,color:h="primary",icon:m=I,name:g,onChange:y,size:v="medium",className:b}=c,_=(0,n.A)(c,C),k=(0,o.A)({},c,{color:h,size:v}),M=(e=>{const{classes:t,color:r,size:n}=e,i={root:["root",`color${(0,x.A)(r)}`,"medium"!==n&&`size${(0,x.A)(n)}`]};return(0,o.A)({},t,(0,s.A)(i,S.q,t))})(k),R=(0,A.A)();let P=d;const O=(0,w.A)(y,R&&R.onChange);let L=g;var D,N;return R&&(void 0===P&&(D=R.value,P="object"==typeof(N=c.value)&&null!==N?D===N:String(D)===String(N)),void 0===L&&(L=R.name)),(0,f.jsx)(E,(0,o.A)({type:"radio",icon:i.cloneElement(m,{fontSize:null!=(r=I.props.fontSize)?r:v}),checkedIcon:i.cloneElement(p,{fontSize:null!=(l=T.props.fontSize)?l:v}),ownerState:k,classes:M,name:L,checked:P,onChange:O,ref:t,className:(0,a.A)(M.root,b)},_))}))},N7Sv:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,q:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiRadio",e)}const a=(0,n.A)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"])},zjqC:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("4ycN"),c=r("brkH"),u=r("ZfBw"),d=r("1vOf"),f=r("F3ys"),p=r("DSU1"),h=r("nKUr");const m=["actions","children","className","defaultValue","name","onChange","value"],g=i.forwardRef((function(e,t){const{actions:r,children:g,className:y,defaultValue:v,name:b,onChange:_,value:x}=e,w=(0,o.A)(e,m),A=i.useRef(null),S=(e=>{const{classes:t,row:r,error:n}=e,o={root:["root",r&&"row",n&&"error"]};return(0,s.A)(o,c.B,t)})(e),[C,E]=(0,d.A)({controlled:x,default:v,name:"RadioGroup"});i.useImperativeHandle(r,(()=>({focus:()=>{let e=A.current.querySelector("input:not(:disabled):checked");e||(e=A.current.querySelector("input:not(:disabled)")),e&&e.focus()}})),[]);const T=(0,u.A)(t,A),I=(0,p.A)(b),k=i.useMemo((()=>({name:I,onChange(e){E(e.target.value),_&&_(e,e.target.value)},value:C})),[I,_,E,C]);return(0,h.jsx)(f.A.Provider,{value:k,children:(0,h.jsx)(l.A,(0,n.A)({role:"radiogroup",ref:T,className:(0,a.A)(S.root,y)},w,{children:g}))})}))},F3ys:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext(void 0)},brkH:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,B:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiRadioGroup",e)}const a=(0,n.A)("MuiRadioGroup",["root","row","error"])},"l+/q":(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("F3ys");function i(){return n.useContext(o.A)}},"f/6o":(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("Vn7y"),u=r("L9aa"),d=r("c5OB"),f=r("nKUr");const p=["className","component","enableColorScheme"],h=(0,c.Ay)("div",{name:"MuiScopedCssBaseline",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>{const r={};return t.enableColorScheme&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach((([t,n])=>{var o;r[`&${e.getColorSchemeSelector(t).replace(/\s*&/,"")}`]={colorScheme:null==(o=n.palette)?void 0:o.mode}})),(0,o.A)({},(0,u.qy)(e,t.enableColorScheme),(0,u.rf)(e),{"& *, & *::before, & *::after":{boxSizing:"inherit"},"& strong, & b":{fontWeight:e.typography.fontWeightBold}},r)})),m=i.forwardRef((function(e,t){const r=(0,l.b)({props:e,name:"MuiScopedCssBaseline"}),{className:i,component:c="div"}=r,u=(0,n.A)(r,p),m=(0,o.A)({},r,{component:c}),g=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.r,t)})(m);return(0,f.jsx)(h,(0,o.A)({as:c,className:(0,a.A)(g.root,i),ref:t,ownerState:m},u))}))},c5OB:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,r:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiScopedCssBaseline",e)}const a=(0,n.A)("MuiScopedCssBaseline",["root"])},AAK8:(e,t,r)=>{"use strict";r.d(t,{A:()=>H});var n,o=r("+9dH"),i=r("Nlia"),a=r("q1tI"),s=r("juqV"),l=r("w9Qe"),c=r("KRkT"),u=(r("TOwV"),r("aGM9")),d=r("A3c4"),f=r("rdfb"),p=r("xeev"),h=r("4enW"),m=r("82Iz"),g=r("AOhz"),y=r("Vn7y"),v=r("FO2v"),b=r("ZfBw"),_=r("1vOf"),x=r("tNc0"),w=r("nKUr");const A=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],S=(0,y.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`&.${x.A.select}`]:t.select},{[`&.${x.A.select}`]:t[r.variant]},{[`&.${x.A.error}`]:t.error},{[`&.${x.A.multiple}`]:t.multiple}]}})(m.Ku,{[`&.${x.A.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),C=(0,y.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${(0,p.A)(r.variant)}`],r.open&&t.iconOpen]}})(m.XV),E=(0,y.Ay)("input",{shouldForwardProp:e=>(0,v.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function T(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function I(e){return null==e||"string"==typeof e&&!e.trim()}const k=a.forwardRef((function(e,t){var r;const{"aria-describedby":l,"aria-label":m,autoFocus:y,autoWidth:v,children:k,className:M,defaultOpen:R,defaultValue:P,disabled:O,displayEmpty:L,error:D=!1,IconComponent:N,inputRef:F,labelId:z,MenuProps:B={},multiple:j,name:U,onBlur:$,onChange:V,onClose:G,onFocus:H,onOpen:W,open:q,readOnly:X,renderValue:Z,SelectDisplayProps:Y={},tabIndex:K,value:J,variant:Q="standard"}=e,ee=(0,i.A)(e,A),[te,re]=(0,_.A)({controlled:J,default:P,name:"Select"}),[ne,oe]=(0,_.A)({controlled:q,default:R,name:"Select"}),ie=a.useRef(null),ae=a.useRef(null),[se,le]=a.useState(null),{current:ce}=a.useRef(null!=q),[ue,de]=a.useState(),fe=(0,b.A)(t,F),pe=a.useCallback((e=>{ae.current=e,e&&le(e)}),[]),he=null==se?void 0:se.parentNode;a.useImperativeHandle(fe,(()=>({focus:()=>{ae.current.focus()},node:ie.current,value:te})),[te]),a.useEffect((()=>{R&&ne&&se&&!ce&&(de(v?null:he.clientWidth),ae.current.focus())}),[se,v]),a.useEffect((()=>{y&&ae.current.focus()}),[y]),a.useEffect((()=>{if(!z)return;const e=(0,f.A)(ae.current).getElementById(z);if(e){const t=()=>{getSelection().isCollapsed&&ae.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[z]);const me=(e,t)=>{e?W&&W(t):G&&G(t),ce||(de(v?null:he.clientWidth),oe(e))},ge=a.Children.toArray(k),ye=e=>t=>{let r;if(t.currentTarget.hasAttribute("tabindex")){if(j){r=Array.isArray(te)?te.slice():[];const t=te.indexOf(e.props.value);-1===t?r.push(e.props.value):r.splice(t,1)}else r=e.props.value;if(e.props.onClick&&e.props.onClick(t),te!==r&&(re(r),V)){const n=t.nativeEvent||t,o=new n.constructor(n.type,n);Object.defineProperty(o,"target",{writable:!0,value:{value:r,name:U}}),V(o,e)}j||me(!1,t)}},ve=null!==se&≠let be,_e;delete ee["aria-invalid"];const xe=[];let we=!1,Ae=!1;((0,g.lq)({value:te})||L)&&(Z?be=Z(te):we=!0);const Se=ge.map((e=>{if(!a.isValidElement(e))return null;let t;if(j){if(!Array.isArray(te))throw new Error((0,c.A)(2));t=te.some((t=>T(t,e.props.value))),t&&we&&xe.push(e.props.children)}else t=T(te,e.props.value),t&&we&&(_e=e.props.children);return t&&(Ae=!0),a.cloneElement(e,{"aria-selected":t?"true":"false",onClick:ye(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));we&&(be=j?0===xe.length?null:xe.reduce(((e,t,r)=>(e.push(t),r{const{classes:t,variant:r,disabled:n,multiple:o,open:i,error:a}=e,s={select:["select",r,n&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${(0,p.A)(r)}`,i&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return(0,u.A)(s,x.T,t)})(Ie),Me=(0,o.A)({},B.PaperProps,null==(r=B.slotProps)?void 0:r.paper),Re=(0,d.A)();return(0,w.jsxs)(a.Fragment,{children:[(0,w.jsx)(S,(0,o.A)({ref:pe,tabIndex:Ce,role:"combobox","aria-controls":Re,"aria-disabled":O?"true":void 0,"aria-expanded":ve?"true":"false","aria-haspopup":"listbox","aria-label":m,"aria-labelledby":[z,Te].filter(Boolean).join(" ")||void 0,"aria-describedby":l,onKeyDown:e=>{X||-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),me(!0,e))},onMouseDown:O||X?null:e=>{0===e.button&&(e.preventDefault(),ae.current.focus(),me(!0,e))},onBlur:e=>{!ve&&$&&(Object.defineProperty(e,"target",{writable:!0,value:{value:te,name:U}}),$(e))},onFocus:H},Y,{ownerState:Ie,className:(0,s.A)(Y.className,ke.select,M),id:Te,children:I(be)?n||(n=(0,w.jsx)("span",{className:"notranslate",children:"​"})):be})),(0,w.jsx)(E,(0,o.A)({"aria-invalid":D,value:Array.isArray(te)?te.join(","):te,name:U,ref:ie,"aria-hidden":!0,onChange:e=>{const t=ge.find((t=>t.props.value===e.target.value));void 0!==t&&(re(t.props.value),V&&V(e,t))},tabIndex:-1,disabled:O,className:ke.nativeInput,autoFocus:y,ownerState:Ie},ee)),(0,w.jsx)(C,{as:N,className:ke.icon,ownerState:Ie}),(0,w.jsx)(h.A,(0,o.A)({id:`menu-${U||""}`,anchorEl:he,open:ve,onClose:e=>{me(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},B,{MenuListProps:(0,o.A)({"aria-labelledby":z,role:"listbox","aria-multiselectable":j?"true":void 0,disableListWrap:!0,id:Re},B.MenuListProps),slotProps:(0,o.A)({},B.slotProps,{paper:(0,o.A)({},Me,{style:(0,o.A)({minWidth:Ee},null!=Me?Me.style:null)})}),children:Se}))]})}));var M=r("1ODS"),R=r("7EOP"),P=r("smxg"),O=r("WdHY"),L=r("fJ4Q"),D=r("6j3M"),N=r("W9AN"),F=r("XM18");const z=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],B=["root"],j={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,F.A)(e)&&"variant"!==e,slot:"Root"},U=(0,y.Ay)(O.A,j)(""),$=(0,y.Ay)(D.A,j)(""),V=(0,y.Ay)(L.A,j)(""),G=a.forwardRef((function(e,t){const r=(0,N.b)({name:"MuiSelect",props:e}),{autoWidth:n=!1,children:c,classes:u={},className:d,defaultOpen:f=!1,displayEmpty:p=!1,IconComponent:h=P.A,id:g,input:y,inputProps:v,label:_,labelId:x,MenuProps:A,multiple:S=!1,native:C=!1,onClose:E,onOpen:T,open:I,renderValue:O,SelectDisplayProps:L,variant:D="outlined"}=r,F=(0,i.A)(r,z),j=C?m.Ay:k,G=(0,R.A)(),H=(0,M.A)({props:r,muiFormControl:G,states:["variant","error"]}),W=H.variant||D,q=(0,o.A)({},r,{variant:W,classes:u}),X=(e=>{const{classes:t}=e;return t})(q),Z=(0,i.A)(X,B),Y=y||{standard:(0,w.jsx)(U,{ownerState:q}),outlined:(0,w.jsx)($,{label:_,ownerState:q}),filled:(0,w.jsx)(V,{ownerState:q})}[W],K=(0,b.A)(t,Y.ref);return(0,w.jsx)(a.Fragment,{children:a.cloneElement(Y,(0,o.A)({inputComponent:j,inputProps:(0,o.A)({children:c,error:H.error,IconComponent:h,variant:W,type:void 0,multiple:S},C?{id:g}:{autoWidth:n,defaultOpen:f,displayEmpty:p,labelId:x,MenuProps:A,onClose:E,onOpen:T,open:I,renderValue:O,SelectDisplayProps:(0,o.A)({id:g},L)},v,{classes:v?(0,l.A)(Z,v.classes):Z},y?y.props.inputProps:{})},(S&&C||p)&&"outlined"===W?{notched:!0}:{},{ref:K,className:(0,s.A)(Y.props.className,d,X.root)},!y&&{variant:W},F))})}));G.muiName="Select";const H=G},tNc0:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,T:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSelect",e)}const a=(0,n.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"])},tAhU:(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("AeFk"),l=r("aGM9"),c=r("qn7V"),u=r("2Qr1"),d=r("Vn7y"),f=r("W9AN"),p=r("ioAD"),h=r("nKUr");const m=["animation","className","component","height","style","variant","width"];let g,y,v,b,_=e=>e;const x=(0,s.i7)(g||(g=_` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `)),w=(0,s.i7)(y||(y=_` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `)),A=(0,d.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!1!==r.animation&&t[r.animation],r.hasChildren&&t.withChildren,r.hasChildren&&!r.width&&t.fitContent,r.hasChildren&&!r.height&&t.heightAuto]}})((({theme:e,ownerState:t})=>{const r=(0,c.l_)(e.shape.borderRadius)||"px",n=(0,c.db)(e.shape.borderRadius);return(0,o.A)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,u.X4)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===t.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${r}/${Math.round(n/.6*10)/10}${r}`,"&:empty:before":{content:'"\\00a0"'}},"circular"===t.variant&&{borderRadius:"50%"},"rounded"===t.variant&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})}),(({ownerState:e})=>"pulse"===e.animation&&(0,s.AH)(v||(v=_` animation: ${0} 2s ease-in-out 0.5s infinite; `),x)),(({ownerState:e,theme:t})=>"wave"===e.animation&&(0,s.AH)(b||(b=_` position: relative; overflow: hidden; /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ -webkit-mask-image: -webkit-radial-gradient(white, black); &::after { animation: ${0} 2s linear 0.5s infinite; background: linear-gradient( 90deg, transparent, ${0}, transparent ); content: ''; position: absolute; transform: translateX(-100%); /* Avoid flash during server-side hydration */ bottom: 0; left: 0; right: 0; top: 0; } `),w,(t.vars||t).palette.action.hover))),S=i.forwardRef((function(e,t){const r=(0,f.b)({props:e,name:"MuiSkeleton"}),{animation:i="pulse",className:s,component:c="span",height:u,style:d,variant:g="text",width:y}=r,v=(0,n.A)(r,m),b=(0,o.A)({},r,{animation:i,component:c,variant:g,hasChildren:Boolean(v.children)}),_=(e=>{const{classes:t,variant:r,animation:n,hasChildren:o,width:i,height:a}=e,s={root:["root",r,n,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]};return(0,l.A)(s,p.E,t)})(b);return(0,h.jsx)(A,(0,o.A)({as:c,ref:t,className:(0,a.A)(_.root,s),ownerState:b},v,{style:(0,o.A)({width:y,height:u},d)}))}))},ioAD:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,E:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSkeleton",e)}const a=(0,n.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"])},ta8z:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("XOob"),s=r("7yHM"),l=r("ZfBw"),c=r("UnQg"),u=r("AiGX"),d=r("WFZb"),f=r("nKUr");const p=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function h(e,t,r){var n;const o=function(e,t,r){const n=t.getBoundingClientRect(),o=r&&r.getBoundingClientRect(),i=(0,d.A)(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const e=i.getComputedStyle(t);a=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"==typeof a){const e=a.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+s-n.left}px)`:`translateX(${i.innerWidth+s-n.left}px)`:"right"===e?o?`translateX(-${n.right-o.left-s}px)`:`translateX(-${n.left+n.width-s}px)`:"up"===e?o?`translateY(${o.bottom+l-n.top}px)`:`translateY(${i.innerHeight+l-n.top}px)`:o?`translateY(-${n.top-o.top+n.height-l}px)`:`translateY(-${n.top+n.height-l}px)`}(e,t,"function"==typeof(n=r)?n():n);o&&(t.style.webkitTransform=o,t.style.transform=o)}const m=i.forwardRef((function(e,t){const r=(0,c.A)(),m={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},g={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:y,appear:v=!0,children:b,container:_,direction:x="down",easing:w=m,in:A,onEnter:S,onEntered:C,onEntering:E,onExit:T,onExited:I,onExiting:k,style:M,timeout:R=g,TransitionComponent:P=a.Ay}=e,O=(0,o.A)(e,p),L=i.useRef(null),D=(0,l.A)(b.ref,L,t),N=e=>t=>{e&&(void 0===t?e(L.current):e(L.current,t))},F=N(((e,t)=>{h(x,e,_),(0,u.q)(e),S&&S(e,t)})),z=N(((e,t)=>{const o=(0,u.c)({timeout:R,style:M,easing:w},{mode:"enter"});e.style.webkitTransition=r.transitions.create("-webkit-transform",(0,n.A)({},o)),e.style.transition=r.transitions.create("transform",(0,n.A)({},o)),e.style.webkitTransform="none",e.style.transform="none",E&&E(e,t)})),B=N(C),j=N(k),U=N((e=>{const t=(0,u.c)({timeout:R,style:M,easing:w},{mode:"exit"});e.style.webkitTransition=r.transitions.create("-webkit-transform",t),e.style.transition=r.transitions.create("transform",t),h(x,e,_),T&&T(e)})),$=N((e=>{e.style.webkitTransition="",e.style.transition="",I&&I(e)})),V=i.useCallback((()=>{L.current&&h(x,L.current,_)}),[x,_]);return i.useEffect((()=>{if(A||"down"===x||"right"===x)return;const e=(0,s.A)((()=>{L.current&&h(x,L.current,_)})),t=(0,d.A)(L.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[x,A,_]),i.useEffect((()=>{A||V()}),[A,V]),(0,f.jsx)(P,(0,n.A)({nodeRef:L,onEnter:F,onEntered:B,onEntering:z,onExit:U,onExited:$,onExiting:j,addEndListener:e=>{y&&y(L.current,e)},appear:v,in:A,timeout:R},O,{children:(e,t)=>i.cloneElement(b,(0,n.A)({ref:D,style:(0,n.A)({visibility:"exited"!==e||A?void 0:"hidden"},M,b.props.style)},t))}))}))},"3YeO":(e,t,r)=>{"use strict";r.d(t,{d6:()=>W,xO:()=>q,Ww:()=>$,g1:()=>U,OQ:()=>G,hB:()=>V,nx:()=>H,Ay:()=>Y});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("St5x"),u=r("0Ydi"),d=r("gU+W"),f=r("p4lV"),p=r("leBO"),h=r("5cFC"),m=r("B5YM"),g=r("N0rN"),y=r("XgeM"),v=r("nXnS"),b=r("r/ya"),_=r("OrJ7");function x(e,t){return e-t}function w(e,t){var r;const{index:n}=null!=(r=e.reduce(((e,r,n)=>{const o=Math.abs(t-r);return null===e||oe===t){return e.length===t.length&&e.every(((e,n)=>r(e,t[n])))}(e,t)}const I={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},k=e=>e;let M;function R(){return void 0===M&&(M="undefined"==typeof CSS||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),M}function P(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:s=!1,marks:l=!1,max:c=100,min:u=0,name:d,onChange:M,onChangeCommitted:P,orientation:O="horizontal",rootRef:L,scale:D=k,step:N=1,shiftStep:F=10,tabIndex:z,value:B}=e,j=i.useRef(),[U,$]=i.useState(-1),[V,G]=i.useState(-1),[H,W]=i.useState(!1),q=i.useRef(0),[X,Z]=(0,p.A)({controlled:B,default:null!=r?r:u,name:"Slider"}),Y=M&&((e,t,r)=>{const n=e.nativeEvent||e,o=new n.constructor(n.type,n);Object.defineProperty(o,"target",{writable:!0,value:{value:t,name:d}}),M(o,t,r)}),K=Array.isArray(X);let J=K?X.slice().sort(x):[X];J=J.map((e=>null==e?u:(0,h.A)(e,u,c)));const Q=!0===l&&null!==N?[...Array(Math.floor((c-u)/N)+1)].map(((e,t)=>({value:u+N*t}))):l||[],ee=Q.map((e=>e.value)),{isFocusVisibleRef:te,onBlur:re,onFocus:ne,ref:oe}=(0,m.A)(),[ie,ae]=i.useState(-1),se=i.useRef(),le=(0,g.A)(oe,se),ce=(0,g.A)(L,le),ue=e=>t=>{var r;const n=Number(t.currentTarget.getAttribute("data-index"));ne(t),!0===te.current&&ae(n),G(n),null==e||null==(r=e.onFocus)||r.call(e,t)},de=e=>t=>{var r;re(t),!1===te.current&&ae(-1),G(-1),null==e||null==(r=e.onBlur)||r.call(e,t)},fe=(e,t)=>{const r=Number(e.currentTarget.getAttribute("data-index")),n=J[r],o=ee.indexOf(n);let i=t;if(Q&&null==N){const e=ee[ee.length-1];i=i>e?e:it=>{var r;if(null!==N){const e=Number(t.currentTarget.getAttribute("data-index")),r=J[e];let n=null;("ArrowLeft"===t.key||"ArrowDown"===t.key)&&t.shiftKey||"PageDown"===t.key?n=Math.max(r-F,u):(("ArrowRight"===t.key||"ArrowUp"===t.key)&&t.shiftKey||"PageUp"===t.key)&&(n=Math.min(r+F,c)),null!==n&&(fe(t,n),t.preventDefault())}null==e||null==(r=e.onKeyDown)||r.call(e,t)};(0,y.A)((()=>{var e;n&&se.current.contains(document.activeElement)&&(null==(e=document.activeElement)||e.blur())}),[n]),n&&-1!==U&&$(-1),n&&-1!==ie&&ae(-1);const he=i.useRef();let me=O;s&&"horizontal"===O&&(me+="-reverse");const ge=({finger:e,move:t=!1})=>{const{current:r}=se,{width:n,height:o,bottom:i,left:s}=r.getBoundingClientRect();let l,d;if(l=0===me.indexOf("vertical")?(i-e.y)/o:(e.x-s)/n,-1!==me.indexOf("-reverse")&&(l=1-l),d=function(e,t,r){return(r-t)*e+t}(l,u,c),N)d=function(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(function(e){if(Math.abs(e)<1){const t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}(t)))}(d,N,u);else{const e=w(ee,d);d=ee[e]}d=(0,h.A)(d,u,c);let f=0;if(K){f=t?he.current:w(J,d),a&&(d=(0,h.A)(d,J[f-1]||-1/0,J[f+1]||1/0));const e=d;d=C({values:J,newValue:d,index:f}),a&&t||(f=d.indexOf(e),he.current=f)}return{newValue:d,activeIndex:f}},ye=(0,v.A)((e=>{const t=A(e,j);if(!t)return;if(q.current+=1,"mousemove"===e.type&&0===e.buttons)return void ve(e);const{newValue:r,activeIndex:n}=ge({finger:t,move:!0});E({sliderRef:se,activeIndex:n,setActive:$}),Z(r),!H&&q.current>2&&W(!0),Y&&!T(r,X)&&Y(e,r,n)})),ve=(0,v.A)((e=>{const t=A(e,j);if(W(!1),!t)return;const{newValue:r}=ge({finger:t,move:!0});$(-1),"touchend"===e.type&&G(-1),P&&P(e,r),j.current=void 0,_e()})),be=(0,v.A)((e=>{if(n)return;R()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(j.current=t.identifier);const r=A(e,j);if(!1!==r){const{newValue:t,activeIndex:n}=ge({finger:r});E({sliderRef:se,activeIndex:n,setActive:$}),Z(t),Y&&!T(t,X)&&Y(e,t,n)}q.current=0;const o=(0,f.A)(se.current);o.addEventListener("touchmove",ye,{passive:!0}),o.addEventListener("touchend",ve,{passive:!0})})),_e=i.useCallback((()=>{const e=(0,f.A)(se.current);e.removeEventListener("mousemove",ye),e.removeEventListener("mouseup",ve),e.removeEventListener("touchmove",ye),e.removeEventListener("touchend",ve)}),[ve,ye]);i.useEffect((()=>{const{current:e}=se;return e.addEventListener("touchstart",be,{passive:R()}),()=>{e.removeEventListener("touchstart",be),_e()}}),[_e,be]),i.useEffect((()=>{n&&_e()}),[n,_e]);const xe=S(K?J[0]:u,u,c),we=S(J[J.length-1],u,c)-xe,Ae=e=>t=>{var r;null==(r=e.onMouseLeave)||r.call(e,t),G(-1)};return{active:U,axis:me,axisProps:I,dragging:H,focusedThumbIndex:ie,getHiddenInputProps:(r={})=>{var i;const a=(0,_.A)(r),l={onChange:(f=a||{},e=>{var t;null==(t=f.onChange)||t.call(f,e),fe(e,e.target.valueAsNumber)}),onFocus:ue(a||{}),onBlur:de(a||{}),onKeyDown:pe(a||{})};var f;const p=(0,o.A)({},a,l);return(0,o.A)({tabIndex:z,"aria-labelledby":t,"aria-orientation":O,"aria-valuemax":D(c),"aria-valuemin":D(u),name:d,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(i=e.step)?i:void 0,disabled:n},r,p,{style:(0,o.A)({},b.A,{direction:s?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:(e={})=>{const t=(0,_.A)(e),r={onMouseDown:(i=t||{},e=>{var t;if(null==(t=i.onMouseDown)||t.call(i,e),n)return;if(e.defaultPrevented)return;if(0!==e.button)return;e.preventDefault();const r=A(e,j);if(!1!==r){const{newValue:t,activeIndex:n}=ge({finger:r});E({sliderRef:se,activeIndex:n,setActive:$}),Z(t),Y&&!T(t,X)&&Y(e,t,n)}q.current=0;const o=(0,f.A)(se.current);o.addEventListener("mousemove",ye,{passive:!0}),o.addEventListener("mouseup",ve)})};var i;const a=(0,o.A)({},t,r);return(0,o.A)({},e,{ref:ce},a)},getThumbProps:(e={})=>{const t=(0,_.A)(e),r={onMouseOver:(n=t||{},e=>{var t;null==(t=n.onMouseOver)||t.call(n,e);const r=Number(e.currentTarget.getAttribute("data-index"));G(r)}),onMouseLeave:Ae(t||{})};var n;return(0,o.A)({},e,t,r)},marks:Q,open:V,range:K,rootRef:ce,trackLeap:we,trackOffset:xe,values:J,getThumbStyle:e=>({pointerEvents:-1!==U&&U!==e?"none":void 0})}}var O=r("Vn7y"),L=r("W9AN"),D=r("FO2v");var N=r("xeev"),F=r("ZROH"),z=r("nKUr");const B=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function j(e){return e}const U=(0,O.Ay)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${(0,N.A)(r.color)}`],"medium"!==r.size&&t[`size${(0,N.A)(r.size)}`],r.marked&&t.marked,"vertical"===r.orientation&&t.vertical,"inverted"===r.track&&t.trackInverted,!1===r.track&&t.trackFalse]}})((({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${F.A.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${F.A.dragging}`]:{[`& .${F.A.thumb}, & .${F.A.track}`]:{transition:"none"}},variants:[...Object.keys((null!=(t=e.vars)?t:e).palette).filter((t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main})).map((t=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}})),$=(0,O.Ay)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),V=(0,O.Ay)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>{var t;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys((null!=(t=e.vars)?t:e).palette).filter((t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main})).map((t=>({props:{color:t,track:"inverted"},style:(0,o.A)({},e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:(0,o.A)({backgroundColor:(0,l.a)(e.palette[t].main,.62),borderColor:(0,l.a)(e.palette[t].main,.62)},e.applyStyles("dark",{backgroundColor:(0,l.e$)(e.palette[t].main,.5)}),e.applyStyles("dark",{borderColor:(0,l.e$)(e.palette[t].main,.5)})))})))]}})),G=(0,O.Ay)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${(0,N.A)(r.color)}`],"medium"!==r.size&&t[`thumbSize${(0,N.A)(r.size)}`]]}})((({theme:e})=>{var t;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${F.A.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys((null!=(t=e.vars)?t:e).palette).filter((t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main})).map((t=>({props:{color:t},style:{[`&:hover, &.${F.A.focusVisible}`]:(0,o.A)({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${(0,l.X4)(e.palette[t].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${F.A.active}`]:(0,o.A)({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${(0,l.X4)(e.palette[t].main,.16)}`})}})))]}})),H=(0,O.Ay)((function(e){const{children:t,className:r,value:n}=e,o=(e=>{const{open:t}=e;return{offset:(0,a.A)(t&&F.A.valueLabelOpen),circle:F.A.valueLabelCircle,label:F.A.valueLabelLabel}})(e);return t?i.cloneElement(t,{className:(0,a.A)(t.props.className)},(0,z.jsxs)(i.Fragment,{children:[t.props.children,(0,z.jsx)("span",{className:(0,a.A)(o.offset,r),"aria-hidden":!0,children:(0,z.jsx)("span",{className:o.circle,children:(0,z.jsx)("span",{className:o.label,children:n})})})]})):null}),{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})((({theme:e})=>(0,o.A)({zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${F.A.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${F.A.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),W=(0,O.Ay)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,D.A)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})((({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),q=(0,O.Ay)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,D.A)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})((({theme:e})=>(0,o.A)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),X=({children:e})=>e,Z=i.forwardRef((function(e,t){var r,l,f,p,h,m,g,y,v,b,_,x,w,A,C,E,T,I,k,M,R,O,D,Z;const Y=(0,L.b)({props:e,name:"MuiSlider"}),K=(0,c.I)(),{"aria-label":J,"aria-valuetext":Q,"aria-labelledby":ee,component:te="span",components:re={},componentsProps:ne={},color:oe="primary",classes:ie,className:ae,disableSwap:se=!1,disabled:le=!1,getAriaLabel:ce,getAriaValueText:ue,marks:de=!1,max:fe=100,min:pe=0,orientation:he="horizontal",shiftStep:me=10,size:ge="medium",step:ye=1,scale:ve=j,slotProps:be,slots:_e,track:xe="normal",valueLabelDisplay:we="off",valueLabelFormat:Ae=j}=Y,Se=(0,n.A)(Y,B),Ce=(0,o.A)({},Y,{isRtl:K,max:fe,min:pe,classes:ie,disabled:le,disableSwap:se,orientation:he,marks:de,color:oe,size:ge,step:ye,shiftStep:me,scale:ve,track:xe,valueLabelDisplay:we,valueLabelFormat:Ae}),{axisProps:Ee,getRootProps:Te,getHiddenInputProps:Ie,getThumbProps:ke,open:Me,active:Re,axis:Pe,focusedThumbIndex:Oe,range:Le,dragging:De,marks:Ne,values:Fe,trackOffset:ze,trackLeap:Be,getThumbStyle:je}=P((0,o.A)({},Ce,{rootRef:t}));Ce.marked=Ne.length>0&&Ne.some((e=>e.label)),Ce.dragging=De,Ce.focusedThumbIndex=Oe;const Ue=(e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:i,classes:a,color:l,size:c}=e,u={root:["root",t&&"disabled",r&&"dragging",n&&"marked","vertical"===o&&"vertical","inverted"===i&&"trackInverted",!1===i&&"trackFalse",l&&`color${(0,N.A)(l)}`,c&&`size${(0,N.A)(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${(0,N.A)(c)}`,l&&`thumbColor${(0,N.A)(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,s.A)(u,F.W,a)})(Ce),$e=null!=(r=null!=(l=null==_e?void 0:_e.root)?l:re.Root)?r:U,Ve=null!=(f=null!=(p=null==_e?void 0:_e.rail)?p:re.Rail)?f:$,Ge=null!=(h=null!=(m=null==_e?void 0:_e.track)?m:re.Track)?h:V,He=null!=(g=null!=(y=null==_e?void 0:_e.thumb)?y:re.Thumb)?g:G,We=null!=(v=null!=(b=null==_e?void 0:_e.valueLabel)?b:re.ValueLabel)?v:H,qe=null!=(_=null!=(x=null==_e?void 0:_e.mark)?x:re.Mark)?_:W,Xe=null!=(w=null!=(A=null==_e?void 0:_e.markLabel)?A:re.MarkLabel)?w:q,Ze=null!=(C=null!=(E=null==_e?void 0:_e.input)?E:re.Input)?C:"input",Ye=null!=(T=null==be?void 0:be.root)?T:ne.root,Ke=null!=(I=null==be?void 0:be.rail)?I:ne.rail,Je=null!=(k=null==be?void 0:be.track)?k:ne.track,Qe=null!=(M=null==be?void 0:be.thumb)?M:ne.thumb,et=null!=(R=null==be?void 0:be.valueLabel)?R:ne.valueLabel,tt=null!=(O=null==be?void 0:be.mark)?O:ne.mark,rt=null!=(D=null==be?void 0:be.markLabel)?D:ne.markLabel,nt=null!=(Z=null==be?void 0:be.input)?Z:ne.input,ot=(0,u.A)({elementType:$e,getSlotProps:Te,externalSlotProps:Ye,externalForwardedProps:Se,additionalProps:(0,o.A)({},(ft=$e,(!ft||!(0,d.A)(ft))&&{as:te})),ownerState:(0,o.A)({},Ce,null==Ye?void 0:Ye.ownerState),className:[Ue.root,ae]}),it=(0,u.A)({elementType:Ve,externalSlotProps:Ke,ownerState:Ce,className:Ue.rail}),at=(0,u.A)({elementType:Ge,externalSlotProps:Je,additionalProps:{style:(0,o.A)({},Ee[Pe].offset(ze),Ee[Pe].leap(Be))},ownerState:(0,o.A)({},Ce,null==Je?void 0:Je.ownerState),className:Ue.track}),st=(0,u.A)({elementType:He,getSlotProps:ke,externalSlotProps:Qe,ownerState:(0,o.A)({},Ce,null==Qe?void 0:Qe.ownerState),className:Ue.thumb}),lt=(0,u.A)({elementType:We,externalSlotProps:et,ownerState:(0,o.A)({},Ce,null==et?void 0:et.ownerState),className:Ue.valueLabel}),ct=(0,u.A)({elementType:qe,externalSlotProps:tt,ownerState:Ce,className:Ue.mark}),ut=(0,u.A)({elementType:Xe,externalSlotProps:rt,ownerState:Ce,className:Ue.markLabel}),dt=(0,u.A)({elementType:Ze,getSlotProps:Ie,externalSlotProps:nt,ownerState:Ce});var ft;return(0,z.jsxs)($e,(0,o.A)({},ot,{children:[(0,z.jsx)(Ve,(0,o.A)({},it)),(0,z.jsx)(Ge,(0,o.A)({},at)),Ne.filter((e=>e.value>=pe&&e.value<=fe)).map(((e,t)=>{const r=S(e.value,pe,fe),n=Ee[Pe].offset(r);let s;return s=!1===xe?-1!==Fe.indexOf(e.value):"normal"===xe&&(Le?e.value>=Fe[0]&&e.value<=Fe[Fe.length-1]:e.value<=Fe[0])||"inverted"===xe&&(Le?e.value<=Fe[0]||e.value>=Fe[Fe.length-1]:e.value>=Fe[0]),(0,z.jsxs)(i.Fragment,{children:[(0,z.jsx)(qe,(0,o.A)({"data-index":t},ct,!(0,d.A)(qe)&&{markActive:s},{style:(0,o.A)({},n,ct.style),className:(0,a.A)(ct.className,s&&Ue.markActive)})),null!=e.label?(0,z.jsx)(Xe,(0,o.A)({"aria-hidden":!0,"data-index":t},ut,!(0,d.A)(Xe)&&{markLabelActive:s},{style:(0,o.A)({},n,ut.style),className:(0,a.A)(Ue.markLabel,ut.className,s&&Ue.markLabelActive),children:e.label})):null]},t)})),Fe.map(((e,t)=>{const r=S(e,pe,fe),n=Ee[Pe].offset(r),i="off"===we?X:We;return(0,z.jsx)(i,(0,o.A)({},!(0,d.A)(i)&&{valueLabelFormat:Ae,valueLabelDisplay:we,value:"function"==typeof Ae?Ae(ve(e),t):Ae,index:t,open:Me===t||Re===t||"on"===we,disabled:le},lt,{children:(0,z.jsx)(He,(0,o.A)({"data-index":t},st,{className:(0,a.A)(Ue.thumb,st.className,Re===t&&Ue.active,Oe===t&&Ue.focusVisible),style:(0,o.A)({},n,je(t),st.style),children:(0,z.jsx)(Ze,(0,o.A)({"data-index":t,"aria-label":ce?ce(t):J,"aria-valuenow":ve(e),"aria-labelledby":ee,"aria-valuetext":ue?ue(ve(e),t):Q,value:Fe[t]},dt))}))}),t)}))]}))})),Y=Z},ZROH:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,W:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSlider",e)}const a=(0,n.A)("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"])},"6dIc":(e,t,r)=>{"use strict";r.d(t,{A:()=>A});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("aGM9"),s=r("0Ydi"),l=r("J13E"),c=r("nXnS"),u=r("OrJ7");var d=r("zX2i"),f=r("Vn7y"),p=r("UnQg"),h=r("W9AN"),m=r("xeev"),g=r("UVCh"),y=r("ESRK"),v=r("YoCR"),b=r("nKUr");const _=["onEnter","onExited"],x=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],w=(0,f.Ay)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`anchorOrigin${(0,m.A)(r.anchorOrigin.vertical)}${(0,m.A)(r.anchorOrigin.horizontal)}`]]}})((({theme:e,ownerState:t})=>(0,o.A)({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===t.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===t.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===t.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:(0,o.A)({},"top"===t.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===t.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===t.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===t.anchorOrigin.horizontal&&{right:24,left:"auto"})}))),A=i.forwardRef((function(e,t){const r=(0,h.b)({props:e,name:"MuiSnackbar"}),f=(0,p.A)(),A={enter:f.transitions.duration.enteringScreen,exit:f.transitions.duration.leavingScreen},{action:S,anchorOrigin:{vertical:C,horizontal:E}={vertical:"bottom",horizontal:"left"},autoHideDuration:T=null,children:I,className:k,ClickAwayListenerProps:M,ContentProps:R,disableWindowBlurListener:P=!1,message:O,open:L,TransitionComponent:D=g.A,transitionDuration:N=A,TransitionProps:{onEnter:F,onExited:z}={}}=r,B=(0,n.A)(r.TransitionProps,_),j=(0,n.A)(r,x),U=(0,o.A)({},r,{anchorOrigin:{vertical:C,horizontal:E},autoHideDuration:T,disableWindowBlurListener:P,TransitionComponent:D,transitionDuration:N}),$=(e=>{const{classes:t,anchorOrigin:r}=e,n={root:["root",`anchorOrigin${(0,m.A)(r.vertical)}${(0,m.A)(r.horizontal)}`]};return(0,a.A)(n,v.W,t)})(U),{getRootProps:V,onClickAway:G}=function(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:r=!1,onClose:n,open:a,resumeHideDuration:s}=e,d=(0,l.A)();i.useEffect((()=>{if(a)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==n||n(e,"escapeKeyDown")}}),[a,n]);const f=(0,c.A)(((e,t)=>{null==n||n(e,t)})),p=(0,c.A)((e=>{n&&null!=e&&d.start(e,(()=>{f(null,"timeout")}))}));i.useEffect((()=>(a&&p(t),d.clear)),[a,t,p,d]);const h=d.clear,m=i.useCallback((()=>{null!=t&&p(null!=s?s:.5*t)}),[t,s,p]),g=e=>t=>{const r=e.onFocus;null==r||r(t),h()},y=e=>t=>{const r=e.onMouseEnter;null==r||r(t),h()},v=e=>t=>{const r=e.onMouseLeave;null==r||r(t),m()};return i.useEffect((()=>{if(!r&&a)return window.addEventListener("focus",m),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",h)}}),[r,a,m,h]),{getRootProps:(t={})=>{const r=(0,o.A)({},(0,u.A)(e),(0,u.A)(t));return(0,o.A)({role:"presentation"},t,r,{onBlur:(n=r,e=>{const t=n.onBlur;null==t||t(e),m()}),onFocus:g(r),onMouseEnter:y(r),onMouseLeave:v(r)});var n},onClickAway:e=>{null==n||n(e,"clickaway")}}}((0,o.A)({},U)),[H,W]=i.useState(!0),q=(0,s.A)({elementType:w,getSlotProps:V,externalForwardedProps:j,ownerState:U,additionalProps:{ref:t},className:[$.root,k]});return!L&&H?null:(0,b.jsx)(d.x,(0,o.A)({onClickAway:G},M,{children:(0,b.jsx)(w,(0,o.A)({},q,{children:(0,b.jsx)(D,(0,o.A)({appear:!0,in:L,timeout:N,direction:"top"===C?"down":"up",onEnter:(e,t)=>{W(!1),F&&F(e,t)},onExited:e=>{W(!0),z&&z(e)}},B,{children:I||(0,b.jsx)(y.A,(0,o.A)({message:O,action:S},R))}))}))}))}))},YoCR:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,W:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSnackbar",e)}const a=(0,n.A)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"])},ESRK:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("Vn7y"),u=r("W9AN"),d=r("G43+"),f=r("YE/p"),p=r("nKUr");const h=["action","className","message","role"],m=(0,c.Ay)(d.A,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>{const t="light"===e.palette.mode?.8:.98,r=(0,l.tL)(e.palette.background.default,t);return(0,o.A)({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(r),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})})),g=(0,c.Ay)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),y=(0,c.Ay)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),v=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiSnackbarContent"}),{action:i,className:l,message:c,role:d="alert"}=r,v=(0,n.A)(r,h),b=r,_=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],action:["action"],message:["message"]},f.d,t)})(b);return(0,p.jsxs)(m,(0,o.A)({role:d,square:!0,elevation:6,className:(0,a.A)(_.root,l),ownerState:b,ref:t},v,{children:[(0,p.jsx)(g,{className:_.message,ownerState:b,children:c}),i?(0,p.jsx)(y,{className:_.action,ownerState:b,children:i}):null]}))}))},"YE/p":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,d:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSnackbarContent",e)}const a=(0,n.A)("MuiSnackbarContent",["root","message","action"])},"1eI8":(e,t,r)=>{"use strict";r.d(t,{A:()=>E});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("w9Qe"),l=r("TkYO"),c=r("aGM9"),u=r("M82X"),d=r("sdrl"),f=r("0kTp"),p=r("Tazo"),h=r("fGgT"),m=r("rZTa"),g=r("nKUr");const y=["component","direction","spacing","divider","children","className","useFlexGap"],v=(0,p.A)(),b=(0,u.A)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function _(e){return(0,d.A)({props:e,name:"MuiStack",defaultTheme:v})}function x(e,t){const r=i.Children.toArray(e).filter(Boolean);return r.reduce(((e,n,o)=>(e.push(n),o{let r=(0,o.A)({display:"flex",flexDirection:"column"},(0,h.NI)({theme:t},(0,h.kW)({values:e.direction,breakpoints:t.breakpoints.values}),(e=>({flexDirection:e}))));if(e.spacing){const n=(0,m.LX)(t),o=Object.keys(t.breakpoints.values).reduce(((t,r)=>(("object"==typeof e.spacing&&null!=e.spacing[r]||"object"==typeof e.direction&&null!=e.direction[r])&&(t[r]=!0),t)),{}),i=(0,h.kW)({values:e.direction,base:o}),a=(0,h.kW)({values:e.spacing,base:o});"object"==typeof i&&Object.keys(i).forEach(((e,t,r)=>{if(!i[e]){const n=t>0?i[r[t-1]]:"column";i[e]=n}}));const l=(t,r)=>{return e.useFlexGap?{gap:(0,m._W)(n,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o=r?i[r]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:(0,m._W)(n,t)}};var o};r=(0,s.A)(r,(0,h.NI)({theme:t},a,l))}return r=(0,h.iZ)(t.breakpoints,r),r};var A=r("Vn7y"),S=r("W9AN");const C=function(e={}){const{createStyledComponent:t=b,useThemeProps:r=_,componentName:s="MuiStack"}=e,u=t(w),d=i.forwardRef((function(e,t){const i=r(e),d=(0,f.A)(i),{component:p="div",direction:h="column",spacing:m=0,divider:v,children:b,className:_,useFlexGap:w=!1}=d,A=(0,n.A)(d,y),S={direction:h,spacing:m,useFlexGap:w},C=(0,c.A)({root:["root"]},(e=>(0,l.Ay)(s,e)),{});return(0,g.jsx)(u,(0,o.A)({as:p,ownerState:S,ref:t,className:(0,a.A)(C.root,_)},A,{children:v?x(b,v):b}))}));return d}({createStyledComponent:(0,A.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,S.b)({props:e,name:"MuiStack"})}),E=C},ovqk:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("pnHt"),c=r("2qWJ"),u=r("W9AN"),d=r("Vn7y"),f=r("LRQm"),p=r("nKUr");const h=["active","children","className","component","completed","disabled","expanded","index","last"],m=(0,d.Ay)("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel,r.completed&&t.completed]}})((({ownerState:e})=>(0,o.A)({},"horizontal"===e.orientation&&{paddingLeft:8,paddingRight:8},e.alternativeLabel&&{flex:1,position:"relative"}))),g=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiStep"}),{active:d,children:g,className:y,component:v="div",completed:b,disabled:_,expanded:x=!1,index:w,last:A}=r,S=(0,n.A)(r,h),{activeStep:C,connector:E,alternativeLabel:T,orientation:I,nonLinear:k}=i.useContext(l.A);let[M=!1,R=!1,P=!1]=[d,b,_];C===w?M=void 0===d||d:!k&&C>w?R=void 0===b||b:!k&&C({index:w,last:A,expanded:x,icon:w+1,active:M,completed:R,disabled:P})),[w,A,x,M,R,P]),L=(0,o.A)({},r,{active:M,orientation:I,alternativeLabel:T,completed:R,disabled:P,expanded:x,component:v}),D=(e=>{const{classes:t,orientation:r,alternativeLabel:n,completed:o}=e,i={root:["root",r,n&&"alternativeLabel",o&&"completed"]};return(0,s.A)(i,f.L,t)})(L),N=(0,p.jsxs)(m,(0,o.A)({as:v,className:(0,a.A)(D.root,y),ref:t,ownerState:L},S,{children:[E&&T&&0!==w?E:null,g]}));return(0,p.jsx)(c.A.Provider,{value:O,children:E&&!T&&0!==w?(0,p.jsxs)(i.Fragment,{children:[E,N]}):N})}))},"2qWJ":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,P:()=>i});var n=r("q1tI");const o=n.createContext({});function i(){return n.useContext(o)}const a=o},LRQm:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,L:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiStep",e)}const a=(0,n.A)("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"])},"5lP7":(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("xeev"),c=r("Vn7y"),u=r("W9AN"),d=r("pnHt"),f=r("2qWJ"),p=r("LiX5"),h=r("nKUr");const m=["className"],g=(0,c.Ay)("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel,r.completed&&t.completed]}})((({ownerState:e})=>(0,o.A)({flex:"1 1 auto"},"vertical"===e.orientation&&{marginLeft:12},e.alternativeLabel&&{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}))),y=(0,c.Ay)("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.line,t[`line${(0,l.A)(r.orientation)}`]]}})((({ownerState:e,theme:t})=>{const r="light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[600];return(0,o.A)({display:"block",borderColor:t.vars?t.vars.palette.StepConnector.border:r},"horizontal"===e.orientation&&{borderTopStyle:"solid",borderTopWidth:1},"vertical"===e.orientation&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})})),v=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiStepConnector"}),{className:c}=r,v=(0,n.A)(r,m),{alternativeLabel:b,orientation:_="horizontal"}=i.useContext(d.A),{active:x,disabled:w,completed:A}=i.useContext(f.A),S=(0,o.A)({},r,{alternativeLabel:b,orientation:_,active:x,completed:A,disabled:w}),C=(e=>{const{classes:t,orientation:r,alternativeLabel:n,active:o,completed:i,disabled:a}=e,c={root:["root",r,n&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${(0,l.A)(r)}`]};return(0,s.A)(c,p.G,t)})(S);return(0,h.jsx)(g,(0,o.A)({className:(0,a.A)(C.root,c),ref:t,ownerState:S},v,{children:(0,h.jsx)(y,{className:C.line,ownerState:S})}))}))},LiX5:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,G:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiStepConnector",e)}const a=(0,n.A)("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"])},"ZI/q":(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("M7pN"),d=r("nKUr");const f=(0,u.A)((0,d.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),p=(0,u.A)((0,d.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");var h,m=r("Z6qJ"),g=r("vu6X");const y=["active","className","completed","error","icon"],v=(0,l.Ay)(m.A,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${g.A.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${g.A.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${g.A.error}`]:{color:(e.vars||e).palette.error.main}}))),b=(0,l.Ay)("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})((({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),_=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiStepIcon"}),{active:i=!1,className:l,completed:u=!1,error:m=!1,icon:_}=r,x=(0,o.A)(r,y),w=(0,n.A)({},r,{active:i,completed:u,error:m}),A=(e=>{const{classes:t,active:r,completed:n,error:o}=e,i={root:["root",r&&"active",n&&"completed",o&&"error"],text:["text"]};return(0,s.A)(i,g.K,t)})(w);if("number"==typeof _||"string"==typeof _){const e=(0,a.A)(l,A.root);return m?(0,d.jsx)(v,(0,n.A)({as:p,className:e,ref:t,ownerState:w},x)):u?(0,d.jsx)(v,(0,n.A)({as:f,className:e,ref:t,ownerState:w},x)):(0,d.jsxs)(v,(0,n.A)({className:e,ref:t,ownerState:w},x,{children:[h||(h=(0,d.jsx)("circle",{cx:"12",cy:"12",r:"12"})),(0,d.jsx)(b,{className:A.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:w,children:_})]}))}return _}))},vu6X:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,K:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiStepIcon",e)}const a=(0,n.A)("MuiStepIcon",["root","active","completed","error","text"])},gk3T:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("Vn7y"),c=r("W9AN"),u=r("ZI/q"),d=r("pnHt"),f=r("2qWJ"),p=r("09Yx"),h=r("nKUr");const m=["children","className","componentsProps","error","icon","optional","slotProps","StepIconComponent","StepIconProps"],g=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation]]}})((({ownerState:e})=>(0,o.A)({display:"flex",alignItems:"center",[`&.${p.A.alternativeLabel}`]:{flexDirection:"column"},[`&.${p.A.disabled}`]:{cursor:"default"}},"vertical"===e.orientation&&{textAlign:"left",padding:"8px 0"}))),y=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})((({theme:e})=>(0,o.A)({},e.typography.body2,{display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${p.A.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${p.A.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${p.A.alternativeLabel}`]:{marginTop:16},[`&.${p.A.error}`]:{color:(e.vars||e).palette.error.main}}))),v=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})((()=>({flexShrink:0,display:"flex",paddingRight:8,[`&.${p.A.alternativeLabel}`]:{paddingRight:0}}))),b=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${p.A.alternativeLabel}`]:{textAlign:"center"}}))),_=i.forwardRef((function(e,t){var r;const l=(0,c.b)({props:e,name:"MuiStepLabel"}),{children:_,className:x,componentsProps:w={},error:A=!1,icon:S,optional:C,slotProps:E={},StepIconComponent:T,StepIconProps:I}=l,k=(0,n.A)(l,m),{alternativeLabel:M,orientation:R}=i.useContext(d.A),{active:P,disabled:O,completed:L,icon:D}=i.useContext(f.A),N=S||D;let F=T;N&&!F&&(F=u.A);const z=(0,o.A)({},l,{active:P,alternativeLabel:M,completed:L,disabled:O,error:A,orientation:R}),B=(e=>{const{classes:t,orientation:r,active:n,completed:o,error:i,disabled:a,alternativeLabel:l}=e,c={root:["root",r,i&&"error",a&&"disabled",l&&"alternativeLabel"],label:["label",n&&"active",o&&"completed",i&&"error",a&&"disabled",l&&"alternativeLabel"],iconContainer:["iconContainer",n&&"active",o&&"completed",i&&"error",a&&"disabled",l&&"alternativeLabel"],labelContainer:["labelContainer",l&&"alternativeLabel"]};return(0,s.A)(c,p.p,t)})(z),j=null!=(r=E.label)?r:w.label;return(0,h.jsxs)(g,(0,o.A)({className:(0,a.A)(B.root,x),ref:t,ownerState:z},k,{children:[N||F?(0,h.jsx)(v,{className:B.iconContainer,ownerState:z,children:(0,h.jsx)(F,(0,o.A)({completed:L,active:P,error:A,icon:N},I))}):null,(0,h.jsxs)(b,{className:B.labelContainer,ownerState:z,children:[_?(0,h.jsx)(y,(0,o.A)({ownerState:z},j,{className:(0,a.A)(B.label,null==j?void 0:j.className),children:_})):null,C]})]}))}));_.muiName="StepLabel";const x=_},"09Yx":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,p:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiStepLabel",e)}const a=(0,n.A)("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"])},Y6tj:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("Vn7y"),u=r("4UXW"),d=r("5lP7"),f=r("pnHt"),p=r("nKUr");const h=["activeStep","alternativeLabel","children","className","component","connector","nonLinear","orientation"],m=(0,c.Ay)("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel,r.nonLinear&&t.nonLinear]}})((({ownerState:e})=>(0,o.A)({display:"flex"},"horizontal"===e.orientation&&{flexDirection:"row",alignItems:"center"},"vertical"===e.orientation&&{flexDirection:"column"},e.alternativeLabel&&{alignItems:"flex-start"}))),g=(0,p.jsx)(d.A,{}),y=i.forwardRef((function(e,t){const r=(0,l.b)({props:e,name:"MuiStepper"}),{activeStep:c=0,alternativeLabel:d=!1,children:y,className:v,component:b="div",connector:_=g,nonLinear:x=!1,orientation:w="horizontal"}=r,A=(0,n.A)(r,h),S=(0,o.A)({},r,{nonLinear:x,alternativeLabel:d,orientation:w,component:b}),C=(e=>{const{orientation:t,nonLinear:r,alternativeLabel:n,classes:o}=e,i={root:["root",t,r&&"nonLinear",n&&"alternativeLabel"]};return(0,s.A)(i,u.g,o)})(S),E=i.Children.toArray(y).filter(Boolean),T=E.map(((e,t)=>i.cloneElement(e,(0,o.A)({index:t,last:t+1===E.length},e.props)))),I=i.useMemo((()=>({activeStep:c,alternativeLabel:d,connector:_,nonLinear:x,orientation:w})),[c,d,_,x,w]);return(0,p.jsx)(f.A.Provider,{value:I,children:(0,p.jsx)(m,(0,o.A)({as:b,ownerState:S,className:(0,a.A)(C.root,v),ref:t},A,{children:T}))})}))},pnHt:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,s:()=>i});var n=r("q1tI");const o=n.createContext({});function i(){return n.useContext(o)}const a=o},"4UXW":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,g:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiStepper",e)}const a=(0,n.A)("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"])},Z6qJ:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("xeev"),c=r("W9AN"),u=r("Vn7y"),d=r("t32p"),f=r("nKUr");const p=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],h=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"inherit"!==r.color&&t[`color${(0,l.A)(r.color)}`],t[`fontSize${(0,l.A)(r.fontSize)}`]]}})((({theme:e,ownerState:t})=>{var r,n,o,i,a,s,l,c,u,d,f,p,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=e.transitions)||null==(n=r.create)?void 0:n.call(r,"fill",{duration:null==(o=e.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(i=e.typography)||null==(a=i.pxToRem)?void 0:a.call(i,20))||"1.25rem",medium:(null==(s=e.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(c=e.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:null!=(d=null==(f=(e.vars||e).palette)||null==(f=f[t.color])?void 0:f.main)?d:{action:null==(p=(e.vars||e).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(h=(e.vars||e).palette)||null==(h=h.action)?void 0:h.disabled,inherit:void 0}[t.color]}})),m=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiSvgIcon"}),{children:u,className:m,color:g="inherit",component:y="svg",fontSize:v="medium",htmlColor:b,inheritViewBox:_=!1,titleAccess:x,viewBox:w="0 0 24 24"}=r,A=(0,o.A)(r,p),S=i.isValidElement(u)&&"svg"===u.type,C=(0,n.A)({},r,{color:g,component:y,fontSize:v,instanceFontSize:e.fontSize,inheritViewBox:_,viewBox:w,hasSvgAsChild:S}),E={};_||(E.viewBox=w);const T=(e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root","inherit"!==t&&`color${(0,l.A)(t)}`,`fontSize${(0,l.A)(r)}`]};return(0,s.A)(o,d.E,n)})(C);return(0,f.jsxs)(h,(0,n.A)({as:y,className:(0,a.A)(T.root,m),focusable:"false",color:b,"aria-hidden":!x||void 0,role:x?"img":void 0,ref:t},E,A,S&&u.props,{ownerState:C,children:[S?u.props.children:u,x?(0,f.jsx)("title",{children:x}):null]}))}));m.muiName="SvgIcon";const g=m},t32p:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,E:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSvgIcon",e)}const a=(0,n.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"])},"YM+J":(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("xeev"),u=r("J1Ai"),d=r("Vn7y"),f=r("W9AN"),p=r("CIcg"),h=r("nKUr");const m=["className","color","edge","size","sx"],g=(0,d.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${(0,c.A)(r.edge)}`],t[`size${(0,c.A)(r.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${p.A.thumb}`]:{width:16,height:16},[`& .${p.A.switchBase}`]:{padding:4,[`&.${p.A.checked}`]:{transform:"translateX(16px)"}}}}]}),y=(0,d.Ay)(u.A,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${p.A.input}`]:t.input},"default"!==r.color&&t[`color${(0,c.A)(r.color)}`]]}})((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${p.A.checked}`]:{transform:"translateX(20px)"},[`&.${p.A.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${p.A.checked} + .${p.A.track}`]:{opacity:.5},[`&.${p.A.disabled} + .${p.A.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${p.A.input}`]:{left:"-100%",width:"300%"}})),(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter((([,e])=>e.main&&e.light)).map((([t])=>({props:{color:t},style:{[`&.${p.A.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${p.A.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,l.a)(e.palette[t].main,.62):(0,l.e$)(e.palette[t].main,.55)}`}},[`&.${p.A.checked} + .${p.A.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}})))]}))),v=(0,d.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)}))),b=(0,d.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),_=i.forwardRef((function(e,t){const r=(0,f.b)({props:e,name:"MuiSwitch"}),{className:i,color:l="primary",edge:u=!1,size:d="medium",sx:_}=r,x=(0,n.A)(r,m),w=(0,o.A)({},r,{color:l,edge:u,size:d}),A=(e=>{const{classes:t,edge:r,size:n,color:i,checked:a,disabled:l}=e,u={root:["root",r&&`edge${(0,c.A)(r)}`,`size${(0,c.A)(n)}`],switchBase:["switchBase",`color${(0,c.A)(i)}`,a&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},d=(0,s.A)(u,p.n,t);return(0,o.A)({},t,d)})(w),S=(0,h.jsx)(b,{className:A.thumb,ownerState:w});return(0,h.jsxs)(g,{className:(0,a.A)(A.root,i),sx:_,ownerState:w,children:[(0,h.jsx)(y,(0,o.A)({type:"checkbox",icon:S,checkedIcon:S,ref:t,ownerState:w},x,{classes:(0,o.A)({},A,{root:A.switchBase})})),(0,h.jsx)(v,{className:A.track,ownerState:w})]})}))},CIcg:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,n:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiSwitch",e)}const a=(0,n.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"])},lZ7h:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("+8pU"),c=r("xeev"),u=r("W9AN"),d=r("Vn7y"),f=r("/eUX"),p=r("nKUr");const h=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],m=(0,d.Ay)(l.A,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${(0,c.A)(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped,{[`& .${f.A.iconWrapper}`]:t.iconWrapper}]}})((({theme:e,ownerState:t})=>(0,o.A)({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${f.A.iconWrapper}`]:(0,o.A)({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${f.A.selected}`]:{opacity:1},[`&.${f.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${f.A.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${f.A.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${f.A.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${f.A.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}))),g=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiTab"}),{className:l,disabled:d=!1,disableFocusRipple:g=!1,fullWidth:y,icon:v,iconPosition:b="top",indicator:_,label:x,onChange:w,onClick:A,onFocus:S,selected:C,selectionFollowsFocus:E,textColor:T="inherit",value:I,wrapped:k=!1}=r,M=(0,n.A)(r,h),R=(0,o.A)({},r,{disabled:d,disableFocusRipple:g,selected:C,icon:!!v,iconPosition:b,label:!!x,fullWidth:y,textColor:T,wrapped:k}),P=(e=>{const{classes:t,textColor:r,fullWidth:n,wrapped:o,icon:i,label:a,selected:l,disabled:u}=e,d={root:["root",i&&a&&"labelIcon",`textColor${(0,c.A)(r)}`,n&&"fullWidth",o&&"wrapped",l&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return(0,s.A)(d,f.s,t)})(R),O=v&&x&&i.isValidElement(v)?i.cloneElement(v,{className:(0,a.A)(P.iconWrapper,v.props.className)}):v;return(0,p.jsxs)(m,(0,o.A)({focusRipple:!g,className:(0,a.A)(P.root,l),ref:t,role:"tab","aria-selected":C,disabled:d,onClick:e=>{!C&&w&&w(e,I),A&&A(e)},onFocus:e=>{E&&!C&&w&&w(e,I),S&&S(e)},ownerState:R,tabIndex:C?0:-1},M,{children:["top"===b||"start"===b?(0,p.jsxs)(i.Fragment,{children:[O,x]}):(0,p.jsxs)(i.Fragment,{children:[x,O]}),_]}))}))},"/eUX":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,s:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTab",e)}const a=(0,n.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"])},"+asq":(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("St5x"),c=r("0Ydi"),u=r("Z21g"),d=r("5+C/"),f=r("+8pU"),p=r("W9AN"),h=r("Vn7y"),m=r("EMKz"),g=r("nKUr");const y=["className","slots","slotProps","direction","orientation","disabled"],v=(0,h.Ay)(f.A,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})((({ownerState:e})=>(0,o.A)({width:40,flexShrink:0,opacity:.8,[`&.${m.A.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}))),b=i.forwardRef((function(e,t){var r,i;const f=(0,p.b)({props:e,name:"MuiTabScrollButton"}),{className:h,slots:b={},slotProps:_={},direction:x}=f,w=(0,n.A)(f,y),A=(0,l.I)(),S=(0,o.A)({isRtl:A},f),C=(e=>{const{classes:t,orientation:r,disabled:n}=e,o={root:["root",r,n&&"disabled"]};return(0,s.A)(o,m.T,t)})(S),E=null!=(r=b.StartScrollButtonIcon)?r:u.A,T=null!=(i=b.EndScrollButtonIcon)?i:d.A,I=(0,c.A)({elementType:E,externalSlotProps:_.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S}),k=(0,c.A)({elementType:T,externalSlotProps:_.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S});return(0,g.jsx)(v,(0,o.A)({component:"div",className:(0,a.A)(C.root,h),ref:t,role:null,ownerState:S,tabIndex:null},w,{children:"left"===x?(0,g.jsx)(E,(0,o.A)({},I)):(0,g.jsx)(T,(0,o.A)({},k))}))}))},EMKz:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,T:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTabScrollButton",e)}const a=(0,n.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"])},GOrD:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("amon"),c=r("W9AN"),u=r("Vn7y"),d=r("qy7K"),f=r("nKUr");const p=["className","component","padding","size","stickyHeader"],h=(0,u.Ay)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.stickyHeader&&t.stickyHeader]}})((({theme:e,ownerState:t})=>(0,o.A)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,o.A)({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},t.stickyHeader&&{borderCollapse:"separate"}))),m="table",g=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiTable"}),{className:u,component:g=m,padding:y="normal",size:v="medium",stickyHeader:b=!1}=r,_=(0,n.A)(r,p),x=(0,o.A)({},r,{component:g,padding:y,size:v,stickyHeader:b}),w=(e=>{const{classes:t,stickyHeader:r}=e,n={root:["root",r&&"stickyHeader"]};return(0,s.A)(n,d.l,t)})(x),A=i.useMemo((()=>({padding:y,size:v,stickyHeader:b})),[y,v,b]);return(0,f.jsx)(l.A.Provider,{value:A,children:(0,f.jsx)(h,(0,o.A)({as:g,role:g===m?null:"table",ref:t,className:(0,a.A)(w.root,u),ownerState:x},_))})}))},amon:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext()},bpaH:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext()},qy7K:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,l:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTable",e)}const a=(0,n.A)("MuiTable",["root","stickyHeader"])},J1WE:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("bpaH"),c=r("W9AN"),u=r("Vn7y"),d=r("bXaB"),f=r("nKUr");const p=["className","component"],h=(0,u.Ay)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),m={variant:"body"},g="tbody",y=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiTableBody"}),{className:i,component:u=g}=r,y=(0,o.A)(r,p),v=(0,n.A)({},r,{component:u}),b=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.b,t)})(v);return(0,f.jsx)(l.A.Provider,{value:m,children:(0,f.jsx)(h,(0,n.A)({className:(0,a.A)(b.root,i),as:u,ref:t,role:u===g?null:"rowgroup",ownerState:v},y))})}))},bXaB:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,b:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTableBody",e)}const a=(0,n.A)("MuiTableBody",["root"])},xqzF:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("xeev"),u=r("amon"),d=r("bpaH"),f=r("W9AN"),p=r("Vn7y"),h=r("WeeH"),m=r("nKUr");const g=["align","className","component","padding","scope","size","sortDirection","variant"],y=(0,p.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,c.A)(r.size)}`],"normal"!==r.padding&&t[`padding${(0,c.A)(r.padding)}`],"inherit"!==r.align&&t[`align${(0,c.A)(r.align)}`],r.stickyHeader&&t.stickyHeader]}})((({theme:e,ownerState:t})=>(0,o.A)({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?(0,l.a)((0,l.X4)(e.palette.divider,1),.88):(0,l.e$)((0,l.X4)(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===t.variant&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},"body"===t.variant&&{color:(e.vars||e).palette.text.primary},"footer"===t.variant&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},"small"===t.size&&{padding:"6px 16px",[`&.${h.A.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===t.padding&&{width:48,padding:"0 0 0 4px"},"none"===t.padding&&{padding:0},"left"===t.align&&{textAlign:"left"},"center"===t.align&&{textAlign:"center"},"right"===t.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===t.align&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}))),v=i.forwardRef((function(e,t){const r=(0,f.b)({props:e,name:"MuiTableCell"}),{align:l="inherit",className:p,component:v,padding:b,scope:_,size:x,sortDirection:w,variant:A}=r,S=(0,n.A)(r,g),C=i.useContext(u.A),E=i.useContext(d.A),T=E&&"head"===E.variant;let I;I=v||(T?"th":"td");let k=_;"td"===I?k=void 0:!k&&T&&(k="col");const M=A||E&&E.variant,R=(0,o.A)({},r,{align:l,component:I,padding:b||(C&&C.padding?C.padding:"normal"),size:x||(C&&C.size?C.size:"medium"),sortDirection:w,stickyHeader:"head"===M&&C&&C.stickyHeader,variant:M}),P=(e=>{const{classes:t,variant:r,align:n,padding:o,size:i,stickyHeader:a}=e,l={root:["root",r,a&&"stickyHeader","inherit"!==n&&`align${(0,c.A)(n)}`,"normal"!==o&&`padding${(0,c.A)(o)}`,`size${(0,c.A)(i)}`]};return(0,s.A)(l,h.r,t)})(R);let O=null;return w&&(O="asc"===w?"ascending":"descending"),(0,m.jsx)(y,(0,o.A)({as:I,ref:t,className:(0,a.A)(P.root,p),"aria-sort":O,scope:k,ownerState:R},S))}))},WeeH:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,r:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTableCell",e)}const a=(0,n.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"])},ZrSb:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("Vn7y"),u=r("7Ep0"),d=r("nKUr");const f=["className","component"],p=(0,c.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),h=i.forwardRef((function(e,t){const r=(0,l.b)({props:e,name:"MuiTableContainer"}),{className:i,component:c="div"}=r,h=(0,o.A)(r,f),m=(0,n.A)({},r,{component:c}),g=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},u.I,t)})(m);return(0,d.jsx)(p,(0,n.A)({ref:t,as:c,className:(0,a.A)(g.root,i),ownerState:m},h))}))},"7Ep0":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,I:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTableContainer",e)}const a=(0,n.A)("MuiTableContainer",["root"])},PjUp:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("bpaH"),c=r("W9AN"),u=r("Vn7y"),d=r("mzdN"),f=r("nKUr");const p=["className","component"],h=(0,u.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),m={variant:"head"},g="thead",y=i.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiTableHead"}),{className:i,component:u=g}=r,y=(0,o.A)(r,p),v=(0,n.A)({},r,{component:u}),b=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},d.X,t)})(v);return(0,f.jsx)(l.A.Provider,{value:m,children:(0,f.jsx)(h,(0,n.A)({as:u,className:(0,a.A)(b.root,i),ref:t,role:u===g?null:"rowgroup",ownerState:v},y))})}))},mzdN:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,X:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTableHead",e)}const a=(0,n.A)("MuiTableHead",["root"])},iu7o:(e,t,r)=>{"use strict";r.d(t,{A:()=>z});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("gU+W"),c=r("Vn7y"),u=r("W9AN"),d=r("kmWS"),f=r("LutX"),p=r("AAK8"),h=r("xqzF"),m=r("QOiN"),g=r("St5x"),y=r("Z21g"),v=r("5+C/"),b=r("OGDC"),_=r("/0Dp"),x=r("Be/P"),w=r("nKUr");const A=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],S=i.forwardRef((function(e,t){var r,i,a,s,l,c,u,d;const{backIconButtonProps:f,count:p,disabled:h=!1,getItemAriaLabel:m,nextIconButtonProps:S,onPageChange:C,page:E,rowsPerPage:T,showFirstButton:I,showLastButton:k,slots:M={},slotProps:R={}}=e,P=(0,n.A)(e,A),O=(0,g.I)(),L=null!=(r=M.firstButton)?r:b.A,D=null!=(i=M.lastButton)?i:b.A,N=null!=(a=M.nextButton)?a:b.A,F=null!=(s=M.previousButton)?s:b.A,z=null!=(l=M.firstButtonIcon)?l:x.A,B=null!=(c=M.lastButtonIcon)?c:_.A,j=null!=(u=M.nextButtonIcon)?u:v.A,U=null!=(d=M.previousButtonIcon)?d:y.A,$=O?D:L,V=O?N:F,G=O?F:N,H=O?L:D,W=O?R.lastButton:R.firstButton,q=O?R.nextButton:R.previousButton,X=O?R.previousButton:R.nextButton,Z=O?R.firstButton:R.lastButton;return(0,w.jsxs)("div",(0,o.A)({ref:t},P,{children:[I&&(0,w.jsx)($,(0,o.A)({onClick:e=>{C(e,0)},disabled:h||0===E,"aria-label":m("first",E),title:m("first",E)},W,{children:O?(0,w.jsx)(B,(0,o.A)({},R.lastButtonIcon)):(0,w.jsx)(z,(0,o.A)({},R.firstButtonIcon))})),(0,w.jsx)(V,(0,o.A)({onClick:e=>{C(e,E-1)},disabled:h||0===E,color:"inherit","aria-label":m("previous",E),title:m("previous",E)},null!=q?q:f,{children:O?(0,w.jsx)(j,(0,o.A)({},R.nextButtonIcon)):(0,w.jsx)(U,(0,o.A)({},R.previousButtonIcon))})),(0,w.jsx)(G,(0,o.A)({onClick:e=>{C(e,E+1)},disabled:h||-1!==p&&E>=Math.ceil(p/T)-1,color:"inherit","aria-label":m("next",E),title:m("next",E)},null!=X?X:S,{children:O?(0,w.jsx)(U,(0,o.A)({},R.previousButtonIcon)):(0,w.jsx)(j,(0,o.A)({},R.nextButtonIcon))})),k&&(0,w.jsx)(H,(0,o.A)({onClick:e=>{C(e,Math.max(0,Math.ceil(p/T)-1))},disabled:h||E>=Math.ceil(p/T)-1,"aria-label":m("last",E),title:m("last",E)},Z,{children:O?(0,w.jsx)(z,(0,o.A)({},R.firstButtonIcon)):(0,w.jsx)(B,(0,o.A)({},R.lastButtonIcon))}))]}))}));var C,E=r("DSU1"),T=r("hwAa");const I=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],k=(0,c.Ay)(h.A,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),M=(0,c.Ay)(m.A,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>(0,o.A)({[`& .${T.A.actions}`]:t.actions},t.toolbar)})((({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${T.A.actions}`]:{flexShrink:0,marginLeft:20}}))),R=(0,c.Ay)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),P=(0,c.Ay)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((({theme:e})=>(0,o.A)({},e.typography.body2,{flexShrink:0}))),O=(0,c.Ay)(p.A,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>(0,o.A)({[`& .${T.A.selectIcon}`]:t.selectIcon,[`& .${T.A.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${T.A.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),L=(0,c.Ay)(f.A,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),D=(0,c.Ay)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((({theme:e})=>(0,o.A)({},e.typography.body2,{flexShrink:0})));function N({from:e,to:t,count:r}){return`${e}–${t} of ${-1!==r?r:`more than ${t}`}`}function F(e){return`Go to ${e} page`}const z=i.forwardRef((function(e,t){var r;const c=(0,u.b)({props:e,name:"MuiTablePagination"}),{ActionsComponent:f=S,backIconButtonProps:p,className:m,colSpan:g,component:y=h.A,count:v,disabled:b=!1,getItemAriaLabel:_=F,labelDisplayedRows:x=N,labelRowsPerPage:A="Rows per page:",nextIconButtonProps:z,onPageChange:B,onRowsPerPageChange:j,page:U,rowsPerPage:$,rowsPerPageOptions:V=[10,25,50,100],SelectProps:G={},showFirstButton:H=!1,showLastButton:W=!1,slotProps:q={},slots:X={}}=c,Z=(0,n.A)(c,I),Y=c,K=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},T.B,t)})(Y),J=null!=(r=null==q?void 0:q.select)?r:G,Q=J.native?"option":L;let ee;y!==h.A&&"td"!==y||(ee=g||1e3);const te=(0,E.A)(J.id),re=(0,E.A)(J.labelId);return(0,w.jsx)(k,(0,o.A)({colSpan:ee,ref:t,as:y,ownerState:Y,className:(0,a.A)(K.root,m)},Z,{children:(0,w.jsxs)(M,{className:K.toolbar,children:[(0,w.jsx)(R,{className:K.spacer}),V.length>1&&(0,w.jsx)(P,{className:K.selectLabel,id:re,children:A}),V.length>1&&(0,w.jsx)(O,(0,o.A)({variant:"standard"},!J.variant&&{input:C||(C=(0,w.jsx)(d.Ay,{}))},{value:$,onChange:j,id:te,labelId:re},J,{classes:(0,o.A)({},J.classes,{root:(0,a.A)(K.input,K.selectRoot,(J.classes||{}).root),select:(0,a.A)(K.select,(J.classes||{}).select),icon:(0,a.A)(K.selectIcon,(J.classes||{}).icon)}),disabled:b,children:V.map((e=>(0,i.createElement)(Q,(0,o.A)({},!(0,l.A)(Q)&&{ownerState:Y},{className:K.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)))})),(0,w.jsx)(D,{className:K.displayedRows,children:x({from:0===v?0:U*$+1,to:-1===v?(U+1)*$:-1===$?v:Math.min(v,(U+1)*$),count:-1===v?-1:v,page:U})}),(0,w.jsx)(f,{className:K.actions,backIconButtonProps:p,count:v,nextIconButtonProps:z,onPageChange:B,page:U,rowsPerPage:$,showFirstButton:H,showLastButton:W,slotProps:q.actions,slots:X.actions,getItemAriaLabel:_,disabled:b})]})}))}))},hwAa:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,B:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTablePagination",e)}const a=(0,n.A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"])},VMHA:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("dcYk"),c=r("bpaH"),u=r("W9AN"),d=r("Vn7y"),f=r("criW"),p=r("nKUr");const h=["className","component","hover","selected"],m=(0,d.Ay)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.head&&t.head,r.footer&&t.footer]}})((({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${f.A.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${f.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),g="tr",y=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiTableRow"}),{className:l,component:d=g,hover:y=!1,selected:v=!1}=r,b=(0,o.A)(r,h),_=i.useContext(c.A),x=(0,n.A)({},r,{component:d,hover:y,selected:v,head:_&&"head"===_.variant,footer:_&&"footer"===_.variant}),w=(e=>{const{classes:t,selected:r,hover:n,head:o,footer:i}=e,a={root:["root",r&&"selected",n&&"hover",o&&"head",i&&"footer"]};return(0,s.A)(a,f.r,t)})(x);return(0,p.jsx)(m,(0,n.A)({as:d,ref:t,className:(0,a.A)(w.root,l),role:d===g?null:"row",ownerState:x},b))}))},criW:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,r:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTableRow",e)}const a=(0,n.A)("MuiTableRow",["root","selected","hover","head","footer"])},HAvo:(e,t,r)=>{"use strict";r.d(t,{A:()=>F});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=(r("TOwV"),r("juqV")),s=r("aGM9"),l=r("St5x"),c=r("0Ydi"),u=r("Vn7y"),d=r("W9AN"),f=r("UnQg"),p=r("7yHM");let h;function m(){if(h)return h;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),h="reverse",e.scrollLeft>0?h="default":(e.scrollLeft=1,0===e.scrollLeft&&(h="negative")),document.body.removeChild(e),h}function g(e,t){const r=e.scrollLeft;if("rtl"!==t)return r;switch(m()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}function y(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var v=r("6q60"),b=r("WFZb"),_=r("nKUr");const x=["onChange"],w={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var A=r("+asq"),S=r("KXty"),C=r("D+4I"),E=r("rdfb");const T=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],I=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,k=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,M=(e,t,r)=>{let n=!1,o=r(e,t);for(;o;){if(o===e.firstChild){if(n)return;n=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=r(e,o)}},R=(0,u.Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${C.A.scrollButtons}`]:t.scrollButtons},{[`& .${C.A.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})((({ownerState:e,theme:t})=>(0,o.A)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${C.A.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}))),P=(0,u.Ay)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})((({ownerState:e})=>(0,o.A)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"}))),O=(0,u.Ay)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.flexContainer,r.vertical&&t.flexContainerVertical,r.centered&&t.centered]}})((({ownerState:e})=>(0,o.A)({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"}))),L=(0,u.Ay)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((({ownerState:e,theme:t})=>(0,o.A)({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0}))),D=(0,u.Ay)((function(e){const{onChange:t}=e,r=(0,n.A)(e,x),a=i.useRef(),s=i.useRef(null),l=()=>{a.current=s.current.offsetHeight-s.current.clientHeight};return(0,v.A)((()=>{const e=(0,p.A)((()=>{const e=a.current;l(),e!==a.current&&t(a.current)})),r=(0,b.A)(s.current);return r.addEventListener("resize",e),()=>{e.clear(),r.removeEventListener("resize",e)}}),[t]),i.useEffect((()=>{l(),t(a.current)}),[t]),(0,_.jsx)("div",(0,o.A)({style:w,ref:s},r))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),N={},F=i.forwardRef((function(e,t){const r=(0,d.b)({props:e,name:"MuiTabs"}),u=(0,f.A)(),h=(0,l.I)(),{"aria-label":v,"aria-labelledby":x,action:w,centered:F=!1,children:z,className:B,component:j="div",allowScrollButtonsMobile:U=!1,indicatorColor:$="primary",onChange:V,orientation:G="horizontal",ScrollButtonComponent:H=A.A,scrollButtons:W="auto",selectionFollowsFocus:q,slots:X={},slotProps:Z={},TabIndicatorProps:Y={},TabScrollButtonProps:K={},textColor:J="primary",value:Q,variant:ee="standard",visibleScrollbar:te=!1}=r,re=(0,n.A)(r,T),ne="scrollable"===ee,oe="vertical"===G,ie=oe?"scrollTop":"scrollLeft",ae=oe?"top":"left",se=oe?"bottom":"right",le=oe?"clientHeight":"clientWidth",ce=oe?"height":"width",ue=(0,o.A)({},r,{component:j,allowScrollButtonsMobile:U,indicatorColor:$,orientation:G,vertical:oe,scrollButtons:W,textColor:J,variant:ee,visibleScrollbar:te,fixed:!ne,hideScrollbar:ne&&!te,scrollableX:ne&&!oe,scrollableY:ne&&oe,centered:F&&!ne,scrollButtonsHideMobile:!U}),de=(e=>{const{vertical:t,fixed:r,hideScrollbar:n,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:l,classes:c}=e,u={root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",n&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]};return(0,s.A)(u,C.H,c)})(ue),fe=(0,c.A)({elementType:X.StartScrollButtonIcon,externalSlotProps:Z.startScrollButtonIcon,ownerState:ue}),pe=(0,c.A)({elementType:X.EndScrollButtonIcon,externalSlotProps:Z.endScrollButtonIcon,ownerState:ue}),[he,me]=i.useState(!1),[ge,ye]=i.useState(N),[ve,be]=i.useState(!1),[_e,xe]=i.useState(!1),[we,Ae]=i.useState(!1),[Se,Ce]=i.useState({overflow:"hidden",scrollbarWidth:0}),Ee=new Map,Te=i.useRef(null),Ie=i.useRef(null),ke=()=>{const e=Te.current;let t,r;if(e){const r=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:g(e,h?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(e&&!1!==Q){const e=Ie.current.children;if(e.length>0){const t=e[Ee.get(Q)];r=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:r}},Me=(0,S.A)((()=>{const{tabsMeta:e,tabMeta:t}=ke();let r,n=0;if(oe)r="top",t&&e&&(n=t.top-e.top+e.scrollTop);else if(r=h?"right":"left",t&&e){const o=h?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;n=(h?-1:1)*(t[r]-e[r]+o)}const o={[r]:n,[ce]:t?t[ce]:0};if(isNaN(ge[r])||isNaN(ge[ce]))ye(o);else{const e=Math.abs(ge[r]-o[r]),t=Math.abs(ge[ce]-o[ce]);(e>=1||t>=1)&&ye(o)}})),Re=(e,{animation:t=!0}={})=>{t?function(e,t,r,n={},o=()=>{}){const{ease:i=y,duration:a=300}=n;let s=null;const l=t[e];let c=!1;const u=n=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=n);const d=Math.min(1,(n-s)/a);t[e]=i(d)*(r-l)+l,d>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(u)};l===r?o(new Error("Element already at target position")):requestAnimationFrame(u)}(ie,Te.current,e,{duration:u.transitions.duration.standard}):Te.current[ie]=e},Pe=e=>{let t=Te.current[ie];oe?t+=e:(t+=e*(h?-1:1),t*=h&&"reverse"===m()?-1:1),Re(t)},Oe=()=>{const e=Te.current[le];let t=0;const r=Array.from(Ie.current.children);for(let n=0;ne){0===n&&(t=e);break}t+=o[le]}return t},Le=()=>{Pe(-1*Oe())},De=()=>{Pe(Oe())},Ne=i.useCallback((e=>{Ce({overflow:null,scrollbarWidth:e})}),[]),Fe=(0,S.A)((e=>{const{tabsMeta:t,tabMeta:r}=ke();if(r&&t)if(r[ae]t[se]){const n=t[ie]+(r[se]-t[se]);Re(n,{animation:e})}})),ze=(0,S.A)((()=>{ne&&!1!==W&&Ae(!we)}));i.useEffect((()=>{const e=(0,p.A)((()=>{Te.current&&Me()}));let t;const r=(0,b.A)(Te.current);let n;return r.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(Ie.current.children).forEach((e=>{t.observe(e)}))),"undefined"!=typeof MutationObserver&&(n=new MutationObserver((r=>{r.forEach((e=>{e.removedNodes.forEach((e=>{var r;null==(r=t)||r.unobserve(e)})),e.addedNodes.forEach((e=>{var r;null==(r=t)||r.observe(e)}))})),e(),ze()})),n.observe(Ie.current,{childList:!0})),()=>{var o,i;e.clear(),r.removeEventListener("resize",e),null==(o=n)||o.disconnect(),null==(i=t)||i.disconnect()}}),[Me,ze]),i.useEffect((()=>{const e=Array.from(Ie.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&ne&&!1!==W){const r=e[0],n=e[t-1],o={root:Te.current,threshold:.99},i=new IntersectionObserver((e=>{be(!e[0].isIntersecting)}),o);i.observe(r);const a=new IntersectionObserver((e=>{xe(!e[0].isIntersecting)}),o);return a.observe(n),()=>{i.disconnect(),a.disconnect()}}}),[ne,W,we,null==z?void 0:z.length]),i.useEffect((()=>{me(!0)}),[]),i.useEffect((()=>{Me()})),i.useEffect((()=>{Fe(N!==ge)}),[Fe,ge]),i.useImperativeHandle(w,(()=>({updateIndicator:Me,updateScrollButtons:ze})),[Me,ze]);const Be=(0,_.jsx)(L,(0,o.A)({},Y,{className:(0,a.A)(de.indicator,Y.className),ownerState:ue,style:(0,o.A)({},ge,Y.style)}));let je=0;const Ue=i.Children.map(z,(e=>{if(!i.isValidElement(e))return null;const t=void 0===e.props.value?je:e.props.value;Ee.set(t,je);const r=t===Q;return je+=1,i.cloneElement(e,(0,o.A)({fullWidth:"fullWidth"===ee,indicator:r&&!he&&Be,selected:r,selectionFollowsFocus:q,onChange:V,textColor:J,value:t},1!==je||!1!==Q||e.props.tabIndex?{}:{tabIndex:0}))})),$e=(()=>{const e={};e.scrollbarSizeListener=ne?(0,_.jsx)(D,{onChange:Ne,className:(0,a.A)(de.scrollableX,de.hideScrollbar)}):null;const t=ne&&("auto"===W&&(ve||_e)||!0===W);return e.scrollButtonStart=t?(0,_.jsx)(H,(0,o.A)({slots:{StartScrollButtonIcon:X.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:fe},orientation:G,direction:h?"right":"left",onClick:Le,disabled:!ve},K,{className:(0,a.A)(de.scrollButtons,K.className)})):null,e.scrollButtonEnd=t?(0,_.jsx)(H,(0,o.A)({slots:{EndScrollButtonIcon:X.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:pe},orientation:G,direction:h?"left":"right",onClick:De,disabled:!_e},K,{className:(0,a.A)(de.scrollButtons,K.className)})):null,e})();return(0,_.jsxs)(R,(0,o.A)({className:(0,a.A)(de.root,B),ownerState:ue,ref:t,as:j},re,{children:[$e.scrollButtonStart,$e.scrollbarSizeListener,(0,_.jsxs)(P,{className:de.scroller,ownerState:ue,style:{overflow:Se.overflow,[oe?"margin"+(h?"Left":"Right"):"marginBottom"]:te?void 0:-Se.scrollbarWidth},ref:Te,children:[(0,_.jsx)(O,{"aria-label":v,"aria-labelledby":x,"aria-orientation":"vertical"===G?"vertical":null,className:de.flexContainer,ownerState:ue,onKeyDown:e=>{const t=Ie.current,r=(0,E.A)(t).activeElement;if("tab"!==r.getAttribute("role"))return;let n="horizontal"===G?"ArrowLeft":"ArrowUp",o="horizontal"===G?"ArrowRight":"ArrowDown";switch("horizontal"===G&&h&&(n="ArrowRight",o="ArrowLeft"),e.key){case n:e.preventDefault(),M(t,r,k);break;case o:e.preventDefault(),M(t,r,I);break;case"Home":e.preventDefault(),M(t,null,I);break;case"End":e.preventDefault(),M(t,null,k)}},ref:Ie,role:"tablist",children:Ue}),he&&Be]}),$e.scrollButtonEnd]}))}))},"D+4I":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,H:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTabs",e)}const a=(0,n.A)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"])},MGIy:(e,t,r)=>{"use strict";r.d(t,{A:()=>A});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("A3c4"),c=r("Vn7y"),u=r("W9AN"),d=r("WdHY"),f=r("fJ4Q"),p=r("6j3M"),h=r("kQF4"),m=r("Fg+5"),g=r("sbgx"),y=r("AAK8"),v=r("ndLI"),b=r("nKUr");const _=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],x={standard:d.A,filled:f.A,outlined:p.A},w=(0,c.Ay)(m.A,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),A=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:c=!1,children:d,className:f,color:p="primary",defaultValue:m,disabled:A=!1,error:S=!1,FormHelperTextProps:C,fullWidth:E=!1,helperText:T,id:I,InputLabelProps:k,inputProps:M,InputProps:R,inputRef:P,label:O,maxRows:L,minRows:D,multiline:N=!1,name:F,onBlur:z,onChange:B,onFocus:j,placeholder:U,required:$=!1,rows:V,select:G=!1,SelectProps:H,type:W,value:q,variant:X="outlined"}=r,Z=(0,o.A)(r,_),Y=(0,n.A)({},r,{autoFocus:c,color:p,disabled:A,error:S,fullWidth:E,multiline:N,required:$,select:G,variant:X}),K=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},v._,t)})(Y),J={};"outlined"===X&&(k&&void 0!==k.shrink&&(J.notched=k.shrink),J.label=O),G&&(H&&H.native||(J.id=void 0),J["aria-describedby"]=void 0);const Q=(0,l.A)(I),ee=T&&Q?`${Q}-helper-text`:void 0,te=O&&Q?`${Q}-label`:void 0,re=x[X],ne=(0,b.jsx)(re,(0,n.A)({"aria-describedby":ee,autoComplete:i,autoFocus:c,defaultValue:m,fullWidth:E,multiline:N,name:F,rows:V,maxRows:L,minRows:D,type:W,value:q,id:Q,inputRef:P,onBlur:z,onChange:B,onFocus:j,placeholder:U,inputProps:M},J,R));return(0,b.jsxs)(w,(0,n.A)({className:(0,a.A)(K.root,f),disabled:A,error:S,fullWidth:E,ref:t,required:$,color:p,variant:X,ownerState:Y},Z,{children:[null!=O&&""!==O&&(0,b.jsx)(h.A,(0,n.A)({htmlFor:Q,id:te},k,{children:O})),G?(0,b.jsx)(y.A,(0,n.A)({"aria-describedby":ee,id:Q,labelId:te,value:q,input:ne},H,{children:d})):ne,T&&(0,b.jsx)(g.A,(0,n.A)({id:ee},C,{children:T}))]}))}))},ndLI:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,_:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTextField",e)}const a=(0,n.A)("MuiTextField",["root"])},ICY4:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("N0rN"),s=r("4bZc"),l=r("XgeM"),c=r("QoIX"),u=r("nKUr");const d=["onChange","maxRows","minRows","style","value"];function f(e){return parseInt(e,10)||0}const p={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},h=i.forwardRef((function(e,t){const{onChange:r,maxRows:h,minRows:m=1,style:g,value:y}=e,v=(0,o.A)(e,d),{current:b}=i.useRef(null!=y),_=i.useRef(null),x=(0,a.A)(t,_),w=i.useRef(null),A=i.useRef(null),S=i.useCallback((()=>{const t=_.current,r=(0,s.A)(t).getComputedStyle(t);if("0px"===r.width)return{outerHeightStyle:0,overflowing:!1};const n=A.current;n.style.width=r.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const o=r.boxSizing,i=f(r.paddingBottom)+f(r.paddingTop),a=f(r.borderBottomWidth)+f(r.borderTopWidth),l=n.scrollHeight;n.value="x";const c=n.scrollHeight;let u=l;return m&&(u=Math.max(Number(m)*c,u)),h&&(u=Math.min(Number(h)*c,u)),u=Math.max(u,c),{outerHeightStyle:u+("border-box"===o?i+a:0),overflowing:Math.abs(u-l)<=1}}),[h,m,e.placeholder]),C=i.useCallback((()=>{const e=S();if(null==(t=e)||0===Object.keys(t).length||0===t.outerHeightStyle&&!t.overflowing)return;var t;const r=e.outerHeightStyle,n=_.current;w.current!==r&&(w.current=r,n.style.height=`${r}px`),n.style.overflow=e.overflowing?"hidden":""}),[S]);return(0,l.A)((()=>{const e=()=>{C()};const t=(0,c.A)(e),r=_.current,n=(0,s.A)(r);let o;return n.addEventListener("resize",t),"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver(e),o.observe(r)),()=>{t.clear(),cancelAnimationFrame(undefined),n.removeEventListener("resize",t),o&&o.disconnect()}}),[S,C]),(0,l.A)((()=>{C()})),(0,u.jsxs)(i.Fragment,{children:[(0,u.jsx)("textarea",(0,n.A)({value:y,onChange:e=>{b||C(),r&&r(e)},ref:x,rows:m,style:g},v)),(0,u.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:A,tabIndex:-1,style:(0,n.A)({},p,g,{paddingTop:0,paddingBottom:0})})]})}))},QOiN:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("W9AN"),c=r("Vn7y"),u=r("ZgSS"),d=r("nKUr");const f=["className","component","disableGutters","variant"],p=(0,c.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})((({theme:e,ownerState:t})=>(0,o.A)({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===t.variant&&{minHeight:48})),(({theme:e,ownerState:t})=>"regular"===t.variant&&e.mixins.toolbar)),h=i.forwardRef((function(e,t){const r=(0,l.b)({props:e,name:"MuiToolbar"}),{className:i,component:c="div",disableGutters:h=!1,variant:m="regular"}=r,g=(0,n.A)(r,f),y=(0,o.A)({},r,{component:c,disableGutters:h,variant:m}),v=(e=>{const{classes:t,disableGutters:r,variant:n}=e,o={root:["root",!r&&"gutters",n]};return(0,s.A)(o,u.U,t)})(y);return(0,d.jsx)(p,(0,o.A)({as:c,className:(0,a.A)(v.root,i),ref:t,ownerState:y},g))}))},ZgSS:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,U:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiToolbar",e)}const a=(0,n.A)("MuiToolbar",["root","gutters","regular","dense"])},"vH+6":(e,t,r)=>{"use strict";r.d(t,{A:()=>O});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("J13E"),l=r("aGM9"),c=r("dcYk"),u=r("St5x"),d=r("/E4l"),f=r("Vn7y"),p=r("UnQg"),h=r("W9AN"),m=r("xeev"),g=r("UVCh"),y=r("usZy"),v=r("KXty"),b=r("ZfBw"),_=r("DSU1"),x=r("8rms"),w=r("1vOf"),A=r("mJ7p"),S=r("nKUr");const C=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"],E=(0,f.Ay)(y.A,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})((({theme:e,ownerState:t,open:r})=>(0,o.A)({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${A.A.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${A.A.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${A.A.arrow}`]:(0,o.A)({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${A.A.arrow}`]:(0,o.A)({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),T=(0,f.Ay)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,m.A)(r.placement.split("-")[0])}`]]}})((({theme:e,ownerState:t})=>{return(0,o.A)({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:(0,c.X4)(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(r=16/14,Math.round(1e5*r)/1e5+"em"),fontWeight:e.typography.fontWeightRegular},{[`.${A.A.popper}[data-popper-placement*="left"] &`]:(0,o.A)({transformOrigin:"right center"},t.isRtl?(0,o.A)({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):(0,o.A)({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${A.A.popper}[data-popper-placement*="right"] &`]:(0,o.A)({transformOrigin:"left center"},t.isRtl?(0,o.A)({marginRight:"14px"},t.touch&&{marginRight:"24px"}):(0,o.A)({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${A.A.popper}[data-popper-placement*="top"] &`]:(0,o.A)({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${A.A.popper}[data-popper-placement*="bottom"] &`]:(0,o.A)({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})});var r})),I=(0,f.Ay)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,c.X4)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let k=!1;const M=new s.E;let R={x:0,y:0};function P(e,t){return(r,...n)=>{t&&t(r,...n),e(r,...n)}}const O=i.forwardRef((function(e,t){var r,c,f,O,L,D,N,F,z,B,j,U,$,V,G,H,W,q,X;const Z=(0,h.b)({props:e,name:"MuiTooltip"}),{arrow:Y=!1,children:K,components:J={},componentsProps:Q={},describeChild:ee=!1,disableFocusListener:te=!1,disableHoverListener:re=!1,disableInteractive:ne=!1,disableTouchListener:oe=!1,enterDelay:ie=100,enterNextDelay:ae=0,enterTouchDelay:se=700,followCursor:le=!1,id:ce,leaveDelay:ue=0,leaveTouchDelay:de=1500,onClose:fe,onOpen:pe,open:he,placement:me="bottom",PopperComponent:ge,PopperProps:ye={},slotProps:ve={},slots:be={},title:_e,TransitionComponent:xe=g.A,TransitionProps:we}=Z,Ae=(0,n.A)(Z,C),Se=i.isValidElement(K)?K:(0,S.jsx)("span",{children:K}),Ce=(0,p.A)(),Ee=(0,u.I)(),[Te,Ie]=i.useState(),[ke,Me]=i.useState(null),Re=i.useRef(!1),Pe=ne||le,Oe=(0,s.A)(),Le=(0,s.A)(),De=(0,s.A)(),Ne=(0,s.A)(),[Fe,ze]=(0,w.A)({controlled:he,default:!1,name:"Tooltip",state:"open"});let Be=Fe;const je=(0,_.A)(ce),Ue=i.useRef(),$e=(0,v.A)((()=>{void 0!==Ue.current&&(document.body.style.WebkitUserSelect=Ue.current,Ue.current=void 0),Ne.clear()}));i.useEffect((()=>$e),[$e]);const Ve=e=>{M.clear(),k=!0,ze(!0),pe&&!Be&&pe(e)},Ge=(0,v.A)((e=>{M.start(800+ue,(()=>{k=!1})),ze(!1),fe&&Be&&fe(e),Oe.start(Ce.transitions.duration.shortest,(()=>{Re.current=!1}))})),He=e=>{Re.current&&"touchstart"!==e.type||(Te&&Te.removeAttribute("title"),Le.clear(),De.clear(),ie||k&&ae?Le.start(k?ae:ie,(()=>{Ve(e)})):Ve(e))},We=e=>{Le.clear(),De.start(ue,(()=>{Ge(e)}))},{isFocusVisibleRef:qe,onBlur:Xe,onFocus:Ze,ref:Ye}=(0,x.A)(),[,Ke]=i.useState(!1),Je=e=>{Xe(e),!1===qe.current&&(Ke(!1),We(e))},Qe=e=>{Te||Ie(e.currentTarget),Ze(e),!0===qe.current&&(Ke(!0),He(e))},et=e=>{Re.current=!0;const t=Se.props;t.onTouchStart&&t.onTouchStart(e)};i.useEffect((()=>{if(Be)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Ge(e)}}),[Ge,Be]);const tt=(0,b.A)(Se.ref,Ye,Ie,t);_e||0===_e||(Be=!1);const rt=i.useRef(),nt={},ot="string"==typeof _e;ee?(nt.title=Be||!ot||re?null:_e,nt["aria-describedby"]=Be?je:null):(nt["aria-label"]=ot?_e:null,nt["aria-labelledby"]=Be&&!ot?je:null);const it=(0,o.A)({},nt,Ae,Se.props,{className:(0,a.A)(Ae.className,Se.props.className),onTouchStart:et,ref:tt},le?{onMouseMove:e=>{const t=Se.props;t.onMouseMove&&t.onMouseMove(e),R={x:e.clientX,y:e.clientY},rt.current&&rt.current.update()}}:{}),at={};oe||(it.onTouchStart=e=>{et(e),De.clear(),Oe.clear(),$e(),Ue.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ne.start(se,(()=>{document.body.style.WebkitUserSelect=Ue.current,He(e)}))},it.onTouchEnd=e=>{Se.props.onTouchEnd&&Se.props.onTouchEnd(e),$e(),De.start(de,(()=>{Ge(e)}))}),re||(it.onMouseOver=P(He,it.onMouseOver),it.onMouseLeave=P(We,it.onMouseLeave),Pe||(at.onMouseOver=He,at.onMouseLeave=We)),te||(it.onFocus=P(Qe,it.onFocus),it.onBlur=P(Je,it.onBlur),Pe||(at.onFocus=Qe,at.onBlur=Je));const st=i.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(ke),options:{element:ke,padding:4}}];return null!=(e=ye.popperOptions)&&e.modifiers&&(t=t.concat(ye.popperOptions.modifiers)),(0,o.A)({},ye.popperOptions,{modifiers:t})}),[ke,ye]),lt=(0,o.A)({},Z,{isRtl:Ee,arrow:Y,disableInteractive:Pe,placement:me,PopperComponentProp:ge,touch:Re.current}),ct=(e=>{const{classes:t,disableInteractive:r,arrow:n,touch:o,placement:i}=e,a={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",o&&"touch",`tooltipPlacement${(0,m.A)(i.split("-")[0])}`],arrow:["arrow"]};return(0,l.A)(a,A.E,t)})(lt),ut=null!=(r=null!=(c=be.popper)?c:J.Popper)?r:E,dt=null!=(f=null!=(O=null!=(L=be.transition)?L:J.Transition)?O:xe)?f:g.A,ft=null!=(D=null!=(N=be.tooltip)?N:J.Tooltip)?D:T,pt=null!=(F=null!=(z=be.arrow)?z:J.Arrow)?F:I,ht=(0,d.A)(ut,(0,o.A)({},ye,null!=(B=ve.popper)?B:Q.popper,{className:(0,a.A)(ct.popper,null==ye?void 0:ye.className,null==(j=null!=(U=ve.popper)?U:Q.popper)?void 0:j.className)}),lt),mt=(0,d.A)(dt,(0,o.A)({},we,null!=($=ve.transition)?$:Q.transition),lt),gt=(0,d.A)(ft,(0,o.A)({},null!=(V=ve.tooltip)?V:Q.tooltip,{className:(0,a.A)(ct.tooltip,null==(G=null!=(H=ve.tooltip)?H:Q.tooltip)?void 0:G.className)}),lt),yt=(0,d.A)(pt,(0,o.A)({},null!=(W=ve.arrow)?W:Q.arrow,{className:(0,a.A)(ct.arrow,null==(q=null!=(X=ve.arrow)?X:Q.arrow)?void 0:q.className)}),lt);return(0,S.jsxs)(i.Fragment,{children:[i.cloneElement(Se,it),(0,S.jsx)(ut,(0,o.A)({as:null!=ge?ge:y.A,placement:me,anchorEl:le?{getBoundingClientRect:()=>({top:R.y,left:R.x,right:R.x,bottom:R.y,width:0,height:0})}:Te,popperRef:rt,open:!!Te&&Be,id:je,transition:!0},at,ht,{popperOptions:st,children:({TransitionProps:e})=>(0,S.jsx)(dt,(0,o.A)({timeout:Ce.transitions.duration.shorter},e,mt,{children:(0,S.jsxs)(ft,(0,o.A)({},gt,{children:[_e,Y?(0,S.jsx)(pt,(0,o.A)({},yt,{ref:Me})):null]}))}))}))]})}))},mJ7p:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,E:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTooltip",e)}const a=(0,n.A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"])},Gqia:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("0kTp"),l=r("aGM9"),c=r("Vn7y"),u=r("W9AN"),d=r("xeev"),f=r("zNd+"),p=r("nKUr");const h=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],m=(0,c.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],"inherit"!==r.align&&t[`align${(0,d.A)(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>(0,o.A)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),g={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},y={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},v=i.forwardRef((function(e,t){const r=(0,u.b)({props:e,name:"MuiTypography"}),i=(e=>y[e]||e)(r.color),c=(0,s.A)((0,o.A)({},r,{color:i})),{align:v="inherit",className:b,component:_,gutterBottom:x=!1,noWrap:w=!1,paragraph:A=!1,variant:S="body1",variantMapping:C=g}=c,E=(0,n.A)(c,h),T=(0,o.A)({},c,{align:v,color:i,className:b,component:_,gutterBottom:x,noWrap:w,paragraph:A,variant:S,variantMapping:C}),I=_||(A?"p":C[S]||g[S])||"span",k=(e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,"inherit"!==e.align&&`align${(0,d.A)(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return(0,l.A)(s,f.y,a)})(T);return(0,p.jsx)(m,(0,o.A)({as:I,ref:t,ownerState:T,className:(0,a.A)(k.root,b)},E))}))},"zNd+":(e,t,r)=>{"use strict";r.d(t,{A:()=>a,y:()=>i});var n=r("PYeY"),o=r("TkYO");function i(e){return(0,o.Ay)("MuiTypography",e)}const a=(0,n.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"])},qSC9:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r("q1tI"),o=r("N0rN"),i=r("p4lV"),a=r("nKUr");const s=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function l(e){const t=[],r=[];return Array.from(e.querySelectorAll(s)).forEach(((e,n)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}(e))}(e)&&(0===o?t.push(e):r.push({documentOrder:n,tabIndex:o,node:e}))})),r.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function c(){return!0}const u=function(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:s=!1,disableRestoreFocus:u=!1,getTabbable:d=l,isEnabled:f=c,open:p}=e,h=n.useRef(!1),m=n.useRef(null),g=n.useRef(null),y=n.useRef(null),v=n.useRef(null),b=n.useRef(!1),_=n.useRef(null),x=(0,o.A)(t.ref,_),w=n.useRef(null);n.useEffect((()=>{p&&_.current&&(b.current=!r)}),[r,p]),n.useEffect((()=>{if(!p||!_.current)return;const e=(0,i.A)(_.current);return _.current.contains(e.activeElement)||(_.current.hasAttribute("tabIndex")||_.current.setAttribute("tabIndex","-1"),b.current&&_.current.focus()),()=>{u||(y.current&&y.current.focus&&(h.current=!0,y.current.focus()),y.current=null)}}),[p]),n.useEffect((()=>{if(!p||!_.current)return;const e=(0,i.A)(_.current),t=t=>{w.current=t,!s&&f()&&"Tab"===t.key&&e.activeElement===_.current&&t.shiftKey&&(h.current=!0,g.current&&g.current.focus())},r=()=>{const t=_.current;if(null===t)return;if(!e.hasFocus()||!f()||h.current)return void(h.current=!1);if(t.contains(e.activeElement))return;if(s&&e.activeElement!==m.current&&e.activeElement!==g.current)return;if(e.activeElement!==v.current)v.current=null;else if(null!==v.current)return;if(!b.current)return;let r=[];if(e.activeElement!==m.current&&e.activeElement!==g.current||(r=d(_.current)),r.length>0){var n,o;const e=Boolean((null==(n=w.current)?void 0:n.shiftKey)&&"Tab"===(null==(o=w.current)?void 0:o.key)),t=r[0],i=r[r.length-1];"string"!=typeof t&&"string"!=typeof i&&(e?i.focus():t.focus())}else t.focus()};e.addEventListener("focusin",r),e.addEventListener("keydown",t,!0);const n=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&r()}),50);return()=>{clearInterval(n),e.removeEventListener("focusin",r),e.removeEventListener("keydown",t,!0)}}),[r,s,u,f,p,d]);const A=e=>{null===y.current&&(y.current=e.relatedTarget),b.current=!0};return(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)("div",{tabIndex:p?0:-1,onFocus:A,ref:m,"data-testid":"sentinelStart"}),n.cloneElement(t,{ref:x,onFocus:e=>{null===y.current&&(y.current=e.relatedTarget),b.current=!0,v.current=e.target;const r=t.props.onFocus;r&&r(e)}}),(0,a.jsx)("div",{tabIndex:p?0:-1,onFocus:A,ref:g,"data-testid":"sentinelEnd"})]})}},UG0H:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},H00D:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={black:"#000",white:"#fff"}},at7f:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},Xxcx:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"}},"8jZn":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"}},A1Zn:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},iIhR:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"}},"0XHX":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},ESDu:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Accordion:()=>He.A,AccordionActions:()=>rt,AccordionDetails:()=>nt.A,AccordionSummary:()=>it.A,Alert:()=>st.A,AlertTitle:()=>ct.A,AppBar:()=>vt,Autocomplete:()=>bt.A,Avatar:()=>wt.A,AvatarGroup:()=>St.A,Backdrop:()=>Et.A,Badge:()=>It.A,BottomNavigation:()=>Lt,BottomNavigationAction:()=>Ut,Box:()=>$t.A,Breadcrumbs:()=>ir,Button:()=>ar.A,ButtonBase:()=>Dt.A,ButtonGroup:()=>yr,ButtonGroupButtonContext:()=>hr.A,ButtonGroupContext:()=>pr.A,Card:()=>wr,CardActionArea:()=>Ir,CardActions:()=>Or,CardContent:()=>zr,CardHeader:()=>Wr,CardMedia:()=>en,Checkbox:()=>tn.A,Chip:()=>nn.A,CircularProgress:()=>an.A,ClickAwayListener:()=>ln.x,Collapse:()=>cn.A,Container:()=>dn.A,CssBaseline:()=>hn.Ay,Dialog:()=>yn.A,DialogActions:()=>bn.A,DialogContent:()=>xn.A,DialogContentText:()=>An.A,DialogTitle:()=>Cn.A,Divider:()=>Tn.A,Drawer:()=>Gn,Experimental_CssVarsProvider:()=>ze,Fab:()=>Zn,Fade:()=>Yn.A,FilledInput:()=>Kn.A,FormControl:()=>Qn.A,FormControlLabel:()=>ro.A,FormGroup:()=>oo.A,FormHelperText:()=>ao.A,FormLabel:()=>lo.A,FormLabelRoot:()=>lo.d,GlobalStyles:()=>Yu.A,Grid:()=>wo,Grow:()=>Qo.A,Hidden:()=>pi,Icon:()=>bi,IconButton:()=>_i.A,ImageList:()=>Ii,ImageListItem:()=>Di,ImageListItemBar:()=>Gi,Input:()=>Hi.A,InputAdornment:()=>qi.A,InputBase:()=>Zi.Ay,InputLabel:()=>Ki.A,LinearProgress:()=>Qi.A,Link:()=>ua,List:()=>da.A,ListItem:()=>pa.Ay,ListItemAvatar:()=>ma.A,ListItemButton:()=>xa,ListItemIcon:()=>wa.A,ListItemSecondaryAction:()=>Sa.A,ListItemText:()=>Ea.A,ListSubheader:()=>Ia.A,Menu:()=>Ma.A,MenuItem:()=>Pa.A,MenuList:()=>La.A,MobileStepper:()=>Va,Modal:()=>Mn.A,ModalManager:()=>Ga.P,NativeSelect:()=>es,NoSsr:()=>rs,OutlinedInput:()=>ns.A,Pagination:()=>Ts,PaginationItem:()=>ws,Paper:()=>ft.A,Popover:()=>ks.Ay,PopoverPaper:()=>ks.IJ,PopoverRoot:()=>ks.yt,Popper:()=>Rs.A,Portal:()=>Os.A,Radio:()=>Ls.A,RadioGroup:()=>Ns.A,Rating:()=>il,ScopedCssBaseline:()=>al.A,Select:()=>ll.A,Skeleton:()=>ul.A,Slide:()=>Rn.A,Slider:()=>fl.Ay,SliderMark:()=>fl.d6,SliderMarkLabel:()=>fl.xO,SliderRail:()=>fl.Ww,SliderRoot:()=>fl.g1,SliderThumb:()=>fl.OQ,SliderTrack:()=>fl.hB,SliderValueLabel:()=>fl.nx,Snackbar:()=>hl.A,SnackbarContent:()=>gl.A,SpeedDial:()=>Ll,SpeedDialAction:()=>$l,SpeedDialIcon:()=>Zl,Stack:()=>Yl.A,Step:()=>Jl.A,StepButton:()=>sc,StepConnector:()=>lc.A,StepContent:()=>mc,StepContext:()=>ec.A,StepIcon:()=>gc.A,StepLabel:()=>tc.A,Stepper:()=>bc.A,StepperContext:()=>rc.A,StyledEngineProvider:()=>q.A,SvgIcon:()=>xc.A,SwipeableDrawer:()=>jc,Switch:()=>Uc.A,THEME_ID:()=>C.A,Tab:()=>Vc.A,TabScrollButton:()=>wu.A,Table:()=>Hc.A,TableBody:()=>qc.A,TableCell:()=>Zc.A,TableContainer:()=>Kc.A,TableFooter:()=>au,TableHead:()=>su.A,TablePagination:()=>cu.A,TableRow:()=>du.A,TableSortLabel:()=>bu,Tabs:()=>_u.A,TextField:()=>Su.A,TextareaAutosize:()=>Eu.A,ThemeProvider:()=>W.A,ToggleButton:()=>Nu,ToggleButtonGroup:()=>Uu,Toolbar:()=>$u.A,Tooltip:()=>Dl.A,Typography:()=>Ht.A,Unstable_Grid2:()=>Zo,Unstable_TrapFocus:()=>Ku.A,Zoom:()=>Sl,accordionActionsClasses:()=>Qe,accordionClasses:()=>We.A,accordionDetailsClasses:()=>ot.A,accordionSummaryClasses:()=>at.A,adaptV4Theme:()=>P,alertClasses:()=>lt.A,alertTitleClasses:()=>ut.A,alpha:()=>O.X4,appBarClasses:()=>ht,autocompleteClasses:()=>xt.A,avatarClasses:()=>At.A,avatarGroupClasses:()=>Ct.A,backdropClasses:()=>Tt.A,badgeClasses:()=>kt.A,bottomNavigationActionClasses:()=>Ft,bottomNavigationClasses:()=>Rt,boxClasses:()=>Vt.A,breadcrumbsClasses:()=>Qt,buttonBaseClasses:()=>lr.A,buttonClasses:()=>sr.A,buttonGroupClasses:()=>fr,capitalize:()=>Ge.capitalize,cardActionAreaClasses:()=>Sr,cardActionsClasses:()=>Mr,cardClasses:()=>br,cardContentClasses:()=>Dr,cardHeaderClasses:()=>jr,cardMediaClasses:()=>Xr,checkboxClasses:()=>rn.A,chipClasses:()=>on.A,circularProgressClasses:()=>sn.A,collapseClasses:()=>un.A,colors:()=>n,containerClasses:()=>pn,createChainedFunction:()=>Ge.createChainedFunction,createFilterOptions:()=>_t.Z,createMuiTheme:()=>D.D,createStyles:()=>B,createSvgIcon:()=>Ge.createSvgIcon,createTheme:()=>D.A,css:()=>L.AH,darkScrollbar:()=>gn,darken:()=>O.e$,debounce:()=>Ge.debounce,decomposeColor:()=>O.rP,deprecatedPropType:()=>Ge.deprecatedPropType,dialogActionsClasses:()=>_n.A,dialogClasses:()=>vn.A,dialogContentClasses:()=>wn.A,dialogContentTextClasses:()=>Sn.A,dialogTitleClasses:()=>En.A,dividerClasses:()=>In.A,drawerClasses:()=>Ln,duration:()=>$.p0,easing:()=>$.cz,emphasize:()=>O.tL,experimentalStyled:()=>H.Ay,experimental_extendTheme:()=>ke,experimental_sx:()=>Ve,fabClasses:()=>Wn,filledInputClasses:()=>Jn.A,formControlClasses:()=>to.A,formControlLabelClasses:()=>no.A,formGroupClasses:()=>io.A,formHelperTextClasses:()=>so.A,formLabelClasses:()=>co.A,generateUtilityClass:()=>Ke.Ay,generateUtilityClasses:()=>Ye.A,getAccordionActionsUtilityClass:()=>Je,getAccordionDetailsUtilityClass:()=>ot.n,getAccordionSummaryUtilityClass:()=>at.T,getAccordionUtilityClass:()=>We.d,getAlertTitleUtilityClass:()=>ut.x,getAlertUtilityClass:()=>lt.X,getAppBarUtilityClass:()=>pt,getAutocompleteUtilityClass:()=>xt.r,getAvatarGroupUtilityClass:()=>Ct.n,getAvatarUtilityClass:()=>At.k,getBackdropUtilityClass:()=>Tt.R,getBadgeUtilityClass:()=>kt.w,getBottomNavigationActionUtilityClass:()=>Nt,getBottomNavigationUtilityClass:()=>Mt,getBreadcrumbsUtilityClass:()=>Jt,getButtonBaseUtilityClass:()=>lr.W,getButtonGroupUtilityClass:()=>dr,getButtonUtilityClass:()=>sr.B,getCardActionAreaUtilityClass:()=>Ar,getCardActionsUtilityClass:()=>kr,getCardContentUtilityClass:()=>Lr,getCardHeaderUtilityClass:()=>Br,getCardMediaUtilityClass:()=>qr,getCardUtilityClass:()=>vr,getCheckboxUtilityClass:()=>rn.w,getChipUtilityClass:()=>on.f,getCircularProgressUtilityClass:()=>sn.b,getCollapseUtilityClass:()=>un.E,getContainerUtilityClass:()=>fn,getContrastRatio:()=>O.eM,getDialogActionsUtilityClass:()=>_n.C,getDialogContentTextUtilityClass:()=>Sn.D,getDialogContentUtilityClass:()=>wn.E,getDialogTitleUtilityClass:()=>En.t,getDialogUtilityClass:()=>vn.f,getDividerUtilityClass:()=>In.K,getDrawerUtilityClass:()=>On,getFabUtilityClass:()=>Hn,getFilledInputUtilityClass:()=>Jn.N,getFormControlLabelUtilityClasses:()=>no.u,getFormControlUtilityClasses:()=>to.c,getFormGroupUtilityClass:()=>io.c,getFormHelperTextUtilityClasses:()=>so.h,getFormLabelUtilityClasses:()=>co.Z,getGrid2UtilityClass:()=>Yo,getGridUtilityClass:()=>ho,getIconButtonUtilityClass:()=>xi.G,getIconUtilityClass:()=>hi,getImageListItemBarUtilityClass:()=>Ni,getImageListItemUtilityClass:()=>Mi,getImageListUtilityClass:()=>wi,getInitColorSchemeScript:()=>Ue,getInputAdornmentUtilityClass:()=>Xi.P,getInputBaseUtilityClass:()=>Yi.g,getInputLabelUtilityClasses:()=>Ji.R,getInputUtilityClass:()=>Wi.B,getLinearProgressUtilityClass:()=>ea.l,getLinkUtilityClass:()=>na,getListItemAvatarUtilityClass:()=>ga.Z,getListItemButtonUtilityClass:()=>va.Y,getListItemIconUtilityClass:()=>Aa.f,getListItemSecondaryActionClassesUtilityClass:()=>Ca.g,getListItemTextUtilityClass:()=>Ta.b,getListItemUtilityClass:()=>ha._,getListSubheaderUtilityClass:()=>ka.g,getListUtilityClass:()=>fa.H,getLuminance:()=>O.J1,getMenuItemUtilityClass:()=>Oa.Z,getMenuUtilityClass:()=>Ra.e,getMobileStepperUtilityClass:()=>Na,getModalUtilityClass:()=>Ha.M,getNativeSelectUtilityClasses:()=>Za.w,getOffsetLeft:()=>ks.fB,getOffsetTop:()=>ks.Dy,getOutlinedInputUtilityClass:()=>os.v,getOverlayAlpha:()=>_e.A,getPaginationItemUtilityClass:()=>us,getPaginationUtilityClass:()=>is,getPaperUtilityClass:()=>Is.j,getPopoverUtilityClass:()=>Ms.K,getPopperUtilityClass:()=>Ps.b,getRadioGroupUtilityClass:()=>zs.B,getRadioUtilityClass:()=>Ds.q,getRatingUtilityClass:()=>Hs,getScopedCssBaselineUtilityClass:()=>sl.r,getSelectUtilityClasses:()=>cl.T,getSkeletonUtilityClass:()=>dl.E,getSliderUtilityClass:()=>pl.W,getSnackbarContentUtilityClass:()=>yl.d,getSnackbarUtilityClass:()=>ml.W,getSpeedDialActionUtilityClass:()=>Nl,getSpeedDialIconUtilityClass:()=>Gl,getSpeedDialUtilityClass:()=>Cl,getStepButtonUtilityClass:()=>nc,getStepConnectorUtilityClass:()=>cc.G,getStepContentUtilityClass:()=>uc,getStepIconUtilityClass:()=>yc.K,getStepLabelUtilityClass:()=>vc.p,getStepUtilityClass:()=>Ql.L,getStepperUtilityClass:()=>_c.g,getSvgIconUtilityClass:()=>wc.E,getSwitchUtilityClass:()=>$c.n,getTabScrollButtonUtilityClass:()=>Au.T,getTabUtilityClass:()=>Gc.s,getTableBodyUtilityClass:()=>Xc.b,getTableCellUtilityClass:()=>Yc.r,getTableContainerUtilityClass:()=>Jc.I,getTableFooterUtilityClass:()=>eu,getTableHeadUtilityClass:()=>lu.X,getTablePaginationUtilityClass:()=>uu.B,getTableRowUtilityClass:()=>fu.r,getTableSortLabelUtilityClass:()=>hu,getTableUtilityClass:()=>Wc.l,getTabsUtilityClass:()=>xu.H,getTextFieldUtilityClass:()=>Cu._,getToggleButtonGroupUtilityClass:()=>Fu,getToggleButtonUtilityClass:()=>Iu,getToolbarUtilityClass:()=>Vu.U,getTooltipUtilityClass:()=>Gu.E,getTouchRippleUtilityClass:()=>cr.O,getTypographyUtilityClass:()=>Hu.y,grid2Classes:()=>Jo,gridClasses:()=>go,hexToRgb:()=>O.E2,hslToRgb:()=>O.YL,iconButtonClasses:()=>xi.A,iconClasses:()=>mi,imageListClasses:()=>Ai,imageListItemBarClasses:()=>Fi,imageListItemClasses:()=>Ri,inputAdornmentClasses:()=>Xi.A,inputBaseClasses:()=>Yi.A,inputClasses:()=>Wi.A,inputLabelClasses:()=>Ji.A,isMuiElement:()=>Ge.isMuiElement,keyframes:()=>L.i7,lighten:()=>O.a,linearProgressClasses:()=>ea.A,linkClasses:()=>oa,listClasses:()=>fa.A,listItemAvatarClasses:()=>ga.A,listItemButtonClasses:()=>va.A,listItemClasses:()=>ha.A,listItemIconClasses:()=>Aa.A,listItemSecondaryActionClasses:()=>Ca.A,listItemTextClasses:()=>Ta.A,listSubheaderClasses:()=>ka.A,major:()=>Qu,makeStyles:()=>X,menuClasses:()=>Ra.A,menuItemClasses:()=>Oa.A,minor:()=>ed,mobileStepperClasses:()=>Fa,modalClasses:()=>Ha.A,nativeSelectClasses:()=>Za.A,outlinedInputClasses:()=>os.A,ownerDocument:()=>Ge.ownerDocument,ownerWindow:()=>Ge.ownerWindow,paginationClasses:()=>as,paginationItemClasses:()=>ds,paperClasses:()=>Is.A,patch:()=>td,popoverClasses:()=>Ms.A,preReleaseLabel:()=>rd,preReleaseNumber:()=>nd,private_createMixins:()=>$e.A,private_createTypography:()=>Me.A,private_excludeVariablesFromRoot:()=>Re,radioClasses:()=>Ds.A,radioGroupClasses:()=>zs.A,ratingClasses:()=>Ws,recomposeColor:()=>O.X0,requirePropFactory:()=>Ge.requirePropFactory,responsiveFontSizes:()=>U.A,rgbToHex:()=>O.Ob,scopedCssBaselineClasses:()=>sl.A,selectClasses:()=>cl.A,setRef:()=>Ge.setRef,shouldSkipGeneratingVar:()=>be,skeletonClasses:()=>dl.A,sliderClasses:()=>pl.A,snackbarClasses:()=>ml.A,snackbarContentClasses:()=>yl.A,speedDialActionClasses:()=>Fl,speedDialClasses:()=>El,speedDialIconClasses:()=>Hl,stackClasses:()=>Kl,stepButtonClasses:()=>oc,stepClasses:()=>Ql.A,stepConnectorClasses:()=>cc.A,stepContentClasses:()=>dc,stepIconClasses:()=>yc.A,stepLabelClasses:()=>vc.A,stepperClasses:()=>_c.A,styled:()=>H.Ay,svgIconClasses:()=>wc.A,switchClasses:()=>$c.A,tabClasses:()=>Gc.A,tabScrollButtonClasses:()=>Au.A,tableBodyClasses:()=>Xc.A,tableCellClasses:()=>Yc.A,tableClasses:()=>Wc.A,tableContainerClasses:()=>Jc.A,tableFooterClasses:()=>tu,tableHeadClasses:()=>lu.A,tablePaginationClasses:()=>uu.A,tableRowClasses:()=>fu.A,tableSortLabelClasses:()=>mu,tabsClasses:()=>xu.A,textFieldClasses:()=>Cu.A,toggleButtonClasses:()=>ku,toggleButtonGroupClasses:()=>zu,toolbarClasses:()=>Vu.A,tooltipClasses:()=>Gu.A,touchRippleClasses:()=>cr.A,typographyClasses:()=>Hu.A,unstable_ClassNameGenerator:()=>Ge.unstable_ClassNameGenerator,unstable_composeClasses:()=>Xe.A,unstable_createMuiStrictModeTheme:()=>F,unstable_getUnit:()=>j.l_,unstable_toUnitless:()=>j.db,unstable_useEnhancedEffect:()=>Ge.unstable_useEnhancedEffect,unstable_useId:()=>Ge.unstable_useId,unsupportedProp:()=>Ge.unsupportedProp,useAutocomplete:()=>_t.A,useColorScheme:()=>Be,useControlled:()=>Ge.useControlled,useEventCallback:()=>Ge.useEventCallback,useForkRef:()=>Ge.useForkRef,useFormControl:()=>eo.A,useIsFocusVisible:()=>Ge.useIsFocusVisible,useMediaQuery:()=>ri.A,usePagination:()=>cs,useRadioGroup:()=>Fs.A,useScrollTrigger:()=>Zu,useStepContext:()=>ec.P,useStepperContext:()=>rc.s,useTheme:()=>V.A,useThemeProps:()=>G.A,version:()=>Ju,withStyles:()=>Z,withTheme:()=>Y});var n={};r.r(n),r.d(n,{amber:()=>v,blue:()=>u.A,blueGrey:()=>A,brown:()=>x,common:()=>o.A,cyan:()=>f,deepOrange:()=>_,deepPurple:()=>l,green:()=>h.A,grey:()=>w.A,indigo:()=>c,lightBlue:()=>d.A,lightGreen:()=>m,lime:()=>g,orange:()=>b.A,pink:()=>a,purple:()=>s.A,red:()=>i.A,teal:()=>p,yellow:()=>y});var o=r("H00D"),i=r("0XHX");const a={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"};var s=r("iIhR");const l={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"},c={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"};var u=r("UG0H"),d=r("8jZn");const f={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},p={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"};var h=r("at7f");const m={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},g={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},y={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"},v={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"};var b=r("A1Zn");const _={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},x={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"};var w=r("Xxcx");const A={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"};var S=r("KRkT"),C=r("WTO6"),E=r("+9dH"),T=r("Nlia"),I=r("EIBS"),k=r("s8X4");const M=["defaultProps","mixins","overrides","palette","props","styleOverrides"],R=["type","mode"];function P(e){const{defaultProps:t={},mixins:r={},overrides:n={},palette:o={},props:i={},styleOverrides:a={}}=e,s=(0,T.A)(e,M),l=(0,E.A)({},s,{components:{}});Object.keys(t).forEach((e=>{const r=l.components[e]||{};r.defaultProps=t[e],l.components[e]=r})),Object.keys(i).forEach((e=>{const t=l.components[e]||{};t.defaultProps=i[e],l.components[e]=t})),Object.keys(a).forEach((e=>{const t=l.components[e]||{};t.styleOverrides=a[e],l.components[e]=t})),Object.keys(n).forEach((e=>{const t=l.components[e]||{};t.styleOverrides=n[e],l.components[e]=t})),l.spacing=(0,I.A)(e.spacing);const c=(0,k.A)(e.breakpoints||{}),u=l.spacing;l.mixins=(0,E.A)({gutters:(e={})=>(0,E.A)({paddingLeft:u(2),paddingRight:u(2)},e,{[c.up("sm")]:(0,E.A)({paddingLeft:u(3),paddingRight:u(3)},e[c.up("sm")])})},r);const{type:d,mode:f}=o,p=(0,T.A)(o,R),h=f||d||"light";return l.palette=(0,E.A)({text:{hint:"dark"===h?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:h,type:h},p),l}var O=r("2Qr1"),L=r("AeFk"),D=r("BlEZ"),N=r("w9Qe");function F(e,...t){return(0,D.A)((0,N.A)({unstable_strictMode:!0},e),...t)}let z=!1;function B(e){return z||(console.warn(["MUI: createStyles from @mui/material/styles is deprecated.","Please use @mui/styles/createStyles"].join("\n")),z=!0),e}var j=r("qn7V"),U=r("ThEv"),$=r("hqVE"),V=r("UnQg"),G=r("tCRK"),H=r("Vn7y"),W=r("b4iY"),q=r("WfXV");function X(){throw new Error((0,S.A)(14))}function Z(){throw new Error((0,S.A)(15))}function Y(){throw new Error((0,S.A)(16))}var K=r("q1tI"),J=r("2TcN"),Q=r("CZYX"),ee=r("hWdM"),te=r("nKUr");const re="mode",ne="color-scheme",oe="data-color-scheme";function ie(e){if("undefined"!=typeof window&&"system"===e)return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ae(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function se(e,t){if("undefined"==typeof window)return;let r;try{r=localStorage.getItem(e)||void 0,r||localStorage.setItem(e,t)}catch(e){}return r||t}const le=["colorSchemes","components","generateCssVars","cssVarPrefix"];var ce=r("xTOY");function ue(e=""){function t(...r){if(!r.length)return"";const n=r[0];return"string"!=typeof n||n.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${n}`:`, var(--${e?`${e}-`:""}${n}${t(...r.slice(1))})`}return(r,...n)=>`var(--${e?`${e}-`:""}${r}${t(...n)})`}var de=r("vQ/N");const fe=(e,t,r,n=[])=>{let o=e;t.forEach(((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=r:o&&"object"==typeof o&&(o[e]=r):o&&"object"==typeof o&&(o[e]||(o[e]=n.includes(e)?[]:{}),o=o[e])}))},pe=(e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t)))||e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:`${t}px`:t;function he(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},i={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||n&&n(e,t))){const n=`--${r?`${r}-`:""}${e.join("-")}`;Object.assign(o,{[n]:pe(e,t)}),fe(i,e,`var(${n})`,s),fe(a,e,`var(${n}, ${t})`,s)}},l=e=>"vars"===e[0],function e(t,r=[],n=[]){Object.entries(t).forEach((([t,o])=>{(!l||l&&!l([...r,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...r,t],Array.isArray(o)?[...n,t]:n):s([...r,t],o,n))}))}(e),{css:o,vars:i,varsWithDefaults:a}}const me=["colorSchemes","components","defaultColorScheme"],ge=function(e,t){const{colorSchemes:r={},defaultColorScheme:n="light"}=e,o=(0,T.A)(e,me),{vars:i,css:a,varsWithDefaults:s}=he(o,t);let l=s;const c={},{[n]:u}=r,d=(0,T.A)(r,[n].map(de.A));if(Object.entries(d||{}).forEach((([e,r])=>{const{vars:n,css:o,varsWithDefaults:i}=he(r,t);l=(0,N.A)(l,i),c[e]={css:o,vars:n}})),u){const{css:e,vars:r,varsWithDefaults:o}=he(u,t);l=(0,N.A)(l,o),c[n]={css:e,vars:r}}return{vars:l,generateCssVars:e=>{var r;if(!e){var n;const r=(0,E.A)({},a);return{css:r,vars:i,selector:(null==t||null==(n=t.getSelector)?void 0:n.call(t,e,r))||":root"}}const o=(0,E.A)({},c[e].css);return{css:o,vars:c[e].vars,selector:(null==t||null==(r=t.getSelector)?void 0:r.call(t,e,o))||":root"}}}};var ye=r("9k3N"),ve=r("dcYk");function be(e){var t;return!!e[0].match(/(cssVarPrefix|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!(null==(t=e[1])||!t.match(/(mode|contrastThreshold|tonalOffset)/))}var _e=r("UwZ0");const xe=["colorSchemes","cssVarPrefix","shouldSkipGeneratingVar"],we=["palette"],Ae=[...Array(25)].map(((e,t)=>{if(0===t)return;const r=(0,_e.A)(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`}));function Se(e,t,r){!e[t]&&r&&(e[t]=r)}function Ce(e){return e&&e.startsWith("hsl")?(0,ve.YL)(e):e}function Ee(e,t){`${t}Channel`in e||(e[`${t}Channel`]=(0,ve.Me)(Ce(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}const Te=e=>{try{return e()}catch(e){}},Ie=(e="mui")=>ue(e);function ke(e={},...t){var r,n,o,i,a,s;const{colorSchemes:l={},cssVarPrefix:c="mui",shouldSkipGeneratingVar:u=be}=e,d=(0,T.A)(e,xe),f=Ie(c),p=(0,D.A)((0,E.A)({},d,l.light&&{palette:null==(r=l.light)?void 0:r.palette})),{palette:h}=p,m=(0,T.A)(p,we),{palette:g}=(0,D.A)({palette:(0,E.A)({mode:"dark"},null==(n=l.dark)?void 0:n.palette)});let y=(0,E.A)({},m,{cssVarPrefix:c,getCssVar:f,colorSchemes:(0,E.A)({},l,{light:(0,E.A)({},l.light,{palette:h,opacity:(0,E.A)({inputPlaceholder:.42,inputUnderline:.42,switchTrackDisabled:.12,switchTrack:.38},null==(o=l.light)?void 0:o.opacity),overlays:(null==(i=l.light)?void 0:i.overlays)||[]}),dark:(0,E.A)({},l.dark,{palette:g,opacity:(0,E.A)({inputPlaceholder:.5,inputUnderline:.7,switchTrackDisabled:.2,switchTrack:.3},null==(a=l.dark)?void 0:a.opacity),overlays:(null==(s=l.dark)?void 0:s.overlays)||Ae})})});Object.keys(y.colorSchemes).forEach((e=>{const t=y.colorSchemes[e].palette,r=e=>{const r=e.split("-"),n=r[1],o=r[2];return f(e,t[n][o])};var n;if("light"===e?(Se(t.common,"background","#fff"),Se(t.common,"onBackground","#000")):(Se(t.common,"background","#000"),Se(t.common,"onBackground","#fff")),n=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach((e=>{n[e]||(n[e]={})})),"light"===e){Se(t.Alert,"errorColor",(0,ve.Nd)(t.error.light,.6)),Se(t.Alert,"infoColor",(0,ve.Nd)(t.info.light,.6)),Se(t.Alert,"successColor",(0,ve.Nd)(t.success.light,.6)),Se(t.Alert,"warningColor",(0,ve.Nd)(t.warning.light,.6)),Se(t.Alert,"errorFilledBg",r("palette-error-main")),Se(t.Alert,"infoFilledBg",r("palette-info-main")),Se(t.Alert,"successFilledBg",r("palette-success-main")),Se(t.Alert,"warningFilledBg",r("palette-warning-main")),Se(t.Alert,"errorFilledColor",Te((()=>h.getContrastText(t.error.main)))),Se(t.Alert,"infoFilledColor",Te((()=>h.getContrastText(t.info.main)))),Se(t.Alert,"successFilledColor",Te((()=>h.getContrastText(t.success.main)))),Se(t.Alert,"warningFilledColor",Te((()=>h.getContrastText(t.warning.main)))),Se(t.Alert,"errorStandardBg",(0,ve.j4)(t.error.light,.9)),Se(t.Alert,"infoStandardBg",(0,ve.j4)(t.info.light,.9)),Se(t.Alert,"successStandardBg",(0,ve.j4)(t.success.light,.9)),Se(t.Alert,"warningStandardBg",(0,ve.j4)(t.warning.light,.9)),Se(t.Alert,"errorIconColor",r("palette-error-main")),Se(t.Alert,"infoIconColor",r("palette-info-main")),Se(t.Alert,"successIconColor",r("palette-success-main")),Se(t.Alert,"warningIconColor",r("palette-warning-main")),Se(t.AppBar,"defaultBg",r("palette-grey-100")),Se(t.Avatar,"defaultBg",r("palette-grey-400")),Se(t.Button,"inheritContainedBg",r("palette-grey-300")),Se(t.Button,"inheritContainedHoverBg",r("palette-grey-A100")),Se(t.Chip,"defaultBorder",r("palette-grey-400")),Se(t.Chip,"defaultAvatarColor",r("palette-grey-700")),Se(t.Chip,"defaultIconColor",r("palette-grey-700")),Se(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Se(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Se(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Se(t.LinearProgress,"primaryBg",(0,ve.j4)(t.primary.main,.62)),Se(t.LinearProgress,"secondaryBg",(0,ve.j4)(t.secondary.main,.62)),Se(t.LinearProgress,"errorBg",(0,ve.j4)(t.error.main,.62)),Se(t.LinearProgress,"infoBg",(0,ve.j4)(t.info.main,.62)),Se(t.LinearProgress,"successBg",(0,ve.j4)(t.success.main,.62)),Se(t.LinearProgress,"warningBg",(0,ve.j4)(t.warning.main,.62)),Se(t.Skeleton,"bg",`rgba(${r("palette-text-primaryChannel")} / 0.11)`),Se(t.Slider,"primaryTrack",(0,ve.j4)(t.primary.main,.62)),Se(t.Slider,"secondaryTrack",(0,ve.j4)(t.secondary.main,.62)),Se(t.Slider,"errorTrack",(0,ve.j4)(t.error.main,.62)),Se(t.Slider,"infoTrack",(0,ve.j4)(t.info.main,.62)),Se(t.Slider,"successTrack",(0,ve.j4)(t.success.main,.62)),Se(t.Slider,"warningTrack",(0,ve.j4)(t.warning.main,.62));const e=(0,ve.Y9)(t.background.default,.8);Se(t.SnackbarContent,"bg",e),Se(t.SnackbarContent,"color",Te((()=>h.getContrastText(e)))),Se(t.SpeedDialAction,"fabHoverBg",(0,ve.Y9)(t.background.paper,.15)),Se(t.StepConnector,"border",r("palette-grey-400")),Se(t.StepContent,"border",r("palette-grey-400")),Se(t.Switch,"defaultColor",r("palette-common-white")),Se(t.Switch,"defaultDisabledColor",r("palette-grey-100")),Se(t.Switch,"primaryDisabledColor",(0,ve.j4)(t.primary.main,.62)),Se(t.Switch,"secondaryDisabledColor",(0,ve.j4)(t.secondary.main,.62)),Se(t.Switch,"errorDisabledColor",(0,ve.j4)(t.error.main,.62)),Se(t.Switch,"infoDisabledColor",(0,ve.j4)(t.info.main,.62)),Se(t.Switch,"successDisabledColor",(0,ve.j4)(t.success.main,.62)),Se(t.Switch,"warningDisabledColor",(0,ve.j4)(t.warning.main,.62)),Se(t.TableCell,"border",(0,ve.j4)((0,ve.Cg)(t.divider,1),.88)),Se(t.Tooltip,"bg",(0,ve.Cg)(t.grey[700],.92))}else{Se(t.Alert,"errorColor",(0,ve.j4)(t.error.light,.6)),Se(t.Alert,"infoColor",(0,ve.j4)(t.info.light,.6)),Se(t.Alert,"successColor",(0,ve.j4)(t.success.light,.6)),Se(t.Alert,"warningColor",(0,ve.j4)(t.warning.light,.6)),Se(t.Alert,"errorFilledBg",r("palette-error-dark")),Se(t.Alert,"infoFilledBg",r("palette-info-dark")),Se(t.Alert,"successFilledBg",r("palette-success-dark")),Se(t.Alert,"warningFilledBg",r("palette-warning-dark")),Se(t.Alert,"errorFilledColor",Te((()=>g.getContrastText(t.error.dark)))),Se(t.Alert,"infoFilledColor",Te((()=>g.getContrastText(t.info.dark)))),Se(t.Alert,"successFilledColor",Te((()=>g.getContrastText(t.success.dark)))),Se(t.Alert,"warningFilledColor",Te((()=>g.getContrastText(t.warning.dark)))),Se(t.Alert,"errorStandardBg",(0,ve.Nd)(t.error.light,.9)),Se(t.Alert,"infoStandardBg",(0,ve.Nd)(t.info.light,.9)),Se(t.Alert,"successStandardBg",(0,ve.Nd)(t.success.light,.9)),Se(t.Alert,"warningStandardBg",(0,ve.Nd)(t.warning.light,.9)),Se(t.Alert,"errorIconColor",r("palette-error-main")),Se(t.Alert,"infoIconColor",r("palette-info-main")),Se(t.Alert,"successIconColor",r("palette-success-main")),Se(t.Alert,"warningIconColor",r("palette-warning-main")),Se(t.AppBar,"defaultBg",r("palette-grey-900")),Se(t.AppBar,"darkBg",r("palette-background-paper")),Se(t.AppBar,"darkColor",r("palette-text-primary")),Se(t.Avatar,"defaultBg",r("palette-grey-600")),Se(t.Button,"inheritContainedBg",r("palette-grey-800")),Se(t.Button,"inheritContainedHoverBg",r("palette-grey-700")),Se(t.Chip,"defaultBorder",r("palette-grey-700")),Se(t.Chip,"defaultAvatarColor",r("palette-grey-300")),Se(t.Chip,"defaultIconColor",r("palette-grey-300")),Se(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Se(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Se(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Se(t.LinearProgress,"primaryBg",(0,ve.Nd)(t.primary.main,.5)),Se(t.LinearProgress,"secondaryBg",(0,ve.Nd)(t.secondary.main,.5)),Se(t.LinearProgress,"errorBg",(0,ve.Nd)(t.error.main,.5)),Se(t.LinearProgress,"infoBg",(0,ve.Nd)(t.info.main,.5)),Se(t.LinearProgress,"successBg",(0,ve.Nd)(t.success.main,.5)),Se(t.LinearProgress,"warningBg",(0,ve.Nd)(t.warning.main,.5)),Se(t.Skeleton,"bg",`rgba(${r("palette-text-primaryChannel")} / 0.13)`),Se(t.Slider,"primaryTrack",(0,ve.Nd)(t.primary.main,.5)),Se(t.Slider,"secondaryTrack",(0,ve.Nd)(t.secondary.main,.5)),Se(t.Slider,"errorTrack",(0,ve.Nd)(t.error.main,.5)),Se(t.Slider,"infoTrack",(0,ve.Nd)(t.info.main,.5)),Se(t.Slider,"successTrack",(0,ve.Nd)(t.success.main,.5)),Se(t.Slider,"warningTrack",(0,ve.Nd)(t.warning.main,.5));const e=(0,ve.Y9)(t.background.default,.98);Se(t.SnackbarContent,"bg",e),Se(t.SnackbarContent,"color",Te((()=>g.getContrastText(e)))),Se(t.SpeedDialAction,"fabHoverBg",(0,ve.Y9)(t.background.paper,.15)),Se(t.StepConnector,"border",r("palette-grey-600")),Se(t.StepContent,"border",r("palette-grey-600")),Se(t.Switch,"defaultColor",r("palette-grey-300")),Se(t.Switch,"defaultDisabledColor",r("palette-grey-600")),Se(t.Switch,"primaryDisabledColor",(0,ve.Nd)(t.primary.main,.55)),Se(t.Switch,"secondaryDisabledColor",(0,ve.Nd)(t.secondary.main,.55)),Se(t.Switch,"errorDisabledColor",(0,ve.Nd)(t.error.main,.55)),Se(t.Switch,"infoDisabledColor",(0,ve.Nd)(t.info.main,.55)),Se(t.Switch,"successDisabledColor",(0,ve.Nd)(t.success.main,.55)),Se(t.Switch,"warningDisabledColor",(0,ve.Nd)(t.warning.main,.55)),Se(t.TableCell,"border",(0,ve.Nd)((0,ve.Cg)(t.divider,1),.68)),Se(t.Tooltip,"bg",(0,ve.Cg)(t.grey[700],.92))}Ee(t.background,"default"),Ee(t.background,"paper"),Ee(t.common,"background"),Ee(t.common,"onBackground"),Ee(t,"divider"),Object.keys(t).forEach((e=>{const r=t[e];r&&"object"==typeof r&&(r.main&&Se(t[e],"mainChannel",(0,ve.Me)(Ce(r.main))),r.light&&Se(t[e],"lightChannel",(0,ve.Me)(Ce(r.light))),r.dark&&Se(t[e],"darkChannel",(0,ve.Me)(Ce(r.dark))),r.contrastText&&Se(t[e],"contrastTextChannel",(0,ve.Me)(Ce(r.contrastText))),"text"===e&&(Ee(t[e],"primary"),Ee(t[e],"secondary")),"action"===e&&(r.active&&Ee(t[e],"active"),r.selected&&Ee(t[e],"selected")))}))})),y=t.reduce(((e,t)=>(0,N.A)(e,t)),y);const v={prefix:c,shouldSkipGeneratingVar:u},{vars:b,generateCssVars:_}=ge(y,v);return y.vars=b,y.generateCssVars=_,y.shouldSkipGeneratingVar=u,y.unstable_sxConfig=(0,E.A)({},ye.A,null==d?void 0:d.unstable_sxConfig),y.unstable_sx=function(e){return(0,ce.A)({sx:e,theme:this})},y}var Me=r("MHkX");const Re=e=>[...[...Array(24)].map(((t,r)=>`--${e?`${e}-`:""}overlays-${r+1}`)),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Pe="data-mui-color-scheme",Oe="mui-color-scheme",Le="light",De="dark",Ne="mui-mode",Fe=ke(),{CssVarsProvider:ze,useColorScheme:Be,getInitColorSchemeScript:je}=function(e){const{themeId:t,theme:r={},attribute:n=oe,modeStorageKey:o=re,colorSchemeStorageKey:i=ne,defaultMode:a="light",defaultColorScheme:s,disableTransitionOnChange:l=!1,resolveTheme:c,excludeVariablesFromRoot:u}=e;(!r.colorSchemes||"string"==typeof s&&!r.colorSchemes[s]||"object"==typeof s&&!r.colorSchemes[null==s?void 0:s.light]||"object"==typeof s&&!r.colorSchemes[null==s?void 0:s.dark])&&console.error(`MUI: \`${s}\` does not exist in \`theme.colorSchemes\`.`);const d=K.createContext(void 0),f="string"==typeof s?s:s.light,p="string"==typeof s?s:s.dark;return{CssVarsProvider:function(e){const{children:f,theme:p=r,modeStorageKey:h=o,colorSchemeStorageKey:m=i,attribute:g=n,defaultMode:y=a,defaultColorScheme:v=s,disableTransitionOnChange:b=l,storageWindow:_=("undefined"==typeof window?void 0:window),documentNode:x=("undefined"==typeof document?void 0:document),colorSchemeNode:w=("undefined"==typeof document?void 0:document.documentElement),colorSchemeSelector:A=":root",disableNestedContext:S=!1,disableStyleSheetGeneration:C=!1}=e,I=K.useRef(!1),k=(0,Q.A)(),M=K.useContext(d),R=!!M&&!S,P=p[t],O=P||p,{colorSchemes:L={},components:D={},generateCssVars:F=()=>({vars:{},css:{}}),cssVarPrefix:z}=O,B=(0,T.A)(O,le),j=Object.keys(L),U="string"==typeof v?v:v.light,$="string"==typeof v?v:v.dark,{mode:V,setMode:G,systemMode:H,lightColorScheme:W,darkColorScheme:q,colorScheme:X,setColorScheme:Z}=function(e){const{defaultMode:t="light",defaultLightColorScheme:r,defaultDarkColorScheme:n,supportedColorSchemes:o=[],modeStorageKey:i=re,colorSchemeStorageKey:a=ne,storageWindow:s=("undefined"==typeof window?void 0:window)}=e,l=o.join(","),[c,u]=K.useState((()=>{const e=se(i,t),o=se(`${a}-light`,r),s=se(`${a}-dark`,n);return{mode:e,systemMode:ie(e),lightColorScheme:o,darkColorScheme:s}})),d=function(e){return ae(e,(t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0))}(c),f=K.useCallback((e=>{u((r=>{if(e===r.mode)return r;const n=null!=e?e:t;try{localStorage.setItem(i,n)}catch(e){}return(0,E.A)({},r,{mode:n,systemMode:ie(n)})}))}),[i,t]),p=K.useCallback((e=>{e?"string"==typeof e?e&&!l.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):u((t=>{const r=(0,E.A)({},t);return ae(t,(t=>{try{localStorage.setItem(`${a}-${t}`,e)}catch(e){}"light"===t&&(r.lightColorScheme=e),"dark"===t&&(r.darkColorScheme=e)})),r})):u((t=>{const o=(0,E.A)({},t),i=null===e.light?r:e.light,s=null===e.dark?n:e.dark;if(i)if(l.includes(i)){o.lightColorScheme=i;try{localStorage.setItem(`${a}-light`,i)}catch(e){}}else console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`);if(s)if(l.includes(s)){o.darkColorScheme=s;try{localStorage.setItem(`${a}-dark`,s)}catch(e){}}else console.error(`\`${s}\` does not exist in \`theme.colorSchemes\`.`);return o})):u((e=>{try{localStorage.setItem(`${a}-light`,r),localStorage.setItem(`${a}-dark`,n)}catch(e){}return(0,E.A)({},e,{lightColorScheme:r,darkColorScheme:n})}))}),[l,a,r,n]),h=K.useCallback((e=>{"system"===c.mode&&u((t=>{const r=null!=e&&e.matches?"dark":"light";return t.systemMode===r?t:(0,E.A)({},t,{systemMode:r})}))}),[c.mode]),m=K.useRef(h);return m.current=h,K.useEffect((()=>{const e=(...e)=>m.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}}),[]),K.useEffect((()=>{if(s){const e=e=>{const r=e.newValue;"string"!=typeof e.key||!e.key.startsWith(a)||r&&!l.match(r)||(e.key.endsWith("light")&&p({light:r}),e.key.endsWith("dark")&&p({dark:r})),e.key!==i||r&&!["light","dark","system"].includes(r)||f(r||t)};return s.addEventListener("storage",e),()=>{s.removeEventListener("storage",e)}}}),[p,f,i,a,l,t,s]),(0,E.A)({},c,{colorScheme:d,setMode:f,setColorScheme:p})}({supportedColorSchemes:j,defaultLightColorScheme:U,defaultDarkColorScheme:$,modeStorageKey:h,colorSchemeStorageKey:m,defaultMode:y,storageWindow:_});let Y=V,oe=X;R&&(Y=M.mode,oe=M.colorScheme);const ce=oe||("dark"===(Y||("system"===y?a:y))?$:U),{css:ue,vars:de}=F(),fe=(0,E.A)({},B,{components:D,colorSchemes:L,cssVarPrefix:z,vars:de,getColorSchemeSelector:e=>`[${g}="${e}"] &`}),pe={},he={};Object.entries(L).forEach((([e,t])=>{const{css:r,vars:n}=F(e);if(fe.vars=(0,N.A)(fe.vars,n),e===ce&&(Object.keys(t).forEach((e=>{t[e]&&"object"==typeof t[e]?fe[e]=(0,E.A)({},fe[e],t[e]):fe[e]=t[e]})),fe.palette&&(fe.palette.colorScheme=e)),e===("string"==typeof v?v:"dark"===y?v.dark:v.light)){if(u){const t={};u(z).forEach((e=>{t[e]=r[e],delete r[e]})),pe[`[${g}="${e}"]`]=t}pe[`${A}, [${g}="${e}"]`]=r}else he[`${":root"===A?"":A}[${g}="${e}"]`]=r})),fe.vars=(0,N.A)(fe.vars,de),K.useEffect((()=>{oe&&w&&w.setAttribute(g,oe)}),[oe,g,w]),K.useEffect((()=>{let e;if(b&&I.current&&x){const t=x.createElement("style");t.appendChild(x.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),x.head.appendChild(t),window.getComputedStyle(x.body),e=setTimeout((()=>{x.head.removeChild(t)}),1)}return()=>{clearTimeout(e)}}),[oe,b,x]),K.useEffect((()=>(I.current=!0,()=>{I.current=!1})),[]);const me=K.useMemo((()=>({allColorSchemes:j,colorScheme:oe,darkColorScheme:q,lightColorScheme:W,mode:Y,setColorScheme:Z,setMode:G,systemMode:H})),[j,oe,q,W,Y,Z,G,H]);let ge=!0;(C||R&&(null==k?void 0:k.cssVarPrefix)===z)&&(ge=!1);const ye=(0,te.jsxs)(K.Fragment,{children:[ge&&(0,te.jsxs)(K.Fragment,{children:[(0,te.jsx)(J.A,{styles:{[A]:ue}}),(0,te.jsx)(J.A,{styles:pe}),(0,te.jsx)(J.A,{styles:he})]}),(0,te.jsx)(ee.A,{themeId:P?t:void 0,theme:c?c(fe):fe,children:f})]});return R?ye:(0,te.jsx)(d.Provider,{value:me,children:ye})},useColorScheme:()=>{const e=K.useContext(d);if(!e)throw new Error((0,S.A)(19));return e},getInitColorSchemeScript:e=>function(e){const{defaultMode:t="light",defaultLightColorScheme:r="light",defaultDarkColorScheme:n="dark",modeStorageKey:o=re,colorSchemeStorageKey:i=ne,attribute:a=oe,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};return(0,te.jsx)("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?l:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n var mode = localStorage.getItem('${o}') || '${t}';\n var colorScheme = '';\n if (mode === 'system') {\n // handle system mode\n var mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = localStorage.getItem('${i}-dark') || '${n}';\n } else {\n colorScheme = localStorage.getItem('${i}-light') || '${r}';\n }\n }\n if (mode === 'light') {\n colorScheme = localStorage.getItem('${i}-light') || '${r}';\n }\n if (mode === 'dark') {\n colorScheme = localStorage.getItem('${i}-dark') || '${n}';\n }\n if (colorScheme) {\n ${s}.setAttribute('${a}', colorScheme);\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}((0,E.A)({attribute:n,colorSchemeStorageKey:i,defaultMode:a,defaultLightColorScheme:f,defaultDarkColorScheme:p,modeStorageKey:o},e))}}({themeId:C.A,theme:Fe,attribute:Pe,colorSchemeStorageKey:Oe,modeStorageKey:Ne,defaultColorScheme:{light:Le,dark:De},resolveTheme:e=>{const t=(0,E.A)({},e,{typography:(0,Me.A)(e.palette,e.typography)});return t.unstable_sx=function(e){return(0,ce.A)({sx:e,theme:this})},t},excludeVariablesFromRoot:Re}),Ue=je;var $e=r("4lmL");function Ve(){throw new Error((0,S.A)(20))}var Ge=r("dzX4"),He=r("aipG"),We=r("wDxH"),qe=r("juqV"),Xe=r("aGM9"),Ze=r("W9AN"),Ye=r("PYeY"),Ke=r("TkYO");function Je(e){return(0,Ke.Ay)("MuiAccordionActions",e)}const Qe=(0,Ye.A)("MuiAccordionActions",["root","spacing"]),et=["className","disableSpacing"],tt=(0,H.Ay)("div",{name:"MuiAccordionActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",variants:[{props:e=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),rt=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiAccordionActions"}),{className:n,disableSpacing:o=!1}=r,i=(0,T.A)(r,et),a=(0,E.A)({},r,{disableSpacing:o}),s=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,Xe.A)(n,Je,t)})(a);return(0,te.jsx)(tt,(0,E.A)({className:(0,qe.A)(s.root,n),ref:t,ownerState:a},i))}));var nt=r("fQ5S"),ot=r("zD2o"),it=r("1MYv"),at=r("33M2"),st=r("gwor"),lt=r("0g/e"),ct=r("rzlW"),ut=r("SKrR"),dt=r("xeev"),ft=r("G43+");function pt(e){return(0,Ke.Ay)("MuiAppBar",e)}const ht=(0,Ye.A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]),mt=["className","color","enableColorOnDark","position"],gt=(e,t)=>e?`${null==e?void 0:e.replace(")","")}, ${t})`:t,yt=(0,H.Ay)(ft.A,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,dt.A)(r.position)}`],t[`color${(0,dt.A)(r.color)}`]]}})((({theme:e,ownerState:t})=>{const r="light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[900];return(0,E.A)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===t.position&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===t.position&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===t.position&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"static"===t.position&&{position:"static"},"relative"===t.position&&{position:"relative"},!e.vars&&(0,E.A)({},"default"===t.color&&{backgroundColor:r,color:e.palette.getContrastText(r)},t.color&&"default"!==t.color&&"inherit"!==t.color&&"transparent"!==t.color&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},"inherit"===t.color&&{color:"inherit"},"dark"===e.palette.mode&&!t.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===t.color&&(0,E.A)({backgroundColor:"transparent",color:"inherit"},"dark"===e.palette.mode&&{backgroundImage:"none"})),e.vars&&(0,E.A)({},"default"===t.color&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:gt(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:gt(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:gt(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:gt(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},!["inherit","transparent"].includes(t.color)&&{backgroundColor:"var(--AppBar-background)"},{color:"inherit"===t.color?"inherit":"var(--AppBar-color)"},"transparent"===t.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))})),vt=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiAppBar"}),{className:n,color:o="primary",enableColorOnDark:i=!1,position:a="fixed"}=r,s=(0,T.A)(r,mt),l=(0,E.A)({},r,{color:o,position:a,enableColorOnDark:i}),c=(e=>{const{color:t,position:r,classes:n}=e,o={root:["root",`color${(0,dt.A)(t)}`,`position${(0,dt.A)(r)}`]};return(0,Xe.A)(o,pt,n)})(l);return(0,te.jsx)(yt,(0,E.A)({square:!0,component:"header",ownerState:l,elevation:4,className:(0,qe.A)(c.root,n,"fixed"===a&&"mui-fixed"),ref:t},s))}));var bt=r("8cYg"),_t=r("RI6h"),xt=r("zkiJ"),wt=r("PgD1"),At=r("/9V9"),St=r("FLH5"),Ct=r("mFFh"),Et=r("Sk+A"),Tt=r("/LIu"),It=r("Ow/F"),kt=r("k30w");function Mt(e){return(0,Ke.Ay)("MuiBottomNavigation",e)}r("TOwV");const Rt=(0,Ye.A)("MuiBottomNavigation",["root"]),Pt=["children","className","component","onChange","showLabels","value"],Ot=(0,H.Ay)("div",{name:"MuiBottomNavigation",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",justifyContent:"center",height:56,backgroundColor:(e.vars||e).palette.background.paper}))),Lt=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiBottomNavigation"}),{children:n,className:o,component:i="div",onChange:a,showLabels:s=!1,value:l}=r,c=(0,T.A)(r,Pt),u=(0,E.A)({},r,{component:i,showLabels:s}),d=(e=>{const{classes:t}=e;return(0,Xe.A)({root:["root"]},Mt,t)})(u);return(0,te.jsx)(Ot,(0,E.A)({as:i,className:(0,qe.A)(d.root,o),ref:t,ownerState:u},c,{children:K.Children.map(n,((e,t)=>{if(!K.isValidElement(e))return null;const r=void 0===e.props.value?t:e.props.value;return K.cloneElement(e,{selected:r===l,showLabel:void 0!==e.props.showLabel?e.props.showLabel:s,value:r,onChange:a})}))}))}));var Dt=r("+8pU");function Nt(e){return(0,Ke.Ay)("MuiBottomNavigationAction",e)}const Ft=(0,Ye.A)("MuiBottomNavigationAction",["root","iconOnly","selected","label"]),zt=["className","icon","label","onChange","onClick","selected","showLabel","value"],Bt=(0,H.Ay)(Dt.A,{name:"MuiBottomNavigationAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.showLabel&&!r.selected&&t.iconOnly]}})((({theme:e,ownerState:t})=>(0,E.A)({transition:e.transitions.create(["color","padding-top"],{duration:e.transitions.duration.short}),padding:"0px 12px",minWidth:80,maxWidth:168,color:(e.vars||e).palette.text.secondary,flexDirection:"column",flex:"1"},!t.showLabel&&!t.selected&&{paddingTop:14},!t.showLabel&&!t.selected&&!t.label&&{paddingTop:0},{[`&.${Ft.selected}`]:{color:(e.vars||e).palette.primary.main}}))),jt=(0,H.Ay)("span",{name:"MuiBottomNavigationAction",slot:"Label",overridesResolver:(e,t)=>t.label})((({theme:e,ownerState:t})=>(0,E.A)({fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s"},!t.showLabel&&!t.selected&&{opacity:0,transitionDelay:"0s"},{[`&.${Ft.selected}`]:{fontSize:e.typography.pxToRem(14)}}))),Ut=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiBottomNavigationAction"}),{className:n,icon:o,label:i,onChange:a,onClick:s,value:l}=r,c=(0,T.A)(r,zt),u=r,d=(e=>{const{classes:t,showLabel:r,selected:n}=e,o={root:["root",!r&&!n&&"iconOnly",n&&"selected"],label:["label",!r&&!n&&"iconOnly",n&&"selected"]};return(0,Xe.A)(o,Nt,t)})(u);return(0,te.jsxs)(Bt,(0,E.A)({ref:t,className:(0,qe.A)(d.root,n),focusRipple:!0,onClick:e=>{a&&a(e,l),s&&s(e)},ownerState:u},c,{children:[o,(0,te.jsx)(jt,{className:d.label,ownerState:u,children:i})]}))}));var $t=r("U831"),Vt=r("ht/8"),Gt=r("0Ydi"),Ht=r("Gqia"),Wt=r("M7pN");const qt=(0,Wt.A)((0,te.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),Xt=["slots","slotProps"],Zt=(0,H.Ay)(Dt.A)((({theme:e})=>(0,E.A)({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},"light"===e.palette.mode?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":(0,E.A)({},"light"===e.palette.mode?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":(0,E.A)({boxShadow:e.shadows[0]},"light"===e.palette.mode?{backgroundColor:(0,ve.tL)(e.palette.grey[200],.12)}:{backgroundColor:(0,ve.tL)(e.palette.grey[600],.12)})}))),Yt=(0,H.Ay)(qt)({width:24,height:16}),Kt=function(e){const{slots:t={},slotProps:r={}}=e,n=(0,T.A)(e,Xt),o=e;return(0,te.jsx)("li",{children:(0,te.jsx)(Zt,(0,E.A)({focusRipple:!0},n,{ownerState:o,children:(0,te.jsx)(Yt,(0,E.A)({as:t.CollapsedIcon,ownerState:o},r.collapsedIcon))}))})};function Jt(e){return(0,Ke.Ay)("MuiBreadcrumbs",e)}const Qt=(0,Ye.A)("MuiBreadcrumbs",["root","ol","li","separator"]),er=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],tr=(0,H.Ay)(Ht.A,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${Qt.li}`]:t.li},t.root]})({}),rr=(0,H.Ay)("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),nr=(0,H.Ay)("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function or(e,t,r,n){return e.reduce(((o,i,a)=>(a{const{classes:t}=e;return(0,Xe.A)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Jt,t)})(g),v=(0,Gt.A)({elementType:a.CollapsedIcon,externalSlotProps:s.collapsedIcon,ownerState:g}),b=K.useRef(null),_=K.Children.toArray(n).filter((e=>K.isValidElement(e))).map(((e,t)=>(0,te.jsx)("li",{className:y.li,children:e},`child-${t}`)));return(0,te.jsx)(tr,(0,E.A)({ref:t,component:i,color:"text.secondary",className:(0,qe.A)(y.root,o),ownerState:g},p,{children:(0,te.jsx)(rr,{className:y.ol,ref:b,ownerState:g,children:or(h||d&&_.length<=d?_:(e=>u+c>=e.length?e:[...e.slice(0,u),(0,te.jsx)(Kt,{"aria-label":l,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:v},onClick:()=>{m(!0);const e=b.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-c,e.length)])(_),y.separator,f,g)})}))}));var ar=r("5I82"),sr=r("0ANx"),lr=r("fy4x"),cr=r("Bz0O");function ur(e){return K.Children.toArray(e).filter((e=>K.isValidElement(e)))}function dr(e){return(0,Ke.Ay)("MuiButtonGroup",e)}const fr=(0,Ye.A)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]);var pr=r("bann"),hr=r("6z4e");const mr=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],gr=(0,H.Ay)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${fr.grouped}`]:t.grouped},{[`& .${fr.grouped}`]:t[`grouped${(0,dt.A)(r.orientation)}`]},{[`& .${fr.grouped}`]:t[`grouped${(0,dt.A)(r.variant)}`]},{[`& .${fr.grouped}`]:t[`grouped${(0,dt.A)(r.variant)}${(0,dt.A)(r.orientation)}`]},{[`& .${fr.grouped}`]:t[`grouped${(0,dt.A)(r.variant)}${(0,dt.A)(r.color)}`]},{[`& .${fr.firstButton}`]:t.firstButton},{[`& .${fr.lastButton}`]:t.lastButton},{[`& .${fr.middleButton}`]:t.middleButton},t.root,t[r.variant],!0===r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,"vertical"===r.orientation&&t.vertical]}})((({theme:e,ownerState:t})=>(0,E.A)({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},"vertical"===t.orientation&&{flexDirection:"column"},{[`& .${fr.grouped}`]:(0,E.A)({minWidth:40,"&:hover":(0,E.A)({},"contained"===t.variant&&{boxShadow:"none"})},"contained"===t.variant&&{boxShadow:"none"}),[`& .${fr.firstButton},& .${fr.middleButton}`]:(0,E.A)({},"horizontal"===t.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===t.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===t.variant&&"horizontal"===t.orientation&&{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${fr.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},"text"===t.variant&&"vertical"===t.orientation&&{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${fr.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},"text"===t.variant&&"inherit"!==t.color&&{borderColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:(0,ve.X4)(e.palette[t.color].main,.5)},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"transparent"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"transparent"},"contained"===t.variant&&"horizontal"===t.orientation&&{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${fr.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},"contained"===t.variant&&"vertical"===t.orientation&&{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${fr.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},"contained"===t.variant&&"inherit"!==t.color&&{borderColor:(e.vars||e).palette[t.color].dark},{"&:hover":(0,E.A)({},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"currentColor"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"currentColor"})}),[`& .${fr.lastButton},& .${fr.middleButton}`]:(0,E.A)({},"horizontal"===t.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===t.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===t.variant&&"horizontal"===t.orientation&&{marginLeft:-1},"outlined"===t.variant&&"vertical"===t.orientation&&{marginTop:-1})}))),yr=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiButtonGroup"}),{children:n,className:o,color:i="primary",component:a="div",disabled:s=!1,disableElevation:l=!1,disableFocusRipple:c=!1,disableRipple:u=!1,fullWidth:d=!1,orientation:f="horizontal",size:p="medium",variant:h="outlined"}=r,m=(0,T.A)(r,mr),g=(0,E.A)({},r,{color:i,component:a,disabled:s,disableElevation:l,disableFocusRipple:c,disableRipple:u,fullWidth:d,orientation:f,size:p,variant:h}),y=(e=>{const{classes:t,color:r,disabled:n,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,l={root:["root",s,"vertical"===a&&"vertical",i&&"fullWidth",o&&"disableElevation"],grouped:["grouped",`grouped${(0,dt.A)(a)}`,`grouped${(0,dt.A)(s)}`,`grouped${(0,dt.A)(s)}${(0,dt.A)(a)}`,`grouped${(0,dt.A)(s)}${(0,dt.A)(r)}`,n&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,Xe.A)(l,dr,t)})(g),v=K.useMemo((()=>({className:y.grouped,color:i,disabled:s,disableElevation:l,disableFocusRipple:c,disableRipple:u,fullWidth:d,size:p,variant:h})),[i,s,l,c,u,d,p,h,y.grouped]),b=ur(n),_=b.length,x=e=>{const t=0===e,r=e===_-1;return t&&r?"":t?y.firstButton:r?y.lastButton:y.middleButton};return(0,te.jsx)(gr,(0,E.A)({as:a,role:"group",className:(0,qe.A)(y.root,o),ref:t,ownerState:g},m,{children:(0,te.jsx)(pr.A.Provider,{value:v,children:b.map(((e,t)=>(0,te.jsx)(hr.A.Provider,{value:x(t),children:e},t)))})}))}));function vr(e){return(0,Ke.Ay)("MuiCard",e)}const br=(0,Ye.A)("MuiCard",["root"]),_r=["className","raised"],xr=(0,H.Ay)(ft.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),wr=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiCard"}),{className:n,raised:o=!1}=r,i=(0,T.A)(r,_r),a=(0,E.A)({},r,{raised:o}),s=(e=>{const{classes:t}=e;return(0,Xe.A)({root:["root"]},vr,t)})(a);return(0,te.jsx)(xr,(0,E.A)({className:(0,qe.A)(s.root,n),elevation:o?8:void 0,ref:t,ownerState:a},i))}));function Ar(e){return(0,Ke.Ay)("MuiCardActionArea",e)}const Sr=(0,Ye.A)("MuiCardActionArea",["root","focusVisible","focusHighlight"]),Cr=["children","className","focusVisibleClassName"],Er=(0,H.Ay)(Dt.A,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${Sr.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${Sr.focusVisible} .${Sr.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),Tr=(0,H.Ay)("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})((({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),Ir=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiCardActionArea"}),{children:n,className:o,focusVisibleClassName:i}=r,a=(0,T.A)(r,Cr),s=r,l=(e=>{const{classes:t}=e;return(0,Xe.A)({root:["root"],focusHighlight:["focusHighlight"]},Ar,t)})(s);return(0,te.jsxs)(Er,(0,E.A)({className:(0,qe.A)(l.root,o),focusVisibleClassName:(0,qe.A)(i,l.focusVisible),ref:t,ownerState:s},a,{children:[n,(0,te.jsx)(Tr,{className:l.focusHighlight,ownerState:s})]}))}));function kr(e){return(0,Ke.Ay)("MuiCardActions",e)}const Mr=(0,Ye.A)("MuiCardActions",["root","spacing"]),Rr=["disableSpacing","className"],Pr=(0,H.Ay)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})((({ownerState:e})=>(0,E.A)({display:"flex",alignItems:"center",padding:8},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}}))),Or=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiCardActions"}),{disableSpacing:n=!1,className:o}=r,i=(0,T.A)(r,Rr),a=(0,E.A)({},r,{disableSpacing:n}),s=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,Xe.A)(n,kr,t)})(a);return(0,te.jsx)(Pr,(0,E.A)({className:(0,qe.A)(s.root,o),ownerState:a,ref:t},i))}));function Lr(e){return(0,Ke.Ay)("MuiCardContent",e)}const Dr=(0,Ye.A)("MuiCardContent",["root"]),Nr=["className","component"],Fr=(0,H.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}}))),zr=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiCardContent"}),{className:n,component:o="div"}=r,i=(0,T.A)(r,Nr),a=(0,E.A)({},r,{component:o}),s=(e=>{const{classes:t}=e;return(0,Xe.A)({root:["root"]},Lr,t)})(a);return(0,te.jsx)(Fr,(0,E.A)({as:o,className:(0,qe.A)(s.root,n),ownerState:a,ref:t},i))}));function Br(e){return(0,Ke.Ay)("MuiCardHeader",e)}const jr=(0,Ye.A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]),Ur=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],$r=(0,H.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,E.A)({[`& .${jr.title}`]:t.title,[`& .${jr.subheader}`]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),Vr=(0,H.Ay)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),Gr=(0,H.Ay)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),Hr=(0,H.Ay)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),Wr=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiCardHeader"}),{action:n,avatar:o,className:i,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:c,title:u,titleTypographyProps:d}=r,f=(0,T.A)(r,Ur),p=(0,E.A)({},r,{component:a,disableTypography:s}),h=(e=>{const{classes:t}=e;return(0,Xe.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},Br,t)})(p);let m=u;null==m||m.type===Ht.A||s||(m=(0,te.jsx)(Ht.A,(0,E.A)({variant:o?"body2":"h5",className:h.title,component:"span",display:"block"},d,{children:m})));let g=l;return null==g||g.type===Ht.A||s||(g=(0,te.jsx)(Ht.A,(0,E.A)({variant:o?"body2":"body1",className:h.subheader,color:"text.secondary",component:"span",display:"block"},c,{children:g}))),(0,te.jsxs)($r,(0,E.A)({className:(0,qe.A)(h.root,i),as:a,ref:t,ownerState:p},f,{children:[o&&(0,te.jsx)(Vr,{className:h.avatar,ownerState:p,children:o}),(0,te.jsxs)(Hr,{className:h.content,ownerState:p,children:[m,g]}),n&&(0,te.jsx)(Gr,{className:h.action,ownerState:p,children:n})]}))}));function qr(e){return(0,Ke.Ay)("MuiCardMedia",e)}const Xr=(0,Ye.A)("MuiCardMedia",["root","media","img"]),Zr=["children","className","component","image","src","style"],Yr=(0,H.Ay)("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{isMediaComponent:n,isImageComponent:o}=r;return[t.root,n&&t.media,o&&t.img]}})((({ownerState:e})=>(0,E.A)({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},e.isMediaComponent&&{width:"100%"},e.isImageComponent&&{objectFit:"cover"}))),Kr=["video","audio","picture","iframe","img"],Jr=["picture","img"],Qr=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiCardMedia"}),{children:n,className:o,component:i="div",image:a,src:s,style:l}=r,c=(0,T.A)(r,Zr),u=-1!==Kr.indexOf(i),d=!u&&a?(0,E.A)({backgroundImage:`url("${a}")`},l):l,f=(0,E.A)({},r,{component:i,isMediaComponent:u,isImageComponent:-1!==Jr.indexOf(i)}),p=(e=>{const{classes:t,isMediaComponent:r,isImageComponent:n}=e,o={root:["root",r&&"media",n&&"img"]};return(0,Xe.A)(o,qr,t)})(f);return(0,te.jsx)(Yr,(0,E.A)({className:(0,qe.A)(p.root,o),as:i,role:!u&&a?"img":void 0,ref:t,style:d,ownerState:f,src:u?a||s:void 0},c,{children:n}))})),en=Qr;var tn=r("wYCo"),rn=r("Ifs3"),nn=r("Ifci"),on=r("wmaj"),an=r("yXLF"),sn=r("SYse"),ln=r("zX2i"),cn=r("awfS"),un=r("LwNo"),dn=r("8JWP");function fn(e){return(0,Ke.Ay)("MuiContainer",e)}const pn=(0,Ye.A)("MuiContainer",["root","disableGutters","fixed","maxWidthXs","maxWidthSm","maxWidthMd","maxWidthLg","maxWidthXl"]);var hn=r("L9aa");const mn={track:"#2b2b2b",thumb:"#6b6b6b",active:"#959595"};function gn(e=mn){return{scrollbarColor:`${e.thumb} ${e.track}`,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:e.track},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:e.thumb,minHeight:24,border:`3px solid ${e.track}`},"&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus":{backgroundColor:e.active},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:e.active},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:e.active},"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner":{backgroundColor:e.track}}}var yn=r("umvS"),vn=r("plnp"),bn=r("TFnf"),_n=r("CnVR"),xn=r("GVSF"),wn=r("KUP3"),An=r("akmu"),Sn=r("PTxh"),Cn=r("b7jQ"),En=r("HaXu"),Tn=r("A+QN"),In=r("WOV/"),kn=r("St5x"),Mn=r("X6EC"),Rn=r("ta8z"),Pn=r("XM18");function On(e){return(0,Ke.Ay)("MuiDrawer",e)}const Ln=(0,Ye.A)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]),Dn=["BackdropProps"],Nn=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],Fn=(e,t)=>{const{ownerState:r}=e;return[t.root,("permanent"===r.variant||"persistent"===r.variant)&&t.docked,t.modal]},zn=(0,H.Ay)(Mn.A,{name:"MuiDrawer",slot:"Root",overridesResolver:Fn})((({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),Bn=(0,H.Ay)("div",{shouldForwardProp:Pn.A,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Fn})({flex:"0 0 auto"}),jn=(0,H.Ay)(ft.A,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`paperAnchor${(0,dt.A)(r.anchor)}`],"temporary"!==r.variant&&t[`paperAnchorDocked${(0,dt.A)(r.anchor)}`]]}})((({theme:e,ownerState:t})=>(0,E.A)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===t.anchor&&{left:0},"top"===t.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===t.anchor&&{right:0},"bottom"===t.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===t.anchor&&"temporary"!==t.variant&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},"top"===t.anchor&&"temporary"!==t.variant&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},"right"===t.anchor&&"temporary"!==t.variant&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"bottom"===t.anchor&&"temporary"!==t.variant&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`}))),Un={left:"right",right:"left",top:"down",bottom:"up"};function $n(e){return-1!==["left","right"].indexOf(e)}function Vn({direction:e},t){return"rtl"===e&&$n(t)?Un[t]:t}const Gn=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiDrawer"}),n=(0,V.A)(),o=(0,kn.I)(),i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:s,children:l,className:c,elevation:u=16,hideBackdrop:d=!1,ModalProps:{BackdropProps:f}={},onClose:p,open:h=!1,PaperProps:m={},SlideProps:g,TransitionComponent:y=Rn.A,transitionDuration:v=i,variant:b="temporary"}=r,_=(0,T.A)(r.ModalProps,Dn),x=(0,T.A)(r,Nn),w=K.useRef(!1);K.useEffect((()=>{w.current=!0}),[]);const A=Vn({direction:o?"rtl":"ltr"},a),S=a,C=(0,E.A)({},r,{anchor:S,elevation:u,open:h,variant:b},x),I=(e=>{const{classes:t,anchor:r,variant:n}=e,o={root:["root"],docked:[("permanent"===n||"persistent"===n)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,dt.A)(r)}`,"temporary"!==n&&`paperAnchorDocked${(0,dt.A)(r)}`]};return(0,Xe.A)(o,On,t)})(C),k=(0,te.jsx)(jn,(0,E.A)({elevation:"temporary"===b?u:0,square:!0},m,{className:(0,qe.A)(I.paper,m.className),ownerState:C,children:l}));if("permanent"===b)return(0,te.jsx)(Bn,(0,E.A)({className:(0,qe.A)(I.root,I.docked,c),ownerState:C,ref:t},x,{children:k}));const M=(0,te.jsx)(y,(0,E.A)({in:h,direction:Un[A],timeout:v,appear:w.current},g,{children:k}));return"persistent"===b?(0,te.jsx)(Bn,(0,E.A)({className:(0,qe.A)(I.root,I.docked,c),ownerState:C,ref:t},x,{children:M})):(0,te.jsx)(zn,(0,E.A)({BackdropProps:(0,E.A)({},s,f,{transitionDuration:v}),className:(0,qe.A)(I.root,I.modal,c),open:h,ownerState:C,onClose:p,hideBackdrop:d,ref:t},x,_,{children:M}))}));function Hn(e){return(0,Ke.Ay)("MuiFab",e)}const Wn=(0,Ye.A)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),qn=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],Xn=(0,H.Ay)(Dt.A,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,Pn.A)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,dt.A)(r.size)}`],"inherit"===r.color&&t.colorInherit,t[(0,dt.A)(r.size)],t[r.color]]}})((({theme:e,ownerState:t})=>{var r,n;return(0,E.A)({},e.typography.button,{minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:null==(r=(n=e.palette).getContrastText)?void 0:r.call(n,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${Wn.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]}},"small"===t.size&&{width:40,height:40},"medium"===t.size&&{width:48,height:48},"extended"===t.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===t.variant&&"small"===t.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===t.variant&&"medium"===t.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===t.color&&{color:"inherit"})}),(({theme:e,ownerState:t})=>(0,E.A)({},"inherit"!==t.color&&"default"!==t.color&&null!=(e.vars||e).palette[t.color]&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}})),(({theme:e})=>({[`&.${Wn.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Zn=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiFab"}),{children:n,className:o,color:i="default",component:a="button",disabled:s=!1,disableFocusRipple:l=!1,focusVisibleClassName:c,size:u="large",variant:d="circular"}=r,f=(0,T.A)(r,qn),p=(0,E.A)({},r,{color:i,component:a,disabled:s,disableFocusRipple:l,size:u,variant:d}),h=(e=>{const{color:t,variant:r,classes:n,size:o}=e,i={root:["root",r,`size${(0,dt.A)(o)}`,"inherit"===t?"colorInherit":t]},a=(0,Xe.A)(i,Hn,n);return(0,E.A)({},n,a)})(p);return(0,te.jsx)(Xn,(0,E.A)({className:(0,qe.A)(h.root,o),component:a,disabled:s,focusRipple:!l,focusVisibleClassName:(0,qe.A)(h.focusVisible,c),ownerState:p,ref:t},f,{classes:h,children:n}))}));var Yn=r("hGmu"),Kn=r("fJ4Q"),Jn=r("XYkD"),Qn=r("Fg+5"),eo=r("7EOP"),to=r("XR1s"),ro=r("O3LO"),no=r("1L54"),oo=r("4ycN"),io=r("C559"),ao=r("sbgx"),so=r("Vv3p"),lo=r("VEoa"),co=r("4Qvy"),uo=r("fGgT"),fo=r("0kTp");const po=K.createContext();function ho(e){return(0,Ke.Ay)("MuiGrid",e)}const mo=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],go=(0,Ye.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...mo.map((e=>`grid-xs-${e}`)),...mo.map((e=>`grid-sm-${e}`)),...mo.map((e=>`grid-md-${e}`)),...mo.map((e=>`grid-lg-${e}`)),...mo.map((e=>`grid-xl-${e}`))]),yo=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function vo(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function bo({breakpoints:e,values:t}){let r="";Object.keys(t).forEach((e=>{""===r&&0!==t[e]&&(r=e)}));const n=Object.keys(e).sort(((t,r)=>e[t]-e[r]));return n.slice(0,n.indexOf(r))}const _o=(0,H.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{container:n,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=r;let u=[];n&&(u=function(e,t,r={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[r[`spacing-xs-${String(e)}`]];const n=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&n.push(r[`spacing-${t}-${String(o)}`])})),n}(a,c,t));const d=[];return c.forEach((e=>{const n=r[e];n&&d.push(t[`grid-${e}-${String(n)}`])})),[t.root,n&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((({ownerState:e})=>(0,E.A)({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})),(function({theme:e,ownerState:t}){const r=(0,uo.kW)({values:t.direction,breakpoints:e.breakpoints.values});return(0,uo.NI)({theme:e},r,(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${go.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:r,rowSpacing:n}=t;let o={};if(r&&0!==n){const t=(0,uo.kW)({values:n,breakpoints:e.breakpoints.values});let r;"object"==typeof t&&(r=bo({breakpoints:e.breakpoints.values,values:t})),o=(0,uo.NI)({theme:e},t,((t,n)=>{var o;const i=e.spacing(t);return"0px"!==i?{marginTop:`-${vo(i)}`,[`& > .${go.item}`]:{paddingTop:vo(i)}}:null!=(o=r)&&o.includes(n)?{}:{marginTop:0,[`& > .${go.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:r,columnSpacing:n}=t;let o={};if(r&&0!==n){const t=(0,uo.kW)({values:n,breakpoints:e.breakpoints.values});let r;"object"==typeof t&&(r=bo({breakpoints:e.breakpoints.values,values:t})),o=(0,uo.NI)({theme:e},t,((t,n)=>{var o;const i=e.spacing(t);return"0px"!==i?{width:`calc(100% + ${vo(i)})`,marginLeft:`-${vo(i)}`,[`& > .${go.item}`]:{paddingLeft:vo(i)}}:null!=(o=r)&&o.includes(n)?{}:{width:"100%",marginLeft:0,[`& > .${go.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let r;return e.breakpoints.keys.reduce(((n,o)=>{let i={};if(t[o]&&(r=t[o]),!r)return n;if(!0===r)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===r)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=(0,uo.kW)({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof a?a[o]:a;if(null==s)return n;const l=Math.round(r/s*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const r=e.spacing(t.columnSpacing);if("0px"!==r){const e=`calc(${l} + ${vo(r)})`;c={flexBasis:e,maxWidth:e}}}i=(0,E.A)({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===e.breakpoints.values[o]?Object.assign(n,i):n[e.breakpoints.up(o)]=i,n}),{})})),xo=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiGrid"}),{breakpoints:n}=(0,V.A)(),o=(0,fo.A)(r),{className:i,columns:a,columnSpacing:s,component:l="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:f,spacing:p=0,wrap:h="wrap",zeroMinWidth:m=!1}=o,g=(0,T.A)(o,yo),y=f||p,v=s||p,b=K.useContext(po),_=c?a||12:b,x={},w=(0,E.A)({},g);n.keys.forEach((e=>{null!=g[e]&&(x[e]=g[e],delete w[e])}));const A=(0,E.A)({},o,{columns:_,container:c,direction:u,item:d,rowSpacing:y,columnSpacing:v,wrap:h,zeroMinWidth:m,spacing:p},x,{breakpoints:n.keys}),S=(e=>{const{classes:t,container:r,direction:n,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];r&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const r=[];return t.forEach((t=>{const n=e[t];if(Number(n)>0){const e=`spacing-${t}-${String(n)}`;r.push(e)}})),r}(i,l));const u=[];l.forEach((t=>{const r=e[t];r&&u.push(`grid-${t}-${String(r)}`)}));const d={root:["root",r&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==n&&`direction-xs-${String(n)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...u]};return(0,Xe.A)(d,ho,t)})(A);return(0,te.jsx)(po.Provider,{value:_,children:(0,te.jsx)(_o,(0,E.A)({ownerState:A,className:(0,qe.A)(S.root,i),as:l,ref:t},w))})})),wo=xo;var Ao=r("lHbp"),So=r("M82X"),Co=r("sdrl"),Eo=r("aoPf"),To=r("Tazo");const Io=(e,t,r)=>{const n=e.keys[0];var o,i;Array.isArray(t)?t.forEach(((t,n)=>{r(((t,r)=>{n<=e.keys.length-1&&(0===n?Object.assign(t,r):t[e.up(e.keys[n])]=r)}),t)})):t&&"object"==typeof t?(Object.keys(t).length>e.keys.length?e.keys:(o=e.keys,i=Object.keys(t),o.filter((e=>i.includes(e))))).forEach((o=>{if(-1!==e.keys.indexOf(o)){const i=t[o];void 0!==i&&r(((t,r)=>{n===o?Object.assign(t,r):t[e.up(o)]=r}),i)}})):"number"!=typeof t&&"string"!=typeof t||r(((e,t)=>{Object.assign(e,t)}),t)};function ko(e){return e?`Level${e}`:""}function Mo(e){return e.unstable_level>0&&e.container}function Ro(e){return function(t){return`var(--Grid-${t}Spacing${ko(e.unstable_level)})`}}function Po(e){return function(t){return 0===e.unstable_level?`var(--Grid-${t}Spacing)`:`var(--Grid-${t}Spacing${ko(e.unstable_level-1)})`}}function Oo(e){return 0===e.unstable_level?"var(--Grid-columns)":`var(--Grid-columns${ko(e.unstable_level-1)})`}const Lo=({theme:e,ownerState:t})=>{const r=Ro(t),n={};return Io(e.breakpoints,t.gridSize,((e,o)=>{let i={};!0===o&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===o&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof o&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / ${Oo(t)}${Mo(t)?` + ${r("column")}`:""})`}),e(n,i)})),n},Do=({theme:e,ownerState:t})=>{const r={};return Io(e.breakpoints,t.gridOffset,((e,n)=>{let o={};"auto"===n&&(o={marginLeft:"auto"}),"number"==typeof n&&(o={marginLeft:0===n?"0px":`calc(100% * ${n} / ${Oo(t)})`}),e(r,o)})),r},No=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Mo(t)?{[`--Grid-columns${ko(t.unstable_level)}`]:Oo(t)}:{"--Grid-columns":12};return Io(e.breakpoints,t.columns,((e,n)=>{e(r,{[`--Grid-columns${ko(t.unstable_level)}`]:n})})),r},Fo=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Po(t),n=Mo(t)?{[`--Grid-rowSpacing${ko(t.unstable_level)}`]:r("row")}:{};return Io(e.breakpoints,t.rowSpacing,((r,o)=>{var i;r(n,{[`--Grid-rowSpacing${ko(t.unstable_level)}`]:"string"==typeof o?o:null==(i=e.spacing)?void 0:i.call(e,o)})})),n},zo=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Po(t),n=Mo(t)?{[`--Grid-columnSpacing${ko(t.unstable_level)}`]:r("column")}:{};return Io(e.breakpoints,t.columnSpacing,((r,o)=>{var i;r(n,{[`--Grid-columnSpacing${ko(t.unstable_level)}`]:"string"==typeof o?o:null==(i=e.spacing)?void 0:i.call(e,o)})})),n},Bo=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return Io(e.breakpoints,t.direction,((e,t)=>{e(r,{flexDirection:t})})),r},jo=({ownerState:e})=>{const t=Ro(e),r=Po(e);return(0,E.A)({minWidth:0,boxSizing:"border-box"},e.container&&(0,E.A)({display:"flex",flexWrap:"wrap"},e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||Mo(e))&&(0,E.A)({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},Uo=e=>{const t=[];return Object.entries(e).forEach((([e,r])=>{!1!==r&&void 0!==r&&t.push(`grid-${e}-${String(r)}`)})),t},$o=(e,t="xs")=>{function r(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(r(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){const t=[];return Object.entries(e).forEach((([e,n])=>{r(n)&&t.push(`spacing-${e}-${String(n)}`)})),t}return[]},Vo=e=>void 0===e?[]:"object"==typeof e?Object.entries(e).map((([e,t])=>`direction-${e}-${t}`)):[`direction-xs-${String(e)}`],Go=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],Ho=(0,To.A)(),Wo=(0,So.A)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function qo(e){return(0,Co.A)({props:e,name:"MuiGrid",defaultTheme:Ho})}const Xo=function(e={}){const{createStyledComponent:t=Wo,useThemeProps:r=qo,componentName:n="MuiGrid"}=e,o=K.createContext(void 0),i=t(No,zo,Fo,Lo,Bo,jo,Do),a=K.forwardRef((function(e,t){var a,s,l,c,u,d,f,p;const h=(0,Eo.A)(),m=r(e),g=(0,fo.A)(m),y=K.useContext(o),{className:v,children:b,columns:_=12,container:x=!1,component:w="div",direction:A="row",wrap:S="wrap",spacing:C=0,rowSpacing:I=C,columnSpacing:k=C,disableEqualOverflow:M,unstable_level:R=0}=g,P=(0,T.A)(g,Go);let O=M;R&&void 0!==M&&(O=e.disableEqualOverflow);const L={},D={},N={};Object.entries(P).forEach((([e,t])=>{void 0!==h.breakpoints.values[e]?L[e]=t:void 0!==h.breakpoints.values[e.replace("Offset","")]?D[e.replace("Offset","")]=t:N[e]=t}));const F=null!=(a=e.columns)?a:R?void 0:_,z=null!=(s=e.spacing)?s:R?void 0:C,B=null!=(l=null!=(c=e.rowSpacing)?c:e.spacing)?l:R?void 0:I,j=null!=(u=null!=(d=e.columnSpacing)?d:e.spacing)?u:R?void 0:k,U=(0,E.A)({},g,{level:R,columns:F,container:x,direction:A,wrap:S,spacing:z,rowSpacing:B,columnSpacing:j,gridSize:L,gridOffset:D,disableEqualOverflow:null!=(f=null!=(p=O)?p:y)&&f,parentDisableEqualOverflow:y}),$=((e,t)=>{const{container:r,direction:o,spacing:i,wrap:a,gridSize:s}=e,l={root:["root",r&&"container","wrap"!==a&&`wrap-xs-${String(a)}`,...Vo(o),...Uo(s),...r?$o(i,t.breakpoints.keys[0]):[]]};return(0,Xe.A)(l,(e=>(0,Ke.Ay)(n,e)),{})})(U,h);let V=(0,te.jsx)(i,(0,E.A)({ref:t,as:w,ownerState:U,className:(0,qe.A)($.root,v)},N,{children:K.Children.map(b,(e=>{var t;return K.isValidElement(e)&&(0,Ao.A)(e,["Grid"])?K.cloneElement(e,{unstable_level:null!=(t=e.props.unstable_level)?t:R+1}):e}))}));return void 0!==O&&O!==(null!=y&&y)&&(V=(0,te.jsx)(o.Provider,{value:O,children:V})),V}));return a.muiName="Grid",a}({createStyledComponent:(0,H.Ay)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>(0,Ze.b)({props:e,name:"MuiGrid2"})}),Zo=Xo;function Yo(e){return(0,Ke.Ay)("MuiGrid2",e)}const Ko=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Jo=(0,Ye.A)("MuiGrid2",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...Ko.map((e=>`grid-xs-${e}`)),...Ko.map((e=>`grid-sm-${e}`)),...Ko.map((e=>`grid-md-${e}`)),...Ko.map((e=>`grid-lg-${e}`)),...Ko.map((e=>`grid-xl-${e}`))]);var Qo=r("UVCh"),ei=r("PfWk"),ti=r("6q60"),ri=r("bBSl");const ni=["initialWidth","width"],oi=["xs","sm","md","lg","xl"],ii=(e,t,r=!0)=>r?oi.indexOf(e)<=oi.indexOf(t):oi.indexOf(e)r?oi.indexOf(t)<=oi.indexOf(e):oi.indexOf(t)t=>{const{withTheme:r=!1,noSSR:n=!1,initialWidth:o}=e;return function(e){const i=(0,V.A)(),a=e.theme||i,s=(0,ei.A)({theme:a,name:"MuiWithWidth",props:e}),{initialWidth:l,width:c}=s,u=(0,T.A)(s,ni),[d,f]=K.useState(!1);(0,ti.A)((()=>{f(!0)}),[]);const p=a.breakpoints.keys.slice().reverse().reduce(((e,t)=>{const r=(0,ri.A)(a.breakpoints.up(t));return!e&&r?t:e}),null),h=(0,E.A)({width:c||(d||n?p:void 0)||l||o},r?{theme:a}:{},u);return void 0===h.width?null:(0,te.jsx)(t,(0,E.A)({},h))}})()((function(e){const{children:t,only:r,width:n}=e,o=(0,V.A)();let i=!0;if(r)if(Array.isArray(r)){for(let e=0;e{const r={display:"none"};return(0,E.A)({},t.breakpoints.map((({breakpoint:t,dir:n})=>"only"===n?{[e.breakpoints.only(t)]:r}:"up"===n?{[e.breakpoints.up(t)]:r}:{[e.breakpoints.down(t)]:r})).reduce(((e,t)=>(Object.keys(t).forEach((r=>{e[r]=t[r]})),e)),{}))})),di=function(e){const{children:t,className:r,only:n}=e,o=(0,T.A)(e,ci),i=(0,V.A)(),a=[];for(let e=0;e{a.push({breakpoint:e,dir:"only"})}));const s=(0,E.A)({},e,{breakpoints:a}),l=(e=>{const{classes:t,breakpoints:r}=e,n={root:["root",...r.map((({breakpoint:e,dir:t})=>"only"===t?`${t}${(0,dt.A)(e)}`:`${e}${(0,dt.A)(t)}`))]};return(0,Xe.A)(n,li,t)})(s);return(0,te.jsx)(ui,{className:(0,qe.A)(l.root,r),ownerState:s,children:t})},fi=["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"],pi=function(e){const{implementation:t="js",lgDown:r=!1,lgUp:n=!1,mdDown:o=!1,mdUp:i=!1,smDown:a=!1,smUp:s=!1,xlDown:l=!1,xlUp:c=!1,xsDown:u=!1,xsUp:d=!1}=e,f=(0,T.A)(e,fi);return"js"===t?(0,te.jsx)(si,(0,E.A)({lgDown:r,lgUp:n,mdDown:o,mdUp:i,smDown:a,smUp:s,xlDown:l,xlUp:c,xsDown:u,xsUp:d},f)):(0,te.jsx)(di,(0,E.A)({lgDown:r,lgUp:n,mdDown:o,mdUp:i,smDown:a,smUp:s,xlDown:l,xlUp:c,xsDown:u,xsUp:d},f))};function hi(e){return(0,Ke.Ay)("MuiIcon",e)}const mi=(0,Ye.A)("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]),gi=["baseClassName","className","color","component","fontSize"],yi=(0,H.Ay)("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"inherit"!==r.color&&t[`color${(0,dt.A)(r.color)}`],t[`fontSize${(0,dt.A)(r.fontSize)}`]]}})((({theme:e,ownerState:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(36)}[t.fontSize],color:{primary:(e.vars||e).palette.primary.main,secondary:(e.vars||e).palette.secondary.main,info:(e.vars||e).palette.info.main,success:(e.vars||e).palette.success.main,warning:(e.vars||e).palette.warning.main,action:(e.vars||e).palette.action.active,error:(e.vars||e).palette.error.main,disabled:(e.vars||e).palette.action.disabled,inherit:void 0}[t.color]}))),vi=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiIcon"}),{baseClassName:n="material-icons",className:o,color:i="inherit",component:a="span",fontSize:s="medium"}=r,l=(0,T.A)(r,gi),c=(0,E.A)({},r,{baseClassName:n,color:i,component:a,fontSize:s}),u=(e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root","inherit"!==t&&`color${(0,dt.A)(t)}`,`fontSize${(0,dt.A)(r)}`]};return(0,Xe.A)(o,hi,n)})(c);return(0,te.jsx)(yi,(0,E.A)({as:a,className:(0,qe.A)(n,"notranslate",u.root,o),ownerState:c,"aria-hidden":!0,ref:t},l))}));vi.muiName="Icon";const bi=vi;var _i=r("OGDC"),xi=r("5iV1");function wi(e){return(0,Ke.Ay)("MuiImageList",e)}const Ai=(0,Ye.A)("MuiImageList",["root","masonry","quilted","standard","woven"]),Si=K.createContext({}),Ci=["children","className","cols","component","rowHeight","gap","style","variant"],Ei=(0,H.Ay)("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant]]}})((({ownerState:e})=>(0,E.A)({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"},"masonry"===e.variant&&{display:"block"}))),Ti=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiImageList"}),{children:n,className:o,cols:i=2,component:a="ul",rowHeight:s="auto",gap:l=4,style:c,variant:u="standard"}=r,d=(0,T.A)(r,Ci),f=K.useMemo((()=>({rowHeight:s,gap:l,variant:u})),[s,l,u]);K.useEffect((()=>{}),[]);const p="masonry"===u?(0,E.A)({columnCount:i,columnGap:l},c):(0,E.A)({gridTemplateColumns:`repeat(${i}, 1fr)`,gap:l},c),h=(0,E.A)({},r,{component:a,gap:l,rowHeight:s,variant:u}),m=(e=>{const{classes:t,variant:r}=e,n={root:["root",r]};return(0,Xe.A)(n,wi,t)})(h);return(0,te.jsx)(Ei,(0,E.A)({as:a,className:(0,qe.A)(m.root,m[u],o),ref:t,style:p,ownerState:h},d,{children:(0,te.jsx)(Si.Provider,{value:f,children:n})}))})),Ii=Ti;var ki=r("M3M6");function Mi(e){return(0,Ke.Ay)("MuiImageListItem",e)}const Ri=(0,Ye.A)("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),Pi=["children","className","cols","component","rows","style"],Oi=(0,H.Ay)("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Ri.img}`]:t.img},t.root,t[r.variant]]}})((({ownerState:e})=>(0,E.A)({display:"block",position:"relative"},"standard"===e.variant&&{display:"flex",flexDirection:"column"},"woven"===e.variant&&{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}},{[`& .${Ri.img}`]:(0,E.A)({objectFit:"cover",width:"100%",height:"100%",display:"block"},"standard"===e.variant&&{height:"auto",flexGrow:1})}))),Li=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiImageListItem"}),{children:n,className:o,cols:i=1,component:a="li",rows:s=1,style:l}=r,c=(0,T.A)(r,Pi),{rowHeight:u="auto",gap:d,variant:f}=K.useContext(Si);let p="auto";"woven"===f?p=void 0:"auto"!==u&&(p=u*s+d*(s-1));const h=(0,E.A)({},r,{cols:i,component:a,gap:d,rowHeight:u,rows:s,variant:f}),m=(e=>{const{classes:t,variant:r}=e,n={root:["root",r],img:["img"]};return(0,Xe.A)(n,Mi,t)})(h);return(0,te.jsx)(Oi,(0,E.A)({as:a,className:(0,qe.A)(m.root,m[f],o),ref:t,style:(0,E.A)({height:p,gridColumnEnd:"masonry"!==f?`span ${i}`:void 0,gridRowEnd:"masonry"!==f?`span ${s}`:void 0,marginBottom:"masonry"===f?d:void 0,breakInside:"masonry"===f?"avoid":void 0},l),ownerState:h},c,{children:K.Children.map(n,(e=>K.isValidElement(e)?"img"===e.type||(0,ki.A)(e,["Image"])?K.cloneElement(e,{className:(0,qe.A)(m.img,e.props.className)}):e:null))}))})),Di=Li;function Ni(e){return(0,Ke.Ay)("MuiImageListItemBar",e)}const Fi=(0,Ye.A)("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]),zi=["actionIcon","actionPosition","className","subtitle","title","position"],Bi=(0,H.Ay)("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,dt.A)(r.position)}`]]}})((({theme:e,ownerState:t})=>(0,E.A)({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},"bottom"===t.position&&{bottom:0},"top"===t.position&&{top:0},"below"===t.position&&{position:"relative",background:"transparent",alignItems:"normal"}))),ji=(0,H.Ay)("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.titleWrap,t[`titleWrap${(0,dt.A)(r.position)}`],r.actionIcon&&t[`titleWrapActionPos${(0,dt.A)(r.actionPosition)}`]]}})((({theme:e,ownerState:t})=>(0,E.A)({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden"},"below"===t.position&&{padding:"6px 0 12px",color:"inherit"},t.actionIcon&&"left"===t.actionPosition&&{paddingLeft:0},t.actionIcon&&"right"===t.actionPosition&&{paddingRight:0}))),Ui=(0,H.Ay)("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})((({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),$i=(0,H.Ay)("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})((({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),Vi=(0,H.Ay)("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.actionIcon,t[`actionIconActionPos${(0,dt.A)(r.actionPosition)}`]]}})((({ownerState:e})=>(0,E.A)({},"left"===e.actionPosition&&{order:-1}))),Gi=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiImageListItemBar"}),{actionIcon:n,actionPosition:o="right",className:i,subtitle:a,title:s,position:l="bottom"}=r,c=(0,T.A)(r,zi),u=(0,E.A)({},r,{position:l,actionPosition:o}),d=(e=>{const{classes:t,position:r,actionIcon:n,actionPosition:o}=e,i={root:["root",`position${(0,dt.A)(r)}`],titleWrap:["titleWrap",`titleWrap${(0,dt.A)(r)}`,n&&`titleWrapActionPos${(0,dt.A)(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${(0,dt.A)(o)}`]};return(0,Xe.A)(i,Ni,t)})(u);return(0,te.jsxs)(Bi,(0,E.A)({ownerState:u,className:(0,qe.A)(d.root,i),ref:t},c,{children:[(0,te.jsxs)(ji,{ownerState:u,className:d.titleWrap,children:[(0,te.jsx)(Ui,{className:d.title,children:s}),a?(0,te.jsx)($i,{className:d.subtitle,children:a}):null]}),n?(0,te.jsx)(Vi,{ownerState:u,className:d.actionIcon,children:n}):null]}))}));var Hi=r("WdHY"),Wi=r("Zqw4"),qi=r("EfzM"),Xi=r("S9h2"),Zi=r("kmWS"),Yi=r("G5wc"),Ki=r("kQF4"),Ji=r("eKIA"),Qi=r("4WJT"),ea=r("HkBA"),ta=r("8rms"),ra=r("ZfBw");function na(e){return(0,Ke.Ay)("MuiLink",e)}const oa=(0,Ye.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var ia=r("+y7V");const aa={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},sa=({theme:e,ownerState:t})=>{const r=(e=>aa[e]||e)(t.color),n=(0,ia.Yn)(e,`palette.${r}`,!1)||t.color,o=(0,ia.Yn)(e,`palette.${r}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:(0,ve.X4)(n,.4)},la=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],ca=(0,H.Ay)(Ht.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`underline${(0,dt.A)(r.underline)}`],"button"===r.component&&t.button]}})((({theme:e,ownerState:t})=>(0,E.A)({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&(0,E.A)({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:sa({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${oa.focusVisible}`]:{outline:"auto"}}))),ua=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiLink"}),{className:n,color:o="primary",component:i="a",onBlur:a,onFocus:s,TypographyClasses:l,underline:c="always",variant:u="inherit",sx:d}=r,f=(0,T.A)(r,la),{isFocusVisibleRef:p,onBlur:h,onFocus:m,ref:g}=(0,ta.A)(),[y,v]=K.useState(!1),b=(0,ra.A)(t,g),_=(0,E.A)({},r,{color:o,component:i,focusVisible:y,underline:c,variant:u}),x=(e=>{const{classes:t,component:r,focusVisible:n,underline:o}=e,i={root:["root",`underline${(0,dt.A)(o)}`,"button"===r&&"button",n&&"focusVisible"]};return(0,Xe.A)(i,na,t)})(_);return(0,te.jsx)(ca,(0,E.A)({color:o,className:(0,qe.A)(x.root,n),classes:l,component:i,onBlur:e=>{h(e),!1===p.current&&v(!1),a&&a(e)},onFocus:e=>{m(e),!0===p.current&&v(!0),s&&s(e)},ref:b,ownerState:_,variant:u,sx:[...Object.keys(aa).includes(o)?[]:[{color:o}],...Array.isArray(d)?d:[d]]},f))}));var da=r("H9le"),fa=r("sK9B"),pa=r("ZvkB"),ha=r("wCeY"),ma=r("a6xD"),ga=r("FUPx"),ya=r("cwku"),va=r("6l0j");const ba=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],_a=(0,H.Ay)(Dt.A,{shouldForwardProp:e=>(0,Pn.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>(0,E.A)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${va.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,ve.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${va.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,ve.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${va.A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,ve.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,ve.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${va.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${va.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}))),xa=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiListItemButton"}),{alignItems:n="center",autoFocus:o=!1,component:i="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:u,selected:d=!1,className:f}=r,p=(0,T.A)(r,ba),h=K.useContext(ya.A),m=K.useMemo((()=>({dense:s||h.dense||!1,alignItems:n,disableGutters:l})),[n,h.dense,s,l]),g=K.useRef(null);(0,ti.A)((()=>{o&&g.current&&g.current.focus()}),[o]);const y=(0,E.A)({},r,{alignItems:n,dense:m.dense,disableGutters:l,divider:c,selected:d}),v=(e=>{const{alignItems:t,classes:r,dense:n,disabled:o,disableGutters:i,divider:a,selected:s}=e,l={root:["root",n&&"dense",!i&&"gutters",a&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},c=(0,Xe.A)(l,va.Y,r);return(0,E.A)({},r,c)})(y),b=(0,ra.A)(g,t);return(0,te.jsx)(ya.A.Provider,{value:m,children:(0,te.jsx)(_a,(0,E.A)({ref:b,href:p.href||p.to,component:(p.href||p.to)&&"div"===i?"button":i,focusVisibleClassName:(0,qe.A)(v.focusVisible,u),ownerState:y,className:(0,qe.A)(v.root,f)},p,{classes:v,children:a}))})}));var wa=r("mkGA"),Aa=r("xkXe"),Sa=r("DFFc"),Ca=r("RD6q"),Ea=r("T4Ez"),Ta=r("R6o4"),Ia=r("BkAX"),ka=r("cXnk"),Ma=r("4enW"),Ra=r("k/XA"),Pa=r("LutX"),Oa=r("BCtw"),La=r("IXjO"),Da=r("FO2v");function Na(e){return(0,Ke.Ay)("MuiMobileStepper",e)}const Fa=(0,Ye.A)("MuiMobileStepper",["root","positionBottom","positionTop","positionStatic","dots","dot","dotActive","progress"]),za=["activeStep","backButton","className","LinearProgressProps","nextButton","position","steps","variant"],Ba=(0,H.Ay)(ft.A,{name:"MuiMobileStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,dt.A)(r.position)}`]]}})((({theme:e,ownerState:t})=>(0,E.A)({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:(e.vars||e).palette.background.default,padding:8},"bottom"===t.position&&{position:"fixed",bottom:0,left:0,right:0,zIndex:(e.vars||e).zIndex.mobileStepper},"top"===t.position&&{position:"fixed",top:0,left:0,right:0,zIndex:(e.vars||e).zIndex.mobileStepper}))),ja=(0,H.Ay)("div",{name:"MuiMobileStepper",slot:"Dots",overridesResolver:(e,t)=>t.dots})((({ownerState:e})=>(0,E.A)({},"dots"===e.variant&&{display:"flex",flexDirection:"row"}))),Ua=(0,H.Ay)("div",{name:"MuiMobileStepper",slot:"Dot",shouldForwardProp:e=>(0,Da.A)(e)&&"dotActive"!==e,overridesResolver:(e,t)=>{const{dotActive:r}=e;return[t.dot,r&&t.dotActive]}})((({theme:e,ownerState:t,dotActive:r})=>(0,E.A)({},"dots"===t.variant&&(0,E.A)({transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"},r&&{backgroundColor:(e.vars||e).palette.primary.main})))),$a=(0,H.Ay)(Qi.A,{name:"MuiMobileStepper",slot:"Progress",overridesResolver:(e,t)=>t.progress})((({ownerState:e})=>(0,E.A)({},"progress"===e.variant&&{width:"50%"}))),Va=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiMobileStepper"}),{activeStep:n=0,backButton:o,className:i,LinearProgressProps:a,nextButton:s,position:l="bottom",steps:c,variant:u="dots"}=r,d=(0,T.A)(r,za),f=(0,E.A)({},r,{activeStep:n,position:l,variant:u});let p;"progress"===u&&(p=1===c?100:Math.ceil(n/(c-1)*100));const h=(e=>{const{classes:t,position:r}=e,n={root:["root",`position${(0,dt.A)(r)}`],dots:["dots"],dot:["dot"],dotActive:["dotActive"],progress:["progress"]};return(0,Xe.A)(n,Na,t)})(f);return(0,te.jsxs)(Ba,(0,E.A)({square:!0,elevation:0,className:(0,qe.A)(h.root,i),ref:t,ownerState:f},d,{children:[o,"text"===u&&(0,te.jsxs)(K.Fragment,{children:[n+1," / ",c]}),"dots"===u&&(0,te.jsx)(ja,{ownerState:f,className:h.dots,children:[...new Array(c)].map(((e,t)=>(0,te.jsx)(Ua,{className:(0,qe.A)(h.dot,t===n&&h.dotActive),ownerState:f,dotActive:t===n},t)))}),"progress"===u&&(0,te.jsx)($a,(0,E.A)({ownerState:f,className:h.progress,variant:"determinate",value:p},a)),s]}))}));var Ga=r("fEft"),Ha=r("bEEB"),Wa=r("82Iz"),qa=r("1ODS"),Xa=r("smxg"),Za=r("F/mX");const Ya=["className","children","classes","IconComponent","input","inputProps","variant"],Ka=["root"],Ja=(0,te.jsx)(Hi.A,{}),Qa=K.forwardRef((function(e,t){const r=(0,Ze.b)({name:"MuiNativeSelect",props:e}),{className:n,children:o,classes:i={},IconComponent:a=Xa.A,input:s=Ja,inputProps:l}=r,c=(0,T.A)(r,Ya),u=(0,eo.A)(),d=(0,qa.A)({props:r,muiFormControl:u,states:["variant"]}),f=(e=>{const{classes:t}=e;return(0,Xe.A)({root:["root"]},Za.w,t)})((0,E.A)({},r,{classes:i})),p=(0,T.A)(i,Ka);return(0,te.jsx)(K.Fragment,{children:K.cloneElement(s,(0,E.A)({inputComponent:Wa.Ay,inputProps:(0,E.A)({children:o,classes:p,IconComponent:a,variant:d.variant,type:void 0},l,s?s.props.inputProps:{}),ref:t},c,{className:(0,qe.A)(f.root,s.props.className,n)}))})}));Qa.muiName="Select";const es=Qa;var ts=r("XgeM");const rs=function(e){const{children:t,defer:r=!1,fallback:n=null}=e,[o,i]=K.useState(!1);return(0,ts.A)((()=>{r||i(!0)}),[r]),K.useEffect((()=>{r&&i(!0)}),[r]),(0,te.jsx)(K.Fragment,{children:o?t:n})};var ns=r("6j3M"),os=r("y9Q0");function is(e){return(0,Ke.Ay)("MuiPagination",e)}const as=(0,Ye.A)("MuiPagination",["root","ul","outlined","text"]);var ss=r("leBO");const ls=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];function cs(e={}){const{boundaryCount:t=1,componentName:r="usePagination",count:n=1,defaultPage:o=1,disabled:i=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:d=!1,siblingCount:f=1}=e,p=(0,T.A)(e,ls),[h,m]=(0,ss.A)({controlled:c,default:o,name:r,state:"page"}),g=(e,t)=>{c||m(t),l&&l(e,t)},y=(e,t)=>{const r=t-e+1;return Array.from({length:r},((t,r)=>e+r))},v=y(1,Math.min(t,n)),b=y(Math.max(n-t+1,t+1),n),_=Math.max(Math.min(h-f,n-t-2*f-1),t+2),x=Math.min(Math.max(h+f,t+2*f+2),b.length>0?b[0]-2:n-1),w=[...u?["first"]:[],...s?[]:["previous"],...v,..._>t+2?["start-ellipsis"]:t+1t?[n-t]:[],...b,...a?[]:["next"],...d?["last"]:[]],A=e=>{switch(e){case"first":return 1;case"previous":return h-1;case"next":return h+1;case"last":return n;default:return null}},S=w.map((e=>"number"==typeof e?{onClick:t=>{g(t,e)},type:"page",page:e,selected:e===h,disabled:i,"aria-current":e===h?"true":void 0}:{onClick:t=>{g(t,A(e))},type:e,page:A(e),selected:!1,disabled:i||-1===e.indexOf("ellipsis")&&("next"===e||"last"===e?h>=n:h<=1)}));return(0,E.A)({items:S},p)}function us(e){return(0,Ke.Ay)("MuiPaginationItem",e)}const ds=(0,Ye.A)("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]);var fs=r("Be/P"),ps=r("/0Dp");const hs=(0,Wt.A)((0,te.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),ms=(0,Wt.A)((0,te.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),gs=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],ys=(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,dt.A)(r.size)}`],"text"===r.variant&&t[`text${(0,dt.A)(r.color)}`],"outlined"===r.variant&&t[`outlined${(0,dt.A)(r.color)}`],"rounded"===r.shape&&t.rounded,"page"===r.type&&t.page,("start-ellipsis"===r.type||"end-ellipsis"===r.type)&&t.ellipsis,("previous"===r.type||"next"===r.type)&&t.previousNext,("first"===r.type||"last"===r.type)&&t.firstLast]},vs=(0,H.Ay)("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:ys})((({theme:e,ownerState:t})=>(0,E.A)({},e.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${ds.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"small"===t.size&&{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===t.size&&{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:e.typography.pxToRem(15)}))),bs=(0,H.Ay)(Dt.A,{name:"MuiPaginationItem",slot:"Root",overridesResolver:ys})((({theme:e,ownerState:t})=>(0,E.A)({},e.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${ds.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ds.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ds.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,ve.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${ds.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,ve.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${ds.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}}},"small"===t.size&&{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===t.size&&{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:e.typography.pxToRem(15)},"rounded"===t.shape&&{borderRadius:(e.vars||e).shape.borderRadius})),(({theme:e,ownerState:t})=>(0,E.A)({},"text"===t.variant&&{[`&.${ds.selected}`]:(0,E.A)({},"standard"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}},[`&.${ds.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}},{[`&.${ds.disabled}`]:{color:(e.vars||e).palette.action.disabled}})},"outlined"===t.variant&&{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${ds.selected}`]:(0,E.A)({},"standard"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:(0,ve.X4)(e.palette[t.color].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:(0,ve.X4)(e.palette[t.color].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,ve.X4)(e.palette[t.color].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ds.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,ve.X4)(e.palette[t.color].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}},{[`&.${ds.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}})}))),_s=(0,H.Ay)("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})((({theme:e,ownerState:t})=>(0,E.A)({fontSize:e.typography.pxToRem(20),margin:"0 -8px"},"small"===t.size&&{fontSize:e.typography.pxToRem(18)},"large"===t.size&&{fontSize:e.typography.pxToRem(22)}))),xs=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiPaginationItem"}),{className:n,color:o="standard",component:i,components:a={},disabled:s=!1,page:l,selected:c=!1,shape:u="circular",size:d="medium",slots:f={},type:p="page",variant:h="text"}=r,m=(0,T.A)(r,gs),g=(0,E.A)({},r,{color:o,disabled:s,selected:c,shape:u,size:d,type:p,variant:h}),y=(0,kn.I)(),v=(e=>{const{classes:t,color:r,disabled:n,selected:o,size:i,shape:a,type:s,variant:l}=e,c={root:["root",`size${(0,dt.A)(i)}`,l,a,"standard"!==r&&`color${(0,dt.A)(r)}`,"standard"!==r&&`${l}${(0,dt.A)(r)}`,n&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return(0,Xe.A)(c,us,t)})(g),b=(y?{previous:f.next||a.next||ms,next:f.previous||a.previous||hs,last:f.first||a.first||fs.A,first:f.last||a.last||ps.A}:{previous:f.previous||a.previous||hs,next:f.next||a.next||ms,first:f.first||a.first||fs.A,last:f.last||a.last||ps.A})[p];return"start-ellipsis"===p||"end-ellipsis"===p?(0,te.jsx)(vs,{ref:t,ownerState:g,className:(0,qe.A)(v.root,n),children:"…"}):(0,te.jsxs)(bs,(0,E.A)({ref:t,ownerState:g,component:i,disabled:s,className:(0,qe.A)(v.root,n)},m,{children:["page"===p&&l,b?(0,te.jsx)(_s,{as:b,ownerState:g,className:v.icon}):null]}))})),ws=xs,As=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],Ss=(0,H.Ay)("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant]]}})({}),Cs=(0,H.Ay)("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function Es(e,t,r){return"page"===e?`${r?"":"Go to "}page ${t}`:`Go to ${e} page`}const Ts=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiPagination"}),{boundaryCount:n=1,className:o,color:i="standard",count:a=1,defaultPage:s=1,disabled:l=!1,getItemAriaLabel:c=Es,hideNextButton:u=!1,hidePrevButton:d=!1,renderItem:f=e=>(0,te.jsx)(ws,(0,E.A)({},e)),shape:p="circular",showFirstButton:h=!1,showLastButton:m=!1,siblingCount:g=1,size:y="medium",variant:v="text"}=r,b=(0,T.A)(r,As),{items:_}=cs((0,E.A)({},r,{componentName:"Pagination"})),x=(0,E.A)({},r,{boundaryCount:n,color:i,count:a,defaultPage:s,disabled:l,getItemAriaLabel:c,hideNextButton:u,hidePrevButton:d,renderItem:f,shape:p,showFirstButton:h,showLastButton:m,siblingCount:g,size:y,variant:v}),w=(e=>{const{classes:t,variant:r}=e,n={root:["root",r],ul:["ul"]};return(0,Xe.A)(n,is,t)})(x);return(0,te.jsx)(Ss,(0,E.A)({"aria-label":"pagination navigation",className:(0,qe.A)(w.root,o),ownerState:x,ref:t},b,{children:(0,te.jsx)(Cs,{className:w.ul,ownerState:x,children:_.map(((e,t)=>(0,te.jsx)("li",{children:f((0,E.A)({},e,{color:i,"aria-label":c(e.type,e.page,e.selected),shape:p,size:y,variant:v}))},t)))})}))}));var Is=r("ntv0"),ks=r("FZC7"),Ms=r("NzyO"),Rs=r("usZy"),Ps=r("zFdC"),Os=r("Cc46"),Ls=r("d4Oc"),Ds=r("N7Sv"),Ns=r("zjqC"),Fs=r("l+/q"),zs=r("brkH"),Bs=r("5cFC"),js=r("r/ya"),Us=r("DSU1"),$s=r("1vOf");const Vs=(0,Wt.A)((0,te.jsx)("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),Gs=(0,Wt.A)((0,te.jsx)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder");function Hs(e){return(0,Ke.Ay)("MuiRating",e)}const Ws=(0,Ye.A)("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]),qs=["value"],Xs=["className","defaultValue","disabled","emptyIcon","emptyLabelText","getLabelText","highlightSelectedOnly","icon","IconContainerComponent","max","name","onChange","onChangeActive","onMouseLeave","onMouseMove","precision","readOnly","size","value"];function Zs(e,t){if(null==e)return e;const r=Math.round(e/t)*t;return Number(r.toFixed(function(e){const t=e.toString().split(".")[1];return t?t.length:0}(t)))}const Ys=(0,H.Ay)("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Ws.visuallyHidden}`]:t.visuallyHidden},t.root,t[`size${(0,dt.A)(r.size)}`],r.readOnly&&t.readOnly]}})((({theme:e,ownerState:t})=>(0,E.A)({display:"inline-flex",position:"relative",fontSize:e.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",width:"min-content",WebkitTapHighlightColor:"transparent",[`&.${Ws.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Ws.focusVisible} .${Ws.iconActive}`]:{outline:"1px solid #999"},[`& .${Ws.visuallyHidden}`]:js.A},"small"===t.size&&{fontSize:e.typography.pxToRem(18)},"large"===t.size&&{fontSize:e.typography.pxToRem(30)},t.readOnly&&{pointerEvents:"none"}))),Ks=(0,H.Ay)("label",{name:"MuiRating",slot:"Label",overridesResolver:({ownerState:e},t)=>[t.label,e.emptyValueFocused&&t.labelEmptyValueActive]})((({ownerState:e})=>(0,E.A)({cursor:"inherit"},e.emptyValueFocused&&{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"}))),Js=(0,H.Ay)("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.iconEmpty&&t.iconEmpty,r.iconFilled&&t.iconFilled,r.iconHover&&t.iconHover,r.iconFocus&&t.iconFocus,r.iconActive&&t.iconActive]}})((({theme:e,ownerState:t})=>(0,E.A)({display:"flex",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),pointerEvents:"none"},t.iconActive&&{transform:"scale(1.2)"},t.iconEmpty&&{color:(e.vars||e).palette.action.disabled}))),Qs=(0,H.Ay)("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>(0,Da.A)(e)&&"iconActive"!==e,overridesResolver:(e,t)=>{const{iconActive:r}=e;return[t.decimal,r&&t.iconActive]}})((({iconActive:e})=>(0,E.A)({position:"relative"},e&&{transform:"scale(1.2)"})));function el(e){const t=(0,T.A)(e,qs);return(0,te.jsx)("span",(0,E.A)({},t))}function tl(e){const{classes:t,disabled:r,emptyIcon:n,focus:o,getLabelText:i,highlightSelectedOnly:a,hover:s,icon:l,IconContainerComponent:c,isActive:u,itemValue:d,labelProps:f,name:p,onBlur:h,onChange:m,onClick:g,onFocus:y,readOnly:v,ownerState:b,ratingValue:_,ratingValueRounded:x}=e,w=a?d===_:d<=_,A=d<=s,S=d<=o,C=d===x,T=(0,Us.A)(),I=(0,te.jsx)(Js,{as:c,value:d,className:(0,qe.A)(t.icon,w?t.iconFilled:t.iconEmpty,A&&t.iconHover,S&&t.iconFocus,u&&t.iconActive),ownerState:(0,E.A)({},b,{iconEmpty:!w,iconFilled:w,iconHover:A,iconFocus:S,iconActive:u}),children:n&&!w?n:l});return v?(0,te.jsx)("span",(0,E.A)({},f,{children:I})):(0,te.jsxs)(K.Fragment,{children:[(0,te.jsxs)(Ks,(0,E.A)({ownerState:(0,E.A)({},b,{emptyValueFocused:void 0}),htmlFor:T},f,{children:[I,(0,te.jsx)("span",{className:t.visuallyHidden,children:i(d)})]})),(0,te.jsx)("input",{className:t.visuallyHidden,onFocus:y,onBlur:h,onChange:m,onClick:g,disabled:r,value:d,id:T,type:"radio",name:p,checked:C})]})}const rl=(0,te.jsx)(Vs,{fontSize:"inherit"}),nl=(0,te.jsx)(Gs,{fontSize:"inherit"});function ol(e){return`${e} Star${1!==e?"s":""}`}const il=K.forwardRef((function(e,t){const r=(0,Ze.b)({name:"MuiRating",props:e}),{className:n,defaultValue:o=null,disabled:i=!1,emptyIcon:a=nl,emptyLabelText:s="Empty",getLabelText:l=ol,highlightSelectedOnly:c=!1,icon:u=rl,IconContainerComponent:d=el,max:f=5,name:p,onChange:h,onChangeActive:m,onMouseLeave:g,onMouseMove:y,precision:v=1,readOnly:b=!1,size:_="medium",value:x}=r,w=(0,T.A)(r,Xs),A=(0,Us.A)(p),[S,C]=(0,$s.A)({controlled:x,default:o,name:"Rating"}),I=Zs(S,v),k=(0,kn.I)(),[{hover:M,focus:R},P]=K.useState({hover:-1,focus:-1});let O=I;-1!==M&&(O=M),-1!==R&&(O=R);const{isFocusVisibleRef:L,onBlur:D,onFocus:N,ref:F}=(0,ta.A)(),[z,B]=K.useState(!1),j=K.useRef(),U=(0,ra.A)(F,j,t),$=e=>{let t=""===e.target.value?null:parseFloat(e.target.value);-1!==M&&(t=M),C(t),h&&h(e,t)},V=e=>{0===e.clientX&&0===e.clientY||(P({hover:-1,focus:-1}),C(null),h&&parseFloat(e.target.value)===I&&h(e,null))},G=e=>{N(e),!0===L.current&&B(!0);const t=parseFloat(e.target.value);P((e=>({hover:e.hover,focus:t})))},H=e=>{-1===M&&(D(e),!1===L.current&&B(!1),P((e=>({hover:e.hover,focus:-1}))))},[W,q]=K.useState(!1),X=(0,E.A)({},r,{defaultValue:o,disabled:i,emptyIcon:a,emptyLabelText:s,emptyValueFocused:W,focusVisible:z,getLabelText:l,icon:u,IconContainerComponent:d,max:f,precision:v,readOnly:b,size:_}),Z=(e=>{const{classes:t,size:r,readOnly:n,disabled:o,emptyValueFocused:i,focusVisible:a}=e,s={root:["root",`size${(0,dt.A)(r)}`,o&&"disabled",a&&"focusVisible",n&&"readOnly"],label:["label","pristine"],labelEmptyValue:[i&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]};return(0,Xe.A)(s,Hs,t)})(X);return(0,te.jsxs)(Ys,(0,E.A)({ref:U,onMouseMove:e=>{y&&y(e);const t=j.current,{right:r,left:n,width:o}=t.getBoundingClientRect();let i;i=k?(r-e.clientX)/o:(e.clientX-n)/o;let a=Zs(f*i+v/2,v);a=(0,Bs.A)(a,v,f),P((e=>e.hover===a&&e.focus===a?e:{hover:a,focus:a})),B(!1),m&&M!==a&&m(e,a)},onMouseLeave:e=>{g&&g(e),P({hover:-1,focus:-1}),m&&-1!==M&&m(e,-1)},className:(0,qe.A)(Z.root,n,b&&"MuiRating-readOnly"),ownerState:X,role:b?"img":null,"aria-label":b?l(O):null},w,{children:[Array.from(new Array(f)).map(((e,t)=>{const r=t+1,n={classes:Z,disabled:i,emptyIcon:a,focus:R,getLabelText:l,highlightSelectedOnly:c,hover:M,icon:u,IconContainerComponent:d,name:A,onBlur:H,onChange:$,onClick:V,onFocus:G,ratingValue:O,ratingValueRounded:I,readOnly:b,ownerState:X},o=r===Math.ceil(O)&&(-1!==M||-1!==R);if(v<1){const e=Array.from(new Array(1/v));return(0,te.jsx)(Qs,{className:(0,qe.A)(Z.decimal,o&&Z.iconActive),ownerState:X,iconActive:o,children:e.map(((t,o)=>{const i=Zs(r-1+(o+1)*v,v);return(0,te.jsx)(tl,(0,E.A)({},n,{isActive:!1,itemValue:i,labelProps:{style:e.length-1===o?{}:{width:i===O?(o+1)*v*100+"%":"0%",overflow:"hidden",position:"absolute"}}}),i)}))},r)}return(0,te.jsx)(tl,(0,E.A)({},n,{isActive:o,itemValue:r}),r)})),!b&&!i&&(0,te.jsxs)(Ks,{className:(0,qe.A)(Z.label,Z.labelEmptyValue),ownerState:X,children:[(0,te.jsx)("input",{className:Z.visuallyHidden,value:"",id:`${A}-empty`,type:"radio",name:A,checked:null==I,onFocus:()=>q(!0),onBlur:()=>q(!1),onChange:$}),(0,te.jsx)("span",{className:Z.visuallyHidden,children:s})]})]}))}));var al=r("f/6o"),sl=r("c5OB"),ll=r("AAK8"),cl=r("tNc0"),ul=r("tAhU"),dl=r("ioAD"),fl=r("3YeO"),pl=r("ZROH"),hl=r("6dIc"),ml=r("YoCR"),gl=r("ESRK"),yl=r("YE/p"),vl=r("J13E"),bl=r("XOob"),_l=r("AiGX");const xl=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],wl={entering:{transform:"none"},entered:{transform:"none"}},Al=K.forwardRef((function(e,t){const r=(0,V.A)(),n={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:h,style:m,timeout:g=n,TransitionComponent:y=bl.Ay}=e,v=(0,T.A)(e,xl),b=K.useRef(null),_=(0,ra.A)(b,a.ref,t),x=e=>t=>{if(e){const r=b.current;void 0===t?e(r):e(r,t)}},w=x(d),A=x(((e,t)=>{(0,_l.q)(e);const n=(0,_l.c)({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=r.transitions.create("transform",n),e.style.transition=r.transitions.create("transform",n),c&&c(e,t)})),S=x(u),C=x(h),I=x((e=>{const t=(0,_l.c)({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=r.transitions.create("transform",t),e.style.transition=r.transitions.create("transform",t),f&&f(e)})),k=x(p);return(0,te.jsx)(y,(0,E.A)({appear:i,in:l,nodeRef:b,onEnter:A,onEntered:S,onEntering:w,onExit:I,onExited:k,onExiting:C,addEndListener:e=>{o&&o(b.current,e)},timeout:g},v,{children:(e,t)=>K.cloneElement(a,(0,E.A)({style:(0,E.A)({transform:"scale(0)",visibility:"exited"!==e||l?void 0:"hidden"},wl[e],m,a.props.style),ref:_},t))}))})),Sl=Al;function Cl(e){return(0,Ke.Ay)("MuiSpeedDial",e)}const El=(0,Ye.A)("MuiSpeedDial",["root","fab","directionUp","directionDown","directionLeft","directionRight","actions","actionsClosed"]),Tl=["ref"],Il=["ariaLabel","FabProps","children","className","direction","hidden","icon","onBlur","onClose","onFocus","onKeyDown","onMouseEnter","onMouseLeave","onOpen","open","openIcon","TransitionComponent","transitionDuration","TransitionProps"],kl=["ref"];function Ml(e){return"up"===e||"down"===e?"vertical":"right"===e||"left"===e?"horizontal":void 0}const Rl=(0,H.Ay)("div",{name:"MuiSpeedDial",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`direction${(0,dt.A)(r.direction)}`]]}})((({theme:e,ownerState:t})=>(0,E.A)({zIndex:(e.vars||e).zIndex.speedDial,display:"flex",alignItems:"center",pointerEvents:"none"},"up"===t.direction&&{flexDirection:"column-reverse",[`& .${El.actions}`]:{flexDirection:"column-reverse",marginBottom:-32,paddingBottom:48}},"down"===t.direction&&{flexDirection:"column",[`& .${El.actions}`]:{flexDirection:"column",marginTop:-32,paddingTop:48}},"left"===t.direction&&{flexDirection:"row-reverse",[`& .${El.actions}`]:{flexDirection:"row-reverse",marginRight:-32,paddingRight:48}},"right"===t.direction&&{flexDirection:"row",[`& .${El.actions}`]:{flexDirection:"row",marginLeft:-32,paddingLeft:48}}))),Pl=(0,H.Ay)(Zn,{name:"MuiSpeedDial",slot:"Fab",overridesResolver:(e,t)=>t.fab})((()=>({pointerEvents:"auto"}))),Ol=(0,H.Ay)("div",{name:"MuiSpeedDial",slot:"Actions",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.actions,!r.open&&t.actionsClosed]}})((({ownerState:e})=>(0,E.A)({display:"flex",pointerEvents:"auto"},!e.open&&{transition:"top 0s linear 0.2s",pointerEvents:"none"}))),Ll=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiSpeedDial"}),n=(0,V.A)(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{ariaLabel:i,FabProps:{ref:a}={},children:s,className:l,direction:c="up",hidden:u=!1,icon:d,onBlur:f,onClose:p,onFocus:h,onKeyDown:m,onMouseEnter:g,onMouseLeave:y,onOpen:v,open:b,TransitionComponent:_=Sl,transitionDuration:x=o,TransitionProps:w}=r,A=(0,T.A)(r.FabProps,Tl),S=(0,T.A)(r,Il),[C,I]=(0,$s.A)({controlled:b,default:!1,name:"SpeedDial",state:"open"}),k=(0,E.A)({},r,{open:C,direction:c}),M=(e=>{const{classes:t,open:r,direction:n}=e,o={root:["root",`direction${(0,dt.A)(n)}`],fab:["fab"],actions:["actions",!r&&"actionsClosed"]};return(0,Xe.A)(o,Cl,t)})(k),R=(0,vl.A)(),P=K.useRef(0),O=K.useRef(),L=K.useRef([]);L.current=[L.current[0]];const D=K.useCallback((e=>{L.current[0]=e}),[]),N=(0,ra.A)(a,D),F=(e,t)=>r=>{L.current[e+1]=r,t&&t(r)};K.useEffect((()=>{C||(P.current=0,O.current=void 0)}),[C]);const z=e=>{"mouseleave"===e.type&&y&&y(e),"blur"===e.type&&f&&f(e),R.clear(),"blur"===e.type?R.start(0,(()=>{I(!1),p&&p(e,"blur")})):(I(!1),p&&p(e,"mouseLeave"))},B=e=>{"mouseenter"===e.type&&g&&g(e),"focus"===e.type&&h&&h(e),R.clear(),C||R.start(0,(()=>{I(!0),v&&v(e,{focus:"focus",mouseenter:"mouseEnter"}[e.type])}))},j=i.replace(/^[^a-z]+|[^\w:.-]+/gi,""),U=K.Children.toArray(s).filter((e=>K.isValidElement(e))),$=U.map(((e,t)=>{const r=e.props,{FabProps:{ref:n}={},tooltipPlacement:o}=r,i=(0,T.A)(r.FabProps,kl),a=o||("vertical"===Ml(c)?"left":"top");return K.cloneElement(e,{FabProps:(0,E.A)({},i,{ref:F(t,n)}),delay:30*(C?t:U.length-t),open:C,tooltipPlacement:a,id:`${j}-action-${t}`})}));return(0,te.jsxs)(Rl,(0,E.A)({className:(0,qe.A)(M.root,l),ref:t,role:"presentation",onKeyDown:e=>{m&&m(e);const t=e.key.replace("Arrow","").toLowerCase(),{current:r=t}=O;if("Escape"===e.key)return I(!1),L.current[0].focus(),void(p&&p(e,"escapeKeyDown"));if(Ml(t)===Ml(r)&&void 0!==Ml(t)){e.preventDefault();const n=t===r?1:-1,o=(0,Bs.A)(P.current+n,0,L.current.length-1);L.current[o].focus(),P.current=o,O.current=r}},onBlur:z,onFocus:B,onMouseEnter:B,onMouseLeave:z,ownerState:k},S,{children:[(0,te.jsx)(_,(0,E.A)({in:!u,timeout:x,unmountOnExit:!0},w,{children:(0,te.jsx)(Pl,(0,E.A)({color:"primary","aria-label":i,"aria-haspopup":"true","aria-expanded":C,"aria-controls":`${j}-actions`},A,{onClick:e=>{A.onClick&&A.onClick(e),R.clear(),C?(I(!1),p&&p(e,"toggle")):(I(!0),v&&v(e,"toggle"))},className:(0,qe.A)(M.fab,A.className),ref:N,ownerState:k,children:K.isValidElement(d)&&(0,ki.A)(d,["SpeedDialIcon"])?K.cloneElement(d,{open:C}):d}))})),(0,te.jsx)(Ol,{id:`${j}-actions`,role:"menu","aria-orientation":Ml(c),className:(0,qe.A)(M.actions,!C&&M.actionsClosed),ownerState:k,children:$})]}))}));var Dl=r("vH+6");function Nl(e){return(0,Ke.Ay)("MuiSpeedDialAction",e)}const Fl=(0,Ye.A)("MuiSpeedDialAction",["fab","fabClosed","staticTooltip","staticTooltipClosed","staticTooltipLabel","tooltipPlacementLeft","tooltipPlacementRight"]),zl=["className","delay","FabProps","icon","id","open","TooltipClasses","tooltipOpen","tooltipPlacement","tooltipTitle"],Bl=(0,H.Ay)(Zn,{name:"MuiSpeedDialAction",slot:"Fab",skipVariantsResolver:!1,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.fab,!r.open&&t.fabClosed]}})((({theme:e,ownerState:t})=>(0,E.A)({margin:8,color:(e.vars||e).palette.text.secondary,backgroundColor:(e.vars||e).palette.background.paper,"&:hover":{backgroundColor:e.vars?e.vars.palette.SpeedDialAction.fabHoverBg:(0,ve.tL)(e.palette.background.paper,.15)},transition:`${e.transitions.create("transform",{duration:e.transitions.duration.shorter})}, opacity 0.8s`,opacity:1},!t.open&&{opacity:0,transform:"scale(0)"}))),jl=(0,H.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.staticTooltip,!r.open&&t.staticTooltipClosed,t[`tooltipPlacement${(0,dt.A)(r.tooltipPlacement)}`]]}})((({theme:e,ownerState:t})=>({position:"relative",display:"flex",alignItems:"center",[`& .${Fl.staticTooltipLabel}`]:(0,E.A)({transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.shorter}),opacity:1},!t.open&&{opacity:0,transform:"scale(0.5)"},"left"===t.tooltipPlacement&&{transformOrigin:"100% 50%",right:"100%",marginRight:8},"right"===t.tooltipPlacement&&{transformOrigin:"0% 50%",left:"100%",marginLeft:8})}))),Ul=(0,H.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltipLabel",overridesResolver:(e,t)=>t.staticTooltipLabel})((({theme:e})=>(0,E.A)({position:"absolute"},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.paper,borderRadius:(e.vars||e).shape.borderRadius,boxShadow:(e.vars||e).shadows[1],color:(e.vars||e).palette.text.secondary,padding:"4px 16px",wordBreak:"keep-all"}))),$l=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiSpeedDialAction"}),{className:n,delay:o=0,FabProps:i={},icon:a,id:s,open:l,TooltipClasses:c,tooltipOpen:u=!1,tooltipPlacement:d="left",tooltipTitle:f}=r,p=(0,T.A)(r,zl),h=(0,E.A)({},r,{tooltipPlacement:d}),m=(e=>{const{open:t,tooltipPlacement:r,classes:n}=e,o={fab:["fab",!t&&"fabClosed"],staticTooltip:["staticTooltip",`tooltipPlacement${(0,dt.A)(r)}`,!t&&"staticTooltipClosed"],staticTooltipLabel:["staticTooltipLabel"]};return(0,Xe.A)(o,Nl,n)})(h),[g,y]=K.useState(u),v={transitionDelay:`${o}ms`},b=(0,te.jsx)(Bl,(0,E.A)({size:"small",className:(0,qe.A)(m.fab,n),tabIndex:-1,role:"menuitem",ownerState:h},i,{style:(0,E.A)({},v,i.style),children:a}));return u?(0,te.jsxs)(jl,(0,E.A)({id:s,ref:t,className:m.staticTooltip,ownerState:h},p,{children:[(0,te.jsx)(Ul,{style:v,id:`${s}-label`,className:m.staticTooltipLabel,ownerState:h,children:f}),K.cloneElement(b,{"aria-labelledby":`${s}-label`})]})):(!l&&g&&y(!1),(0,te.jsx)(Dl.A,(0,E.A)({id:s,ref:t,title:f,placement:d,onClose:()=>{y(!1)},onOpen:()=>{y(!0)},open:l&&g,classes:c},p,{children:b})))})),Vl=(0,Wt.A)((0,te.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");function Gl(e){return(0,Ke.Ay)("MuiSpeedDialIcon",e)}const Hl=(0,Ye.A)("MuiSpeedDialIcon",["root","icon","iconOpen","iconWithOpenIconOpen","openIcon","openIconOpen"]),Wl=["className","icon","open","openIcon"],ql=(0,H.Ay)("span",{name:"MuiSpeedDialIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Hl.icon}`]:t.icon},{[`& .${Hl.icon}`]:r.open&&t.iconOpen},{[`& .${Hl.icon}`]:r.open&&r.openIcon&&t.iconWithOpenIconOpen},{[`& .${Hl.openIcon}`]:t.openIcon},{[`& .${Hl.openIcon}`]:r.open&&t.openIconOpen},t.root]}})((({theme:e,ownerState:t})=>({height:24,[`& .${Hl.icon}`]:(0,E.A)({transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.short})},t.open&&(0,E.A)({transform:"rotate(45deg)"},t.openIcon&&{opacity:0})),[`& .${Hl.openIcon}`]:(0,E.A)({position:"absolute",transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.short}),opacity:0,transform:"rotate(-45deg)"},t.open&&{transform:"rotate(0deg)",opacity:1})}))),Xl=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiSpeedDialIcon"}),{className:n,icon:o,openIcon:i}=r,a=(0,T.A)(r,Wl),s=r,l=(e=>{const{classes:t,open:r,openIcon:n}=e,o={root:["root"],icon:["icon",r&&"iconOpen",n&&r&&"iconWithOpenIconOpen"],openIcon:["openIcon",r&&"openIconOpen"]};return(0,Xe.A)(o,Gl,t)})(s);function c(e,t){return K.isValidElement(e)?K.cloneElement(e,{className:t}):e}return(0,te.jsxs)(ql,(0,E.A)({className:(0,qe.A)(l.root,n),ref:t,ownerState:s},a,{children:[i?c(i,l.openIcon):null,o?c(o,l.icon):(0,te.jsx)(Vl,{className:l.icon})]}))}));Xl.muiName="SpeedDialIcon";const Zl=Xl;var Yl=r("1eI8");const Kl=(0,Ye.A)("MuiStack",["root"]);var Jl=r("ovqk"),Ql=r("LRQm"),ec=r("2qWJ"),tc=r("gk3T"),rc=r("pnHt");function nc(e){return(0,Ke.Ay)("MuiStepButton",e)}const oc=(0,Ye.A)("MuiStepButton",["root","horizontal","vertical","touchRipple"]),ic=["children","className","icon","optional"],ac=(0,H.Ay)(Dt.A,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${oc.touchRipple}`]:t.touchRipple},t.root,t[r.orientation]]}})((({ownerState:e})=>(0,E.A)({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},"vertical"===e.orientation&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${oc.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}}))),sc=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiStepButton"}),{children:n,className:o,icon:i,optional:a}=r,s=(0,T.A)(r,ic),{disabled:l,active:c}=K.useContext(ec.A),{orientation:u}=K.useContext(rc.A),d=(0,E.A)({},r,{orientation:u}),f=(e=>{const{classes:t,orientation:r}=e,n={root:["root",r],touchRipple:["touchRipple"]};return(0,Xe.A)(n,nc,t)})(d),p={icon:i,optional:a},h=(0,ki.A)(n,["StepLabel"])?K.cloneElement(n,p):(0,te.jsx)(tc.A,(0,E.A)({},p,{children:n}));return(0,te.jsx)(ac,(0,E.A)({focusRipple:!0,disabled:l,TouchRippleProps:{className:f.touchRipple},className:(0,qe.A)(f.root,o),ref:t,ownerState:d,"aria-current":c?"step":void 0},s,{children:h}))}));var lc=r("5lP7"),cc=r("LiX5");function uc(e){return(0,Ke.Ay)("MuiStepContent",e)}const dc=(0,Ye.A)("MuiStepContent",["root","last","transition"]),fc=["children","className","TransitionComponent","transitionDuration","TransitionProps"],pc=(0,H.Ay)("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.last&&t.last]}})((({ownerState:e,theme:t})=>(0,E.A)({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${"light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"}))),hc=(0,H.Ay)(cn.A,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),mc=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiStepContent"}),{children:n,className:o,TransitionComponent:i=cn.A,transitionDuration:a="auto",TransitionProps:s}=r,l=(0,T.A)(r,fc),{orientation:c}=K.useContext(rc.A),{active:u,last:d,expanded:f}=K.useContext(ec.A),p=(0,E.A)({},r,{last:d}),h=(e=>{const{classes:t,last:r}=e,n={root:["root",r&&"last"],transition:["transition"]};return(0,Xe.A)(n,uc,t)})(p);let m=a;return"auto"!==a||i.muiSupportAuto||(m=void 0),(0,te.jsx)(pc,(0,E.A)({className:(0,qe.A)(h.root,o),ref:t,ownerState:p},l,{children:(0,te.jsx)(hc,(0,E.A)({as:i,in:u||f,className:h.transition,ownerState:p,timeout:m,unmountOnExit:!0},s,{children:n}))}))}));var gc=r("ZI/q"),yc=r("vu6X"),vc=r("09Yx"),bc=r("Y6tj"),_c=r("4UXW"),xc=r("Z6qJ"),wc=r("t32p"),Ac=r("i8i4"),Sc=r("rdfb"),Cc=r("WFZb"),Ec=r("KXty");const Tc=["anchor","classes","className","width","style"],Ic=(0,H.Ay)("div",{shouldForwardProp:Pn.A})((({theme:e,ownerState:t})=>(0,E.A)({position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},"left"===t.anchor&&{right:"auto"},"right"===t.anchor&&{left:"auto",right:0},"top"===t.anchor&&{bottom:"auto",right:0},"bottom"===t.anchor&&{top:"auto",bottom:0,right:0}))),kc=K.forwardRef((function(e,t){const{anchor:r,classes:n={},className:o,width:i,style:a}=e,s=(0,T.A)(e,Tc),l=e;return(0,te.jsx)(Ic,(0,E.A)({className:(0,qe.A)("PrivateSwipeArea-root",n.root,n[`anchor${(0,dt.A)(r)}`],o),ref:t,style:(0,E.A)({[$n(r)?"width":"height"]:i},a),ownerState:l},s))})),Mc=kc,Rc=["BackdropProps"],Pc=["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","allowSwipeInChildren","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"];let Oc=null;function Lc(e,t,r){return"right"===e?r.body.offsetWidth-t[0].pageX:t[0].pageX}function Dc(e,t,r){return"bottom"===e?r.innerHeight-t[0].clientY:t[0].clientY}function Nc(e,t){return e?t.clientWidth:t.clientHeight}function Fc(e,t,r,n){return Math.min(Math.max(r?t-e:n+t-e,0),n)}const zc="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),Bc=K.forwardRef((function(e,t){const r=(0,Ze.b)({name:"MuiSwipeableDrawer",props:e}),n=(0,V.A)(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{anchor:i="left",disableBackdropTransition:a=!1,disableDiscovery:s=!1,disableSwipeToOpen:l=zc,hideBackdrop:c,hysteresis:u=.52,allowSwipeInChildren:d=!1,minFlingVelocity:f=450,ModalProps:{BackdropProps:p}={},onClose:h,onOpen:m,open:g=!1,PaperProps:y={},SwipeAreaProps:v,swipeAreaWidth:b=20,transitionDuration:_=o,variant:x="temporary"}=r,w=(0,T.A)(r.ModalProps,Rc),A=(0,T.A)(r,Pc),[S,C]=K.useState(!1),I=K.useRef({isSwiping:null}),k=K.useRef(),M=K.useRef(),R=K.useRef(),P=(0,ra.A)(y.ref,R),O=K.useRef(!1),L=K.useRef();(0,ti.A)((()=>{L.current=null}),[g]);const D=K.useCallback(((e,t={})=>{const{mode:r=null,changeTransition:o=!0}=t,s=Vn(n,i),l=-1!==["right","bottom"].indexOf(s)?1:-1,u=$n(i),d=u?`translate(${l*e}px, 0)`:`translate(0, ${l*e}px)`,f=R.current.style;f.webkitTransform=d,f.transform=d;let p="";if(r&&(p=n.transitions.create("all",(0,_l.c)({easing:void 0,style:void 0,timeout:_},{mode:r}))),o&&(f.webkitTransition=p,f.transition=p),!a&&!c){const t=M.current.style;t.opacity=1-e/Nc(u,R.current),o&&(t.webkitTransition=p,t.transition=p)}}),[i,a,c,n,_]),N=(0,Ec.A)((e=>{if(!O.current)return;if(Oc=null,O.current=!1,Ac.flushSync((()=>{C(!1)})),!I.current.isSwiping)return void(I.current.isSwiping=null);I.current.isSwiping=null;const t=Vn(n,i),r=$n(i);let o;o=r?Lc(t,e.changedTouches,(0,Sc.A)(e.currentTarget)):Dc(t,e.changedTouches,(0,Cc.A)(e.currentTarget));const a=r?I.current.startX:I.current.startY,s=Nc(r,R.current),l=Fc(o,a,g,s),c=l/s;Math.abs(I.current.velocity)>f&&(L.current=1e3*Math.abs((s-l)/I.current.velocity)),g?I.current.velocity>f||c>u?h():D(0,{mode:"exit"}):I.current.velocity<-f||1-c>u?m():D(Nc(r,R.current),{mode:"enter"})})),F=(e=!1)=>{if(!S){!e&&s&&d||Ac.flushSync((()=>{C(!0)}));const t=$n(i);!g&&R.current&&D(Nc(t,R.current)+(s?15:-20),{changeTransition:!1}),I.current.velocity=0,I.current.lastTime=null,I.current.lastTranslate=null,I.current.paperHit=!1,O.current=!0}},z=(0,Ec.A)((e=>{if(!R.current||!O.current)return;if(null!==Oc&&Oc!==I.current)return;F(!0);const t=Vn(n,i),r=$n(i),o=Lc(t,e.touches,(0,Sc.A)(e.currentTarget)),a=Dc(t,e.touches,(0,Cc.A)(e.currentTarget));if(g&&R.current.contains(e.target)&&null===Oc){const t=function(e,t){const r=[];for(;e&&e!==t.parentElement;){const n=(0,Cc.A)(t).getComputedStyle(e);"absolute"===n.getPropertyValue("position")||"hidden"===n.getPropertyValue("overflow-x")||(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&r.push(e),e=e.parentElement}return r}(e.target,R.current),n=function({domTreeShapes:e,start:t,current:r,anchor:n}){const o={x:"scrollLeft",y:"scrollTop"},i={x:"scrollWidth",y:"scrollHeight"},a={x:"clientWidth",y:"clientHeight"};return e.some((e=>{let s=r>=t;"top"!==n&&"left"!==n||(s=!s);const l="left"===n||"right"===n?"x":"y",c=Math.round(e[o[l]]),u=c>0,d=c+e[a[l]]n&&t>3:n>t&&n>3;if(i&&e.cancelable&&e.preventDefault(),!0===i||(r?n>3:t>3)){if(I.current.isSwiping=i,!i)return void N(e);I.current.startX=o,I.current.startY=a,s||g||(r?I.current.startX-=20:I.current.startY-=20)}}if(!I.current.isSwiping)return;const l=Nc(r,R.current);let c=r?I.current.startX:I.current.startY;g&&!I.current.paperHit&&(c=Math.min(c,l));const u=Fc(r?o:a,c,g,l);if(g)if(I.current.paperHit)0===u&&(I.current.startX=o,I.current.startY=a);else{if(!(r?o{if(e.defaultPrevented)return;if(e.defaultMuiPrevented)return;if(g&&(c||!M.current.contains(e.target))&&!R.current.contains(e.target))return;const t=Vn(n,i),r=$n(i),o=Lc(t,e.touches,(0,Sc.A)(e.currentTarget)),a=Dc(t,e.touches,(0,Cc.A)(e.currentTarget));if(!g){var s;if(l||!(e.target===k.current||null!=(s=R.current)&&s.contains(e.target)&&("function"==typeof d?d(e,k.current,R.current):d)))return;if(r){if(o>b)return}else if(a>b)return}e.defaultMuiPrevented=!0,Oc=null,I.current.startX=o,I.current.startY=a,F()}));return K.useEffect((()=>{if("temporary"===x){const e=(0,Sc.A)(R.current);return e.addEventListener("touchstart",B),e.addEventListener("touchmove",z,{passive:!g}),e.addEventListener("touchend",N),()=>{e.removeEventListener("touchstart",B),e.removeEventListener("touchmove",z,{passive:!g}),e.removeEventListener("touchend",N)}}}),[x,g,B,z,N]),K.useEffect((()=>()=>{Oc===I.current&&(Oc=null)}),[]),K.useEffect((()=>{g||C(!1)}),[g]),(0,te.jsxs)(K.Fragment,{children:[(0,te.jsx)(Gn,(0,E.A)({open:!("temporary"!==x||!S)||g,variant:x,ModalProps:(0,E.A)({BackdropProps:(0,E.A)({},p,{ref:M})},"temporary"===x&&{keepMounted:!0},w),hideBackdrop:c,PaperProps:(0,E.A)({},y,{style:(0,E.A)({pointerEvents:"temporary"!==x||g||d?"":"none"},y.style),ref:P}),anchor:i,transitionDuration:L.current||_,onClose:h,ref:t},A)),!l&&"temporary"===x&&(0,te.jsx)(rs,{children:(0,te.jsx)(Mc,(0,E.A)({anchor:i,ref:k,width:b},v))})]})})),jc=Bc;var Uc=r("YM+J"),$c=r("CIcg"),Vc=r("lZ7h"),Gc=r("/eUX"),Hc=r("GOrD"),Wc=r("qy7K"),qc=r("J1WE"),Xc=r("bXaB"),Zc=r("xqzF"),Yc=r("WeeH"),Kc=r("ZrSb"),Jc=r("7Ep0"),Qc=r("bpaH");function eu(e){return(0,Ke.Ay)("MuiTableFooter",e)}const tu=(0,Ye.A)("MuiTableFooter",["root"]),ru=["className","component"],nu=(0,H.Ay)("tfoot",{name:"MuiTableFooter",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-footer-group"}),ou={variant:"footer"},iu="tfoot",au=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiTableFooter"}),{className:n,component:o=iu}=r,i=(0,T.A)(r,ru),a=(0,E.A)({},r,{component:o}),s=(e=>{const{classes:t}=e;return(0,Xe.A)({root:["root"]},eu,t)})(a);return(0,te.jsx)(Qc.A.Provider,{value:ou,children:(0,te.jsx)(nu,(0,E.A)({as:o,className:(0,qe.A)(s.root,n),ref:t,role:o===iu?null:"rowgroup",ownerState:a},i))})}));var su=r("PjUp"),lu=r("mzdN"),cu=r("iu7o"),uu=r("hwAa"),du=r("VMHA"),fu=r("criW");const pu=(0,Wt.A)((0,te.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function hu(e){return(0,Ke.Ay)("MuiTableSortLabel",e)}const mu=(0,Ye.A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc"]),gu=["active","children","className","direction","hideSortIcon","IconComponent"],yu=(0,H.Ay)(Dt.A,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.active&&t.active]}})((({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${mu.icon}`]:{opacity:.5}},[`&.${mu.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${mu.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}}))),vu=(0,H.Ay)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,t[`iconDirection${(0,dt.A)(r.direction)}`]]}})((({theme:e,ownerState:t})=>(0,E.A)({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},"desc"===t.direction&&{transform:"rotate(0deg)"},"asc"===t.direction&&{transform:"rotate(180deg)"}))),bu=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiTableSortLabel"}),{active:n=!1,children:o,className:i,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=pu}=r,c=(0,T.A)(r,gu),u=(0,E.A)({},r,{active:n,direction:a,hideSortIcon:s,IconComponent:l}),d=(e=>{const{classes:t,direction:r,active:n}=e,o={root:["root",n&&"active"],icon:["icon",`iconDirection${(0,dt.A)(r)}`]};return(0,Xe.A)(o,hu,t)})(u);return(0,te.jsxs)(yu,(0,E.A)({className:(0,qe.A)(d.root,i),component:"span",disableRipple:!0,ownerState:u,ref:t},c,{children:[o,s&&!n?null:(0,te.jsx)(vu,{as:l,className:(0,qe.A)(d.icon),ownerState:u})]}))}));var _u=r("HAvo"),xu=r("D+4I"),wu=r("+asq"),Au=r("EMKz"),Su=r("MGIy"),Cu=r("ndLI"),Eu=r("ICY4"),Tu=r("d70t");function Iu(e){return(0,Ke.Ay)("MuiToggleButton",e)}const ku=(0,Ye.A)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Mu=K.createContext({}),Ru=K.createContext(void 0);function Pu(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}const Ou=["value"],Lu=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],Du=(0,H.Ay)(Dt.A,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`size${(0,dt.A)(r.size)}`]]}})((({theme:e,ownerState:t})=>{let r,n="standard"===t.color?e.palette.text.primary:e.palette[t.color].main;return e.vars&&(n="standard"===t.color?e.vars.palette.text.primary:e.vars.palette[t.color].main,r="standard"===t.color?e.vars.palette.text.primaryChannel:e.vars.palette[t.color].mainChannel),(0,E.A)({},e.typography.button,{borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active},t.fullWidth&&{width:"100%"},{[`&.${ku.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,O.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ku.selected}`]:{color:n,backgroundColor:e.vars?`rgba(${r} / ${e.vars.palette.action.selectedOpacity})`:(0,O.X4)(n,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${r} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,O.X4)(n,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${r} / ${e.vars.palette.action.selectedOpacity})`:(0,O.X4)(n,e.palette.action.selectedOpacity)}}}},"small"===t.size&&{padding:7,fontSize:e.typography.pxToRem(13)},"large"===t.size&&{padding:15,fontSize:e.typography.pxToRem(15)})})),Nu=K.forwardRef((function(e,t){const r=K.useContext(Mu),{value:n}=r,o=(0,T.A)(r,Ou),i=K.useContext(Ru),a=(0,Tu.A)((0,E.A)({},o,{selected:Pu(e.value,n)}),e),s=(0,Ze.b)({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:d=!1,disableFocusRipple:f=!1,fullWidth:p=!1,onChange:h,onClick:m,selected:g,size:y="medium",value:v}=s,b=(0,T.A)(s,Lu),_=(0,E.A)({},s,{color:u,disabled:d,disableFocusRipple:f,fullWidth:p,size:y}),x=(e=>{const{classes:t,fullWidth:r,selected:n,disabled:o,size:i,color:a}=e,s={root:["root",n&&"selected",o&&"disabled",r&&"fullWidth",`size${(0,dt.A)(i)}`,a]};return(0,Xe.A)(s,Iu,t)})(_),w=i||"";return(0,te.jsx)(Du,(0,E.A)({className:(0,qe.A)(o.className,x.root,c,w),disabled:d,focusRipple:!f,ref:t,onClick:e=>{m&&(m(e,v),e.defaultPrevented)||h&&h(e,v)},onChange:h,value:v,ownerState:_,"aria-pressed":g},b,{children:l}))}));function Fu(e){return(0,Ke.Ay)("MuiToggleButtonGroup",e)}const zu=(0,Ye.A)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),Bu=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],ju=(0,H.Ay)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${zu.grouped}`]:t.grouped},{[`& .${zu.grouped}`]:t[`grouped${(0,dt.A)(r.orientation)}`]},{[`& .${zu.firstButton}`]:t.firstButton},{[`& .${zu.lastButton}`]:t.lastButton},{[`& .${zu.middleButton}`]:t.middleButton},t.root,"vertical"===r.orientation&&t.vertical,r.fullWidth&&t.fullWidth]}})((({ownerState:e,theme:t})=>(0,E.A)({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},"vertical"===e.orientation&&{flexDirection:"column"},e.fullWidth&&{width:"100%"},{[`& .${zu.grouped}`]:(0,E.A)({},"horizontal"===e.orientation?{[`&.${zu.selected} + .${zu.grouped}.${zu.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${zu.selected} + .${zu.grouped}.${zu.selected}`]:{borderTop:0,marginTop:0}})},"horizontal"===e.orientation?{[`& .${zu.firstButton},& .${zu.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${zu.lastButton},& .${zu.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${zu.firstButton},& .${zu.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${zu.lastButton},& .${zu.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},"horizontal"===e.orientation?{[`& .${zu.lastButton}.${ku.disabled},& .${zu.middleButton}.${ku.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${zu.lastButton}.${ku.disabled},& .${zu.middleButton}.${ku.disabled}`]:{borderTop:"1px solid transparent"}}))),Uu=K.forwardRef((function(e,t){const r=(0,Ze.b)({props:e,name:"MuiToggleButtonGroup"}),{children:n,className:o,color:i="standard",disabled:a=!1,exclusive:s=!1,fullWidth:l=!1,onChange:c,orientation:u="horizontal",size:d="medium",value:f}=r,p=(0,T.A)(r,Bu),h=(0,E.A)({},r,{disabled:a,fullWidth:l,orientation:u,size:d}),m=(e=>{const{classes:t,orientation:r,fullWidth:n,disabled:o}=e,i={root:["root","vertical"===r&&"vertical",n&&"fullWidth"],grouped:["grouped",`grouped${(0,dt.A)(r)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,Xe.A)(i,Fu,t)})(h),g=K.useCallback(((e,t)=>{if(!c)return;const r=f&&f.indexOf(t);let n;f&&r>=0?(n=f.slice(),n.splice(r,1)):n=f?f.concat(t):[t],c(e,n)}),[c,f]),y=K.useCallback(((e,t)=>{c&&c(e,f===t?null:t)}),[c,f]),v=K.useMemo((()=>({className:m.grouped,onChange:s?y:g,value:f,size:d,fullWidth:l,color:i,disabled:a})),[m.grouped,s,y,g,f,d,l,i,a]),b=ur(n),_=b.length,x=e=>{const t=0===e,r=e===_-1;return t&&r?"":t?m.firstButton:r?m.lastButton:m.middleButton};return(0,te.jsx)(ju,(0,E.A)({role:"group",className:(0,qe.A)(m.root,o),ref:t,ownerState:h},p,{children:(0,te.jsx)(Mu.Provider,{value:v,children:b.map(((e,t)=>(0,te.jsx)(Ru.Provider,{value:x(t),children:e},t)))})}))}));var $u=r("QOiN"),Vu=r("ZgSS"),Gu=r("mJ7p"),Hu=r("zNd+");const Wu=["getTrigger","target"];function qu(e,t){const{disableHysteresis:r=!1,threshold:n=100,target:o}=t,i=e.current;return o&&(e.current=void 0!==o.pageYOffset?o.pageYOffset:o.scrollTop),!(!r&&void 0!==i&&e.currentn}const Xu="undefined"!=typeof window?window:null;function Zu(e={}){const{getTrigger:t=qu,target:r=Xu}=e,n=(0,T.A)(e,Wu),o=K.useRef(),[i,a]=K.useState((()=>t(o,n)));return K.useEffect((()=>{const e=()=>{a(t(o,(0,E.A)({target:r},n)))};return e(),r.addEventListener("scroll",e,{passive:!0}),()=>{r.removeEventListener("scroll",e,{passive:!0})}}),[r,t,JSON.stringify(n)]),i}var Yu=r("SIzN"),Ku=r("qSC9");const Ju="5.16.7",Qu=Number("5"),ed=Number("16"),td=Number("7"),rd=null,nd=Number(void 0)||null},J1Ai:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("xeev"),c=r("Vn7y"),u=r("XM18"),d=r("1vOf"),f=r("7EOP"),p=r("+8pU"),h=r("PYeY"),m=r("TkYO");function g(e){return(0,m.Ay)("PrivateSwitchBase",e)}(0,h.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var y=r("nKUr");const v=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],b=(0,c.Ay)(p.A)((({ownerState:e})=>(0,o.A)({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12}))),_=(0,c.Ay)("input",{shouldForwardProp:u.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),x=i.forwardRef((function(e,t){const{autoFocus:r,checked:i,checkedIcon:c,className:u,defaultChecked:p,disabled:h,disableFocusRipple:m=!1,edge:x=!1,icon:w,id:A,inputProps:S,inputRef:C,name:E,onBlur:T,onChange:I,onFocus:k,readOnly:M,required:R=!1,tabIndex:P,type:O,value:L}=e,D=(0,n.A)(e,v),[N,F]=(0,d.A)({controlled:i,default:Boolean(p),name:"SwitchBase",state:"checked"}),z=(0,f.A)();let B=h;z&&void 0===B&&(B=z.disabled);const j="checkbox"===O||"radio"===O,U=(0,o.A)({},e,{checked:N,disabled:B,disableFocusRipple:m,edge:x}),$=(e=>{const{classes:t,checked:r,disabled:n,edge:o}=e,i={root:["root",r&&"checked",n&&"disabled",o&&`edge${(0,l.A)(o)}`],input:["input"]};return(0,s.A)(i,g,t)})(U);return(0,y.jsxs)(b,(0,o.A)({component:"span",className:(0,a.A)($.root,u),centerRipple:!0,focusRipple:!m,disabled:B,tabIndex:null,role:void 0,onFocus:e=>{k&&k(e),z&&z.onFocus&&z.onFocus(e)},onBlur:e=>{T&&T(e),z&&z.onBlur&&z.onBlur(e)},ownerState:U,ref:t},D,{children:[(0,y.jsx)(_,(0,o.A)({autoFocus:r,checked:i,defaultChecked:p,className:$.input,disabled:B,id:j?A:void 0,name:E,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;F(t),I&&I(e,t)},readOnly:M,ref:C,required:R,ownerState:U,tabIndex:P,type:O},"checkbox"===O&&void 0===L?{}:{value:L},S)),N?c:w]}))}))},smxg:(e,t,r)=>{"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},"2i9d":(e,t,r)=>{"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},"Be/P":(e,t,r)=>{"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage")},Z21g:(e,t,r)=>{"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},"5+C/":(e,t,r)=>{"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")},"/0Dp":(e,t,r)=>{"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("M7pN"),o=r("nKUr");const i=(0,n.A)((0,o.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage")},b4iY:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r("+9dH"),o=r("Nlia"),i=(r("q1tI"),r("hWdM")),a=r("WTO6"),s=r("nKUr");const l=["theme"];function c(e){let{theme:t}=e,r=(0,o.A)(e,l);const c=t[a.A];return(0,s.jsx)(i.A,(0,n.A)({},r,{themeId:c?a.A:void 0,theme:c||t}))}},"4lmL":(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("+9dH");function o(e,t){return(0,n.A)({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}},BlEZ:(e,t,r)=>{"use strict";r.d(t,{D:()=>R,A:()=>P});var n=r("+9dH"),o=r("Nlia"),i=r("KRkT"),a=r("w9Qe"),s=r("9k3N"),l=r("xTOY"),c=r("Tazo"),u=r("4lmL"),d=r("dcYk"),f=r("H00D"),p=r("Xxcx"),h=r("iIhR"),m=r("0XHX"),g=r("A1Zn"),y=r("UG0H"),v=r("8jZn"),b=r("at7f");const _=["mode","contrastThreshold","tonalOffset"],x={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:f.A.white,default:f.A.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:f.A.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:f.A.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function A(e,t,r,n){const o=n.light||n,i=n.dark||1.5*n;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=(0,d.a)(e.main,o):"dark"===t&&(e.dark=(0,d.e$)(e.main,i)))}var S=r("MHkX");function C(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const E=["none",C(0,2,1,-1,0,1,1,0,0,1,3,0),C(0,3,1,-2,0,2,2,0,0,1,5,0),C(0,3,3,-2,0,3,4,0,0,1,8,0),C(0,2,4,-1,0,4,5,0,0,1,10,0),C(0,3,5,-1,0,5,8,0,0,1,14,0),C(0,3,5,-1,0,6,10,0,0,1,18,0),C(0,4,5,-2,0,7,10,1,0,2,16,1),C(0,5,5,-3,0,8,10,1,0,3,14,2),C(0,5,6,-3,0,9,12,1,0,3,16,2),C(0,6,6,-3,0,10,14,1,0,4,18,3),C(0,6,7,-4,0,11,15,1,0,4,20,3),C(0,7,8,-4,0,12,17,2,0,5,22,4),C(0,7,8,-4,0,13,19,2,0,5,24,4),C(0,7,9,-4,0,14,21,2,0,5,26,4),C(0,8,9,-5,0,15,22,2,0,6,28,5),C(0,8,10,-5,0,16,24,2,0,6,30,5),C(0,8,11,-5,0,17,26,2,0,6,32,5),C(0,9,11,-5,0,18,28,2,0,7,34,6),C(0,9,12,-6,0,19,29,2,0,7,36,6),C(0,10,13,-6,0,20,31,3,0,8,38,7),C(0,10,13,-6,0,21,33,3,0,8,40,7),C(0,10,14,-6,0,22,35,3,0,8,42,7),C(0,11,14,-7,0,23,36,3,0,9,44,8),C(0,11,15,-7,0,24,38,3,0,9,46,8)];var T=r("hqVE");const I={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},k=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function M(e={},...t){const{mixins:r={},palette:C={},transitions:M={},typography:R={}}=e,P=(0,o.A)(e,k);if(e.vars)throw new Error((0,i.A)(18));const O=function(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:s=.2}=e,l=(0,o.A)(e,_),c=e.primary||function(e="light"){return"dark"===e?{main:y.A[200],light:y.A[50],dark:y.A[400]}:{main:y.A[700],light:y.A[400],dark:y.A[800]}}(t),u=e.secondary||function(e="light"){return"dark"===e?{main:h.A[200],light:h.A[50],dark:h.A[400]}:{main:h.A[500],light:h.A[300],dark:h.A[700]}}(t),S=e.error||function(e="light"){return"dark"===e?{main:m.A[500],light:m.A[300],dark:m.A[700]}:{main:m.A[700],light:m.A[400],dark:m.A[800]}}(t),C=e.info||function(e="light"){return"dark"===e?{main:v.A[400],light:v.A[300],dark:v.A[700]}:{main:v.A[700],light:v.A[500],dark:v.A[900]}}(t),E=e.success||function(e="light"){return"dark"===e?{main:b.A[400],light:b.A[300],dark:b.A[700]}:{main:b.A[800],light:b.A[500],dark:b.A[900]}}(t),T=e.warning||function(e="light"){return"dark"===e?{main:g.A[400],light:g.A[300],dark:g.A[700]}:{main:"#ed6c02",light:g.A[500],dark:g.A[900]}}(t);function I(e){return(0,d.eM)(e,w.text.primary)>=r?w.text.primary:x.text.primary}const k=({color:e,name:t,mainShade:r=500,lightShade:o=300,darkShade:a=700})=>{if(!(e=(0,n.A)({},e)).main&&e[r]&&(e.main=e[r]),!e.hasOwnProperty("main"))throw new Error((0,i.A)(11,t?` (${t})`:"",r));if("string"!=typeof e.main)throw new Error((0,i.A)(12,t?` (${t})`:"",JSON.stringify(e.main)));return A(e,"light",o,s),A(e,"dark",a,s),e.contrastText||(e.contrastText=I(e.main)),e},M={dark:w,light:x};return(0,a.A)((0,n.A)({common:(0,n.A)({},f.A),mode:t,primary:k({color:c,name:"primary"}),secondary:k({color:u,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:k({color:S,name:"error"}),warning:k({color:T,name:"warning"}),info:k({color:C,name:"info"}),success:k({color:E,name:"success"}),grey:p.A,contrastThreshold:r,getContrastText:I,augmentColor:k,tonalOffset:s},M[t]),l)}(C),L=(0,c.A)(e);let D=(0,a.A)(L,{mixins:(0,u.A)(L.breakpoints,r),palette:O,shadows:E.slice(),typography:(0,S.A)(O,R),transitions:(0,T.Ay)(M),zIndex:(0,n.A)({},I)});return D=(0,a.A)(D,P),D=t.reduce(((e,t)=>(0,a.A)(e,t)),D),D.unstable_sxConfig=(0,n.A)({},s.A,null==P?void 0:P.unstable_sxConfig),D.unstable_sx=function(e){return(0,l.A)({sx:e,theme:this})},D}function R(...e){return M(...e)}const P=M},hqVE:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>u,cz:()=>a,p0:()=>s});var n=r("Nlia"),o=r("+9dH");const i=["duration","easing","delay"],a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return`${Math.round(e)}ms`}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function u(e){const t=(0,o.A)({},a,e.easing),r=(0,o.A)({},s,e.duration);return(0,o.A)({getAutoHeightDuration:c,create:(e=["all"],o={})=>{const{duration:a=r.standard,easing:s=t.easeInOut,delay:c=0}=o;return(0,n.A)(o,i),(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof a?a:l(a)} ${s} ${"string"==typeof c?c:l(c)}`)).join(",")}},e,{easing:t,duration:r})}},MHkX:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r("+9dH"),o=r("Nlia"),i=r("w9Qe");const a=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"],s={textTransform:"uppercase"},l='"Roboto", "Helvetica", "Arial", sans-serif';function c(e,t){const r="function"==typeof t?t(e):t,{fontFamily:c=l,fontSize:u=14,fontWeightLight:d=300,fontWeightRegular:f=400,fontWeightMedium:p=500,fontWeightBold:h=700,htmlFontSize:m=16,allVariants:g,pxToRem:y}=r,v=(0,o.A)(r,a),b=u/14,_=y||(e=>e/m*b+"rem"),x=(e,t,r,o,i)=>{return(0,n.A)({fontFamily:c,fontWeight:e,fontSize:_(t),lineHeight:r},c===l?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5+"em")}:{},i,g);var a},w={h1:x(d,96,1.167,-1.5),h2:x(d,60,1.2,-.5),h3:x(f,48,1.167,0),h4:x(f,34,1.235,.25),h5:x(f,24,1.334,0),h6:x(p,20,1.6,.15),subtitle1:x(f,16,1.75,.15),subtitle2:x(p,14,1.57,.1),body1:x(f,16,1.5,.15),body2:x(f,14,1.43,.15),button:x(p,14,1.75,.4,s),caption:x(f,12,1.66,.4),overline:x(f,12,2.66,1,s),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,i.A)((0,n.A)({htmlFontSize:m,pxToRem:_,fontFamily:c,fontSize:u,fontWeightLight:d,fontWeightRegular:f,fontWeightMedium:p,fontWeightBold:h},w),v,{clone:!1})}},qn7V:(e,t,r)=>{"use strict";function n(e){return String(parseFloat(e)).length===String(e).length}function o(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function i(e){return parseFloat(e)}function a(e){return(t,r)=>{const n=o(t);if(n===r)return t;let a=i(t);"px"!==n&&("em"===n||"rem"===n)&&(a=i(t)*i(e));let s=a;if("px"!==r)if("em"===r)s=a/i(e);else{if("rem"!==r)return t;s=a/i(e)}return parseFloat(s.toFixed(5))+r}}function s({size:e,grid:t}){const r=e-e%t,n=r+t;return e-r{let o=t+s*r;null!==i&&(o=i(o)),a[`@media (min-width:${r}px)`]={[e]:`${Math.round(1e4*o)/1e4}${n}`}})),a}r.d(t,{I3:()=>a,VR:()=>s,a9:()=>n,db:()=>i,l_:()=>o,qW:()=>l,yL:()=>c})},j5nT:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=(0,r("BlEZ").A)()},UwZ0:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)}},WTO6:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n="$$material"},ThEv:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r("+9dH"),o=r("KRkT"),i=r("qn7V");function a(e,t={}){const{breakpoints:r=["sm","md","lg"],disableAlign:a=!1,factor:s=2,variants:l=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]}=t,c=(0,n.A)({},e);c.typography=(0,n.A)({},c.typography);const u=c.typography,d=(0,i.I3)(u.htmlFontSize),f=r.map((e=>c.breakpoints.values[e]));return l.forEach((e=>{const t=u[e];if(!t)return;const r=parseFloat(d(t.fontSize,"rem"));if(r<=1)return;const l=r,c=1+(l-1)/s;let{lineHeight:p}=t;if(!(0,i.a9)(p)&&!a)throw new Error((0,o.A)(6));(0,i.a9)(p)||(p=parseFloat(d(p,"rem"))/parseFloat(r));let h=null;a||(h=e=>(0,i.VR)({size:e,grid:(0,i.qW)({pixels:4,lineHeight:p,htmlFontSize:u.htmlFontSize})})),u[e]=(0,n.A)({},t,(0,i.yL)({cssProperty:"fontSize",min:c,max:l,unit:"rem",breakpoints:f,transform:h}))})),c}},XM18:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("FO2v");const o=e=>(0,n.A)(e)&&"classes"!==e},FO2v:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},Vn7y:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>s});var n=r("c1mR"),o=r("j5nT"),i=r("WTO6"),a=r("XM18");const s=(0,n.Ay)({themeId:i.A,defaultTheme:o.A,rootShouldForwardProp:a.A})},UnQg:(e,t,r)=>{"use strict";r.d(t,{A:()=>a}),r("q1tI");var n=r("aoPf"),o=r("j5nT"),i=r("WTO6");function a(){const e=(0,n.A)(o.A);return e[i.A]||e}},tCRK:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r("sdrl"),o=r("j5nT"),i=r("WTO6");function a({props:e,name:t}){return(0,n.A)({props:e,name:t,defaultTheme:o.A,themeId:i.A})}},AiGX:(e,t,r)=>{"use strict";r.d(t,{c:()=>o,q:()=>n});const n=e=>e.scrollTop;function o(e,t){var r,n;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(r=a.transitionDuration)?r:"number"==typeof o?o:o[t.mode]||0,easing:null!=(n=a.transitionTimingFunction)?n:"object"==typeof i?i[t.mode]:i,delay:a.transitionDelay}}},RI6h:(e,t,r)=>{"use strict";r.d(t,{A:()=>m,Z:()=>d});var n=r("+9dH"),o=r("q1tI"),i=r("A3c4"),a=r("leBO"),s=r("VGa/"),l=r("nXnS"),c=r("1YXj");function u(e){return void 0!==e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function d(e={}){const{ignoreAccents:t=!0,ignoreCase:r=!0,limit:n,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let c=a?s.trim():s;r&&(c=c.toLowerCase()),t&&(c=u(c));const d=c?e.filter((e=>{let n=(i||l)(e);return r&&(n=n.toLowerCase()),t&&(n=u(n)),"start"===o?0===n.indexOf(c):n.indexOf(c)>-1})):e;return"number"==typeof n?d.slice(0,n):d}}function f(e,t){for(let r=0;r{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))},m=function(e){const{unstable_isActiveElementInListbox:t=h,unstable_classNamePrefix:r="Mui",autoComplete:u=!1,autoHighlight:d=!1,autoSelect:m=!1,blurOnSelect:g=!1,clearOnBlur:y=!e.freeSolo,clearOnEscape:v=!1,componentName:b="useAutocomplete",defaultValue:_=(e.multiple?[]:null),disableClearable:x=!1,disableCloseOnSelect:w=!1,disabled:A,disabledItemsFocusable:S=!1,disableListWrap:C=!1,filterOptions:E=p,filterSelectedOptions:T=!1,freeSolo:I=!1,getOptionDisabled:k,getOptionKey:M,getOptionLabel:R=e=>{var t;return null!=(t=e.label)?t:e},groupBy:P,handleHomeEndKeys:O=!e.freeSolo,id:L,includeInputInList:D=!1,inputValue:N,isOptionEqualToValue:F=(e,t)=>e===t,multiple:z=!1,onChange:B,onClose:j,onHighlightChange:U,onInputChange:$,onOpen:V,open:G,openOnFocus:H=!1,options:W,readOnly:q=!1,selectOnFocus:X=!e.freeSolo,value:Z}=e,Y=(0,i.A)(L);let K=R;K=e=>{const t=R(e);return"string"!=typeof t?String(t):t};const J=o.useRef(!1),Q=o.useRef(!0),ee=o.useRef(null),te=o.useRef(null),[re,ne]=o.useState(null),[oe,ie]=o.useState(-1),ae=d?0:-1,se=o.useRef(ae),[le,ce]=(0,a.A)({controlled:Z,default:_,name:b}),[ue,de]=(0,a.A)({controlled:N,default:"",name:b,state:"inputValue"}),[fe,pe]=o.useState(!1),he=o.useCallback(((e,t)=>{if(!(z?le.length!T||!(z?le:[le]).some((t=>null!==t&&F(e,t))))),{inputValue:be&&ye?"":ue,getOptionLabel:K}):[],we=(0,s.A)({filteredOptions:xe,value:le,inputValue:ue});o.useEffect((()=>{const e=le!==we.value;fe&&!e||I&&!e||he(null,le)}),[le,he,fe,we.value,I]);const Ae=me&&xe.length>0&&!q,Se=(0,l.A)((e=>{-1===e?ee.current.focus():re.querySelector(`[data-tag-index="${e}"]`).focus()}));o.useEffect((()=>{z&&oe>le.length-1&&(ie(-1),Se(-1))}),[le,z,oe,Se]);const Ce=(0,l.A)((({event:e,index:t,reason:n="auto"})=>{if(se.current=t,-1===t?ee.current.removeAttribute("aria-activedescendant"):ee.current.setAttribute("aria-activedescendant",`${Y}-option-${t}`),U&&U(e,-1===t?null:xe[t],n),!te.current)return;const o=te.current.querySelector(`[role="option"].${r}-focused`);o&&(o.classList.remove(`${r}-focused`),o.classList.remove(`${r}-focusVisible`));let i=te.current;if("listbox"!==te.current.getAttribute("role")&&(i=te.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===t)return void(i.scrollTop=0);const a=te.current.querySelector(`[data-option-index="${t}"]`);if(a&&(a.classList.add(`${r}-focused`),"keyboard"===n&&a.classList.add(`${r}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==n&&"touch"!==n)){const e=a,t=i.clientHeight+i.scrollTop,r=e.offsetTop+e.offsetHeight;r>t?i.scrollTop=r-i.clientHeight:e.offsetTop-e.offsetHeight*(P?1.3:0){if(!_e)return;const o=function(e,t){if(!te.current||e<0||e>=xe.length)return-1;let r=e;for(;;){const n=te.current.querySelector(`[data-option-index="${r}"]`),o=!S&&(!n||n.disabled||"true"===n.getAttribute("aria-disabled"));if(n&&n.hasAttribute("tabindex")&&!o)return r;if(r="next"===t?(r+1)%xe.length:(r-1+xe.length)%xe.length,r===e)return-1}}((()=>{const e=xe.length-1;if("reset"===t)return ae;if("start"===t)return 0;if("end"===t)return e;const r=se.current+t;return r<0?-1===r&&D?-1:C&&-1!==se.current||Math.abs(t)>1?0:e:r>e?r===e+1&&D?-1:C||Math.abs(t)>1?e:0:r})(),r);if(Ce({index:o,reason:n,event:e}),u&&"reset"!==t)if(-1===o)ee.current.value=ue;else{const e=K(xe[o]);ee.current.value=e,0===e.toLowerCase().indexOf(ue.toLowerCase())&&ue.length>0&&ee.current.setSelectionRange(ue.length,e.length)}})),Te=o.useCallback((()=>{if(!_e)return;const e=(()=>{if(-1!==se.current&&we.filteredOptions&&we.filteredOptions.length!==xe.length&&we.inputValue===ue&&(z?le.length===we.value.length&&we.value.every(((e,t)=>K(le[t])===K(e))):(e=we.value,t=le,(e?K(e):"")===(t?K(t):"")))){const e=we.filteredOptions[se.current];if(e)return f(xe,(t=>K(t)===K(e)))}var e,t;return-1})();if(-1!==e)return void(se.current=e);const t=z?le[0]:le;if(0!==xe.length&&null!=t){if(te.current)if(null==t)se.current>=xe.length-1?Ce({index:xe.length-1}):Ce({index:se.current});else{const e=xe[se.current];if(z&&e&&-1!==f(le,(t=>F(e,t))))return;const r=f(xe,(e=>F(e,t)));-1===r?Ee({diff:"reset"}):Ce({index:r})}}else Ee({diff:"reset"})}),[xe.length,!z&&le,T,Ee,Ce,_e,ue,z]),Ie=(0,l.A)((e=>{(0,c.A)(te,e),e&&Te()}));o.useEffect((()=>{Te()}),[Te]);const ke=e=>{me||(ge(!0),ve(!0),V&&V(e))},Me=(e,t)=>{me&&(ge(!1),j&&j(e,t))},Re=(e,t,r,n)=>{if(z){if(le.length===t.length&&le.every(((e,r)=>e===t[r])))return}else if(le===t)return;B&&B(e,t,r,n),ce(t)},Pe=o.useRef(!1),Oe=(e,t,r="selectOption",n="options")=>{let o=r,i=t;if(z){i=Array.isArray(le)?le.slice():[];const e=f(i,(e=>F(t,e)));-1===e?i.push(t):"freeSolo"!==n&&(i.splice(e,1),o="removeOption")}he(e,i),Re(e,i,o,{option:t}),w||e&&(e.ctrlKey||e.metaKey)||Me(e,o),(!0===g||"touch"===g&&Pe.current||"mouse"===g&&!Pe.current)&&ee.current.blur()},Le=(e,t)=>{if(!z)return;""===ue&&Me(e,"toggleInput");let r=oe;-1===oe?""===ue&&"previous"===t&&(r=le.length-1):(r+="next"===t?1:-1,r<0&&(r=0),r===le.length&&(r=-1)),r=function(e,t){if(-1===e)return-1;let r=e;for(;;){if("next"===t&&r===le.length||"previous"===t&&-1===r)return-1;const e=re.querySelector(`[data-tag-index="${r}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return r;r+="next"===t?1:-1}}(r,t),ie(r),Se(r)},De=e=>{J.current=!0,de(""),$&&$(e,"","clear"),Re(e,z?[]:null,"clear")},Ne=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==oe&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(ie(-1),Se(-1)),229!==t.which))switch(t.key){case"Home":_e&&O&&(t.preventDefault(),Ee({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":_e&&O&&(t.preventDefault(),Ee({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Ee({diff:-5,direction:"previous",reason:"keyboard",event:t}),ke(t);break;case"PageDown":t.preventDefault(),Ee({diff:5,direction:"next",reason:"keyboard",event:t}),ke(t);break;case"ArrowDown":t.preventDefault(),Ee({diff:1,direction:"next",reason:"keyboard",event:t}),ke(t);break;case"ArrowUp":t.preventDefault(),Ee({diff:-1,direction:"previous",reason:"keyboard",event:t}),ke(t);break;case"ArrowLeft":Le(t,"previous");break;case"ArrowRight":Le(t,"next");break;case"Enter":if(-1!==se.current&&_e){const e=xe[se.current],r=!!k&&k(e);if(t.preventDefault(),r)return;Oe(t,e,"selectOption"),u&&ee.current.setSelectionRange(ee.current.value.length,ee.current.value.length)}else I&&""!==ue&&!1===be&&(z&&t.preventDefault(),Oe(t,ue,"createOption","freeSolo"));break;case"Escape":_e?(t.preventDefault(),t.stopPropagation(),Me(t,"escape")):v&&(""!==ue||z&&le.length>0)&&(t.preventDefault(),t.stopPropagation(),De(t));break;case"Backspace":if(z&&!q&&""===ue&&le.length>0){const e=-1===oe?le.length-1:oe,r=le.slice();r.splice(e,1),Re(t,r,"removeOption",{option:le[e]})}break;case"Delete":if(z&&!q&&""===ue&&le.length>0&&-1!==oe){const e=oe,r=le.slice();r.splice(e,1),Re(t,r,"removeOption",{option:le[e]})}}},Fe=e=>{pe(!0),H&&!J.current&&ke(e)},ze=e=>{t(te)?ee.current.focus():(pe(!1),Q.current=!0,J.current=!1,m&&-1!==se.current&&_e?Oe(e,xe[se.current],"blur"):m&&I&&""!==ue?Oe(e,ue,"blur","freeSolo"):y&&he(e,le),Me(e,"blur"))},Be=e=>{const t=e.target.value;ue!==t&&(de(t),ve(!1),$&&$(e,t,"input")),""===t?x||z||Re(e,null,"clear"):ke(e)},je=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));se.current!==t&&Ce({event:e,index:t,reason:"mouse"})},Ue=e=>{Ce({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Pe.current=!0},$e=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Oe(e,xe[t],"selectOption"),Pe.current=!1},Ve=e=>t=>{const r=le.slice();r.splice(e,1),Re(t,r,"removeOption",{option:le[e]})},Ge=e=>{me?Me(e,"toggleInput"):ke(e)},He=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==Y&&e.preventDefault()},We=e=>{e.currentTarget.contains(e.target)&&(ee.current.focus(),X&&Q.current&&ee.current.selectionEnd-ee.current.selectionStart==0&&ee.current.select(),Q.current=!1)},qe=e=>{A||""!==ue&&me||Ge(e)};let Xe=I&&ue.length>0;Xe=Xe||(z?le.length>0:null!==le);let Ze=xe;return P&&(new Map,Ze=xe.reduce(((e,t,r)=>{const n=P(t);return e.length>0&&e[e.length-1].group===n?e[e.length-1].options.push(t):e.push({key:r,index:r,group:n,options:[t]}),e}),[])),A&&fe&&ze(),{getRootProps:(e={})=>(0,n.A)({"aria-owns":Ae?`${Y}-listbox`:null},e,{onKeyDown:Ne(e),onMouseDown:He,onClick:We}),getInputLabelProps:()=>({id:`${Y}-label`,htmlFor:Y}),getInputProps:()=>({id:Y,value:ue,onBlur:ze,onFocus:Fe,onChange:Be,onMouseDown:qe,"aria-activedescendant":_e?"":null,"aria-autocomplete":u?"both":"list","aria-controls":Ae?`${Y}-listbox`:void 0,"aria-expanded":Ae,autoComplete:"off",ref:ee,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:A}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:De}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Ge}),getTagProps:({index:e})=>(0,n.A)({key:e,"data-tag-index":e,tabIndex:-1},!q&&{onDelete:Ve(e)}),getListboxProps:()=>({role:"listbox",id:`${Y}-listbox`,"aria-labelledby":`${Y}-label`,ref:Ie,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{var r;const n=(z?le:[le]).some((e=>null!=e&&F(t,e))),o=!!k&&k(t);return{key:null!=(r=null==M?void 0:M(t))?r:K(t),tabIndex:-1,role:"option",id:`${Y}-option-${e}`,onMouseMove:je,onClick:$e,onTouchStart:Ue,"data-option-index":e,"aria-disabled":o,"aria-selected":n}},id:Y,inputValue:ue,value:le,dirty:Xe,expanded:_e&&re,popupOpen:_e,focused:fe||-1!==oe,anchorEl:re,setAnchorEl:ne,focusedTag:oe,groupedOptions:Ze}}},xeev:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("unMj").A},j3nj:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("zhWT").A},M7pN:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r("+9dH"),o=r("q1tI"),i=r("Z6qJ"),a=r("nKUr");function s(e,t){function r(r,o){return(0,a.jsx)(i.A,(0,n.A)({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return r.muiName=i.A.muiName,o.memo(o.forwardRef(r))}},"7yHM":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("QoIX").A},dzX4:(e,t,r)=>{"use strict";r.r(t),r.d(t,{capitalize:()=>o.A,createChainedFunction:()=>i.A,createSvgIcon:()=>a.A,debounce:()=>s.A,deprecatedPropType:()=>l,isMuiElement:()=>c.A,ownerDocument:()=>u.A,ownerWindow:()=>d.A,requirePropFactory:()=>f,setRef:()=>p,unstable_ClassNameGenerator:()=>x,unstable_useEnhancedEffect:()=>h.A,unstable_useId:()=>m.A,unsupportedProp:()=>g,useControlled:()=>y.A,useEventCallback:()=>v.A,useForkRef:()=>b.A,useIsFocusVisible:()=>_.A});var n=r("Oory"),o=r("xeev"),i=r("j3nj"),a=r("M7pN"),s=r("7yHM");const l=function(e,t){return()=>null};var c=r("M3M6"),u=r("rdfb"),d=r("WFZb");r("+9dH");const f=function(e,t){return()=>null},p=r("1YXj").A;var h=r("6q60"),m=r("DSU1");const g=function(e,t,r,n,o){return null};var y=r("1vOf"),v=r("KXty"),b=r("ZfBw"),_=r("8rms");const x={configure:e=>{n.A.configure(e)}}},M3M6:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("lHbp").A},rdfb:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("p4lV").A},WFZb:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("4bZc").A},"1vOf":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("leBO").A},"6q60":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("XgeM").A},KXty:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("nXnS").A},ZfBw:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("N0rN").A},DSU1:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("A3c4").A},"8rms":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("B5YM").A},AcvT:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r("+9dH"),o=r("Nlia"),i=r("N0rN"),a=r("/E4l"),s=r("dd9Q"),l=r("9sNS");const c=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],u=["component","slots","slotProps"],d=["component"];function f(e,t){const{className:r,elementType:f,ownerState:p,externalForwardedProps:h,getSlotOwnerState:m,internalForwardedProps:g}=t,y=(0,o.A)(t,c),{component:v,slots:b={[e]:void 0},slotProps:_={[e]:void 0}}=h,x=(0,o.A)(h,u),w=b[e]||f,A=(0,s.A)(_[e],p),S=(0,l.A)((0,n.A)({className:r},y,{externalForwardedProps:"root"===e?x:void 0,externalSlotProps:A})),{props:{component:C},internalRef:E}=S,T=(0,o.A)(S.props,d),I=(0,i.A)(E,null==A?void 0:A.ref,t.ref),k=m?m(T):{},M=(0,n.A)({},p,k),R="root"===e?C||v:C,P=(0,a.A)(w,(0,n.A)({},"root"===e&&!v&&!b[e]&&g,"root"!==e&&!b[e]&&g,T,R&&{as:R},{ref:I}),M);return Object.keys(k).forEach((e=>{delete P[e]})),[w,P]}},YSst:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__"},dxcw:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r("q1tI").createContext(null)},CZYX:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("dxcw");function i(){return n.useContext(o.A)}},"2TcN":(e,t,r)=>{"use strict";r.d(t,{A:()=>i}),r("q1tI");var n=r("AeFk"),o=r("nKUr");function i(e){const{styles:t,defaultTheme:r={}}=e,i="function"==typeof t?e=>{return t(null==(n=e)||0===Object.keys(n).length?r:e);var n}:t;return(0,o.jsx)(n.mL,{styles:i})}},WfXV:(e,t,r)=>{"use strict";r.d(t,{A:()=>s}),r("q1tI");var n=r("xSbz"),o=r("EwZD"),i=r("nKUr");let a;function s(e){const{injectFirst:t,children:r}=e;return t&&a?(0,i.jsx)(n.C,{value:a,children:r}):r}"object"==typeof document&&(a=(0,o.A)({key:"css",prepend:!0}))},"n+sr":(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalStyles:()=>v.A,StyledEngineProvider:()=>y.A,ThemeContext:()=>a.T,css:()=>g.AH,default:()=>b,internal_processStyles:()=>_,keyframes:()=>g.i7});var n=r("+9dH"),o=r("q1tI"),i=r("kpM3"),a=r("xSbz"),s=r("eVQB"),l=r("zd00"),c=r("xLBD"),u=i.A,d=function(e){return"theme"!==e},f=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?u:d},p=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},h=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,s.SF)(t,r,n),(0,c.s)((function(){return(0,s.sk)(t,r,n)})),null},m=function e(t,r){var i,c,u=t.__emotion_real===t,d=u&&t.__emotion_base||t;void 0!==r&&(i=r.label,c=r.target);var m=p(t,r,u),g=m||f(d),y=!g("as");return function(){var v=arguments,b=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&b.push("label:"+i+";"),null==v[0]||void 0===v[0].raw)b.push.apply(b,v);else{b.push(v[0][0]);for(var _=v.length,x=1;x<_;x++)b.push(v[x],v[0][x])}var w=(0,a.w)((function(e,t,r){var n=y&&e.as||d,i="",u=[],p=e;if(null==e.theme){for(var v in p={},e)p[v]=e[v];p.theme=o.useContext(a.T)}"string"==typeof e.className?i=(0,s.Rk)(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var _=(0,l.J)(b.concat(u),t.registered,p);i+=t.key+"-"+_.name,void 0!==c&&(i+=" "+c);var x=y&&void 0===m?f(n):g,w={};for(var A in e)y&&"as"===A||x(A)&&(w[A]=e[A]);return w.className=i,r&&(w.ref=r),o.createElement(o.Fragment,null,o.createElement(h,{cache:t,serialized:_,isStringTag:"string"==typeof n}),o.createElement(n,w))}));return w.displayName=void 0!==i?i:"Styled("+("string"==typeof d?d:d.displayName||d.name||"Component")+")",w.defaultProps=t.defaultProps,w.__emotion_real=w,w.__emotion_base=d,w.__emotion_styles=b,w.__emotion_forwardProp=m,Object.defineProperty(w,"toString",{value:function(){return"."+c}}),w.withComponent=function(t,o){return e(t,(0,n.A)({},r,o,{shouldForwardProp:p(w,o,!0)})).apply(void 0,b)},w}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){m[e]=m(e)}));var g=r("AeFk"),y=r("WfXV"),v=r("2TcN");function b(e,t){return m(e,t)}const _=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},"+5/u":(e,t,r)=>{"use strict";r.d(t,{si:()=>Ve,Ay:()=>He});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("46Hv"),s=r("YSst");const l=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var c=Date.now(),u="fnValues"+c,d="fnStyle"+ ++c;const f=function(){return{onCreateRule:function(e,t,r){if("function"!=typeof t)return null;var n=(0,a.D_)(e,{},r);return n[d]=t,n},onProcessStyle:function(e,t){if(u in t||d in t)return e;var r={};for(var n in e){var o=e[n];"function"==typeof o&&(delete e[n],r[n]=o)}return t[u]=r,e},onUpdate:function(e,t,r,n){var o=t,i=o[d];i&&(o.style=i(e)||{});var a=o[u];if(a)for(var s in a)o.prop(s,a[s](e),n)}}};var p="@global",h=function(){function e(e,t,r){for(var o in this.type="global",this.at=p,this.isProcessed=!1,this.key=e,this.options=r,this.rules=new a.VZ((0,n.A)({},r,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.replaceRule=function(e,t,r){var n=this.rules.replace(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),m=function(){function e(e,t,r){this.type="global",this.at=p,this.isProcessed=!1,this.key=e,this.options=r;var o=e.substr(8);this.rule=r.jss.createRule(o,t,(0,n.A)({},r,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),g=/\s*,\s*/g;function y(e,t){for(var r=e.split(g),n="",o=0;oe.length)&&(t=e.length);for(var r=0,n=Array(t);r-1){var o=be[e];if(!Array.isArray(o))return q+ne(o)in t&&X+o;if(!n)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,r){if("style"!==r.type)return t;for(var n={},o=Object.keys(t).sort(e),i=0;i(i+=1,i);return(e,i)=>{const c=i.options.name;if(c&&0===c.indexOf("Mui")&&!i.options.link&&!t){if(-1!==l.indexOf(e.key))return`Mui-${e.key}`;const t=`${o}${c}-${e.key}`;return i.options.theme[s.A]&&""===n?`${t}-${a()}`:t}return`${o}${r}${a()}`}}(),jss:Ue,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Ve=i.createContext($e);let Ge;function He(e){const{children:t,injectFirst:r=!1,disableGeneration:s=!1}=e,l=(0,o.A)(e,je),c=i.useContext(Ve),{generateClassName:u,jss:d,serverGenerateClassName:f,sheetsCache:p,sheetsManager:h,sheetsRegistry:m}=(0,n.A)({},c,l),g=i.useMemo((()=>{const e={disableGeneration:s,generateClassName:u,jss:d,serverGenerateClassName:f,sheetsCache:p,sheetsManager:h,sheetsRegistry:m};if(!e.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!Ge){const e=document.head;Ge=document.createComment("mui-inject-first"),e.insertBefore(Ge,e.firstChild)}e.jss=(0,a.vt)({plugins:ze().plugins,insertionPoint:Ge})}return e}),[r,s,u,d,f,p,h,m]);return(0,Be.jsx)(Ve.Provider,{value:g,children:t})}},"7RM4":(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("46Hv");function s(e={}){const{baseClasses:t,newClasses:r,Component:n}=e;if(!r)return t;const i=(0,o.A)({},t);return Object.keys(r).forEach((e=>{r[e]&&(i[e]=`${t[e]} ${r[e]}`)})),i}const l={set:(e,t,r,n)=>{let o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(r,n)},get:(e,t,r)=>{const n=e.get(t);return n?n.get(r):void 0},delete:(e,t,r)=>{e.get(t).delete(r)}};var c=r("5wLv"),u=r("+5/u");let d=-1e9;var f=r("w9Qe"),p=r("unMj");const h=["variant"];function m(e){return 0===e.length}const g={},y=["name","classNamePrefix","Component","defaultTheme"];function v(e,t={}){const{name:r,classNamePrefix:v,Component:b,defaultTheme:_=g}=t,x=(0,n.A)(t,y),w=function(e){const t="function"==typeof e;return{create:(r,i)=>{let a;try{a=t?e(r):e}catch(e){throw e}if(!i||!r.components||!r.components[i]||!r.components[i].styleOverrides&&!r.components[i].variants)return a;const s=r.components[i].styleOverrides||{},l=r.components[i].variants||[],c=(0,o.A)({},a);return Object.keys(s).forEach((e=>{c[e]=(0,f.A)(c[e]||{},s[e])})),l.forEach((e=>{const t=function(e){const{variant:t}=e,r=(0,n.A)(e,h);let o=t||"";return Object.keys(r).sort().forEach((t=>{o+="color"===t?m(o)?e[t]:(0,p.A)(e[t]):`${m(o)?t:(0,p.A)(t)}${(0,p.A)(e[t].toString())}`})),o}(e.props);c[t]=(0,f.A)(c[t]||{},e.style)})),c},options:{}}}(e),A=r||v||"makeStyles";return w.options={index:(d+=1,d),name:r,meta:A,classNamePrefix:A},(e={})=>{const t=(0,c.A)()||_,n=(0,o.A)({},i.useContext(u.si),x),d=i.useRef(),f=i.useRef();!function(c,u){const p=i.useRef([]);let h;const m=i.useMemo((()=>({})),u);p.current!==m&&(p.current=m,h=(()=>{const i={name:r,state:{},stylesCreator:w,stylesOptions:n,theme:t};return function({state:e,theme:t,stylesOptions:r,stylesCreator:n,name:i},c){if(r.disableGeneration)return;let u=l.get(r.sheetsManager,n,t);u||(u={refs:0,staticSheet:null,dynamicStyles:null},l.set(r.sheetsManager,n,t,u));const d=(0,o.A)({},n.options,r,{theme:t,flip:"boolean"==typeof r.flip?r.flip:"rtl"===t.direction});d.generateId=d.serverGenerateClassName||d.generateClassName;const f=r.sheetsRegistry;if(0===u.refs){let e;r.sheetsCache&&(e=l.get(r.sheetsCache,n,t));const s=n.create(t,i);e||(e=r.jss.createStyleSheet(s,(0,o.A)({link:!1},d)),e.attach(),r.sheetsCache&&l.set(r.sheetsCache,n,t,e)),f&&f.add(e),u.staticSheet=e,u.dynamicStyles=(0,a.ih)(s)}if(u.dynamicStyles){const t=r.jss.createStyleSheet(u.dynamicStyles,(0,o.A)({link:!0},d));t.update(c),t.attach(),e.dynamicSheet=t,e.classes=s({baseClasses:u.staticSheet.classes,newClasses:t.classes}),f&&f.add(t)}else e.classes=u.staticSheet.classes;u.refs+=1}(i,e),f.current=!1,d.current=i,()=>{!function({state:e,theme:t,stylesOptions:r,stylesCreator:n}){if(r.disableGeneration)return;const o=l.get(r.sheetsManager,n,t);o.refs-=1;const i=r.sheetsRegistry;0===o.refs&&(l.delete(r.sheetsManager,n,t),r.jss.removeStyleSheet(o.staticSheet),i&&i.remove(o.staticSheet)),e.dynamicSheet&&(r.jss.removeStyleSheet(e.dynamicSheet),i&&i.remove(e.dynamicSheet))}(i)}})()),i.useEffect((()=>()=>{h&&h()}),[m])}(0,[t,w]),i.useEffect((()=>{f.current&&function({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}(d.current,e),f.current=!0}));const p=function({state:e,stylesOptions:t},r,n){if(t.disableGeneration)return r||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),r!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=r,o=!0),o&&(e.cacheClasses.value=s({baseClasses:e.cacheClasses.lastJSS,newClasses:r,Component:n})),e.cacheClasses.value}(d.current,e.classes,b);return p}}},"5wLv":(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("CZYX");function o(){var e;const t=(0,n.A)();return null!=(e=null==t?void 0:t.$$material)?e:t}},dcYk:(e,t,r)=>{"use strict";var n=r("JMD1");t.X4=d,t.e$=f,t.tL=h,t.eM=function(e,t){const r=u(e),n=u(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)},t.YL=c,t.a=p,t.Cg=function(e,t,r){try{return d(e,t)}catch(t){return e}},t.Me=void 0,t.Nd=function(e,t,r){try{return f(e,t)}catch(t){return e}},t.Y9=function(e,t,r){try{return h(e,t)}catch(t){return e}},t.j4=function(e,t,r){try{return p(e,t)}catch(t){return e}};var o=n(r("WF/F")),i=n(r("9rAX"));function a(e,t=0,r=1){return(0,i.default)(e,t,r)}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?`rgb${4===r.length?"a":""}(${r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,o.default)(9,e));let n,i=e.substring(t+1,e.length-1);if("color"===r){if(i=i.split(" "),n=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw new Error((0,o.default)(10,n))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:r,values:i,colorSpace:n}}function l(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}function c(e){e=s(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),a=(e,t=(e+r/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let c="rgb";const u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),l({type:c,values:u})}function u(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(c(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function d(e,t){return e=s(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)}function f(e,t){if(e=s(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return l(e)}function p(e,t){if(e=s(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return l(e)}function h(e,t=.15){return u(e)>.5?f(e,t):p(e,t)}t.Me=(e,t)=>{try{return(e=>{const t=s(e);return t.values.slice(0,3).map(((e,r)=>-1!==t.type.indexOf("hsl")&&0!==r?`${e}%`:e)).join(" ")})(e)}catch(t){return e}}},c1mR:(e,t,r)=>{"use strict";var n=r("JMD1");t.Ay=function(e={}){const{themeId:t,defaultTheme:r=m,rootShouldForwardProp:n=h,slotShouldForwardProp:l=h}=e,u=e=>(0,c.default)((0,o.default)({},e,{theme:y((0,o.default)({},e,{defaultTheme:r,themeId:t}))}));return u.__mui_systemSx=!0,(e,c={})=>{(0,a.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:p,skipVariantsResolver:m,skipSx:_,overridesResolver:x=v(g(p))}=c,w=(0,i.default)(c,f),A=void 0!==m?m:p&&"Root"!==p&&"root"!==p||!1,S=_||!1;let C=h;"Root"===p||"root"===p?C=n:p?C=l:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const E=(0,a.default)(e,(0,o.default)({shouldForwardProp:C,label:void 0},w)),T=e=>"function"==typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?n=>b(e,(0,o.default)({},n,{theme:y({theme:n.theme,defaultTheme:r,themeId:t})})):e,I=(n,...i)=>{let a=T(n);const s=i?i.map(T):[];d&&x&&s.push((e=>{const n=y((0,o.default)({},e,{defaultTheme:r,themeId:t}));if(!n.components||!n.components[d]||!n.components[d].styleOverrides)return null;const i=n.components[d].styleOverrides,a={};return Object.entries(i).forEach((([t,r])=>{a[t]=b(r,(0,o.default)({},e,{theme:n}))})),x(e,a)})),d&&!A&&s.push((e=>{var n;const i=y((0,o.default)({},e,{defaultTheme:r,themeId:t}));return b({variants:null==i||null==(n=i.components)||null==(n=n[d])?void 0:n.variants},(0,o.default)({},e,{theme:i}))})),S||s.push(u);const l=s.length-i.length;if(Array.isArray(n)&&l>0){const e=new Array(l).fill("");a=[...n,...e],a.raw=[...n.raw,...e]}const c=E(a,...s);return e.muiName&&(c.muiName=e.muiName),c};return E.withConfig&&(I.withConfig=E.withConfig),I}};var o=n(r("pP/M")),i=n(r("eD+B")),a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r("n+sr")),s=r("K+2h"),l=(n(r("IisN")),n(r("MZ7D")),n(r("p64m"))),c=n(r("DsUO"));const u=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function h(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const m=(0,l.default)(),g=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function y({defaultTheme:e,theme:t,themeId:r}){return n=t,0===Object.keys(n).length?e:t[r]||t;var n}function v(e){return e?(t,r)=>r[e]:null}function b(e,t){let{ownerState:r}=t,n=(0,i.default)(t,u);const a="function"==typeof e?e((0,o.default)({ownerState:r},n)):e;if(Array.isArray(a))return a.flatMap((e=>b(e,(0,o.default)({ownerState:r},n))));if(a&&"object"==typeof a&&Array.isArray(a.variants)){const{variants:e=[]}=a;let t=(0,i.default)(a,d);return e.forEach((e=>{let i=!0;"function"==typeof e.props?i=e.props((0,o.default)({ownerState:r},n,r)):Object.keys(e.props).forEach((t=>{(null==r?void 0:r[t])!==e.props[t]&&n[t]!==e.props[t]&&(i=!1)})),i&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,o.default)({ownerState:r},n,r)):e.style))})),t}return a}},jAoP:(e,t,r)=>{"use strict";r.d(t,{A:()=>l,b:()=>s});var n=r("q1tI"),o=r("d70t"),i=r("nKUr");const a=n.createContext(void 0);function s({props:e,name:t}){return function(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?(0,o.A)(i.defaultProps,n):i.styleOverrides||i.variants?n:(0,o.A)(i,n)}({props:e,name:t,theme:{components:n.useContext(a)}})}const l=function({value:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}},St5x:(e,t,r)=>{"use strict";r.d(t,{A:()=>u,I:()=>c});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("nKUr");const s=["value"],l=i.createContext(),c=()=>{const e=i.useContext(l);return null!=e&&e},u=function(e){let{value:t}=e,r=(0,o.A)(e,s);return(0,a.jsx)(l.Provider,(0,n.A)({value:null==t||t},r))}},hWdM:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r("+9dH"),o=r("q1tI"),i=r("CZYX"),a=r("dxcw"),s=r("YSst"),l=r("nKUr");const c=function(e){const{children:t,theme:r}=e,c=(0,i.A)(),u=o.useMemo((()=>{const e=null===c?r:function(e,t){return"function"==typeof t?t(e):(0,n.A)({},e,t)}(c,r);return null!=e&&(e[s.A]=null!==c),e}),[r,c]);return(0,l.jsx)(a.A.Provider,{value:u,children:t})};var u=r("xSbz"),d=r("jyRQ"),f=r("St5x"),p=r("jAoP");const h={};function m(e,t,r,i=!1){return o.useMemo((()=>{const o=e&&t[e]||t;if("function"==typeof r){const a=r(o),s=e?(0,n.A)({},t,{[e]:a}):a;return i?()=>s:s}return e?(0,n.A)({},t,{[e]:r}):(0,n.A)({},t,r)}),[e,t,r,i])}const g=function(e){const{children:t,theme:r,themeId:n}=e,o=(0,d.A)(h),a=(0,i.A)()||h,s=m(n,o,r),g=m(n,a,r,!0),y="rtl"===s.direction;return(0,l.jsx)(c,{theme:g,children:(0,l.jsx)(u.T.Provider,{value:s,children:(0,l.jsx)(f.A,{value:y,children:(0,l.jsx)(p.A,{value:null==s?void 0:s.components,children:t})})})})}},fGgT:(e,t,r)=>{"use strict";r.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>o});var n=r("w9Qe");const o={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${o[e]}px)`};function a(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const e=n.breakpoints||i;return t.reduce(((n,o,i)=>(n[e.up(e.keys[i])]=r(t[i]),n)),{})}if("object"==typeof t){const e=n.breakpoints||i;return Object.keys(t).reduce(((n,i)=>{if(-1!==Object.keys(e.values||o).indexOf(i))n[e.up(i)]=r(t[i],i);else{const e=i;n[e]=t[e]}return n}),{})}return r(t)}function s(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,r)=>(t[e.up(r)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e}),t)}function c(e,...t){const r=s(e),o=[r,...t].reduce(((e,t)=>(0,n.A)(e,t)),{});return l(Object.keys(r),o)}function u({values:e,breakpoints:t,base:r}){const n=r||function(e,t){if("object"!=typeof e)return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach(((t,n)=>{n{null!=e[t]&&(r[t]=!0)})),r}(e,t),o=Object.keys(n);if(0===o.length)return e;let i;return o.reduce(((t,r,n)=>(Array.isArray(e)?(t[r]=null!=e[n]?e[n]:e[i],i=n):"object"==typeof e?(t[r]=null!=e[r]?e[r]:e[i],i=r):t[r]=e,t)),{})}},"2Qr1":(e,t,r)=>{"use strict";r.d(t,{E2:()=>a,J1:()=>d,Ob:()=>c,X0:()=>l,X4:()=>p,YL:()=>u,a:()=>m,e$:()=>h,eM:()=>f,rP:()=>s,tL:()=>g});var n=r("KRkT"),o=r("5cFC");function i(e,t=0,r=1){return(0,o.A)(e,t,r)}function a(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?`rgb${4===r.length?"a":""}(${r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(a(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,n.A)(9,e));let o,i=e.substring(t+1,e.length-1);if("color"===r){if(i=i.split(" "),o=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error((0,n.A)(10,o))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:r,values:i,colorSpace:o}}function l(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}function c(e){if(0===e.indexOf("#"))return e;const{values:t}=s(e);return`#${t.map(((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e))).join("")}`}function u(e){e=s(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),a=(e,t=(e+r/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let c="rgb";const u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),l({type:c,values:u})}function d(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(u(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function f(e,t){const r=d(e),n=d(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function p(e,t){return e=s(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)}function h(e,t){if(e=s(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return l(e)}function m(e,t){if(e=s(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return l(e)}function g(e,t=.15){return d(e)>.5?h(e,t):m(e,t)}},"3XHt":(e,t,r)=>{"use strict";function n(e,t){const r=this;if(r.vars&&"function"==typeof r.getColorSchemeSelector){const n=r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[n]:t}}return r.palette.mode===e?t:{}}r.d(t,{A:()=>n})},s8X4:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r("Nlia"),o=r("+9dH");const i=["values","unit","step"],a=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,o.A)({},e,{[t.key]:t.val})),{})};function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:s=5}=e,l=(0,n.A)(e,i),c=a(t),u=Object.keys(c);function d(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function f(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-s/100}${r})`}function p(e,n){const o=u.indexOf(n);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==o&&"number"==typeof t[u[o]]?t[u[o]]:n)-s/100}${r})`}return(0,o.A)({keys:u,values:c,up:d,down:f,between:p,only:function(e){return u.indexOf(e)+1{"use strict";r.d(t,{A:()=>o});var n=r("rZTa");function o(e=8){if(e.mui)return e;const t=(0,n.LX)({spacing:e}),r=(...e)=>(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" ");return r.mui=!0,r}},Tazo:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r("+9dH"),o=r("Nlia"),i=r("w9Qe"),a=r("s8X4");const s={borderRadius:4};var l=r("EIBS"),c=r("xTOY"),u=r("9k3N"),d=r("3XHt");const f=["breakpoints","palette","spacing","shape"],p=function(e={},...t){const{breakpoints:r={},palette:p={},spacing:h,shape:m={}}=e,g=(0,o.A)(e,f),y=(0,a.A)(r),v=(0,l.A)(h);let b=(0,i.A)({breakpoints:y,direction:"ltr",components:{},palette:(0,n.A)({mode:"light"},p),spacing:v,shape:(0,n.A)({},s,m)},g);return b.applyStyles=d.A,b=t.reduce(((e,t)=>(0,i.A)(e,t)),b),b.unstable_sxConfig=(0,n.A)({},u.A,null==g?void 0:g.unstable_sxConfig),b.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},b}},p64m:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,private_createBreakpoints:()=>o.A,unstable_applyStyles:()=>i.A});var n=r("Tazo"),o=r("s8X4"),i=r("3XHt")},cENE:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("w9Qe");const o=function(e,t){return t?(0,n.A)(e,t,{clone:!1}):e}},rZTa:(e,t,r)=>{"use strict";r.d(t,{LX:()=>h,MA:()=>p,_W:()=>m,Lc:()=>y,Ms:()=>v});var n=r("fGgT"),o=r("+y7V"),i=r("cENE");const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,r]=e.split(""),n=a[t],o=s[r]||"";return Array.isArray(o)?o.map((e=>n+e)):[n+o]})(t)),e[t])}(),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],f=[...u,...d];function p(e,t,r,n){var i;const a=null!=(i=(0,o.Yn)(e,t,!1))?i:r;return"number"==typeof a?e=>"string"==typeof e?e:a*e:Array.isArray(a)?e=>"string"==typeof e?e:a[e]:"function"==typeof a?a:()=>{}}function h(e){return p(e,"spacing",8)}function m(e,t){if("string"==typeof t||null==t)return t;const r=e(Math.abs(t));return t>=0?r:"number"==typeof r?-r:`-${r}`}function g(e,t){const r=h(e.theme);return Object.keys(e).map((o=>function(e,t,r,o){if(-1===t.indexOf(r))return null;const i=function(e,t){return r=>e.reduce(((e,n)=>(e[n]=m(t,r),e)),{})}(c(r),o),a=e[r];return(0,n.NI)(e,a,i)}(e,t,o,r))).reduce(i.A,{})}function y(e){return g(e,u)}function v(e){return g(e,d)}function b(e){return g(e,f)}y.propTypes={},y.filterProps=u,v.propTypes={},v.filterProps=d,b.propTypes={},b.filterProps=f},"+y7V":(e,t,r)=>{"use strict";r.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>i});var n=r("unMj"),o=r("fGgT");function i(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){const r=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=r)return r}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:i(e,r)||n,t&&(o=t(o,n,e)),o}const s=function(e){const{prop:t,cssProperty:r=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=i(e.theme,s)||{};return(0,o.NI)(e,c,(e=>{let o=a(u,l,e);return e===o&&"string"==typeof e&&(o=a(u,l,`${t}${"default"===e?"":(0,n.A)(e)}`,e)),!1===r?o:{[r]:o}}))};return c.propTypes={},c.filterProps=[t],c}},"9k3N":(e,t,r)=>{"use strict";r.d(t,{A:()=>L});var n=r("rZTa"),o=r("+y7V"),i=r("cENE");const a=function(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((r=>{e[r]=t})),e)),{}),r=e=>Object.keys(e).reduce(((r,n)=>t[n]?(0,i.A)(r,t[n](e)):r),{});return r.propTypes={},r.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),r};var s=r("fGgT");function l(e){return"number"!=typeof e?e:`${e}px solid`}function c(e,t){return(0,o.Ay)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),f=c("borderRight",l),p=c("borderBottom",l),h=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),y=c("borderRightColor"),v=c("borderBottomColor"),b=c("borderLeftColor"),_=c("outline",l),x=c("outlineColor"),w=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,n.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:(0,n._W)(t,e)});return(0,s.NI)(e,e.borderRadius,r)}return null};w.propTypes={},w.filterProps=["borderRadius"],a(u,d,f,p,h,m,g,y,v,b,w,_,x);const A=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,n.MA)(e.theme,"spacing",8,"gap"),r=e=>({gap:(0,n._W)(t,e)});return(0,s.NI)(e,e.gap,r)}return null};A.propTypes={},A.filterProps=["gap"];const S=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,n.MA)(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:(0,n._W)(t,e)});return(0,s.NI)(e,e.columnGap,r)}return null};S.propTypes={},S.filterProps=["columnGap"];const C=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,n.MA)(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:(0,n._W)(t,e)});return(0,s.NI)(e,e.rowGap,r)}return null};function E(e,t){return"grey"===t?t:e}function T(e){return e<=1&&0!==e?100*e+"%":e}C.propTypes={},C.filterProps=["rowGap"],a(A,S,C,(0,o.Ay)({prop:"gridColumn"}),(0,o.Ay)({prop:"gridRow"}),(0,o.Ay)({prop:"gridAutoFlow"}),(0,o.Ay)({prop:"gridAutoColumns"}),(0,o.Ay)({prop:"gridAutoRows"}),(0,o.Ay)({prop:"gridTemplateColumns"}),(0,o.Ay)({prop:"gridTemplateRows"}),(0,o.Ay)({prop:"gridTemplateAreas"}),(0,o.Ay)({prop:"gridArea"})),a((0,o.Ay)({prop:"color",themeKey:"palette",transform:E}),(0,o.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:E}),(0,o.Ay)({prop:"backgroundColor",themeKey:"palette",transform:E}));const I=(0,o.Ay)({prop:"width",transform:T}),k=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var r,n;const o=(null==(r=e.theme)||null==(r=r.breakpoints)||null==(r=r.values)?void 0:r[t])||s.zu[t];return o?"px"!==(null==(n=e.theme)||null==(n=n.breakpoints)?void 0:n.unit)?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:T(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};k.filterProps=["maxWidth"];const M=(0,o.Ay)({prop:"minWidth",transform:T}),R=(0,o.Ay)({prop:"height",transform:T}),P=(0,o.Ay)({prop:"maxHeight",transform:T}),O=(0,o.Ay)({prop:"minHeight",transform:T}),L=((0,o.Ay)({prop:"size",cssProperty:"width",transform:T}),(0,o.Ay)({prop:"size",cssProperty:"height",transform:T}),a(I,k,M,R,P,O,(0,o.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:w},color:{themeKey:"palette",transform:E},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:E},backgroundColor:{themeKey:"palette",transform:E},p:{style:n.Ms},pt:{style:n.Ms},pr:{style:n.Ms},pb:{style:n.Ms},pl:{style:n.Ms},px:{style:n.Ms},py:{style:n.Ms},padding:{style:n.Ms},paddingTop:{style:n.Ms},paddingRight:{style:n.Ms},paddingBottom:{style:n.Ms},paddingLeft:{style:n.Ms},paddingX:{style:n.Ms},paddingY:{style:n.Ms},paddingInline:{style:n.Ms},paddingInlineStart:{style:n.Ms},paddingInlineEnd:{style:n.Ms},paddingBlock:{style:n.Ms},paddingBlockStart:{style:n.Ms},paddingBlockEnd:{style:n.Ms},m:{style:n.Lc},mt:{style:n.Lc},mr:{style:n.Lc},mb:{style:n.Lc},ml:{style:n.Lc},mx:{style:n.Lc},my:{style:n.Lc},margin:{style:n.Lc},marginTop:{style:n.Lc},marginRight:{style:n.Lc},marginBottom:{style:n.Lc},marginLeft:{style:n.Lc},marginX:{style:n.Lc},marginY:{style:n.Lc},marginInline:{style:n.Lc},marginInlineStart:{style:n.Lc},marginInlineEnd:{style:n.Lc},marginBlock:{style:n.Lc},marginBlockStart:{style:n.Lc},marginBlockEnd:{style:n.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:A},rowGap:{style:C},columnGap:{style:S},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:T},maxWidth:{style:k},minWidth:{transform:T},height:{transform:T},maxHeight:{transform:T},minHeight:{transform:T},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},"0kTp":(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r("+9dH"),o=r("Nlia"),i=r("w9Qe"),a=r("9k3N");const s=["sx"],l=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(r=e.theme)?void 0:r.unstable_sxConfig)?t:a.A;return Object.keys(e).forEach((t=>{o[t]?n.systemProps[t]=e[t]:n.otherProps[t]=e[t]})),n};function c(e){const{sx:t}=e,r=(0,o.A)(e,s),{systemProps:a,otherProps:c}=l(r);let u;return u=Array.isArray(t)?[a,...t]:"function"==typeof t?(...e)=>{const r=t(...e);return(0,i.Q)(r)?(0,n.A)({},a,r):a}:(0,n.A)({},a,t),(0,n.A)({},c,{sx:u})}},DsUO:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,extendSxProp:()=>o.A,unstable_createStyleFunctionSx:()=>n.k,unstable_defaultSxConfig:()=>i.A});var n=r("xTOY"),o=r("0kTp"),i=r("9k3N")},xTOY:(e,t,r)=>{"use strict";r.d(t,{A:()=>u,k:()=>l});var n=r("unMj"),o=r("cENE"),i=r("+y7V"),a=r("fGgT"),s=r("9k3N");function l(){function e(e,t,r,o){const s={[e]:t,theme:r},l=o[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:f}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const p=(0,i.Yn)(r,u)||{};return f?f(s):(0,a.NI)(s,t,(t=>{let r=(0,i.BO)(p,d,t);return t===r&&"string"==typeof t&&(r=(0,i.BO)(p,d,`${e}${"default"===t?"":(0,n.A)(t)}`,t)),!1===c?r:{[c]:r}}))}return function t(r){var n;const{sx:i,theme:l={}}=r||{};if(!i)return null;const c=null!=(n=l.unstable_sxConfig)?n:s.A;function u(r){let n=r;if("function"==typeof r)n=r(l);else if("object"!=typeof r)return r;if(!n)return null;const i=(0,a.EU)(l.breakpoints),s=Object.keys(i);let u=i;return Object.keys(n).forEach((r=>{const i="function"==typeof(s=n[r])?s(l):s;var s;if(null!=i)if("object"==typeof i)if(c[r])u=(0,o.A)(u,e(r,i,l,c));else{const e=(0,a.NI)({theme:l},i,(e=>({[r]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),r=new Set(t);return e.every((e=>r.size===Object.keys(e).length))}(e,i)?u=(0,o.A)(u,e):u[r]=t({sx:i,theme:l})}else u=(0,o.A)(u,e(r,i,l,c))})),(0,a.vf)(s,u)}return Array.isArray(i)?i.map(u):u(i)}}const c=l();c.filterProps=["sx"];const u=c},M82X:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r("+9dH"),o=r("Nlia"),i=r("n+sr"),a=r("w9Qe"),s=r("Tazo"),l=r("xTOY");const c=["ownerState"],u=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const p=(0,s.A)(),h=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function m({defaultTheme:e,theme:t,themeId:r}){return n=t,0===Object.keys(n).length?e:t[r]||t;var n}function g(e){return e?(t,r)=>r[e]:null}function y(e,t){let{ownerState:r}=t,i=(0,o.A)(t,c);const a="function"==typeof e?e((0,n.A)({ownerState:r},i)):e;if(Array.isArray(a))return a.flatMap((e=>y(e,(0,n.A)({ownerState:r},i))));if(a&&"object"==typeof a&&Array.isArray(a.variants)){const{variants:e=[]}=a;let t=(0,o.A)(a,u);return e.forEach((e=>{let o=!0;"function"==typeof e.props?o=e.props((0,n.A)({ownerState:r},i,r)):Object.keys(e.props).forEach((t=>{(null==r?void 0:r[t])!==e.props[t]&&i[t]!==e.props[t]&&(o=!1)})),o&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,n.A)({ownerState:r},i,r)):e.style))})),t}return a}const v=function(e={}){const{themeId:t,defaultTheme:r=p,rootShouldForwardProp:s=f,slotShouldForwardProp:c=f}=e,u=e=>(0,l.A)((0,n.A)({},e,{theme:m((0,n.A)({},e,{defaultTheme:r,themeId:t}))}));return u.__mui_systemSx=!0,(e,l={})=>{(0,i.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:p,slot:v,skipVariantsResolver:b,skipSx:_,overridesResolver:x=g(h(v))}=l,w=(0,o.A)(l,d),A=void 0!==b?b:v&&"Root"!==v&&"root"!==v||!1,S=_||!1;let C=f;"Root"===v||"root"===v?C=s:v?C=c:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const E=(0,i.default)(e,(0,n.A)({shouldForwardProp:C,label:void 0},w)),T=e=>"function"==typeof e&&e.__emotion_real!==e||(0,a.Q)(e)?o=>y(e,(0,n.A)({},o,{theme:m({theme:o.theme,defaultTheme:r,themeId:t})})):e,I=(o,...i)=>{let a=T(o);const s=i?i.map(T):[];p&&x&&s.push((e=>{const o=m((0,n.A)({},e,{defaultTheme:r,themeId:t}));if(!o.components||!o.components[p]||!o.components[p].styleOverrides)return null;const i=o.components[p].styleOverrides,a={};return Object.entries(i).forEach((([t,r])=>{a[t]=y(r,(0,n.A)({},e,{theme:o}))})),x(e,a)})),p&&!A&&s.push((e=>{var o;const i=m((0,n.A)({},e,{defaultTheme:r,themeId:t}));return y({variants:null==i||null==(o=i.components)||null==(o=o[p])?void 0:o.variants},(0,n.A)({},e,{theme:i}))})),S||s.push(u);const l=s.length-i.length;if(Array.isArray(o)&&l>0){const e=new Array(l).fill("");a=[...o,...e],a.raw=[...o.raw,...e]}const c=E(a,...s);return e.muiName&&(c.muiName=e.muiName),c};return E.withConfig&&(I.withConfig=E.withConfig),I}}()},bBSl:(e,t,r)=>{"use strict";var n;r.d(t,{A:()=>d});var o=r("q1tI"),i=r("XgeM"),a=r("PfWk"),s=r("jyRQ");function l(e,t,r,n,a){const[s,l]=o.useState((()=>a&&r?r(e).matches:n?n(e).matches:t));return(0,i.A)((()=>{let t=!0;if(!r)return;const n=r(e),o=()=>{t&&l(n.matches)};return o(),n.addListener(o),()=>{t=!1,n.removeListener(o)}}),[e,r]),s}const c=(n||(n=r.t(o,2))).useSyncExternalStore;function u(e,t,r,n,i){const a=o.useCallback((()=>t),[t]),s=o.useMemo((()=>{if(i&&r)return()=>r(e).matches;if(null!==n){const{matches:t}=n(e);return()=>t}return a}),[a,e,n,i,r]),[l,u]=o.useMemo((()=>{if(null===r)return[a,()=>()=>{}];const t=r(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]}),[a,r,e]);return c(u,l,s)}function d(e,t={}){const r=(0,s.A)(),n="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:o=!1,matchMedia:i=(n?window.matchMedia:null),ssrMatchMedia:d=null,noSsr:f=!1}=(0,a.A)({name:"MuiUseMediaQuery",props:t,theme:r});let p="function"==typeof e?e(r):e;return p=p.replace(/^@media( ?)/m,""),(void 0!==c?u:l)(p,o,i,d,f)}},aoPf:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r("Tazo"),o=r("jyRQ");const i=(0,n.A)(),a=function(e=i){return(0,o.A)(e)}},PfWk:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("d70t");function o(e){const{theme:t,name:r,props:o}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?(0,n.A)(t.components[r].defaultProps,o):o}},sdrl:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r("PfWk"),o=r("aoPf");function i({props:e,name:t,defaultTheme:r,themeId:i}){let a=(0,o.A)(r);return i&&(a=a[i]||a),(0,n.A)({theme:a,name:t,props:e})}},jyRQ:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("xSbz");const i=function(e=null){const t=n.useContext(o.T);return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}},"847q":(e,t,r)=>{"use strict";t.A=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}(r("q1tI")),o=r("n+sr");function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}t.A=function(e=null){const t=n.useContext(o.ThemeContext);return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}},Oory:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});const n=e=>e,o=(()=>{let e=n;return{configure(t){e=t},generate:t=>e(t),reset(){e=n}}})()},"/E4l":(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r("+9dH"),o=r("gU+W");const i=function(e,t,r){return void 0===e||(0,o.A)(e)?t:(0,n.A)({},t,{ownerState:(0,n.A)({},t.ownerState,r)})}},unMj:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("KRkT");function o(e){if("string"!=typeof e)throw new Error((0,n.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},IisN:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r("unMj")},"5cFC":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}},"9rAX":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r("5cFC")},aGM9:(e,t,r)=>{"use strict";function n(e,t,r=void 0){const n={};return Object.keys(e).forEach((o=>{n[o]=e[o].reduce(((e,n)=>{if(n){const o=t(n);""!==o&&e.push(o),r&&r[n]&&e.push(r[n])}return e}),[]).join(" ")})),n}r.d(t,{A:()=>n})},zhWT:(e,t,r)=>{"use strict";function n(...e){return e.reduce(((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)}),(()=>{}))}r.d(t,{A:()=>n})},QoIX:(e,t,r)=>{"use strict";function n(e,t=166){let r;function n(...n){clearTimeout(r),r=setTimeout((()=>{e.apply(this,n)}),t)}return n.clear=()=>{clearTimeout(r)},n}r.d(t,{A:()=>n})},w9Qe:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,Q:()=>o});var n=r("+9dH");function o(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function i(e){if(!o(e))return e;const t={};return Object.keys(e).forEach((r=>{t[r]=i(e[r])})),t}function a(e,t,r={clone:!0}){const s=r.clone?(0,n.A)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((n=>{o(t[n])&&Object.prototype.hasOwnProperty.call(e,n)&&o(e[n])?s[n]=a(e[n],t[n],r):r.clone?s[n]=o(t[n])?i(t[n]):t[n]:s[n]=t[n]})),s}},"K+2h":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,isPlainObject:()=>n.Q});var n=r("w9Qe")},OrJ7:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e,t=[]){if(void 0===e)return{};const r={};return Object.keys(e).filter((r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r))).forEach((t=>{r[t]=e[t]})),r}},KRkT:(e,t,r)=>{"use strict";function n(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;en})},"WF/F":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r("KRkT")},TkYO:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>i});var n=r("Oory");const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t,r="Mui"){const i=o[t];return i?`${r}-${i}`:`${n.A.generate(e)}-${t}`}},PYeY:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("TkYO");function o(e,t,r="Mui"){const o={};return t.forEach((t=>{o[t]=(0,n.Ay)(e,t,r)})),o}},MZ7D:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l,getFunctionName:()=>i});var n=r("TOwV");const o=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function i(e){const t=`${e}`.match(o);return t&&t[1]||""}function a(e,t=""){return e.displayName||e.name||i(e)||t}function s(e,t,r){const n=a(t);return e.displayName||(""!==n?`${r}(${n})`:r)}function l(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return a(e,"Component");if("object"==typeof e)switch(e.$$typeof){case n.ForwardRef:return s(e,e.render,"ForwardRef");case n.Memo:return s(e,e.type,"memo");default:return}}}},Omxi:(e,t,r)=>{"use strict";function n(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}r.d(t,{A:()=>n})},"gU+W":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e){return"string"==typeof e}},lHbp:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("q1tI");function o(e,t){var r,o;return n.isValidElement(e)&&-1!==t.indexOf(null!=(r=e.type.muiName)?r:null==(o=e.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)}},"9sNS":(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r("+9dH"),o=r("juqV"),i=r("OrJ7");const a=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((r=>{t[r]=e[r]})),t},s=function(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:s,externalForwardedProps:l,className:c}=e;if(!t){const e=(0,o.A)(null==r?void 0:r.className,c,null==l?void 0:l.className,null==s?void 0:s.className),t=(0,n.A)({},null==r?void 0:r.style,null==l?void 0:l.style,null==s?void 0:s.style),i=(0,n.A)({},r,l,s);return e.length>0&&(i.className=e),Object.keys(t).length>0&&(i.style=t),{props:i,internalRef:void 0}}const u=(0,i.A)((0,n.A)({},l,s)),d=a(s),f=a(l),p=t(u),h=(0,o.A)(null==p?void 0:p.className,null==r?void 0:r.className,c,null==l?void 0:l.className,null==s?void 0:s.className),m=(0,n.A)({},null==p?void 0:p.style,null==r?void 0:r.style,null==l?void 0:l.style,null==s?void 0:s.style),g=(0,n.A)({},p,r,f,d);return h.length>0&&(g.className=h),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:p.ref}}},p4lV:(e,t,r)=>{"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,{A:()=>n})},"4bZc":(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("p4lV");function o(e){return(0,n.A)(e).defaultView||window}},dd9Q:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e,t,r){return"function"==typeof e?e(t,r):e}},d70t:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("+9dH");function o(e,t){const r=(0,n.A)({},t);return Object.keys(e).forEach((i=>{if(i.toString().match(/^(components|slots)$/))r[i]=(0,n.A)({},e[i],r[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const a=e[i]||{},s=t[i];r[i]={},s&&Object.keys(s)?a&&Object.keys(a)?(r[i]=(0,n.A)({},s),Object.keys(a).forEach((e=>{r[i][e]=o(a[e],s[e])}))):r[i]=s:r[i]=a}else void 0===r[i]&&(r[i]=e[i])})),r}},"1YXj":(e,t,r)=>{"use strict";function n(e,t){"function"==typeof e?e(t):e&&(e.current=t)}r.d(t,{A:()=>n})},leBO:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("q1tI");function o({controlled:e,default:t,name:r,state:o="value"}){const{current:i}=n.useRef(void 0!==e),[a,s]=n.useState(t);return[i?e:a,n.useCallback((e=>{i||s(e)}),[])]}},XgeM:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("q1tI");const o="undefined"!=typeof window?n.useLayoutEffect:n.useEffect},nXnS:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("XgeM");const i=function(e){const t=n.useRef(e);return(0,o.A)((()=>{t.current=e})),n.useRef(((...e)=>(0,t.current)(...e))).current}},N0rN:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("1YXj");function i(...e){return n.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{(0,o.A)(e,t)}))}),e)}},A3c4:(e,t,r)=>{"use strict";var n;r.d(t,{A:()=>s});var o=r("q1tI");let i=0;const a=(n||(n=r.t(o,2)))["useId".toString()];function s(e){if(void 0!==a){const t=a();return null!=e?e:t}return function(e){const[t,r]=o.useState(e),n=e||t;return o.useEffect((()=>{null==t&&(i+=1,r(`mui-${i}`))}),[t]),n}(e)}},B5YM:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r("q1tI"),o=r("J13E");let i=!0,a=!1;const s=new o.E,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function u(){i=!1}function d(){"hidden"===this.visibilityState&&a&&(i=!0)}function f(){const e=n.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))}),[]),t=n.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return i||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!l[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,s.start(100,(()=>{a=!1})),t.current=!1,!0)},ref:e}}},"VGa/":(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r("q1tI");const o=e=>{const t=n.useRef({});return n.useEffect((()=>{t.current=e})),t.current}},"0Ydi":(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r("+9dH"),o=r("Nlia"),i=r("N0rN"),a=r("/E4l"),s=r("9sNS"),l=r("dd9Q");const c=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"],u=function(e){var t;const{elementType:r,externalSlotProps:u,ownerState:d,skipResolvingSlotProps:f=!1}=e,p=(0,o.A)(e,c),h=f?{}:(0,l.A)(u,d),{props:m,internalRef:g}=(0,s.A)((0,n.A)({},p,{externalSlotProps:h})),y=(0,i.A)(g,null==h?void 0:h.ref,null==(t=e.additionalProps)?void 0:t.ref);return(0,a.A)(r,(0,n.A)({},m,{ref:y}),d)}},J13E:(e,t,r)=>{"use strict";r.d(t,{E:()=>a,A:()=>s});var n=r("q1tI");const o={},i=[];class a{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new a}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function s(){const e=function(e){const t=n.useRef(o);return t.current===o&&(t.current=e(void 0)),t}(a.create).current;var t;return t=e.disposeEffect,n.useEffect(t,i),e}},"r/ya":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"}},cMZV:(e,t,r)=>{"use strict";r.d(t,{C:()=>jc});var n=r("+9dH"),o=r("q1tI"),i=r("17x9"),a=r.n(i);const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=e=>{let t,r,n,o,i,a,l,c="",u=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");u>4,r=(15&i)<<4|a>>2,n=(3&a)<<6|l,c+=String.fromCharCode(t),64!=a&&(c+=String.fromCharCode(r)),64!=l&&(c+=String.fromCharCode(n));return c},c=[];let u=0;for(;u<64;)c[u]=0|4294967296*Math.sin(++u%Math.PI);let d=function(e){return e.NotFound="NotFound",e.Invalid="Invalid",e.ExpiredAnnual="ExpiredAnnual",e.ExpiredAnnualGrace="ExpiredAnnualGrace",e.ExpiredVersion="ExpiredVersion",e.Valid="Valid",e.OutOfScope="OutOfScope",e}({});const f=["pro","premium"],p=["perpetual","annual","subscription"],h=/^.*EXPIRY=([0-9]+),.*$/;function m({releaseInfo:e,licenseKey:t,acceptedScopes:r}){if(!e)throw new Error("MUI: The release information is missing. Not able to validate license.");if(!t)return{status:d.NotFound};const n=t.substr(0,32),o=t.substr(32);if(n!==function(e){const t=[];let r,n,o,i=unescape(encodeURI(e))+"€",a=i.length;const s=[r=1732584193,n=4023233417,~r,~n];for(e=--a/4+2|15,t[--e]=8*a;~a;)t[a>>2]|=i.charCodeAt(a)<<8*a--;for(u=i=0;u>4]+c[i]+~~t[u|15&[i,5*i+1,3*i+5,7*i][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+i++%4])|o>>>-a),r,n])r=0|a[1],n=a[2];for(i=4;i;)s[--i]+=a[i]}for(e="";i<32;)e+=(s[i>>3]>>4*(1^i++)&15).toString(16);return e}(o))return{status:d.Invalid};const i=(e=>{const t=l(e);return t.includes("KEYVERSION=1")?(e=>{let t;try{t=parseInt(e.match(h)[1],10),t&&!Number.isNaN(t)||(t=null)}catch(e){t=null}return{scope:"pro",licensingModel:"perpetual",expiryTimestamp:t}})(t):t.includes("KV=2")?(e=>{const t={scope:null,licensingModel:null,expiryTimestamp:null};return e.split(",").map((e=>e.split("="))).filter((e=>2===e.length)).forEach((([e,r])=>{if("S"===e&&(t.scope=r),"LM"===e&&(t.licensingModel=r),"E"===e){const e=parseInt(r,10);e&&!Number.isNaN(e)&&(t.expiryTimestamp=e)}})),t})(t):null})(o);if(null==i)return console.error("Error checking license. Key version not found!"),{status:d.Invalid};if(null==i.licensingModel||!p.includes(i.licensingModel))return console.error("Error checking license. Licensing model not found or invalid!"),{status:d.Invalid};if(null==i.expiryTimestamp)return console.error("Error checking license. Expiry timestamp not found or invalid!"),{status:d.Invalid};i.licensingModel;{const t=parseInt(l(e),10);if(Number.isNaN(t))throw new Error("MUI: The release information is invalid. Not able to validate license.");if(i.expiryTimestamp{const o=null!=r?r:g.K.getLicenseKey();if(b[e]&&b[e].key===o)return b[e].licenseVerifier;const i=e.includes("premium")?["premium"]:["pro","premium"],a=e.includes("premium")?"Premium":"Pro",s=m({releaseInfo:t,licenseKey:o,acceptedScopes:i});b[e]={key:o,licenseVerifier:s};const l=`@mui/${e}`;return s.status===d.Valid||(s.status===d.Invalid?y(["MUI: Invalid license key.","","Your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo.","","To solve the issue, you need to double check that `setLicenseKey()` is called with the right argument","Please check the license key installation https://mui.com/r/x-license-key-installation."]):s.status===d.OutOfScope?y(["MUI: License key plan mismatch.","","Your use of MUI X is not compatible with the plan of your license key. The feature you are trying to use is not included in the plan of your license key. This happens if you try to use `DataGridPremium` with a license key for the Pro plan.","","To solve the issue, you can upgrade your plan from Pro to Premium at https://mui.com/r/x-get-license?scope=premium.","Of if you didn't intend to use Premium features, you can replace the import of `@mui/x-data-grid-premium` with `@mui/x-data-grid-pro`."]):s.status===d.NotFound?function({plan:e,packageName:t}){y(["MUI: Missing license key.","",`The license key is missing. You might not be allowed to use \`${t}\` which is part of MUI X ${e}.`,"","To solve the issue, you can check the free trial conditions: https://mui.com/r/x-license-trial.","If you are eligible no actions are required. If you are not eligible to the free trial, you need to purchase a license https://mui.com/r/x-get-license or stop using the software immediately."])}({plan:a,packageName:l}):s.status===d.ExpiredAnnualGrace?function({plan:e,licenseKey:t,expiryTimestamp:r}){y(["MUI: Expired license key.","",`Your annual license key to use MUI X ${e}'s on non-production environments is expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(r)}`,`- Installed license key: ${t}`,""])}((0,n.A)({plan:a},s.meta)):s.status===d.ExpiredAnnual?function({plan:e,licenseKey:t,expiryTimestamp:r}){throw new Error(["MUI: Expired license key.","",`Your annual license key to use MUI X ${e}'s on non-production environments is expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(r)}`,`- Installed license key: ${t}`,""].join("\n"))}((0,n.A)({plan:a},s.meta)):s.status===d.ExpiredVersion&&function({packageName:e}){y(["MUI: Expired package version.","",`You have installed a version of \`${e}\` that is outside of the maintenance plan of your license key. By default, commercial licenses provide access to new versions released during the first year after the purchase.`,"","To solve the issue, you can renew your license https://mui.com/r/x-get-license or install an older version of the npm package that is compatible with your license key."])}({packageName:l})),s}),[e,t,r])}var x=r("nKUr");function w(e){switch(e){case d.ExpiredAnnualGrace:case d.ExpiredAnnual:return"MUI X Expired license key";case d.ExpiredVersion:return"MUI X Expired package version";case d.Invalid:return"MUI X Invalid license key";case d.OutOfScope:return"MUI X License key plan mismatch";case d.NotFound:return"MUI X Missing license key";default:throw new Error("MUI: Unhandled MUI X license status.")}}function A(e){const{packageName:t,releaseInfo:r}=e,n=_(t,r);return n.status===d.Valid?null:(0,x.jsx)("div",{style:{position:"absolute",pointerEvents:"none",color:"#8282829e",zIndex:1e5,width:"100%",textAlign:"center",bottom:"50%",right:0,letterSpacing:5,fontSize:24},children:w(n.status)})}var S=r("hmGc"),C=r("yAU5");const E=o.createContext(void 0);function T(){const e=o.useContext(E);if(void 0===e)throw new Error(["MUI: Could not find the data grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join("\n"));return e}var I=r("3qeK");function k({privateApiRef:e,props:t,children:r}){const n=o.useRef(e.current.getPublicApi());return(0,x.jsx)(I.y.Provider,{value:t,children:(0,x.jsx)(E.Provider,{value:e,children:(0,x.jsx)(C.k.Provider,{value:n,children:r})})})}var M=r("Nlia"),R=r("juqV"),P=r("unMj"),O=r("aGM9"),L=r("N0rN"),D=r("XgeM"),N=r("2Qr1"),F=r("Vn7y"),z=r("7Cdf");const B={[`.${z.x.columnSeparator}, .${z.x["columnSeparator--resizing"]}`]:{visibility:"visible",width:"auto"}},j={[`& .${z.x.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${z.x.menuIcon}`]:{width:"auto",visibility:"visible"}},U=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${z.x.autoHeight}`]:t.autoHeight},{[`&.${z.x.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${z.x["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${z.x["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${z.x["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${z.x.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${z.x["root--disableUserSelection"]} .${z.x.cell}`]:t["root--disableUserSelection"]},{[`&.${z.x.autosizing}`]:t.autosizing},{[`& .${z.x.editBooleanCell}`]:t.editBooleanCell},{[`& .${z.x["cell--editing"]}`]:t["cell--editing"]},{[`& .${z.x["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${z.x["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${z.x["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${z.x["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${z.x.cell}`]:t.cell},{[`& .${z.x["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${z.x["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${z.x["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${z.x["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${z.x["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${z.x.cellContent}`]:t.cellContent},{[`& .${z.x.cellCheckbox}`]:t.cellCheckbox},{[`& .${z.x.cellSkeleton}`]:t.cellSkeleton},{[`& .${z.x.checkboxInput}`]:t.checkboxInput},{[`& .${z.x["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${z.x["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${z.x["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${z.x["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${z.x["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${z.x["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${z.x["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${z.x["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${z.x["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${z.x.columnHeader}`]:t.columnHeader},{[`& .${z.x.headerFilterRow}`]:t.headerFilterRow},{[`& .${z.x.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${z.x.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${z.x.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${z.x["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${z.x["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${z.x.columnSeparator}`]:t.columnSeparator},{[`& .${z.x.filterIcon}`]:t.filterIcon},{[`& .${z.x.iconSeparator}`]:t.iconSeparator},{[`& .${z.x.menuIcon}`]:t.menuIcon},{[`& .${z.x.menuIconButton}`]:t.menuIconButton},{[`& .${z.x.menuOpen}`]:t.menuOpen},{[`& .${z.x.menuList}`]:t.menuList},{[`& .${z.x["row--editable"]}`]:t["row--editable"]},{[`& .${z.x["row--editing"]}`]:t["row--editing"]},{[`& .${z.x["row--dragging"]}`]:t["row--dragging"]},{[`& .${z.x.row}`]:t.row},{[`& .${z.x.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${z.x.rowReorderCell}`]:t.rowReorderCell},{[`& .${z.x["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${z.x.sortIcon}`]:t.sortIcon},{[`& .${z.x.withBorderColor}`]:t.withBorderColor},{[`& .${z.x.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${z.x.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${z.x.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${z.x["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})((({theme:e})=>{const t=function(e){return e.vars?e.vars.palette.TableCell.border:"light"===e.palette.mode?(0,N.a)((0,N.X4)(e.palette.divider,1),.88):(0,N.e$)((0,N.X4)(e.palette.divider,1),.68)}(e),r=e.shape.borderRadius;return(0,n.A)({"--unstable_DataGrid-radius":"number"==typeof r?`${r}px`:r,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:(0,N.X4)(e.palette.background.default,e.palette.action.disabledOpacity),"--DataGrid-cellOffsetMultiplier":2,flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:t,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflowAnchor:"none",[`&.${z.x.autoHeight}`]:{height:"auto",[`& .${z.x["row--lastVisible"]} .${z.x.cell}`]:{borderBottomColor:"transparent"}},[`&.${z.x.autosizing}`]:{[`& .${z.x.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},[`& .${z.x.cell} > *`]:{overflow:"visible !important",whiteSpace:"nowrap"},[`& .${z.x.groupingCriteriaCell}`]:{width:"unset"},[`& .${z.x.treeDataGroupingCell}`]:{width:"unset"}},[`& .${z.x["virtualScrollerContent--overflowed"]} .${z.x["row--lastVisible"]} .${z.x.cell}`]:{borderBottomColor:"transparent"},[`& .${z.x.columnHeader}, & .${z.x.cell}`]:{WebkitTapHighlightColor:"transparent",lineHeight:null,padding:"0 10px",boxSizing:"border-box"},[`& .${z.x.columnHeader}:focus-within, & .${z.x.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:(0,N.X4)(e.palette.primary.main,.5)} 1px`,outlineWidth:1,outlineOffset:-1},[`& .${z.x.columnHeader}:focus, & .${z.x.cell}:focus`]:{outline:`solid ${e.palette.primary.main} 1px`},[`& .${z.x.columnHeaderCheckbox}, & .${z.x.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${z.x.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${z.x["columnHeader--sorted"]} .${z.x.iconButtonContainer}, & .${z.x["columnHeader--filtered"]} .${z.x.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${z.x.columnHeader}:not(.${z.x["columnHeader--sorted"]}) .${z.x.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${z.x.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden",position:"relative"},[`& .${z.x.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${z.x["columnHeader--filledGroup"]} .${z.x.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${z.x["columnHeader--filledGroup"]}.${z.x["columnHeader--showColumnBorder"]} .${z.x.columnHeaderTitleContainer}`]:{borderBottom:"none"},[`& .${z.x["columnHeader--filledGroup"]}.${z.x["columnHeader--showColumnBorder"]}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${z.x.headerFilterRow}`]:{borderTop:`1px solid ${t}`},[`& .${z.x.sortIcon}, & .${z.x.filterIcon}`]:{fontSize:"inherit"},[`& .${z.x["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${z.x["columnHeader--alignCenter"]} .${z.x.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${z.x["columnHeader--alignRight"]} .${z.x.columnHeaderDraggableContainer}, & .${z.x["columnHeader--alignRight"]} .${z.x.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${z.x["columnHeader--alignCenter"]} .${z.x.menuIcon}, & .${z.x["columnHeader--alignRight"]} .${z.x.menuIcon}`]:{marginRight:"auto",marginLeft:-6},[`& .${z.x["columnHeader--alignRight"]} .${z.x.menuIcon}, & .${z.x["columnHeader--alignRight"]} .${z.x.menuIcon}`]:{marginRight:"auto",marginLeft:-10},[`& .${z.x["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${z.x.columnSeparator}`]:{visibility:"hidden",position:"absolute",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"center",color:t},"@media (hover: hover)":{[`& .${z.x.columnHeaders}:hover`]:B,[`& .${z.x.columnHeader}:hover`]:j,[`& .${z.x.columnHeader}:not(.${z.x["columnHeader--sorted"]}):hover .${z.x.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${z.x.columnHeaders}`]:B,[`& .${z.x.columnHeader}`]:j},[`& .${z.x["columnSeparator--sideLeft"]}`]:{left:-12},[`& .${z.x["columnSeparator--sideRight"]}`]:{right:-12},[`& .${z.x["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none","&:hover":{color:(e.vars||e).palette.text.primary,"@media (hover: none)":{color:t}},[`&.${z.x["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.text.primary},"& svg":{pointerEvents:"none"}},[`& .${z.x.iconSeparator}`]:{color:"inherit"},[`& .${z.x.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-10,display:"flex",alignItems:"center"},[`.${z.x.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${z.x.row}`]:{display:"flex",width:"fit-content",breakInside:"avoid","&:hover, &.Mui-hovered":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(\n ${e.vars.palette.action.selectedOpacity} + \n ${e.vars.palette.action.hoverOpacity}\n ))`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`& .${z.x.cell}`]:{display:"flex",alignItems:"center",borderBottom:"1px solid","&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity+e.palette.action.hoverOpacity})`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,N.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`&.${z.x["root--disableUserSelection"]} .${z.x.cell}`]:{userSelect:"none"},[`& .${z.x.row}:not(.${z.x["row--dynamicHeight"]}) > .${z.x.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${z.x.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${z.x.cell}.${z.x["cell--selectionMode"]}`]:{cursor:"default"},[`& .${z.x.cell}.${z.x["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`solid ${(e.vars||e).palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${z.x["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${z.x["row--editing"]} .${z.x.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${z.x.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${z.x.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${z.x.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${z.x.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${z.x.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${z.x["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${z.x.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`.${z.x.withBorderColor}`]:{borderColor:t},[`& .${z.x["cell--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${z.x["columnHeader--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${z.x["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${z.x["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${z.x["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${z.x.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${z.x.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${z.x["columnHeader--dragging"]}, & .${z.x["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${z.x["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${z.x.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${z.x.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${z.x.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${z.x.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${z.x.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)}})}));var $=r("FltU"),V=r("gYIS"),G=r("ebfa"),H=r("GPgX");const W=e=>e.columnGrouping,q=(0,H.S)(W,(e=>{var t;return null!=(t=null==e?void 0:e.unwrappedGroupingModel)?t:{}})),X=(0,H.S)(W,(e=>{var t;return null!=(t=null==e?void 0:e.lookup)?t:{}})),Z=(0,H.S)(W,(e=>{var t;return null!=(t=null==e?void 0:e.headerStructure)?t:[]})),Y=(0,H.Mz)(W,(e=>{var t;return null!=(t=null==e?void 0:e.maxDepth)?t:0}));var K=r("VV28");const J=()=>{var e;const t=T(),r=(0,$.A)(),n=(0,S.N)(t,G.iv),o=(0,S.N)(t,K.H0),i=(0,S.N)(t,Y),a=(0,S.N)(t,K.OQ);let s="grid";return null!=(e=r.experimentalFeatures)&&e.ariaV7&&r.treeData&&(s="treegrid"),{role:s,"aria-colcount":n.length,"aria-rowcount":i+1+a+o,"aria-multiselectable":!r.disableMultipleRowSelection}},Q=["children","className"],ee=o.forwardRef((function(e,t){var r;const i=(0,$.A)(),{children:a,className:s}=e,l=(0,M.A)(e,Q),c=T(),u=(0,S.N)(c,V.BC),d=o.useRef(null),f=(0,L.A)(d,t),p=null!=(r=i.experimentalFeatures)&&r.ariaV7?null:J,h="function"==typeof p?p():null,m=(0,n.A)({},i,{density:u}),g=(e=>{const{autoHeight:t,density:r,classes:n}=e,o={root:["root",t&&"autoHeight",`root--density${(0,P.A)(r)}`,"withBorderColor"]};return(0,O.A)(o,z.B,n)})(m);c.current.register("public",{rootElementRef:d});const[y,v]=o.useState(!1);return(0,D.A)((()=>{v(!0)}),[]),y?(0,x.jsx)(U,(0,n.A)({ref:f,className:(0,R.A)(s,g.root),ownerState:m},h,l,{children:a})):null}));function te(){var e,t;const r=(0,$.A)();return(0,x.jsxs)(o.Fragment,{children:[(0,x.jsx)(r.slots.preferencesPanel,(0,n.A)({},null==(e=r.slotProps)?void 0:e.preferencesPanel)),r.slots.toolbar&&(0,x.jsx)(r.slots.toolbar,(0,n.A)({},null==(t=r.slotProps)?void 0:t.toolbar))]})}var re=r("M82X");const ne=(0,re.A)("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})((()=>({position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"}))),oe=o.forwardRef(((e,t)=>{var r;const o=(0,$.A)(),i=(e=>{const{classes:t}=e;return(0,O.A)({root:["main"]},z.B,t)})(o),a=null!=(r=o.experimentalFeatures)&&r.ariaV7?J:null,s="function"==typeof a?a():null;return(0,x.jsx)(ne,(0,n.A)({ref:t,className:i.root,ownerState:o},s,{children:e.children}))}));var ie=r("m0sr"),ae=r("ZmDP");const se=e=>e.focus,le=(0,H.Mz)(se,(e=>e.cell)),ce=(0,H.Mz)(se,(e=>e.columnHeader)),ue=(0,H.Mz)(se,(e=>e.columnHeaderFilter)),de=(0,H.Mz)(se,(e=>e.columnGroupHeader)),fe=e=>e.tabIndex,pe=(0,H.Mz)(fe,(e=>e.cell)),he=(0,H.Mz)(fe,(e=>e.columnHeader)),me=(0,H.Mz)(fe,(e=>e.columnHeaderFilter)),ge=(0,H.Mz)(fe,(e=>e.columnGroupHeader)),ye=e=>e.columnMenu;function ve(e){const{VirtualScrollerComponent:t,ColumnHeadersProps:r,children:i}=e,a=T(),s=(0,$.A)(),l=o.useRef(null),c=(0,S.N)(a,G.iv),u=(0,S.N)(a,ie.od),d=(0,S.N)(a,ae.oF),f=(0,S.N)(a,G.Sw),p=(0,S.N)(a,he),h=(0,S.N)(a,pe),m=(0,S.N)(a,ge),g=(0,S.N)(a,ce),y=(0,S.N)(a,de),v=(0,S.N)(a,V.rf),b=(0,S.N)(a,Y),_=(0,S.N)(a,ye),w=(0,S.N)(a,G.FY),A=(0,S.N)(a,Z),C=!(null===m&&null===p&&null===h);(0,D.A)((()=>{a.current.computeSizeAndPublishResizeEvent();const e=l.current;if("undefined"==typeof ResizeObserver)return()=>{};let t;const r=new ResizeObserver((()=>{t=requestAnimationFrame((()=>{a.current.computeSizeAndPublishResizeEvent()}))}));return e&&r.observe(e),()=>{t&&window.cancelAnimationFrame(t),e&&r.unobserve(e)}}),[a]);const E=o.useRef(null),I=o.useRef(null),k=o.useRef(null);a.current.register("private",{columnHeadersContainerElementRef:I,columnHeadersElementRef:E,virtualScrollerRef:k,mainElementRef:l});const M=!!a.current.getRootDimensions();return(0,x.jsxs)(oe,{ref:l,children:[(0,x.jsx)(s.slots.columnHeaders,(0,n.A)({ref:I,innerRef:E,visibleColumns:c,filterColumnLookup:u,sortColumnLookup:d,columnPositions:f,columnHeaderTabIndexState:p,columnGroupHeaderTabIndexState:m,columnHeaderFocus:g,columnGroupHeaderFocus:y,densityFactor:v,headerGroupingMaxDepth:b,columnMenuState:_,columnVisibility:w,columnGroupsHeaderStructure:A,hasOtherElementInTabSequence:C},r)),M&&(0,x.jsx)(t,{ref:k}),i]})}function be(){var e;const t=(0,$.A)();return t.hideFooter?null:(0,x.jsx)(t.slots.footer,(0,n.A)({},null==(e=t.slotProps)?void 0:e.footer))}var _e=r("XVIy");function xe(e,t,r){const n=o.useRef(!0);o.useEffect((()=>{n.current=!1,e.current.register(r,t)}),[e,r,t]),n.current&&e.current.register(r,t)}const we=(0,_e.s3)()&&null!=window.localStorage.getItem("DEBUG"),Ae=()=>{},Se={debug:Ae,info:Ae,warn:Ae,error:Ae},Ce=["debug","info","warn","error"];function Ee(e,t,r=console){const n=Ce.indexOf(t);if(-1===n)throw new Error(`MUI: Log level ${t} not recognized.`);return Ce.reduce(((t,o,i)=>(t[o]=i>=n?(...t)=>{const[n,...i]=t;r[o](`MUI: ${e} - ${n}`,...i)}:Ae,t)),{})}class Te{static create(e){return new Te(e)}constructor(e){this.value=void 0,this.listeners=void 0,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.value,this.update=e=>{this.value=e,this.listeners.forEach((t=>t(e)))},this.value=e,this.listeners=new Set}}class Ie{constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,r){this.timeouts||(this.timeouts=new Map);const n=setTimeout((()=>{"function"==typeof t&&t(),this.timeouts.delete(r.cleanupToken)}),this.cleanupTimeout);this.timeouts.set(r.cleanupToken,n)}unregister(e){const t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}reset(){this.timeouts&&(this.timeouts.forEach(((e,t)=>{this.unregister({cleanupToken:t})})),this.timeouts=void 0)}}class ke{constructor(){this.registry=new FinalizationRegistry((e=>{"function"==typeof e&&e()}))}register(e,t,r){this.registry.register(e,t,r)}unregister(e){this.registry.unregister(e)}reset(){}}var Me=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e}(Me||{});class Re{}const Pe=function(e){let t=0;return function(r,n,i,a){null===e.registry&&(e.registry="undefined"!=typeof FinalizationRegistry?new ke:new Ie);const[s]=o.useState(new Re),l=o.useRef(null),c=o.useRef();c.current=i;const u=o.useRef(null);if(!l.current&&c.current){const o=(e,t,r)=>{var n;t.defaultMuiPrevented||null==(n=c.current)||n.call(c,e,t,r)};l.current=r.current.subscribeEvent(n,o,a),t+=1,u.current={cleanupToken:t},e.registry.register(s,(()=>{var e;null==(e=l.current)||e.call(l),l.current=null,u.current=null}),u.current)}else!c.current&&l.current&&(l.current(),l.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));o.useEffect((()=>{if(!l.current&&c.current){const e=(e,t,r)=>{var n;t.defaultMuiPrevented||null==(n=c.current)||n.call(c,e,t,r)};l.current=r.current.subscribeEvent(n,e,a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var e;null==(e=l.current)||e.call(l),l.current=null}}),[r,n,a])}}({registry:null}),Oe={isFirst:!0};function Le(e,t,r){Pe(e,t,r,Oe)}class De{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t,r={}){let n=this.events[e];n||(n={highPriority:new Map,regular:new Map},this.events[e]=n),r.isFirst?n.highPriority.set(t,!0):n.regular.set(t,!0)}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const r=this.events[e];if(!r)return;const n=Array.from(r.highPriority.keys()),o=Array.from(r.regular.keys());for(let e=n.length-1;e>=0;e-=1){const o=n[e];r.highPriority.has(o)&&o.apply(this,t)}for(let e=0;e{const r=function(e,t){const r=o.useRef(),n=o.useRef();n.current||(n.current=function(e){var t;const r=null==(t=e.current)?void 0:t[Ne];if(r)return r;const n={},o={state:n,store:Te.create(n),instanceId:{id:Fe}};return Fe+=1,o.getPublicApi=()=>e.current,o.register=(t,r)=>{Object.keys(r).forEach((n=>{const i=r[n],a=o[n];if(!0===(null==a?void 0:a.spying)?a.target=i:o[n]=i,"public"===t){const t=e.current,r=t[n];!0===(null==r?void 0:r.spying)?r.target=i:t[n]=i}}))},o.register("private",{caches:{},eventManager:new De}),o}(r)),r.current||(r.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[Ne]:e.current}}(n));const i=o.useCallback(((...e)=>{const[r,o,i={}]=e;if(i.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(i)&&i.isPropagationStopped())return;const a=t.signature===Me.DataGridPro?{api:n.current.getPublicApi()}:{};n.current.eventManager.emit(r,o,i,a)}),[n,t.signature]),a=o.useCallback(((e,t,r)=>{n.current.eventManager.on(e,t,r);const o=n.current;return()=>{o.eventManager.removeListener(e,t)}}),[n]);return xe(n,{subscribeEvent:a,publishEvent:i},"public"),o.useImperativeHandle(e,(()=>r.current),[r]),o.useEffect((()=>{const e=n.current;return()=>{e.publishEvent("unmount")}}),[n]),n}(e,t);return((e,t)=>{xe(e,{getLogger:o.useCallback((e=>we?Ee(e,"debug",t.logger):t.logLevel?Ee(e,t.logLevel.toString(),t.logger):Se),[t.logLevel,t.logger])},"private")})(r,t),((e,t)=>{const r=o.useRef({}),[,i]=o.useState(),a=o.useCallback((e=>{r.current[e.stateId]=e}),[]),s=o.useCallback(((n,o)=>{let i;if(i=(0,_e.Tn)(n)?n(e.current.state):n,e.current.state===i)return!1;let a=!1;const s=[];if(Object.keys(r.current).forEach((t=>{const n=r.current[t],o=n.stateSelector(e.current.state,e.current.instanceId),l=n.stateSelector(i,e.current.instanceId);l!==o&&(s.push({stateId:n.stateId,hasPropChanged:l!==n.propModel}),void 0!==n.propModel&&l!==n.propModel&&(a=!0))})),s.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${s[0].stateId}, therefore, you're not allowed to update ${s.map((e=>e.stateId)).join(", ")} in the same transaction.`);if(a||(e.current.state=i,e.current.publishEvent&&e.current.publishEvent("stateChange",i),e.current.store.update(i)),1===s.length){const{stateId:n,hasPropChanged:l}=s[0],c=r.current[n],u=c.stateSelector(i,e.current.instanceId);if(c.propOnChange&&l){const r=t.signature===Me.DataGridPro?{api:e.current,reason:o}:{reason:o};c.propOnChange(u,r)}a||e.current.publishEvent(c.changeEvent,u,{reason:o})}return!a}),[e,t.signature]),l=o.useCallback(((t,r,o)=>e.current.setState((e=>(0,n.A)({},e,{[t]:r(e[t])})),o)),[e]),c=o.useCallback((()=>i((()=>e.current.state))),[e]),u={updateControlState:l,registerControlState:a};xe(e,{setState:s,forceUpdate:c},"public"),xe(e,u,"private")})(r,t),(e=>{const t=o.useRef({}),r=o.useRef(!1),n=o.useCallback((e=>{!r.current&&e&&(r.current=!0,Object.values(e.appliers).forEach((e=>{e()})),r.current=!1)}),[]),i=o.useCallback(((e,r,o)=>{t.current[e]||(t.current[e]={processors:new Map,appliers:{}});const i=t.current[e];return i.processors.get(r)!==o&&(i.processors.set(r,o),n(i)),()=>{t.current[e].processors.set(r,null)}}),[n]),a=o.useCallback(((e,r,n)=>(t.current[e]||(t.current[e]={processors:new Map,appliers:{}}),t.current[e].appliers[r]=n,()=>{const n=t.current[e].appliers,o=(0,M.A)(n,[r].map(ze.A));t.current[e].appliers=o})),[]),s=o.useCallback((e=>{const r=t.current[e];n(r)}),[n]),l={unstable_applyPipeProcessors:o.useCallback(((...e)=>{const[r,n,o]=e;return t.current[r]?Array.from(t.current[r].processors.values()).reduce(((e,t)=>t?t(e,o):e),n):n}),[])};xe(e,{registerPipeProcessor:i,registerPipeApplier:a,requestPipeProcessorsApplication:s},"private"),xe(e,l,"public")})(r),(e=>{const t=o.useRef(new Map),r=o.useRef({}),n=o.useCallback(((t,n,o)=>{const i=()=>{const e=r.current[n],o=(0,M.A)(e,[t].map(ze.A));r.current[n]=o};r.current[n]||(r.current[n]={});const a=r.current[n],s=a[t];return a[t]=o,s&&s!==o?(t===e.current.getActiveStrategy(je[n])&&e.current.publishEvent("activeStrategyProcessorChange",n),i):i}),[e]),i=o.useCallback(((t,n)=>{const o=e.current.getActiveStrategy(je[t]);if(null==o)throw new Error("Can't apply a strategy processor before defining an active strategy");const i=r.current[t];if(!i||!i[o])throw new Error(`No processor found for processor "${t}" on strategy "${o}"`);return(0,i[o])(n)}),[e]),a=o.useCallback((e=>{var r;const n=Array.from(t.current.entries()).find((([,t])=>t.group===e&&t.isAvailable()));return null!=(r=null==n?void 0:n[0])?r:Be}),[]),s=o.useCallback(((r,n,o)=>{t.current.set(n,{group:r,isAvailable:o}),e.current.publishEvent("strategyAvailabilityChange")}),[e]);xe(e,{registerStrategyProcessor:n,applyStrategyProcessor:i,getActiveStrategy:a,setStrategyAvailability:s},"private")})(r),((e,t)=>{const r=o.useCallback((e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]}),[t.localeText]);e.current.register("public",{getLocaleText:r})})(r,t),r.current.register("private",{rootProps:t}),r},$e=e=>{const t=o.useRef(!0);t.current&&(t.current=!1,e())},Ve=(e,t,r)=>{const n=o.useRef(),i=o.useRef(`mui-${Math.round(1e9*Math.random())}`),a=o.useCallback((()=>{n.current=e.current.registerPipeProcessor(t,i.current,r)}),[e,r,t]);$e((()=>{a()}));const s=o.useRef(!0);o.useEffect((()=>(s.current?s.current=!1:a(),()=>{n.current&&(n.current(),n.current=null)})),[a])};var Ge=r("gBcZ"),He=r("EQ6w");const We=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],qe=o.forwardRef((function(e,t){var r;const{field:i,id:a,value:s,rowNode:l,hasFocus:c,tabIndex:u}=e,d=(0,M.A)(e,We),f=(0,He.h)(),p=(0,$.A)(),h=(e=>{const{classes:t}=e;return(0,O.A)({root:["checkboxInput"]},z.B,t)})({classes:p.classes}),m=o.useRef(null),g=o.useRef(null),y=(0,L.A)(m,t),v=f.current.getCellElement(a,i);o.useLayoutEffect((()=>{0===u&&v&&(v.tabIndex=-1)}),[v,u]),o.useEffect((()=>{if(c){var e;const t=null==(e=m.current)?void 0:e.querySelector("input");null==t||t.focus({preventScroll:!0})}else g.current&&g.current.stop({})}),[c]);const b=o.useCallback((e=>{(0,Ge.C8)(e.key)&&e.stopPropagation()}),[]);if("footer"===l.type||"pinnedRow"===l.type)return null;const _=f.current.isRowSelectable(a),w=f.current.getLocaleText(s?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return(0,x.jsx)(p.slots.baseCheckbox,(0,n.A)({ref:y,tabIndex:u,checked:s,onChange:e=>{const t={value:e.target.checked,id:a};f.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:h.root,inputProps:{"aria-label":w},onKeyDown:b,disabled:!_,touchRippleRef:g},null==(r=p.slotProps)?void 0:r.baseCheckbox,d))})),Xe=e=>e.rowSelection,Ze=(0,H.Mz)(Xe,(e=>e.length)),Ye=(0,H.S)(Xe,K.rI,((e,t)=>new Map(e.map((e=>[e,t[e]]))))),Ke=(0,H.S)(Xe,(e=>e.reduce(((e,t)=>(e[t]=t,e)),{})));var Je=r("gkz3");const Qe=(e,t)=>t>0&&e>0?Math.ceil(e/t):0,et=((0,Je.f)(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error"),e=>({page:0,pageSize:e?0:100})),tt=(e,t)=>{if(t===Me.DataGrid&&e>100)throw new Error(["MUI: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"))},rt=e=>e.pagination,nt=(0,H.Mz)(rt,(e=>e.paginationModel)),ot=(0,H.Mz)(rt,(e=>e.rowCount)),it=(0,H.Mz)(nt,(e=>e.page)),at=(0,H.Mz)(nt,(e=>e.pageSize)),st=(0,H.Mz)(at,ot,((e,t)=>Qe(t,e))),lt=(0,H.S)(nt,K.qj,K.V2,ie.em,ie.tW,((e,t,r,n,o)=>{const i=o.length,a=Math.min(e.pageSize*e.page,i-1),s=Math.min(a+e.pageSize-1,i-1);if(-1===a||-1===s)return null;if(r<2)return{firstRowIndex:a,lastRowIndex:s};const l=o[a],c=s-a+1,u=n.findIndex((e=>e.id===l.id));let d=u,f=0;for(;d0)&&(d+=1),0===e&&(f+=1))}return{firstRowIndex:u,lastRowIndex:d-1}})),ct=(0,H.S)(ie.em,lt,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),ut=(0,H.S)(ie.ux,lt,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),dt=["field","colDef"],ft=o.forwardRef((function(e,t){var r;const i=(0,M.A)(e,dt),[,a]=o.useState(!1),s=(0,He.h)(),l=(0,$.A)(),c=(e=>{const{classes:t}=e;return(0,O.A)({root:["checkboxInput"]},z.B,t)})({classes:l.classes}),u=(0,S.N)(s,he),d=(0,S.N)(s,Xe),f=(0,S.N)(s,ie.ux),p=(0,S.N)(s,ut),h=o.useMemo((()=>"function"!=typeof l.isRowSelectable?d:d.filter((e=>!!s.current.getRow(e)&&l.isRowSelectable(s.current.getRowParams(e))))),[s,l.isRowSelectable,d]),m=o.useMemo((()=>(l.pagination&&l.checkboxSelectionVisibleOnly?p:f).reduce(((e,t)=>(e[t]=!0,e)),{})),[l.pagination,l.checkboxSelectionVisibleOnly,p,f]),g=o.useMemo((()=>h.filter((e=>m[e])).length),[h,m]),y=g>0&&g0,b=null!==u&&u.field===e.field?0:-1;o.useLayoutEffect((()=>{const t=s.current.getColumnHeaderElement(e.field);0===b&&t&&(t.tabIndex=-1)}),[b,s,e.field]);const _=o.useCallback((e=>{" "===e.key&&s.current.publishEvent("headerSelectionCheckboxChange",{value:!v})}),[s,v]),w=o.useCallback((()=>{a((e=>!e))}),[]);o.useEffect((()=>s.current.subscribeEvent("rowSelectionChange",w)),[s,w]);const A=s.current.getLocaleText(v?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,x.jsx)(l.slots.baseCheckbox,(0,n.A)({ref:t,indeterminate:y,checked:v,onChange:e=>{const t={value:e.target.checked};s.current.publishEvent("headerSelectionCheckboxChange",t)},className:c.root,inputProps:{"aria-label":A},tabIndex:b,onKeyDown:_},null==(r=l.slotProps)?void 0:r.baseCheckbox,i))}));var pt=r("kmWS");const ht=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],mt=(0,F.Ay)(pt.Ay,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})((({theme:e})=>(0,n.A)({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}))),gt=o.forwardRef(((e,t)=>{const r=(0,$.A)(),{id:i,value:a,field:s,colDef:l,hasFocus:c,debounceMs:u=200,isProcessingProps:d,onValueChange:f}=e,p=(0,M.A)(e,ht),h=(0,He.h)(),m=o.useRef(),[g,y]=o.useState(a),v=(e=>{const{classes:t}=e;return(0,O.A)({root:["editInputCell"]},z.B,t)})(r),b=o.useCallback((async e=>{const t=e.target.value;f&&await f(e,t);const r=h.current.getColumn(s);let n=t;r.valueParser&&(n=r.valueParser(t,h.current.getCellParams(i,s))),y(n),h.current.setEditCellValue({id:i,field:s,value:n,debounceMs:u,unstable_skipValueParser:!0},e)}),[h,u,s,i,f]),_=h.current.unstable_getEditCellMeta(i,s);return o.useEffect((()=>{"debouncedSetEditCellValue"!==(null==_?void 0:_.changeReason)&&y(a)}),[_,a]),(0,D.A)((()=>{c&&m.current.focus()}),[c]),(0,x.jsx)(mt,(0,n.A)({ref:t,inputRef:m,className:v.root,ownerState:r,fullWidth:!0,type:"number"===l.type?l.type:"text",value:null!=g?g:"",onChange:b,endAdornment:d?(0,x.jsx)(r.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},p))})),yt=(0,Je.f)(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),vt=(e,t)=>t&&e.length>1?(yt(),[e[0]]):e,bt=(e,t)=>r=>(0,n.A)({},r,{sorting:(0,n.A)({},r.sorting,{sortModel:vt(e,t)})}),_t=(e,t)=>{const r=e.indexOf(t);return t&&-1!==r&&r+1!==e.length?e[r+1]:e[0]},xt=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,wt=new Intl.Collator,At=(e,t)=>{const r=xt(e,t);return null!==r?r:Number(e)-Number(t)},St=(e,t)=>{const r=xt(e,t);return null!==r?r:e>t?1:e{const r=xt(e,t);return null!==r?r:"string"==typeof e?wt.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:(0,Ct.n)(),renderEditCell:e=>(0,x.jsx)(gt,(0,n.A)({},e)),getApplyQuickFilterFn:(0,Et.UD)(Ct.X),getApplyQuickFilterFnV7:Ct.X},It="auto-generated-group-node-root",kt=Symbol("mui.id_autogenerated"),Mt=()=>({type:"group",id:It,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null}),Rt=(e,t,r)=>{const n=t?t(e):e.id;return function(e,t,r="A row was provided without id in the rows prop:"){if(null==e)throw new Error(["MUI: The data grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",r,JSON.stringify(t)].join("\n"))}(n,e,r),n},Pt=({rows:e,getRowId:t,loading:r,rowCount:n})=>{const o={type:"full",rows:[]},i={},a={};for(let r=0;r{const r=e[It];return Math.max(t,r.children.length+(null==r.footerId?0:1))},Lt=({apiRef:e,rowCountProp:t=0,loadingProp:r,previousTree:o,previousTreeDepths:i})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:o,previousTreeDepths:i,updates:a.updates,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIdToModelLookup:a.dataRowIdToModelLookup}),d=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIds:c,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,n.A)({},d,{totalRowCount:Math.max(t,d.dataRowIds.length),totalTopLevelRowCount:Ot({tree:d.tree,rowCountProp:t}),groupingName:u,loading:r})},Dt=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,Nt=(e,t,r)=>{const n=e[t];if("group"!==n.type)return[];const o=[];for(let t=0;tt+e.current.unstable_getRowHeight(r.id)),0))||0,bottom:(null==n||null==(r=n.bottom)?void 0:r.reduce(((t,r)=>t+e.current.unstable_getRowHeight(r.id)),0))||0}}function zt(e,t){const r=(0,V.rf)(e);return`var(--DataGrid-overlayHeight, ${2*Math.floor(t*r)}px)`}const Bt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex"];function jt(e){const{value:t}=e,r=(0,M.A)(e,Bt),i=(0,He.h)(),a=(0,$.A)(),s=(e=>{const{classes:t}=e;return(0,O.A)({root:["booleanCell"]},z.B,t)})({classes:a.classes}),l=o.useMemo((()=>t?a.slots.booleanCellTrueIcon:a.slots.booleanCellFalseIcon),[a.slots.booleanCellFalseIcon,a.slots.booleanCellTrueIcon,t]);return(0,x.jsx)(l,(0,n.A)({fontSize:"small",className:s.root,titleAccess:i.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(t)},r))}const Ut=o.memo(jt);var $t=r("A3c4");const Vt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function Gt(e){var t;const{id:r,value:i,field:a,className:s,hasFocus:l,onValueChange:c}=e,u=(0,M.A)(e,Vt),d=(0,He.h)(),f=o.useRef(null),p=(0,$t.A)(),[h,m]=o.useState(i),g=(0,$.A)(),y=(e=>{const{classes:t}=e;return(0,O.A)({root:["editBooleanCell"]},z.B,t)})({classes:g.classes}),v=o.useCallback((async e=>{const t=e.target.checked;c&&await c(e,t),m(t),await d.current.setEditCellValue({id:r,field:a,value:t},e)}),[d,a,r,c]);return o.useEffect((()=>{m(i)}),[i]),(0,D.A)((()=>{l&&f.current.focus()}),[l]),(0,x.jsx)("label",(0,n.A)({htmlFor:p,className:(0,R.A)(y.root,s)},u,{children:(0,x.jsx)(g.slots.baseCheckbox,(0,n.A)({id:p,inputRef:f,checked:Boolean(h),onChange:v,size:"small"},null==(t=g.slotProps)?void 0:t.baseCheckbox))}))}const Ht=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],Wt=(0,F.Ay)("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});const qt=(0,n.A)({},Tt,{type:"boolean",align:"center",headerAlign:"center",renderCell:e=>Dt(e.rowNode)?"":(0,x.jsx)(Ut,(0,n.A)({},e)),renderEditCell:e=>(0,x.jsx)(Gt,(0,n.A)({},e)),sortComparator:At,valueFormatter:function({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")},filterOperators:(0,Et.eW)([{value:"is",getApplyFilterFnV7:e=>{if(!e.value)return null;const t="true"===e.value;return e=>Boolean(e)===t},InputComponent:function(e){var t,r,i,a;const{item:s,applyValue:l,apiRef:c,focusElementRef:u,clearButton:d,tabIndex:f,label:p,variant:h="standard"}=e,m=(0,M.A)(e,Ht),[g,y]=o.useState(s.value||""),v=(0,$.A)(),b=(0,$t.A)(),_=(0,$t.A)(),w=(null==(t=v.slotProps)?void 0:t.baseSelect)||{},A=null==(r=w.native)||r,S=(null==(i=v.slotProps)?void 0:i.baseSelectOption)||{},C=o.useCallback((e=>{const t=e.target.value;y(t),l((0,n.A)({},s,{value:t}))}),[l,s]);o.useEffect((()=>{y(s.value||"")}),[s.value]);const E=null!=p?p:c.current.getLocaleText("filterPanelInputLabel");return(0,x.jsxs)(Wt,{children:[(0,x.jsxs)(v.slots.baseFormControl,{fullWidth:!0,children:[(0,x.jsx)(v.slots.baseInputLabel,(0,n.A)({},null==(a=v.slotProps)?void 0:a.baseInputLabel,{id:b,shrink:!0,variant:h,children:E})),(0,x.jsxs)(v.slots.baseSelect,(0,n.A)({labelId:b,id:_,label:E,value:g,onChange:C,variant:h,notched:"outlined"===h||void 0,native:A,displayEmpty:!0,inputProps:{ref:u,tabIndex:f}},m,w,{children:[(0,x.jsx)(v.slots.baseSelectOption,(0,n.A)({},S,{native:A,value:"",children:c.current.getLocaleText("filterValueAny")})),(0,x.jsx)(v.slots.baseSelectOption,(0,n.A)({},S,{native:A,value:"true",children:c.current.getLocaleText("filterValueTrue")})),(0,x.jsx)(v.slots.baseSelectOption,(0,n.A)({},S,{native:A,value:"false",children:c.current.getLocaleText("filterValueFalse")}))]}))]}),d]})}}]),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)}),Xt="__check__",Zt=(0,n.A)({},qt,{field:Xt,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,valueGetter:e=>void 0!==Ke(e.api.state,e.api.instanceId)[e.id],renderHeader:e=>(0,x.jsx)(ft,(0,n.A)({},e)),renderCell:e=>(0,x.jsx)(qe,(0,n.A)({},e))}),Yt=(e,t,r,n)=>{const i=o.useCallback((()=>{e.current.registerStrategyProcessor(t,r,n)}),[e,n,r,t]);$e((()=>{i()}));const a=o.useRef(!0);o.useEffect((()=>{a.current?a.current=!1:i()}),[i])},Kt=e=>"full"===e.updates.type?(e=>{const t={[It]:(0,n.A)({},Mt(),{children:e})};for(let r=0;r{const r=(0,n.A)({},e),o={};for(let e=0;e!o[e]))),r[It]=(0,n.A)({},i,{children:a}),{groupingName:Be,tree:r,treeDepths:{0:a.length},dataRowIds:a}})({previousTree:e.previousTree,actions:e.updates.actions}),Jt=(e,t,r)=>{const n=o.useRef(!1);n.current||(t.current.state=e(t.current.state,r,t),n.current=!0)};function Qt(e,t){const r=o.useRef(null);if(r.current)return r.current;const n=e.current.getLogger(t);return r.current=n,n}const er=e=>(0,n.A)({},e,{headerFiltering:{editing:null,menuOpen:null}});var tr=r("IXjO"),rr=r("UnQg"),nr=r("aKua");const or=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"];function ir(e){var t;const{colDef:r,id:i,hasFocus:a,tabIndex:s,position:l="bottom-end",focusElementRef:c}=e,u=(0,M.A)(e,or),[d,f]=o.useState(-1),[p,h]=o.useState(!1),m=(0,He.h)(),g=o.useRef(null),y=o.useRef(null),v=o.useRef(!1),b=o.useRef({}),_=(0,rr.A)(),w=(0,$t.A)(),A=(0,$t.A)(),S=(0,$.A)();if(!(e=>"function"==typeof e.getActions)(r))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");const C=r.getActions(m.current.getRowParams(i)),E=C.filter((e=>!e.props.showInMenu)),T=C.filter((e=>e.props.showInMenu)),I=E.length+(T.length?1:0);o.useLayoutEffect((()=>{a||Object.entries(b.current).forEach((([e,t])=>{null==t||t.stop({},(()=>{delete b.current[e]}))}))}),[a]),o.useEffect((()=>{d<0||!g.current||d>=g.current.children.length||g.current.children[d].focus({preventScroll:!0})}),[d]),o.useEffect((()=>{a||(f(-1),v.current=!1)}),[a]),o.useImperativeHandle(c,(()=>({focus(){if(!v.current){const e=C.findIndex((e=>!e.props.disabled));f(e)}}})),[C]),o.useEffect((()=>{d>=I&&f(I-1)}),[d,I]);const k=()=>{h(!1)},R=e=>t=>{b.current[e]=t},P=(e,t)=>r=>{f(e),v.current=!0,t&&t(r)};return(0,x.jsxs)("div",(0,n.A)({role:"menu",ref:g,tabIndex:-1,className:z.x.actionsCell,onKeyDown:e=>{if(I<=1)return;const t=(e,r)=>{var n;if(e<0||e>C.length)return e;const o=("left"===r?-1:1)*("rtl"===_.direction?-1:1);return null!=(n=C[e+o])&&n.props.disabled?t(e+o,r):e+o};let r=d;"ArrowRight"===e.key?r=t(d,"right"):"ArrowLeft"===e.key&&(r=t(d,"left")),r<0||r>=I||r!==d&&(e.preventDefault(),e.stopPropagation(),f(r))}},u,{children:[E.map(((e,t)=>o.cloneElement(e,{key:t,touchRippleRef:R(t),onClick:P(t,e.props.onClick),tabIndex:d===t?s:-1}))),T.length>0&&A&&(0,x.jsx)(S.slots.baseIconButton,(0,n.A)({ref:y,id:A,"aria-label":m.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?w:void 0,role:"menuitem",size:"small",onClick:()=>{h(!0),f(I-1),v.current=!0},touchRippleRef:R(A),tabIndex:d===E.length?s:-1},null==(t=S.slotProps)?void 0:t.baseIconButton,{children:(0,x.jsx)(S.slots.moreActionsIcon,{fontSize:"small"})})),T.length>0&&(0,x.jsx)(nr.U,{open:p,target:y.current,position:l,onClose:k,children:(0,x.jsx)(tr.A,{id:w,className:z.x.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Escape"].includes(e.key)&&k()},"aria-labelledby":A,variant:"menu",autoFocusItem:!0,children:T.map(((e,t)=>o.cloneElement(e,{key:t,closeMenu:k})))})})]}))}const ar="actions",sr=(0,n.A)({},Tt,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>(0,x.jsx)(ir,(0,n.A)({},e)),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0});var lr=function(e){return e.Cell="cell",e.Row="row",e}(lr||{}),cr=function(e){return e.Edit="edit",e.View="view",e}(cr||{}),ur=function(e){return e.Edit="edit",e.View="view",e}(ur||{});const dr=(e,t)=>{let r,n;return t.pagination&&"client"===t.paginationMode?(n=lt(e),r=ct(e)):(r=(0,ie.em)(e),n=0===r.length?null:{firstRowIndex:0,lastRowIndex:r.length-1}),{rows:r,range:n}},fr=(e,t)=>{const r=dr(e,t);return o.useMemo((()=>({rows:r.rows,range:r.range})),[r.rows,r.range])},pr="__detail_panel_toggle__";function hr(e,t){return e.closest(`.${t}`)}function mr(e){return e.replace(/["\\]/g,"\\$&")}function gr(e){return`.${z.x.row}[data-id="${mr(String(e))}"]`}function yr(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}const vr=(e,t)=>null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],br=(e,t)=>{var r;return(0,n.A)({},e,{rowSelection:t.rowSelection&&null!=(r=vr(t.rowSelectionModel))?r:[]})},_r=(e,t,r)=>{const n=o.useRef(),i=o.useRef(`mui-${Math.round(1e9*Math.random())}`),a=o.useCallback((()=>{n.current=e.current.registerPipeApplier(t,i.current,r)}),[e,r,t]);$e((()=>{a()}));const s=o.useRef(!0);o.useEffect((()=>(s.current?s.current=!1:a(),()=>{n.current&&(n.current(),n.current=null)})),[a])};var xr=r("B8tz"),wr=r("C8ES");const Ar=e=>null==e?null:Number(e),Sr=(0,Et.YB)((e=>null==e||Number.isNaN(e)||""===e?null:t=>Ar(t)===Ar(e))),Cr=(0,n.A)({},Tt,{type:"number",align:"right",headerAlign:"right",sortComparator:At,valueParser:e=>""===e?null:Number(e),valueFormatter:({value:e})=>(0,_e.Et)(e)?e.toLocaleString():e||"",filterOperators:(0,Et.eW)([{value:"=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>Ar(t)===e.value,InputComponent:xr.y,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>Ar(t)!==e.value,InputComponent:xr.y,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Ar(t)>e.value,InputComponent:xr.y,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Ar(t)>=e.value,InputComponent:xr.y,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Ar(t)null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Ar(t)<=e.value,InputComponent:xr.y,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:wr.M,InputComponentProps:{type:"number"}}]),getApplyQuickFilterFn:(0,Et.UD)(Sr),getApplyQuickFilterFnV7:Sr});var Er=r("Ilr6");const Tr=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],Ir=(0,F.Ay)(pt.Ay)({fontSize:"inherit"});function kr(e){const{id:t,value:r,field:i,colDef:a,hasFocus:s,inputProps:l,onValueChange:c}=e,u=(0,M.A)(e,Tr),d="dateTime"===a.type,f=(0,He.h)(),p=o.useRef(),h=o.useMemo((()=>{let e,t;return e=null==r?null:r instanceof Date?r:new Date((null!=r?r:"").toString()),t=null==e||Number.isNaN(e.getTime())?"":new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,d?16:10),{parsed:e,formatted:t}}),[r,d]),[m,g]=o.useState(h),y=(e=>{const{classes:t}=e;return(0,O.A)({root:["editInputCell"]},z.B,t)})({classes:(0,$.A)().classes}),v=o.useCallback((e=>{if(""===e)return null;const[t,r]=e.split("T"),[n,o,i]=t.split("-"),a=new Date;if(a.setFullYear(Number(n),Number(o)-1,Number(i)),a.setHours(0,0,0,0),r){const[e,t]=r.split(":");a.setHours(Number(e),Number(t),0,0)}return a}),[]),b=o.useCallback((async e=>{const r=e.target.value,n=v(r);c&&await c(e,n),g({parsed:n,formatted:r}),f.current.setEditCellValue({id:t,field:i,value:n},e)}),[f,i,t,c,v]);return o.useEffect((()=>{g((e=>{var t,r;return h.parsed!==e.parsed&&(null==(t=h.parsed)?void 0:t.getTime())!==(null==(r=e.parsed)?void 0:r.getTime())?h:e}))}),[h]),(0,D.A)((()=>{s&&p.current.focus()}),[s]),(0,x.jsx)(Ir,(0,n.A)({inputRef:p,fullWidth:!0,className:y.root,type:d?"datetime-local":"date",inputProps:(0,n.A)({max:d?"9999-12-31T23:59":"9999-12-31"},l),value:m.formatted,onChange:b},u))}const Mr=e=>(0,x.jsx)(kr,(0,n.A)({},e));function Rr({value:e,columnType:t,rowId:r,field:n}){if(!(e instanceof Date))throw new Error([`MUI: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${r}, field: "${n}".`].join("\n"))}const Pr=(0,n.A)({},Tt,{type:"date",sortComparator:St,valueFormatter:function({value:e,field:t,id:r}){return e?(Rr({value:e,columnType:"date",rowId:r,field:t}),e.toLocaleDateString()):""},filterOperators:(0,Er.Q)(),renderEditCell:Mr,pastedValueParser:e=>new Date(e)}),Or=(0,n.A)({},Tt,{type:"dateTime",sortComparator:St,valueFormatter:function({value:e,field:t,id:r}){return e?(Rr({value:e,columnType:"dateTime",rowId:r,field:t}),e.toLocaleString()):""},filterOperators:(0,Er.Q)(!0),renderEditCell:Mr,pastedValueParser:e=>new Date(e)});var Lr=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(Lr||{}),Dr=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Dr||{}),Nr=r("QnE+");const Fr=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","getOptionLabel","getOptionValue"],zr=["MenuProps"];function Br(e){var t,r,i;const a=(0,$.A)(),{id:s,value:l,field:c,row:u,colDef:d,hasFocus:f,error:p,onValueChange:h,initialOpen:m=a.editMode===lr.Cell,getOptionLabel:g,getOptionValue:y}=e,v=(0,M.A)(e,Fr),b=(0,He.h)(),_=o.useRef(),w=o.useRef(),[A,S]=o.useState(m),C=null!=(r=((null==(t=a.slotProps)?void 0:t.baseSelect)||{}).native)&&r,E=(null==(i=a.slotProps)?void 0:i.baseSelect)||{},{MenuProps:T}=E,I=(0,M.A)(E,zr);if((0,D.A)((()=>{var e;f&&(null==(e=w.current)||e.focus())}),[f]),!(0,Nr._W)(d))return null;let k;if(k="function"==typeof(null==d?void 0:d.valueOptions)?null==d?void 0:d.valueOptions({id:s,row:u,field:c}):null==d?void 0:d.valueOptions,!k)return null;const R=y||d.getOptionValue,P=g||d.getOptionLabel;return k&&d?(0,x.jsx)(a.slots.baseSelect,(0,n.A)({ref:_,inputRef:w,value:l,onChange:async e=>{if(!(0,Nr._W)(d)||!k)return;S(!1);const t=e.target,r=(0,Nr.Rc)(t.value,k,R);h&&await h(e,r),await b.current.setEditCellValue({id:s,field:c,value:r},e)},open:A,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||S(!0)},MenuProps:(0,n.A)({onClose:(e,t)=>{if(a.editMode!==lr.Row){if("backdropClick"===t||(0,Ge.nx)(e.key)){const t=b.current.getCellParams(s,c);b.current.publishEvent("cellEditStop",(0,n.A)({},t,{reason:(0,Ge.nx)(e.key)?Dr.escapeKeyDown:Dr.cellFocusOut}))}}else S(!1)}},T),error:p,native:C,fullWidth:!0},v,I,{children:k.map((e=>{var t;const r=R(e);return(0,o.createElement)(a.slots.baseSelectOption,(0,n.A)({},(null==(t=a.slotProps)?void 0:t.baseSelectOption)||{},{native:C,key:r,value:r}),P(e))}))})):null}var jr=r("5NNo");const Ur=(0,n.A)({},Tt,{type:"singleSelect",getOptionLabel:e=>(0,_e.Gv)(e)?e.label:String(e),getOptionValue:e=>(0,_e.Gv)(e)?e.value:e,valueFormatter(e){const{id:t,field:r,value:n,api:o}=e,i=e.api.getColumn(r);if(!(0,Nr._W)(i))return"";let a;if(a="function"==typeof i.valueOptions?i.valueOptions({id:t,row:t?o.getRow(t):null,field:r}):i.valueOptions,null==n)return"";if(!a)return n;if("object"!=typeof a[0])return i.getOptionLabel(n);const s=a.find((e=>i.getOptionValue(e)===n));return s?i.getOptionLabel(s):""},renderEditCell:e=>(0,x.jsx)(Br,(0,n.A)({},e)),filterOperators:(0,jr.m)(),pastedValueParser:(e,t)=>{const r=t.colDef,n=r.valueOptions,o="function"==typeof n?n({field:r.field}):n||[],i=r.getOptionValue;if(o.find((t=>i(t)===e)))return e}}),$r="__default__",Vr=["maxWidth","minWidth","width","flex"],Gr=(e,t)=>{const r={};let o=0,i=0;const a=[];e.orderedFields.forEach((t=>{const s=(0,n.A)({},e.lookup[t]);if(!1===e.columnVisibilityModel[t])s.computedWidth=0;else{let e;s.flex&&s.flex>0?(o+=s.flex,e=0,a.push(s)):e=(0,_e.qE)(s.width||Tt.width,s.minWidth||Tt.minWidth,s.maxWidth||Tt.maxWidth),i+=e,s.computedWidth=e}r[t]=s}));const s=Math.max(t-i,0);if(o>0&&t>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:r}){const n=new Set(r.map((e=>e.field))),o={all:{},frozenFields:[],freeze:e=>{const t=o.all[e];t&&!0!==t.frozen&&(o.all[e].frozen=!0,o.frozenFields.push(e))}};return function i(){if(o.frozenFields.length===n.size)return;const a={min:{},max:{}};let s=e,l=t,c=0;o.frozenFields.forEach((e=>{s-=o.all[e].computedWidth,l-=o.all[e].flex}));for(let e=0;et.maxWidth&&(c+=t.maxWidth-n,n=t.maxWidth,a.max[t.field]=!0),o.all[t.field]={frozen:!1,computedWidth:n,flex:t.flex}}c<0?Object.keys(a.max).forEach((e=>{o.freeze(e)})):c>0?Object.keys(a.min).forEach((e=>{o.freeze(e)})):r.forEach((({field:e})=>{o.freeze(e)})),i()}(),o.all}({initialFreeSpace:s,totalFlexUnits:o,flexColumns:a});Object.keys(e).forEach((t=>{r[t].computedWidth=e[t].computedWidth}))}return(0,n.A)({},e,{lookup:r})};function Hr(e,t){let r=e[$r];return t&&e[t]&&(r=e[t]),r}const Wr=({apiRef:e,columnsToUpsert:t,initialState:r,columnTypes:o,columnVisibilityModel:i=(0,G.FY)(e),keepOnlyColumnsToUpsert:a=!1})=>{var s,l,c;const u=!e.current.state.columns;let d;if(u)d={orderedFields:[],lookup:{},columnVisibilityModel:i};else{const t=(0,G.em)(e.current.state);d={orderedFields:a?[]:[...t.orderedFields],lookup:(0,n.A)({},t.lookup),columnVisibilityModel:i}}let f={};a&&!u&&(f=Object.keys(d.lookup).reduce(((e,t)=>(0,n.A)({},e,{[t]:!1})),{}));const p={};t.forEach((e=>{const{field:t}=e;p[t]=!0,f[t]=!0;let r=d.lookup[t];null==r?(r=(0,n.A)({},Hr(o,e.type),{field:t,hasBeenResized:!1}),d.orderedFields.push(t)):a&&d.orderedFields.push(t),r&&r.type!==e.type&&(r=(0,n.A)({},Hr(o,e.type),{field:t}));let i=r.hasBeenResized;Vr.forEach((t=>{void 0!==e[t]&&(i=!0,-1===e[t]&&(e[t]=1/0))})),d.lookup[t]=(0,n.A)({},r,e,{hasBeenResized:i})})),a&&!u&&Object.keys(d.lookup).forEach((e=>{f[e]||delete d.lookup[e]}));const h=((e,t)=>{if(!t)return e;const{orderedFields:r=[],dimensions:o={}}=t,i=Object.keys(o);if(0===i.length&&0===r.length)return e;const a={},s=[];for(let t=0;t!a[e]))],c=(0,n.A)({},e.lookup);for(let e=0;e{r[e]=-1===t?1/0:t})),c[t]=r}return(0,n.A)({},e,{orderedFields:l,lookup:c})})(e.current.unstable_applyPipeProcessors("hydrateColumns",d),r);return Gr(h,null!=(s=null==(l=(c=e.current).getRootDimensions)||null==(l=l.call(c))?void 0:l.viewportInnerSize.width)?s:0)},qr=e=>t=>(0,n.A)({},t,{columns:e});function Xr({firstColumnToRender:e,apiRef:t,firstRowToRender:r,lastRowToRender:n,visibleRows:o}){let i=e;for(let a=r;a{var o,i,a,s;const l=Wr({apiRef:r,columnTypes:Jr,columnsToUpsert:t.columns,initialState:null==(o=t.initialState)?void 0:o.columns,columnVisibilityModel:null!=(i=null!=(a=t.columnVisibilityModel)?a:null==(s=t.initialState)||null==(s=s.columns)?void 0:s.columnVisibilityModel)?i:{},keepOnlyColumnsToUpsert:!0});return(0,n.A)({},e,{columns:l})};var en=r("Br4D");const tn=(e,t,r)=>(r.current.caches.rows=Pt({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),(0,n.A)({},e,{rows:Lt({apiRef:r,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:null,previousTreeDepths:null})}));var rn=r("nXnS");const nn=e=>e.editRows,on=["id","field"],an=["id","field"],sn=(0,Je.f)(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error");var ln=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(ln||{}),cn=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(cn||{});const un=["id"],dn=["id"],fn=(0,Je.f)(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),pn=e=>(0,n.A)({},e,{editRows:{}});var hn=r("p4lV");const mn=e=>(0,n.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),gn=(e,t)=>{var r,o,i;const a=null!=(r=null!=(o=t.sortModel)?o:null==(i=t.initialState)||null==(i=i.sorting)?void 0:i.sortModel)?r:[];return(0,n.A)({},e,{sorting:{sortModel:vt(a,t.disableMultipleColumnsSorting),sortedRows:[]}})};var yn=r("iqfI");const vn=(e,t)=>{var r,o;return(0,n.A)({},e,{preferencePanel:null!=(r=null==(o=t.initialState)?void 0:o.preferencePanel)?r:{open:!1}})};var bn=r("EsgF"),_n=r("v+Lp"),xn=r("/8PD"),wn=r("io7V");const An=(e,t,r)=>{var o,i,a;const s=null!=(o=null!=(i=t.filterModel)?i:null==(a=t.initialState)||null==(a=a.filter)?void 0:a.filterModel)?o:(0,xn.T)();return(0,n.A)({},e,{filter:{filterModel:(0,wn.L5)(s,t.disableMultipleColumnsFiltering,r),filteredRowsLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},Sn=e=>e.filteredRowsLookup;function Cn(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function En(){return(0,bn.UI)(Object.values)}const Tn={compact:.7,comfortable:1.3,standard:1},In=(e,t)=>(0,n.A)({},e,{density:{value:t.density,factor:Tn[t.density]}}),kn=(e,t,r)=>{var o;let i=e.paginationModel;const a=e.rowCount,s=null!=(o=null==r?void 0:r.pageSize)?o:i.pageSize,l=Qe(a,s);!r||(null==r?void 0:r.page)===i.page&&(null==r?void 0:r.pageSize)===i.pageSize||(i=r);const c=((e,t=0)=>0===t?e:Math.max(Math.min(e,t-1),0))(i.page,l);return c!==i.page&&(i=(0,n.A)({},i,{page:c})),tt(i.pageSize,t),i},Mn=(e,t)=>{var r,o,i,a,s;const l=(0,n.A)({},et(t.autoPageSize),null!=(r=t.paginationModel)?r:null==(o=t.initialState)||null==(o=o.pagination)?void 0:o.paginationModel);tt(l.pageSize,t.signature);const c=null!=(i=null!=(a=t.rowCount)?a:null==(s=t.initialState)||null==(s=s.pagination)?void 0:s.rowCount)?i:0;return(0,n.A)({},e,{pagination:{paginationModel:l,rowCount:c}})};var Rn=r("QoIX"),Pn=r("tAhU");const On=["field","align","width","contentWidth"];var Ln=r("Ow/F");const Dn=["className"],Nn=(0,re.A)("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})((()=>({display:"flex",visibility:"hidden",width:0}))),Fn=o.forwardRef((function(e,t){const{className:r}=e,o=(0,M.A)(e,Dn),i=(0,$.A)(),a=(e=>{const{classes:t}=e;return(0,O.A)({root:["iconButtonContainer"]},z.B,t)})(i);return(0,x.jsx)(Nn,(0,n.A)({ref:t,className:(0,R.A)(a.root,r),ownerState:i},o))})),zn=["className","selectedRowCount"],Bn=(0,re.A)("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})((({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}))),jn=o.forwardRef((function(e,t){const{className:r,selectedRowCount:o}=e,i=(0,M.A)(e,zn),a=(0,He.h)(),s=(0,$.A)(),l=(e=>{const{classes:t}=e;return(0,O.A)({root:["selectedRowCount"]},z.B,t)})(s),c=a.current.getLocaleText("footerRowSelected")(o);return(0,x.jsx)(Bn,(0,n.A)({ref:t,className:(0,R.A)(l.root,r),ownerState:s},i,{children:c}))})),Un=["className"],$n=(0,re.A)("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),Vn=o.forwardRef((function(e,t){const{className:r}=e,o=(0,M.A)(e,Un),i=(0,$.A)(),a=(e=>{const{classes:t}=e;return(0,O.A)({root:["footerContainer","withBorderColor"]},z.B,t)})(i);return(0,x.jsx)($n,(0,n.A)({ref:t,className:(0,R.A)(a.root,r),ownerState:i},o))})),Gn=o.forwardRef((function(e,t){var r,o;const i=(0,He.h)(),a=(0,$.A)(),s=(0,S.N)(i,K.O8),l=(0,S.N)(i,Ze),c=(0,S.N)(i,ie.RN),u=!a.hideFooterSelectedRowCount&&l>0?(0,x.jsx)(jn,{selectedRowCount:l}):(0,x.jsx)("div",{}),d=a.hideFooterRowCount||a.pagination?null:(0,x.jsx)(a.slots.footerRowCount,(0,n.A)({},null==(r=a.slotProps)?void 0:r.footerRowCount,{rowCount:s,visibleRowCount:c})),f=a.pagination&&!a.hideFooterPagination&&a.slots.pagination&&(0,x.jsx)(a.slots.pagination,(0,n.A)({},null==(o=a.slotProps)?void 0:o.pagination));return(0,x.jsxs)(Vn,(0,n.A)({ref:t},e,{children:[u,d,f]}))})),Hn=["className","rowCount","visibleRowCount"],Wn=(0,re.A)("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})((({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)}))),qn=o.forwardRef((function(e,t){const{className:r,rowCount:o,visibleRowCount:i}=e,a=(0,M.A)(e,Hn),s=(0,He.h)(),l=(0,$.A)(),c=(e=>{const{classes:t}=e;return(0,O.A)({root:["rowCount"]},z.B,t)})(l);if(0===o)return null;const u=i0&&c.open,id:c.panelId,"aria-labelledby":c.labelId},null==(o=l.slotProps)?void 0:o.panel,e,null==(i=l.slotProps)?void 0:i.basePopper,{children:u}))}));var Zn=r("yXLF"),Yn=r("pIrZ");const Kn=o.forwardRef((function(e,t){return(0,x.jsx)(Yn.$,(0,n.A)({ref:t},e,{children:(0,x.jsx)(Zn.A,{})}))})),Jn=o.forwardRef((function(e,t){const r=(0,He.h)().current.getLocaleText("noRowsLabel");return(0,x.jsx)(Yn.$,(0,n.A)({ref:t},e,{children:r}))}));var Qn=r("iu7o"),eo=r("hwAa");const to=(0,F.Ay)(Qn.A)((({theme:e})=>({[`& .${eo.A.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${eo.A.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}}))),ro=o.forwardRef((function(e,t){const r=(0,He.h)(),i=(0,$.A)(),a=(0,S.N)(r,nt),s=(0,S.N)(r,ot),l=o.useMemo((()=>Math.floor(s/(a.pageSize||1))),[s,a.pageSize]),c=o.useCallback((e=>{const t=Number(e.target.value);r.current.setPageSize(t)}),[r]),u=o.useCallback(((e,t)=>{r.current.setPage(t)}),[r]),d=(e=>{for(let t=0;tt.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function ao(e){const{className:t}=e,r=(0,M.A)(e,oo),o=(0,$.A)(),i=(e=>{const{classes:t}=e;return(0,O.A)({root:["panelContent"]},z.B,t)})(o);return(0,x.jsx)(io,(0,n.A)({className:(0,R.A)(t,i.root),ownerState:o},r))}const so=["className"],lo=(0,re.A)("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})((({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"})));function co(e){const{className:t}=e,r=(0,M.A)(e,so),o=(0,$.A)(),i=(e=>{const{classes:t}=e;return(0,O.A)({root:["panelFooter"]},z.B,t)})(o);return(0,x.jsx)(lo,(0,n.A)({className:(0,R.A)(t,i.root),ownerState:o},r))}var uo=r("qSC9");const fo=["className","slotProps"],po=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),ho=()=>!0,mo=o.forwardRef((function(e,t){const{className:r,slotProps:o={}}=e,i=(0,M.A)(e,fo),a=(0,$.A)(),s=(e=>{const{classes:t}=e;return(0,O.A)({root:["panelWrapper"]},z.B,t)})(a);return(0,x.jsx)(uo.A,(0,n.A)({open:!0,disableEnforceFocus:!0,isEnabled:ho},o.TrapFocus,{children:(0,x.jsx)(po,(0,n.A)({ref:t,tabIndex:-1,className:(0,R.A)(r,s.root),ownerState:a},i))}))})),go=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],yo=["InputComponentProps"],vo=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})((({theme:e})=>({display:"flex",padding:e.spacing(1)}))),bo=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})((({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)}))),_o=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),xo=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),wo=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:120}),Ao=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),So=e=>e.headerName||e.field,Co=new Intl.Collator,Eo=o.forwardRef((function(e,t){var r,i,a,s,l,c,u,d,f,p;const{item:h,hasMultipleFilters:m,deleteFilter:g,applyFilterChanges:y,multiFilterOperator:v,showMultiFilterOperators:b,disableMultiFilterOperator:_,applyMultiFilterOperatorChanges:w,focusElementRef:A,logicOperators:C=[no.V.And,no.V.Or],columnsSort:E,filterColumns:T,deleteIconProps:I={},logicOperatorInputProps:k={},operatorInputProps:L={},columnInputProps:D={},valueInputProps:N={}}=e,F=(0,M.A)(e,go),B=(0,He.h)(),j=(0,S.N)(B,G.Oe),U=(0,S.N)(B,ie.ZI),V=(0,$t.A)(),H=(0,$t.A)(),W=(0,$t.A)(),q=(0,$t.A)(),X=(0,$.A)(),Z=(e=>{const{classes:t}=e;return(0,O.A)({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},z.B,t)})(X),Y=o.useRef(null),K=o.useRef(null),J=m&&C.length>0,Q=(null==(r=X.slotProps)?void 0:r.baseFormControl)||{},ee=null==(a=((null==(i=X.slotProps)?void 0:i.baseSelect)||{}).native)||a,te=(null==(s=X.slotProps)?void 0:s.baseInputLabel)||{},re=(null==(l=X.slotProps)?void 0:l.baseSelectOption)||{},{InputComponentProps:ne}=N,oe=(0,M.A)(N,yo),ae=o.useMemo((()=>{if(void 0===T||"function"!=typeof T)return j;const e=T({field:h.field,columns:j,currentFilters:(null==U?void 0:U.items)||[]});return j.filter((t=>e.includes(t.field)))}),[T,null==U?void 0:U.items,j,h.field]),se=o.useMemo((()=>{switch(E){case"asc":return ae.sort(((e,t)=>Co.compare(So(e),So(t))));case"desc":return ae.sort(((e,t)=>-Co.compare(So(e),So(t))));default:return ae}}),[ae,E]),le=h.field?B.current.getColumn(h.field):null,ce=o.useMemo((()=>{var e;return h.operator&&le?null==(e=le.filterOperators)?void 0:e.find((e=>e.value===h.operator)):null}),[h,le]),ue=o.useCallback((e=>{const t=e.target.value,r=B.current.getColumn(t);if(r.field===le.field)return;const o=r.filterOperators.find((e=>e.value===h.operator))||r.filterOperators[0],i=!o.InputComponent||o.InputComponent!==(null==ce?void 0:ce.InputComponent)||r.type!==le.type;y((0,n.A)({},h,{field:t,operator:o.value,value:i?void 0:h.value}))}),[B,y,h,le,ce]),de=o.useCallback((e=>{const t=e.target.value,r=null==le?void 0:le.filterOperators.find((e=>e.value===t)),o=!(null!=r&&r.InputComponent)||(null==r?void 0:r.InputComponent)!==(null==ce?void 0:ce.InputComponent);y((0,n.A)({},h,{operator:t,value:o?void 0:h.value}))}),[y,h,le,ce]),fe=o.useCallback((e=>{const t=e.target.value===no.V.And.toString()?no.V.And:no.V.Or;w(t)}),[w]);return o.useImperativeHandle(A,(()=>({focus:()=>{var e;null!=ce&&ce.InputComponent?null==Y||null==(e=Y.current)||e.focus():K.current.focus()}})),[ce]),(0,x.jsxs)(vo,(0,n.A)({ref:t,className:Z.root,"data-id":h.id,ownerState:X},F,{children:[(0,x.jsx)(bo,(0,n.A)({variant:"standard",as:X.slots.baseFormControl},Q,I,{className:(0,R.A)(Z.deleteIcon,Q.className,I.className),ownerState:X,children:(0,x.jsx)(X.slots.baseIconButton,(0,n.A)({"aria-label":B.current.getLocaleText("filterPanelDeleteIconLabel"),title:B.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{X.disableMultipleColumnsFiltering?void 0===h.value?g(h):y((0,n.A)({},h,{value:void 0})):g(h)},size:"small"},null==(c=X.slotProps)?void 0:c.baseIconButton,{children:(0,x.jsx)(X.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),(0,x.jsx)(_o,(0,n.A)({variant:"standard",as:X.slots.baseFormControl},Q,k,{sx:(0,n.A)({display:J?"flex":"none",visibility:b?"visible":"hidden"},Q.sx||{},k.sx||{}),className:(0,R.A)(Z.logicOperatorInput,Q.className,k.className),ownerState:X,children:(0,x.jsx)(X.slots.baseSelect,(0,n.A)({inputProps:{"aria-label":B.current.getLocaleText("filterPanelLogicOperator")},value:v,onChange:fe,disabled:!!_||1===C.length,native:ee},null==(u=X.slotProps)?void 0:u.baseSelect,{children:C.map((e=>(0,o.createElement)(X.slots.baseSelectOption,(0,n.A)({},re,{native:ee,key:e.toString(),value:e.toString()}),B.current.getLocaleText((e=>{switch(e){case no.V.And:return"filterPanelOperatorAnd";case no.V.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(e)))))}))})),(0,x.jsxs)(xo,(0,n.A)({variant:"standard",as:X.slots.baseFormControl},Q,D,{className:(0,R.A)(Z.columnInput,Q.className,D.className),ownerState:X,children:[(0,x.jsx)(X.slots.baseInputLabel,(0,n.A)({},te,{htmlFor:V,id:H,children:B.current.getLocaleText("filterPanelColumns")})),(0,x.jsx)(X.slots.baseSelect,(0,n.A)({labelId:H,id:V,label:B.current.getLocaleText("filterPanelColumns"),value:h.field||"",onChange:ue,native:ee},null==(d=X.slotProps)?void 0:d.baseSelect,{children:se.map((e=>(0,o.createElement)(X.slots.baseSelectOption,(0,n.A)({},re,{native:ee,key:e.field,value:e.field}),So(e))))}))]})),(0,x.jsxs)(wo,(0,n.A)({variant:"standard",as:X.slots.baseFormControl},Q,L,{className:(0,R.A)(Z.operatorInput,Q.className,L.className),ownerState:X,children:[(0,x.jsx)(X.slots.baseInputLabel,(0,n.A)({},te,{htmlFor:W,id:q,children:B.current.getLocaleText("filterPanelOperator")})),(0,x.jsx)(X.slots.baseSelect,(0,n.A)({labelId:q,label:B.current.getLocaleText("filterPanelOperator"),id:W,value:h.operator,onChange:de,native:ee,inputRef:K},null==(f=X.slotProps)?void 0:f.baseSelect,{children:null==le||null==(p=le.filterOperators)?void 0:p.map((e=>(0,o.createElement)(X.slots.baseSelectOption,(0,n.A)({},re,{native:ee,key:e.value,value:e.value}),e.label||B.current.getLocaleText(`filterOperator${(0,P.A)(e.value)}`))))}))]})),(0,x.jsx)(Ao,(0,n.A)({variant:"standard",as:X.slots.baseFormControl},Q,oe,{className:(0,R.A)(Z.valueInput,Q.className,oe.className),ownerState:X,children:null!=ce&&ce.InputComponent?(0,x.jsx)(ce.InputComponent,(0,n.A)({apiRef:B,item:h,applyValue:y,focusElementRef:Y},ce.InputComponentProps,ne)):null}))]}))})),To=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],Io=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),ko=o.forwardRef((function(e,t){var r,i;const a=(0,He.h)(),s=(0,$.A)(),l=(0,S.N)(a,ie.ZI),c=(0,S.N)(a,G.Oe),u=o.useRef(null),d=o.useRef(null),{logicOperators:f=[no.V.And,no.V.Or],columnsSort:p,filterFormProps:h,getColumnForNewFilter:m,disableAddFilterButton:g=!1,disableRemoveAllButton:y=!1}=e,v=(0,M.A)(e,To),b=a.current.upsertFilterItem,_=o.useCallback((e=>{a.current.setFilterLogicOperator(e)}),[a]),w=o.useCallback((()=>{let e;if(m&&"function"==typeof m){const t=m({currentFilters:(null==l?void 0:l.items)||[],columns:c});if(null===t)return null;e=c.find((({field:e})=>e===t))}else e=c.find((e=>{var t;return null==(t=e.filterOperators)?void 0:t.length}));return e?Io(e):null}),[null==l?void 0:l.items,c,m]),A=o.useCallback((()=>{if(void 0===m||"function"!=typeof m)return w();const e=l.items.length?l.items:[w()].filter(Boolean),t=m({currentFilters:e,columns:c});if(null===t)return null;const r=c.find((({field:e})=>e===t));return r?Io(r):null}),[l.items,c,m,w]),C=o.useMemo((()=>l.items.length?l.items:(d.current||(d.current=w()),d.current?[d.current]:[])),[l.items,w]),E=C.length>1,T=o.useCallback((e=>{const t=1===C.length;a.current.deleteFilterItem(e),t&&a.current.hideFilterPanel()}),[a,C.length]);return o.useEffect((()=>{f.length>0&&l.logicOperator&&!f.includes(l.logicOperator)&&_(f[0])}),[f,_,l.logicOperator]),o.useEffect((()=>{C.length>0&&u.current.focus()}),[C.length]),(0,x.jsxs)(mo,(0,n.A)({ref:t},v,{children:[(0,x.jsx)(ao,{children:C.map(((e,t)=>(0,x.jsx)(Eo,(0,n.A)({item:e,applyFilterChanges:b,deleteFilter:T,hasMultipleFilters:E,showMultiFilterOperators:t>0,multiFilterOperator:l.logicOperator,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:_,focusElementRef:t===C.length-1?u:null,logicOperators:f,columnsSort:p},h),null==e.id?t:e.id)))}),s.disableMultipleColumnsFiltering||g&&y?null:(0,x.jsxs)(co,{children:[g?(0,x.jsx)("span",{}):(0,x.jsx)(s.slots.baseButton,(0,n.A)({onClick:()=>{const e=A();e&&a.current.upsertFilterItems([...C,e])},startIcon:(0,x.jsx)(s.slots.filterPanelAddIcon,{})},null==(r=s.slotProps)?void 0:r.baseButton,{children:a.current.getLocaleText("filterPanelAddFilter")})),y?null:(0,x.jsx)(s.slots.baseButton,(0,n.A)({onClick:()=>{1===C.length&&void 0===C[0].value&&(a.current.deleteFilterItem(C[0]),a.current.hideFilterPanel()),a.current.setFilterModel((0,n.A)({},l,{items:[]}))},startIcon:(0,x.jsx)(s.slots.filterPanelRemoveAllIcon,{})},null==(i=s.slotProps)?void 0:i.baseButton,{children:a.current.getLocaleText("filterPanelRemoveAll")}))]})]}))}));var Mo=r("OGDC"),Ro=r("CIcg"),Po=r("O3LO");const Oo=["className"],Lo=(0,re.A)("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:(e,t)=>t.panelHeader})((({theme:e})=>({padding:e.spacing(1)})));function Do(e){const{className:t}=e,r=(0,M.A)(e,Oo),o=(0,$.A)(),i=(e=>{const{classes:t}=e;return(0,O.A)({root:["panelHeader"]},z.B,t)})(o);return(0,x.jsx)(Lo,(0,n.A)({className:(0,R.A)(t,i.root),ownerState:o},r))}const No=["sort","searchPredicate","autoFocusSearchField","disableHideAllButton","disableShowAllButton","getTogglableColumns"],Fo=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:(e,t)=>t.columnsPanel})({padding:"8px 0px 8px 8px"}),zo=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:(e,t)=>t.columnsPanelRow})((({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px",[`& .${Ro.A.root}`]:{marginRight:e.spacing(.5)}}))),Bo=((0,F.Ay)(Mo.A)({justifyContent:"flex-end"}),new Intl.Collator),jo=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;var Uo=r("PYeY"),$o=r("zX2i"),Vo=r("G43+"),Go=r("usZy");const Ho=["children","className","classes"],Wo=(0,Uo.A)("MuiDataGrid",["panel","paper"]),qo=(0,F.Ay)(Go.A,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})((({theme:e})=>({zIndex:e.zIndex.modal}))),Xo=(0,F.Ay)(Vo.A,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex"}))),Zo=o.forwardRef(((e,t)=>{const{children:r,className:i}=e,a=(0,M.A)(e,Ho),s=(0,He.h)(),l=(0,$.A)(),c=Wo,[u,d]=o.useState(!1),f=o.useCallback((()=>{s.current.hidePreferences()}),[s]),p=o.useCallback((e=>{(0,Ge.nx)(e.key)&&s.current.hidePreferences()}),[s]),h=o.useMemo((()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{d(!0)},effect:()=>()=>{d(!1)}}]),[]),[m,g]=o.useState(null);return o.useEffect((()=>{var e;const t=null==(e=s.current.rootElementRef)||null==(e=e.current)?void 0:e.querySelector(`.${z.x.columnHeaders}`);t&&g(t)}),[s]),m?(0,x.jsx)(qo,(0,n.A)({ref:t,placement:"bottom-start",className:(0,R.A)(i,c.panel),ownerState:l,anchorEl:m,modifiers:h},a,{children:(0,x.jsx)($o.x,{mouseEvent:"onMouseUp",onClickAway:f,children:(0,x.jsx)(Xo,{className:c.paper,ownerState:l,elevation:8,onKeyDown:p,children:u&&r})})})):null}));var Yo=r("TL/R");function Ko(e){return o.memo(e,Yo.v)}let Jo;class Qo extends Error{}const ei=["changeReason","unstable_updateValueOnRender"],ti=["column","rowId","editCellState","align","children","colIndex","height","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","isNotVisible","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver","style"],ri=["changeReason","unstable_updateValueOnRender"],ni={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:cr.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},oi=Ko(o.forwardRef(((e,t)=>{const{column:r,rowId:i,editCellState:a}=e,s=(0,He.h)(),l=(0,$.A)(),c=r.field,u=(0,S.N)(s,(()=>{try{const e=s.current.getCellParams(i,c);return e.api=s.current,e}catch(e){if(e instanceof Qo)return ni;throw e}}),S.T),d=(0,S.N)(s,(()=>s.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:i,field:c})));if(u===ni)return null;const{cellMode:f,hasFocus:p,isEditable:h,value:m,formattedValue:g}=u,y="actions"===r.type,v="view"!==f&&h||y?-1:u.tabIndex,{classes:b,getCellClassName:_}=l,x=s.current.unstable_applyPipeProcessors("cellClassName",[],{id:i,field:c});let w;if(r.cellClassName&&x.push("function"==typeof r.cellClassName?r.cellClassName(u):r.cellClassName),_&&x.push(_(u)),null==a&&r.renderCell&&(w=r.renderCell(u),x.push(z.x["cell--withRenderer"]),x.push(null==b?void 0:b["cell--withRenderer"])),null!=a&&r.renderEditCell){const e=s.current.getRowWithUpdatedValues(i,r.field),t=(0,M.A)(a,ei),o=(0,n.A)({},u,{row:e},t);w=r.renderEditCell(o),x.push(z.x["cell--editing"]),x.push(null==b?void 0:b["cell--editing"])}const{slots:A}=l,C=A.cell,E=(0,n.A)({},e,{ref:t,field:c,formattedValue:g,hasFocus:p,isEditable:h,isSelected:d,value:m,cellMode:f,children:w,tabIndex:v,className:(0,R.A)(x)});return o.createElement(C,E)}))),ii=Ko(o.forwardRef(((e,t)=>{var r,i,a,s;const{column:l,rowId:c,editCellState:u,align:d,colIndex:f,height:p,width:h,className:m,showRightBorder:g,colSpan:y,disableDragEvents:v,isNotVisible:b,onClick:_,onDoubleClick:w,onMouseDown:A,onMouseUp:C,onMouseOver:E,onKeyDown:T,onKeyUp:I,onDragEnter:k,onDragOver:D,style:N}=e,F=(0,M.A)(e,ti),B=(0,He.h)(),j=(0,$.A)(),U=l.field,V=(0,S.N)(B,(()=>{try{const e=B.current.getCellParams(c,U);return e.api=B.current,e}catch(e){if(e instanceof Qo)return ni;throw e}}),S.T),G=(0,S.N)(B,(()=>B.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:c,field:U}))),{cellMode:H,hasFocus:W,isEditable:q,value:X,formattedValue:Z}=V,Y="actions"===l.type&&(null==(r=(i=l).getActions)?void 0:r.call(i,B.current.getRowParams(c)).some((e=>!e.props.disabled))),K="view"!==H&&q||Y?-1:V.tabIndex,{classes:J,getCellClassName:Q}=j,ee=B.current.unstable_applyPipeProcessors("cellClassName",[],{id:c,field:U});l.cellClassName&&ee.push("function"==typeof l.cellClassName?l.cellClassName(V):l.cellClassName),Q&&ee.push(Q(V));const te=null==Z?X:Z,re=o.useRef(null),ne=(0,L.A)(t,re),oe=o.useRef(null),ie=null!=(a=j.unstable_cellSelection)&&a,ae=(e=>{const{align:t,showRightBorder:r,isEditable:n,isSelected:o,isSelectionMode:i,classes:a}=e,s={root:["cell",`cell--text${(0,P.A)(t)}`,n&&"cell--editable",o&&"selected",r&&"cell--withRightBorder",i&&!n&&"cell--selectionMode","withBorderColor"],content:["cellContent"]};return(0,O.A)(s,z.B,a)})({align:d,showRightBorder:g,isEditable:q,classes:j.classes,isSelected:G,isSelectionMode:ie}),se=o.useCallback((e=>t=>{const r=B.current.getCellParams(c,U||"");B.current.publishEvent(e,r,t),C&&C(t)}),[B,U,C,c]),le=o.useCallback((e=>t=>{const r=B.current.getCellParams(c,U||"");B.current.publishEvent(e,r,t),A&&A(t)}),[B,U,A,c]),ce=o.useCallback(((e,t)=>r=>{if(!B.current.getRow(c))return;const n=B.current.getCellParams(c,U||"");B.current.publishEvent(e,n,r),t&&t(r)}),[B,U,c]),ue=o.useMemo((()=>b?(0,n.A)({padding:0,opacity:0,width:0,border:0},N):(0,n.A)({minWidth:h,maxWidth:h,minHeight:p,maxHeight:"auto"===p?"none":p},N)),[h,p,b,N]);if(o.useEffect((()=>{if(!W||H===cr.Edit)return;const e=(0,hn.A)(B.current.rootElementRef.current);if(re.current&&!re.current.contains(e.activeElement)){const e=re.current.querySelector('[tabindex="0"]'),t=oe.current||e||re.current;if(void 0===Jo&&document.createElement("div").focus({get preventScroll(){return Jo=!0,!1}}),Jo)t.focus({preventScroll:!0});else{const e=B.current.getScrollPosition();t.focus(),B.current.scroll(e)}}}),[W,H,B]),V===ni)return null;let de,fe=F.onFocus;if(null==u&&l.renderCell&&(de=l.renderCell(V),ee.push(z.x["cell--withRenderer"]),ee.push(null==J?void 0:J["cell--withRenderer"])),null!=u&&l.renderEditCell){const e=B.current.getRowWithUpdatedValues(c,l.field),t=(0,M.A)(u,ri),r=(0,n.A)({},V,{row:e},t);de=l.renderEditCell(r),ee.push(z.x["cell--editing"]),ee.push(null==J?void 0:J["cell--editing"])}if(void 0===de){const e=null==te?void 0:te.toString();de=(0,x.jsx)("div",{className:ae.content,title:e,role:"presentation",children:e})}o.isValidElement(de)&&Y&&(de=o.cloneElement(de,{focusElementRef:oe}));const pe=v?null:{onDragEnter:ce("cellDragEnter",k),onDragOver:ce("cellDragOver",D)},he=null==(s=j.experimentalFeatures)?void 0:s.ariaV7;return(0,x.jsx)("div",(0,n.A)({ref:ne,className:(0,R.A)(m,ee,ae.root),role:he?"gridcell":"cell","data-field":U,"data-colindex":f,"aria-colindex":f+1,"aria-colspan":y,style:ue,tabIndex:K,onClick:ce("cellClick",_),onDoubleClick:ce("cellDoubleClick",w),onMouseOver:ce("cellMouseOver",E),onMouseDown:le("cellMouseDown"),onMouseUp:se("cellMouseUp"),onKeyDown:ce("cellKeyDown",T),onKeyUp:ce("cellKeyUp",I)},pe,F,{onFocus:fe,children:de}))}))),ai=["selected","hovered","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","isLastVisible","focusedCellColumnIndexNotInRange","isNotVisible","focusedCell","tabbableCell","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"];function si({width:e}){if(!e)return null;const t={width:e};return(0,x.jsx)("div",{className:`${z.x.cell} ${z.x.withBorderColor}`,style:t})}const li=o.forwardRef((function(e,t){const{selected:r,hovered:i,rowId:a,row:s,index:l,style:c,position:u,rowHeight:d,className:f,visibleColumns:p,renderedColumns:h,containerWidth:m,firstColumnToRender:g,isLastVisible:y=!1,focusedCellColumnIndexNotInRange:v,isNotVisible:b,focusedCell:_,onClick:w,onDoubleClick:A,onMouseEnter:C,onMouseLeave:E,onMouseOut:T,onMouseOver:I}=e,k=(0,M.A)(e,ai),P=(0,He.h)(),D=o.useRef(null),N=(0,$.A)(),F=fr(P,N),B=(0,S.N)(P,G.fc),j=(0,S.N)(P,ae.XU),U=(0,S.N)(P,K.V2),V=(0,S.N)(P,Y),H=(0,S.N)(P,nn),W=(0,L.A)(D,t),q=l+V+2,X=(e=>{const{editable:t,editing:r,selected:n,isLastVisible:o,rowHeight:i,classes:a}=e,s={root:["row",n&&"selected",t&&"row--editable",r&&"row--editing",o&&"row--lastVisible","auto"===i&&"row--dynamicHeight"]};return(0,O.A)(s,z.B,a)})({selected:r,hovered:i,isLastVisible:y,classes:N.classes,editing:P.current.getRowMode(a)===ur.Edit,editable:N.editMode===lr.Row,rowHeight:d});o.useLayoutEffect((()=>{"auto"===d&&D.current&&"undefined"==typeof ResizeObserver&&P.current.unstable_storeRowHeightMeasurement(a,D.current.clientHeight,u)}),[P,d,a,u]),o.useLayoutEffect((()=>{if(F.range){const e=P.current.getRowIndexRelativeToVisibleRows(a);null!=e&&P.current.unstable_setLastMeasuredRowIndex(e)}const e=D.current;if(!e||"auto"!==d||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver((e=>{const[t]=e,r=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;P.current.unstable_storeRowHeightMeasurement(a,r,u)}));return t.observe(e),()=>t.disconnect()}),[P,F.range,l,d,a,u]);const Z=o.useCallback(((e,t)=>r=>{yr(r)||P.current.getRow(a)&&(P.current.publishEvent(e,P.current.getRowParams(a),r),t&&t(r))}),[P,a]),J=o.useCallback((e=>{const t=hr(e.target,z.x.cell),r=null==t?void 0:t.getAttribute("data-field");if(r){if(r===Zt.field)return;if(r===pr)return;if("__reorder__"===r)return;if(P.current.getCellMode(a,r)===cr.Edit)return;const e=P.current.getColumn(r);if((null==e?void 0:e.type)===ar)return}Z("rowClick",w)(e)}),[P,w,Z,a]),{slots:Q,slotProps:ee,disableColumnReorder:te}=N,re=Q.cell===ii?ii:oi,ne=N.rowReordering,oe=(e,t)=>{var r,o;const i=te&&e.disableReorder||!ne&&!!j.length&&U>1&&Object.keys(H).length>0,s=null!=(r=null==(o=H[a])?void 0:o[e.field])?r:null;let l=!1;return void 0!==v&&p[v].field===e.field&&(l=!0),(0,x.jsx)(re,(0,n.A)({column:e,width:t.width,rowId:a,height:d,showRightBorder:t.showRightBorder,align:e.align||"left",colIndex:t.indexRelativeToAllColumns,colSpan:t.colSpan,disableDragEvents:i,editCellState:s,isNotVisible:l},null==ee?void 0:ee.cell),e.field)},ie=(0,S.N)(P,(()=>(0,n.A)({},P.current.unstable_getRowInternalSizes(a))),S.T);let se=d;if("auto"===se&&ie){let e=0;const t=Object.entries(ie).reduce(((t,[r,n])=>/^base[A-Z]/.test(r)?(e+=1,n>t?n:t):t),0);t>0&&e>1&&(se=t)}const le=o.useMemo((()=>{if(b)return{opacity:0,width:0,height:0};const e=(0,n.A)({},c,{maxHeight:"auto"===d?"none":d,minHeight:se});if(null!=ie&&ie.spacingTop&&(e["border"===N.rowSpacingType?"borderTopWidth":"marginTop"]=ie.spacingTop),null!=ie&&ie.spacingBottom){const t="border"===N.rowSpacingType?"borderBottomWidth":"marginBottom";let r=e[t];"number"!=typeof r&&(r=parseInt(r||"0",10)),r+=ie.spacingBottom,e[t]=r}return e}),[b,d,c,se,ie,N.rowSpacingType]),ce=P.current.unstable_applyPipeProcessors("rowClassName",[],a);if("function"==typeof N.getRowClassName){var ue;const e=l-((null==(ue=F.range)?void 0:ue.firstRowIndex)||0),t=(0,n.A)({},P.current.getRowParams(a),{isFirstVisible:0===e,isLastVisible:e===F.rows.length-1,indexRelativeToCurrentPage:e});ce.push(N.getRowClassName(t))}const de=(0,_e.nX)(1e4,20,80),fe=P.current.getRowNode(a);if(!fe)return null;const pe=fe.type,he=[];for(let e=0;e0&&(0,x.jsx)(si,{width:me})]}))})),ci=Ko(li);var ui=r("i8i4");function di(e){var t;const{direction:r,index:o,sortingOrder:i}=e,a=(0,He.h)(),s=(0,$.A)(),l=(e=>{const{classes:t}=e;return(0,O.A)({icon:["sortIcon"]},z.B,t)})((0,n.A)({},e,{classes:s.classes})),c=function(e,t,r,o){let i;const a={};return"asc"===t?i=e.columnSortedAscendingIcon:"desc"===t?i=e.columnSortedDescendingIcon:(i=e.columnUnsortedIcon,a.sortingOrder=o),i?(0,x.jsx)(i,(0,n.A)({fontSize:"small",className:r},a)):null}(s.slots,r,l.icon,i);if(!c)return null;const u=(0,x.jsx)(s.slots.baseIconButton,(0,n.A)({tabIndex:-1,"aria-label":a.current.getLocaleText("columnHeaderSortIconLabel"),title:a.current.getLocaleText("columnHeaderSortIconLabel"),size:"small"},null==(t=s.slotProps)?void 0:t.baseIconButton,{children:c}));return(0,x.jsxs)(Fn,{children:[null!=o&&(0,x.jsx)(Ln.A,{badgeContent:o,color:"default",children:u}),null==o&&u]})}const fi=o.memo(di),pi=o.memo((e=>{var t,r;const{colDef:i,open:a,columnMenuId:s,columnMenuButtonId:l,iconButtonRef:c}=e,u=(0,He.h)(),d=(0,$.A)(),f=(e=>{const{classes:t,open:r}=e,n={root:["menuIcon",r&&"menuOpen"],button:["menuIconButton"]};return(0,O.A)(n,z.B,t)})((0,n.A)({},e,{classes:d.classes})),p=o.useCallback((e=>{e.preventDefault(),e.stopPropagation(),u.current.toggleColumnMenu(i.field)}),[u,i.field]);return(0,x.jsx)("div",{className:f.root,children:(0,x.jsx)(d.slots.baseTooltip,(0,n.A)({title:u.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},null==(t=d.slotProps)?void 0:t.baseTooltip,{children:(0,x.jsx)(d.slots.baseIconButton,(0,n.A)({ref:c,tabIndex:-1,className:f.button,"aria-label":u.current.getLocaleText("columnMenuLabel"),size:"small",onClick:p,"aria-haspopup":"menu","aria-expanded":a,"aria-controls":a?s:void 0,id:l},null==(r=d.slotProps)?void 0:r.baseIconButton,{children:(0,x.jsx)(d.slots.columnMenuIcon,{fontSize:"small"})}))}))})}));function hi({columnMenuId:e,columnMenuButtonId:t,ContentComponent:r,contentComponentProps:o,field:i,open:a,target:s,onExited:l}){const c=(0,He.h)(),u=c.current.getColumn(i),d=(0,rn.A)((e=>{e&&(e.stopPropagation(),null!=s&&s.contains(e.target))||c.current.hideColumnMenu()}));return s&&u?(0,x.jsx)(nr.U,{placement:"bottom-"+("right"===u.align?"start":"end"),open:a,target:s,onClose:d,onExited:l,children:(0,x.jsx)(r,(0,n.A)({colDef:u,hideMenu:d,open:a,id:e,labelledby:t},o))}):null}const mi=["className"],gi=(0,re.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)"}),yi=o.forwardRef((function(e,t){const{className:r}=e,o=(0,M.A)(e,mi),i=(0,$.A)(),a=(e=>{const{classes:t}=e;return(0,O.A)({root:["columnHeaderTitle"]},z.B,t)})(i);return(0,x.jsx)(gi,(0,n.A)({ref:t,className:(0,R.A)(a.root,r),ownerState:i},o))}));function vi(e){var t;const{label:r,description:i}=e,a=(0,$.A)(),s=o.useRef(null),[l,c]=o.useState(""),u=o.useCallback((()=>{if(!i&&null!=s&&s.current){const t=(e=s.current).scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;c(t?r:"")}var e}),[i,r]);return(0,x.jsx)(a.slots.baseTooltip,(0,n.A)({title:i||l},null==(t=a.slotProps)?void 0:t.baseTooltip,{children:(0,x.jsx)(yi,{onMouseOver:u,ref:s,children:r})}))}const bi=["resizable","resizing","height","side"];var _i=function(e){return e.Left="left",e.Right="right",e}(_i||{});function xi(e){const{height:t,side:r=_i.Right}=e,i=(0,M.A)(e,bi),a=(0,$.A)(),s=(e=>{const{resizable:t,resizing:r,classes:n,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",r&&"columnSeparator--resizing",o&&`columnSeparator--side${(0,P.A)(o)}`],icon:["iconSeparator"]};return(0,O.A)(i,z.B,n)})((0,n.A)({},e,{side:r,classes:a.classes})),l=o.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]);return(0,x.jsx)("div",(0,n.A)({className:s.root,style:{minHeight:t,opacity:a.showColumnVerticalBorder?0:1}},i,{onClick:l,children:(0,x.jsx)(a.slots.columnResizeIcon,{className:s.icon})}))}const wi=o.memo(xi),Ai=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps"],Si=o.forwardRef((function(e,t){const{classes:r,columnMenuOpen:i,colIndex:a,height:s,isResizing:l,sortDirection:c,hasFocus:u,tabIndex:d,separatorSide:f,isDraggable:p,headerComponent:h,description:m,width:g,columnMenuIconButton:y=null,columnMenu:v=null,columnTitleIconButtons:b=null,headerClassName:_,label:w,resizable:A,draggableContainerProps:S,columnHeaderSeparatorProps:C}=e,E=(0,M.A)(e,Ai),I=T(),k=(0,$.A)(),P=o.useRef(null),[O,D]=o.useState(i),N=(0,L.A)(P,t);let F="none";return null!=c&&(F="asc"===c?"ascending":"descending"),o.useEffect((()=>{O||D(i)}),[O,i]),o.useLayoutEffect((()=>{const e=I.current.state.columnMenu;if(u&&!e.open){const e=P.current.querySelector('[tabindex="0"]')||P.current;null==e||e.focus(),I.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[I,u]),(0,x.jsxs)("div",(0,n.A)({ref:N,className:(0,R.A)(r.root,_),style:{height:s,width:g,minWidth:g,maxWidth:g},role:"columnheader",tabIndex:d,"aria-colindex":a+1,"aria-sort":F,"aria-label":null==h?w:void 0},E,{children:[(0,x.jsxs)("div",(0,n.A)({className:r.draggableContainer,draggable:p,role:"presentation"},S,{children:[(0,x.jsxs)("div",{className:r.titleContainer,role:"presentation",children:[(0,x.jsx)("div",{className:r.titleContainerContent,children:void 0!==h?h:(0,x.jsx)(vi,{label:w,description:m,columnWidth:g})}),b]}),y]})),(0,x.jsx)(wi,(0,n.A)({resizable:!k.disableColumnResize&&!!A,resizing:l,height:s,side:f},C)),v]}))}));function Ci(e){var t,r,i,a;const{colDef:s,columnMenuOpen:l,colIndex:c,headerHeight:u,isResizing:d,sortDirection:f,sortIndex:p,filterItemsCounter:h,hasFocus:m,tabIndex:g,disableReorder:y,separatorSide:v}=e,b=T(),_=(0,$.A)(),w=o.useRef(null),A=(0,$t.A)(),S=(0,$t.A)(),C=o.useRef(null),[E,I]=o.useState(l),k=o.useMemo((()=>!_.disableColumnReorder&&!y&&!s.disableReorder),[_.disableColumnReorder,y,s.disableReorder]);let M;s.renderHeader&&(M=s.renderHeader(b.current.getColumnHeaderParams(s.field)));const R=(e=>{const{colDef:t,classes:r,isDragging:n,sortDirection:o,showRightBorder:i,filterItemsCounter:a}=e,s=null!=o,l=null!=a&&a>0,c="number"===t.type,u={root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",n&&"columnHeader--moving",s&&"columnHeader--sorted",l&&"columnHeader--filtered",c&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,O.A)(u,z.B,r)})((0,n.A)({},e,{classes:_.classes,showRightBorder:_.showColumnVerticalBorder})),P=o.useCallback((e=>t=>{yr(t)||b.current.publishEvent(e,b.current.getColumnHeaderParams(s.field),t)}),[b,s.field]),L=o.useMemo((()=>({onClick:P("columnHeaderClick"),onDoubleClick:P("columnHeaderDoubleClick"),onMouseOver:P("columnHeaderOver"),onMouseOut:P("columnHeaderOut"),onMouseEnter:P("columnHeaderEnter"),onMouseLeave:P("columnHeaderLeave"),onKeyDown:P("columnHeaderKeyDown"),onFocus:P("columnHeaderFocus"),onBlur:P("columnHeaderBlur")})),[P]),D=o.useMemo((()=>k?{onDragStart:P("columnHeaderDragStart"),onDragEnter:P("columnHeaderDragEnter"),onDragOver:P("columnHeaderDragOver"),onDragEnd:P("columnHeaderDragEnd")}:{}),[k,P]),N=o.useMemo((()=>({onMouseDown:P("columnSeparatorMouseDown"),onDoubleClick:P("columnSeparatorDoubleClick")})),[P]);o.useEffect((()=>{E||I(l)}),[E,l]);const F=o.useCallback((()=>{I(!1)}),[]),B=!_.disableColumnMenu&&!s.disableColumnMenu&&(0,x.jsx)(pi,{colDef:s,columnMenuId:A,columnMenuButtonId:S,open:E,iconButtonRef:C}),j=(0,x.jsx)(hi,{columnMenuId:A,columnMenuButtonId:S,field:s.field,open:l,target:C.current,ContentComponent:_.slots.columnMenu,contentComponentProps:null==(t=_.slotProps)?void 0:t.columnMenu,onExited:F}),U=null!=(r=s.sortingOrder)?r:_.sortingOrder,V=(0,x.jsxs)(o.Fragment,{children:[!_.disableColumnFilter&&(0,x.jsx)(_.slots.columnHeaderFilterIconButton,(0,n.A)({field:s.field,counter:h},null==(i=_.slotProps)?void 0:i.columnHeaderFilterIconButton)),s.sortable&&!s.hideSortIcons&&(0,x.jsx)(fi,{direction:f,index:p,sortingOrder:U})]});o.useLayoutEffect((()=>{const e=b.current.state.columnMenu;if(m&&!e.open){var t;const e=w.current.querySelector('[tabindex="0"]')||w.current;null==e||e.focus(),null!=(t=b.current.columnHeadersContainerElementRef)&&t.current&&(b.current.columnHeadersContainerElementRef.current.scrollLeft=0)}}),[b,m]);const G="function"==typeof s.headerClassName?s.headerClassName({field:s.field,colDef:s}):s.headerClassName,H=null!=(a=s.headerName)?a:s.field;return(0,x.jsx)(Si,(0,n.A)({ref:w,classes:R,columnMenuOpen:l,colIndex:c,height:u,isResizing:d,sortDirection:f,hasFocus:m,tabIndex:g,separatorSide:v,isDraggable:k,headerComponent:M,description:s.description,elementId:s.field,width:s.computedWidth,columnMenuIconButton:B,columnTitleIconButtons:V,headerClassName:G,label:H,resizable:!_.disableColumnResize&&!!s.resizable,"data-field":s.field,columnMenu:j,draggableContainerProps:D,columnHeaderSeparatorProps:N},L))}const Ei=e=>e.rowsMeta,Ti=e=>e.virtualization,Ii=(0,H.Mz)(Ti,(e=>e.enabled)),ki=(0,H.Mz)(Ti,(e=>e.enabledForColumns)),Mi=["style"],Ri=["style"];function Pi(e,t,r=0,n=t.length){if(t.length<=0)return-1;if(r>=n)return r;const o=r+Math.floor((n-r)/2);return e<=t[o]?Pi(e,t,r,o):Pi(e,t,o+1,n)}const Oi=({firstIndex:e,lastIndex:t,buffer:r,minFirstIndex:n,maxLastIndex:o})=>[(0,_e.qE)(e-r,n,o),(0,_e.qE)(t+r,n,o)],Li=(e,t)=>e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex,Di={maxSize:3};function Ni(e,t,r,n){var o,i;const a=e.current.getLastMeasuredRowIndex();let s=a===1/0;null!=(o=t.range)&&o.lastRowIndex&&!s&&(s=a>=t.range.lastRowIndex);const l=(0,_e.qE)(a-((null==(i=t.range)?void 0:i.firstRowIndex)||0),0,r.positions.length);return s||r.positions[l]>=n?Pi(n,r.positions):function(e,t,r){let n=1;for(;r({groupId:r,headerName:b,description:_,depth:a,maxDepth:s,fields:l,colIndex:u,isLastColumn:p})),[r,b,_,a,s,l,u,p]);r&&C&&(A=C(E));const T=h.showColumnVerticalBorder,I=(0,n.A)({},e,{classes:h.classes,showColumnBorder:T,headerAlign:w,depth:a,isDragging:!1}),k=null!=b?b:r,M=(0,$t.A)(),R=null===r?`empty-group-cell-${M}`:r,P=(e=>{const{classes:t,headerAlign:r,isDragging:n,showColumnBorder:o,groupId:i}=e,a={root:["columnHeader","left"===r&&"columnHeader--alignLeft","center"===r&&"columnHeader--alignCenter","right"===r&&"columnHeader--alignRight",n&&"columnHeader--moving",o&&"columnHeader--showColumnBorder",o&&"columnHeader--withRightBorder","withBorderColor",null===i?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,O.A)(a,z.B,t)})(I);o.useLayoutEffect((()=>{if(d){const e=m.current.querySelector('[tabindex="0"]')||m.current;null==e||e.focus()}}),[g,d]);const L=o.useCallback((e=>t=>{yr(t)||g.current.publishEvent(e,E,t)}),[g,E]),D=o.useMemo((()=>({onKeyDown:L("columnGroupHeaderKeyDown"),onFocus:L("columnGroupHeaderFocus"),onBlur:L("columnGroupHeaderBlur")})),[L]),N="function"==typeof v.headerClassName?v.headerClassName(E):v.headerClassName;return(0,x.jsx)(Si,(0,n.A)({ref:m,classes:P,columnMenuOpen:!1,colIndex:u,height:c,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:f,isDraggable:!1,headerComponent:A,headerClassName:N,description:_,elementId:R,width:i,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:k,"aria-colspan":l.length,"data-fields":`|-${l.join("-|-")}-|`},D))}const zi=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})((()=>({display:"flex"}))),Bi=e=>{const{innerRef:t,minColumnIndex:r=0,visibleColumns:i,sortColumnLookup:a,filterColumnLookup:s,columnPositions:l,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:u,columnHeaderFocus:d,columnGroupHeaderFocus:f,densityFactor:p,headerGroupingMaxDepth:h,columnMenuState:m,columnVisibility:g,columnGroupsHeaderStructure:y,hasOtherElementInTabSequence:v}=e,b=(0,rr.A)(),[_,w]=o.useState(""),[A,C]=o.useState(""),E=T(),I=(0,S.N)(E,ki),k=(0,$.A)(),M=o.useRef(null),R=(0,L.A)(t,M),[P,O]=o.useState(null),D=o.useRef(P),N=o.useRef(0),F=fr(E,k),z=Yr(E,k.columnHeaderHeight),B=Math.floor(k.columnHeaderHeight*p),j=o.useCallback((e=>{P&&e&&Li(P,e)||O(e)}),[P]);o.useEffect((()=>{var e;null!=(e=E.current.columnHeadersContainerElementRef)&&e.current&&(E.current.columnHeadersContainerElementRef.current.scrollLeft=0)}),[E]);const U=o.useRef((0,bn.UI)(Zr,{equalityCheck:(e,t)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every((r=>e[r]===t[r]))})),V=o.useCallback((e=>{const[t,n]=Oi({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:F.rows.length,buffer:k.rowBuffer}),o=U.current({firstColumnIndex:e.firstColumnIndex,minColumnIndex:r,columnBuffer:k.columnBuffer,firstRowToRender:t,lastRowToRender:n,apiRef:E,visibleRows:F.rows}),i="ltr"===b.direction?1:-1,a=o>0?N.current-i*l[o]:N.current;M.current.style.transform=`translate3d(${-a}px, 0px, 0px)`}),[l,r,k.columnBuffer,E,F.rows,k.rowBuffer,b.direction]);o.useLayoutEffect((()=>{P&&V(P)}),[P,V]);const G=o.useCallback((({left:e,renderContext:t=null},r)=>{var n,o;if(!M.current)return;if(N.current===e&&(null==(n=D.current)?void 0:n.firstColumnIndex)===(null==t?void 0:t.firstColumnIndex)&&(null==(o=D.current)?void 0:o.lastColumnIndex)===(null==t?void 0:t.lastColumnIndex))return;N.current=e;let i=!1;t===D.current&&D.current?i=!0:(function(e){return!!e.target}(r)?(ui.flushSync((()=>{j(t)})),i=!0):j(t),D.current=t),t&&i&&V(t)}),[V,j]),H=o.useCallback((e=>C(e.field)),[]),W=o.useCallback((()=>C("")),[]),q=o.useCallback((e=>w(e.field)),[]),X=o.useCallback((()=>w("")),[]);Pe(E,"columnResizeStart",H),Pe(E,"columnResizeStop",W),Pe(E,"columnHeaderDragStart",q),Pe(E,"columnHeaderDragEnd",X),Pe(E,"scrollPositionChange",G);const Z=e=>{const{renderContext:t=P,minFirstColumn:n=r,maxLastColumn:o=i.length}=e||{};if(!t)return null;const[a,s]=Oi({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:F.rows.length,buffer:k.rowBuffer}),l=I?U.current({firstColumnIndex:t.firstColumnIndex,minColumnIndex:n,columnBuffer:k.columnBuffer,apiRef:E,firstRowToRender:a,lastRowToRender:s,visibleRows:F.rows}):0,c=I?Math.min(t.lastColumnIndex+k.columnBuffer,o):o;return{renderedColumns:i.slice(l,c),firstColumnToRender:l,lastColumnToRender:c,minFirstColumn:n,maxLastColumn:o}},Y={minHeight:z,maxHeight:z,lineHeight:`${B}px`};return{renderContext:P,getColumnHeaders:(e,t={})=>{const r=Z(e);if(null==r)return null;const{renderedColumns:o,firstColumnToRender:i}=r,l=[];for(let e=0;e{if(0===h)return null;const t=Z(e);if(null==t||0===t.renderedColumns.length)return null;const{firstColumnToRender:r,lastColumnToRender:o}=t,a=[],s=[];for(let e=0;ee===d&&t.includes(a))),h=i[o-1].field,m=null!=(c=E.current.unstable_getColumnGroupPath(h)[e])?c:null,v=t.findIndex((({groupId:e,columnFields:t})=>e===m&&t.includes(h))),b=t.slice(p,v+1).map((e=>(0,n.A)({},e,{columnFields:e.columnFields.filter((e=>!1!==g[e]))}))).filter((e=>e.columnFields.length>0)),_=b[0].columnFields.indexOf(a),x=b[0].columnFields.slice(0,_).reduce(((e,t)=>{var r;return e+(null!=(r=E.current.getColumn(t).computedWidth)?r:0)}),0);let w=r;const A=b.map((({groupId:t,columnFields:r})=>{const n=null!==f&&f.depth===e&&r.includes(f.field),o=null!==u&&u.depth===e&&r.includes(u.field)?0:-1,i={groupId:t,width:r.reduce(((e,t)=>e+E.current.getColumn(t).computedWidth),0),fields:r,colIndex:w,hasFocus:n,tabIndex:o};return w+=r.length,i}));s.push({leftOverflow:x,elements:A})}return s.forEach(((e,t)=>{a.push((0,x.jsx)(zi,{style:{height:`${B}px`,transform:`translateX(-${e.leftOverflow}px)`},role:"row","aria-rowindex":t+1,ownerState:k,children:e.elements.map((({groupId:e,width:r,fields:n,colIndex:o,hasFocus:a,tabIndex:l},c)=>(0,x.jsx)(Fi,{groupId:e,width:r,fields:n,colIndex:o,depth:t,isLastColumn:o===i.length-n.length,maxDepth:s.length,height:B,hasFocus:a,tabIndex:l},c)))},t))})),a},isDragging:!!_,getRootProps:(e={})=>(0,n.A)({style:Y},e),getInnerProps:()=>({ref:R,role:"rowgroup"}),headerHeight:B}},ji=["className"],Ui=(0,re.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({position:"relative",overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:"1px solid",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),$i=o.forwardRef((function(e,t){const{className:r}=e,o=(0,M.A)(e,ji),i=(0,$.A)(),a=(e=>{const{classes:t}=e;return(0,O.A)({root:["columnHeaders","withBorderColor"]},z.B,t)})(i);return(0,x.jsx)(Ui,(0,n.A)({ref:t,className:(0,R.A)(r,a.root),ownerState:i},o,{role:"presentation"}))})),Vi=["isDragging","className"],Gi=(0,re.A)("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${z.x.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})((()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${z.x.columnHeaderDropZone} .${z.x.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${z.x["columnHeadersInner--scrollable"]} .${z.x.columnHeader}:last-child`]:{borderRight:"none"}}))),Hi=o.forwardRef((function(e,t){var r,o;const{isDragging:i,className:a}=e,s=(0,M.A)(e,Vi),l=(0,He.h)(),c=(0,$.A)(),u=(0,n.A)({},c,{isDragging:i,hasScrollX:null!=(r=null==(o=l.current.getRootDimensions())?void 0:o.hasScrollX)&&r}),d=(e=>{const{isDragging:t,hasScrollX:r,classes:n}=e,o={root:["columnHeadersInner",t&&"columnHeaderDropZone",r&&"columnHeadersInner--scrollable"]};return(0,O.A)(o,z.B,n)})(u);return(0,x.jsx)(Gi,(0,n.A)({ref:t,className:(0,R.A)(a,d.root),ownerState:u},s))})),Wi=["innerRef","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],qi=Ko(o.forwardRef((function(e,t){const{innerRef:r,visibleColumns:o,sortColumnLookup:i,filterColumnLookup:a,columnPositions:s,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:c,columnHeaderFocus:u,columnGroupHeaderFocus:d,densityFactor:f,headerGroupingMaxDepth:p,columnMenuState:h,columnVisibility:m,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:y}=e,v=(0,M.A)(e,Wi),{isDragging:b,getRootProps:_,getInnerProps:w,getColumnHeaders:A,getColumnGroupHeaders:S}=Bi({innerRef:r,visibleColumns:o,sortColumnLookup:i,filterColumnLookup:a,columnPositions:s,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:c,columnHeaderFocus:u,columnGroupHeaderFocus:d,densityFactor:f,headerGroupingMaxDepth:p,columnMenuState:h,columnVisibility:m,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:y});return(0,x.jsx)($i,(0,n.A)({ref:t},_(v),{children:(0,x.jsxs)(Hi,(0,n.A)({isDragging:b},w(),{children:[S(),A()]}))}))})));var Xi=r("A+QN");const Zi=["displayOrder"],Yi=["hideMenu","colDef","id","labelledby","className","children","open"],Ki=(0,F.Ay)(tr.A)((()=>({minWidth:248}))),Ji=o.forwardRef((function(e,t){const{hideMenu:r,id:i,labelledby:a,className:s,children:l,open:c}=e,u=(0,M.A)(e,Yi),d=o.useCallback((e=>{(0,Ge.vY)(e.key)&&e.preventDefault(),(0,Ge.HF)(e.key)&&r(e)}),[r]);return(0,x.jsx)(Ki,(0,n.A)({id:i,ref:t,className:(0,R.A)(z.x.menuList,s),"aria-labelledby":a,onKeyDown:d,autoFocus:c},u,{children:l}))}));var Qi=r("LutX"),ea=r("mkGA"),ta=r("T4Ez");function ra(e){const{colDef:t,onClick:r}=e,n=(0,He.h)(),i=(0,$.A)(),a=1===(0,G.iv)(n).filter((e=>!0!==e.disableColumnMenu)).length,s=o.useCallback((e=>{a||(n.current.setColumnVisibility(t.field,!1),r(e))}),[n,t.field,r,a]);return i.disableColumnSelector||!1===t.hideable?null:(0,x.jsxs)(Qi.A,{onClick:s,disabled:a,children:[(0,x.jsx)(ea.A,{children:(0,x.jsx)(i.slots.columnMenuHideIcon,{fontSize:"small"})}),(0,x.jsx)(ta.A,{children:n.current.getLocaleText("columnMenuHideColumn")})]})}function na(e){const{onClick:t}=e,r=(0,He.h)(),n=(0,$.A)(),i=o.useCallback((e=>{t(e),r.current.showPreferences(Kr.y.columns)}),[r,t]);return n.disableColumnSelector?null:(0,x.jsxs)(Qi.A,{onClick:i,children:[(0,x.jsx)(ea.A,{children:(0,x.jsx)(n.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),(0,x.jsx)(ta.A,{children:r.current.getLocaleText("columnMenuManageColumns")})]})}const oa=["defaultSlots","defaultSlotProps","slots","slotProps"],ia={columnMenuSortItem:function(e){var t;const{colDef:r,onClick:n}=e,i=(0,He.h)(),a=(0,S.N)(i,ae.XU),s=(0,$.A)(),l=o.useMemo((()=>{if(!r)return null;const e=a.find((e=>e.field===r.field));return null==e?void 0:e.sort}),[r,a]),c=null!=(t=r.sortingOrder)?t:s.sortingOrder,u=o.useCallback((e=>{n(e);const t=e.currentTarget.getAttribute("data-value")||null;i.current.sortColumn(r,t===l?null:t)}),[i,r,n,l]);if(!r||!r.sortable||!c.some((e=>!!e)))return null;const d=e=>{const t=i.current.getLocaleText(e);return"function"==typeof t?t(r):t};return(0,x.jsxs)(o.Fragment,{children:[c.includes("asc")&&"asc"!==l?(0,x.jsxs)(Qi.A,{onClick:u,"data-value":"asc",children:[(0,x.jsx)(ea.A,{children:(0,x.jsx)(s.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),(0,x.jsx)(ta.A,{children:d("columnMenuSortAsc")})]}):null,c.includes("desc")&&"desc"!==l?(0,x.jsxs)(Qi.A,{onClick:u,"data-value":"desc",children:[(0,x.jsx)(ea.A,{children:(0,x.jsx)(s.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),(0,x.jsx)(ta.A,{children:d("columnMenuSortDesc")})]}):null,c.includes(null)&&null!=l?(0,x.jsxs)(Qi.A,{onClick:u,children:[(0,x.jsx)(ea.A,{}),(0,x.jsx)(ta.A,{children:i.current.getLocaleText("columnMenuUnsort")})]}):null]})},columnMenuFilterItem:function(e){const{colDef:t,onClick:r}=e,n=(0,He.h)(),i=(0,$.A)(),a=o.useCallback((e=>{r(e),n.current.showFilterPanel(t.field)}),[n,t.field,r]);return i.disableColumnFilter||!t.filterable?null:(0,x.jsxs)(Qi.A,{onClick:a,children:[(0,x.jsx)(ea.A,{children:(0,x.jsx)(i.slots.columnMenuFilterIcon,{fontSize:"small"})}),(0,x.jsx)(ta.A,{children:n.current.getLocaleText("columnMenuFilter")})]})},columnMenuColumnsItem:function(e){return(0,x.jsxs)(o.Fragment,{children:[(0,x.jsx)(ra,(0,n.A)({},e)),(0,x.jsx)(na,(0,n.A)({},e))]})}},aa={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},sa=o.forwardRef((function(e,t){const{defaultSlots:r,defaultSlotProps:i,slots:a,slotProps:s}=e,l=(0,M.A)(e,oa),c=(e=>{const t=T(),{defaultSlots:r,defaultSlotProps:i,slots:a={},slotProps:s={},hideMenu:l,colDef:c,addDividers:u=!0}=e,d=o.useMemo((()=>(0,n.A)({},r,a)),[r,a]),f=o.useMemo((()=>{if(!s||0===Object.keys(s).length)return i;const e=(0,n.A)({},s);return Object.entries(i).forEach((([t,r])=>{e[t]=(0,n.A)({},r,s[t]||{})})),e}),[i,s]),p=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),h=o.useMemo((()=>{const e=Object.keys(r);return Object.keys(a).filter((t=>!e.includes(t)))}),[a,r]);return o.useMemo((()=>{const e=Array.from(new Set([...p,...h])).filter((e=>null!=d[e])).sort(((e,t)=>{const r=f[e],n=f[t];return(Number.isFinite(null==r?void 0:r.displayOrder)?r.displayOrder:100)-(Number.isFinite(null==n?void 0:n.displayOrder)?n.displayOrder:100)}));return e.reduce(((t,r,o)=>{let i={colDef:c,onClick:l};const a=f[r];if(a){const e=(0,M.A)(a,Zi);i=(0,n.A)({},i,e)}return u&&o!==e.length-1?[...t,[d[r],i],[Xi.A,{}]]:[...t,[d[r],i]]}),[])}),[u,c,p,l,d,f,h])})((0,n.A)({},l,{defaultSlots:r,defaultSlotProps:i,slots:a,slotProps:s}));return(0,x.jsx)(Ji,(0,n.A)({ref:t},l,{children:c.map((([e,t],r)=>(0,x.jsx)(e,(0,n.A)({},t),r)))}))})),la=o.forwardRef((function(e,t){return(0,x.jsx)(sa,(0,n.A)({},e,{ref:t,defaultSlots:ia,defaultSlotProps:aa}))})),ca=o.forwardRef((function(e,t){const r=(0,He.h)().current.getLocaleText("noResultsOverlayLabel");return(0,x.jsx)(Yn.$,(0,n.A)({ref:t},e,{children:r}))}));var ua=r("wYCo"),da=r("MGIy"),fa=r("Fg+5"),pa=r("AAK8"),ha=r("YM+J"),ma=r("5I82"),ga=r("EfzM"),ya=r("vH+6"),va=r("kQF4"),ba=r("Ifci");const _a=["sortingOrder"],xa=o.memo((function(e){const{sortingOrder:t}=e,r=(0,M.A)(e,_a),o=(0,$.A)(),[i]=t,a="asc"===i?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?(0,x.jsx)(a,(0,n.A)({},r)):null}));var wa=r("M7pN");const Aa=(0,wa.A)((0,x.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),Sa=(0,wa.A)((0,x.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),Ca=(0,wa.A)((0,x.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),Ea=(0,wa.A)((0,x.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Ta=(0,wa.A)((0,x.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),Ia=(0,wa.A)((0,x.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),ka=(0,wa.A)((0,x.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),Ma=((0,wa.A)((0,x.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),(0,wa.A)((0,x.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle"),(0,wa.A)((0,x.jsx)("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon")),Ra=(0,wa.A)((0,x.jsx)("path",{d:"M11 19V5h2v14z"}),"Separator"),Pa=(0,wa.A)((0,x.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),Oa=(0,wa.A)((0,x.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),La=(0,wa.A)((0,x.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),Da=(0,wa.A)((0,x.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),Na=(0,wa.A)((0,x.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Fa=(0,wa.A)((0,x.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),za=(0,wa.A)((0,x.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),Ba=(0,wa.A)((0,x.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),ja=(0,wa.A)((0,x.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),Ua=(0,wa.A)((0,x.jsx)("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),$a=(0,wa.A)((0,x.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Va=(0,wa.A)((0,x.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),Ga=(0,wa.A)((0,x.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),Ha=(0,wa.A)((0,x.jsx)("g",{children:(0,x.jsx)("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),Wa=(0,wa.A)((0,x.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),qa=((0,wa.A)((0,x.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),(0,wa.A)((0,x.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete")),Xa=["native"],Za={BooleanCellTrueIcon:$a,BooleanCellFalseIcon:Na,ColumnMenuIcon:Da,OpenFilterButtonIcon:Ta,FilterPanelDeleteIcon:Na,ColumnFilteredIcon:Ia,ColumnSelectorIcon:Ma,ColumnUnsortedIcon:xa,ColumnSortedAscendingIcon:Aa,ColumnSortedDescendingIcon:Sa,ColumnResizeIcon:Ra,DensityCompactIcon:Pa,DensityStandardIcon:Oa,DensityComfortableIcon:La,ExportIcon:Ua,MoreActionsIcon:Va,TreeDataCollapseIcon:Ea,TreeDataExpandIcon:Ca,GroupingCriteriaCollapseIcon:Ea,GroupingCriteriaExpandIcon:Ca,DetailPanelExpandIcon:Fa,DetailPanelCollapseIcon:za,RowReorderIcon:ja,QuickFilterIcon:ka,QuickFilterClearIcon:Na,ColumnMenuHideIcon:Ga,ColumnMenuSortAscendingIcon:Aa,ColumnMenuSortDescendingIcon:Sa,ColumnMenuFilterIcon:Ia,ColumnMenuManageColumnsIcon:Ha,ColumnMenuClearIcon:Wa,LoadIcon:Ba,FilterPanelAddIcon:Fa,FilterPanelRemoveAllIcon:qa,ColumnReorderIcon:ja},Ya=(0,n.A)({},Za,{BaseCheckbox:ua.A,BaseTextField:da.A,BaseFormControl:fa.A,BaseSelect:pa.A,BaseSwitch:ha.A,BaseButton:ma.A,BaseIconButton:Mo.A,BaseInputAdornment:ga.A,BaseTooltip:ya.A,BasePopper:Go.A,BaseInputLabel:va.A,BaseSelectOption:function(e){let{native:t}=e,r=(0,M.A)(e,Xa);return t?(0,x.jsx)("option",(0,n.A)({},r)):(0,x.jsx)(Qi.A,(0,n.A)({},r))},BaseChip:ba.A}),Ka=(0,n.A)({},Ya,{Cell:ii,SkeletonCell:function(e){const{align:t,width:r,contentWidth:o}=e,i=(0,M.A)(e,On),a=(e=>{const{align:t,classes:r}=e,n={root:["cell","cellSkeleton",`cell--text${(0,P.A)(t)}`,"withBorderColor"]};return(0,O.A)(n,z.B,r)})({classes:(0,$.A)().classes,align:t});return(0,x.jsx)("div",(0,n.A)({className:a.root,style:{width:r}},i,{children:(0,x.jsx)(Pn.A,{width:`${o}%`})}))},ColumnHeaderFilterIconButton:function(e){var t,r;const{counter:i,field:a,onClick:s}=e,l=(0,He.h)(),c=(0,$.A)(),u=(e=>{const{classes:t}=e;return(0,O.A)({icon:["filterIcon"]},z.B,t)})((0,n.A)({},e,{classes:c.classes})),d=(0,S.N)(l,yn._),f=(0,$t.A)(),p=(0,$t.A)(),h=o.useCallback((e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:r}=(0,yn._)(l.current.state);t&&r===Kr.y.filters?l.current.hideFilterPanel():l.current.showFilterPanel(void 0,p,f),s&&s(l.current.getColumnHeaderParams(a),e)}),[l,a,s,p,f]);if(!i)return null;const m=d.open&&d.labelId===f,g=(0,x.jsx)(c.slots.baseIconButton,(0,n.A)({id:f,onClick:h,color:"default","aria-label":l.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?p:void 0},null==(t=c.slotProps)?void 0:t.baseIconButton,{children:(0,x.jsx)(c.slots.columnFilteredIcon,{className:u.icon,fontSize:"small"})}));return(0,x.jsx)(c.slots.baseTooltip,(0,n.A)({title:l.current.getLocaleText("columnHeaderFiltersTooltipActive")(i),enterDelay:1e3},null==(r=c.slotProps)?void 0:r.baseTooltip,{children:(0,x.jsxs)(Fn,{children:[i>1&&(0,x.jsx)(Ln.A,{badgeContent:i,color:"default",children:g}),1===i&&g]})}))},ColumnMenu:la,ColumnHeaders:qi,Footer:Gn,FooterRowCount:qn,Toolbar:null,PreferencesPanel:Xn,LoadingOverlay:Kn,NoResultsOverlay:ca,NoRowsOverlay:Jn,Pagination:ro,FilterPanel:ko,ColumnsPanel:function(e){var t,r,i;const a=(0,He.h)(),s=o.useRef(null),l=(0,S.N)(a,G.OV),c=(0,S.N)(a,G.FY),u=(0,$.A)(),[d,f]=o.useState(""),p=(e=>{const{classes:t}=e;return(0,O.A)({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},z.B,t)})(u),{sort:h,searchPredicate:m=jo,autoFocusSearchField:g=!0,disableHideAllButton:y=!1,disableShowAllButton:v=!1,getTogglableColumns:b}=e,_=(0,M.A)(e,No),w=o.useMemo((()=>{switch(h){case"asc":return[...l].sort(((e,t)=>Bo.compare(e.headerName||e.field,t.headerName||t.field)));case"desc":return[...l].sort(((e,t)=>-Bo.compare(e.headerName||e.field,t.headerName||t.field)));default:return l}}),[l,h]),A=e=>{const{name:t}=e.target;a.current.setColumnVisibility(t,!1===c[t])},C=o.useCallback((e=>{const t=(0,G.FY)(a),r=(0,n.A)({},t),o=b?b(l):null;return l.forEach((t=>{t.hideable&&(null==o||o.includes(t.field))&&(e?delete r[t.field]:r[t.field]=!1)})),a.current.setColumnVisibilityModel(r)}),[a,l,b]),E=o.useCallback((e=>{f(e.target.value)}),[]),T=o.useMemo((()=>{const e=b?b(w):null,t=e?w.filter((({field:t})=>e.includes(t))):w;return d?t.filter((e=>m(e,d.toLowerCase()))):t}),[w,d,m,b]),I=o.useRef(null);o.useEffect((()=>{g?s.current.focus():I.current&&"function"==typeof I.current.focus&&I.current.focus()}),[g]);let k=!1;const R=e=>!1===k&&!1!==e.hideable&&(k=!0,!0);return(0,x.jsxs)(mo,(0,n.A)({},_,{children:[(0,x.jsx)(Do,{children:(0,x.jsx)(u.slots.baseTextField,(0,n.A)({label:a.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:a.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:s,value:d,onChange:E,variant:"standard",fullWidth:!0},null==(t=u.slotProps)?void 0:t.baseTextField))}),(0,x.jsx)(ao,{children:(0,x.jsx)(Fo,{className:p.root,ownerState:u,children:T.map((e=>{var t;return(0,x.jsxs)(zo,{className:p.columnsPanelRow,ownerState:u,children:[(0,x.jsx)(Po.A,{control:(0,x.jsx)(u.slots.baseSwitch,(0,n.A)({disabled:!1===e.hideable,checked:!1!==c[e.field],onClick:A,name:e.field,size:"small",inputRef:R(e)?I:void 0},null==(t=u.slotProps)?void 0:t.baseSwitch)),label:e.headerName||e.field}),!u.disableColumnReorder&&!1]},e.field)}))})}),v&&y?null:(0,x.jsxs)(co,{children:[y?(0,x.jsx)("span",{}):(0,x.jsx)(u.slots.baseButton,(0,n.A)({onClick:()=>C(!1)},null==(r=u.slotProps)?void 0:r.baseButton,{disabled:y,children:a.current.getLocaleText("columnsPanelHideAllButton")})),v?null:(0,x.jsx)(u.slots.baseButton,(0,n.A)({onClick:()=>C(!0)},null==(i=u.slotProps)?void 0:i.baseButton,{disabled:v,children:a.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))},Panel:Zo,Row:ci}),Ja=e=>{if(void 0!==e)return Object.keys(e).reduce(((t,r)=>(0,n.A)({},t,{[`${r.charAt(0).toLowerCase()}${r.slice(1)}`]:e[r]})),{})},Qa={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,rowSelection:!0,density:"standard",disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleRowSelection:!1,disableMultipleColumnsSorting:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:lr.Cell,filterMode:"client",filterDebounceMs:150,columnHeaderHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:"client",rowHeight:52,pageSizeOptions:[25,50,100],rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingOrder:["asc","desc",null],sortingMode:"client",throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1,unstable_ignoreValueFormatterDuringExport:!1,clipboardCopyCellDelimiter:"\t",rowPositionsDebounceMs:166},es=(Ja(Ka),e=>(0,n.A)({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}})),ts=(e,t,r)=>"number"==typeof e&&e>0?e:t,rs=(["MUI: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),["MUI: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n"),e=>(0,n.A)({},e,{columnMenu:{open:!1}}));function ns(e){return void 0!==e.field}const os=(e,t,r)=>{if(ns(e)){if(void 0!==r[e.field])throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${r[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(r[e.field]=t)}const{groupId:n,children:o}=e;o.forEach((e=>{os(e,[...t,n],r)}))},is=e=>{if(!e)return{};const t={};return e.forEach((e=>{os(e,[],t)})),t},as=(e,t,r)=>{const n=e=>{var r;return null!=(r=t[e])?r:[]},o=[],i=Math.max(...e.map((e=>n(e).length))),a=(e,t,r)=>(0,_e.Hv)(n(e).slice(0,r+1),n(t).slice(0,r+1));for(let t=0;t{var i;const s=null!=(i=n(o)[t])?i:null;if(0===e.length)return[{columnFields:[o],groupId:s}];const l=e[e.length-1],c=l.columnFields[l.columnFields.length-1];return l.groupId!==s||!a(c,o,t)||(u=c,d=o,null!=r&&r.left&&r.left.includes(u)&&!r.left.includes(d)||null!=r&&r.right&&!r.right.includes(u)&&r.right.includes(d))?[...e,{columnFields:[o],groupId:s}]:[...e.slice(0,e.length-1),{columnFields:[...l.columnFields,o],groupId:s}];var u,d}),[]);o.push(i)}return o},ss=["groupId","children"],ls=e=>{let t={};return e.forEach((e=>{if(ns(e))return;const{groupId:r,children:o}=e,i=(0,M.A)(e,ss);if(!r)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn(`MUI: group groupId=${r} has no children.`);const a=(0,n.A)({},i,{groupId:r}),s=ls(o);if(void 0!==s[r]||void 0!==t[r])throw new Error(`MUI: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=(0,n.A)({},t,s,{[r]:a})})),(0,n.A)({},t)},cs=(e,t,r)=>{var o,i,a,s;if(null==(o=t.experimentalFeatures)||!o.columnGrouping)return e;const l=(0,G.JR)(r),c=(0,G.TI)(r),u=ls(null!=(i=t.columnGroupingModel)?i:[]),d=is(null!=(a=t.columnGroupingModel)?a:[]),f=as(l,d,null!=(s=r.current.state.pinnedColumns)?s:{}),p=0===c.length?0:Math.max(...c.map((e=>{var t,r;return null!=(t=null==(r=d[e])?void 0:r.length)?t:0})));return(0,n.A)({},e,{columnGrouping:{lookup:u,unwrappedGroupingModel:d,headerStructure:f,maxDepth:p}})},us=(e,t)=>{const r={enabled:!t.disableVirtualization,enabledForColumns:!0};return(0,n.A)({},e,{virtualization:r})},ds=e=>e.headerFiltering,fs=(0,H.Mz)(ds,(e=>e.editing)),ps=(0,H.Mz)(ds,(e=>e.menuOpen)),hs=({currentColIndex:e,firstColIndex:t,lastColIndex:r,direction:n})=>{if("rtl"===n){if(et)return e-1;return null},ms=({currentColIndex:e,firstColIndex:t,lastColIndex:r,direction:n})=>{if("rtl"===n){if(e>t)return e-1}else if("ltr"===n&&et?o:i-t>r?i-t:oe.includes(t)))?`"${r}"`:t.escapeFormulas&&["=","+","-","@","\t","\r"].includes(r[0])?`'${r}`:r}return e}return e}const vs=(e,t)=>{const{csvOptions:r,ignoreValueFormatter:n}=t;let o;if(n){var i;const t=e.colDef.type;if("number"===t)o=String(e.value);else if("date"===t||"dateTime"===t){var a;o=null==(a=e.value)?void 0:a.toISOString()}else o="function"==typeof(null==(i=e.value)?void 0:i.toString)?e.value.toString():e.value}else o=e.formattedValue;return ys(o,r)};(0,Je.f)(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);class bs{constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),null==e?this.rowString+="":"function"==typeof this.options.sanitizeCellValue?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}const _s=({apiRef:e,options:t})=>{const r=(0,G.OV)(e);return t.fields?t.fields.reduce(((e,t)=>{const n=r.find((e=>e.field===t));return n&&e.push(n),e}),[]):(t.allColumns?r:(0,G.iv)(e)).filter((e=>!e.disableExport))},xs=({apiRef:e})=>{var t,r;const n=(0,ie.qA)(e),o=(0,K.qj)(e),i=e.current.getSelectedRows(),a=n.filter((e=>"footer"!==o[e].type)),s=(0,K.$2)(e),l=(null==s||null==(t=s.top)?void 0:t.map((e=>e.id)))||[],c=(null==s||null==(r=s.bottom)?void 0:r.map((e=>e.id)))||[];return a.unshift(...l),a.push(...c),i.size>0?a.filter((e=>i.has(e))):a},ws=["hideMenu","options"],As=["hideMenu","options"];function Ss(e){const t=(0,He.h)(),{hideMenu:r,options:o}=e,i=(0,M.A)(e,ws);return(0,x.jsx)(Qi.A,(0,n.A)({onClick:()=>{t.current.exportDataAsCsv(o),null==r||r()}},i,{children:t.current.getLocaleText("toolbarExportCSV")}))}function Cs(e){const t=(0,He.h)(),{hideMenu:r,options:o}=e,i=(0,M.A)(e,As);return(0,x.jsx)(Qi.A,(0,n.A)({onClick:()=>{t.current.exportDataAsPrint(o),null==r||r()}},i,{children:t.current.getLocaleText("toolbarExportPrint")}))}const Es=(e,t)=>{const r=Qt(e,"useGridCsvExport"),n=t.unstable_ignoreValueFormatterDuringExport,i=("object"==typeof n?null==n?void 0:n.csvExport:n)||!1,a=o.useCallback(((t={})=>{var n,o,a,s,l;return r.debug("Get data as CSV"),function(e){const{columns:t,rowIds:r,csvOptions:n,ignoreValueFormatter:o,apiRef:i}=e,a=r.reduce(((e,r)=>`${e}${(({id:e,columns:t,getCellParams:r,csvOptions:n,ignoreValueFormatter:o})=>{const i=new bs({csvOptions:n});return t.forEach((t=>{const a=r(e,t.field);i.addValue(vs(a,{ignoreValueFormatter:o,csvOptions:n}))})),i.getRowString()})({id:r,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:n})}\r\n`),"").trim();if(!n.includeHeaders)return a;const s=t.filter((e=>e.field!==Zt.field)),l=[];if(n.includeColumnGroupsHeaders){const e=i.current.unstable_getAllGroupDetails();let t=0;const r=s.reduce(((e,r)=>{const n=i.current.unstable_getColumnGroupPath(r.field);return e[r.field]=n,t=Math.max(t,n.length),e}),{});for(let o=0;o{const i=(r[n.field]||[])[o],a=e[i];t.addValue(a?a.headerName||a.groupId:"")}))}}const c=new bs({csvOptions:n,sanitizeCellValue:ys});return s.forEach((e=>{c.addValue(e.headerName||e.field)})),l.push(c),`${l.map((e=>e.getRowString())).join("\r\n")}\r\n${a}`.trim()}({columns:_s({apiRef:e,options:t}),rowIds:(null!=(n=t.getRowsToExport)?n:xs)({apiRef:e}),csvOptions:{delimiter:t.delimiter||",",shouldAppendQuotes:null==(o=t.shouldAppendQuotes)||o,includeHeaders:null==(a=t.includeHeaders)||a,includeColumnGroupsHeaders:null==(s=t.includeColumnGroupsHeaders)||s,escapeFormulas:null==(l=t.escapeFormulas)||l},ignoreValueFormatter:i,apiRef:e})}),[r,e,i]),s=o.useCallback((e=>{r.debug("Export data as CSV");const t=a(e);!function(e,t="csv",r=document.title||"untitled"){const n=`${r}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),r=document.createElement("a");return r.href=t,r.download=n,r.click(),void setTimeout((()=>{URL.revokeObjectURL(t)}))}throw new Error("MUI: exportAs not supported")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)}),[r,a]);xe(e,{getDataAsCsv:a,exportDataAsCsv:s},"public");const l=o.useCallback(((e,t)=>{var r;return null!=(r=t.csvOptions)&&r.disableToolbarButton?e:[...e,{component:(0,x.jsx)(Ss,{options:t.csvOptions}),componentName:"csvExport"}]}),[]);Ve(e,"exportMenu",l)},Ts=(e,t,r,n,i)=>{const a=Qt(e,"useNativeEventListener"),[s,l]=o.useState(!1),c=o.useRef(n),u=o.useCallback((e=>c.current&&c.current(e)),[]);o.useEffect((()=>{c.current=n}),[n]),o.useEffect((()=>{let n;if(n=(0,_e.Tn)(t)?t():t&&t.current?t.current:null,n&&r&&!s){a.debug(`Binding native ${r} event`),n.addEventListener(r,u,i);const t=n;l(!0);const o=()=>{a.debug(`Clearing native ${r} event`),t.removeEventListener(r,u,i)};e.current.subscribeEvent("unmount",o)}}),[t,u,r,s,a,i,e])};function Is(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const r=document.createRange();r.selectNode(t);const n=window.getSelection();n.removeAllRanges(),n.addRange(r);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}var ks=r("4bZc");const Ms=(0,H.Mz)((e=>e.columnReorder),(e=>e.dragCol)),Rs="left",Ps="right",Os=e=>(0,n.A)({},e,{columnReorder:{dragCol:""}});var Ls=r("sy2/");function Ds(e,t){var r;return Array.from(null!=(r=e.querySelectorAll(`[data-fields*="|-${t}-|"]`))?r:[])}function Ns(e,t){var r,n;if(!hr(e,z.x.root))throw new Error("MUI: The root element is not found.");const o=e.getAttribute("aria-colindex");if(!o)return[];const i=Number(o)-1,a=[];return null!=(r=t.virtualScrollerRef)&&r.current?((null==(n=t.virtualScrollerRef)?void 0:n.current.querySelectorAll(`:scope > div > div > .${z.x.row}`)).forEach((e=>{const r=e.getAttribute("data-id");if(!r)return;let n=i;const o=t.unstable_getCellColSpanInfo(r,i);o&&o.spannedByColSpan&&(n=o.leftVisibleCellIndex);const s=e.querySelector(`[data-colindex="${n}"]`);s&&a.push(s)})),a):[]}const Fs={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1};let zs=!1;function Bs(){return void 0===zs&&(zs="undefined"==typeof CSS||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),zs}function js(e,t){if(void 0!==t&&e.changedTouches){for(let r=0;r(0,n.A)({},e,{columnResize:{resizingColumnField:""}}),Ws=(0,n.A)({},Tt,{type:"treeDataGroup",sortable:!1,filterable:!1,disableColumnMenu:!0,disableReorder:!0,align:"left",width:200,valueGetter:e=>"group"===e.rowNode.type||"leaf"===e.rowNode.type?e.rowNode.groupingKey:void 0}),qs={field:"__tree_data_group__",editable:!1,groupable:!1},Xs="tree-data";var Zs=r("U831");const Ys=$.A,Ks=He.h;function Js(e){var t,r;const{id:o,field:i,formattedValue:a,rowNode:s,hideDescendantCount:l,offsetMultiplier:c=2}=e,u=Ys(),d=Ks(),f=(e=>{const{classes:t}=e;return(0,O.A)({root:["treeDataGroupingCell"],toggle:["treeDataGroupingCellToggle"]},z.B,t)})({classes:u.classes}),p=null!=(t=(0,S.N)(d,ie.ZP)[s.id])?t:0,h=s.childrenExpanded?u.slots.treeDataCollapseIcon:u.slots.treeDataExpandIcon;return(0,x.jsxs)(Zs.A,{className:f.root,sx:{ml:s.depth*c},children:[(0,x.jsx)("div",{className:f.toggle,children:p>0&&(0,x.jsx)(u.slots.baseIconButton,(0,n.A)({size:"small",onClick:e=>{d.current.setRowChildrenExpansion(o,!s.childrenExpanded),d.current.setCellFocus(o,i),e.stopPropagation()},tabIndex:-1,"aria-label":s.childrenExpanded?d.current.getLocaleText("treeDataCollapse"):d.current.getLocaleText("treeDataExpand")},null==u||null==(r=u.slotProps)?void 0:r.baseIconButton,{children:(0,x.jsx)(h,{fontSize:"inherit"})}))}),(0,x.jsxs)("span",{children:[void 0===a?s.groupingKey:a,!l&&p>0?` (${p})`:""]})]})}const Qs=e=>`auto-generated-row-${e.map((e=>`${e.field}/${e.key}`)).join("-")}`,el=({id:e,tree:t})=>{const r=[];let n=t[e];for(;n.id!==It;)r.push({field:"leaf"===n.type?null:n.groupingField,key:n.groupingKey}),n=t[n.parent];return r.reverse(),r},tl=(e,t,r)=>{let n;return n=e.id===It||(r?r(e):-1===t||t>e.depth),e.childrenExpanded=n,e},rl=(e,t,r,n)=>{var o;t[e.id]=e,r[e.depth]=(null!=(o=r[e.depth])?o:0)+1;const i=t[e.parent];if("group"===e.type||"leaf"===e.type){var a,s,l;const r=null!=(a=e.groupingField)?a:"__no_field__",o=null!=(s=e.groupingKey)?s:"__no_key__",c=null==(l=i.childrenFromPath)?void 0:l[r];null!==n&&n[i.id]===t[i.id]?i.children=[...i.children,e.id]:i.children.push(e.id),null==c?i.childrenFromPath[r]={[o.toString()]:e.id}:c[o.toString()]=e.id}else"footer"===e.type&&(i.footerId=e.id)},nl=({node:e,tree:t,treeDepths:r})=>{delete t[e.id];const o=e.depth,i=r[o];1===i?delete r[o]:r[o]=i-1;const a=t[e.parent];if("footer"===e.type)t[a.id]=(0,n.A)({},a,{footerId:null});else{var s,l;const r=null!=(s=e.groupingField)?s:"__no_field__",o=null!=(l=e.groupingKey)?l:"__no_key__",i=a.children.filter((t=>t!==e.id)),c=a.childrenFromPath;delete c[r][o.toString()],t[a.id]=(0,n.A)({},a,{children:i,childrenFromPath:c})}},ol=({node:e,updatedNode:t,previousTree:r,tree:o,treeDepths:i})=>{e.children.forEach((e=>{o[e]=(0,n.A)({},o[e],{parent:t.id})})),nl({node:e,tree:o,treeDepths:i});const a=(0,n.A)({},e,t);rl(a,o,i,r)},il=()=>({value:{},addAction(e,t){this.value[e]||(this.value[e]={}),this.value[e][t]=!0}}),al=({tree:e,filteredRowsLookup:t})=>{if(!t)return{};const r={},n=(o,i)=>{const a=t[o.id];"group"===o.type&&o.children.forEach((t=>{const r=e[t];n(r,i&&!!o.childrenExpanded)})),r[o.id]=a&&i,"group"===o.type&&null!=o.footerId&&(r[o.footerId]=a&&i&&!!o.childrenExpanded)},o=Object.values(e);for(let e=0;e{let c=It;for(let d=0;d{e.push(t.data)})),e}forEach(e){let t=this.first;for(;null!==t;)e(t),t=t.next}static from(e){if(0===e.length)return new cl(null,null);let t=0;const r=new ll(e[t],null);let n=r;for(;t+1{nl({node:e,tree:t,treeDepths:r}),"group"===e.type&&null!=e.footerId&&nl({node:t[e.footerId],tree:t,treeDepths:r});const o=t[e.parent];null==n||n.addAction(o.id,"removeChildren"),o.id!==It&&0===o.children.length&&(o.isAutoGenerated?ul({node:o,tree:t,treeDepths:r}):t[o.id]={type:"leaf",id:o.id,depth:o.depth,parent:o.parent,groupingKey:o.groupingKey})},dl=({id:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{const o=t[e];"group"===o.type&&o.children.length>0?(({node:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{null==n||n.addAction(e.parent,"removeChildren"),null==n||n.addAction(e.parent,"insertChildren"),ol({previousTree:null,tree:t,treeDepths:r,node:e,updatedNode:{id:Qs(el({id:e.id,tree:t})),isAutoGenerated:!0}})})({node:o,tree:t,treeDepths:r,updatedGroupsManager:n}):ul({node:o,tree:t,treeDepths:r,updatedGroupsManager:n})},fl=["hideDescendantCount"];var pl=function(e){return e.left="left",e.right="right",e}(pl||{});const hl=e=>e.pinnedColumns,ml=(0,re.A)("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e,overridesResolver:(e,t)=>t.overlayWrapper})((({overlayType:e})=>({position:"sticky",top:0,left:0,width:0,height:0,zIndex:"loadingOverlay"===e?5:4}))),gl=(0,re.A)("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e,overridesResolver:(e,t)=>t.overlayWrapperInner})({});function yl(e){var t,r;const i=(0,He.h)(),a=(0,$.A)(),[s,l]=o.useState((()=>{var e,t;return null!=(e=null==(t=i.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null})),c=o.useCallback((()=>{var e,t;l(null!=(e=null==(t=i.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null)}),[i]);(0,D.A)((()=>i.current.subscribeEvent("viewportInnerSizeChange",c)),[i,c]);let u=null!=(t=null==s?void 0:s.height)?t:0;a.autoHeight&&0===u&&(u=zt(i,a.rowHeight));const d=(e=>{const{classes:t}=e;return(0,O.A)({root:["overlayWrapper"],inner:["overlayWrapperInner"]},z.B,t)})((0,n.A)({},e,{classes:a.classes}));return s?(0,x.jsx)(ml,{className:(0,R.A)(d.root),overlayType:e.overlayType,children:(0,x.jsx)(gl,(0,n.A)({className:(0,R.A)(d.inner),style:{height:u,width:null!=(r=null==s?void 0:s.width)?r:0}},e))}):null}function vl(){const e=(0,He.h)(),t=(0,$.A)(),r=(0,S.N)(e,K.H0),o=(0,S.N)(e,ie.O7),i=(0,S.N)(e,K.Dl),a=!i&&r>0&&0===o;let s=null,l="";var c,u,d;return i||0!==r||(s=(0,x.jsx)(t.slots.noRowsOverlay,(0,n.A)({},null==(c=t.slotProps)?void 0:c.noRowsOverlay)),l="noRowsOverlay"),a&&(s=(0,x.jsx)(t.slots.noResultsOverlay,(0,n.A)({},null==(u=t.slotProps)?void 0:u.noResultsOverlay)),l="noResultsOverlay"),i&&(s=(0,x.jsx)(t.slots.loadingOverlay,(0,n.A)({},null==(d=t.slotProps)?void 0:d.loadingOverlay)),l="loadingOverlay"),null===s?null:(0,x.jsx)(yl,{overlayType:l,children:s})}const bl=(0,re.A)("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",height:"100%",position:"relative","@media print":{overflow:"hidden"},zIndex:0}),_l=o.forwardRef((function(e,t){const r=(0,$.A)(),o=(e=>{const{classes:t}=e;return(0,O.A)({root:["virtualScroller"]},z.B,t)})(r);return(0,x.jsx)(bl,(0,n.A)({ref:t},e,{className:(0,R.A)(o.root,e.className),ownerState:r}))})),xl=(0,re.A)("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),wl=o.forwardRef((function(e,t){var r;const o=(0,$.A)(),i=((e,t)=>{const{classes:r}=e,n={root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]};return(0,O.A)(n,z.B,r)})(o,!o.autoHeight&&"auto"===(null==(r=e.style)?void 0:r.minHeight));return(0,x.jsx)(xl,(0,n.A)({ref:t},e,{ownerState:o,className:(0,R.A)(i.root,e.className)}))})),Al=["className"],Sl=(0,re.A)("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),Cl=o.forwardRef((function(e,t){const{className:r}=e,o=(0,M.A)(e,Al),i=(0,$.A)(),a=(e=>{const{classes:t}=e;return(0,O.A)({root:["virtualScrollerRenderZone"]},z.B,t)})(i);return(0,x.jsx)(Sl,(0,n.A)({ref:t,className:(0,R.A)(a.root,r),ownerState:i},o))})),El=T,Tl=e=>e.detailPanel.expandedRowIds,Il=e=>e.detailPanel.contentCache,kl=e=>e.detailPanel.heightCache,Ml=(0,H.S)(kl,(e=>Object.entries(e).reduce(((e,[t,{height:r}])=>(e[t]=r||0,e)),{}))),Rl=["rowId","height","style"],Pl=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"DetailPanel",overridesResolver:(e,t)=>t.detailPanel})((({theme:e})=>({zIndex:2,width:"100%",position:"absolute",backgroundColor:(e.vars||e).palette.background.default,overflow:"auto"})));function Ol(e){const{rowId:t,height:r,style:i={}}=e,a=(0,M.A)(e,Rl),s=El(),l=o.useRef(null),c=Ys();o.useLayoutEffect((()=>{"auto"===r&&"undefined"==typeof ResizeObserver&&s.current.storeDetailPanelHeight(t,l.current.clientHeight)}),[s,r,t]),o.useLayoutEffect((()=>{if("auto"!==r||"undefined"==typeof ResizeObserver)return;const e=new ResizeObserver((e=>{const[r]=e,n=r.borderBoxSize&&r.borderBoxSize.length>0?r.borderBoxSize[0].blockSize:r.contentRect.height;s.current.storeDetailPanelHeight(t,n)}));return e.observe(l.current),()=>e.disconnect()}),[s,r,t]);const u=(0,n.A)({},i,{height:r});return(0,x.jsx)(Pl,(0,n.A)({ref:l,ownerState:c,style:u},a))}const Ll=["className","disableVirtualization"],Dl=(e,t,r)=>{var n,o;if(!Array.isArray(e.left)&&!Array.isArray(e.right))return[[],[]];if(0===(null==(n=e.left)?void 0:n.length)&&0===(null==(o=e.right)?void 0:o.length))return[[],[]];const i=(e,t)=>Array.isArray(e)?e.filter((e=>t.includes(e))):[],a=i(e.left,t),s=t.filter((e=>!a.includes(e))),l=i(e.right,s);return r?[l,a]:[a,l]},Nl=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,t/100},Fl=e=>e.vars?"rgba(0 0 0 / 0.21)":(0,N.X4)(e.palette.common.black,.21),zl=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"DetailPanels",overridesResolver:(e,t)=>t.detailPanels})({position:"relative"}),Bl=`linear-gradient(${(0,N.X4)("#fff",Nl(2))}, ${(0,N.X4)("#fff",Nl(2))})`,jl=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"PinnedColumns",overridesResolver:(e,t)=>[{[`&.${z.x["pinnedColumns--left"]}`]:t["pinnedColumns--left"]},{[`&.${z.x["pinnedColumns--right"]}`]:t["pinnedColumns--right"]},t.pinnedColumns]})((({theme:e,ownerState:t})=>{var r;const o=Fl(e);return(0,n.A)({position:"sticky",overflow:"hidden",zIndex:1,backgroundColor:(e.vars||e).palette.background.default},e.vars?{backgroundImage:null==(r=e.vars.overlays)?void 0:r[2]}:(0,n.A)({},"dark"===e.palette.mode&&{backgroundImage:Bl}),t.side===pl.left&&{left:0,float:"left",boxShadow:`2px 0px 4px -2px ${o}`},t.side===pl.right&&{right:0,float:"right",boxShadow:`-2px 0px 4px -2px ${o}`},t.side===pl.right&&t.showCellVerticalBorder&&{borderLeftWidth:"1px",borderLeftStyle:"solid"})}));var Ul=function(e){return e.top="top",e.bottom="bottom",e}(Ul||{});const $l=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"PinnedRows",overridesResolver:(e,t)=>[{[`&.${z.x["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`&.${z.x["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},t.pinnedRows]})((({theme:e,ownerState:t})=>{var r;const o=Fl(e);return(0,n.A)({position:"sticky",zIndex:4,backgroundColor:(e.vars||e).palette.background.default},e.vars?{backgroundImage:null==(r=e.vars.overlays)?void 0:r[2]}:(0,n.A)({},"dark"===e.palette.mode&&{backgroundImage:Bl}),"top"===t.position&&{top:0,boxShadow:`0px 3px 4px -2px ${o}`},t.position===Ul.bottom&&{boxShadow:`0px -3px 4px -2px ${o}`,bottom:0})})),Vl=(0,F.Ay)("div")({position:"absolute"}),Gl=o.forwardRef((function(e,t){const r=(0,M.A)(e,Ll),i=El(),a=Ys(),s=(0,S.N)(i,G.TI),l=(0,S.N)(i,Tl),c=(0,S.N)(i,Il),u=(0,S.N)(i,Ml),d=o.useRef(null),f=o.useRef(null),p=o.useRef(null),h=o.useRef(null),m=(0,rr.A)(),g=o.useCallback((({top:e,left:t})=>{d.current&&(d.current.style.transform=`translate3d(0px, ${e}px, 0px)`),f.current&&(f.current.style.transform=`translate3d(0px, ${e}px, 0px)`),p.current&&(p.current.style.transform=`translate3d(${t}px, 0px, 0px)`),h.current&&(h.current.style.transform=`translate3d(${t}px, 0px, 0px)`)}),[]),y=o.useMemo((()=>{const e=new Set;return l.forEach((t=>{e.add(t)})),e}),[l]),v=o.useCallback((e=>y.has(e)?{style:{marginBottom:u[e]}}:null),[u,y]),b=(0,S.N)(i,hl),[_,w]=Dl(b,s,"rtl"===m.direction),A=(0,S.N)(i,K.$2),C=o.useMemo((()=>(null==A?void 0:A.top)||[]),[null==A?void 0:A.top]),E=o.useMemo((()=>(null==A?void 0:A.bottom)||[]),[null==A?void 0:A.bottom]),I=(0,n.A)({},a,{classes:a.classes}),k=(e=>{const{classes:t}=e;return(0,O.A)({leftPinnedColumns:["pinnedColumns","pinnedColumns--left"],rightPinnedColumns:["pinnedColumns","pinnedColumns--right","withBorderColor"],topPinnedRows:["pinnedRows","pinnedRows--top"],bottomPinnedRows:["pinnedRows","pinnedRows--bottom"],pinnedRowsRenderZone:["pinnedRowsRenderZone"],detailPanels:["detailPanels"],detailPanel:["detailPanel"]},z.B,t)})(I),{renderContext:R,getRows:P,getRootProps:N,getContentProps:F,getRenderZoneProps:B,updateRenderZonePosition:j}=(e=>{const t=T(),r=(0,$.A)(),i=(0,S.N)(t,G.iv),a=(0,S.N)(t,Ii),s=(0,S.N)(t,ki),{ref:l,onRenderZonePositioning:c,renderZoneMinColumnIndex:u=0,renderZoneMaxColumnIndex:d=i.length,getRowProps:f}=e,p=(0,rr.A)(),h=(0,S.N)(t,G.Sw),m=(0,S.N)(t,G.fc),g=(0,S.N)(t,le),y=(0,S.N)(t,pe),v=(0,S.N)(t,Ei),b=(0,S.N)(t,Ke),_=fr(t,r),w=o.useRef(null),A=o.useRef(null),C=(0,L.A)(l,A),[E,I]=o.useState(null),k=o.useRef(E),R=o.useRef({top:0,left:0}),[P,O]=o.useState({width:null,height:null}),N=o.useRef(m),[F,z]=o.useState(null),B=o.useRef(Object.create(null)),j=o.useRef(),U=o.useRef(),V=o.useRef((0,bn.UI)(((e,t,r,n,o,i)=>{let a;return i>-1&&(t>i&&i>=n||rnull!==g?i.findIndex((e=>e.field===g.field)):-1),[g,i]),W=o.useCallback((()=>{if(!a)return{firstRowIndex:0,lastRowIndex:_.rows.length,firstColumnIndex:0,lastColumnIndex:i.length};const{top:e,left:n}=R.current,o=Math.min(Ni(t,_,v,e),v.positions.length-1),l=r.autoHeight?o+_.rows.length:Ni(t,_,v,e+P.height);let c=0,u=h.length;if(s){let e=!1;const[i,a]=Oi({firstIndex:o,lastIndex:l,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:r.rowBuffer});for(let r=i;r{a?(A.current.scrollLeft=0,A.current.scrollTop=0):w.current.style.transform="translate3d(0px, 0px, 0px)"}),[a]),(0,D.A)((()=>{O({width:A.current.clientWidth,height:A.current.clientHeight})}),[v.currentPageTotalHeight]);const q=o.useCallback((()=>{A.current&&O({width:A.current.clientWidth,height:A.current.clientHeight})}),[]);Pe(t,"debouncedResize",q);const X=o.useCallback((e=>{const[n,o]=Oi({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:r.rowBuffer}),[i]=Oi({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:u,maxLastIndex:d,buffer:r.columnBuffer}),a=Xr({firstColumnToRender:i,apiRef:t,firstRowToRender:n,lastRowToRender:o,visibleRows:_.rows}),s="ltr"===p.direction?1:-1,l=Ei(t.current.state).positions[n],f=s*(0,G.Sw)(t)[a];w.current.style.transform=`translate3d(${f}px, ${l}px, 0px)`,"function"==typeof c&&c({top:l,left:f})}),[t,_.rows,c,u,d,r.columnBuffer,r.rowBuffer,p.direction]),Z=o.useCallback((()=>k.current),[]),Y=o.useCallback((e=>{if(k.current&&Li(e,k.current))return void X(e);I(e),X(e);const[n,o]=Oi({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:r.rowBuffer});t.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:n,lastRowToRender:o}),k.current=e}),[t,I,k,_.rows.length,r.rowBuffer,X]);(0,D.A)((()=>{if(null==P.width)return;const e=W();Y(e);const{top:r,left:n}=R.current,o={top:r,left:n,renderContext:e};t.current.publishEvent("scrollPositionChange",o)}),[t,W,P.width,Y]);const K=(0,rn.A)((e=>{const{scrollTop:n,scrollLeft:o}=e.currentTarget;if(R.current.top=n,R.current.left=o,!k.current||n<0)return;if("ltr"===p.direction&&o<0)return;if("rtl"===p.direction&&o>0)return;const i=a?W():k.current,s=Math.abs(i.firstRowIndex-k.current.firstRowIndex),l=Math.abs(i.lastRowIndex-k.current.lastRowIndex),c=Math.abs(i.firstColumnIndex-k.current.firstColumnIndex),u=Math.abs(i.lastColumnIndex-k.current.lastColumnIndex),d=s>=r.rowThreshold||l>=r.rowThreshold||c>=r.columnThreshold||u>=r.columnThreshold||N.current!==m;t.current.publishEvent("scrollPositionChange",{top:n,left:o,renderContext:d?i:k.current},e),d&&(ui.flushSync((()=>{Y(i)})),N.current=m)})),J=(0,rn.A)((e=>{t.current.publishEvent("virtualScrollerWheel",{},e)})),Q=(0,rn.A)((e=>{t.current.publishEvent("virtualScrollerTouchMove",{},e)})),ee=o.useMemo((()=>null!==g?_.rows.findIndex((e=>e.id===g.id)):-1),[g,_.rows]);Pe(t,"rowMouseOver",((e,t)=>{var r;t.currentTarget.contains(t.relatedTarget)||z(null!=(r=e.id)?r:null)})),Pe(t,"rowMouseOut",((e,t)=>{t.currentTarget.contains(t.relatedTarget)||z(null)}));const te=P.width&&m>=P.width,re=o.useMemo((()=>{const e=Math.max(v.currentPageTotalHeight,1);let n=!1;null!=A&&A.current&&e<=(null==A?void 0:A.current.clientHeight)&&(n=!0);const o={width:te?m:"auto",height:e,minHeight:n?"100%":"auto"};return r.autoHeight&&0===_.rows.length&&(o.height=zt(t,r.rowHeight)),o}),[t,A,m,v.currentPageTotalHeight,te,r.autoHeight,r.rowHeight,_.rows.length]);o.useEffect((()=>{t.current.publishEvent("virtualScrollerContentSizeChange")}),[t,re]);const ne=o.useMemo((()=>{const e={};return te||(e.overflowX="hidden"),r.autoHeight&&(e.overflowY="hidden"),e}),[te,r.autoHeight]);return t.current.register("private",{getRenderContext:Z}),{renderContext:E,updateRenderZonePosition:X,getRows:(e={renderContext:E})=>{var o;const{onRowRender:s,renderContext:l,minFirstColumn:c=u,maxLastColumn:p=d,availableSpace:h=P.width,rowIndexOffset:m=0,position:v="center"}=e;if(!l||null==h)return null;const w=a?r.rowBuffer:0,A=a?r.columnBuffer:0,[S,C]=Oi({firstIndex:l.firstRowIndex,lastIndex:l.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:w}),T=[];if(e.rows)e.rows.forEach((e=>{T.push(e),t.current.calculateColSpan({rowId:e.id,minFirstColumn:c,maxLastColumn:p,columns:i})}));else{if(!_.range)return null;for(let e=S;e-1){const e=_.rows[ee];(S>ee||CS?T.push(e):T.unshift(e),t.current.calculateColSpan({rowId:e.id,minFirstColumn:c,maxLastColumn:p,columns:i}))}const[k,R]=Oi({firstIndex:l.firstColumnIndex,lastIndex:l.lastColumnIndex,minFirstIndex:c,maxLastIndex:p,buffer:A}),O=Xr({firstColumnToRender:k,apiRef:t,firstRowToRender:S,lastRowToRender:C,visibleRows:_.rows});let L=!1;(O>H||R(0,n.A)({ref:C,onScroll:K,onWheel:J,onTouchMove:Q},e,{style:e.style?(0,n.A)({},e.style,ne):ne,role:"presentation"}),getContentProps:({style:e}={})=>({style:e?(0,n.A)({},e,re):re,role:"presentation"}),getRenderZoneProps:()=>({ref:w,role:"rowgroup"})}})((0,n.A)({ref:t,renderZoneMinColumnIndex:_.length,renderZoneMaxColumnIndex:s.length-w.length,onRenderZonePositioning:g,getRowProps:v},e)),U=o.useCallback((()=>{R&&j(R)}),[R,j]);Pe(i,"columnWidthChange",U),Pe(i,"columnOrderChange",U),Pe(i,"rowOrderChange",U);const V=R&&_.length>0?(0,n.A)({},R,{firstColumnIndex:0,lastColumnIndex:_.length}):null,H=R&&w.length>0?(0,n.A)({},R,{firstColumnIndex:s.length-w.length,lastColumnIndex:s.length}):null,W=[],q=P({renderContext:R,rows:C,position:"center"}),X=Ft(i),Z=P({renderContext:R,rowIndexOffset:C.length,position:"center",onRowRender:e=>{if(null==a.getDetailPanelContent)return;if(!y.has(e))return;const t=(e=>{const t=Ei(i.current.state),r=c[e],n=i.current.getRowIndexRelativeToVisibleRows(e),a=void 0!==n;if(o.isValidElement(r)&&a){const o=i.current.detailPanelHasAutoHeight(e)?"auto":u[e],a=i.current.unstable_getRowInternalSizes(e),s=(null==a?void 0:a.spacingTop)||0,l=t.positions[n]+i.current.unstable_getRowHeight(e)+s;return(0,x.jsx)(Ol,{rowId:e,style:{top:l},height:o,className:k.detailPanel,children:r},e)}return null})(e);t&&W.push(t)}}),Y=P({renderContext:R,rows:E,rowIndexOffset:C.length+(Z?Z.length:0),position:"center"}),J=F(),Q={minHeight:J.style.minHeight};return J.style.minHeight&&"100%"===J.style.minHeight&&(J.style.minHeight=`calc(100% - ${X.top}px - ${X.bottom}px)`),(0,x.jsxs)(_l,(0,n.A)({},N(r),{children:[(0,x.jsx)(vl,{}),C.length>0?(0,x.jsxs)($l,{className:k.topPinnedRows,ownerState:(0,n.A)({},I,{position:Ul.top}),style:{width:J.style.width,height:X.top},role:"rowgroup",children:[V&&(0,x.jsx)(jl,{className:k.leftPinnedColumns,ownerState:(0,n.A)({},I,{side:pl.left,showCellVerticalBorder:a.showCellVerticalBorder}),children:P({renderContext:V,minFirstColumn:V.firstColumnIndex,maxLastColumn:V.lastColumnIndex,availableSpace:0,rows:C,position:"left"})}),(0,x.jsx)(Vl,{className:k.pinnedRowsRenderZone,ref:p,role:"presentation",children:q}),H&&(0,x.jsx)(jl,{className:k.rightPinnedColumns,ownerState:(0,n.A)({},I,{side:pl.right,showCellVerticalBorder:a.showCellVerticalBorder}),children:P({renderContext:H,minFirstColumn:H.firstColumnIndex,maxLastColumn:H.lastColumnIndex,availableSpace:0,rows:C,position:"right"})})]}):null,(0,x.jsxs)(wl,(0,n.A)({},J,{children:[V&&(0,x.jsx)(jl,{ref:d,className:k.leftPinnedColumns,ownerState:(0,n.A)({},I,{side:pl.left,showCellVerticalBorder:a.showCellVerticalBorder}),style:Q,children:P({renderContext:V,minFirstColumn:V.firstColumnIndex,maxLastColumn:V.lastColumnIndex,availableSpace:0,rowIndexOffset:C.length,position:"left"})}),(0,x.jsx)(Cl,(0,n.A)({},B(),{children:Z})),H&&(0,x.jsx)(jl,{ref:f,ownerState:(0,n.A)({},I,{side:pl.right,showCellVerticalBorder:a.showCellVerticalBorder}),className:k.rightPinnedColumns,style:Q,children:P({renderContext:H,minFirstColumn:H.firstColumnIndex,maxLastColumn:H.lastColumnIndex,availableSpace:0,rowIndexOffset:C.length,position:"right"})}),W.length>0&&(0,x.jsx)(zl,{className:k.detailPanels,ownerState:I,children:W})]})),E.length>0?(0,x.jsxs)($l,{className:k.bottomPinnedRows,ownerState:(0,n.A)({},I,{position:Ul.bottom}),style:{width:J.style.width,height:X.bottom},role:"rowgroup",children:[V&&(0,x.jsx)(jl,{className:k.leftPinnedColumns,ownerState:(0,n.A)({},I,{side:pl.left,showCellVerticalBorder:a.showCellVerticalBorder}),children:P({renderContext:V,minFirstColumn:V.firstColumnIndex,maxLastColumn:V.lastColumnIndex,availableSpace:0,rows:E,rowIndexOffset:C.length+(Z?Z.length:0),position:"left"})}),(0,x.jsx)(Vl,{className:k.pinnedRowsRenderZone,ref:h,role:"presentation",children:Y}),H&&(0,x.jsx)(jl,{className:k.rightPinnedColumns,ownerState:(0,n.A)({},I,{side:pl.right,showCellVerticalBorder:a.showCellVerticalBorder}),children:P({renderContext:H,minFirstColumn:H.firstColumnIndex,maxLastColumn:H.lastColumnIndex,availableSpace:0,rows:E,rowIndexOffset:C.length+(Z?Z.length:0),position:"right"})})]}):null]}))})),Hl=(e,t,r)=>{var o;let i;if(r.current.caches.columnPinning={orderedFieldsBeforePinningColumns:null},t.disableColumnPinning)i={};else if(t.pinnedColumns)i=t.pinnedColumns;else if(null!=(o=t.initialState)&&o.pinnedColumns){var a;i=null==(a=t.initialState)?void 0:a.pinnedColumns}else i={};return(0,n.A)({},e,{pinnedColumns:i})},Wl=e=>t=>(0,n.A)({},t,{pinnedColumns:e});function ql(e){var t;const{id:r,value:i}=e,a=Ys(),s=Ks(),l=(e=>{const{classes:t,isExpanded:r}=e,n={root:["detailPanelToggleCell",r&&"detailPanelToggleCell--expanded"]};return(0,O.A)(n,z.B,t)})({classes:a.classes,isExpanded:i}),c=(0,S.N)(s,Il),u=o.isValidElement(c[r]),d=i?a.slots.detailPanelCollapseIcon:a.slots.detailPanelExpandIcon;return(0,x.jsx)(a.slots.baseIconButton,(0,n.A)({size:"small",tabIndex:-1,disabled:!u,className:l.root,"aria-label":i?s.current.getLocaleText("collapseDetailPanel"):s.current.getLocaleText("expandDetailPanel")},null==(t=a.slotProps)?void 0:t.baseIconButton,{children:(0,x.jsx)(d,{fontSize:"inherit"})}))}const Xl="__detail_panel_toggle__",Zl=(0,n.A)({},Tt,{field:Xl,type:"detailPanelToggle",editable:!1,sortable:!1,filterable:!1,resizable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,align:"left",width:40,valueGetter:e=>Tl(e.api.state).includes(e.id),renderCell:e=>(0,x.jsx)(ql,(0,n.A)({},e)),renderHeader:()=>null}),Yl=(e,t)=>{var r,o,i;return(0,n.A)({},e,{detailPanel:{heightCache:{},expandedRowIds:null!=(r=null!=(o=t.detailPanelExpandedRowIds)?o:null==(i=t.initialState)||null==(i=i.detailPanel)?void 0:i.expandedRowIds)?r:[]}})};function Kl(e,t,r,n){if("function"!=typeof t)return{};const o=(0,K.A6)(e),i=o.reduce(((r,n)=>{const o=e.current.getRowParams(n);return r[n]=t(o),r}),{}),a=o.reduce(((t,o)=>{var a;if(null==i[o])return t;const s=e.current.getRowParams(o),l=r(s),c="auto"===l;return t[o]={autoHeight:c,height:c?null==(a=n[o])?void 0:a.height:l},t}),{});return{contentCache:i,heightCache:a}}function Jl(e){const t=(0,He.h)(),r=Ys(),i=(0,S.N)(t,ae.XU),a=(0,S.N)(t,K.V2),s=(0,S.N)(t,nn),l=e.row.__reorder__||e.id,c=o.useMemo((()=>!!r.rowReordering&&!i.length&&1===a&&0===Object.keys(s).length),[r.rowReordering,i,a,s]),u=(e=>{const{isDraggable:t,classes:r}=e,n={root:["rowReorderCell",t&&"rowReorderCell--draggable"],placeholder:["rowReorderCellPlaceholder"]};return(0,O.A)(n,z.B,r)})({isDraggable:c,classes:r.classes}),d=o.useCallback(((r,n)=>o=>{yr(o)||t.current.getRow(e.id)&&(t.current.publishEvent(r,t.current.getRowParams(e.id),o),n&&n(o))}),[t,e.id]),f=c?{onDragStart:d("rowDragStart"),onDragOver:d("rowDragOver"),onDragEnd:d("rowDragEnd")}:null;return"footer"===e.rowNode.type?null:(0,x.jsxs)("div",(0,n.A)({className:u.root,draggable:c},f,{children:[(0,x.jsx)(r.slots.rowReorderIcon,{}),(0,x.jsx)("div",{className:u.placeholder,children:l})]}))}const Ql=(0,n.A)({},Tt,{field:"__reorder__",type:"reorder",sortable:!1,filterable:!1,width:50,align:"center",headerAlign:"center",disableColumnMenu:!0,disableExport:!0,disableReorder:!0,resizable:!1,aggregable:!1,renderHeader:()=>" ",renderCell:e=>"footer"===e.rowNode.type||"pinnedRow"===e.rowNode.type?null:(0,x.jsx)(Jl,(0,n.A)({},e))});var ec=function(e){return e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e}(ec||{});let tc=null,rc={previousTargetId:null,dragDirection:null};function nc({lazyLoadingFeatureFlag:e,rowsLoadingMode:t,gridDimensions:r}){return!e||!r||"server"!==t}function oc(e,t){var r,n;const o={topIds:[],bottomIds:[],idLookup:{}};return null==e||null==(r=e.top)||r.forEach((e=>{const r=Rt(e,t);o.topIds.push(r),o.idLookup[r]=e})),null==e||null==(n=e.bottom)||n.forEach((e=>{const r=Rt(e,t);o.bottomIds.push(r),o.idLookup[r]=e})),o}const ic=(e,t,r)=>{var o;return r.current.caches.pinnedRows=oc(t.pinnedRows,t.getRowId),(0,n.A)({},e,{rows:(0,n.A)({},e.rows,{additionalRowGroups:(0,n.A)({},null==(o=e.rows)?void 0:o.additionalRowGroups,{pinnedRows:{top:[],bottom:[]}})})})};function ac({groupingParams:e,rowModel:t,rowId:r,position:o,apiRef:i,isAutoGenerated:a}){var s,l;const c=(0,n.A)({},e.dataRowIdToModelLookup),u=(0,n.A)({},e.dataRowIdToIdLookup),d=(0,n.A)({},e.tree),f=(0,n.A)({},e.treeDepths);rl({type:"pinnedRow",id:r,depth:0,parent:It,isAutoGenerated:a},d,f,null),a||(c[r]=t,u[r]=r),i.current.caches.rows.dataRowIdToModelLookup[r]=(0,n.A)({},t),i.current.caches.rows.dataRowIdToIdLookup[r]=r;const p=(null==(s=e.additionalRowGroups)?void 0:s.pinnedRows)||{},h={id:r,model:t};return null!=(l=e.additionalRowGroups)&&null!=(l=l.pinnedRows)&&null!=(l=l[o])&&l.includes(h)?(0,n.A)({},e,{dataRowIdToModelLookup:c,dataRowIdToIdLookup:u,tree:d,treeDepths:f}):(0,n.A)({},e,{dataRowIdToModelLookup:c,dataRowIdToIdLookup:u,tree:d,treeDepths:f,additionalRowGroups:(0,n.A)({},e.additionalRowGroups,{pinnedRows:(0,n.A)({},p,{[o]:[...p[o]||[],h]})})})}const sc=(e,t)=>{const r=Ue(e,t);return((e,t)=>{const r=(e=>{const{classes:t}=e;return o.useMemo((()=>(0,O.A)({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},z.B,t)),[t])})({classes:t.classes}),i=o.useCallback((o=>{const i=(0,n.A)({},Zt,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),a=t.checkboxSelection,s=null!=o.lookup[Xt];return a&&!s?(o.lookup[Xt]=i,o.orderedFields=[Xt,...o.orderedFields]):!a&&s?(delete o.lookup[Xt],o.orderedFields=o.orderedFields.filter((e=>e!==Xt))):a&&s&&(o.lookup[Xt]=(0,n.A)({},i,o.lookup[Xt])),o}),[e,r,t.checkboxSelection]);Ve(e,"hydrateColumns",i)})(r,t),((e,t)=>{const r=(e=>{const{classes:t}=e;return o.useMemo((()=>(0,O.A)({rowReorderCellContainer:["rowReorderCellContainer"],columnHeaderReorder:["columnHeaderReorder"]},z.B,t)),[t])})({classes:t.classes}),i=o.useCallback((o=>{const i=(0,n.A)({},Ql,{cellClassName:r.rowReorderCellContainer,headerClassName:r.columnHeaderReorder,headerName:e.current.getLocaleText("rowReorderingHeaderName")}),a=t.rowReordering,s=null!=o.lookup[i.field];return a&&s||(a&&!s?(o.lookup[i.field]=i,o.orderedFields=[i.field,...o.orderedFields]):!a&&s&&(delete o.lookup[i.field],o.orderedFields=o.orderedFields.filter((e=>e!==i.field)))),o}),[e,r,t.rowReordering]);Ve(e,"hydrateColumns",i)})(r,t),((e,t)=>{const r=o.useCallback((()=>{e.current.setStrategyAvailability("rowTree",Xs,t.treeData?()=>!0:()=>!1)}),[e,t.treeData]),i=o.useCallback((()=>{var r;const o=t.groupingColDef;let i;i="function"==typeof o?o({groupingName:Xs,fields:[]}):o;const a=null!=(r=i)?r:{},{hideDescendantCount:s}=a,l=(0,M.A)(a,fl),c=(0,n.A)({},Ws,{renderCell:e=>(0,x.jsx)(Js,(0,n.A)({},e,{hideDescendantCount:s})),headerName:e.current.getLocaleText("treeDataGroupingHeaderName")});return(0,n.A)({},c,l,qs)}),[e,t.groupingColDef]),a=o.useCallback((e=>{const r=qs.field,n=t.treeData,o=e.lookup[r];if(n){const t=i();if(o&&(t.width=o.width,t.flex=o.flex),e.lookup[r]=t,null==o){const t=e.orderedFields[0]===Xt?1:0;e.orderedFields=[...e.orderedFields.slice(0,t),r,...e.orderedFields.slice(t)]}}else!n&&o&&(delete e.lookup[r],e.orderedFields=e.orderedFields.filter((e=>e!==r)));return e}),[t.treeData,i]),s=o.useCallback((e=>{if(!t.getTreeDataPath)throw new Error("MUI: No getTreeDataPath given.");const r=r=>({id:r,path:t.getTreeDataPath(e.dataRowIdToModelLookup[r]).map((e=>({key:e,field:null})))});return"full"===e.updates.type?(e=>{const t=[],r={[It]:Mt()},n={};for(let o=0;o{throw new Error(["MUI: The path returned by `getTreeDataPath` should be unique.",`The rows with id #${e} and #${t} have the same.`,`Path: ${JSON.stringify(r.map((e=>e.key)))}.`].join("\n"))}}):(e=>{const t=(0,n.A)({},e.previousTree),r=(0,n.A)({},e.previousTreeDepth),o=il();for(let n=0;n(e=>{const{apiRef:t,rowTree:r,disableChildrenFiltering:n,isRowMatchingFilters:o}=e,i={},a={},s={},l={passingFilterItems:null,passingQuickFilterValues:null},c=(u,d,f)=>{let p;if(n&&u.depth>0)p=null;else if(o&&"footer"!==u.type){const r=t.current.getRow(u.id);o(r,void 0,l),p=(0,wn.Ko)([l.passingFilterItems],[l.passingQuickFilterValues],e.filterModel,e.apiRef,s)}else p=!0;let h,m=0;switch("group"===u.type&&u.children.forEach((e=>{var t;const n=r[e],o=c(n,null!=(t=p)?t:d,f&&!!u.childrenExpanded);m+=o})),p){case!0:h=!0;break;case!1:h=m>0;break;default:h=d}return i[u.id]=h,h?(a[u.id]=m,"footer"===u.type?m:m+1):0},u=Object.values(r);for(let e=0;e(e=>{const{rowTree:t,disableChildrenSorting:r,sortRowList:n,shouldRenderGroupBelowLeaves:o}=e,i=new Map,a=e=>{let s;if(!n||r&&-1!==e.depth)if(o){const r=[],n=[];for(let o=0;ot[e])))}null!=e.footerId&&s.push(e.footerId),i.set(e.id,s)};a(t[It]);const s=cl.from(i.get(It));return s.forEach((e=>{const t=i.get(e.data);null!=t&&t.length&&e.insertAfter(cl.from(t))})),s.data()})({rowTree:(0,K.qj)(e),sortRowList:r.sortRowList,disableChildrenSorting:t.disableChildrenSorting,shouldRenderGroupBelowLeaves:!1})),[e,t.disableChildrenSorting]);Ve(e,"hydrateColumns",a),Yt(e,Xs,"rowTreeCreation",s),Yt(e,Xs,"filtering",l),Yt(e,Xs,"sorting",c),Yt(e,Xs,"visibleRowsLookupCreation",al),$e((()=>{r()}));const u=o.useRef(!0);o.useEffect((()=>{u.current?u.current=!1:r()}),[r])})(r,t),((e,t)=>{var r;const{lazyLoading:i}=null!=(r=t.experimentalFeatures)?r:{},a=o.useCallback((e=>{const r=e.tree[It];if(!i||"server"!==t.rowsLoadingMode||!t.rowCount||r.children.length>=t.rowCount)return e;const o=(0,n.A)({},e.tree),a=[...r.children];for(let e=0;e{const t=o.useCallback((t=>{var r,o,i,a;const s=e.current.caches.pinnedRows||{};let l=(0,n.A)({},t,{additionalRowGroups:(0,n.A)({},t.additionalRowGroups,{pinnedRows:{}})});if(null==(r=s.topIds)||r.forEach((t=>{l=ac({groupingParams:l,rowModel:s.idLookup[t],rowId:t,position:"top",apiRef:e,isAutoGenerated:!1})})),null==(o=s.bottomIds)||o.forEach((t=>{l=ac({groupingParams:l,rowModel:s.idLookup[t],rowId:t,position:"bottom",apiRef:e,isAutoGenerated:!1})})),null!=(i=s.bottomIds)&&i.length||null!=(a=s.topIds)&&a.length){const e=e=>!l.tree[e]||"pinnedRow"!==l.tree[e].type,t=l.tree[It];l.tree[It]=(0,n.A)({},t,{children:t.children.filter(e)}),l.dataRowIds=l.dataRowIds.filter(e)}return l}),[e]);Ve(e,"hydrateRows",t)})(r),((e,t)=>{const r=o.useCallback((r=>null==t.getDetailPanelContent?(r.lookup[Xl]&&(delete r.lookup[Xl],r.orderedFields=r.orderedFields.filter((e=>e!==Xl))),r):(r.lookup[Xl]||(r.orderedFields=[Xl,...r.orderedFields],r.lookup[Xl]=(0,n.A)({},Zl,{headerName:e.current.getLocaleText("detailPanelToggle")})),r)),[e,t.getDetailPanelContent]),i=o.useCallback(((r,n)=>null==t.getDetailPanelContent?r:Tl(e.current.state).includes(n)?[...r,z.x["row--detailPanelExpanded"]]:r),[e,t.getDetailPanelContent]);Ve(e,"hydrateColumns",r),Ve(e,"rowClassName",i)})(r,t),((e,t)=>{const{disableColumnPinning:r,pinnedColumns:i,initialState:a}=t,s=(0,rr.A)();let l=hl(e.current.state);if(null==l){const t=Hl(e.current.state,{disableColumnPinning:r,pinnedColumns:i,initialState:a},e);l=hl(t)}const c=o.useRef([]),u=o.useCallback((t=>{if(0===t.orderedFields.length||r)return t;const[o,i]=Dl(l,t.orderedFields,"rtl"===s.direction);let a;const u=[...o,...i],{orderedFieldsBeforePinningColumns:d}=e.current.caches.columnPinning;if(d){a=new Array(t.orderedFields.length).fill(null);const r=[...a],n=[...t.orderedFields];c.current.forEach((e=>{if(!u.includes(e)&&t.lookup[e]){const t=d.indexOf(e);a[t]=e,r[t]=e,n.splice(n.indexOf(e),1)}})),u.forEach((e=>{let o=d.indexOf(e);if((-1===o||o>=r.length)&&(o=t.orderedFields.indexOf(e)),null!==r[o])for(o=0;null!==r[o];)o+=1;a[o]=e,r[o]=e,n.splice(n.indexOf(e),1)}));let o=0;n.forEach((e=>{for(;null!==r[o];)o+=1;r[o]=e,a[o]=e})),e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=r}else a=[...t.orderedFields],e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=[...t.orderedFields];c.current=u;const f=a.filter((e=>!o.includes(e)&&!i.includes(e)));return(0,n.A)({},t,{orderedFields:[...o,...f,...i]})}),[e,r,l,s.direction]);Ve(e,"hydrateColumns",u)})(r,t),(e=>{Yt(e,Be,"rowTreeCreation",Kt)})(r),Jt(er,r,t),Jt(br,r,t),Jt(Yl,r,t),Jt(Hl,r,t),Jt(Qr,r,t),Jt(ic,r,t),Jt(tn,r,t),Jt(pn,r,t),Jt(mn,r,t),Jt(gn,r,t),Jt(vn,r,t),Jt(An,r,t),Jt(In,r,t),Jt(Os,r,t),Jt(Hs,r,t),Jt(Mn,r,t),Jt(es,r,t),Jt(rs,r,t),Jt(cs,r,t),Jt(us,r,t),((e,t)=>{const r=Qt(e,"useGridHeaderFiltering"),i=o.useCallback((r=>{e.current.setState((e=>{var o,i;return"DataGrid"===t.signature?e:(0,n.A)({},e,{headerFiltering:{editing:null!=(o=r.editing)?o:null,menuOpen:null!=(i=r.menuOpen)?i:null}})})),e.current.forceUpdate()}),[e,t.signature]),a=o.useCallback((t=>{r.debug(`Starting edit mode on header filter for field: ${t}`),e.current.setHeaderFilterState({editing:t})}),[e,r]),s=o.useCallback((()=>{r.debug("Stopping edit mode on header filter"),e.current.setHeaderFilterState({editing:null})}),[e,r]),l=o.useCallback((t=>{r.debug(`Opening header filter menu for field: ${t}`),e.current.setHeaderFilterState({menuOpen:t})}),[e,r]),c=o.useCallback((()=>{r.debug("Hiding header filter menu for active field");let t=e.current.state.headerFiltering.menuOpen;if(t){const r=(0,G.gv)(e),n=(0,G.FY)(e),o=(0,G.JR)(e);if(r[t]||(t=o[0]),!1===n[t]){const e=o.filter((e=>e===t||!1!==n[e])),r=e.indexOf(t);t=e[r+1]||e[r-1]}e.current.setHeaderFilterState({menuOpen:null}),e.current.setColumnHeaderFilterFocus(t)}}),[e,r]),u={setHeaderFilterState:i};xe(e,{startHeaderFilterEditMode:a,stopHeaderFilterEditMode:s,showHeaderFilterMenu:l,hideHeaderFilterMenu:c},"public"),xe(e,u,"private")})(r,t),(e=>{const t=o.useCallback(((t,r)=>{if("treeDataGroup"===e.current.getCellParams(t.id,t.field).colDef.type&&" "===r.key&&!r.shiftKey){if("group"!==t.rowNode.type)return;e.current.setRowChildrenExpansion(t.id,!t.rowNode.childrenExpanded)}}),[e]);Pe(e,"cellKeyDown",t)})(r),((e,t)=>{const r=Qt(e,"useGridKeyboardNavigation"),n=fr(e,t).rows,i=(0,rr.A)(),a=o.useMemo((()=>function(e,t){const r=(0,K.$2)(e)||{};return[...r.top||[],...t,...r.bottom||[]]}(e,n)),[e,n]),s="DataGrid"!==t.signature&&t.unstable_headerFilters,l=o.useCallback(((t,n,o="left")=>{const i=(0,ie.em)(e),a=e.current.unstable_getCellColSpanInfo(n,t);a&&a.spannedByColSpan&&("left"===o?t=a.leftVisibleCellIndex:"right"===o&&(t=a.rightVisibleCellIndex));const s=i.findIndex((e=>e.id===n));r.debug(`Navigating to cell row ${s}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:s});const l=e.current.getVisibleColumns()[t].field;e.current.setCellFocus(n,l)}),[e,r]),c=o.useCallback(((t,n)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(o,n)}),[e,r]),u=o.useCallback(((t,n)=>{r.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(o,n)}),[e,r]),d=o.useCallback(((t,n,o)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const{field:i}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(i,n,o)}),[e,r]),f=o.useCallback((e=>{var t;return null==(t=a[e])?void 0:t.id}),[a]),p=o.useCallback(((t,r)=>{const n=r.currentTarget.querySelector(`.${z.x.columnHeaderTitleContainerContent}`);if(n&&n.contains(r.target)&&t.field!==Zt.field)return;if(!e.current.getRootDimensions())return;const o=e.current.getViewportPageSize(),p=t.field?e.current.getColumnIndex(t.field):0,h=a.length>0?0:null,m=a.length-1,g=(0,G.iv)(e).length-1,y=Y(e);let v=!0;switch(r.key){case"ArrowDown":null!==h&&(s?u(p,r):l(p,f(h)));break;case"ArrowRight":{const e=ms({currentColIndex:p,firstColIndex:0,lastColIndex:g,direction:i.direction});null!==e&&c(e,r);break}case"ArrowLeft":{const e=hs({currentColIndex:p,firstColIndex:0,lastColIndex:g,direction:i.direction});null!==e&&c(e,r);break}case"ArrowUp":y>0&&d(p,y-1,r);break;case"PageDown":null!==h&&null!==m&&l(p,f(Math.min(h+o,m)));break;case"Home":c(0,r);break;case"End":c(g,r);break;case"Enter":(r.ctrlKey||r.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:v=!1}v&&r.preventDefault()}),[e,a.length,s,u,l,f,i.direction,c,d]),h=o.useCallback(((t,r)=>{if(!e.current.getRootDimensions())return;const n=fs(e)===t.field,o=ps(e)===t.field;if(n||o||!(0,Ge.q9)(r.key))return;const s=e.current.getViewportPageSize(),d=t.field?e.current.getColumnIndex(t.field):0,p=a.length-1,h=(0,G.iv)(e).length-1;let m=!0;switch(r.key){case"ArrowDown":{const e=f(0);null!=e&&l(d,e);break}case"ArrowRight":{const e=ms({currentColIndex:d,firstColIndex:0,lastColIndex:h,direction:i.direction});null!==e&&u(e,r);break}case"ArrowLeft":{const n=hs({currentColIndex:d,firstColIndex:0,lastColIndex:h,direction:i.direction});null!==n?u(n,r):e.current.setColumnHeaderFilterFocus(t.field,r);break}case"ArrowUp":c(d,r);break;case"PageDown":null!==p&&l(d,f(Math.min(0+s,p)));break;case"Home":u(0,r);break;case"End":u(h,r);break;case" ":break;default:m=!1}m&&r.preventDefault()}),[e,a.length,u,i.direction,c,l,f]),m=o.useCallback(((t,r)=>{if(!e.current.getRootDimensions())return;const n=de(e);if(null===n)return;const{field:o,depth:i}=n,{fields:s,depth:u,maxDepth:p}=t,h=e.current.getViewportPageSize(),m=e.current.getColumnIndex(o),g=o?e.current.getColumnIndex(o):0,y=a.length-1,v=(0,G.iv)(e).length-1;let b=!0;switch(r.key){case"ArrowDown":u===p-1?c(m,r):d(m,i+1,r);break;case"ArrowUp":u>0&&d(m,i-1,r);break;case"ArrowRight":{const e=s.length-s.indexOf(o)-1;m+e+1<=v&&d(m+e+1,i,r);break}case"ArrowLeft":{const e=s.indexOf(o);m-e-1>=0&&d(m-e-1,i,r);break}case"PageDown":null!==y&&l(g,f(Math.min(0+h,y)));break;case"Home":d(0,i,r);break;case"End":d(v,i,r);break;case" ":break;default:b=!1}b&&r.preventDefault()}),[e,a.length,c,d,l,f]),g=o.useCallback(((t,r)=>{if(yr(r))return;const n=e.current.getCellParams(t.id,t.field);if(n.cellMode===cr.Edit||!(0,Ge.q9)(r.key))return;if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:r,cell:n}))return;const o=e.current.getRootDimensions();if(0===a.length||!o)return;const d=i.direction,p=e.current.getViewportPageSize(),h=t.field?e.current.getColumnIndex(t.field):0,m=a.findIndex((e=>e.id===t.id)),g=a.length-1,y=(0,G.iv)(e).length-1;let v=!0;switch(r.key){case"ArrowDown":m0?l(h,f(m-1)):s?u(h,r):c(h,r);break;case"ArrowRight":{const e=ms({currentColIndex:h,firstColIndex:0,lastColIndex:y,direction:d});null!==e&&l(e,f(m),"rtl"===d?"left":"right");break}case"ArrowLeft":{const e=hs({currentColIndex:h,firstColIndex:0,lastColIndex:y,direction:d});null!==e&&l(e,f(m),"rtl"===d?"right":"left");break}case"Tab":r.shiftKey&&h>0?l(h-1,f(m),"left"):!r.shiftKey&&h=0?l(h,f(e)):c(h,r);break}case"Home":r.ctrlKey||r.metaKey||r.shiftKey?l(0,f(0)):l(0,f(m));break;case"End":r.ctrlKey||r.metaKey||r.shiftKey?l(y,f(g)):l(y,f(m));break;default:v=!1}v&&r.preventDefault()}),[e,a,i.direction,l,f,s,u,c]),y=o.useCallback(((e,{event:t})=>" "!==t.key&&e),[]);Ve(e,"canStartEditing",y),Pe(e,"columnHeaderKeyDown",p),Pe(e,"headerFilterKeyDown",h),Pe(e,"columnGroupHeaderKeyDown",m),Pe(e,"cellKeyDown",g)})(r,t),((e,t)=>{const r=Qt(e,"useGridSelection"),i=e=>(...r)=>{t.rowSelection&&e(...r)},a=o.useMemo((()=>vr(t.rowSelectionModel,Xe(e.current.state))),[e,t.rowSelectionModel]),s=o.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:a,propOnChange:t.onRowSelectionModelChange,stateSelector:Xe,changeEvent:"rowSelectionChange"});const{checkboxSelection:l,disableMultipleRowSelection:c,disableRowSelectionOnClick:u,isRowSelectable:d}=t,f=!c||l,p=fr(e,t),h=o.useCallback((t=>{var r;let n=t;const o=null!=(r=s.current)?r:t,i=e.current.isRowSelected(t);if(i){const t=(0,ie.ux)(e),r=t.findIndex((e=>e===o)),i=t.findIndex((e=>e===n));if(r===i)return;n=r>i?t[i+1]:t[i-1]}s.current=t,e.current.selectRowRange({startId:o,endId:n},!i)}),[e]),m=o.useCallback((o=>{if(t.signature===Me.DataGrid&&!t.checkboxSelection&&Array.isArray(o)&&o.length>1)throw new Error(["MUI: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));Xe(e.current.state)!==o&&(r.debug("Setting selection model"),e.current.setState((e=>(0,n.A)({},e,{rowSelection:t.rowSelection?o:[]}))),e.current.forceUpdate())}),[e,r,t.rowSelection,t.signature,t.checkboxSelection]),g=o.useCallback((t=>Xe(e.current.state).includes(t)),[e]),y=o.useCallback((t=>{if(d&&!d(e.current.getRowParams(t)))return!1;const r=e.current.getRowNode(t);return"footer"!==(null==r?void 0:r.type)&&"pinnedRow"!==(null==r?void 0:r.type)}),[e,d]),v=o.useCallback((()=>Ye(e)),[e]),b=o.useCallback(((t,n=!0,o=!1)=>{if(e.current.isRowSelectable(t))if(s.current=t,o)r.debug(`Setting selection for row ${t}`),e.current.setRowSelectionModel(n?[t]:[]);else{r.debug(`Toggling selection for row ${t}`);const o=Xe(e.current.state).filter((e=>e!==t));n&&o.push(t),(o.length<2||f)&&e.current.setRowSelectionModel(o)}}),[e,r,f]),_=o.useCallback(((t,o=!0,i=!1)=>{r.debug("Setting selection for several rows");const a=t.filter((t=>e.current.isRowSelectable(t)));let s;if(i)s=o?a:[];else{const t=(0,n.A)({},Ke(e));a.forEach((e=>{o?t[e]=e:delete t[e]})),s=Object.values(t)}(s.length<2||f)&&e.current.setRowSelectionModel(s)}),[e,r,f]),x=o.useCallback((({startId:t,endId:n},o=!0,i=!1)=>{if(!e.current.getRow(t)||!e.current.getRow(n))return;r.debug(`Expanding selection from row ${t} to row ${n}`);const a=(0,ie.ux)(e),s=a.indexOf(t),l=a.indexOf(n),[c,u]=s>l?[l,s]:[s,l],d=a.slice(c,u+1);e.current.selectRows(d,o,i)}),[e,r]),w={selectRows:_,selectRowRange:x};xe(e,{selectRow:b,setRowSelectionModel:m,getSelectedRows:v,isRowSelected:g,isRowSelectable:y},"public"),xe(e,w,t.signature===Me.DataGrid?"private":"public");const A=o.useCallback((()=>{if(t.keepNonExistentRowsSelected)return;const r=Xe(e.current.state),o=(0,K.rI)(e),i=(0,n.A)({},Ke(e));let a=!1;r.forEach((e=>{o[e]||(delete i[e],a=!0)})),a&&e.current.setRowSelectionModel(Object.values(i))}),[e,t.keepNonExistentRowsSelected]),S=o.useCallback(((t,r)=>{const n=r.metaKey||r.ctrlKey,o=!l&&!n&&!(0,Ge.kx)(r),i=!f||o,a=e.current.isRowSelected(t);i?e.current.selectRow(t,!!o||!a,!0):e.current.selectRow(t,!a,!1)}),[e,f,l]),C=o.useCallback(((t,r)=>{var n;if(u)return;const o=null==(n=r.target.closest(`.${z.x.cell}`))?void 0:n.getAttribute("data-field");if(o!==Zt.field&&o!==pr){if(o){const t=e.current.getColumn(o);if((null==t?void 0:t.type)===ar)return}"pinnedRow"!==e.current.getRowNode(t.id).type&&(r.shiftKey&&(f||l)?h(t.id):S(t.id,r))}}),[u,f,l,e,h,S]),E=o.useCallback(((e,t)=>{var r;f&&t.shiftKey&&(null==(r=window.getSelection())||r.removeAllRanges())}),[f]),T=o.useCallback(((t,r)=>{r.nativeEvent.shiftKey?h(t.id):e.current.selectRow(t.id,t.value)}),[e,h]),I=o.useCallback((r=>{const n=t.checkboxSelectionVisibleOnly&&t.pagination?ut(e):(0,ie.ux)(e),o=(0,ie.ZI)(e);e.current.selectRows(n,r.value,(null==o?void 0:o.items.length)>0)}),[e,t.checkboxSelectionVisibleOnly,t.pagination]),k=o.useCallback(((t,r)=>{if(e.current.getCellMode(t.id,t.field)!==cr.Edit&&!yr(r)){if((0,Ge.q9)(r.key)&&r.shiftKey){const n=le(e);if(n&&n.id!==t.id){r.preventDefault();const o=e.current.isRowSelected(n.id);if(!f)return void e.current.selectRow(n.id,!o,!0);const i=e.current.getRowIndexRelativeToVisibleRows(n.id),a=e.current.getRowIndexRelativeToVisibleRows(t.id);let s,l;i>a?o?(s=a,l=i-1):(s=a,l=i):o?(s=i+1,l=a):(s=i,l=a);const c=p.rows.slice(s,l+1).map((e=>e.id));return void e.current.selectRows(c,!o)}}if(" "===r.key&&r.shiftKey)return r.preventDefault(),void S(t.id,r);"a"===r.key&&(r.ctrlKey||r.metaKey)&&(r.preventDefault(),_(e.current.getAllRowIds(),!0))}}),[e,S,_,p.rows,f]);Pe(e,"sortedRowsSet",i(A)),Pe(e,"rowClick",i(C)),Pe(e,"rowSelectionCheckboxChange",i(T)),Pe(e,"headerSelectionCheckboxChange",I),Pe(e,"cellMouseDown",i(E)),Pe(e,"cellKeyDown",i(k)),o.useEffect((()=>{void 0!==a&&e.current.setRowSelectionModel(a)}),[e,a,t.rowSelection]),o.useEffect((()=>{t.rowSelection||e.current.setRowSelectionModel([])}),[e,t.rowSelection]);const M=null!=a;o.useEffect((()=>{if(M||!t.rowSelection)return;const r=Xe(e.current.state);if(y){const t=r.filter((e=>y(e)));t.length{if(!t.rowSelection||M)return;const r=Xe(e.current.state);!f&&r.length>1&&e.current.setRowSelectionModel([])}),[e,f,l,M,t.rowSelection])})(r,t),((e,t)=>{var r;const i=(0,S.N)(e,hl),a=(0,rr.A)(),s=o.useCallback(((r,o)=>{if(t.disableColumnPinning)return r;const s=(0,G.TI)(e),[l,c]=Dl(i,s,"rtl"===a.direction);if(!o.colIndex||0===l.length&&0===c.length)return r;const u=(0,G.iv)(e),d=(0,G.fc)(e),f=(0,G.Sw)(e),p=e.current.virtualScrollerRef.current.clientWidth,h=Math.abs(e.current.virtualScrollerRef.current.scrollLeft),m=u[o.colIndex].computedWidth,g=f[o.colIndex],y=f[l.length],v=d-f[f.length-c.length],b=g+m;if(b-(p-v)>h){const e=b-(p-v);return(0,n.A)({},r,{left:e})}if(gt.disableColumnPinning||!1===r.pinnable?e:[...e,"columnMenuPinningItem"]),[t.disableColumnPinning]),c=o.useCallback(((t,{targetIndex:r})=>{const n=(0,G.TI)(e),[o,s]=Dl(i,n,"rtl"===a.direction);return 0===o.length&&0===s.length?t:!(o.length>0&&r0?!(r>=(0,G.iv)(e).length-s.length)&&t:t)}),[e,i,a.direction]),u=o.useCallback(((r,o)=>{var i,a,s;const l=hl(e.current.state);return!o.exportOnlyDirtyModels||null!=t.pinnedColumns||null!=(null==(i=t.initialState)?void 0:i.pinnedColumns)||(null!=(a=l.left)?a:[]).length>0||(null!=(s=l.right)?s:[]).length>0?(0,n.A)({},r,{pinnedColumns:l}):r}),[e,t.pinnedColumns,null==(r=t.initialState)?void 0:r.pinnedColumns]),d=o.useCallback(((t,r)=>{const n=r.stateToRestore.pinnedColumns;return null!=n&&e.current.setState(Wl(n)),t}),[e]);Ve(e,"scrollToIndexes",s),Ve(e,"columnMenu",l),Ve(e,"canBeReordered",c),Ve(e,"exportState",u),Ve(e,"restoreState",d),e.current.registerControlState({stateId:"pinnedColumns",propModel:t.pinnedColumns,propOnChange:t.onPinnedColumnsChange,stateSelector:hl,changeEvent:"pinnedColumnsChange"});const f=o.useCallback((e=>{if(t.disableColumnPinning)throw new Error(`MUI: You cannot call \`apiRef.current.${e}\` when \`disableColumnPinning\` is true.`)}),[t.disableColumnPinning]),p=o.useCallback(((t,r)=>{if(f("pinColumn"),e.current.isColumnPinned(t)===r)return;const n=r===pl.right?pl.left:pl.right,o={[r]:[...i[r]||[],t],[n]:(i[n]||[]).filter((e=>e!==t))};e.current.setPinnedColumns(o)}),[e,f,i]),h=o.useCallback((t=>{f("unpinColumn"),e.current.setPinnedColumns({left:(i.left||[]).filter((e=>e!==t)),right:(i.right||[]).filter((e=>e!==t))})}),[e,f,i.left,i.right]),m=o.useCallback((()=>(f("getPinnedColumns"),hl(e.current.state))),[e,f]),g=o.useCallback((t=>{f("setPinnedColumns"),e.current.setState(Wl(t)),e.current.forceUpdate()}),[e,f]),y=o.useCallback((e=>(f("isColumnPinned"),(i.left||[]).includes(e)?pl.left:!!(i.right||[]).includes(e)&&pl.right)),[i.left,i.right,f]);xe(e,{pinColumn:p,unpinColumn:h,getPinnedColumns:m,setPinnedColumns:g,isColumnPinned:y},"public");const v=o.useCallback((t=>{if(!e.current.caches.columnPinning.orderedFieldsBeforePinningColumns)return;const{column:r,targetIndex:n,oldIndex:o}=t,i=n>o?1:-1,a=(0,G.JR)(e)[n-i],s=[...e.current.caches.columnPinning.orderedFieldsBeforePinningColumns];let l=s.findIndex((e=>e===r.field)),c=l+i;const u=s.findIndex((e=>e===a));for(;i>0?lu;){for(;e.current.isColumnPinned(s[c]);)c+=i;const t=s[l];s[l]=s[c],s[c]=t,l=c,c=l+i}e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=s}),[e]);Pe(e,"columnOrderChange",v),o.useEffect((()=>{t.pinnedColumns&&e.current.setPinnedColumns(t.pinnedColumns)}),[e,t.pinnedColumns])})(r,t),((e,t)=>{const r=o.useCallback((r=>{e.current.caches.pinnedRows=oc(r,t.getRowId),e.current.requestPipeProcessorsApplication("hydrateRows")}),[e,t.getRowId]);xe(e,{unstable_setPinnedRows:r},"public");const n=o.useRef(!0);o.useEffect((()=>{n.current?n.current=!1:e.current.unstable_setPinnedRows(t.pinnedRows)}),[e,t.pinnedRows])})(r,t),function(e,t){var r,i;const a=Qt(e,"useGridColumns"),s=Jr,l=o.useRef(t.columns),c=o.useRef(s);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:G.FY,changeEvent:"columnVisibilityModelChange"});const u=o.useCallback((t=>{a.debug("Updating columns state."),e.current.setState(qr(t)),e.current.forceUpdate(),e.current.publishEvent("columnsChange",t.orderedFields)}),[a,e]),d=o.useCallback((t=>(0,G.gv)(e)[t]),[e]),f=o.useCallback((()=>(0,G.OV)(e)),[e]),p=o.useCallback((()=>(0,G.iv)(e)),[e]),h=o.useCallback(((t,r=!0)=>(r?(0,G.iv)(e):(0,G.OV)(e)).findIndex((e=>e.field===t))),[e]),m=o.useCallback((t=>{const r=h(t);return(0,G.Sw)(e)[r]}),[e,h]),g=o.useCallback((t=>{(0,G.FY)(e)!==t&&(e.current.setState((r=>(0,n.A)({},r,{columns:Wr({apiRef:e,columnTypes:s,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})}))),e.current.forceUpdate())}),[e,s]),y=o.useCallback((t=>{const r=Wr({apiRef:e,columnTypes:s,columnsToUpsert:t,initialState:void 0,keepOnlyColumnsToUpsert:!1});u(r)}),[e,u,s]),v=o.useCallback(((t,r)=>{var o;const i=(0,G.FY)(e);if(r!==(null==(o=i[t])||o)){const o=(0,n.A)({},i,{[t]:r});e.current.setColumnVisibilityModel(o)}}),[e]),b=o.useCallback((t=>(0,G.JR)(e).findIndex((e=>e===t))),[e]),_=o.useCallback(((t,r)=>{const o=(0,G.JR)(e),i=b(t);if(i===r)return;a.debug(`Moving column ${t} to index ${r}`);const s=[...o],l=s.splice(i,1)[0];s.splice(r,0,l),u((0,n.A)({},(0,G.em)(e.current.state),{orderedFields:s}));const c={column:e.current.getColumn(t),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:i};e.current.publishEvent("columnIndexChange",c)}),[e,a,u,b]),w=o.useCallback(((t,r)=>{var o,i;a.debug(`Updating column ${t} width to ${r}`);const s=(0,G.em)(e.current.state),l=s.lookup[t],c=(0,n.A)({},l,{width:r,hasBeenResized:!0});u(Gr((0,n.A)({},s,{lookup:(0,n.A)({},s.lookup,{[t]:c})}),null!=(o=null==(i=e.current.getRootDimensions())?void 0:i.viewportInnerSize.width)?o:0)),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:c,width:r})}),[e,a,u]),A={setColumnIndex:_};xe(e,{getColumn:d,getAllColumns:f,getColumnIndex:h,getColumnPosition:m,getVisibleColumns:p,getColumnIndexRelativeToVisibleColumns:b,updateColumns:y,setColumnVisibilityModel:g,setColumnVisibility:v,setColumnWidth:w},"public"),xe(e,A,t.signature===Me.DataGrid?"private":"public");const S=o.useCallback(((r,o)=>{var i,a;const s={},l=(0,G.FY)(e);(!o.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys(null!=(i=null==(a=t.initialState)||null==(a=a.columns)?void 0:a.columnVisibilityModel)?i:{}).length>0||Object.keys(l).length>0)&&(s.columnVisibilityModel=l),s.orderedFields=(0,G.JR)(e);const c=(0,G.OV)(e),u={};return c.forEach((e=>{if(e.hasBeenResized){const t={};Vr.forEach((r=>{let n=e[r];n===1/0&&(n=-1),t[r]=n})),u[e.field]=t}})),Object.keys(u).length>0&&(s.dimensions=u),(0,n.A)({},r,{columns:s})}),[e,t.columnVisibilityModel,null==(r=t.initialState)?void 0:r.columns]),C=o.useCallback(((t,r)=>{var n;const o=null==(n=r.stateToRestore.columns)?void 0:n.columnVisibilityModel,i=r.stateToRestore.columns;if(null==o&&null==i)return t;const a=Wr({apiRef:e,columnTypes:s,columnsToUpsert:[],initialState:i,columnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return e.current.setState(qr(a)),null!=i&&e.current.publishEvent("columnsChange",a.orderedFields),t}),[e,s]),E=o.useCallback(((e,r)=>{if(r===Kr.y.columns){var o;const e=t.slots.columnsPanel;return(0,x.jsx)(e,(0,n.A)({},null==(o=t.slotProps)?void 0:o.columnsPanel))}return e}),[t.slots.columnsPanel,null==(i=t.slotProps)?void 0:i.columnsPanel]),T=o.useCallback((e=>t.disableColumnSelector?e:[...e,"columnMenuColumnsItem"]),[t.disableColumnSelector]);Ve(e,"columnMenu",T),Ve(e,"exportState",S),Ve(e,"restoreState",C),Ve(e,"preferencePanel",E);const I=o.useRef(null);Pe(e,"viewportInnerSizeChange",(t=>{I.current!==t.width&&(I.current=t.width,u(Gr((0,G.em)(e.current.state),t.width)))}));const k=o.useCallback((()=>{a.info("Columns pipe processing have changed, regenerating the columns");const t=Wr({apiRef:e,columnTypes:s,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});u(t)}),[e,a,u,s]);_r(e,"hydrateColumns",k);const M=o.useRef(!0);o.useEffect((()=>{if(M.current)return void(M.current=!1);if(a.info(`GridColumns have changed, new length ${t.columns.length}`),l.current===t.columns&&c.current===s)return;const r=Wr({apiRef:e,columnTypes:s,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});l.current=t.columns,c.current=s,u(r)}),[a,e,u,t.columns,s]),o.useEffect((()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)}),[e,a,t.columnVisibilityModel])}(r,t),((e,t)=>{const r=Qt(e,"useGridRows"),i=fr(e,t),a=o.useRef(Date.now()),s=(0,en.Z)(),l=o.useCallback((t=>{const r=(0,K.rI)(e)[t];if(r)return r;const n=e.current.getRowNode(t);return n&&Dt(n)?{[kt]:t}:null}),[e]),c=t.getRowId,u=o.useCallback((e=>kt in e?e[kt]:c?c(e):e.id),[c]),d=o.useMemo((()=>i.rows.reduce(((e,{id:t},r)=>(e[t]=r,e)),{})),[i.rows]),f=o.useCallback((({cache:r,throttle:o})=>{const i=()=>{a.current=Date.now(),e.current.setState((r=>(0,n.A)({},r,{rows:Lt({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:(0,K.qj)(e),previousTreeDepths:(0,K.Mz)(e)})}))),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(s.clear(),e.current.caches.rows=r,!o)return void i();const l=t.throttleRowsMs-(Date.now()-a.current);l>0?s.start(l,i):i()}),[t.throttleRowsMs,t.rowCount,t.loading,e,s]),p=o.useCallback((n=>{r.debug(`Updating all rows, new length ${n.length}`);const o=Pt({rows:n,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),i=e.current.caches.rows;o.rowsBeforePartialUpdates=i.rowsBeforePartialUpdates,f({cache:o,throttle:!0})}),[r,t.getRowId,t.loading,t.rowCount,f,e]),h=o.useCallback((r=>{if(t.signature===Me.DataGrid&&r.length>1)throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));const o=[];r.forEach((r=>{const i=Rt(r,t.getRowId,"A row was provided without id when calling updateRows():"),a=e.current.getRowNode(i);if("pinnedRow"===(null==a?void 0:a.type)){const t=e.current.caches.pinnedRows,o=t.idLookup[i];o&&(t.idLookup[i]=(0,n.A)({},o,r))}else o.push(r)}));const i=(({previousCache:e,getRowId:t,updates:r})=>{var o,i,a;if("full"===e.updates.type)throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");const s=new Map;r.forEach((e=>{const r=Rt(e,t,"A row was provided without id when calling updateRows():");s.has(r)?s.set(r,(0,n.A)({},s.get(r),e)):s.set(r,e)}));const l={type:"partial",actions:{insert:[...null!=(o=e.updates.actions.insert)?o:[]],modify:[...null!=(i=e.updates.actions.modify)?i:[]],remove:[...null!=(a=e.updates.actions.remove)?a:[]]},idToActionLookup:(0,n.A)({},e.updates.idToActionLookup)},c=(0,n.A)({},e.dataRowIdToModelLookup),u=(0,n.A)({},e.dataRowIdToIdLookup),d={insert:{},modify:{},remove:{}};s.forEach(((e,t)=>{const r=l.idToActionLookup[t];if("delete"===e._action){if("remove"===r||!c[t])return;return null!=r&&(d[r][t]=!0),l.actions.remove.push(t),delete c[t],void delete u[t]}const o=c[t];if(o)return"remove"===r?(d.remove[t]=!0,l.actions.modify.push(t)):null==r&&l.actions.modify.push(t),void(c[t]=(0,n.A)({},o,e));"remove"===r?(d.remove[t]=!0,l.actions.insert.push(t)):null==r&&l.actions.insert.push(t),c[t]=e,u[t]=t}));const f=Object.keys(d);for(let e=0;e0&&(l.actions[t]=l.actions[t].filter((e=>!r[e])))}return{dataRowIdToModelLookup:c,dataRowIdToIdLookup:u,updates:l,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}})({updates:o,getRowId:t.getRowId,previousCache:e.current.caches.rows});f({cache:i,throttle:!0})}),[t.signature,t.getRowId,f,e]),m=o.useCallback((()=>{const t=(0,K.A6)(e),r=(0,K.rI)(e);return new Map(t.map((e=>{var t;return[e,null!=(t=r[e])?t:{}]})))}),[e]),g=o.useCallback((()=>(0,K.H0)(e)),[e]),y=o.useCallback((()=>(0,K.A6)(e)),[e]),v=o.useCallback((e=>d[e]),[d]),b=o.useCallback(((t,r)=>{const o=e.current.getRowNode(t);if(!o)throw new Error(`MUI: No row with id #${t} found`);if("group"!==o.type)throw new Error("MUI: Only group nodes can be expanded or collapsed");const i=(0,n.A)({},o,{childrenExpanded:r});e.current.setState((e=>(0,n.A)({},e,{rows:(0,n.A)({},e.rows,{tree:(0,n.A)({},e.rows.tree,{[t]:i})})}))),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",i)}),[e]),_=o.useCallback((t=>{var r;return null!=(r=(0,K.qj)(e)[t])?r:null}),[e]),x=o.useCallback((({skipAutoGeneratedRows:t=!0,groupId:r,applySorting:n,applyFiltering:o})=>{const i=(0,K.qj)(e);let a;if(n){const n=i[r];if(!n)return[];const o=(0,ae.RJ)(e);a=[];for(let e=o.findIndex((e=>e===r))+1;en.depth;e+=1){const r=o[e];t&&Dt(i[r])||a.push(r)}}else a=Nt(i,r,t);if(o){const t=(0,ie.wx)(e);a=a.filter((e=>!1!==t[e]))}return a}),[e]),w=o.useCallback(((t,o)=>{const i=e.current.getRowNode(t);if(!i)throw new Error(`MUI: No row with id #${t} found`);if(i.parent!==It)throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");if("leaf"!==i.type)throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");e.current.setState((i=>{const a=(0,K.qj)(i,e.current.instanceId)[It],s=a.children,l=s.findIndex((e=>e===t));if(-1===l||l===o)return i;r.debug(`Moving row ${t} to index ${o}`);const c=[...s];return c.splice(o,0,c.splice(l,1)[0]),(0,n.A)({},i,{rows:(0,n.A)({},i.rows,{tree:(0,n.A)({},i.rows.tree,{[It]:(0,n.A)({},a,{children:c})})})})})),e.current.publishEvent("rowsSet")}),[e,r]),A=o.useCallback(((r,o)=>{if(t.signature===Me.DataGrid&&o.length>1)throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===o.length)return;if((0,K.V2)(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const i=(0,n.A)({},(0,K.qj)(e)),a=(0,n.A)({},(0,K.rI)(e)),s=(0,n.A)({},(0,K.gk)(e)),l=i[It],c=[...l.children],u=new Set;for(let e=0;e"leaf"===i[e].type));e.current.caches.rows.dataRowIdToModelLookup=a,e.current.caches.rows.dataRowIdToIdLookup=s,e.current.setState((e=>(0,n.A)({},e,{rows:(0,n.A)({},e.rows,{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,dataRowIds:d,tree:i})}))),e.current.publishEvent("rowsSet")}),[e,t.signature,t.getRowId]),S={getRow:l,getRowId:u,getRowModels:m,getRowsCount:g,getAllRowIds:y,setRows:p,updateRows:h,getRowNode:_,getRowIndexRelativeToVisibleRows:v,unstable_replaceRows:A},C={setRowIndex:w,setRowChildrenExpansion:b,getRowGroupChildren:x},E=o.useCallback((()=>{let o;r.info("Row grouping pre-processing have changed, regenerating the row tree"),o=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?(0,n.A)({},e.current.caches.rows,{updates:{type:"full",rows:(0,K.A6)(e)}}):Pt({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),f({cache:o,throttle:!1})}),[r,e,t.rows,t.getRowId,t.loading,t.rowCount,f]),T=o.useCallback((e=>{"rowTreeCreation"===e&&E()}),[E]),I=o.useCallback((()=>{e.current.getActiveStrategy("rowTree")!==(0,K.Y1)(e)&&E()}),[e,E]);Pe(e,"activeStrategyProcessorChange",T),Pe(e,"strategyAvailabilityChange",I);const k=o.useCallback((()=>{e.current.setState((r=>{const o=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:(0,K.qj)(r,e.current.instanceId),treeDepths:(0,K.Mz)(r,e.current.instanceId),dataRowIds:(0,K.A6)(r,e.current.instanceId),dataRowIdToModelLookup:(0,K.rI)(r,e.current.instanceId),dataRowIdToIdLookup:(0,K.gk)(r,e.current.instanceId)});return(0,n.A)({},r,{rows:(0,n.A)({},r.rows,o,{totalTopLevelRowCount:Ot({tree:o.tree,rowCountProp:t.rowCount})})})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()}),[e,t.rowCount]);_r(e,"hydrateRows",k),xe(e,S,"public"),xe(e,C,t.signature===Me.DataGrid?"private":"public");const M=o.useRef(!0);o.useEffect((()=>{if(M.current)return void(M.current=!1);const o=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,i=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,a=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;if(o)return i||(e.current.setState((e=>(0,n.A)({},e,{rows:(0,n.A)({},e.rows,{loading:t.loading})}))),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),void(a||(e.current.setState((e=>(0,n.A)({},e,{rows:(0,n.A)({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})}))),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()));r.debug(`Updating all rows, new length ${t.rows.length}`),f({cache:Pt({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1})}),[t.rows,t.rowCount,t.getRowId,t.loading,r,f,e])})(r,t),function(e,t){const{getRowId:r}=t,n=o.useCallback((t=>({field:t,colDef:e.current.getColumn(t)})),[e]),i=o.useCallback((t=>{const r=e.current.getRow(t);if(!r)throw new Qo(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:r}}),[e]),a=o.useCallback(((t,r)=>{const n=e.current.getRow(t),o=e.current.getRowNode(t);if(!n||!o)throw new Qo(`No row with id #${t} found`);const i=le(e),a=pe(e);return{id:t,field:r,row:n,rowNode:o,value:n[r],colDef:e.current.getColumn(r),cellMode:e.current.getCellMode(t,r),api:e.current,hasFocus:null!==i&&i.field===r&&i.id===t,tabIndex:a&&a.field===r&&a.id===t?0:-1}}),[e]),s=o.useCallback(((t,r)=>{const n=e.current.getColumn(r),o=e.current.getCellValue(t,r),i=e.current.getRow(t),a=e.current.getRowNode(t);if(!i||!a)throw new Qo(`No row with id #${t} found`);const s=le(e),l=pe(e),c={id:t,field:r,row:i,rowNode:a,colDef:n,cellMode:e.current.getCellMode(t,r),hasFocus:null!==s&&s.field===r&&s.id===t,tabIndex:l&&l.field===r&&l.id===t?0:-1,value:o,formattedValue:o,isEditable:!1};return n&&n.valueFormatter&&(c.formattedValue=n.valueFormatter({id:t,field:c.field,value:c.value,api:e.current})),c.isEditable=n&&e.current.isCellEditable(c),c}),[e]),l=o.useCallback(((t,r)=>{const n=e.current.getColumn(r);if(!n||!n.valueGetter){const n=e.current.getRow(t);if(!n)throw new Qo(`No row with id #${t} found`);return n[r]}return n.valueGetter(a(t,r))}),[e,a]),c=o.useCallback(((e,t)=>{var n;const o=kt in e?e[kt]:null!=(n=null==r?void 0:r(e))?n:e.id,i=t.field;return t&&t.valueGetter?t.valueGetter(a(o,i)):e[i]}),[a,r]),u=o.useCallback(((t,n)=>{var o;const i=c(t,n);if(!n||!n.valueFormatter)return i;const a=null!=(o=r?r(t):t.id)?o:t[kt],s=n.field;return n.valueFormatter({id:a,field:s,value:i,api:e.current})}),[e,r,c]),d=o.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${mr(t)}"]`)}(e.current.rootElementRef.current,t):null),[e]),f=o.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(gr(t))}(e.current.rootElementRef.current,t):null),[e]),p=o.useCallback(((t,r)=>e.current.rootElementRef.current?function(e,{id:t,field:r}){const n=`${gr(t)} .${z.x.cell}[data-field="${mr(r)}"]`;return e.querySelector(n)}(e.current.rootElementRef.current,{id:t,field:r}):null),[e]);xe(e,{getCellValue:l,getCellParams:s,getCellElement:p,getRowValue:c,getRowFormattedValue:u,getRowParams:i,getRowElement:f,getColumnHeaderParams:n,getColumnHeaderElement:d},"public")}(r,t),((e,t)=>{const r=(0,S.N)(e,Tl),i=(0,S.N)(e,Il),a=o.useCallback(((r,n)=>{if(r.field!==Xl||null==t.getDetailPanelContent)return;const a=i[r.id];o.isValidElement(a)&&n.target!==n.currentTarget&&e.current.toggleDetailPanel(r.id)}),[e,i,t.getDetailPanelContent]),s=o.useCallback(((r,n)=>{null!=t.getDetailPanelContent&&r.field===Xl&&" "===n.key&&e.current.toggleDetailPanel(r.id)}),[e,t.getDetailPanelContent]);Pe(e,"cellClick",a),Pe(e,"cellKeyDown",s),e.current.registerControlState({stateId:"detailPanels",propModel:t.detailPanelExpandedRowIds,propOnChange:t.onDetailPanelExpandedRowIdsChange,stateSelector:Tl,changeEvent:"detailPanelsExpandedRowIdsChange"});const l=o.useCallback((r=>{if(null==t.getDetailPanelContent)return;const n=i[r];if(!o.isValidElement(n))return;const a=e.current.getExpandedDetailPanels();e.current.setExpandedDetailPanels(a.includes(r)?a.filter((e=>e!==r)):[...a,r])}),[e,i,t.getDetailPanelContent]),c=o.useCallback((()=>Tl(e.current.state)),[e]),u=o.useCallback((t=>{e.current.setState((e=>(0,n.A)({},e,{detailPanel:(0,n.A)({},e.detailPanel,{expandedRowIds:t})}))),e.current.forceUpdate()}),[e]),d={storeDetailPanelHeight:o.useCallback(((t,r)=>{const o=kl(e.current.state);o[t]&&o[t].height!==r&&(e.current.setState((e=>(0,n.A)({},e,{detailPanel:(0,n.A)({},e.detailPanel,{heightCache:(0,n.A)({},o,{[t]:(0,n.A)({},o[t],{height:r})})})}))),e.current.requestPipeProcessorsApplication("rowHeight"))}),[e]),detailPanelHasAutoHeight:o.useCallback((t=>{const r=kl(e.current.state);return!!r[t]&&r[t].autoHeight}),[e])};xe(e,{toggleDetailPanel:l,getExpandedDetailPanels:c,setExpandedDetailPanels:u},"public"),xe(e,d,"private"),o.useEffect((()=>{t.detailPanelExpandedRowIds&&Tl(e.current.state)!==t.detailPanelExpandedRowIds&&e.current.setExpandedDetailPanels(t.detailPanelExpandedRowIds)}),[e,t.detailPanelExpandedRowIds]);const f=o.useCallback((()=>{e.current.setState((r=>(0,n.A)({},r,{detailPanel:(0,n.A)({},r.detailPanel,Kl(e,t.getDetailPanelContent,t.getDetailPanelHeight,r.detailPanel.heightCache))}))),e.current.forceUpdate()}),[e,t.getDetailPanelContent,t.getDetailPanelHeight]);Pe(e,"sortedRowsSet",f);const p=o.useRef(),h=o.useRef(),m=o.useCallback((()=>{t.getDetailPanelContent===p.current&&t.getDetailPanelHeight===h.current||(e.current.setState((r=>(0,n.A)({},r,{detailPanel:(0,n.A)({},r.detailPanel,Kl(e,t.getDetailPanelContent,t.getDetailPanelHeight,r.detailPanel.heightCache))}))),p.current=t.getDetailPanelContent,h.current=t.getDetailPanelHeight)}),[e,t.getDetailPanelContent,t.getDetailPanelHeight]),g=o.useCallback(((t,n)=>{var o;if(!r||0===r.length||!r.includes(n.id))return t.detail=0,t;m();const i=Ml(e);return t.detail=null!=(o=i[n.id])?o:0,t}),[e,r,m]);Ve(e,"rowHeight",g);const y=o.useRef(!0);y.current&&(y.current=!1,m())})(r,t),(e=>{const t=o.useRef({}),r=o.useCallback(((e,r,n)=>{const o=t.current;o[e]||(o[e]={}),o[e][r]=n}),[]),n=o.useCallback(((e,r)=>{var n;return null==(n=t.current[e])?void 0:n[r]}),[]),i=o.useCallback((t=>{const{columnIndex:n,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=t,l=s.length,c=s[n],u="function"==typeof c.colSpan?c.colSpan(e.current.getCellParams(o,c.field)):c.colSpan;if(!u||1===u)return r(o,n,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let d=c.computedWidth;for(let e=1;e=i&&t{for(let o=t;o1&&(o+=a.colSpan-1)}}),[i]),s={calculateColSpan:a};xe(e,{unstable_getCellColSpanInfo:n},"public"),xe(e,s,"private");const l=o.useCallback((()=>{t.current={}}),[]);Pe(e,"columnOrderChange",l)})(r),((e,t)=>{var r;const i=o.useCallback((t=>{var r;return null!=(r=q(e)[t])?r:[]}),[e]),a=o.useCallback((()=>X(e)),[e]);xe(e,{unstable_getColumnGroupPath:i,unstable_getAllGroupDetails:a},"public");const s=o.useCallback((()=>{var r;const o=is(null!=(r=t.columnGroupingModel)?r:[]);e.current.setState((e=>{var t,r,i;const a=null!=(t=null==(r=e.columns)?void 0:r.orderedFields)?t:[],s=null!=(i=e.pinnedColumns)?i:{},l=as(a,o,s);return(0,n.A)({},e,{columnGrouping:(0,n.A)({},e.columnGrouping,{headerStructure:l})})}))}),[e,t.columnGroupingModel]),l=o.useCallback((r=>{var o,i,a,s;if(null==(o=t.experimentalFeatures)||!o.columnGrouping)return;const l=null!=(i=null==(a=(s=e.current).getPinnedColumns)?void 0:a.call(s))?i:{},c=(0,G.JR)(e),u=(0,G.TI)(e),d=ls(null!=r?r:[]),f=is(null!=r?r:[]),p=as(c,f,l),h=0===u.length?0:Math.max(...u.map((e=>{var t,r;return null!=(t=null==(r=f[e])?void 0:r.length)?t:0})));e.current.setState((e=>(0,n.A)({},e,{columnGrouping:{lookup:d,unwrappedGroupingModel:f,headerStructure:p,maxDepth:h}})))}),[e,null==(r=t.experimentalFeatures)?void 0:r.columnGrouping]);Pe(e,"columnIndexChange",s),Pe(e,"columnsChange",(()=>{l(t.columnGroupingModel)})),Pe(e,"columnVisibilityModelChange",(()=>{l(t.columnGroupingModel)})),o.useEffect((()=>{l(t.columnGroupingModel)}),[l,t.columnGroupingModel])})(r,t),((e,t)=>{((e,t)=>{const[r,i]=o.useState({}),a=o.useRef(r),s=o.useRef({}),{processRowUpdate:l,onProcessRowUpdateError:c,cellModesModel:u,onCellModesModelChange:d}=t,f=e=>(...r)=>{t.editMode===lr.Cell&&e(...r)},p=o.useCallback(((t,r)=>{const n=e.current.getCellParams(t,r);if(!e.current.isCellEditable(n))throw new Error(`MUI: The cell with id=${t} and field=${r} is not editable.`)}),[e]),h=o.useCallback(((t,r,n)=>{if(e.current.getCellMode(t,r)!==n)throw new Error(`MUI: The cell with id=${t} and field=${r} is not in ${n} mode.`)}),[e]),m=o.useCallback(((t,r)=>{if(!t.isEditable)return;if(t.cellMode===cr.Edit)return;const o=(0,n.A)({},t,{reason:Lr.cellDoubleClick});e.current.publishEvent("cellEditStart",o,r)}),[e]),g=o.useCallback(((t,r)=>{if(t.cellMode===cr.View)return;if(e.current.getCellMode(t.id,t.field)===cr.View)return;const o=(0,n.A)({},t,{reason:Dr.cellFocusOut});e.current.publishEvent("cellEditStop",o,r)}),[e]),y=o.useCallback(((t,r)=>{if(t.cellMode===cr.Edit){if(229===r.which)return;let o;if("Escape"===r.key?o=Dr.escapeKeyDown:"Enter"===r.key?o=Dr.enterKeyDown:"Tab"===r.key&&(o=r.shiftKey?Dr.shiftTabKeyDown:Dr.tabKeyDown,r.preventDefault()),o){const i=(0,n.A)({},t,{reason:o});e.current.publishEvent("cellEditStop",i,r)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:r,cellParams:t,editMode:"cell"}))return;if((0,Ge.TW)(r)?o=Lr.printableKeyDown:(r.ctrlKey||r.metaKey)&&"v"===r.key?o=Lr.pasteKeyDown:"Enter"===r.key?o=Lr.enterKeyDown:"Delete"!==r.key&&"Backspace"!==r.key||(o=Lr.deleteKeyDown),o){const i=(0,n.A)({},t,{reason:o,key:r.key});e.current.publishEvent("cellEditStart",i,r)}}}),[e]),v=o.useCallback((t=>{const{id:r,field:n,reason:o}=t,i={id:r,field:n};o!==Lr.printableKeyDown&&o!==Lr.deleteKeyDown&&o!==Lr.pasteKeyDown||(i.deleteValue=!0),e.current.startCellEditMode(i)}),[e]),b=o.useCallback((t=>{const{id:r,field:n,reason:o}=t;let i;e.current.runPendingEditCellValueMutation(r,n),o===Dr.enterKeyDown?i="below":o===Dr.tabKeyDown?i="right":o===Dr.shiftTabKeyDown&&(i="left");const a="escapeKeyDown"===o;e.current.stopCellEditMode({id:r,field:n,ignoreModifications:a,cellToFocusAfter:i})}),[e]);Pe(e,"cellDoubleClick",f(m)),Pe(e,"cellFocusOut",f(g)),Pe(e,"cellKeyDown",f(y)),Pe(e,"cellEditStart",f(v)),Pe(e,"cellEditStop",f(b)),Le(e,"cellEditStart",t.onCellEditStart),Le(e,"cellEditStop",t.onCellEditStop);const _=o.useCallback(((t,r)=>{const n=nn(e.current.state);return n[t]&&n[t][r]?cr.Edit:cr.View}),[e]),x=(0,rn.A)((r=>{const n=r!==t.cellModesModel;d&&n&&d(r,{}),t.cellModesModel&&n||(i(r),a.current=r,e.current.publishEvent("cellModesModelChange",r))})),w=o.useCallback(((e,t,r)=>{const o=(0,n.A)({},a.current);if(null!==r)o[e]=(0,n.A)({},o[e],{[t]:(0,n.A)({},r)});else{const r=o[e],n=(0,M.A)(r,[t].map(ze.A));o[e]=n,0===Object.keys(o[e]).length&&delete o[e]}x(o)}),[x]),A=o.useCallback(((t,r,o)=>{e.current.setState((e=>{const i=(0,n.A)({},e.editRows);return null!==o?i[t]=(0,n.A)({},i[t],{[r]:(0,n.A)({},o)}):(delete i[t][r],0===Object.keys(i[t]).length&&delete i[t]),(0,n.A)({},e,{editRows:i})})),e.current.forceUpdate()}),[e]),S=o.useCallback((e=>{const{id:t,field:r}=e,o=(0,M.A)(e,on);p(t,r),h(t,r,cr.View),w(t,r,(0,n.A)({mode:cr.Edit},o))}),[p,h,w]),C=(0,rn.A)((t=>{const{id:r,field:n,deleteValue:o,initialValue:i}=t;let a=e.current.getCellValue(r,n);(o||i)&&(a=o?"":i),A(r,n,{value:a,error:!1,isProcessingProps:!1}),e.current.setCellFocus(r,n)})),E=o.useCallback((e=>{const{id:t,field:r}=e,o=(0,M.A)(e,an);h(t,r,cr.Edit),w(t,r,(0,n.A)({mode:cr.View},o))}),[h,w]),T=(0,rn.A)((async t=>{const{id:r,field:n,ignoreModifications:o,cellToFocusAfter:i="none"}=t;h(r,n,cr.Edit),e.current.runPendingEditCellValueMutation(r,n);const a=()=>{A(r,n,null),w(r,n,null),"none"!==i&&e.current.moveFocusToRelativeCell(r,n,i)};if(o)return void a();const u=nn(e.current.state),{error:d,isProcessingProps:f}=u[r][n];if(d||f)return s.current[r][n].mode=cr.Edit,void w(r,n,{mode:cr.Edit});const p=e.current.getRowWithUpdatedValuesFromCellEditing(r,n);if(l){const t=e=>{s.current[r][n].mode=cr.Edit,w(r,n,{mode:cr.Edit}),c?c(e):sn()};try{const n=e.current.getRow(r);Promise.resolve(l(p,n)).then((t=>{e.current.updateRows([t]),a()})).catch(t)}catch(e){t(e)}}else e.current.updateRows([p]),a()})),I={setCellEditingEditCellValue:o.useCallback((async t=>{var r;const{id:o,field:i,value:a,debounceMs:s,unstable_skipValueParser:l}=t;p(o,i),h(o,i,cr.Edit);const c=e.current.getColumn(i),u=e.current.getRow(o);let d=a;c.valueParser&&!l&&(d=c.valueParser(a,e.current.getCellParams(o,i)));let f=nn(e.current.state),m=(0,n.A)({},f[o][i],{value:d,changeReason:s?"debouncedSetEditCellValue":"setEditCellValue"});if(c.preProcessEditCellProps){const e=a!==f[o][i].value;m=(0,n.A)({},m,{isProcessingProps:!0}),A(o,i,m),m=await Promise.resolve(c.preProcessEditCellProps({id:o,row:u,props:m,hasChanged:e}))}return e.current.getCellMode(o,i)!==cr.View&&(f=nn(e.current.state),m=(0,n.A)({},m,{isProcessingProps:!1}),m.value=c.preProcessEditCellProps?f[o][i].value:d,A(o,i,m),f=nn(e.current.state),!(null!=(r=f[o])&&null!=(r=r[i])&&r.error))}),[e,p,h,A]),getRowWithUpdatedValuesFromCellEditing:o.useCallback(((t,r)=>{const o=e.current.getColumn(r),i=nn(e.current.state),a=e.current.getRow(t);if(!i[t]||!i[t][r])return e.current.getRow(t);const{value:s}=i[t][r];return o.valueSetter?o.valueSetter({value:s,row:a}):(0,n.A)({},a,{[r]:s})}),[e])};xe(e,{getCellMode:_,startCellEditMode:S,stopCellEditMode:E},"public"),xe(e,I,"private"),o.useEffect((()=>{u&&x(u)}),[u,x]),(0,D.A)((()=>{const t=(0,K.gk)(e),o=s.current;s.current=(0,_e.Go)(r),Object.entries(r).forEach((([e,r])=>{Object.entries(r).forEach((([r,i])=>{var a,s;const l=(null==(a=o[e])||null==(a=a[r])?void 0:a.mode)||cr.View,c=null!=(s=t[e])?s:e;i.mode===cr.Edit&&l===cr.View?C((0,n.A)({id:c,field:r},i)):i.mode===cr.View&&l===cr.Edit&&T((0,n.A)({id:c,field:r},i))}))}))}),[e,r,C,T])})(e,t),((e,t)=>{const[r,i]=o.useState({}),a=o.useRef(r),s=o.useRef({}),l=o.useRef(null),c=o.useRef(null),{processRowUpdate:u,onProcessRowUpdateError:d,rowModesModel:f,onRowModesModelChange:p}=t,h=e=>(...r)=>{t.editMode===lr.Row&&e(...r)},m=o.useCallback(((t,r)=>{const n=e.current.getCellParams(t,r);if(!e.current.isCellEditable(n))throw new Error(`MUI: The cell with id=${t} and field=${r} is not editable.`)}),[e]),g=o.useCallback(((t,r)=>{if(e.current.getRowMode(t)!==r)throw new Error(`MUI: The row with id=${t} is not in ${r} mode.`)}),[e]),y=o.useCallback(((t,r)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===ur.Edit)return;const o=e.current.getRowParams(t.id),i=(0,n.A)({},o,{field:t.field,reason:ln.cellDoubleClick});e.current.publishEvent("rowEditStart",i,r)}),[e]),v=o.useCallback((e=>{c.current=e}),[]),b=o.useCallback(((t,r)=>{t.isEditable&&e.current.getRowMode(t.id)!==ur.View&&(c.current=null,l.current=setTimeout((()=>{var o;if(l.current=null,(null==(o=c.current)?void 0:o.id)!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===ur.View)return;const o=e.current.getRowParams(t.id),i=(0,n.A)({},o,{field:t.field,reason:cn.rowFocusOut});e.current.publishEvent("rowEditStop",i,r)}})))}),[e]);o.useEffect((()=>()=>{clearTimeout(l.current)}),[]);const _=o.useCallback(((t,r)=>{if(t.cellMode===ur.Edit){if(229===r.which)return;let o;if("Escape"===r.key)o=cn.escapeKeyDown;else if("Enter"===r.key)o=cn.enterKeyDown;else if("Tab"===r.key){const n=(0,G.TI)(e).filter((r=>e.current.getColumn(r).type===ar||e.current.isCellEditable(e.current.getCellParams(t.id,r))));if(r.shiftKey?t.field===n[0]&&(o=cn.shiftTabKeyDown):t.field===n[n.length-1]&&(o=cn.tabKeyDown),r.preventDefault(),!o){const o=n.findIndex((e=>e===t.field)),i=n[r.shiftKey?o-1:o+1];e.current.setCellFocus(t.id,i)}}if(o){const i=(0,n.A)({},e.current.getRowParams(t.id),{reason:o,field:t.field});e.current.publishEvent("rowEditStop",i,r)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:r,cellParams:t,editMode:"row"}))return;if((0,Ge.TW)(r)||(r.ctrlKey||r.metaKey)&&"v"===r.key?o=ln.printableKeyDown:"Enter"===r.key?o=ln.enterKeyDown:"Delete"!==r.key&&"Backspace"!==r.key||(o=ln.deleteKeyDown),o){const i=e.current.getRowParams(t.id),a=(0,n.A)({},i,{field:t.field,reason:o});e.current.publishEvent("rowEditStart",a,r)}}}),[e]),x=o.useCallback((t=>{const{id:r,field:n,reason:o}=t,i={id:r,fieldToFocus:n};o!==ln.printableKeyDown&&o!==ln.deleteKeyDown||(i.deleteValue=!!n),e.current.startRowEditMode(i)}),[e]),w=o.useCallback((t=>{const{id:r,reason:n,field:o}=t;let i;e.current.runPendingEditCellValueMutation(r),n===cn.enterKeyDown?i="below":n===cn.tabKeyDown?i="right":n===cn.shiftTabKeyDown&&(i="left");const a="escapeKeyDown"===n;e.current.stopRowEditMode({id:r,ignoreModifications:a,field:o,cellToFocusAfter:i})}),[e]);Pe(e,"cellDoubleClick",h(y)),Pe(e,"cellFocusIn",h(v)),Pe(e,"cellFocusOut",h(b)),Pe(e,"cellKeyDown",h(_)),Pe(e,"rowEditStart",h(x)),Pe(e,"rowEditStop",h(w)),Le(e,"rowEditStart",t.onRowEditStart),Le(e,"rowEditStop",t.onRowEditStop);const A=o.useCallback((r=>{if(t.editMode===lr.Cell)return ur.View;const n=nn(e.current.state);return n[r]&&Object.keys(n[r]).length>0?ur.Edit:ur.View}),[e,t.editMode]),S=(0,rn.A)((r=>{const n=r!==t.rowModesModel;p&&n&&p(r,{}),t.rowModesModel&&n||(i(r),a.current=r,e.current.publishEvent("rowModesModelChange",r))})),C=o.useCallback(((e,t)=>{const r=(0,n.A)({},a.current);null!==t?r[e]=(0,n.A)({},t):delete r[e],S(r)}),[S]),E=o.useCallback(((t,r)=>{e.current.setState((e=>{const o=(0,n.A)({},e.editRows);return null!==r?o[t]=r:delete o[t],(0,n.A)({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),T=o.useCallback(((t,r,o)=>{e.current.setState((e=>{const i=(0,n.A)({},e.editRows);return null!==o?i[t]=(0,n.A)({},i[t],{[r]:(0,n.A)({},o)}):(delete i[t][r],0===Object.keys(i[t]).length&&delete i[t]),(0,n.A)({},e,{editRows:i})})),e.current.forceUpdate()}),[e]),I=o.useCallback((e=>{const{id:t}=e,r=(0,M.A)(e,un);g(t,ur.View),C(t,(0,n.A)({mode:ur.Edit},r))}),[g,C]),k=(0,rn.A)((t=>{const{id:r,fieldToFocus:n,deleteValue:o,initialValue:i}=t,a=(0,G.JR)(e).reduce(((t,a)=>{if(!e.current.getCellParams(r,a).isEditable)return t;let s=e.current.getCellValue(r,a);return n===a&&(o||i)&&(s=o?"":i),t[a]={value:s,error:!1,isProcessingProps:!1},t}),{});E(r,a),n&&e.current.setCellFocus(r,n)})),R=o.useCallback((e=>{const{id:t}=e,r=(0,M.A)(e,dn);g(t,ur.Edit),C(t,(0,n.A)({mode:ur.View},r))}),[g,C]),P=(0,rn.A)((t=>{const{id:r,ignoreModifications:n,field:o,cellToFocusAfter:i="none"}=t;e.current.runPendingEditCellValueMutation(r);const a=()=>{"none"!==i&&o&&e.current.moveFocusToRelativeCell(r,o,i),E(r,null),C(r,null)};if(n)return void a();const l=nn(e.current.state),c=e.current.getRow(r);if(Object.values(l[r]).some((e=>e.isProcessingProps)))return void(s.current[r].mode=ur.Edit);if(Object.values(l[r]).some((e=>e.error)))return s.current[r].mode=ur.Edit,void C(r,{mode:ur.Edit});const f=e.current.getRowWithUpdatedValuesFromRowEditing(r);if(u){const t=e=>{s.current[r].mode=ur.Edit,C(r,{mode:ur.Edit}),d?d(e):fn()};try{Promise.resolve(u(f,c)).then((t=>{e.current.updateRows([t]),a()})).catch(t)}catch(e){t(e)}}else e.current.updateRows([f]),a()})),O={setRowEditingEditCellValue:o.useCallback((t=>{const{id:r,field:o,value:i,debounceMs:a,unstable_skipValueParser:s}=t;m(r,o);const l=e.current.getColumn(o),c=e.current.getRow(r);let u=i;l.valueParser&&!s&&(u=l.valueParser(i,e.current.getCellParams(r,o)));let d=nn(e.current.state),f=(0,n.A)({},d[r][o],{value:u,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});return l.preProcessEditCellProps||T(r,o,f),new Promise((t=>{const i=[];if(l.preProcessEditCellProps){const a=f.value!==d[r][o].value;f=(0,n.A)({},f,{isProcessingProps:!0}),T(r,o,f);const s=d[r],p=(0,M.A)(s,[o].map(ze.A)),h=Promise.resolve(l.preProcessEditCellProps({id:r,row:c,props:f,hasChanged:a,otherFieldsProps:p})).then((i=>{e.current.getRowMode(r)!==ur.View?(d=nn(e.current.state),(i=(0,n.A)({},i,{isProcessingProps:!1})).value=l.preProcessEditCellProps?d[r][o].value:u,T(r,o,i)):t(!1)}));i.push(h)}Object.entries(d[r]).forEach((([a,s])=>{if(a===o)return;const l=e.current.getColumn(a);if(!l.preProcessEditCellProps)return;s=(0,n.A)({},s,{isProcessingProps:!0}),T(r,a,s),d=nn(e.current.state);const u=d[r],f=(0,M.A)(u,[a].map(ze.A)),p=Promise.resolve(l.preProcessEditCellProps({id:r,row:c,props:s,hasChanged:!1,otherFieldsProps:f})).then((o=>{e.current.getRowMode(r)!==ur.View?(o=(0,n.A)({},o,{isProcessingProps:!1}),T(r,a,o)):t(!1)}));i.push(p)})),Promise.all(i).then((()=>{e.current.getRowMode(r)===ur.Edit?(d=nn(e.current.state),t(!d[r][o].error)):t(!1)}))}))}),[e,m,T]),getRowWithUpdatedValuesFromRowEditing:o.useCallback((t=>{const r=nn(e.current.state),o=e.current.getRow(t);if(!r[t])return e.current.getRow(t);let i=(0,n.A)({},o);return Object.entries(r[t]).forEach((([t,r])=>{const n=e.current.getColumn(t);n.valueSetter?i=n.valueSetter({value:r.value,row:i}):i[t]=r.value})),i}),[e])};xe(e,{getRowMode:A,startRowEditMode:I,stopRowEditMode:R},"public"),xe(e,O,"private"),o.useEffect((()=>{f&&S(f)}),[f,S]),(0,D.A)((()=>{const t=(0,K.gk)(e),o=s.current;s.current=(0,_e.Go)(r),Object.entries(r).forEach((([e,r])=>{var i,a;const s=(null==(i=o[e])?void 0:i.mode)||ur.View,l=null!=(a=t[e])?a:e;r.mode===ur.Edit&&s===ur.View?k((0,n.A)({id:l},r)):r.mode===ur.View&&s===ur.Edit&&P((0,n.A)({id:l},r))}))}),[e,r,k,P])})(e,t);const r=o.useRef({}),{isCellEditable:i}=t,a=o.useCallback((e=>!Dt(e.rowNode)&&!!e.colDef.editable&&!!e.colDef.renderEditCell&&(!i||i(e))),[i]);o.useEffect((()=>{const e=r.current;return()=>{Object.entries(e).forEach((([t,r])=>{Object.keys(r).forEach((r=>{const[n]=e[t][r];clearTimeout(n),delete e[t][r]}))}))}}),[]);const s=o.useCallback(((e,t)=>{if(r.current[e])if(t){if(r.current[e][t]){const[,n]=r.current[e][t];n()}}else Object.keys(r.current[e]).forEach((t=>{const[,n]=r.current[e][t];n()}))}),[]),l=o.useCallback((n=>{const{id:o,field:i,debounceMs:a}=n;return new Promise((s=>{((e,t,n,o)=>{if(!n)return void o();if(r.current[e]||(r.current[e]={}),r.current[e][t]){const[n]=r.current[e][t];clearTimeout(n)}const i=setTimeout((()=>{o(),delete r.current[e][t]}),n);r.current[e][t]=[i,()=>{const[n]=r.current[e][t];clearTimeout(n),o(),delete r.current[e][t]}]})(o,i,a,(async()=>{const r=t.editMode===lr.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(o,i)===cr.Edit){const e=await r(n);s(e)}}))}))}),[e,t.editMode]),c=o.useCallback(((r,n)=>t.editMode===lr.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(r,n):e.current.getRowWithUpdatedValuesFromRowEditing(r)),[e,t.editMode]),u=o.useCallback(((t,r)=>{var n,o;return null!=(n=null==(o=nn(e.current.state)[t])?void 0:o[r])?n:null}),[e]),d={runPendingEditCellValueMutation:s};xe(e,{isCellEditable:a,setEditCellValue:l,getRowWithUpdatedValues:c,unstable_getEditCellMeta:u},"public"),xe(e,d,"private")})(r,t),((e,t)=>{const r=Qt(e,"useGridFocus"),i=o.useRef(null),a=o.useCallback(((t,r)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),r)}),[e]),s=o.useCallback(((t,o)=>{const i=le(e);(null==i?void 0:i.id)===t&&(null==i?void 0:i.field)===o||(e.current.setState((e=>(r.debug(`Focusing on cell with id=${t} and field=${o}`),(0,n.A)({},e,{tabIndex:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))),e.current.forceUpdate(),e.current.getRow(t)&&(i&&a(i,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,o))))}),[e,r,a]),l=o.useCallback(((t,o={})=>{const i=le(e);a(i,o),e.current.setState((e=>(r.debug(`Focusing on column header with colIndex=${t}`),(0,n.A)({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))),e.current.forceUpdate()}),[e,r,a]),c=o.useCallback(((t,o={})=>{const i=le(e);a(i,o),e.current.setState((e=>(r.debug(`Focusing on column header filter with colIndex=${t}`),(0,n.A)({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}})))),e.current.forceUpdate()}),[e,r,a]),u=o.useCallback(((t,r,o={})=>{const i=le(e);i&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(i.id,i.field),o),e.current.setState((e=>(0,n.A)({},e,{tabIndex:{columnGroupHeader:{field:t,depth:r},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:r},columnHeader:null,columnHeaderFilter:null,cell:null}}))),e.current.forceUpdate()}),[e]),d=o.useCallback((()=>de(e)),[e]),f=o.useCallback(((r,n,o)=>{let i=e.current.getColumnIndex(n);const a=(0,G.iv)(e),s=dr(e,{pagination:t.pagination,paginationMode:t.paginationMode}),l=(0,K.$2)(e),c=[].concat(l.top||[],s.rows,l.bottom||[]);let u=c.findIndex((e=>e.id===r));"right"===o?i+=1:"left"===o?i-=1:u+=1,i>=a.length?(u+=1,u=0&&(i=a.length-1)),u=(0,_e.qE)(u,0,c.length-1);const d=c[u];if(!d)return;const f=e.current.unstable_getCellColSpanInfo(d.id,i);f&&f.spannedByColSpan&&("left"===o||"below"===o?i=f.leftVisibleCellIndex:"right"===o&&(i=f.rightVisibleCellIndex)),i=(0,_e.qE)(i,0,a.length-1);const p=a[i];e.current.setCellFocus(d.id,p.field)}),[e,t.pagination,t.paginationMode]),p=o.useCallback((({id:t,field:r})=>{e.current.setCellFocus(t,r)}),[e]),h=o.useCallback(((t,r)=>{"Enter"===r.key||"Tab"===r.key||"Shift"===r.key||(0,Ge.q9)(r.key)||e.current.setCellFocus(t.id,t.field)}),[e]),m=o.useCallback((({field:t},r)=>{r.target===r.currentTarget&&e.current.setColumnHeaderFocus(t,r)}),[e]),g=o.useCallback((({fields:t,depth:r},n)=>{if(n.target!==n.currentTarget)return;const o=de(e);null!==o&&o.depth===r&&t.includes(o.field)||e.current.setColumnGroupHeaderFocus(t[0],r,n)}),[e]),y=o.useCallback(((t,o)=>{var i;null!=(i=o.relatedTarget)&&i.className.includes(z.x.columnHeader)||(r.debug("Clearing focus"),e.current.setState((e=>(0,n.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))))}),[r,e]),v=o.useCallback((e=>{i.current=e}),[]),b=o.useCallback((t=>{const r=i.current;i.current=null;const o=le(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:t,cell:r}))return;if(!o)return void(r&&e.current.setCellFocus(r.id,r.field));if((null==r?void 0:r.id)===o.id&&(null==r?void 0:r.field)===o.field)return;const s=e.current.getCellElement(o.id,o.field);null!=s&&s.contains(t.target)||(r?e.current.setCellFocus(r.id,r.field):(e.current.setState((e=>(0,n.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),a(o,t)))}),[e,a]),_=o.useCallback((t=>{if("view"===t.cellMode)return;const r=le(e);(null==r?void 0:r.id)===t.id&&(null==r?void 0:r.field)===t.field||e.current.setCellFocus(t.id,t.field)}),[e]),x=o.useCallback((()=>{const t=le(e);t&&!e.current.getRow(t.id)&&e.current.setState((e=>(0,n.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))}),[e]),w=(0,rn.A)((()=>{const r=le(e);if(!r)return;const o=dr(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(o.rows.find((e=>e.id===r.id)))return;const i=(0,G.iv)(e);e.current.setState((e=>(0,n.A)({},e,{tabIndex:{cell:{id:o.rows[0].id,field:i[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}})))})),A={moveFocusToRelativeCell:f,setColumnGroupHeaderFocus:u,getColumnGroupHeaderFocus:d};xe(e,{setCellFocus:s,setColumnHeaderFocus:l,setColumnHeaderFilterFocus:c},"public"),xe(e,A,"private"),o.useEffect((()=>{const t=(0,hn.A)(e.current.rootElementRef.current);return t.addEventListener("mouseup",b),()=>{t.removeEventListener("mouseup",b)}}),[e,b]),Pe(e,"columnHeaderBlur",y),Pe(e,"cellDoubleClick",p),Pe(e,"cellMouseDown",v),Pe(e,"cellKeyDown",h),Pe(e,"cellModeChange",_),Pe(e,"columnHeaderFocus",m),Pe(e,"columnGroupHeaderFocus",g),Pe(e,"rowsSet",x),Pe(e,"paginationModelChange",w)})(r,t),((e,t)=>{var r;const i=Qt(e,"useGridPreferencesPanel"),a=o.useRef(),s=o.useRef(),l=o.useCallback((()=>{i.debug("Hiding Preferences Panel");const t=(0,yn._)(e.current.state);t.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:t.openedPanelValue}),e.current.setState((e=>(0,n.A)({},e,{preferencePanel:{open:!1}}))),e.current.forceUpdate()}),[e,i]),c=o.useCallback((()=>{s.current=setTimeout((()=>clearTimeout(a.current)),0)}),[]),u=o.useCallback((()=>{a.current=setTimeout(l,100)}),[l]),d=o.useCallback(((t,r,o)=>{i.debug("Opening Preferences Panel"),c(),e.current.setState((e=>(0,n.A)({},e,{preferencePanel:(0,n.A)({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:r,labelId:o})}))),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t}),e.current.forceUpdate()}),[i,c,e]);xe(e,{showPreferences:d,hidePreferences:u},"public");const f=o.useCallback(((r,o)=>{var i;const a=(0,yn._)(e.current.state);return!o.exportOnlyDirtyModels||null!=(null==(i=t.initialState)?void 0:i.preferencePanel)||a.open?(0,n.A)({},r,{preferencePanel:a}):r}),[e,null==(r=t.initialState)?void 0:r.preferencePanel]),p=o.useCallback(((t,r)=>{const o=r.stateToRestore.preferencePanel;return null!=o&&e.current.setState((e=>(0,n.A)({},e,{preferencePanel:o}))),t}),[e]);Ve(e,"exportState",f),Ve(e,"restoreState",p),o.useEffect((()=>()=>{clearTimeout(a.current),clearTimeout(s.current)}),[])})(r,t),((e,t)=>{var r,i;const a=Qt(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:ie.ZI,changeEvent:"filterModelChange"});const s=o.useCallback((()=>{e.current.setState((r=>{const o=(0,ie.ZI)(r,e.current.instanceId),i="client"===t.filterMode?(0,wn.Fv)(o,e,t.disableEval):null,a=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:i,filterModel:null!=o?o:(0,xn.T)()}),s=(0,n.A)({},r,{filter:(0,n.A)({},r.filter,a)}),l=Cn(e,s);return(0,n.A)({},s,{visibleRowsLookup:l})})),e.current.publishEvent("filteredRowsSet")}),[e,t.filterMode,t.disableEval]),l=o.useCallback(((e,r)=>null==r||!1===r.filterable||t.disableColumnFilter?e:[...e,"columnMenuFilterItem"]),[t.disableColumnFilter]),c=o.useCallback((()=>{s(),e.current.forceUpdate()}),[e,s]),u=o.useCallback((t=>{const r=(0,ie.ZI)(e),o=[...r.items],i=o.findIndex((e=>e.id===t.id));-1===i?o.push(t):o[i]=t,e.current.setFilterModel((0,n.A)({},r,{items:o}),"upsertFilterItem")}),[e]),d=o.useCallback((t=>{const r=(0,ie.ZI)(e),o=[...r.items];t.forEach((e=>{const r=t.findIndex((t=>t.id===e.id));-1===r?o.push(e):o[r]=e})),e.current.setFilterModel((0,n.A)({},r,{items:t}),"upsertFilterItems")}),[e]),f=o.useCallback((t=>{const r=(0,ie.ZI)(e),o=r.items.filter((e=>e.id!==t.id));o.length!==r.items.length&&e.current.setFilterModel((0,n.A)({},r,{items:o}),"deleteFilterItem")}),[e]),p=o.useCallback(((r,o,i)=>{if(a.debug("Displaying filter panel"),r){const o=(0,ie.ZI)(e),i=o.items.filter((t=>{var r;if(void 0!==t.value)return!Array.isArray(t.value)||0!==t.value.length;const n=null==(r=e.current.getColumn(t.field).filterOperators)?void 0:r.find((e=>e.value===t.operator));return!(void 0===(null==n?void 0:n.requiresFilterValue)||(null==n?void 0:n.requiresFilterValue))}));let a;const s=i.find((e=>e.field===r)),l=e.current.getColumn(r);a=s?i:t.disableMultipleColumnsFiltering?[(0,wn.zk)({field:r,operator:l.filterOperators[0].value},e)]:[...i,(0,wn.zk)({field:r,operator:l.filterOperators[0].value},e)],e.current.setFilterModel((0,n.A)({},o,{items:a}))}e.current.showPreferences(Kr.y.filters,o,i)}),[e,a,t.disableMultipleColumnsFiltering]),h=o.useCallback((()=>{a.debug("Hiding filter panel"),e.current.hidePreferences()}),[e,a]),m=o.useCallback((t=>{const r=(0,ie.ZI)(e);r.logicOperator!==t&&e.current.setFilterModel((0,n.A)({},r,{logicOperator:t}),"changeLogicOperator")}),[e]),g=o.useCallback((t=>{const r=(0,ie.ZI)(e);(0,_e.Hv)(r.quickFilterValues,t)||e.current.setFilterModel((0,n.A)({},r,{quickFilterValues:[...t]}))}),[e]),y={setFilterLogicOperator:m,unstable_applyFilters:c,deleteFilterItem:f,upsertFilterItem:u,upsertFilterItems:d,setFilterModel:o.useCallback(((r,n)=>{(0,ie.ZI)(e)!==r&&(a.debug("Setting filter model"),e.current.updateControlState("filter",(0,wn.zU)(r,t.disableMultipleColumnsFiltering,e),n),e.current.unstable_applyFilters())}),[e,a,t.disableMultipleColumnsFiltering]),showFilterPanel:p,hideFilterPanel:h,setQuickFilterValues:g,ignoreDiacritics:t.ignoreDiacritics};xe(e,y,"public");const v=o.useCallback(((r,o)=>{var i;const a=(0,ie.ZI)(e);return o.exportOnlyDirtyModels&&null==t.filterModel&&null==(null==(i=t.initialState)||null==(i=i.filter)?void 0:i.filterModel)&&(0,_e.Hv)(a,(0,xn.T)())?r:(0,n.A)({},r,{filter:{filterModel:a}})}),[e,t.filterModel,null==(r=t.initialState)||null==(r=r.filter)?void 0:r.filterModel]),b=o.useCallback(((r,o)=>{var i;const a=null==(i=o.stateToRestore.filter)?void 0:i.filterModel;return null==a?r:(e.current.updateControlState("filter",(0,wn.zU)(a,t.disableMultipleColumnsFiltering,e),"restoreState"),(0,n.A)({},r,{callbacks:[...r.callbacks,e.current.unstable_applyFilters]}))}),[e,t.disableMultipleColumnsFiltering]),_=o.useCallback(((e,r)=>{if(r===Kr.y.filters){var o;const e=t.slots.filterPanel;return(0,x.jsx)(e,(0,n.A)({},null==(o=t.slotProps)?void 0:o.filterPanel))}return e}),[t.slots.filterPanel,null==(i=t.slotProps)?void 0:i.filterPanel]),{getRowId:w}=t,A=(0,_n.n)(En),S=o.useCallback((r=>{if("client"!==t.filterMode||!r.isRowMatchingFilters)return{filteredRowsLookup:{},filteredDescendantCountLookup:{}};const n=(0,K.rI)(e),o={},{isRowMatchingFilters:i}=r,a={},s={passingFilterItems:null,passingQuickFilterValues:null},l=A.current(e.current.state.rows.dataRowIdToModelLookup);for(let t=0;t{a.debug("onColUpdated - GridColumns changed, applying filters");const t=(0,ie.ZI)(e),r=(0,G.U8)(e),o=t.items.filter((e=>e.field&&r[e.field]));o.length{"filtering"===t&&e.current.unstable_applyFilters()}),[e]),T=o.useCallback((()=>{e.current.setState((t=>(0,n.A)({},t,{visibleRowsLookup:Cn(e,t)}))),e.current.forceUpdate()}),[e]);Pe(e,"rowsSet",s),Pe(e,"columnsChange",C),Pe(e,"activeStrategyProcessorChange",E),Pe(e,"rowExpansionChange",T),Pe(e,"columnVisibilityModelChange",(()=>{const t=(0,ie.ZI)(e);t.quickFilterValues&&t.quickFilterExcludeHiddenColumns&&e.current.unstable_applyFilters()})),$e((()=>{e.current.unstable_applyFilters()})),(0,D.A)((()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)}),[e,a,t.filterModel])})(r,t),((e,t)=>{var r;const i=Qt(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:ae.XU,changeEvent:"sortModelChange"});const a=o.useCallback(((t,r)=>{const n=(0,ae.XU)(e),o=n.findIndex((e=>e.field===t));let i=[...n];return o>-1?r?i.splice(o,1,r):i.splice(o,1):i=[...n,r],i}),[e]),s=o.useCallback(((r,o)=>{var i;const a=(0,ae.XU)(e).find((e=>e.field===r.field));if(a){var s;const e=void 0===o?_t(null!=(s=r.sortingOrder)?s:t.sortingOrder,a.sort):o;return null==e?void 0:(0,n.A)({},a,{sort:e})}return{field:r.field,sort:void 0===o?_t(null!=(i=r.sortingOrder)?i:t.sortingOrder):o}}),[e,t.sortingOrder]),l=o.useCallback(((e,r)=>null==r||!1===r.sortable?e:(r.sortingOrder||t.sortingOrder).some((e=>!!e))?[...e,"columnMenuSortItem"]:e),[t.sortingOrder]),c=o.useCallback((()=>{e.current.setState((r=>{if("server"===t.sortingMode)return i.debug("Skipping sorting rows as sortingMode = server"),(0,n.A)({},r,{sorting:(0,n.A)({},r.sorting,{sortedRows:Nt((0,K.qj)(e),It,!1)})});const o=((e,t)=>{const r=e.map((e=>((e,t)=>{const r=t.current.getColumn(e.field);return r?{getSortCellParams:e=>({id:e,field:r.field,rowNode:t.current.getRowNode(e),value:t.current.getCellValue(e,r.field),api:t.current}),comparator:"desc"===e.sort?(...e)=>-1*r.sortComparator(...e):r.sortComparator}:null})(e,t))).filter((e=>!!e));return 0===r.length?null:e=>e.map((e=>({node:e,params:r.map((t=>t.getSortCellParams(e.id)))}))).sort(((e,t)=>{return n=e,o=t,r.reduce(((e,t,r)=>{if(0!==e)return e;const i=n.params[r],a=o.params[r];return t.comparator(i.value,a.value,i,a)}),0);var n,o})).map((e=>e.node.id))})((0,ae.XU)(r,e.current.instanceId),e),a=e.current.applyStrategyProcessor("sorting",{sortRowList:o});return(0,n.A)({},r,{sorting:(0,n.A)({},r.sorting,{sortedRows:a})})})),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()}),[e,i,t.sortingMode]),u=o.useCallback((r=>{(0,ae.XU)(e)!==r&&(i.debug("Setting sort model"),e.current.setState(bt(r,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())}),[e,i,t.disableMultipleColumnsSorting]),d=o.useCallback(((r,n,o)=>{if(!r.sortable)return;const i=s(r,n);let l;l=!o||t.disableMultipleColumnsSorting?i?[i]:[]:a(r.field,i),e.current.setSortModel(l)}),[e,a,s,t.disableMultipleColumnsSorting]),f=o.useCallback((()=>(0,ae.XU)(e)),[e]),p=o.useCallback((()=>(0,ae.J6)(e).map((e=>e.model))),[e]),h=o.useCallback((()=>(0,ae.RJ)(e)),[e]),m=o.useCallback((t=>e.current.getSortedRowIds()[t]),[e]);xe(e,{getSortModel:f,getSortedRows:p,getSortedRowIds:h,getRowIdFromRowIndex:m,setSortModel:u,sortColumn:d,applySorting:c},"public");const g=o.useCallback(((r,o)=>{var i;const a=(0,ae.XU)(e);return!o.exportOnlyDirtyModels||null!=t.sortModel||null!=(null==(i=t.initialState)||null==(i=i.sorting)?void 0:i.sortModel)||a.length>0?(0,n.A)({},r,{sorting:{sortModel:a}}):r}),[e,t.sortModel,null==(r=t.initialState)||null==(r=r.sorting)?void 0:r.sortModel]),y=o.useCallback(((r,o)=>{var i;const a=null==(i=o.stateToRestore.sorting)?void 0:i.sortModel;return null==a?r:(e.current.setState(bt(a,t.disableMultipleColumnsSorting)),(0,n.A)({},r,{callbacks:[...r.callbacks,e.current.applySorting]}))}),[e,t.disableMultipleColumnsSorting]),v=o.useCallback((t=>{const r=(0,K.qj)(e),n=r[It],o=t.sortRowList?t.sortRowList(n.children.map((e=>r[e]))):[...n.children];return null!=n.footerId&&o.push(n.footerId),o}),[e]);Ve(e,"exportState",g),Ve(e,"restoreState",y),Yt(e,Be,"sorting",v);const b=o.useCallback((({colDef:e},t)=>{const r=t.shiftKey||t.metaKey||t.ctrlKey;d(e,void 0,r)}),[d]),_=o.useCallback((({colDef:e},t)=>{!(0,Ge.Ci)(t.key)||t.ctrlKey||t.metaKey||d(e,void 0,t.shiftKey)}),[d]),x=o.useCallback((()=>{const t=(0,ae.XU)(e),r=(0,G.gv)(e);if(t.length>0){const n=t.filter((e=>r[e.field]));n.length{"sorting"===t&&e.current.applySorting()}),[e]);Ve(e,"columnMenu",l),Pe(e,"columnHeaderClick",b),Pe(e,"columnHeaderKeyDown",_),Pe(e,"rowsSet",e.current.applySorting),Pe(e,"columnsChange",x),Pe(e,"activeStrategyProcessorChange",w),$e((()=>{e.current.applySorting()})),(0,D.A)((()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)}),[e,t.sortModel])})(r,t),((e,t)=>{const r=Qt(e,"useDensity"),i=o.useCallback((t=>{r.debug(`Set grid density to ${t}`),e.current.setState((e=>{const r=(0,V._v)(e),o={value:t,factor:Tn[t]};return(0,_e.Hv)(r,o)?e:(0,n.A)({},e,{density:o})})),e.current.forceUpdate()}),[r,e]);o.useEffect((()=>{e.current.setDensity(t.density)}),[e,t.density]),xe(e,{setDensity:i},"public")})(r,t),((e,t)=>{const r=Qt(e,"useGridColumnReorder"),i=o.useRef(null),a=o.useRef({x:0,y:0}),s=o.useRef(null),l=o.useRef({}),c=o.useRef(),u=(e=>{const{classes:t}=e;return(0,O.A)({columnHeaderDragging:["columnHeader--dragging"]},z.B,t)})({classes:t.classes}),d=(0,rr.A)();o.useEffect((()=>()=>{clearTimeout(c.current)}),[]);const f=o.useCallback(((o,a)=>{if(t.disableColumnReorder||o.colDef.disableReorder)return;r.debug(`Start dragging col ${o.field}`),a.stopPropagation(),i.current=a.currentTarget,i.current.classList.add(u.columnHeaderDragging),a.dataTransfer&&(a.dataTransfer.effectAllowed="move"),e.current.setState((e=>(0,n.A)({},e,{columnReorder:(0,n.A)({},e.columnReorder,{dragCol:o.field})}))),e.current.forceUpdate(),c.current=setTimeout((()=>{i.current.classList.remove(u.columnHeaderDragging)})),s.current=e.current.getColumnIndex(o.field,!1);const d=e.current.unstable_getColumnGroupPath(o.field),f=s.current,p=e.current.getAllColumns(),h=e.current.unstable_getAllGroupDetails(),m=t=>{const r=p[t].field;return e.current.unstable_getColumnGroupPath(r)};let g=null;d.forEach((e=>{var t;null!=(t=h[e])&&t.freeReordering||(f>0&&m(f-1).includes(e)||f+1=0&&m(t).includes(g)||r=0&&r{var n;m(t).includes(r)&&(d.includes(r)||null!=(n=h[r])&&n.freeReordering||(l.current[e]=!0))}))}}),[t.disableColumnReorder,u.columnHeaderDragging,r,e]),p=o.useCallback(((e,t)=>{t.preventDefault(),t.stopPropagation()}),[]),h=o.useCallback(((t,n)=>{const o=Ms(e);if(!o)return;r.debug(`Dragging over col ${t.field}`),n.preventDefault(),n.stopPropagation();const i={x:n.clientX,y:n.clientY};if(t.field!==o&&(c=i,(s=a.current).x!==c.x||s.y!==c.y)){const r=e.current.getColumnIndex(t.field,!1),n=e.current.getColumnIndex(t.field,!0),s=e.current.getColumn(t.field),c=e.current.getColumnIndex(o,!1),u=e.current.getVisibleColumns(),f=e.current.getAllColumns(),p=((e,t)=>e.x<=t.x?Ps:Rs)(a.current,i),h=p===Rs&&("rtl"===d.direction?c0&&!u[n-1].disableReorder:n0?u[n-1].field:null;o>0&&f[o].field!==e&&l.current[o];)i-=1,o=r+i;else for(e=n+1{const l=Ms(e);if(!t.disableColumnReorder&&l){if(r.debug("End dragging col"),a.preventDefault(),a.stopPropagation(),clearTimeout(c.current),i.current=null,"none"!==a.dataTransfer.dropEffect||t.keepColumnPositionIfDraggedOutside){const t={column:e.current.getColumn(l),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(l),oldIndex:s.current};e.current.publishEvent("columnOrderChange",t)}else e.current.setColumnIndex(l,s.current),s.current=null;e.current.setState((e=>(0,n.A)({},e,{columnReorder:(0,n.A)({},e.columnReorder,{dragCol:""})}))),e.current.forceUpdate()}}),[t.disableColumnReorder,t.keepColumnPositionIfDraggedOutside,r,e]);Pe(e,"columnHeaderDragStart",f),Pe(e,"columnHeaderDragEnter",p),Pe(e,"columnHeaderDragOver",h),Pe(e,"columnHeaderDragEnd",m),Pe(e,"cellDragEnter",p),Pe(e,"cellDragOver",h),Le(e,"columnOrderChange",t.onColumnOrderChange)})(r,t),((e,t)=>{const r=Qt(e,"useGridColumnResize"),i=o.useRef(),a=o.useRef(),s=o.useRef(),l=o.useRef(),c=o.useRef(),u=(0,rr.A)(),d=o.useRef(),f=o.useRef(),p=(0,en.Z)(),h=o.useRef(),m=e=>{r.debug(`Updating width to ${e} for col ${i.current.field}`);const t=a.current.offsetWidth,n=e-t;i.current.computedWidth=e,i.current.width=e,i.current.flex=0,a.current.style.width=`${e}px`,a.current.style.minWidth=`${e}px`,a.current.style.maxWidth=`${e}px`;const o=s.current;o&&(o.style.width=`${e}px`,o.style.minWidth=`${e}px`,o.style.maxWidth=`${e}px`),[...c.current,...l.current].forEach((t=>{const r=t;let o;o="1"===r.getAttribute("aria-colspan")?`${e}px`:`${r.offsetWidth+n}px`,r.style.width=o,r.style.minWidth=o,r.style.maxWidth=o}))},g=t=>{w(),i.current&&(e.current.setColumnWidth(i.current.field,i.current.width),r.debug(`Updating col ${i.current.field} with new width: ${i.current.width}`)),p.start(0,(()=>{e.current.publishEvent("columnResizeStop",null,t)}))},y=(0,rn.A)(g),v=(0,rn.A)((t=>{if(0===t.buttons)return void y(t);let r=Us(d.current,t.clientX,a.current.getBoundingClientRect(),f.current);r=(0,_e.qE)(r,i.current.minWidth,i.current.maxWidth),m(r);const n={element:a.current,colDef:i.current,width:r};e.current.publishEvent("columnResize",n,t)})),b=(0,rn.A)((e=>{js(e,h.current)&&g(e)})),_=(0,rn.A)((t=>{const r=js(t,h.current);if(!r)return;if("mousemove"===t.type&&0===t.buttons)return void b(t);let n=Us(d.current,r.x,a.current.getBoundingClientRect(),f.current);n=(0,_e.qE)(n,i.current.minWidth,i.current.maxWidth),m(n);const o={element:a.current,colDef:i.current,width:n};e.current.publishEvent("columnResize",o,t)})),x=(0,rn.A)((t=>{var n,o;if(!hr(t.target,z.x["columnSeparator--resizable"]))return;Bs()||t.preventDefault();const s=t.changedTouches[0];null!=s&&(h.current=s.identifier),a.current=hr(t.target,z.x.columnHeader);const p=a.current.getAttribute("data-field"),m=e.current.getColumn(p);l.current=Ds(null==(n=e.current.columnHeadersContainerElementRef)?void 0:n.current,p),r.debug(`Start Resize on col ${m.field}`),e.current.publishEvent("columnResizeStart",{field:p},t),i.current=m,a.current=function(e,t){return e.querySelector(`[data-field="${t}"]`)}(null==(o=e.current.columnHeadersElementRef)?void 0:o.current,m.field),c.current=Ns(a.current,e.current),f.current=Vs(t.target,u.direction),d.current=$s(s.clientX,a.current.getBoundingClientRect(),f.current);const g=(0,hn.A)(t.currentTarget);g.addEventListener("touchmove",_),g.addEventListener("touchend",b)})),w=o.useCallback((()=>{const t=(0,hn.A)(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",v),t.removeEventListener("mouseup",y),t.removeEventListener("touchmove",_),t.removeEventListener("touchend",b),setTimeout((()=>{t.removeEventListener("click",Gs,!0)}),100),a.current&&(a.current.style.pointerEvents="unset")}),[e,a,v,y,_,b]),A=o.useCallback((({field:t})=>{e.current.setState((e=>(0,n.A)({},e,{columnResize:(0,n.A)({},e.columnResize,{resizingColumnField:t})}))),e.current.forceUpdate()}),[e]),C=o.useCallback((()=>{e.current.setState((e=>(0,n.A)({},e,{columnResize:(0,n.A)({},e.columnResize,{resizingColumnField:""})}))),e.current.forceUpdate()}),[e]),E=(0,rn.A)((({colDef:t},n)=>{var o,p,h;if(0!==n.button)return;if(!n.currentTarget.classList.contains(z.x["columnSeparator--resizable"]))return;n.preventDefault(),r.debug(`Start Resize on col ${t.field}`),e.current.publishEvent("columnResizeStart",{field:t.field},n),i.current=t,a.current=null==(o=e.current.columnHeadersContainerElementRef)?void 0:o.current.querySelector(`[data-field="${t.field}"]`);const m=null==(p=e.current.headerFiltersElementRef)?void 0:p.current;m&&(s.current=m.querySelector(`[data-field="${t.field}"]`)),l.current=Ds(null==(h=e.current.columnHeadersContainerElementRef)?void 0:h.current,t.field),c.current=Ns(a.current,e.current);const g=(0,hn.A)(e.current.rootElementRef.current);g.body.style.cursor="col-resize",f.current=Vs(n.currentTarget,u.direction),d.current=$s(n.clientX,a.current.getBoundingClientRect(),f.current),g.addEventListener("mousemove",v),g.addEventListener("mouseup",y),g.addEventListener("click",Gs,!0)})),T=(0,rn.A)(((r,o)=>{if(t.disableAutosize)return;if(0!==o.button)return;const i=e.current.state.columns.lookup[r.field];!1!==i.resizable&&e.current.autosizeColumns((0,n.A)({},t.autosizeOptions,{columns:[i.field]}))})),I=function(e){const t=o.useRef(),r=()=>ki(e),n=(0,S.N)(e,r);return o.useEffect((()=>{t.current&&!1===n&&(t.current.resolve(),t.current=void 0)})),()=>{if(!t.current){if(!1===r())return Promise.resolve();t.current=function(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n}));return r.resolve=e,r.reject=t,r}()}return t.current}}(e),k=o.useRef(!1),M=o.useCallback((async t=>{var r,o;if(!(null==(r=e.current.rootElementRef)?void 0:r.current))return;if(k.current)return;k.current=!0;const i=(0,G.em)(e.current.state),a=(0,n.A)({},Fs,t,{columns:null!=(o=null==t?void 0:t.columns)?o:i.orderedFields});a.columns=a.columns.filter((e=>!1!==i.columnVisibilityModel[e]));const s=a.columns.map((t=>e.current.state.columns.lookup[t]));try{e.current.unstable_setColumnVirtualization(!1),await I();const t=function(e,t,r){const n={},o=e.current.rootElementRef.current;return o.classList.add(z.x.autosizing),r.forEach((r=>{const o=function(e,t){const r=e.virtualScrollerRef.current,n=e=>`:scope > div > div > div > [data-field="${t}"][role="${e}"]`;return Array.from(r.querySelectorAll(`${n("cell")}, ${n("gridcell")}`))}(e.current,r.field).map((e=>{var t,r;const n=window.getComputedStyle(e,null);return parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+(null!=(t=null==(r=e.firstElementChild)?void 0:r.getBoundingClientRect().width)?t:0)})),i=t.includeOutliers?o:function(e,t){if(e.length<4)return e;const r=e.slice();r.sort(((e,t)=>e-t));const n=r[Math.floor(.25*r.length)],o=r[Math.floor(.75*r.length)-1],i=o-n,a=i<5?5:i*t;return r.filter((e=>e>n-a&&e div > div > [data-field="${t}"][role="columnheader"]`):null}(e.current,r.field);if(t){const e=t.querySelector(`.${z.x.columnHeaderTitle}`),r=t.querySelector(`.${z.x.columnHeaderTitleContainerContent}`),n=null!=e?e:r,o=window.getComputedStyle(t,null),a=parseInt(o.paddingLeft,10)+parseInt(o.paddingRight,10)+(n.scrollWidth+1);i.push(a)}}const a=r.minWidth!==-1/0&&void 0!==r.minWidth,s=r.maxWidth!==1/0&&void 0!==r.maxWidth,l=a?r.minWidth:0,c=s?r.maxWidth:1/0,u=0===i.length?0:Math.max(...i);n[r.field]=(0,_e.qE)(u,l,c)})),o.classList.remove(z.x.autosizing),n}(e,a,s),r=s.map((e=>(0,n.A)({},e,{width:t[e.field],computedWidth:t[e.field]})));if(a.expand){var l,c;const n=i.orderedFields.map((e=>i.lookup[e])).filter((e=>!1!==i.columnVisibilityModel[e.field])).reduce(((e,r)=>{var n,o;return e+(null!=(n=null!=(o=t[r.field])?o:r.computedWidth)?n:r.width)}),0),o=(null!=(l=null==(c=e.current.getRootDimensions())?void 0:c.viewportInnerSize.width)?l:0)-n;if(o>0){const e=o/(r.length||1);r.forEach((t=>{t.width+=e,t.computedWidth+=e}))}}e.current.updateColumns(r)}finally{e.current.unstable_setColumnVirtualization(!0),k.current=!1}}),[e,I]);o.useEffect((()=>w),[w]),(0,Ls.y)((()=>{t.autosizeOnMount&&Promise.resolve().then((()=>{e.current.autosizeColumns(t.autosizeOptions)}))})),Ts(e,(()=>{var t;return null==(t=e.current.columnHeadersElementRef)?void 0:t.current}),"touchstart",x,{passive:Bs()}),xe(e,{autosizeColumns:M},"public"),Pe(e,"columnResizeStop",C),Pe(e,"columnResizeStart",A),Pe(e,"columnSeparatorMouseDown",E),Pe(e,"columnSeparatorDoubleClick",T),Le(e,"columnResize",t.onColumnResize),Le(e,"columnWidthChange",t.onColumnWidthChange)})(r,t),((e,t)=>{((e,t)=>{var r;const i=Qt(e,"useGridPaginationModel"),a=(0,S.N)(e,V.rf),s=Math.floor(t.rowHeight*a);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:nt,changeEvent:"paginationModelChange"});const l=o.useCallback((t=>{const r=nt(e);t!==r.page&&(i.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:r.pageSize}))}),[e,i]),c=o.useCallback((t=>{const r=nt(e);t!==r.pageSize&&(i.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:r.page}))}),[e,i]),u=o.useCallback((r=>{const o=nt(e);r!==o&&(i.debug("Setting 'paginationModel' to",r),e.current.setState((e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{paginationModel:kn(e.pagination,t.signature,r)})}))))}),[e,i,t.signature]);xe(e,{setPage:l,setPageSize:c,setPaginationModel:u},"public");const d=o.useCallback(((r,o)=>{var i;const a=nt(e);return!o.exportOnlyDirtyModels||null!=t.paginationModel||null!=(null==(i=t.initialState)||null==(i=i.pagination)?void 0:i.paginationModel)||0!==a.page&&a.pageSize!==(t.autoPageSize?0:100)?(0,n.A)({},r,{pagination:(0,n.A)({},r.pagination,{paginationModel:a})}):r}),[e,t.paginationModel,null==(r=t.initialState)||null==(r=r.pagination)?void 0:r.paginationModel,t.autoPageSize]),f=o.useCallback(((r,o)=>{var i,a;const s=null!=(i=o.stateToRestore.pagination)&&i.paginationModel?(0,n.A)({},et(t.autoPageSize),null==(a=o.stateToRestore.pagination)?void 0:a.paginationModel):nt(e);return e.current.setState((e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{paginationModel:kn(e.pagination,t.signature,s)})}))),r}),[e,t.autoPageSize,t.signature]);Ve(e,"exportState",d),Ve(e,"restoreState",f);const p=o.useCallback((()=>{if(!t.autoPageSize)return;const r=e.current.getRootDimensions()||{viewportInnerSize:{height:0}},n=Ft(e),o=Math.floor((r.viewportInnerSize.height-n.top-n.bottom)/s);e.current.setPageSize(o)}),[e,t.autoPageSize,s]),h=o.useCallback((t=>{if(null==t)return;const r=nt(e),n=st(e);r.page>n-1&&e.current.setPage(Math.max(0,n-1))}),[e]);Pe(e,"viewportInnerSizeChange",p),Pe(e,"paginationModelChange",(()=>{var t;const r=nt(e);null!=(t=e.current.virtualScrollerRef)&&t.current&&e.current.scrollToIndexes({rowIndex:r.page*r.pageSize})})),Pe(e,"rowCountChange",h),o.useEffect((()=>{e.current.setState((e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{paginationModel:kn(e.pagination,t.signature,t.paginationModel)})})))}),[e,t.paginationModel,t.paginationMode,t.signature]),o.useEffect(p,[p])})(e,t),((e,t)=>{var r;const i=Qt(e,"useGridRowCount"),a=(0,S.N)(e,ie.RN),s=(0,S.N)(e,ot);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:ot,changeEvent:"rowCountChange"});const l=o.useCallback((t=>{s!==t&&(i.debug("Setting 'rowCount' to",t),e.current.setState((e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{rowCount:t})}))))}),[e,i,s]);xe(e,{setRowCount:l},"public");const c=o.useCallback(((r,o)=>{var i;const a=ot(e);return o.exportOnlyDirtyModels&&null==t.rowCount&&null==(null==(i=t.initialState)||null==(i=i.pagination)?void 0:i.rowCount)?r:(0,n.A)({},r,{pagination:(0,n.A)({},r.pagination,{rowCount:a})})}),[e,t.rowCount,null==(r=t.initialState)||null==(r=r.pagination)?void 0:r.rowCount]),u=o.useCallback(((t,r)=>{var o;const i=null!=(o=r.stateToRestore.pagination)&&o.rowCount?r.stateToRestore.pagination.rowCount:ot(e);return e.current.setState((e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{rowCount:i})}))),t}),[e]);Ve(e,"exportState",c),Ve(e,"restoreState",u),o.useEffect((()=>{}),[t.rowCount,t.paginationMode]),o.useEffect((()=>{"client"===t.paginationMode?e.current.setRowCount(a):null!=t.rowCount&&e.current.setRowCount(t.rowCount)}),[e,a,t.paginationMode,t.rowCount])})(e,t)})(r,t),((e,t)=>{const{getRowHeight:r,getRowSpacing:i,getEstimatedRowHeight:a}=t,s=o.useRef(Object.create(null)),l=o.useRef(-1),c=o.useRef(!1),u=(0,S.N)(e,V.rf),d=(0,S.N)(e,ie.ZI),f=(0,S.N)(e,rt),p=(0,S.N)(e,ae.XU),h=fr(e,t),m=(0,S.N)(e,K.$2),g=ts(t.rowHeight,Qa.rowHeight),y=Math.floor(g*u),v=o.useCallback((()=>{var t,o;c.current=!1;const d=t=>{s.current[t.id]||(s.current[t.id]={sizes:{baseCenter:y},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:o,needsFirstMeasurement:l,sizes:d}=s.current[t.id];let f="number"==typeof y&&y>0?y:52;const p=d.baseCenter;if(o)f=p;else if(r){const e=r((0,n.A)({},t,{densityFactor:u}));if("auto"===e){if(l){const e=a?a((0,n.A)({},t,{densityFactor:u})):y;f=null!=e?e:y}else f=p;c.current=!0,s.current[t.id].autoHeight=!0}else f=ts(e,y),s.current[t.id].needsFirstMeasurement=!1,s.current[t.id].autoHeight=!1}else s.current[t.id].needsFirstMeasurement=!1;const m={};for(const e in d)/^base[A-Z]/.test(e)&&(m[e]=d[e]);if(m.baseCenter=f,i){var g,v;const r=e.current.getRowIndexRelativeToVisibleRows(t.id),o=i((0,n.A)({},t,{isFirstVisible:0===r,isLastVisible:r===h.rows.length-1,indexRelativeToCurrentPage:r}));m.spacingTop=null!=(g=o.top)?g:0,m.spacingBottom=null!=(v=o.bottom)?v:0}const b=e.current.unstable_applyPipeProcessors("rowHeight",m,t);return s.current[t.id].sizes=b,b},f=[],p=h.rows.reduce(((e,t)=>{f.push(e);let r=0,n=0;const o=d(t);for(const e in o){const t=o[e];/^base[A-Z]/.test(e)?r=t>r?t:r:n+=t}return e+r+n}),0);null==m||null==(t=m.top)||t.forEach((e=>{d(e)})),null==m||null==(o=m.bottom)||o.forEach((e=>{d(e)})),e.current.setState((e=>(0,n.A)({},e,{rowsMeta:{currentPageTotalHeight:p,positions:f}}))),c.current||(l.current=1/0),e.current.forceUpdate()}),[e,h.rows,y,r,i,a,m,u]),b=o.useCallback((e=>{const t=s.current[e];return t?t.sizes.baseCenter:y}),[y]),_=o.useCallback(((e,t)=>{s.current[e].sizes.baseCenter=t,s.current[e].isResized=!0,s.current[e].needsFirstMeasurement=!1,v()}),[v]),x=o.useMemo((()=>(0,Rn.A)(v,t.rowPositionsDebounceMs)),[v,t.rowPositionsDebounceMs]),w=o.useCallback(((e,t,r)=>{if(!s.current[e]||!s.current[e].autoHeight)return;const n=s.current[e].sizes[`base${(0,P.A)(r)}`]!==t;s.current[e].needsFirstMeasurement=!1,s.current[e].sizes[`base${(0,P.A)(r)}`]=t,n&&x()}),[x]),A=o.useCallback((e=>{var t;return(null==(t=s.current[e])?void 0:t.autoHeight)||!1}),[]),C=o.useCallback((()=>l.current),[]),E=o.useCallback((e=>{c.current&&e>l.current&&(l.current=e)}),[]),T=o.useCallback((()=>{s.current={},v()}),[v]);o.useEffect((()=>{v()}),[y,d,f,p,v]),_r(e,"rowHeight",v);const I={getLastMeasuredRowIndex:C,rowHasAutoHeight:A};xe(e,{unstable_setLastMeasuredRowIndex:E,unstable_getRowHeight:b,unstable_getRowInternalSizes:e=>{var t;return null==(t=s.current[e])?void 0:t.sizes},unstable_setRowHeight:_,unstable_storeRowHeightMeasurement:w,resetRowHeights:T},"public"),xe(e,I,"private")})(r,t),((e,t)=>{const r=Qt(e,"useGridRowReorder"),n=(0,S.N)(e,ae.XU),i=(0,S.N)(e,K.V2),a=o.useRef(null),s=o.useRef(null),l=o.useRef(),c=(e=>{const{classes:t}=e;return(0,O.A)({rowDragging:["row--dragging"]},z.B,t)})({classes:t.classes}),[u,d]=o.useState("");o.useEffect((()=>()=>{clearTimeout(l.current)}),[]);const f=o.useMemo((()=>!t.rowReordering||!!n.length||1!==i),[t.rowReordering,n,i]),p=o.useCallback(((t,n)=>{const o=nn(e.current.state);f||0!==Object.keys(o).length||(r.debug(`Start dragging row ${t.id}`),n.stopPropagation(),a.current=n.currentTarget,a.current.classList.add(c.rowDragging),d(t.id),l.current=setTimeout((()=>{a.current.classList.remove(c.rowDragging)})),s.current=e.current.getRowIndexRelativeToVisibleRows(t.id),e.current.setCellFocus(t.id,Ql.field))}),[f,c.rowDragging,r,e]),h=o.useCallback(((t,n)=>{if(""===u)return;const o=e.current.getRowNode(t.id);if(!o||"footer"===o.type||"pinnedRow"===o.type)return;r.debug(`Dragging over row ${t.id}`),n.preventDefault(),n.stopPropagation();const i=tc?tc.y-n.clientY:n.clientY;if(t.id!==u){const r=e.current.getRowIndexRelativeToVisibleRows(t.id),n={dragDirection:i>0?ec.DOWN:ec.UP,previousTargetId:t.id},o=n.dragDirection!==rc.dragDirection||n.previousTargetId!==rc.previousTargetId;(null===rc.dragDirection||Math.abs(i)>=1&&o)&&(e.current.setRowIndex(u,r),rc=n)}tc={x:n.clientX,y:n.clientY}}),[e,r,u]),m=o.useCallback(((t,n)=>{const o=nn(e.current.state);if(""!==u&&!f&&0===Object.keys(o).length){if(r.debug("End dragging row"),n.preventDefault(),n.stopPropagation(),clearTimeout(l.current),a.current=null,rc.dragDirection=null,"none"===n.dataTransfer.dropEffect)e.current.setRowIndex(u,s.current),s.current=null;else{const r={row:e.current.getRow(u),targetIndex:e.current.getRowIndexRelativeToVisibleRows(t.id),oldIndex:s.current};e.current.publishEvent("rowOrderChange",r)}d("")}}),[f,r,e,u]);Pe(e,"rowDragStart",p),Pe(e,"rowDragOver",h),Pe(e,"rowDragEnd",m),Pe(e,"cellDragOver",h),Le(e,"rowOrderChange",t.onRowOrderChange)})(r,t),((e,t)=>{const r=(0,rr.A)(),n=Qt(e,"useGridScroll"),i=e.current.columnHeadersElementRef,a=e.current.virtualScrollerRef,s=(0,S.N)(e,ie.em),l=o.useCallback((r=>{const o=(0,K.H0)(e),i=(0,G.iv)(e);if(null!=r.rowIndex&&0===o||0===i.length)return!1;n.debug(`Scrolling to cell at row ${r.rowIndex}, col: ${r.colIndex} `);let l={};if(null!=r.colIndex){const t=(0,G.Sw)(e);let n;if(void 0!==r.rowIndex){var c;const t=null==(c=s[r.rowIndex])?void 0:c.id,o=e.current.unstable_getCellColSpanInfo(t,r.colIndex);o&&!o.spannedByColSpan&&(n=o.cellProps.width)}void 0===n&&(n=i[r.colIndex].computedWidth),l.left=gs({clientHeight:a.current.clientWidth,scrollTop:Math.abs(a.current.scrollLeft),offsetHeight:n,offsetTop:t[r.colIndex]})}if(null!=r.rowIndex){var u,d;const n=Ei(e.current.state),o=it(e),i=at(e),s=t.pagination?r.rowIndex-o*i:r.rowIndex,c=n.positions[s+1]?n.positions[s+1]-n.positions[s]:n.currentPageTotalHeight-n.positions[s],f=(null==(u=a.current.querySelector(`.${z.x["pinnedRows--top"]}`))?void 0:u.clientHeight)||0,p=(null==(d=a.current.querySelector(`.${z.x["pinnedRows--bottom"]}`))?void 0:d.clientHeight)||0;l.top=gs({clientHeight:a.current.clientHeight-f-p,scrollTop:a.current.scrollTop,offsetHeight:c,offsetTop:n.positions[s]})}return l=e.current.unstable_applyPipeProcessors("scrollToIndexes",l,r),(void 0!==typeof l.left||void 0!==typeof l.top)&&(e.current.scroll(l),!0)}),[n,e,a,t.pagination,s]),c=o.useCallback((e=>{if(a.current&&null!=e.left&&i.current){const t="rtl"===r.direction?-1:1;i.current.scrollLeft=e.left,a.current.scrollLeft=t*e.left,n.debug(`Scrolling left: ${e.left}`)}a.current&&null!=e.top&&(a.current.scrollTop=e.top,n.debug(`Scrolling top: ${e.top}`)),n.debug("Scrolling, updating container, and viewport")}),[a,r.direction,i,n]),u=o.useCallback((()=>null!=a&&a.current?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0}),[a]);xe(e,{scroll:c,scrollToIndexes:l,getScrollPosition:u},"public")})(r,t),((e,t)=>{const r=(0,S.N)(e,G.iv),n=fr(e,t),i=(0,S.N)(e,Ei),a=Math.max(i.currentPageTotalHeight,1),s=o.useRef(!1),l=o.useCallback((o=>{const i=e.current.getRootDimensions();if(!i||"client"!==t.rowsLoadingMode)return;const l=o.top+i.viewportOuterSize.height,c=e.current.getViewportPageSize();if(l=a-t.scrollEndThreshold&&!s.current){const t={visibleColumns:r,viewportPageSize:c,visibleRowsCount:n.rows.length};e.current.publishEvent("rowsScrollEnd",t),s.current=!0}}),[a,t.scrollEndThreshold,t.rowsLoadingMode,r,e,n.rows.length]),c=o.useCallback((({left:e,top:t})=>{l({left:e,top:t})}),[l]);Pe(e,"scrollPositionChange",c),Le(e,"rowsScrollEnd",t.onRowsScrollEnd)})(r,t),((e,t)=>{var r;const n=fr(e,t),i=(0,S.N)(e,ae.XU),a=(0,S.N)(e,ie.ZI),s=o.useRef({firstRowToRender:0,lastRowToRender:0}),{lazyLoading:l}=null!=(r=t.experimentalFeatures)?r:{},c=o.useCallback((()=>{const r=e.current.getRenderContext(),[o,i]=Oi({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:n.rows.length,buffer:t.rowBuffer});return{firstRowToRender:o,lastRowToRender:i}}),[e,t.rowBuffer,n.rows.length]),u=o.useCallback((r=>{const o=e.current.getRootDimensions();if(nc({lazyLoadingFeatureFlag:l,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:o}))return;const c={firstRowToRender:r.firstRowToRender,lastRowToRender:r.lastRowToRender,sortModel:i,filterModel:a};if(s.current.firstRowToRender!==r.firstRowToRender||s.current.lastRowToRender!==r.lastRowToRender){if(0===i.length&&0===a.items.length){const t=function({apiRef:e,visibleRows:t,range:r}){let{firstRowIndex:n,lastRowIndex:o}=r;const i=t.slice(r.firstRowIndex,r.lastRowIndex);let a=0,s=i.length-1,l=!1;for(;!l&&n{const n=e.current.getRootDimensions();if(nc({lazyLoadingFeatureFlag:l,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:n}))return;e.current.requestPipeProcessorsApplication("hydrateRows");const{firstRowToRender:o,lastRowToRender:i}=c(),s={firstRowToRender:o,lastRowToRender:i,sortModel:r,filterModel:a};e.current.publishEvent("fetchRows",s)}),[e,t.rowsLoadingMode,a,l,c]),f=o.useCallback((r=>{const n=e.current.getRootDimensions();if(nc({lazyLoadingFeatureFlag:l,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:n}))return;e.current.requestPipeProcessorsApplication("hydrateRows");const{firstRowToRender:o,lastRowToRender:a}=c(),s={firstRowToRender:o,lastRowToRender:a,sortModel:i,filterModel:r};e.current.publishEvent("fetchRows",s)}),[e,t.rowsLoadingMode,i,l,c]);Pe(e,"renderedRowsIntervalChange",u),Pe(e,"sortModelChange",d),Pe(e,"filterModelChange",f),Le(e,"fetchRows",t.onFetchRows)})(r,t),(e=>{const t=Qt(e,"useGridColumnMenu"),r=o.useCallback((r=>{e.current.setState((e=>e.columnMenu.open&&e.columnMenu.field===r?e:(t.debug("Opening Column Menu"),(0,n.A)({},e,{columnMenu:{open:!0,field:r}}))))&&(e.current.hidePreferences(),e.current.forceUpdate())}),[e,t]),i=o.useCallback((()=>{const r=ye(e.current.state);if(r.field){const t=(0,G.gv)(e),n=(0,G.FY)(e),o=(0,G.JR)(e);let i=r.field;if(t[i]||(i=o[0]),!1===n[i]){const e=o.filter((e=>e===i||!1!==n[e])),t=e.indexOf(i);i=e[t+1]||e[t-1]}e.current.setColumnHeaderFocus(i)}e.current.setState((e=>e.columnMenu.open||void 0!==e.columnMenu.field?(t.debug("Hiding Column Menu"),(0,n.A)({},e,{columnMenu:(0,n.A)({},e.columnMenu,{open:!1,field:void 0})})):e))&&e.current.forceUpdate()}),[e,t]),a=o.useCallback((n=>{t.debug("Toggle Column Menu");const o=ye(e.current.state);o.open&&o.field===n?i():r(n)}),[e,t,r,i]);xe(e,{showColumnMenu:r,hideColumnMenu:i,toggleColumnMenu:a},"public"),Pe(e,"columnResizeStart",i),Pe(e,"virtualScrollerWheel",e.current.hideColumnMenu),Pe(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(r),Es(r,t),((e,t)=>{const r=Qt(e,"useGridPrintExport"),i=o.useRef(null),a=o.useRef(null),s=o.useRef({}),l=o.useRef([]);o.useEffect((()=>{i.current=(0,hn.A)(e.current.rootElementRef.current)}),[e]);const c=o.useCallback(((t,r,n)=>new Promise((o=>{const i=_s({apiRef:e,options:{fields:t,allColumns:r}}).map((e=>e.field)),a=(0,G.OV)(e),s={};a.forEach((e=>{s[e.field]=i.includes(e.field)})),n&&(s[Zt.field]=!0),e.current.setColumnVisibilityModel(s),o()}))),[e]),u=o.useCallback((t=>{const r=t({apiRef:e}).map((t=>e.current.getRow(t)));e.current.setRows(r)}),[e]),d=o.useCallback(((r,o)=>{var a,s;const l=(0,n.A)({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},o),c=r.contentDocument;if(!c)return;const u=Ei(e.current.state),d=e.current.rootElementRef.current,f=d.cloneNode(!0);f.querySelector(`.${z.x.main}`).style.overflow="visible",f.style.contain="size",f.querySelector(`.${z.x.columnHeaders}`).querySelector(`.${z.x.columnHeadersInner}`).style.width="100%";let p=(null==(a=d.querySelector(`.${z.x.toolbarContainer}`))?void 0:a.offsetHeight)||0,h=(null==(s=d.querySelector(`.${z.x.footerContainer}`))?void 0:s.offsetHeight)||0;var m,g;l.hideToolbar&&(null==(m=f.querySelector(`.${z.x.toolbarContainer}`))||m.remove(),p=0),l.hideFooter&&(null==(g=f.querySelector(`.${z.x.footerContainer}`))||g.remove(),h=0);const y=u.currentPageTotalHeight+Yr(e,t.columnHeaderHeight)+p+h;if(f.style.height=`${y}px`,f.style.boxSizing="content-box",null!=o&&o.getRowsToExport){const e=f.querySelector(`.${z.x.footerContainer}`);e.style.position="absolute",e.style.width="100%",e.style.top=y-h+"px"}const v=document.createElement("div");v.appendChild(f),c.body.innerHTML=v.innerHTML;const b="function"==typeof l.pageStyle?l.pageStyle():l.pageStyle;if("string"==typeof b){const e=c.createElement("style");e.appendChild(c.createTextNode(b)),c.head.appendChild(e)}l.bodyClassName&&c.body.classList.add(...l.bodyClassName.split(" "));const _=[];if(l.copyStyles){const e=d.getRootNode(),t=("ShadowRoot"===e.constructor.name?e:i.current).querySelectorAll("style, link[rel='stylesheet']");for(let e=0;e{e.addEventListener("load",(()=>t()))}))),c.head.appendChild(e)}}}Promise.all(_).then((()=>{r.contentWindow.print()}))}),[e,i,t.columnHeaderHeight]),f=o.useCallback((t=>{var r;i.current.body.removeChild(t),e.current.restoreState(a.current||{}),null!=(r=a.current)&&null!=(r=r.columns)&&r.columnVisibilityModel||e.current.setColumnVisibilityModel(s.current),e.current.unstable_setVirtualization(!0),e.current.setRows(l.current),a.current=null,s.current={},l.current=[]}),[e]),p=o.useCallback((async o=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");a.current=e.current.exportState(),s.current=(0,G.FY)(e);const p=(0,K.rI)(e);if(l.current=(0,K.A6)(e).map((e=>p[e])),t.pagination){const t={page:0,pageSize:(0,ie.O7)(e)};e.current.setState((e=>(0,n.A)({},e,{pagination:(0,n.A)({},e.pagination,{paginationModel:kn(e.pagination,"DataGridPro",t)})}))),e.current.forceUpdate()}await c(null==o?void 0:o.fields,null==o?void 0:o.allColumns,null==o?void 0:o.includeCheckboxes),null!=o&&o.getRowsToExport&&u(o.getRowsToExport),e.current.unstable_setVirtualization(!1),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const h=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(null==o?void 0:o.fileName);h.onload=()=>{d(h,o),h.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&f(h)}))},i.current.body.appendChild(h)}),[t,r,e,d,f,c,u]);xe(e,{exportDataAsPrint:p},"public");const h=o.useCallback(((e,t)=>{var r;return null!=(r=t.printOptions)&&r.disableToolbarButton?e:[...e,{component:(0,x.jsx)(Cs,{options:t.printOptions}),componentName:"printExport"}]}),[]);Ve(e,"exportMenu",h)})(r,t),((e,t)=>{const r=t.unstable_ignoreValueFormatterDuringExport,n=("object"==typeof r?null==r?void 0:r.clipboardExport:r)||!1,i=t.clipboardCopyCellDelimiter,a=o.useCallback((t=>{if(!t.ctrlKey&&!t.metaKey||"c"!==t.key)return;if(r=t.target,null!=(o=window.getSelection())&&o.toString()||r&&(r.selectionEnd||0)-(r.selectionStart||0)>0)return;var r,o;let a="";if(e.current.getSelectedRows().size>0)a=e.current.getDataAsCsv({includeHeaders:!1,delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1});else{const t=le(e);if(t){const r=e.current.getCellParams(t.id,t.field);a=vs(r,{csvOptions:{delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:n})}}var s;a=e.current.unstable_applyPipeProcessors("clipboardCopy",a),a&&(s=a,navigator.clipboard?navigator.clipboard.writeText(s).catch((()=>{Is(s)})):Is(s),e.current.publishEvent("clipboardCopy",a))}),[e,n,i]);Ts(e,e.current.rootElementRef,"keydown",a),Le(e,"clipboardCopy",t.onClipboardCopy)})(r,t),function(e,t){const r=Qt(e,"useResizeContainer"),n=o.useRef(!1),i=o.useRef(null),a=o.useRef(null),s=(0,S.N)(e,Ei),l=(0,S.N)(e,V.rf),c=Math.floor(t.rowHeight*l),u=Yr(e,t.columnHeaderHeight),d=o.useCallback((()=>{var r;const n=null==(r=e.current.rootElementRef)?void 0:r.current,o=(0,G.fc)(e),l=Ft(e);if(!i.current)return;let c,d,f,p;if(null!=t.scrollbarSize)c=t.scrollbarSize;else if(o&&n){const e=(0,hn.A)(n).createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.overflow="scroll",e.className="scrollDiv",n.appendChild(e),c=e.offsetWidth-e.clientWidth,n.removeChild(e)}else c=0;if(t.autoHeight)p=!1,f=Math.round(o)>Math.round(i.current.width),d={width:i.current.width,height:s.currentPageTotalHeight+(f?c:0)};else{d={width:i.current.width,height:Math.max(i.current.height-u,0)};const e=(({content:e,container:t,scrollBarSize:r})=>{const n=e.width>t.width,o=e.height>t.height;let i=!1,a=!1;return(n||o)&&(i=n,a=e.height+(i?r:0)>t.height,a&&(i=e.width+r>t.width)),{hasScrollX:i,hasScrollY:a}})({content:{width:Math.round(o),height:s.currentPageTotalHeight},container:{width:Math.round(d.width),height:d.height-l.top-l.bottom},scrollBarSize:c});p=e.hasScrollY,f=e.hasScrollX}const h={viewportOuterSize:d,viewportInnerSize:{width:d.width-(p?c:0),height:d.height-(f?c:0)},hasScrollX:f,hasScrollY:p,scrollBarSize:c},m=a.current;a.current=h,h.viewportInnerSize.width===(null==m?void 0:m.viewportInnerSize.width)&&h.viewportInnerSize.height===(null==m?void 0:m.viewportInnerSize.height)||e.current.publishEvent("viewportInnerSizeChange",h.viewportInnerSize)}),[e,t.scrollbarSize,t.autoHeight,s.currentPageTotalHeight,u]),[f,p]=o.useState(),h=o.useMemo((()=>(0,Rn.A)(p,60)),[]),m=o.useRef();(0,D.A)((()=>{f&&(d(),e.current.publishEvent("debouncedResize",i.current))}),[e,f,d]);const g=o.useCallback((()=>{e.current.computeSizeAndPublishResizeEvent()}),[e]),y=o.useCallback((()=>a.current),[]),v=o.useCallback((()=>{const r=e.current.getRootDimensions();if(!r)return 0;const n=dr(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const t=e.current.getRenderContext(),r=t.lastRowIndex-t.firstRowIndex;return Math.min(r-1,n.rows.length)}const o=Math.floor(r.viewportInnerSize.height/c);return Math.min(o,n.rows.length)}),[e,t.pagination,t.paginationMode,t.getRowHeight,c]),b=o.useCallback((()=>{var t,r,n;const o=null==(t=e.current.mainElementRef)?void 0:t.current;if(!o)return;const i=(0,ks.A)(o).getComputedStyle(o),a=parseFloat(i.height)||0,s=parseFloat(i.width)||0,l=a!==(null==(r=m.current)?void 0:r.height),c=s!==(null==(n=m.current)?void 0:n.width);if(!m.current||l||c){const t={width:s,height:a};e.current.publishEvent("resize",t),m.current=t}}),[e]),_={getViewportPageSize:v,updateGridDimensionsRef:d,computeSizeAndPublishResizeEvent:b};xe(e,{resize:g,getRootDimensions:y},"public"),xe(e,_,"private");const x=o.useRef(!0),w=o.useCallback((e=>{i.current=e;const o=/jsdom/.test(window.navigator.userAgent);if(0!==e.height||n.current||t.autoHeight||o||(r.error(["The parent DOM element of the data grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),n.current=!0),0!==e.width||n.current||o||(r.error(["The parent DOM element of the data grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),n.current=!0),x.current)return p(e),void(x.current=!1);h(e)}),[t.autoHeight,h,r]);(0,D.A)((()=>d()),[d]),Le(e,"sortedRowsSet",d),Le(e,"paginationModelChange",d),Le(e,"columnsChange",d),Pe(e,"resize",w),Le(e,"debouncedResize",t.onResize)}(r,t),function(e,t){Le(e,"columnHeaderClick",t.onColumnHeaderClick),Le(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),Le(e,"columnHeaderOver",t.onColumnHeaderOver),Le(e,"columnHeaderOut",t.onColumnHeaderOut),Le(e,"columnHeaderEnter",t.onColumnHeaderEnter),Le(e,"columnHeaderLeave",t.onColumnHeaderLeave),Le(e,"cellClick",t.onCellClick),Le(e,"cellDoubleClick",t.onCellDoubleClick),Le(e,"cellKeyDown",t.onCellKeyDown),Le(e,"preferencePanelClose",t.onPreferencePanelClose),Le(e,"preferencePanelOpen",t.onPreferencePanelOpen),Le(e,"menuOpen",t.onMenuOpen),Le(e,"menuClose",t.onMenuClose),Le(e,"rowDoubleClick",t.onRowDoubleClick),Le(e,"rowClick",t.onRowClick),Le(e,"stateChange",t.onStateChange)}(r,t),(e=>{const t=o.useCallback(((t={})=>e.current.unstable_applyPipeProcessors("exportState",{},t)),[e]),r=o.useCallback((t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach((e=>{e()})),e.current.forceUpdate()}),[e]);xe(e,{exportState:t,restoreState:r},"public")})(r),function(e,t){const r=t=>{e.current.setState((e=>(0,n.A)({},e,{virtualization:(0,n.A)({},e.virtualization,{enabled:t})})))},i={unstable_setVirtualization:r,unstable_setColumnVirtualization:t=>{e.current.setState((e=>(0,n.A)({},e,{virtualization:(0,n.A)({},e.virtualization,{enabledForColumns:t})})))}};xe(e,i,"public"),o.useEffect((()=>{r(!t.disableVirtualization)}),[t.disableVirtualization])}(r,t),r};var lc=r("tCRK");const cc={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorEquals:"Equals",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"},uc=["components","componentsProps"];function dc(e){var t;const r=Object.keys(e);if(!r.some((e=>e.startsWith("aria-")||e.startsWith("data-"))))return e;const n={},o=null!=(t=e.forwardedProps)?t:{};for(let t=0;to=>{n.current.pinColumn(t.field,e),r(o)}),[n,t.field,r]),l=e=>{n.current.unpinColumn(t.field),r(e)},c=(0,x.jsxs)(Qi.A,{onClick:s(pl.left),children:[(0,x.jsx)(ea.A,{children:(0,x.jsx)(i.slots.columnMenuPinLeftIcon,{fontSize:"small"})}),(0,x.jsx)(ta.A,{children:n.current.getLocaleText("pinToLeft")})]}),u=(0,x.jsxs)(Qi.A,{onClick:s(pl.right),children:[(0,x.jsx)(ea.A,{children:(0,x.jsx)(i.slots.columnMenuPinRightIcon,{fontSize:"small"})}),(0,x.jsx)(ta.A,{children:n.current.getLocaleText("pinToRight")})]});if(!t)return null;const d=n.current.isColumnPinned(t.field);if(d){const e=d===pl.right?pl.left:pl.right,t=e===pl.right?"pinToRight":"pinToLeft",r=d===pl.right?i.slots.columnMenuPinLeftIcon:i.slots.columnMenuPinRightIcon;return(0,x.jsxs)(o.Fragment,{children:[(0,x.jsxs)(Qi.A,{onClick:s(e),children:[(0,x.jsx)(ea.A,{children:(0,x.jsx)(r,{fontSize:"small"})}),(0,x.jsx)(ta.A,{children:n.current.getLocaleText(t)})]}),(0,x.jsxs)(Qi.A,{onClick:l,children:[(0,x.jsx)(ea.A,{}),(0,x.jsx)(ta.A,{children:n.current.getLocaleText("unpin")})]})]})}return"rtl"===a.direction?(0,x.jsxs)(o.Fragment,{children:[u,c]}):(0,x.jsxs)(o.Fragment,{children:[c,u]})}}),pc=(0,n.A)({},aa,{columnMenuPinningItem:{displayOrder:15}}),hc=o.forwardRef((function(e,t){return(0,x.jsx)(sa,(0,n.A)({ref:t},e,{defaultSlots:fc,defaultSlotProps:pc}))})),mc=["getColumnsToRender","getRootProps"],gc=(0,re.A)("div",{name:"MuiDataGrid",slot:"HeaderFilterRow",overridesResolver:(e,t)=>t.headerFilterRow})((()=>({display:"flex"}))),yc=Object.create(null),vc=(0,re.A)("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${z.x["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${z.x["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})((()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${z.x["scrollArea--left"]}`]:{left:0},[`&.${z.x["scrollArea--right"]}`]:{right:0}})));function bc(e){const{scrollDirection:t}=e,r=o.useRef(null),i=(0,He.h)(),a=(0,en.Z)(),[s,l]=o.useState(!1),[c,u]=o.useState(!0),d=(0,S.N)(i,V.rf),f=(0,S.N)(i,G.fc),p=o.useRef({left:0,top:0}),h=Ys(),m=(0,n.A)({},h,{scrollDirection:t}),g=(e=>{const{scrollDirection:t,classes:r}=e,n={root:["scrollArea",`scrollArea--${t}`]};return(0,O.A)(n,z.B,r)})(m),y=Yr(i,h.columnHeaderHeight),v=Math.floor(h.columnHeaderHeight*d),b=o.useCallback((e=>{p.current=e;const r=i.current.getRootDimensions();u((()=>{if("left"===t)return p.current.left>0;if("right"===t){const e=f-r.viewportInnerSize.width;return p.current.left{let n;if(e.preventDefault(),"left"===t)n=e.clientX-r.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI: Wrong drag direction");n=Math.max(1,e.clientX-r.current.getBoundingClientRect().left)}n=1.5*(n-1)+1,a.start(0,(()=>{i.current.scroll({left:p.current.left+n,top:p.current.top})}))}),[t,i,a]),w=(0,rn.A)((()=>{l(!0)})),A=(0,rn.A)((()=>{l(!1)}));return Pe(i,"scrollPositionChange",b),Pe(i,"columnHeaderDragStart",w),Pe(i,"columnHeaderDragEnd",A),s&&c?(0,x.jsx)(vc,{ref:r,className:(0,R.A)(g.root),ownerState:m,onDragOver:_,style:{height:v,top:y-v}}):null}const _c=o.memo(bc),xc=["style","className","innerRef","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence","pinnedColumns"],wc=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,t/100},Ac=(0,F.Ay)("div",{name:"MuiDataGrid",slot:"PinnedColumnHeaders",overridesResolver:(e,t)=>[{[`&.${z.x["pinnedColumnHeaders--left"]}`]:t["pinnedColumnHeaders--left"]},{[`&.${z.x["pinnedColumnHeaders--right"]}`]:t["pinnedColumnHeaders--right"]},t.pinnedColumnHeaders]})((({theme:e,ownerState:t})=>{var r;return(0,n.A)({position:"absolute",top:0,overflow:"hidden",zIndex:1,display:"flex",flexDirection:"column",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.default},e.vars?{backgroundImage:null==(r=e.vars.overlays)?void 0:r[2]}:(0,n.A)({},"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${(0,N.X4)("#fff",wc(2))}, ${(0,N.X4)("#fff",wc(2))})`}),t.side===pl.left&&{left:0},t.side===pl.right&&{right:0},t.side===pl.right&&t.showCellVerticalBorder&&{borderLeftWidth:"1px",borderLeftStyle:"solid"})}));Ac.propTypes={ownerState:a().object.isRequired};const Sc=o.forwardRef((function(e,t){const{className:r,innerRef:i,visibleColumns:a,sortColumnLookup:s,filterColumnLookup:l,columnPositions:c,columnHeaderTabIndexState:u,columnGroupHeaderTabIndexState:d,columnHeaderFocus:f,columnGroupHeaderFocus:p,densityFactor:h,headerGroupingMaxDepth:m,columnMenuState:g,columnVisibility:y,columnGroupsHeaderStructure:v,hasOtherElementInTabSequence:b,pinnedColumns:_}=e,w=(0,M.A)(e,xc),A=Ys(),C=Ks(),[E,I]=o.useState(0),k=(0,rr.A)(),R=(0,rn.A)((()=>{const e=C.current.getRootDimensions();if(!e)return;const t=e.hasScrollY?e.scrollBarSize:0;E!==t&&I(t)}));Pe(C,"virtualScrollerContentSizeChange",R);const P=o.useMemo((()=>a.map((({field:e})=>e))),[a]),[L,D]=Dl(_,P,"rtl"===k.direction),{isDragging:N,renderContext:F,getRootProps:B,getInnerProps:j,getColumnHeaders:U,getColumnFilters:$,getColumnGroupHeaders:V}=(e=>{const t=T(),{headerGroupingMaxDepth:r,hasOtherElementInTabSequence:i}=e,a=(0,S.N)(t,me),s=Bi((0,n.A)({},e,{hasOtherElementInTabSequence:i||null!==a})),{getColumnsToRender:l,getRootProps:c}=s,u=(0,M.A)(s,mc),d=o.useRef(null);t.current.register("private",{headerFiltersElementRef:d});const f=o.useRef(null),p=Ys(),h=(e=>{const{classes:t}=e;return o.useMemo((()=>(0,O.A)({headerFilterRow:["headerFilterRow"]},z.B,t)),[t])})(p),m=!p.unstable_headerFilters,g=Math.floor(p.columnHeaderHeight*e.densityFactor),y=(0,S.N)(t,ie.ZI),v=Yr(t,p.columnHeaderHeight)+(m?0:g),b=(0,S.N)(t,ue),_=o.useCallback((e=>{const t=null==y?void 0:y.items.find((t=>t.field===e.field&&"isAnyOf"!==t.operator));if(null!=t)return t;const r=yc[e.field];if(null!=r)return r;const n=Io(e);return yc[e.field]=n,n}),[y]),w={minHeight:v,maxHeight:v,lineHeight:`${g}px`};return(0,n.A)({},u,{getColumnFilters:(t,o={})=>{if(m)return null;const i=l(t);if(null==i)return null;const{renderedColumns:s,firstColumnToRender:c}=i,u=[];for(let t=0;t"isAnyOf"!==e.value)))?y:[],S=_(r);u.push((0,x.jsx)(p.slots.headerFilterCell,(0,n.A)({colIndex:i,height:g,width:r.computedWidth,colDef:r,hasFocus:l,tabIndex:h,headerFilterMenuRef:f,headerClassName:m,filterOperators:A,"data-field":r.field,item:S},null==(w=p.slotProps)?void 0:w.headerFilterCell,o),`${r.field}-filter`))}return(0,x.jsx)(gc,{ref:d,ownerState:p,className:h.headerFilterRow,role:"row","aria-rowindex":r+2,children:u})},getRootProps:m?c:(e={})=>(0,n.A)({style:w},e)})})({innerRef:i,visibleColumns:a,sortColumnLookup:s,filterColumnLookup:l,columnPositions:c,columnHeaderTabIndexState:u,hasOtherElementInTabSequence:b,columnGroupHeaderTabIndexState:d,columnHeaderFocus:f,columnGroupHeaderFocus:p,densityFactor:h,headerGroupingMaxDepth:m,columnMenuState:g,columnVisibility:y,columnGroupsHeaderStructure:v,minColumnIndex:L.length}),G=(0,n.A)({},A,{leftPinnedColumns:L,rightPinnedColumns:D,classes:A.classes}),H=(e=>{const{leftPinnedColumns:t,rightPinnedColumns:r,classes:n}=e,o={leftPinnedColumns:["pinnedColumnHeaders",t&&t.length>0&&"pinnedColumnHeaders--left"],rightPinnedColumns:["pinnedColumnHeaders",r&&r.length>0&&"pinnedColumnHeaders--right","withBorderColor"]};return(0,O.A)(o,z.B,n)})(G),W=F&&L.length?(0,n.A)({},F,{firstColumnIndex:0,lastColumnIndex:L.length}):null,q=F&&D.length?(0,n.A)({},F,{firstColumnIndex:P.length-D.length,lastColumnIndex:P.length}):null,X=j(),Z={role:X.role};return(0,x.jsxs)($i,(0,n.A)({ref:t,className:r},B(w),{children:[W&&(0,x.jsxs)(Ac,(0,n.A)({className:H.leftPinnedColumns,ownerState:(0,n.A)({},G,{side:pl.left,showCellVerticalBorder:A.showCellVerticalBorder})},Z,{children:[V({renderContext:W,minFirstColumn:W.firstColumnIndex,maxLastColumn:W.lastColumnIndex}),U({renderContext:W,minFirstColumn:W.firstColumnIndex,maxLastColumn:W.lastColumnIndex},{disableReorder:!0}),$({renderContext:W,minFirstColumn:W.firstColumnIndex,maxLastColumn:W.lastColumnIndex})]})),(0,x.jsx)(_c,{scrollDirection:"left"}),(0,x.jsxs)(Hi,(0,n.A)({isDragging:N},X,{children:[V({renderContext:F,minFirstColumn:L.length,maxLastColumn:P.length-D.length}),U({renderContext:F,minFirstColumn:L.length,maxLastColumn:P.length-D.length}),$({renderContext:F,minFirstColumn:L.length,maxLastColumn:P.length-D.length})]})),(0,x.jsx)(_c,{scrollDirection:"right"}),q&&(0,x.jsxs)(Ac,(0,n.A)({ownerState:(0,n.A)({},G,{side:pl.right,showCellVerticalBorder:A.showCellVerticalBorder}),className:H.rightPinnedColumns,style:{paddingRight:E}},Z,{children:[V({renderContext:q,minFirstColumn:q.firstColumnIndex,maxLastColumn:q.lastColumnIndex}),U({renderContext:q,minFirstColumn:q.firstColumnIndex,maxLastColumn:q.lastColumnIndex},{disableReorder:!0,separatorSide:_i.Left}),$({renderContext:q,minFirstColumn:q.firstColumnIndex,maxLastColumn:q.lastColumnIndex})]}))]}))})),Cc=["operators","item","field","buttonRef","headerFilterMenuRef"],Ec={width:22,height:22,margin:"auto 0 10px 5px"};function Tc(e){var t;const{operators:r,item:i,field:a,buttonRef:s,headerFilterMenuRef:l}=e,c=(0,M.A)(e,Cc),u=(0,$t.A)(),d=(0,$t.A)(),f=Ys(),p=(0,He.h)(),h=Boolean(ps(p)===a&&l.current);return f.slots.headerFilterMenu?(0,x.jsxs)(o.Fragment,{children:[(0,x.jsx)(f.slots.baseIconButton,(0,n.A)({id:u,ref:s,"aria-label":p.current.getLocaleText("filterPanelOperator"),title:p.current.getLocaleText("filterPanelOperator"),"aria-controls":d,"aria-expanded":h?"true":void 0,"aria-haspopup":"true",tabIndex:-1,size:"small",onClick:e=>{l.current=e.currentTarget,p.current.showHeaderFilterMenu(a)},sx:Ec},null==(t=f.slotProps)?void 0:t.baseIconButton,{children:(0,x.jsx)(f.slots.openFilterButtonIcon,{fontSize:"small"})})),(0,x.jsx)(f.slots.headerFilterMenu,(0,n.A)({field:a,open:h,item:i,target:l.current,operators:r,labelledBy:u,id:d},c))]}):null}const Ic={padding:"2px"};function kc({onClick:e}){var t;const r=Ys();return(0,x.jsx)(r.slots.baseIconButton,(0,n.A)({tabIndex:-1,"aria-label":"Clear filter",size:"small",onClick:e,sx:Ic},null==(t=r.slotProps)?void 0:t.baseIconButton,{children:(0,x.jsx)(r.slots.columnMenuClearIcon,{fontSize:"inherit"})}))}const Mc=["colIndex","height","hasFocus","filterOperators","width","headerClassName","colDef","item","headerFilterMenuRef","InputComponentProps","showClearIcon"],Rc={'& input[value=""]:not(:focus)':{color:"transparent"}},Pc=o.forwardRef(((e,t)=>{var r,i,a;const{colIndex:s,height:l,hasFocus:c,filterOperators:u,width:d,headerClassName:f,colDef:p,item:h,headerFilterMenuRef:m,InputComponentProps:g,showClearIcon:y=!0}=e,v=(0,M.A)(e,Mc),b=T(),_=(0,G.TI)(b),w=Ys(),A=o.useRef(null),S=(0,L.A)(t,A),C=o.useRef(null),E=o.useRef(null),I=fs(b)===p.field,k=ps(b)===p.field,D=u[0],N=p.filterable?D.InputComponent:null,F=o.useCallback((e=>{!h.value||e.value?b.current.upsertFilterItem(e):b.current.deleteFilterItem(e)}),[b,h]),B=o.useCallback((()=>{b.current.deleteFilterItem(h)}),[b,h]);let j;p.renderHeaderFilter&&(j=p.renderHeaderFilter(e)),o.useLayoutEffect((()=>{if(c&&!k){var e;let t=A.current.querySelector('[tabindex="0"]');I&&N&&(t=C.current);const r=t||A.current;null==r||r.focus(),null!=(e=b.current.columnHeadersContainerElementRef)&&e.current&&(b.current.columnHeadersContainerElementRef.current.scrollLeft=0)}}),[N,b,c,I,k]);const U=o.useCallback((e=>{if(!k&&!(0,Ge.q9)(e.key))switch(e.key){case"Escape":I&&b.current.stopHeaderFilterEditMode();break;case"Enter":if(I){b.current.stopHeaderFilterEditMode();break}if(e.metaKey||e.ctrlKey){m.current=E.current,b.current.showHeaderFilterMenu(p.field);break}b.current.startHeaderFilterEditMode(p.field);break;case"Tab":if(I){var t;const r=null!=(t=_[s+(e.shiftKey?-1:1)])?t:null;r&&(b.current.startHeaderFilterEditMode(r),b.current.setColumnHeaderFilterFocus(r,e))}break;default:if(I||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;b.current.startHeaderFilterEditMode(p.field)}}),[b,p.field,s,_,m,I,k]),$=o.useCallback(((e,t)=>r=>{b.current.publishEvent(e,b.current.getColumnHeaderParams(p.field),r),t&&t(r)}),[b,p.field]),V=o.useCallback((e=>{c||(C.current&&C.current.contains(e.target)&&C.current.focus(),b.current.setColumnHeaderFilterFocus(p.field,e))}),[b,p.field,c]),H=o.useMemo((()=>({onKeyDown:$("headerFilterKeyDown",U),onClick:$("headerFilterClick"),onMouseDown:$("headerFilterMouseDown",V),onBlur:$("headerFilterBlur")})),[V,U,$]),W=(e=>{const{colDef:t,classes:r,showColumnVerticalBorder:n}=e,o={root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight","withBorderColor",n&&"columnHeader--withRightBorder"]};return(0,O.A)(o,z.B,r)})((0,n.A)({},w,{colDef:p})),q=!1===(null==u||null==(r=u.find((({value:e})=>h.operator===e)))?void 0:r.requiresFilterValue),X=Boolean(null==h?void 0:h.value)||q,Z=null!=(i=D.headerLabel)?i:b.current.getLocaleText(`headerFilterOperator${(0,P.A)(h.operator)}`),Y=X||c;return(0,x.jsxs)("div",(0,n.A)({className:(0,R.A)(W.root,f),ref:S,style:{height:l,width:d,minWidth:d,maxWidth:d},role:"columnheader","aria-colindex":s+1,"aria-label":null==j?null!=(a=p.headerName)?a:p.field:void 0},v,H,{children:[j,N&&void 0===j?(0,x.jsxs)(o.Fragment,{children:[(0,x.jsx)(N,(0,n.A)({apiRef:b,item:h,inputRef:C,applyValue:F,onFocus:()=>b.current.startHeaderFilterEditMode(p.field),onBlur:e=>{var t;b.current.stopHeaderFilterEditMode(),null!=(t=e.relatedTarget)&&t.className.includes("columnHeader")||b.current.setState((e=>(0,n.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},label:(0,P.A)(Z),placeholder:"",isFilterActive:Y,clearButton:y&&X?(0,x.jsx)(kc,{onClick:B}):null,disabled:q,tabIndex:-1,InputLabelProps:null,sx:"date"===p.type||"dateTime"===p.type?Rc:void 0},q?{value:""}:{},null==D?void 0:D.InputComponentProps,g)),(0,x.jsx)(Tc,{operators:u,item:h,field:p.field,applyFilterChanges:F,headerFilterMenuRef:m,buttonRef:E})]}):null]}))})),Oc={ColumnMenuPinRightIcon:(0,wa.A)((0,x.jsx)("g",{transform:"rotate(-30 15 10)",children:(0,x.jsx)("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinRight"),ColumnMenuPinLeftIcon:(0,wa.A)((0,x.jsx)("g",{transform:"rotate(30 8 12)",children:(0,x.jsx)("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinLeft")},Lc=(0,n.A)({},Oc),Dc=(0,n.A)({},Ka,Lc,{ColumnMenu:hc,ColumnHeaders:Sc,HeaderFilterCell:Pc,HeaderFilterMenu:function({open:e,field:t,target:r,applyFilterChanges:i,operators:a,item:s,id:l,labelledBy:c}){const u=(0,He.h)(),d=o.useCallback((()=>{u.current.hideHeaderFilterMenu()}),[u]),f=o.useCallback((e=>{"Tab"===e.key&&e.preventDefault(),"Escape"!==e.key&&"Tab"!==e.key||d()}),[d]);return r?(0,x.jsx)(nr.U,{placement:"bottom-end",open:e,target:r,onClose:d,children:(0,x.jsx)(tr.A,{"aria-labelledby":c,id:l,onKeyDown:f,children:a.map(((r,o)=>{var a;const l=null!=(a=null==r?void 0:r.headerLabel)?a:u.current.getLocaleText(`headerFilterOperator${(0,P.A)(r.value)}`);return(0,x.jsx)(Qi.A,{onClick:()=>{i((0,n.A)({},s,{operator:r.value})),d()},autoFocus:0===o&&e,selected:r.value===s.operator,children:l},`${t}-${r.value}`)}))})}):null}}),Nc=(0,n.A)({},Qa,{scrollEndThreshold:80,treeData:!1,defaultGroupingExpansionDepth:0,autosizeOnMount:!1,disableAutosize:!1,disableColumnPinning:!1,keepColumnPositionIfDraggedOutside:!1,disableChildrenFiltering:!1,disableChildrenSorting:!1,rowReordering:!1,rowsLoadingMode:"client",getDetailPanelHeight:()=>500,unstable_headerFilters:!1}),Fc=Ja(Dc),zc="MTcyMTI1MzYwMDAwMA==",Bc=o.forwardRef((function(e,t){const r=(e=>{const[t,r,i]=(a=(0,lc.A)({props:e,name:"MuiDataGrid"}),o.useMemo((()=>{const{components:e,componentsProps:t}=a;return[e,t,dc((0,M.A)(a,uc))]}),[a]));var a;const s=o.useMemo((()=>(0,n.A)({},cc,i.localeText)),[i.localeText]),l=o.useMemo((()=>function({defaultSlots:e,slots:t,components:r}){const o=null!=t?t:r?Ja(r):null;if(!o||0===Object.keys(o).length)return e;const i=(0,n.A)({},e);return Object.keys(o).forEach((e=>{const t=e;void 0!==o[t]&&(i[t]=o[t])})),i}({defaultSlots:Fc,slots:i.slots,components:t})),[t,i.slots]);return o.useMemo((()=>{var e;return(0,n.A)({},Nc,i,{localeText:s,slots:l,slotProps:null!=(e=i.slotProps)?e:r,signature:"DataGridPro"})}),[i,s,l,r])})(e),i=sc(r.apiRef,r);_("x-data-grid-pro",zc);const a=(0,S.N)(i,hl);return(0,x.jsx)(k,{privateApiRef:i,props:r,children:(0,x.jsxs)(ee,(0,n.A)({className:r.className,style:r.style,sx:r.sx,ref:t},r.forwardedProps,{children:[(0,x.jsx)(te,{}),(0,x.jsx)(ve,{VirtualScrollerComponent:Gl,ColumnHeadersProps:{pinnedColumns:a},children:(0,x.jsx)(A,{packageName:"x-data-grid-pro",releaseInfo:zc})}),(0,x.jsx)(be,{})]}))})})),jc=o.memo(Bc);Bc.propTypes={apiRef:a().shape({current:a().object.isRequired}),"aria-label":a().string,"aria-labelledby":a().string,autoHeight:a().bool,autoPageSize:a().bool,autosizeOnMount:a().bool,autosizeOptions:a().shape({columns:a().arrayOf(a().string),expand:a().bool,includeHeaders:a().bool,includeOutliers:a().bool,outliersFactor:a().number}),cellModesModel:a().object,checkboxSelection:a().bool,checkboxSelectionVisibleOnly:a().bool,classes:a().object,clipboardCopyCellDelimiter:a().string,columnBuffer:a().number,columnGroupingModel:a().arrayOf(a().object),columnHeaderHeight:a().number,columns:a().arrayOf(a().object).isRequired,columnThreshold:a().number,columnVisibilityModel:a().object,components:a().object,componentsProps:a().object,defaultGroupingExpansionDepth:a().number,density:a().oneOf(["comfortable","compact","standard"]),detailPanelExpandedRowIds:a().arrayOf(a().oneOfType([a().number,a().string]).isRequired),disableAutosize:a().bool,disableChildrenFiltering:a().bool,disableChildrenSorting:a().bool,disableColumnFilter:a().bool,disableColumnMenu:a().bool,disableColumnPinning:a().bool,disableColumnReorder:a().bool,disableColumnResize:a().bool,disableColumnSelector:a().bool,disableDensitySelector:a().bool,disableEval:a().bool,disableMultipleColumnsFiltering:a().bool,disableMultipleColumnsSorting:a().bool,disableMultipleRowSelection:a().bool,disableRowSelectionOnClick:a().bool,disableVirtualization:a().bool,editMode:a().oneOf(["cell","row"]),experimentalFeatures:a().shape({ariaV7:a().bool,columnGrouping:a().bool,lazyLoading:a().bool,warnIfFocusStateIsNotSynced:a().bool}),filterDebounceMs:a().number,filterMode:a().oneOf(["client","server"]),filterModel:a().shape({items:a().arrayOf(a().shape({field:a().string.isRequired,id:a().oneOfType([a().number,a().string]),operator:a().string.isRequired,value:a().any})).isRequired,logicOperator:a().oneOf(["and","or"]),quickFilterExcludeHiddenColumns:a().bool,quickFilterLogicOperator:a().oneOf(["and","or"]),quickFilterValues:a().array}),forwardedProps:a().object,getCellClassName:a().func,getDetailPanelContent:a().func,getDetailPanelHeight:a().func,getEstimatedRowHeight:a().func,getRowClassName:a().func,getRowHeight:a().func,getRowId:a().func,getRowSpacing:a().func,getTreeDataPath:a().func,groupingColDef:a().oneOfType([a().func,a().object]),hideFooter:a().bool,hideFooterPagination:a().bool,hideFooterRowCount:a().bool,hideFooterSelectedRowCount:a().bool,ignoreDiacritics:a().bool,initialState:a().object,isCellEditable:a().func,isGroupExpandedByDefault:a().func,isRowSelectable:a().func,keepColumnPositionIfDraggedOutside:a().bool,keepNonExistentRowsSelected:a().bool,loading:a().bool,localeText:a().object,logger:a().shape({debug:a().func.isRequired,error:a().func.isRequired,info:a().func.isRequired,warn:a().func.isRequired}),logLevel:a().oneOf(["debug","error","info","warn",!1]),nonce:a().string,onCellClick:a().func,onCellDoubleClick:a().func,onCellEditStart:a().func,onCellEditStop:a().func,onCellKeyDown:a().func,onCellModesModelChange:a().func,onClipboardCopy:a().func,onColumnHeaderClick:a().func,onColumnHeaderDoubleClick:a().func,onColumnHeaderEnter:a().func,onColumnHeaderLeave:a().func,onColumnHeaderOut:a().func,onColumnHeaderOver:a().func,onColumnOrderChange:a().func,onColumnResize:a().func,onColumnVisibilityModelChange:a().func,onColumnWidthChange:a().func,onDetailPanelExpandedRowIdsChange:a().func,onFetchRows:a().func,onFilterModelChange:a().func,onMenuClose:a().func,onMenuOpen:a().func,onPaginationModelChange:a().func,onPinnedColumnsChange:a().func,onPreferencePanelClose:a().func,onPreferencePanelOpen:a().func,onProcessRowUpdateError:a().func,onResize:a().func,onRowClick:a().func,onRowCountChange:a().func,onRowDoubleClick:a().func,onRowEditStart:a().func,onRowEditStop:a().func,onRowModesModelChange:a().func,onRowOrderChange:a().func,onRowSelectionModelChange:a().func,onRowsScrollEnd:a().func,onSortModelChange:a().func,onStateChange:a().func,pageSizeOptions:a().arrayOf(a().oneOfType([a().number,a().shape({label:a().string.isRequired,value:a().number.isRequired})]).isRequired),pagination:a().bool,paginationMode:a().oneOf(["client","server"]),paginationModel:a().shape({page:a().number.isRequired,pageSize:a().number.isRequired}),pinnedColumns:a().shape({left:a().arrayOf(a().string),right:a().arrayOf(a().string)}),pinnedRows:a().shape({bottom:a().arrayOf(a().object),top:a().arrayOf(a().object)}),processRowUpdate:a().func,rowBuffer:a().number,rowCount:a().number,rowHeight:a().number,rowModesModel:a().object,rowPositionsDebounceMs:a().number,rowReordering:a().bool,rows:a().arrayOf(a().object).isRequired,rowSelection:a().bool,rowSelectionModel:a().oneOfType([a().arrayOf(a().oneOfType([a().number,a().string]).isRequired),a().number,a().string]),rowsLoadingMode:a().oneOf(["client","server"]),rowSpacingType:a().oneOf(["border","margin"]),rowThreshold:a().number,scrollbarSize:a().number,scrollEndThreshold:a().number,showCellVerticalBorder:a().bool,showColumnVerticalBorder:a().bool,slotProps:a().object,slots:a().object,sortingMode:a().oneOf(["client","server"]),sortingOrder:a().arrayOf(a().oneOf(["asc","desc"])),sortModel:a().arrayOf(a().shape({field:a().string.isRequired,sort:a().oneOf(["asc","desc"])})),sx:a().oneOfType([a().arrayOf(a().oneOfType([a().func,a().object,a().bool])),a().func,a().object]),throttleRowsMs:a().number,treeData:a().bool,unstable_headerFilters:a().bool,unstable_ignoreValueFormatterDuringExport:a().oneOfType([a().shape({clipboardExport:a().bool,csvExport:a().bool}),a().bool])}},o1VP:(e,t,r)=>{"use strict";r.d(t,{b:()=>o});var n=r("q1tI");const o=()=>n.useRef({})},Ilr6:(e,t,r)=>{"use strict";r.d(t,{Q:()=>g});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("A3c4"),s=r("Br4D"),l=r("FltU"),c=r("nKUr");const u=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function d(e){var t,r;const{item:d,applyValue:f,type:p,apiRef:h,focusElementRef:m,InputProps:g,clearButton:y,tabIndex:v,disabled:b}=e,_=(0,o.A)(e,u),x=(0,s.Z)(),[w,A]=i.useState(null!=(t=d.value)?t:""),[S,C]=i.useState(!1),E=(0,a.A)(),T=(0,l.A)(),I=i.useCallback((e=>{const t=e.target.value;A(String(t)),C(!0),x.start(T.filterDebounceMs,(()=>{f((0,n.A)({},d,{value:t})),C(!1)}))}),[f,d,T.filterDebounceMs,x]);return i.useEffect((()=>{var e;const t=null!=(e=d.value)?e:"";A(String(t))}),[d.value]),(0,c.jsx)(T.slots.baseTextField,(0,n.A)({fullWidth:!0,id:E,label:h.current.getLocaleText("filterPanelInputLabel"),placeholder:h.current.getLocaleText("filterPanelInputPlaceholder"),value:w,onChange:I,variant:"standard",type:p||"text",InputLabelProps:{shrink:!0},inputRef:m,InputProps:(0,n.A)({},S||y?{endAdornment:S?(0,c.jsx)(T.slots.loadIcon,{fontSize:"small",color:"action"}):y}:{},{disabled:b},g,{inputProps:(0,n.A)({max:"datetime-local"===p?"9999-12-31T23:59":"9999-12-31",tabIndex:v},null==g?void 0:g.inputProps)})},_,null==(r=T.slotProps)?void 0:r.baseTextField))}var f=r("xLAl");const p=/(\d+)-(\d+)-(\d+)/,h=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function m(e,t,r,n){if(!e.value)return null;const[o,i,a,s,l]=e.value.match(r?h:p).slice(1).map(Number),c=new Date(o,i-1,a,s||0,l||0).getTime();return e=>{if(!e)return!1;if(n)return t(e.getTime(),c);const o=new Date(e).setHours(r?e.getHours():0,r?e.getMinutes():0,0,0);return t(o,c)}}const g=e=>(0,f.eW)([{value:"is",getApplyFilterFnV7:t=>m(t,((e,t)=>e===t),e),InputComponent:d,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFnV7:t=>m(t,((e,t)=>e!==t),e),InputComponent:d,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFnV7:t=>m(t,((e,t)=>e>t),e),InputComponent:d,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFnV7:t=>m(t,((e,t)=>e>=t),e),InputComponent:d,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFnV7:t=>m(t,((e,t)=>em(t,((e,t)=>e<=t),e),InputComponent:d,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1}])},"5NNo":(e,t,r)=>{"use strict";r.d(t,{m:()=>A});var n=r("Nlia"),o=r("+9dH"),i=r("q1tI"),a=r("A3c4"),s=r("Vn7y"),l=r("FltU"),c=r("QnE+"),u=r("nKUr");const d=["item","applyValue","type","apiRef","focusElementRef","getOptionLabel","getOptionValue","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],f=({column:{valueOptions:e,field:t},OptionComponent:r,getOptionLabel:n,getOptionValue:a,isSelectNative:s,baseSelectOptionProps:l})=>("function"==typeof e?["",...e({field:t})]:["",...e||[]]).map((e=>{const t=a(e),c=n(e);return(0,i.createElement)(r,(0,o.A)({},l,{native:s,key:t,value:t}),c)})),p=(0,s.Ay)("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function h(e){var t,r,s,h,m,g,y,v;const{item:b,applyValue:_,type:x,apiRef:w,focusElementRef:A,getOptionLabel:S,getOptionValue:C,placeholder:E,tabIndex:T,label:I,variant:k="standard",clearButton:M}=e,R=(0,n.A)(e,d),[P,O]=i.useState(null!=(t=b.value)?t:""),L=(0,a.A)(),D=(0,a.A)(),N=(0,l.A)(),F=null==(r=null==(s=N.slotProps)||null==(s=s.baseSelect)?void 0:s.native)||r;let z=null;if(b.field){const e=w.current.getColumn(b.field);(0,c._W)(e)&&(z=e)}const B=C||(null==(h=z)?void 0:h.getOptionValue),j=S||(null==(m=z)?void 0:m.getOptionLabel),U=i.useMemo((()=>{if(z)return"function"==typeof z.valueOptions?z.valueOptions({field:z.field}):z.valueOptions}),[z]),$=i.useCallback((e=>{let t=e.target.value;t=(0,c.Rc)(t,U,B),O(String(t)),_((0,o.A)({},b,{value:t}))}),[U,B,_,b]);if(i.useEffect((()=>{var e;let t;if(void 0!==U){if(t=(0,c.Rc)(b.value,U,B),t!==b.value)return void _((0,o.A)({},b,{value:t}))}else t=b.value;t=null!=(e=t)?e:"",O(String(t))}),[b,U,_,B]),!(0,c._W)(z))return null;if(!(0,c._W)(z))return null;const V=null!=I?I:w.current.getLocaleText("filterPanelInputLabel");return(0,u.jsxs)(p,{children:[(0,u.jsxs)(N.slots.baseFormControl,{children:[(0,u.jsx)(N.slots.baseInputLabel,(0,o.A)({},null==(g=N.slotProps)?void 0:g.baseInputLabel,{id:D,htmlFor:L,shrink:!0,variant:k,children:V})),(0,u.jsx)(N.slots.baseSelect,(0,o.A)({id:L,label:V,labelId:D,value:P,onChange:$,variant:k,type:x||"text",inputProps:{tabIndex:T,ref:A,placeholder:null!=E?E:w.current.getLocaleText("filterPanelInputPlaceholder")},native:F,notched:"outlined"===k||void 0},R,null==(y=N.slotProps)?void 0:y.baseSelect,{children:f({column:z,OptionComponent:N.slots.baseSelectOption,getOptionLabel:j,getOptionValue:B,isSelectNative:F,baseSelectOptionProps:null==(v=N.slotProps)?void 0:v.baseSelectOption})}))]}),M]})}var m=r("RI6h"),g=r("8cYg");const y=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant","getOptionLabel","getOptionValue"],v=(0,m.Z)();function b(e){var t,r;const{item:s,applyValue:d,apiRef:f,focusElementRef:p,color:h,error:m,helperText:b,size:_,variant:x="standard",getOptionLabel:w,getOptionValue:A}=e,S=(0,n.A)(e,y),C={color:h,error:m,helperText:b,size:_,variant:x},E=(0,a.A)(),T=(0,l.A)();let I=null;if(s.field){const e=f.current.getColumn(s.field);(0,c._W)(e)&&(I=e)}const k=A||(null==(t=I)?void 0:t.getOptionValue),M=w||(null==(r=I)?void 0:r.getOptionLabel),R=i.useCallback(((e,t)=>k(e)===k(t)),[k]),P=i.useMemo((()=>{var e;return null!=(e=I)&&e.valueOptions?"function"==typeof I.valueOptions?I.valueOptions({field:I.field}):I.valueOptions:[]}),[I]),O=i.useMemo((()=>null==P?void 0:P.map(k)),[P,k]),L=i.useMemo((()=>Array.isArray(s.value)?void 0!==P?s.value.map((e=>null==O?void 0:O.findIndex((t=>t===e)))).filter((e=>e>=0)).map((e=>P[e])):s.value:[]),[s.value,P,O]);i.useEffect((()=>{Array.isArray(s.value)&&L.length===s.value.length||d((0,o.A)({},s,{value:L.map(k)}))}),[s,L,d,k]);const D=i.useCallback(((e,t)=>{d((0,o.A)({},s,{value:t.map(k)}))}),[d,s,k]);return(0,u.jsx)(g.A,(0,o.A)({multiple:!0,options:P,isOptionEqualToValue:R,filterOptions:v,id:E,value:L,onChange:D,getOptionLabel:M,renderTags:(e,t)=>e.map(((e,r)=>(0,u.jsx)(T.slots.baseChip,(0,o.A)({variant:"outlined",size:"small",label:M(e)},t({index:r}))))),renderInput:e=>{var t;return(0,u.jsx)(T.slots.baseTextField,(0,o.A)({},e,{label:f.current.getLocaleText("filterPanelInputLabel"),placeholder:f.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,o.A)({},e.InputLabelProps,{shrink:!0}),inputRef:p,type:"singleSelect"},C,null==(t=T.slotProps)?void 0:t.baseTextField))}},S))}var _=r("XVIy"),x=r("xLAl");const w=e=>null!=e&&(0,_.Gv)(e)?e.value:e,A=()=>(0,x.eW)([{value:"is",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>w(t)===w(e.value),InputComponent:h},{value:"not",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>w(t)!==w(e.value),InputComponent:h},{value:"isAnyOf",getApplyFilterFnV7:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(w);return e=>t.includes(w(e))},InputComponent:b}])},"1llu":(e,t,r)=>{"use strict";r.d(t,{X:()=>l,n:()=>c});var n=r("B8tz"),o=r("XVIy"),i=r("C8ES"),a=r("xLAl"),s=r("io7V");const l=(0,a.YB)((e=>{if(!e)return null;const t=new RegExp((0,o.Nt)(e),"i");return(e,r,n,o)=>{let i=o.current.getRowFormattedValue(r,n);return o.current.ignoreDiacritics&&(i=(0,s.WL)(i)),null!=i&&t.test(i.toString())}})),c=(e=!1)=>(0,a.eW)([{value:"contains",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp((0,o.Nt)(r),"i");return e=>null!=e&&n.test(String(e))},InputComponent:n.y},{value:"equals",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&0===n.compare(r,e.toString())},InputComponent:n.y},{value:"startsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp(`^${(0,o.Nt)(r)}.*$`,"i");return e=>null!=e&&n.test(e.toString())},InputComponent:n.y},{value:"endsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp(`.*${(0,o.Nt)(r)}$`,"i");return e=>null!=e&&n.test(e.toString())},InputComponent:n.y},{value:"isEmpty",getApplyFilterFnV7:()=>e=>""===e||null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>""!==e&&null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const r=e?t.value:t.value.map((e=>e.trim())),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&r.some((t=>0===n.compare(t,e.toString()||"")))},InputComponent:i.M}])},xLAl:(e,t,r)=>{"use strict";r.d(t,{Dc:()=>o,E0:()=>a,UD:()=>l,YB:()=>i,eW:()=>s});var n=r("+9dH");const o={current:null};function i(e){return e.isInternal=!0,e}function a(e){return void 0!==e&&!0===e.isInternal}function s(e){return e.map((e=>{return(0,n.A)({},e,{getApplyFilterFn:(t=e.getApplyFilterFnV7,i(((e,r)=>{const n=t(e,r);return n?e=>n(e.value,e.row,r,o.current):n}))),getApplyFilterFnV7:i(e.getApplyFilterFnV7)});var t}))}function l(e){return i(((t,r,n)=>{const o=e(t,r,n);return o?e=>o(e.value,e.row,r,n):o}))}},yAU5:(e,t,r)=>{"use strict";r.d(t,{k:()=>n});const n=r("q1tI").createContext(void 0)},pIrZ:(e,t,r)=>{"use strict";r.d(t,{$:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("aGM9"),l=r("M82X"),c=r("7Cdf"),u=r("FltU"),d=r("nKUr");const f=["className"],p=(0,l.A)("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),h=i.forwardRef((function(e,t){const{className:r}=e,i=(0,o.A)(e,f),l=(0,u.A)(),h=(e=>{const{classes:t}=e;return(0,s.A)({root:["overlay"]},c.B,t)})(l);return(0,d.jsx)(p,(0,n.A)({ref:t,className:(0,a.A)(h.root,r),ownerState:l},i))}))},mkt2:(e,t,r)=>{"use strict";r.d(t,{b:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("M82X"),l=r("aGM9"),c=r("7Cdf"),u=r("FltU"),d=r("nKUr");const f=["className","children"],p=(0,s.A)("div",{name:"MuiDataGrid",slot:"ToolbarContainer",overridesResolver:(e,t)=>t.toolbarContainer})((({theme:e})=>({display:"flex",alignItems:"center",flexWrap:"wrap",gap:e.spacing(1),padding:e.spacing(.5,.5,0)}))),h=i.forwardRef((function(e,t){const{className:r,children:i}=e,s=(0,o.A)(e,f),h=(0,u.A)(),m=(e=>{const{classes:t}=e;return(0,l.A)({root:["toolbarContainer"]},c.B,t)})(h);return i?(0,d.jsx)(p,(0,n.A)({ref:t,className:(0,a.A)(r,m.root),ownerState:h},s,{children:i})):null}))},aKua:(e,t,r)=>{"use strict";r.d(t,{U:()=>w});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("juqV"),s=r("zX2i"),l=r("aGM9"),c=r("XgeM"),u=r("UVCh"),d=r("G43+"),f=r("usZy"),p=r("Vn7y"),h=r("7Cdf"),m=r("FltU"),g=r("EQ6w"),y=r("nKUr");const v=["open","target","onClose","children","position","className","onExited"],b=e=>{const{classes:t}=e;return(0,l.A)({root:["menu"]},h.B,t)},_=(0,p.Ay)(f.A,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})((({theme:e})=>({zIndex:e.zIndex.modal,[`& .${h.x.menuList}`]:{outline:0}}))),x={"bottom-start":"top left","bottom-end":"top right"};function w(e){var t;const{open:r,target:l,onClose:f,children:p,position:h,className:w,onExited:A}=e,S=(0,o.A)(e,v),C=(0,g.h)(),E=(0,m.A)(),T=b(E),I=i.useRef(null);(0,c.A)((()=>{var e,t;r?I.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(null==(e=I.current)||null==(t=e.focus)||t.call(e),I.current=null)}),[r]),i.useEffect((()=>{const e=r?"menuOpen":"menuClose";C.current.publishEvent(e,{target:l})}),[C,r,l]);const k=e=>{e.target&&(l===e.target||null!=l&&l.contains(e.target))||f(e)};return(0,y.jsx)(_,(0,n.A)({as:E.slots.basePopper,className:(0,a.A)(w,T.root),ownerState:E,open:r,anchorEl:l,transition:!0,placement:h},S,null==(t=E.slotProps)?void 0:t.basePopper,{children:({TransitionProps:e,placement:t})=>{return(0,y.jsx)(s.x,{onClickAway:k,mouseEvent:"onMouseDown",children:(0,y.jsx)(u.A,(0,n.A)({},e,{style:{transformOrigin:x[t]},onExited:(r=null==e?void 0:e.onExited,e=>{r&&r(),A&&A(e)}),children:(0,y.jsx)(d.A,{children:p})}))});var r}}))}},C8ES:(e,t,r)=>{"use strict";r.d(t,{M:()=>d});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("8cYg"),s=r("A3c4"),l=r("FltU"),c=r("nKUr");const u=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"];function d(e){const{item:t,applyValue:r,type:d,apiRef:f,focusElementRef:p,color:h,error:m,helperText:g,size:y,variant:v}=e,b=(0,o.A)(e,u),_={color:h,error:m,helperText:g,size:y,variant:v},[x,w]=i.useState(t.value||[]),A=(0,s.A)(),S=(0,l.A)();i.useEffect((()=>{var e;const r=null!=(e=t.value)?e:[];w(r.map(String))}),[t.value]);const C=i.useCallback(((e,o)=>{w(o.map(String)),r((0,n.A)({},t,{value:[...o]}))}),[r,t]);return(0,c.jsx)(a.A,(0,n.A)({multiple:!0,freeSolo:!0,options:[],filterOptions:(e,t)=>{const{inputValue:r}=t;return null==r||""===r?[]:[r]},id:A,value:x,onChange:C,renderTags:(e,t)=>e.map(((e,r)=>(0,c.jsx)(S.slots.baseChip,(0,n.A)({variant:"outlined",size:"small",label:e},t({index:r}))))),renderInput:e=>{var t;return(0,c.jsx)(S.slots.baseTextField,(0,n.A)({},e,{label:f.current.getLocaleText("filterPanelInputLabel"),placeholder:f.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,n.A)({},e.InputLabelProps,{shrink:!0}),inputRef:p,type:d||"text"},_,null==(t=S.slotProps)?void 0:t.baseTextField))}},b))}},B8tz:(e,t,r)=>{"use strict";r.d(t,{y:()=>d});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("A3c4"),s=r("Br4D"),l=r("FltU"),c=r("nKUr");const u=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","clearButton","InputProps","variant"];function d(e){var t,r;const{item:d,applyValue:f,type:p,apiRef:h,focusElementRef:m,tabIndex:g,disabled:y,clearButton:v,InputProps:b,variant:_="standard"}=e,x=(0,o.A)(e,u),w=(0,s.Z)(),[A,S]=i.useState(null!=(t=d.value)?t:""),[C,E]=i.useState(!1),T=(0,a.A)(),I=(0,l.A)(),k=i.useCallback((e=>{const{value:t}=e.target;S(String(t)),E(!0),w.start(I.filterDebounceMs,(()=>{const e=(0,n.A)({},d,{value:t,fromInput:T});f(e),E(!1)}))}),[T,f,d,I.filterDebounceMs,w]);return i.useEffect((()=>{var e;d.fromInput===T&&void 0!==d.value||S(String(null!=(e=d.value)?e:""))}),[T,d]),(0,c.jsx)(I.slots.baseTextField,(0,n.A)({id:T,label:h.current.getLocaleText("filterPanelInputLabel"),placeholder:h.current.getLocaleText("filterPanelInputPlaceholder"),value:A,onChange:k,variant:_,type:p||"text",InputProps:(0,n.A)({},C||v?{endAdornment:C?(0,c.jsx)(I.slots.loadIcon,{fontSize:"small",color:"action"}):v}:{},{disabled:y},b,{inputProps:(0,n.A)({tabIndex:g},null==b?void 0:b.inputProps)}),InputLabelProps:{shrink:!0},inputRef:m},x,null==(r=I.slotProps)?void 0:r.baseTextField))}},"QnE+":(e,t,r)=>{"use strict";function n(e){return"singleSelect"===(null==e?void 0:e.type)}function o(e,t,r){if(void 0===t)return;const n=t.find((t=>{const n=r(t);return String(n)===String(e)}));return r(n)}r.d(t,{Rc:()=>o,_W:()=>n})},M5tC:(e,t,r)=>{"use strict";r.d(t,{j:()=>h});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("DSU1"),s=r("hmGc"),l=r("iqfI"),c=r("sU2d"),u=r("EQ6w"),d=r("FltU"),f=r("nKUr");const p=["onClick"],h=i.forwardRef((function(e,t){var r;const{onClick:i}=e,h=(0,o.A)(e,p),m=(0,a.A)(),g=(0,a.A)(),y=(0,u.h)(),v=(0,d.A)(),b=(0,s.N)(y,l._);if(v.disableColumnSelector)return null;const _=b.open&&b.panelId===g;return(0,f.jsx)(v.slots.baseButton,(0,n.A)({ref:t,id:m,size:"small","aria-label":y.current.getLocaleText("toolbarColumnsLabel"),"aria-haspopup":"menu","aria-expanded":_,"aria-controls":_?g:void 0,startIcon:(0,f.jsx)(v.slots.columnSelectorIcon,{})},h,{onClick:e=>{b.open&&b.openedPanelValue===c.y.columns?y.current.hidePreferences():y.current.showPreferences(c.y.columns,g,m),null==i||i(e)}},null==(r=v.slotProps)?void 0:r.baseButton,{children:y.current.getLocaleText("toolbarColumns")}))}))},kk1M:(e,t,r)=>{"use strict";r.d(t,{z:()=>_});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("A3c4"),s=r("N0rN"),l=r("IXjO"),c=r("LutX"),u=r("mkGA"),d=r("gYIS"),f=r("gBcZ"),p=r("EQ6w"),h=r("hmGc"),m=r("aKua"),g=r("FltU"),y=r("7Cdf"),v=r("nKUr");const b=["onClick"],_=i.forwardRef((function(e,t){var r;const{onClick:_}=e,x=(0,o.A)(e,b),w=(0,p.h)(),A=(0,g.A)(),S=(0,h.N)(w,d.BC),C=(0,a.A)(),E=(0,a.A)(),[T,I]=i.useState(!1),k=i.useRef(null),M=(0,s.A)(t,k),R=[{icon:(0,v.jsx)(A.slots.densityCompactIcon,{}),label:w.current.getLocaleText("toolbarDensityCompact"),value:"compact"},{icon:(0,v.jsx)(A.slots.densityStandardIcon,{}),label:w.current.getLocaleText("toolbarDensityStandard"),value:"standard"},{icon:(0,v.jsx)(A.slots.densityComfortableIcon,{}),label:w.current.getLocaleText("toolbarDensityComfortable"),value:"comfortable"}],P=i.useMemo((()=>{switch(S){case"compact":return(0,v.jsx)(A.slots.densityCompactIcon,{});case"comfortable":return(0,v.jsx)(A.slots.densityComfortableIcon,{});default:return(0,v.jsx)(A.slots.densityStandardIcon,{})}}),[S,A]);if(A.disableDensitySelector)return null;const O=R.map(((e,t)=>(0,v.jsxs)(c.A,{onClick:()=>{return t=e.value,w.current.setDensity(t),void I(!1);var t},selected:e.value===S,children:[(0,v.jsx)(u.A,{children:e.icon}),e.label]},t)));return(0,v.jsxs)(i.Fragment,{children:[(0,v.jsx)(A.slots.baseButton,(0,n.A)({ref:M,size:"small",startIcon:P,"aria-label":w.current.getLocaleText("toolbarDensityLabel"),"aria-haspopup":"menu","aria-expanded":T,"aria-controls":T?E:void 0,id:C},x,{onClick:e=>{I((e=>!e)),null==_||_(e)}},null==(r=A.slotProps)?void 0:r.baseButton,{children:w.current.getLocaleText("toolbarDensity")})),(0,v.jsx)(m.U,{open:T,target:k.current,onClose:()=>{I(!1)},position:"bottom-start",children:(0,v.jsx)(l.A,{id:E,className:y.x.menuList,"aria-labelledby":C,onKeyDown:e=>{(0,f.vY)(e.key)&&e.preventDefault(),(0,f.HF)(e.key)&&I(!1)},autoFocusItem:T,children:O})})]})}))},"Y3o+":(e,t,r)=>{"use strict";r.d(t,{Q:()=>w});var n=r("+9dH"),o=r("Nlia"),i=r("q1tI"),a=r("Vn7y"),s=r("aGM9"),l=r("A3c4"),c=r("unMj"),u=r("Ow/F"),d=r("ebfa"),f=r("hmGc"),p=r("m0sr"),h=r("iqfI"),m=r("sU2d"),g=r("EQ6w"),y=r("FltU"),v=r("7Cdf"),b=r("nKUr");const _=["componentsProps"],x=(0,a.Ay)("ul",{name:"MuiDataGrid",slot:"ToolbarFilterList",overridesResolver:(e,t)=>t.toolbarFilterList})((({theme:e})=>({margin:e.spacing(1,1,.5),padding:e.spacing(0,1)}))),w=i.forwardRef((function(e,t){var r,a;const{componentsProps:w={}}=e,A=(0,o.A)(e,_),S=w.button||{},C=(0,g.h)(),E=(0,y.A)(),T=(0,f.N)(C,p.Ai),I=(0,f.N)(C,d.gv),k=(0,f.N)(C,h._),M=(e=>{const{classes:t}=e;return(0,s.A)({root:["toolbarFilterList"]},v.B,t)})(E),R=(0,l.A)(),P=(0,l.A)(),O=i.useMemo((()=>{if(k.open)return C.current.getLocaleText("toolbarFiltersTooltipHide");if(0===T.length)return C.current.getLocaleText("toolbarFiltersTooltipShow");const e=e=>I[e.field].filterOperators.find((t=>t.value===e.operator)).label||C.current.getLocaleText(`filterOperator${(0,c.A)(e.operator)}`).toString(),t=e=>{const{getValueAsString:t}=I[e.field].filterOperators.find((t=>t.value===e.operator));return t?t(e.value):e.value};return(0,b.jsxs)("div",{children:[C.current.getLocaleText("toolbarFiltersTooltipActive")(T.length),(0,b.jsx)(x,{className:M.root,ownerState:E,children:T.map(((r,o)=>(0,n.A)({},I[r.field]&&(0,b.jsx)("li",{children:`${I[r.field].headerName||r.field}\n ${e(r)}\n ${null!=r.value?t(r):""}`},o))))})]})}),[C,E,k.open,T,I,M]);if(E.disableColumnFilter)return null;const L=k.open&&k.panelId===P;return(0,b.jsx)(E.slots.baseTooltip,(0,n.A)({title:O,enterDelay:1e3},A,null==(r=E.slotProps)?void 0:r.baseTooltip,{children:(0,b.jsx)(E.slots.baseButton,(0,n.A)({ref:t,id:R,size:"small","aria-label":C.current.getLocaleText("toolbarFiltersLabel"),"aria-controls":L?P:void 0,"aria-expanded":L,"aria-haspopup":!0,startIcon:(0,b.jsx)(u.A,{badgeContent:T.length,color:"primary",children:(0,b.jsx)(E.slots.openFilterButtonIcon,{})})},S,{onClick:e=>{var t;const{open:r,openedPanelValue:n}=k;r&&n===m.y.filters?C.current.hidePreferences():C.current.showPreferences(m.y.filters,P,R),null==(t=S.onClick)||t.call(S,e)}},null==(a=E.slotProps)?void 0:a.baseButton,{children:C.current.getLocaleText("toolbarFilters")}))}))}))},"7Cdf":(e,t,r)=>{"use strict";r.d(t,{B:()=>o,x:()=>i});var n=r("TkYO");function o(e){return(0,n.Ay)("MuiDataGrid",e)}const i=(0,r("PYeY").A)("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--selectionMode","cell","cellContent","cellCheckbox","cellSkeleton","checkboxInput","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderDropZone","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnGroupHeader","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeader--showColumnBorder","columnHeaders","columnHeadersInner","columnHeadersInner--scrollable","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsPanel","columnsPanelRow","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","row","row--editable","row--editing","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","scrollArea--left","scrollArea--right","scrollArea","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","pinnedColumns--left","pinnedColumns--right","pinnedColumnHeaders","pinnedColumnHeaders--left","pinnedColumnHeaders--right","withBorderColor","cell--withRightBorder","columnHeader--withRightBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"])},"3qeK":(e,t,r)=>{"use strict";r.d(t,{y:()=>n});const n=r("q1tI").createContext(void 0)},ebfa:(e,t,r)=>{"use strict";r.d(t,{FY:()=>l,JR:()=>i,OV:()=>s,Oe:()=>p,Sw:()=>d,TI:()=>u,U8:()=>h,em:()=>o,fc:()=>f,gv:()=>a,iv:()=>c});var n=r("GPgX");const o=e=>e.columns,i=(0,n.Mz)(o,(e=>e.orderedFields)),a=(0,n.Mz)(o,(e=>e.lookup)),s=(0,n.S)(i,a,((e,t)=>e.map((e=>t[e])))),l=(0,n.Mz)(o,(e=>e.columnVisibilityModel)),c=(0,n.S)(s,l,((e,t)=>e.filter((e=>!1!==t[e.field])))),u=(0,n.S)(c,(e=>e.map((e=>e.field)))),d=(0,n.S)(c,(e=>{const t=[];let r=0;for(let n=0;n{const r=e.length;return 0===r?0:t[r-1]+e[r-1].computedWidth})),p=(0,n.S)(s,(e=>e.filter((e=>e.filterable)))),h=(0,n.S)(s,(e=>e.reduce(((e,t)=>(t.filterable&&(e[t.field]=t),e)),{})))},gYIS:(e,t,r)=>{"use strict";r.d(t,{BC:()=>i,_v:()=>o,rf:()=>a});var n=r("GPgX");const o=e=>e.density,i=(0,n.Mz)(o,(e=>e.value)),a=(0,n.Mz)(o,(e=>e.factor))},m0sr:(e,t,r)=>{"use strict";r.d(t,{Ai:()=>v,O7:()=>g,RN:()=>y,ZI:()=>l,ZP:()=>u,em:()=>d,od:()=>b,qA:()=>h,tW:()=>m,ux:()=>f,wx:()=>c});var n=r("GPgX"),o=r("ZmDP"),i=r("ebfa"),a=r("VV28");const s=e=>e.filter,l=(0,n.Mz)(s,(e=>e.filterModel)),c=((0,n.Mz)(l,(e=>e.quickFilterValues)),(0,n.Mz)(s,(e=>e.filteredRowsLookup))),u=(0,n.Mz)(s,(e=>e.filteredDescendantCountLookup)),d=(0,n.S)((e=>e.visibleRowsLookup),o.J6,((e,t)=>t.filter((t=>!1!==e[t.id])))),f=(0,n.S)(d,(e=>e.map((e=>e.id)))),p=(0,n.S)(c,o.J6,((e,t)=>t.filter((t=>!1!==e[t.id])))),h=(0,n.S)(p,(e=>e.map((e=>e.id)))),m=(0,n.S)(d,a.qj,a.V2,((e,t,r)=>r<2?e:e.filter((e=>{var r;return 0===(null==(r=t[e.id])?void 0:r.depth)})))),g=(0,n.Mz)(d,(e=>e.length)),y=(0,n.Mz)(m,(e=>e.length)),v=(0,n.S)(l,i.gv,((e,t)=>{var r;return null==(r=e.items)?void 0:r.filter((e=>{var r,n;if(!e.field)return!1;const o=t[e.field];if(null==o||!o.filterOperators||0===(null==o||null==(r=o.filterOperators)?void 0:r.length))return!1;const i=o.filterOperators.find((t=>t.value===e.operator));return!!i&&(!i.InputComponent||null!=e.value&&""!==(null==(n=e.value)?void 0:n.toString()))}))})),b=(0,n.S)(v,(e=>e.reduce(((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e)),{})))},"/8PD":(e,t,r)=>{"use strict";r.d(t,{T:()=>o});var n=r("ptGW");const o=()=>({items:[],logicOperator:n.V.And,quickFilterValues:[],quickFilterLogicOperator:n.V.And})},io7V:(e,t,r)=>{"use strict";r.d(t,{Fv:()=>_,zk:()=>d,zU:()=>g,Ko:()=>w,WL:()=>y,L5:()=>m});var n=r("+9dH"),o=r("ptGW"),i=r("xLAl"),a=r("/8PD"),s=r("gkz3");function l(e){return{current:e.current.getPublicApi()}}var c=r("ebfa");let u;const d=(e,t)=>{const r=(0,n.A)({},e);if(null==r.id&&(r.id=Math.round(1e5*Math.random())),null==r.operator){const e=(0,c.gv)(t)[r.field];r.operator=e&&e.filterOperators[0].value}return r},f=(0,s.f)(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),p=(0,s.f)("MUI: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),h=(0,s.f)("MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),m=(e,t,r)=>{const o=e.items.length>1;let i;o&&t?(f(),i=[e.items[0]]):i=e.items;const a=o&&i.some((e=>null==e.id)),s=i.some((e=>null==e.operator));return a&&p(),s&&h(),s||a?(0,n.A)({},e,{items:i.map((e=>d(e,r)))}):e.items!==i?(0,n.A)({},e,{items:i}):e},g=(e,t,r)=>o=>(0,n.A)({},o,{filterModel:m(e,t,r)}),y=e=>"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,v=(e,t)=>{if(!e.field||!e.operator)return null;const r=t.current.getColumn(e.field);if(!r)return null;let o;if(r.valueParser){var a;const t=r.valueParser;o=Array.isArray(e.value)?null==(a=e.value)?void 0:a.map((e=>t(e))):t(e.value)}else o=e.value;const{ignoreDiacritics:s}=t.current.rootProps;s&&(o=y(o));const c=(0,n.A)({},e,{value:o}),u=r.filterOperators;if(null==u||!u.length)throw new Error(`MUI: No filter operators found for column '${r.field}'.`);const d=u.find((e=>e.value===c.operator));if(!d)throw new Error(`MUI: No filter operator found for column '${r.field}' and operator value '${c.operator}'.`);const f=!(0,i.E0)(d.getApplyFilterFn),p=!(0,i.E0)(d.getApplyFilterFnV7),h=l(t);if(d.getApplyFilterFnV7&&(!f||p)){const e=d.getApplyFilterFnV7(c,r);return"function"!=typeof e?null:{v7:!0,item:c,fn:n=>{let o=t.current.getRowValue(n,r);return s&&(o=y(o)),e(o,n,r,h)}}}const m=d.getApplyFilterFn(c,r);return"function"!=typeof m?null:{v7:!1,item:c,fn:e=>{const r=t.current.getCellParams(e,c.field);i.Dc.current=h,s&&(r.value=y(r.value));const n=m(r);return i.Dc.current=null,n}}};let b=1;const _=(e,t,r)=>{const n=((e,t,r)=>{const{items:n}=e,o=n.map((e=>v(e,t))).filter((e=>!!e));if(0===o.length)return null;if(r||!function(){if(void 0!==u)return u;try{u=new Function("return true")()}catch(e){u=!1}return u}())return(e,r)=>{const n={};for(let i=0;i`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`)).join("\n")}\n\nconst result$$ = {\n${o.map(((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t}\n ? false\n : ${e.v7?`appliers[${t}].fn(row)`:`appliers[${t}].fn(getRowId(row))`},`)).join("\n")}\n};\n\nreturn result$$;`.replaceAll("$$",String(b)));return b+=1,(e,r)=>i(t.current.getRowId,o,e,r)})(e,t,r),o=((e,t)=>{var r,n,o;const a=null!=(r=null==(n=e.quickFilterValues)?void 0:n.filter(Boolean))?r:[];if(0===a.length)return null;const s=null!=(o=e.quickFilterExcludeHiddenColumns)&&o?(0,c.TI)(t):(0,c.JR)(t),u=[],{ignoreDiacritics:d}=t.current.rootProps,f=l(t);return s.forEach((e=>{const r=t.current.getColumn(e),n=null==r?void 0:r.getApplyQuickFilterFn,o=null==r?void 0:r.getApplyQuickFilterFnV7,s=!(0,i.E0)(n),l=!(0,i.E0)(o);!o||s&&!l?n&&u.push({column:r,appliers:a.map((e=>{const t=d?y(e):e;return{v7:!1,fn:n(t,r,f)}}))}):u.push({column:r,appliers:a.map((e=>{const t=d?y(e):e;return{v7:!0,fn:o(t,r,f)}}))})})),function(e,r){const n={},o={};e:for(let s=0;snull!=e,w=(e,t,r,n,i)=>{const s=((e,t,r)=>(e.cleanedFilterItems||(e.cleanedFilterItems=r.filter((e=>null!==v(e,t)))),e.cleanedFilterItems))(i,n,r.items),l=e.filter(x),c=t.filter(x);if(l.length>0){var u;const e=e=>l.some((t=>t[e.id]));if((null!=(u=r.logicOperator)?u:(0,a.T)().logicOperator)===o.V.And){if(!s.every(e))return!1}else if(!s.some(e))return!1}if(c.length>0&&null!=r.quickFilterValues){var d;const e=e=>c.some((t=>t[e]));if((null!=(d=r.quickFilterLogicOperator)?d:(0,a.T)().quickFilterLogicOperator)===o.V.And){if(!r.quickFilterValues.every(e))return!1}else if(!r.quickFilterValues.some(e))return!1}return!0}},iqfI:(e,t,r)=>{"use strict";r.d(t,{_:()=>n});const n=e=>e.preferencePanel},sU2d:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});var n=function(e){return e.filters="filters",e.columns="columns",e}(n||{})},VV28:(e,t,r)=>{"use strict";r.d(t,{$2:()=>g,A6:()=>h,Dl:()=>a,H0:()=>i,Mz:()=>f,O8:()=>s,OQ:()=>y,V2:()=>p,Y1:()=>d,gk:()=>c,qj:()=>u,rI:()=>l});var n=r("GPgX");const o=e=>e.rows,i=(0,n.Mz)(o,(e=>e.totalRowCount)),a=(0,n.Mz)(o,(e=>e.loading)),s=(0,n.Mz)(o,(e=>e.totalTopLevelRowCount)),l=(0,n.Mz)(o,(e=>e.dataRowIdToModelLookup)),c=(0,n.Mz)(o,(e=>e.dataRowIdToIdLookup)),u=(0,n.Mz)(o,(e=>e.tree)),d=(0,n.Mz)(o,(e=>e.groupingName)),f=(0,n.Mz)(o,(e=>e.treeDepths)),p=(0,n.S)(o,(e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:t.filter((([,e])=>e>0)).map((([e])=>Number(e))).sort(((e,t)=>t-e))[0]+1})),h=(0,n.Mz)(o,(e=>e.dataRowIds)),m=(0,n.Mz)(o,(e=>null==e?void 0:e.additionalRowGroups)),g=(0,n.S)(m,(e=>{var t,r;const n=null==e?void 0:e.pinnedRows;return{bottom:null==n||null==(t=n.bottom)?void 0:t.map((e=>{var t;return{id:e.id,model:null!=(t=e.model)?t:{}}})),top:null==n||null==(r=n.top)?void 0:r.map((e=>{var t;return{id:e.id,model:null!=(t=e.model)?t:{}}}))}})),y=(0,n.Mz)(g,(e=>{var t,r;return((null==e||null==(t=e.top)?void 0:t.length)||0)+((null==e||null==(r=e.bottom)?void 0:r.length)||0)}))},ZmDP:(e,t,r)=>{"use strict";r.d(t,{J6:()=>s,RJ:()=>a,XU:()=>l,oF:()=>c});var n=r("GPgX"),o=r("VV28");const i=e=>e.sorting,a=(0,n.Mz)(i,(e=>e.sortedRows)),s=(0,n.S)(a,o.rI,((e,t)=>e.map((e=>{var r;return{id:e,model:null!=(r=t[e])?r:{}}})))),l=(0,n.Mz)(i,(e=>e.sortModel)),c=(0,n.S)(l,(e=>e.reduce(((t,r,n)=>(t[r.field]={sortDirection:r.sort,sortIndex:e.length>1?n+1:void 0},t)),{})))},EQ6w:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var n=r("q1tI"),o=r("yAU5");function i(){const e=n.useContext(o.k);if(void 0===e)throw new Error(["MUI: Could not find the data grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join("\n"));return e}},FltU:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r("q1tI"),o=r("3qeK");const i=()=>{const e=n.useContext(o.y);if(!e)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e}},hmGc:(e,t,r)=>{"use strict";r.d(t,{N:()=>f,T:()=>u});var n=r("q1tI"),o=r("v+Lp"),i=r("sy2/"),a=r("gkz3"),s=r("TL/R");function l(e,t){return function(e){return e.acceptsApiRef}(t)?t(e):t(e.current.state)}(0,a.f)(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);const c=Object.is,u=s.v,d=()=>({state:null,equals:null,selector:null}),f=(e,t,r=c)=>{const a=(0,o.n)(d),s=null!==a.current.selector,[u,f]=n.useState(s?null:l(e,t));return a.current.state=u,a.current.equals=r,a.current.selector=t,(0,i.y)((()=>e.current.store.subscribe((()=>{const t=l(e,a.current.selector);a.current.equals(a.current.state,t)||(a.current.state=t,f(t))})))),u}},"v+Lp":(e,t,r)=>{"use strict";r.d(t,{n:()=>i});var n=r("q1tI");const o={};function i(e,t){const r=n.useRef(o);return r.current===o&&(r.current=e(t)),r}},"sy2/":(e,t,r)=>{"use strict";r.d(t,{y:()=>i});var n=r("q1tI");const o=[];function i(e){n.useEffect(e,o)}},Br4D:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r("v+Lp"),o=r("sy2/");class i{constructor(){this.currentId=0,this.clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new i}start(e,t){this.clear(),this.currentId=setTimeout(t,e)}}function a(){const e=(0,n.n)(i.create).current;return(0,o.y)(e.disposeEffect),e}},v5ks:(e,t,r)=>{"use strict";r.d(t,{n:()=>n});const n=(o={noRowsLabel:"Pas de résultats",noResultsOverlayLabel:"Aucun résultat.",toolbarDensity:"Densité",toolbarDensityLabel:"Densité",toolbarDensityCompact:"Compacte",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Confortable",toolbarColumns:"Colonnes",toolbarColumnsLabel:"Choisir les colonnes",toolbarFilters:"Filtres",toolbarFiltersLabel:"Afficher les filtres",toolbarFiltersTooltipHide:"Cacher les filtres",toolbarFiltersTooltipShow:"Afficher les filtres",toolbarFiltersTooltipActive:e=>e>1?`${e} filtres actifs`:`${e} filtre actif`,toolbarQuickFilterPlaceholder:"Rechercher…",toolbarQuickFilterLabel:"Recherche",toolbarQuickFilterDeleteIconLabel:"Supprimer",toolbarExport:"Exporter",toolbarExportLabel:"Exporter",toolbarExportCSV:"Télécharger en CSV",toolbarExportPrint:"Imprimer",toolbarExportExcel:"Télécharger pour Excel",columnsPanelTextFieldLabel:"Chercher une colonne",columnsPanelTextFieldPlaceholder:"Titre de la colonne",columnsPanelDragIconLabel:"Réorganiser la colonne",columnsPanelShowAllButton:"Tout afficher",columnsPanelHideAllButton:"Tout cacher",filterPanelAddFilter:"Ajouter un filtre",filterPanelRemoveAll:"Tout supprimer",filterPanelDeleteIconLabel:"Supprimer",filterPanelLogicOperator:"Opérateur logique",filterPanelOperator:"Opérateur",filterPanelOperatorAnd:"Et",filterPanelOperatorOr:"Ou",filterPanelColumns:"Colonne",filterPanelInputLabel:"Valeur",filterPanelInputPlaceholder:"Filtrer la valeur",filterOperatorContains:"contient",filterOperatorEquals:"est égal à",filterOperatorStartsWith:"commence par",filterOperatorEndsWith:"se termine par",filterOperatorIs:"est",filterOperatorNot:"n'est pas",filterOperatorAfter:"postérieur",filterOperatorOnOrAfter:"égal ou postérieur",filterOperatorBefore:"antérieur",filterOperatorOnOrBefore:"égal ou antérieur",filterOperatorIsEmpty:"est vide",filterOperatorIsNotEmpty:"n'est pas vide",filterOperatorIsAnyOf:"fait partie de","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contient",headerFilterOperatorEquals:"Est égal à",headerFilterOperatorStartsWith:"Commence par",headerFilterOperatorEndsWith:"Se termine par",headerFilterOperatorIs:"Est",headerFilterOperatorNot:"N'est pas",headerFilterOperatorAfter:"Postérieur",headerFilterOperatorOnOrAfter:"Égal ou postérieur",headerFilterOperatorBefore:"Antérieur",headerFilterOperatorOnOrBefore:"Égal ou antérieur",headerFilterOperatorIsEmpty:"Est vide",headerFilterOperatorIsNotEmpty:"N'est pas vide",headerFilterOperatorIsAnyOf:"Fait partie de","headerFilterOperator=":"Est égal à","headerFilterOperator!=":"N'est pas égal à","headerFilterOperator>":"Est supérieur à","headerFilterOperator>=":"Est supérieur ou égal à","headerFilterOperator<":"Est inférieur à","headerFilterOperator<=":"Est inférieur ou égal à",filterValueAny:"tous",filterValueTrue:"vrai",filterValueFalse:"faux",columnMenuLabel:"Menu",columnMenuShowColumns:"Afficher les colonnes",columnMenuManageColumns:"Gérer les colonnes",columnMenuFilter:"Filtrer",columnMenuHideColumn:"Cacher",columnMenuUnsort:"Annuler le tri",columnMenuSortAsc:"Tri ascendant",columnMenuSortDesc:"Tri descendant",columnHeaderFiltersTooltipActive:e=>e>1?`${e} filtres actifs`:`${e} filtre actif`,columnHeaderFiltersLabel:"Afficher les filtres",columnHeaderSortIconLabel:"Trier",footerRowSelected:e=>e>1?`${e.toLocaleString()} lignes sélectionnées`:`${e.toLocaleString()} ligne sélectionnée`,footerTotalRows:"Total de lignes :",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} sur ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Sélection",checkboxSelectionSelectAllRows:"Sélectionner toutes les lignes",checkboxSelectionUnselectAllRows:"Désélectionner toutes les lignes",checkboxSelectionSelectRow:"Sélectionner la ligne",checkboxSelectionUnselectRow:"Désélectionner la ligne",booleanCellTrueLabel:"vrai",booleanCellFalseLabel:"faux",actionsCellMore:"Plus",pinToLeft:"Épingler à gauche",pinToRight:"Épingler à droite",unpin:"Désépingler",treeDataGroupingHeaderName:"Groupe",treeDataExpand:"afficher les enfants",treeDataCollapse:"masquer les enfants",groupingColumnHeaderName:"Groupe",groupColumn:e=>`Grouper par ${e}`,unGroupColumn:e=>`Arrêter de grouper par ${e}`,detailPanelToggle:"Afficher/masquer les détails",expandDetailPanel:"Afficher",collapseDetailPanel:"Masquer",rowReorderingHeaderName:"Positionnement des lignes",aggregationMenuItemHeader:"Agrégation",aggregationFunctionLabelSum:"Somme",aggregationFunctionLabelAvg:"Moyenne",aggregationFunctionLabelMin:"Minimum",aggregationFunctionLabelMax:"Maximum",aggregationFunctionLabelSize:"Nombre d'éléments"},i={components:{MuiBreadcrumbs:{defaultProps:{expandText:"Montrer le chemin"}},MuiTablePagination:{defaultProps:{getItemAriaLabel:e=>"first"===e?"Aller à la première page":"last"===e?"Aller à la dernière page":"next"===e?"Aller à la page suivante":"Aller à la page précédente",labelRowsPerPage:"Lignes par page :",labelDisplayedRows:({from:e,to:t,count:r})=>`${e}–${t} sur ${-1!==r?r:`plus que ${t}`}`}},MuiRating:{defaultProps:{getLabelText:e=>`${e} Etoile${1!==e?"s":""}`,emptyLabelText:"Vide"}},MuiAutocomplete:{defaultProps:{clearText:"Vider",closeText:"Fermer",loadingText:"Chargement…",noOptionsText:"Pas de résultats",openText:"Ouvrir"}},MuiAlert:{defaultProps:{closeText:"Fermer"}},MuiPagination:{defaultProps:{"aria-label":"navigation de pagination",getItemAriaLabel:(e,t,r)=>"page"===e?`${r?"":"Aller à la "}page ${t}`:"first"===e?"Aller à la première page":"last"===e?"Aller à la dernière page":"next"===e?"Aller à la page suivante":"Aller à la page précédente"}}}},{components:{MuiDataGrid:{defaultProps:{localeText:(0,r("+9dH").A)({},o,{MuiTablePagination:(null==i||null==(a=i.components)||null==(a=a.MuiTablePagination)?void 0:a.defaultProps)||{}})}}}});var o,i,a},ptGW:(e,t,r)=>{"use strict";r.d(t,{V:()=>n});var n=function(e){return e.And="and",e.Or="or",e}(n||{})},GPgX:(e,t,r)=>{"use strict";function n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;nc,S:()=>u});var o=n(r("EsgF").UI),i=r("gkz3");const a={cache:new WeakMap};function s(e){return"current"in e&&"instanceId"in e.current}(0,i.f)(["MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.","To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`."]);const l={id:"default"},c=(e,t,r,n,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&r&&n&&o&&i)c=(a,c)=>{const u=s(a),d=null!=c?c:u?a.current.instanceId:l,f=u?a.current.state:a,p=e(f,d),h=t(f,d),m=r(f,d),g=n(f,d),y=o(f,d);return i(p,h,m,g,y)};else if(e&&t&&r&&n&&o)c=(i,a)=>{const c=s(i),u=null!=a?a:c?i.current.instanceId:l,d=c?i.current.state:i,f=e(d,u),p=t(d,u),h=r(d,u),m=n(d,u);return o(f,p,h,m)};else if(e&&t&&r&&n)c=(o,i)=>{const a=s(o),c=null!=i?i:a?o.current.instanceId:l,u=a?o.current.state:o,d=e(u,c),f=t(u,c),p=r(u,c);return n(d,f,p)};else if(e&&t&&r)c=(n,o)=>{const i=s(n),a=null!=o?o:i?n.current.instanceId:l,c=i?n.current.state:n,u=e(c,a),d=t(c,a);return r(u,d)};else{if(!e||!t)throw new Error("Missing arguments");c=(r,n)=>{const o=s(r),i=null!=n?n:o?r.current.instanceId:l,a=o?r.current.state:r,c=e(a,i);return t(c)}}return c.acceptsApiRef=!0,c},u=(...e)=>{const t=(...t)=>{var r,n;const[i,c]=t,u=s(i),d=u?i.current.instanceId:null!=c?c:l,f=u?i.current.state:i,{cache:p}=a;var h;if(p.get(d)&&null!=(r=p.get(d))&&r.get(e))return null==(h=p.get(d))?void 0:h.get(e)(f,d);const m=o(...e);return p.get(d)||p.set(d,new Map),null==(n=p.get(d))||n.set(e,m),m(f,d)};return t.acceptsApiRef=!0,t}},"TL/R":(e,t,r)=>{"use strict";r.d(t,{v:()=>o});const n=Object.is;function o(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let r=0,o=0;for(const o in e){if(r+=1,!n(e[o],t[o]))return!1;if(!(o in t))return!1}for(const e in t)o+=1;return r===o}},gBcZ:(e,t,r)=>{"use strict";r.d(t,{C8:()=>a,Ci:()=>o,HF:()=>u,TW:()=>s,kx:()=>c,nx:()=>n,q9:()=>l,vY:()=>i});const n=e=>"Escape"===e,o=e=>"Enter"===e,i=e=>"Tab"===e,a=e=>" "===e;function s(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}const l=e=>(e=>"Home"===e||"End"===e)(e)||(e=>0===e.indexOf("Arrow"))(e)||(e=>0===e.indexOf("Page"))(e)||a(e),c=e=>!!e.key,u=e=>i(e)||n(e)},XVIy:(e,t,r)=>{"use strict";function n(e){return"number"==typeof e&&!Number.isNaN(e)}function o(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}function s(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r.d(t,{Et:()=>n,Go:()=>d,Gv:()=>i,Hv:()=>c,Nt:()=>s,Tn:()=>o,nX:()=>u,qE:()=>l,s3:()=>a});const l=(e,t,r)=>Math.max(t,Math.min(r,e));function c(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const r=e.length;if(r!==t.length)return!1;for(let n=0;n{let e=o+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296});var o;return()=>t+(r-t)*n()}function d(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}},gkz3:(e,t,r)=>{"use strict";r.d(t,{f:()=>n});const n=(e,t="warning")=>{let r=!1;const n=Array.isArray(e)?e.join("\n"):e;return()=>{r||(r=!0,"error"===t?console.error(n):console.warn(n))}}},HQI6:(e,t,r)=>{"use strict";r.d(t,{K:()=>o});const n="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();n.__MUI_LICENSE_INFO__=n.__MUI_LICENSE_INFO__||{key:void 0};class o{static getLicenseInfo(){return n.__MUI_LICENSE_INFO__}static getLicenseKey(){return o.getLicenseInfo().key}static setLicenseKey(e){o.getLicenseInfo().key=e}}},aKzv:(e,t,r)=>{"use strict";function n(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;on})},eWwy:function(e,t,r){!function(e,t){"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r provider."));return e}(t.useContext(_),e)},S=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an provider."));return e}(t.useContext(x),e)},C=function(e){return(0,e.children)(A("mounts "))};C.propTypes={children:f.func.isRequired};var E=function(e,r,n){var o=!!n,i=t.useRef(n);t.useEffect((function(){i.current=n}),[n]),t.useEffect((function(){if(!o||!e)return function(){};var t=function(){i.current&&i.current.apply(i,arguments)};return e.on(r,t),function(){e.off(r,t)}}),[o,r,e,i])},T=function(e,r){var n,o="".concat((n=e).charAt(0).toUpperCase()+n.slice(1),"Element"),i=r?function(e){A("mounts <".concat(o,">")),S("mounts <".concat(o,">"));var r=e.id,n=e.className;return t.createElement("div",{id:r,className:n})}:function(r){var n,i=r.id,s=r.className,l=r.options,c=void 0===l?{}:l,u=r.onBlur,d=r.onFocus,f=r.onReady,h=r.onChange,m=r.onEscape,g=r.onClick,v=r.onLoadError,b=r.onLoaderStart,_=r.onNetworksChange,x=r.onCheckout,w=r.onLineItemClick,C=r.onConfirm,T=r.onCancel,I=r.onShippingAddressChange,k=r.onShippingRateChange,M=A("mounts <".concat(o,">")).elements,R=a(t.useState(null),2),P=R[0],O=R[1],L=t.useRef(null),D=t.useRef(null),N=S("mounts <".concat(o,">")),F=N.setCart,z=N.setCartState;E(P,"blur",u),E(P,"focus",d),E(P,"escape",m),E(P,"click",g),E(P,"loaderror",v),E(P,"loaderstart",b),E(P,"networkschange",_),E(P,"lineitemclick",w),E(P,"confirm",C),E(P,"cancel",T),E(P,"shippingaddresschange",I),E(P,"shippingratechange",k),"cart"===e?n=function(e){z(e),f&&f(e)}:f&&(n="payButton"===e?f:function(){f(P)}),E(P,"ready",n),E(P,"change","cart"===e?function(e){z(e),h&&h(e)}:h),E(P,"checkout","cart"===e?function(e){z(e),x&&x(e)}:x),t.useLayoutEffect((function(){if(null===L.current&&M&&null!==D.current){var t=M.create(e,c);"cart"===e&&F&&F(t),L.current=t,O(t),t.mount(D.current)}}),[M,c,F]);var B=p(c);return t.useEffect((function(){if(L.current){var e=y(c,B,["paymentRequest"]);e&&L.current.update(e)}}),[c,B]),t.useLayoutEffect((function(){return function(){L.current&&(L.current.destroy(),L.current=null)}}),[]),t.createElement("div",{id:i,className:s,ref:D})};return i.propTypes={id:f.string,className:f.string,onChange:f.func,onBlur:f.func,onFocus:f.func,onReady:f.func,onEscape:f.func,onClick:f.func,onLoadError:f.func,onLoaderStart:f.func,onNetworksChange:f.func,onCheckout:f.func,onLineItemClick:f.func,onConfirm:f.func,onCancel:f.func,onShippingAddressChange:f.func,onShippingRateChange:f.func,options:f.object},i.displayName=o,i.__elementType=e,i},I="undefined"==typeof window,k=T("auBankAccount",I),M=T("card",I),R=T("cardNumber",I),P=T("cardExpiry",I),O=T("cardCvc",I),L=T("fpxBank",I),D=T("iban",I),N=T("idealBank",I),F=T("p24Bank",I),z=T("epsBank",I),B=T("payment",I),j=T("payButton",I),U=T("paymentRequestButton",I),$=T("linkAuthentication",I),V=T("address",I),G=T("shippingAddress",I),H=T("cart",I),W=T("paymentMethodMessaging",I),q=T("affirmMessage",I),X=T("afterpayClearpayMessage",I);e.AddressElement=V,e.AffirmMessageElement=q,e.AfterpayClearpayMessageElement=X,e.AuBankAccountElement=k,e.CardCvcElement=O,e.CardElement=M,e.CardExpiryElement=P,e.CardNumberElement=R,e.CartElement=H,e.Elements=w,e.ElementsConsumer=C,e.EpsBankElement=z,e.FpxBankElement=L,e.IbanElement=D,e.IdealBankElement=N,e.LinkAuthenticationElement=$,e.P24BankElement=F,e.PayButtonElement=j,e.PaymentElement=B,e.PaymentMethodMessagingElement=W,e.PaymentRequestButtonElement=U,e.ShippingAddressElement=G,e.useCartElement=function(){return S("calls useCartElement()").cart},e.useCartElementState=function(){return S("calls useCartElementState()").cartState},e.useElements=function(){return A("calls useElements()").elements},e.useStripe=function(){return A("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,r("q1tI"))},"v4r+":(e,t,r)=>{"use strict";r.d(t,{c:()=>c});var n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,i="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",a=null,s=Promise.resolve().then((function(){return e=null,null!==a||(a=new Promise((function(t,r){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(i),window.Stripe)t(window.Stripe);else try{var a=function(){for(var e=document.querySelectorAll('script[src^="'.concat(n,'"]')),t=0;t element.");return o.appendChild(r),r}(e)),a.addEventListener("load",(function(){window.Stripe?t(window.Stripe):r(new Error("Stripe.js not available"))})),a.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(e){return void r(e)}else t(null)}))),a;var e})),l=!1;s.catch((function(e){l||console.warn(e)}));var c=function(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";var n=r("2TsN");function o(e){var t=[1/0,1/0,-1/0,-1/0];return n.coordEach(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]{"use strict";function r(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function n(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:e},t,n)}function o(e,t,n){void 0===n&&(n={});for(var o=0,i=e;o=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},t.radiansToLength=u,t.lengthToRadians=d,t.lengthToDegrees=function(e,t){return f(d(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=f,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(d(e,t),r)},t.convertArea=function(e,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var o=t.areaFactors[r];if(!o)throw new Error("invalid original units");var i=t.areaFactors[n];if(!i)throw new Error("invalid final units");return e/o*i},t.isNumber=p,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!p(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},"2TsN":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("Vp63");function o(e,t,r){if(null!==e)for(var n,i,a,s,l,c,u,d,f=0,p=0,h=e.type,m="FeatureCollection"===h,g="Feature"===h,y=m?e.features.length:1,v=0;vc||p>u||h>d)return l=o,c=r,u=p,d=h,void(a=0);var m=n.lineString([l,o],e.properties);if(!1===t(m,r,i,h,a))return!1;a++,l=o}))&&void 0}}}))}function u(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,r,o){if(null!==e.geometry){var i=e.geometry.type,a=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,r,o,0,0))return!1;break;case"Polygon":for(var s=0;s{"use strict";var n=r("AM7I"),o=r("PrET"),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},PrET:(e,t,r)=>{"use strict";var n=r("D3zA"),o=r("AM7I"),i=r("0Ake"),a=r("DSU0"),s=o("%Function.prototype.apply%"),l=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(l,s),u=r("cckQ"),d=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,l,arguments);return i(t,1+d(0,e.length-(arguments.length-1)),!0)};var f=function(){return c(n,s,arguments)};u?u(e.exports,"apply",{value:f}):e.exports.apply=f},"ojA+":(e,t,r)=>{"use strict";var n=r("A1R+"),o=r("+jW5"),i=r("cQc6"),a=r("RXBx").orient2d;function s(e,t,r){t=Math.max(0,void 0===t?2:t),r=r||0;var o=function(e){for(var t=e[0],r=e[0],n=e[0],o=e[0],a=0;an[0]&&(n=s),s[1]o[1]&&(o=s)}var l=[t,r,n,o],c=l.slice();for(a=0;a=2&&p(t[t.length-2],t[t.length-1],e[r])<=0;)t.pop();t.push(e[r])}for(var n=[],o=e.length-1;o>=0;o--){for(;n.length>=2&&p(n[n.length-2],n[n.length-1],e[o])<=0;)n.pop();n.push(e[o])}return n.pop(),t.pop(),t.concat(n)}(c)}(e),a=new n(16);a.toBBox=function(e){return{minX:e[0],minY:e[1],maxX:e[0],maxY:e[1]}},a.compareMinX=function(e,t){return e[0]-t[0]},a.compareMinY=function(e,t){return e[1]-t[1]},a.load(e);for(var s,c=[],u=0;ua||l.push({node:h,dist:m})}for(;l.length&&!l.peek().node.children;){var g=l.pop(),v=g.node,b=y(v,t,r),_=y(v,n,i);if(g.dist=t.minX&&e[0]<=t.maxX&&e[1]>=t.minY&&e[1]<=t.maxY}function f(e,t,r){for(var n,o,i,a,s=Math.min(e[0],t[0]),l=Math.min(e[1],t[1]),c=Math.max(e[0],t[0]),u=Math.max(e[1],t[1]),d=r.search({minX:s,minY:l,maxX:c,maxY:u}),f=0;f0!=p(n,o,a)>0&&p(i,a,n)>0!=p(i,a,o)>0)return!1;return!0}function p(e,t,r){return a(e[0],e[1],t[0],t[1],r[0],r[1])}function h(e){var t=e.p,r=e.next.p;return e.minX=Math.min(t[0],r[0]),e.minY=Math.min(t[1],r[1]),e.maxX=Math.max(t[0],r[0]),e.maxY=Math.max(t[1],r[1]),e}function m(e,t){var r={p:e,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(r.next=t.next,r.prev=t,t.next.prev=r,t.next=r):(r.prev=r,r.next=r),r}function g(e,t){var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n}function y(e,t,r){var n=t[0],o=t[1],i=r[0]-n,a=r[1]-o;if(0!==i||0!==a){var s=((e[0]-n)*i+(e[1]-o)*a)/(i*i+a*a);s>1?(n=r[0],o=r[1]):s>0&&(n+=i*s,o+=a*s)}return(i=e[0]-n)*i+(a=e[1]-o)*a}function v(e,t,r,n,o,i,a,s){var l,c,u,d,f=r-e,p=n-t,h=a-o,m=s-i,g=e-o,y=t-i,v=f*f+p*p,b=f*h+p*m,_=h*h+m*m,x=f*g+p*y,w=h*g+m*y,A=v*_-b*b,S=A,C=A;0===A?(c=0,S=1,d=w,C=_):(d=v*w-b*x,(c=b*w-_*x)<0?(c=0,d=w,C=_):c>S&&(c=S,d=w+b,C=_)),d<0?(d=0,-x<0?c=0:-x>v?c=S:(c=-x,S=v)):d>C&&(d=C,-x+b<0?c=0:-x+b>v?c=S:(c=-x+b,S=v));var E=(1-(u=0===d?0:d/C))*o+u*a-((1-(l=0===c?0:c/S))*e+l*r),T=(1-u)*i+u*s-((1-l)*t+l*n);return E*E+T*T}function b(e,t){return e[0]===t[0]?e[1]-t[1]:e[0]-t[0]}o.default&&(o=o.default),e.exports=s,e.exports.default=s},h9Cn:(e,t,r)=>{"use strict";r.d(t,{A:()=>ge});var n=r("J8ja"),o=r.n(n),i=r("JPst"),a=r.n(i),s=r("HeW1"),l=r.n(s),c=new URL(r("v0lU"),r.b),u=new URL(r("vrwW"),r.b),d=new URL(r("xkAX"),r.b),f=new URL(r("D4A9"),r.b),p=new URL(r("Rg+V"),r.b),h=new URL(r("/qDb"),r.b),m=new URL(r("9nmC"),r.b),g=new URL(r("ijaa"),r.b),y=new URL(r("cPET"),r.b),v=new URL(r("mcLR"),r.b),b=new URL(r("ldEj"),r.b),_=new URL(r("SRPE"),r.b),x=new URL(r("wJqt"),r.b),w=new URL(r("qV5W"),r.b),A=new URL(r("fXVG"),r.b),S=new URL(r("O25N"),r.b),C=new URL(r("g8m3"),r.b),E=new URL(r("EtES"),r.b),T=new URL(r("yYRx"),r.b),I=new URL(r("9mUm"),r.b),k=new URL(r("vrl9"),r.b),M=new URL(r("s4P4"),r.b),R=new URL(r("7v2w"),r.b),P=new URL(r("zBuc"),r.b),O=new URL(r("xO8h"),r.b),L=new URL(r("trXz"),r.b),D=new URL(r("vLF0"),r.b),N=new URL(r("oWHy"),r.b),F=new URL(r("7qhf"),r.b),z=new URL(r("b/dZ"),r.b),B=a()(o()),j=l()(c),U=l()(u),$=l()(d),V=l()(f),G=l()(p),H=l()(h),W=l()(m),q=l()(g),X=l()(y),Z=l()(v),Y=l()(b),K=l()(_),J=l()(x),Q=l()(w),ee=l()(A),te=l()(S),re=l()(C),ne=l()(E),oe=l()(T),ie=l()(I),ae=l()(k),se=l()(M),le=l()(R),ce=l()(P),ue=l()(O),de=l()(L),fe=l()(D),pe=l()(N),he=l()(F),me=l()(z);B.push([e.id,`.mapboxgl-map{-webkit-tap-highlight-color:rgba(0, 0, 0,0);font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative}.mapboxgl-canvas{left:0;position:absolute;top:0}.mapboxgl-map:-webkit-full-screen{height:100%;width:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:grab;-webkit-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.mapboxgl-ctrl-top-left{left:0;top:0}.mapboxgl-ctrl-top-right{right:0;top:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{bottom:0;right:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{float:left;margin:10px 0 0 10px}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{float:right;margin:10px 10px 0 0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{float:left;margin:0 0 10px 10px}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{float:right;margin:0 10px 10px 0}.mapboxgl-ctrl-group{background:#fff;border-radius:4px}.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;overflow:hidden;padding:0;width:29px}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl-group button:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:only-child{border-radius:inherit}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgba(0, 0, 0,0.05)}.mapboxgl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(${j})}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(${U})}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(${$})}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(${V})}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(${G})}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(${H})}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(${W})}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(${q})}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(${X})}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(${Z})}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(${Y})}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(${K})}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(${J})}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(${Q})}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(${ee})}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(${te})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(${re})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url(${ne})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url(${oe})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url(${ie})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url(${ae})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(${se})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(${le})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url(${ne})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url(${oe})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url(${ie})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url(${ae})}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(${ce})}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(${ue})}}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{background-image:url(${de});background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url(${fe})}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url(${pe})}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{background-color:#fff;border-radius:12px;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(${he});border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgba(0, 0, 0,0.05)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{right:0;top:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{left:0;top:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url(${me})}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url(${he})}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);-webkit-text-decoration:none;text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.mapboxgl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.mapboxgl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.mapboxgl-popup-close-button:hover{background-color:rgba(0, 0, 0,0.05)}.mapboxgl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto;position:relative}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{left:0;opacity:1;position:absolute;top:0;transition:opacity .2s;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.mapboxgl-user-location-dot:before{animation:mapboxgl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.mapboxgl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading{height:0;width:0}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after,.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-bottom:7.5px solid #4aa1eb;content:"";position:absolute}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-left:7.5px solid transparent;transform:translateY(-28px) skewY(-20deg)}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after{border-right:7.5px solid transparent;transform:translate(7.5px,-28px) skewY(20deg)}@keyframes mapboxgl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:rgba(29,161,242,0.2);border-radius:100%;height:1px;width:1px}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}@media print{.mapbox-improve-map{display:none}}.mapboxgl-scroll-zoom-blocker,.mapboxgl-touch-pan-blocker{align-items:center;background:rgba(0,0,0,.7);color:#fff;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;height:100%;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;text-align:center;top:0;transition:opacity .75s ease-in-out;transition-delay:1s;width:100%}.mapboxgl-scroll-zoom-blocker-show,.mapboxgl-touch-pan-blocker-show{opacity:1;transition:opacity .1s ease-in-out}.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page,.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page .mapboxgl-canvas{touch-action:pan-x pan-y}`,""]);const ge=B},JPst:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},HeW1:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},J8ja:e=>{"use strict";e.exports=function(e){return e[1]}},PCJV:(e,t,r)=>{"use strict";function n(e,t){return et?1:e>=t?0:NaN}function o(e){var t;return 1===e.length&&(t=e,e=function(e,r){return n(t(e),r)}),{left:function(t,r,n,o){for(null==n&&(n=0),null==o&&(o=t.length);n>>1;e(t[i],r)<0?n=i+1:o=i}return n},right:function(t,r,n,o){for(null==n&&(n=0),null==o&&(o=t.length);n>>1;e(t[i],r)>0?o=i:n=i+1}return n}}}r.d(t,{V_:()=>n,h1:()=>s,yl:()=>o,Am:()=>m,YV:()=>y,y1:()=>v,lq:()=>p,sG:()=>h,Zc:()=>f});var i=o(n),a=i.right;i.left;const s=a;var l=Array.prototype,c=(l.slice,l.map,Math.sqrt(50)),u=Math.sqrt(10),d=Math.sqrt(2);function f(e,t,r){var n,o,i,a,s=-1;if(r=+r,(e=+e)==(t=+t)&&r>0)return[e];if((n=t0)for(e=Math.ceil(e/a),t=Math.floor(t/a),i=new Array(o=Math.ceil(t-e+1));++s=0?(i>=c?10:i>=u?5:i>=d?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=c?10:i>=u?5:i>=d?2:1)}function h(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),o=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),i=n/o;return i>=c?o*=10:i>=u?o*=5:i>=d&&(o*=2),t=0;)for(t=(n=e[o]).length;--t>=0;)r[--a]=n[t];return r}function g(e){return null===e?NaN:+e}function y(e,t,r){if(null==r&&(r=g),n=e.length){if((t=+t)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,o=(n-1)*t,i=Math.floor(o),a=+r(e[i],i,e);return a+(+r(e[i+1],i+1,e)-a)*(o-i)}}function v(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=0|Math.max(0,Math.ceil((t-e)/r)),i=new Array(o);++n{"use strict";r.d(t,{Ay:()=>_,Gw:()=>C,Q1:()=>o,Qh:()=>S,Uw:()=>a,b:()=>A,ef:()=>i});var n=r("Y62N");function o(){}var i=.7,a=1/i,s="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u=/^#([0-9a-f]{3,8})$/,d=new RegExp("^rgb\\("+[s,s,s]+"\\)$"),f=new RegExp("^rgb\\("+[c,c,c]+"\\)$"),p=new RegExp("^rgba\\("+[s,s,s,l]+"\\)$"),h=new RegExp("^rgba\\("+[c,c,c,l]+"\\)$"),m=new RegExp("^hsl\\("+[l,c,c]+"\\)$"),g=new RegExp("^hsla\\("+[l,c,c,l]+"\\)$"),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function _(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=u.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?x(t):3===r?new C(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?w(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?w(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=d.exec(e))?new C(t[1],t[2],t[3],1):(t=f.exec(e))?new C(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=p.exec(e))?w(t[1],t[2],t[3],t[4]):(t=h.exec(e))?w(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=m.exec(e))?k(t[1],t[2]/100,t[3]/100,1):(t=g.exec(e))?k(t[1],t[2]/100,t[3]/100,t[4]):y.hasOwnProperty(e)?x(y[e]):"transparent"===e?new C(NaN,NaN,NaN,0):null}function x(e){return new C(e>>16&255,e>>8&255,255&e,1)}function w(e,t,r,n){return n<=0&&(e=t=r=NaN),new C(e,t,r,n)}function A(e){return e instanceof o||(e=_(e)),e?new C((e=e.rgb()).r,e.g,e.b,e.opacity):new C}function S(e,t,r,n){return 1===arguments.length?A(e):new C(e,t,r,null==n?1:n)}function C(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function E(){return"#"+I(this.r)+I(this.g)+I(this.b)}function T(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function I(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function k(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new R(e,t,r,n)}function M(e){if(e instanceof R)return new R(e.h,e.s,e.l,e.opacity);if(e instanceof o||(e=_(e)),!e)return new R;if(e instanceof R)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,l=a-i,c=(a+i)/2;return l?(s=t===a?(r-n)/l+6*(r0&&c<1?0:s,new R(s,l,c,e.opacity)}function R(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function P(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}(0,n.A)(o,_,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:v,formatHex:v,formatHsl:function(){return M(this).formatHsl()},formatRgb:b,toString:b}),(0,n.A)(C,S,(0,n.X)(o,{brighter:function(e){return e=null==e?a:Math.pow(a,e),new C(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?i:Math.pow(i,e),new C(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:E,formatHex:E,formatRgb:T,toString:T})),(0,n.A)(R,(function(e,t,r,n){return 1===arguments.length?M(e):new R(e,t,r,null==n?1:n)}),(0,n.X)(o,{brighter:function(e){return e=null==e?a:Math.pow(a,e),new R(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?i:Math.pow(i,e),new R(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new C(P(e>=240?e-240:e+120,o,n),P(e,o,n),P(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}))},Y62N:(e,t,r)=>{"use strict";function n(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function o(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}r.d(t,{A:()=>n,X:()=>o})},sFV2:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>s,lG:()=>i,uN:()=>a});var n=r("xpj1");function o(e,t){return function(r){return e+r*t}}function i(e,t){var r=t-e;return r?o(e,r>180||r<-180?r-360*Math.round(r/360):r):(0,n.A)(isNaN(e)?t:e)}function a(e){return 1==(e=+e)?s:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):(0,n.A)(isNaN(t)?r:t)}}function s(e,t){var r=t-e;return r?o(e,r):(0,n.A)(isNaN(e)?t:e)}},xpj1:(e,t,r)=>{"use strict";function n(e){return function(){return e}}r.d(t,{A:()=>n})},"4xfg":(e,t,r)=>{"use strict";function n(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}r.d(t,{A:()=>n})},"8AK+":(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r("FmoU");function o(e,t,r,n,o){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*r+(1+3*e+3*i-3*a)*n+a*o)/6}var i=r("sFV2");const a=function e(t){var r=(0,i.uN)(t);function o(e,t){var o=r((e=(0,n.Qh)(e)).r,(t=(0,n.Qh)(t)).r),a=r(e.g,t.g),s=r(e.b,t.b),l=(0,i.Ay)(e.opacity,t.opacity);return function(t){return e.r=o(t),e.g=a(t),e.b=s(t),e.opacity=l(t),e+""}}return o.gamma=e,o}(1);function s(e){return function(t){var r,o,i=t.length,a=new Array(i),s=new Array(i),l=new Array(i);for(r=0;r=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],s=n>0?e[n-1]:2*i-a,l=ni&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:(0,u.A)(r,n)})),i=p.lastIndex;return i{var n=r("1seS"),o=r("45zb"),i=r("bbcx"),a=r("2Nju"),s=r("5xAX"),l=r("DmXP"),c=Date.prototype.getTime;function u(e){return null==e}function d(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}e.exports=function e(t,r,f){var p=f||{};return!!(p.strict?i(t,r):t===r)||(!t||!r||"object"!=typeof t&&"object"!=typeof r?p.strict?i(t,r):t==r:function(t,r,i){var f,p;if(typeof t!=typeof r)return!1;if(u(t)||u(r))return!1;if(t.prototype!==r.prototype)return!1;if(o(t)!==o(r))return!1;var h=a(t),m=a(r);if(h!==m)return!1;if(h||m)return t.source===r.source&&s(t)===s(r);if(l(t)&&l(r))return c.call(t)===c.call(r);var g=d(t),y=d(r);if(g!==y)return!1;if(g||y){if(t.length!==r.length)return!1;for(f=0;f=0;f--)if(v[f]!=b[f])return!1;for(f=v.length-1;f>=0;f--)if(!e(t[p=v[f]],r[p],i))return!1;return!0}(t,r,p))}},eZIG:(e,t,r)=>{"use strict";var n=r("cckQ"),o=r("Z+6F"),i=r("DSU0"),a=r("Kqna");e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(n)n(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===s&&d?d.enumerable:!s,value:r,writable:null===l&&d?d.writable:!l});else{if(!u&&(s||l||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},"82c2":(e,t,r)=>{"use strict";var n=r("1seS"),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r("eZIG"),l=r("ZLCw")(),c=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;l?s(e,t,r,!0):s(e,t,r)},u=function(e,t){var r=arguments.length>2?arguments[2]:{},i=n(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s{function t(e,t,r,n){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(e,t,r,n)}t.prototype.run=function(e,t,r,n){this._init(e,t,r,n);for(var o=0;o=this.minPts&&(t=this._mergeArrays(t,o))}1!==this._assigned[n]&&this._addToCluster(n,e)}},t.prototype._addToCluster=function(e,t){this.clusters[t].push(e),this._assigned[e]=1},t.prototype._regionQuery=function(e){for(var t=[],r=0;r{function t(e,t,r){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(e,t,r)}t.prototype.init=function(e,t,r){this.assignments=[],this.centroids=[],void 0!==e&&(this.dataset=e),void 0!==t&&(this.k=t),void 0!==r&&(this.distance=r)},t.prototype.run=function(e,t){this.init(e,t);for(var r=this.dataset.length,n=0;n0){for(l=0;l=0);return e},t.prototype.assign=function(){for(var e,t=!1,r=this.dataset.length,n=0;n{if(e.exports)var n=r("rGLf");function o(e,t,r,n){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(e,t,r,n)}o.prototype.run=function(e,t,r,o){this._init(e,t,r,o);for(var i=0,a=this.dataset.length;i=this.minPts)return r},o.prototype._regionQuery=function(e,t){t=t||this.epsilon;for(var r=[],n=0,o=this.dataset.length;n{function t(e,t,r){this._queue=[],this._priorities=[],this._sorting="desc",this._init(e,t,r)}t.prototype.insert=function(e,t){for(var r=this._queue.length,n=r;n--;){var o=this._priorities[n];"desc"===this._sorting?t>o&&(r=n):t{e.exports&&(e.exports={DBSCAN:r("ptXs"),KMEANS:r("f41O"),OPTICS:r("3k7a"),PriorityQueue:r("rGLf")})},VmRL:e=>{"use strict";function t(e,t,n){n=n||2;var i,a,s,l,d,f,h,m=t&&t.length,g=m?t[0]*n:e.length,y=r(e,0,g,n,!0),v=[];if(!y||y.next===y.prev)return v;if(m&&(y=function(e,t,n,o){var i,a,s,l=[];for(i=0,a=t.length;i80*n){i=s=e[0],a=l=e[1];for(var b=n;bs&&(s=d),f>l&&(l=f);h=0!==(h=Math.max(s-i,l-a))?32767/h:0}return o(y,v,n,i,a,h,0),v}function r(e,t,r,n,o){var i,a;if(o===E(e,t,r,n)>0)for(i=t;i=t;i-=n)a=A(i,e[i],e[i+1],a);return a&&y(a,a.next)&&(S(a),a=a.next),a}function n(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(S(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function o(e,t,r,c,u,d,p){if(e){!p&&d&&function(e,t,r,n){var o=e;do{0===o.z&&(o.z=f(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,a,s,l,c=1;do{for(r=e,e=null,i=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(o=r,r=r.nextZ,s--):(o=n,n=n.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}(e,c,u,d);for(var h,m,g=e;e.prev!==e.next;)if(h=e.prev,m=e.next,d?a(e,c,u,d):i(e))t.push(h.i/r|0),t.push(e.i/r|0),t.push(m.i/r|0),S(e),e=m.next,g=m.next;else if((e=m)===g){p?1===p?o(e=s(n(e),t,r),t,r,c,u,d,2):2===p&&l(e,t,r,c,u,d):o(n(e),t,r,c,u,d,1);break}}}function i(e){var t=e.prev,r=e,n=e.next;if(g(t,r,n)>=0)return!1;for(var o=t.x,i=r.x,a=n.x,s=t.y,l=r.y,c=n.y,u=oi?o>a?o:a:i>a?i:a,p=s>l?s>c?s:c:l>c?l:c,m=n.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&h(o,s,i,l,a,c,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(e,t,r,n){var o=e.prev,i=e,a=e.next;if(g(o,i,a)>=0)return!1;for(var s=o.x,l=i.x,c=a.x,u=o.y,d=i.y,p=a.y,m=sl?s>c?s:c:l>c?l:c,b=u>d?u>p?u:p:d>p?d:p,_=f(m,y,t,r,n),x=f(v,b,t,r,n),w=e.prevZ,A=e.nextZ;w&&w.z>=_&&A&&A.z<=x;){if(w.x>=m&&w.x<=v&&w.y>=y&&w.y<=b&&w!==o&&w!==a&&h(s,u,l,d,c,p,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,A.x>=m&&A.x<=v&&A.y>=y&&A.y<=b&&A!==o&&A!==a&&h(s,u,l,d,c,p,A.x,A.y)&&g(A.prev,A,A.next)>=0)return!1;A=A.nextZ}for(;w&&w.z>=_;){if(w.x>=m&&w.x<=v&&w.y>=y&&w.y<=b&&w!==o&&w!==a&&h(s,u,l,d,c,p,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;A&&A.z<=x;){if(A.x>=m&&A.x<=v&&A.y>=y&&A.y<=b&&A!==o&&A!==a&&h(s,u,l,d,c,p,A.x,A.y)&&g(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function s(e,t,r){var o=e;do{var i=o.prev,a=o.next.next;!y(i,a)&&v(i,o,o.next,a)&&x(i,a)&&x(a,i)&&(t.push(i.i/r|0),t.push(o.i/r|0),t.push(a.i/r|0),S(o),S(o.next),o=e=a),o=o.next}while(o!==e);return n(o)}function l(e,t,r,i,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=w(l,c);return l=n(l,l.next),u=n(u,u.next),o(l,t,r,i,a,s,0),void o(u,t,r,i,a,s,0)}c=c.next}l=l.next}while(l!==e)}function c(e,t){return e.x-t.x}function u(e,t){var r=function(e,t){var r,n=t,o=e.x,i=e.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=o&&s>a&&(a=s,r=n.x=n.x&&n.x>=u&&o!==n.x&&h(ir.x||n.x===r.x&&d(r,n)))&&(r=n,p=l)),n=n.next}while(n!==c);return r}(e,t);if(!r)return t;var o=w(r,e);return n(o,o.next),n(r,r.next)}function d(e,t){return g(e.prev,e,t.prev)<0&&g(t.next,e,e.next)<0}function f(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function p(e){var t=e,r=e;do{(t.x=(e-a)*(i-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(i-s)>=(o-a)*(n-s)}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&v(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(x(e,t)&&x(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(g(e.prev,e,t.prev)||g(e,t.prev,t))||y(e,t)&&g(e.prev,e,e.next)>0&&g(t.prev,t,t.next)>0)}function g(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function y(e,t){return e.x===t.x&&e.y===t.y}function v(e,t,r,n){var o=_(g(e,t,r)),i=_(g(e,t,n)),a=_(g(r,n,e)),s=_(g(r,n,t));return o!==i&&a!==s||!(0!==o||!b(e,r,t))||!(0!==i||!b(e,n,t))||!(0!==a||!b(r,e,n))||!(0!==s||!b(r,t,n))}function b(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function _(e){return e>0?1:e<0?-1:0}function x(e,t){return g(e.prev,e,e.next)<0?g(e,t,e.next)>=0&&g(e,e.prev,t)>=0:g(e,t,e.prev)<0||g(e,e.next,t)<0}function w(e,t){var r=new C(e.i,e.x,e.y),n=new C(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function A(e,t,r,n){var o=new C(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function S(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function C(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E(e,t,r,n){for(var o=0,i=t,a=r-n;i0&&(n+=e[o-1].length,r.holes.push(n))}return r}},cckQ:(e,t,r)=>{"use strict";var n=r("AM7I")("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},QX98:e=>{"use strict";e.exports=EvalError},pkW7:e=>{"use strict";e.exports=Error},"3JnH":e=>{"use strict";e.exports=RangeError},FAml:e=>{"use strict";e.exports=ReferenceError},"Z+6F":e=>{"use strict";e.exports=SyntaxError},DSU0:e=>{"use strict";e.exports=TypeError},Z9lY:e=>{"use strict";e.exports=URIError},"1vpa":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("Istr"),o=r("q1tI"),i=r("82gj"),a=r("/ekA"),s=r("4zEH"),l=r("s1vs");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var d=u(o),f=c(o),p=c(l),h=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},m={measureLayout:h(["layout","layoutId","drag","_layoutResetTransform"]),animation:h(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:h(["exit"]),drag:h(["drag","dragControls"]),focus:h(["whileFocus"]),hover:h(["whileHover","onHoverStart","onHoverEnd"]),tap:h(["whileTap","onTap","onTapStart","onTapCancel"]),pan:h(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:h(["layout","layoutId"])};function g(e){for(var t in e){var r=e[t];null!==r&&(m[t].Component=r)}}var y=o.createContext({strict:!1}),v=Object.keys(m),b=v.length,_=o.createContext({transformPagePoint:function(e){return e},isStatic:!1}),x=o.createContext({});function w(){return o.useContext(x).visualElement}var A=o.createContext(null);function S(e){var t=o.useRef(null);return null===t.current&&(t.current=e()),t.current}function C(){var e=o.useContext(A);if(null===e)return[!0,null];var t=e.isPresent,r=e.onExitComplete,n=e.register,i=k();return o.useEffect((function(){return n(i)}),[]),!t&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function E(e){return null===e||e.isPresent}var T=0,I=function(){return T++},k=function(){return S(I)},M=o.createContext(null),R="undefined"!=typeof window,P=R?o.useLayoutEffect:o.useEffect;function O(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function L(e){return Array.isArray(e)}function D(e){return"string"==typeof e||L(e)}function N(e,t,r,n,o){var i;return void 0===n&&(n={}),void 0===o&&(o={}),"string"==typeof t&&(t=null===(i=e.variants)||void 0===i?void 0:i[t]),"function"==typeof t?t(null!=r?r:e.custom,n,o):t}function F(e,t,r){var n=e.getProps();return N(n,t,null!=r?r:n.custom,function(e){var t={};return e.forEachValue((function(e,r){return t[r]=e.get()})),t}(e),function(e){var t={};return e.forEachValue((function(e,r){return t[r]=e.getVelocity()})),t}(e))}function z(e){var t;return"function"==typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||D(e.initial)||D(e.animate)||D(e.whileHover)||D(e.whileDrag)||D(e.whileTap)||D(e.whileFocus)||D(e.exit)}function B(e){return Boolean(z(e)||e.variants)}function j(e){return Array.isArray(e)?e.join(" "):e}function U(e){var t=e.preloadedFeatures,r=e.createVisualElement,i=e.useRender,a=e.useVisualState,s=e.Component;return t&&g(t),o.forwardRef((function(e,t){var l=o.useContext(_).isStatic,c=null,u=function(e,t){var r=function(e,t){if(z(e)){var r=e.initial,n=e.animate;return{initial:!1===r||D(r)?r:void 0,animate:D(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,o.useContext(x)),n=r.initial,i=r.animate;return o.useMemo((function(){return{initial:n,animate:i}}),t?[j(n),j(i)]:[])}(e,l),f=a(e,l);return!l&&R&&(u.visualElement=function(e,t,r,i){var a=o.useContext(_),s=o.useContext(y),l=w(),c=o.useContext(A),u=function(e){var t=e.layoutId,r=o.useContext(M);return r&&void 0!==t?r+"-"+t:t}(r),d=o.useRef(void 0);i||(i=s.renderer),!d.current&&i&&(d.current=i(e,{visualState:t,parent:l,props:n.__assign(n.__assign({},r),{layoutId:u}),presenceId:null==c?void 0:c.id,blockInitialAnimation:!1===(null==c?void 0:c.initial)}));var f=d.current;return P((function(){f&&(f.setProps(n.__assign(n.__assign(n.__assign({},a),r),{layoutId:u})),f.isPresent=E(c),f.isPresenceRoot=!l||l.presenceId!==(null==c?void 0:c.id),f.syncRender())})),o.useEffect((function(){var e;f&&(null===(e=f.animationState)||void 0===e||e.animateChanges())})),P((function(){return function(){return null==f?void 0:f.notifyUnmount()}}),[]),f}(s,f,e,r),c=function(e,t){var r=[];if(o.useContext(y),!t)return null;for(var i=0;i-1||/[A-Z]/.test(e))}var H={};function W(e){for(var t in e)H[t]=e[t]}var q=["","X","Y","Z"],X=["transformPerspective","x","y","z"];function Z(e,t){return X.indexOf(e)-X.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return q.forEach((function(t){return X.push(e+t)}))}));var Y=new Set(X);function K(e){return Y.has(e)}var J=new Set(["originX","originY","originZ"]);function Q(e){return J.has(e)}function ee(e,t){var r=t.layout,n=t.layoutId;return K(e)||Q(e)||(r||void 0!==n)&&(!!H[e]||"opacity"===e)}var te=function(e){return null!==e&&"object"==typeof e&&e.getVelocity},re={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function ne(e){return e.startsWith("--")}var oe=function(e,t){return t&&"number"==typeof e?t.transform(e):e},ie=n.__assign(n.__assign({},a.number),{transform:Math.round}),ae={borderWidth:a.px,borderTopWidth:a.px,borderRightWidth:a.px,borderBottomWidth:a.px,borderLeftWidth:a.px,borderRadius:a.px,radius:a.px,borderTopLeftRadius:a.px,borderTopRightRadius:a.px,borderBottomRightRadius:a.px,borderBottomLeftRadius:a.px,width:a.px,maxWidth:a.px,height:a.px,maxHeight:a.px,size:a.px,top:a.px,right:a.px,bottom:a.px,left:a.px,padding:a.px,paddingTop:a.px,paddingRight:a.px,paddingBottom:a.px,paddingLeft:a.px,margin:a.px,marginTop:a.px,marginRight:a.px,marginBottom:a.px,marginLeft:a.px,rotate:a.degrees,rotateX:a.degrees,rotateY:a.degrees,rotateZ:a.degrees,scale:a.scale,scaleX:a.scale,scaleY:a.scale,scaleZ:a.scale,skew:a.degrees,skewX:a.degrees,skewY:a.degrees,distance:a.px,translateX:a.px,translateY:a.px,translateZ:a.px,x:a.px,y:a.px,z:a.px,perspective:a.px,transformPerspective:a.px,opacity:a.alpha,originX:a.progressPercentage,originY:a.progressPercentage,originZ:a.px,zIndex:ie,fillOpacity:a.alpha,strokeOpacity:a.alpha,numOctaves:ie};function se(e,t,r,n,o,i,a,s){var l,c=e.style,u=e.vars,d=e.transform,f=e.transformKeys,p=e.transformOrigin;f.length=0;var h=!1,m=!1,g=!0;for(var y in t){var v=t[y];if(ne(y))u[y]=v;else{var b=ae[y],_=oe(v,b);if(K(y)){if(h=!0,d[y]=_,f.push(y),!g)continue;v!==(null!==(l=b.default)&&void 0!==l?l:0)&&(g=!1)}else if(Q(y))p[y]=_,m=!0;else if((null==r?void 0:r.isHydrated)&&(null==n?void 0:n.isHydrated)&&H[y]){var x=H[y].process(v,n,r),w=H[y].applyTo;if(w)for(var A=w.length,S=0;S-1&&e.splice(r,1)}var Mt=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return It(this.subscriptions,e),function(){return kt(t.subscriptions,e)}},e.prototype.notify=function(e,t,r){var n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(var o=0;om&&v,w=Array.isArray(y)?y:[y],A=w.reduce(s,{});!1===b&&(A={});var S=g.prevResolvedValues,C=void 0===S?{}:S,E=n.__assign(n.__assign({},C),A),T=function(e){x=!0,p.delete(e),g.needsAnimating[e]=!0};for(var I in E){var k=A[I],M=C[I];h.hasOwnProperty(I)||(k!==M?Me(k)&&Me(M)?ct(k,M)?g.protectedKeys[I]=!0:T(I):void 0!==k?T(I):p.add(I):void 0!==k&&p.has(I)?T(I):g.protectedKeys[I]=!0)}g.prevProp=y,g.prevResolvedValues=A,g.isActive&&(h=n.__assign(n.__assign({},h),A)),a&&e.blockInitialAnimation&&(x=!1),x&&!_&&f.push.apply(f,n.__spreadArray([],n.__read(w.map((function(e){return{animation:e,options:n.__assign({type:i},t)}})))))},y=0;y=3;if(t||r){var i=e.point,a=l.getFrameData().timestamp;o.history.push(n.__assign(n.__assign({},i),{timestamp:a}));var c=o.handlers,u=c.onStart,d=c.onMove;t||(u&&u(o.lastMoveEvent,e),o.startEvent=o.lastMoveEvent),d&&d(o.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){o.lastMoveEvent=e,o.lastMoveEventInfo=er(t,o.transformPagePoint),Ue(e)&&0===e.buttons?o.handlePointerUp(e,t):p.default.update(o.updatePoint,!0)},this.handlePointerUp=function(e,t){o.end();var r=o.handlers,n=r.onEnd,i=r.onSessionEnd,a=rr(er(t,o.transformPagePoint),o.history);o.startEvent&&n&&n(e,a),i&&i(e,a)},!($e(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=i;var a=er(We(e),this.transformPagePoint),c=a.point,u=l.getFrameData().timestamp;this.history=[n.__assign(n.__assign({},c),{timestamp:u})];var d=t.onSessionStart;d&&d(e,rr(a,this.history)),this.removeListeners=s.pipe(Ke(window,"pointermove",this.handlePointerMove),Ke(window,"pointerup",this.handlePointerUp),Ke(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),l.cancelSync.update(this.updatePoint)},e}();function er(e,t){return t?{point:t(e.point)}:e}function tr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rr(e,t){var r=e.point;return{point:r,delta:tr(r,or(t)),offset:tr(r,nr(t)),velocity:ir(t,.1)}}function nr(e){return e[0]}function or(e){return e[e.length-1]}function ir(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,o=or(e);r>=0&&(n=e[r],!(o.timestamp-n.timestamp>ut(t)));)r--;if(!n)return{x:0,y:0};var i=(o.timestamp-n.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ar(e){return e}function sr(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var lr={translate:0,scale:1,origin:0,originPoint:0};function cr(){return{x:n.__assign({},lr),y:n.__assign({},lr)}}function ur(e){return[e("x"),e("y")]}function dr(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=.01),s.distance(e,t)o&&(e=r?s.mix(o,e,r.max):Math.min(e,o)),e}function vr(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function br(e,t){var r,o=t.min-e.min,i=t.max-e.max;return t.max-t.mint?r="y":Math.abs(e.x)>t&&(r="x"),r}(u),void(null!==r.currentDirection&&(null===(o=(n=r.props).onDirectionLock)||void 0===o||o.call(n,r.currentDirection)));r.updateAxis("x",t.point,u),r.updateAxis("y",t.point,u),null===(a=(i=r.props).onDrag)||void 0===a||a.call(i,e,t),qr=e}},onSessionEnd:function(e,t){return r.stop(e,t)}},{transformPagePoint:u})},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,r=t.dragConstraints,n=t.dragElastic,o=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!r&&(O(r)?this.resolveRefConstraints(o,r):function(e,t){var r=t.top,n=t.left,o=t.bottom,i=t.right;return{x:vr(e.x,n,i),y:vr(e.y,r,o)}}(o,r)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:_r(e,"left","right"),y:_r(e,"top","bottom")}}(n),this.constraints&&!this.hasMutatedConstraints&&ur((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var r={};return void 0!==t.min&&(r.min=t.min-e.min),void 0!==t.max&&(r.max=t.max-e.min),r}(o[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(e,t){var r=this.props,n=r.onMeasureDragConstraints,o=r.transformPagePoint,a=t.current;i.invariant(null!==a,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."),this.constraintsBox=wr(a,o);var s=function(e,t){return{x:br(e.x,t.x),y:br(e.y,t.y)}}(e,this.constraintsBox);if(n){var l=n(function(e){var t=e.x,r=e.y;return{top:r.min,bottom:r.max,left:t.min,right:t.max}}(s));this.hasMutatedConstraints=!!l,l&&(s=sr(l))}return s},e.prototype.cancelDrag=function(){var e,t;this.visualElement.unlockProjectionTarget(),null===(e=this.cancelLayout)||void 0===e||e.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(De.Drag,!1)},e.prototype.stop=function(e,t){var r,n,o;null===(r=this.panSession)||void 0===r||r.end(),this.panSession=null;var i=this.isDragging;if(this.cancelDrag(),i){var a=t.velocity;this.animateDragEnd(a),null===(o=(n=this.props).onDragEnd)||void 0===o||o.call(n,e,t)}},e.prototype.snapToCursor=function(e){var t=this;return ur((function(r){if(Kr(r,t.props.drag,t.currentDirection)){var n=t.getAxisMotionValue(r);if(!n)return t.cursorProgress[r]=.5,!0;var o=t.visualElement.getLayoutState().layout,i=o[r].max-o[r].min,a=o[r].min+i/2,s=e[r]-a;t.originPoint[r]=e[r],n.set(s)}})).includes(!0)},e.prototype.updateAxis=function(e,t,r){if(Kr(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,r):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var r=this.getAxisMotionValue(e);if(t&&r){var n=this.originPoint[e]+t[e],o=this.constraints?yr(n,this.constraints[e],this.elastic[e]):n;r.set(o)}},e.prototype.updateVisualElementAxis=function(e,t){var r,n=this.visualElement.getLayoutState().layout[e],o=n.max-n.min,i=this.cursorProgress[e],a=function(e,t,r,n,o){var i=e-t*r;return n?yr(i,n,o):i}(t[e],o,i,null===(r=this.constraints)||void 0===r?void 0:r[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,a,a+o)},e.prototype.setProps=function(e){var t=e.drag,r=void 0!==t&&t,o=e.dragDirectionLock,i=void 0!==o&&o,a=e.dragPropagation,s=void 0!==a&&a,l=e.dragConstraints,c=void 0!==l&&l,u=e.dragElastic,d=void 0===u?.35:u,f=e.dragMomentum,p=void 0===f||f,h=n.__rest(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=n.__assign({drag:r,dragDirectionLock:i,dragPropagation:s,dragConstraints:c,dragElastic:d,dragMomentum:p},h)},e.prototype.getAxisMotionValue=function(e){var t=this.props,r=t.layout,n=t.layoutId,o="_drag"+e.toUpperCase();return this.props[o]?this.props[o]:r||void 0!==n?void 0:this.visualElement.getValue(e,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var e=this.props,t=e._dragX,r=e._dragY;return t||r},e.prototype.animateDragEnd=function(e){var t=this,r=this.props,o=r.drag,i=r.dragMomentum,a=r.dragElastic,s=r.dragTransition,l=function(e,t){void 0===t&&(t=!0);var r,n=e.getProjectionParent();return!!n&&(t?$r(r=kr(n.projection.target,e.projection.target),n.getLatestValues()):r=kr(n.getLayoutState().layout,e.getLayoutState().layout),ur((function(t){return e.setProjectionTargetAxis(t,r[t].min,r[t].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),c=this.constraints||{};if(l&&Object.keys(c).length&&this.isLayoutDrag()){var u=this.visualElement.getProjectionParent();if(u){var d=kr(u.projection.targetFinal,c);ur((function(e){var t=d[e],r=t.min,n=t.max;c[e]={min:isNaN(r)?void 0:r,max:isNaN(n)?void 0:n}}))}}var f=ur((function(r){var u;if(Kr(r,o,t.currentDirection)){var d=null!==(u=null==c?void 0:c[r])&&void 0!==u?u:{},f=a?200:1e6,p=a?40:1e7,h=n.__assign(n.__assign({type:"inertia",velocity:i?e[r]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10},s),d);return t.getAxisMotionValue(r)?t.startAxisValueAnimation(r,h):t.visualElement.startLayoutAnimation(r,h,l)}}));return Promise.all(f).then((function(){var e,r;null===(r=(e=t.props).onDragTransitionEnd)||void 0===r||r.call(e)}))},e.prototype.stopMotion=function(){var e=this;ur((function(t){var r=e.getAxisMotionValue(t);r?r.stop():e.visualElement.stopLayoutAnimation()}))},e.prototype.startAxisValueAnimation=function(e,t){var r=this.getAxisMotionValue(e);if(r){var n=r.get();return r.set(n),r.set(n),Tt(e,r,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,r=t.drag;if(O(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var n={x:0,y:0};ur((function(t){var r,o,i,a,l,c;n[t]=(r=e.visualElement.projection.target[t],o=e.constraintsBox[t],a=.5,l=fr(r),(c=fr(o))>l?a=s.progress(o.min,o.max-l,r.min):l>c&&(a=s.progress(r.min,r.max-c,o.min)),i=a,s.clamp(0,1,i))})),this.updateConstraints((function(){ur((function(t){if(Kr(t,r,null)){var o=function(e,t,r){var n=e.max-e.min,o=s.mix(t.min,t.max-n,r);return{min:o,max:o+n}}(e.visualElement.projection.target[t],e.constraintsBox[t],n[t]),i=o.min,a=o.max;e.visualElement.setProjectionTargetAxis(t,i,a)}}))})),setTimeout(Wr,1)}},e.prototype.updateConstraints=function(e){var t=this;this.cancelLayout=Hr((function(r,n){var o=Cr(t.visualElement);n((function(){return o.forEach((function(e){return e.resetTransform()}))})),r((function(){return Er(t.visualElement)})),n((function(){return o.forEach((function(e){return e.restoreTransform()}))})),r((function(){t.resolveDragConstraints()})),e&&n(e)}))},e.prototype.mount=function(e){var t=this,r=Ke(e.getInstance(),"pointerdown",(function(e){var r=t.props,n=r.drag,o=r.dragListener;n&&(void 0===o||o)&&t.start(e)})),n=Be(window,"resize",(function(){t.scalePoint()})),o=e.onLayoutUpdate((function(){t.isDragging&&t.resolveDragConstraints()})),i=e.prevDragCursor;return i&&this.start(qr,{cursorProgress:i}),function(){null==r||r(),null==n||n(),null==o||o(),t.cancelDrag()}},e}();function Kr(e,t,r){return!(!0!==t&&t!==e||null!==r&&r!==e)}var Jr,Qr,en={pan:st((function(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,i=e.onPanSessionStart,a=e.visualElement,s=t||r||n||i,l=o.useRef(null),c=o.useContext(_).transformPagePoint,u={onSessionStart:i,onStart:r,onMove:t,onEnd:function(e,t){l.current=null,n&&n(e,t)}};o.useEffect((function(){null!==l.current&&l.current.updateHandlers(u)})),Je(a,"pointerdown",s&&function(e){l.current=new Qt(e,u,{transformPagePoint:c})}),at((function(){return l.current&&l.current.end()}))})),drag:st((function(e){var t=e.dragControls,r=e.visualElement,i=o.useContext(_).transformPagePoint,a=S((function(){return new Yr({visualElement:r})}));a.setProps(n.__assign(n.__assign({},e),{transformPagePoint:i})),o.useEffect((function(){return t&&t.subscribe(a)}),[a]),o.useEffect((function(){return a.mount(r)}),[])}))};function tn(e){return"string"==typeof e&&e.startsWith("var(--")}!function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"}(Jr||(Jr={})),t.VisibilityAction=void 0,(Qr=t.VisibilityAction||(t.VisibilityAction={}))[Qr.Hide=0]="Hide",Qr[Qr.Show=1]="Show";var rn=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function nn(e,t,r){void 0===r&&(r=1),i.invariant(r<=4,'Max CSS variable fallback depth detected in property "'+e+'". This may indicate a circular fallback dependency.');var o=n.__read(function(e){var t=rn.exec(e);if(!t)return[,];var r=n.__read(t,3);return[r[1],r[2]]}(e),2),a=o[0],s=o[1];if(a){var l=window.getComputedStyle(t).getPropertyValue(a);return l?l.trim():tn(s)?nn(s,t,r+1):s}}function on(e,t){return e/(t.max-t.min)*100}var an="_$css",sn={process:function(e,t,r){var n=r.target;if("string"==typeof e){if(!a.px.test(e))return e;e=parseFloat(e)}return on(e,n.x)+"% "+on(e,n.y)+"%"}},ln={borderRadius:n.__assign(n.__assign({},sn),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:sn,borderTopRightRadius:sn,borderBottomLeftRadius:sn,borderBottomRightRadius:sn,boxShadow:{process:function(e,t){var r=t.delta,n=t.treeScale,o=e,i=e.includes("var("),l=[];i&&(e=e.replace(rn,(function(e){return l.push(e),an})));var c=a.complex.parse(e);if(c.length>5)return o;var u=a.complex.createTransformer(e),d="number"!=typeof c[0]?1:0,f=r.x.scale*n.x,p=r.y.scale*n.y;c[0+d]/=f,c[1+d]/=p;var h=s.mix(f,p,.5);"number"==typeof c[2+d]&&(c[2+d]/=h),"number"==typeof c[3+d]&&(c[3+d]/=h);var m=u(c);if(i){var g=0;m=m.replace(an,(function(){var e=l[g];return g++,e}))}return m}}},cn=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},r.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},r.isAnimating={x:!1,y:!1},r.stopAxisAnimation={x:void 0,y:void 0},r.isAnimatingTree=!1,r.animate=function(e,o,i){void 0===i&&(i={});var a=i.originBox,s=i.targetBox,l=i.visibilityAction,c=i.shouldStackAnimate,u=i.onComplete,d=i.prevParent,f=n.__rest(i,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),p=r.props,h=p.visualElement,m=p.layout;if(!1===c)return r.isAnimatingTree=!1,r.safeToRemove();if(!r.isAnimatingTree||!0===c){c&&(r.isAnimatingTree=!0),o=a||o,e=s||e;var g,y,v,b=!1,_=h.getProjectionParent();if(_){var x=_.prevViewportBox,w=_.getLayoutState().layout;d&&(s&&(w=d.getLayoutState().layout),a&&(y=_,(g=d).getLayoutId()===(v=y.getLayoutId())&&(void 0!==v||g===y))&&d.prevViewportBox&&(x=d.prevViewportBox)),x&&function(e,t,r){return e||!e&&!(t||r)}(d,a,s)&&(b=!0,o=kr(x,o),e=kr(w,e))}var A,S,C=(S=e,!(dn(A=o)||dn(S)||fn(A.x,S.x)&&fn(A.y,S.y))),E=ur((function(i){var a,s;if("position"===m){var c=e[i].max-e[i].min;o[i].max=o[i].min+c}if(!h.projection.isTargetLocked)return void 0===l?C?r.animateAxis(i,e[i],o[i],n.__assign(n.__assign({},f),{isRelative:b})):(null===(s=(a=r.stopAxisAnimation)[i])||void 0===s||s.call(a),h.setProjectionTargetAxis(i,e[i].min,e[i].max,b)):void h.setVisibility(l===t.VisibilityAction.Show)}));return h.syncRender(),Promise.all(E).then((function(){r.isAnimatingTree=!1,u&&u(),h.notifyLayoutAnimationComplete()}))}},r}return n.__extends(r,e),r.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=Tt,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},W(ln)},r.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),ur((function(t){var r,n;return null===(n=(r=e.stopAxisAnimation)[t])||void 0===n?void 0:n.call(r)}))},r.prototype.animateAxis=function(e,t,r,n){var o,i,a=this,l=void 0===n?{}:n,c=l.transition,u=l.isRelative;if(!this.isAnimating[e]||!fn(t,this.currentAnimationTarget[e])){null===(i=(o=this.stopAxisAnimation)[e])||void 0===i||i.call(o),this.isAnimating[e]=!0;var d=this.props.visualElement,f=this.frameTarget[e],p=d.getProjectionAnimationProgress()[e];p.clearListeners(),p.set(0),p.set(0);var h=function(){var n=p.get()/1e3;!function(e,t,r,n){e.min=s.mix(t.min,r.min,n),e.max=s.mix(t.max,r.max,n)}(f,r,t,n),d.setProjectionTargetAxis(e,f.min,f.max,u)};h();var m=p.onChange(h);this.stopAxisAnimation[e]=function(){a.isAnimating[e]=!1,p.stop(),m()},this.currentAnimationTarget[e]=t;var g=c||d.getDefaultTransition()||pn;return Tt("x"===e?"layoutX":"layoutY",p,1e3,g&&Et(g,"layout")).then(this.stopAxisAnimation[e])}},r.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},r.prototype.render=function(){return null},r}(d.Component),un={min:0,max:0};function dn(e){return fn(e.x,un)&&fn(e.y,un)}function fn(e,t){return e.min===t.min&&e.max===t.max}var pn={duration:.45,ease:[.4,0,.1,1]},hn={layoutReady:function(e){return e.notifyLayoutReady()}};function mn(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var r=void 0===t?hn:t,o=r.layoutReady,i=r.parent;Hr((function(t,r){var a=Array.from(e).sort(Ar),s=i?Cr(i):[];r((function(){n.__spreadArray(n.__spreadArray([],n.__read(s)),n.__read(a)).forEach((function(e){return e.resetTransform()}))})),t((function(){a.forEach(Er)})),r((function(){s.forEach((function(e){return e.restoreTransform()})),a.forEach(o)})),t((function(){a.forEach((function(e){e.isPresent&&(e.presence=Jr.Present)}))})),r((function(){l.flushSync.preRender(),l.flushSync.render()})),t((function(){p.default.postRender((function(){return a.forEach(gn)})),e.clear()}))})),Wr()}}}function gn(e){e.prevViewportBox=e.projection.target}var yn=o.createContext(mn()),vn=o.createContext(mn());function bn(e){return!!e.forceUpdate}var _n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,r=e.framerSyncLayout,n=e.visualElement;bn(t)&&t.register(n),bn(r)&&r.register(n),n.onUnmount((function(){bn(t)&&t.remove(n),bn(r)&&r.remove(n)}))},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,r=e.visualElement;return bn(t)?t.syncUpdate():(Tr(r),t.add(r)),null},t.prototype.componentDidUpdate=function(){var e=this.props.syncLayout;bn(e)||e.flush()},t.prototype.render=function(){return null},t}(f.default.Component),xn={measureLayout:function(e){var t=o.useContext(yn),r=o.useContext(vn);return f.default.createElement(_n,n.__assign({},e,{syncLayout:t,framerSyncLayout:r}))},layoutAnimation:function(e){var t=n.__read(C(),2)[1];return d.createElement(cn,n.__assign({},e,{safeToRemove:t}))}};function wn(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:cr(),deltaFinal:cr(),deltaTransform:""}}var An=wn();function Sn(e,t,r){var n=e.x,o=e.y,i="translate3d("+n.translate/t.x+"px, "+o.translate/t.y+"px, 0) ";if(r){var a=r.rotate,s=r.rotateX,l=r.rotateY;a&&(i+="rotate("+a+") "),s&&(i+="rotateX("+s+") "),l&&(i+="rotateY("+l+") ")}return i+="scale("+n.scale+", "+o.scale+")",r||i!==En?i:""}function Cn(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var En=Sn(An.delta,An.treeScale,{x:1,y:1}),Tn=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];var In=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){It(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){kt(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(Ar),this.isDirty=!1,this.children.forEach(e)},e}(),kn=function(e){var t=e.treeType,r=void 0===t?"":t,o=e.build,i=e.getBaseTarget,a=e.makeTargetAnimatable,c=e.measureViewportBox,u=e.render,d=e.readValueFromInstance,f=e.resetTransform,h=e.restoreTransform,m=e.removeValueFromRenderState,g=e.sortNodePosition,y=e.scrapeMotionValuesFromProps;return function(e,t){var v=e.parent,b=e.props,_=e.presenceId,x=e.blockInitialAnimation,w=e.visualState;void 0===t&&(t={});var A,S,C,E,T,I,k=w.latestValues,M=w.renderState,R=function(){var e=Tn.map((function(){return new Mt})),t={},r={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){return Tn.forEach((function(n){var o;null===(o=t[n])||void 0===o||o.call(t);var i="on"+n,a=e[i];a&&(t[n]=r[i](a))}))}};return e.forEach((function(e,t){r["on"+Tn[t]]=function(t){return e.add(t)},r["notify"+Tn[t]]=function(){for(var t=[],r=0;r=0;t--){var r=Q.path[t];if(r.projection.isEnabled){e=r;break}}S=e}return S},resolveRelativeTargetBox:function(){var e=Q.getProjectionParent();if(P.relativeTarget&&e&&(function(e,t){gr(e.target.x,e.relativeTarget.x,t.target.x),gr(e.target.y,e.relativeTarget.y,t.target.y)}(P,e.projection),Mr(e))){var t=P.target;Br(t,t,e.getLatestValues())}},shouldResetTransform:function(){return Boolean(b._layoutResetTransform)},pointTo:function(e){O=e.projection,L=e.getLatestValues(),null==C||C(),C=s.pipe(e.onSetAxisTarget(Q.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete((function(){var e;Q.isPresent?Q.presence=Jr.Present:null===(e=Q.layoutSafeToRemove)||void 0===e||e.call(Q)})))},isPresent:!0,presence:Jr.Entering});return Q}};function Mn(e){e.resolveRelativeTargetBox()}function Rn(e){e.updateLayoutProjection()}var Pn,On=n.__spreadArray(["initial"],n.__read(Xt)),Ln=On.length,Dn=new Set(["width","height","top","left","right","bottom","x","y"]),Nn=function(e){return Dn.has(e)},Fn=function(e,t){e.set(t,!1),e.set(t)},zn=function(e){return e===a.number||e===a.px};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Pn||(Pn={}));var Bn=function(e,t){return parseFloat(e.split(", ")[t])},jn=function(e,t){return function(r,n){var o=n.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return Bn(i[1],t);var a=o.match(/^matrix\((.+)\)$/);return a?Bn(a[1],e):0}},Un=new Set(["x","y","z"]),$n=X.filter((function(e){return!Un.has(e)})),Vn={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var r=t.top;return parseFloat(r)},left:function(e,t){var r=t.left;return parseFloat(r)},bottom:function(e,t){var r=e.y,n=t.top;return parseFloat(n)+(r.max-r.min)},right:function(e,t){var r=e.x,n=t.left;return parseFloat(n)+(r.max-r.min)},x:jn(4,13),y:jn(5,14)};function Gn(e,t,r,o){return function(e){return Object.keys(e).some(Nn)}(t)?function(e,t,r,o){void 0===r&&(r={}),void 0===o&&(o={}),t=n.__assign({},t),o=n.__assign({},o);var s=Object.keys(t).filter(Nn),l=[],c=!1,u=[];if(s.forEach((function(n){var s=e.getValue(n);if(e.hasValue(n)){var d,f=r[n],p=t[n],h=Dt(f);if(Me(p))for(var m=p.length,g=null===p[0]?1:0;gt?1:r(s.progress(e,t,n))}}var lo=["TopLeft","TopRight","BottomLeft","BottomRight"],co=lo.length;function uo(e,t){var r;return null!==(r=e[t])&&void 0!==r?r:e.borderRadius}var fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.children=new Set,t.stacks=new Map,t.hasMounted=!1,t.updateScheduled=!1,t.renderScheduled=!1,t.syncContext=n.__assign(n.__assign({},mn()),{syncUpdate:function(e){return t.scheduleUpdate(e)},forceUpdate:function(){t.syncContext=n.__assign({},t.syncContext),t.scheduleUpdate(!0)},register:function(e){return t.addChild(e)},remove:function(e){return t.removeChild(e)}}),t}return n.__extends(t,e),t.prototype.componentDidMount=function(){this.hasMounted=!0},t.prototype.componentDidUpdate=function(){this.startLayoutAnimation()},t.prototype.shouldComponentUpdate=function(){return this.renderScheduled=!0,!0},t.prototype.startLayoutAnimation=function(){var e=this;this.renderScheduled=this.updateScheduled=!1;var t=this.props.type;this.children.forEach((function(e){e.isPresent?e.presence!==Jr.Entering&&(e.presence=e.presence===Jr.Exiting?Jr.Entering:Jr.Present):e.presence=Jr.Exiting})),this.updateStacks();var r={layoutReady:function(r){void 0!==r.getLayoutId()?e.getStack(r).animate(r,"crossfade"===t):r.notifyLayoutReady()},parent:this.context.visualElement};this.children.forEach((function(t){return e.syncContext.add(t)})),this.syncContext.flush(r),this.stacks.forEach((function(e){return e.clearSnapshot()}))},t.prototype.updateStacks=function(){this.stacks.forEach((function(e){return e.updateLeadAndFollow()}))},t.prototype.scheduleUpdate=function(e){void 0===e&&(e=!1),!e&&this.updateScheduled||(this.updateScheduled=!0,this.children.forEach((function(e){!function(e){for(var t=!1,r={},n=0;n=0){var f=u[d];if(r&&(null!=o||(o=f)),null!=r||(r=f),r&&o)break}a.lead=r,a.follow=o,a.leadIsExiting=(null===(e=a.lead)||void 0===e?void 0:e.presence)===Jr.Exiting,l.setOptions({lead:r,follow:o,prevValues:t,crossfadeOpacity:(null==o?void 0:o.isPresenceRoot)||(null==r?void 0:r.isPresenceRoot)}),a.lead===s.follow||s.lead===a.lead&&s.leadIsExiting===a.leadIsExiting||(c=!0)},animate:function(e,t){var n;if(void 0===t&&(t=!1),e===a.lead){t?e.pointTo(a.lead):e.setVisibility(!0);var o={},i=null===(n=a.follow)||void 0===n?void 0:n.getProjectionParent();if(i&&(o.prevParent=i),e.presence===Jr.Entering?o.originBox=a.follow?a.follow.prevViewportBox:r:e.presence===Jr.Exiting&&(o.targetBox=function(){var e;return null===(e=a.follow)||void 0===e?void 0:e.getLayoutState().layout}()),c){c=!1;var s=e.getDefaultTransition();e.presence===Jr.Entering?l.toLead(s):l.fromLead(s)}e.notifyLayoutReady(o)}else t?a.lead&&e.pointTo(a.lead):e.setVisibility(!1)}})),this.stacks.get(u)},t.prototype.render=function(){return d.createElement(yn.Provider,{value:this.syncContext},this.props.children)},t.contextType=x,t}(d.Component);function po(e){return"function"==typeof e}var ho,mo=n.__assign(n.__assign({renderer:Xn},Jt),lt),go=n.__assign(n.__assign(n.__assign({},mo),en),xn);function yo(e){var t=S((function(){return Pt(e)}));if(o.useContext(_).isStatic){var r=n.__read(o.useState(e),2)[1];o.useEffect((function(){return t.onChange(r)}),[])}return t}function vo(e,t){o.useEffect((function(){if(te(e))return e.onChange(t)}),[t])}function bo(e,t){var r=yo(t()),n=function(){return r.set(t())};return n(),function(e,t){o.useEffect((function(){var r=e.map((function(e){return e.onChange(t)}));return function(){return r.forEach((function(e){return e()}))}}))}(e,(function(){return p.default.update(n,!1,!0)})),r}function _o(){for(var e=[],t=0;t.001?1/e:1e5},No=!1;t.AnimatePresence=function(e){var t=e.children,r=e.custom,i=e.initial,a=void 0===i||i,s=e.onExitComplete,l=e.exitBeforeEnter,c=e.presenceAffectsLayout,u=void 0===c||c,f=function(){var e=o.useRef(!1),t=n.__read(o.useState(0),2),r=t[0],i=t[1];return at((function(){return e.current=!0})),o.useCallback((function(){!e.current&&i(r+1)}),[r])}(),p=o.useContext(yn);bn(p)&&(f=p.forceUpdate);var h=o.useRef(!0),m=function(e){var t=[];return o.Children.forEach(e,(function(e){o.isValidElement(e)&&t.push(e)})),t}(t),g=o.useRef(m),y=o.useRef(new Map).current,v=o.useRef(new Set).current;if(function(e,t){e.forEach((function(e){var r=ro(e);t.set(r,e)}))}(m,y),h.current)return h.current=!1,d.createElement(d.Fragment,null,m.map((function(e){return d.createElement(eo,{key:ro(e),isPresent:!0,initial:!!a&&void 0,presenceAffectsLayout:u},e)})));for(var b=n.__spreadArray([],n.__read(m)),_=g.current.map(ro),x=m.map(ro),w=_.length,A=0;A{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=1/60*1e3,n="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},o="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(n())}),r)},i=!0,a=!1,s=!1,l={delta:0,timestamp:0},c=["read","update","preRender","render","postRender"],u=c.reduce((function(e,t){return e[t]=function(e){var t=[],r=[],n=0,o=!1,i=new WeakSet,a={schedule:function(e,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var l=s&&o,c=l?t:r;return a&&i.add(e),-1===c.indexOf(e)&&(c.push(e),l&&o&&(n=t.length)),e},cancel:function(e){var t=r.indexOf(e);-1!==t&&r.splice(t,1),i.delete(e)},process:function(s){var l;if(o=!0,t=(l=[r,t])[0],(r=l[1]).length=0,n=t.length)for(var c=0;c{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n{"use strict";var n=r("aI7X");e.exports=Function.prototype.bind||n},JQAW:e=>{"use strict";var t=function(){return"string"==typeof function(){}.name},r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch(e){r=null}t.functionsHaveConfigurableNames=function(){if(!t()||!r)return!1;var e=r((function(){}),"name");return!!e&&!!e.configurable};var n=Function.prototype.bind;t.boundFunctionsHaveNames=function(){return t()&&"function"==typeof n&&""!==function(){}.bind().name},e.exports=t},BQ1l:(e,t,r)=>{var n=r("f66B"),o=function(e){this.precision=e&&e.precision?e.precision:17,this.direction=!(!e||!e.direction)&&e.direction,this.pseudoNode=!(!e||!e.pseudoNode)&&e.pseudoNode,this.objectComparator=e&&e.objectComparator?e.objectComparator:s};function i(e){return e.coordinates.map((function(t){return{type:e.type.replace("Multi",""),coordinates:t}}))}function a(e,t){return e.hasOwnProperty("coordinates")?e.coordinates.length===t.coordinates.length:e.length===t.length}function s(e,t){return n(e,t,{strict:!0})}o.prototype.compare=function(e,t){if(e.type!==t.type||!a(e,t))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,t.coordinates);case"LineString":return this.compareLine(e.coordinates,t.coordinates,0,!1);case"Polygon":return this.comparePolygon(e,t);case"Feature":return this.compareFeature(e,t);default:if(0===e.type.indexOf("Multi")){var r=this,n=i(e),o=i(t);return n.every((function(e){return this.some((function(t){return r.compare(e,t)}))}),o)}}return!1},o.prototype.compareCoord=function(e,t){if(e.length!==t.length)return!1;for(var r=0;r=0&&(r=[].concat(e.slice(n,e.length),e.slice(1,n+1))),r},o.prototype.comparePath=function(e,t){var r=this;return e.every((function(e,t){return r.compareCoord(e,this[t])}),t)},o.prototype.comparePolygon=function(e,t){if(this.compareLine(e.coordinates[0],t.coordinates[0],1,!0)){var r=e.coordinates.slice(1,e.coordinates.length),n=t.coordinates.slice(1,t.coordinates.length),o=this;return r.every((function(e){return this.some((function(t){return o.compareLine(e,t,1,!0)}))}),n)}return!1},o.prototype.compareFeature=function(e,t){return!(e.id!==t.id||!this.objectComparator(e.properties,t.properties)||!this.compareBBox(e,t))&&this.compare(e.geometry,t.geometry)},o.prototype.compareBBox=function(e,t){return!!(!e.bbox&&!t.bbox||e.bbox&&t.bbox&&this.compareCoord(e.bbox,t.bbox))},o.prototype.removePseudo=function(e){return e},e.exports=o},aZEm:(e,t,r)=>{var n=r("A1R+"),o=r("Vp63"),i=r("2TsN"),a=r("bnKY").A,s=i.featureEach,l=(i.coordEach,o.polygon,o.featureCollection);function c(e){var t=new n(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),n.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach((function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:a(e),t.push(e)})):s(e,(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:a(e),t.push(e)})),n.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:a(e),n.prototype.remove.call(this,e,t)},t.clear=function(){return n.prototype.clear.call(this)},t.search=function(e){var t=n.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return n.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=n.prototype.all.call(this);return l(e)},t.toJSON=function(){return n.prototype.toJSON.call(this)},t.fromJSON=function(e){return n.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=a(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=a(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}e.exports=c,e.exports.default=c},AM7I:(e,t,r)=>{"use strict";var n,o=r("pkW7"),i=r("QX98"),a=r("3JnH"),s=r("FAml"),l=r("Z+6F"),c=r("DSU0"),u=r("Z9lY"),d=Function,f=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(e){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(e){p=null}var h=function(){throw new c},m=p?function(){try{return h}catch(e){try{return p(arguments,"callee").get}catch(e){return h}}}():h,g=r("UVaH")(),y=r("CjYj")(),v=Object.getPrototypeOf||(y?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):n,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":m,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(v)try{null.error}catch(e){var w=v(v(e));x["%Error.prototype%"]=w}var A=function e(t){var r;if("%AsyncFunction%"===t)r=f("async function () {}");else if("%GeneratorFunction%"===t)r=f("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=f("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(r=v(o.prototype))}return x[t]=r,r},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=r("D3zA"),E=r("lnE3"),T=C.call(Function.call,Array.prototype.concat),I=C.call(Function.apply,Array.prototype.splice),k=C.call(Function.call,String.prototype.replace),M=C.call(Function.call,String.prototype.slice),R=C.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g,L=function(e,t){var r,n=e;if(E(S,n)&&(n="%"+(r=S[n])[0]+"%"),E(x,n)){var o=x[n];if(o===b&&(o=A(n)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===R(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=M(e,0,1),r=M(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return k(e,P,(function(e,t,r,o){n[n.length]=r?k(o,O,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=L("%"+n+"%",t),i=o.name,a=o.value,s=!1,u=o.alias;u&&(n=u[0],I(r,T([0,1],u)));for(var d=1,f=!0;d=r.length){var y=p(a,h);a=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[h]}else f=E(a,h),a=a[h];f&&!s&&(x[i]=a)}}return a}},Kqna:(e,t,r)=>{"use strict";var n=r("AM7I")("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},ZLCw:(e,t,r)=>{"use strict";var n=r("cckQ"),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},CjYj:e=>{"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},UVaH:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r("FpZJ");e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},FpZJ:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},"B6Q+":(e,t,r)=>{"use strict";var n=r("FpZJ");e.exports=function(){return n()&&!!Symbol.toStringTag}},lnE3:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r("D3zA");e.exports=i.call(n,o)},"82gj":(e,t,r)=>{"use strict";r.r(t),r.d(t,{invariant:()=>o,warning:()=>n});var n=function(){},o=function(){}},"6+Dn":(e,t,r)=>{"use strict";r.d(t,{zR:()=>A,TM:()=>k,yJ:()=>m,sC:()=>R,AO:()=>h,Fu:()=>g});var n=r("+9dH");function o(e){return"/"===e.charAt(0)}function i(e,t){for(var r=t,n=r+1,o=e.length;n=0;f--){var p=a[f];"."===p?i(a,f):".."===p?(i(a,f),d++):d&&(i(a,f),d--)}if(!c)for(;d--;d)a.unshift("..");!c||""===a[0]||a[0]&&o(a[0])||a.unshift("");var h=a.join("/");return r&&"/"!==h.substr(-1)&&(h+="/"),h};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const l=function e(t,r){if(t===r)return!0;if(null==t||null==r)return!1;if(Array.isArray(t))return Array.isArray(r)&&t.length===r.length&&t.every((function(t,n){return e(t,r[n])}));if("object"==typeof t||"object"==typeof r){var n=s(t),o=s(r);return n!==t||o!==r?e(n,o):Object.keys(Object.assign({},t,r)).every((function(n){return e(t[n],r[n])}))}return!1};var c=r("ciNm");function u(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,r=e.search,n=e.hash,o=t||"/";return r&&"?"!==r&&(o+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(o+="#"===n.charAt(0)?n:"#"+n),o}function m(e,t,r,o){var i;"string"==typeof e?(i=function(e){var t=e||"/",r="",n="",o=t.indexOf("#");-1!==o&&(n=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(r=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===r?"":r,hash:"#"===n?"":n}}(e),i.state=t):(void 0===(i=(0,n.A)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return r&&(i.key=r),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function y(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,r,n,o){if(null!=e){var i="function"==typeof e?e(t,r):e;"string"==typeof i?"function"==typeof n?n(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var r=!0;function n(){r&&e.apply(void 0,arguments)}return t.push(n),function(){r=!1,t=t.filter((function(e){return e!==n}))}},notifyListeners:function(){for(var e=arguments.length,r=new Array(e),n=0;nt?r.splice(t,r.length-t,o):r.push(o),d({action:n,location:o,index:t,entries:r})}}))},replace:function(e,t){var n="REPLACE",o=m(e,t,f(),_.location);u.confirmTransitionTo(o,n,r,(function(e){e&&(_.entries[_.index]=o,d({action:n,location:o}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return _}},"2mql":(e,t,r)=>{"use strict";var n=r("TOwV"),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return n.isMemo(e)?a:s[e.$$typeof]||o}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(h){var o=p(r);o&&o!==h&&e(t,o,n)}var a=u(r);d&&(a=a.concat(d(r)));for(var s=l(t),m=l(r),g=0;g{"use strict";var n=r("B6Q+")(),o=r("VF6F")("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=s?i:a},DmXP:(e,t,r)=>{"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r("B6Q+")();e.exports=function(e){return"object"==typeof e&&null!==e&&(i?function(e){try{return n.call(e),!0}catch(e){return!1}}(e):"[object Date]"===o.call(e))}},zteo:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};const o="object"===("undefined"==typeof window?"undefined":n(window))&&"object"===("undefined"==typeof document?"undefined":n(document))&&9===document.nodeType},"2Nju":(e,t,r)=>{"use strict";var n,o,i,a,s=r("VF6F"),l=r("B6Q+")();if(l){n=s("Object.prototype.hasOwnProperty"),o=s("RegExp.prototype.exec"),i={};var c=function(){throw i};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var u=s("Object.prototype.toString"),d=Object.getOwnPropertyDescriptor;e.exports=l?function(e){if(!e||"object"!=typeof e)return!1;var t=d(e,"lastIndex");if(!t||!n(t,"value"))return!1;try{o(e,a)}catch(e){return e===i}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},"46Hv":(e,t,r)=>{"use strict";r.d(t,{VZ:()=>Y,vt:()=>ge,D_:()=>p,ih:()=>ve,rN:()=>ye,Sg:()=>m});var n=r("+9dH"),o=r("zteo"),i=r("vQ/N");function a(e,t){for(var r=0;r<+~=|^:(),"'`\s])/g,_="undefined"!=typeof CSS&&CSS.escape,x=function(e){return _?_(e):e.replace(b,"\\$1")},w=function(){function e(e,t,r){this.type="style",this.isProcessed=!1;var n=r.sheet,o=r.Renderer;this.key=e,this.options=r,this.style=t,n?this.renderer=n.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,r){if(void 0===t)return this.style[e];var n=!!r&&r.force;if(!n&&this.style[e]===t)return this;var o=t;r&&!1===r.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!n)return this;var s=i&&a;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var l=this.options.sheet;return l&&l.attached,this},e}(),A=function(e){function t(t,r,n){var o;o=e.call(this,t,r,n)||this;var i=n.selector,a=n.scoped,s=n.sheet,l=n.generateId;return i?o.selectorText=i:!1!==a&&(o.id=l((0,c.A)((0,c.A)(o)),s),o.selectorText="."+x(o.id)),o}(0,l.A)(t,e);var r=t.prototype;return r.applyTo=function(e){var t=this.renderer;if(t){var r=this.toJSON();for(var n in r)t.setProperty(e,n,r[n])}return this},r.toJSON=function(){var e={};for(var t in this.style){var r=this.style[t];"object"!=typeof r?e[t]=r:Array.isArray(r)&&(e[t]=m(r))}return e},r.toString=function(e){var t=this.options.sheet,r=t&&t.options.link?(0,n.A)({},e,{allowEmpty:!0}):e;return v(this.selectorText,this.style,r)},s(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,r=this.renderable;r&&t&&(t.setSelector(r,e)||t.replaceRule(r,this))}},get:function(){return this.selectorText}}]),t}(w),S={onCreateRule:function(e,t,r){return"@"===e[0]||r.parent&&"keyframes"===r.parent.type?null:new A(e,t,r)}},C={indent:1,children:!0},E=/@([\w-]+)/,T=function(){function e(e,t,r){this.type="conditional",this.isProcessed=!1,this.key=e;var o=e.match(E);for(var i in this.at=o?o[1]:"unknown",this.query=r.name||"@"+this.at,this.options=r,this.rules=new Y((0,n.A)({},r,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n?(this.options.jss.plugins.onProcessRule(n),n):null},t.replaceRule=function(e,t,r){var n=this.rules.replace(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.toString=function(e){void 0===e&&(e=C);var t=g(e).linebreak;if(null==e.indent&&(e.indent=C.indent),null==e.children&&(e.children=C.children),!1===e.children)return this.query+" {}";var r=this.rules.toString(e);return r?this.query+" {"+t+r+t+"}":""},e}(),I=/@container|@media|@supports\s+/,k={onCreateRule:function(e,t,r){return I.test(e)?new T(e,t,r):null}},M={indent:1,children:!0},R=/@keyframes\s+([\w-]+)/,P=function(){function e(e,t,r){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=e.match(R);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=r;var i=r.scoped,a=r.sheet,s=r.generateId;for(var l in this.id=!1===i?this.name:x(s(this,a)),this.rules=new Y((0,n.A)({},r,{parent:this})),t)this.rules.add(l,t[l],(0,n.A)({},r,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=M);var t=g(e).linebreak;if(null==e.indent&&(e.indent=M.indent),null==e.children&&(e.children=M.children),!1===e.children)return this.at+" "+this.id+" {}";var r=this.rules.toString(e);return r&&(r=""+t+r+t),this.at+" "+this.id+" {"+r+"}"},e}(),O=/@keyframes\s+/,L=/\$([\w-]+)/g,D=function(e,t){return"string"==typeof e?e.replace(L,(function(e,r){return r in t?t[r]:e})):e},N=function(e,t,r){var n=e[t],o=D(n,r);o!==n&&(e[t]=o)},F={onCreateRule:function(e,t,r){return"string"==typeof e&&O.test(e)?new P(e,t,r):null},onProcessStyle:function(e,t,r){return"style"===t.type&&r?("animation-name"in e&&N(e,"animation-name",r.keyframes),"animation"in e&&N(e,"animation",r.keyframes),e):e},onChangeValue:function(e,t,r){var n=r.options.sheet;if(!n)return e;switch(t){case"animation":case"animation-name":return D(e,n.keyframes);default:return e}}},z=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.A)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,r=t&&t.options.link?(0,n.A)({},e,{allowEmpty:!0}):e;return v(this.key,this.style,r)},t}(w),B={onCreateRule:function(e,t,r){return r.parent&&"keyframes"===r.parent.type?new z(e,t,r):null}},j=function(){function e(e,t,r){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=r}return e.prototype.toString=function(e){var t=g(e).linebreak;if(Array.isArray(this.style)){for(var r="",n=0;n=this.index)t.push(e);else for(var n=0;nr)return void t.splice(n,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,r=t.attached,n=(0,u.A)(t,["attached"]),o=g(n).linebreak,i="",a=0;a-1?n.substr(0,o-1):n;e.style.setProperty(t,i,o>-1?"important":"")}}catch(e){return!1}return!0},se=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},le=function(e,t){return e.selectorText=t,e.selectorText===t},ce=oe((function(){return document.querySelector("head")}));var ue=oe((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),de=function(e,t,r){try{"insertRule"in e?e.insertRule(t,r):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[r]},fe=function(e,t){var r=e.cssRules.length;return void 0===t||t>r?r:t},pe=function(){function e(e){this.getPropertyValue=ie,this.setProperty=ae,this.removeProperty=se,this.setSelector=le,this.hasInsertedRules=!1,this.cssRules=[],e&&Q.add(e),this.sheet=e;var t,r=this.sheet?this.sheet.options:{},n=r.media,o=r.meta,i=r.element;this.element=i||((t=document.createElement("style")).textContent="\n",t),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),o&&this.element.setAttribute("data-meta",o);var a=ue();a&&this.element.setAttribute("nonce",a)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var r=t.insertionPoint,n=function(e){var t=Q.registry;if(t.length>0){var r=function(e,t){for(var r=0;rt.index&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.attached&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=e.insertionPoint;if(n&&"string"==typeof n){var o=function(e){for(var t=ce(),r=0;r{var n=r("Cwc5")(r("Kz5y"),"DataView");e.exports=n},"4kuk":(e,t,r)=>{var n=r("SfRM"),o=r("Hvzi"),i=r("u8Dt"),a=r("ekgI"),s=r("JSQU");function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r("KMkd"),o=r("adU4"),i=r("tMB7"),a=r("+6XX"),s=r("Z8oC");function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r("Cwc5")(r("Kz5y"),"Map");e.exports=n},e4Nc:(e,t,r)=>{var n=r("fGT3"),o=r("k+1r"),i=r("JHgL"),a=r("pSRY"),s=r("H8j4");function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r("Cwc5")(r("Kz5y"),"Promise");e.exports=n},yGk4:(e,t,r)=>{var n=r("Cwc5")(r("Kz5y"),"Set");e.exports=n},"1hJj":(e,t,r)=>{var n=r("e4Nc"),o=r("ftKO"),i=r("3A9y");function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r("Xi7e"),o=r("77Zs"),i=r("L8xA"),a=r("gCq4"),s=r("VaNO"),l=r("0Cz8");function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},nmnc:(e,t,r)=>{var n=r("Kz5y").Symbol;e.exports=n},JHRd:(e,t,r)=>{var n=r("Kz5y").Uint8Array;e.exports=n},"Of+w":(e,t,r)=>{var n=r("Cwc5")(r("Kz5y"),"WeakMap");e.exports=n},heNW:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},oMRN:e=>{e.exports=function(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r{var n=r("R/W3");e.exports=function(e,t){return!(null==e||!e.length)&&n(e,t,0)>-1}},"Xt/L":e=>{e.exports=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n{var n=r("UNi/"),o=r("03A+"),i=r("Z0cm"),a=r("DSRE"),s=r("wJg7"),l=r("c6wG"),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),u=!r&&o(e),d=!r&&!u&&a(e),f=!r&&!u&&!d&&l(e),p=r||u||d||f,h=p?n(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||h.push(g);return h}},eUgh:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{var n=r("hypo"),o=r("ljhN"),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},y1pI:(e,t,r)=>{var n=r("ljhN");e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},JD84:(e,t,r)=>{var n=r("SKAX");e.exports=function(e,t,r,o){return n(e,(function(e,n,i){t(o,e,r(e),i)})),o}},hypo:(e,t,r)=>{var n=r("O0oS");e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},LqpT:(e,t,r)=>{var n=r("1hJj"),o=r("jbM+"),i=r("Xt/L"),a=r("eUgh"),s=r("sEf8"),l=r("xYSL");e.exports=function(e,t,r,c){var u=-1,d=o,f=!0,p=e.length,h=[],m=t.length;if(!p)return h;r&&(t=a(t,s(r))),c?(d=i,f=!1):t.length>=200&&(d=l,f=!1,t=new n(t));e:for(;++u{var n=r("JC6p"),o=r("lQqw")(n);e.exports=o},KwMD:e=>{e.exports=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i{var n=r("CH3K"),o=r("BiGR");e.exports=function e(t,r,i,a,s){var l=-1,c=t.length;for(i||(i=o),s||(s=[]);++l0&&i(u)?r>1?e(u,r-1,i,a,s):n(s,u):a||(s[s.length]=u)}return s}},"cq/+":(e,t,r)=>{var n=r("mc0g")();e.exports=n},JC6p:(e,t,r)=>{var n=r("cq/+"),o=r("7GkX");e.exports=function(e,t){return e&&n(e,t,o)}},ZWtO:(e,t,r)=>{var n=r("4uTw"),o=r("9Nap");e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r{var n=r("CH3K"),o=r("Z0cm");e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},NykK:(e,t,r)=>{var n=r("nmnc"),o=r("AP2z"),i=r("KfNM"),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},Juji:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},"R/W3":(e,t,r)=>{var n=r("KwMD"),o=r("2ajD"),i=r("CZoQ");e.exports=function(e,t,r){return t==t?i(e,t,r):n(e,o,r)}},"I+LG":(e,t,r)=>{var n=r("JC6p");e.exports=function(e,t,r,o){return n(e,(function(e,n,i){t(o,r(e),n,i)})),o}},JTzB:(e,t,r)=>{var n=r("NykK"),o=r("ExA7");e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},"wF/u":(e,t,r)=>{var n=r("e5cp"),o=r("ExA7");e.exports=function e(t,r,i,a,s){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,a,e,s))}},e5cp:(e,t,r)=>{var n=r("fmRc"),o=r("or5M"),i=r("HDyB"),a=r("seXi"),s=r("QqLw"),l=r("Z0cm"),c=r("DSRE"),u=r("c6wG"),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,g,y){var v=l(e),b=l(t),_=v?f:s(e),x=b?f:s(t),w=(_=_==d?p:_)==p,A=(x=x==d?p:x)==p,S=_==x;if(S&&c(e)){if(!c(t))return!1;v=!0,w=!1}if(S&&!w)return y||(y=new n),v||u(e)?o(e,t,r,m,g,y):i(e,t,_,r,m,g,y);if(!(1&r)){var C=w&&h.call(e,"__wrapped__"),E=A&&h.call(t,"__wrapped__");if(C||E){var T=C?e.value():e,I=E?t.value():t;return y||(y=new n),g(T,I,r,m,y)}}return!!S&&(y||(y=new n),a(e,t,r,m,g,y))}},"lm/5":(e,t,r)=>{var n=r("fmRc"),o=r("wF/u");e.exports=function(e,t,r,i){var a=r.length,s=a,l=!i;if(null==e)return!s;for(e=Object(e);a--;){var c=r[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a{e.exports=function(e){return e!=e}},NKxu:(e,t,r)=>{var n=r("lSCD"),o=r("E2jh"),i=r("GoyQ"),a=r("3Fdi"),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,f=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?f:s).test(a(e))}},JoaM:(e,t,r)=>{var n=r("NykK"),o=r("ExA7");e.exports=function(e){return o(e)&&"[object RegExp]"==n(e)}},dD9F:(e,t,r)=>{var n=r("NykK"),o=r("shjB"),i=r("ExA7"),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},"ut/Y":(e,t,r)=>{var n=r("ZCpW"),o=r("GDhZ"),i=r("zZ0H"),a=r("Z0cm"),s=r("+c4W");e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):n(e):s(e)}},A90E:(e,t,r)=>{var n=r("6sVZ"),o=r("V6Ve"),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},QcOe:(e,t,r)=>{var n=r("GoyQ"),o=r("6sVZ"),i=r("7Ix3"),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},l9OW:(e,t,r)=>{var n=r("SKAX"),o=r("MMmD");e.exports=function(e,t){var r=-1,i=o(e)?Array(e.length):[];return n(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}},ZCpW:(e,t,r)=>{var n=r("lm/5"),o=r("O7RO"),i=r("IOzZ");e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},GDhZ:(e,t,r)=>{var n=r("wF/u"),o=r("mwIZ"),i=r("hgQt"),a=r("9ggG"),s=r("CMye"),l=r("IOzZ"),c=r("9Nap");e.exports=function(e,t){return a(e)&&s(t)?l(c(e),t):function(r){var a=o(r,e);return void 0===a&&a===t?i(r,e):n(t,a,3)}}},alwl:(e,t,r)=>{var n=r("eUgh"),o=r("ZWtO"),i=r("ut/Y"),a=r("l9OW"),s=r("1LK5"),l=r("sEf8"),c=r("IWTy"),u=r("zZ0H"),d=r("Z0cm");e.exports=function(e,t,r){t=t.length?n(t,(function(e){return d(e)?function(t){return o(t,1===e.length?e[0]:e)}:e})):[u];var f=-1;t=n(t,l(i));var p=a(e,(function(e,r,o){return{criteria:n(t,(function(t){return t(e)})),index:++f,value:e}}));return s(p,(function(e,t){return c(e,t,r)}))}},FfPP:(e,t,r)=>{var n=r("idmN"),o=r("hgQt");e.exports=function(e,t){return n(e,t,(function(t,r){return o(e,r)}))}},idmN:(e,t,r)=>{var n=r("ZWtO"),o=r("FZoo"),i=r("4uTw");e.exports=function(e,t,r){for(var a=-1,s=t.length,l={};++a{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},"4/ic":(e,t,r)=>{var n=r("ZWtO");e.exports=function(e){return function(t){return n(t,e)}}},R5Y4:e=>{var t=Math.ceil,r=Math.max;e.exports=function(e,n,o,i){for(var a=-1,s=r(t((n-e)/(o||1)),0),l=Array(s);s--;)l[i?s:++a]=e,e+=o;return l}},EA7m:(e,t,r)=>{var n=r("zZ0H"),o=r("Ioao"),i=r("wclG");e.exports=function(e,t){return i(o(e,t,n),e+"")}},FZoo:(e,t,r)=>{var n=r("MrPd"),o=r("4uTw"),i=r("wJg7"),a=r("GoyQ"),s=r("9Nap");e.exports=function(e,t,r,l){if(!a(e))return e;for(var c=-1,u=(t=o(t,e)).length,d=u-1,f=e;null!=f&&++c{var n=r("cvCv"),o=r("O0oS"),i=r("zZ0H"),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},Nh2a:(e,t,r)=>{var n=r("SKAX");e.exports=function(e,t){var r;return n(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}},"1LK5":e=>{e.exports=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}},"6ZrN":(e,t,r)=>{var n=r("ljhN");e.exports=function(e,t){for(var r=-1,o=e.length,i=0,a=[];++r{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{var n=r("nmnc"),o=r("eUgh"),i=r("Z0cm"),a=r("/9aa"),s=n?n.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return l?l.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},jXQH:(e,t,r)=>{var n=r("TO8r"),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},sEf8:e=>{e.exports=function(e){return function(t){return e(t)}}},LGYb:(e,t,r)=>{var n=r("1hJj"),o=r("jbM+"),i=r("Xt/L"),a=r("xYSL"),s=r("dQpi"),l=r("rEGp");e.exports=function(e,t,r){var c=-1,u=o,d=e.length,f=!0,p=[],h=p;if(r)f=!1,u=i;else if(d>=200){var m=t?null:s(e);if(m)return l(m);f=!1,u=a,h=new n}else h=t?[]:p;e:for(;++c{var n=r("eUgh");e.exports=function(e,t){return n(t,(function(t){return e[t]}))}},xYSL:e=>{e.exports=function(e,t){return e.has(t)}},"4uTw":(e,t,r)=>{var n=r("Z0cm"),o=r("9ggG"),i=r("GNiM"),a=r("dt0z");e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(e))}},yue5:(e,t,r)=>{var n=r("/9aa");e.exports=function(e,t){if(e!==t){var r=void 0!==e,o=null===e,i=e==e,a=n(e),s=void 0!==t,l=null===t,c=t==t,u=n(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||o&&s&&c||!r&&c||!i)return 1;if(!o&&!a&&!u&&e{var n=r("yue5");e.exports=function(e,t,r){for(var o=-1,i=e.criteria,a=t.criteria,s=i.length,l=r.length;++o=l?c:c*("desc"==r[o]?-1:1)}return e.index-t.index}},juv8:(e,t,r)=>{var n=r("MrPd"),o=r("hypo");e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,l=t.length;++s{var n=r("Kz5y")["__core-js_shared__"];e.exports=n},UMY1:(e,t,r)=>{var n=r("oMRN"),o=r("JD84"),i=r("ut/Y"),a=r("Z0cm");e.exports=function(e,t){return function(r,s){var l=a(r)?n:o,c=t?t():{};return l(r,e,i(s,2),c)}}},LsHQ:(e,t,r)=>{var n=r("EA7m"),o=r("mv/X");e.exports=function(e){return n((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n{var n=r("MMmD");e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a{e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===r(i[l],l,i))break}return t}}},XKAG:(e,t,r)=>{var n=r("ut/Y"),o=r("MMmD"),i=r("7GkX");e.exports=function(e){return function(t,r,a){var s=Object(t);if(!o(t)){var l=n(r,3);t=i(t),r=function(e){return l(s[e],e,s)}}var c=e(t,r,a);return c>-1?s[l?t[c]:c]:void 0}}},Q62E:(e,t,r)=>{var n=r("I+LG");e.exports=function(e,t){return function(r,o){return n(r,e,t(o),{})}}},HLqC:(e,t,r)=>{var n=r("R5Y4"),o=r("mv/X"),i=r("ZCgT");e.exports=function(e){return function(t,r,a){return a&&"number"!=typeof a&&o(t,r,a)&&(r=a=void 0),t=i(t),void 0===r?(r=t,t=0):r=i(r),a=void 0===a?t{var n=r("yGk4"),o=r("vN+2"),i=r("rEGp"),a=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:o;e.exports=a},O0oS:(e,t,r)=>{var n=r("Cwc5"),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},or5M:(e,t,r)=>{var n=r("1hJj"),o=r("QoRX"),i=r("xYSL");e.exports=function(e,t,r,a,s,l){var c=1&r,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var f=l.get(e),p=l.get(t);if(f&&p)return f==t&&p==e;var h=-1,m=!0,g=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++h{var n=r("nmnc"),o=r("JHRd"),i=r("ljhN"),a=r("or5M"),s=r("7fqy"),l=r("rEGp"),c=n?n.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,r,n,c,d,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var h=1&n;if(p||(p=l),e.size!=t.size&&!h)return!1;var m=f.get(e);if(m)return m==t;n|=2,f.set(e,t);var g=a(p(e),p(t),n,c,d,f);return f.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},seXi:(e,t,r)=>{var n=r("qZTm"),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,a,s){var l=1&r,c=n(e),u=c.length;if(u!=n(t).length&&!l)return!1;for(var d=u;d--;){var f=c[d];if(!(l?f in t:o.call(t,f)))return!1}var p=s.get(e),h=s.get(t);if(p&&h)return p==t&&h==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=l;++d{var n=r("TYy9"),o=r("Ioao"),i=r("wclG");e.exports=function(e){return i(o(e,void 0,n),e+"")}},WFqU:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},qZTm:(e,t,r)=>{var n=r("fR/l"),o=r("MvSz"),i=r("7GkX");e.exports=function(e){return n(e,i,o)}},G6z8:(e,t,r)=>{var n=r("fR/l"),o=r("oCl/"),i=r("mTTR");e.exports=function(e){return n(e,i,o)}},QkVE:(e,t,r)=>{var n=r("EpBk");e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},O7RO:(e,t,r)=>{var n=r("CMye"),o=r("7GkX");e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],a=e[i];t[r]=[i,a,n(a)]}return t}},Cwc5:(e,t,r)=>{var n=r("NKxu"),o=r("Npjl");e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},LcsW:(e,t,r)=>{var n=r("kekF")(Object.getPrototypeOf,Object);e.exports=n},AP2z:(e,t,r)=>{var n=r("nmnc"),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},MvSz:(e,t,r)=>{var n=r("LXxW"),o=r("0ycA"),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},"oCl/":(e,t,r)=>{var n=r("CH3K"),o=r("LcsW"),i=r("MvSz"),a=r("0ycA"),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:a;e.exports=s},QqLw:(e,t,r)=>{var n=r("tadb"),o=r("ebwN"),i=r("HOxn"),a=r("yGk4"),s=r("Of+w"),l=r("NykK"),c=r("3Fdi"),u="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",h="[object DataView]",m=c(n),g=c(o),y=c(i),v=c(a),b=c(s),_=l;(n&&_(new n(new ArrayBuffer(1)))!=h||o&&_(new o)!=u||i&&_(i.resolve())!=d||a&&_(new a)!=f||s&&_(new s)!=p)&&(_=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case m:return h;case g:return u;case y:return d;case v:return f;case b:return p}return t}),e.exports=_},Npjl:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},"4sDh":(e,t,r)=>{var n=r("4uTw"),o=r("03A+"),i=r("Z0cm"),a=r("wJg7"),s=r("shjB"),l=r("9Nap");e.exports=function(e,t,r){for(var c=-1,u=(t=n(t,e)).length,d=!1;++c{var n=r("YESw");e.exports=function(){this.__data__=n?n(null):{},this.size=0}},Hvzi:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},u8Dt:(e,t,r)=>{var n=r("YESw"),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},ekgI:(e,t,r)=>{var n=r("YESw"),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},JSQU:(e,t,r)=>{var n=r("YESw");e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},BiGR:(e,t,r)=>{var n=r("nmnc"),o=r("03A+"),i=r("Z0cm"),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},wJg7:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r("ljhN"),o=r("MMmD"),i=r("wJg7"),a=r("GoyQ");e.exports=function(e,t,r){if(!a(r))return!1;var s=typeof t;return!!("number"==s?o(r)&&i(t,r.length):"string"==s&&t in r)&&n(r[t],e)}},"9ggG":(e,t,r)=>{var n=r("Z0cm"),o=r("/9aa"),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},EpBk:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},E2jh:(e,t,r)=>{var n,o=r("2gN3"),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},"6sVZ":e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},CMye:(e,t,r)=>{var n=r("GoyQ");e.exports=function(e){return e==e&&!n(e)}},KMkd:e=>{e.exports=function(){this.__data__=[],this.size=0}},adU4:(e,t,r)=>{var n=r("y1pI"),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():o.call(t,r,1),--this.size,0))}},tMB7:(e,t,r)=>{var n=r("y1pI");e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},"+6XX":(e,t,r)=>{var n=r("y1pI");e.exports=function(e){return n(this.__data__,e)>-1}},Z8oC:(e,t,r)=>{var n=r("y1pI");e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},fGT3:(e,t,r)=>{var n=r("4kuk"),o=r("Xi7e"),i=r("ebwN");e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},"k+1r":(e,t,r)=>{var n=r("QkVE");e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},JHgL:(e,t,r)=>{var n=r("QkVE");e.exports=function(e){return n(this,e).get(e)}},pSRY:(e,t,r)=>{var n=r("QkVE");e.exports=function(e){return n(this,e).has(e)}},H8j4:(e,t,r)=>{var n=r("QkVE");e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},"7fqy":e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},IOzZ:e=>{e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},I01J:(e,t,r)=>{var n=r("44Ds");e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},YESw:(e,t,r)=>{var n=r("Cwc5")(Object,"create");e.exports=n},V6Ve:(e,t,r)=>{var n=r("kekF")(Object.keys,Object);e.exports=n},"7Ix3":e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},mdPL:(e,t,r)=>{e=r.nmd(e);var n=r("WFqU"),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},KfNM:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},kekF:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},Ioao:(e,t,r)=>{var n=r("heNW"),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),l=Array(s);++a{var n=r("WFqU"),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},ftKO:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},"3A9y":e=>{e.exports=function(e){return this.__data__.has(e)}},rEGp:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},wclG:(e,t,r)=>{var n=r("pFRH"),o=r("88Gu")(n);e.exports=o},"88Gu":e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},"77Zs":(e,t,r)=>{var n=r("Xi7e");e.exports=function(){this.__data__=new n,this.size=0}},L8xA:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},gCq4:e=>{e.exports=function(e){return this.__data__.get(e)}},VaNO:e=>{e.exports=function(e){return this.__data__.has(e)}},"0Cz8":(e,t,r)=>{var n=r("Xi7e"),o=r("ebwN"),i=r("e4Nc");e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},CZoQ:e=>{e.exports=function(e,t,r){for(var n=r-1,o=e.length;++n{var n=r("I01J"),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=a},"9Nap":(e,t,r)=>{var n=r("/9aa");e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},"3Fdi":e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},TO8r:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},"3OWR":(e,t,r)=>{var n=r("MrPd"),o=r("juv8"),i=r("LsHQ"),a=r("MMmD"),s=r("6sVZ"),l=r("7GkX"),c=Object.prototype.hasOwnProperty,u=i((function(e,t){if(s(t)||a(t))o(t,l(t),e);else for(var r in t)c.call(t,r)&&n(e,r,t[r])}));e.exports=u},cvCv:e=>{e.exports=function(e){return function(){return e}}},la6v:(e,t,r)=>{var n=r("EA7m"),o=r("ljhN"),i=r("mv/X"),a=r("mTTR"),s=Object.prototype,l=s.hasOwnProperty,c=n((function(e,t){e=Object(e);var r=-1,n=t.length,c=n>2?t[2]:void 0;for(c&&i(t[0],t[1],c)&&(n=1);++r{e.exports=function(e,t){return e===t||e!=e&&t!=t}},J2m7:(e,t,r)=>{var n=r("XKAG")(r("UfWW"));e.exports=n},UfWW:(e,t,r)=>{var n=r("KwMD"),o=r("ut/Y"),i=r("Sxd8"),a=Math.max;e.exports=function(e,t,r){var s=null==e?0:e.length;if(!s)return-1;var l=null==r?0:i(r);return l<0&&(l=a(s+l,0)),n(e,o(t,3),l)}},TYy9:(e,t,r)=>{var n=r("XGnz");e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},O7iK:e=>{e.exports=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t{var n=r("ZWtO");e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},"bt/X":(e,t,r)=>{var n=r("hypo"),o=r("UMY1"),i=Object.prototype.hasOwnProperty,a=o((function(e,t,r){i.call(e,r)?e[r].push(t):n(e,r,[t])}));e.exports=a},hgQt:(e,t,r)=>{var n=r("Juji"),o=r("4sDh");e.exports=function(e,t){return null!=e&&o(e,t,n)}},zZ0H:e=>{e.exports=function(e){return e}},ijCd:(e,t,r)=>{var n=r("R/W3"),o=r("MMmD"),i=r("4qC0"),a=r("Sxd8"),s=r("P/G1"),l=Math.max;e.exports=function(e,t,r,c){e=o(e)?e:s(e),r=r&&!c?a(r):0;var u=e.length;return r<0&&(r=l(u+r,0)),i(e)?r<=u&&e.indexOf(t,r)>-1:!!u&&n(e,t,r)>-1}},"J/PD":(e,t,r)=>{var n=r("cvCv"),o=r("Q62E"),i=r("zZ0H"),a=Object.prototype.toString,s=o((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=a.call(t)),e[t]=r}),n(i));e.exports=s},"03A+":(e,t,r)=>{var n=r("JTzB"),o=r("ExA7"),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},Z0cm:e=>{var t=Array.isArray;e.exports=t},MMmD:(e,t,r)=>{var n=r("lSCD"),o=r("shjB");e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},"3L66":(e,t,r)=>{var n=r("MMmD"),o=r("ExA7");e.exports=function(e){return o(e)&&n(e)}},DSRE:(e,t,r)=>{e=r.nmd(e);var n=r("Kz5y"),o=r("B8du"),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},"E+oP":(e,t,r)=>{var n=r("A90E"),o=r("QqLw"),i=r("03A+"),a=r("Z0cm"),s=r("MMmD"),l=r("DSRE"),c=r("6sVZ"),u=r("c6wG"),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||u(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!n(e).length;for(var r in e)if(d.call(e,r))return!1;return!0}},"Y+p1":(e,t,r)=>{var n=r("wF/u");e.exports=function(e,t){return n(e,t)}},lSCD:(e,t,r)=>{var n=r("NykK"),o=r("GoyQ");e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},shjB:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},J2iB:e=>{e.exports=function(e){return null==e}},GoyQ:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},ExA7:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},YO3V:(e,t,r)=>{var n=r("NykK"),o=r("LcsW"),i=r("ExA7"),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=n(e))return!1;var t=o(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==u}},wAXd:(e,t,r)=>{var n=r("JoaM"),o=r("sEf8"),i=r("mdPL"),a=i&&i.isRegExp,s=a?o(a):n;e.exports=s},"4qC0":(e,t,r)=>{var n=r("NykK"),o=r("Z0cm"),i=r("ExA7");e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==n(e)}},"/9aa":(e,t,r)=>{var n=r("NykK"),o=r("ExA7");e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},c6wG:(e,t,r)=>{var n=r("dD9F"),o=r("sEf8"),i=r("mdPL"),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},"7GkX":(e,t,r)=>{var n=r("b80T"),o=r("A90E"),i=r("MMmD");e.exports=function(e){return i(e)?n(e):o(e)}},mTTR:(e,t,r)=>{var n=r("b80T"),o=r("QcOe"),i=r("MMmD");e.exports=function(e){return i(e)?n(e,!0):o(e)}},RBan:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},LvDl:function(e,t,r){var n;e=r.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=32,c=128,u=1/0,d=9007199254740991,f=NaN,p=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",_="[object Function]",x="[object GeneratorFunction]",w="[object Map]",A="[object Number]",S="[object Object]",C="[object Promise]",E="[object RegExp]",T="[object Set]",I="[object String]",k="[object Symbol]",M="[object WeakMap]",R="[object ArrayBuffer]",P="[object DataView]",O="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",N="[object Int16Array]",F="[object Int32Array]",z="[object Uint8Array]",B="[object Uint8ClampedArray]",j="[object Uint16Array]",U="[object Uint32Array]",$=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,q=RegExp(H.source),X=RegExp(W.source),Z=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",we="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+xe+"]",ke="["+Te+"]",Me="["+we+"]",Re="\\d+",Pe="["+Ae+"]",Oe="["+Se+"]",Le="[^"+xe+Te+Re+Ae+Se+Ce+"]",De="\\ud83c[\\udffb-\\udfff]",Ne="[^"+xe+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Ce+"]",je="\\u200d",Ue="(?:"+Oe+"|"+Le+")",$e="(?:"+Be+"|"+Le+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",Ge="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+Me+"|"+De+")?",We="["+Ee+"]?",qe=We+He+"(?:"+je+"(?:"+[Ne,Fe,ze].join("|")+")"+We+He+")*",Xe="(?:"+[Pe,Fe,ze].join("|")+")"+qe,Ze="(?:"+[Ne+Me+"?",Me,Fe,ze,Ie].join("|")+")",Ye=RegExp("['’]","g"),Ke=RegExp(Me,"g"),Je=RegExp(De+"(?="+De+")|"+Ze+qe,"g"),Qe=RegExp([Be+"?"+Oe+"+"+Ve+"(?="+[ke,Be,"$"].join("|")+")",$e+"+"+Ge+"(?="+[ke,Be+Ue,"$"].join("|")+")",Be+"?"+Ue+"+"+Ve,Be+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Xe].join("|"),"g"),et=RegExp("["+je+xe+we+Ee+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,ot={};ot[O]=ot[L]=ot[D]=ot[N]=ot[F]=ot[z]=ot[B]=ot[j]=ot[U]=!0,ot[m]=ot[g]=ot[R]=ot[y]=ot[P]=ot[v]=ot[b]=ot[_]=ot[w]=ot[A]=ot[S]=ot[E]=ot[T]=ot[I]=ot[M]=!1;var it={};it[m]=it[g]=it[R]=it[P]=it[y]=it[v]=it[O]=it[L]=it[D]=it[N]=it[F]=it[w]=it[A]=it[S]=it[E]=it[T]=it[I]=it[k]=it[z]=it[B]=it[j]=it[U]=!0,it[b]=it[_]=it[M]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ut="object"==typeof self&&self&&self.Object===Object&&self,dt=ct||ut||Function("return this")(),ft=t&&!t.nodeType&&t,pt=ft&&e&&!e.nodeType&&e,ht=pt&&pt.exports===ft,mt=ht&&ct.process,gt=function(){try{return pt&&pt.require&&pt.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,vt=gt&>.isDate,bt=gt&>.isMap,_t=gt&>.isRegExp,xt=gt&>.isSet,wt=gt&>.isTypedArray;function At(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function St(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o-1}function Mt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n-1;);return r}function Qt(e,t){for(var r=e.length;r--&&Bt(t,e[r],0)>-1;);return r}var er=Gt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tr=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function rr(e){return"\\"+at[e]}function nr(e){return et.test(e)}function or(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ir(e,t){return function(r){return e(t(r))}}function ar(e,t){for(var r=-1,n=e.length,o=0,i=[];++r",""":'"',"'":"'"}),pr=function e(t){var r,n=(t=null==t?dt:pr.defaults(dt.Object(),t,pr.pick(dt,rt))).Array,oe=t.Date,xe=t.Error,we=t.Function,Ae=t.Math,Se=t.Object,Ce=t.RegExp,Ee=t.String,Te=t.TypeError,Ie=n.prototype,ke=we.prototype,Me=Se.prototype,Re=t["__core-js_shared__"],Pe=ke.toString,Oe=Me.hasOwnProperty,Le=0,De=(r=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ne=Me.toString,Fe=Pe.call(Se),ze=dt._,Be=Ce("^"+Pe.call(Oe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),je=ht?t.Buffer:o,Ue=t.Symbol,$e=t.Uint8Array,Ve=je?je.allocUnsafe:o,Ge=ir(Se.getPrototypeOf,Se),He=Se.create,We=Me.propertyIsEnumerable,qe=Ie.splice,Xe=Ue?Ue.isConcatSpreadable:o,Ze=Ue?Ue.iterator:o,Je=Ue?Ue.toStringTag:o,et=function(){try{var e=ci(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==dt.Date.now&&oe.now,ut=t.setTimeout!==dt.setTimeout&&t.setTimeout,ft=Ae.ceil,pt=Ae.floor,mt=Se.getOwnPropertySymbols,gt=je?je.isBuffer:o,Nt=t.isFinite,Gt=Ie.join,hr=ir(Se.keys,Se),mr=Ae.max,gr=Ae.min,yr=oe.now,vr=t.parseInt,br=Ae.random,_r=Ie.reverse,xr=ci(t,"DataView"),wr=ci(t,"Map"),Ar=ci(t,"Promise"),Sr=ci(t,"Set"),Cr=ci(t,"WeakMap"),Er=ci(Se,"create"),Tr=Cr&&new Cr,Ir={},kr=Fi(xr),Mr=Fi(wr),Rr=Fi(Ar),Pr=Fi(Sr),Or=Fi(Cr),Lr=Ue?Ue.prototype:o,Dr=Lr?Lr.valueOf:o,Nr=Lr?Lr.toString:o;function Fr(e){if(es(e)&&!Va(e)&&!(e instanceof Ur)){if(e instanceof jr)return e;if(Oe.call(e,"__wrapped__"))return zi(e)}return new jr(e)}var zr=function(){function e(){}return function(t){if(!Qa(t))return{};if(He)return He(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function Br(){}function jr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function $r(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function an(e,t,r,n,i,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=i?r(e,n,i,a):r(e)),s!==o)return s;if(!Qa(e))return e;var d=Va(e);if(d){if(s=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!l)return To(e,s)}else{var f=fi(e),p=f==_||f==x;if(qa(e))return xo(e,l);if(f==S||f==m||p&&!i){if(s=c||p?{}:hi(e),!l)return c?function(e,t){return Io(e,di(e),t)}(e,function(e,t){return e&&Io(t,Rs(t),e)}(s,e)):function(e,t){return Io(e,ui(e),t)}(e,tn(s,e))}else{if(!it[f])return i?e:{};s=function(e,t,r){var n,o=e.constructor;switch(t){case R:return wo(e);case y:case v:return new o(+e);case P:return function(e,t){var r=t?wo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case O:case L:case D:case N:case F:case z:case B:case j:case U:return Ao(e,r);case w:return new o;case A:case I:return new o(e);case E:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new o;case k:return n=e,Dr?Se(Dr.call(n)):{}}}(e,f,l)}}a||(a=new Wr);var h=a.get(e);if(h)return h;a.set(e,s),is(e)?e.forEach((function(n){s.add(an(n,t,r,n,e,a))})):ts(e)&&e.forEach((function(n,o){s.set(o,an(n,t,r,o,e,a))}));var g=d?o:(u?c?ri:ti:c?Rs:Ms)(e);return Ct(g||e,(function(n,o){g&&(n=e[o=n]),Jr(s,o,an(n,t,r,o,e,a))})),s}function sn(e,t,r){var n=r.length;if(null==e)return!n;for(e=Se(e);n--;){var i=r[n],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function ln(e,t,r){if("function"!=typeof e)throw new Te(i);return Ii((function(){e.apply(o,r)}),t)}function cn(e,t,r,n){var o=-1,i=kt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;r&&(t=Rt(t,Zt(r))),n?(i=Mt,a=!1):t.length>=200&&(i=Kt,a=!1,t=new Hr(t));e:for(;++o-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=Qr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Gr.prototype.clear=function(){this.size=0,this.__data__={hash:new $r,map:new(wr||Vr),string:new $r}},Gr.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},Gr.prototype.get=function(e){return si(this,e).get(e)},Gr.prototype.has=function(e){return si(this,e).has(e)},Gr.prototype.set=function(e,t){var r=si(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Hr.prototype.add=Hr.prototype.push=function(e){return this.__data__.set(e,a),this},Hr.prototype.has=function(e){return this.__data__.has(e)},Wr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Wr.prototype.get=function(e){return this.__data__.get(e)},Wr.prototype.has=function(e){return this.__data__.has(e)},Wr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!wr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Gr(n)}return r.set(e,t),this.size=r.size,this};var un=Ro(vn),dn=Ro(bn,!0);function fn(e,t){var r=!0;return un(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function pn(e,t,r){for(var n=-1,i=e.length;++n0&&r(s)?t>1?mn(s,t-1,r,n,o):Pt(o,s):n||(o[o.length]=s)}return o}var gn=Po(),yn=Po(!0);function vn(e,t){return e&&gn(e,t,Ms)}function bn(e,t){return e&&yn(e,t,Ms)}function _n(e,t){return It(t,(function(t){return Ya(e[t])}))}function xn(e,t){for(var r=0,n=(t=yo(t,e)).length;null!=e&&rt}function Cn(e,t){return null!=e&&Oe.call(e,t)}function En(e,t){return null!=e&&t in Se(e)}function Tn(e,t,r){for(var i=r?Mt:kt,a=e[0].length,s=e.length,l=s,c=n(s),u=1/0,d=[];l--;){var f=e[l];l&&t&&(f=Rt(f,Zt(t))),u=gr(f.length,u),c[l]=!r&&(t||a>=120&&f.length>=120)?new Hr(l&&f):o}f=e[0];var p=-1,h=c[0];e:for(;++p=s?l:l*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));t--;)e[t]=e[t].value;return e}(o)}function $n(e,t,r){for(var n=-1,o=t.length,i={};++n-1;)s!==e&&qe.call(s,l,1),qe.call(e,l,1);return e}function Gn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;gi(o)?qe.call(e,o,1):lo(e,o)}}return e}function Hn(e,t){return e+pt(br()*(t-e+1))}function Wn(e,t){var r="";if(!e||t<1||t>d)return r;do{t%2&&(r+=e),(t=pt(t/2))&&(e+=e)}while(t);return r}function qn(e,t){return ki(Si(e,t,rl),e+"")}function Xn(e){return Xr(Bs(e))}function Zn(e,t){var r=Bs(e);return Pi(r,on(t,0,r.length))}function Yn(e,t,r,n){if(!Qa(e))return e;for(var i=-1,a=(t=yo(t,e)).length,s=a-1,l=e;null!=l&&++ii?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=n(i);++o>>1,a=e[i];null!==a&&!ss(a)&&(r?a<=t:a=200){var c=t?null:qo(e);if(c)return sr(c);a=!1,o=Kt,l=new Hr}else l=t?[]:s;e:for(;++n=n?e:eo(e,t,r)}var _o=at||function(e){return dt.clearTimeout(e)};function xo(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function wo(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ao(e,t){var r=t?wo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function So(e,t){if(e!==t){var r=e!==o,n=null===e,i=e==e,a=ss(e),s=t!==o,l=null===t,c=t==t,u=ss(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||n&&s&&c||!r&&c||!i)return 1;if(!n&&!a&&!u&&e1?r[i-1]:o,s=i>2?r[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&yi(r[0],r[1],s)&&(a=i<3?o:a,i=1),t=Se(t);++n-1?i[a?t[s]:s]:o}}function Fo(e){return ei((function(t){var r=t.length,n=r,a=jr.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new Te(i);if(a&&!l&&"wrapper"==oi(s))var l=new jr([],!0)}for(n=l?n:r;++n1&&_.reverse(),p&&dl))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,h=2&r?new Hr:o;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Ct(h,(function(r){var n="_."+r[0];t&r[1]&&!kt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(n),r)))}function Ri(e){var t=0,r=0;return function(){var n=yr(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Pi(e,t){var r=-1,n=e.length,i=n-1;for(t=t===o?n:t;++r1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,oa(e,r)}));function da(e){var t=Fr(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var pa=ei((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Ur&&gi(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:fa,args:[i],thisArg:o}),new jr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),ha=ko((function(e,t,r){Oe.call(e,r)?++e[r]:rn(e,r,1)})),ma=No($i),ga=No(Vi);function ya(e,t){return(Va(e)?Ct:un)(e,ai(t,3))}function va(e,t){return(Va(e)?Et:dn)(e,ai(t,3))}var ba=ko((function(e,t,r){Oe.call(e,r)?e[r].push(t):rn(e,r,[t])})),_a=qn((function(e,t,r){var o=-1,i="function"==typeof t,a=Ha(e)?n(e.length):[];return un(e,(function(e){a[++o]=i?At(t,e,r):In(e,t,r)})),a})),xa=ko((function(e,t,r){rn(e,r,t)}));function wa(e,t){return(Va(e)?Rt:Nn)(e,ai(t,3))}var Aa=ko((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Sa=qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&yi(e,t[0],t[1])?t=[]:r>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),Un(e,mn(t,1),[])})),Ca=ct||function(){return dt.Date.now()};function Ea(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Zo(e,c,o,o,o,o,t)}function Ta(e,t){var r;if("function"!=typeof t)throw new Te(i);return e=ps(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var Ia=qn((function(e,t,r){var n=1;if(r.length){var o=ar(r,ii(Ia));n|=l}return Zo(e,n,t,r,o)})),ka=qn((function(e,t,r){var n=3;if(r.length){var o=ar(r,ii(ka));n|=l}return Zo(t,n,e,r,o)}));function Ma(e,t,r){var n,a,s,l,c,u,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Te(i);function m(t){var r=n,i=a;return n=a=o,d=t,l=e.apply(i,r)}function g(e){var r=e-u;return u===o||r>=t||r<0||p&&e-d>=s}function y(){var e=Ca();if(g(e))return v(e);c=Ii(y,function(e){var r=t-(e-u);return p?gr(r,s-(e-d)):r}(e))}function v(e){return c=o,h&&n?m(e):(n=a=o,l)}function b(){var e=Ca(),r=g(e);if(n=arguments,a=this,u=e,r){if(c===o)return function(e){return d=e,c=Ii(y,t),f?m(e):l}(u);if(p)return _o(c),c=Ii(y,t),m(u)}return c===o&&(c=Ii(y,t)),l}return t=ms(t)||0,Qa(r)&&(f=!!r.leading,s=(p="maxWait"in r)?mr(ms(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h),b.cancel=function(){c!==o&&_o(c),d=0,n=u=a=c=o},b.flush=function(){return c===o?l:v(Ca())},b}var Ra=qn((function(e,t){return ln(e,1,t)})),Pa=qn((function(e,t,r){return ln(e,ms(t)||0,r)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(i);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Oa.Cache||Gr),r}function La(e){if("function"!=typeof e)throw new Te(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=Gr;var Da=vo((function(e,t){var r=(t=1==t.length&&Va(t[0])?Rt(t[0],Zt(ai())):Rt(mn(t,1),Zt(ai()))).length;return qn((function(n){for(var o=-1,i=gr(n.length,r);++o=t})),$a=kn(function(){return arguments}())?kn:function(e){return es(e)&&Oe.call(e,"callee")&&!We.call(e,"callee")},Va=n.isArray,Ga=yt?Zt(yt):function(e){return es(e)&&An(e)==R};function Ha(e){return null!=e&&Ja(e.length)&&!Ya(e)}function Wa(e){return es(e)&&Ha(e)}var qa=gt||ml,Xa=vt?Zt(vt):function(e){return es(e)&&An(e)==v};function Za(e){if(!es(e))return!1;var t=An(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ns(e)}function Ya(e){if(!Qa(e))return!1;var t=An(e);return t==_||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ka(e){return"number"==typeof e&&e==ps(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function Qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=bt?Zt(bt):function(e){return es(e)&&fi(e)==w};function rs(e){return"number"==typeof e||es(e)&&An(e)==A}function ns(e){if(!es(e)||An(e)!=S)return!1;var t=Ge(e);if(null===t)return!0;var r=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Pe.call(r)==Fe}var os=_t?Zt(_t):function(e){return es(e)&&An(e)==E},is=xt?Zt(xt):function(e){return es(e)&&fi(e)==T};function as(e){return"string"==typeof e||!Va(e)&&es(e)&&An(e)==I}function ss(e){return"symbol"==typeof e||es(e)&&An(e)==k}var ls=wt?Zt(wt):function(e){return es(e)&&Ja(e.length)&&!!ot[An(e)]},cs=Go(Dn),us=Go((function(e,t){return e<=t}));function ds(e){if(!e)return[];if(Ha(e))return as(e)?ur(e):To(e);if(Ze&&e[Ze])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ze]());var t=fi(e);return(t==w?or:t==T?sr:Bs)(e)}function fs(e){return e?(e=ms(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ps(e){var t=fs(e),r=t%1;return t==t?r?t-r:t:0}function hs(e){return e?on(ps(e),0,p):0}function ms(e){if("number"==typeof e)return e;if(ss(e))return f;if(Qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var r=he.test(e);return r||ge.test(e)?lt(e.slice(2),r?2:8):pe.test(e)?f:+e}function gs(e){return Io(e,Rs(e))}function ys(e){return null==e?"":ao(e)}var vs=Mo((function(e,t){if(xi(t)||Ha(t))Io(t,Ms(t),e);else for(var r in t)Oe.call(t,r)&&Jr(e,r,t[r])})),bs=Mo((function(e,t){Io(t,Rs(t),e)})),_s=Mo((function(e,t,r,n){Io(t,Rs(t),e,n)})),xs=Mo((function(e,t,r,n){Io(t,Ms(t),e,n)})),ws=ei(nn),As=qn((function(e,t){e=Se(e);var r=-1,n=t.length,i=n>2?t[2]:o;for(i&&yi(t[0],t[1],i)&&(n=1);++r1),t})),Io(e,ri(e),r),n&&(r=an(r,7,Jo));for(var o=t.length;o--;)lo(r,t[o]);return r})),Ds=ei((function(e,t){return null==e?{}:function(e,t){return $n(e,t,(function(t,r){return Es(e,r)}))}(e,t)}));function Ns(e,t){if(null==e)return{};var r=Rt(ri(e),(function(e){return[e]}));return t=ai(t),$n(e,r,(function(e,r){return t(e,r[0])}))}var Fs=Xo(Ms),zs=Xo(Rs);function Bs(e){return null==e?[]:Yt(e,Ms(e))}var js=Lo((function(e,t,r){return t=t.toLowerCase(),e+(r?Us(t):t)}));function Us(e){return Zs(ys(e).toLowerCase())}function $s(e){return(e=ys(e))&&e.replace(ve,er).replace(Ke,"")}var Vs=Lo((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Gs=Lo((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Hs=Oo("toLowerCase"),Ws=Lo((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),qs=Lo((function(e,t,r){return e+(r?" ":"")+Zs(t)})),Xs=Lo((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Zs=Oo("toUpperCase");function Ys(e,t,r){return e=ys(e),(t=r?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Ks=qn((function(e,t){try{return At(e,o,t)}catch(e){return Za(e)?e:new xe(e)}})),Js=ei((function(e,t){return Ct(t,(function(t){t=Ni(t),rn(e,t,Ia(e[t],e))})),e}));function Qs(e){return function(){return e}}var el=Fo(),tl=Fo(!0);function rl(e){return e}function nl(e){return On("function"==typeof e?e:an(e,1))}var ol=qn((function(e,t){return function(r){return In(r,e,t)}})),il=qn((function(e,t){return function(r){return In(e,r,t)}}));function al(e,t,r){var n=Ms(t),o=_n(t,n);null!=r||Qa(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=_n(t,Ms(t)));var i=!(Qa(r)&&"chain"in r&&!r.chain),a=Ya(e);return Ct(o,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=To(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Pt([this.value()],arguments))})})),e}function sl(){}var ll=Uo(Rt),cl=Uo(Tt),ul=Uo(Dt);function dl(e){return vi(e)?Vt(Ni(e)):function(e){return function(t){return xn(t,e)}}(e)}var fl=Vo(),pl=Vo(!0);function hl(){return[]}function ml(){return!1}var gl,yl=jo((function(e,t){return e+t}),0),vl=Wo("ceil"),bl=jo((function(e,t){return e/t}),1),_l=Wo("floor"),xl=jo((function(e,t){return e*t}),1),wl=Wo("round"),Al=jo((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Te(i);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Ea,Fr.assign=vs,Fr.assignIn=bs,Fr.assignInWith=_s,Fr.assignWith=xs,Fr.at=ws,Fr.before=Ta,Fr.bind=Ia,Fr.bindAll=Js,Fr.bindKey=ka,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Va(e)?e:[e]},Fr.chain=da,Fr.chunk=function(e,t,r){t=(r?yi(e,t,r):t===o)?1:mr(ps(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,l=n(ft(i/t));ai?0:i+r),(n=n===o||n>i?i:ps(n))<0&&(n+=i),n=r>n?0:hs(n);r>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ao(t))&&nr(e)?bo(ur(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new Te(i);return t=null==t?0:mr(ps(t),0),qn((function(r){var n=r[t],o=bo(r,0,t);return n&&Pt(o,n),At(e,this,o)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?eo(e,0,(t=r||t===o?1:ps(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?eo(e,(t=n-(t=r||t===o?1:ps(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?uo(e,ai(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?uo(e,ai(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new Te(i);return Qa(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ma(e,t,{leading:n,maxWait:t,trailing:o})},Fr.thru=fa,Fr.toArray=ds,Fr.toPairs=Fs,Fr.toPairsIn=zs,Fr.toPath=function(e){return Va(e)?Rt(e,Ni):ss(e)?[e]:To(Di(ys(e)))},Fr.toPlainObject=gs,Fr.transform=function(e,t,r){var n=Va(e),o=n||qa(e)||ls(e);if(t=ai(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:Qa(e)&&Ya(i)?zr(Ge(e)):{}}return(o?Ct:vn)(e,(function(e,n,o){return t(r,e,n,o)})),r},Fr.unary=function(e){return Ea(e,1)},Fr.union=ea,Fr.unionBy=ta,Fr.unionWith=ra,Fr.uniq=function(e){return e&&e.length?so(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?so(e,ai(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},Fr.unset=function(e,t){return null==e||lo(e,t)},Fr.unzip=na,Fr.unzipWith=oa,Fr.update=function(e,t,r){return null==e?e:co(e,t,go(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:co(e,t,go(r),n)},Fr.values=Bs,Fr.valuesIn=function(e){return null==e?[]:Yt(e,Rs(e))},Fr.without=ia,Fr.words=Ys,Fr.wrap=function(e,t){return Na(go(t),e)},Fr.xor=aa,Fr.xorBy=sa,Fr.xorWith=la,Fr.zip=ca,Fr.zipObject=function(e,t){return ho(e||[],t||[],Jr)},Fr.zipObjectDeep=function(e,t){return ho(e||[],t||[],Yn)},Fr.zipWith=ua,Fr.entries=Fs,Fr.entriesIn=zs,Fr.extend=bs,Fr.extendWith=_s,al(Fr,Fr),Fr.add=yl,Fr.attempt=Ks,Fr.camelCase=js,Fr.capitalize=Us,Fr.ceil=vl,Fr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=ms(r))==r?r:0),t!==o&&(t=(t=ms(t))==t?t:0),on(ms(e),t,r)},Fr.clone=function(e){return an(e,4)},Fr.cloneDeep=function(e){return an(e,5)},Fr.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:o)},Fr.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:o)},Fr.conformsTo=function(e,t){return null==t||sn(e,t,Ms(t))},Fr.deburr=$s,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=bl,Fr.endsWith=function(e,t,r){e=ys(e),t=ao(t);var n=e.length,i=r=r===o?n:on(ps(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Fr.eq=Ba,Fr.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(W,tr):e},Fr.escapeRegExp=function(e){return(e=ys(e))&&re.test(e)?e.replace(te,"\\$&"):e},Fr.every=function(e,t,r){var n=Va(e)?Tt:fn;return r&&yi(e,t,r)&&(t=o),n(e,ai(t,3))},Fr.find=ma,Fr.findIndex=$i,Fr.findKey=function(e,t){return Ft(e,ai(t,3),vn)},Fr.findLast=ga,Fr.findLastIndex=Vi,Fr.findLastKey=function(e,t){return Ft(e,ai(t,3),bn)},Fr.floor=_l,Fr.forEach=ya,Fr.forEachRight=va,Fr.forIn=function(e,t){return null==e?e:gn(e,ai(t,3),Rs)},Fr.forInRight=function(e,t){return null==e?e:yn(e,ai(t,3),Rs)},Fr.forOwn=function(e,t){return e&&vn(e,ai(t,3))},Fr.forOwnRight=function(e,t){return e&&bn(e,ai(t,3))},Fr.get=Cs,Fr.gt=ja,Fr.gte=Ua,Fr.has=function(e,t){return null!=e&&pi(e,t,Cn)},Fr.hasIn=Es,Fr.head=Hi,Fr.identity=rl,Fr.includes=function(e,t,r,n){e=Ha(e)?e:Bs(e),r=r&&!n?ps(r):0;var o=e.length;return r<0&&(r=mr(o+r,0)),as(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Bt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ps(r);return o<0&&(o=mr(n+o,0)),Bt(e,t,o)},Fr.inRange=function(e,t,r){return t=fs(t),r===o?(r=t,t=0):r=fs(r),function(e,t,r){return e>=gr(t,r)&&e=-9007199254740991&&e<=d},Fr.isSet=is,Fr.isString=as,Fr.isSymbol=ss,Fr.isTypedArray=ls,Fr.isUndefined=function(e){return e===o},Fr.isWeakMap=function(e){return es(e)&&fi(e)==M},Fr.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==An(e)},Fr.join=function(e,t){return null==e?"":Gt.call(e,t)},Fr.kebabCase=Vs,Fr.last=Zi,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=ps(r))<0?mr(n+i,0):gr(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):zt(e,Ut,i,!0)},Fr.lowerCase=Gs,Fr.lowerFirst=Hs,Fr.lt=cs,Fr.lte=us,Fr.max=function(e){return e&&e.length?pn(e,rl,Sn):o},Fr.maxBy=function(e,t){return e&&e.length?pn(e,ai(t,2),Sn):o},Fr.mean=function(e){return $t(e,rl)},Fr.meanBy=function(e,t){return $t(e,ai(t,2))},Fr.min=function(e){return e&&e.length?pn(e,rl,Dn):o},Fr.minBy=function(e,t){return e&&e.length?pn(e,ai(t,2),Dn):o},Fr.stubArray=hl,Fr.stubFalse=ml,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=xl,Fr.nth=function(e,t){return e&&e.length?jn(e,ps(t)):o},Fr.noConflict=function(){return dt._===this&&(dt._=ze),this},Fr.noop=sl,Fr.now=Ca,Fr.pad=function(e,t,r){e=ys(e);var n=(t=ps(t))?cr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return $o(pt(o),r)+e+$o(ft(o),r)},Fr.padEnd=function(e,t,r){e=ys(e);var n=(t=ps(t))?cr(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=br();return gr(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Hn(e,t)},Fr.reduce=function(e,t,r){var n=Va(e)?Ot:Ht,o=arguments.length<3;return n(e,ai(t,4),r,o,un)},Fr.reduceRight=function(e,t,r){var n=Va(e)?Lt:Ht,o=arguments.length<3;return n(e,ai(t,4),r,o,dn)},Fr.repeat=function(e,t,r){return t=(r?yi(e,t,r):t===o)?1:ps(t),Wn(ys(e),t)},Fr.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,i=(t=yo(t,e)).length;for(i||(i=1,e=o);++nd)return[];var r=p,n=gr(e,p);t=ai(t),e-=p;for(var o=qt(n,t);++r=a)return e;var l=r-cr(n);if(l<1)return n;var c=s?bo(s,0,l).join(""):e.slice(0,l);if(i===o)return c+n;if(s&&(l+=c.length-l),os(i)){if(e.slice(l).search(i)){var u,d=c;for(i.global||(i=Ce(i.source,ys(fe.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;c=c.slice(0,f===o?l:f)}}else if(e.indexOf(ao(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+n},Fr.unescape=function(e){return(e=ys(e))&&q.test(e)?e.replace(H,fr):e},Fr.uniqueId=function(e){var t=++Le;return ys(e)+t},Fr.upperCase=Xs,Fr.upperFirst=Zs,Fr.each=ya,Fr.eachRight=va,Fr.first=Hi,al(Fr,(gl={},vn(Fr,(function(e,t){Oe.call(Fr.prototype,t)||(gl[t]=e)})),gl),{chain:!1}),Fr.VERSION="4.17.21",Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),Ct(["drop","take"],(function(e,t){Ur.prototype[e]=function(r){r=r===o?1:mr(ps(r),0);var n=this.__filtered__&&!t?new Ur(this):this.clone();return n.__filtered__?n.__takeCount__=gr(r,n.__takeCount__):n.__views__.push({size:gr(r,p),type:e+(n.__dir__<0?"Right":"")}),n},Ur.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ct(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Ur.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Ct(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Ur.prototype[e]=function(){return this[r](1).value()[0]}})),Ct(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Ur.prototype[e]=function(){return this.__filtered__?new Ur(this):this[r](1)}})),Ur.prototype.compact=function(){return this.filter(rl)},Ur.prototype.find=function(e){return this.filter(e).head()},Ur.prototype.findLast=function(e){return this.reverse().find(e)},Ur.prototype.invokeMap=qn((function(e,t){return"function"==typeof e?new Ur(this):this.map((function(r){return In(r,e,t)}))})),Ur.prototype.reject=function(e){return this.filter(La(ai(e)))},Ur.prototype.slice=function(e,t){e=ps(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Ur(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=ps(t))<0?r.dropRight(-t):r.take(t-e)),r)},Ur.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ur.prototype.toArray=function(){return this.take(p)},vn(Ur.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Fr[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);i&&(Fr.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,l=t instanceof Ur,c=s[0],u=l||Va(t),d=function(e){var t=i.apply(Fr,Pt([e],s));return n&&f?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,m=l&&!p;if(!a&&u){t=m?t:new Ur(this);var g=e.apply(t,s);return g.__actions__.push({func:fa,args:[d],thisArg:o}),new jr(g,f)}return h&&m?e.apply(this,s):(g=this.thru(d),h?n?g.value()[0]:g.value():g)})})),Ct(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Va(o)?o:[],e)}return this[r]((function(r){return t.apply(Va(r)?r:[],e)}))}})),vn(Ur.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";Oe.call(Ir,n)||(Ir[n]=[]),Ir[n].push({name:t,func:r})}})),Ir[zo(o,2).name]=[{name:"wrapper",func:o}],Ur.prototype.clone=function(){var e=new Ur(this.__wrapped__);return e.__actions__=To(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=To(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=To(this.__views__),e},Ur.prototype.reverse=function(){if(this.__filtered__){var e=new Ur(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ur.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Va(e),n=t<0,o=r?e.length:0,i=function(e,t,r){for(var n=-1,o=r.length;++n=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof Br;){var n=zi(r);n.__index__=0,n.__values__=o,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ur){var t=e;return this.__actions__.length&&(t=new Ur(this)),(t=t.reverse()).__actions__.push({func:fa,args:[Qi],thisArg:o}),new jr(t,this.__chain__)}return this.thru(Qi)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Ze&&(Fr.prototype[Ze]=function(){return this}),Fr}();dt._=pr,(n=function(){return pr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},"44Ds":(e,t,r)=>{var n=r("e4Nc");function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},"vN+2":e=>{e.exports=function(){}},"k8Y/":(e,t,r)=>{var n=r("alwl"),o=r("Z0cm");e.exports=function(e,t,r,i){return null==e?[]:(o(t)||(t=null==t?[]:[t]),o(r=i?void 0:r)||(r=null==r?[]:[r]),n(e,t,r))}},JZM8:(e,t,r)=>{var n=r("FfPP"),o=r("xs/l")((function(e,t){return null==e?{}:n(e,t)}));e.exports=o},d8FT:(e,t,r)=>{var n=r("eUgh"),o=r("ut/Y"),i=r("idmN"),a=r("G6z8");e.exports=function(e,t){if(null==e)return{};var r=n(a(e),(function(e){return[e]}));return t=o(t),i(e,r,(function(e,r){return t(e,r[0])}))}},"+c4W":(e,t,r)=>{var n=r("711d"),o=r("4/ic"),i=r("9ggG"),a=r("9Nap");e.exports=function(e){return i(e)?n(a(e)):o(e)}},WjpJ:(e,t,r)=>{var n=r("HLqC")();e.exports=n},MJIl:(e,t,r)=>{var n=r("QoRX"),o=r("ut/Y"),i=r("Nh2a"),a=r("Z0cm"),s=r("mv/X");e.exports=function(e,t,r){var l=a(e)?n:i;return r&&s(e,t,r)&&(t=void 0),l(e,o(t,3))}},JnaE:(e,t,r)=>{var n=r("6ZrN");e.exports=function(e){return e&&e.length?n(e):[]}},"0ycA":e=>{e.exports=function(){return[]}},B8du:e=>{e.exports=function(){return!1}},ZCgT:(e,t,r)=>{var n=r("tLB3"),o=1/0;e.exports=function(e){return e?(e=n(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},Sxd8:(e,t,r)=>{var n=r("ZCgT");e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},tLB3:(e,t,r)=>{var n=r("jXQH"),o=r("GoyQ"),i=r("/9aa"),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||l.test(e)?c(e.slice(2),r?2:8):a.test(e)?NaN:+e}},dt0z:(e,t,r)=>{var n=r("zoYe");e.exports=function(e){return null==e?"":n(e)}},"7tbW":(e,t,r)=>{var n=r("LGYb");e.exports=function(e){return e&&e.length?n(e):[]}},qPyV:(e,t,r)=>{var n=r("ut/Y"),o=r("LGYb");e.exports=function(e,t){return e&&e.length?o(e,n(t,2)):[]}},mNz5:(e,t,r)=>{var n=r("dt0z"),o=0;e.exports=function(e){var t=++o;return n(e)+t}},"P/G1":(e,t,r)=>{var n=r("JmpY"),o=r("7GkX");e.exports=function(e){return null==e?[]:n(e,o(e))}},Wt1U:(e,t,r)=>{var n=r("LqpT"),o=r("EA7m"),i=r("3L66"),a=o((function(e,t){return i(e)?n(e,t):[]}));e.exports=a},"4ZJM":function(e){e.exports=function(){"use strict";var e,t,r;function n(n,o){if(e)if(t){var i="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk); self.onerror = null;",a={};e(a),r=o(a),"undefined"!=typeof window&&window&&window.URL&&window.URL.createObjectURL&&(r.workerUrl=window.URL.createObjectURL(new Blob([i],{type:"text/javascript"})))}else t=o;else e=o}return n(0,(function(e){var t="undefined"!=typeof self?self:{},r="2.15.0";let n;const o={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(null==n){const e=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{n=null!="MISSING_ENV_VAR".API_URL_REGEX?new RegExp("MISSING_ENV_VAR".API_URL_REGEX):e}catch(t){n=e}}return n},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!o.API_URL)return null;try{const e=new URL(o.API_URL);return"api.mapbox.cn"===e.hostname?"https://events.mapbox.cn/events/v2":"api.mapbox.com"===e.hostname?"https://events.mapbox.com/events/v2":null}catch(e){return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},i={supported:!1,testSupport:function(e){!l&&s&&(c?u(e):a=e)}};let a,s,l=!1,c=!1;function u(e){const t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,s),e.isContextLost())return;i.supported=!0}catch(e){}e.deleteTexture(t),l=!0}t.document&&(s=t.document.createElement("img"),s.onload=function(){a&&u(a),a=null,c=!0},s.onerror=function(){l=!0,a=null},s.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const d="01";function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p=h;function h(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=n}h.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,n=0;n<8;n++){var o=this.sampleCurveX(r)-e;if(Math.abs(o)o?a=r:s=r,r=.5*(s-a)+a;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}};var m=f(p),g=y;function y(e,t){this.x=e,this.y=t}y.prototype={clone:function(){return new y(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},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(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=n,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),o=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-n*(this.y-t.y),this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},y.convert=function(e){return e instanceof y?e:Array.isArray(e)?new y(e[0],e[1]):e};var v=f(g);const b=Math.PI/180,_=180/Math.PI;function x(e){return e*b}function w(e){return e*_}const A=[[0,0],[1,0],[1,1],[0,1]];function S(e){if(e<=0)return 0;if(e>=1)return 1;const t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function C(e,t,r,n){const o=new m(e,t,r,n);return function(e){return o.solve(e)}}const E=C(.25,.1,.25,1);function T(e,t,r){return Math.min(r,Math.max(t,e))}function I(e,t,r){return(r=T((r-e)/(t-e),0,1))*r*(3-2*r)}function k(e,t,r){const n=r-t,o=((e-t)%n+n)%n+t;return o===t?r:o}function M(e,t,r){if(!e.length)return r(null,[]);let n=e.length;const o=new Array(e.length);let i=null;e.forEach(((e,a)=>{t(e,((e,t)=>{e&&(i=e),o[a]=t,0==--n&&r(i,o)}))}))}function R(e){const t=[];for(const r in e)t.push(e[r]);return t}function P(e,...t){for(const r of t)for(const t in r)e[t]=r[t];return e}let O=1;function L(){return O++}function D(){return function e(t){return t?(t^Math.random()*(16>>t/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function N(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function F(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function z(e,t){e.forEach((e=>{t[e]&&(t[e]=t[e].bind(t))}))}function B(e,t){return-1!==e.indexOf(t,e.length-t.length)}function j(e,t,r){const n={};for(const o in e)n[o]=t.call(r||this,e[o],o,e);return n}function U(e,t,r){const n={};for(const o in e)t.call(r||this,e[o],o,e)&&(n[o]=e[o]);return n}function $(e){return Array.isArray(e)?e.map($):"object"==typeof e&&e?j(e,$):e}const V={};function G(e){V[e]||("undefined"!=typeof console&&console.warn(e),V[e]=!0)}function H(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function W(e){let t=0;for(let r,n,o=0,i=e.length,a=i-1;o@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,r,n,o)=>{const i=n||o;return t[r]=!i||i.toLowerCase(),""})),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}let Z=null;function Y(e){if(null==Z){const t=e.navigator?e.navigator.userAgent:null;Z=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return Z}function K(e){try{const r=t[e];return r.setItem("_mapbox_test_",1),r.removeItem("_mapbox_test_"),!0}catch(e){return!1}}function J(e,t){return[e[4*t],e[4*t+1],e[4*t+2],e[4*t+3]]}const Q="mapbox-tiles";let ee,te,re=500,ne=50;function oe(){try{return t.caches}catch(e){}}function ie(){oe()&&!ee&&(ee=t.caches.open(Q))}function ae(e){const t=e.indexOf("?");if(t<0)return e;const r=function(e){const t=e.indexOf("?");return t>0?e.slice(t+1).split("&"):[]}(e),n=r.filter((e=>{const t=e.split("=");return"language"===t[0]||"worldview"===t[0]}));return n.length?`${e.slice(0,t)}?${n.join("&")}`:e.slice(0,t)}let se=1/0;const le={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(le);class ce extends Error{constructor(e,t,r){401===t&&_e(r)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=t,this.url=r}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const ue=q()?()=>self.worker&&self.worker.referrer:()=>("blob:"===t.location.protocol?t.parent:t).location.href,de=function(e,r){if(!(/^file:/.test(n=e.url)||/^file:/.test(ue())&&!/^\w+:/.test(n))){if(t.fetch&&t.Request&&t.AbortController&&t.Request.prototype.hasOwnProperty("signal"))return function(e,r){const n=new t.AbortController,o=new t.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:ue(),referrerPolicy:e.referrerPolicy,signal:n.signal});let i=!1,a=!1;const s=(l=o.url).indexOf("sku=")>0&&_e(l);var l;"json"===e.type&&o.headers.set("Accept","application/json");const c=(n,i,l)=>{if(a)return;if(n&&"SecurityError"!==n.message&&G(n.toString()),i&&l)return u(i);const c=Date.now();t.fetch(o).then((t=>{if(t.ok){const e=s?t.clone():null;return u(t,e,c)}return r(new ce(t.statusText,t.status,e.url))})).catch((t=>{"AbortError"!==t.name&&r(new Error(`${t.message} ${e.url}`))}))},u=(n,s,l)=>{("arrayBuffer"===e.type?n.arrayBuffer():"json"===e.type?n.json():n.text()).then((e=>{a||(s&&l&&function(e,r,n){if(ie(),!ee)return;const o={status:r.status,statusText:r.statusText,headers:new t.Headers};r.headers.forEach(((e,t)=>o.headers.set(t,e)));const i=X(r.headers.get("Cache-Control")||"");if(i["no-store"])return;i["max-age"]&&o.headers.set("Expires",new Date(n+1e3*i["max-age"]).toUTCString());const a=o.headers.get("Expires");a&&(new Date(a).getTime()-n<42e4||function(e,t){if(void 0===te)try{new Response(new ReadableStream),te=!0}catch(e){te=!1}te?t(e.body):e.blob().then(t)}(r,(r=>{const n=new t.Response(r,o);ie(),ee&&ee.then((t=>t.put(ae(e.url),n))).catch((e=>G(e.message)))})))}(o,s,l),i=!0,r(null,e,n.headers.get("Cache-Control"),n.headers.get("Expires")))})).catch((e=>{a||r(new Error(e.message))}))};return s?function(e,t){if(ie(),!ee)return t(null);const r=ae(e.url);ee.then((e=>{e.match(r).then((n=>{const o=function(e){if(!e)return!1;const t=new Date(e.headers.get("Expires")||0),r=X(e.headers.get("Cache-Control")||"");return t>Date.now()&&!r["no-cache"]}(n);e.delete(r),o&&e.put(r,n.clone()),t(null,n,o)})).catch(t)})).catch(t)}(o,c):c(null,null),{cancel:()=>{a=!0,i||n.abort()}}}(e,r);if(q()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,r,void 0,!0)}var n;return function(e,r){const n=new t.XMLHttpRequest;n.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(n.responseType="arraybuffer");for(const t in e.headers)n.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===e.credentials,n.onerror=()=>{r(new Error(n.statusText))},n.onload=()=>{if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let t=n.response;if("json"===e.type)try{t=JSON.parse(n.response)}catch(e){return r(e)}r(null,t,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else r(new ce(n.statusText,n.status,e.url))},n.send(e.body),{cancel:()=>n.abort()}}(e,r)},fe=function(e,t){return de(P(e,{type:"arrayBuffer"}),t)};function pe(e){const r=t.document.createElement("a");return r.href=e,r.protocol===t.document.location.protocol&&r.host===t.document.location.host}const he="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let me,ge;me=[],ge=0;const ye=function(e,r){if(i.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),ge>=o.MAX_PARALLEL_IMAGE_REQUESTS){const t={requestParameters:e,callback:r,cancelled:!1,cancel(){this.cancelled=!0}};return me.push(t),t}ge++;let n=!1;const a=()=>{if(!n)for(n=!0,ge--;me.length&&ge{a(),e?r(e):n&&(t.createImageBitmap?function(e,r){const n=new t.Blob([new Uint8Array(e)],{type:"image/png"});t.createImageBitmap(n).then((e=>{r(null,e)})).catch((e=>{r(new Error(`Could not load image because of ${e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))}))}(n,((e,t)=>r(e,t,o,i))):function(e,r){const n=new t.Image,o=t.URL;n.onload=()=>{r(null,n),o.revokeObjectURL(n.src),n.onload=null,t.requestAnimationFrame((()=>{n.src=he}))},n.onerror=()=>r(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 i=new t.Blob([new Uint8Array(e)],{type:"image/png"});n.src=e.byteLength?o.createObjectURL(i):he}(n,((e,t)=>r(e,t,o,i))))}));return{cancel:()=>{s.cancel(),a()}}},ve="NO_ACCESS_TOKEN";function be(e){return 0===e.indexOf("mapbox:")}function _e(e){return o.API_URL_REGEX.test(e)}function xe(e){return o.API_CDN_URL_REGEX.test(e)}function we(e){return o.API_STYLE_REGEX.test(e)&&!Ae(e)}function Ae(e){return o.API_SPRITE_REGEX.test(e)}const Se=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Ce(e){const t=e.match(Se);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function Ee(e){const t=e.params.length?`?${e.params.join("&")}`:"";return`${e.protocol}://${e.authority}${e.path}${t}`}const Te="mapbox.eventData";function Ie(e){if(!e)return null;const r=e.split(".");if(!r||3!==r.length)return null;try{return JSON.parse(decodeURIComponent(t.atob(r[1]).split("").map((e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join("")))}catch(e){return null}}class ke{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const r=Ie(o.ACCESS_TOKEN);let n="";return n=r&&r.u?t.btoa(encodeURIComponent(r.u).replace(/%([0-9A-F]{2})/g,((e,t)=>String.fromCharCode(Number("0x"+t))))):o.ACCESS_TOKEN||"",e?`${Te}.${e}:${n}`:`${Te}:${n}`}fetchEventData(){const e=K("localStorage"),r=this.getStorageKey(),n=this.getStorageKey("uuid");if(e)try{const e=t.localStorage.getItem(r);e&&(this.eventData=JSON.parse(e));const o=t.localStorage.getItem(n);o&&(this.anonId=o)}catch(e){G("Unable to read from LocalStorage")}}saveEventData(){const e=K("localStorage"),r=this.getStorageKey(),n=this.getStorageKey("uuid");if(e)try{t.localStorage.setItem(n,this.anonId),Object.keys(this.eventData).length>=1&&t.localStorage.setItem(r,JSON.stringify(this.eventData))}catch(e){G("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,t,r,n){if(!o.EVENTS_URL)return;const i=Ce(o.EVENTS_URL);i.params.push(`access_token=${n||o.ACCESS_TOKEN||""}`);const a={event:this.type,created:new Date(e).toISOString()},s=t?P(a,t):a,l={url:Ee(i),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=function(e,t){return de(P(e,{method:"POST"}),t)}(l,(e=>{this.pendingRequest=null,r(e),this.saveEventData(),this.processRequests(n)}))}queueRequest(e,t){this.queue.push(e),this.processRequests(t)}}const Me=new class extends ke{constructor(e){super("appUserTurnstile"),this._customAccessToken=e}postTurnstileEvent(e,t){o.EVENTS_URL&&o.ACCESS_TOKEN&&Array.isArray(e)&&e.some((e=>be(e)||_e(e)))&&this.queueRequest(Date.now(),t)}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const t=Ie(o.ACCESS_TOKEN),n=t?t.u:o.ACCESS_TOKEN;let i=n!==this.eventData.tokenU;F(this.anonId)||(this.anonId=D(),i=!0);const a=this.queue.shift();if(this.eventData.lastSuccess){const e=new Date(this.eventData.lastSuccess),t=new Date(a),r=(a-this.eventData.lastSuccess)/864e5;i=i||r>=1||r<-1||e.getDate()!==t.getDate()}else i=!0;i?this.postEvent(a,{sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:d,"enabled.telemetry":!1,userId:this.anonId},(e=>{e||(this.eventData.lastSuccess=a,this.eventData.tokenU=n)}),e):this.processRequests()}},Re=Me.postTurnstileEvent.bind(Me),Pe=new class extends ke{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(e,t,r,n){this.skuToken=t,this.errorCb=n,o.EVENTS_URL&&(r||o.ACCESS_TOKEN?this.queueRequest({id:e,timestamp:Date.now()},r):this.errorCb(new Error(ve)))}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;const{id:t,timestamp:n}=this.queue.shift();t&&this.success[t]||(this.anonId||this.fetchEventData(),F(this.anonId)||(this.anonId=D()),this.postEvent(n,{sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:d,skuToken:this.skuToken,userId:this.anonId},(e=>{e?this.errorCb(e):t&&(this.success[t]=!0)}),e))}},Oe=Pe.postMapLoadEvent.bind(Pe),Le=new class extends ke{constructor(){super("gljs.performance")}postPerformanceEvent(e,t){o.EVENTS_URL&&(e||o.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:t},e)}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;const{timestamp:n,performanceData:o}=this.queue.shift(),i=function(e){const n=t.performance.getEntriesByType("resource"),o=t.performance.getEntriesByType("mark"),i=function(e){const t={};if(e)for(const r in e)if("other"!==r)for(const n of e[r]){const e=`${r}ResolveRangeMin`,o=`${r}ResolveRangeMax`,i=`${r}RequestCount`,a=`${r}RequestCachedCount`;t[e]=Math.min(t[e]||1/0,n.startTime),t[o]=Math.max(t[o]||-1/0,n.responseEnd);const s=e=>{void 0===t[e]&&(t[e]=0),++t[e]};void 0!==n.transferSize&&0===n.transferSize&&s(a),s(i)}return t}(function(e,t){const r={};if(e)for(const n of e){const e=t(n);void 0===r[e]&&(r[e]=[]),r[e].push(n)}return r}(n,Ue)),a=t.devicePixelRatio,s=t.navigator.connection||t.navigator.mozConnection||t.navigator.webkitConnection,l={counters:[],metadata:[],attributes:[]},c=(e,t,r)=>{null!=r&&e.push({name:t,value:r.toString()})};for(const e in i)c(l.counters,e,i[e]);if(e.interactionRange[0]!==1/0&&e.interactionRange[1]!==-1/0&&(c(l.counters,"interactionRangeMin",e.interactionRange[0]),c(l.counters,"interactionRangeMax",e.interactionRange[1])),o)for(const e of Object.keys(Be)){const t=Be[e],r=o.find((e=>e.name===t));r&&c(l.counters,t,r.startTime)}return c(l.counters,"visibilityHidden",e.visibilityHidden),c(l.attributes,"style",function(e){if(e)for(const t of e){const e=t.name.split("?")[0];if(we(e)){const t=e.split("/").slice(-2);if(2===t.length)return`mapbox://styles/${t[0]}/${t[1]}`}}}(n)),c(l.attributes,"terrainEnabled",e.terrainEnabled?"true":"false"),c(l.attributes,"fogEnabled",e.fogEnabled?"true":"false"),c(l.attributes,"projection",e.projection),c(l.attributes,"zoom",e.zoom),c(l.metadata,"devicePixelRatio",a),c(l.metadata,"connectionEffectiveType",s?s.effectiveType:void 0),c(l.metadata,"navigatorUserAgent",t.navigator.userAgent),c(l.metadata,"screenWidth",t.screen.width),c(l.metadata,"screenHeight",t.screen.height),c(l.metadata,"windowWidth",t.innerWidth),c(l.metadata,"windowHeight",t.innerHeight),c(l.metadata,"mapWidth",e.width/a),c(l.metadata,"mapHeight",e.height/a),c(l.metadata,"webglRenderer",e.renderer),c(l.metadata,"webglVendor",e.vendor),c(l.metadata,"sdkVersion",r),c(l.metadata,"sdkIdentifier","mapbox-gl-js"),l}(o);for(const e of i.metadata);for(const e of i.counters);for(const e of i.attributes);this.postEvent(n,i,(()=>{}),e)}},De=Le.postPerformanceEvent.bind(Le),Ne=new class extends ke{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(e,t,r,n){if(!o.API_URL||!o.SESSION_PATH)return;const i=Ce(o.API_URL+o.SESSION_PATH);i.params.push(`sku=${t||""}`),i.params.push(`access_token=${n||o.ACCESS_TOKEN||""}`);const a={url:Ee(i),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(e,t){return de(P(e,{method:"GET"}),t)}(a,(e=>{this.pendingRequest=null,r(e),this.saveEventData(),this.processRequests(n)}))}getSessionAPI(e,t,r,n){this.skuToken=t,this.errorCb=n,o.SESSION_PATH&&o.API_URL&&(r||o.ACCESS_TOKEN?this.queueRequest({id:e,timestamp:Date.now()},r):this.errorCb(new Error(ve)))}processRequests(e){if(this.pendingRequest||0===this.queue.length)return;const{id:t,timestamp:r}=this.queue.shift();t&&this.success[t]||this.getSession(r,this.skuToken,(e=>{e?this.errorCb(e):t&&(this.success[t]=!0)}),e)}},Fe=Ne.getSessionAPI.bind(Ne),ze=new Set,Be={create:"create",load:"load",fullLoad:"fullLoad"},je={mark(e){t.performance.mark(e)},measure(e,r,n){t.performance.measure(e,r,n)}};function Ue(e){const t=e.name.split("?")[0];return xe(t)&&t.includes("mapbox-gl.js")?"javascript":xe(t)&&t.includes("mapbox-gl.css")?"css":function(e){return o.API_FONTS_REGEX.test(e)}(t)?"fontRange":Ae(t)?"sprite":we(t)?"style":function(e){return o.API_TILEJSON_REGEX.test(e)}(t)?"tilejson":"other"}const $e=t.performance;function Ve(e){const t=e?e.url.toString():void 0;return $e.getEntriesByName(t)}let Ge,He,We,qe;const Xe={now:()=>void 0!==We?We:t.performance.now(),setNow(e){We=e},restoreNow(){We=void 0},frame(e){const r=t.requestAnimationFrame(e);return{cancel:()=>t.cancelAnimationFrame(r)}},getImageData(e,r=0){const{width:n,height:o}=e;qe||(qe=t.document.createElement("canvas"));const i=qe.getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("failed to create canvas 2d context");return(n>qe.width||o>qe.height)&&(qe.width=n,qe.height=o),i.clearRect(-r,-r,n+2*r,o+2*r),i.drawImage(e,0,0,n,o),i.getImageData(-r,-r,n+2*r,o+2*r)},resolveURL:e=>(Ge||(Ge=t.document.createElement("a")),Ge.href=e,Ge.href),get devicePixelRatio(){return t.devicePixelRatio},get prefersReducedMotion(){return!!t.matchMedia&&(null==He&&(He=t.matchMedia("(prefers-reduced-motion: reduce)")),He.matches)}};function Ze(e,t,r){r[e]&&-1!==r[e].indexOf(t)||(r[e]=r[e]||[],r[e].push(t))}function Ye(e,t,r){if(r&&r[e]){const n=r[e].indexOf(t);-1!==n&&r[e].splice(n,1)}}class Ke{constructor(e,t={}){P(this,t),this.type=e}}class Je extends Ke{constructor(e,t={}){super("error",P({error:e},t))}}class Qe{on(e,t){return this._listeners=this._listeners||{},Ze(e,t,this._listeners),this}off(e,t){return Ye(e,t,this._listeners),Ye(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners=this._oneTimeListeners||{},Ze(e,t,this._oneTimeListeners),this):new Promise((t=>this.once(e,t)))}fire(e,t){"string"==typeof e&&(e=new Ke(e,t||{}));const r=e.type;if(this.listens(r)){e.target=this;const t=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(const r of t)r.call(this,e);const n=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(const t of n)Ye(r,t,this._oneTimeListeners),t.call(this,e);const o=this._eventedParent;o&&(P(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),o.fire(e))}else e instanceof Je&&console.error(e.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var et=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"light":{"type":"light"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":{},"mapbox":{}},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{},"line":{},"line-center":{}},"default":"point","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{},"width":{},"height":{},"both":{}},"default":"none","requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","requires":["text-field",{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":{},"exponential":{},"interval":{},"categorical":{}},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{},"lab":{},"hcl":{}},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["fill-extrusion-edge-radius"]},"fill-extrusion-rounded-roof":{"type":"boolean","default":true,"requires":["fill-extrusion-edge-radius"],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":false,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');function tt(e,...t){for(const r of t)for(const t in r)e[t]=r[t];return e}function rt(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function nt(e){if(Array.isArray(e))return e.map(nt);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){const t={};for(const r in e)t[r]=nt(e[r]);return t}return rt(e)}class ot extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}var it=ot;class at{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[e,r]of t)this.bindings[e]=r}concat(e){return new at(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}var st=at;const lt={kind:"null"},ct={kind:"number"},ut={kind:"string"},dt={kind:"boolean"},ft={kind:"color"},pt={kind:"object"},ht={kind:"value"},mt={kind:"collator"},gt={kind:"formatted"},yt={kind:"resolvedImage"};function vt(e,t){return{kind:"array",itemType:e,N:t}}function bt(e){if("array"===e.kind){const t=bt(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}const _t=[lt,ct,ut,dt,ft,gt,pt,vt(ht),yt];function xt(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!xt(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(const e of _t)if(!xt(e,t))return null}return`Expected ${bt(e)} but found ${bt(t)} instead.`}function wt(e,t){return t.some((t=>t.kind===e.kind))}function At(e,t){return t.some((t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e))}var St,Ct={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Et(e){return(e=Math.round(e))<0?0:e>255?255:e}function Tt(e){return Et("%"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function It(e){return(t="%"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))<0?0:t>1?1:t;var t}function kt(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}try{St={}.parseCSSColor=function(e){var t,r=e.replace(/ /g,"").toLowerCase();if(r in Ct)return Ct[r].slice();if("#"===r[0])return 4===r.length?(t=parseInt(r.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===r.length&&(t=parseInt(r.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=r.indexOf("("),o=r.indexOf(")");if(-1!==n&&o+1===r.length){var i=r.substr(0,n),a=r.substr(n+1,o-(n+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return null;s=It(a.pop());case"rgb":return 3!==a.length?null:[Tt(a[0]),Tt(a[1]),Tt(a[2]),s];case"hsla":if(4!==a.length)return null;s=It(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,c=It(a[1]),u=It(a[2]),d=u<=.5?u*(c+1):u+c-u*c,f=2*u-d;return[Et(255*kt(f,d,l+1/3)),Et(255*kt(f,d,l)),Et(255*kt(f,d,l-1/3)),s];default:return null}}return null}}catch(e){}class Mt{constructor(e,t,r,n=1){this.r=e,this.g=t,this.b=r,this.a=n}static parse(e){if(!e)return;if(e instanceof Mt)return e;if("string"!=typeof e)return;const t=St(e);return t?new Mt(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,r,n]=this.toArray();return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(r)},${n})`}toArray(){const{r:e,g:t,b:r,a:n}=this;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*r/n,n]}toArray01(){const{r:e,g:t,b:r,a:n}=this;return 0===n?[0,0,0,0]:[e/n,t/n,r/n,n]}toArray01PremultipliedAlpha(){const{r:e,g:t,b:r,a:n}=this;return[e,t,r,n]}}Mt.black=new Mt(0,0,0,1),Mt.white=new Mt(1,1,1,1),Mt.transparent=new Mt(0,0,0,0),Mt.red=new Mt(1,0,0,1),Mt.blue=new Mt(0,0,1,1);var Rt=Mt;class Pt{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ot{constructor(e,t,r,n,o){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=o}}class Lt{constructor(e){this.sections=e}static fromString(e){return new Lt([new Ot(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((e=>0!==e.text.length||e.image&&0!==e.image.name.length))}static factory(e){return e instanceof Lt?e:Lt.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map((e=>e.text)).join("")}serialize(){const e=["format"];for(const t of this.sections){if(t.image){e.push(["image",t.image.name]);continue}e.push(t.text);const r={};t.fontStack&&(r["text-font"]=["literal",t.fontStack.split(",")]),t.scale&&(r["font-scale"]=t.scale),t.textColor&&(r["text-color"]=["rgba"].concat(t.textColor.toArray())),e.push(r)}return e}}class Dt{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new Dt({name:e,available:!1}):null}serialize(){return["image",this.name]}}function Nt(e,t,r,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[e,t,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ft(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof Rt)return!0;if(e instanceof Pt)return!0;if(e instanceof Lt)return!0;if(e instanceof Dt)return!0;if(Array.isArray(e)){for(const t of e)if(!Ft(t))return!1;return!0}if("object"==typeof e){for(const t in e)if(!Ft(e[t]))return!1;return!0}return!1}function zt(e){if(null===e)return lt;if("string"==typeof e)return ut;if("boolean"==typeof e)return dt;if("number"==typeof e)return ct;if(e instanceof Rt)return ft;if(e instanceof Pt)return mt;if(e instanceof Lt)return gt;if(e instanceof Dt)return yt;if(Array.isArray(e)){const t=e.length;let r;for(const t of e){const e=zt(t);if(r){if(r===e)continue;r=ht;break}r=e}return vt(r||ht,t)}return pt}function Bt(e){const t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof Rt||e instanceof Lt||e instanceof Dt?e.toString():JSON.stringify(e)}class jt{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!Ft(e[1]))return t.error("invalid value");const r=e[1];let n=zt(r);const o=t.expectedType;return"array"!==n.kind||0!==n.N||!o||"array"!==o.kind||"number"==typeof o.N&&0!==o.N||(n=o),new jt(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Rt?["rgba"].concat(this.value.toArray()):this.value instanceof Lt?this.value.serialize():this.value}}var Ut=jt,$t=class{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}};const Vt={string:ut,number:ct,boolean:dt,object:pt};class Gt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,n=1;const o=e[0];if("array"===o){let o,i;if(e.length>2){const r=e[1];if("string"!=typeof r||!(r in Vt)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Vt[r],n++}else o=ht;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);i=e[2],n++}r=vt(o,i)}else r=Vt[o];const i=[];for(;ne.outputDefined()))}serialize(){const e=this.type,t=[e.kind];if("array"===e.kind){const r=e.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){t.push(r.kind);const n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map((e=>e.serialize())))}}var Ht=Gt;class Wt{constructor(e){this.type=gt,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");const n=[];let o=!1;for(let r=1;r<=e.length-1;++r){const i=e[r];if(o&&"object"==typeof i&&!Array.isArray(i)){o=!1;let e=null;if(i["font-scale"]&&(e=t.parse(i["font-scale"],1,ct),!e))return null;let r=null;if(i["text-font"]&&(r=t.parse(i["text-font"],1,vt(ut)),!r))return null;let a=null;if(i["text-color"]&&(a=t.parse(i["text-color"],1,ft),!a))return null;const s=n[n.length-1];s.scale=e,s.font=r,s.textColor=a}else{const i=t.parse(e[r],1,ht);if(!i)return null;const a=i.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,n.push({content:i,scale:null,font:null,textColor:null})}}return new Wt(n)}evaluate(e){return new Lt(this.sections.map((t=>{const r=t.content.evaluate(e);return zt(r)===yt?new Ot("",r,null,null,null):new Ot(Bt(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const t of this.sections){e.push(t.content.serialize());const r={};t.scale&&(r["font-scale"]=t.scale.serialize()),t.font&&(r["text-font"]=t.font.serialize()),t.textColor&&(r["text-color"]=t.textColor.serialize()),e.push(r)}return e}}class qt{constructor(e){this.type=yt,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");const r=t.parse(e[1],1,ut);return r?new qt(r):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),r=Dt.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const Xt={"to-boolean":dt,"to-color":ft,"to-number":ct,"to-string":ut};class Zt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");const n=Xt[r],o=[];for(let r=1;r4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:Nt(t[0],t[1],t[2],t[3]),!r))return new Rt(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new $t(r||`Could not parse color from value '${"string"==typeof t?t:String(JSON.stringify(t))}'`)}if("number"===this.type.kind){let t=null;for(const r of this.args){if(t=r.evaluate(e),null===t)return 0;const n=Number(t);if(!isNaN(n))return n}throw new $t(`Could not convert ${JSON.stringify(t)} to number.`)}return"formatted"===this.type.kind?Lt.fromString(Bt(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?Dt.fromString(Bt(this.args[0].evaluate(e))):Bt(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new Wt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new qt(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild((t=>{e.push(t.serialize())})),e}}var Yt=Zt;const Kt=["Unknown","Point","LineString","Polygon"];var Jt=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Kt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,t=this.featureDistanceData.scale,{x:r,y:n}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(r*t-e[0])+this.featureDistanceData.bearing[1]*(n*t-e[1])}return 0}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Rt.parse(e)),t}};class Qt{constructor(e,t,r,n){this.name=e,this.type=t,this._evaluate=r,this.args=n}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((e=>e.serialize())))}static parse(e,t){const r=e[0],n=Qt.definitions[r];if(!n)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(n)?n[0]:n.type,i=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,a=i.filter((([t])=>!Array.isArray(t)||t.length===e.length-1));let s=null;for(const[n,i]of a){s=new Er(t.registry,t.path,null,t.scope);const a=[];let l=!1;for(let t=1;t{return t=e,Array.isArray(t)?`(${t.map(bt).join(", ")})`:`(${bt(t.type)}...)`;var t})).join(" | "),n=[];for(let r=1;r=t[2]||e[1]<=t[1]||e[3]>=t[3])}function ir(e,t){const r=(180+e[0])/360,n=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,o=Math.pow(2,t.z);return[Math.round(r*o*rr),Math.round(n*o*rr)]}function ar(e,t,r){const n=e[0]-t[0],o=e[1]-t[1],i=e[0]-r[0],a=e[1]-r[1];return n*a-i*o==0&&n*i<=0&&o*a<=0}function sr(e,t){let r=!1;for(let a=0,s=t.length;a(n=e)[1]!=(i=s[t+1])[1]>n[1]&&n[0]<(i[0]-o[0])*(n[1]-o[1])/(i[1]-o[1])+o[0]&&(r=!r)}}var n,o,i;return r}function lr(e,t){for(let r=0;r0&&s<0||a<0&&s>0}function ur(e,t,r){for(const c of r)for(let r=0;rr[2]){const t=.5*n;let o=e[0]-r[0]>t?-n:r[0]-e[0]>t?n:0;0===o&&(o=e[0]-r[2]>t?-n:r[2]-e[0]>t?n:0),e[0]+=o}nr(t,e)}function gr(e,t,r,n){const o=Math.pow(2,n.z)*rr,i=[n.x*rr,n.y*rr],a=[];if(!e)return a;for(const n of e)for(const e of n){const n=[e.x+i[0],e.y+i[1]];mr(n,t,r,o),a.push(n)}return a}function yr(e,t,r,n){const o=Math.pow(2,n.z)*rr,i=[n.x*rr,n.y*rr],a=[];if(!e)return a;for(const r of e){const e=[];for(const n of r){const r=[n.x+i[0],n.y+i[1]];nr(t,r),e.push(r)}a.push(e)}if(t[2]-t[0]<=o/2){(s=t)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const e of a)for(const n of e)mr(n,t,r,o)}var s;return a}class vr{constructor(e,t){this.type=dt,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(Ft(e[1])){const t=e[1];if("FeatureCollection"===t.type)for(let e=0;e{t&&!_r(e)&&(t=!1)})),t}function xr(e){if(e instanceof er&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild((e=>{t&&!xr(e)&&(t=!1)})),t}function wr(e,t){if(e instanceof er&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild((e=>{r&&!wr(e,t)&&(r=!1)})),r}class Ar{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");const r=e[1];return t.scope.has(r)?new Ar(r,t.scope.get(r)):t.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var Sr=Ar;class Cr{constructor(e,t=[],r,n=new st,o=[]){this.registry=e,this.path=t,this.key=t.map((e=>`[${e}]`)).join(""),this.scope=n,this.errors=o,this.expectedType=r}parse(e,t,r,n,o={}){return t?this.concat(t,r,n)._parse(e,o):this._parse(e,o)}_parse(e,t){function r(e,t,r){return"assert"===r?new Ht(t,[e]):"coerce"===r?new Yt(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const n=e[0];if("string"!=typeof n)return this.error(`Expression name must be a string, but found ${typeof n} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[n];if(o){let n=o.parse(e,this);if(!n)return null;if(this.expectedType){const e=this.expectedType,o=n.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==o.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==o.kind&&"string"!==o.kind){if(this.checkSubtype(e,o))return null}else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"assert")}if(!(n instanceof Ut)&&"resolvedImage"!==n.type.kind&&Tr(n)){const t=new Jt;try{n=new Ut(n.type,n.evaluate(t))}catch(e){return this.error(e.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){const n="number"==typeof e?this.path.concat(e):this.path,o=r?this.scope.concat(r):this.scope;return new Cr(this.registry,n,t||null,o,this.errors)}error(e,...t){const r=`${this.key}${t.map((e=>`[${e}]`)).join("")}`;this.errors.push(new it(r,e))}checkSubtype(e,t){const r=xt(e,t);return r&&this.error(r),r}}var Er=Cr;function Tr(e){if(e instanceof Sr)return Tr(e.boundExpression);if(e instanceof er&&"error"===e.name)return!1;if(e instanceof tr)return!1;if(e instanceof br)return!1;const t=e instanceof Yt||e instanceof Ht;let r=!0;return e.eachChild((e=>{r=t?r&&Tr(e):r&&e instanceof Ut})),!!r&&_r(e)&&wr(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Ir(e,t){const r=e.length-1;let n,o,i=0,a=r,s=0;for(;i<=a;)if(s=Math.floor((i+a)/2),n=e[s],o=e[s+1],n<=t){if(s===r||tt))throw new $t("Input is not a number.");a=s-1}return 0}class kr{constructor(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[e,t]of r)this.labels.push(e),this.outputs.push(t)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");const r=t.parse(e[1],1,ct);if(!r)return null;const n=[];let o=null;t.expectedType&&"value"!==t.expectedType.kind&&(o=t.expectedType);for(let r=1;r=i)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const c=t.parse(a,l,o);if(!c)return null;o=o||c.type,n.push([i,c])}return new kr(o,r,n)}evaluate(e){const t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);const n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);const o=t.length;return n>=t[o-1]?r[o-1].evaluate(e):r[Ir(t,n)].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}serialize(){const e=["step",this.input.serialize()];for(let t=0;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}var Mr=kr;function Rr(e,t,r){return e*(1-r)+t*r}var Pr=Object.freeze({__proto__:null,array:function(e,t,r){return e.map(((e,n)=>Rr(e,t[n],r)))},color:function(e,t,r){return new Rt(Rr(e.r,t.r,r),Rr(e.g,t.g,r),Rr(e.b,t.b,r),Rr(e.a,t.a,r))},number:Rr});const Or=.95047,Lr=1.08883,Dr=4/29,Nr=6/29,Fr=3*Nr*Nr,zr=Nr*Nr*Nr,Br=Math.PI/180,jr=180/Math.PI;function Ur(e){return e>zr?Math.pow(e,1/3):e/Fr+Dr}function $r(e){return e>Nr?e*e*e:Fr*(e-Dr)}function Vr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Gr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Hr(e){const t=Gr(e.r),r=Gr(e.g),n=Gr(e.b),o=Ur((.4124564*t+.3575761*r+.1804375*n)/Or),i=Ur((.2126729*t+.7151522*r+.072175*n)/1);return{l:116*i-16,a:500*(o-i),b:200*(i-Ur((.0193339*t+.119192*r+.9503041*n)/Lr)),alpha:e.a}}function Wr(e){let t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=1*$r(t),r=Or*$r(r),n=Lr*$r(n),new Rt(Vr(3.2404542*r-1.5371385*t-.4985314*n),Vr(-.969266*r+1.8760108*t+.041556*n),Vr(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function qr(e,t,r){const n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}const Xr={forward:Hr,reverse:Wr,interpolate:function(e,t,r){return{l:Rr(e.l,t.l,r),a:Rr(e.a,t.a,r),b:Rr(e.b,t.b,r),alpha:Rr(e.alpha,t.alpha,r)}}},Zr={forward:function(e){const{l:t,a:r,b:n}=Hr(e),o=Math.atan2(n,r)*jr;return{h:o<0?o+360:o,c:Math.sqrt(r*r+n*n),l:t,alpha:e.a}},reverse:function(e){const t=e.h*Br,r=e.c;return Wr({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:qr(e.h,t.h,r),c:Rr(e.c,t.c,r),l:Rr(e.l,t.l,r),alpha:Rr(e.alpha,t.alpha,r)}}};var Yr=Object.freeze({__proto__:null,hcl:Zr,lab:Xr});class Kr{constructor(e,t,r,n,o){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(const[e,t]of o)this.labels.push(e),this.outputs.push(t)}static interpolationFactor(e,t,r,n){let o=0;if("exponential"===e.name)o=Jr(t,e.base,r,n);else if("linear"===e.name)o=Jr(t,1,r,n);else if("cubic-bezier"===e.name){const i=e.controlPoints;o=new m(i[0],i[1],i[2],i[3]).solve(Jr(t,1,r,n))}return o}static parse(e,t){let[r,n,o,...i]=e;if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const e=n[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:e}}else{if("cubic-bezier"!==n[0])return t.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const e=n.slice(1);if(4!==e.length||e.some((e=>"number"!=typeof e||e<0||e>1)))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,ct),!o)return null;const a=[];let s=null;"interpolate-hcl"===r||"interpolate-lab"===r?s=ft:t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType);for(let e=0;e=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',o);const c=t.parse(n,l,s);if(!c)return null;s=s||c.type,a.push([r,c])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new Kr(s,r,n,o,a):t.error(`Type ${bt(s)} is not interpolatable.`)}evaluate(e){const t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);const n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);const o=t.length;if(n>=t[o-1])return r[o-1].evaluate(e);const i=Ir(t,n),a=Kr.interpolationFactor(this.interpolation,n,t[i],t[i+1]),s=r[i].evaluate(e),l=r[i+1].evaluate(e);return"interpolate"===this.operator?Pr[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?Zr.reverse(Zr.interpolate(Zr.forward(s),Zr.forward(l),a)):Xr.reverse(Xr.interpolate(Xr.forward(s),Xr.forward(l),a))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}serialize(){let e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const t=[this.operator,e,this.input.serialize()];for(let e=0;ext(n,e.type)));return new en(i?ht:r,o)}evaluate(e){let t,r=null,n=0;for(const o of this.args){if(n++,r=o.evaluate(e),r&&r instanceof Dt&&!r.available&&(t||(t=r),r=null,n===this.args.length))return t;if(null!==r)break}return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}serialize(){const e=["coalesce"];return this.eachChild((t=>{e.push(t.serialize())})),e}}var tn=en;class rn{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let n=1;n=r.length)throw new $t(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new $t(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var an=on;class sn{constructor(e,t){this.type=dt,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,ht),n=t.parse(e[2],2,ht);return r&&n?wt(r.type,[dt,ut,ct,lt,ht])?new sn(r,n):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${bt(r.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(null==r)return!1;if(!At(t,["boolean","string","number","null"]))throw new $t(`Expected first argument to be of type boolean, string, number or null, but found ${bt(zt(t))} instead.`);if(!At(r,["string","array"]))throw new $t(`Expected second argument to be of type array or string, but found ${bt(zt(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var ln=sn;class cn{constructor(e,t,r){this.type=ct,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,ht),n=t.parse(e[2],2,ht);if(!r||!n)return null;if(!wt(r.type,[dt,ut,ct,lt,ht]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${bt(r.type)} instead`);if(4===e.length){const o=t.parse(e[3],3,ct);return o?new cn(r,n,o):null}return new cn(r,n)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!At(t,["boolean","string","number","null"]))throw new $t(`Expected first argument to be of type boolean, string, number or null, but found ${bt(zt(t))} instead.`);if(!At(r,["string","array"]))throw new $t(`Expected second argument to be of type array or string, but found ${bt(zt(r))} instead.`);if(this.fromIndex){const n=this.fromIndex.evaluate(e);return r.indexOf(t,n)}return r.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var un=cn;class dn{constructor(e,t,r,n,o,i){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=o,this.otherwise=i}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");let r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);const o={},i=[];for(let a=2;aNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,zt(e)))return null}else r=zt(e);if(void 0!==o[String(e)])return c.error("Branch labels must be unique.");o[String(e)]=i.length}const u=t.parse(l,a,n);if(!u)return null;n=n||u.type,i.push(u)}const a=t.parse(e[1],1,ht);if(!a)return null;const s=t.parse(e[e.length-1],e.length-1,n);return s?"value"!==a.type.kind&&t.concat(1).checkSubtype(r,a.type)?null:new dn(r,n,a,o,i,s):null}evaluate(e){const t=this.input.evaluate(e);return(zt(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],t=Object.keys(this.cases).sort(),r=[],n={};for(const e of t){const t=n[this.cases[e]];void 0===t?(n[this.cases[e]]=r.length,r.push([this.cases[e],[e]])):r[t][1].push(e)}const o=e=>"number"===this.inputType.kind?Number(e):e;for(const[t,n]of r)e.push(1===n.length?o(n[0]):n.map(o)),e.push(this.outputs[t].serialize());return e.push(this.otherwise.serialize()),e}}var fn=dn;class pn{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");let r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);const n=[];for(let o=1;ot.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild((t=>{e.push(t.serialize())})),e}}var hn=pn;class mn{constructor(e,t,r,n){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=n}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,ht),n=t.parse(e[2],2,ct);if(!r||!n)return null;if(!wt(r.type,[vt(ht),ut,ht]))return t.error(`Expected first argument to be of type array or string, but found ${bt(r.type)} instead`);if(4===e.length){const o=t.parse(e[3],3,ct);return o?new mn(r.type,r,n,o):null}return new mn(r.type,r,n)}evaluate(e){const t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!At(t,["string","array"]))throw new $t(`Expected first argument to be of type array or string, but found ${bt(zt(t))} instead.`);if(this.endIndex){const n=this.endIndex.evaluate(e);return t.slice(r,n)}return t.slice(r)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var gn=mn;function yn(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function vn(e,t,r,n){return 0===n.compare(t,r)}function bn(e,t,r){const n="=="!==e&&"!="!==e;return class o{constructor(e,t,r){this.type=dt,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");const r=e[0];let i=t.parse(e[1],1,ht);if(!i)return null;if(!yn(r,i.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${bt(i.type)}'.`);let a=t.parse(e[2],2,ht);if(!a)return null;if(!yn(r,a.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${bt(a.type)}'.`);if(i.type.kind!==a.type.kind&&"value"!==i.type.kind&&"value"!==a.type.kind)return t.error(`Cannot compare types '${bt(i.type)}' and '${bt(a.type)}'.`);n&&("value"===i.type.kind&&"value"!==a.type.kind?i=new Ht(a.type,[i]):"value"!==i.type.kind&&"value"===a.type.kind&&(a=new Ht(i.type,[a])));let s=null;if(4===e.length){if("string"!==i.type.kind&&"string"!==a.type.kind&&"value"!==i.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(s=t.parse(e[3],3,mt),!s)return null}return new o(i,a,s)}evaluate(o){const i=this.lhs.evaluate(o),a=this.rhs.evaluate(o);if(n&&this.hasUntypedArgument){const t=zt(i),r=zt(a);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new $t(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const e=zt(i),r=zt(a);if("string"!==e.kind||"string"!==r.kind)return t(o,i,a)}return this.collator?r(o,i,a,this.collator.evaluate(o)):t(o,i,a)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}serialize(){const t=[e];return this.eachChild((e=>{t.push(e.serialize())})),t}}}const _n=bn("==",(function(e,t,r){return t===r}),vn),xn=bn("!=",(function(e,t,r){return t!==r}),(function(e,t,r,n){return!vn(0,t,r,n)})),wn=bn("<",(function(e,t,r){return t",(function(e,t,r){return t>r}),(function(e,t,r,n){return n.compare(t,r)>0})),Sn=bn("<=",(function(e,t,r){return t<=r}),(function(e,t,r,n){return n.compare(t,r)<=0})),Cn=bn(">=",(function(e,t,r){return t>=r}),(function(e,t,r,n){return n.compare(t,r)>=0}));class En{constructor(e,t,r,n,o,i){this.type=ut,this.number=e,this.locale=t,this.currency=r,this.unit=n,this.minFractionDigits=o,this.maxFractionDigits=i}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");const r=t.parse(e[1],1,ct);if(!r)return null;const n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");let o=null;if(n.locale&&(o=t.parse(n.locale,1,ut),!o))return null;let i=null;if(n.currency&&(i=t.parse(n.currency,1,ut),!i))return null;let a=null;if(n.unit&&(a=t.parse(n.unit,1,ut),!a))return null;let s=null;if(n["min-fraction-digits"]&&(s=t.parse(n["min-fraction-digits"],1,ct),!s))return null;let l=null;return n["max-fraction-digits"]&&(l=t.parse(n["max-fraction-digits"],1,ct),!l)?null:new En(r,o,i,a,s,l)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class Tn{constructor(e){this.type=ct,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error(`Expected argument of type string or array, but found ${bt(r.type)} instead.`):new Tn(r):null}evaluate(e){const t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new $t(`Expected value to be of type string or array, but found ${bt(zt(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild((t=>{e.push(t.serialize())})),e}}const In={"==":_n,"!=":xn,">":An,"<":wn,">=":Cn,"<=":Sn,array:Ht,at:an,boolean:Ht,case:hn,coalesce:tn,collator:tr,format:Wt,image:qt,in:ln,"index-of":un,interpolate:Qr,"interpolate-hcl":Qr,"interpolate-lab":Qr,length:Tn,let:nn,literal:Ut,match:fn,number:Ht,"number-format":En,object:Ht,slice:gn,step:Mr,string:Ht,"to-boolean":Yt,"to-color":Yt,"to-number":Yt,"to-string":Yt,var:Sr,within:br};function kn(e,[t,r,n,o]){t=t.evaluate(e),r=r.evaluate(e),n=n.evaluate(e);const i=o?o.evaluate(e):1,a=Nt(t,r,n,i);if(a)throw new $t(a);return new Rt(t/255*i,r/255*i,n/255*i,i)}function Mn(e,t){return e in t}function Rn(e,t){const r=t[e];return void 0===r?null:r}function Pn(e){return{type:e}}er.register(In,{error:[{kind:"error"},[ut],(e,[t])=>{throw new $t(t.evaluate(e))}],typeof:[ut,[ht],(e,[t])=>bt(zt(t.evaluate(e)))],"to-rgba":[vt(ct,4),[ft],(e,[t])=>t.evaluate(e).toArray()],rgb:[ft,[ct,ct,ct],kn],rgba:[ft,[ct,ct,ct,ct],kn],has:{type:dt,overloads:[[[ut],(e,[t])=>Mn(t.evaluate(e),e.properties())],[[ut,pt],(e,[t,r])=>Mn(t.evaluate(e),r.evaluate(e))]]},get:{type:ht,overloads:[[[ut],(e,[t])=>Rn(t.evaluate(e),e.properties())],[[ut,pt],(e,[t,r])=>Rn(t.evaluate(e),r.evaluate(e))]]},"feature-state":[ht,[ut],(e,[t])=>Rn(t.evaluate(e),e.featureState||{})],properties:[pt,[],e=>e.properties()],"geometry-type":[ut,[],e=>e.geometryType()],id:[ht,[],e=>e.id()],zoom:[ct,[],e=>e.globals.zoom],pitch:[ct,[],e=>e.globals.pitch||0],"distance-from-center":[ct,[],e=>e.distanceFromCenter()],"heatmap-density":[ct,[],e=>e.globals.heatmapDensity||0],"line-progress":[ct,[],e=>e.globals.lineProgress||0],"sky-radial-progress":[ct,[],e=>e.globals.skyRadialProgress||0],accumulated:[ht,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[ct,Pn(ct),(e,t)=>{let r=0;for(const n of t)r+=n.evaluate(e);return r}],"*":[ct,Pn(ct),(e,t)=>{let r=1;for(const n of t)r*=n.evaluate(e);return r}],"-":{type:ct,overloads:[[[ct,ct],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[ct],(e,[t])=>-t.evaluate(e)]]},"/":[ct,[ct,ct],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[ct,[ct,ct],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[ct,[],()=>Math.LN2],pi:[ct,[],()=>Math.PI],e:[ct,[],()=>Math.E],"^":[ct,[ct,ct],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[ct,[ct],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[ct,[ct],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[ct,[ct],(e,[t])=>Math.log(t.evaluate(e))],log2:[ct,[ct],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[ct,[ct],(e,[t])=>Math.sin(t.evaluate(e))],cos:[ct,[ct],(e,[t])=>Math.cos(t.evaluate(e))],tan:[ct,[ct],(e,[t])=>Math.tan(t.evaluate(e))],asin:[ct,[ct],(e,[t])=>Math.asin(t.evaluate(e))],acos:[ct,[ct],(e,[t])=>Math.acos(t.evaluate(e))],atan:[ct,[ct],(e,[t])=>Math.atan(t.evaluate(e))],min:[ct,Pn(ct),(e,t)=>Math.min(...t.map((t=>t.evaluate(e))))],max:[ct,Pn(ct),(e,t)=>Math.max(...t.map((t=>t.evaluate(e))))],abs:[ct,[ct],(e,[t])=>Math.abs(t.evaluate(e))],round:[ct,[ct],(e,[t])=>{const r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[ct,[ct],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[ct,[ct],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[dt,[ut,ht],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[dt,[ht],(e,[t])=>e.id()===t.value],"filter-type-==":[dt,[ut],(e,[t])=>e.geometryType()===t.value],"filter-<":[dt,[ut,ht],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n{const r=e.id(),n=t.value;return typeof r==typeof n&&r":[dt,[ut,ht],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n>o}],"filter-id->":[dt,[ht],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r>n}],"filter-<=":[dt,[ut,ht],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[dt,[ht],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r<=n}],"filter->=":[dt,[ut,ht],(e,[t,r])=>{const n=e.properties()[t.value],o=r.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[dt,[ht],(e,[t])=>{const r=e.id(),n=t.value;return typeof r==typeof n&&r>=n}],"filter-has":[dt,[ht],(e,[t])=>t.value in e.properties()],"filter-has-id":[dt,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[dt,[vt(ut)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[dt,[vt(ht)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[dt,[ut,vt(ht)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[dt,[ut,vt(ht)],(e,[t,r])=>function(e,t,r,n){for(;r<=n;){const o=r+n>>1;if(t[o]===e)return!0;t[o]>e?n=o-1:r=o+1}return!1}(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:dt,overloads:[[[dt,dt],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[Pn(dt),(e,t)=>{for(const r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:dt,overloads:[[[dt,dt],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[Pn(dt),(e,t)=>{for(const r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[dt,[dt],(e,[t])=>!t.evaluate(e)],"is-supported-script":[dt,[ut],(e,[t])=>{const r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[ut,[ut],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[ut,[ut],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[ut,Pn(ht),(e,t)=>t.map((t=>Bt(t.evaluate(e)))).join("")],"resolved-locale":[ut,[mt],(e,[t])=>t.evaluate(e).resolvedLocale()]});var On=In;function Ln(e){return{result:"success",value:e}}function Dn(e){return{result:"error",value:e}}function Nn(e){return"data-driven"===e["property-type"]}function Fn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function zn(e){return!!e.expression&&e.expression.interpolated}function Bn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function jn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Un(e){return e}function $n(e,t){const r="color"===t.type,n=e.stops&&"object"==typeof e.stops[0][0],o=n||!(n||void 0!==e.property),i=e.type||(zn(t)?"exponential":"interval");if(r&&((e=tt({},e)).stops&&(e.stops=e.stops.map((e=>[e[0],Rt.parse(e[1])]))),e.default=Rt.parse(e.default?e.default:t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!Yr[e.colorSpace])throw new Error(`Unknown color space: ${e.colorSpace}`);let a,s,l;if("exponential"===i)a=Wn;else if("interval"===i)a=Hn;else if("categorical"===i){a=Gn,s=Object.create(null);for(const t of e.stops)s[t[0]]=t[1];l=typeof e.stops[0][0]}else{if("identity"!==i)throw new Error(`Unknown function type "${i}"`);a=qn}if(n){const r={},n=[];for(let t=0;te[0])),evaluate:({zoom:r},n)=>Wn({stops:o,base:e.base},t,r).evaluate(r,n)}}if(o){const r="exponential"===i?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:r,interpolationFactor:Qr.interpolationFactor.bind(void 0,r),zoomStops:e.stops.map((e=>e[0])),evaluate:({zoom:r})=>a(e,t,r,s,l)}}return{kind:"source",evaluate(r,n){const o=n&&n.properties?n.properties[e.property]:void 0;return void 0===o?Vn(e.default,t.default):a(e,t,o,s,l)}}}function Vn(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function Gn(e,t,r,n,o){return Vn(typeof r===o?n[r]:void 0,e.default,t.default)}function Hn(e,t,r){if("number"!==Bn(r))return Vn(e.default,t.default);const n=e.stops.length;if(1===n)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];const o=Ir(e.stops.map((e=>e[0])),r);return e.stops[o][1]}function Wn(e,t,r){const n=void 0!==e.base?e.base:1;if("number"!==Bn(r))return Vn(e.default,t.default);const o=e.stops.length;if(1===o)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[o-1][0])return e.stops[o-1][1];const i=Ir(e.stops.map((e=>e[0])),r),a=function(e,t,r,n){const o=n-r,i=e-r;return 0===o?0:1===t?i/o:(Math.pow(t,i)-1)/(Math.pow(t,o)-1)}(r,n,e.stops[i][0],e.stops[i+1][0]),s=e.stops[i][1],l=e.stops[i+1][1];let c=Pr[t.type]||Un;if(e.colorSpace&&"rgb"!==e.colorSpace){const t=Yr[e.colorSpace];c=(e,r)=>t.reverse(t.interpolate(t.forward(e),t.forward(r),a))}return"function"==typeof s.evaluate?{evaluate(...e){const t=s.evaluate.apply(void 0,e),r=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==r)return c(t,r,a)}}:c(s,l,a)}function qn(e,t,r){return"color"===t.type?r=Rt.parse(r):"formatted"===t.type?r=Lt.fromString(r.toString()):"resolvedImage"===t.type?r=Dt.fromString(r.toString()):Bn(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0),Vn(r,e.default,t.default)}class Xn{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new Jt,this._defaultValue=t?function(e){return"color"===e.type&&(jn(e.default)||Array.isArray(e.default))?new Rt(0,0,0,0):"color"===e.type?Rt.parse(e.default)||null:void 0===e.default?null:e.default}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,r,n,o,i,a,s){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=i,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,n,o,i,a,s){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=i||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null;try{const e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new $t(`Expected value to be one of ${Object.keys(this._enumValues).map((e=>JSON.stringify(e))).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}}}function Zn(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in On}function Yn(e,t){const r=new Er(On,[],t?function(e){const t={color:ft,string:ut,number:ct,enum:ut,boolean:dt,formatted:gt,resolvedImage:yt};return"array"===e.type?vt(t[e.value]||ht,e.length):t[e.type]}(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Ln(new Xn(n,t)):Dn(r.errors)}class Kn{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!xr(t.expression)}evaluateWithoutErrorHandling(e,t,r,n,o,i){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,o,i)}evaluate(e,t,r,n,o,i){return this._styleExpression.evaluate(e,t,r,n,o,i)}}class Jn{constructor(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!xr(t.expression),this.interpolationType=n}evaluateWithoutErrorHandling(e,t,r,n,o,i){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,o,i)}evaluate(e,t,r,n,o,i){return this._styleExpression.evaluate(e,t,r,n,o,i)}interpolationFactor(e,t,r){return this.interpolationType?Qr.interpolationFactor(this.interpolationType,e,t,r):0}}function Qn(e,t){if("error"===(e=Yn(e,t)).result)return e;const r=e.value.expression,n=_r(r);if(!n&&!Nn(t))return Dn([new it("","data expressions not supported")]);const o=wr(r,["zoom","pitch","distance-from-center"]);if(!o&&!Fn(t))return Dn([new it("","zoom expressions not supported")]);const i=to(r);return i||o?i instanceof it?Dn([i]):i instanceof Qr&&!zn(t)?Dn([new it("",'"interpolate" expressions cannot be used with this property')]):Ln(i?new Jn(n?"camera":"composite",e.value,i.labels,i instanceof Qr?i.interpolation:void 0):new Kn(n?"constant":"source",e.value)):Dn([new it("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class eo{constructor(e,t){this._parameters=e,this._specification=t,tt(this,$n(this._parameters,this._specification))}static deserialize(e){return new eo(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function to(e){let t=null;if(e instanceof nn)t=to(e.result);else if(e instanceof tn){for(const r of e.args)if(t=to(r),t)break}else(e instanceof Mr||e instanceof Qr)&&e.input instanceof er&&"zoom"===e.input.name&&(t=e);return t instanceof it||e.eachChild((e=>{const r=to(e);r instanceof it?t=r:!t&&r?t=new it("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&r&&t!==r&&(t=new it("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}class ro{constructor(e,t,r,n){this.message=(e?`${e}: `:"")+r,n&&(this.identifier=n),null!=t&&t.__line__&&(this.line=t.__line__)}}function no(e){const t=e.key,r=e.value,n=e.valueSpec||{},o=e.objectElementValidators||{},i=e.style,a=e.styleSpec;let s=[];const l=Bn(r);if("object"!==l)return[new ro(t,r,`object expected, ${l} found`)];for(const e in r){const l=e.split(".")[0];let c;o[l]?c=o[l]:n[l]?c=zo:o["*"]?c=o["*"]:n["*"]&&(c=zo),c?s=s.concat(c({key:(t?`${t}.`:t)+e,value:r[e],valueSpec:n[l]||n["*"],style:i,styleSpec:a,object:r,objectKey:e},r)):s.push(new ro(t,r[e],`unknown property "${e}"`))}for(const e in n)o[e]||n[e].required&&void 0===n[e].default&&void 0===r[e]&&s.push(new ro(t,r,`missing required property "${e}"`));return s}function oo(e){const t=e.value,r=e.valueSpec,n=e.style,o=e.styleSpec,i=e.key,a=e.arrayElementValidator||zo;if("array"!==Bn(t))return[new ro(i,t,`array expected, ${Bn(t)} found`)];if(r.length&&t.length!==r.length)return[new ro(i,t,`array length ${r.length} expected, length ${t.length} found`)];if(r["min-length"]&&t.lengtho)return[new ro(t,r,`${r} is greater than the maximum value ${o}`)]}return[]}function ao(e){const t=e.valueSpec,r=rt(e.value.type);let n,o,i,a={};const s="categorical"!==r&&void 0===e.value.property,l=!s,c="array"===Bn(e.value.stops)&&"array"===Bn(e.value.stops[0])&&"object"===Bn(e.value.stops[0][0]),u=no({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new ro(e.key,e.value,'identity function may not have a "stops" property')];let t=[];const n=e.value;return t=t.concat(oo({key:e.key,value:n,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:d})),"array"===Bn(n)&&0===n.length&&t.push(new ro(e.key,n,"array must have at least one stop")),t},default:function(e){return zo({key:e.key,value:e.value,valueSpec:t,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&s&&u.push(new ro(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||u.push(new ro(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!zn(e.valueSpec)&&u.push(new ro(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Nn(e.valueSpec)?u.push(new ro(e.key,e.value,"property functions not supported")):s&&!Fn(e.valueSpec)&&u.push(new ro(e.key,e.value,"zoom functions not supported"))),"categorical"!==r&&!c||void 0!==e.value.property||u.push(new ro(e.key,e.value,'"property" property is required')),u;function d(e){let r=[];const n=e.value,s=e.key;if("array"!==Bn(n))return[new ro(s,n,`array expected, ${Bn(n)} found`)];if(2!==n.length)return[new ro(s,n,`array length 2 expected, length ${n.length} found`)];if(c){if("object"!==Bn(n[0]))return[new ro(s,n,`object expected, ${Bn(n[0])} found`)];if(void 0===n[0].zoom)return[new ro(s,n,"object stop key must have zoom")];if(void 0===n[0].value)return[new ro(s,n,"object stop key must have value")];const t=rt(n[0].zoom);if("number"!=typeof t)return[new ro(s,n[0].zoom,"stop zoom values must be numbers")];if(i&&i>t)return[new ro(s,n[0].zoom,"stop zoom values must appear in ascending order")];t!==i&&(i=t,o=void 0,a={}),r=r.concat(no({key:`${s}[0]`,value:n[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:io,value:f}}))}else r=r.concat(f({key:`${s}[0]`,value:n[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},n));return Zn(nt(n[1]))?r.concat([new ro(`${s}[1]`,n[1],"expressions are not allowed in function stops.")]):r.concat(zo({key:`${s}[1]`,value:n[1],valueSpec:t,style:e.style,styleSpec:e.styleSpec}))}function f(e,i){const s=Bn(e.value),l=rt(e.value),c=null!==e.value?e.value:i;if(n){if(s!==n)return[new ro(e.key,c,`${s} stop domain type must match previous stop domain type ${n}`)]}else n=s;if("number"!==s&&"string"!==s&&"boolean"!==s&&"number"!=typeof l&&"string"!=typeof l&&"boolean"!=typeof l)return[new ro(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==r){let n=`number expected, ${s} found`;return Nn(t)&&void 0===r&&(n+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ro(e.key,c,n)]}return"categorical"!==r||"number"!==s||"number"==typeof l&&isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===s&&"number"==typeof l&&"number"==typeof o&&void 0!==o&&lnew ro(`${e.key}${t.key}`,e.value,t.message)));const r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new ro(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!xr(r))return[new ro(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext)return lo(r,e);if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!wr(r,["zoom","feature-state"]))return[new ro(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!_r(r))return[new ro(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function lo(e,t){const r=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(t.valueSpec&&t.valueSpec.expression)for(const e of t.valueSpec.expression.parameters)r.delete(e);if(0===r.size)return[];const n=[];return e instanceof er&&r.has(e.name)?[new ro(t.key,t.value,`["${e.name}"] expression is not supported in a filter for a ${t.object.type} layer with id: ${t.object.id}`)]:(e.eachChild((e=>{n.push(...lo(e,t))})),n)}function co(e){const t=e.key,r=e.value,n=e.valueSpec,o=[];return Array.isArray(n.values)?-1===n.values.indexOf(rt(r))&&o.push(new ro(t,r,`expected one of [${n.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(n.values).indexOf(rt(r))&&o.push(new ro(t,r,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(r)} found`)),o}function uo(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(const t of e.slice(1))if(!uo(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}function fo(e,t="fill"){if(null==e)return{filter:()=>!0,needGeometry:!1,needFeature:!1};uo(e)||(e=bo(e));const r=e;let n=!0;try{n=function(e){if(!mo(e))return e;let t=nt(e);return ho(t),t=po(t),t}(r)}catch(e){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(r,null,2)}\n `)}const o=et[`filter_${t}`],i=Yn(n,o);let a=null;if("error"===i.result)throw new Error(i.value.map((e=>`${e.key}: ${e.message}`)).join(", "));a=(e,t,r)=>i.value.evaluate(e,t,{},r);let s=null,l=null;if(n!==r){const e=Yn(r,o);if("error"===e.result)throw new Error(e.value.map((e=>`${e.key}: ${e.message}`)).join(", "));s=(t,r,n,o,i)=>e.value.evaluate(t,r,{},n,void 0,void 0,o,i),l=!_r(e.value.expression)}return{filter:a,dynamicFilter:s||void 0,needGeometry:vo(n),needFeature:!!l}}function po(e){if(!Array.isArray(e))return e;const t=function(e){if(go.has(e[0]))for(let t=1;tpo(e)))}function ho(e){let t=!1;const r=[];if("case"===e[0]){for(let n=1;n",">=","<","<=","to-boolean"]);function yo(e,t){return et?1:0}function vo(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(let t=1;t"===t||"<="===t||">="===t?_o(e[1],e[2],t):"any"===t?(r=e.slice(1),["any"].concat(r.map(bo))):"all"===t?["all"].concat(e.slice(1).map(bo)):"none"===t?["all"].concat(e.slice(1).map(bo).map(Ao)):"in"===t?xo(e[1],e.slice(2)):"!in"===t?Ao(xo(e[1],e.slice(2))):"has"===t?wo(e[1]):"!has"===t?Ao(wo(e[1])):"within"!==t||e;var r}function _o(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function xo(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((e=>typeof e!=typeof t[0]))?["filter-in-large",e,["literal",t.sort(yo)]]:["filter-in-small",e,["literal",t]]}}function wo(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Ao(e){return["!",e]}function So(e){return uo(nt(e.value))?so(tt({},e,{expressionContext:"filter",valueSpec:e.styleSpec[`filter_${e.layerType||"fill"}`]})):Co(e)}function Co(e){const t=e.value,r=e.key;if("array"!==Bn(t))return[new ro(r,t,`array expected, ${Bn(t)} found`)];const n=e.styleSpec;let o,i=[];if(t.length<1)return[new ro(r,t,"filter array must have at least 1 element")];switch(i=i.concat(co({key:`${r}[0]`,value:t[0],valueSpec:n.filter_operator,style:e.style,styleSpec:e.styleSpec})),rt(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===rt(t[1])&&i.push(new ro(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":3!==t.length&&i.push(new ro(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(o=Bn(t[1]),"string"!==o&&i.push(new ro(`${r}[1]`,t[1],`string expected, ${o} found`)));for(let a=2;a{e in r&&t.push(new ro(n,r[e],`"${e}" is prohibited for ref layers`))})),o.layers.forEach((t=>{rt(t.id)===s&&(e=t)})),e?e.ref?t.push(new ro(n,r.ref,"ref cannot reference another ref layer")):a=rt(e.type):"string"==typeof s&&t.push(new ro(n,r.ref,`ref layer "${s}" not found`))}else if("background"!==a&&"sky"!==a)if(r.source){const e=o.sources&&o.sources[r.source],i=e&&rt(e.type);e?"vector"===i&&"raster"===a?t.push(new ro(n,r.source,`layer "${r.id}" requires a raster source`)):"raster"===i&&"raster"!==a?t.push(new ro(n,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==i||r["source-layer"]?"raster-dem"===i&&"hillshade"!==a?t.push(new ro(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!r.paint||!r.paint["line-gradient"]&&!r.paint["line-trim-offset"]||"geojson"===i&&e.lineMetrics||t.push(new ro(n,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new ro(n,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new ro(n,r.source,`source "${r.source}" not found`))}else t.push(new ro(n,r,'missing required property "source"'));return t=t.concat(no({key:n,value:r,valueSpec:i.layer,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":()=>[],type:()=>zo({key:`${n}.type`,value:r.type,valueSpec:i.layer.type,style:e.style,styleSpec:e.styleSpec,object:r,objectKey:"type"}),filter:e=>So(tt({layerType:a},e)),layout:e=>no({layer:r,key:e.key,value:e.value,valueSpec:{},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":e=>Io(tt({layerType:a},e))}}),paint:e=>no({layer:r,key:e.key,value:e.value,valueSpec:{},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":e=>To(tt({layerType:a},e))}})}})),t}function Mo(e){const t=e.value,r=e.key,n=Bn(t);return"string"!==n?[new ro(r,t,`string expected, ${n} found`)]:[]}const Ro={promoteId:function({key:e,value:t}){if("string"===Bn(t))return Mo({key:e,value:t});{const r=[];for(const n in t)r.push(...Mo({key:`${e}.${n}`,value:t[n]}));return r}}};function Po(e){const t=e.value,r=e.key,n=e.styleSpec,o=e.style;if(!t.type)return[new ro(r,t,'"type" is required')];const i=rt(t.type);let a;switch(i){case"vector":case"raster":case"raster-dem":return a=no({key:r,value:t,valueSpec:n[`source_${i.replace("-","_")}`],style:e.style,styleSpec:n,objectElementValidators:Ro}),a;case"geojson":if(a=no({key:r,value:t,valueSpec:n.source_geojson,style:o,styleSpec:n,objectElementValidators:Ro}),t.cluster)for(const e in t.clusterProperties){const[n,o]=t.clusterProperties[e],i="string"==typeof n?[n,["accumulated"],["get",e]]:n;a.push(...so({key:`${r}.${e}.map`,value:o,expressionContext:"cluster-map"})),a.push(...so({key:`${r}.${e}.reduce`,value:i,expressionContext:"cluster-reduce"}))}return a;case"video":return no({key:r,value:t,valueSpec:n.source_video,style:o,styleSpec:n});case"image":return no({key:r,value:t,valueSpec:n.source_image,style:o,styleSpec:n});case"canvas":return[new ro(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return co({key:`${r}.type`,value:t.type,valueSpec:{values:Oo(n)},style:o,styleSpec:n})}}function Oo(e){return e.source.reduce(((t,r)=>{const n=e[r];return"enum"===n.type.type&&(t=t.concat(Object.keys(n.type.values))),t}),[])}function Lo(e){const t=e.value,r=e.styleSpec,n=r.light,o=e.style;let i=[];const a=Bn(t);if(void 0===t)return i;if("object"!==a)return i=i.concat([new ro("light",t,`object expected, ${a} found`)]),i;for(const e in t){const a=e.match(/^(.*)-transition$/);i=i.concat(a&&n[a[1]]&&n[a[1]].transition?zo({key:e,value:t[e],valueSpec:r.transition,style:o,styleSpec:r}):n[e]?zo({key:e,value:t[e],valueSpec:n[e],style:o,styleSpec:r}):[new ro(e,t[e],`unknown property "${e}"`)])}return i}function Do(e){const t=e.value,r=e.key,n=e.style,o=e.styleSpec,i=o.terrain;let a=[];const s=Bn(t);if(void 0===t)return a;if("object"!==s)return a=a.concat([new ro("terrain",t,`object expected, ${s} found`)]),a;for(const e in t){const r=e.match(/^(.*)-transition$/);a=a.concat(r&&i[r[1]]&&i[r[1]].transition?zo({key:e,value:t[e],valueSpec:o.transition,style:n,styleSpec:o}):i[e]?zo({key:e,value:t[e],valueSpec:i[e],style:n,styleSpec:o}):[new ro(e,t[e],`unknown property "${e}"`)])}if(t.source){const e=n.sources&&n.sources[t.source],o=e&&rt(e.type);e?"raster-dem"!==o&&a.push(new ro(r,t.source,`terrain cannot be used with a source of type ${String(o)}, it only be used with a "raster-dem" source type`)):a.push(new ro(r,t.source,`source "${t.source}" not found`))}else a.push(new ro(r,t,'terrain is missing required property "source"'));return a}function No(e){const t=e.value,r=e.style,n=e.styleSpec,o=n.fog;let i=[];const a=Bn(t);if(void 0===t)return i;if("object"!==a)return i=i.concat([new ro("fog",t,`object expected, ${a} found`)]),i;for(const e in t){const a=e.match(/^(.*)-transition$/);i=i.concat(a&&o[a[1]]&&o[a[1]].transition?zo({key:e,value:t[e],valueSpec:n.transition,style:r,styleSpec:n}):o[e]?zo({key:e,value:t[e],valueSpec:o[e],style:r,styleSpec:n}):[new ro(e,t[e],`unknown property "${e}"`)])}return i}const Fo={"*":()=>[],array:oo,boolean:function(e){const t=e.value,r=e.key,n=Bn(t);return"boolean"!==n?[new ro(r,t,`boolean expected, ${n} found`)]:[]},number:io,color:function(e){const t=e.key,r=e.value,n=Bn(r);return"string"!==n?[new ro(t,r,`color expected, ${n} found`)]:null===St(r)?[new ro(t,r,`color expected, "${r}" found`)]:[]},enum:co,filter:So,function:ao,layer:ko,object:no,source:Po,light:Lo,terrain:Do,fog:No,string:Mo,formatted:function(e){return 0===Mo(e).length?[]:so(e)},resolvedImage:function(e){return 0===Mo(e).length?[]:so(e)},projection:function(e){const t=e.value,r=e.styleSpec,n=r.projection,o=e.style;let i=[];const a=Bn(t);if("object"===a)for(const e in t)i=i.concat(zo({key:e,value:t[e],valueSpec:n[e],style:o,styleSpec:r}));else"string"!==a&&(i=i.concat([new ro("projection",t,`object or string expected, ${a} found`)]));return i}};function zo(e){const t=e.value,r=e.valueSpec,n=e.styleSpec;return r.expression&&jn(rt(t))?ao(e):r.expression&&Zn(nt(t))?so(e):r.type&&Fo[r.type]?Fo[r.type](e):no(tt({},e,{valueSpec:r.type?n[r.type]:r}))}function Bo(e){const t=e.value,r=e.key,n=Mo(e);return n.length||(-1===t.indexOf("{fontstack}")&&n.push(new ro(r,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&n.push(new ro(r,t,'"glyphs" url must include a "{range}" token'))),n}function jo(e,t=et){return Vo(zo({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:Bo,"*":()=>[]}}))}const Uo=e=>Vo(To(e)),$o=e=>Vo(Io(e));function Vo(e){return e.slice().sort(((e,t)=>e.line&&t.line?e.line-t.line:0))}function Go(e,t){let r=!1;if(t&&t.length)for(const n of t)e.fire(new Je(new Error(n.message))),r=!0;return r}var Ho=qo,Wo=3;function qo(e,t,r){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var o=new Int32Array(this.arrayBuffer);e=o[0],this.d=(t=o[1])+2*(r=o[2]);for(var i=0;i=u[p+0]&&n>=u[p+1])?(a[f]=!0,i.push(c[f])):a[f]=!1}}},qo.prototype._forEachCell=function(e,t,r,n,o,i,a,s){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),d=this._convertToCellCoord(n),f=l;f<=u;f++)for(var p=c;p<=d;p++){var h=this.d*p+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(p),this._convertFromCellCoord(f+1),this._convertFromCellCoord(p+1)))&&o.call(this,e,t,r,n,h,i,a,s))return}},qo.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},qo.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},qo.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=Wo+this.cells.length+1+1,r=0,n=0;n=0||(o[t]=Qo(e[t],r)));e instanceof Error&&(o.message=e.message)}if(o.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==n&&(o.$name=n),o}throw new Error("can't serialize object of type "+typeof e)}function ei(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||Ko(e)||Jo(e)||ArrayBuffer.isView(e)||e instanceof t.ImageData)return e;if(Array.isArray(e))return e.map(ei);if("object"==typeof e){const t=e.$name||"Object",{klass:r}=Zo[t];if(!r)throw new Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);const n=Object.create(r.prototype);for(const t of Object.keys(e))"$name"!==t&&(n[t]=ei(e[t]));return n}throw new Error("can't deserialize object of type "+typeof e)}const ti=e=>e>=128&&e<=255,ri=e=>e>=1536&&e<=1791,ni=e=>e>=1872&&e<=1919,oi=e=>e>=2208&&e<=2303,ii=e=>e>=4352&&e<=4607,ai=e=>e>=5120&&e<=5759,si=e=>e>=6016&&e<=6143,li=e=>e>=6320&&e<=6399,ci=e=>e>=8192&&e<=8303,ui=e=>e>=8448&&e<=8527,di=e=>e>=8528&&e<=8591,fi=e=>e>=8960&&e<=9215,pi=e=>e>=9216&&e<=9279,hi=e=>e>=9280&&e<=9311,mi=e=>e>=9312&&e<=9471,gi=e=>e>=9632&&e<=9727,yi=e=>e>=9728&&e<=9983,vi=e=>e>=11008&&e<=11263,bi=e=>e>=11904&&e<=12031,_i=e=>e>=12032&&e<=12255,xi=e=>e>=12272&&e<=12287,wi=e=>e>=12288&&e<=12351,Ai=e=>e>=12352&&e<=12447,Si=e=>e>=12448&&e<=12543,Ci=e=>e>=12544&&e<=12591,Ei=e=>e>=12592&&e<=12687,Ti=e=>e>=12688&&e<=12703,Ii=e=>e>=12704&&e<=12735,ki=e=>e>=12736&&e<=12783,Mi=e=>e>=12784&&e<=12799,Ri=e=>e>=12800&&e<=13055,Pi=e=>e>=13056&&e<=13311,Oi=e=>e>=13312&&e<=19903,Li=e=>e>=19904&&e<=19967,Di=e=>e>=19968&&e<=40959,Ni=e=>e>=40960&&e<=42127,Fi=e=>e>=42128&&e<=42191,zi=e=>e>=43360&&e<=43391,Bi=e=>e>=44032&&e<=55215,ji=e=>e>=55216&&e<=55295,Ui=e=>e>=57344&&e<=63743,$i=e=>e>=63744&&e<=64255,Vi=e=>e>=64336&&e<=65023,Gi=e=>e>=65040&&e<=65055,Hi=e=>e>=65072&&e<=65103,Wi=e=>e>=65104&&e<=65135,qi=e=>e>=65136&&e<=65279,Xi=e=>e>=65280&&e<=65519;function Zi(e){for(const t of e)if(Ji(t.charCodeAt(0)))return!0;return!1}function Yi(e){for(const t of e)if(!Ki(t.charCodeAt(0)))return!1;return!0}function Ki(e){return!(ri(e)||ni(e)||oi(e)||Vi(e)||qi(e))}function Ji(e){return!(746!==e&&747!==e&&(e<4352||!(Ii(e)||Ci(e)||Hi(e)&&!(e>=65097&&e<=65103)||$i(e)||Pi(e)||bi(e)||ki(e)||!(!wi(e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||Oi(e)||Di(e)||Ri(e)||Ei(e)||zi(e)||ji(e)||ii(e)||Bi(e)||Ai(e)||xi(e)||Ti(e)||_i(e)||Mi(e)||Si(e)&&12540!==e||!(!Xi(e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!Wi(e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||ai(e)||li(e)||Gi(e)||Li(e)||Ni(e)||Fi(e))))}function Qi(e){return!(Ji(e)||function(e){return!!(ti(e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||ci(e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||ui(e)||di(e)||fi(e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||pi(e)&&9251!==e||hi(e)||mi(e)||gi(e)||yi(e)&&!(e>=9754&&e<=9759)||vi(e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||wi(e)||Si(e)||Ui(e)||Hi(e)||Wi(e)||Xi(e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function ea(e){return e>=1424&&e<=2303||Vi(e)||qi(e)}function ta(e,t){return!(!t&&ea(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||si(e))}function ra(e){for(const t of e)if(ea(t.charCodeAt(0)))return!0;return!1}const na="deferred",oa="loading",ia="loaded";let aa=null,sa="unavailable",la=null;const ca=function(e){e&&"string"==typeof e&&e.indexOf("NetworkError")>-1&&(sa="error"),aa&&aa(e)};function ua(){da.fire(new Ke("pluginStateChange",{pluginStatus:sa,pluginURL:la}))}const da=new Qe,fa=function(){return sa},pa=function(){if(sa!==na||!la)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");sa=oa,ua(),la&&fe({url:la},(e=>{e?ca(e):(sa=ia,ua())}))},ha={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>sa===ia||null!=ha.applyArabicShaping,isLoading:()=>sa===oa,setState(e){sa=e.pluginStatus,la=e.pluginURL},isParsed:()=>null!=ha.applyArabicShaping&&null!=ha.processBidirectionalText&&null!=ha.processStyledBidirectionalText,getPluginURL:()=>la};class ma{constructor(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.transition=t.transition,this.pitch=t.pitch):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0)}isSupportedScript(e){return function(e,t){for(const r of e)if(!ta(r.charCodeAt(0),t))return!1;return!0}(e,ha.isLoaded())}}class ga{constructor(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(jn(e))return new eo(e,t);if(Zn(e)){const r=Qn(e,t);if("error"===r.result)throw new Error(r.value.map((e=>`${e.key}: ${e.message}`)).join(", "));return r.value}{let r=e;return"string"==typeof e&&"color"===t.type&&(r=Rt.parse(e)),{kind:"constant",evaluate:()=>r}}}(void 0===t?e.specification.default:t,e.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}}class ya{constructor(e){this.property=e,this.value=new ga(e,void 0)}transitioned(e,t){return new ba(this.property,this.value,t,P({},e.transition,this.transition),e.now)}untransitioned(){return new ba(this.property,this.value,null,{},0)}}class va{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return $(this._values[e].value.value)}setValue(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new ya(this._values[e].property)),this._values[e].value=new ga(this._values[e].property,null===t?void 0:$(t))}getTransition(e){return $(this._values[e].transition)}setTransition(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new ya(this._values[e].property)),this._values[e].transition=$(t)||void 0}serialize(){const e={};for(const t of Object.keys(this._values)){const r=this.getValue(t);void 0!==r&&(e[t]=r);const n=this.getTransition(t);void 0!==n&&(e[`${t}-transition`]=n)}return e}transitioned(e,t){const r=new _a(this._properties);for(const n of Object.keys(this._values))r._values[n]=this._values[n].transitioned(e,t._values[n]);return r}untransitioned(){const e=new _a(this._properties);for(const t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class ba{constructor(e,t,r,n,o){const i=n.delay||0,a=n.duration||0;o=o||0,this.property=e,this.value=t,this.begin=o+i,this.end=this.begin+a,e.specification.transition&&(n.delay||n.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){const n=e.now||0,o=this.value.possiblyEvaluate(e,t,r),i=this.prior;if(i){if(n>this.end)return this.prior=null,o;if(this.value.isDataDriven())return this.prior=null,o;if(nthis.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}destroy(){this.int8=this.uint8=this.int16=this.uint16=this.int32=this.uint32=this.float32=null,this.arrayBuffer=null}}function Pa(e,t=1){let r=0,n=0;return{members:e.map((e=>{const o=ka[e.type].BYTES_PER_ELEMENT,i=r=Oa(r,Math.max(t,o)),a=e.components||1;return n=Math.max(n,o),r+=o*a,{name:e.name,type:e.type,components:a,offset:i}})),size:Oa(r,Math.max(n,t)),alignment:t}}function Oa(e,t){return Math.ceil(e/t)*t}class La extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){const r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){const n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e}}La.prototype.bytesPerElement=4,Yo(La,"StructArrayLayout2i4");class Da extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){const n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){const o=3*e;return this.int16[o+0]=t,this.int16[o+1]=r,this.int16[o+2]=n,e}}Da.prototype.bytesPerElement=6,Yo(Da,"StructArrayLayout3i6");class Na extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n)}emplace(e,t,r,n,o){const i=4*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,this.int16[i+3]=o,e}}Na.prototype.bytesPerElement=8,Yo(Na,"StructArrayLayout4i8");class Fa extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a){const s=this.length;return this.resize(s+1),this.emplace(s,e,t,r,n,o,i,a)}emplace(e,t,r,n,o,i,a,s){const l=6*e,c=12*e,u=3*e;return this.int16[l+0]=t,this.int16[l+1]=r,this.uint8[c+4]=n,this.uint8[c+5]=o,this.uint8[c+6]=i,this.uint8[c+7]=a,this.float32[u+2]=s,e}}Fa.prototype.bytesPerElement=12,Yo(Fa,"StructArrayLayout2i4ub1f12");class za extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n)}emplace(e,t,r,n,o){const i=4*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,this.float32[i+3]=o,e}}za.prototype.bytesPerElement=16,Yo(za,"StructArrayLayout4f16");class Ba extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n,o)}emplace(e,t,r,n,o,i){const a=6*e,s=3*e;return this.uint16[a+0]=t,this.uint16[a+1]=r,this.uint16[a+2]=n,this.uint16[a+3]=o,this.float32[s+2]=i,e}}Ba.prototype.bytesPerElement=12,Yo(Ba,"StructArrayLayout4ui1f12");class ja extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n)}emplace(e,t,r,n,o){const i=4*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,this.uint16[i+3]=o,e}}ja.prototype.bytesPerElement=8,Yo(ja,"StructArrayLayout4ui8");class Ua extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,o,i)}emplace(e,t,r,n,o,i,a){const s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=o,this.int16[s+4]=i,this.int16[s+5]=a,e}}Ua.prototype.bytesPerElement=12,Yo(Ua,"StructArrayLayout6i12");class $a extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a,s,l,c,u,d){const f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,o,i,a,s,l,c,u,d)}emplace(e,t,r,n,o,i,a,s,l,c,u,d,f){const p=12*e;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=o,this.uint16[p+4]=i,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=d,this.int16[p+11]=f,e}}$a.prototype.bytesPerElement=24,Yo($a,"StructArrayLayout4i4ui4i24");class Va extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,o,i)}emplace(e,t,r,n,o,i,a){const s=10*e,l=5*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.float32[l+2]=o,this.float32[l+3]=i,this.float32[l+4]=a,e}}Va.prototype.bytesPerElement=20,Yo(Va,"StructArrayLayout3i3f20");class Ga extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[1*e+0]=t,e}}Ga.prototype.bytesPerElement=4,Yo(Ga,"StructArrayLayout1ul4");class Ha extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a,s,l,c,u,d,f){const p=this.length;return this.resize(p+1),this.emplace(p,e,t,r,n,o,i,a,s,l,c,u,d,f)}emplace(e,t,r,n,o,i,a,s,l,c,u,d,f,p){const h=20*e,m=10*e;return this.int16[h+0]=t,this.int16[h+1]=r,this.int16[h+2]=n,this.int16[h+3]=o,this.int16[h+4]=i,this.float32[m+3]=a,this.float32[m+4]=s,this.float32[m+5]=l,this.float32[m+6]=c,this.int16[h+14]=u,this.uint32[m+8]=d,this.uint16[h+18]=f,this.uint16[h+19]=p,e}}Ha.prototype.bytesPerElement=40,Yo(Ha,"StructArrayLayout5i4f1i1ul2ui40");class Wa extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a){const s=this.length;return this.resize(s+1),this.emplace(s,e,t,r,n,o,i,a)}emplace(e,t,r,n,o,i,a,s){const l=8*e;return this.int16[l+0]=t,this.int16[l+1]=r,this.int16[l+2]=n,this.int16[l+4]=o,this.int16[l+5]=i,this.int16[l+6]=a,this.int16[l+7]=s,e}}Wa.prototype.bytesPerElement=16,Yo(Wa,"StructArrayLayout3i2i2i16");class qa extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n,o)}emplace(e,t,r,n,o,i){const a=4*e,s=8*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.int16[s+6]=o,this.int16[s+7]=i,e}}qa.prototype.bytesPerElement=16,Yo(qa,"StructArrayLayout2f1f2i16");class Xa extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n)}emplace(e,t,r,n,o){const i=12*e,a=3*e;return this.uint8[i+0]=t,this.uint8[i+1]=r,this.float32[a+1]=n,this.float32[a+2]=o,e}}Xa.prototype.bytesPerElement=12,Yo(Xa,"StructArrayLayout2ub2f12");class Za extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){const n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){const o=3*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,e}}Za.prototype.bytesPerElement=12,Yo(Za,"StructArrayLayout3f12");class Ya extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){const n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){const o=3*e;return this.uint16[o+0]=t,this.uint16[o+1]=r,this.uint16[o+2]=n,e}}Ya.prototype.bytesPerElement=6,Yo(Ya,"StructArrayLayout3ui6");class Ka extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_){const x=this.length;return this.resize(x+1),this.emplace(x,e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_)}emplace(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_,x){const w=30*e,A=15*e,S=60*e;return this.int16[w+0]=t,this.int16[w+1]=r,this.int16[w+2]=n,this.float32[A+2]=o,this.float32[A+3]=i,this.uint16[w+8]=a,this.uint16[w+9]=s,this.uint32[A+5]=l,this.uint32[A+6]=c,this.uint32[A+7]=u,this.uint16[w+16]=d,this.uint16[w+17]=f,this.uint16[w+18]=p,this.float32[A+10]=h,this.float32[A+11]=m,this.uint8[S+48]=g,this.uint8[S+49]=y,this.uint8[S+50]=v,this.uint32[A+13]=b,this.int16[w+28]=_,this.uint8[S+58]=x,e}}Ka.prototype.bytesPerElement=60,Yo(Ka,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class Ja extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_,x,w,A,S,C,E,T,I,k){const M=this.length;return this.resize(M+1),this.emplace(M,e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_,x,w,A,S,C,E,T,I,k)}emplace(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_,x,w,A,S,C,E,T,I,k,M){const R=38*e,P=19*e;return this.int16[R+0]=t,this.int16[R+1]=r,this.int16[R+2]=n,this.float32[P+2]=o,this.float32[P+3]=i,this.int16[R+8]=a,this.int16[R+9]=s,this.int16[R+10]=l,this.int16[R+11]=c,this.int16[R+12]=u,this.int16[R+13]=d,this.uint16[R+14]=f,this.uint16[R+15]=p,this.uint16[R+16]=h,this.uint16[R+17]=m,this.uint16[R+18]=g,this.uint16[R+19]=y,this.uint16[R+20]=v,this.uint16[R+21]=b,this.uint16[R+22]=_,this.uint16[R+23]=x,this.uint16[R+24]=w,this.uint16[R+25]=A,this.uint16[R+26]=S,this.uint16[R+27]=C,this.uint16[R+28]=E,this.uint32[P+15]=T,this.float32[P+16]=I,this.float32[P+17]=k,this.float32[P+18]=M,e}}Ja.prototype.bytesPerElement=76,Yo(Ja,"StructArrayLayout3i2f6i15ui1ul3f76");class Qa extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[1*e+0]=t,e}}Qa.prototype.bytesPerElement=4,Yo(Qa,"StructArrayLayout1f4");class es extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,o){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n,o)}emplace(e,t,r,n,o,i){const a=5*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=o,this.float32[a+4]=i,e}}es.prototype.bytesPerElement=20,Yo(es,"StructArrayLayout5f20");class ts extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n)}emplace(e,t,r,n,o){const i=6*e;return this.uint32[3*e+0]=t,this.uint16[i+2]=r,this.uint16[i+3]=n,this.uint16[i+4]=o,e}}ts.prototype.bytesPerElement=12,Yo(ts,"StructArrayLayout1ul3ui12");class rs extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){const r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){const n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e}}rs.prototype.bytesPerElement=4,Yo(rs,"StructArrayLayout2ui4");class ns extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[1*e+0]=t,e}}ns.prototype.bytesPerElement=2,Yo(ns,"StructArrayLayout1ui2");class os extends Ra{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){const r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){const n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e}}os.prototype.bytesPerElement=8,Yo(os,"StructArrayLayout2f8");class is extends Ma{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.int16[this._pos2+3]}get tileAnchorY(){return this._structArray.int16[this._pos2+4]}get x1(){return this._structArray.float32[this._pos4+3]}get y1(){return this._structArray.float32[this._pos4+4]}get x2(){return this._structArray.float32[this._pos4+5]}get y2(){return this._structArray.float32[this._pos4+6]}get padding(){return this._structArray.int16[this._pos2+14]}get featureIndex(){return this._structArray.uint32[this._pos4+8]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+18]}get bucketIndex(){return this._structArray.uint16[this._pos2+19]}}is.prototype.size=40;class as extends Ha{get(e){return new is(this,e)}}Yo(as,"CollisionBoxArray");class ss extends Ma{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+8]}get numGlyphs(){return this._structArray.uint16[this._pos2+9]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+5]}get lineStartIndex(){return this._structArray.uint32[this._pos4+6]}get lineLength(){return this._structArray.uint32[this._pos4+7]}get segment(){return this._structArray.uint16[this._pos2+16]}get lowerSize(){return this._structArray.uint16[this._pos2+17]}get upperSize(){return this._structArray.uint16[this._pos2+18]}get lineOffsetX(){return this._structArray.float32[this._pos4+10]}get lineOffsetY(){return this._structArray.float32[this._pos4+11]}get writingMode(){return this._structArray.uint8[this._pos1+48]}get placedOrientation(){return this._structArray.uint8[this._pos1+49]}set placedOrientation(e){this._structArray.uint8[this._pos1+49]=e}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(e){this._structArray.uint8[this._pos1+50]=e}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(e){this._structArray.uint32[this._pos4+13]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(e){this._structArray.uint8[this._pos1+58]=e}}ss.prototype.size=60;class ls extends Ka{get(e){return new ss(this,e)}}Yo(ls,"PlacedSymbolArray");class cs extends Ma{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+8]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+9]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+10]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+11]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+12]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+13]}get key(){return this._structArray.uint16[this._pos2+14]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+17]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+18]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+19]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+20]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+21]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+22]}get featureIndex(){return this._structArray.uint16[this._pos2+23]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+24]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+25]}get numIconVertices(){return this._structArray.uint16[this._pos2+26]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+27]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+28]}get crossTileID(){return this._structArray.uint32[this._pos4+15]}set crossTileID(e){this._structArray.uint32[this._pos4+15]=e}get textOffset0(){return this._structArray.float32[this._pos4+16]}get textOffset1(){return this._structArray.float32[this._pos4+17]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+18]}}cs.prototype.size=76;class us extends Ja{get(e){return new cs(this,e)}}Yo(us,"SymbolInstanceArray");class ds extends Qa{getoffsetX(e){return this.float32[1*e+0]}}Yo(ds,"GlyphOffsetArray");class fs extends La{getx(e){return this.int16[2*e+0]}gety(e){return this.int16[2*e+1]}}Yo(fs,"SymbolLineVertexArray");class ps extends Ma{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}get layoutVertexArrayOffset(){return this._structArray.uint16[this._pos2+4]}}ps.prototype.size=12;class hs extends ts{get(e){return new ps(this,e)}}Yo(hs,"FeatureIndexArray");class ms extends rs{geta_centroid_pos0(e){return this.uint16[2*e+0]}geta_centroid_pos1(e){return this.uint16[2*e+1]}}Yo(ms,"FillExtrusionCentroidArray");const gs=Pa([{name:"a_pattern",components:4,type:"Uint16"},{name:"a_pixel_ratio",components:1,type:"Float32"}]),ys=Pa([{name:"a_dash",components:4,type:"Uint16"}]);var vs={exports:{}},bs=function(e,t){var r,n,o,i,a,s,l,c;for(n=e.length-(r=3&e.length),o=t,a=3432918353,s=461845907,c=0;c>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+((58964+(i>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:o^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return o^=e.length,o=2246822507*(65535&(o^=o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295,(o^=o>>>16)>>>0},_s=function(e,t){for(var r,n=e.length,o=t^n,i=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(r>>>16)&65535)<<16),o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:o^=(255&e.charCodeAt(i+2))<<16;case 2:o^=(255&e.charCodeAt(i+1))<<8;case 1:o=1540483477*(65535&(o^=255&e.charCodeAt(i)))+((1540483477*(o>>>16)&65535)<<16)}return o=1540483477*(65535&(o^=o>>>13))+((1540483477*(o>>>16)&65535)<<16),(o^=o>>>15)>>>0};vs.exports=bs,vs.exports.murmur3=bs,vs.exports.murmur2=_s;var xs=f(vs.exports);class ws{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,n){this.ids.push(As(e)),this.positions.push(t,r,n)}getPositions(e){const t=As(e);let r=0,n=this.ids.length-1;for(;r>1;this.ids[e]>=t?n=e:r=e+1}const o=[];for(;this.ids[r]===t;)o.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return o}static serialize(e,t){const r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Ss(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}}static deserialize(e){const t=new ws;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t}}function As(e){const t=+e;return!isNaN(t)&&Number.MIN_SAFE_INTEGER<=t&&t<=Number.MAX_SAFE_INTEGER?t:xs(String(e))}function Ss(e,t,r,n){for(;r>1];let i=r-1,a=n+1;for(;;){do{i++}while(e[i]o);if(i>=a)break;Cs(e,i,a),Cs(t,3*i,3*a),Cs(t,3*i+1,3*a+1),Cs(t,3*i+2,3*a+2)}a-r`u_${e}`)),this.type=r}setUniform(e,t,r,n,o){t.set(e,o,n.constantOr(this.value))}getBinding(e,t){return"color"===this.type?new ks(e):new Ts(e)}}class Ds{constructor(e,t){this.uniformNames=t.map((e=>`u_${e}`)),this.pattern=null,this.pixelRatio=1}setConstantPatternPositions(e){this.pixelRatio=e.pixelRatio||1,this.pattern=e.tl.concat(e.br)}setUniform(e,t,r,n,o){const i="u_pattern"===o||"u_dash"===o?this.pattern:"u_pixel_ratio"===o?this.pixelRatio:null;i&&t.set(e,o,i)}getBinding(e,t){return"u_pattern"===t||"u_dash"===t?new Is(e):new Ts(e)}}class Ns{constructor(e,t,r,n){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map((e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0}))),this.paintVertexArray=new n}populatePaintArray(e,t,r,n,o,i){const a=this.paintVertexArray.length,s=this.expression.evaluate(new ma(0),t,{},o,n,i);this.paintVertexArray.resize(e),this._setPaintValue(a,e,s)}updatePaintArray(e,t,r,n,o){const i=this.expression.evaluate({zoom:0},r,n,void 0,o);this._setPaintValue(e,t,i)}_setPaintValue(e,t,r){if("color"===this.type){const n=Os(r);for(let r=e;r`u_${e}_t`)),this.type=r,this.useIntegerZoom=n,this.zoom=o,this.maxValue=0,this.paintVertexAttributes=t.map((e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0}))),this.paintVertexArray=new i}populatePaintArray(e,t,r,n,o,i){const a=this.expression.evaluate(new ma(this.zoom),t,{},o,n,i),s=this.expression.evaluate(new ma(this.zoom+1),t,{},o,n,i),l=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(l,e,a,s)}updatePaintArray(e,t,r,n,o){const i=this.expression.evaluate({zoom:this.zoom},r,n,void 0,o),a=this.expression.evaluate({zoom:this.zoom+1},r,n,void 0,o);this._setPaintValue(e,t,i,a)}_setPaintValue(e,t,r,n){if("color"===this.type){const o=Os(r),i=Os(n);for(let r=e;r!0){this.binders={},this._buffers=[];const n=[];for(const o in e.paint._values){if(!r(o))continue;const i=e.paint.get(o);if(!(i instanceof wa&&Nn(i.property.specification)))continue;const a=$s(o,e.type),s=i.value,l=i.property.specification.type,c=!!i.property.useIntegerZoom,u="line-dasharray"===o||o.endsWith("pattern"),d="line-dasharray"===o&&"constant"!==e.layout.get("line-cap").value.kind;if("constant"!==s.kind||d)if("source"===s.kind||d||u){const t=Hs(o,l,"source");this.binders[o]=u?new zs(s,a,l,t,e.id):new Ns(s,a,l,t),n.push(`/a_${o}`)}else{const e=Hs(o,l,"composite");this.binders[o]=new Fs(s,a,l,c,t,e),n.push(`/z_${o}`)}else this.binders[o]=u?new Ds(s.value,a):new Ls(s.value,a,l),n.push(`/u_${o}`)}this.cacheKey=n.sort().join("")}getMaxValue(e){const t=this.binders[e];return t instanceof Ns||t instanceof Fs?t.maxValue:0}populatePaintArrays(e,t,r,n,o,i){for(const a in this.binders){const s=this.binders[a];(s instanceof Ns||s instanceof Fs||s instanceof zs)&&s.populatePaintArray(e,t,r,n,o,i)}}setConstantPatternPositions(e){for(const t in this.binders){const r=this.binders[t];r instanceof Ds&&r.setConstantPatternPositions(e)}}updatePaintArrays(e,t,r,n,o,i){let a=!1;for(const s in e){const l=t.getPositions(s);for(const t of l){const l=r.feature(t.index);for(const r in this.binders){const c=this.binders[r];if((c instanceof Ns||c instanceof Fs||c instanceof zs)&&!0===c.expression.isStateDependent){const u=n.paint.get(r);c.expression=u.value,c.updatePaintArray(t.start,t.end,l,e[s],o,i),a=!0}}}}return a}defines(){const e=[];for(const t in this.binders){const r=this.binders[t];(r instanceof Ls||r instanceof Ds)&&e.push(...r.uniformNames.map((e=>`#define HAS_UNIFORM_${e}`)))}return e}getBinderAttributes(){const e=[];for(const t in this.binders){const r=this.binders[t];if(r instanceof Ns||r instanceof Fs||r instanceof zs)for(let t=0;t!0){this.programConfigurations={};for(const n of e)this.programConfigurations[n.id]=new Bs(n,t,r);this.needsUpload=!1,this._featureMap=new ws,this._bufferOffset=0}populatePaintArrays(e,t,r,n,o,i,a){for(const r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,n,o,i,a);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,n,o){for(const i of r)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,t,i,n,o)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}const Us={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern","pixel_ratio"],"fill-pattern":["pattern","pixel_ratio"],"fill-extrusion-pattern":["pattern","pixel_ratio"],"line-dasharray":["dash"]};function $s(e,t){return Us[e]||[e.replace(`${t}-`,"").replace(/-/g,"_")]}const Vs={"line-pattern":{source:Ba,composite:Ba},"fill-pattern":{source:Ba,composite:Ba},"fill-extrusion-pattern":{source:Ba,composite:Ba},"line-dasharray":{source:ja,composite:ja}},Gs={color:{source:os,composite:za},number:{source:Qa,composite:os}};function Hs(e,t,r){const n=Vs[e];return n&&n[r]||Gs[t][r]}Yo(Ls,"ConstantBinder"),Yo(Ds,"PatternConstantBinder"),Yo(Ns,"SourceExpressionBinder"),Yo(zs,"PatternCompositeBinder"),Yo(Fs,"CompositeExpressionBinder"),Yo(Bs,"ProgramConfiguration",{omit:["_buffers"]}),Yo(js,"ProgramConfigurationSet");const Ws="-transition";class qs extends Qe{constructor(e,t){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&"sky"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new xa(t.layout)),t.paint)){this._transitionablePaint=new va(t.paint);for(const t in e.paint)this.setPaintProperty(t,e.paint[t],{validate:!1});for(const t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Aa(t.paint)}}getLayoutProperty(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,t,r={}){null!=t&&this._validate($o,`layers.${this.id}.layout.${e}`,e,t,r)||("visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t)}getPaintProperty(e){return B(e,Ws)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){if(null!=t&&this._validate(Uo,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(B(e,Ws))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{const r=this._transitionablePaint._values[e],n=r.value.isDataDriven(),o=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);const i=this._transitionablePaint._values[e].value,a=i.isDataDriven(),s=B(e,"pattern")||"line-dasharray"===e;return a||n||s||this._handleOverridablePaintPropertyUpdate(e,o,i)}}_handleSpecialPaintPropertyUpdate(e){}getProgramIds(){return null}getProgramConfiguration(e){return null}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){const e={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&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),U(e,((e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)))}_validate(e,t,r,n,o={}){return(!o||!1!==o.validate)&&Go(this,e.call(jo,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:et,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const e in this.paint._values){const t=this.paint.get(e);if(t instanceof wa&&Nn(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}compileFilter(){this._filterCompiled||(this._featureFilter=fo(this.filter),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}}const Xs=Pa([{name:"a_pos",components:2,type:"Int16"}],4),Zs=Pa([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class Ys{constructor(e=[]){this.segments=e}prepareSegment(e,t,r,n){let o=this.segments[this.segments.length-1];return e>Ys.MAX_VERTEX_ARRAY_LENGTH&&G(`Max vertices per segment is ${Ys.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!o||o.vertexLength+e>Ys.MAX_VERTEX_ARRAY_LENGTH||o.sortKey!==n)&&(o={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(o.sortKey=n),this.segments.push(o)),o}get(){return this.segments}destroy(){for(const e of this.segments)for(const t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,r,n){return new Ys([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])}}Ys.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Yo(Ys,"SegmentVector");var Ks=8192;class Js{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?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 Ic?new Ic(e.lng,e.lat):Ic.convert(e),this}setSouthWest(e){return this._sw=e instanceof Ic?new Ic(e.lng,e.lat):Ic.convert(e),this}extend(e){const t=this._sw,r=this._ne;let n,o;if(e instanceof Ic)n=e,o=e;else{if(!(e instanceof Js))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(Js.convert(e)):this.extend(Ic.convert(e)):"object"==typeof e&&null!==e&&e.hasOwnProperty("lat")&&(e.hasOwnProperty("lon")||e.hasOwnProperty("lng"))?this.extend(Ic.convert(e)):this;if(n=e._sw,o=e._ne,!n||!o)return this}return t||r?(t.lng=Math.min(n.lng,t.lng),t.lat=Math.min(n.lat,t.lat),r.lng=Math.max(o.lng,r.lng),r.lat=Math.max(o.lat,r.lat)):(this._sw=new Ic(n.lng,n.lat),this._ne=new Ic(o.lng,o.lat)),this}getCenter(){return new Ic((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 Ic(this.getWest(),this.getNorth())}getSouthEast(){return new Ic(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:t,lat:r}=Ic.convert(e);let n=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=t&&t>=this._ne.lng),this._sw.lat<=r&&r<=this._ne.lat&&n}static convert(e){return!e||e instanceof Js?e:new Js(e)}}var Qs=1e-6,el="undefined"!=typeof Float32Array?Float32Array:Array;function tl(){var e=new el(9);return el!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function rl(e,t,r){var n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=r[0],p=r[1],h=r[2],m=r[3],g=r[4],y=r[5],v=r[6],b=r[7],_=r[8];return e[0]=f*n+p*a+h*c,e[1]=f*o+p*s+h*u,e[2]=f*i+p*l+h*d,e[3]=m*n+g*a+y*c,e[4]=m*o+g*s+y*u,e[5]=m*i+g*l+y*d,e[6]=v*n+b*a+_*c,e[7]=v*o+b*s+_*u,e[8]=v*i+b*l+_*d,e}function nl(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ol(e,t){var r=t[0],n=t[1],o=t[2],i=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],p=t[11],h=t[12],m=t[13],g=t[14],y=t[15],v=r*s-n*a,b=r*l-o*a,_=r*c-i*a,x=n*l-o*s,w=n*c-i*s,A=o*c-i*l,S=u*m-d*h,C=u*g-f*h,E=u*y-p*h,T=d*g-f*m,I=d*y-p*m,k=f*y-p*g,M=v*k-b*I+_*T+x*E-w*C+A*S;return M?(e[0]=(s*k-l*I+c*T)*(M=1/M),e[1]=(o*I-n*k-i*T)*M,e[2]=(m*A-g*w+y*x)*M,e[3]=(f*w-d*A-p*x)*M,e[4]=(l*E-a*k-c*C)*M,e[5]=(r*k-o*E+i*C)*M,e[6]=(g*_-h*A-y*b)*M,e[7]=(u*A-f*_+p*b)*M,e[8]=(a*I-s*E+c*S)*M,e[9]=(n*E-r*I-i*S)*M,e[10]=(h*w-m*_+y*v)*M,e[11]=(d*_-u*w-p*v)*M,e[12]=(s*C-a*T-l*S)*M,e[13]=(r*T-n*C+o*S)*M,e[14]=(m*b-h*x-g*v)*M,e[15]=(u*x-d*b+f*v)*M,e):null}function il(e,t,r){var n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],p=t[10],h=t[11],m=t[12],g=t[13],y=t[14],v=t[15],b=r[0],_=r[1],x=r[2],w=r[3];return e[0]=b*n+_*s+x*d+w*m,e[1]=b*o+_*l+x*f+w*g,e[2]=b*i+_*c+x*p+w*y,e[3]=b*a+_*u+x*h+w*v,e[4]=(b=r[4])*n+(_=r[5])*s+(x=r[6])*d+(w=r[7])*m,e[5]=b*o+_*l+x*f+w*g,e[6]=b*i+_*c+x*p+w*y,e[7]=b*a+_*u+x*h+w*v,e[8]=(b=r[8])*n+(_=r[9])*s+(x=r[10])*d+(w=r[11])*m,e[9]=b*o+_*l+x*f+w*g,e[10]=b*i+_*c+x*p+w*y,e[11]=b*a+_*u+x*h+w*v,e[12]=(b=r[12])*n+(_=r[13])*s+(x=r[14])*d+(w=r[15])*m,e[13]=b*o+_*l+x*f+w*g,e[14]=b*i+_*c+x*p+w*y,e[15]=b*a+_*u+x*h+w*v,e}function al(e,t,r){var n,o,i,a,s,l,c,u,d,f,p,h,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(o=t[1],i=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],p=t[10],h=t[11],e[0]=n=t[0],e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=p,e[11]=h,e[12]=n*m+s*g+d*y+t[12],e[13]=o*m+l*g+f*y+t[13],e[14]=i*m+c*g+p*y+t[14],e[15]=a*m+u*g+h*y+t[15]),e}function sl(e,t,r){var n=r[0],o=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*o,e[5]=t[5]*o,e[6]=t[6]*o,e[7]=t[7]*o,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function ll(e,t,r){var n=Math.sin(r),o=Math.cos(r),i=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*o+c*n,e[5]=a*o+u*n,e[6]=s*o+d*n,e[7]=l*o+f*n,e[8]=c*o-i*n,e[9]=u*o-a*n,e[10]=d*o-s*n,e[11]=f*o-l*n,e}function cl(e,t,r){var n=Math.sin(r),o=Math.cos(r),i=t[0],a=t[1],s=t[2],l=t[3],c=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*o-c*n,e[1]=a*o-u*n,e[2]=s*o-d*n,e[3]=l*o-f*n,e[8]=i*n+c*o,e[9]=a*n+u*o,e[10]=s*n+d*o,e[11]=l*n+f*o,e}function ul(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function dl(e,t,r){var n,o,i,a=r[0],s=r[1],l=r[2],c=Math.hypot(a,s,l);return c0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function Cl(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function El(e,t,r){var n=t[0],o=t[1],i=t[2],a=r[0],s=r[1],l=r[2];return e[0]=o*l-i*s,e[1]=i*a-n*l,e[2]=n*s-o*a,e}function Tl(e,t,r){var n=t[0],o=t[1],i=t[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return e[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),e[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,e[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,e}function Il(e,t,r){var n=r[0],o=r[1],i=r[2],a=t[0],s=t[1],l=t[2],c=o*l-i*s,u=i*a-n*l,d=n*s-o*a,f=o*d-i*u,p=i*c-n*d,h=n*u-o*c,m=2*r[3];return u*=m,d*=m,p*=2,h*=2,e[0]=a+(c*=m)+(f*=2),e[1]=s+u+p,e[2]=l+d+h,e}var kl,Ml=vl,Rl=bl,Pl=ml;function Ol(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function Ll(e,t){var r=t[0],n=t[1],o=t[2],i=t[3],a=r*r+n*n+o*o+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=r*a,e[1]=n*a,e[2]=o*a,e[3]=i*a,e}function Dl(e,t,r){var n=t[0],o=t[1],i=t[2],a=t[3];return e[0]=r[0]*n+r[4]*o+r[8]*i+r[12]*a,e[1]=r[1]*n+r[5]*o+r[9]*i+r[13]*a,e[2]=r[2]*n+r[6]*o+r[10]*i+r[14]*a,e[3]=r[3]*n+r[7]*o+r[11]*i+r[15]*a,e}function Nl(){var e=new el(4);return el!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Fl(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function zl(e,t,r){r*=.5;var n=t[0],o=t[1],i=t[2],a=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l+a*s,e[1]=o*l+i*s,e[2]=i*l-o*s,e[3]=a*l-n*s,e}function Bl(e,t,r){r*=.5;var n=t[0],o=t[1],i=t[2],a=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l-i*s,e[1]=o*l+a*s,e[2]=i*l+n*s,e[3]=a*l-o*s,e}pl(),kl=new el(4),el!=Float32Array&&(kl[0]=0,kl[1]=0,kl[2]=0,kl[3]=0);var jl=Ll;pl(),gl(1,0,0),gl(0,1,0),Nl(),Nl(),tl();const Ul=Pa([{type:"Float32",name:"a_globe_pos",components:3},{type:"Float32",name:"a_uv",components:2}]),{members:$l}=Ul,Vl=Pa([{name:"a_pos_3",components:3,type:"Int16"}]);var Gl=Pa([{name:"a_pos",type:"Int16",components:2}]);class Hl{constructor(e,t){this.pos=e,this.dir=t}intersectsPlane(e,t,r){const n=Cl(t,this.dir);if(Math.abs(n)<1e-6)return!1;const o=((e[0]-this.pos[0])*t[0]+(e[1]-this.pos[1])*t[1]+(e[2]-this.pos[2])*t[2])/n;return r[0]=this.pos[0]+this.dir[0]*o,r[1]=this.pos[1]+this.dir[1]*o,r[2]=this.pos[2]+this.dir[2]*o,!0}closestPointOnSphere(e,t,r){if(function(e,t){var r=e[0],n=e[1],o=e[2],i=t[0],a=t[1],s=t[2];return Math.abs(r-i)<=Qs*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(n-a)<=Qs*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(o-s)<=Qs*Math.max(1,Math.abs(o),Math.abs(s))}(this.pos,e)||0===t)return r[0]=r[1]=r[2]=0,!1;const[n,o,i]=this.dir,a=this.pos[0]-e[0],s=this.pos[1]-e[1],l=this.pos[2]-e[2],c=n*n+o*o+i*i,u=2*(a*n+s*o+l*i),d=u*u-4*c*(a*a+s*s+l*l-t*t);if(d<0){const e=Math.max(-u/2,0),c=a+n*e,d=s+o*e,f=l+i*e,p=Math.hypot(c,d,f);return r[0]=c*t/p,r[1]=d*t/p,r[2]=f*t/p,!1}{const e=(-u-Math.sqrt(d))/(2*c);if(e<0){const e=Math.hypot(a,s,l);return r[0]=a*t/e,r[1]=s*t/e,r[2]=l*t/e,!1}return r[0]=a+n*e,r[1]=s+o*e,r[2]=l+i*e,!0}}}class Wl{constructor(e,t,r,n,o){this.TL=e,this.TR=t,this.BR=r,this.BL=n,this.horizon=o}static fromInvProjectionMatrix(e,t,r){const n=[-1,1,1],o=[1,1,1],i=[1,-1,1],a=[-1,-1,1],s=Tl(n,n,e),l=Tl(o,o,e),c=Tl(i,i,e),u=Tl(a,a,e);return new Wl(s,l,c,u,t/r)}}class ql{constructor(e,t){this.points=e,this.planes=t}static fromInvProjectionMatrix(e,t,r,n){const o=Math.pow(2,r),i=[[-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((r=>{const i=Dl([],r,e),a=1/i[3]/t*o;return function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}(i,i,[a,a,n?1/i[3]:a,a])})),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((e=>{const t=Sl([],El([],Ml([],i[e[0]],i[e[1]]),Ml([],i[e[2]],i[e[1]]))),r=-Cl(t,i[e[1]]);return t.concat(r)}));return new ql(i,a)}}class Xl{static fromPoints(e){const t=[1/0,1/0,1/0],r=[-1/0,-1/0,-1/0];for(const n of e)_l(t,t,n),xl(r,r,n);return new Xl(t,r)}static applyTransform(e,t){const r=e.getCorners();for(let e=0;e=0;if(0===i)return 0;i!==t.length&&(r=!1)}if(r)return 2;for(let t=0;t<3;t++){let r=Number.MAX_VALUE,n=-Number.MAX_VALUE;for(let o=0;othis.max[t]-this.min[t])return 0}return 1}}const Zl=Ks/Math.PI/2,Yl=64,Kl=[Yl,32,16],Jl=-Zl,Ql=Zl,ec=[new Xl([Jl,Jl,Jl],[Ql,Ql,Ql]),new Xl([Jl,Jl,Jl],[0,0,Ql]),new Xl([0,Jl,Jl],[Ql,0,Ql]),new Xl([Jl,0,Jl],[0,Ql,Ql]),new Xl([0,0,Jl],[Ql,Ql,Ql])];function tc(e){return e*Zl/Cc}function rc(e,t,r,n=!0){const o=wl([],e._camera.position,e.worldSize),i=[t,r,1,1];Dl(i,i,e.pixelMatrixInverse),Ol(i,i,1/i[3]);const a=Sl([],Ml([],i,o)),s=e.globeMatrix,l=[s[12],s[13],s[14]],c=Ml([],l,o),u=ml(c),d=Sl([],c),f=e.worldSize/(2*Math.PI),p=Cl(d,a),h=Math.asin(f/u);if(h1?null:function(e,t,r,n){const o=Math.sin(r);return e*(Math.sin((1-n)*r)/o)+t*(Math.sin(n*r)/o)}(e.a[t],e.b[t],e.angle,T(r,0,1))+e.center[t]}function ic(e){if(e.z<=1)return ec[e.z+2*e.y+e.x];const t=uc(cc(e));return Xl.fromPoints(t)}function ac(e,t,r){return wl(e,e,1-r),Al(e,e,t,r)}function sc(e,t){const r=bc(t.zoom);if(0===r)return ic(e);const n=cc(e),o=uc(n),i=Mc(n.getWest())*t.worldSize,a=Mc(n.getEast())*t.worldSize,s=Rc(n.getNorth())*t.worldSize,l=Rc(n.getSouth())*t.worldSize,c=[i,s,0],u=[a,s,0],d=[i,l,0],f=[a,l,0],p=ol([],t.globeMatrix);return Tl(c,c,p),Tl(u,u,p),Tl(d,d,p),Tl(f,f,p),o[0]=ac(o[0],d,r),o[1]=ac(o[1],f,r),o[2]=ac(o[2],u,r),o[3]=ac(o[3],c,r),Xl.fromPoints(o)}function lc(e,t,r){for(const n of e)Tl(n,n,t),wl(n,n,r)}function cc({x:e,y:t,z:r}){const n=1/(1<Math.PI/2*1.01}const wc=x(85),Ac=Math.cos(wc),Sc=Math.sin(wc),Cc=6371008.8,Ec=2*Math.PI*Cc;class Tc{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Tc(k(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){const t=Math.PI/180,r=this.lat*t,n=e.lat*t,o=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return Cc*Math.acos(Math.min(o,1))}toBounds(e=0){const t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new Js(new Tc(this.lng-r,this.lat-t),new Tc(this.lng+r,this.lat+t))}toEcef(e){const t=tc(e);return fc(this.lat,this.lng,Zl+t)}static convert(e){if(e instanceof Tc)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Tc(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Tc(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}var Ic=Tc;function kc(e){return Ec*Math.cos(e*Math.PI/180)}function Mc(e){return(180+e)/360}function Rc(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Pc(e,t){return e/kc(t)}function Oc(e){return 360*e-180}function Lc(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function Dc(e,t){return e*kc(Lc(t))}const Nc=85.051129;function Fc(e){return 1/Math.cos(e*Math.PI/180)}class zc{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(e,t=0){const r=Ic.convert(e);return new zc(Mc(r.lng),Rc(r.lat),Pc(t,r.lat))}toLngLat(){return new Ic(Oc(this.x),Lc(this.y))}toAltitude(){return Dc(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Ec*Fc(Lc(this.y))}}function Bc(e,t,r,n,o,i,a,s,l){const c=(t+n)/2,u=(r+o)/2,d=new v(c,u);s(d),function(e,t,r,n,o,i){const a=r-o,s=n-i;return Math.abs((n-t)*a-(r-e)*s)/Math.hypot(a,s)}(d.x,d.y,i.x,i.y,a.x,a.y)>=l?(Bc(e,t,r,c,u,i,d,s,l),Bc(e,c,u,n,o,d,a,s,l)):e.push(a)}function jc(e,t,r){let n=e[0],o=n.x,i=n.y;t(n);const a=[n];for(let s=1;se.x+1||ne.y+1)&&G("Geometry exceeds allowed extent, reduce your vector tile buffer size"),e}function Wc(e,t,r){const n=e.loadGeometry(),o=e.extent,i=Ks/o;if(t&&r&&r.projection.isReprojectedInTileSpace){const i=1<{const r=Oc((t.x+e.x/o)/i),n=Lc((t.y+e.y/o)/i),u=c.project(r,n);e.x=(u.x*a-s)*o,e.y=(u.y*a-l)*o};for(let t=0;t=o||r.y<0||r.y>=o||(u(r),e.push(r));n[t]=e}}for(const e of n)for(const t of e)Hc(t,i);return n}function qc(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Wc(e):[]}}function Xc(e,t,r,n,o){e.emplaceBack(2*t+(n+1)/2,2*r+(o+1)/2)}function Zc(e,t,r){const n=16384;e.emplaceBack(t.x,t.y,t.z,r[0]*n,r[1]*n,r[2]*n)}class Yc{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.projection=e.projection,this.layoutVertexArray=new La,this.indexArray=new Ya,this.segments=new Ys,this.programConfigurations=new js(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,r,n){const o=this.layers[0],i=[];let a=null;"circle"===o.type&&(a=o.layout.get("circle-sort-key"));for(const{feature:t,id:o,index:s,sourceLayerIndex:l}of e){const e=this.layers[0]._featureFilter.needGeometry,c=qc(t,e);if(!this.layers[0]._featureFilter.filter(new ma(this.zoom),c,r))continue;const u=a?a.evaluate(c,{},r):void 0,d={id:o,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:Wc(t,r,n),patterns:{},sortKey:u};i.push(d)}a&&i.sort(((e,t)=>e.sortKey-t.sortKey));let s=null;"globe"===n.projection.name&&(this.globeExtVertexArray=new Ua,s=n.projection);for(const n of i){const{geometry:o,index:i,sourceLayerIndex:a}=n,l=e[i].feature;this.addFeature(n,o,i,t.availableImages,r,s),t.featureIndex.insert(l,o,i,a,this.index)}}update(e,t,r,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Xs.members),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=e.createVertexBuffer(this.globeExtVertexArray,Zs.members))),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}addFeature(e,t,r,n,o,i){for(const r of t)for(const t of r){const r=t.x,n=t.y;if(r<0||r>=Ks||n<0||n>=Ks)continue;if(i){const e=i.projectTilePoint(r,n,o),t=i.upVector(o,r,n),a=this.globeExtVertexArray;Zc(a,e,t),Zc(a,e,t),Zc(a,e,t),Zc(a,e,t)}const a=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),s=a.vertexLength;Xc(this.layoutVertexArray,r,n,-1,-1),Xc(this.layoutVertexArray,r,n,1,-1),Xc(this.layoutVertexArray,r,n,1,1),Xc(this.layoutVertexArray,r,n,-1,1),this.indexArray.emplaceBack(s,s+1,s+2),this.indexArray.emplaceBack(s,s+2,s+3),a.vertexLength+=4,a.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},n,o)}}function Kc(e,t){for(let r=0;r1){if(tu(e,t))return!0;for(let n=0;n1?r:r.sub(t)._mult(o)._add(t))}function iu(e,t){let r,n,o,i=!1;for(let a=0;at.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(i=!i)}return i}function au(e,t){let r=!1;for(let n=0,o=e.length-1;nt.y!=a.y>t.y&&t.x<(a.x-i.x)*(t.y-i.y)/(a.y-i.y)+i.x&&(r=!r)}return r}function su(e,t,r,n,o){for(const i of e)if(t<=i.x&&r<=i.y&&n>=i.x&&o>=i.y)return!0;const i=[new v(t,r),new v(t,o),new v(n,o),new v(n,r)];if(e.length>2)for(const t of i)if(au(e,t))return!0;for(let t=0;to.x&&t.x>o.x||e.yo.y&&t.y>o.y)return!1;const i=H(e,t,r[0]);return i!==H(e,t,r[1])||i!==H(e,t,r[2])||i!==H(e,t,r[3])}function cu(e,t,r){const n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function uu(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function du(e,t,r,n,o){if(!t[0]&&!t[1])return e;const i=v.convert(t)._mult(o);"viewport"===r&&i._rotate(-n);const a=[];for(let t=0;t0){const e=r.projection.upVector(c,d.x,d.y);p.x+=e[0]*u*f,p.y+=e[1]*u*f,p.z+=e[2]*u*f}const h=i?d:gu(p.x,p.y,p.z,n),m=i?e.tilespaceRays.map((e=>bu(e,f))):e.queryGeometry.screenGeometry,g=Dl([],[p.x,p.y,p.z,1],n);if(!a&&i?l*=g[3]/r.cameraToCenterDistance:a&&!i&&(l*=r.cameraToCenterDistance/g[3]),i){const e=Lc((t.y/Ks+c.y)/(1<e.width||o.height>e.height||r.x>e.width-o.width||r.y>e.height-o.height)throw new RangeError("out of range source coordinates for image copy");if(o.width>t.width||o.height>t.height||n.x>t.width-o.width||n.y>t.height-o.height)throw new RangeError("out of range destination coordinates for image copy");const a=e.data,s=t.data;for(let l=0;l{t[e.evaluationKey]=i;const a=e.expression.evaluate(t);o.data[r+n+0]=Math.floor(255*a.r/a.a),o.data[r+n+1]=Math.floor(255*a.g/a.a),o.data[r+n+2]=Math.floor(255*a.b/a.a),o.data[r+n+3]=Math.floor(255*a.a)};if(e.clips)for(let t=0,o=0;t80*r){n=i=e[0],o=a=e[1];for(var h=r;hi&&(i=s),l>a&&(a=l);c=0!==(c=Math.max(i-n,a-o))?32767/c:0}return Du(f,p,r,n,o,c,0),p}function Ou(e,t,r,n,o){var i,a;if(o===nd(e,t,r,n)>0)for(i=t;i=t;i-=n)a=ed(i,e[i],e[i+1],a);return a&&Xu(a,a.next)&&(td(a),a=a.next),a}function Lu(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!Xu(n,n.next)&&0!==qu(n.prev,n,n.next))n=n.next;else{if(td(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function Du(e,t,r,n,o,i,a){if(e){!a&&i&&function(e,t,r,n){var o=e;do{0===o.z&&(o.z=Vu(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,a,s,l,c=1;do{for(r=e,e=null,i=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(o=r,r=r.nextZ,s--):(o=n,n=n.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}(e,n,o,i);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,i?Fu(e,n,o,i):Nu(e))t.push(s.i/r|0),t.push(e.i/r|0),t.push(l.i/r|0),td(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?Du(e=zu(Lu(e),t,r),t,r,n,o,i,2):2===a&&Bu(e,t,r,n,o,i):Du(Lu(e),t,r,n,o,i,1);break}}}function Nu(e){var t=e.prev,r=e,n=e.next;if(qu(t,r,n)>=0)return!1;for(var o=t.x,i=r.x,a=n.x,s=t.y,l=r.y,c=n.y,u=oi?o>a?o:a:i>a?i:a,p=s>l?s>c?s:c:l>c?l:c,h=n.next;h!==t;){if(h.x>=u&&h.x<=f&&h.y>=d&&h.y<=p&&Hu(o,s,i,l,a,c,h.x,h.y)&&qu(h.prev,h,h.next)>=0)return!1;h=h.next}return!0}function Fu(e,t,r,n){var o=e.prev,i=e,a=e.next;if(qu(o,i,a)>=0)return!1;for(var s=o.x,l=i.x,c=a.x,u=o.y,d=i.y,f=a.y,p=sl?s>c?s:c:l>c?l:c,g=u>d?u>f?u:f:d>f?d:f,y=Vu(p,h,t,r,n),v=Vu(m,g,t,r,n),b=e.prevZ,_=e.nextZ;b&&b.z>=y&&_&&_.z<=v;){if(b.x>=p&&b.x<=m&&b.y>=h&&b.y<=g&&b!==o&&b!==a&&Hu(s,u,l,d,c,f,b.x,b.y)&&qu(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,_.x>=p&&_.x<=m&&_.y>=h&&_.y<=g&&_!==o&&_!==a&&Hu(s,u,l,d,c,f,_.x,_.y)&&qu(_.prev,_,_.next)>=0)return!1;_=_.nextZ}for(;b&&b.z>=y;){if(b.x>=p&&b.x<=m&&b.y>=h&&b.y<=g&&b!==o&&b!==a&&Hu(s,u,l,d,c,f,b.x,b.y)&&qu(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;_&&_.z<=v;){if(_.x>=p&&_.x<=m&&_.y>=h&&_.y<=g&&_!==o&&_!==a&&Hu(s,u,l,d,c,f,_.x,_.y)&&qu(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function zu(e,t,r){var n=e;do{var o=n.prev,i=n.next.next;!Xu(o,i)&&Zu(o,n,n.next,i)&&Ju(o,i)&&Ju(i,o)&&(t.push(o.i/r|0),t.push(n.i/r|0),t.push(i.i/r|0),td(n),td(n.next),n=e=i),n=n.next}while(n!==e);return Lu(n)}function Bu(e,t,r,n,o,i){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Wu(a,s)){var l=Qu(a,s);return a=Lu(a,a.next),l=Lu(l,l.next),Du(a,t,r,n,o,i,0),void Du(l,t,r,n,o,i,0)}s=s.next}a=a.next}while(a!==e)}function ju(e,t){return e.x-t.x}function Uu(e,t){var r=function(e,t){var r,n=t,o=e.x,i=e.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=o&&s>a&&(a=s,r=n.x=n.x&&n.x>=u&&o!==n.x&&Hu(ir.x||n.x===r.x&&$u(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(e,t);if(!r)return t;var n=Qu(r,e);return Lu(n,n.next),Lu(r,r.next)}function $u(e,t){return qu(e.prev,e,t.prev)<0&&qu(t.next,e,e.next)<0}function Vu(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Gu(e){var t=e,r=e;do{(t.x=(e-a)*(i-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(i-s)>=(o-a)*(n-s)}function Wu(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Zu(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(Ju(e,t)&&Ju(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(qu(e.prev,e,t.prev)||qu(e,t.prev,t))||Xu(e,t)&&qu(e.prev,e,e.next)>0&&qu(t.prev,t,t.next)>0)}function qu(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Xu(e,t){return e.x===t.x&&e.y===t.y}function Zu(e,t,r,n){var o=Ku(qu(e,t,r)),i=Ku(qu(e,t,n)),a=Ku(qu(r,n,e)),s=Ku(qu(r,n,t));return o!==i&&a!==s||!(0!==o||!Yu(e,r,t))||!(0!==i||!Yu(e,n,t))||!(0!==a||!Yu(r,e,n))||!(0!==s||!Yu(r,t,n))}function Yu(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Ku(e){return e>0?1:e<0?-1:0}function Ju(e,t){return qu(e.prev,e,e.next)<0?qu(e,t,e.next)>=0&&qu(e,e.prev,t)>=0:qu(e,t,e.prev)<0||qu(e,e.next,t)<0}function Qu(e,t){var r=new rd(e.i,e.x,e.y),n=new rd(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function ed(e,t,r,n){var o=new rd(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function td(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function rd(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function nd(e,t,r,n){for(var o=0,i=t,a=r-n;i0&&r.holes.push(n+=e[o-1].length)}return r};var od=f(Ru.exports);function id(e,t,r,n,o){ad(e,t,r||0,n||e.length-1,o||ld)}function ad(e,t,r,n,o){for(;n>r;){if(n-r>600){var i=n-r+1,a=t-r+1,s=Math.log(i),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(i-l)/i)*(a-i/2<0?-1:1);ad(e,t,Math.max(r,Math.floor(t-a*l/i+c)),Math.min(n,Math.floor(t+(i-a)*l/i+c)),o)}var u=e[t],d=r,f=n;for(sd(e,r,t),o(e[n],u)>0&&sd(e,r,n);d0;)f--}0===o(e[r],u)?sd(e,r,f):sd(e,++f,n),f<=t&&(r=f+1),t<=f&&(n=f-1)}}function sd(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function ld(e,t){return et?1:0}function cd(e,t){const r=e.length;if(r<=1)return[e];const n=[];let o,i;for(let t=0;t1)for(let e=0;ee.id)),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new La,this.indexArray=new Ya,this.indexArray2=new rs,this.programConfigurations=new js(e.layers,e.zoom),this.segments=new Ys,this.segments2=new Ys,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id)),this.projection=e.projection}populate(e,t,r,n){this.hasPattern=dd("fill",this.layers,t);const o=this.layers[0].layout.get("fill-sort-key"),i=[];for(const{feature:a,id:s,index:l,sourceLayerIndex:c}of e){const e=this.layers[0]._featureFilter.needGeometry,u=qc(a,e);if(!this.layers[0]._featureFilter.filter(new ma(this.zoom),u,r))continue;const d=o?o.evaluate(u,{},r,t.availableImages):void 0,f={id:s,properties:a.properties,type:a.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:Wc(a,r,n),patterns:{},sortKey:d};i.push(f)}o&&i.sort(((e,t)=>e.sortKey-t.sortKey));for(const n of i){const{geometry:o,index:i,sourceLayerIndex:a}=n;if(this.hasPattern){const e=fd("fill",this.layers,n,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(n,o,i,r,{},t.availableImages);t.featureIndex.insert(e[i].feature,o,i,a,this.index)}}update(e,t,r,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r,n)}addFeatures(e,t,r,n,o){for(const e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,r,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Mu),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),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(e,t,r,n,o,i=[]){for(const e of cd(t,500)){let t=0;for(const r of e)t+=r.length;const r=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray),n=r.vertexLength,o=[],i=[];for(const t of e){if(0===t.length)continue;t!==e[0]&&i.push(o.length/2);const r=this.segments2.prepareSegment(t.length,this.layoutVertexArray,this.indexArray2),n=r.vertexLength;this.layoutVertexArray.emplaceBack(t[0].x,t[0].y),this.indexArray2.emplaceBack(n+t.length-1,n),o.push(t[0].x),o.push(t[0].y);for(let e=1;e>3}if(o--,1===n||2===n)i+=e.readSVarint(),a+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new xd(i,a));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&s.push(t),s},Ad.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,o=0,i=0,a=1/0,s=-1/0,l=1/0,c=-1/0;e.pos>3}if(n--,1===r||2===r)(o+=e.readSVarint())s&&(s=o),(i+=e.readSVarint())c&&(c=i);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,c]},Ad.prototype.toGeoJSON=function(e,t,r){var n,o,i=this.extent*Math.pow(2,r),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=Ad.types[this.type];function u(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(r))}Id.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Ed(this._pbf,t,this.extent,this._keys,this._values)};var Md=Td;function Rd(e,t,r){if(3===e){var n=new Md(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}var Pd=_d.VectorTile=function(e,t){this.layers=e.readFields(Rd,{},t)},Od=_d.VectorTileFeature=wd;function Ld(e,t,r,n){const o=[],i=0===n?(e,t,r,n,o,i)=>{e.push(new v(i,r+(i-t)/(n-t)*(o-r)))}:(e,t,r,n,o,i)=>{e.push(new v(t+(i-r)/(o-r)*(n-t),i))};for(const a of e){const e=[];for(const o of a){if(o.length<=2)continue;const a=[];for(let e=0;et&&i(a,s,l,c,u,t):d>r?f=t&&i(a,s,l,c,u,t),f>r&&d<=r&&i(a,s,l,c,u,r)}let s=o[o.length-1];const l=0===n?s.x:s.y;l>=t&&l<=r&&a.push(s),a.length&&(s=a[a.length-1],a[0].x===s.x&&a[0].y===s.y||a.push(a[0]),e.push(a))}e.length&&o.push(e)}return o}_d.VectorTileLayer=Td;const Dd=Od.types,Nd=Math.pow(2,13);function Fd(e,t,r,n,o,i,a,s){e.emplaceBack((t<<1)+a,(r<<1)+i,(Math.floor(n*Nd)<<1)+o,Math.round(s))}function zd(e,t,r){const n=16384;e.emplaceBack(t.x,t.y,t.z,r[0]*n,r[1]*n,r[2]*n)}class Bd{constructor(){this.acc=new v(0,0),this.polyCount=[]}startRing(e){this.currentPolyCount={edges:0,top:0},this.polyCount.push(this.currentPolyCount),this.min||(this.min=new v(e.x,e.y),this.max=new v(e.x,e.y))}append(e,t){this.currentPolyCount.edges++,this.acc._add(e);const r=this.min,n=this.max;e.xn.x&&(n.x=e.x),e.yn.y&&(n.y=e.y),((0===e.x||e.x===Ks)&&e.x===t.x)!=((0===e.y||e.y===Ks)&&e.y===t.y)&&this.processBorderOverlap(e,t),t.x<0!=e.x<0&&this.addBorderIntersection(0,Rr(t.y,e.y,(0-t.x)/(e.x-t.x))),t.x>Ks!=e.x>Ks&&this.addBorderIntersection(1,Rr(t.y,e.y,(Ks-t.x)/(e.x-t.x))),t.y<0!=e.y<0&&this.addBorderIntersection(2,Rr(t.x,e.x,(0-t.y)/(e.y-t.y))),t.y>Ks!=e.y>Ks&&this.addBorderIntersection(3,Rr(t.x,e.x,(Ks-t.y)/(e.y-t.y)))}addBorderIntersection(e,t){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);const r=this.borders[e];tr[1]&&(r[1]=t)}processBorderOverlap(e,t){if(e.x===t.x){if(e.y===t.y)return;const r=0===e.x?0:1;this.addBorderIntersection(r,t.y),this.addBorderIntersection(r,e.y)}else{const r=0===e.y?2:3;this.addBorderIntersection(r,t.x),this.addBorderIntersection(r,e.x)}}centroid(){const e=this.polyCount.reduce(((e,t)=>e+t.edges),0);return 0!==e?this.acc.div(e)._round():new v(0,0)}span(){return new v(this.max.x-this.min.x,this.max.y-this.min.y)}intersectsCount(){return this.borders.reduce(((e,t)=>e+ +(t[0]!==Number.MAX_VALUE)),0)}}class jd{constructor(e){this.zoom=e.zoom,this.canonical=e.canonical,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.edgeRadius=0,this.projection=e.projection,this.layoutVertexArray=new Na,this.centroidVertexArray=new ms,this.indexArray=new Ya,this.programConfigurations=new js(e.layers,e.zoom),this.segments=new Ys,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id)),this.enableTerrain=e.enableTerrain}populate(e,t,r,n){this.features=[],this.hasPattern=dd("fill-extrusion",this.layers,t),this.featuresOnBorder=[],this.borders=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.tileToMeter=function(e){const t=Math.exp(Math.PI*(1-e.y/(1<=0;e--){const t=f[e];(0===t.length||(p=t[0]).every((e=>e.x<=0))||p.every((e=>e.x>=Ks))||p.every((e=>e.y<=0))||p.every((e=>e.y>=Ks)))&&f.splice(e,1)}var p;let h;if(c)h=Xd(f,s,n);else{h=[];for(const e of f)h.push({polygon:e,bounds:s})}const m=d?this.edgeRadius:0;for(const{polygon:e,bounds:t}of h){let r=0,o=0;for(const t of e)d&&!t[0].equals(t[t.length-1])&&t.push(t[0]),o+=d?t.length-1:t.length;const i=this.segments.prepareSegment((d?5:4)*o,this.layoutVertexArray,this.indexArray);if(d){const t=[],o=[];r=i.vertexLength;for(const r of e){let a,s;r.length&&r!==e[0]&&o.push(t.length/2),a=r[1].sub(r[0])._perp()._unit();for(let e=1;e4&&Hd(o[o.length-2],o[0],o[1]),p=m?$d(o[o.length-2],o[0],o[1],m):0;a=o[1].sub(o[0])._perp()._unit();let h=!0;for(let g=1,y=0;g0?1:0,S=v.dist(b);if(y+S>32768&&(y=0),m){s=_.sub(b)._perp()._unit();let e=Vd(v,b,_,Ud(a,s),m);isNaN(e)&&(e=0);const t=b.sub(v)._unit();v=v.add(t.mult(p))._round(),b=b.add(t.mult(-e))._round(),p=e,a=s}const C=i.vertexLength,E=o.length>4&&Hd(v,b,_);let T=Wd(y,f,h);if(Fd(this.layoutVertexArray,v.x,v.y,w,A,0,0,T),Fd(this.layoutVertexArray,v.x,v.y,w,A,0,1,T),y+=S,T=Wd(y,E,!h),f=E,Fd(this.layoutVertexArray,b.x,b.y,w,A,0,0,T),Fd(this.layoutVertexArray,b.x,b.y,w,A,0,1,T),i.vertexLength+=4,this.indexArray.emplaceBack(C+0,C+1,C+2),this.indexArray.emplaceBack(C+1,C+3,C+2),i.primitiveLength+=2,m){const n=r+(1===g?o.length-2:g-2),a=1===g?r:n+1;if(this.indexArray.emplaceBack(C+1,n,C+3),this.indexArray.emplaceBack(n,a,C+3),i.primitiveLength+=2,void 0===e&&(e=C),!Gd(_,o[g],t)){const t=g===o.length-1?e:i.vertexLength;this.indexArray.emplaceBack(C+2,C+3,t),this.indexArray.emplaceBack(C+3,t+1,t),this.indexArray.emplaceBack(C+3,a,t+1),i.primitiveLength+=3}h=!h}if(c){const e=this.layoutVertexExtArray,t=l.projectTilePoint(v.x,v.y,n),r=l.projectTilePoint(b.x,b.y,n),o=l.upVector(n,v.x,v.y),i=l.upVector(n,b.x,b.y);zd(e,t,o),zd(e,t,o),zd(e,r,i),zd(e,r,i)}}d&&(r+=o.length-1)}}if(u&&u.polyCount.length>0){if(u.borders){u.vertexArrayOffset=this.centroidVertexArray.length;const e=u.borders,t=this.featuresOnBorder.push(u)-1;for(let r=0;r<4;r++)e[r][0]!==Number.MAX_VALUE&&this.borders[r].push(t)}this.encodeCentroid(u.borders?void 0:u.centroid(),u)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,o,i,n)}sortBorders(){for(let e=0;e<4;e++)this.borders[e].sort(((t,r)=>this.featuresOnBorder[t].borders[e][0]-this.featuresOnBorder[r].borders[e][0]))}encodeCentroid(e,t,r=!0){let n,o;if(e)if(0!==e.y){const r=t.span()._mult(this.tileToMeter);n=(Math.max(e.x,1)<<3)+Math.min(7,Math.round(r.x/10)),o=(Math.max(e.y,1)<<3)+Math.min(7,Math.round(r.y/10))}else n=Math.ceil(7*(e.x+450)),o=0;else n=0,o=+r;let i=r?this.centroidVertexArray.length:t.vertexArrayOffset;for(const e of t.polyCount){r&&this.centroidVertexArray.resize(this.centroidVertexArray.length+4*e.edges+e.top);for(let t=0;tr[1].x&&t.x>r[1].x||e.yr[1].y&&t.y>r[1].y}function Hd(e,t,r){if(e.x<0||e.x>=Ks||t.x<0||t.x>=Ks||r.x<0||r.x>=Ks)return!1;const n=r.sub(t),o=n.perp(),i=e.sub(t);return(n.x*i.x+n.y*i.y)/Math.sqrt((n.x*n.x+n.y*n.y)*(i.x*i.x+i.y*i.y))>-.866&&o.x*i.x+o.y*i.y<0}function Wd(e,t,r){const n=t?2|e:-3&e;return r?1|n:-2&n}function qd(){const e=Math.PI/32,t=Math.tan(e),r=Cc;return r*Math.sqrt(1+2*t*t)-r}function Xd(e,t,r){const n=1<{for(const r of e)a.push({polygon:r,bounds:t})},l=Math.ceil(Math.log2(r)),c=Math.ceil(Math.log2(n)),u=l-c,d=[];for(let e=0;e0?0:1);for(let e=0;et+1?p.push({polygons:f,bounds:e,depth:t+1}):s(f,e)}if(h.length){const e=[new v(0===r?u:n.x,1===r?u:n.y),a];d.length>t+1?p.push({polygons:h,bounds:e,depth:t+1}):s(h,e)}}return a}(e,t,Math.ceil((i-o)/11.25),Math.ceil((a-s)/11.25),1,((e,t,o)=>{if(0===e)return.5*(t+o);{const e=Lc((r.y+t/Ks)/n);return(Rc(.5*(Lc((r.y+o/Ks)/n)+e))*n-r.y)*Ks}}))}Yo(jd,"FillExtrusionBucket",{omit:["layers","features"]}),Yo(Bd,"PartMetadata");const Zd=new Ta({"fill-extrusion-edge-radius":new Sa(et["layout_fill-extrusion"]["fill-extrusion-edge-radius"])});var Yd={paint:new Ta({"fill-extrusion-opacity":new Sa(et["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ca(et["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Sa(et["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Sa(et["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ca(et["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ca(et["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ca(et["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Sa(et["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]),"fill-extrusion-ambient-occlusion-intensity":new Sa(et["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-intensity"]),"fill-extrusion-ambient-occlusion-radius":new Sa(et["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-radius"]),"fill-extrusion-rounded-roof":new Sa(et["paint_fill-extrusion"]["fill-extrusion-rounded-roof"])}),layout:Zd};function Kd(e,t,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[e*n-2*Math.PI*6378137/2,t*n-2*Math.PI*6378137/2]}class Jd{constructor(e,t,r){this.z=e,this.x=t,this.y=r,this.key=tf(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t){const r=function(e,t,r){var n=Kd(256*e,256*(t=Math.pow(2,r)-t-1),r),o=Kd(256*(e+1),256*(t+1),r);return n[0]+","+n[1]+","+o[0]+","+o[1]}(this.x,this.y,this.z),n=function(e,t,r){let n,o="";for(let i=e;i>0;i--)n=1<this.canonical.z?new ef(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ef(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}calculateScaledKey(e,t=!0){if(this.overscaledZ===e&&t)return this.key;if(e>this.canonical.z)return tf(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y);{const r=this.canonical.z-e;return tf(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)}}isChildOf(e){if(e.wrap!==this.wrap)return!1;const t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new ef(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new ef(t,this.wrap,t,r,n),new ef(t,this.wrap,t,r+1,n),new ef(t,this.wrap,t,r,n+1),new ef(t,this.wrap,t,r+1,n+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.ye.id)),this.index=e.index,this.projection=e.projection,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((e=>{this.gradients[e.id]={}})),this.layoutVertexArray=new Fa,this.layoutVertexArray2=new za,this.indexArray=new Ya,this.programConfigurations=new js(e.layers,e.zoom),this.segments=new Ys,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,r,n){this.hasPattern=dd("line",this.layers,t);const o=this.layers[0].layout.get("line-sort-key"),i=[];for(const{feature:t,id:a,index:s,sourceLayerIndex:l}of e){const e=this.layers[0]._featureFilter.needGeometry,c=qc(t,e);if(!this.layers[0]._featureFilter.filter(new ma(this.zoom),c,r))continue;const u=o?o.evaluate(c,{},r):void 0,d={id:a,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:Wc(t,r,n),patterns:{},sortKey:u};i.push(d)}o&&i.sort(((e,t)=>e.sortKey-t.sortKey));const{lineAtlas:a,featureIndex:s}=t,l=this.addConstantDashes(a);for(const n of i){const{geometry:o,index:i,sourceLayerIndex:c}=n;if(l&&this.addFeatureDashes(n,a),this.hasPattern){const e=fd("line",this.layers,n,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(n,o,i,r,a.positions,t.availableImages);s.insert(e[i].feature,o,i,c,this.index)}}addConstantDashes(e){let t=!1;for(const r of this.layers){const n=r.paint.get("line-dasharray").value,o=r.layout.get("line-cap").value;if("constant"!==n.kind||"constant"!==o.kind)t=!0;else{const t=o.value,r=n.value;if(!r)continue;e.addDash(r,t)}}return t}addFeatureDashes(e,t){const r=this.zoom;for(const n of this.layers){const o=n.paint.get("line-dasharray").value,i=n.layout.get("line-cap").value;if("constant"===o.kind&&"constant"===i.kind)continue;let a,s;if("constant"===o.kind){if(a=o.value,!a)continue}else a=o.evaluate({zoom:r},e);s="constant"===i.kind?i.value:i.evaluate({zoom:r},e),t.addDash(a,s),e.patterns[n.id]=t.getKey(a,s)}}update(e,t,r,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r,n)}addFeatures(e,t,r,n,o){for(const e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,r,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,uf)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,lf),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,t,r,n,o,i){const a=this.layers[0].layout,s=a.get("line-join").evaluate(e,{}),l=a.get("line-cap").evaluate(e,{}),c=a.get("line-miter-limit"),u=a.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(const r of t)this.addLine(r,e,s,l,c,u);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,o,i,n)}addLine(e,t,r,n,o,i){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineSoFar=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t=2&&e[s-1].equals(e[s-2]);)s--;let l=0;for(;l0;if(x&&t>l){const e=d.dist(f);if(e>2*c){const t=d.sub(d.sub(f)._mult(c/e)._round());this.updateDistance(f,t),this.addCurrentVertex(t,h,0,0,u),f=t}}const A=f&&p;let S=A?r:a?"butt":n;if(A&&"round"===S&&(bo&&(S="bevel"),"bevel"===S&&(b>2&&(S="flipbevel"),b100)g=m.mult(-1);else{const e=b*h.add(m).mag()/h.sub(m).mag();g._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(d,g,0,0,u),this.addCurrentVertex(d,g.mult(-1),0,0,u)}else if("bevel"===S||"fakeround"===S){const e=-Math.sqrt(b*b-1),t=w?e:0,r=w?0:e;if(f&&this.addCurrentVertex(d,h,t,r,u),"fakeround"===S){const e=Math.round(180*_/Math.PI/20);for(let t=1;t2*c){const t=d.add(p.sub(d)._mult(c/e)._round());this.updateDistance(d,t),this.addCurrentVertex(t,m,0,0,u),d=t}}}}addCurrentVertex(e,t,r,n,o,i=!1){const a=t.y*n-t.x,s=-t.y-t.x*n;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,i,!1,r,o),this.addHalfVertex(e,a,s,i,!0,-n,o)}addHalfVertex({x:e,y:t},r,n,o,i,a,s){this.layoutVertexArray.emplaceBack((e<<1)+(o?1:0),(t<<1)+(i?1:0),Math.round(63*r)+128,Math.round(63*n)+128,1+(0===a?0:a<0?-1:1),0,this.lineSoFar),this.lineClips&&this.layoutVertexArray2.emplaceBack(this.scaledDistance,this.lineClipsArray.length,this.lineClips.start,this.lineClips.end);const l=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),s.primitiveLength++),i?this.e2=l:this.e1=l}updateScaledDistance(){if(this.lineClips){const e=this.totalDistance/(this.lineClips.end-this.lineClips.start);this.scaledDistance=this.distance/this.totalDistance,this.lineSoFar=e*this.lineClips.start+this.distance}else this.lineSoFar=this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}}Yo(pf,"LineBucket",{omit:["layers","patternFeatures"]});const hf=new Ta({"line-cap":new Ca(et.layout_line["line-cap"]),"line-join":new Ca(et.layout_line["line-join"]),"line-miter-limit":new Sa(et.layout_line["line-miter-limit"]),"line-round-limit":new Sa(et.layout_line["line-round-limit"]),"line-sort-key":new Ca(et.layout_line["line-sort-key"])});var mf={paint:new Ta({"line-opacity":new Ca(et.paint_line["line-opacity"]),"line-color":new Ca(et.paint_line["line-color"]),"line-translate":new Sa(et.paint_line["line-translate"]),"line-translate-anchor":new Sa(et.paint_line["line-translate-anchor"]),"line-width":new Ca(et.paint_line["line-width"]),"line-gap-width":new Ca(et.paint_line["line-gap-width"]),"line-offset":new Ca(et.paint_line["line-offset"]),"line-blur":new Ca(et.paint_line["line-blur"]),"line-dasharray":new Ca(et.paint_line["line-dasharray"]),"line-pattern":new Ca(et.paint_line["line-pattern"]),"line-gradient":new Ea(et.paint_line["line-gradient"]),"line-trim-offset":new Sa(et.paint_line["line-trim-offset"])}),layout:hf};const gf=new class extends Ca{possiblyEvaluate(e,t){return t=new ma(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,n){return t=P({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,n)}}(mf.paint.properties["line-width"].specification);function yf(e,t){return t>0?t+2*e:e}gf.useIntegerZoom=!0;const vf=Pa([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_tex_size",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),bf=Pa([{name:"a_globe_anchor",components:3,type:"Int16"},{name:"a_globe_normal",components:3,type:"Float32"}],4),_f=Pa([{name:"a_projected_pos",components:4,type:"Float32"}],4);Pa([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const xf=Pa([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),wf=Pa([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"}]);Pa([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Int16",name:"tileAnchorX"},{type:"Int16",name:"tileAnchorY"},{type:"Float32",name:"x1"},{type:"Float32",name:"y1"},{type:"Float32",name:"x2"},{type:"Float32",name:"y2"},{type:"Int16",name:"padding"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Af=Pa([{name:"a_pos",components:3,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Sf=Pa([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Pa([{name:"triangle",components:3,type:"Uint16"}]),Pa([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"},{type:"Uint8",name:"flipState"}]),Pa([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Pa([{type:"Float32",name:"offsetX"}]),Pa([{type:"Int16",name:"x"},{type:"Int16",name:"y"}]);var Cf=24;const Ef=128;function Tf(e,t){const{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new ma(e+1))};if("source"===r.kind)return{kind:"source"};{const{zoomStops:t,interpolationType:n}=r;let o=0;for(;o{e.text=function(e,t,r){const n=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),ha.applyArabicShaping&&(e=ha.applyArabicShaping(e)),e}(e.text,t,r)})),e}const Pf={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂","←":"↑","→":"↓"};function Of(e){return"︶"===e||"﹈"===e||"︸"===e||"﹄"===e||"﹂"===e||"︾"===e||"︼"===e||"︺"===e||"︘"===e||"﹀"===e||"︐"===e||"︓"===e||"︔"===e||"`"===e||" ̄"===e||"︑"===e||"︒"===e}function Lf(e){return"︵"===e||"﹇"===e||"︷"===e||"﹃"===e||"﹁"===e||"︽"===e||"︻"===e||"︹"===e||"︗"===e||"︿"===e}var Df=zf,Nf=function(e,t,r,n,o){var i,a,s=8*o-n-1,l=(1<>1,u=-7,d=r?o-1:0,f=r?-1:1,p=e[t+d];for(d+=f,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=c}return(p?-1:1)*a*Math.pow(2,i-n)},Ff=function(e,t,r,n,o,i){var a,s,l,c=8*i-o-1,u=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=255&s,p+=h,s/=256,o-=8);for(a=a<0;e[r+p]=255&a,p+=h,a/=256,c-=8);e[r+p-h]|=128*m};function zf(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}zf.Varint=0,zf.Fixed64=1,zf.Bytes=2,zf.Fixed32=5;var Bf=4294967296,jf=1/Bf,Uf="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function $f(e){return e.type===zf.Bytes?e.readVarint()+e.pos:e.pos+1}function Vf(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function Gf(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var o=r.pos-1;o>=e;o--)r.buf[o+n]=r.buf[o]}function Hf(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function rp(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}zf.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,i=this.pos;this.type=7&n,e(o,t,this),this.pos===i&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=ep(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=rp(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=ep(this.buf,this.pos)+ep(this.buf,this.pos+4)*Bf;return this.pos+=8,e},readSFixed64:function(){var e=ep(this.buf,this.pos)+rp(this.buf,this.pos+4)*Bf;return this.pos+=8,e},readFloat:function(){var e=Nf(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Nf(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:function(e,t,r){var n,o,i=r.buf;if(n=(112&(o=i[r.pos++]))>>4,o<128)return Vf(e,n,t);if(n|=(127&(o=i[r.pos++]))<<3,o<128)return Vf(e,n,t);if(n|=(127&(o=i[r.pos++]))<<10,o<128)return Vf(e,n,t);if(n|=(127&(o=i[r.pos++]))<<17,o<128)return Vf(e,n,t);if(n|=(127&(o=i[r.pos++]))<<24,o<128)return Vf(e,n,t);if(n|=(1&(o=i[r.pos++]))<<31,o<128)return Vf(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&Uf?function(e,t,r){return Uf.decode(e.subarray(t,r))}(this.buf,t,e):function(e,t,r){for(var n="",o=t;o239?4:l>223?3:l>191?2:1;if(o+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(i=e[o+1]))&&(c=(31&l)<<6|63&i)<=127&&(c=null):3===u?(a=e[o+2],128==(192&(i=e[o+1]))&&128==(192&a)&&((c=(15&l)<<12|(63&i)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=e[o+2],s=e[o+3],128==(192&(i=e[o+1]))&&128==(192&a)&&128==(192&s)&&((c=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),o+=u}return n}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==zf.Bytes)return e.push(this.readVarint(t));var r=$f(this);for(e=e||[];this.pos127;);else if(t===zf.Bytes)this.pos=this.readVarint()+this.pos;else if(t===zf.Fixed32)this.pos+=4;else{if(t!==zf.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,r.buf[r.pos]=127&(e>>>=7)}(r,0,t),function(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,o,i=0;i55295&&n<57344){if(!o){n>56319||i+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):o=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,o=n;continue}n=o-55296<<10|n-56320|65536,o=null}else o&&(e[r++]=239,e[r++]=191,e[r++]=189,o=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Gf(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Ff(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Ff(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&Gf(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,zf.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,Hf,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Wf,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Zf,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,qf,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,Xf,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Yf,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,Kf,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,Jf,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Qf,t)},writeBytesField:function(e,t){this.writeTag(e,zf.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,zf.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,zf.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,zf.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,zf.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,zf.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,zf.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,zf.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,zf.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,zf.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var np=f(Df);function op(e,t,r){t.glyphs=[],1===e&&r.readMessage(ip,t)}function ip(e,t,r){if(3===e){const{id:e,bitmap:n,width:o,height:i,left:a,top:s,advance:l}=r.readMessage(ap,{});t.glyphs.push({id:e,bitmap:new Su({width:o+6,height:i+6},n),metrics:{width:o,height:i,left:a,top:s,advance:l}})}else 4===e?t.ascender=r.readSVarint():5===e&&(t.descender=r.readSVarint())}function ap(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function sp(e){let t=0,r=0;for(const n of e)t+=n.w*n.h,r=Math.max(r,n.w);e.sort(((e,t)=>t.h-e.h));const n=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}];let o=0,i=0;for(const t of e)for(let e=n.length-1;e>=0;e--){const r=n[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,i=Math.max(i,t.y+t.h),o=Math.max(o,t.x+t.w),t.w===r.w&&t.h===r.h){const t=n.pop();ee.hasImage(t))),e.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const r in e.updatedImages)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t),this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)}patchUpdatedImage(e,t,r){if(!e||!t)return;if(e.version===t.version)return;e.version=t.version;const[n,o]=e.tl;r.update(t.data,void 0,{x:n,y:o})}}Yo(lp,"ImagePosition"),Yo(cp,"ImageAtlas");const up={horizontal:1,vertical:2,horizontalOnly:3};class dp{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(e,t){const r=new dp;return r.scale=e||1,r.fontStack=t,r}static forImage(e){const t=new dp;return t.imageName=e,t}}class fp{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(e,t){const r=new fp;for(let n=0;n=0&&r>=e&&hp[this.text.charCodeAt(r)];r--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){const r=new fp;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((e,t)=>Math.max(e,this.sections[t].scale)),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(dp.forText(e.scale,e.fontStack||t));const r=this.sections.length-1;for(let t=0;t=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function pp(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h){const m=fp.fromFeature(e,o);d===up.vertical&&m.verticalizePunctuation(f);let g=[];const y=function(e,t,r,n,o,i){if(!e)return[];const a=[],s=function(e,t,r,n,o,i){let a=0;for(let r=0;r=0;let c=0;for(let r=0;r0&&i>x&&(x=i)}else{const e=r[s.fontStack];if(!e)continue;e[m]&&(S=e[m]);const n=t[s.fontStack];if(!n)continue;const i=n.glyphs[m];if(!i)continue;if(b=i.metrics,E=8203!==m?Cf:0,g){const e=void 0!==n.ascender?Math.abs(n.ascender):0,t=void 0!==n.descender?Math.abs(n.descender):0,r=(e+t)*y;w-r/2;){if(a--,a<0)return!1;s-=e[a].dist(i),i=e[a]}s+=e[a].dist(e[a+1]),a++;const l=[];let c=0;for(;sn;)c-=l.shift().angleDelta;if(c>o)return!1;a++,s+=t.dist(r)}return!0}function Tp(e){let t=0;for(let r=0;rc){const u=(c-l)/i,d=Rr(n.x,o.x,u),f=Rr(n.y,o.y,u),p=new Cp(d,f,0,o.angleTo(n),r);return!a||Ep(e,p,s,a,t)?p:void 0}l+=i}}function Rp(e,t,r,n,o,i,a,s,l){const c=Ip(n,i,a),u=kp(n,o),d=u*a,f=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-d=0&&y=0&&v=0&&f+c<=u){const r=new Cp(y,v,0,m,t);r._round(),n&&!Ep(e,r,i,n,o)||p.push(r)}}d+=h}return s||p.length||a||(p=Pp(e,d/2,r,n,o,i,a,!0,l)),p}function Op(e,t,r,n,o){const i=[];for(let a=0;a=n&&c.x>=n||(a.x>=n?a=new v(n,a.y+(n-a.x)/(c.x-a.x)*(c.y-a.y))._round():c.x>=n&&(c=new v(n,a.y+(n-a.x)/(c.x-a.x)*(c.y-a.y))._round()),a.y>=o&&c.y>=o||(a.y>=o?a=new v(a.x+(o-a.y)/(c.y-a.y)*(c.x-a.x),o)._round():c.y>=o&&(c=new v(a.x+(o-a.y)/(c.y-a.y)*(c.x-a.x),o)._round()),l&&a.equals(l[l.length-1])||(l=[a],i.push(l)),l.push(c)))))}}return i}Yo(Cp,"Anchor");const Lp=1e20;function Dp(e,t,r,n,o,i,a,s,l){for(let c=t;c-1);l++,i[l]=s,a[l]=c,a[l+1]=Lp}for(let s=0,l=0;s{let n=this.entries[e];n||(n=this.entries[e]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let o=n.glyphs[t];if(void 0!==o)return void r(null,{stack:e,id:t,glyph:o});if(o=this._tinySDF(n,e,t),o)return n.glyphs[t]=o,void r(null,{stack:e,id:t,glyph:o});const i=Math.floor(t/256);if(256*i>65535)return void r(new Error("glyphs > 65535 not supported"));if(n.ranges[i])return void r(null,{stack:e,id:t,glyph:o});let a=n.requests[i];a||(a=n.requests[i]=[],zp.loadGlyphRange(e,i,this.url,this.requestManager,((e,t)=>{if(t){n.ascender=t.ascender,n.descender=t.descender;for(const e in t.glyphs)this._doesCharSupportLocalGlyph(+e)||(n.glyphs[+e]=t.glyphs[+e]);n.ranges[i]=!0}for(const r of a)r(e,t);delete n.requests[i]}))),a.push(((n,o)=>{n?r(n):o&&r(null,{stack:e,id:t,glyph:o.glyphs[t]||null})}))}),((e,r)=>{if(e)t(e);else if(r){const e={};for(const{stack:t,id:n,glyph:o}of r)void 0===e[t]&&(e[t]={}),void 0===e[t].glyphs&&(e[t].glyphs={}),e[t].glyphs[n]=o&&{id:o.id,bitmap:o.bitmap.clone(),metrics:o.metrics},e[t].ascender=this.entries[t].ascender,e[t].descender=this.entries[t].descender;t(null,e)}}))}_doesCharSupportLocalGlyph(e){return this.localGlyphMode!==Fp.none&&(this.localGlyphMode===Fp.all?!!this.localFontFamily:!!this.localFontFamily&&(Di(e)||Bi(e)||Ai(e)||Si(e)||wi(e)))}_tinySDF(e,t,r){const n=this.localFontFamily;if(!n||!this._doesCharSupportLocalGlyph(r))return;let o=e.tinySDF;if(!o){let r="400";/bold/i.test(t)?r="900":/medium/i.test(t)?r="500":/light/i.test(t)&&(r="200"),o=e.tinySDF=new zp.TinySDF({fontFamily:n,fontWeight:r,fontSize:48,buffer:6,radius:16}),o.fontWeight=r}if(this.localGlyphs[o.fontWeight][r])return this.localGlyphs[o.fontWeight][r];const i=String.fromCharCode(r),{data:a,width:s,height:l,glyphWidth:c,glyphHeight:u,glyphLeft:d,glyphTop:f,glyphAdvance:p}=o.draw(i);return this.localGlyphs[o.fontWeight][r]={id:r,bitmap:new Su({width:s,height:l},a),metrics:{width:c/2,height:u/2,left:d/2,top:f/2-27,advance:p/2,localGlyph:!0}}}}zp.loadGlyphRange=function(e,t,r,n,o){const i=256*t,a=i+255,s=n.transformRequest(n.normalizeGlyphsURL(r).replace("{fontstack}",e).replace("{range}",`${i}-${a}`),le.Glyphs);fe(s,((e,t)=>{if(e)o(e);else if(t){const e={},r=function(e){return new np(e).readFields(op,{})}(t);for(const t of r.glyphs)e[t.id]=t;o(null,{glyphs:e,ascender:r.ascender,descender:r.descender})}}))},zp.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:n=.25,fontFamily:o="sans-serif",fontWeight:i="normal",fontStyle:a="normal"}={}){this.buffer=t,this.cutoff=n,this.radius=r;const s=this.size=e+4*t,l=this._createCanvas(s),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font=`${a} ${i} ${e}px ${o}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(e){const t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){const{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:n,actualBoundingBoxLeft:o,actualBoundingBoxRight:i}=this.ctx.measureText(e),a=Math.ceil(r),s=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(i-o))),l=Math.min(this.size-this.buffer,a+Math.ceil(n)),c=s+2*this.buffer,u=l+2*this.buffer,d=Math.max(c*u,0),f=new Uint8ClampedArray(d),p={data:f,width:c,height:u,glyphWidth:s,glyphHeight:l,glyphTop:a,glyphLeft:0,glyphAdvance:t};if(0===s||0===l)return p;const{ctx:h,buffer:m,gridInner:g,gridOuter:y}=this;h.clearRect(m,m,s,l),h.fillText(e,m,m+a);const v=h.getImageData(m,m,s,l);y.fill(Lp,0,d),g.fill(0,0,d);for(let e=0;e0?e*e:0,g[n]=e<0?e*e:0}}Dp(y,0,0,c,u,c,this.f,this.v,this.z),Dp(g,m,m,s,l,c,this.f,this.v,this.z);for(let e=0;ee+t[1]-t[0],h=d.reduce(p,0),m=f.reduce(p,0),g=s-h,y=l-m;let b=0,_=h,x=0,w=m,A=0,S=g,C=0,E=y;if(i.content&&n){const e=i.content;b=jp(d,0,e[0]),x=jp(f,0,e[1]),_=jp(d,e[0],e[2]),w=jp(f,e[1],e[3]),A=e[0]-b,C=e[1]-x,S=e[2]-e[0]-_,E=e[3]-e[1]-w}const T=(n,o,s,l)=>{const d=$p(n.stretch-b,_,c,e.left),f=Vp(n.fixed-A,S,n.stretch,h),p=$p(o.stretch-x,w,u,e.top),g=Vp(o.fixed-C,E,o.stretch,m),y=$p(s.stretch-b,_,c,e.left),T=Vp(s.fixed-A,S,s.stretch,h),I=$p(l.stretch-x,w,u,e.top),k=Vp(l.fixed-C,E,l.stretch,m),M=new v(d,p),R=new v(y,p),P=new v(y,I),O=new v(d,I),L=new v(f/a,g/a),D=new v(T/a,k/a),N=t*Math.PI/180;if(N){const e=Math.sin(N),t=Math.cos(N),r=[t,-e,e,t];M._matMult(r),R._matMult(r),O._matMult(r),P._matMult(r)}const F=n.stretch+n.fixed,z=o.stretch+o.fixed;return{tl:M,tr:R,bl:O,br:P,tex:{x:i.paddedRect.x+1+F,y:i.paddedRect.y+1+z,w:s.stretch+s.fixed-F,h:l.stretch+l.fixed-z},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:L,pixelOffsetBR:D,minFontScaleX:S/a/c,minFontScaleY:E/a/u,isSDF:r}};if(n&&(i.stretchX||i.stretchY)){const e=Up(d,g,h),t=Up(f,y,m);for(let r=0;r0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:r}=this,n=t[e];for(;e>0;){const o=e-1>>1,i=t[o];if(r(n,i)>=0)break;t[e]=i,e=o}t[e]=n}_down(e){const{data:t,compare:r}=this,n=this.length>>1,o=t[e];for(;e=0)break;t[e]=i,e=n}t[e]=o}}function Wp(e,t){return et?1:0}function qp(e,t=1,r=!1){let n=1/0,o=1/0,i=-1/0,a=-1/0;const s=e[0];for(let e=0;ei)&&(i=t.x),(!e||t.y>a)&&(a=t.y)}const l=Math.min(i-n,a-o);let c=l/2;const u=new Hp([],Xp);if(0===l)return new v(n,o);for(let t=n;td.d||!d.d)&&(d=n,r&&console.log("found best %d after %d probes",Math.round(1e4*n.d)/1e4,f)),n.max-d.d<=t||(c=n.h/2,u.push(new Zp(n.p.x-c,n.p.y-c,c,e)),u.push(new Zp(n.p.x+c,n.p.y-c,c,e)),u.push(new Zp(n.p.x-c,n.p.y+c,c,e)),u.push(new Zp(n.p.x+c,n.p.y+c,c,e)),f+=4)}return r&&(console.log(`num probes: ${f}`),console.log(`best distance: ${d.d}`)),d.p}function Xp(e,t){return t.max-e.max}class Zp{constructor(e,t,r,n){this.p=new v(e,t),this.h=r,this.d=function(e,t){let r=!1,n=1/0;for(let o=0;oe.y!=s.y>e.y&&e.x<(s.x-o.x)*(e.y-o.y)/(s.y-o.y)+o.x&&(r=!r),n=Math.min(n,ou(e,o,s))}}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}}const Yp=Number.POSITIVE_INFINITY,Kp=Math.sqrt(2);function Jp(e,[t,r]){let n=0,o=0;if(r===Yp){t<0&&(t=0);const r=t/Kp;switch(e){case"top-right":case"top-left":o=r-7;break;case"bottom-right":case"bottom-left":o=7-r;break;case"bottom":o=7-t;break;case"top":o=t-7}switch(e){case"top-right":case"bottom-right":n=-r;break;case"top-left":case"bottom-left":n=r;break;case"left":n=t;break;case"right":n=-t}}else{switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":o=r-7;break;case"bottom-right":case"bottom-left":case"bottom":o=7-r}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}}return[n,o]}function Qp(e,t,r,n,o,i,a,s,l,c){e.createArrays(),e.tilePixelRatio=Ks/(512*e.overscaling),e.compareText={},e.iconsNeedLinear=!1;const u=e.layers[0].layout,d=e.layers[0]._unevaluatedLayout._values,f={};if("composite"===e.textSizeData.kind){const{minZoom:t,maxZoom:r}=e.textSizeData;f.compositeTextSizes=[d["text-size"].possiblyEvaluate(new ma(t),s),d["text-size"].possiblyEvaluate(new ma(r),s)]}if("composite"===e.iconSizeData.kind){const{minZoom:t,maxZoom:r}=e.iconSizeData;f.compositeIconSizes=[d["icon-size"].possiblyEvaluate(new ma(t),s),d["icon-size"].possiblyEvaluate(new ma(r),s)]}f.layoutTextSize=d["text-size"].possiblyEvaluate(new ma(l+1),s),f.layoutIconSize=d["icon-size"].possiblyEvaluate(new ma(l+1),s),f.textMaxSize=d["text-size"].possiblyEvaluate(new ma(18),s);const p="map"===u.get("text-rotation-alignment")&&"point"!==u.get("symbol-placement"),h=u.get("text-size");for(const i of e.features){const l=u.get("text-font").evaluate(i,{},s).join(","),d=h.evaluate(i,{},s),m=f.layoutTextSize.evaluate(i,{},s),g=(f.layoutIconSize.evaluate(i,{},s),{horizontal:{},vertical:void 0}),y=i.text;let v,b=[0,0];if(y){const n=y.toString(),a=u.get("text-letter-spacing").evaluate(i,{},s)*Cf,c=u.get("text-line-height").evaluate(i,{},s)*Cf,f=Yi(n)?a:0,h=u.get("text-anchor").evaluate(i,{},s),v=u.get("text-variable-anchor");if(!v){const e=u.get("text-radial-offset").evaluate(i,{},s);b=e?Jp(h,[e*Cf,Yp]):u.get("text-offset").evaluate(i,{},s).map((e=>e*Cf))}let _=p?"center":u.get("text-justify").evaluate(i,{},s);const x="point"===u.get("symbol-placement"),w=x?u.get("text-max-width").evaluate(i,{},s)*Cf:1/0,A=i=>{e.allowVerticalPlacement&&Zi(n)&&(g.vertical=pp(y,t,r,o,l,w,c,h,i,f,b,up.vertical,!0,m,d))};if(!p&&v){const e="auto"===_?v.map((e=>eh(e))):[_];let n=!1;for(let i=0;i=0||!Zi(n)){const e=pp(y,t,r,o,l,w,c,h,_,f,b,up.horizontal,!1,m,d);e&&(g.horizontal[_]=e)}A(x?"left":_)}}let _=!1;if(i.icon&&i.icon.name){const t=n[i.icon.name];t&&(v=Ap(o[i.icon.name],u.get("icon-offset").evaluate(i,{},s),u.get("icon-anchor").evaluate(i,{},s)),_=t.sdf,void 0===e.sdfIcons?e.sdfIcons=t.sdf:e.sdfIcons!==t.sdf&&G("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(t.pixelRatio!==e.pixelRatio||0!==u.get("icon-rotate").constantOr(1))&&(e.iconsNeedLinear=!0))}const x=ih(g.horizontal)||g.vertical;e.iconsInText||(e.iconsInText=!!x&&x.iconsInText),(x||v)&&th(e,i,g,v,n,f,m,0,b,_,a,s,c)}i&&e.generateCollisionDebugBuffers(l,e.collisionBoxArray)}function eh(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function th(e,t,r,n,o,i,a,s,l,c,u,d,f){let p=i.textMaxSize.evaluate(t,{},d);void 0===p&&(p=a);const h=e.layers[0].layout,m=h.get("icon-offset").evaluate(t,{},d),g=ih(r.horizontal)||r.vertical,y="globe"===f.name,v=a/24,b=e.tilePixelRatio*p/24,_=(k=e.overscaling,e.zoom>18&&k>2&&(k>>=1),Math.max(Ks/(512*k),1)*h.get("symbol-spacing")),w=h.get("text-padding")*e.tilePixelRatio,A=h.get("icon-padding")*e.tilePixelRatio,S=x(h.get("text-max-angle")),C="map"===h.get("text-rotation-alignment")&&"point"!==h.get("symbol-placement"),E="map"===h.get("icon-rotation-alignment")&&"point"!==h.get("symbol-placement"),T=h.get("symbol-placement"),I=_/2;var k;const M=h.get("icon-text-fit");let R;n&&"none"!==M&&(e.allowVerticalPlacement&&r.vertical&&(R=Sp(n,r.vertical,M,h.get("icon-text-fit-padding"),m,v)),g&&(n=Sp(n,g,M,h.get("icon-text-fit-padding"),m,v)));const P=(a,s,p)=>{if(s.x<0||s.x>=Ks||s.y<0||s.y>=Ks)return;let h=null;if(y){const{x:e,y:t,z:r}=f.projectTilePoint(s.x,s.y,p);h={anchor:new Cp(e,t,r,0,void 0),up:f.upVector(p,s.x,s.y)}}!function(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b,_,x,w,A,S){const C=e.addToLineVertexArray(t,n);let E,T,I,k,M,R,P,O=0,L=0,D=0,N=0,F=-1,z=-1;const B={};let j=xs("");const U=r?r.anchor:t;let $=0,V=0;if(void 0===l._unevaluatedLayout.getValue("text-radial-offset")?[$,V]=l.layout.get("text-offset").evaluate(_,{},S).map((e=>e*Cf)):($=l.layout.get("text-radial-offset").evaluate(_,{},S)*Cf,V=Yp),e.allowVerticalPlacement&&o.vertical){const e=o.vertical;if(h)R=sh(e),s&&(P=sh(s));else{const r=l.layout.get("text-rotate").evaluate(_,{},S)+90;I=ah(c,U,t,u,d,f,e,p,r,m),s&&(k=ah(c,U,t,u,d,f,s,y,r))}}if(i){const n=l.layout.get("icon-rotate").evaluate(_,{},S),o="none"!==l.layout.get("icon-text-fit"),a=Bp(i,n,w,o),p=s?Bp(s,n,w,o):void 0;T=ah(c,U,t,u,d,f,i,y,n),O=4*a.length;const h=e.iconSizeData;let m=null;"source"===h.kind?(m=[Ef*l.layout.get("icon-size").evaluate(_,{},S)],m[0]>nh&&G(`${e.layerIds[0]}: Value for "icon-size" is >= ${rh}. Reduce your "icon-size".`)):"composite"===h.kind&&(m=[Ef*x.compositeIconSizes[0].evaluate(_,{},S),Ef*x.compositeIconSizes[1].evaluate(_,{},S)],(m[0]>nh||m[1]>nh)&&G(`${e.layerIds[0]}: Value for "icon-size" is >= ${rh}. Reduce your "icon-size".`)),e.addSymbols(e.icon,a,m,b,v,_,!1,r,t,C.lineStartIndex,C.lineLength,-1,A,S),F=e.icon.placedSymbolArray.length-1,p&&(L=4*p.length,e.addSymbols(e.icon,p,m,b,v,_,up.vertical,r,t,C.lineStartIndex,C.lineLength,-1,A,S),z=e.icon.placedSymbolArray.length-1)}for(const n in o.horizontal){const i=o.horizontal[n];E||(j=xs(i.text),h?M=sh(i):E=ah(c,U,t,u,d,f,i,p,l.layout.get("text-rotate").evaluate(_,{},S),m));const s=1===i.positionedLines.length;if(D+=oh(e,r,t,i,a,l,h,_,m,C,o.vertical?up.horizontal:up.horizontalOnly,s?Object.keys(o.horizontal):[n],B,F,x,A,S),s)break}o.vertical&&(N+=oh(e,r,t,o.vertical,a,l,h,_,m,C,up.vertical,["vertical"],B,z,x,A,S));let H=-1;const W=(e,t)=>e?Math.max(e,t):t;H=W(M,H),H=W(R,H),H=W(P,H);const q=H>-1?1:0;e.glyphOffsetArray.length>=jh.MAX_GLYPHS&&G("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,_.sortKey),e.symbolInstances.emplaceBack(U.x,U.y,U.z,t.x,t.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical>=0?B.vertical:-1,F,z,j,void 0!==E?E:e.collisionBoxArray.length,void 0!==E?E+1:e.collisionBoxArray.length,void 0!==I?I:e.collisionBoxArray.length,void 0!==I?I+1:e.collisionBoxArray.length,void 0!==T?T:e.collisionBoxArray.length,void 0!==T?T+1:e.collisionBoxArray.length,k||e.collisionBoxArray.length,k?k+1:e.collisionBoxArray.length,u,D,N,O,L,q,0,$,V,H)}(e,s,h,a,r,n,o,R,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,w,C,l,0,A,E,m,t,i,c,u,d)};if("line"===T)for(const o of Op(t.geometry,0,0,Ks,Ks)){const t=Rp(o,_,S,r.vertical||g,n,24,b,e.overscaling,Ks);for(const r of t)g&&lh(e,g.text,I,r)||P(o,r,d)}else if("line-center"===T){for(const e of t.geometry)if(e.length>1){const t=Mp(e,S,r.vertical||g,n,24,b);t&&P(e,t,d)}}else if("Polygon"===t.type)for(const e of cd(t.geometry,0)){const t=qp(e,16);P(e[0],new Cp(t.x,t.y,0,0,void 0),d)}else if("LineString"===t.type)for(const e of t.geometry)P(e,new Cp(e[0].x,e[0].y,0,0,void 0),d);else if("Point"===t.type)for(const e of t.geometry)for(const t of e)P([t],new Cp(t.x,t.y,0,0,void 0),d)}const rh=255,nh=rh*Ef;function oh(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g){const y=function(e,t,r,n,o,i,a,s){const l=[];if(0===t.positionedLines.length)return l;const c=n.layout.get("text-rotate").evaluate(i,{})*Math.PI/180,u=function(e){const t=e[0],r=e[1],n=t*r;return n>0?[t,-r]:n<0?[-t,r]:0===t?[r,t]:[r,-t]}(r);let d=Math.abs(t.top-t.bottom);for(const e of t.positionedLines)d-=e.lineOffset;const f=t.positionedLines.length,p=d/f;let h=t.top-r[1];for(let e=0;enh&&G(`${e.layerIds[0]}: Value for "text-size" is >= ${rh}. Reduce your "text-size".`)):"composite"===b.kind&&(_=[Ef*h.compositeTextSizes[0].evaluate(s,{},g),Ef*h.compositeTextSizes[1].evaluate(s,{},g)],(_[0]>nh||_[1]>nh)&&G(`${e.layerIds[0]}: Value for "text-size" is >= ${rh}. Reduce your "text-size".`)),e.addSymbols(e.text,y,_,l,a,s,u,t,r,c.lineStartIndex,c.lineLength,p,m,g);for(const t of d)f[t]=e.text.placedSymbolArray.length-1;return 4*y.length}function ih(e){for(const t in e)return e[t];return null}function ah(e,t,r,n,o,i,a,s,l,c){let u=a.top,d=a.bottom,f=a.left,p=a.right;const h=a.collisionPadding;if(h&&(f-=h[0],u-=h[1],p+=h[2],d+=h[3]),l){const e=new v(f,u),t=new v(p,u),r=new v(f,d),n=new v(p,d),o=x(l);let i=new v(0,0);c&&(i=new v(c[0],c[1])),e._rotateAround(o,i),t._rotateAround(o,i),r._rotateAround(o,i),n._rotateAround(o,i),f=Math.min(e.x,t.x,r.x,n.x),p=Math.max(e.x,t.x,r.x,n.x),u=Math.min(e.y,t.y,r.y,n.y),d=Math.max(e.y,t.y,r.y,n.y)}return e.emplaceBack(t.x,t.y,t.z,r.x,r.y,f,u,p,d,s,n,o,i),e.length-1}function sh(e){e.collisionPadding&&(e.top-=e.collisionPadding[1],e.bottom+=e.collisionPadding[3]);const t=e.bottom-e.top;return t>0?Math.max(10,t):null}function lh(e,t,r,n){const o=e.compareText;if(t in o){const e=o[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])b&&(_(e,c,n,o,s,l),_(c,r,s,l,i,a))}_(d,f,n,i,o,i),_(f,p,o,i,o,a),_(p,h,o,a,n,a),_(h,d,n,a,n,i),m-=b,g-=b,y+=b,v+=b;const x=1/Math.max(y-m,v-g);return{scale:x,x:m*x,y:g*x,x2:y*x,y2:v*x,projection:t}}const dh=nl(new Float32Array(16));class fh{constructor(e){this.spec=e,this.name=e.name,this.wrap=!1,this.requiresDraping=!1,this.supportsWorldCopies=!1,this.supportsTerrain=!1,this.supportsFog=!1,this.supportsFreeCamera=!1,this.zAxisUnit="meters",this.isReprojectedInTileSpace=!0,this.unsupportedLayers=["custom"],this.center=[0,0],this.range=[3.5,7]}project(e,t){return{x:0,y:0,z:0}}unproject(e,t){return new Ic(0,0)}projectTilePoint(e,t,r){return{x:e,y:t,z:0}}locationPoint(e,t,r=!0){return e._coordinatePoint(e.locationCoordinate(t),r)}pixelsPerMeter(e,t){return Pc(1,e)*t}pixelSpaceConversion(e,t,r){return 1}farthestPixelDistance(e){return ch(e,e.pixelsPerMeter)}pointCoordinate(e,t,r,n){const o=e.horizonLineFromTop(!1),i=new v(t,Math.max(o,r));return e.rayIntersectionCoordinate(e.pointRayIntersection(i,n))}pointCoordinate3D(e,t,r){const n=new v(t,r);if(e.elevation)return e.elevation.pointCoordinate(n);{const t=this.pointCoordinate(e,n.x,n.y,0);return[t.x,t.y,t.z]}}isPointAboveHorizon(e,t){if(e.elevation)return!this.pointCoordinate3D(e,t.x,t.y);const r=e.horizonLineFromTop();return t.y0?t<-xh+r&&(t=-xh+r):t>xh-r&&(t=xh-r);const i=o/Math.pow(wh(t),n);let a=i*Math.sin(n*e),s=o-i*Math.cos(n*e);return a=.5*(a/Math.PI+.5),s=.5*(s/Math.PI+.5),{x:a,y:this.southernCenter?s:1-s,z:0}}unproject(e,t){e=(2*e-.5)*Math.PI,this.southernCenter&&(t=1-t),t=(2*(1-t)-.5)*Math.PI;const{n:r,f:n}=this,o=n-t,i=Math.sign(o),a=Math.sign(r)*Math.sqrt(e*e+o*o);let s=Math.atan2(e,Math.abs(o))*i;o*r<0&&(s-=Math.PI*Math.sign(e)*i);const l=T(w(s/r)+this.center[0],-180,180),c=T(w(2*Math.atan(Math.pow(n/a,1/r))-xh),-Nc,Nc);return new Ic(l,this.southernCenter?-c:c)}}class Sh extends fh{constructor(e){super(e),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(e,t){return{x:Mc(e),y:Rc(t),z:0}}unproject(e,t){const r=Oc(e),n=Lc(t);return new Ic(r,n)}}const Ch=x(Nc);class Eh extends fh{project(e,t){const r=(t=x(t))*t,n=r*r;return{x:.5*((e=x(e))*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791))/Math.PI+.5),y:1-.5*(t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))/Math.PI+1),z:0}}unproject(e,t){e=(2*e-.5)*Math.PI;let r=t=(2*(1-t)-1)*Math.PI,n=25,o=0,i=r*r;do{i=r*r;const e=i*i;o=(r*(1.007226+i*(.015085+e*(.028874*i-.044475-.005916*e)))-t)/(1.007226+i*(.045255+e*(.259866*i-.311325-.005916*11*e))),r=T(r-o,-Ch,Ch)}while(Math.abs(o)>1e-6&&--n>0);i=r*r;const a=T(w(e/(.8707+i*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979))),-180,180),s=w(r);return new Ic(a,s)}}const Th=x(Nc);class Ih extends fh{project(e,t){t=x(t),e=x(e);const r=Math.cos(t),n=2/Math.PI,o=Math.acos(r*Math.cos(e/2)),i=Math.sin(o)/o,a=.5*(e*n+2*r*Math.sin(e/2)/i)||0,s=.5*(t+Math.sin(t)/i)||0;return{x:.5*(a/Math.PI+.5),y:1-.5*(s/Math.PI+1),z:0}}unproject(e,t){let r=e=(2*e-.5)*Math.PI,n=t=(2*(1-t)-1)*Math.PI,o=25;const i=1e-6;let a=0,s=0;do{const o=Math.cos(n),i=Math.sin(n),l=2*i*o,c=i*i,u=o*o,d=Math.cos(r/2),f=Math.sin(r/2),p=2*d*f,h=f*f,m=1-u*d*d,g=m?1/m:0,y=m?Math.acos(o*d)*Math.sqrt(1/m):0,v=.5*(2*y*o*f+2*r/Math.PI)-e,b=.5*(y*i+n)-t,_=.5*g*(u*h+y*o*d*c)+1/Math.PI,x=g*(p*l/4-y*i*f),w=.125*g*(l*f-y*i*u*p),A=.5*g*(c*d+y*h*o)+.5,S=x*w-A*_;a=(b*x-v*A)/S,s=(v*w-b*_)/S,r=T(r-a,-Math.PI,Math.PI),n=T(n-s,-Th,Th)}while((Math.abs(a)>i||Math.abs(s)>i)&&--o>0);return new Ic(w(r),w(n))}}class kh extends fh{constructor(e){super(e),this.center=e.center||[0,0],this.parallels=e.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(x(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(e,t){const{scale:r,cosPhi:n}=this;return{x:x(e)*n*r+.5,y:-Math.sin(x(t))/n*r+.5,z:0}}unproject(e,t){const{scale:r,cosPhi:n}=this,o=-(t-.5)/r,i=T(w((e-.5)/r)/n,-180,180),a=Math.asin(T(o*n,-1,1)),s=T(w(a),-Nc,Nc);return new Ic(i,s)}}class Mh extends Sh{constructor(e){super(e),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug"],this.range=[3,5]}projectTilePoint(e,t,r){const n=pc(e,t,r);return Tl(n,n,gc(ic(r))),{x:n[0],y:n[1],z:n[2]}}locationPoint(e,t){const r=fc(t.lat,t.lng),n=Sl([],r),o=e.elevation?e.elevation.getAtPointOrZero(e.locationCoordinate(t),e._centerAltitude):e._centerAltitude;Al(r,r,n,Pc(1,0)*Ks*o);const i=nl(new Float64Array(16));return il(i,e.pixelMatrix,e.globeMatrix),Tl(r,r,i),new v(r[0],r[1])}pixelsPerMeter(e,t){return Pc(1,0)*t}pixelSpaceConversion(e,t,r){const n=Pc(1,e)*t,o=Rr(Pc(1,45)*t,n,r);return this.pixelsPerMeter(e,t)/o}createTileMatrix(e,t,r){const n=yc(ic(r.canonical));return il(new Float64Array(16),e.globeMatrix,n)}createInversionMatrix(e,t){const{center:r}=e,n=gc(ic(t));return cl(n,n,x(r.lng)),ll(n,n,x(r.lat)),sl(n,n,[e._pixelsPerMercatorPixel,e._pixelsPerMercatorPixel,1]),Float32Array.from(n)}pointCoordinate(e,t,r,n){return rc(e,t,r,!0)||new zc(0,0)}pointCoordinate3D(e,t,r){const n=this.pointCoordinate(e,t,r,0);return[n.x,n.y,n.z]}isPointAboveHorizon(e,t){return!rc(e,t.x,t.y,!1)}farthestPixelDistance(e){const t=function(e,t){const r=e.cameraToCenterDistance,n=e._centerAltitude*t,o=e._camera,i=e._camera.forward(),a=yl([],wl([],i,-r),[0,0,n]),s=e.worldSize/(2*Math.PI),l=[0,0,-s],c=e.width/e.height,u=Math.tan(e.fovAboveCenter),d=wl([],o.up(),u),f=wl([],o.right(),u*c),p=Sl([],yl([],yl([],i,d),f)),h=[];let m;if(new Hl(a,p).closestPointOnSphere(l,s,h)){const t=yl([],h,l),r=Ml([],t,a);m=Math.cos(e.fovAboveCenter)*ml(r)}else{const e=Ml([],a,l),t=Ml([],l,a);Sl(t,t);const r=ml(e)-s;m=Math.sqrt(r*(r+2*s));const n=Math.acos(m/(s+r))-Math.acos(Cl(i,t));m*=Math.cos(n)}return 1.01*m}(e,this.pixelsPerMeter(e.center.lat,e.worldSize)),r=bc(e.zoom);if(r>0){const n=ch(e,Pc(1,e.center.lat)*e.worldSize),o=e.worldSize/(2*Math.PI),i=Math.max(e.width,e.height)/e.worldSize*Math.PI;return Rr(t,n+o*(1-Math.cos(i)),Math.pow(r,10))}return t}upVector(e,t,r){return pc(t,r,e,1)}upVectorScale(e){return{metersToTile:tc(hc(ic(e)))}}}function Rh(e){const t=e.parallels,r=!!t&&Math.abs(t[0]+t[1])<.01;switch(e.name){case"mercator":return new Sh(e);case"equirectangular":return new _h(e);case"naturalEarth":return new Eh(e);case"equalEarth":return new bh(e);case"winkelTripel":return new Ih(e);case"albers":return r?new kh(e):new ph(e);case"lambertConformalConic":return r?new kh(e):new Ah(e);case"globe":return new Mh(e)}throw new Error(`Invalid projection name: ${e.name}`)}const Ph=Od.types,Oh=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Lh(e,t,r,n,o,i,a,s,l,c,u,d,f){const p=s?Math.min(nh,Math.round(s[0])):0,h=s?Math.min(nh,Math.round(s[1])):0;e.emplaceBack(t,r,Math.round(32*n),Math.round(32*o),i,a,(p<<1)+(l?1:0),h,16*c,16*u,256*d,256*f)}function Dh(e,t,r,n,o,i,a){e.emplaceBack(t,r,n,o,i,a)}function Nh(e,t,r,n,o){e.emplaceBack(t,r,n,o),e.emplaceBack(t,r,n,o),e.emplaceBack(t,r,n,o),e.emplaceBack(t,r,n,o)}function Fh(e){for(const t of e.sections)if(ra(t.text))return!0;return!1}class zh{constructor(e){this.layoutVertexArray=new $a,this.indexArray=new Ya,this.programConfigurations=e,this.segments=new Ys,this.dynamicLayoutVertexArray=new za,this.opacityVertexArray=new Ga,this.placedSymbolArray=new ls,this.globeExtVertexArray=new Va}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(e,t,r,n){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,vf.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,_f.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,Oh,!0),this.globeExtVertexArray.length>0&&(this.globeExtVertexBuffer=e.createVertexBuffer(this.globeExtVertexArray,bf.members,!0)),this.opacityVertexBuffer.itemSize=1),(r||n)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}}Yo(zh,"SymbolBuffers");class Bh{constructor(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new Ys,this.collisionVertexArray=new Xa,this.collisionVertexArrayExt=new Za}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,xf.members,!0),this.collisionVertexBufferExt=e.createVertexBuffer(this.collisionVertexArrayExt,wf.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}Yo(Bh,"CollisionBuffers");class jh{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=nl([]),this.placementViewportMatrix=nl([]);const t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Tf(this.zoom,t["text-size"]),this.iconSizeData=Tf(this.zoom,t["icon-size"]);const r=this.layers[0].layout,n=r.get("symbol-sort-key"),o=r.get("symbol-z-order");this.canOverlap=r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==o&&void 0!==n.constantOr(1),this.sortFeaturesByY=("viewport-y"===o||"auto"===o&&!this.sortFeaturesByKey)&&this.canOverlap,this.writingModes=r.get("text-writing-mode").map((e=>up[e])),this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id)),this.sourceID=e.sourceID,this.projection=e.projection}createArrays(){this.text=new zh(new js(this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new zh(new js(this.layers,this.zoom,(e=>/^icon/.test(e)))),this.glyphOffsetArray=new ds,this.lineVertexArray=new fs,this.symbolInstances=new us}calculateGlyphDependencies(e,t,r,n,o){for(let r=0;r0)&&("constant"!==s.value.kind||s.value.value.length>0),d="constant"!==c.value.kind||!!c.value.value||Object.keys(c.parameters).length>0,f=i.get("symbol-sort-key");if(this.features=[],!u&&!d)return;const p=t.iconDependencies,h=t.glyphDependencies,m=t.availableImages,g=new ma(this.zoom);for(const{feature:t,id:l,index:c,sourceLayerIndex:y}of e){const e=o._featureFilter.needGeometry,v=qc(t,e);if(!o._featureFilter.filter(g,v,r))continue;if(e||(v.geometry=Wc(t,r,n)),a&&1!==t.type&&r.z<=5){const e=v.geometry,t=.98078528056,n=(e,n)=>Cl(pc(e.x,e.y,r,1),pc(n.x,n.y,r,1))=0;for(const r of b.sections)if(r.image)p[r.image.name]=!0;else{const n=Zi(b.toString()),o=r.fontStack||e,i=h[o]=h[o]||{};this.calculateGlyphDependencies(r.text,i,t,this.allowVerticalPlacement,n)}}}"line"===i.get("symbol-placement")&&(this.features=function(e){const t={},r={},n=[];let o=0;function i(t){n.push(e[t]),o++}function a(e,t,o){const i=r[e];return delete r[e],r[t]=i,n[i].geometry[0].pop(),n[i].geometry[0]=n[i].geometry[0].concat(o[0]),i}function s(e,r,o){const i=t[r];return delete t[r],t[e]=i,n[i].geometry[0].shift(),n[i].geometry[0]=o[0].concat(n[i].geometry[0]),i}function l(e,t,r){const n=r?t[0][t[0].length-1]:t[0][0];return`${e}:${n.x}:${n.y}`}for(let c=0;ce.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((e,t)=>e.sortKey-t.sortKey))}update(e,t,r,n){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,r,n),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,r,n))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}getProjection(){return this.projectionInstance||(this.projectionInstance=Rh(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){const r=this.lineVertexArray.length;if(void 0!==e.segment)for(const{x:e,y:r}of t)this.lineVertexArray.emplaceBack(e,r);return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}}addSymbols(e,t,r,n,o,i,a,s,l,c,u,d,f,p){const h=e.indexArray,m=e.layoutVertexArray,g=e.globeExtVertexArray,y=e.segments.prepareSegment(4*t.length,m,h,this.canOverlap?i.sortKey:void 0),v=this.glyphOffsetArray.length,b=y.vertexLength,_=this.allowVerticalPlacement&&a===up.vertical?Math.PI/2:0,x=i.text&&i.text.sections;for(let n=0;n=0?t.rightJustifiedTextSymbolIndex:t.centerJustifiedTextSymbolIndex>=0?t.centerJustifiedTextSymbolIndex:t.leftJustifiedTextSymbolIndex>=0?t.leftJustifiedTextSymbolIndex:t.verticalPlacedTextSymbolIndex>=0?t.verticalPlacedTextSymbolIndex:n),i=If(this.textSizeData,e,o)/Cf;return this.tilePixelRatio*i}getSymbolInstanceIconSize(e,t,r){const n=this.icon.placedSymbolArray.get(r),o=If(this.iconSizeData,e,n);return this.tilePixelRatio*o}_commitDebugCollisionVertexUpdate(e,t,r){e.emplaceBack(t,-r,-r),e.emplaceBack(t,r,-r),e.emplaceBack(t,r,r),e.emplaceBack(t,-r,r)}_updateTextDebugCollisionBoxes(e,t,r,n,o,i){for(let a=n;a0}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(e,t){const r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;tn[e]-n[t]||o[t]-o[e])),i}addToSortKeyRanges(e,t){const r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const e of this.symbolInstanceIndexes){const t=this.symbolInstances.get(e);this.featureSortOrder.push(t.featureIndex);const{rightJustifiedTextSymbolIndex:r,centerJustifiedTextSymbolIndex:n,leftJustifiedTextSymbolIndex:o,verticalPlacedTextSymbolIndex:i,placedIconSymbolIndex:a,verticalPlacedIconSymbolIndex:s}=t;r>=0&&this.addIndicesForPlacedSymbol(this.text,r),n>=0&&n!==r&&this.addIndicesForPlacedSymbol(this.text,n),o>=0&&o!==n&&o!==r&&this.addIndicesForPlacedSymbol(this.text,o),i>=0&&this.addIndicesForPlacedSymbol(this.text,i),a>=0&&this.addIndicesForPlacedSymbol(this.icon,a),s>=0&&this.addIndicesForPlacedSymbol(this.icon,s)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Yo(jh,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),jh.MAX_GLYPHS=65535,jh.addDynamicAttributes=Nh;const Uh=new Ta({"symbol-placement":new Sa(et.layout_symbol["symbol-placement"]),"symbol-spacing":new Sa(et.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Sa(et.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ca(et.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Sa(et.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Sa(et.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Sa(et.layout_symbol["icon-ignore-placement"]),"icon-optional":new Sa(et.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Sa(et.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ca(et.layout_symbol["icon-size"]),"icon-text-fit":new Sa(et.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Sa(et.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ca(et.layout_symbol["icon-image"]),"icon-rotate":new Ca(et.layout_symbol["icon-rotate"]),"icon-padding":new Sa(et.layout_symbol["icon-padding"]),"icon-keep-upright":new Sa(et.layout_symbol["icon-keep-upright"]),"icon-offset":new Ca(et.layout_symbol["icon-offset"]),"icon-anchor":new Ca(et.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Sa(et.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Sa(et.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Sa(et.layout_symbol["text-rotation-alignment"]),"text-field":new Ca(et.layout_symbol["text-field"]),"text-font":new Ca(et.layout_symbol["text-font"]),"text-size":new Ca(et.layout_symbol["text-size"]),"text-max-width":new Ca(et.layout_symbol["text-max-width"]),"text-line-height":new Ca(et.layout_symbol["text-line-height"]),"text-letter-spacing":new Ca(et.layout_symbol["text-letter-spacing"]),"text-justify":new Ca(et.layout_symbol["text-justify"]),"text-radial-offset":new Ca(et.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Sa(et.layout_symbol["text-variable-anchor"]),"text-anchor":new Ca(et.layout_symbol["text-anchor"]),"text-max-angle":new Sa(et.layout_symbol["text-max-angle"]),"text-writing-mode":new Sa(et.layout_symbol["text-writing-mode"]),"text-rotate":new Ca(et.layout_symbol["text-rotate"]),"text-padding":new Sa(et.layout_symbol["text-padding"]),"text-keep-upright":new Sa(et.layout_symbol["text-keep-upright"]),"text-transform":new Ca(et.layout_symbol["text-transform"]),"text-offset":new Ca(et.layout_symbol["text-offset"]),"text-allow-overlap":new Sa(et.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Sa(et.layout_symbol["text-ignore-placement"]),"text-optional":new Sa(et.layout_symbol["text-optional"])});var $h={paint:new Ta({"icon-opacity":new Ca(et.paint_symbol["icon-opacity"]),"icon-color":new Ca(et.paint_symbol["icon-color"]),"icon-halo-color":new Ca(et.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ca(et.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ca(et.paint_symbol["icon-halo-blur"]),"icon-translate":new Sa(et.paint_symbol["icon-translate"]),"icon-translate-anchor":new Sa(et.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ca(et.paint_symbol["text-opacity"]),"text-color":new Ca(et.paint_symbol["text-color"],{runtimeType:ft,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new Ca(et.paint_symbol["text-halo-color"]),"text-halo-width":new Ca(et.paint_symbol["text-halo-width"]),"text-halo-blur":new Ca(et.paint_symbol["text-halo-blur"]),"text-translate":new Sa(et.paint_symbol["text-translate"]),"text-translate-anchor":new Sa(et.paint_symbol["text-translate-anchor"])}),layout:Uh};class Vh{constructor(e){this.type=e.property.overrides?e.property.overrides.runtimeType:lt,this.defaultValue=e}evaluate(e){if(e.formattedSection){const t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Yo(Vh,"FormatSectionOverride",{omit:["defaultValue"]});class Gh extends qs{constructor(e){super(e,$h)}recalculate(e,t){super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"));const r=this.layout.get("text-writing-mode");if(r){const e=[];for(const t of r)e.indexOf(t)<0&&e.push(t);this.layout._values["text-writing-mode"]=e}else this.layout._values["text-writing-mode"]="point"===this.layout.get("symbol-placement")?["horizontal"]:["horizontal","vertical"];this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,n){const o=this.layout.get(e).evaluate(t,{},r,n),i=this._unevaluatedLayout._values[e];return i.isDataDriven()||Zn(i.value)||!o?o:function(e,t){return t.replace(/{([^{}]+)}/g,((t,r)=>r in e?String(e[r]):""))}(t.properties,o)}createBucket(e){return new jh(e)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const e of $h.paint.overridableProperties){if(!Gh.hasPaintOverride(this.layout,e))continue;const t=this.paint.get(e),r=new Vh(t),n=new Xn(r,t.property.specification);let o=null;o="constant"===t.value.kind||"source"===t.value.kind?new Kn("source",n):new Jn("composite",n,t.value.zoomStops,t.value._interpolationType),this.paint._values[e]=new wa(t.property,o,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,r){return!(!this.layout||t.isDataDriven()||r.isDataDriven())&&Gh.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){const r=e.get("text-field"),n=$h.paint.properties[t];let o=!1;const i=e=>{for(const t of e)if(n.overrides&&n.overrides.hasOverride(t))return void(o=!0)};if("constant"===r.value.kind&&r.value.value instanceof Lt)i(r.value.value.sections);else if("source"===r.value.kind){const e=t=>{o||(t instanceof Ut&&zt(t.value)===gt?i(t.value.sections):t instanceof Wt?i(t.sections):t.eachChild(e))},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return o}getProgramConfiguration(e){return new Bs(this,e)}}var Hh={paint:new Ta({"background-color":new Sa(et.paint_background["background-color"]),"background-pattern":new Sa(et.paint_background["background-pattern"]),"background-opacity":new Sa(et.paint_background["background-opacity"])})},Wh={paint:new Ta({"raster-opacity":new Sa(et.paint_raster["raster-opacity"]),"raster-hue-rotate":new Sa(et.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Sa(et.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Sa(et.paint_raster["raster-brightness-max"]),"raster-saturation":new Sa(et.paint_raster["raster-saturation"]),"raster-contrast":new Sa(et.paint_raster["raster-contrast"]),"raster-resampling":new Sa(et.paint_raster["raster-resampling"]),"raster-fade-duration":new Sa(et.paint_raster["raster-fade-duration"])})};class qh extends qs{constructor(e){super(e,{}),this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}isLayerDraped(){return void 0!==this.implementation.renderToTile}shouldRedrape(){return!!this.implementation.shouldRerenderTiles&&this.implementation.shouldRerenderTiles()}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){}onAdd(e){this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)}onRemove(e){this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)}}var Xh={paint:new Ta({"sky-type":new Sa(et.paint_sky["sky-type"]),"sky-atmosphere-sun":new Sa(et.paint_sky["sky-atmosphere-sun"]),"sky-atmosphere-sun-intensity":new Sa(et.paint_sky["sky-atmosphere-sun-intensity"]),"sky-gradient-center":new Sa(et.paint_sky["sky-gradient-center"]),"sky-gradient-radius":new Sa(et.paint_sky["sky-gradient-radius"]),"sky-gradient":new Ea(et.paint_sky["sky-gradient"]),"sky-atmosphere-halo-color":new Sa(et.paint_sky["sky-atmosphere-halo-color"]),"sky-atmosphere-color":new Sa(et.paint_sky["sky-atmosphere-color"]),"sky-opacity":new Sa(et.paint_sky["sky-opacity"])})};function Zh(e,t,r){const n=[0,0,1],o=Fl([]);return Bl(o,o,r?-x(e)+Math.PI:x(e)),zl(o,o,-x(t)),Il(n,n,o),Sl(n,n)}const Yh={circle:class extends qs{constructor(e){super(e,hu)}createBucket(e){return new Yc(e)}queryRadius(e){const t=e;return cu("circle-radius",this,t)+cu("circle-stroke-width",this,t)+uu(this.paint.get("circle-translate"))}queryIntersectsFeature(e,t,r,n,o,i,a,s){const l=fu(this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i.angle,e.pixelToTileUnitsFactor),c=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r);return mu(e,n,i,a,s,"map"===this.paint.get("circle-pitch-alignment"),"map"===this.paint.get("circle-pitch-scale"),l,c)}getProgramIds(){return["circle"]}getProgramConfiguration(e){return new Bs(this,e)}},heatmap:class extends qs{createBucket(e){return new _u(e)}constructor(e){super(e,Eu),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){"heatmap-color"===e&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Tu({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(e){return cu("heatmap-radius",this,e)}queryIntersectsFeature(e,t,r,n,o,i,a,s){const l=this.paint.get("heatmap-radius").evaluate(t,r);return mu(e,n,i,a,s,!0,!0,new v(0,0),l)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}getProgramIds(){return["heatmap","heatmapTexture"]}getProgramConfiguration(e){return new Bs(this,e)}},hillshade:class extends qs{constructor(e){super(e,Iu)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}getProgramIds(){return["hillshade","hillshadePrepare"]}},fill:class extends qs{constructor(e){super(e,md)}getProgramIds(){const e=this.paint.get("fill-pattern"),t=e&&e.constantOr(1),r=[t?"fillPattern":"fill"];return this.paint.get("fill-antialias")&&r.push(t&&!this.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline"),r}getProgramConfiguration(e){return new Bs(this,e)}recalculate(e,t){super.recalculate(e,t);const r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new pd(e)}queryRadius(){return uu(this.paint.get("fill-translate"))}queryIntersectsFeature(e,t,r,n,o,i){return!e.queryGeometry.isAboveHorizon&&Qc(du(e.tilespaceGeometry,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),i.angle,e.pixelToTileUnitsFactor),n)}isTileClipped(){return!0}},"fill-extrusion":class extends qs{constructor(e){super(e,Yd)}createBucket(e){return new jd(e)}queryRadius(){return uu(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}getProgramIds(){return[this.paint.get("fill-extrusion-pattern").constantOr(1)?"fillExtrusionPattern":"fillExtrusion"]}getProgramConfiguration(e){return new Bs(this,e)}queryIntersectsFeature(e,t,r,n,o,i,a,s,l){const c=fu(this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),i.angle,e.pixelToTileUnitsFactor),u=this.paint.get("fill-extrusion-height").evaluate(t,r),d=this.paint.get("fill-extrusion-base").evaluate(t,r),f=[0,0],p=s&&i.elevation,h=i.elevation?i.elevation.exaggeration():1,m=e.tile.getBucket(this);if(p&&m instanceof jd){const e=m.centroidVertexArray,t=l+1;te.polygon)).flat());const g=p?s:null,[y,b]=function(e,t,r,n,o,i,a,s,l,c,u){return"globe"===e.projection.name?function(e,t,r,n,o,i,a,s,l,c,u){const d=[],f=[],p=e.projection.upVectorScale(u,e.center.lat,e.worldSize).metersToTile,h=[0,0,0,1],m=[0,0,0,1],g=(e,t,r,n)=>{e[0]=t,e[1]=r,e[2]=n,e[3]=1},y=qd();r>0&&(r+=y),n+=y;for(const y of t){const t=[],v=[];for(const d of y){const f=d.x+o.x,y=d.y+o.y,b=e.projection.projectTilePoint(f,y,u),_=e.projection.upVector(u,d.x,d.y);let x=r,w=n;if(a){const e=af(f,y,r,n,a,s,l,c);x+=e.base,w+=e.top}0!==r?g(h,b.x+_[0]*p*x,b.y+_[1]*p*x,b.z+_[2]*p*x):g(h,b.x,b.y,b.z),g(m,b.x+_[0]*p*w,b.y+_[1]*p*w,b.z+_[2]*p*w),Tl(h,h,i),Tl(m,m,i),t.push(new rf(h[0],h[1],h[2])),v.push(new rf(m[0],m[1],m[2]))}d.push(t),f.push(v)}return[d,f]}(e,t,r,n,o,i,a,s,l,c,u):a?function(e,t,r,n,o,i,a,s,l){const c=[],u=[],d=[0,0,0,1];for(const f of e){const e=[],p=[];for(const c of f){const u=c.x+n.x,f=c.y+n.y,h=af(u,f,t,r,i,a,s,l);d[0]=u,d[1]=f,d[2]=h.base,d[3]=1,Dl(d,d,o),d[3]=Math.max(d[3],1e-5);const m=new rf(d[0]/d[3],d[1]/d[3],d[2]/d[3]);d[0]=u,d[1]=f,d[2]=h.top,d[3]=1,Dl(d,d,o),d[3]=Math.max(d[3],1e-5);const g=new rf(d[0]/d[3],d[1]/d[3],d[2]/d[3]);e.push(m),p.push(g)}c.push(e),u.push(p)}return[c,u]}(t,r,n,o,i,a,s,l,c):function(e,t,r,n,o){const i=[],a=[],s=o[8]*t,l=o[9]*t,c=o[10]*t,u=o[11]*t,d=o[8]*r,f=o[9]*r,p=o[10]*r,h=o[11]*r;for(const t of e){const e=[],r=[];for(const i of t){const t=i.x+n.x,a=i.y+n.y,m=o[0]*t+o[4]*a+o[12],g=o[1]*t+o[5]*a+o[13],y=o[2]*t+o[6]*a+o[14],v=o[3]*t+o[7]*a+o[15],b=m+s,_=g+l,x=y+c,w=Math.max(v+u,1e-5),A=m+d,S=g+f,C=y+p,E=Math.max(v+h,1e-5);e.push(new rf(b/w,_/w,x/w)),r.push(new rf(A/E,S/E,C/E))}i.push(e),a.push(r)}return[i,a]}(t,r,n,o,i)}(i,n,d,u,c,a,g,f,h,i.center.lat,e.tileID.canonical),_=e.queryGeometry;return function(e,t,r){let n=1/0;Qc(r,t)&&(n=of(r,t[0]));for(let o=0;o=3)for(let t=0;t{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))}remove(){this._channel=void 0,this._callback=()=>{}}}class Qh{constructor(){this.tasks={},this.taskQueue=[],z(["process"],this),this.invoker=new Jh(this.process),this.nextId=0}add(e,t){const r=this.nextId++,n=function({type:e,isSymbolTile:t,zoom:r}){return r=r||0,"message"===e?0:"maybePrepare"!==e||t?"parseTile"!==e||t?"parseTile"===e&&t?300-r:"maybePrepare"===e&&t?400-r:500:200-r:100-r}(t);if(0===n){q();try{e()}finally{}return{cancel:()=>{}}}return this.tasks[r]={fn:e,metadata:t,priority:n,id:r},this.taskQueue.push(r),this.invoker.trigger(),{cancel:()=>{delete this.tasks[r]}}}process(){q();try{if(this.taskQueue=this.taskQueue.filter((e=>!!this.tasks[e])),!this.taskQueue.length)return;const e=this.pick();if(null===e)return;const t=this.tasks[e];if(delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),!t)return;t.fn()}finally{}}pick(){let e=null,t=1/0;for(let r=0;r>=1)>1;){const e=r+o>>1,l=n+i>>1;1&t?(o=r,i=n,r=a,n=s):(r=o,n=i,o=a,i=s),a=e,s=l}const l=4*e;im[l+0]=r,im[l+1]=n,im[l+2]=o,im[l+3]=i}const am=new Uint16Array(2178),sm=new Uint8Array(1089),lm=new Uint16Array(1089);function cm(e){return 0===e?-.03125:32===e?.03125:0}var um=Pa([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);const dm={type:2,extent:Ks,loadGeometry:()=>[[new v(0,0),new v(8193,0),new v(8193,8193),new v(0,8193),new v(0,0)]]};class fm{constructor(e,t,r,n,o){this.tileID=e,this.uid=L(),this.uses=0,this.tileSize=t,this.tileZoom=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=o,this.expiredRequestCount=0,this.state="loading",n&&n.transform&&(this.projection=n.transform.projection)}registerFadeDuration(e){const t=e+this.timeAdded;tt.getLayer(e))).filter(Boolean);if(0!==e.length){n.layers=e,n.stateDependentLayerIds&&(n.stateDependentLayers=n.stateDependentLayerIds.map((t=>e.filter((e=>e.id===t))[0])));for(const t of e)r[t.id]=n}}return r}(e.buckets,t.style),this.hasSymbolBuckets=!1;for(const e in this.buckets){const t=this.buckets[e];if(t instanceof jh){if(this.hasSymbolBuckets=!0,!r)break;t.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const e in this.buckets){const t=this.buckets[e];if(t instanceof jh&&t.hasRTLText){this.hasRTLText=!0,ha.isLoading()||ha.isLoaded()||"deferred"!==fa()||pa();break}}this.queryPadding=0;for(const e in this.buckets){const r=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(e).queryRadius(r))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),e.lineAtlas&&(this.lineAtlas=e.lineAtlas)}else this.collisionBoxArray=new as}unloadVectorData(){if(this.hasData()){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlas&&(this.imageAtlas=null),this.lineAtlas&&(this.lineAtlas=null),this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.lineAtlasTexture&&this.lineAtlasTexture.destroy(),this._tileBoundsBuffer&&(this._tileBoundsBuffer.destroy(),this._tileBoundsIndexBuffer.destroy(),this._tileBoundsSegments.destroy(),this._tileBoundsBuffer=null),this._tileDebugBuffer&&(this._tileDebugBuffer.destroy(),this._tileDebugSegments.destroy(),this._tileDebugBuffer=null),this._tileDebugIndexBuffer&&(this._tileDebugIndexBuffer.destroy(),this._tileDebugIndexBuffer=null),this._globeTileDebugBorderBuffer&&(this._globeTileDebugBorderBuffer.destroy(),this._globeTileDebugBorderBuffer=null),this._tileDebugTextBuffer&&(this._tileDebugTextBuffer.destroy(),this._tileDebugTextSegments.destroy(),this._tileDebugTextIndexBuffer.destroy(),this._tileDebugTextBuffer=null),this._globeTileDebugTextBuffer&&(this._globeTileDebugTextBuffer.destroy(),this._globeTileDebugTextBuffer=null),this.latestFeatureIndex=null,this.state="unloaded"}}getBucket(e){return this.buckets[e.id]}upload(e){for(const t in this.buckets){const r=this.buckets[t];r.uploadPending()&&r.upload(e)}const t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Kh(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Kh(e,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null),this.lineAtlas&&!this.lineAtlas.uploaded&&(this.lineAtlasTexture=new Kh(e,this.lineAtlas.image,t.ALPHA),this.lineAtlas.uploaded=!0)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,n,o,i,a,s){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({tileResult:n,pixelPosMatrix:a,transform:i,params:o,tileTransform:this.tileTransform},e,t,r):{}}querySourceFeatures(e,t){const r=this.latestFeatureIndex;if(!r||!r.rawTileData)return;const n=r.loadVTLayers(),o=t?t.sourceLayer:"",i=n._geojsonTileLayer||n[o];if(!i)return;const a=fo(t&&t.filter),{z:s,x:l,y:c}=this.tileID.canonical,u={z:s,x:l,y:c};for(let t=0;te)r=!1;else if(t)if(this.expirationTime=0;e--){const t=4*e,r=im[t+0],n=im[t+1],o=im[t+2],i=im[t+3],a=r+o>>1,s=n+i>>1,l=a+s-n,c=s+r-a,u=n*om+r,d=i*om+o,f=s*om+a,p=Math.hypot((am[2*u+0]+am[2*d+0])/2-am[2*f+0],(am[2*u+1]+am[2*d+1])/2-am[2*f+1])>=16;sm[f]=sm[f]||(p?1:0),e<1022&&(sm[f]=sm[f]||sm[(n+c>>1)*om+(r+l>>1)]||sm[(i+c>>1)*om+(o+l>>1)])}const o=new Na,i=new Ya;let a=0;function s(e,t){const r=t*om+e;return 0===lm[r]&&(o.emplaceBack(am[2*r+0],am[2*r+1],e*Ks/nm,t*Ks/nm),lm[r]=++a),lm[r]-1}function l(e,t,r,n,o,a){const c=e+r>>1,u=t+n>>1;if(Math.abs(e-o)+Math.abs(t-a)>1&&sm[u*om+c])l(o,a,e,t,c,u),l(r,n,o,a,c,u);else{const l=s(e,t),c=s(r,n),u=s(o,a);i.emplaceBack(l,c,u)}}return l(0,0,nm,nm,nm,0),l(nm,nm,0,0,0,nm),{vertices:o,indices:i}}(this.tileID.canonical,t);n=e.vertices,o=e.indices}else{n=new Na,o=new Ya;for(const{x:e,y:t}of r)n.emplaceBack(e,t,0,0);const e=od(n.int16,void 0,4);for(let t=0;t0&&(a=ol(new Float64Array(16),t.globeMatrix)),this._makeGlobeTileDebugBorderBuffer(e,n,t,o,a,i),this._makeGlobeTileDebugTextBuffer(e,n,t,o,a,i)}_globePoint(e,t,r,n,o,i,a){let s=pc(e,t,r);if(i){const o=1<.5?d=-1:u<-.5&&(d=1);let f=(e/Ks+r.x)/o+d,p=(t/Ks+r.y)/o;f=(f-l)*n._pixelsPerMercatorPixel+l,p=(p-c)*n._pixelsPerMercatorPixel+c;const h=[f*n.worldSize,p*n.worldSize,0];Tl(h,h,i),s=ac(s,h,a)}return Tl(s,s,o)}_makeGlobeTileDebugBorderBuffer(e,t,r,n,o,i){const a=new La,s=new ns,l=new Da,c=(e,c,u,d,f)=>{const p=(u-e)/(f-1),h=(d-c)/(f-1),m=a.length;for(let u=0;uc*e+t;for(let e=0;et[a])return null}else{const s=1/n[a];let l=(e[a]-r[a])*s,c=(t[a]-r[a])*s;if(l>c){const e=l;l=c,c=e}if(l>o&&(o=l),ci)return null}return o}function gm(e,t,r,n,o,i,a,s,l,c,u){const d=n-e,f=o-t,p=i-r,h=a-e,m=s-t,g=l-r,y=u[1]*g-u[2]*m,v=u[2]*h-u[0]*g,b=u[0]*m-u[1]*h,_=d*y+f*v+p*b;if(Math.abs(_)<1e-15)return null;const x=1/_,w=c[0]-e,A=c[1]-t,S=c[2]-r,C=(w*y+A*v+S*b)*x;if(C<0||C>1)return null;const E=A*p-S*f,T=S*d-w*p,I=w*f-A*d,k=(u[0]*E+u[1]*T+u[2]*I)*x;return k<0||C+k>1?null:(h*E+m*T+g*I)*x}function ym(e,t,r){return(e-t)/(r-t)}function vm(e,t,r,n,o,i,a,s,l){const c=1<{const i=n?1:0,a=(e+1)*r-i,s=t*r,l=(t+1)*r-i;o[0]=e*r,o[1]=s,o[2]=a,o[3]=l};let a=new hm(n);const s=[];for(let t=0;t=1;n/=2){const e=r[r.length-1];a=new hm(n);for(let t=0;t0;){const{idx:s,t:p,nodex:h,nodey:m,depth:g}=f.pop();if(this.leaves[s]){vm(h,m,g,e,t,r,n,u,d);const s=1<=e[2])return p}continue}let y=0;for(let f=0;f=l[c[r]]&&(c.splice(r,0,f),t=!0);t||(c[y]=f),y++}}for(let e=0;e=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)}static pack(e,t){const r=[0,0,0,0],n=Cm.getUnpackVector(t);let o=Math.floor((e+n[3])/n[2]);return r[2]=o%256,o=Math.floor(o/256),r[1]=o%256,o=Math.floor(o/256),r[0]=o,r}getPixels(){return new Cu({width:this.stride,height:this.stride},this.pixels)}backfillBorder(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let n=t*this.dim,o=t*this.dim+this.dim,i=r*this.dim,a=r*this.dim+this.dim;switch(t){case-1:n=o-1;break;case 1:o=n+1}switch(r){case-1:i=a-1;break;case 1:a=i+1}const s=-t*this.dim,l=-r*this.dim;for(let t=i;t{this.remove(e,o)}),r)),this.data[n].push(o),this.order.push(n),this.order.length>this.max){const e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}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 t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){const t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;const r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),o=this.data[r][n];return this.data[r].splice(n,1),o.timeout&&clearTimeout(o.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(o.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){const t=[];for(const r in this.data)for(const n of this.data[r])e(n.value)||t.push(n);for(const e of t)this.remove(e.value.tileID,e)}}class Tm{constructor(e,t,r){this.func=e,this.mask=t,this.range=r}}Tm.ReadOnly=!1,Tm.ReadWrite=!0,Tm.disabled=new Tm(519,Tm.ReadOnly,[0,1]);const Im=7680;class km{constructor(e,t,r,n,o,i){this.test=e,this.ref=t,this.mask=r,this.fail=n,this.depthFail=o,this.pass=i}}km.disabled=new km({func:519,mask:0},0,0,Im,Im,Im);class Mm{constructor(e,t,r){this.blendFunction=e,this.blendColor=t,this.mask=r}}Mm.Replace=[1,0],Mm.disabled=new Mm(Mm.Replace,Rt.transparent,[!1,!1,!1,!1]),Mm.unblended=new Mm(Mm.Replace,Rt.transparent,[!0,!0,!0,!0]),Mm.alphaBlended=new Mm([1,771],Rt.transparent,[!0,!0,!0,!0]);const Rm=1029,Pm=2305;class Om{constructor(e,t,r){this.enable=e,this.mode=t,this.frontFace=r}}Om.disabled=new Om(!1,Rm,Pm),Om.backCCW=new Om(!0,Rm,Pm),Om.backCW=new Om(!0,Rm,2304),Om.frontCW=new Om(!0,1028,2304),Om.frontCCW=new Om(!0,1028,Pm);class Lm extends Qe{constructor(e,t,r){super(),this.id=e,this._onlySymbols=r,t.on("data",(e=>{"source"===e.dataType&&"metadata"===e.sourceDataType&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===e.dataType&&"content"===e.sourceDataType&&(this.reload(),this.transform&&this.update(this.transform))})),t.on("error",(()=>{this._sourceErrored=!0})),this._source=t,this._tiles={},this._cache=new Em(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._minTileCacheSize=t.minTileCacheSize,this._maxTileCacheSize=t.maxTileCacheSize,this._loadedParentTiles={},this._coveredTiles={},this._state=new pm,this._isRaster="raster"===this._source.type||"raster-dem"===this._source.type||"custom"===this._source.type&&"raster"===this._source._dataType}onAdd(e){this.map=e,this._minTileCacheSize=void 0===this._minTileCacheSize&&e?e._minTileCacheSize:this._minTileCacheSize,this._maxTileCacheSize=void 0===this._maxTileCacheSize&&e?e._maxTileCacheSize:this._maxTileCacheSize}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(const e in this._tiles){const t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)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)}_loadTile(e,t){return e.isSymbolTile=this._onlySymbols,this._source.loadTile(e,t)}_unloadTile(e){if(this._source.unloadTile)return this._source.unloadTile(e,(()=>{}))}_abortTile(e){if(this._source.abortTile)return this._source.abortTile(e,(()=>{}))}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 t in this._tiles){const r=this._tiles[t];r.upload(e),r.prepare(this.map.style.imageManager)}}getIds(){return R(this._tiles).map((e=>e.tileID)).sort(Dm).map((e=>e.key))}getRenderableIds(e){const t=[];for(const r in this._tiles)this._isIdRenderable(+r,e)&&t.push(this._tiles[r]);return e?t.sort(((e,t)=>{const r=e.tileID,n=t.tileID,o=new v(r.canonical.x,r.canonical.y)._rotate(this.transform.angle),i=new v(n.canonical.x,n.canonical.y)._rotate(this.transform.angle);return r.overscaledZ-n.overscaledZ||i.y-o.y||i.x-o.x})).map((e=>e.tileID.key)):t.map((e=>e.tileID)).sort(Dm).map((e=>e.key))}hasRenderableParent(e){const t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)}_isIdRenderable(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const e in this._tiles)"errored"!==this._tiles[e].state&&this._reloadTile(+e,"reloading")}}_reloadTile(e,t){const r=this._tiles[e];r&&("loading"!==r.state&&(r.state=t),this._loadTile(r,this._tileLoaded.bind(this,r,e,t)))}_tileLoaded(e,t,r,n){if(n)if(e.state="errored",404!==n.status)this._source.fire(new Je(n,{tile:e}));else if("raster-dem"===this._source.type&&this.usedForTerrain&&this.map.painter.terrain){const e=this.map.painter.terrain;this.update(this.transform,e.getScaledDemTileSize(),!0),e.resetTileLookupCache(this.id)}else this.update(this.transform);else e.timeAdded=Xe.now(),"expired"===r&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(t,e),"raster-dem"===this._source.type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new Ke("data",{dataType:"source",tile:e,coord:e.tileID,sourceCacheId:this.id}))}_backfillDEM(e){const t=this.getRenderableIds();for(let n=0;n1||(Math.abs(r)>1&&(1===Math.abs(r+o)?r+=o:1===Math.abs(r-o)&&(r-=o)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[i]&&(e.neighboringTiles[i].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,t,r,n){for(const o in this._tiles){let i=this._tiles[o];if(n[o]||!i.hasData()||i.tileID.overscaledZ<=t||i.tileID.overscaledZ>r)continue;let a=i.tileID;for(;i&&i.tileID.overscaledZ>t+1;){const e=i.tileID.scaledTo(i.tileID.overscaledZ-1);i=this._tiles[e.key],i&&i.hasData()&&(a=e)}let s=a;for(;s.overscaledZ>t;)if(s=s.scaledTo(s.overscaledZ-1),e[s.key]){n[a.key]=a;break}}}findLoadedParent(e,t){if(e.key in this._loadedParentTiles){const r=this._loadedParentTiles[e.key];return r&&r.tileID.overscaledZ>=t?r:null}for(let r=e.overscaledZ-1;r>=t;r--){const t=e.scaledTo(r),n=this._getLoadedTile(t);if(n)return n}}_getLoadedTile(e){const t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(this._source.reparseOverscaled?e.wrapped().key:e.canonical.key)}updateCacheSize(e,t){t=t||this._source.tileSize;const r=Math.ceil(e.width/t)+1,n=Math.ceil(e.height/t)+1,o=Math.floor(r*n*5),i="number"==typeof this._minTileCacheSize?Math.max(this._minTileCacheSize,o):o,a="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(a)}handleWrapJump(e){const t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);if(this._prevLng=e,t){const e={};for(const r in this._tiles){const n=this._tiles[r];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+t),e[n.tileID.key]=n}this._tiles=e;for(const e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(const e in this._tiles)this._setTileReloadTimer(+e,this._tiles[e])}}update(e,t,r){if(this.transform=e,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage)return;if(this.usedForTerrain&&!r)return;let n;this.updateCacheSize(e,t),"globe"!==this.transform.projection.name&&this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?n=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((e=>new ef(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y))):(n=e.coveringTiles({tileSize:t||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!r,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain}),this._source.hasTile&&(n=n.filter((e=>this._source.hasTile(e))))):n=[];const o=this._updateRetainedTiles(n);if(Nm(this._source.type)&&0!==n.length){const e={},t={},r=Object.keys(o);for(const n of r){const r=o[n],i=this._tiles[n];if(!i||i.fadeEndTime&&i.fadeEndTime<=Xe.now())continue;const a=this.findLoadedParent(r,Math.max(r.overscaledZ-Lm.maxOverzooming,this._source.minzoom));a&&(this._addTile(a.tileID),e[a.tileID.key]=a.tileID),t[n]=r}const i=n[n.length-1].overscaledZ;for(const e in this._tiles){const r=this._tiles[e];if(o[e]||!r.hasData())continue;let n=r.tileID;for(;n.overscaledZ>i;){n=n.scaledTo(n.overscaledZ-1);const i=this._tiles[n.key];if(i&&i.hasData()&&t[n.key]){o[e]=r.tileID;break}}}for(const t in e)o[t]||(this._coveredTiles[t]=!0,o[t]=e[t])}for(const e in o)this._tiles[e].clearFadeHold();const i=function(e,t){const r=[];for(const n in e)n in t||r.push(n);return r}(this._tiles,o);for(const e of i){const t=this._tiles[e];t.hasSymbolBuckets&&!t.holdingForFade()?t.setHoldDuration(this.map._fadeDuration):t.hasSymbolBuckets&&!t.symbolFadeFinished()||this._removeTile(+e)}this._updateLoadedParentTileCache(),this._onlySymbols&&this._source.afterUpdate&&this._source.afterUpdate()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(+e)}_updateRetainedTiles(e){const t={};if(0===e.length)return t;const r={},n=e.reduce(((e,t)=>Math.min(e,t.overscaledZ)),1/0),o=e[0].overscaledZ,i=Math.max(o-Lm.maxOverzooming,this._source.minzoom),a=Math.max(o+Lm.maxUnderzooming,this._source.minzoom),s={};for(const r of e){const e=this._addTile(r);t[r.key]=r,e.hasData()||n=this._source.maxzoom){const e=n.children(this._source.maxzoom)[0],r=this.getTile(e);if(r&&r.hasData()){t[e.key]=e;continue}}else{const e=n.children(this._source.maxzoom);if(t[e[0].key]&&t[e[1].key]&&t[e[2].key]&&t[e[3].key])continue}let o=e.wasRequested();for(let a=n.overscaledZ-1;a>=i;--a){const i=n.scaledTo(a);if(r[i.key])break;if(r[i.key]=!0,e=this.getTile(i),!e&&o&&(e=this._addTile(i)),e&&(t[i.key]=i,o=e.wasRequested(),e.hasData()))break}}return t}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const t=[];let r,n=this._tiles[e].tileID;for(;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}t.push(n.key);const e=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(e),r)break;n=e}for(const e of t)this._loadedParentTiles[e]=r}}_addTile(e){let t=this._tiles[e.key];if(t)return t;t=this._cache.getAndRemove(e),t&&(this._setTileReloadTimer(e.key,t),t.tileID=e,this._state.initializeTileState(t,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,t)));const r=Boolean(t);if(!r){const r=this.map?this.map.painter:null;t=new fm(e,this._source.tileSize*e.overscaleFactor(),this.transform.tileZoom,r,this._isRaster),this._loadTile(t,this._tileLoaded.bind(this,t,e.key,t.state))}return t?(t.uses++,this._tiles[e.key]=t,r||this._source.fire(new Ke("dataloading",{tile:t,coord:t.tileID,dataType:"source"})),t):null}_setTileReloadTimer(e,t){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout((()=>{this._reloadTile(e,"expired"),delete this._timers[e]}),r))}_removeTile(e){const t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(+e);this._source._clear&&this._source._clear(),this._cache.reset(),this.map&&this.usedForTerrain&&this.map.painter.terrain&&this.map.painter.terrain.resetTileLookupCache(this.id)}tilesIn(e,t,r){const n=[],o=this.transform;if(!o)return n;const i="globe"===o.projection.name,a=Mc(o.center.lng);for(const s in this._tiles){const l=this._tiles[s];if(r&&l.clearQueryDebugViz(),l.holdingForFade())continue;let c;if(i){const e=l.tileID.canonical;if(0===e.z){const t=[Math.abs(T(a,...Fm(e,-1))-a),Math.abs(T(a,...Fm(e,1))-a)];c=[0,2*t.indexOf(Math.min(...t))-1]}else{const t=[Math.abs(T(a,...Fm(e,-1))-a),Math.abs(T(a,...Fm(e,0))-a),Math.abs(T(a,...Fm(e,1))-a)];c=[t.indexOf(Math.min(...t))-1]}}else c=[0];for(const r of c){const i=e.containsTile(l,o,t,r);i&&n.push(i)}}return n}getVisibleCoordinates(e){const t=this.getRenderableIds(e).map((e=>this._tiles[e].tileID));for(const e of t)e.projMatrix=this.transform.calculateProjMatrix(e.toUnwrapped());return t}hasTransition(){if(this._source.hasTransition())return!0;if(Nm(this._source.type))for(const e in this._tiles){const t=this._tiles[e];if(void 0!==t.fadeEndTime&&t.fadeEndTime>=Xe.now())return!0}return!1}setFeatureState(e,t,r){this._state.updateState(e=e||"_geojsonTileLayer",t,r)}removeFeatureState(e,t,r){this._state.removeFeatureState(e=e||"_geojsonTileLayer",t,r)}getFeatureState(e,t){return this._state.getState(e=e||"_geojsonTileLayer",t)}setDependencies(e,t,r){const n=this._tiles[e];n&&n.setDependencies(t,r)}reloadTilesForDependencies(e,t){for(const r in this._tiles)this._tiles[r].hasDependency(e,t)&&this._reloadTile(+r,"reloading");this._cache.filter((r=>!r.hasDependency(e,t)))}_preloadTiles(e,t){if(!this._sourceLoaded){const r=()=>{this._sourceLoaded&&(this._source.off("data",r),this._preloadTiles(e,t))};return void this._source.on("data",r)}const r=new Map,n=Array.isArray(e)?e:[e],o=this.map.painter.terrain,i=this.usedForTerrain&&o?o.getScaledDemTileSize():this._source.tileSize;for(const e of n){const t=e.coveringTiles({tileSize:i,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!this.usedForTerrain,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain});for(const e of t)r.set(e.key,e);this.usedForTerrain&&e.updateElevation(!1)}M(Array.from(r.values()),((e,t)=>{const r=new fm(e,this._source.tileSize*e.overscaleFactor(),this.transform.tileZoom,this.map.painter,this._isRaster);this._loadTile(r,(e=>{"raster-dem"===this._source.type&&r.dem&&this._backfillDEM(r),t(e,r)}))}),t)}}function Dm(e,t){const r=Math.abs(2*e.wrap)-+(e.wrap<0),n=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function Nm(e){return"raster"===e||"image"===e||"video"===e||"custom"===e}function Fm(e,t){const r=1<=0&&n[3]>=0&&s.insert(a,n[0],n[1],n[2],n[3])}}loadVTLayers(){if(!this.vtLayers){this.vtLayers=new Pd(new np(this.rawTileData)).layers,this.sourceLayerCoder=new em(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]),this.vtFeatures={};for(const e in this.vtLayers)this.vtFeatures[e]=[]}return this.vtLayers}query(e,t,r,n){this.loadVTLayers();const o=e.params||{},i=fo(o.filter),a=e.tileResult,s=e.transform,l=a.bufferedTilespaceBounds,c=this.grid.query(l.min.x,l.min.y,l.max.x,l.max.y,((e,t,r,n)=>su(a.bufferedTilespaceGeometry,e,t,r,n)));c.sort(Um);let u=null;s.elevation&&c.length>0&&(u=zm.create(s.elevation,this.tileID));const d={};let f;for(let s=0;s(h||(h=Wc(t,this.tileID.canonical,e.tileTransform)),r.queryIntersectsFeature(a,t,n,h,this.z,e.transform,e.pixelPosMatrix,u,o))))}return d}loadMatchingFeature(e,t,r,n,o,i,a,s,l){const{featureIndex:c,bucketIndex:u,sourceLayerIndex:d,layoutVertexArrayOffset:f}=t,p=this.bucketLayerIDs[u];if(n&&!function(e,t){for(let r=0;r=0)return!0;return!1}(n,p))return;const h=this.sourceLayerCoder.decode(d),m=this.vtLayers[h].feature(c);if(r.needGeometry){const e=qc(m,!0);if(!r.filter(new ma(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!r.filter(new ma(this.tileID.overscaledZ),m))return;const g=this.getId(m,h);for(let t=0;t{const a=t instanceof Aa?t.get(i):null;return a&&a.evaluate?a.evaluate(r,n,o):a}))}function Um(e,t){return t-e}Yo(Bm,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});class $m{constructor(e,t){this.width=e,this.height=t,this.nextRow=0,this.image=new Su({width:e,height:t}),this.positions={},this.uploaded=!1}getDash(e,t){const r=this.getKey(e,t);return this.positions[r]}trim(){const e=this.width,t=this.height=N(this.nextRow);this.image.resize({width:e,height:t})}getKey(e,t){return e.join(",")+t}getDashRanges(e,t,r){const n=[];let o=e.length%2==1?-e[e.length-1]*r:0,i=e[0]*r,a=!0;n.push({left:o,right:i,isDash:a,zeroLength:0===e[0]});let s=e[0];for(let t=1;t1&&(a=e[++i]);const l=Math.abs(s-a.left),c=Math.abs(s-a.right),u=Math.min(l,c);let d;const f=t/r*(n+1);if(a.isDash){const e=n-Math.abs(f);d=Math.sqrt(u*u+e*e)}else d=n-Math.sqrt(u*u+f*f);this.image.data[o+s]=Math.max(0,Math.min(255,d+128))}}}addRegularDash(e,t){for(let t=e.length-1;t>=0;--t){const r=e[t],n=e[t+1];r.zeroLength?e.splice(t,1):n&&n.isDash===r.isDash&&(n.left=r.left,e.splice(t,1))}const r=e[0],n=e[e.length-1];r.isDash===n.isDash&&(r.left=n.left-this.width,n.right=r.right+this.width);const o=this.width*this.nextRow;let i=0,a=e[i];for(let r=0;r1&&(a=e[++i]);const n=Math.abs(r-a.left),s=Math.abs(r-a.right),l=Math.min(n,s);this.image.data[o+r]=Math.max(0,Math.min(255,(a.isDash?l:-l)+t+128))}}addDash(e,t){const r=this.getKey(e,t);if(this.positions[r])return this.positions[r];const n="round"===t,o=n?7:0,i=2*o+1;if(this.nextRow+i>this.height)return G("LineAtlas out of space"),null;0===e.length&&e.push(1);let a=0;for(let t=0;t=t.maxzoom||"none"!==t.visibility&&(Hm(e,this.zoom,r),(s[t.id]=t.createBucket({index:a.bucketLayerIDs.length,layers:e,zoom:this.zoom,canonical:this.canonical,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:d,sourceID:this.source,enableTerrain:this.enableTerrain,projection:this.projection.spec,availableImages:r})).populate(f,c,this.tileID.canonical,this.tileTransform),a.bucketLayerIDs.push(e.map((e=>e.id))))}}let d,f,p,h;l.trim();const m={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},g=()=>{if(d)return o(d);if(f&&p&&h){const e=new Vm(f),t=new cp(p,h);for(const n in s){const o=s[n];o instanceof jh?(Hm(o.layers,this.zoom,r),Qp(o,f,e.positions,p,t.iconPositions,this.showCollisionBoxes,r,this.tileID.canonical,this.tileZoom,this.projection)):o.hasPattern&&(o instanceof pf||o instanceof pd||o instanceof jd)&&(Hm(o.layers,this.zoom,r),o.addFeatures(c,this.tileID.canonical,t.patternPositions,r,this.tileTransform))}this.status="done",o(null,{buckets:R(s).filter((e=>!e.isEmpty())),featureIndex:a,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,lineAtlas:l,imageAtlas:t,glyphMap:this.returnDependencies?f:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}},y=j(c.glyphDependencies,(e=>Object.keys(e).map(Number)));Object.keys(y).length?n.send("getGlyphs",{uid:this.uid,stacks:y},((e,t)=>{d||(d=e,f=t,g())}),void 0,!1,m):f={};const v=Object.keys(c.iconDependencies);v.length?n.send("getImages",{icons:v,source:this.source,tileID:this.tileID,type:"icons"},((e,t)=>{d||(d=e,p=t,g())}),void 0,!1,m):p={};const b=Object.keys(c.patternDependencies);b.length?n.send("getImages",{icons:b,source:this.source,tileID:this.tileID,type:"patterns"},((e,t)=>{d||(d=e,h=t,g())}),void 0,!1,m):h={},g()}}function Hm(e,t,r){const n=new ma(t);for(const t of e)t.recalculate(n,r)}class Wm{constructor(e){this.entries={},this.scheduler=e}request(e,t,r,n){const o=this.entries[e]=this.entries[e]||{callbacks:[]};if(o.result){const[e,r]=o.result;return this.scheduler?this.scheduler.add((()=>{n(e,r)}),t):n(e,r),()=>{}}return o.callbacks.push(n),o.cancel||(o.cancel=r(((r,n)=>{o.result=[r,n];for(const e of o.callbacks)this.scheduler?this.scheduler.add((()=>{e(r,n)}),t):e(r,n);setTimeout((()=>delete this.entries[e]),3e3)}))),()=>{o.result||(o.callbacks=o.callbacks.filter((e=>e!==n)),o.callbacks.length||(o.cancel(),delete this.entries[e]))}}}function qm(e,t,r){const n=JSON.stringify(e.request);return e.data&&(this.deduped.entries[n]={result:[null,e.data]}),this.deduped.request(n,{type:"parseTile",isSymbolTile:e.isSymbolTile,zoom:e.tileZoom},(t=>{const n=fe(e.request,((e,n,o,i)=>{e?t(e):n&&t(null,{vectorTile:r?void 0:new Pd(new np(n)),rawData:n,cacheControl:o,expires:i})}));return()=>{n.cancel(),t()}}),t)}const Xm=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Zm{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,r]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);const o=Xm[15&r];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Zm(a,i,o,e)}constructor(e,t=64,r=Float64Array,n){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=Xm.indexOf(this.ArrayType),i=2*e*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+a+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+i+a+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+a+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Ym(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:a}=this,s=[0,o.length-1,0],l=[];for(;s.length;){const c=s.pop()||0,u=s.pop()||0,d=s.pop()||0;if(u-d<=a){for(let a=d;a<=u;a++){const s=i[2*a],c=i[2*a+1];s>=e&&s<=r&&c>=t&&c<=n&&l.push(o[a])}continue}const f=d+u>>1,p=i[2*f],h=i[2*f+1];p>=e&&p<=r&&h>=t&&h<=n&&l.push(o[f]),(0===c?e<=p:t<=h)&&(s.push(d),s.push(f-1),s.push(1-c)),(0===c?r>=p:n>=h)&&(s.push(f+1),s.push(u),s.push(1-c))}return l}within(e,t,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:o,nodeSize:i}=this,a=[0,n.length-1,0],s=[],l=r*r;for(;a.length;){const c=a.pop()||0,u=a.pop()||0,d=a.pop()||0;if(u-d<=i){for(let r=d;r<=u;r++)eg(o[2*r],o[2*r+1],e,t)<=l&&s.push(n[r]);continue}const f=d+u>>1,p=o[2*f],h=o[2*f+1];eg(p,h,e,t)<=l&&s.push(n[f]),(0===c?e-r<=p:t-r<=h)&&(a.push(d),a.push(f-1),a.push(1-c)),(0===c?e+r>=p:t+r>=h)&&(a.push(f+1),a.push(u),a.push(1-c))}return s}}function Ym(e,t,r,n,o,i){if(o-n<=r)return;const a=n+o>>1;Km(e,t,a,n,o,i),Ym(e,t,r,n,a-1,1-i),Ym(e,t,r,a+1,o,1-i)}function Km(e,t,r,n,o,i){for(;o>n;){if(o-n>600){const a=o-n+1,s=r-n+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);Km(e,t,r,Math.max(n,Math.floor(r-s*c/a+u)),Math.min(o,Math.floor(r+(a-s)*c/a+u)),i)}const a=t[2*r+i];let s=n,l=o;for(Jm(e,t,n,r),t[2*o+i]>a&&Jm(e,t,n,o);sa;)l--}t[2*n+i]===a?Jm(e,t,n,l):(l++,Jm(e,t,l,o)),l<=r&&(n=l+1),r<=l&&(o=l-1)}}function Jm(e,t,r,n){Qm(e,r,n),Qm(t,2*r,2*n),Qm(t,2*r+1,2*n+1)}function Qm(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function eg(e,t,r,n){const o=e-r,i=t-n;return o*o+i*i}e.ARRAY_TYPE=el,e.AUTH_ERR_MSG=ve,e.Aabb=Xl,e.Actor=class{constructor(e,r,n){this.target=e,this.parent=r,this.mapId=n,this.callbacks={},this.cancelCallbacks={},z(["receive"],this),this.target.addEventListener("message",this.receive,!1),this.globalScope=q()?e:t,this.scheduler=new Qh}send(e,t,r,n,o=!1,i){const a=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(r.metadata=i,this.callbacks[a]=r);const s=Y(this.globalScope)?void 0:[];return this.target.postMessage({id:a,type:e,hasCallback:!!r,targetMapId:n,mustQueue:o,sourceMapId:this.mapId,data:Qo(t,s)},s),{cancel:()=>{r&&delete this.callbacks[a],this.target.postMessage({id:a,type:"",targetMapId:n,sourceMapId:this.mapId})}}}receive(e){const t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){const e=this.cancelCallbacks[r];delete this.cancelCallbacks[r],e&&e.cancel()}else if(t.mustQueue||q()){const e=this.callbacks[r];this.cancelCallbacks[r]=this.scheduler.add((()=>this.processTask(r,t)),e&&e.metadata||{type:"message"})}else this.processTask(r,t)}processTask(e,t){if(""===t.type){const r=this.callbacks[e];delete this.callbacks[e],r&&(t.error?r(ei(t.error)):r(null,ei(t.data)))}else{const r=Y(this.globalScope)?void 0:[],n=t.hasCallback?(t,n)=>{delete this.cancelCallbacks[e],this.target.postMessage({id:e,type:"",sourceMapId:this.mapId,error:t?Qo(t):null,data:Qo(n,r)},r)}:e=>{},o=ei(t.data);if(this.parent[t.type])this.parent[t.type](t.sourceMapId,o,n);else if(this.parent.getWorkerSource){const e=t.type.split(".");this.parent.getWorkerSource(t.sourceMapId,e[0],o.source)[e[1]](o,n)}else n(new Error(`Could not find function ${t.type}`))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}},e.CanonicalTileID=Jd,e.Color=Rt,e.ColorMode=Mm,e.CullFaceMode=Om,e.DEMData=Cm,e.DataConstantProperty=Sa,e.DedupedRequest=Wm,e.DepthMode=Tm,e.EXTENT=Ks,e.Elevation=class{isDataAvailableAtPoint(e){const t=this._source();if(this.isUsingMockSource()||!t||e.y<0||e.y>1)return!1;const r=t.getSource().maxzoom,n=1<1)return t;const o=n.getSource().maxzoom,i=1<{const i=this.getAtTileOffset(e,o.x,o.y),a=n.upVector(e.canonical,o.x,o.y);return wl(a,a,i*n.upVectorScale(e.canonical,t,r).metersToTile),a}}getForTilePoints(e,t,r,n){if(this.isUsingMockSource())return!1;const o=zm.create(this,e,n);return!!o&&(t.forEach((e=>{e[2]=this.exaggeration()*o.getElevationAt(e[0],e[1],r)})),!0)}getMinMaxForTile(e){if(this.isUsingMockSource())return null;const t=this.findDEMTileFor(e);if(!t||!t.dem)return null;const r=t.dem.tree,n=t.tileID,o=1<{let n=e===i-1?e-2:0===e?e:e-1;return n+=r?24575:0,[n,t]};for(let e=0;ethis._skuTokenExpiresAt}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}normalizeStyleURL(e,t){if(!be(e))return e;const r=Ce(e);return r.path=`/styles/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||t)}normalizeGlyphsURL(e,t){if(!be(e))return e;const r=Ce(e);return r.path=`/fonts/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||t)}normalizeSourceURL(e,t,r,n){if(!be(e))return e;const o=Ce(e);return o.path=`/v4/${o.authority}.json`,o.params.push("secure"),r&&o.params.push(`language=${r}`),n&&o.params.push(`worldview=${n}`),this._makeAPIURL(o,this._customAccessToken||t)}normalizeSpriteURL(e,t,r,n){const o=Ce(e);return be(e)?(o.path=`/styles/v1${o.path}/sprite${t}${r}`,this._makeAPIURL(o,this._customAccessToken||n)):(o.path+=`${t}${r}`,Ee(o))}normalizeTileURL(e,t,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!be(e))return e;const n=Ce(e);n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${t||r&&"raster"!==n.authority&&512===r?"@2x":""}${i.supported?".webp":"$1"}`),"raster"===n.authority?n.path=`/${o.RASTER_URL_PREFIX}${n.path}`:(n.path=n.path.replace(/^.+\/v4\//,"/"),n.path=`/${o.TILE_URL_VERSION}${n.path}`);const a=this._customAccessToken||function(e){for(const t of e){const e=t.match(/^access_token=(.*)$/);if(e)return e[1]}return null}(n.params)||o.ACCESS_TOKEN;return o.REQUIRE_ACCESS_TOKEN&&a&&this._skuToken&&n.params.push(`sku=${this._skuToken}`),this._makeAPIURL(n,a)}canonicalizeTileURL(e,t){const r=Ce(e);if(!r.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!r.path.match(/\.[\w]+$/))return e;let n="mapbox://";r.path.match(/^\/raster\/v1\//)?n+=`raster/${r.path.replace(`/${o.RASTER_URL_PREFIX}/`,"")}`:n+=`tiles/${r.path.replace(`/${o.TILE_URL_VERSION}/`,"")}`;let i=r.params;return t&&(i=i.filter((e=>!e.match(/^access_token=/)))),i.length&&(n+=`?${i.join("&")}`),n}canonicalizeTileset(e,t){const r=!!t&&be(t),n=[];for(const t of e.tiles||[])_e(t)?n.push(this.canonicalizeTileURL(t,r)):n.push(t);return n}_makeAPIURL(e,t){const r="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",n=Ce(o.API_URL);if(e.protocol=n.protocol,e.authority=n.authority,"http"===e.protocol){const t=e.params.indexOf("secure");t>=0&&e.params.splice(t,1)}if("/"!==n.path&&(e.path=`${n.path}${e.path}`),!o.REQUIRE_ACCESS_TOKEN)return Ee(e);if(t=t||o.ACCESS_TOKEN,!this._silenceAuthErrors){if(!t)throw new Error(`An API access token is required to use Mapbox GL. ${r}`);if("s"===t[0])throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${r}`)}return e.params=e.params.filter((e=>-1===e.indexOf("access_token"))),e.params.push(`access_token=${t||""}`),Ee(e)}},e.ResourceType=le,e.SegmentVector=Ys,e.SourceCache=Lm,e.StencilMode=km,e.StructArrayLayout1ui2=ns,e.StructArrayLayout2f1f2i16=qa,e.StructArrayLayout2i4=La,e.StructArrayLayout2ui4=rs,e.StructArrayLayout3f12=Za,e.StructArrayLayout3ui6=Ya,e.StructArrayLayout4i8=Na,e.StructArrayLayout5f20=es,e.Texture=Kh,e.Tile=fm,e.Transitionable=va,e.Uniform1f=Ts,e.Uniform1i=class extends Es{constructor(e){super(e),this.current=0}set(e,t,r){this.fetchUniformLocation(e,t)&&this.current!==r&&(this.current=r,this.gl.uniform1i(this.location,r))}},e.Uniform2f=class extends Es{constructor(e){super(e),this.current=[0,0]}set(e,t,r){this.fetchUniformLocation(e,t)&&(r[0]===this.current[0]&&r[1]===this.current[1]||(this.current=r,this.gl.uniform2f(this.location,r[0],r[1])))}},e.Uniform3f=class extends Es{constructor(e){super(e),this.current=[0,0,0]}set(e,t,r){this.fetchUniformLocation(e,t)&&(r[0]===this.current[0]&&r[1]===this.current[1]&&r[2]===this.current[2]||(this.current=r,this.gl.uniform3f(this.location,r[0],r[1],r[2])))}},e.Uniform4f=Is,e.UniformColor=ks,e.UniformMatrix2f=class extends Es{constructor(e){super(e),this.current=Ps}set(e,t,r){if(this.fetchUniformLocation(e,t))for(let e=0;e<4;e++)if(r[e]!==this.current[e]){this.current=r,this.gl.uniformMatrix2fv(this.location,!1,r);break}}},e.UniformMatrix3f=class extends Es{constructor(e){super(e),this.current=Rs}set(e,t,r){if(this.fetchUniformLocation(e,t))for(let e=0;e<9;e++)if(r[e]!==this.current[e]){this.current=r,this.gl.uniformMatrix3fv(this.location,!1,r);break}}},e.UniformMatrix4f=class extends Es{constructor(e){super(e),this.current=Ms}set(e,t,r){if(this.fetchUniformLocation(e,t)){if(r[12]!==this.current[12]||r[0]!==this.current[0])return this.current=r,void this.gl.uniformMatrix4fv(this.location,!1,r);for(let e=1;e<16;e++)if(r[e]!==this.current[e]){this.current=r,this.gl.uniformMatrix4fv(this.location,!1,r);break}}}},e.UnwrappedTileID=Qd,e.ValidationError=ro,e.VectorTileFeature=Od,e.VectorTileWorkerSource=class extends Qe{constructor(e,t,r,n,o){super(),this.actor=e,this.layerIndex=t,this.availableImages=r,this.loadVectorData=o||qm,this.loading={},this.loaded={},this.deduped=new Wm(e.scheduler),this.isSpriteLoaded=n,this.scheduler=e.scheduler}loadTile(e,t){const r=e.uid,n=e&&e.request,o=n&&n.collectResourceTiming,i=this.loading[r]=new Gm(e);i.abort=this.loadVectorData(e,((a,s)=>{const l=!this.loading[r];if(delete this.loading[r],l||a||!s)return i.status="done",l||(this.loaded[r]=i),t(a);const c=s.rawData,u={};s.expires&&(u.expires=s.expires),s.cacheControl&&(u.cacheControl=s.cacheControl),i.vectorTile=s.vectorTile||new Pd(new np(c));const d=()=>{i.parse(i.vectorTile,this.layerIndex,this.availableImages,this.actor,((e,r)=>{if(e||!r)return t(e);const i={};if(o){const e=Ve(n);e.length>0&&(i.resourceTiming=JSON.parse(JSON.stringify(e)))}t(null,P({rawTileData:c.slice(0)},r,u,i))}))};this.isSpriteLoaded?d():this.once("isSpriteLoaded",(()=>{this.scheduler?this.scheduler.add(d,{type:"parseTile",isSymbolTile:e.isSymbolTile,zoom:e.tileZoom}):d()})),this.loaded=this.loaded||{},this.loaded[r]=i}))}reloadTile(e,t){const r=this.loaded,n=e.uid,o=this;if(r&&r[n]){const i=r[n];i.showCollisionBoxes=e.showCollisionBoxes,i.enableTerrain=!!e.enableTerrain,i.projection=e.projection,i.tileTransform=uh(e.tileID.canonical,e.projection);const a=(e,r)=>{const n=i.reloadCallback;n&&(delete i.reloadCallback,i.parse(i.vectorTile,o.layerIndex,this.availableImages,o.actor,n)),t(e,r)};"parsing"===i.status?i.reloadCallback=a:"done"===i.status&&(i.vectorTile?i.parse(i.vectorTile,this.layerIndex,this.availableImages,this.actor,a):a())}}abortTile(e,t){const r=e.uid,n=this.loading[r];n&&(n.abort&&n.abort(),delete this.loading[r]),t()}removeTile(e,t){const r=this.loaded,n=e.uid;r&&r[n]&&delete r[n],t()}},e.WritingMode=up,e.ZoomDependentExpression=Jn,e.add=yl,e.addDynamicAttributes=Nh,e.adjoint=function(e,t){var r=t[0],n=t[1],o=t[2],i=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8];return e[0]=a*u-s*c,e[1]=o*c-n*u,e[2]=n*s-o*a,e[3]=s*l-i*u,e[4]=r*u-o*l,e[5]=o*i-r*s,e[6]=i*c-a*l,e[7]=n*l-r*c,e[8]=r*a-n*i,e},e.asyncAll=M,e.bezier=C,e.bindAll=z,e.boundsAttributes=um,e.bufferConvexPolygon=function(e,t){const r=[];for(let n=0;nne&&(e.getActor().send("enforceCacheSizeLimit",re),se=0)},e.calculateGlobeLabelMatrix=function(e,t){const{x:r,y:n}=e.point,o=vc(r,n,e.worldSize/e._pixelsPerMercatorPixel,0,0);return il(o,o,yc(ic(t)))},e.calculateGlobeMatrix=function(e){const{x:t,y:r}=e.point,{lng:n,lat:o}=e._center;return vc(t,r,e.worldSize,n,o)},e.calculateGlobeMercatorMatrix=function(e){const t=e.pixelsPerMeter,r=t/Pc(1,e.center.lat),n=nl(new Float64Array(16));return al(n,n,[e.point.x,e.point.y,0]),sl(n,n,[r,r,t]),Float32Array.from(n)},e.circumferenceAtLatitude=kc,e.clamp=T,e.clearTileCache=function(e){if(!oe())return;const r=t.caches.delete(Q);e&&r.catch(e).then((()=>e()))},e.clipLine=Op,e.clone=function(e){var t=new el(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.clone$1=$,e.collisionCircleLayout=Sf,e.config=o,e.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},e.create=function(){var e=new el(16);return el!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$1=tl,e.createExpression=Yn,e.createLayout=Pa,e.createStyleLayer=function(e){return"custom"===e.type?new qh(e):new Yh[e.type](e)},e.cross=El,e.degToRad=x,e.distance=function(e,t){return Math.hypot(t[0]-e[0],t[1]-e[1],t[2]-e[2])},e.div=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e},e.dot=Cl,e.earthRadius=Cc,e.ease=E,e.easeCubicInOut=S,e.ecefToLatLng=function([e,t,r]){const n=Math.hypot(e,t,r),o=Math.atan2(e,r),i=.5*Math.PI-Math.acos(-t/n);return new Ic(w(o),w(i))},e.emitValidationErrors=Go,e.endsWith=B,e.enforceCacheSizeLimit=function(e){ie(),ee&&ee.then((t=>{t.keys().then((r=>{for(let n=0;ni&&(n+=(e[o]-i)*(e[o]-i)),t[o]0){const e=180/n;rl(p,p,[e/c+1,0,0,0,e/u+1,0,-.5*e/d,.5*e/f,1])}return p[2]=l,p[5]=e.x,p[8]=e.y,p},e.getImage=ye,e.getJSON=function(e,t){return de(P(e,{type:"json"}),t)},e.getLatitudinalLod=function(e){const t=Nc-5;e=T(e,-t,t)/t*90;const r=Math.pow(Math.abs(Math.sin(x(e))),3);return Math.round(r*(Kl.length-1))},e.getMapSessionAPI=Fe,e.getPerformanceMeasurement=Ve,e.getProjection=Rh,e.getRTLTextPluginStatus=fa,e.getReferrer=ue,e.getTilePoint=function(e,{x:t,y:r},n=0){return new v(((t-n)*e.scale-e.x)*Ks,(r*e.scale-e.y)*Ks)},e.getTileVec3=function(e,t,r=0){return gl(((t.x-r)*e.scale-e.x)*Ks,(t.y*e.scale-e.y)*Ks,Dc(t.z,t.y))},e.getVideo=function(e,r){const n=t.document.createElement("video");n.muted=!0,n.onloadstart=function(){r(null,n)};for(let r=0;r{}}},e.globeCenterToScreenPoint=function(e){const t=[0,0,0],r=nl(new Float64Array(16));return il(r,e.pixelMatrix,e.globeMatrix),Tl(t,t,r),new v(t[0],t[1])},e.globeDenormalizeECEF=yc,e.globeECEFOrigin=function(e,t){const r=[0,0,0];return Tl(r,r,gc(ic(t.canonical))),Tl(r,r,e),r},e.globeMetersToEcef=tc,e.globeNormalizeECEF=gc,e.globePixelsToTileUnits=function(e,t){return Ks/(512*Math.pow(2,e))*hc(ic(t))},e.globePoleMatrixForTile=function(e,t,r){const n=nl(new Float64Array(16)),o=(t/(1<0;return 0===n&&!o&&!a&&i},e.identity=nl,e.identity$1=Fl,e.invert=ol,e.isFullscreen=function(){return!!t.document.fullscreenElement||!!t.document.webkitFullscreenElement},e.isLngLatBehindGlobe=xc,e.isMapAuthenticated=function(e){return ze.has(e)},e.isMapboxURL=be,e.isSafariWithAntialiasingBug=function(e){const t=e.navigator?e.navigator.userAgent:null;return!!Y(e)&&t&&(t.match("Version/15.4")||t.match("Version/15.5")||t.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/))},e.latFromMercatorY=Lc,e.latLngToECEF=fc,e.len=Pl,e.length=ml,e.length$1=function(e){return Math.hypot(e[0],e[1],e[2],e[3])},e.lngFromMercatorX=Oc,e.loadVectorTile=qm,e.makeRequest=de,e.mapValue=function(e,t,r,n,o){return T((e-t)/(r-t)*(o-n)+n,n,o)},e.mercatorScale=Fc,e.mercatorXfromLng=Mc,e.mercatorYfromLat=Rc,e.mercatorZfromAltitude=Pc,e.mul=fl,e.mul$1=Rl,e.multiply=il,e.multiply$1=rl,e.multiply$2=bl,e.nextPowerOfTwo=N,e.normalize=Sl,e.normalize$1=jl,e.normalize$2=Ll,e.number=Rr,e.ortho=function(e,t,r,n,o,i,a){var s=1/(t-r),l=1/(n-o),c=1/(i-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(o+n)*l,e[14]=(a+i)*c,e[15]=1,e},e.pbf=Df,e.perspective=function(e,t,r,n,o){var i,a=1/Math.tan(t/2);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=o&&o!==1/0?(e[10]=(o+n)*(i=1/(n-o)),e[14]=2*o*n*i):(e[10]=-1,e[14]=-2*n),e},e.pick=function(e,t){const r={};for(let n=0;n0&&r[0]<=e.width&&r[1]>0&&r[1]<=e.height&&!xc(e,new Ic(e.center.lat,90)),n[0]>0&&n[0]<=e.width&&n[1]>0&&n[1]<=e.height&&!xc(e,new Ic(e.center.lat,-90))]},e.polygonContainsPoint=au,e.polygonIntersectsBox=su,e.polygonIntersectsPolygon=Kc,e.polygonizeBounds=function(e,t,r=0,n=!0){const o=new v(r,r),i=e.sub(o),a=t.add(o),s=[i,new v(a.x,i.y),a,new v(i.x,a.y)];return n&&s.push(i.clone()),s},e.posAttributes=Gl,e.postMapLoadEvent=Oe,e.postPerformanceEvent=De,e.postTurnstileEvent=Re,e.potpack=sp,e.prevPowerOfTwo=function(e){return e<=1?1:Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},e.radToDeg=w,e.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],e.registerForPluginStateChange=function(e){return e({pluginStatus:sa,pluginURL:la}),da.on("pluginStateChange",e),e},e.removeAuthState=function(e){ze.delete(e)},e.renderColorRamp=Tu,e.resample=jc,e.rotateX=ll,e.rotateX$1=zl,e.rotateY=cl,e.rotateY$1=Bl,e.rotateZ=function(e,t,r){var n=Math.sin(r),o=Math.cos(r),i=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],f=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*o+c*n,e[1]=a*o+u*n,e[2]=s*o+d*n,e[3]=l*o+f*n,e[4]=c*o-i*n,e[5]=u*o-a*n,e[6]=d*o-s*n,e[7]=f*o-l*n,e},e.rotateZ$1=function(e,t,r){r*=.5;var n=t[0],o=t[1],i=t[2],a=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l+o*s,e[1]=o*l-n*s,e[2]=i*l+a*s,e[3]=a*l-i*s,e},e.scale=sl,e.scale$1=Ol,e.scale$2=wl,e.scaleAndAdd=Al,e.set=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e},e.setCacheLimits=function(e,t){re=e,ne=t},e.setColumn=function(e,t,r){e[4*t+0]=r[0],e[4*t+1]=r[1],e[4*t+2]=r[2],e[4*t+3]=r[3]},e.setRTLTextPlugin=function(e,t,r=!1){if(sa===na||sa===oa||sa===ia)throw new Error("setRTLTextPlugin cannot be called multiple times.");la=Xe.resolveURL(e),sa=na,aa=t,ua(),r||pa()},e.smoothstep=I,e.spec=et,e.squaredLength=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n},e.storeAuthState=function(e,t){t?ze.add(e):ze.delete(e)},e.sub=Ml,e.subtract=vl,e.symbolSize=Mf,e.tileAABB=function(e,t,r,n,o,i,a,s,l){if("globe"===l.name)return function(e,t,r){const n=t/e.worldSize,o=e.globeMatrix;if(r.z<=1){const e=ic(r).getCorners();return lc(e,o,n),Xl.fromPoints(e)}const i=cc(r),a=uc(i);lc(a,o,n);const s=Number.MAX_VALUE,l=[-s,-s,-s],c=[s,s,s];if(i.contains(e.center)){for(const e of a)_l(c,c,e),xl(l,l,e);l[2]=0;const t=e.point,r=[t.x*n,t.y*n,0];return _l(c,c,r),xl(l,l,r),new Xl(c,l)}const u=[o[12]*n,o[13]*n,o[14]*n],d=i.getCenter(),f=T(e.center.lat,-Nc,Nc),p=T(d.lat,-Nc,Nc),h=Mc(e.center.lng),m=Rc(f);let g=h-Mc(d.lng);const y=m-Rc(p);g>.5?g-=1:g<-.5&&(g+=1);let v=0;Math.abs(g)>Math.abs(y)?v=g>=0?1:3:(v=y>=0?0:2,Al(u,u,[o[4]*n,o[5]*n,o[6]*n],-Math.sin(x(y>=0?i.getSouth():i.getNorth()))*Zl));const b=a[v],_=a[(v+1)%4],w=new nc(b,_,u),A=[oc(w,0)||b[0],oc(w,1)||b[1],oc(w,2)||b[2]],S=bc(e.zoom);if(S>0){const n=function({x:e,y:t,z:r},n,o,i,a){const s=1/(1<.5?f=-1:p<-.5&&(f=1),l=((l+f)*n-(i*=n))*o+i,c=((c+f)*n-i)*o+i,u=(u*n-(a*=n))*o+a,d=(d*n-a)*o+a,[[l,d,0],[c,d,0],[c,u,0],[l,u,0]]}(r,t,e._pixelsPerMercatorPixel,h,m);for(let e=0;eVo(So(e)),e.validateFog=e=>Vo(No(e)),e.validateLayer=e=>Vo(ko(e)),e.validateLight=e=>Vo(Lo(e)),e.validateSource=e=>Vo(Po(e)),e.validateStyle=jo,e.validateTerrain=e=>Vo(Do(e)),e.values=R,e.vectorTile=_d,e.version=r,e.warnOnce=G,e.window=t,e.wrap=k})),n(0,(function(e){function t(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e||null==e)return JSON.stringify(e);if(Array.isArray(e)){let r="[";for(const n of e)r+=`${t(n)},`;return`${r}]`}let r="{";for(const n of Object.keys(e).sort())r+=`${n}:${t(e[n])},`;return`${r}}`}function r(r){let n="";for(const o of e.refProperties)n+=`/${t(r[o])}`;return n}class n{constructor(e){this.keyCache={},e&&this.replace(e)}replace(e){this._layerConfigs={},this._layers={},this.update(e,[])}update(t,n){for(const r of t)this._layerConfigs[r.id]=r,(this._layers[r.id]=e.createStyleLayer(r)).compileFilter(),this.keyCache[r.id]&&delete this.keyCache[r.id];for(const e of n)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};const o=function(e,t){const n={};for(let o=0;othis._layers[e.id])),r=t[0];if("none"===r.visibility)continue;const n=r.source||"";let o=this.familiesBySource[n];o||(o=this.familiesBySource[n]={});const i=r.sourceLayer||"_geojsonTileLayer";let a=o[i];a||(a=o[i]=[]),a.push(t)}}}class o{loadTile(t,r){const{uid:n,encoding:o,rawImageData:i,padding:a,buildQuadTree:s}=t,l=e.window.ImageBitmap&&i instanceof e.window.ImageBitmap?this.getImageData(i,a):i;r(null,new e.DEMData(n,l,o,a<1,s))}getImageData(e,t){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);const r=this.offscreenCanvasContext.getImageData(-t,-t,e.width+2*t,e.height+2*t);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),r}}function i(e,t){if(0!==e.length){a(e[0],t);for(var r=1;r=Math.abs(s)?r-l+s:s-l+r,r=l}r+n>=0!=!!t&&e.reverse()}var s=e.getDefaultExportFromCjs((function e(t,r){var n,o=t&&t.type;if("FeatureCollection"===o)for(n=0;n>31}function A(e,t){for(var r=e.loadGeometry(),n=e.type,o=0,i=0,a=r.length,s=0;se},T=Math.fround||(I=new Float32Array(1),e=>(I[0]=+e,I[0]));var I;class k{constructor(e){this.options=Object.assign(Object.create(E),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:r,maxZoom:n}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;const i=[];for(let t=0;t=r;e--){const r=+Date.now();a=this.trees[e]=this._createTree(this._cluster(a,e)),t&&console.log("z%d: %d clusters in %dms",e,a.numItems,+Date.now()-r)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[1]));let o=180===e[2]?180:((e[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const e=this.getClusters([r,n,180,i],t),a=this.getClusters([-180,n,o,i],t);return e.concat(a)}const a=this.trees[this._limitZoom(t)],s=a.range(P(r),O(i),P(o),O(n)),l=a.data,c=[];for(const e of s){const t=this.stride*e;c.push(l[t+5]>1?M(l,t,this.clusterProps):this.points[l[t+3]])}return c}getChildren(e){const t=this._getOriginId(e),r=this._getOriginZoom(e),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const i=o.data;if(t*this.stride>=i.length)throw new Error(n);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=o.within(i[t*this.stride],i[t*this.stride+1],a),l=[];for(const t of s){const r=t*this.stride;i[r+4]===e&&l.push(i[r+5]>1?M(i,r,this.clusterProps):this.points[i[r+3]])}if(0===l.length)throw new Error(n);return l}getLeaves(e,t,r){const n=[];return this._appendLeaves(n,e,t=t||10,r=r||0,0),n}getTile(e,t,r){const n=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:i,radius:a}=this.options,s=a/i,l=(r-s)/o,c=(r+1+s)/o,u={features:[]};return this._addTileFeatures(n.range((t-s)/o,l,(t+1+s)/o,c),n.data,t,r,o,u),0===t&&this._addTileFeatures(n.range(1-s/o,l,1,c),n.data,o,r,o,u),t===o-1&&this._addTileFeatures(n.range(0,l,s/o,c),n.data,-1,r,o,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const r=this.getChildren(e);if(t++,1!==r.length)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,n,o){const i=this.getChildren(t);for(const t of i){const i=t.properties;if(i&&i.cluster?o+i.point_count<=n?o+=i.point_count:o=this._appendLeaves(e,i.cluster_id,r,n,o):o1;let l,c,u;if(s)l=R(t,e,this.clusterProps),c=t[e],u=t[e+1];else{const r=this.points[t[e+3]];l=r.properties;const[n,o]=r.geometry.coordinates;c=P(n),u=O(o)}const d={type:1,geometry:[[Math.round(this.options.extent*(c*o-r)),Math.round(this.options.extent*(u*o-n))]],tags:l};let f;f=s||this.options.generateId?t[e+3]:this.points[t[e+3]].id,void 0!==f&&(d.id=f),i.features.push(d)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:r,extent:n,reduce:o,minPoints:i}=this.options,a=r/(n*Math.pow(2,t)),s=e.data,l=[],c=this.stride;for(let r=0;rt&&(p+=s[r+5])}if(p>f&&p>=i){let e,i=n*f,a=u*f,h=-1;const m=(r/c<<5)+(t+1)+this.points.length;for(const n of d){const l=n*c;if(s[l+2]<=t)continue;s[l+2]=t;const u=s[l+5];i+=s[l]*u,a+=s[l+1]*u,s[l+4]=m,o&&(e||(e=this._map(s,r,!0),h=this.clusterProps.length,this.clusterProps.push(e)),o(e,this._map(s,l)))}s[r+4]=m,l.push(i/p,a/p,1/0,m,-1,p),o&&l.push(h)}else{for(let e=0;e1)for(const e of d){const r=e*c;if(!(s[r+2]<=t)){s[r+2]=t;for(let e=0;e>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+5]>1){const n=this.clusterProps[e[t+6]];return r?Object.assign({},n):n}const n=this.points[e[t+3]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function M(e,t,r){return{type:"Feature",id:e[t+3],properties:R(e,t,r),geometry:{type:"Point",coordinates:[(n=e[t],360*(n-.5)),L(e[t+1])]}};var n}function R(e,t,r){const n=e[t+5],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,i=e[t+6],a=-1===i?{}:Object.assign({},r[i]);return Object.assign(a,{cluster:!0,cluster_id:e[t+3],point_count:n,point_count_abbreviated:o})}function P(e){return e/360+.5}function O(e){const t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function L(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function D(e,t,r,n){for(var o,i=n,a=r-t>>1,s=r-t,l=e[t],c=e[t+1],u=e[r],d=e[r+1],f=t+3;fi)o=f,i=p;else if(p===i){var h=Math.abs(f-a);hn&&(o-t>3&&D(e,t,o,n),e[o+2]=i,r-o>3&&D(e,o,r,n))}function N(e,t,r,n,o,i){var a=o-r,s=i-n;if(0!==a||0!==s){var l=((e-r)*a+(t-n)*s)/(a*a+s*s);l>1?(r=o,n=i):l>0&&(r+=a*l,n+=s*l)}return(a=e-r)*a+(s=t-n)*s}function F(e,t,r,n){var o={id:void 0===e?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,r=e.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)z(e,t);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(a+=n?(o*c-l*i)/2:Math.sqrt(Math.pow(l-o,2)+Math.pow(c-i,2))),o=l,i=c}var u=t.length-3;t[2]=1,D(t,0,u,r),t[u+2]=1,t.size=Math.abs(a),t.start=0,t.end=t.size}function $(e,t,r,n){for(var o=0;o1?1:r}function H(e,t,r,n,o,i,a,s){if(n/=t,i>=(r/=t)&&a=n)return null;for(var l=[],c=0;c=r&&h=n)){var m=[];if("Point"===f||"MultiPoint"===f)W(d,m,r,n,o);else if("LineString"===f)q(d,m,r,n,o,!1,s.lineMetrics);else if("MultiLineString"===f)Z(d,m,r,n,o,!1);else if("Polygon"===f)Z(d,m,r,n,o,!0);else if("MultiPolygon"===f)for(var g=0;g=r&&a<=n&&(t.push(e[i]),t.push(e[i+1]),t.push(e[i+2]))}}function q(e,t,r,n,o,i,a){for(var s,l,c=X(e),u=0===o?K:J,d=e.start,f=0;fr&&(l=u(c,p,h,g,y,r),a&&(c.start=d+s*l)):v>n?b=r&&(l=u(c,p,h,g,y,r),_=!0),b>n&&v<=n&&(l=u(c,p,h,g,y,n),_=!0),!i&&_&&(a&&(c.end=d+s*l),t.push(c),c=X(e)),a&&(d+=s)}var x=e.length-3;p=e[x],h=e[x+1],m=e[x+2],(v=0===o?p:h)>=r&&v<=n&&Y(c,p,h,m),x=c.length-3,i&&x>=3&&(c[x]!==c[0]||c[x+1]!==c[1])&&Y(c,c[0],c[1],c[2]),c.length&&t.push(c)}function X(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function Z(e,t,r,n,o,i){for(var a=0;aa.maxX&&(a.maxX=u),d>a.maxY&&(a.maxY=d)}return a}function oe(e,t,r,n){var o=t.geometry,i=t.type,a=[];if("Point"===i||"MultiPoint"===i)for(var s=0;s0&&t.size<(o?a:n))r.numPoints+=t.length/3;else{for(var s=[],l=0;la)&&(r.numSimplified++,s.push(t[l]),s.push(t[l+1])),r.numPoints++;o&&function(e,t){for(var r=0,n=0,o=e.length,i=o-2;n0===t)for(n=0,o=e.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(e,t){var r=[];if("FeatureCollection"===e.type)for(var n=0;n1&&console.time("creation"),f=this.tiles[d]=ne(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var p="z"+t;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(f.source=e,o){if(t===l.maxZoom||t===o)continue;var h=1<1&&console.time("clipping");var m,g,y,v,b,_,x=.5*l.buffer/l.extent,w=.5-x,A=.5+x,S=1+x;m=g=y=v=null,b=H(e,u,r-x,r+A,0,f.minX,f.maxX,l),_=H(e,u,r+w,r+S,0,f.minX,f.maxX,l),e=null,b&&(m=H(b,u,n-x,n+A,1,f.minY,f.maxY,l),g=H(b,u,n+w,n+S,1,f.minY,f.maxY,l),b=null),_&&(y=H(_,u,n-x,n+A,1,f.minY,f.maxY,l),v=H(_,u,n+w,n+S,1,f.minY,f.maxY,l),_=null),c>1&&console.timeEnd("clipping"),s.push(m||[],t+1,2*r,2*n),s.push(g||[],t+1,2*r,2*n+1),s.push(y||[],t+1,2*r+1,2*n),s.push(v||[],t+1,2*r+1,2*n+1)}}},ae.prototype.getTile=function(e,t,r){var n=this.options,o=n.extent,i=n.debug;if(e<0||e>24)return null;var a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var l,c=e,u=t,d=r;!l&&c>0;)c--,u=Math.floor(u/2),d=Math.floor(d/2),l=this.tiles[se(c,u,d)];return l&&l.source?(i>1&&console.log("found parent tile z%d-%d-%d",c,u,d),i>1&&console.time("drilling down"),this.splitTile(l.source,c,u,d,e,t,r),i>1&&console.timeEnd("drilling down"),this.tiles[s]?te(this.tiles[s],o):null):null};class ce extends e.VectorTileWorkerSource{constructor(e,t,r,n,o){super(e,t,r,n,le),o&&(this.loadGeoJSON=o)}loadData(t,r){const n=t&&t.request,o=n&&n.collectResourceTiming;this.loadGeoJSON(t,((i,a)=>{if(i||!a)return r(i);if("object"!=typeof a)return r(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`));{s(a,!0);try{if(t.filter){const r=e.createExpression(t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw new Error(r.value.map((e=>`${e.key}: ${e.message}`)).join(", "));const n=a.features.filter((e=>r.value.evaluate({zoom:0},e)));a={type:"FeatureCollection",features:n}}this._geoJSONIndex=t.cluster?new k(function({superclusterOptions:t,clusterProperties:r}){if(!r||!t)return t;const n={},o={},i={accumulated:null,zoom:0},a={properties:null},s=Object.keys(r);for(const t of s){const[i,a]=r[t],s=e.createExpression(a),l=e.createExpression("string"==typeof i?[i,["accumulated"],["get",t]]:i);n[t]=s.value,o[t]=l.value}return t.map=e=>{a.properties=e;const t={};for(const e of s)t[e]=n[e].evaluate(i,a);return t},t.reduce=(e,t)=>{a.properties=t;for(const t of s)i.accumulated=e[t],e[t]=o[t].evaluate(i,a)},t}(t)).load(a.features):function(e,t){return new ae(e,t)}(a,t.geojsonVtOptions)}catch(i){return r(i)}this.loaded={};const l={};if(o){const r=e.getPerformanceMeasurement(n);r&&(l.resourceTiming={},l.resourceTiming[t.source]=JSON.parse(JSON.stringify(r)))}r(null,l)}}))}reloadTile(e,t){const r=this.loaded;return r&&r[e.uid]?super.reloadTile(e,t):this.loadTile(e,t)}loadGeoJSON(t,r){if(t.request)e.getJSON(t.request,r);else{if("string"!=typeof t.data)return r(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`));try{return r(null,JSON.parse(t.data))}catch(e){return r(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`))}}}getClusterExpansionZoom(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))}catch(e){t(e)}}getClusterChildren(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId))}catch(e){t(e)}}getClusterLeaves(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))}catch(e){t(e)}}}class ue{constructor(t){this.self=t,this.actor=new e.Actor(t,this),this.layerIndexes={},this.availableImages={},this.isSpriteLoaded={},this.projections={},this.defaultProjection=e.getProjection({name:"mercator"}),this.workerSourceTypes={vector:e.VectorTileWorkerSource,geojson:ce},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(e,t)=>{if(this.workerSourceTypes[e])throw new Error(`Worker source with name "${e}" already registered.`);this.workerSourceTypes[e]=t},this.self.registerRTLTextPlugin=t=>{if(e.plugin.isParsed())throw new Error("RTL text plugin already registered.");e.plugin.applyArabicShaping=t.applyArabicShaping,e.plugin.processBidirectionalText=t.processBidirectionalText,e.plugin.processStyledBidirectionalText=t.processStyledBidirectionalText}}clearCaches(e,t,r){delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],r()}checkIfReady(e,t,r){r()}setReferrer(e,t){this.referrer=t}spriteLoaded(t,r){this.isSpriteLoaded[t]=r;for(const n in this.workerSources[t]){const o=this.workerSources[t][n];for(const t in o)o[t]instanceof e.VectorTileWorkerSource&&(o[t].isSpriteLoaded=r,o[t].fire(new e.Event("isSpriteLoaded")))}}setImages(e,t,r){this.availableImages[e]=t;for(const r in this.workerSources[e]){const n=this.workerSources[e][r];for(const e in n)n[e].availableImages=t}r()}enableTerrain(e,t,r){this.terrain=t,r()}setProjection(t,r){this.projections[t]=e.getProjection(r)}setLayers(e,t,r){this.getLayerIndex(e).replace(t),r()}updateLayers(e,t,r){this.getLayerIndex(e).update(t.layers,t.removedIds),r()}loadTile(t,r,n){const o=this.enableTerrain?e.extend({enableTerrain:this.terrain},r):r;o.projection=this.projections[t]||this.defaultProjection,this.getWorkerSource(t,r.type,r.source).loadTile(o,n)}loadDEMTile(t,r,n){const o=this.enableTerrain?e.extend({buildQuadTree:this.terrain},r):r;this.getDEMWorkerSource(t,r.source).loadTile(o,n)}reloadTile(t,r,n){const o=this.enableTerrain?e.extend({enableTerrain:this.terrain},r):r;o.projection=this.projections[t]||this.defaultProjection,this.getWorkerSource(t,r.type,r.source).reloadTile(o,n)}abortTile(e,t,r){this.getWorkerSource(e,t.type,t.source).abortTile(t,r)}removeTile(e,t,r){this.getWorkerSource(e,t.type,t.source).removeTile(t,r)}removeSource(e,t,r){if(!this.workerSources[e]||!this.workerSources[e][t.type]||!this.workerSources[e][t.type][t.source])return;const n=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==n.removeSource?n.removeSource(t,r):r()}loadWorkerSource(e,t,r){try{this.self.importScripts(t.url),r()}catch(e){r(e.toString())}}syncRTLPluginState(t,r,n){try{e.plugin.setState(r);const t=e.plugin.getPluginURL();if(e.plugin.isLoaded()&&!e.plugin.isParsed()&&null!=t){this.self.importScripts(t);const r=e.plugin.isParsed();n(r?void 0:new Error(`RTL Text Plugin failed to import scripts from ${t}`),r)}}catch(e){n(e.toString())}}getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}getLayerIndex(e){let t=this.layerIndexes[e];return t||(t=this.layerIndexes[e]=new n),t}getWorkerSource(e,t,r){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][r]){const n={send:(t,r,n,o,i,a)=>{this.actor.send(t,r,n,e,i,a)},scheduler:this.actor.scheduler};this.workerSources[e][t][r]=new this.workerSourceTypes[t](n,this.getLayerIndex(e),this.getAvailableImages(e),this.isSpriteLoaded[e])}return this.workerSources[e][t][r]}getDEMWorkerSource(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new o),this.demWorkerSources[e][t]}enforceCacheSizeLimit(t,r){e.enforceCacheSizeLimit(r)}getWorkerPerformanceMetrics(e,t,r){r(void 0,void 0)}}return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new ue(self)),ue})),n(0,(function(e){function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(let n=0;n{e.window.removeEventListener("click",f,!0)}),0)}function h(e,t){const r=e.getBoundingClientRect();return y(e,r,t)}function m(e,t){const r=e.getBoundingClientRect(),n=[];for(let o=0;o=0?0:t.button}function y(t,r,n){const o=t.offsetWidth===r.width?1:t.offsetWidth/r.width;return new e.Point((n.clientX-r.left)*o,(n.clientY-r.top)*o)}function v(e,t){var r=t[0],n=t[1],o=t[2],i=t[3],a=r*i-o*n;return a?(e[0]=i*(a=1/a),e[1]=-n*a,e[2]=-o*a,e[3]=r*a,e):null}function b(e){const{userImage:t}=e;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}class _ extends e.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:e,callback:t}of this.requestors)this._notify(e,t);this.requestors=[]}}hasImage(e){return!!this.getImage(e)}getImage(e){return this.images[e]}addImage(e,t){this._validate(e,t)&&(this.images[e]=t)}_validate(t,r){let n=!0;return this._validateStretch(r.stretchX,r.data&&r.data.width)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "stretchX" value`))),n=!1),this._validateStretch(r.stretchY,r.data&&r.data.height)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "stretchY" value`))),n=!1),this._validateContent(r.content,r)||(this.fire(new e.ErrorEvent(new Error(`Image "${t}" has invalid "content" value`))),n=!1),n}_validateStretch(e,t){if(!e)return!0;let r=0;for(const n of e){if(n[0]{this.ready=!0}))}broadcast(t,r,n){e.asyncAll(this.actors,((e,n)=>{e.send(t,r,n)}),n=n||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach((e=>{e.remove()})),this.actors=[],this.workerPool.release(this.id)}}function M(t,r,n){return r*(e.EXTENT/(t.tileSize*Math.pow(2,n-t.tileID.overscaledZ)))}k.Actor=e.Actor;class R{constructor(e,t,r,n){this.screenBounds=e,this.cameraPoint=t,this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=r,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this._bufferedScreenMercator(0,n)}static createFromScreenPoints(t,r){let n,o;if(t instanceof e.Point||"number"==typeof t[0]){const i=e.Point.convert(t);n=[i],o=r.isPointAboveHorizon(i)}else{const i=e.Point.convert(t[0]),a=e.Point.convert(t[1]);n=[i,a],o=e.polygonizeBounds(i,a).every((e=>r.isPointAboveHorizon(e)))}return new R(n,r.getCameraPoint(),o,r)}isPointQuery(){return 1===this.screenBounds.length}bufferedScreenGeometry(t){return e.polygonizeBounds(this.screenBounds[0],1===this.screenBounds.length?this.screenBounds[0]:this.screenBounds[1],t)}bufferedCameraGeometry(t){const r=this.screenBounds[0],n=1===this.screenBounds.length?this.screenBounds[0].add(new e.Point(1,1)):this.screenBounds[1],o=e.polygonizeBounds(r,n,0,!1);return this.cameraPoint.y>n.y&&(this.cameraPoint.x>r.x&&this.cameraPoint.x=n.x?o[2]=this.cameraPoint:this.cameraPoint.x<=r.x&&(o[3]=this.cameraPoint)),e.bufferConvexPolygon(o,t)}bufferedCameraGeometryGlobe(t){const r=this.screenBounds[0],n=1===this.screenBounds.length?this.screenBounds[0].add(new e.Point(1,1)):this.screenBounds[1],o=e.polygonizeBounds(r,n,t),i=this.cameraPoint.clone();switch(3*((i.y>r.y)+(i.y>n.y))+((i.x>r.x)+(i.x>n.x))){case 0:o[0]=i,o[4]=i.clone();break;case 1:o.splice(1,0,i);break;case 2:o[1]=i;break;case 3:o.splice(4,0,i);break;case 5:o.splice(2,0,i);break;case 6:o[3]=i;break;case 7:o.splice(3,0,i);break;case 8:o[2]=i}return o}containsTile(t,r,n,o=0){const i=t.queryPadding/r._pixelsPerMercatorPixel+1,a=n?this._bufferedCameraMercator(i,r):this._bufferedScreenMercator(i,r);let s=t.tileID.wrap+(a.unwrapped?o:0);const l=a.polygon.map((r=>e.getTilePoint(t.tileTransform,r,s)));if(!e.polygonIntersectsBox(l,0,0,e.EXTENT,e.EXTENT))return;s=t.tileID.wrap+(this.screenGeometryMercator.unwrapped?o:0);const c=this.screenGeometryMercator.polygon.map((r=>e.getTileVec3(t.tileTransform,r,s))),u=c.map((t=>new e.Point(t[0],t[1]))),d=r.getFreeCameraOptions().position||new e.MercatorCoordinate(0,0,0),f=e.getTileVec3(t.tileTransform,d,s),p=c.map((t=>{const r=e.sub(t,t,f);return e.normalize(r,r),new e.Ray(f,r)})),h=M(t,1,r.zoom)*r._pixelsPerMercatorPixel;return{queryGeometry:this,tilespaceGeometry:u,tilespaceRays:p,bufferedTilespaceGeometry:l,bufferedTilespaceBounds:(m=e.getBounds(l),m.min.x=e.clamp(m.min.x,0,e.EXTENT),m.min.y=e.clamp(m.min.y,0,e.EXTENT),m.max.x=e.clamp(m.max.x,0,e.EXTENT),m.max.y=e.clamp(m.max.y,0,e.EXTENT),m),tile:t,tileID:t.tileID,pixelToTileUnitsFactor:h};var m}_bufferedScreenMercator(e,t){const r=L(e);if(this._screenRaycastCache[r])return this._screenRaycastCache[r];{let n;return n="globe"===t.projection.name?this._projectAndResample(this.bufferedScreenGeometry(e),t):{polygon:this.bufferedScreenGeometry(e).map((e=>t.pointCoordinate3D(e))),unwrapped:!0},this._screenRaycastCache[r]=n,n}}_bufferedCameraMercator(e,t){const r=L(e);if(this._cameraRaycastCache[r])return this._cameraRaycastCache[r];{let n;return n="globe"===t.projection.name?this._projectAndResample(this.bufferedCameraGeometryGlobe(e),t):{polygon:this.bufferedCameraGeometry(e).map((e=>t.pointCoordinate3D(e))),unwrapped:!0},this._cameraRaycastCache[r]=n,n}}_projectAndResample(t,r){const n=function(t,r){const n=e.multiply([],r.pixelMatrix,r.globeMatrix),o=[0,-e.GLOBE_RADIUS,0,1],i=[0,e.GLOBE_RADIUS,0,1],a=[0,0,0,1];e.transformMat4$1(o,o,n),e.transformMat4$1(i,i,n),e.transformMat4$1(a,a,n);const s=new e.Point(o[0]/o[3],o[1]/o[3]),l=new e.Point(i[0]/i[3],i[1]/i[3]),c=e.polygonContainsPoint(t,s)&&o[3]1?P(t.slice(0,f),r):[],m=fnew e.Point(O(t.x),t.y))),m=m.map((t=>new e.Point(O(t.x),t.y)));const g=[...h];0===g.length&&g.push(m[m.length-1]);const y=e.number(g[g.length-1].y,(0===m.length?h[0]:m[0]).y,p);let v;return v=c?[new e.Point(0,y),new e.Point(0,0),new e.Point(1,0),new e.Point(1,y)]:[new e.Point(1,y),new e.Point(1,1),new e.Point(0,1),new e.Point(0,y)],g.push(...v),0===m.length?g.push(h[0]):g.push(...m),{polygon:g.map((t=>new e.MercatorCoordinate(t.x,t.y))),unwrapped:!1}}(t,r);if(n)return n;const o=function(t,r){let n=!1,o=-1/0,i=0;for(let e=0;eo&&(o=t[e].x,i=e);for(let e=0;e.5&&(o.x{e.x-=1})),{polygon:t,unwrapped:n}}(P(t,r).map((t=>new e.Point(O(t.x),t.y))),r);return{polygon:o.polygon.map((t=>new e.MercatorCoordinate(t.x,t.y))),unwrapped:o.unwrapped}}}function P(t,r){return e.resample(t,(e=>{const t=r.pointCoordinate3D(e);e.x=t.x,e.y=t.y}),1/256)}function O(e){return e<0?1+e%1:e%1}function L(e){return 100*e|0}function D(t,r,n,o,i){const a=function(n,o){if(n)return i(n);if(o){t.url&&o.tiles&&t.tiles&&delete t.tiles;const n=e.pick(e.extend(o,t),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);o.vector_layers&&(n.vectorLayers=o.vector_layers,n.vectorLayerIds=n.vectorLayers.map((e=>e.id))),n.tiles=r.canonicalizeTileset(n,t.url),i(null,n)}};return t.url?e.getJSON(r.transformRequest(r.normalizeSourceURL(t.url,null,n,o),e.ResourceType.Source),a):e.exported.frame((()=>a(null,t)))}class N{constructor(t,r,n){this.bounds=e.LngLatBounds.convert(this.validateBounds(t)),this.minzoom=r||0,this.maxzoom=n||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[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(t){const r=Math.pow(2,t.z),n=Math.floor(e.mercatorXfromLng(this.bounds.getWest())*r),o=Math.floor(e.mercatorYfromLat(this.bounds.getNorth())*r),i=Math.ceil(e.mercatorXfromLng(this.bounds.getEast())*r),a=Math.ceil(e.mercatorYfromLat(this.bounds.getSouth())*r);return t.x>=n&&t.x=o&&t.y{this._tileJSONRequest=null,this._loaded=!0,o?(r&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${r}`),n&&2!==n.length&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${n}`),this.fire(new e.ErrorEvent(o))):i&&(e.extend(this,i),i.bounds&&(this.tileBounds=new N(i.bounds,this.minzoom,this.maxzoom)),e.postTurnstileEvent(i.tiles,this.map._requestManager._customAccessToken),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"}))),t&&t(o)}))}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}reload(){this.cancelTileJSONRequest(),this.load((()=>this.map.style._clearSource(this.id)))}setTiles(e){return this._options.tiles=e,this.reload(),this}setUrl(e){return this.url=e,this._options.url=e,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return e.extend({},this._options)}loadTile(t,r){const n=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme)),o={request:this.map._requestManager.transformRequest(n,e.ResourceType.Tile),data:void 0,uid:t.uid,tileID:t.tileID,tileZoom:t.tileZoom,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:e.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,isSymbolTile:t.isSymbolTile};if(o.request.collectResourceTiming=this._collectResourceTiming,t.actor&&"expired"!==t.state)"loading"===t.state?t.reloadCallback=r:t.request=t.actor.send("reloadTile",o,i.bind(this));else if(t.actor=this._tileWorkers[n]=this._tileWorkers[n]||this.dispatcher.getActor(),this.dispatcher.ready)t.request=t.actor.send("loadTile",o,i.bind(this),void 0,!0);else{const r=e.loadVectorTile.call({deduped:this._deduped},o,((e,r)=>{e||!r?i.call(this,e):(o.data={cacheControl:r.cacheControl,expires:r.expires,rawData:r.rawData.slice(0)},t.actor&&t.actor.send("loadTile",o,i.bind(this),void 0,!0))}),!0);t.request={cancel:r}}function i(n,o){return delete t.request,t.aborted?r(null):n&&404!==n.status?r(n):(o&&o.resourceTiming&&(t.resourceTiming=o.resourceTiming),this.map._refreshExpiredTiles&&o&&t.setExpiryData(o),t.loadVectorData(o,this.map.painter),e.cacheEntryPossiblyAdded(this.dispatcher),r(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}}abortTile(e){e.request&&(e.request.cancel(),delete e.request),e.actor&&e.actor.send("abortTile",{uid:e.uid,type:this.type,source:this.id})}unloadTile(e){e.unloadVectorData(),e.actor&&e.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})}hasTransition(){return!1}afterUpdate(){this._tileWorkers={}}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}class Ee extends e.Evented{constructor(t,r,n,o){super(),this.id=t,this.dispatcher=n,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.extend({type:"raster"},r),e.extend(this,e.pick(r,["url","scheme","tileSize"]))}load(t){this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=D(this._options,this.map._requestManager,null,null,((r,n)=>{this._tileJSONRequest=null,this._loaded=!0,r?this.fire(new e.ErrorEvent(r)):n&&(e.extend(this,n),n.bounds&&(this.tileBounds=new N(n.bounds,this.minzoom,this.maxzoom)),e.postTurnstileEvent(n.tiles),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"}))),t&&t(r)}))}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}reload(){this.cancelTileJSONRequest(),this.load((()=>this.map.style._clearSource(this.id)))}setTiles(e){return this._options.tiles=e,this.reload(),this}setUrl(e){return this.url=e,this._options.url=e,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return e.extend({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(t,r){const n=e.exported.devicePixelRatio>=2,o=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),n,this.tileSize);t.request=e.getImage(this.map._requestManager.transformRequest(o,e.ResourceType.Tile),((n,o,i,a)=>(delete t.request,t.aborted?(t.state="unloaded",r(null)):n?(t.state="errored",r(n)):o?(this.map._refreshExpiredTiles&&t.setExpiryData({cacheControl:i,expires:a}),t.setTexture(o,this.map.painter),t.state="loaded",e.cacheEntryPossiblyAdded(this.dispatcher),void r(null)):r(null))))}static loadTileData(e,t,r){e.setTexture(t,r)}static unloadTileData(e,t){e.texture&&t.saveTileTexture(e.texture)}abortTile(e,t){e.request&&(e.request.cancel(),delete e.request),t()}unloadTile(e,t){e.texture&&this.map.painter.saveTileTexture(e.texture),t()}hasTransition(){return!1}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}function Te(t,r,n,o,i,a,s,l){const c=[t,n,i,r,o,a,1,1,1],u=[s,l,1],d=e.adjoint([],c),[f,p,h]=e.transformMat3(u,u,e.transpose(d,d));return e.multiply$1(c,[f,0,0,0,p,0,0,0,h],c)}class Ie extends e.Evented{constructor(e,t,r,n){super(),this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(n),this.options=t,this._dirty=!1}load(t,r){this._loaded=r||!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,this._imageRequest=e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),((r,n)=>{if(this._imageRequest=null,this._loaded=!0,r)this.fire(new e.ErrorEvent(r));else if(n){const{HTMLImageElement:r}=e.window;this.image=n instanceof r?e.exported.getImageData(n):n,this._dirty=!0,this.width=this.image.width,this.height=this.image.height,t&&(this.coordinates=t),this._finishLoading()}}))}loaded(){return this._loaded}updateImage(e){return this.image&&e.url?(this._imageRequest&&e.url!==this.options.url&&(this._imageRequest.cancel(),this._imageRequest=null),this.options.url=e.url,this.load(e.coordinates,this._loaded),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._imageRequest&&(this._imageRequest.cancel(),this._imageRequest=null),this.texture&&this.texture.destroy()}setCoordinates(t){this.coordinates=t,this._boundsArray=void 0;const r=t.map(e.MercatorCoordinate.fromLngLat);return this.tileID=function(t){let r=1/0,n=1/0,o=-1/0,i=-1/0;for(const e of t)r=Math.min(r,e.x),n=Math.min(n,e.y),o=Math.max(o,e.x),i=Math.max(i,e.y);const a=Math.max(o-r,i-n),s=Math.max(0,Math.floor(-Math.log(a)/Math.LN2)),l=Math.pow(2,s);return new e.CanonicalTileID(s,Math.floor((r+o)/2*l),Math.floor((n+i)/2*l))}(r),this.minzoom=this.maxzoom=this.tileID.z,this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this}_clear(){this._boundsArray=void 0}_prepareData(t){for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture)}if(this._boundsArray)return;const r=e.tileTransform(this.tileID,this.map.transform.projection),[n,o,i,a]=this.coordinates.map((t=>{const n=r.projection.project(t[0],t[1]);return e.getTilePoint(r,n)._round()}));this.perspectiveTransform=function(t,r,n,o,i,a,s,l,c,u){const d=Te(0,0,t,0,0,r,t,r),f=Te(n,o,i,a,s,l,c,u);return e.multiply$1(f,e.adjoint(d,d),f),[f[6]/f[8]*t/e.EXTENT,f[7]/f[8]*r/e.EXTENT]}(this.width,this.height,n.x,n.y,o.x,o.y,a.x,a.y,i.x,i.y);const s=this._boundsArray=new e.StructArrayLayout4i8;s.emplaceBack(n.x,n.y,0,0),s.emplaceBack(o.x,o.y,e.EXTENT,0),s.emplaceBack(a.x,a.y,0,e.EXTENT),s.emplaceBack(i.x,i.y,e.EXTENT,e.EXTENT),this.boundsBuffer&&this.boundsBuffer.destroy(),this.boundsBuffer=t.createVertexBuffer(s,e.boundsAttributes.members),this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const t=this.map.painter.context,r=t.gl;this._dirty&&(this.texture?this.texture.update(this.image):(this.texture=new e.Texture(t,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this._dirty=!1),this._prepareData(t)}loadTile(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}const ke={vector:Ce,raster:Ee,"raster-dem":class extends Ee{constructor(t,r,n,o){super(t,r,n,o),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox"}loadTile(t,r){const n=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize);function o(e,n){e&&(t.state="errored",r(e)),n&&(t.dem=n,t.dem.onDeserialize(),t.needsHillshadePrepare=!0,t.needsDEMTextureUpload=!0,t.state="loaded",r(null))}t.request=e.getImage(this.map._requestManager.transformRequest(n,e.ResourceType.Tile),function(n,i,a,s){if(delete t.request,t.aborted)t.state="unloaded",r(null);else if(n)t.state="errored",r(n);else if(i){this.map._refreshExpiredTiles&&t.setExpiryData({cacheControl:a,expires:s});const r=e.window.ImageBitmap&&i instanceof e.window.ImageBitmap&&(null==ae&&(ae=e.window.OffscreenCanvas&&new e.window.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof e.window.createImageBitmap),ae),n=1-(i.width-e.prevPowerOfTwo(i.width))/2;n<1||t.neighboringTiles||(t.neighboringTiles=this._getNeighboringTiles(t.tileID));const l=r?i:e.exported.getImageData(i,n),c={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:l,encoding:this.encoding,padding:n};t.actor&&"expired"!==t.state||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",c,o.bind(this),void 0,!0))}}.bind(this))}_getNeighboringTiles(t){const r=t.canonical,n=Math.pow(2,r.z),o=(r.x-1+n)%n,i=0===r.x?t.wrap-1:t.wrap,a=(r.x+1+n)%n,s=r.x+1===n?t.wrap+1:t.wrap,l={};return l[new e.OverscaledTileID(t.overscaledZ,i,r.z,o,r.y).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,a,r.y).key]={backfilled:!1},r.y>0&&(l[new e.OverscaledTileID(t.overscaledZ,i,r.z,o,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+1{if(this._loaded=!0,this._pendingLoad=null,t)this.fire(new e.ErrorEvent(t));else{const t={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&r&&r.resourceTiming&&r.resourceTiming[this.id]&&(t.resourceTiming=r.resourceTiming[this.id]),this.fire(new e.Event("data",t)),this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(),this._coalesce=!1)}))}loaded(){return this._loaded}loadTile(t,r){const n=t.actor?"reloadTile":"loadTile";t.actor=this.actor,t.request=this.actor.send(n,{type:this.type,uid:t.uid,tileID:t.tileID,tileZoom:t.tileZoom,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},((e,o)=>(delete t.request,t.unloadVectorData(),t.aborted?r(null):e?r(e):(t.loadVectorData(o,this.map.painter,"reloadTile"===n),r(null)))),void 0,"loadTile"===n)}abortTile(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0}unloadTile(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})}onRemove(){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return e.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}},video:class extends Ie{constructor(e,t,r,n){super(e,t,r,n),this.roundZoom=!0,this.type="video",this.options=t}load(){this._loaded=!1;const t=this.options;this.urls=[];for(const r of t.urls)this.urls.push(this.map._requestManager.transformRequest(r,e.ResourceType.Source).url);e.getVideo(this.urls,((t,r)=>{this._loaded=!0,t?this.fire(new e.ErrorEvent(t)):r&&(this.video=r,this.video.loop=!0,this.video.setAttribute("playsinline",""),this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading())}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const r=this.video.seekable;tr.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const t=this.map.painter.context,r=t.gl;this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),this.width=this.video.videoWidth,this.height=this.video.videoHeight),this._prepareData(t)}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},image:Ie,canvas:class extends Ie{constructor(t,r,n,o){super(t,r,n,o),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some((e=>!Array.isArray(e)||2!==e.length||e.some((e=>"number"!=typeof e))))||this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError(`sources.${t}`,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 e.ErrorEvent(new e.ValidationError(`sources.${t}`,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const r=this.map.painter.context;this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(r,this.canvas,r.gl.RGBA,{premultiply:!0}),this._prepareData(r)}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}},custom:class extends e.Evented{constructor(t,r,n,o){super(),this.id=t,this.type="custom",this._dataType="raster",this._dispatcher=n,this._implementation=r,this.setEventedParent(o),this.scheme="xyz",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this._loaded=!1,this.roundZoom=!0,this._implementation||this.fire(new e.ErrorEvent(new Error(`Missing implementation for ${this.id} custom source`))),this._implementation.loadTile||this.fire(new e.ErrorEvent(new Error(`Missing loadTile implementation for ${this.id} custom source`))),this._implementation.bounds&&(this.tileBounds=new N(this._implementation.bounds,this.minzoom,this.maxzoom)),r.update=this._update.bind(this),r.clearTiles=this._clearTiles.bind(this),r.coveringTiles=this._coveringTiles.bind(this),e.extend(this,e.pick(r,["dataType","scheme","minzoom","maxzoom","tileSize","attribution","minTileCacheSize","maxTileCacheSize"]))}serialize(){return e.pick(this,["type","scheme","minzoom","maxzoom","tileSize","attribution"])}load(){this._loaded=!0,this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"}))}loaded(){return this._loaded}onAdd(t){this._map=t,this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._implementation.onAdd&&this._implementation.onAdd(t),this.load()}onRemove(e){this._implementation.onRemove&&this._implementation.onRemove(e)}hasTile(e){if(this._implementation.hasTile){const{x:t,y:r,z:n}=e.canonical;return this._implementation.hasTile({x:t,y:r,z:n})}return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(t,r){const{x:n,y:o,z:i}=t.tileID.canonical,a=new e.window.AbortController;t.request=Promise.resolve(this._implementation.loadTile({x:n,y:o,z:i},{signal:a.signal})).then(function(n){return delete t.request,t.aborted?(t.state="unloaded",r(null)):void 0===n?(t.state="errored",r(null)):null===n?(this.loadTileData(t,{width:this.tileSize,height:this.tileSize,data:null}),t.state="loaded",r(null)):function(t){return t instanceof e.window.ImageData||t instanceof e.window.HTMLCanvasElement||t instanceof e.window.ImageBitmap||t instanceof e.window.HTMLImageElement}(n)?(this.loadTileData(t,n),t.state="loaded",void r(null)):(t.state="errored",r(new Error(`Can't infer data type for ${this.id}, only raster data supported at the moment`)))}.bind(this)).catch((e=>{20!==e.code&&(t.state="errored",r(e))})),t.request.cancel=()=>a.abort()}loadTileData(e,t){Ee.loadTileData(e,t,this._map.painter)}unloadTileData(e){Ee.unloadTileData(e,this._map.painter)}unloadTile(e,t){if(this.unloadTileData(e),this._implementation.unloadTile){const{x:t,y:r,z:n}=e.tileID.canonical;this._implementation.unloadTile({x:t,y:r,z:n})}t()}abortTile(e,t){e.request&&e.request.cancel&&(e.request.cancel(),delete e.request),t()}hasTransition(){return!1}_coveringTiles(){return this._map.transform.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,roundZoom:this.roundZoom}).map((e=>({x:e.canonical.x,y:e.canonical.y,z:e.canonical.z})))}_clearTiles(){this._map.style._clearSource(this.id)}_update(){this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"}))}}},Me=function(t,r,n,o){const i=new ke[r.type](t,r,n,o);if(i.id!==t)throw new Error(`Expected Source id to be ${t} instead of ${i.id}`);return e.bindAll(["load","abort","unload","serialize","prepare"],i),i};function Re(t,r){const n=e.identity([]);return e.scale(n,n,[.5*t.width,.5*-t.height,1]),e.translate(n,n,[1,-1,0]),e.multiply(n,n,t.calculateProjMatrix(r.toUnwrapped())),Float32Array.from(n)}function Pe(e,t,r,n,o,i,a,s=!1){const l=e.tilesIn(n,a,s);l.sort(Le);const c=[];for(const n of l)c.push({wrappedTileID:n.tile.tileID.wrapped().key,queryResults:n.tile.queryRenderedFeatures(t,r,e._state,n,o,i,Re(e.transform,n.tile.tileID),s)});const u=function(e){const t={},r={};for(const n of e){const e=n.queryResults,o=n.wrappedTileID,i=r[o]=r[o]||{};for(const r in e){const n=e[r],o=i[r]=i[r]||{},a=t[r]=t[r]||[];for(const e of n)o[e.featureIndex]||(o[e.featureIndex]=!0,a.push(e))}}return t}(c);for(const t in u)u[t].forEach((t=>{const r=t.feature,n=r.layer;n&&"background"!==n.type&&"sky"!==n.type&&(r.source=n.source,n["source-layer"]&&(r.sourceLayer=n["source-layer"]),r.state=void 0!==r.id?e.getFeatureState(n["source-layer"],r.id):{})}));return u}function Oe(e,t){const r=e.getRenderableIds().map((t=>e.getTileByID(t))),n=[],o={};for(let e=0;e{e.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[Ne]}numActive(){return Object.keys(this.active).length}}let ze;function Be(){return ze||(ze=new Fe),ze}function je(t,r){const n={};for(const e in t)"ref"!==e&&(n[e]=t[e]);return e.refProperties.forEach((e=>{e in r&&(n[e]=r[e])})),n}function Ue(e){e=e.slice();const t=Object.create(null);for(let r=0;r0?(o-a)/s:0;return this.points[i].mult(1-l).add(this.points[r].mult(l))}}class Ke{constructor(e,t,r){const n=this.boxCells=[],o=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let e=0;ethis.width||n<0||t>this.height)return!o&&[];const a=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(o)return!0;for(let e=0;e0:a}_queryCircle(e,t,r,n,o){const i=e-r,a=e+r,s=t-r,l=t+r;if(a<0||i>this.width||l<0||s>this.height)return!n&&[];const c=[];return this._forEachCell(i,s,a,l,this._queryCellCircle,c,{hitTest:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}},o),n?c.length>0:c}query(e,t,r,n,o){return this._query(e,t,r,n,!1,o)}hitTest(e,t,r,n,o){return this._query(e,t,r,n,!0,o)}hitTestCircle(e,t,r,n){return this._queryCircle(e,t,r,!0,n)}_queryCell(e,t,r,n,o,i,a,s){const l=a.seenUids,c=this.boxCells[o];if(null!==c){const o=this.bboxes;for(const u of c)if(!l.box[u]){l.box[u]=!0;const c=4*u;if(e<=o[c+2]&&t<=o[c+3]&&r>=o[c+0]&&n>=o[c+1]&&(!s||s(this.boxKeys[u]))){if(a.hitTest)return i.push(!0),!0;i.push({key:this.boxKeys[u],x1:o[c],y1:o[c+1],x2:o[c+2],y2:o[c+3]})}}}const u=this.circleCells[o];if(null!==u){const o=this.circles;for(const c of u)if(!l.circle[c]){l.circle[c]=!0;const u=3*c;if(this._circleAndRectCollide(o[u],o[u+1],o[u+2],e,t,r,n)&&(!s||s(this.circleKeys[c]))){if(a.hitTest)return i.push(!0),!0;{const e=o[u],t=o[u+1],r=o[u+2];i.push({key:this.circleKeys[c],x1:e-r,y1:t-r,x2:e+r,y2:t+r})}}}}}_queryCellCircle(e,t,r,n,o,i,a,s){const l=a.circle,c=a.seenUids,u=this.boxCells[o];if(null!==u){const e=this.bboxes;for(const t of u)if(!c.box[t]){c.box[t]=!0;const r=4*t;if(this._circleAndRectCollide(l.x,l.y,l.radius,e[r+0],e[r+1],e[r+2],e[r+3])&&(!s||s(this.boxKeys[t])))return i.push(!0),!0}}const d=this.circleCells[o];if(null!==d){const e=this.circles;for(const t of d)if(!c.circle[t]){c.circle[t]=!0;const r=3*t;if(this._circlesCollide(e[r],e[r+1],e[r+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[t])))return i.push(!0),!0}}}_forEachCell(e,t,r,n,o,i,a,s){const l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(r),d=this._convertToYCellCoord(n);for(let f=l;f<=u;f++)for(let l=c;l<=d;l++)if(o.call(this,e,t,r,n,this.xCellCount*l+f,i,a,s))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,t,r,n,o,i){const a=n-e,s=o-t,l=r+i;return l*l>a*a+s*s}_circleAndRectCollide(e,t,r,n,o,i,a){const s=(i-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;const c=(a-o)/2,u=Math.abs(t-(o+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;const d=l-s,f=u-c;return d*d+f*f<=r*r}}const Je=0,Qe=1,et=2,tt=Math.tan(85*Math.PI/180);function rt(t,r,n,o,i,a,s){const l=e.create();if(n)if("globe"===a.name){const t=e.calculateGlobeLabelMatrix(i,r);e.multiply(l,l,t)}else{const t=v([],s);l[0]=t[0],l[1]=t[1],l[4]=t[2],l[5]=t[3],o||e.rotateZ(l,l,i.angle)}else e.multiply(l,i.labelPlaneMatrix,t);return l}function nt(e,t,r,n,o,i,a){const s=rt(e,t,r,n,o,i,a);return"globe"===i.name&&r||(s[2]=s[6]=s[10]=s[14]=0),s}function ot(t,r,n,o,i,a,s){if(n){if("globe"===a.name){const l=rt(t,r,n,o,i,a,s);return e.invert(l,l),e.multiply(l,t,l),l}{const r=e.clone(t),n=e.identity([]);return n[0]=s[0],n[1]=s[1],n[4]=s[2],n[5]=s[3],e.multiply(r,r,n),o||e.rotateZ(r,r,-i.angle),r}}return i.glCoordMatrix}function it(t,r,n,o){const i=[t,r,n,1];n?e.transformMat4$1(i,i,o):gt(i,i,o);const a=i[3];return i[0]/=a,i[1]/=a,i[2]/=a,i}function at(e,t){return Math.min(.5+e/t*.5,1.5)}function st(e,t){const r=e[0]/e[3],n=e[1]/e[3];return r>=-t[0]&&r<=t[0]&&n>=-t[1]&&n<=t[1]}function lt(t,r,n,o,i,a,s,l,c,u){const d=n.transform,f=o?t.textSizeData:t.iconSizeData,p=e.evaluateSizeForZoom(f,n.transform.zoom),h="globe"===d.projection.name,m=[256/n.width*2+1,256/n.height*2+1],g=o?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;g.clear();let y=null;h&&(y=o?t.text.globeExtVertexArray:t.icon.globeExtVertexArray);const v=t.lineVertexArray,b=o?t.text.placedSymbolArray:t.icon.placedSymbolArray,_=n.transform.width/n.transform.height;let x,w=!1;for(let o=0;oMath.abs(n)?{useVertical:!0}:t===e.WritingMode.vertical?o>0?{needsFlipping:!0}:null:r!==Je&&function(e,t){return 0===e||Math.abs(t/e)>tt}(n,o)?r===Qe?{needsFlipping:!0}:null:n<0?{needsFlipping:!0}:null}function dt(t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v,b){const _=r/24,x=t.lineOffsetX*_,w=t.lineOffsetY*_,{lineStartIndex:A,glyphStartIndex:S,numGlyphs:C,segment:E,writingMode:T,flipState:I}=t,k=A+t.lineLength,M=t=>{if(d){const[r,n,o]=t.up,i=u.length;e.updateGlobeVertexNormal(d,i+0,r,n,o),e.updateGlobeVertexNormal(d,i+1,r,n,o),e.updateGlobeVertexNormal(d,i+2,r,n,o),e.updateGlobeVertexNormal(d,i+3,r,n,o)}const[r,n,o]=t.point;e.addDynamicAttributes(u,r,n,o,t.angle)};if(C>1){const e=ct(_,l,x,w,n,f,p,t,c,a,h,g,!1,y,v,b);if(!e)return{notEnoughRoom:!0};if(o&&!n){let[r,n,o]=e.first.point,[i,a,l]=e.last.point;[r,n]=it(r,n,o,s),[i,a]=it(i,a,l,s);const c=ut(T,I,(i-r)*m,a-n);if(t.flipState=c&&c.needsFlipping?Qe:et,c)return c}M(e.first);for(let e=S+1;e0?a:pt(p,o,r,1,i,void 0,y,v.canonical),l=ut(T,I,(s[0]-r[0])*m,s[1]-r[1]);if(t.flipState=l&&l.needsFlipping?Qe:et,l)return l}const r=ht(_*l.getoffsetX(S),x,w,n,f,p,E,A,k,c,a,h,g,!1,!1,y,v,b);if(!r)return{notEnoughRoom:!0};M(r)}return{}}function ft(e,t,r,n,o){const{x:i,y:a,z:s}=n.projectTilePoint(e.x,e.y,t);if(!o)return it(i,a,s,r);const[l,c,u]=o(e);return it(i+l,a+c,s+u,r)}function pt(t,r,n,o,i,a,s,l){const c=ft(t.sub(r)._unit()._add(t),l,i,s,a);return e.sub(c,n,c),e.normalize(c,c),e.scaleAndAdd(c,n,c,o)}function ht(t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y,v){const b=o?t-r:t+r;let _=b>0?1:-1,x=0;o&&(_*=-1,x=Math.PI),_<0&&(x+=Math.PI);let w=l+s+(_>0?0:1)|0,A=i,S=i,C=0,E=0;const T=Math.abs(b),I=[],k=[];let M=a,R=M;const P=()=>pt(R,M,S,T-C+1,d,p,g,y.canonical);for(;C+E<=T;){if(w+=_,w=c)return null;if(S=A,R=M,I.push(S),h&&k.push(R),M=new e.Point(u.getx(w),u.gety(w)),A=f[w],!A){const e=ft(M,y.canonical,d,g,p);A=e[3]>0?f[w]=e:P()}C+=E,E=e.distance(S,A)}m&&p&&(f[w]&&(A=P(),E=e.distance(S,A)),f[w]=A);const O=(T-C)/E,L=M.sub(R)._mult(O)._add(R),D=e.sub([],A,S),N=e.scaleAndAdd([],S,D,O);let F=[0,0,1],z=D[0],B=D[1];if(v&&(F=g.upVector(y.canonical,L.x,L.y),0!==F[0]||0!==F[1]||1!==F[2])){const t=[F[2],0,-F[0]],r=e.cross([],F,t);e.normalize(t,t),e.normalize(r,r),z=e.dot(D,t),B=e.dot(D,r)}if(n){const t=e.cross([],F,D);e.normalize(t,t),e.scaleAndAdd(N,N,t,n*_)}const j=x+Math.atan2(B,z);return I.push(N),h&&k.push(L),{point:N,angle:j,path:I,tilePath:k,up:F}}function mt(e,t){const r=t.length,n=r+4*e;t.resize(n),t.float32.fill(-1/0,4*r,4*n)}function gt(e,t,r){const n=t[0],o=t[1];return e[0]=r[0]*n+r[4]*o+r[12],e[1]=r[1]*n+r[5]*o+r[13],e[3]=r[3]*n+r[7]*o+r[15],e}const yt=100;class vt{constructor(e,t,r=new Ke(e.width+200,e.height+200,25),n=new Ke(e.width+200,e.height+200,25)){this.transform=e,this.grid=r,this.ignoredGrid=n,this.pitchfactor=Math.cos(e._pitch)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+yt,this.screenBottomBoundary=e.height+yt,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.fogState=t}placeCollisionBox(e,t,r,n,o,i,a,s){let l=r.projectedAnchorX,c=r.projectedAnchorY,u=r.projectedAnchorZ;const d=r.elevation,f=r.tileID,p=e.getProjection();if(d&&f){const[e,t,n]=p.upVector(f.canonical,r.tileAnchorX,r.tileAnchorY),o=p.upVectorScale(f.canonical,this.transform.center.lat,this.transform.worldSize).metersToTile;l+=e*d*o,c+=t*d*o,u+=n*d*o}const h=this.projectAndGetPerspectiveRatio(a,l,c,u,r.tileID,"globe"===p.name||!!d||this.transform.pitch>0,p),m=i*h.perspectiveRatio,g=(r.x1*t+n.x-r.padding)*m+h.point.x,y=(r.y1*t+n.y-r.padding)*m+h.point.y,v=(r.x2*t+n.x+r.padding)*m+h.point.x,b=(r.y2*t+n.y+r.padding)*m+h.point.y,_=h.perspectiveRatio<=.55||h.occluded;return!this.isInsideGrid(g,y,v,b)||!o&&this.grid.hitTest(g,y,v,b,s)||_?{box:[],offscreen:!1,occluded:h.occluded}:{box:[g,y,v,b],offscreen:this.isOffscreen(g,y,v,b),occluded:!1}}placeCollisionCircles(t,r,n,o,i,a,s,l,c,u,d,f,p,h,m){const g=[],y=this.transform.elevation,v=t.getProjection(),b=y?y.getAtTileOffsetFunc(m,this.transform.center.lat,this.transform.worldSize,v):null,_=new e.Point(n.tileAnchorX,n.tileAnchorY);let{x,y:w,z:A}=v.projectTilePoint(_.x,_.y,m.canonical);if(b){const[e,t,r]=b(_);x+=e,w+=t,A+=r}const S="globe"===v.name,C=this.projectAndGetPerspectiveRatio(s,x,w,A,m,S||!!y||this.transform.pitch>0,v),{perspectiveRatio:E}=C,T=(d?a/E:a*E)/e.ONE_EM,I=it(x,w,A,l),k=C.signedDistanceFromCamera>0?ct(T,i,n.lineOffsetX*T,n.lineOffsetY*T,!1,I,_,n,o,l,{},y&&!d?b:null,d&&!!y,v,m,d):null;let M=!1,R=!1,P=!0;if(k&&!C.occluded){const t=.5*p*E+h,n=new e.Point(-100,-100),o=new e.Point(this.screenRightBoundary,this.screenBottomBoundary),i=new Ye,{first:a,last:s}=k,l=a.path.length;let d=[];for(let e=l-1;e>=1;e--)d.push(a.path[e]);for(let e=1;e(b&&!S&&(r=b(ne[3]<=0))&&(d=[]));let y=[];if(d.length>0){let t=1/0,r=-1/0,i=1/0,a=-1/0;for(const e of d)t=Math.min(t,e[0]),i=Math.min(i,e[1]),r=Math.max(r,e[0]),a=Math.max(a,e[1]);r>=n.x&&t<=o.x&&a>=n.y&&i<=o.y&&(y=[d.map((t=>new e.Point(t[0],t[1])))],(to.x||io.y)&&(y=e.clipLine(y,n.x,n.y,o.x,o.y)))}for(const e of y){i.reset(e,.25*t);let n=0;n=i.length<=.5*t?1:Math.ceil(i.paddedLength/m)+1;for(let e=0;e0){if(e.transformMat4$1(l,l,t),this.fogState&&i&&"globe"!==s.name){const t=function(t,r,n,o,i,a){const s=a.calculateFogTileMatrix(i),l=[r,n,o];return e.transformMat4(l,l,s),C(t,l,a.pitch,a._fov)}(this.fogState,r,n,o,i.toUnwrapped(),this.transform);c=t>.9}}else gt(l,l,t);const u=l[3];return{point:new e.Point((l[0]/u+1)/2*this.transform.width+yt,(-l[1]/u+1)/2*this.transform.height+yt),perspectiveRatio:Math.min(.5+this.transform.getCameraToCenterDistance(s)/u*.5,1.5),signedDistanceFromCamera:u,occluded:a&&l[2]>u||c}}isOffscreen(e,t,r,n){return r=this.screenRightBoundary||nthis.screenBottomBoundary}isInsideGrid(e,t,r,n){return r>=0&&e=0&&te.collisionGroupID===t}}return this.collisionGroups[e]}}function It(t,r,n,o,i){const{horizontalAlign:a,verticalAlign:s}=e.getAnchorAlignment(t),l=-(a-.5)*r,c=-(s-.5)*n,u=e.evaluateVariableOffset(t,o);return new e.Point(l+u[0]*i,c+u[1]*i)}function kt(t,r,n,o,i){const a=new e.Point(t,r);return n&&a._rotate(o?i:-i),a}class Mt{constructor(e,t,r,n,o){this.transform=e.clone(),this.projection=e.projection.name,this.collisionIndex=new vt(this.transform,o),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=t,this.retainedQueryData={},this.collisionGroups=new Tt(r),this.collisionCircleArrays={},this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(t,r,n,o){const i=n.getBucket(r),a=n.latestFeatureIndex;if(!i||!a||r.id!==i.layerIds[0])return;const s=i.layers[0].layout,l=n.collisionBoxArray,c=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),u=n.tileSize/e.EXTENT,d=n.tileID.toUnwrapped();this.transform.setProjection(i.projection);const f=(p=n.tileID,h=i.getProjection(),m=this.transform,h.name===this.projection?m.calculateProjMatrix(p.toUnwrapped()):bt(m,h,p));var p,h,m;const g="map"===s.get("text-pitch-alignment"),y="map"===s.get("text-rotation-alignment");r.compileFilter();const v=r.dynamicFilter(),b=r.dynamicFilterNeedsFeature(),_=this.transform.calculatePixelsToTileUnitsMatrix(n),x=nt(f,n.tileID.canonical,g,y,this.transform,i.getProjection(),_);let w=null;if(g){const t=ot(f,n.tileID.canonical,g,y,this.transform,i.getProjection(),_);w=e.multiply([],this.transform.labelPlaneMatrix,t)}let A=null;v&&n.latestFeatureIndex&&(A={unwrappedTileID:d,dynamicFilter:v,dynamicFilterNeedsFeature:b,featureIndex:n.latestFeatureIndex}),this.retainedQueryData[i.bucketInstanceId]=new Et(i.bucketInstanceId,a,i.sourceLayerIndex,i.index,n.tileID);const S={bucket:i,layout:s,posMatrix:f,textLabelPlaneMatrix:x,labelToScreenMatrix:w,clippingData:A,scale:c,textPixelRatio:u,holdingForFade:n.holdingForFade(),collisionBoxArray:l,partiallyEvaluatedTextSize:e.evaluateSizeForZoom(i.textSizeData,this.transform.zoom),partiallyEvaluatedIconSize:e.evaluateSizeForZoom(i.iconSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(i.sourceID)};if(o)for(const e of i.sortKeyRanges){const{sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:o}=e;t.push({sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:o,parameters:S})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:i.symbolInstances.length,parameters:S})}attemptAnchorPlacement(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g,y){const{textOffset0:v,textOffset1:b,crossTileID:_}=d,x=[v,b],w=It(e,r,n,x,o),A=this.collisionIndex.placeCollisionBox(p,o,t,kt(w.x,w.y,i,a,this.transform.angle),u,s,l,c.predicate);if(m){const e=p.getSymbolInstanceIconSize(y,this.transform.zoom,d.placedIconSymbolIndex);if(0===this.collisionIndex.placeCollisionBox(p,e,m,kt(w.x,w.y,i,a,this.transform.angle),u,s,l,c.predicate).box.length)return}if(A.box.length>0){let t;return this.prevPlacement&&this.prevPlacement.variableOffsets[_]&&this.prevPlacement.placements[_]&&this.prevPlacement.placements[_].text&&(t=this.prevPlacement.variableOffsets[_].anchor),this.variableOffsets[_]={textOffset:x,width:r,height:n,anchor:e,textScale:o,prevAnchor:t},this.markUsedJustification(p,e,d,h),p.allowVerticalPlacement&&(this.markUsedOrientation(p,h,d),this.placedOrientations[_]=h),{shift:w,placedGlyphBoxes:A}}}placeLayerBucketPart(t,r,n,o){const{bucket:i,layout:a,posMatrix:s,textLabelPlaneMatrix:l,labelToScreenMatrix:c,clippingData:u,textPixelRatio:d,holdingForFade:f,collisionBoxArray:p,partiallyEvaluatedTextSize:h,partiallyEvaluatedIconSize:m,collisionGroup:g}=t.parameters,y=a.get("text-optional"),v=a.get("icon-optional"),b=a.get("text-allow-overlap"),_=a.get("icon-allow-overlap"),x="map"===a.get("text-rotation-alignment"),w="map"===a.get("text-pitch-alignment"),A="none"!==a.get("icon-text-fit"),S="viewport-y"===a.get("symbol-z-order");this.transform.setProjection(i.projection);let C=b&&(_||!i.hasIconData()||v),E=_&&(b||!i.hasTextData()||y);!i.collisionArrays&&p&&i.deserializeCollisionBoxes(p),n&&o&&i.updateCollisionDebugBuffers(this.transform.zoom,p);const T=(t,o,p)=>{const{crossTileID:S,numVerticalGlyphVertices:T}=t;if(u){const n={zoom:this.transform.zoom,pitch:this.transform.pitch};let o=null;if(u.dynamicFilterNeedsFeature){const e=this.retainedQueryData[i.bucketInstanceId];o=u.featureIndex.loadFeature({featureIndex:t.featureIndex,bucketIndex:e.bucketIndex,sourceLayerIndex:e.sourceLayerIndex,layoutVertexArrayOffset:0})}if(!(0,u.dynamicFilter)(n,o,this.retainedQueryData[i.bucketInstanceId].tileID.canonical,new e.Point(t.tileAnchorX,t.tileAnchorY),this.transform.calculateDistanceTileData(u.unwrappedTileID)))return this.placements[S]=new St(!1,!1,!1,!0),void r.add(S)}if(r.has(S))return;if(f)return void(this.placements[S]=new St(!1,!1,!1));let I=!1,k=!1,M=!0,R=!1,P=!1,O=null,L={box:null,offscreen:null,occluded:null},D={box:null,offscreen:null,occluded:null},N=null,F=null,z=null,B=0,j=0,U=0;p.textFeatureIndex?B=p.textFeatureIndex:t.useRuntimeCollisionCircles&&(B=t.featureIndex),p.verticalTextFeatureIndex&&(j=p.verticalTextFeatureIndex);const $=e=>{e.tileID=this.retainedQueryData[i.bucketInstanceId].tileID;const t=this.transform.elevation;(t||e.elevation)&&(e.elevation=t?t.getAtTileOffset(e.tileID,e.tileAnchorX,e.tileAnchorY):0)},V=p.textBox;if(V){$(V);const r=r=>{let n=e.WritingMode.horizontal;if(i.allowVerticalPlacement&&!r&&this.prevPlacement){const e=this.prevPlacement.placedOrientations[S];e&&(this.placedOrientations[S]=e,n=e,this.markUsedOrientation(i,n,t))}return n},n=(t,r)=>{if(i.allowVerticalPlacement&&T>0&&p.verticalTextBox){for(const n of i.writingModes)if(n===e.WritingMode.vertical?(L=r(),D=L):L=t(),L&&L.box&&L.box.length)break}else L=t()};if(a.get("text-variable-anchor")){let l=a.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[S]){const e=this.prevPlacement.variableOffsets[S];l.indexOf(e.anchor)>0&&(l=l.filter((t=>t!==e.anchor)),l.unshift(e.anchor))}const c=(e,r,n)=>{const a=i.getSymbolInstanceTextSize(h,t,this.transform.zoom,o),c=(e.x2-e.x1)*a+2*e.padding,u=(e.y2-e.y1)*a+2*e.padding,f=A&&!_?r:null;f&&$(f);let p={box:[],offscreen:!1,occluded:!1};const y=b?2*l.length:l.length;for(let r=0;r=l.length,t,o,i,n,f,h,m);if(y&&(p=y.placedGlyphBoxes,p&&p.box&&p.box.length)){I=!0,O=y.shift;break}}return p};n((()=>c(V,p.iconBox,e.WritingMode.horizontal)),(()=>{const t=p.verticalTextBox;return t&&$(t),i.allowVerticalPlacement&&!(L&&L.box&&L.box.length)&&T>0&&t?c(t,p.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null,occluded:null}})),L&&(I=L.box,M=L.offscreen,R=L.occluded);const u=r(!(!L||!L.box));if(!I&&this.prevPlacement){const e=this.prevPlacement.variableOffsets[S];e&&(this.variableOffsets[S]=e,this.markUsedJustification(i,e.anchor,t,u))}}else{const a=(r,n)=>{const a=i.getSymbolInstanceTextSize(h,t,this.transform.zoom,o),l=this.collisionIndex.placeCollisionBox(i,a,r,new e.Point(0,0),b,d,s,g.predicate);return l&&l.box&&l.box.length&&(this.markUsedOrientation(i,n,t),this.placedOrientations[S]=n),l};n((()=>a(V,e.WritingMode.horizontal)),(()=>{const t=p.verticalTextBox;return i.allowVerticalPlacement&&T>0&&t?($(t),a(t,e.WritingMode.vertical)):{box:null,offscreen:null,occluded:null}})),r(!!(L&&L.box&&L.box.length))}}if(N=L,I=N&&N.box&&N.box.length>0,M=N&&N.offscreen,R=N&&N.occluded,t.useRuntimeCollisionCircles){const r=i.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex>=0?t.centerJustifiedTextSymbolIndex:t.verticalPlacedTextSymbolIndex),o=e.evaluateSizeForFeature(i.textSizeData,h,r),u=a.get("text-padding");F=this.collisionIndex.placeCollisionCircles(i,b,r,i.lineVertexArray,i.glyphOffsetArray,o,s,l,c,n,w,g.predicate,t.collisionCircleDiameter*o/e.ONE_EM,u,this.retainedQueryData[i.bucketInstanceId].tileID),I=b||F.circles.length>0&&!F.collisionDetected,M=M&&F.offscreen,R=F.occluded}if(p.iconFeatureIndex&&(U=p.iconFeatureIndex),p.iconBox){const r=r=>{$(r);const n=A&&O?kt(O.x,O.y,x,w,this.transform.angle):new e.Point(0,0),o=i.getSymbolInstanceIconSize(m,this.transform.zoom,t.placedIconSymbolIndex);return this.collisionIndex.placeCollisionBox(i,o,r,n,_,d,s,g.predicate)};D&&D.box&&D.box.length&&p.verticalIconBox?(z=r(p.verticalIconBox),k=z.box.length>0):(z=r(p.iconBox),k=z.box.length>0),M=M&&z.offscreen,P=z.occluded}const G=y||0===t.numHorizontalGlyphVertices&&0===T,H=v||0===t.numIconVertices;if(G||H?H?G||(k=k&&I):I=k&&I:k=I=k&&I,I&&N&&N.box&&this.collisionIndex.insertCollisionBox(N.box,a.get("text-ignore-placement"),i.bucketInstanceId,D&&D.box&&j?j:B,g.ID),k&&z&&this.collisionIndex.insertCollisionBox(z.box,a.get("icon-ignore-placement"),i.bucketInstanceId,U,g.ID),F&&(I&&this.collisionIndex.insertCollisionCircles(F.circles,a.get("text-ignore-placement"),i.bucketInstanceId,B,g.ID),n)){const e=i.bucketInstanceId;let t=this.collisionCircleArrays[e];void 0===t&&(t=this.collisionCircleArrays[e]=new Ct);for(let e=0;e=0;--t){const r=e[t];T(i.symbolInstances.get(r),r,i.collisionArrays[r])}}else for(let e=t.symbolInstanceStart;e=0&&(t.text.placedSymbolArray.get(i).crossTileID=d>=0&&i!==d?0:c),a>=0&&(t.text.placedSymbolArray.get(a).crossTileID=d>=0&&a!==d?0:c),s>=0&&(t.text.placedSymbolArray.get(s).crossTileID=d>=0&&s!==d?0:c),l>=0&&(t.text.placedSymbolArray.get(l).crossTileID=d>=0&&l!==d?0:c)}markUsedOrientation(t,r,n){const o=r===e.WritingMode.horizontal||r===e.WritingMode.horizontalOnly?r:0,i=r===e.WritingMode.vertical?r:0,{leftJustifiedTextSymbolIndex:a,centerJustifiedTextSymbolIndex:s,rightJustifiedTextSymbolIndex:l,verticalPlacedTextSymbolIndex:c}=n,u=t.text.placedSymbolArray;a>=0&&(u.get(a).placedOrientation=o),s>=0&&(u.get(s).placedOrientation=o),l>=0&&(u.get(l).placedOrientation=o),c>=0&&(u.get(c).placedOrientation=i)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const n=t?t.symbolFadeChange(e):1,o=t?t.opacities:{},i=t?t.variableOffsets:{},a=t?t.placedOrientations:{};for(const e in this.placements){const t=this.placements[e],i=o[e];i?(this.opacities[e]=new At(i,n,t.text,t.icon,null,t.clipped),r=r||t.text!==i.text.placed||t.icon!==i.icon.placed):(this.opacities[e]=new At(null,n,t.text,t.icon,t.skipFade,t.clipped),r=r||t.text||t.icon)}for(const e in o){const t=o[e];if(!this.opacities[e]){const o=new At(t,n,!1,!1);o.isHidden()||(this.opacities[e]=o,r=r||t.text.placed||t.icon.placed)}}for(const e in i)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=i[e]);for(const e in a)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=a[e]);r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){const r=new Set;for(const n of t){const t=n.getBucket(e);t&&n.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,r,n.collisionBoxArray)}}updateBucketOpacities(t,r,n){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const o=t.layers[0].layout,i=!!t.layers[0].dynamicFilter(),a=new At(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),l=o.get("icon-allow-overlap"),c=o.get("text-variable-anchor"),u="map"===o.get("text-rotation-alignment"),d="map"===o.get("text-pitch-alignment"),f="none"!==o.get("icon-text-fit"),p=new At(null,0,s&&(l||!t.hasIconData()||o.get("icon-optional")),l&&(s||!t.hasTextData()||o.get("text-optional")),!0);!t.collisionArrays&&n&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(n);const h=(e,t,r)=>{for(let n=0;n0||l>0,x=y>0,w=this.placedOrientations[g],A=w===e.WritingMode.vertical,S=w===e.WritingMode.horizontal||w===e.WritingMode.horizontalOnly;if(!_&&!x||b.isHidden()||m++,_){const e=Bt(b.text);h(t.text,s,A?jt:e),h(t.text,l,S?jt:e);const r=b.text.isHidden(),{leftJustifiedTextSymbolIndex:n,centerJustifiedTextSymbolIndex:i,rightJustifiedTextSymbolIndex:a,verticalPlacedTextSymbolIndex:c}=o,u=t.text.placedSymbolArray,d=r||A?1:0;n>=0&&(u.get(n).hidden=d),i>=0&&(u.get(i).hidden=d),a>=0&&(u.get(a).hidden=d),c>=0&&(u.get(c).hidden=r||S?1:0);const f=this.variableOffsets[g];f&&this.markUsedJustification(t,f.anchor,o,w);const p=this.placedOrientations[g];p&&(this.markUsedJustification(t,"left",o,p),this.markUsedOrientation(t,p,o))}if(x){const e=Bt(b.icon),{placedIconSymbolIndex:r,verticalPlacedIconSymbolIndex:n}=o,i=t.icon.placedSymbolArray,a=b.icon.isHidden()?1:0;r>=0&&(h(t.icon,y,A?jt:e),i.get(r).hidden=a),n>=0&&(h(t.icon,o.numVerticalIconVertices,S?jt:e),i.get(n).hidden=a)}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const r=t.collisionArrays[n];if(r){let n=new e.Point(0,0),o=!0;if(r.textBox||r.verticalTextBox){if(c){const e=this.variableOffsets[g];e?(n=It(e.anchor,e.width,e.height,e.textOffset,e.textScale),u&&n._rotate(d?this.transform.angle:-this.transform.angle)):o=!1}i&&(o=!b.clipped),r.textBox&&Rt(t.textCollisionBox.collisionVertexArray,b.text.placed,!o||A,n.x,n.y),r.verticalTextBox&&Rt(t.textCollisionBox.collisionVertexArray,b.text.placed,!o||S,n.x,n.y)}const a=o&&Boolean(!S&&r.verticalIconBox);r.iconBox&&Rt(t.iconCollisionBox.collisionVertexArray,b.icon.placed,a,f?n.x:0,f?n.y:0),r.verticalIconBox&&Rt(t.iconCollisionBox.collisionVertexArray,b.icon.placed,!a,f?n.x:0,f?n.y:0)}}}if(t.fullyClipped=0===m,t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.bucketInstanceId in this.collisionCircleArrays){const e=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=e.invProjMatrix,t.placementViewportMatrix=e.viewportMatrix,t.collisionCircleArray=e.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}}symbolFadeChange(e){return 0===this.fadeDuration?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.lastPlacementChangeTimee}setStale(){this.stale=!0}}function Rt(e,t,r,n,o){e.emplaceBack(t?1:0,r?1:0,n||0,o||0),e.emplaceBack(t?1:0,r?1:0,n||0,o||0),e.emplaceBack(t?1:0,r?1:0,n||0,o||0),e.emplaceBack(t?1:0,r?1:0,n||0,o||0)}const Pt=Math.pow(2,25),Ot=Math.pow(2,24),Lt=Math.pow(2,17),Dt=Math.pow(2,16),Nt=Math.pow(2,9),Ft=Math.pow(2,8),zt=Math.pow(2,1);function Bt(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;const t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*Pt+t*Ot+r*Lt+t*Dt+r*Nt+t*Ft+r*zt+t}const jt=0;class Ut{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs=new Set,this._bucketParts=[]}continuePlacement(e,t,r,n,o){const i=this._bucketParts;for(;this._currentTileIndexe.sortKey-t.sortKey)));this._currentPartIndex{const t=e.exported.now()-o;return!this._forceFullPlacement&&t>2};for(;this._currentPlacementIndex>=0;){const e=r[t[this._currentPlacementIndex]],o=this.placement.collisionIndex.transform.zoom;if("symbol"===e.type&&(!e.minzoom||e.minzoom<=o)&&(!e.maxzoom||e.maxzoom>o)){if(this._inProgressLayer||(this._inProgressLayer=new Ut(e)),this._inProgressLayer.continuePlacement(n[e.source],this.placement,this._showCollisionBoxes,e,i))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const Vt=512/e.EXTENT/2;class Gt{constructor(t,r,n){this.tileID=t,this.bucketInstanceId=n,this.index=new e.KDBush(r.length,16,Int32Array),this.keys=[],this.crossTileIDs=[];const o=t.canonical.x*e.EXTENT,i=t.canonical.y*e.EXTENT;for(let e=0;ee.overscaledZ)for(const r in o){const i=o[r];i.tileID.isChildOf(e)&&i.findMatches(t.symbolInstances,e,n)}else{const i=o[e.scaledTo(Number(r)).key];i&&i.findMatches(t.symbolInstances,e,n)}}for(let e=0;e{t[e]=!0}));for(const e in this.layerIndexes)t[e]||delete this.layerIndexes[e]}}const Xt=(t,r)=>e.emitValidationErrors(t,r&&r.filter((e=>"source.canvas"!==e.identifier))),Zt=e.pick($e,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog","setProjection"]),Yt=e.pick($e,["setCenter","setZoom","setBearing","setPitch"]),Kt={version:8,layers:[],sources:{}},Jt={fill:!0,line:!0,background:!0,hillshade:!0,raster:!0};class Qt extends e.Evented{constructor(t,r={}){super(),this.map=t,this.dispatcher=new k(Be(),this),this.imageManager=new _,this.imageManager.setEventedParent(this),this.glyphManager=new e.GlyphManager(t._requestManager,r.localFontFamily?e.LocalGlyphMode.all:r.localIdeographFontFamily?e.LocalGlyphMode.ideographs:e.LocalGlyphMode.none,r.localFontFamily||r.localIdeographFontFamily),this.crossTileSymbolIndex=new qt,this._layers={},this._num3DLayers=0,this._numSymbolLayers=0,this._numCircleLayers=0,this._serializedLayers={},this._sourceCaches={},this._otherSourceCaches={},this._symbolSourceCaches={},this._loaded=!1,this._availableImages=[],this._order=[],this._drapedFirstOrder=[],this._markersNeedUpdate=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",e.getReferrer());const n=this;this._rtlTextPluginCallback=Qt.registerForPluginStateChange((t=>{n.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:t.pluginStatus,pluginURL:t.pluginURL},((t,r)=>{if(e.triggerPluginCompletionEvent(t),r&&r.every((e=>e)))for(const e in n._sourceCaches){const t=n._sourceCaches[e],r=t.getSource().type;"vector"!==r&&"geojson"!==r||t.reload()}}))})),this.on("data",(e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;const t=this.getSource(e.sourceId);if(t&&t.vectorLayerIds)for(const e in this._layers){const r=this._layers[e];r.source===t.id&&this._validateLayer(r)}}))}loadURL(t,r={}){this.fire(new e.Event("dataloading",{dataType:"style"}));const n="boolean"==typeof r.validate?r.validate:!e.isMapboxURL(t);t=this.map._requestManager.normalizeStyleURL(t,r.accessToken);const o=this.map._requestManager.transformRequest(t,e.ResourceType.Style);this._request=e.getJSON(o,((t,r)=>{this._request=null,t?this.fire(new e.ErrorEvent(t)):r&&this._load(r,n)}))}loadJSON(t,r={}){this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.exported.frame((()=>{this._request=null,this._load(t,!1!==r.validate)}))}loadEmpty(){this.fire(new e.Event("dataloading",{dataType:"style"})),this._load(Kt,!1)}_updateLayerCount(e,t){const r=t?1:-1;e.is3D()&&(this._num3DLayers+=r),"circle"===e.type&&(this._numCircleLayers+=r),"symbol"===e.type&&(this._numSymbolLayers+=r)}_load(t,r){if(r&&Xt(this,e.validateStyle(t)))return;this._loaded=!0,this.stylesheet=e.clone$1(t),this._updateMapProjection();for(const e in t.sources)this.addSource(e,t.sources[e],{validate:!1});this._changed=!1,t.sprite?this._loadSprite(t.sprite):(this.imageManager.setLoaded(!0),this.dispatcher.broadcast("spriteLoaded",!0)),this.glyphManager.setURL(t.glyphs);const n=Ue(this.stylesheet.layers);this._order=n.map((e=>e.id)),this._layers={},this._serializedLayers={};for(const t of n){const r=e.createStyleLayer(t);r.setEventedParent(this,{layer:{id:r.id}}),this._layers[r.id]=r,this._serializedLayers[r.id]=r.serialize(),this._updateLayerCount(r,!0)}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new w(this.stylesheet.light),this.stylesheet.terrain&&!this.terrainSetForDrapingOnly()&&this._createTerrain(this.stylesheet.terrain,1),this.stylesheet.fog&&this._createFog(this.stylesheet.fog),this._updateDrapeFirstLayers(),this.fire(new e.Event("data",{dataType:"style"})),this.fire(new e.Event("style.load"))}terrainSetForDrapingOnly(){return!!this.terrain&&0===this.terrain.drapeRenderMode}setProjection(e){e?this.stylesheet.projection=e:delete this.stylesheet.projection,this._updateMapProjection()}applyProjectionUpdate(){this._loaded&&(this.dispatcher.broadcast("setProjection",this.map.transform.projectionOptions),this.map.transform.projection.requiresDraping?this.getTerrain()||this.stylesheet.terrain||this.setTerrainForDraping():this.terrainSetForDrapingOnly()&&this.setTerrain(null))}_updateMapProjection(){this.map._useExplicitProjection?this.applyProjectionUpdate():this.map._prioritizeAndUpdateProjection(null,this.stylesheet.projection)}_loadSprite(t){this._spriteRequest=function(t,r,n){let o,i,a;const s=e.exported.devicePixelRatio>1?"@2x":"";let l=e.getJSON(r.transformRequest(r.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),((e,t)=>{l=null,a||(a=e,o=t,u())})),c=e.getImage(r.transformRequest(r.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),((e,t)=>{c=null,a||(a=e,i=t,u())}));function u(){if(a)n(a);else if(o&&i){const t=e.exported.getImageData(i),r={};for(const n in o){const{width:i,height:a,x:s,y:l,sdf:c,pixelRatio:u,stretchX:d,stretchY:f,content:p}=o[n],h=new e.RGBAImage({width:i,height:a});e.RGBAImage.copy(t,h,{x:s,y:l},{x:0,y:0},{width:i,height:a}),r[n]={data:h,pixelRatio:u,sdf:c,stretchX:d,stretchY:f,content:p}}n(null,r)}}return{cancel(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(t,this.map._requestManager,((t,r)=>{if(this._spriteRequest=null,t)this.fire(new e.ErrorEvent(t));else if(r)for(const e in r)this.imageManager.addImage(e,r[e]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.dispatcher.broadcast("spriteLoaded",!0),this.fire(new e.Event("data",{dataType:"style"}))}))}_validateLayer(t){const r=this.getSource(t.source);if(!r)return;const n=t.sourceLayer;n&&("geojson"===r.type||r.vectorLayerIds&&-1===r.vectorLayerIds.indexOf(n))&&this.fire(new e.ErrorEvent(new Error(`Source layer "${n}" does not exist on source "${r.id}" as specified by style layer "${t.id}"`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const e in this._sourceCaches)if(!this._sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(e){const t=[];for(const r of e){const e=this._layers[r];"custom"!==e.type&&t.push(e.serialize())}return t}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;if(this.fog&&this.fog.hasTransition())return!0;for(const e in this._sourceCaches)if(this._sourceCaches[e].hasTransition())return!0;for(const e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}get order(){return this.map._optimizeForTerrain&&this.terrain?this._drapedFirstOrder:this._order}isLayerDraped(e){return!!this.terrain&&("function"==typeof e.isLayerDraped?e.isLayerDraped():Jt[e.type])}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading")}update(t){if(!this._loaded)return;const r=this._changed;if(this._changed){const e=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);(e.length||r.length)&&this._updateWorkerLayers(e,r);for(const e in this._updatedSources){const t=this._updatedSources[e];"reload"===t?this._reloadSource(e):"clear"===t&&this._clearSource(e)}this._updateTilesForChangedImages();for(const e in this._updatedPaintProps)this._layers[e].updateTransitions(t);this.light.updateTransitions(t),this.fog&&this.fog.updateTransitions(t),this._resetUpdates()}const n={};for(const e in this._sourceCaches){const t=this._sourceCaches[e];n[e]=t.used,t.used=!1}for(const e of this._order){const r=this._layers[e];if(r.recalculate(t,this._availableImages),!r.isHidden(t.zoom)){const e=this._getLayerSourceCache(r);e&&(e.used=!0)}const n=this.map.painter;if(n){const e=r.getProgramIds();if(!e)continue;const o=r.getProgramConfiguration(t.zoom);for(const t of e)n.useProgram(t,o)}}for(const t in n){const r=this._sourceCaches[t];n[t]!==r.used&&r.getSource().fire(new e.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:r.getSource().id}))}this.light.recalculate(t),this.terrain&&this.terrain.recalculate(t),this.fog&&this.fog.recalculate(t),this.z=t.zoom,this._markersNeedUpdate&&(this._updateMarkersOpacity(),this._markersNeedUpdate=!1),r&&this.fire(new e.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const t in this._sourceCaches)this._sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(e),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setState(r){if(this._checkLoaded(),Xt(this,e.validateStyle(r)))return!1;(r=e.clone$1(r)).layers=Ue(r.layers);const n=function(e,r){if(!e)return[{command:$e.setStyle,args:[r]}];let n=[];try{if(!t(e.version,r.version))return[{command:$e.setStyle,args:[r]}];t(e.center,r.center)||n.push({command:$e.setCenter,args:[r.center]}),t(e.zoom,r.zoom)||n.push({command:$e.setZoom,args:[r.zoom]}),t(e.bearing,r.bearing)||n.push({command:$e.setBearing,args:[r.bearing]}),t(e.pitch,r.pitch)||n.push({command:$e.setPitch,args:[r.pitch]}),t(e.sprite,r.sprite)||n.push({command:$e.setSprite,args:[r.sprite]}),t(e.glyphs,r.glyphs)||n.push({command:$e.setGlyphs,args:[r.glyphs]}),t(e.transition,r.transition)||n.push({command:$e.setTransition,args:[r.transition]}),t(e.light,r.light)||n.push({command:$e.setLight,args:[r.light]}),t(e.fog,r.fog)||n.push({command:$e.setFog,args:[r.fog]}),t(e.projection,r.projection)||n.push({command:$e.setProjection,args:[r.projection]});const o={},i=[];!function(e,r,n,o){let i;for(i in r=r||{},e=e||{})e.hasOwnProperty(i)&&(r.hasOwnProperty(i)||Ge(i,n,o));for(i in r){if(!r.hasOwnProperty(i))continue;const a=r[i];e.hasOwnProperty(i)?t(e[i],a)||("geojson"===e[i].type&&"geojson"===a.type&&We(e,r,i)?n.push({command:$e.setGeoJSONSourceData,args:[i,a.data]}):He(i,r,n,o)):Ve(i,r,n)}}(e.sources,r.sources,i,o);const a=[];e.layers&&e.layers.forEach((e=>{e.source&&o[e.source]?n.push({command:$e.removeLayer,args:[e.id]}):a.push(e)}));let s=e.terrain;s&&o[s.source]&&(n.push({command:$e.setTerrain,args:[void 0]}),s=void 0),n=n.concat(i),t(s,r.terrain)||n.push({command:$e.setTerrain,args:[r.terrain]}),function(e,r,n){r=r||[];const o=(e=e||[]).map(Xe),i=r.map(Xe),a=e.reduce(Ze,{}),s=r.reduce(Ze,{}),l=o.slice(),c=Object.create(null);let u,d,f,p,h,m,g;for(u=0,d=0;u!(e.command in Yt)));if(0===n.length)return!1;const o=n.filter((e=>!(e.command in Zt)));if(o.length>0)throw new Error(`Unimplemented: ${o.map((e=>e.command)).join(", ")}.`);return n.forEach((e=>{"setTransition"!==e.command&&"setProjection"!==e.command&&this[e.command].apply(this,e.args)})),this.stylesheet=r,this._updateMapProjection(),!0}addImage(t,r){return this.getImage(t)?this.fire(new e.ErrorEvent(new Error("An image with this name already exists."))):(this.imageManager.addImage(t,r),this._afterImageUpdated(t),this)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(t){return this.getImage(t)?(this.imageManager.removeImage(t),this._afterImageUpdated(t),this):this.fire(new e.ErrorEvent(new Error("No image with this name exists.")))}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this._availableImages.slice()}addSource(t,r,n={}){if(this._checkLoaded(),void 0!==this.getSource(t))throw new Error("There is already a source with this ID");if(!r.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(e.validateSource,`sources.${t}`,r,null,n))return;this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);const o=Me(t,r,this.dispatcher,this);o.setEventedParent(this,(()=>({isSourceLoaded:this._isSourceCacheLoaded(t),source:o.serialize(),sourceId:t})));const i=r=>{const n=(r?"symbol:":"other:")+t,i=this._sourceCaches[n]=new e.SourceCache(n,o,r);(r?this._symbolSourceCaches:this._otherSourceCaches)[t]=i,i.style=this,i.onAdd(this.map)};i(!1),"vector"!==r.type&&"geojson"!==r.type||i(!0),o.onAdd&&o.onAdd(this.map),this._changed=!0}removeSource(t){this._checkLoaded();const r=this.getSource(t);if(!r)throw new Error("There is no source with this ID");for(const r in this._layers)if(this._layers[r].source===t)return this.fire(new e.ErrorEvent(new Error(`Source "${t}" cannot be removed while layer "${r}" is using it.`)));if(this.terrain&&this.terrain.get().source===t)return this.fire(new e.ErrorEvent(new Error(`Source "${t}" cannot be removed while terrain is using it.`)));const n=this._getSourceCaches(t);for(const t of n)delete this._sourceCaches[t.id],delete this._updatedSources[t.id],t.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t.getSource().id})),t.setEventedParent(null),t.clearTiles();return delete this._otherSourceCaches[t],delete this._symbolSourceCaches[t],r.setEventedParent(null),r.onRemove&&r.onRemove(this.map),this._changed=!0,this}setGeoJSONSourceData(e,t){this._checkLoaded(),this.getSource(e).setData(t),this._changed=!0}getSource(e){const t=this._getSourceCache(e);return t&&t.getSource()}_getSources(){const e=[];for(const t in this._otherSourceCaches){const r=this._getSourceCache(t);r&&e.push(r.getSource())}return e}addLayer(t,r,n={}){this._checkLoaded();const o=t.id;if(this.getLayer(o))return void this.fire(new e.ErrorEvent(new Error(`Layer with id "${o}" already exists on this map`)));let i;if("custom"===t.type){if(Xt(this,e.validateCustomStyleLayer(t)))return;i=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(o,t.source),t=e.clone$1(t),t=e.extend(t,{source:o})),this._validate(e.validateLayer,`layers.${o}`,t,{arrayIndex:-1},n))return;i=e.createStyleLayer(t),this._validateLayer(i),i.setEventedParent(this,{layer:{id:o}}),this._serializedLayers[i.id]=i.serialize(),this._updateLayerCount(i,!0)}const a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)return void this.fire(new e.ErrorEvent(new Error(`Layer with id "${r}" does not exist on this map.`)));this._order.splice(a,0,o),this._layerOrderChanged=!0,this._layers[o]=i;const s=this._getLayerSourceCache(i);if(this._removedLayers[o]&&i.source&&s&&"custom"!==i.type){const e=this._removedLayers[o];delete this._removedLayers[o],e.type!==i.type?this._updatedSources[i.source]="clear":(this._updatedSources[i.source]="reload",s.pause())}this._updateLayer(i),i.onAdd&&i.onAdd(this.map),this._updateDrapeFirstLayers()}moveLayer(t,r){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===r)return;const n=this._order.indexOf(t);this._order.splice(n,1);const o=r?this._order.indexOf(r):this._order.length;r&&-1===o?this.fire(new e.ErrorEvent(new Error(`Layer with id "${r}" does not exist on this map.`))):(this._order.splice(o,0,t),this._layerOrderChanged=!0,this._updateDrapeFirstLayers())}removeLayer(t){this._checkLoaded();const r=this._layers[t];if(!r)return void this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot be removed.`)));r.setEventedParent(null),this._updateLayerCount(r,!1);const n=this._order.indexOf(t);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=r,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],r.onRemove&&r.onRemove(this.map),this._updateDrapeFirstLayers()}getLayer(e){return this._layers[e]}hasLayer(e){return e in this._layers}hasLayerType(e){for(const t in this._layers)if(this._layers[t].type===e)return!0;return!1}setLayerZoomRange(t,r,n){this._checkLoaded();const o=this.getLayer(t);o?o.minzoom===r&&o.maxzoom===n||(null!=r&&(o.minzoom=r),null!=n&&(o.maxzoom=n),this._updateLayer(o)):this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style and cannot have zoom extent.`)))}setFilter(r,n,o={}){this._checkLoaded();const i=this.getLayer(r);if(i){if(!t(i.filter,n))return null==n?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(e.validateFilter,`layers.${i.id}.filter`,n,{layerType:i.type},o)||(i.filter=e.clone$1(n),this._updateLayer(i)))}else this.fire(new e.ErrorEvent(new Error(`The layer '${r}' does not exist in the map's style and cannot be filtered.`)))}getFilter(t){const r=this.getLayer(t);return r&&e.clone$1(r.filter)}setLayoutProperty(r,n,o,i={}){this._checkLoaded();const a=this.getLayer(r);a?t(a.getLayoutProperty(n),o)||(a.setLayoutProperty(n,o,i),this._updateLayer(a)):this.fire(new e.ErrorEvent(new Error(`The layer '${r}' does not exist in the map's style and cannot be styled.`)))}getLayoutProperty(t,r){const n=this.getLayer(t);if(n)return n.getLayoutProperty(r);this.fire(new e.ErrorEvent(new Error(`The layer '${t}' does not exist in the map's style.`)))}setPaintProperty(r,n,o,i={}){this._checkLoaded();const a=this.getLayer(r);a?t(a.getPaintProperty(n),o)||(a.setPaintProperty(n,o,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[r]=!0):this.fire(new e.ErrorEvent(new Error(`The layer '${r}' does not exist in the map's style and cannot be styled.`)))}getPaintProperty(e,t){const r=this.getLayer(e);return r&&r.getPaintProperty(t)}setFeatureState(t,r){this._checkLoaded();const n=t.source,o=t.sourceLayer,i=this.getSource(n);if(!i)return void this.fire(new e.ErrorEvent(new Error(`The source '${n}' does not exist in the map's style.`)));const a=i.type;if("geojson"===a&&o)return void this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if("vector"===a&&!o)return void this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided.")));const s=this._getSourceCaches(n);for(const e of s)e.setFeatureState(o,t.id,r)}removeFeatureState(t,r){this._checkLoaded();const n=t.source,o=this.getSource(n);if(!o)return void this.fire(new e.ErrorEvent(new Error(`The source '${n}' does not exist in the map's style.`)));const i=o.type,a="vector"===i?t.sourceLayer:void 0;if("vector"===i&&!a)return void this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));if(r&&"string"!=typeof t.id&&"number"!=typeof t.id)return void this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));const s=this._getSourceCaches(n);for(const e of s)e.removeFeatureState(a,t.id,r)}getFeatureState(t){this._checkLoaded();const r=t.source,n=t.sourceLayer,o=this.getSource(r);if(o){if("vector"!==o.type||n)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),this._getSourceCaches(r)[0].getFeatureState(n,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){const t={};for(const e in this._sourceCaches){const r=this._sourceCaches[e].getSource();t[r.id]||(t[r.id]=r.serialize())}return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,terrain:this.getTerrain()||void 0,fog:this.stylesheet.fog,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,projection:this.stylesheet.projection,sources:t,layers:this._serializeLayers(this._order)},(e=>void 0!==e))}_updateLayer(e){this._updatedLayers[e.id]=!0;const t=this._getLayerSourceCache(e);e.source&&!this._updatedSources[e.source]&&t&&"raster"!==t.getSource().type&&(this._updatedSources[e.source]="reload",t.pause()),this._changed=!0,e.invalidateCompiledFilter()}_flattenAndSortRenderedFeatures(e){const t=e=>"fill-extrusion"===this._layers[e].type,r={},n=[];for(let o=this._order.length-1;o>=0;o--){const i=this._order[o];if(t(i)){r[i]=o;for(const t of e){const e=t[i];if(e)for(const t of e)n.push(t)}}}n.sort(((e,t)=>t.intersectionZ-e.intersectionZ));const o=[];for(let i=this._order.length-1;i>=0;i--){const a=this._order[i];if(t(a))for(let e=n.length-1;e>=0;e--){const t=n[e].feature;if(r[t.layer.id]{const t=this.getLayer(e);return t&&t.is3D()})):this.has3DLayers(),s=R.createFromScreenPoints(t,n);for(const e in this._sourceCaches){const t=this._sourceCaches[e].getSource().id;r.layers&&!o[t]||i.push(Pe(this._sourceCaches[e],this._layers,this._serializedLayers,s,r,n,a,!!this.map._showQueryGeometry))}return this.placement&&i.push(function(e,t,r,n,o,i,a){const s={},l=i.queryRenderedSymbols(n),c=[];for(const e of Object.keys(l).map(Number))c.push(a[e]);c.sort(Le);for(const r of c){const n=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],t,r.bucketIndex,r.sourceLayerIndex,o.filter,o.layers,o.availableImages,e);for(const e in n){const t=s[e]=s[e]||[],o=n[e];o.sort(((e,t)=>{const n=r.featureSortOrder;if(n){const r=n.indexOf(e.featureIndex);return n.indexOf(t.featureIndex)-r}return t.featureIndex-e.featureIndex}));for(const e of o)t.push(e)}}for(const t in s)s[t].forEach((n=>{const o=n.feature,i=r(e[t]);if(!i)return;const a=i.getFeatureState(o.layer["source-layer"],o.id);o.source=o.layer.source,o.layer["source-layer"]&&(o.sourceLayer=o.layer["source-layer"]),o.state=a}));return s}(this._layers,this._serializedLayers,this._getLayerSourceCache.bind(this),s.screenGeometry,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(i)}querySourceFeatures(t,r){r&&r.filter&&this._validate(e.validateFilter,"querySourceFeatures.filter",r.filter,null,r);const n=this._getSourceCaches(t);let o=[];for(const e of n)o=o.concat(Oe(e,r));return o}addSourceType(e,t,r){return Qt.getSourceType(e)?r(new Error(`A source type called "${e}" already exists.`)):(Qt.setSourceType(e,t),t.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:e,url:t.workerSourceURL},r):r(null,null))}getLight(){return this.light.getLight()}setLight(e,r={}){this._checkLoaded();const n=this.light.getLight();let o=!1;for(const r in e)if(!t(e[r],n[r])){o=!0;break}if(!o)return;const i=this._setTransitionParameters({duration:300,delay:0});this.light.setLight(e,r),this.light.updateTransitions(i)}getTerrain(){return this.terrain&&1===this.terrain.drapeRenderMode?this.terrain.get():null}setTerrainForDraping(){this.setTerrain({source:"",exaggeration:0},0)}setTerrain(r,n=1){if(this._checkLoaded(),!r)return delete this.terrain,delete this.stylesheet.terrain,this.dispatcher.broadcast("enableTerrain",!1),this._force3DLayerUpdate(),void(this._markersNeedUpdate=!0);let o=r;if(1===n){if("object"==typeof o.source){const t="terrain-dem-src";this.addSource(t,o.source),o=e.clone$1(o),o=e.extend(o,{source:t})}if(this._validate(e.validateTerrain,"terrain",o))return}if(!this.terrain||this.terrain&&n!==this.terrain.drapeRenderMode){if(!o)return;this._createTerrain(o,n)}else{const r=this.terrain,n=r.get();for(const t of Object.keys(e.spec.terrain))!o.hasOwnProperty(t)&&e.spec.terrain[t].default&&(o[t]=e.spec.terrain[t].default);for(const e in o)if(!t(o[e],n[e])){r.set(o),this.stylesheet.terrain=o;const e=this._setTransitionParameters({duration:0});r.updateTransitions(e);break}}this._updateDrapeFirstLayers(),this._markersNeedUpdate=!0}_createFog(e){const t=this.fog=new I(e,this.map.transform);this.stylesheet.fog=e;const r=this._setTransitionParameters({duration:0});t.updateTransitions(r)}_updateMarkersOpacity(){0!==this.map._markers.length&&this.map._requestDomTask((()=>{for(const e of this.map._markers)e._evaluateOpacity()}))}getFog(){return this.fog?this.fog.get():null}setFog(e){if(this._checkLoaded(),!e)return delete this.fog,delete this.stylesheet.fog,void(this._markersNeedUpdate=!0);if(this.fog){const r=this.fog,n=r.get();0===Object.keys(e).length&&r.set(e);for(const o in e)if(!t(e[o],n[o])){r.set(e),this.stylesheet.fog=e;const t=this._setTransitionParameters({duration:0});r.updateTransitions(t);break}}else this._createFog(e);this._markersNeedUpdate=!0}_setTransitionParameters(t){return{now:e.exported.now(),transition:e.extend(t,this.stylesheet.transition)}}_updateDrapeFirstLayers(){if(!this.map._optimizeForTerrain||!this.terrain)return;const e=this._order.filter((e=>this.isLayerDraped(this._layers[e]))),t=this._order.filter((e=>!this.isLayerDraped(this._layers[e])));this._drapedFirstOrder=[],this._drapedFirstOrder.push(...e),this._drapedFirstOrder.push(...t)}_createTerrain(e,t){const r=this.terrain=new S(e,t);this.stylesheet.terrain=e,this.dispatcher.broadcast("enableTerrain",!this.terrainSetForDrapingOnly()),this._force3DLayerUpdate();const n=this._setTransitionParameters({duration:0});r.updateTransitions(n)}_force3DLayerUpdate(){for(const e in this._layers){const t=this._layers[e];"fill-extrusion"===t.type&&this._updateLayer(t)}}_forceSymbolLayerUpdate(){for(const e in this._layers){const t=this._layers[e];"symbol"===t.type&&this._updateLayer(t)}}_validate(t,r,n,o,i={}){return(!i||!1!==i.validate)&&Xt(this,t.call(e.validateStyle,e.extend({key:r,style:this.serialize(),value:n,styleSpec:e.spec},o)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),e.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const e in this._layers)this._layers[e].setEventedParent(null);for(const e in this._sourceCaches)this._sourceCaches[e].clearTiles(),this._sourceCaches[e].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(e){const t=this._getSourceCaches(e);for(const e of t)e.clearTiles()}_reloadSource(e){const t=this._getSourceCaches(e);for(const e of t)e.resume(),e.reload()}_reloadSources(){for(const e of this._getSources())e.reload&&e.reload()}_updateSources(e){for(const t in this._sourceCaches)this._sourceCaches[t].update(e)}_generateCollisionBoxes(){for(const e in this._sourceCaches){const t=this._sourceCaches[e];t.resume(),t.reload()}}_updatePlacement(t,r,n,o,i=!1){let a=!1,s=!1;const l={};for(const e of this._order){const r=this._layers[e];if("symbol"!==r.type)continue;if(!l[r.source]){const e=this._getLayerSourceCache(r);if(!e)continue;l[r.source]=e.getRenderableIds(!0).map((t=>e.getTileByID(t))).sort(((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1)))}const n=this.crossTileSymbolIndex.addLayer(r,l[r.source],t.center.lng,t.projection);a=a||n}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),i=i||this._layerOrderChanged||0===n,this._layerOrderChanged&&this.fire(new e.Event("neworder")),(i||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.exported.now(),t.zoom))&&(this.pauseablePlacement=new $t(t,this._order,i,r,n,o,this.placement,this.fog&&t.projection.supportsFog?this.fog.state:null),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.exported.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(const e of this._order){const t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,l[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.exported.now())}_releaseSymbolFadeTiles(){for(const e in this._sourceCaches)this._sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,t,r){this.imageManager.getImages(t.icons,r),this._updateTilesForChangedImages();const n=e=>{e&&e.setDependencies(t.tileID.key,t.type,t.icons)};n(this._otherSourceCaches[t.source]),n(this._symbolSourceCaches[t.source])}getGlyphs(e,t,r){this.glyphManager.getGlyphs(t.stacks,r)}getResource(t,r,n){return e.makeRequest(r,n)}_getSourceCache(e){return this._otherSourceCaches[e]}_getLayerSourceCache(e){return"symbol"===e.type?this._symbolSourceCaches[e.source]:this._otherSourceCaches[e.source]}_getSourceCaches(e){const t=[];return this._otherSourceCaches[e]&&t.push(this._otherSourceCaches[e]),this._symbolSourceCaches[e]&&t.push(this._symbolSourceCaches[e]),t}_isSourceCacheLoaded(t){const r=this._getSourceCaches(t);return 0===r.length?(this.fire(new e.ErrorEvent(new Error(`There is no source with ID '${t}'`))),!1):r.every((e=>e.loaded()))}has3DLayers(){return this._num3DLayers>0}hasSymbolLayers(){return this._numSymbolLayers>0}hasCircleLayers(){return this._numCircleLayers>0}_clearWorkerCaches(){this.dispatcher.broadcast("clearCaches")}destroy(){this._clearWorkerCaches(),this.terrainSetForDrapingOnly()&&(delete this.terrain,delete this.stylesheet.terrain)}}Qt.getSourceType=function(e){return ke[e]},Qt.setSourceType=function(e,t){ke[e]=t},Qt.registerForPluginStateChange=e.registerForPluginStateChange;var er="\n#define EPSILON 0.0000001\n#define PI 3.141592653589793\n#define EXTENT 8192.0\n#define HALF_PI PI/2.0\n#define QUARTER_PI PI/4.0\n#define RAD_TO_DEG 180.0/PI\n#define DEG_TO_RAD PI/180.0\n#define GLOBE_RADIUS EXTENT/PI/2.0",tr="attribute highp vec3 a_pos_3f;uniform lowp mat4 u_matrix;varying highp vec3 v_uv;void main() {const mat3 half_neg_pi_around_x=mat3(1.0,0.0, 0.0,0.0,0.0,-1.0,0.0,1.0, 0.0);v_uv=half_neg_pi_around_x*a_pos_3f;vec4 pos=u_matrix*vec4(a_pos_3f,1.0);gl_Position=pos.xyww;}",rr="\n#define ELEVATION_SCALE 7.0\n#define ELEVATION_OFFSET 450.0\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_tl_up;uniform vec3 u_tile_tr_up;uniform vec3 u_tile_br_up;uniform vec3 u_tile_bl_up;uniform float u_tile_up_scale;vec3 elevationVector(vec2 pos) {vec2 uv=pos/EXTENT;vec3 up=normalize(mix(\nmix(u_tile_tl_up,u_tile_tr_up,uv.xxx),mix(u_tile_bl_up,u_tile_br_up,uv.xxx),uv.yyy));return up*u_tile_up_scale;}\n#else\nvec3 elevationVector(vec2 pos) { return vec3(0,0,1); }\n#endif\nconst float skirtOffset=24575.0;vec3 decomposeToPosAndSkirt(vec2 posWithComposedSkirt)\n{float skirt=float(posWithComposedSkirt.x >=skirtOffset);vec2 pos=posWithComposedSkirt-vec2(skirt*skirtOffset,0.0);return vec3(pos,skirt);}\n#ifdef TERRAIN\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nuniform highp sampler2D u_dem;uniform highp sampler2D u_dem_prev;\n#else\nuniform sampler2D u_dem;uniform sampler2D u_dem_prev;\n#endif\nuniform vec4 u_dem_unpack;uniform vec2 u_dem_tl;uniform vec2 u_dem_tl_prev;uniform float u_dem_scale;uniform float u_dem_scale_prev;uniform float u_dem_size;uniform float u_dem_lerp;uniform float u_exaggeration;uniform float u_meter_to_dem;uniform mat4 u_label_plane_matrix_inv;uniform sampler2D u_depth;uniform vec2 u_depth_size_inv;vec4 tileUvToDemSample(vec2 uv,float dem_size,float dem_scale,vec2 dem_tl) {vec2 pos=dem_size*(uv*dem_scale+dem_tl)+1.0;vec2 f=fract(pos);return vec4((pos-f+0.5)/(dem_size+2.0),f);}float decodeElevation(vec4 v) {return dot(vec4(v.xyz*255.0,-1.0),u_dem_unpack);}float currentElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale+u_dem_tl)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem,pos).a;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale,u_dem_tl);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem,pos));\n#ifdef TERRAIN_DEM_NEAREST_FILTER\nreturn u_exaggeration*tl;\n#endif\nfloat tr=decodeElevation(texture2D(u_dem,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}float prevElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale_prev+u_dem_tl_prev)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem_prev,pos).a;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale_prev,u_dem_tl_prev);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem_prev,pos));float tr=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem_prev,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}\n#ifdef TERRAIN_VERTEX_MORPHING\nfloat elevation(vec2 apos) {\n#ifdef ZERO_EXAGGERATION\nreturn 0.0;\n#endif\nfloat nextElevation=currentElevation(apos);float prevElevation=prevElevation(apos);return mix(prevElevation,nextElevation,u_dem_lerp);}\n#else\nfloat elevation(vec2 apos) {\n#ifdef ZERO_EXAGGERATION\nreturn 0.0;\n#endif\nreturn currentElevation(apos);}\n#endif\nhighp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}bool isOccluded(vec4 frag) {vec3 coord=frag.xyz/frag.w;float depth=unpack_depth(texture2D(u_depth,(coord.xy+1.0)*0.5));return coord.z > depth+0.0005;}float occlusionFade(vec4 frag) {vec3 coord=frag.xyz/frag.w;vec3 df=vec3(5.0*u_depth_size_inv,0.0);vec2 uv=0.5*coord.xy+0.5;vec4 depth=vec4(\nunpack_depth(texture2D(u_depth,uv-df.xz)),unpack_depth(texture2D(u_depth,uv+df.xz)),unpack_depth(texture2D(u_depth,uv-df.zy)),unpack_depth(texture2D(u_depth,uv+df.zy))\n);return dot(vec4(0.25),vec4(1.0)-clamp(300.0*(vec4(coord.z-0.001)-depth),0.0,1.0));}vec4 fourSample(vec2 pos,vec2 off) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nfloat tl=texture2D(u_dem,pos).a;float tr=texture2D(u_dem,pos+vec2(off.x,0.0)).a;float bl=texture2D(u_dem,pos+vec2(0.0,off.y)).a;float br=texture2D(u_dem,pos+off).a;\n#else\nvec4 demtl=vec4(texture2D(u_dem,pos).xyz*255.0,-1.0);float tl=dot(demtl,u_dem_unpack);vec4 demtr=vec4(texture2D(u_dem,pos+vec2(off.x,0.0)).xyz*255.0,-1.0);float tr=dot(demtr,u_dem_unpack);vec4 dembl=vec4(texture2D(u_dem,pos+vec2(0.0,off.y)).xyz*255.0,-1.0);float bl=dot(dembl,u_dem_unpack);vec4 dembr=vec4(texture2D(u_dem,pos+off).xyz*255.0,-1.0);float br=dot(dembr,u_dem_unpack);\n#endif\nreturn vec4(tl,tr,bl,br);}float flatElevation(vec2 pack) {vec2 apos=floor(pack/8.0);vec2 span=10.0*(pack-apos*8.0);vec2 uvTex=(apos-vec2(1.0,1.0))/8190.0;float size=u_dem_size+2.0;float dd=1.0/size;vec2 pos=u_dem_size*(uvTex*u_dem_scale+u_dem_tl)+1.0;vec2 f=fract(pos);pos=(pos-f+0.5)*dd;vec4 h=fourSample(pos,vec2(dd));float z=mix(mix(h.x,h.y,f.x),mix(h.z,h.w,f.x),f.y);vec2 w=floor(0.5*(span*u_meter_to_dem-1.0));vec2 d=dd*w;h=fourSample(pos-d,2.0*d+vec2(dd));vec4 diff=abs(h.xzxy-h.ywzw);vec2 slope=min(vec2(0.25),u_meter_to_dem*0.5*(diff.xz+diff.yw)/(2.0*w+vec2(1.0)));vec2 fix=slope*span;float base=z+max(fix.x,fix.y);return u_exaggeration*base;}float elevationFromUint16(float word) {return u_exaggeration*(word/ELEVATION_SCALE-ELEVATION_OFFSET);}\n#else\nfloat elevation(vec2 pos) { return 0.0; }bool isOccluded(vec4 frag) { return false; }float occlusionFade(vec4 frag) { return 1.0; }\n#endif",nr="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump mat4 u_fog_matrix;varying vec3 v_fog_pos;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}vec3 fog_position(vec3 pos) {return (u_fog_matrix*vec4(pos,1.0)).xyz;}vec3 fog_position(vec2 pos) {return fog_position(vec3(pos,0.0));}float fog(vec3 pos) {float depth=length(pos);float opacity=fog_opacity(fog_range(depth));return opacity*fog_horizon_blending(pos/depth);}\n#endif",or="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump float u_fog_temporal_offset;varying vec3 v_fog_pos;uniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform highp vec2 u_viewport;uniform float u_globe_transition;uniform int u_is_globe;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}float globe_glow_progress() {highp vec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);highp vec3 dir=normalize(ray_dir);highp vec3 closest_point=dot(u_globe_pos,dir)*dir;highp float sdf=length(closest_point-u_globe_pos)/u_globe_radius;return sdf+PI*0.5;}float fog_opacity(vec3 pos) {float depth=length(pos);return fog_opacity(fog_range(depth));}vec3 fog_apply(vec3 color,vec3 pos) {float depth=length(pos);float opacity;if (u_is_globe==1) {float glow_progress=globe_glow_progress();float t=mix(glow_progress,depth,u_globe_transition);opacity=fog_opacity(fog_range(t));} else {opacity=fog_opacity(fog_range(depth));opacity*=fog_horizon_blending(pos/depth);}return mix(color,u_fog_color.rgb,opacity);}vec4 fog_apply_from_vert(vec4 color,float fog_opac) {float alpha=EPSILON+color.a;color.rgb=mix(color.rgb/alpha,u_fog_color.rgb,fog_opac)*alpha;return color;}vec3 fog_apply_sky_gradient(vec3 camera_ray,vec3 sky_color) {float horizon_blend=fog_horizon_blending(normalize(camera_ray));return mix(sky_color,u_fog_color.rgb,horizon_blend);}vec4 fog_apply_premultiplied(vec4 color,vec3 pos) {float alpha=EPSILON+color.a;color.rgb=fog_apply(color.rgb/alpha,pos)*alpha;return color;}vec3 fog_dither(vec3 color) {vec2 dither_seed=gl_FragCoord.xy+u_fog_temporal_offset;return dither(color,dither_seed);}vec4 fog_dither(vec4 color) {return vec4(fog_dither(color.rgb),color.a);}\n#endif";let ir={},ar={};const sr=[];fr(er,sr),fr(rr,sr),fr(nr,sr),fr(or,sr),ir=pr("",rr),ar=pr(or,nr);const lr=pr("\n#if __VERSION__ >=300\n#define varying in\n#define gl_FragColor glFragColor\n#define texture2D texture\n#define textureCube texture\nout vec4 glFragColor;\n#endif\nhighp vec3 hash(highp vec2 p) {highp vec3 p3=fract(p.xyx*vec3(443.8975,397.2973,491.1871));p3+=dot(p3,p3.yxz+19.19);return fract((p3.xxy+p3.yzz)*p3.zyx);}vec3 dither(vec3 color,highp vec2 seed) {vec3 rnd=hash(seed)+hash(seed+0.59374)-0.5;return color+rnd/255.0;}highp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}highp vec4 pack_depth(highp float ndc_z) {highp float depth=ndc_z*0.5+0.5;const highp vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const highp vec4 bit_mask =vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);highp vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}","\n#if __VERSION__ >=300\n#define attribute in\n#define varying out\n#define texture2D texture\n#endif\nfloat wrap(float n,float min,float max) {float d=max-min;float w=mod(mod(n-min,d)+d,d)+min;return (w==min) ? max : w;}\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 mercator_tile_position(mat4 matrix,vec2 tile_anchor,vec3 tile_id,vec2 mercator_center) {\n#ifndef PROJECTED_POS_ON_VIEWPORT\nfloat tiles=tile_id.z;vec2 mercator=(tile_anchor/EXTENT+tile_id.xy)/tiles;mercator-=mercator_center;mercator.x=wrap(mercator.x,-0.5,0.5);vec4 mercator_tile=vec4(mercator.xy*EXTENT,EXTENT/(2.0*PI),1.0);mercator_tile=matrix*mercator_tile;return mercator_tile.xyz;\n#else\nreturn vec3(0.0);\n#endif\n}vec3 mix_globe_mercator(vec3 globe,vec3 mercator,float t) {return mix(globe,mercator,t);}mat3 globe_mercator_surface_vectors(vec3 pos_normal,vec3 up_dir,float zoom_transition) {vec3 normal=zoom_transition==0.0 ? pos_normal : normalize(mix(pos_normal,up_dir,zoom_transition));vec3 xAxis=normalize(vec3(normal.z,0.0,-normal.x));vec3 yAxis=normalize(cross(normal,xAxis));return mat3(xAxis,yAxis,normal);}\n#endif\nvec2 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(\nunpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}const vec4 AWAY=vec4(-1000.0,-1000.0,-1000.0,1);//Normalized device coordinate that is not rendered."),cr=er,ur="\n#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif";var dr={background:pr("uniform vec4 u_color;uniform float u_opacity;\n#ifdef LIGHTING_3D_MODE\nvarying vec4 v_color;\n#endif\nvoid main() {vec4 out_color;\n#ifdef LIGHTING_3D_MODE\nout_color=v_color;\n#else\nout_color=u_color;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#ifdef LIGHTING_3D_MODE\nuniform vec4 u_color;varying vec4 v_color;\n#endif\nvoid main() {gl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef LIGHTING_3D_MODE\nv_color=apply_lighting(u_color);\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),backgroundPattern:pr("uniform vec2 u_pattern_tl;uniform vec2 u_pattern_br;uniform vec2 u_texsize;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos;void main() {vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(u_pattern_tl/u_texsize,u_pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_pattern_size,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),circle:pr("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(\nantialiased_blur,0.0,extrude_length-radius/(radius+stroke_width)\n);vec4 out_color=mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_apply_premultiplied(out_color,v_fog_pos);\n#endif\ngl_FragColor=out_color*(v_visibility*opacity_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","#define NUM_VISIBILITY_RINGS 2\n#define INV_SQRT2 0.70710678\n#define ELEVATION_BIAS 0.0001\n#define NUM_SAMPLES_PER_RING 16\nuniform mat4 u_matrix;uniform mat2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nvarying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvec2 calc_offset(vec2 extrusion,float radius,float stroke_width, float view_scale) {return extrusion*(radius+stroke_width)*u_extrude_scale*view_scale;}float cantilevered_elevation(vec2 pos,float radius,float stroke_width,float view_scale) {vec2 c1=pos+calc_offset(vec2(-1,-1),radius,stroke_width,view_scale);vec2 c2=pos+calc_offset(vec2(1,-1),radius,stroke_width,view_scale);vec2 c3=pos+calc_offset(vec2(1,1),radius,stroke_width,view_scale);vec2 c4=pos+calc_offset(vec2(-1,1),radius,stroke_width,view_scale);float h1=elevation(c1)+ELEVATION_BIAS;float h2=elevation(c2)+ELEVATION_BIAS;float h3=elevation(c3)+ELEVATION_BIAS;float h4=elevation(c4)+ELEVATION_BIAS;return max(h4,max(h3,max(h1,h2)));}float circle_elevation(vec2 pos) {\n#if defined(TERRAIN)\nreturn elevation(pos)+ELEVATION_BIAS;\n#else\nreturn 0.0;\n#endif\n}vec4 project_vertex(vec2 extrusion,vec4 world_center,vec4 projected_center,float radius,float stroke_width, float view_scale,mat3 surface_vectors) {vec2 sample_offset=calc_offset(extrusion,radius,stroke_width,view_scale);\n#ifdef PITCH_WITH_MAP\n#ifdef PROJECTION_GLOBE_VIEW\nreturn u_matrix*( world_center+vec4(sample_offset.x*surface_vectors[0]+sample_offset.y*surface_vectors[1],0) );\n#else\nreturn u_matrix*( world_center+vec4(sample_offset,0,0) );\n#endif\n#else\nreturn projected_center+vec4(sample_offset,0,0);\n#endif\n}float get_sample_step() {\n#ifdef PITCH_WITH_MAP\nreturn 2.0*PI/float(NUM_SAMPLES_PER_RING);\n#else\nreturn PI/float(NUM_SAMPLES_PER_RING);\n#endif\n}void main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);vec4 world_center;mat3 surface_vectors;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(circle_center)*circle_elevation(circle_center);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*circle_elevation(circle_center);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,circle_center,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;vec3 pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);world_center=vec4(pos,1);\n#else \nsurface_vectors=mat3(1.0);float height=circle_elevation(circle_center);world_center=vec4(circle_center,height,1);\n#endif\nvec4 projected_center=u_matrix*world_center;float view_scale=0.0;\n#ifdef PITCH_WITH_MAP\n#ifdef SCALE_WITH_MAP\nview_scale=1.0;\n#else\nview_scale=projected_center.w/u_camera_to_center_distance;\n#endif\n#else\n#ifdef SCALE_WITH_MAP\nview_scale=u_camera_to_center_distance;\n#else\nview_scale=projected_center.w;\n#endif\n#endif\ngl_Position=project_vertex(extrude,world_center,projected_center,radius,stroke_width,view_scale,surface_vectors);float visibility=0.0;\n#ifdef TERRAIN\nfloat step=get_sample_step();vec4 occlusion_world_center;vec4 occlusion_projected_center;\n#ifdef PITCH_WITH_MAP\nfloat cantilevered_height=cantilevered_elevation(circle_center,radius,stroke_width,view_scale);occlusion_world_center=vec4(circle_center,cantilevered_height,1);occlusion_projected_center=u_matrix*occlusion_world_center;\n#else\nocclusion_world_center=world_center;occlusion_projected_center=projected_center;\n#endif\nfor(int ring=0; ring < NUM_VISIBILITY_RINGS; ring++) {float scale=(float(ring)+1.0)/float(NUM_VISIBILITY_RINGS);for(int i=0; i < NUM_SAMPLES_PER_RING; i++) {vec2 extrusion=vec2(cos(step*float(i)),-sin(step*float(i)))*scale;vec4 frag_pos=project_vertex(extrusion,occlusion_world_center,occlusion_projected_center,radius,stroke_width,view_scale,surface_vectors);visibility+=float(!isOccluded(frag_pos));}}visibility/=float(NUM_VISIBILITY_RINGS)*float(NUM_SAMPLES_PER_RING);\n#else\nvisibility=1.0;\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nvisibility=1.0;\n#endif\nv_visibility=visibility;lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);\n#ifdef FOG\nv_fog_pos=fog_position(world_center.xyz);\n#endif\n}"),clippingMask:pr("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:pr("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef FOG\nif (u_is_globe==0) {gl_FragColor.r*=pow(1.0-fog_opacity(v_fog_pos),2.0);}\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nvarying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 tilePos=floor(a_pos*0.5);vec3 pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;mat3 surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(tilePos)*elevation(tilePos);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*elevation(tilePos);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,tilePos,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#else\npos=vec3(tilePos+extrude,elevation(tilePos));\n#endif\ngl_Position=u_matrix*vec4(pos,1);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),heatmapTexture:pr("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=vec4(a_pos,0,1);v_pos=a_pos*0.5+0.5;}"),collisionBox:pr("varying float v_placed;varying float v_notUsed;void main() {vec4 red =vec4(1.0,0.0,0.0,1.0);vec4 blue=vec4(0.0,0.0,1.0,0.5);gl_FragColor =mix(red,blue,step(0.5,v_placed))*0.5;gl_FragColor*=mix(1.0,0.1,step(0.5,v_notUsed));}","attribute vec3 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;attribute float a_size_scale;attribute vec2 a_padding;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_pos+elevationVector(a_anchor_pos)*elevation(a_anchor_pos),1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,1.5);gl_Position=projectedPoint;gl_Position.xy+=(a_extrude*a_size_scale+a_shift+a_padding)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:pr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos_2f;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos_2f;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(\nmix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:pr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;\n#endif\nvarying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {float h=elevation(a_pos);v_uv=a_pos/8192.0;\n#ifdef PROJECTION_GLOBE_VIEW\ngl_Position=u_matrix*vec4(a_pos_3+elevationVector(a_pos)*h,1);\n#else\ngl_Position=u_matrix*vec4(a_pos*u_overlay_scale,h,1);\n#endif\n}"),fill:pr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\nvec4 out_color=color;\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutline:pr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=outline_color;\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutlinePattern:pr("uniform vec2 u_texsize;uniform sampler2D u_image;varying vec2 v_pos;varying vec2 v_pos_world;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);float dist=length(v_pos_world-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;varying vec2 v_pos_world;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);v_pos_world=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillPattern:pr("uniform vec2 u_texsize;uniform sampler2D u_image;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillExtrusion:pr("varying vec4 v_color;\n#ifdef RENDER_SHADOWS\nvarying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef ZERO_ROOF_RADIUS\nvarying vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvarying highp vec3 v_normal;\n#endif\nvoid main() {\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvec3 normal=v_normal;\n#endif\nfloat z;vec4 color;\n#ifdef ZERO_ROOF_RADIUS\nz=float(normal.z > 0.00001);color=mix(v_color,v_roof_color,z);\n#else\ncolor=v_color;\n#endif\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;\n#ifdef ZERO_ROOF_RADIUS\nconcave*=(1.0-z);\n#endif\nfloat x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);color.rgb=color.rgb*shade;\n#endif\n#ifdef RENDER_SHADOWS\n#ifdef ZERO_ROOF_RADIUS\nnormal=mix(normal,vec3(0.0,0.0,1.0),z);\n#endif\ncolor.xyz=shadowed_color_normal(color.xyz,normalize(normal),v_pos_light_view_0,v_pos_light_view_1,v_depth);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform float u_edge_radius;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nvarying vec4 v_color;\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth;\n#endif\n#ifdef ZERO_ROOF_RADIUS\nvarying vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvarying highp vec3 v_normal;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec4 pos_nx=floor(a_pos_normal_ed*0.5);vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nv_normal=normal;\n#endif\nbase=max(0.0,base);height=max(0.0,top_up_ny.y==0.0 && top_up_ny.x==1.0 ? height-u_edge_radius : height);float t=top_up_ny.x;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=0.0;float c_ele;vec3 pos;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);pos=vec3(pos_nx.xy,h);\n#else\nh=t > 0.0 ? height : base;pos=vec3(pos_nx.xy,h);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*h);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,pos.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*pos.z;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(pos,1),AWAY,hidden);\n#ifdef RENDER_SHADOWS\nv_pos_light_view_0=u_light_matrix_0*vec4(pos,1);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1);v_depth=gl_Position.w;\n#endif\nfloat NdotL=0.0;float colorvalue=0.0;\n#ifdef LIGHTING_3D_MODE\nNdotL=calculate_NdotL(normal);\n#else\ncolorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;NdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),NdotL);\n#endif\nif (normal.y !=0.0) {float r=0.84;\n#ifndef LIGHTING_3D_MODE\nr=mix(0.7,0.98,1.0-u_lightintensity);\n#endif\nNdotL*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}v_color=vec4(0.0,0.0,0.0,1.0);\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\n#ifdef LIGHTING_3D_MODE\nv_color=apply_lighting(color,NdotL);\n#else\nv_color.rgb+=clamp(color.rgb*NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));\n#endif\nv_color*=u_opacity;\n#ifdef ZERO_ROOF_RADIUS\nv_roof_color=vec4(0.0,0.0,0.0,1.0);\n#ifdef LIGHTING_3D_MODE\nv_roof_color=apply_lighting(color,calculate_NdotL(vec3(0.0,0.0,1.0)));\n#else\nfloat roofNdotL=clamp(u_lightpos.z,0.0,1.0);roofNdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),roofNdotL);v_roof_color.rgb+=clamp(color.rgb*roofNdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));\n#endif\nv_roof_color*=u_opacity;\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),fillExtrusionPattern:pr("uniform vec2 u_texsize;uniform sampler2D u_image;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef LIGHTING_3D_MODE\nvarying float v_NdotL;\n#endif\nvarying vec2 v_pos;varying vec4 v_lighting;uniform lowp float u_opacity;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color,v_NdotL)*u_opacity;\n#else\nout_color=out_color*v_lighting;\n#endif\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;float x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);out_color.rgb=out_color.rgb*shade;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform float u_tile_units_to_pixels;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nvarying vec2 v_pos;varying vec4 v_lighting;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef LIGHTING_3D_MODE\nvarying float v_NdotL;\n#endif\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec4 pos_nx=floor(a_pos_normal_ed*0.5);mediump vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;mediump vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));float edgedistance=a_pos_normal_ed.w;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;base=max(0.0,base);height=max(0.0,height);float t=top_up_ny.x;float z=t > 0.0 ? height : base;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=z;vec3 p;float c_ele;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);p=vec3(pos_nx.xy,h);\n#else\np=vec3(pos_nx.xy,z);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*(p.z+lift));vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,p.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*p.z;p=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(p,1),AWAY,hidden);vec2 pos=normal.z==1.0\n? pos_nx.xy\n: vec2(edgedistance,z*u_height_factor);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float NdotL=0.0;\n#ifdef LIGHTING_3D_MODE\nNdotL=calculate_NdotL(normal);\n#else\nNdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),NdotL);\n#endif\nif (normal.y !=0.0) {float r=0.84;\n#ifndef LIGHTING_3D_MODE\nr=mix(0.7,0.98,1.0-u_lightintensity);\n#endif\nNdotL*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\n#ifdef LIGHTING_3D_MODE\nv_NdotL=NdotL;\n#else\nv_lighting.rgb+=clamp(NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;\n#endif \n#ifdef FOG\nv_fog_pos=fog_position(p);\n#endif\n}"),hillshadePrepare:pr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nreturn texture2D(u_image,coord).a/4.0;\n#else\nvec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;\n#endif\n}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y));float b=getElevation(v_pos+vec2(0,-epsilon.y));float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y));float d=getElevation(v_pos+vec2(-epsilon.x,0));float e=getElevation(v_pos+vec2(epsilon.x,0));float f=getElevation(v_pos+vec2(-epsilon.x,epsilon.y));float g=getElevation(v_pos+vec2(0,epsilon.y));float h=getElevation(v_pos+vec2(epsilon.x,epsilon.y));float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2(\n(c+e+e+h)-(a+d+d+f),(f+g+g+h)-(a+b+b+c)\n)/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(\nderiv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:pr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef LIGHTING_3D_MODE\ngl_FragColor=apply_lighting(gl_FragColor);\n#endif\n#ifdef FOG\ngl_FragColor=fog_dither(fog_apply_premultiplied(gl_FragColor,v_fog_pos));\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),line:pr("uniform lowp float u_device_pixel_ratio;uniform float u_alpha_discard_threshold;uniform highp vec2 u_trim_offset;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform sampler2D u_dash_image;varying vec2 v_tex;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform sampler2D u_gradient_image;\n#endif\nuniform float u_border_width;uniform vec4 u_border_color;float luminance(vec3 c) {return (c.r+c.r+c.b+c.g+c.g+c.g)*0.1667;}\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nfloat linearstep(float edge0,float edge1,float x) {return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef RENDER_LINE_DASH\nfloat sdfdist=texture2D(u_dash_image,v_tex).a;float sdfgamma=1.0/(2.0*u_device_pixel_ratio)/dash.z;alpha*=linearstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);\n#endif\nhighp vec4 out_color;\n#ifdef RENDER_LINE_GRADIENT\nout_color=texture2D(u_gradient_image,v_uv.xy);\n#else\nout_color=color;\n#endif\nfloat trimmed=1.0;\n#ifdef RENDER_LINE_TRIM_OFFSET\nhighp float start=v_uv[2];highp float end=v_uv[3];highp float trim_start=u_trim_offset[0];highp float trim_end=u_trim_offset[1];highp float line_progress=(start+(v_uv.x)*(end-start));if (trim_end > trim_start) {if (line_progress <=trim_end && line_progress >=trim_start) {out_color=vec4(0,0,0,0);trimmed=0.0;}}\n#endif\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\n#ifdef RENDER_LINE_ALPHA_DISCARD\nif (alpha < u_alpha_discard_threshold) {discard;}\n#endif\n#ifdef RENDER_LINE_BORDER\nfloat edgeBlur=(u_border_width+1.0/u_device_pixel_ratio);float alpha2=clamp(min(dist-(v_width2.t-edgeBlur),v_width2.s-dist)/edgeBlur,0.0,1.0);if (alpha2 < 1.) {float smoothAlpha=smoothstep(0.6,1.0,alpha2);\n#ifdef RENDER_LINE_BORDER_AUTO\nfloat Y=(out_color.a > 0.01) ? luminance(out_color.rgb/out_color.a) : 1.;float adjustment=(Y > 0.) ? 0.5/Y : 0.45;if (out_color.a > 0.25 && Y < 0.25) {vec3 borderColor=(Y > 0.) ? out_color.rgb : vec3(1,1,1)*out_color.a;out_color.rgb=out_color.rgb+borderColor*(adjustment*(1.0-smoothAlpha));} else {out_color.rgb*=(0.6 +0.4*smoothAlpha);}\n#else\nout_color.rgb=mix(u_border_color.rgb*u_border_color.a*trimmed,out_color.rgb,smoothAlpha);\n#endif\n}\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define EXTRUDE_SCALE 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nattribute highp vec4 a_packed;\n#endif\n#ifdef RENDER_LINE_DASH\nattribute float a_linesofar;\n#endif\nuniform mat4 u_matrix;uniform mat2 u_pixels_to_tile_units;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform vec2 u_texsize;uniform float u_tile_units_to_pixels;varying vec2 v_tex;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform float u_image_height;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*EXTRUDE_SCALE;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*EXTRUDE_SCALE*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#else\nv_gamma_scale=1.0;\n#endif\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nfloat a_uv_x=a_packed[0];float a_split_index=a_packed[1];highp float a_clip_start=a_packed[2];highp float a_clip_end=a_packed[3];\n#ifdef RENDER_LINE_GRADIENT\nhighp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec4(a_uv_x,a_split_index*texel_height-half_texel_height,a_clip_start,a_clip_end);\n#else\nv_uv=vec4(a_uv_x,0.0,a_clip_start,a_clip_end);\n#endif\n#endif\n#ifdef RENDER_LINE_DASH\nfloat scale=dash.z==0.0 ? 0.0 : u_tile_units_to_pixels/dash.z;float height=dash.y;v_tex=vec2(a_linesofar*scale/floorwidth,(-normal.y*height+dash.x+0.5)/u_texsize.y);\n#endif\nv_width2=vec2(outset,inset);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),linePattern:pr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_tile_units_to_pixels;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;vec2 pattern_size=vec2(display_size.x/u_tile_units_to_pixels,display_size.y);float aspect=display_size.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x=mod(v_linesofar/pattern_size.x*aspect,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos=mix(pattern_tl*texel_size-texel_size,pattern_br*texel_size+texel_size,vec2(x,y));vec4 color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\ncolor=apply_lighting(color);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_linesofar;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mat2 u_pixels_to_tile_units;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#else\nv_gamma_scale=1.0;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),raster:pr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(\ndot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);vec3 out_color=mix(u_high_vec,u_low_vec,rgb);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply(out_color,v_fog_pos));\n#endif\ngl_FragColor=vec4(out_color*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform vec2 u_perspective_transform;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {float w=1.0+dot(a_texture_pos,u_perspective_transform);gl_Position=u_matrix*vec4(a_pos*w,0,w);v_pos0=a_texture_pos/8192.0;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),symbolIcon:pr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_min_font_scale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetProjected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetProjected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetProjected_point.xy/offsetProjected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*max(a_min_font_scale,font_scale)+a_pxoffset/16.0);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nv_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change))*projection_transition_fade;}"),symbolSDF:pr("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetprojected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetprojected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetprojected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetprojected_point.xy/offsetprojected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat gamma_scale=gl_Position.w;float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nvec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade);}"),symbolTextAndIcon:pr("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;uniform vec2 u_texsize_icon;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offset_projected_point=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projected_point.xy/projected_point.w;vec2 b=offset_projected_point.xy/offset_projected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*font_scale);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nv_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade,is_sdf);}"),terrainRaster:pr("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nvarying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth;\n#endif\nvoid main() {vec4 color=texture2D(u_image0,v_pos0);\n#ifdef RENDER_SHADOWS\ncolor.xyz=shadowed_color(color.xyz,v_pos_light_view_0,v_pos_light_view_1,v_depth);\n#endif\n#ifdef FOG\n#ifdef ZERO_EXAGGERATION\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#else\ncolor=fog_dither(fog_apply_from_vert(color,v_fog_opacity));\n#endif\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_skirt_height;attribute vec2 a_pos;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth;\n#endif\nconst float wireframeOffset=0.00015;void main() {vec3 decomposedPosAndSkirt=decomposeToPosAndSkirt(a_pos);float skirt=decomposedPosAndSkirt.z;vec2 decodedPos=decomposedPosAndSkirt.xy;float elevation=elevation(decodedPos)-skirt*u_skirt_height;\n#ifdef TERRAIN_WIREFRAME\nelevation+=wireframeOffset;\n#endif\nv_pos0=decodedPos/8192.0;gl_Position=u_matrix*vec4(decodedPos,elevation,1.0);\n#ifdef FOG\n#ifdef ZERO_EXAGGERATION\nv_fog_pos=fog_position(decodedPos);\n#else\nv_fog_opacity=fog(fog_position(vec3(decodedPos,elevation)));\n#endif\n#endif\n#ifdef RENDER_SHADOWS\nvec3 pos=vec3(decodedPos,elevation);v_pos_light_view_0=u_light_matrix_0*vec4(pos,1.);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1.);v_depth=gl_Position.w;\n#endif\n}"),terrainDepth:pr("#ifdef GL_ES\nprecision highp float;\n#endif\nvarying float v_depth;void main() {gl_FragColor=pack_depth(v_depth);}","uniform mat4 u_matrix;attribute vec2 a_pos;varying float v_depth;void main() {float elevation=elevation(a_pos);gl_Position=u_matrix*vec4(a_pos,elevation,1.0);v_depth=gl_Position.z/gl_Position.w;}"),skybox:pr("\nvarying lowp vec3 v_uv;uniform lowp samplerCube u_cubemap;uniform lowp float u_opacity;uniform highp float u_temporal_offset;uniform highp vec3 u_sun_direction;float sun_disk(highp vec3 ray_direction,highp vec3 sun_direction) {highp float cos_angle=dot(normalize(ray_direction),sun_direction);const highp float cos_sun_angular_diameter=0.99996192306;const highp float smoothstep_delta=1e-5;return smoothstep(\ncos_sun_angular_diameter-smoothstep_delta,cos_sun_angular_diameter+smoothstep_delta,cos_angle);}float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec3 uv=v_uv;const float y_bias=0.015;uv.y+=y_bias;uv.y=pow(abs(uv.y),1.0/5.0);uv.y=map(uv.y,0.0,1.0,-1.0,1.0);vec3 sky_color=textureCube(u_cubemap,uv).rgb;\n#ifdef FOG\nsky_color=fog_apply_sky_gradient(v_uv.xzy,sky_color);\n#endif\nsky_color.rgb=dither(sky_color.rgb,gl_FragCoord.xy+u_temporal_offset);sky_color+=0.1*sun_disk(v_uv,u_sun_direction);gl_FragColor=vec4(sky_color*u_opacity,u_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",tr),skyboxGradient:pr("varying highp vec3 v_uv;uniform lowp sampler2D u_color_ramp;uniform highp vec3 u_center_direction;uniform lowp float u_radius;uniform lowp float u_opacity;uniform highp float u_temporal_offset;void main() {float progress=acos(dot(normalize(v_uv),u_center_direction))/u_radius;vec4 color=texture2D(u_color_ramp,vec2(progress,0.5));\n#ifdef FOG\ncolor.rgb=fog_apply_sky_gradient(v_uv.xzy,color.rgb/color.a)*color.a;\n#endif\ncolor*=u_opacity;color.rgb=dither(color.rgb,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",tr),skyboxCapture:pr("\nvarying highp vec3 v_position;uniform highp float u_sun_intensity;uniform highp float u_luminance;uniform lowp vec3 u_sun_direction;uniform highp vec4 u_color_tint_r;uniform highp vec4 u_color_tint_m;\n#ifdef GL_ES\nprecision highp float;\n#endif\n#define BETA_R vec3(5.5e-6,13.0e-6,22.4e-6)\n#define BETA_M vec3(21e-6,21e-6,21e-6)\n#define MIE_G 0.76\n#define DENSITY_HEIGHT_SCALE_R 8000.0\n#define DENSITY_HEIGHT_SCALE_M 1200.0\n#define PLANET_RADIUS 6360e3\n#define ATMOSPHERE_RADIUS 6420e3\n#define SAMPLE_STEPS 10\n#define DENSITY_STEPS 4\nfloat ray_sphere_exit(vec3 orig,vec3 dir,float radius) {float a=dot(dir,dir);float b=2.0*dot(dir,orig);float c=dot(orig,orig)-radius*radius;float d=sqrt(b*b-4.0*a*c);return (-b+d)/(2.0*a);}vec3 extinction(vec2 density) {return exp(-vec3(BETA_R*u_color_tint_r.a*density.x+BETA_M*u_color_tint_m.a*density.y));}vec2 local_density(vec3 point) {float height=max(length(point)-PLANET_RADIUS,0.0);float exp_r=exp(-height/DENSITY_HEIGHT_SCALE_R);float exp_m=exp(-height/DENSITY_HEIGHT_SCALE_M);return vec2(exp_r,exp_m);}float phase_ray(float cos_angle) {return (3.0/(16.0*PI))*(1.0+cos_angle*cos_angle);}float phase_mie(float cos_angle) {return (3.0/(8.0*PI))*((1.0-MIE_G*MIE_G)*(1.0+cos_angle*cos_angle))/((2.0+MIE_G*MIE_G)*pow(1.0+MIE_G*MIE_G-2.0*MIE_G*cos_angle,1.5));}vec2 density_to_atmosphere(vec3 point,vec3 light_dir) {float ray_len=ray_sphere_exit(point,light_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(DENSITY_STEPS);vec2 density_point_to_atmosphere=vec2(0.0);for (int i=0; i < DENSITY_STEPS;++i) {vec3 point_on_ray=point+light_dir*((float(i)+0.5)*step_len);density_point_to_atmosphere+=local_density(point_on_ray)*step_len;;}return density_point_to_atmosphere;}vec3 atmosphere(vec3 ray_dir,vec3 sun_direction,float sun_intensity) {vec2 density_orig_to_point=vec2(0.0);vec3 scatter_r=vec3(0.0);vec3 scatter_m=vec3(0.0);vec3 origin=vec3(0.0,PLANET_RADIUS,0.0);float ray_len=ray_sphere_exit(origin,ray_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(SAMPLE_STEPS);for (int i=0; i < SAMPLE_STEPS;++i) {vec3 point_on_ray=origin+ray_dir*((float(i)+0.5)*step_len);vec2 density=local_density(point_on_ray)*step_len;density_orig_to_point+=density;vec2 density_point_to_atmosphere=density_to_atmosphere(point_on_ray,sun_direction);vec2 density_orig_to_atmosphere=density_orig_to_point+density_point_to_atmosphere;vec3 extinction=extinction(density_orig_to_atmosphere);scatter_r+=density.x*extinction;scatter_m+=density.y*extinction;}float cos_angle=dot(ray_dir,sun_direction);float phase_r=phase_ray(cos_angle);float phase_m=phase_mie(cos_angle);vec3 beta_r=BETA_R*u_color_tint_r.rgb*u_color_tint_r.a;vec3 beta_m=BETA_M*u_color_tint_m.rgb*u_color_tint_m.a;return (scatter_r*phase_r*beta_r+scatter_m*phase_m*beta_m)*sun_intensity;}const float A=0.15;const float B=0.50;const float C=0.10;const float D=0.20;const float E=0.02;const float F=0.30;vec3 uncharted2_tonemap(vec3 x) {return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}void main() {vec3 ray_direction=v_position;ray_direction.y=pow(ray_direction.y,5.0);const float y_bias=0.015;ray_direction.y+=y_bias;vec3 color=atmosphere(normalize(ray_direction),u_sun_direction,u_sun_intensity);float white_scale=1.0748724675633854;color=uncharted2_tonemap((log2(2.0/pow(u_luminance,4.0)))*color)*white_scale;gl_FragColor=vec4(color,1.0);}","attribute highp vec3 a_pos_3f;uniform mat3 u_matrix_3f;varying highp vec3 v_position;float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec4 pos=vec4(u_matrix_3f*a_pos_3f,1.0);v_position=pos.xyz;v_position.y*=-1.0;v_position.y=map(v_position.y,-1.0,1.0,0.0,1.0);gl_Position=vec4(a_pos_3f.xy,0.0,1.0);}"),globeRaster:pr("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifndef FOG\nuniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform vec2 u_viewport;\n#endif\nvoid main() {vec4 color;\n#ifdef CUSTOM_ANTIALIASING\nvec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);vec3 dir=normalize(ray_dir);vec3 closest_point=dot(u_globe_pos,dir)*dir;float norm_dist_from_center=1.0-length(closest_point-u_globe_pos)/u_globe_radius;const float antialias_pixel=2.0;float antialias_factor=antialias_pixel*fwidth(norm_dist_from_center);float antialias=smoothstep(0.0,antialias_factor,norm_dist_from_center);vec4 raster=texture2D(u_image0,v_pos0);color=vec4(raster.rgb*antialias,raster.a*antialias);\n#else\ncolor=texture2D(u_image0,v_pos0);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_proj_matrix;uniform mat4 u_normalize_matrix;uniform mat4 u_globe_matrix;uniform mat4 u_merc_matrix;uniform float u_zoom_transition;uniform vec2 u_merc_center;uniform mat3 u_grid_matrix;uniform float u_skirt_height;\n#ifdef GLOBE_POLES\nattribute vec3 a_globe_pos;attribute vec2 a_uv;\n#else\nattribute vec2 a_pos;\n#endif\nvarying vec2 v_pos0;const float wireframeOffset=1e3;float mercatorXfromLng(float lng) {return (180.0+lng)/360.0;}float mercatorYfromLat(float lat) {return (180.0-(RAD_TO_DEG*log(tan(QUARTER_PI+lat/2.0*DEG_TO_RAD))))/360.0;}vec3 latLngToECEF(vec2 latLng) {latLng=DEG_TO_RAD*latLng;float cosLat=cos(latLng[0]);float sinLat=sin(latLng[0]);float cosLng=cos(latLng[1]);float sinLng=sin(latLng[1]);float sx=cosLat*sinLng*GLOBE_RADIUS;float sy=-sinLat*GLOBE_RADIUS;float sz=cosLat*cosLng*GLOBE_RADIUS;return vec3(sx,sy,sz);}void main() {\n#ifdef GLOBE_POLES\nvec3 globe_pos=a_globe_pos;vec2 uv=a_uv;\n#else\nfloat tiles=u_grid_matrix[0][2];float idx=u_grid_matrix[1][2];float idy=u_grid_matrix[2][2];vec3 decomposed_pos_and_skirt=decomposeToPosAndSkirt(a_pos);vec3 latLng=u_grid_matrix*vec3(decomposed_pos_and_skirt.xy,1.0);float mercatorY=mercatorYfromLat(latLng[0]);float uvY=mercatorY*tiles-idy;float mercatorX=mercatorXfromLng(latLng[1]);float uvX=mercatorX*tiles-idx;vec3 globe_pos=latLngToECEF(latLng.xy);vec2 merc_pos=vec2(mercatorX,mercatorY);vec2 uv=vec2(uvX,uvY);\n#endif\nv_pos0=uv;vec2 tile_pos=uv*EXTENT;vec3 globe_derived_up_vector=normalize(globe_pos)*u_tile_up_scale;\n#ifdef GLOBE_POLES\nvec3 up_vector=globe_derived_up_vector;\n#else\nvec3 up_vector=elevationVector(tile_pos);\n#endif\nfloat height=elevation(tile_pos);\n#ifdef TERRAIN_WIREFRAME\nheight+=wireframeOffset;\n#endif\nglobe_pos+=up_vector*height;\n#ifndef GLOBE_POLES\nglobe_pos-=globe_derived_up_vector*u_skirt_height*decomposed_pos_and_skirt.z;\n#endif\n#ifdef GLOBE_POLES\nvec4 interpolated_pos=u_globe_matrix*vec4(globe_pos,1.0);\n#else\nvec4 globe_world_pos=u_globe_matrix*vec4(globe_pos,1.0);vec4 merc_world_pos=vec4(0.0);if (u_zoom_transition > 0.0) {merc_world_pos=vec4(merc_pos,height-u_skirt_height*decomposed_pos_and_skirt.z,1.0);merc_world_pos.xy-=u_merc_center;merc_world_pos.x=wrap(merc_world_pos.x,-0.5,0.5);merc_world_pos=u_merc_matrix*merc_world_pos;}vec4 interpolated_pos=vec4(mix(globe_world_pos.xyz,merc_world_pos.xyz,u_zoom_transition),1.0);\n#endif\ngl_Position=u_proj_matrix*interpolated_pos;\n#ifdef FOG\nv_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz);\n#endif\n}"),globeAtmosphere:pr("uniform float u_transition;uniform highp float u_fadeout_range;uniform highp float u_temporal_offset;uniform vec3 u_start_color;uniform vec4 u_color;uniform vec4 u_space_color;uniform vec4 u_high_color;uniform float u_star_intensity;uniform float u_star_size;uniform float u_star_density;uniform float u_horizon_angle;uniform mat4 u_rotation_matrix;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;highp float random(highp vec3 p) {p=fract(p*vec3(23.2342,97.1231,91.2342));p+=dot(p.zxy,p.yxz+123.1234);return fract(p.x*p.y);}float stars(vec3 p,float scale,vec2 offset) {vec2 uv_scale=(u_viewport/u_star_size)*scale;vec3 position=vec3(p.xy*uv_scale+offset*u_viewport,p.z);vec3 q=fract(position)-0.5;vec3 id=floor(position);float random_visibility=step(random(id),u_star_density);float circle=smoothstep(0.5+u_star_intensity,0.5,length(q));return circle*random_visibility;}void main() {highp vec3 dir=normalize(v_ray_dir);float globe_pos_dot_dir;\n#ifdef PROJECTION_GLOBE_VIEW\nglobe_pos_dot_dir=dot(u_globe_pos,dir);highp vec3 closest_point_forward=abs(globe_pos_dot_dir)*dir;float norm_dist_from_center=length(closest_point_forward-u_globe_pos)/u_globe_radius;if (norm_dist_from_center < 0.98) {discard;return;}\n#endif\nhighp vec3 horizon_dir=normalize(v_horizon_dir);float horizon_angle_mercator=dir.y < horizon_dir.y ?\n0.0 : max(acos(dot(dir,horizon_dir)),0.0);float horizon_angle;\n#ifdef PROJECTION_GLOBE_VIEW\nhighp vec3 closest_point=globe_pos_dot_dir*dir;float closest_point_to_center=length(closest_point-u_globe_pos);float theta=asin(clamp(closest_point_to_center/length(u_globe_pos),-1.0,1.0));horizon_angle=globe_pos_dot_dir < 0.0 ?\nPI-theta-u_horizon_angle : theta-u_horizon_angle;float angle_t=pow(u_transition,10.0);horizon_angle=mix(horizon_angle,horizon_angle_mercator,angle_t);\n#else\nhorizon_angle=horizon_angle_mercator;\n#endif\nhorizon_angle/=PI;float t=exp(-horizon_angle/u_fadeout_range);float alpha_0=u_color.a;float alpha_1=u_high_color.a;float alpha_2=u_space_color.a;vec3 color_stop_0=u_color.rgb;vec3 color_stop_1=u_high_color.rgb;vec3 color_stop_2=u_space_color.rgb;vec3 c0=mix(color_stop_2,color_stop_1,alpha_1);vec3 c1=mix(c0,color_stop_0,alpha_0);vec3 c2=mix(c0,c1,t);vec3 c =mix(color_stop_2,c2,t);float a0=mix(alpha_2,1.0,alpha_1);float a1=mix(a0,1.0,alpha_0);float a2=mix(a0,a1,t);float a =mix(alpha_2,a2,t);vec2 uv=gl_FragCoord.xy/u_viewport-0.5;float aspect_ratio=u_viewport.x/u_viewport.y;vec4 uv_dir=vec4(normalize(vec3(uv.x*aspect_ratio,uv.y,1.0)),1.0);uv_dir=u_rotation_matrix*uv_dir;vec3 n=abs(uv_dir.xyz);vec2 uv_remap=(n.x > n.y && n.x > n.z) ? uv_dir.yz/uv_dir.x:\n(n.y > n.x && n.y > n.z) ? uv_dir.zx/uv_dir.y:\nuv_dir.xy/uv_dir.z;uv_remap.x/=aspect_ratio;vec3 D=vec3(uv_remap,1.0);highp float star_field=0.0;if (u_star_intensity > 0.0) {star_field+=stars(D,1.2,vec2(0.0,0.0));star_field+=stars(D,1.0,vec2(1.0,0.0));star_field+=stars(D,0.8,vec2(0.0,1.0));star_field+=stars(D,0.6,vec2(1.0,1.0));star_field*=(1.0-pow(t,0.25+(1.0-u_high_color.a)*0.75));c+=star_field*alpha_2;}c=dither(c,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=vec4(c,a);}","attribute vec3 a_pos;attribute vec2 a_uv;uniform vec3 u_frustum_tl;uniform vec3 u_frustum_tr;uniform vec3 u_frustum_br;uniform vec3 u_frustum_bl;uniform float u_horizon;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;void main() {v_ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,a_uv.x),mix(u_frustum_bl,u_frustum_br,a_uv.x),a_uv.y);v_horizon_dir=mix(\nmix(u_frustum_tl,u_frustum_bl,u_horizon),mix(u_frustum_tr,u_frustum_br,u_horizon),a_uv.x);gl_Position=vec4(a_pos,1.0);}")};function fr(e,t){const r=e.replace(/\s*\/\/[^\n]*\n/g,"\n").split("\n");for(let e of r)if(e=e.trim(),"#"===e[0]&&e.includes("if")&&!e.includes("endif")){e=e.replace("#","").replace(/ifdef|ifndef|elif|if/g,"").replace(/!|defined|\(|\)|\|\||&&/g,"").replace(/\s+/g," ").trim();const r=e.split(" ");for(const e of r)t.includes(e)||t.push(e)}}function pr(e,t){const r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=t.match(/attribute (highp |mediump |lowp )?([\w]+) ([\w]+)/g),o={},i=[...sr];return fr(e,i),fr(t,i),{fragmentSource:e=e.replace(r,((e,t,r,n,i)=>(o[i]=!0,"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nvarying ${r} ${n} ${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = u_${i};\n#endif\n`))),vertexSource:t=t.replace(r,((e,t,r,n,i)=>{const a="float"===n?"vec2":"vec4",s=i.match(/color/)?"color":a;return o[i]?"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${r} ${a} a_${i};\nvarying ${r} ${n} ${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"vec4"===s?`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = a_${i};\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = unpack_mix_${s}(a_${i}, u_${i}_t);\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${r} ${a} a_${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"vec4"===s?`\n#ifndef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = a_${i};\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = unpack_mix_${s}(a_${i}, u_${i}_t);\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`})),staticAttributes:n,usedDefines:i}}class hr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffers=[],this.vao=null}bind(e,t,r,n,o,i,a){this.context=e;let s=this.boundPaintVertexBuffers.length!==n.length;for(let e=0;!s&&e{const o=r.paint.get("hillshade-shadow-color"),i=r.paint.get("hillshade-highlight-color"),a=r.paint.get("hillshade-accent-color");let s=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);const l=!e.options.moving;return{u_matrix:n||e.transform.calculateProjMatrix(t.tileID.toUnwrapped(),l),u_image:0,u_latrange:mr(0,t.tileID),u_light:[r.paint.get("hillshade-exaggeration"),s],u_shadow:o,u_highlight:i,u_accent:a}})(t,n,o,t.terrain?r.projMatrix:null);t.prepareDrawProgram(l,d,r.toUnwrapped());const{tileBoundsBuffer:p,tileBoundsIndexBuffer:h,tileBoundsSegments:m}=t.getTileBoundsBuffers(n);d.draw(l,c.TRIANGLES,i,a,s,e.CullFaceMode.disabled,f,o.id,p,h,m)}function yr(t,r,n){if(!r.needsDEMTextureUpload)return;const o=t.context,i=o.gl;o.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||t.getTileTexture(n.stride);const a=n.getPixels();r.demTexture?r.demTexture.update(a,{premultiply:!1}):r.demTexture=new e.Texture(o,a,i.RGBA,{premultiply:!1}),r.needsDEMTextureUpload=!1}function vr(t,r,n,o,i,a){const s=t.context,l=s.gl;if(!r.dem)return;const c=r.dem;if(s.activeTexture.set(l.TEXTURE1),yr(t,r,c),!r.demTexture)return;r.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);const u=c.dim;s.activeTexture.set(l.TEXTURE0);let d=r.fbo;if(!d){const t=new e.Texture(s,{width:u,height:u,data:null},l.RGBA);t.bind(l.LINEAR,l.CLAMP_TO_EDGE),d=r.fbo=s.createFramebuffer(u,u,!0),d.colorAttachment.set(t.texture)}s.bindFramebuffer.set(d.framebuffer),s.viewport.set([0,0,u,u]);const{tileBoundsBuffer:f,tileBoundsIndexBuffer:p,tileBoundsSegments:h}=t.getMercatorTileBoundsBuffers();t.useProgram("hillshadePrepare").draw(s,l.TRIANGLES,o,i,a,e.CullFaceMode.disabled,((t,r)=>{const n=r.stride,o=e.create();return e.ortho(o,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(o,o,[0,-e.EXTENT,0]),{u_matrix:o,u_image:1,u_dimension:[n,n],u_zoom:t.overscaledZ,u_unpack:r.unpackVector}})(r.tileID,c),n.id,f,p,h),r.needsHillshadePrepare=!1}const br=t=>({u_matrix:new e.UniformMatrix4f(t),u_image0:new e.Uniform1i(t),u_skirt_height:new e.Uniform1f(t)}),_r=(e,t)=>({u_matrix:e,u_image0:0,u_skirt_height:t}),xr=(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h)=>({u_proj_matrix:Float32Array.from(e),u_globe_matrix:t,u_normalize_matrix:Float32Array.from(n),u_merc_matrix:r,u_zoom_transition:o,u_merc_center:i,u_image0:0,u_frustum_tl:a,u_frustum_tr:s,u_frustum_br:l,u_frustum_bl:c,u_globe_pos:u,u_globe_radius:d,u_viewport:f,u_grid_matrix:h?Float32Array.from(h):new Float32Array(9),u_skirt_height:p});function wr(e,t){return null!=e&&null!=t&&!(!e.hasData()||!t.hasData())&&null!=e.demTexture&&null!=t.demTexture&&e.tileID.key!==t.tileID.key}const Ar=new class{constructor(){this.operations={}}newMorphing(e,t,r,n,o){if(e in this.operations){const t=this.operations[e];t.to.tileID.key!==r.tileID.key&&(t.queued=r)}else this.operations[e]={startTime:n,phase:0,duration:o,from:t,to:r,queued:null}}getMorphValuesForProxy(e){if(!(e in this.operations))return null;const t=this.operations[e];return{from:t.from,to:t.to,phase:t.phase}}update(e){for(const t in this.operations){const r=this.operations[t];for(r.phase=(e-r.startTime)/r.duration;r.phase>=1||!this._validOp(r);)if(!this._nextOp(r,e)){delete this.operations[t];break}}}_nextOp(e,t){return!!e.queued&&(e.from=e.to,e.to=e.queued,e.queued=null,e.phase=0,e.startTime=t,!0)}_validOp(e){return e.from.hasData()&&e.to.hasData()}},Sr={0:null,1:"TERRAIN_VERTEX_MORPHING",2:"TERRAIN_WIREFRAME"};function Cr(e){return 6*Math.pow(1.5,22-e)}function Er(e,t){const r=1<({u_matrix:e});function Ir(t,r,n,o,i){if(i>0){const a=e.exported.now(),s=(a-t.timeAdded)/i,l=r?(a-r.timeAdded)/i:-1,c=n.getSource(),u=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),d=!r||Math.abs(r.tileID.overscaledZ-u)>Math.abs(t.tileID.overscaledZ-u),f=d&&t.refreshedUponExpiration?1:e.clamp(d?s:1-l,0,1);return t.refreshedUponExpiration&&s>=1&&(t.refreshedUponExpiration=!1),r?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}class kr extends e.SourceCache{constructor(e){const t={type:"raster-dem",maxzoom:e.transform.maxZoom},r=new k(Be(),null),n=Me("mock-dem",t,r,e.style);super("mock-dem",n,!1),n.setEventedParent(this),this._sourceLoaded=!0}_loadTile(e,t){e.state="loaded",t(null)}}class Mr extends e.SourceCache{constructor(e){const t=Me("proxy",{type:"geojson",maxzoom:e.transform.maxZoom},new k(Be(),null),e.style);super("proxy",t,!1),t.setEventedParent(this),this.map=this.getSource().map=e,this.used=this._sourceLoaded=!0,this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}update(t,r,n){if(t.freezeTileCoverage)return;this.transform=t;const o=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce(((r,n)=>{if(r[n.key]="",!this._tiles[n.key]){const r=new e.Tile(n,this._source.tileSize*n.overscaleFactor(),t.tileZoom);r.state="loaded",this._tiles[n.key]=r}return r}),{});for(const e in this._tiles)e in o||(this.freeFBO(e),this._tiles[e].unloadVectorData(),delete this._tiles[e])}freeFBO(e){const t=this.proxyCachedFBO[e];if(void 0!==t){const r=Object.values(t);this.renderCachePool.push(...r),delete this.proxyCachedFBO[e]}}deallocRenderCache(){this.renderCache.forEach((e=>e.fb.destroy())),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class Rr extends e.OverscaledTileID{constructor(e,t,r){super(e.overscaledZ,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y),this.proxyTileKey=t,this.projMatrix=r}}class Pr extends e.Elevation{constructor(t,r){super(),this.painter=t,this.terrainTileForTile={},this.prevTerrainTileForTile={};const[n,o,i]=function(){const t=new e.StructArrayLayout2i4,r=new e.StructArrayLayout3ui6,n=131;t.reserve(17161),r.reserve(33800);const o=e.EXTENT/128,i=e.EXTENT+o/2,a=i+o;for(let r=-o;ri||r<0||r>i?24575:0,a=e.clamp(Math.round(n),0,e.EXTENT),s=e.clamp(Math.round(r),0,e.EXTENT);t.emplaceBack(a+o,s)}const s=(e,t)=>{const o=t*n+e;r.emplaceBack(o+1,o,o+n),r.emplaceBack(o+n,o+n+1,o+1)};for(let e=1;e<129;e++)for(let t=1;t<129;t++)s(t,e);return[0,129].forEach((e=>{for(let t=0;t<130;t++)s(t,e),s(e,t)})),[t,r,32768]}(),a=t.context;this.gridBuffer=a.createVertexBuffer(n,e.posAttributes.members),this.gridIndexBuffer=a.createIndexBuffer(o),this.gridSegments=e.SegmentVector.simpleSegment(0,0,n.length,o.length),this.gridNoSkirtSegments=e.SegmentVector.simpleSegment(0,0,n.length,i),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new Mr(r.map),this.orthoMatrix=e.create(),e.ortho(this.orthoMatrix,"globe"===this.painter.transform.projection.name?.015:0,e.EXTENT,0,e.EXTENT,0,1);const s=a.gl;this._overlapStencilMode=new e.StencilMode({func:s.GEQUAL,mask:255},0,255,s.KEEP,s.KEEP,s.REPLACE),this._previousZoom=t.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=r,this._useVertexMorphing=!0,this._exaggeration=1,this._mockSourceCache=new kr(r.map)}set style(e){e.on("data",this._onStyleDataEvent.bind(this)),e.on("neworder",this._checkRenderCacheEfficiency.bind(this)),this._style=e,this._checkRenderCacheEfficiency(),this._style.map.on("moveend",(()=>{this._clearLineLayersFromRenderCache()}))}update(t,r,n){if(t&&t.terrain){this._style!==t&&(this.style=t),this.enabled=!0;const o=t.terrain.properties;this.sourceCache=0===t.terrain.drapeRenderMode?this._mockSourceCache:t._getSourceCache(o.get("source")),this._exaggeration=o.get("exaggeration");const i=()=>{this.sourceCache.used&&e.warnOnce(`Raster DEM source '${this.sourceCache.id}' is used both for terrain and as layer source.\nThis leads to lower resolution of hillshade. For full hillshade resolution but higher memory consumption, define another raster DEM source.`);const t=this.getScaledDemTileSize();this.sourceCache.update(r,t,!0),this.resetTileLookupCache(this.sourceCache.id)};this.sourceCache.usedForTerrain||(this.resetTileLookupCache(this.sourceCache.id),this.sourceCache.usedForTerrain=!0,i(),this._initializing=!0),i(),r.updateElevation(!0,n),this.resetTileLookupCache(this.proxySourceCache.id),this.proxySourceCache.update(r),this._emptyDEMTextureDirty=!0}else this._disable()}resetTileLookupCache(e){this._findCoveringTileCache[e]={}}getScaledDemTileSize(){return this.sourceCache.getSource().tileSize/128*this.proxySourceCache.getSource().tileSize}_checkRenderCacheEfficiency(){const t=this.renderCacheEfficiency(this._style);this._style.map._optimizeForTerrain||100!==t.efficiency&&e.warnOnce(`Terrain render cache efficiency is not optimal (${t.efficiency}%) and performance\n may be affected negatively, consider placing all background, fill and line layers before layer\n with id '${t.firstUndrapedLayer}' or create a map using optimizeForTerrain: true option.`)}_onStyleDataEvent(e){e.coord&&"source"===e.dataType?this._clearRenderCacheForTile(e.sourceCacheId,e.coord):"style"===e.dataType&&(this._invalidateRenderCache=!0)}_disable(){if(this.enabled&&(this.enabled=!1,this._sharedDepthStencil=void 0,this.proxySourceCache.deallocRenderCache(),this._style))for(const e in this._style._sourceCaches)this._style._sourceCaches[e].usedForTerrain=!1}destroy(){this._disable(),this._emptyDEMTexture&&this._emptyDEMTexture.destroy(),this._emptyDepthBufferTexture&&this._emptyDepthBufferTexture.destroy(),this.pool.forEach((e=>e.fb.destroy())),this.pool=[],this._depthFBO&&(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0)}_source(){return this.enabled?this.sourceCache:null}isUsingMockSource(){return this.sourceCache===this._mockSourceCache}exaggeration(){return this._exaggeration}get visibleDemTiles(){return this._visibleDemTiles}get drapeBufferSize(){const e=2*this.proxySourceCache.getSource().tileSize;return[e,e]}set useVertexMorphing(e){this._useVertexMorphing=e}updateTileBinding(t){if(!this.enabled)return;this.prevTerrainTileForTile=this.terrainTileForTile;const r=this.proxySourceCache,n=this.painter.transform;this._initializing&&(this._initializing=0===n._centerAltitude&&-1===this.getAtPointOrZero(e.MercatorCoordinate.fromLngLat(n.center),-1),this._emptyDEMTextureDirty=!this._initializing);const o=this.proxyCoords=r.getIds().map((e=>{const t=r.getTileByID(e).tileID;return t.projMatrix=n.calculateProjMatrix(t.toUnwrapped()),t}));!function(t,r){const n=r.transform.pointCoordinate(r.transform.getCameraPoint()),o=new e.Point(n.x,n.y);t.sort(((t,r)=>{if(r.overscaledZ-t.overscaledZ)return r.overscaledZ-t.overscaledZ;const n=new e.Point(t.canonical.x+(1<{this.proxyToSource[e.key]={}})),this.terrainTileForTile={};const a=this._style._sourceCaches;for(const e in a){const r=a[e];if(!r.used)continue;if(r!==this.sourceCache&&this.resetTileLookupCache(r.id),this._setupProxiedCoordsForOrtho(r,t[e],i),r.usedForTerrain)continue;const n=t[e];r.getSource().reparseOverscaled&&this._assignTerrainTiles(n)}this.proxiedCoords[r.id]=o.map((e=>new Rr(e,e.key,this.orthoMatrix))),this._assignTerrainTiles(o),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(i),this.renderingToTexture=!1,this._updateTimestamp=e.exported.now();const s={};this._visibleDemTiles=[];for(const e of this.proxyCoords){const t=this.terrainTileForTile[e.key];if(!t)continue;const r=t.tileID.key;r in s||(this._visibleDemTiles.push(t),s[r]=r)}}_assignTerrainTiles(e){this._initializing||e.forEach((e=>{if(this.terrainTileForTile[e.key])return;const t=this._findTileCoveringTileID(e,this.sourceCache);t&&(this.terrainTileForTile[e.key]=t)}))}_prepareDEMTextures(){const e=this.painter.context,t=e.gl;for(const r in this.terrainTileForTile){const n=this.terrainTileForTile[r],o=n.dem;!o||n.demTexture&&!n.needsDEMTextureUpload||(e.activeTexture.set(t.TEXTURE1),yr(this.painter,n,o))}}_prepareDemTileUniforms(e,t,r,n){if(!t||null==t.demTexture)return!1;const o=e.tileID.canonical,i=Math.pow(2,t.tileID.canonical.z-o.z),a=n||"";return r[`u_dem_tl${a}`]=[o.x*i%1,o.y*i%1],r[`u_dem_scale${a}`]=i,!0}get emptyDEMTexture(){return!this._emptyDEMTextureDirty&&this._emptyDEMTexture?this._emptyDEMTexture:this._updateEmptyDEMTexture()}get emptyDepthBufferTexture(){const t=this.painter.context,r=t.gl;if(!this._emptyDepthBufferTexture){const n=new e.RGBAImage({width:1,height:1},Uint8Array.of(255,255,255,255));this._emptyDepthBufferTexture=new e.Texture(t,n,r.RGBA,{premultiply:!1})}return this._emptyDepthBufferTexture}_getLoadedAreaMinimum(){let e=0;const t=this._visibleDemTiles.reduce(((t,r)=>{if(!r.dem)return t;const n=r.dem.tree.minimums[0];return n>0&&e++,t+n}),0);return e?t/e:0}_updateEmptyDEMTexture(){const t=this.painter.context,r=t.gl;t.activeTexture.set(r.TEXTURE2);const n=this._getLoadedAreaMinimum(),o=new e.RGBAImage({width:1,height:1},new Uint8Array(e.DEMData.pack(n,this.sourceCache.getSource().encoding)));this._emptyDEMTextureDirty=!1;let i=this._emptyDEMTexture;return i?i.update(o,{premultiply:!1}):i=this._emptyDEMTexture=new e.Texture(t,o,r.RGBA,{premultiply:!1}),i}setupElevationDraw(t,r,n){const o=this.painter.context,i=o.gl,a=(s=this.sourceCache.getSource().encoding,{u_dem:2,u_dem_prev:4,u_dem_unpack:e.DEMData.getUnpackVector(s),u_dem_tl:[0,0],u_dem_tl_prev:[0,0],u_dem_scale:0,u_dem_scale_prev:0,u_dem_size:0,u_dem_lerp:1,u_depth:3,u_depth_size_inv:[0,0],u_exaggeration:0});var s;a.u_dem_size=this.sourceCache.getSource().tileSize,a.u_exaggeration=this.exaggeration();let l=null,c=null,u=1;if(n&&n.morphing&&this._useVertexMorphing){const e=n.morphing.srcDemTile,r=n.morphing.dstDemTile;u=n.morphing.phase,e&&r&&(this._prepareDemTileUniforms(t,e,a,"_prev")&&(c=e),this._prepareDemTileUniforms(t,r,a)&&(l=r))}if(c&&l?(o.activeTexture.set(i.TEXTURE2),l.demTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE,i.NEAREST),o.activeTexture.set(i.TEXTURE4),c.demTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE,i.NEAREST),a.u_dem_lerp=u):(l=this.terrainTileForTile[t.tileID.key],o.activeTexture.set(i.TEXTURE2),(this._prepareDemTileUniforms(t,l,a)?l.demTexture:this.emptyDEMTexture).bind(i.NEAREST,i.CLAMP_TO_EDGE)),o.activeTexture.set(i.TEXTURE3),n&&n.useDepthForOcclusion?(this._depthTexture&&this._depthTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE),this._depthFBO&&(a.u_depth_size_inv=[1/this._depthFBO.width,1/this._depthFBO.height])):(this.emptyDepthBufferTexture.bind(i.NEAREST,i.CLAMP_TO_EDGE),a.u_depth_size_inv=[1,1]),n&&n.useMeterToDem&&l){const t=(1<{if(c===e)return;const n=[Sr[e],"PROJECTION_GLOBE_VIEW"];f&&n.push("CUSTOM_ANTIALIASING"),r&&n.push(Sr[u]),l=t.useProgram("globeRaster",null,n),c=e},h=t.colorModeForRenderPass(),m=new e.DepthMode(s.LEQUAL,e.DepthMode.ReadWrite,t.depthRangeFor3D);Ar.update(i);const g=e.calculateGlobeMercatorMatrix(d),y=[e.mercatorXfromLng(d.center.lng),e.mercatorYfromLat(d.center.lat)],v=u?[!1,!0]:[!1],b=t.globeSharedBuffers,_=[d.width*e.exported.devicePixelRatio,d.height*e.exported.devicePixelRatio],x=Float32Array.from(d.globeMatrix),w={useDenormalizedUpVectorScale:!0};if(v.forEach((u=>{const d=t.transform,f=Cr(d.zoom)*r.exaggeration();c=-1;const v=u?s.LINES:s.TRIANGLES;for(const c of o){const o=n.getTile(c),A=e.StencilMode.disabled,S=r.prevTerrainTileForTile[c.key],C=r.terrainTileForTile[c.key];wr(S,C)&&Ar.newMorphing(c.key,S,C,i,250),a.activeTexture.set(s.TEXTURE0),o.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE);const E=Ar.getMorphValuesForProxy(c.key),T=E?1:0;E&&e.extend$1(w,{morphing:{srcDemTile:E.from,dstDemTile:E.to,phase:e.easeCubicInOut(E.phase)}});const I=e.tileCornersToBounds(c.canonical),k=e.getLatitudinalLod(I.getCenter().lat),M=e.getGridMatrix(c.canonical,I,k,d.worldSize/d._pixelsPerMercatorPixel),R=e.globeNormalizeECEF(e.globeTileBounds(c.canonical)),P=xr(d.projMatrix,x,g,R,e.globeToMercatorTransition(d.zoom),y,d.frustumCorners.TL,d.frustumCorners.TR,d.frustumCorners.BR,d.frustumCorners.BL,d.globeCenterInViewSpace,d.globeRadius,_,f,M);if(p(T,u),r.setupElevationDraw(o,l,w),t.prepareDrawProgram(a,l,c.toUnwrapped()),b){const[r,n,o]=u?b.getWirefameBuffers(t.context,k):b.getGridBuffers(k,0!==f);l.draw(a,v,m,A,h,e.CullFaceMode.backCCW,P,"globe_raster",r,n,o)}}})),b){const i=["GLOBE_POLES","PROJECTION_GLOBE_VIEW"];f&&i.push("CUSTOM_ANTIALIASING"),l=t.useProgram("globeRaster",null,i);for(const i of o){const{x:o,y:c,z:u}=i.canonical,f=0===c,p=c===(1<t.draw(a,s.TRIANGLES,m,e.StencilMode.disabled,h,e.CullFaceMode.disabled,xr(d.projMatrix,b,b,S,0,y,d.frustumCorners.TL,d.frustumCorners.TR,d.frustumCorners.BR,d.frustumCorners.BL,d.globeCenterInViewSpace,d.globeRadius,_,0),"globe_pole_raster",r,x,A);r.setupElevationDraw(c,l,w),t.prepareDrawProgram(a,l,i.toUnwrapped()),f&&C(l,g),p&&(b=e.scale(e.create(),b,[1,-1,1]),C(l,v))}}}}(t,r,n,o,i);else{const a=t.context,s=a.gl;let l,c;const u=t.options.showTerrainWireframe?2:0,d=(e,r)=>{if(c===e)return;const n=[Sr[e]];r&&n.push(Sr[u]),l=t.useProgram("terrainRaster",null,n),c=e},f=t.colorModeForRenderPass(),p=new e.DepthMode(s.LEQUAL,e.DepthMode.ReadWrite,t.depthRangeFor3D);Ar.update(i);const h=t.transform,m=Cr(h.zoom)*r.exaggeration();(u?[!1,!0]:[!1]).forEach((u=>{c=-1;const g=u?s.LINES:s.TRIANGLES,[y,v]=u?r.getWirefameBuffer():[r.gridIndexBuffer,r.gridSegments];for(const c of o){const o=n.getTile(c),b=e.StencilMode.disabled,_=r.prevTerrainTileForTile[c.key],x=r.terrainTileForTile[c.key];wr(_,x)&&Ar.newMorphing(c.key,_,x,i,250),a.activeTexture.set(s.TEXTURE0),o.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST);const w=Ar.getMorphValuesForProxy(c.key),A=w?1:0;let S;w&&(S={morphing:{srcDemTile:w.from,dstDemTile:w.to,phase:e.easeCubicInOut(w.phase)}});const C=_r(c.projMatrix,Er(c.canonical,h.renderWorldCopies)?m/10:m);d(A,u),r.setupElevationDraw(o,l,S),t.prepareDrawProgram(a,l,c.toUnwrapped()),l.draw(a,g,p,b,f,e.CullFaceMode.backCCW,C,"terrain_raster",r.gridBuffer,y,v)}}))}}(r,this,this.proxySourceCache,t,this._updateTimestamp),this.renderingToTexture=!0,r.gpuTimingDeferredRenderEnd(),t.splice(0,t.length))}renderBatch(t){if(0===this._drapedRenderBatches.length)return t+1;this.renderingToTexture=!0;const r=this.painter,n=this.painter.context,o=this.proxySourceCache,i=this.proxiedCoords[o.id],a=this._drapedRenderBatches.shift(),s=[],l=r.style.order;let c=0;for(const u of i){const i=o.getTileByID(u.proxyTileKey),d=o.proxyCachedFBO[u.key]?o.proxyCachedFBO[u.key][t]:void 0,f=void 0!==d?o.renderCache[d]:this.pool[c++],p=void 0!==d;if(i.texture=f.tex,p&&!f.dirty){s.push(i.tileID);continue}let h;n.bindFramebuffer.set(f.fb.framebuffer),this.renderedToTile=!1,f.dirty&&(n.clear({color:e.Color.transparent,stencil:0}),f.dirty=!1);for(let e=a.start;e<=a.end;++e){const t=r.style._layers[l[e]];if(t.isHidden(r.transform.zoom))continue;const o=r.style._getLayerSourceCache(t),i=o?this.proxyToSource[u.key][o.id]:[u];if(!i)continue;const a=i;n.viewport.set([0,0,f.fb.width,f.fb.height]),h!==(o?o.id:null)&&(this._setupStencil(f,i,t,o),h=o?o.id:null),r.renderLayer(r,o,t,a)}this.renderedToTile?(f.dirty=!0,s.push(i.tileID)):p||--c,5===c&&(c=0,this.renderToBackBuffer(s))}return this.renderToBackBuffer(s),this.renderingToTexture=!1,n.bindFramebuffer.set(null),n.viewport.set([0,0,r.width,r.height]),a.end+1}postRender(){}renderCacheEfficiency(e){const t=e.order.length;if(0===t)return{efficiency:100};let r,n=0,o=0,i=!1;for(let a=0;ae.dem)).forEach((t=>{e=Math.min(e,t.dem.tree.minimums[0])})),0===e?e:(e-30)*this._exaggeration}raycast(e,t,r){if(!this._visibleDemTiles)return null;const n=this._visibleDemTiles.filter((e=>e.dem)).map((n=>{const o=n.tileID,i=1<(null!==e.t?e.t:Number.MAX_VALUE)-(null!==t.t?t.t:Number.MAX_VALUE)));for(const o of n){if(null==o.t)return null;const n=o.tile.dem.tree.raycast(o.minx,o.miny,o.maxx,o.maxy,e,t,r);if(null!=n)return n}return null}_createFBO(){const t=this.painter.context,r=t.gl,n=this.drapeBufferSize;t.activeTexture.set(r.TEXTURE0);const o=new e.Texture(t,{width:n[0],height:n[1],data:null},r.RGBA);o.bind(r.LINEAR,r.CLAMP_TO_EDGE);const i=t.createFramebuffer(n[0],n[1],!1);return i.colorAttachment.set(o.texture),i.depthAttachment=new we(t,i.framebuffer),void 0===this._sharedDepthStencil?(this._sharedDepthStencil=t.createRenderbuffer(t.gl.DEPTH_STENCIL,n[0],n[1]),this._stencilRef=0,i.depthAttachment.set(this._sharedDepthStencil),t.clear({stencil:0})):i.depthAttachment.set(this._sharedDepthStencil),t.extTextureFilterAnisotropic&&!t.extTextureFilterAnisotropicForceOff&&r.texParameterf(r.TEXTURE_2D,t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.extTextureFilterAnisotropicMax),{fb:i,tex:o,dirty:!1}}_initFBOPool(){for(;this.pool.length{const t=this._style._layers[e],r=t.isHidden(this.painter.transform.zoom);return"custom"===t.type?!r&&t.shouldRedrape():!r&&t.hasTransition()}))}_clearLineLayersFromRenderCache(){let t=!1;for(const e of this._style._getSources())if(e instanceof Ce){t=!0;break}if(!t)return;const r={};for(let t=0;tt.renderCachePool.length){const e=Object.values(t.proxyCachedFBO);t.proxyCachedFBO={};for(let r=0;r=0;o--){const i=r[o];if(t.getTileByID(i.key),void 0!==t.proxyCachedFBO[i.key]){const r=e[i.key],o=this.proxyToSource[i.key];let a=0;for(const e in o){const t=o[e],i=r[e];if(!i||i.length!==t.length||t.some(((t,r)=>t!==i[r]||n[e]&&n[e].hasOwnProperty(t.key)))){a=-1;break}++a}for(const e in t.proxyCachedFBO[i.key])t.renderCache[t.proxyCachedFBO[i.key][e]].dirty=a<0||a!==Object.values(r).length}}const o=[...this._drapedRenderBatches];o.sort(((e,t)=>t.end-t.start-(e.end-e.start)));for(const e of o)for(const n of r){if(t.proxyCachedFBO[n.key])continue;let r=t.renderCachePool.pop();void 0===r&&t.renderCache.length<50&&(r=t.renderCache.length,t.renderCache.push(this._createFBO())),void 0!==r&&(t.proxyCachedFBO[n.key]={},t.proxyCachedFBO[n.key][e.start]=r,t.renderCache[r].dirty=!0)}this._tilesDirty={}}_setupStencil(e,t,r,n){if(!n||!this._sourceTilesOverlap[n.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));const o=this.painter.context,i=o.gl;if(t.length<=1)return void(this._overlapStencilType=!1);let a;if(r.isTileClipped())a=t.length,this._overlapStencilMode.test={func:i.EQUAL,mask:255},this._overlapStencilType="Clip";else{if(!(t[0].overscaledZ>t[t.length-1].overscaledZ))return void(this._overlapStencilType=!1);a=1,this._overlapStencilMode.test={func:i.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+a>255&&(o.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=a,this._overlapStencilMode.ref=this._stencilRef,r.isTileClipped()&&this._renderTileClippingMasks(t,this._overlapStencilMode.ref)}clipOrMaskOverlapStencilType(){return"Clip"===this._overlapStencilType||"Mask"===this._overlapStencilType}stencilModeForRTTOverlap(t){return this.renderingToTexture&&this._overlapStencilType?("Clip"===this._overlapStencilType&&(this._overlapStencilMode.ref=this.painter._tileClippingMaskIDs[t.key]),this._overlapStencilMode):e.StencilMode.disabled}_renderTileClippingMasks(t,r){const n=this.painter,o=this.painter.context,i=o.gl;n._tileClippingMaskIDs={},o.setColorMode(e.ColorMode.disabled),o.setDepthMode(e.DepthMode.disabled);const a=n.useProgram("clippingMask");for(const s of t){const t=n._tileClippingMaskIDs[s.key]=--r;a.draw(o,i.TRIANGLES,e.DepthMode.disabled,new e.StencilMode({func:i.ALWAYS,mask:0},t,255,i.KEEP,i.KEEP,i.REPLACE),e.ColorMode.disabled,e.CullFaceMode.disabled,Tr(s.projMatrix),"$clipping",n.tileExtentBuffer,n.quadTriangleIndexBuffer,n.tileExtentSegments)}}pointCoordinate(t){const r=this.painter.transform;if(t.x<0||t.x>r.width||t.y<0||t.y>r.height)return null;const n=[t.x,t.y,1,1];e.transformMat4$1(n,n,r.pixelMatrixInverse),e.scale$1(n,n,1/n[3]),n[0]/=r.worldSize,n[1]/=r.worldSize;const o=r._camera.position,i=e.mercatorZfromAltitude(1,r.center.lat),a=[o[0],o[1],o[2]/i,0],s=e.subtract([],n.slice(0,3),a);e.normalize(s,s);const l=this.raycast(a,s,this._exaggeration);return null!==l&&l?(e.scaleAndAdd(a,a,s,l),a[3]=a[2],a[2]*=i,a):null}drawDepth(){const t=this.painter,r=t.context,n=this.proxySourceCache,o=Math.ceil(t.width),i=Math.ceil(t.height);if(!this._depthFBO||this._depthFBO.width===o&&this._depthFBO.height===i||(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0),!this._depthFBO){const t=r.gl,n=r.createFramebuffer(o,i,!0);r.activeTexture.set(t.TEXTURE0);const a=new e.Texture(r,{width:o,height:i,data:null},t.RGBA);a.bind(t.NEAREST,t.CLAMP_TO_EDGE),n.colorAttachment.set(a.texture);const s=r.createRenderbuffer(r.gl.DEPTH_COMPONENT16,o,i);n.depthAttachment.set(s),this._depthFBO=n,this._depthTexture=a}r.bindFramebuffer.set(this._depthFBO.framebuffer),r.viewport.set([0,0,o,i]),function(t,r,n,o){if("globe"===t.transform.projection.name)return;const i=t.context,a=i.gl;i.clear({depth:1});const s=t.useProgram("terrainDepth"),l=new e.DepthMode(a.LESS,e.DepthMode.ReadWrite,t.depthRangeFor3D);for(const t of o){const o=n.getTile(t),c=_r(t.projMatrix,0);r.setupElevationDraw(o,s),s.draw(i,a.TRIANGLES,l,e.StencilMode.disabled,e.ColorMode.unblended,e.CullFaceMode.backCCW,c,"terrain_depth",r.gridBuffer,r.gridIndexBuffer,r.gridNoSkirtSegments)}}(t,this,n,this.proxyCoords)}_setupProxiedCoordsForOrtho(e,t,r){if(e.getSource()instanceof Ie)return this._setupProxiedCoordsForImageSource(e,t,r);this._findCoveringTileCache[e.id]=this._findCoveringTileCache[e.id]||{};const n=this.proxiedCoords[e.id]=[],o=this.proxyCoords;for(let t=0;t(e.min.x=Math.min(e.min.x,t.x-s.x),e.min.y=Math.min(e.min.y,t.y-s.y),e.max.x=Math.max(e.max.x,t.x-s.x),e.max.y=Math.max(e.max.y,t.y-s.y),e)),{min:new e.Point(Number.MAX_VALUE,Number.MAX_VALUE),max:new e.Point(-Number.MAX_VALUE,-Number.MAX_VALUE)}),c=(t,r)=>{const n=t.wrap+t.canonical.x/(1<a+l.max.x||o+is+l.max.y};for(let e=0;ee.key===r.tileID.key));if(e)return e}if(r.tileID.key!==t.key){const n=t.canonical.z-r.tileID.canonical.z;let i,a,s;o=e.create();const l=r.tileID.wrap-t.wrap<0?(i=e.EXTENT>>n,a=i*((r.tileID.canonical.x<=o){const n=t.canonical.z-o;r.getSource().reparseOverscaled?(s=Math.max(t.canonical.z+2,r.transform.tileZoom),a=new e.OverscaledTileID(s,t.wrap,o,t.canonical.x>>n,t.canonical.y>>n)):0!==n&&(s=o,a=new e.OverscaledTileID(s,t.wrap,o,t.canonical.x>>n,t.canonical.y>>n))}a.key!==t.key&&(c.push(a.key),n=r.getTile(a))}const u=e=>{c.forEach((t=>{o[t]=e})),c.length=0};for(s-=1;s>=l&&(!n||!n.hasData());s--){n&&u(n.tileID.key);const e=a.calculateScaledKey(s);if(n=r.getTileByID(e),n&&n.hasData())break;const t=o[e];if(null===t)break;void 0===t?c.push(e):n=r.getTileByID(t)}return u(n?n.tileID.key:null),n&&n.hasData()?n:null}findDEMTileFor(e){return this.enabled?this._findTileCoveringTileID(e,this.sourceCache):null}prepareDrawTile(){this.renderedToTile=!0}_clearRenderCacheForTile(e,t){let r=this._tilesDirty[e];r||(r=this._tilesDirty[e]={}),r[t.key]=!0}getWirefameBuffer(){if(!this.wireframeSegments){const t=function(){let t=0;const r=new e.StructArrayLayout2ui4,n=131;for(let e=1;e<129;e++){for(let o=1;o<129;o++)t=e*n+o,r.emplaceBack(t,t+1),r.emplaceBack(t,t+n),r.emplaceBack(t+1,t+n),128===e&&r.emplaceBack(t+n,t+n+1);r.emplaceBack(t+1,t+1+n)}return r}();this.wireframeIndexBuffer=this.painter.context.createIndexBuffer(t),this.wireframeSegments=e.SegmentVector.simpleSegment(0,0,this.gridBuffer.length,t.length)}return[this.wireframeIndexBuffer,this.wireframeSegments]}}class Or{static cacheKey(e,t,r,n){let o=`${t}${n?n.cacheKey:""}`;for(const t of r)e.usedDefines.includes(t)&&(o+=`/${t}`);return o}constructor(t,r,n,o,i,a){const s=t.gl;this.program=s.createProgram();const l=function(e){const t=[];for(let r=0;r`#define ${e}`)));const f=t.isWebGL2?"#version 300 es\n":"",p=f+d.concat(t.extStandardDerivatives&&0===f.length?"#extension GL_OES_standard_derivatives : enable\n".concat(ur):ur,ur,cr,lr.fragmentSource,ar.fragmentSource,n.fragmentSource).join("\n"),h=f+d.concat("\n#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif",cr,lr.vertexSource,ar.vertexSource,ir.vertexSource,n.vertexSource).join("\n"),m=s.createShader(s.FRAGMENT_SHADER);if(s.isContextLost())return void(this.failedToCreate=!0);s.shaderSource(m,p),s.compileShader(m),s.attachShader(this.program,m);const g=s.createShader(s.VERTEX_SHADER);if(s.isContextLost())this.failedToCreate=!0;else{s.shaderSource(g,h),s.compileShader(g),s.attachShader(this.program,g),this.attributes={},this.numAttributes=u.length;for(let e=0;e({u_dem:new e.Uniform1i(t),u_dem_prev:new e.Uniform1i(t),u_dem_unpack:new e.Uniform4f(t),u_dem_tl:new e.Uniform2f(t),u_dem_scale:new e.Uniform1f(t),u_dem_tl_prev:new e.Uniform2f(t),u_dem_scale_prev:new e.Uniform1f(t),u_dem_size:new e.Uniform1f(t),u_dem_lerp:new e.Uniform1f(t),u_exaggeration:new e.Uniform1f(t),u_depth:new e.Uniform1i(t),u_depth_size_inv:new e.Uniform2f(t),u_meter_to_dem:new e.Uniform1f(t),u_label_plane_matrix_inv:new e.UniformMatrix4f(t)}))(t)),a.includes("GLOBE")&&(this.globeUniforms=(t=>({u_tile_tl_up:new e.Uniform3f(t),u_tile_tr_up:new e.Uniform3f(t),u_tile_br_up:new e.Uniform3f(t),u_tile_bl_up:new e.Uniform3f(t),u_tile_up_scale:new e.Uniform1f(t)}))(t)),a.includes("FOG")&&(this.fogUniforms=(t=>({u_fog_matrix:new e.UniformMatrix4f(t),u_fog_range:new e.Uniform2f(t),u_fog_color:new e.Uniform4f(t),u_fog_horizon_blend:new e.Uniform1f(t),u_fog_temporal_offset:new e.Uniform1f(t),u_frustum_tl:new e.Uniform3f(t),u_frustum_tr:new e.Uniform3f(t),u_frustum_br:new e.Uniform3f(t),u_frustum_bl:new e.Uniform3f(t),u_globe_pos:new e.Uniform3f(t),u_globe_radius:new e.Uniform1f(t),u_globe_transition:new e.Uniform1f(t),u_is_globe:new e.Uniform1i(t),u_viewport:new e.Uniform2f(t)}))(t))}}setTerrainUniformValues(e,t){if(!this.terrainUniforms)return;const r=this.terrainUniforms;if(!this.failedToCreate){e.program.set(this.program);for(const e in t)r[e]&&r[e].set(this.program,e,t[e])}}setGlobeUniformValues(e,t){if(!this.globeUniforms)return;const r=this.globeUniforms;if(!this.failedToCreate){e.program.set(this.program);for(const e in t)r[e]&&r[e].set(this.program,e,t[e])}}setFogUniformValues(e,t){if(!this.fogUniforms)return;const r=this.fogUniforms;if(!this.failedToCreate){e.program.set(this.program);for(const e in t)r[e].set(this.program,e,t[e])}}draw(e,t,r,n,o,i,a,s,l,c,u,d,f,p,h){const m=e.gl;if(this.failedToCreate)return;e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(n),e.setColorMode(o),e.setCullFace(i);for(const e of Object.keys(this.fixedUniforms))this.fixedUniforms[e].set(this.program,e,a[e]);p&&p.setUniforms(this.program,e,this.binderUniforms,d,{zoom:f});const g={[m.LINES]:2,[m.TRIANGLES]:3,[m.LINE_STRIP]:1}[t];for(const r of u.get()){const n=r.vaos||(r.vaos={});(n[s]||(n[s]=new hr)).bind(e,this,l,p?p.getPaintVertexBuffers():[],c,r.vertexOffset,h||[]),m.drawElements(t,r.primitiveLength*g,m.UNSIGNED_SHORT,r.primitiveOffset*g*2)}}}function Lr(e,t){const r=Math.pow(2,t.tileID.overscaledZ),n=t.tileSize*Math.pow(2,e.transform.tileZoom)/r,o=n*(t.tileID.canonical.x+t.tileID.wrap*r),i=n*t.tileID.canonical.y;return{u_image:0,u_texsize:t.imageAtlasTexture.size,u_tile_units_to_pixels:1/M(t,1,e.transform.tileZoom),u_pixel_coord_upper:[o>>16,i>>16],u_pixel_coord_lower:[65535&o,65535&i]}}const Dr=e.create(),Nr=(t,r,n,o,i,a,s,l,c,u,d)=>{const f=r.style.light,p=f.properties.get("position"),h=[p.x,p.y,p.z],m=e.create$1();"viewport"===f.properties.get("anchor")&&(e.fromRotation(m,-r.transform.angle),e.transformMat3(h,h,m));const g=f.properties.get("color"),y=r.transform,v={u_matrix:t,u_lightpos:h,u_lightintensity:f.properties.get("intensity"),u_lightcolor:[g.r,g.g,g.b],u_vertical_gradient:+n,u_opacity:o,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:Dr,u_merc_center:[0,0],u_up_dir:[0,0,0],u_height_lift:0,u_ao:i,u_edge_radius:a};return"globe"===y.projection.name&&(v.u_tile_id=[s.canonical.x,s.canonical.y,1<{const p=Nr(t,r,n,o,i,a,s,c,u,d,f),h={u_height_factor:-Math.pow(2,s.overscaledZ)/l.tileSize/8};return e.extend(p,Lr(r,l),h)},zr=e=>({u_matrix:e}),Br=(t,r,n)=>e.extend(zr(t),Lr(r,n)),jr=(e,t)=>({u_matrix:e,u_world:t}),Ur=(t,r,n,o)=>e.extend(Br(t,r,n),{u_world:o}),$r=e.create(),Vr=(t,r,n,o,i,a)=>{const s=t.transform,l="globe"===s.projection.name;let c;if("map"===a.paint.get("circle-pitch-alignment"))if(l){const t=e.globePixelsToTileUnits(s.zoom,r.canonical)*s._pixelsPerMercatorPixel;c=Float32Array.from([t,0,0,t])}else c=s.calculatePixelsToTileUnitsMatrix(n);else c=new Float32Array([s.pixelsToGLUnits[0],0,0,s.pixelsToGLUnits[1]]);const u={u_camera_to_center_distance:s.cameraToCenterDistance,u_matrix:t.translatePosMatrix(r.projMatrix,n,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_device_pixel_ratio:e.exported.devicePixelRatio,u_extrude_scale:c,u_inv_rot_matrix:$r,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(l){u.u_inv_rot_matrix=o,u.u_merc_center=i,u.u_tile_id=[r.canonical.x,r.canonical.y,1<{const t=[];return"map"===e.paint.get("circle-pitch-alignment")&&t.push("PITCH_WITH_MAP"),"map"===e.paint.get("circle-pitch-scale")&&t.push("SCALE_WITH_MAP"),t},Hr=(t,r,n,o)=>{const i=e.EXTENT/n.tileSize;return{u_matrix:t,u_camera_to_center_distance:r.getCameraToCenterDistance(o),u_extrude_scale:[r.pixelsToGLUnits[0]/i,r.pixelsToGLUnits[1]/i]}},Wr=(e,t,r=1)=>({u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:r}),qr=e.create(),Xr=(t,r,n,o,i,a,s)=>{const l=t.transform,c="globe"===l.projection.name,u=c?e.globePixelsToTileUnits(l.zoom,r.canonical)*l._pixelsPerMercatorPixel:M(n,1,a),d={u_matrix:r.projMatrix,u_extrude_scale:u,u_intensity:s,u_inv_rot_matrix:qr,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(c){d.u_inv_rot_matrix=o,d.u_merc_center=i,d.u_tile_id=[r.canonical.x,r.canonical.y,1<{const s=e.transform,l=s.calculatePixelsToTileUnitsMatrix(t);return{u_matrix:Jr(e,t,r,n),u_pixels_to_tile_units:l,u_device_pixel_ratio:i,u_units_to_pixels:[1/s.pixelsToGLUnits[0],1/s.pixelsToGLUnits[1]],u_dash_image:0,u_gradient_image:1,u_image_height:o,u_texsize:Qr(r)?t.lineAtlasTexture.size:[0,0],u_tile_units_to_pixels:Kr(t,e.transform),u_alpha_discard_threshold:0,u_trim_offset:a}},Yr=(e,t,r,n,o)=>{const i=e.transform;return{u_matrix:Jr(e,t,r,n),u_texsize:t.imageAtlasTexture.size,u_pixels_to_tile_units:i.calculatePixelsToTileUnitsMatrix(t),u_device_pixel_ratio:o,u_image:0,u_tile_units_to_pixels:Kr(t,i),u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]],u_alpha_discard_threshold:0}};function Kr(e,t){return 1/M(e,1,t.tileZoom)}function Jr(e,t,r,n){return e.translatePosMatrix(n||t.tileID.projMatrix,t,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}function Qr(e){const t=e.paint.get("line-dasharray").value;return t.value||"constant"!==t.kind}const en=(e,t,r,n,o,i)=>{return{u_matrix:e,u_tl_parent:t,u_scale_parent:r,u_fade_t:n.mix,u_opacity:n.opacity*o.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:o.paint.get("raster-brightness-min"),u_brightness_high:o.paint.get("raster-brightness-max"),u_saturation_factor:(s=o.paint.get("raster-saturation"),s>0?1-1/(1.001-s):-s),u_contrast_factor:(a=o.paint.get("raster-contrast"),a>0?1/(1-a):1+a),u_spin_weights:tn(o.paint.get("raster-hue-rotate")),u_perspective_transform:i};var a,s};function tn(e){e*=Math.PI/180;const t=Math.sin(e),r=Math.cos(e);return[(2*r+1)/3,(-Math.sqrt(3)*t-r+1)/3,(Math.sqrt(3)*t-r+1)/3]}const rn=e.create(),nn=(t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g)=>{const y=i.transform,v={u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:r?r.uSizeT:0,u_size:r?r.uSize:0,u_camera_to_center_distance:y.cameraToCenterDistance,u_rotate_symbol:+n,u_aspect_ratio:y.width/y.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+c,u_pitch_with_map:+o,u_texsize:u,u_texture:0,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:rn,u_merc_center:[0,0],u_camera_forward:[0,0,0],u_ecef_origin:[0,0,0],u_tile_matrix:rn,u_up_vector:[0,-1,0]};return"globe"===g.name&&(v.u_tile_id=[d.canonical.x,d.canonical.y,1<e.extend(nn(t,r,n,o,i,a,s,l,c,u,f,p,h,m,g,y),{u_gamma_scale:o?i.transform.cameraToCenterDistance*Math.cos(i.terrain?0:i.transform._pitch):1,u_device_pixel_ratio:e.exported.devicePixelRatio,u_is_halo:+d}),an=(t,r,n,o,i,a,s,l,c,u,d,f,p,h,m,g)=>e.extend(on(t,r,n,o,i,a,s,l,!0,c,!0,d,f,p,h,m,g),{u_texsize_icon:u,u_texture_icon:1}),sn=(e,t,r)=>({u_matrix:e,u_opacity:t,u_color:r}),ln=(t,r,n,o,i)=>e.extend(function(e,t,r){const n=t.imageManager.getPattern(e.toString()),{width:o,height:i}=t.imageManager.getPixelSize(),a=Math.pow(2,r.tileID.overscaledZ),s=r.tileSize*Math.pow(2,t.transform.tileZoom)/a,l=s*(r.tileID.canonical.x+r.tileID.wrap*a),c=s*r.tileID.canonical.y;return{u_image:0,u_pattern_tl:n.tl,u_pattern_br:n.br,u_texsize:[o,i],u_pattern_size:n.displaySize,u_tile_units_to_pixels:1/M(r,1,t.transform.tileZoom),u_pixel_coord_upper:[l>>16,c>>16],u_pixel_coord_lower:[65535&l,65535&c]}}(o,n,i),{u_matrix:t,u_opacity:r}),cn={fillExtrusion:t=>({u_matrix:new e.UniformMatrix4f(t),u_lightpos:new e.Uniform3f(t),u_lightintensity:new e.Uniform1f(t),u_lightcolor:new e.Uniform3f(t),u_vertical_gradient:new e.Uniform1f(t),u_opacity:new e.Uniform1f(t),u_edge_radius:new e.Uniform1f(t),u_ao:new e.Uniform2f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_up_dir:new e.Uniform3f(t),u_height_lift:new e.Uniform1f(t)}),fillExtrusionPattern:t=>({u_matrix:new e.UniformMatrix4f(t),u_lightpos:new e.Uniform3f(t),u_lightintensity:new e.Uniform1f(t),u_lightcolor:new e.Uniform3f(t),u_vertical_gradient:new e.Uniform1f(t),u_height_factor:new e.Uniform1f(t),u_edge_radius:new e.Uniform1f(t),u_ao:new e.Uniform2f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_up_dir:new e.Uniform3f(t),u_height_lift:new e.Uniform1f(t),u_image:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_pixel_coord_upper:new e.Uniform2f(t),u_pixel_coord_lower:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t),u_opacity:new e.Uniform1f(t)}),fill:t=>({u_matrix:new e.UniformMatrix4f(t)}),fillPattern:t=>({u_matrix:new e.UniformMatrix4f(t),u_image:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_pixel_coord_upper:new e.Uniform2f(t),u_pixel_coord_lower:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t)}),fillOutline:t=>({u_matrix:new e.UniformMatrix4f(t),u_world:new e.Uniform2f(t)}),fillOutlinePattern:t=>({u_matrix:new e.UniformMatrix4f(t),u_world:new e.Uniform2f(t),u_image:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_pixel_coord_upper:new e.Uniform2f(t),u_pixel_coord_lower:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t)}),circle:t=>({u_camera_to_center_distance:new e.Uniform1f(t),u_extrude_scale:new e.UniformMatrix2f(t),u_device_pixel_ratio:new e.Uniform1f(t),u_matrix:new e.UniformMatrix4f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_up_dir:new e.Uniform3f(t)}),collisionBox:t=>({u_matrix:new e.UniformMatrix4f(t),u_camera_to_center_distance:new e.Uniform1f(t),u_extrude_scale:new e.Uniform2f(t)}),collisionCircle:t=>({u_matrix:new e.UniformMatrix4f(t),u_inv_matrix:new e.UniformMatrix4f(t),u_camera_to_center_distance:new e.Uniform1f(t),u_viewport_size:new e.Uniform2f(t)}),debug:t=>({u_color:new e.UniformColor(t),u_matrix:new e.UniformMatrix4f(t),u_overlay:new e.Uniform1i(t),u_overlay_scale:new e.Uniform1f(t)}),clippingMask:t=>({u_matrix:new e.UniformMatrix4f(t)}),heatmap:t=>({u_extrude_scale:new e.Uniform1f(t),u_intensity:new e.Uniform1f(t),u_matrix:new e.UniformMatrix4f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_up_dir:new e.Uniform3f(t)}),heatmapTexture:t=>({u_image:new e.Uniform1i(t),u_color_ramp:new e.Uniform1i(t),u_opacity:new e.Uniform1f(t)}),hillshade:t=>({u_matrix:new e.UniformMatrix4f(t),u_image:new e.Uniform1i(t),u_latrange:new e.Uniform2f(t),u_light:new e.Uniform2f(t),u_shadow:new e.UniformColor(t),u_highlight:new e.UniformColor(t),u_accent:new e.UniformColor(t)}),hillshadePrepare:t=>({u_matrix:new e.UniformMatrix4f(t),u_image:new e.Uniform1i(t),u_dimension:new e.Uniform2f(t),u_zoom:new e.Uniform1f(t),u_unpack:new e.Uniform4f(t)}),line:t=>({u_matrix:new e.UniformMatrix4f(t),u_pixels_to_tile_units:new e.UniformMatrix2f(t),u_device_pixel_ratio:new e.Uniform1f(t),u_units_to_pixels:new e.Uniform2f(t),u_dash_image:new e.Uniform1i(t),u_gradient_image:new e.Uniform1i(t),u_image_height:new e.Uniform1f(t),u_texsize:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t),u_alpha_discard_threshold:new e.Uniform1f(t),u_trim_offset:new e.Uniform2f(t)}),linePattern:t=>({u_matrix:new e.UniformMatrix4f(t),u_texsize:new e.Uniform2f(t),u_pixels_to_tile_units:new e.UniformMatrix2f(t),u_device_pixel_ratio:new e.Uniform1f(t),u_image:new e.Uniform1i(t),u_units_to_pixels:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t),u_alpha_discard_threshold:new e.Uniform1f(t)}),raster:t=>({u_matrix:new e.UniformMatrix4f(t),u_tl_parent:new e.Uniform2f(t),u_scale_parent:new e.Uniform1f(t),u_fade_t:new e.Uniform1f(t),u_opacity:new e.Uniform1f(t),u_image0:new e.Uniform1i(t),u_image1:new e.Uniform1i(t),u_brightness_low:new e.Uniform1f(t),u_brightness_high:new e.Uniform1f(t),u_saturation_factor:new e.Uniform1f(t),u_contrast_factor:new e.Uniform1f(t),u_spin_weights:new e.Uniform3f(t),u_perspective_transform:new e.Uniform2f(t)}),symbolIcon:t=>({u_is_size_zoom_constant:new e.Uniform1i(t),u_is_size_feature_constant:new e.Uniform1i(t),u_size_t:new e.Uniform1f(t),u_size:new e.Uniform1f(t),u_camera_to_center_distance:new e.Uniform1f(t),u_rotate_symbol:new e.Uniform1i(t),u_aspect_ratio:new e.Uniform1f(t),u_fade_change:new e.Uniform1f(t),u_matrix:new e.UniformMatrix4f(t),u_label_plane_matrix:new e.UniformMatrix4f(t),u_coord_matrix:new e.UniformMatrix4f(t),u_is_text:new e.Uniform1i(t),u_pitch_with_map:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_camera_forward:new e.Uniform3f(t),u_tile_matrix:new e.UniformMatrix4f(t),u_up_vector:new e.Uniform3f(t),u_ecef_origin:new e.Uniform3f(t),u_texture:new e.Uniform1i(t)}),symbolSDF:t=>({u_is_size_zoom_constant:new e.Uniform1i(t),u_is_size_feature_constant:new e.Uniform1i(t),u_size_t:new e.Uniform1f(t),u_size:new e.Uniform1f(t),u_camera_to_center_distance:new e.Uniform1f(t),u_rotate_symbol:new e.Uniform1i(t),u_aspect_ratio:new e.Uniform1f(t),u_fade_change:new e.Uniform1f(t),u_matrix:new e.UniformMatrix4f(t),u_label_plane_matrix:new e.UniformMatrix4f(t),u_coord_matrix:new e.UniformMatrix4f(t),u_is_text:new e.Uniform1i(t),u_pitch_with_map:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_texture:new e.Uniform1i(t),u_gamma_scale:new e.Uniform1f(t),u_device_pixel_ratio:new e.Uniform1f(t),u_tile_id:new e.Uniform3f(t),u_zoom_transition:new e.Uniform1f(t),u_inv_rot_matrix:new e.UniformMatrix4f(t),u_merc_center:new e.Uniform2f(t),u_camera_forward:new e.Uniform3f(t),u_tile_matrix:new e.UniformMatrix4f(t),u_up_vector:new e.Uniform3f(t),u_ecef_origin:new e.Uniform3f(t),u_is_halo:new e.Uniform1i(t)}),symbolTextAndIcon:t=>({u_is_size_zoom_constant:new e.Uniform1i(t),u_is_size_feature_constant:new e.Uniform1i(t),u_size_t:new e.Uniform1f(t),u_size:new e.Uniform1f(t),u_camera_to_center_distance:new e.Uniform1f(t),u_rotate_symbol:new e.Uniform1i(t),u_aspect_ratio:new e.Uniform1f(t),u_fade_change:new e.Uniform1f(t),u_matrix:new e.UniformMatrix4f(t),u_label_plane_matrix:new e.UniformMatrix4f(t),u_coord_matrix:new e.UniformMatrix4f(t),u_is_text:new e.Uniform1i(t),u_pitch_with_map:new e.Uniform1i(t),u_texsize:new e.Uniform2f(t),u_texsize_icon:new e.Uniform2f(t),u_texture:new e.Uniform1i(t),u_texture_icon:new e.Uniform1i(t),u_gamma_scale:new e.Uniform1f(t),u_device_pixel_ratio:new e.Uniform1f(t),u_is_halo:new e.Uniform1i(t)}),background:t=>({u_matrix:new e.UniformMatrix4f(t),u_opacity:new e.Uniform1f(t),u_color:new e.UniformColor(t)}),backgroundPattern:t=>({u_matrix:new e.UniformMatrix4f(t),u_opacity:new e.Uniform1f(t),u_image:new e.Uniform1i(t),u_pattern_tl:new e.Uniform2f(t),u_pattern_br:new e.Uniform2f(t),u_texsize:new e.Uniform2f(t),u_pattern_size:new e.Uniform2f(t),u_pixel_coord_upper:new e.Uniform2f(t),u_pixel_coord_lower:new e.Uniform2f(t),u_tile_units_to_pixels:new e.Uniform1f(t)}),terrainRaster:br,terrainDepth:br,skybox:t=>({u_matrix:new e.UniformMatrix4f(t),u_sun_direction:new e.Uniform3f(t),u_cubemap:new e.Uniform1i(t),u_opacity:new e.Uniform1f(t),u_temporal_offset:new e.Uniform1f(t)}),skyboxGradient:t=>({u_matrix:new e.UniformMatrix4f(t),u_color_ramp:new e.Uniform1i(t),u_center_direction:new e.Uniform3f(t),u_radius:new e.Uniform1f(t),u_opacity:new e.Uniform1f(t),u_temporal_offset:new e.Uniform1f(t)}),skyboxCapture:t=>({u_matrix_3f:new e.UniformMatrix3f(t),u_sun_direction:new e.Uniform3f(t),u_sun_intensity:new e.Uniform1f(t),u_color_tint_r:new e.Uniform4f(t),u_color_tint_m:new e.Uniform4f(t),u_luminance:new e.Uniform1f(t)}),globeRaster:t=>({u_proj_matrix:new e.UniformMatrix4f(t),u_globe_matrix:new e.UniformMatrix4f(t),u_normalize_matrix:new e.UniformMatrix4f(t),u_merc_matrix:new e.UniformMatrix4f(t),u_zoom_transition:new e.Uniform1f(t),u_merc_center:new e.Uniform2f(t),u_image0:new e.Uniform1i(t),u_grid_matrix:new e.UniformMatrix3f(t),u_skirt_height:new e.Uniform1f(t),u_frustum_tl:new e.Uniform3f(t),u_frustum_tr:new e.Uniform3f(t),u_frustum_br:new e.Uniform3f(t),u_frustum_bl:new e.Uniform3f(t),u_globe_pos:new e.Uniform3f(t),u_globe_radius:new e.Uniform1f(t),u_viewport:new e.Uniform2f(t)}),globeAtmosphere:t=>({u_frustum_tl:new e.Uniform3f(t),u_frustum_tr:new e.Uniform3f(t),u_frustum_br:new e.Uniform3f(t),u_frustum_bl:new e.Uniform3f(t),u_horizon:new e.Uniform1f(t),u_transition:new e.Uniform1f(t),u_fadeout_range:new e.Uniform1f(t),u_color:new e.Uniform4f(t),u_high_color:new e.Uniform4f(t),u_space_color:new e.Uniform4f(t),u_star_intensity:new e.Uniform1f(t),u_star_density:new e.Uniform1f(t),u_star_size:new e.Uniform1f(t),u_temporal_offset:new e.Uniform1f(t),u_horizon_angle:new e.Uniform1f(t),u_rotation_matrix:new e.UniformMatrix4f(t)})};let un;function dn(t,r,n,o,i,a,s){const l=t.context,c=l.gl,u=t.transform,d=t.useProgram("collisionBox"),f=[];let p=0,h=0;for(let m=0;m0){const t=e.create(),r=_;e.mul(t,v.placementInvProjMatrix,u.glCoordMatrix),e.mul(t,t,v.placementViewportMatrix),f.push({circleArray:w,circleOffset:h,transform:r,invTransform:t,projection:v.getProjection()}),p+=w.length/4,h=p}x&&(t.terrain&&t.terrain.setupElevationDraw(y,d),d.draw(l,c.LINES,e.DepthMode.disabled,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.disabled,Hr(_,u,y,v.getProjection()),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,u.zoom,null,[x.collisionVertexBuffer,x.collisionVertexBufferExt]))}if(!s||!f.length)return;const m=t.useProgram("collisionCircle"),g=new e.StructArrayLayout2f1f2i16;g.resize(4*p),g._trim();let y=0;for(const e of f)for(let t=0;t=0&&(m[_.associatedIconIndex]={x:C,y:E,z:T,angle:P})}else mt(A,p)}if(d){h.clear();const r=t.icon.placedSymbolArray;for(let t=0;te.sortKey-t.sortKey));for(const e of E){const r=e.state;if(t.terrain&&t.terrain.setupElevationDraw(r.tile,r.program,{useDepthForOcclusion:!C,labelPlaneMatrixInv:r.labelPlaneMatrixInv}),p.activeTexture.set(h.TEXTURE0),r.atlasTexture.bind(r.atlasInterpolation,h.CLAMP_TO_EDGE),r.atlasTextureIcon&&(p.activeTexture.set(h.TEXTURE1),r.atlasTextureIcon&&r.atlasTextureIcon.bind(r.atlasInterpolationIcon,h.CLAMP_TO_EDGE)),r.isSDF){const o=r.uniformValues;r.hasHalo&&(o.u_is_halo=1,yn(r.buffers,e.segments,n,t,r.program,w,d,f,o)),o.u_is_halo=0}yn(r.buffers,e.segments,n,t,r.program,w,d,f,r.uniformValues)}}function yn(t,r,n,o,i,a,s,l,c){const u=o.context,d=[t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer,t.globeExtVertexBuffer];i.draw(u,u.gl.TRIANGLES,a,s,l,e.CullFaceMode.disabled,c,n.id,t.layoutVertexBuffer,t.indexBuffer,r,n.paint,o.transform.zoom,t.programConfigurations.get(n.id),d)}function vn(t,r,n,o,i,a,s){const l=t.context.gl,c=n.paint.get("fill-pattern"),u=c&&c.constantOr(1);let d,f,p,h,m;s?(f=u&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",d=l.LINES):(f=u?"fillPattern":"fill",d=l.TRIANGLES);for(const g of o){const o=r.getTile(g);if(u&&!o.patternsLoaded())continue;const y=o.getBucket(n);if(!y)continue;t.prepareDrawTile();const v=y.programConfigurations.get(n.id),b=t.useProgram(f,v);u&&(t.context.activeTexture.set(l.TEXTURE0),o.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),v.updatePaintBuffers());const _=c.constantOr(null);if(_&&o.imageAtlas){const e=o.imageAtlas.patternPositions[_.toString()];e&&v.setConstantPatternPositions(e)}const x=t.translatePosMatrix(g.projMatrix,o,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(s){h=y.indexBuffer2,m=y.segments2;const e=t.terrain&&t.terrain.renderingToTexture?t.terrain.drapeBufferSize:[l.drawingBufferWidth,l.drawingBufferHeight];p="fillOutlinePattern"===f&&u?Ur(x,t,o,e):jr(x,e)}else h=y.indexBuffer,m=y.segments,p=u?Br(x,t,o):zr(x);t.prepareDrawProgram(t.context,b,g.toUnwrapped()),b.draw(t.context,d,i,t.stencilModeForClipping(g),a,e.CullFaceMode.disabled,p,n.id,y.layoutVertexBuffer,h,m,n.paint,t.transform.zoom,v)}}function bn(t,r,n,o,i,a,s){const l=t.context,c=l.gl,u=t.transform,d=n.paint.get("fill-extrusion-pattern"),f=d.constantOr(1),p=n.paint.get("fill-extrusion-opacity"),h=[n.paint.get("fill-extrusion-ambient-occlusion-intensity"),n.paint.get("fill-extrusion-ambient-occlusion-radius")],m=n.layout.get("fill-extrusion-edge-radius"),g=m>0&&!n.paint.get("fill-extrusion-rounded-roof"),y=g?0:m,v="globe"===u.projection.name?e.fillExtrusionHeightLift():0,b="globe"===u.projection.name,_=b?e.globeToMercatorTransition(u.zoom):0,x=[e.mercatorXfromLng(u.center.lng),e.mercatorYfromLat(u.center.lat)],w=[];b&&w.push("PROJECTION_GLOBE_VIEW"),h[0]>0&&w.push("FAUX_AO"),g&&w.push("ZERO_ROOF_RADIUS");for(const m of o){const o=r.getTile(m),g=o.getBucket(n);if(!g||g.projection.name!==u.projection.name)continue;const A=g.programConfigurations.get(n.id),S=t.useProgram(f?"fillExtrusionPattern":"fillExtrusion",A,w);if(t.terrain){const e=t.terrain;if(t.style.terrainSetForDrapingOnly())e.setupElevationDraw(o,S,{useMeterToDem:!0});else{if(!g.enableTerrain)continue;if(e.setupElevationDraw(o,S,{useMeterToDem:!0}),_n(l,r,m,g,n,e),!g.centroidVertexBuffer){const e=S.attributes.a_centroid_pos;void 0!==e&&c.vertexAttrib2f(e,0,0)}}}f&&(t.context.activeTexture.set(c.TEXTURE0),o.imageAtlasTexture.bind(c.LINEAR,c.CLAMP_TO_EDGE),A.updatePaintBuffers());const C=d.constantOr(null);if(C&&o.imageAtlas){const e=o.imageAtlas.patternPositions[C.toString()];e&&A.setConstantPatternPositions(e)}const E=t.translatePosMatrix(m.projMatrix,o,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),T=u.projection.createInversionMatrix(u,m.canonical),I=n.paint.get("fill-extrusion-vertical-gradient"),k=f?Fr(E,t,I,p,h,y,m,o,v,_,x,T):Nr(E,t,I,p,h,y,m,v,_,x,T);t.prepareDrawProgram(l,S,m.toUnwrapped());const M=[];t.terrain&&M.push(g.centroidVertexBuffer),b&&M.push(g.layoutVertexExtBuffer),S.draw(l,l.gl.TRIANGLES,i,a,s,e.CullFaceMode.backCCW,k,n.id,g.layoutVertexBuffer,g.indexBuffer,g.segments,n.paint,t.transform.zoom,A,M)}}function _n(t,r,n,o,i,a){const s=[t=>{let r=t.canonical.x-1,n=t.wrap;return r<0&&(r=(1<{let r=t.canonical.x+1,n=t.wrap;return r===1<new e.OverscaledTileID(t.overscaledZ,t.wrap,t.canonical.z,t.canonical.x,(0===t.canonical.y?1<new e.OverscaledTileID(t.overscaledZ,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y===(1<{const t=r.getSource().minzoom,n=e=>{const t=r.getTileByID(e);if(t&&t.hasData())return t.getBucket(i)},o=[0,-1,1];for(const r of o){if(e.overscaledZ+r(c[0]=Math.min(t.min.y,r.min.y),c[1]=Math.max(t.max.y,r.max.y),c[2]=e.EXTENT-r.min.x>t.max.x?r.min.x-e.EXTENT:t.max.x,c),d=(t,r)=>(c[0]=Math.min(t.min.x,r.min.x),c[1]=Math.max(t.max.x,r.max.x),c[2]=e.EXTENT-r.min.y>t.max.y?r.min.y-e.EXTENT:t.max.y,c),f=[(e,t)=>u(e,t),(e,t)=>u(t,e),(e,t)=>d(e,t),(e,t)=>d(t,e)],p=new e.Point(0,0);let h,m,g;const y=(t,r,o,i,s)=>{const l=[[i?o:t,i?t:o,0],[i?o:r,i?r:o,0]],c=s<0?e.EXTENT+s:s,u=[i?c:(t+r)/2,i?(t+r)/2:c,0];return 0===o&&s<0||0!==o&&s>0?a.getForTilePoints(g,[u],!0,m):l.push(u),a.getForTilePoints(n,l,!0,h),Math.max(l[0][2],l[1][2],u[2])/a.exaggeration()};for(let t=0;t<4;t++){const r=(t<2?1:5)-t,i=o.borders[t];if(0===i.length)continue;const c=g=s[t](n),u=l(c);if(!(u&&u instanceof e.FillExtrusionBucket&&u.enableTerrain))continue;if(o.borderDoneWithNeighborZ[t]===u.canonical.z&&u.borderDoneWithNeighborZ[r]===o.canonical.z)continue;if(m=a.findDEMTileFor(c),!m||!m.dem)continue;if(!h){const e=a.findDEMTileFor(n);if(!e||!e.dem)return;h=e}const d=u.borders[r];let v=0;const b=u.borderDoneWithNeighborZ[r]!==o.canonical.z;if(o.canonical.z===u.canonical.z){for(let n=0;ns[0]+3));)b&&u.encodeCentroid(void 0,l,!1),v++;if(l&&vs[1]-3)&&(i++,++v!==d.length);)l=u.featuresOnBorder[d[v]];if(l=u.featuresOnBorder[d[n]],a.intersectsCount()>1||l.intersectsCount()>1||1!==i){1!==i&&(v=n),o.encodeCentroid(void 0,a,!1),b&&u.encodeCentroid(void 0,l,!1);continue}const c=f[t](a,l),h=t%2?e.EXTENT-1:0;p.x=y(c[0],Math.min(e.EXTENT-1,c[1]),h,t<2,c[2]),p.y=0,o.encodeCentroid(p,a,!1),b&&u.encodeCentroid(p,l,!1)}else o.encodeCentroid(void 0,a,!1)}o.borderDoneWithNeighborZ[t]=u.canonical.z,o.needsCentroidUpdate=!0,b&&(u.borderDoneWithNeighborZ[r]=o.canonical.z,u.needsCentroidUpdate=!0)}else{for(const e of i)o.encodeCentroid(void 0,o.featuresOnBorder[e],!1);if(b){for(const e of d)u.encodeCentroid(void 0,u.featuresOnBorder[e],!1);u.borderDoneWithNeighborZ[r]=o.canonical.z,u.needsCentroidUpdate=!0}o.borderDoneWithNeighborZ[t]=u.canonical.z,o.needsCentroidUpdate=!0}}(o.needsCentroidUpdate||!o.centroidVertexBuffer&&0!==o.centroidVertexArray.length)&&o.uploadCentroid(t)}const xn=new e.Color(1,0,0,1),wn=new e.Color(0,1,0,1),An=new e.Color(0,0,1,1),Sn=new e.Color(1,0,1,1),Cn=new e.Color(0,1,1,1);function En(t,r,n){const o=t.context,i=t.transform,a=o.gl,s="globe"===i.projection.name,l=s?["PROJECTION_GLOBE_VIEW"]:null;let c=n.projMatrix;if(s&&e.globeToMercatorTransition(i.zoom)>0){const t=e.transitionTileAABBinECEF(n.canonical,i),r=e.globeDenormalizeECEF(t);c=e.multiply(new Float32Array(16),i.globeMatrix,r),e.multiply(c,i.projMatrix,c)}const u=t.useProgram("debug",null,l),d=r.getTileByID(n.key);t.terrain&&t.terrain.setupElevationDraw(d,u);const f=e.DepthMode.disabled,p=e.StencilMode.disabled,h=t.colorModeForRenderPass(),m="$debug";o.activeTexture.set(a.TEXTURE0),t.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s?d._makeGlobeTileDebugBuffers(t.context,i):d._makeDebugTileBoundsBuffers(t.context,i.projection);const g=d._tileDebugBuffer||t.debugBuffer,y=d._tileDebugIndexBuffer||t.debugIndexBuffer,v=d._tileDebugSegments||t.debugSegments;u.draw(o,a.LINE_STRIP,f,p,h,e.CullFaceMode.disabled,Wr(c,e.Color.red),m,g,y,v,null,null,null,[d._globeTileDebugBorderBuffer]);const b=d.latestRawTileData,_=Math.floor((b&&b.byteLength||0)/1024),x=r.getTile(n).tileSize,w=512/Math.min(x,512)*(n.overscaledZ/i.zoom)*.5;let A=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(A+=` => ${n.overscaledZ}`),A+=` ${_}kb`,function(e,t){e.initDebugOverlayCanvas();const r=e.debugOverlayCanvas,n=e.context.gl,o=e.debugOverlayCanvas.getContext("2d");o.clearRect(0,0,r.width,r.height),o.shadowColor="white",o.shadowBlur=2,o.lineWidth=1.5,o.strokeStyle="white",o.textBaseline="top",o.font="bold 36px Open Sans, sans-serif",o.fillText(t,5,5),o.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(t,A);const S=d._tileDebugTextBuffer||t.debugBuffer,C=d._tileDebugTextIndexBuffer||t.quadTriangleIndexBuffer,E=d._tileDebugTextSegments||t.debugSegments;u.draw(o,a.TRIANGLES,f,p,e.ColorMode.alphaBlended,e.CullFaceMode.disabled,Wr(c,e.Color.transparent,w),m,S,C,E,null,null,null,[d._globeTileDebugTextBuffer])}function Tn(e,t,r,n){kn(e,0,t+r/2,e.transform.width,r,n)}function In(e,t,r,n){kn(e,t-r/2,0,r,e.transform.height,n)}function kn(t,r,n,o,i,a){const s=t.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*e.exported.devicePixelRatio,n*e.exported.devicePixelRatio,o*e.exported.devicePixelRatio,i*e.exported.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}const Mn=e.createLayout([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:Rn}=Mn;function Pn(e,t,r,n){e.emplaceBack(t,r,n)}class On{constructor(t){this.vertexArray=new e.StructArrayLayout3f12,this.indices=new e.StructArrayLayout3ui6,Pn(this.vertexArray,-1,-1,1),Pn(this.vertexArray,1,-1,1),Pn(this.vertexArray,-1,1,1),Pn(this.vertexArray,1,1,1),Pn(this.vertexArray,-1,-1,-1),Pn(this.vertexArray,1,-1,-1),Pn(this.vertexArray,-1,1,-1),Pn(this.vertexArray,1,1,-1),this.indices.emplaceBack(5,1,3),this.indices.emplaceBack(3,7,5),this.indices.emplaceBack(6,2,0),this.indices.emplaceBack(0,4,6),this.indices.emplaceBack(2,6,7),this.indices.emplaceBack(7,3,2),this.indices.emplaceBack(5,4,0),this.indices.emplaceBack(0,1,5),this.indices.emplaceBack(0,2,3),this.indices.emplaceBack(3,1,0),this.indices.emplaceBack(7,6,4),this.indices.emplaceBack(4,5,7),this.vertexBuffer=t.createVertexBuffer(this.vertexArray,Rn),this.indexBuffer=t.createIndexBuffer(this.indices),this.segment=e.SegmentVector.simpleSegment(0,0,36,12)}}function Ln(t,r,n,o,i,a){const s=t.gl,l=r.paint.get("sky-atmosphere-color"),c=r.paint.get("sky-atmosphere-halo-color"),u=r.paint.get("sky-atmosphere-sun-intensity"),d=((e,t,r,n,o)=>({u_matrix_3f:e,u_sun_direction:t,u_sun_intensity:r,u_color_tint_r:[n.r,n.g,n.b,n.a],u_color_tint_m:[o.r,o.g,o.b,o.a],u_luminance:5e-5}))(e.fromMat4(e.create$1(),o),i,u,l,c);s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+a,r.skyboxTexture,0),n.draw(t,s.TRIANGLES,e.DepthMode.disabled,e.StencilMode.disabled,e.ColorMode.unblended,e.CullFaceMode.frontCW,d,"skyboxCapture",r.skyboxGeometry.vertexBuffer,r.skyboxGeometry.indexBuffer,r.skyboxGeometry.segment)}const Dn=e.createLayout([{type:"Float32",name:"a_pos",components:3},{type:"Float32",name:"a_uv",components:2}]);class Nn{constructor(t){const r=new e.StructArrayLayout5f20;r.emplaceBack(-1,1,1,0,0),r.emplaceBack(1,1,1,1,0),r.emplaceBack(1,-1,1,1,1),r.emplaceBack(-1,-1,1,0,1);const n=new e.StructArrayLayout3ui6;n.emplaceBack(0,1,2),n.emplaceBack(2,3,0),this.vertexBuffer=t.createVertexBuffer(r,Dn.members),this.indexBuffer=t.createIndexBuffer(n),this.segments=e.SegmentVector.simpleSegment(0,0,4,2)}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy()}}const Fn={symbol:function(t,r,n,o,i){if("translucent"!==t.renderPass)return;const a=e.StencilMode.disabled,s=t.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(t,r,n,o,i,a,s){const l=r.transform,c="map"===i,u="map"===a;for(const r of t){const t=o.getTile(r),i=t.getBucket(n);if(!i||!i.text||!i.text.segments.get().length)continue;const a=e.evaluateSizeForZoom(i.textSizeData,l.zoom),d=xt(r,i.getProjection(),l),f=l.calculatePixelsToTileUnitsMatrix(t),p=rt(d,t.tileID.canonical,u,c,l,i.getProjection(),f),h="none"!==n.layout.get("icon-text-fit")&&i.hasIconData();if(a){const n=Math.pow(2,l.zoom-t.tileID.overscaledZ);hn(i,c,u,s,e.symbolSize,l,p,r,n,a,h)}}}(o,t,n,r,n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),i),0!==n.paint.get("icon-opacity").constantOr(1)&&gn(t,r,n,o,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"),a,s),0!==n.paint.get("text-opacity").constantOr(1)&&gn(t,r,n,o,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"),a,s),r.map.showCollisionBoxes&&(dn(t,r,n,o,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),!0),dn(t,r,n,o,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),!1))},circle:function(t,r,n,o){if("translucent"!==t.renderPass)return;const i=n.paint.get("circle-opacity"),a=n.paint.get("circle-stroke-width"),s=n.paint.get("circle-stroke-opacity"),l=void 0!==n.layout.get("circle-sort-key").constantOr(1);if(0===i.constantOr(1)&&(0===a.constantOr(1)||0===s.constantOr(1)))return;const c=t.context,u=c.gl,d=t.transform,f=t.depthModeForSublayer(0,e.DepthMode.ReadOnly),p=e.StencilMode.disabled,h=t.colorModeForRenderPass(),m="globe"===d.projection.name,g=[e.mercatorXfromLng(d.center.lng),e.mercatorYfromLat(d.center.lat)],y=[];for(let i=0;ie.sortKey-t.sortKey));const v={useDepthForOcclusion:!m};for(const r of y){const{programConfiguration:o,program:i,layoutVertexBuffer:a,globeExtVertexBuffer:s,indexBuffer:l,uniformValues:m,tile:g}=r.state,y=r.segments;t.terrain&&t.terrain.setupElevationDraw(g,i,v),t.prepareDrawProgram(c,i,g.tileID.toUnwrapped()),i.draw(c,u.TRIANGLES,f,p,h,e.CullFaceMode.disabled,m,n.id,a,l,y,n.paint,d.zoom,o,[s])}},heatmap:function(t,r,n,o){if(0!==n.paint.get("heatmap-opacity"))if("offscreen"===t.renderPass){const i=t.context,a=i.gl,s=e.StencilMode.disabled,l=new e.ColorMode([a.ONE,a.ONE],e.Color.transparent,[!0,!0,!0,!0]);!function(e,t,r,n){const o=e.gl,i=t.width*n,a=t.height*n;e.activeTexture.set(o.TEXTURE1),e.viewport.set([0,0,i,a]);let s=r.heatmapFbo;if(!s||s&&(s.width!==i||s.height!==a)){s&&s.destroy();const t=o.createTexture();o.bindTexture(o.TEXTURE_2D,t),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),s=r.heatmapFbo=e.createFramebuffer(i,a,!1),function(e,t,r,n,o,i){const a=e.gl;a.texImage2D(a.TEXTURE_2D,0,e.isWebGL2&&e.extRenderToTextureHalfFloat?a.RGBA16F:a.RGBA,o,i,0,a.RGBA,e.extRenderToTextureHalfFloat?e.isWebGL2?a.HALF_FLOAT:e.extTextureHalfFloat.HALF_FLOAT_OES:a.UNSIGNED_BYTE,null),n.colorAttachment.set(r)}(e,0,t,s,i,a)}else o.bindTexture(o.TEXTURE_2D,s.colorAttachment.get()),e.bindFramebuffer.set(s.framebuffer)}(i,t,n,"globe"===t.transform.projection.name?.5:.25),i.clear({color:e.Color.transparent});const c=t.transform,u="globe"===c.projection.name,d=u?["PROJECTION_GLOBE_VIEW"]:null,f=u?e.CullFaceMode.frontCCW:e.CullFaceMode.disabled,p=[e.mercatorXfromLng(c.center.lng),e.mercatorYfromLat(c.center.lat)];for(let h=0;h({u_image:0,u_color_ramp:1,u_opacity:t.paint.get("heatmap-opacity")}))(0,r),r.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,r.paint,t.transform.zoom)}(t,n))},line:function(t,r,n,o){if("translucent"!==t.renderPass)return;const i=n.paint.get("line-opacity"),a=n.paint.get("line-width");if(0===i.constantOr(1)||0===a.constantOr(1))return;const s=t.depthModeForSublayer(0,e.DepthMode.ReadOnly),l=t.colorModeForRenderPass(),c=t.terrain&&t.terrain.renderingToTexture?1:e.exported.devicePixelRatio,u=n.paint.get("line-dasharray"),d=u.constantOr(1),f=n.layout.get("line-cap"),p=n.paint.get("line-pattern"),h=p.constantOr(1),m=n.paint.get("line-gradient"),g=h?"linePattern":"line",y=t.context,v=y.gl,b=(e=>{const t=[];Qr(e)&&t.push("RENDER_LINE_DASH"),e.paint.get("line-gradient")&&t.push("RENDER_LINE_GRADIENT");const r=e.paint.get("line-trim-offset");0===r[0]&&0===r[1]||t.push("RENDER_LINE_TRIM_OFFSET");const n=e.paint.get("line-pattern").constantOr(1),o=1!==e.paint.get("line-opacity").constantOr(1);return!n&&o&&t.push("RENDER_LINE_ALPHA_DISCARD"),t})(n);let _=b.includes("RENDER_LINE_ALPHA_DISCARD");t.terrain&&t.terrain.clipOrMaskOverlapStencilType()&&(_=!1);for(const i of o){const o=r.getTile(i);if(h&&!o.patternsLoaded())continue;const a=o.getBucket(n);if(!a)continue;t.prepareDrawTile();const x=a.programConfigurations.get(n.id),w=t.useProgram(g,x,b),A=p.constantOr(null);if(A&&o.imageAtlas){const e=o.imageAtlas.patternPositions[A.toString()];e&&x.setConstantPatternPositions(e)}const S=u.constantOr(null),C=f.constantOr(null);if(!h&&S&&C&&o.lineAtlas){const e=o.lineAtlas.getDash(S,C);e&&x.setConstantPatternPositions(e)}let[E,T]=n.paint.get("line-trim-offset");if("round"===C||"square"===C){const e=1;E!==T&&(0===E&&(E-=e),1===T&&(T+=e))}const I=t.terrain?i.projMatrix:null,k=h?Yr(t,o,n,I,c):Zr(t,o,n,I,a.lineClipsArray.length,c,[E,T]);if(m){const o=a.gradients[n.id];let s=o.texture;if(n.gradientVersion!==o.version){let l=256;if(n.stepInterpolant){const n=r.getSource().maxzoom,o=i.canonical.z===n?Math.ceil(1<{w.draw(y,v.TRIANGLES,s,r,l,e.CullFaceMode.disabled,k,n.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,n.paint,t.transform.zoom,x,[a.layoutVertexBuffer2])};if(_){const r=t.stencilModeForClipping(i).ref;0===r&&t.terrain&&y.clear({stencil:0});const n={func:v.EQUAL,mask:255};k.u_alpha_discard_threshold=.8,M(new e.StencilMode(n,r,255,v.KEEP,v.KEEP,v.INVERT)),k.u_alpha_discard_threshold=0,M(new e.StencilMode(n,r,255,v.KEEP,v.KEEP,v.KEEP))}else M(t.stencilModeForClipping(i))}_&&(t.resetStencilClippingMasks(),t.terrain&&y.clear({stencil:0}))},fill:function(t,r,n,o){const i=n.paint.get("fill-color"),a=n.paint.get("fill-opacity");if(0===a.constantOr(1))return;const s=t.colorModeForRenderPass(),l=n.paint.get("fill-pattern"),c=t.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===i.constantOr(e.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(t.renderPass===c){const i=t.depthModeForSublayer(1,"opaque"===t.renderPass?e.DepthMode.ReadWrite:e.DepthMode.ReadOnly);vn(t,r,n,o,i,s,!1)}if("translucent"===t.renderPass&&n.paint.get("fill-antialias")){const i=t.depthModeForSublayer(n.getPaintProperty("fill-outline-color")?2:0,e.DepthMode.ReadOnly);vn(t,r,n,o,i,s,!0)}},"fill-extrusion":function(t,r,n,o){const i=n.paint.get("fill-extrusion-opacity");if(0!==i&&"translucent"===t.renderPass){const a=new e.DepthMode(t.context.gl.LEQUAL,e.DepthMode.ReadWrite,t.depthRangeFor3D);if(1!==i||n.paint.get("fill-extrusion-pattern").constantOr(1))bn(t,r,n,o,a,e.StencilMode.disabled,e.ColorMode.disabled),bn(t,r,n,o,a,t.stencilModeFor3D(),t.colorModeForRenderPass()),t.resetStencilClippingMasks();else{const i=t.colorModeForRenderPass();bn(t,r,n,o,a,e.StencilMode.disabled,i)}}},hillshade:function(t,r,n,o){if("offscreen"!==t.renderPass&&"translucent"!==t.renderPass)return;const i=t.context,a=t.depthModeForSublayer(0,e.DepthMode.ReadOnly),s=t.colorModeForRenderPass(),l=t.terrain&&t.terrain.renderingToTexture,[c,u]="translucent"!==t.renderPass||l?[{},o]:t.stencilConfigForOverlap(o);for(const o of u){const i=r.getTile(o);if(i.needsHillshadePrepare&&"offscreen"===t.renderPass)vr(t,i,n,a,e.StencilMode.disabled,s);else if("translucent"===t.renderPass){const e=l&&t.terrain?t.terrain.stencilModeForRTTOverlap(o):c[o.overscaledZ];gr(t,o,i,n,a,e,s)}}i.viewport.set([0,0,t.width,t.height]),t.resetStencilClippingMasks()},raster:function(t,r,n,o,i,a){if("translucent"!==t.renderPass)return;if(0===n.paint.get("raster-opacity"))return;if(!o.length)return;const s=t.context,l=s.gl,c=r.getSource(),u=t.useProgram("raster"),d=t.colorModeForRenderPass(),f=t.terrain&&t.terrain.renderingToTexture,[p,h]=c instanceof Ie||f?[{},o]:t.stencilConfigForOverlap(o),m=h[h.length-1].overscaledZ,g=!t.options.moving;for(const o of h){const i=f?e.DepthMode.disabled:t.depthModeForSublayer(o.overscaledZ-m,1===n.paint.get("raster-opacity")?e.DepthMode.ReadWrite:e.DepthMode.ReadOnly,l.LESS),h=o.toUnwrapped(),y=r.getTile(o);if(f&&(!y||!y.hasData()))continue;const v=f?o.projMatrix:t.transform.calculateProjMatrix(h,g),b=t.terrain&&f?t.terrain.stencilModeForRTTOverlap(o):p[o.overscaledZ],_=a?0:n.paint.get("raster-fade-duration");y.registerFadeDuration(_);const x=r.findLoadedParent(o,0),w=Ir(y,x,r,t.transform,_);let A,S;t.terrain&&t.terrain.prepareDrawTile();const C="nearest"===n.paint.get("raster-resampling")?l.NEAREST:l.LINEAR;s.activeTexture.set(l.TEXTURE0),y.texture.bind(C,l.CLAMP_TO_EDGE),s.activeTexture.set(l.TEXTURE1),x?(x.texture.bind(C,l.CLAMP_TO_EDGE),A=Math.pow(2,x.tileID.overscaledZ-y.tileID.overscaledZ),S=[y.tileID.canonical.x*A%1,y.tileID.canonical.y*A%1]):y.texture.bind(C,l.CLAMP_TO_EDGE),y.texture.useMipmap&&s.extTextureFilterAnisotropic&&t.transform.pitch>20&&l.texParameterf(l.TEXTURE_2D,s.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,s.extTextureFilterAnisotropicMax);const E=en(v,S||[0,0],A||1,w,n,c instanceof Ie?c.perspectiveTransform:[0,0]);if(t.prepareDrawProgram(s,u,h),c instanceof Ie)c.boundsBuffer&&c.boundsSegments&&u.draw(s,l.TRIANGLES,i,e.StencilMode.disabled,d,e.CullFaceMode.disabled,E,n.id,c.boundsBuffer,t.quadTriangleIndexBuffer,c.boundsSegments);else{const{tileBoundsBuffer:r,tileBoundsIndexBuffer:o,tileBoundsSegments:a}=t.getTileBoundsBuffers(y);u.draw(s,l.TRIANGLES,i,b,d,e.CullFaceMode.disabled,E,n.id,r,o,a)}}t.resetStencilClippingMasks()},background:function(t,r,n,o){const i=n.paint.get("background-color"),a=n.paint.get("background-opacity");if(0===a)return;const s=t.context,l=s.gl,c=t.transform,u=c.tileSize,d=n.paint.get("background-pattern");if(t.isPatternMissing(d))return;const f=!d&&1===i.a&&1===a&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass!==f)return;const p=e.StencilMode.disabled,h=t.depthModeForSublayer(0,"opaque"===f?e.DepthMode.ReadWrite:e.DepthMode.ReadOnly),m=t.colorModeForRenderPass(),g=t.useProgram(d?"backgroundPattern":"background");let y,v=o;v||(y=t.getBackgroundTiles(),v=Object.values(y).map((e=>e.tileID))),d&&(s.activeTexture.set(l.TEXTURE0),t.imageManager.bind(t.context));for(const f of v){const v=f.toUnwrapped(),b=o?f.projMatrix:t.transform.calculateProjMatrix(v);t.prepareDrawTile();const _=r?r.getTile(f):y?y[f.key]:new e.Tile(f,u,c.zoom,t),x=d?ln(b,a,t,d,{tileID:f,tileSize:u}):sn(b,a,i);t.prepareDrawProgram(s,g,v);const{tileBoundsBuffer:w,tileBoundsIndexBuffer:A,tileBoundsSegments:S}=t.getTileBoundsBuffers(_);g.draw(s,l.TRIANGLES,h,p,m,e.CullFaceMode.disabled,x,n.id,w,A,S)}},sky:function(t,r,n){const o=t.transform,i="mercator"===o.projection.name||"globe"===o.projection.name?1:e.smoothstep(7,8,o.zoom),a=n.paint.get("sky-opacity")*i;if(0===a)return;const s=t.context,l=n.paint.get("sky-type"),c=new e.DepthMode(s.gl.LEQUAL,e.DepthMode.ReadOnly,[0,1]),u=t.frameCounter/1e3%1;"atmosphere"===l?"offscreen"===t.renderPass?n.needsSkyboxCapture(t)&&(function(t,r){const n=t.context,o=n.gl;let i=r.skyboxFbo;if(!i){i=r.skyboxFbo=n.createFramebuffer(32,32,!1),r.skyboxGeometry=new On(n),r.skyboxTexture=n.gl.createTexture(),o.bindTexture(o.TEXTURE_CUBE_MAP,r.skyboxTexture),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MAG_FILTER,o.LINEAR);for(let e=0;e<6;++e)o.texImage2D(o.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,o.RGBA,32,32,0,o.RGBA,o.UNSIGNED_BYTE,null)}n.bindFramebuffer.set(i.framebuffer),n.viewport.set([0,0,32,32]);const a=r.getCenter(t,!0),s=t.useProgram("skyboxCapture"),l=new Float64Array(16);e.identity(l),e.rotateY(l,l,.5*-Math.PI),Ln(n,r,s,l,a,0),e.identity(l),e.rotateY(l,l,.5*Math.PI),Ln(n,r,s,l,a,1),e.identity(l),e.rotateX(l,l,.5*-Math.PI),Ln(n,r,s,l,a,2),e.identity(l),e.rotateX(l,l,.5*Math.PI),Ln(n,r,s,l,a,3),e.identity(l),Ln(n,r,s,l,a,4),e.identity(l),e.rotateY(l,l,Math.PI),Ln(n,r,s,l,a,5),n.viewport.set([0,0,t.width,t.height])}(t,n),n.markSkyboxValid(t)):"sky"===t.renderPass&&function(t,r,n,o,i){const a=t.context,s=a.gl,l=t.transform,c=t.useProgram("skybox");a.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_CUBE_MAP,r.skyboxTexture);const u=((e,t,r,n,o)=>({u_matrix:e,u_sun_direction:t,u_cubemap:0,u_opacity:n,u_temporal_offset:o}))(l.skyboxMatrix,r.getCenter(t,!1),0,o,i);t.prepareDrawProgram(a,c),c.draw(a,s.TRIANGLES,n,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.backCW,u,"skybox",r.skyboxGeometry.vertexBuffer,r.skyboxGeometry.indexBuffer,r.skyboxGeometry.segment)}(t,n,c,a,u):"gradient"===l&&"sky"===t.renderPass&&function(t,r,n,o,i){const a=t.context,s=a.gl,l=t.transform,c=t.useProgram("skyboxGradient");r.skyboxGeometry||(r.skyboxGeometry=new On(a)),a.activeTexture.set(s.TEXTURE0);let u=r.colorRampTexture;u||(u=r.colorRampTexture=new e.Texture(a,r.colorRamp,s.RGBA)),u.bind(s.LINEAR,s.CLAMP_TO_EDGE);const d=((t,r,n,o,i)=>({u_matrix:t,u_color_ramp:0,u_center_direction:r,u_radius:e.degToRad(n),u_opacity:o,u_temporal_offset:i}))(l.skyboxMatrix,r.getCenter(t,!1),r.paint.get("sky-gradient-radius"),o,i);t.prepareDrawProgram(a,c),c.draw(a,s.TRIANGLES,n,e.StencilMode.disabled,t.colorModeForRenderPass(),e.CullFaceMode.backCW,d,"skyboxGradient",r.skyboxGeometry.vertexBuffer,r.skyboxGeometry.indexBuffer,r.skyboxGeometry.segment)}(t,n,c,a,u)},debug:function(e,t,r){for(let n=0;nn)return void(this.transform.fogCullDistSq=null);const o=r+.78*(n-r);this.transform.fogCullDistSq=o*o}get terrain(){return this.transform._terrainEnabled()&&this._terrain&&this._terrain.enabled?this._terrain:null}resize(t,r){if(this.width=t*e.exported.devicePixelRatio,this.height=r*e.exported.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const e of this.style.order)this.style._layers[e].resize()}setup(){const t=this.context,r=new e.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(e.EXTENT,0),r.emplaceBack(0,e.EXTENT),r.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=t.createVertexBuffer(r,e.posAttributes.members),this.tileExtentSegments=e.SegmentVector.simpleSegment(0,0,4,2);const n=new e.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(e.EXTENT,0),n.emplaceBack(0,e.EXTENT),n.emplaceBack(e.EXTENT,e.EXTENT),this.debugBuffer=t.createVertexBuffer(n,e.posAttributes.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);const o=new e.StructArrayLayout2i4;o.emplaceBack(-1,-1),o.emplaceBack(1,-1),o.emplaceBack(-1,1),o.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(o,e.posAttributes.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);const i=new e.StructArrayLayout4i8;i.emplaceBack(0,0,0,0),i.emplaceBack(e.EXTENT,0,e.EXTENT,0),i.emplaceBack(0,e.EXTENT,0,e.EXTENT),i.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.mercatorBoundsBuffer=t.createVertexBuffer(i,e.boundsAttributes.members),this.mercatorBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);const a=new e.StructArrayLayout3ui6;a.emplaceBack(0,1,2),a.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(a);const s=new e.StructArrayLayout1ui2;for(const e of[0,1,3,2,0])s.emplaceBack(e);this.debugIndexBuffer=t.createIndexBuffer(s),this.emptyTexture=new e.Texture(t,new e.RGBAImage({width:1,height:1},Uint8Array.of(0,0,0,0)),t.gl.RGBA),this.identityMat=e.create();const l=this.context.gl;this.stencilClearMode=new e.StencilMode({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO),this.loadTimeStamps.push(e.window.performance.now()),this.atmosphereBuffer=new Nn(this.context)}getMercatorTileBoundsBuffers(){return{tileBoundsBuffer:this.mercatorBoundsBuffer,tileBoundsIndexBuffer:this.quadTriangleIndexBuffer,tileBoundsSegments:this.mercatorBoundsSegments}}getTileBoundsBuffers(e){return e._makeTileBoundsBuffers(this.context,this.transform.projection),e._tileBoundsBuffer?{tileBoundsBuffer:e._tileBoundsBuffer,tileBoundsIndexBuffer:e._tileBoundsIndexBuffer,tileBoundsSegments:e._tileBoundsSegments}:this.getMercatorTileBoundsBuffers()}clearStencil(){const t=this.context,r=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0,this._tileClippingMaskIDs={},this.useProgram("clippingMask").draw(t,r.TRIANGLES,e.DepthMode.disabled,this.stencilClearMode,e.ColorMode.disabled,e.CullFaceMode.disabled,Tr(this.identityMat),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}resetStencilClippingMasks(){this.terrain||(this.currentStencilSource=void 0,this._tileClippingMaskIDs={})}_renderTileClippingMasks(t,r,n){if(!r||this.currentStencilSource===r.id||!t.isTileClipped()||!n||0===n.length)return;if(this._tileClippingMaskIDs&&!this.terrain){let e=!1;for(const t of n)if(void 0===this._tileClippingMaskIDs[t.key]){e=!0;break}if(!e)return}this.currentStencilSource=r.id;const o=this.context,i=o.gl;this.nextStencilID+n.length>256&&this.clearStencil(),o.setColorMode(e.ColorMode.disabled),o.setDepthMode(e.DepthMode.disabled);const a=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const t of n){const n=r.getTile(t),s=this._tileClippingMaskIDs[t.key]=this.nextStencilID++,{tileBoundsBuffer:l,tileBoundsIndexBuffer:c,tileBoundsSegments:u}=this.getTileBoundsBuffers(n);a.draw(o,i.TRIANGLES,e.DepthMode.disabled,new e.StencilMode({func:i.ALWAYS,mask:0},s,255,i.KEEP,i.KEEP,i.REPLACE),e.ColorMode.disabled,e.CullFaceMode.disabled,Tr(t.projMatrix),"$clipping",l,c,u)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,r=this.context.gl;return new e.StencilMode({func:r.NOTEQUAL,mask:255},t,255,r.KEEP,r.KEEP,r.REPLACE)}stencilModeForClipping(t){if(this.terrain)return this.terrain.stencilModeForRTTOverlap(t);const r=this.context.gl;return new e.StencilMode({func:r.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,r.KEEP,r.KEEP,r.REPLACE)}stencilConfigForOverlap(t){const r=this.context.gl,n=t.sort(((e,t)=>t.overscaledZ-e.overscaledZ)),o=n[n.length-1].overscaledZ,i=n[0].overscaledZ-o+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();const t={};for(let n=0;n=0;this.currentLayer--){const e=this.style._layers[n[this.currentLayer]],r=t._getLayerSourceCache(e);if(e.isSky())continue;const o=r?a[r.id]:void 0;this._renderTileClippingMasks(e,r,o),this.renderLayer(this,r,e,o)}if(this.style.fog&&this.transform.projection.supportsFog&&function(t,r){const n=t.context,o=n.gl,i=t.transform,a=new e.DepthMode(o.LEQUAL,e.DepthMode.ReadOnly,[0,1]),s=t.useProgram("globeAtmosphere",null,"globe"===i.projection.name?["PROJECTION_GLOBE_VIEW","FOG"]:["FOG"]),l=e.globeToMercatorTransition(i.zoom),c=r.properties.get("color").toArray01(),u=r.properties.get("high-color").toArray01(),d=r.properties.get("space-color").toArray01PremultipliedAlpha(),f=e.identity$1([]);e.rotateY$1(f,f,-e.degToRad(i._center.lng)),e.rotateX$1(f,f,e.degToRad(i._center.lat)),e.rotateZ$1(f,f,i.angle),e.rotateX$1(f,f,-i._pitch);const p=e.fromQuat(new Float32Array(16),f),h=e.mapValue(r.properties.get("star-intensity"),0,1,0,.25),m=5e-4,g=e.mapValue(r.properties.get("horizon-blend"),0,1,m,.25),y=e.globeUseCustomAntiAliasing(t,n,i)&&g===m?i.worldSize/(2*Math.PI*1.025)-1:i.globeRadius,v=t.frameCounter/1e3%1,b=e.length(i.globeCenterInViewSpace),_=Math.sqrt(Math.pow(b,2)-Math.pow(y,2)),x=Math.acos(_/b),w=((t,r,n,o,i,a,s,l,c,u,d,f,p,h)=>({u_frustum_tl:t,u_frustum_tr:r,u_frustum_br:n,u_frustum_bl:o,u_horizon:i,u_transition:a,u_fadeout_range:s,u_color:l,u_high_color:c,u_space_color:u,u_star_intensity:d,u_star_size:5*e.exported.devicePixelRatio,u_star_density:0,u_temporal_offset:f,u_horizon_angle:p,u_rotation_matrix:h}))(i.frustumCorners.TL,i.frustumCorners.TR,i.frustumCorners.BR,i.frustumCorners.BL,i.frustumCorners.horizon,l,g,c,u,d,h,v,x,p);t.prepareDrawProgram(n,s);const A=t.atmosphereBuffer;A&&s.draw(n,o.TRIANGLES,a,e.StencilMode.disabled,e.ColorMode.alphaBlended,e.CullFaceMode.backCW,w,"skybox",A.vertexBuffer,A.indexBuffer,A.segments)}(this,this.style.fog),this.renderPass="sky",(e.globeToMercatorTransition(this.transform.zoom)>0||"globe"!==this.transform.projection.name)&&this.transform.isHorizonVisible())for(this.currentLayer=0;this.currentLayer{const n=t._getLayerSourceCache(e);n&&!e.isHidden(this.transform.zoom)&&(!r||r.getSource().maxzoom0?t.pop():null}isPatternMissing(e){return null===e||void 0!==e&&!this.imageManager.getPattern(e.toString())}terrainRenderModeElevated(){return this.style&&!!this.style.getTerrain()&&!!this.terrain&&!this.terrain.renderingToTexture}currentGlobalDefines(){const e=this.terrain&&this.terrain.renderingToTexture,t=this.terrain&&0===this.terrain.exaggeration(),r=this.style&&this.style.fog,n=[];return this.terrainRenderModeElevated()&&n.push("TERRAIN"),"globe"===this.transform.projection.name&&n.push("GLOBE"),t&&n.push("ZERO_EXAGGERATION"),r&&!e&&0!==r.getOpacity(this.transform.pitch)&&n.push("FOG"),e&&n.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&n.push("OVERDRAW_INSPECTOR"),n}useProgram(e,t,r){this.cache=this.cache||{};const n=r||[],o=this.currentGlobalDefines().concat(n),i=Or.cacheKey(dr[e],e,o,t);return this.cache[i]||(this.cache[i]=new Or(this.context,e,dr[e],t,cn[e],o)),this.cache[i]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.frontFace.setDefault(),this.context.cullFaceSide.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const 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(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this._terrain&&this._terrain.destroy(),this.globeSharedBuffers&&this.globeSharedBuffers.destroy(),this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.atmosphereBuffer&&this.atmosphereBuffer.destroy()}prepareDrawTile(){this.terrain&&this.terrain.prepareDrawTile()}prepareDrawProgram(t,r,n){if(this.terrain&&this.terrain.renderingToTexture)return;const o=this.style.fog;if(o){const i=o.getOpacity(this.transform.pitch),a=((t,r,n,o,i,a,s,l,c,u,d)=>{const f=t.transform,p=r.properties.get("color").toArray01();p[3]=o;const h=t.frameCounter/1e3%1;return{u_fog_matrix:n?f.calculateFogTileMatrix(n):t.identityMat,u_fog_range:r.getFovAdjustedRange(f._fov),u_fog_color:p,u_fog_horizon_blend:r.properties.get("horizon-blend"),u_fog_temporal_offset:h,u_frustum_tl:i,u_frustum_tr:a,u_frustum_br:s,u_frustum_bl:l,u_globe_pos:c,u_globe_radius:u,u_viewport:d,u_globe_transition:e.globeToMercatorTransition(f.zoom),u_is_globe:+("globe"===f.projection.name)}})(this,o,n,i,this.transform.frustumCorners.TL,this.transform.frustumCorners.TR,this.transform.frustumCorners.BR,this.transform.frustumCorners.BL,this.transform.globeCenterInViewSpace,this.transform.globeRadius,[this.transform.width*e.exported.devicePixelRatio,this.transform.height*e.exported.devicePixelRatio]);r.setFogUniformValues(t,a)}}setTileLoadedFlag(e){this.tileLoaded=e}saveCanvasCopy(){const e=this.canvasCopy();e&&(this.frameCopies.push(e),this.tileLoaded=!1)}canvasCopy(){const e=this.context.gl,t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.copyTexImage2D(e.TEXTURE_2D,0,e.RGBA,0,0,e.drawingBufferWidth,e.drawingBufferHeight,0),t}getCanvasCopiesAndTimestamps(){return{canvasCopies:this.frameCopies,timeStamps:this.loadTimeStamps}}averageElevationNeedsEasing(){if(!this.transform._elevation)return!1;const e=this.style&&this.style.fog;return!!e&&0!==e.getOpacity(this.transform.pitch)}getBackgroundTiles(){const t=this._backgroundTiles,r=this._backgroundTiles={},n=this.transform.coveringTiles({tileSize:512});for(const o of n)r[o.key]=t[o.key]||new e.Tile(o,512,this.transform.tileZoom,this);return r}clearBackgroundTiles(){this._backgroundTiles={}}}class Bn{constructor(e=0,t=0,r=0,n=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=n}interpolate(t,r,n){return null!=r.top&&null!=t.top&&(this.top=e.number(t.top,r.top,n)),null!=r.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,r.bottom,n)),null!=r.left&&null!=t.left&&(this.left=e.number(t.left,r.left,n)),null!=r.right&&null!=t.right&&(this.right=e.number(t.right,r.right,n)),this}getCenter(t,r){const n=e.clamp((this.left+t-this.right)/2,0,t),o=e.clamp((this.top+r-this.bottom)/2,0,r);return new e.Point(n,o)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Bn(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function jn(t,r){const n=e.getColumn(t,3);e.fromQuat(t,r),e.setColumn(t,3,n)}function Un(t,r){const n=e.identity$1([]);return e.rotateZ$1(n,n,-r),e.rotateX$1(n,n,-t),n}function $n(t,r){const n=[t[0],t[1],0],o=[r[0],r[1],0];if(e.length(n)>=1e-15){const t=e.normalize([],n);e.scale$2(o,t,e.dot(o,t)),r[0]=o[0],r[1]=o[1]}const i=e.cross([],r,t);if(e.len(i)<1e-15)return null;const a=Math.atan2(-i[1],i[0]);return Un(Math.atan2(Math.sqrt(t[0]*t[0]+t[1]*t[1]),-t[2]),a)}class Vn{constructor(e,t){this.position=e,this.orientation=t}get position(){return this._position}set position(t){if(t){const r=t instanceof e.MercatorCoordinate?t:new e.MercatorCoordinate(t[0],t[1],t[2]);this._renderWorldCopies&&(r.x=e.wrap(r.x,0,1)),this._position=r}else this._position=null}lookAtPoint(t,r){if(this.orientation=null,!this.position)return;const n=this.position,o=this._elevation?this._elevation.getAtPointOrZero(e.MercatorCoordinate.fromLngLat(t)):0,i=e.MercatorCoordinate.fromLngLat(t,o),a=[i.x-n.x,i.y-n.y,i.z-n.z];r||(r=[0,0,1]),r[2]=Math.abs(r[2]),this.orientation=$n(a,r)}setPitchBearing(t,r){this.orientation=Un(e.degToRad(t),e.degToRad(-r))}}class Gn{constructor(t,r){this._transform=e.identity([]),this.orientation=r,this.position=t}get mercatorPosition(){const t=this.position;return new e.MercatorCoordinate(t[0],t[1],t[2])}get position(){const t=e.getColumn(this._transform,3);return[t[0],t[1],t[2]]}set position(t){var r;t&&e.setColumn(this._transform,3,[(r=t)[0],r[1],r[2],1])}get orientation(){return this._orientation}set orientation(t){this._orientation=t||e.identity$1([]),t&&jn(this._transform,this._orientation)}getPitchBearing(){const e=this.forward(),t=this.right();return{bearing:Math.atan2(-t[1],t[0]),pitch:Math.atan2(Math.sqrt(e[0]*e[0]+e[1]*e[1]),-e[2])}}setPitchBearing(e,t){this._orientation=Un(e,t),jn(this._transform,this._orientation)}forward(){const t=e.getColumn(this._transform,2);return[-t[0],-t[1],-t[2]]}up(){const t=e.getColumn(this._transform,1);return[-t[0],-t[1],-t[2]]}right(){const t=e.getColumn(this._transform,0);return[t[0],t[1],t[2]]}getCameraToWorld(t,r){const n=new Float64Array(16);return e.invert(n,this.getWorldToCamera(t,r)),n}getWorldToCameraPosition(t,r,n){const o=this.position;e.scale$2(o,o,-t);const i=new Float64Array(16);return e.fromScaling(i,[n,n,n]),e.translate(i,i,o),i[10]*=r,i}getWorldToCamera(t,r){const n=new Float64Array(16),o=new Float64Array(4),i=this.position;return e.conjugate(o,this._orientation),e.scale$2(i,i,-t),e.fromQuat(n,o),e.translate(n,n,i),n[1]*=-1,n[5]*=-1,n[9]*=-1,n[13]*=-1,n[8]*=r,n[9]*=r,n[10]*=r,n[11]*=r,n}getCameraToClipPerspective(t,r,n,o){const i=new Float64Array(16);return e.perspective(i,t,r,n,o),i}getDistanceToElevation(t,r=!1){const n=0===t?0:e.mercatorZfromAltitude(t,r?e.latFromMercatorY(this.position[1]):this.position[1]),o=this.forward();return(n-this.position[2])/o[2]}clone(){return new Gn([...this.position],[...this.orientation])}}function Hn(t,r){const n=qn(t.projection,t.zoom,t.width,t.height),o=function(t,r,n,o,i){const a=new e.LngLat(n.lng-180*Xn,n.lat),s=new e.LngLat(n.lng+180*Xn,n.lat),l=t.project(a.lng,a.lat),c=t.project(s.lng,s.lat),u=-Math.atan2(c.y-l.y,c.x-l.x),d=e.MercatorCoordinate.fromLngLat(n);d.y=e.clamp(d.y,-1+Xn,1-Xn);const f=d.toLngLat(),p=t.project(f.lng,f.lat),h=e.MercatorCoordinate.fromLngLat(f);h.x+=Xn;const m=h.toLngLat(),g=t.project(m.lng,m.lat),y=Yn(g.x-p.x,g.y-p.y,u),v=e.MercatorCoordinate.fromLngLat(f);v.y+=Xn;const b=v.toLngLat(),_=t.project(b.lng,b.lat),x=Yn(_.x-p.x,_.y-p.y,u),w=Math.abs(y.x)/Math.abs(x.y),A=e.identity([]);e.rotateZ(A,A,-u*(1-(i?0:o)));const S=e.identity([]);return e.scale(S,S,[1,1-(1-w)*o,1]),S[4]=-x.x/x.y*o,e.rotateZ(S,S,u),e.multiply(S,A,S),S}(t.projection,0,t.center,n,r),i=Wn(t);return e.scale(o,o,[i,i,1]),o}function Wn(t){const r=t.projection,n=qn(t.projection,t.zoom,t.width,t.height),o=Zn(r,t.center),i=Zn(r,e.LngLat.convert(r.center));return Math.pow(2,o*n+(1-n)*i)}function qn(t,r,n,o,i=1/0){const a=t.range;if(!a)return 0;const s=Math.min(i,Math.max(n,o)),l=Math.log(s/1024)/Math.LN2;return e.smoothstep(a[0]+l,a[1]+l,r)}const Xn=1/4e4;function Zn(t,r){const n=e.clamp(r.lat,-e.MAX_MERCATOR_LATITUDE,e.MAX_MERCATOR_LATITUDE),o=new e.LngLat(r.lng-180*Xn,n),i=new e.LngLat(r.lng+180*Xn,n),a=t.project(o.lng,n),s=t.project(i.lng,n),l=e.MercatorCoordinate.fromLngLat(o),c=e.MercatorCoordinate.fromLngLat(i),u=s.x-a.x,d=s.y-a.y,f=c.x-l.x,p=c.y-l.y,h=Math.sqrt((f*f+p*p)/(u*u+d*d));return Math.log(h)/Math.LN2}function Yn(e,t,r){const n=Math.cos(r),o=Math.sin(r);return{x:e*n-t*o,y:e*o+t*n}}class Kn{constructor(t,r,n,o,i,a,s){this.tileSize=512,this._renderWorldCopies=void 0===i||i,this._minZoom=t||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==o?60:o,this.setProjection(a),this.setMaxBounds(s),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._nearZ=0,this._farZ=0,this._unmodified=!0,this._edgeInsets=new Bn,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._distanceTileDataCache={},this._camera=new Gn,this._centerAltitude=0,this._averageElevation=0,this.cameraElevationReference="ground",this._pixelsPerMercatorPixel=1,this.globeRadius=0,this.globeCenterInViewSpace=[0,0,0],this._horizonShift=.1}clone(){const e=new Kn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies,this.getProjection());return e._elevation=this._elevation,e._centerAltitude=this._centerAltitude,e._centerAltitudeValidForExaggeration=this._centerAltitudeValidForExaggeration,e.tileSize=this.tileSize,e.mercatorFromTransition=this.mercatorFromTransition,e.width=this.width,e.height=this.height,e.cameraElevationReference=this.cameraElevationReference,e._center=this._center,e._setZoom(this.zoom),e._seaLevelZoom=this._seaLevelZoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._nearZ=this._nearZ,e._farZ=this._farZ,e._averageElevation=this._averageElevation,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._camera=this._camera.clone(),e._calcMatrices(),e.freezeTileCoverage=this.freezeTileCoverage,e.frustumCorners=this.frustumCorners,e}get elevation(){return this._elevation}set elevation(e){this._elevation!==e&&(this._elevation=e,this._updateCameraOnTerrain(),this._calcMatrices())}updateElevation(e,t=!1){const r=this._elevation&&this._elevation.exaggeration()!==this._centerAltitudeValidForExaggeration;(null==this._seaLevelZoom||r)&&this._updateCameraOnTerrain(),(e||r)&&this._constrainCamera(t),this._calcMatrices()}getProjection(){return e.pick(this.projection,["name","center","parallels"])}setProjection(r){this.projectionOptions=r||{name:"mercator"};const n=this.projection?this.getProjection():void 0;this.projection=e.getProjection(this.projectionOptions);const o=!t(n,this.getProjection());return o&&this._calcMatrices(),this.mercatorFromTransition=!1,o}setMercatorFromTransition(){const t=this.projection.name;this.mercatorFromTransition=!0,this.projectionOptions={name:"mercator"},this.projection=e.getProjection({name:"mercator"});const r=t!==this.projection.name;return r&&this._calcMatrices(),r}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies&&!0===this.projection.supportsWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get cameraWorldSizeForFog(){const e=Math.max(this._camera.getDistanceToElevation(this._averageElevation),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(e))}get cameraWorldSize(){const e=Math.max(this._camera.getDistanceToElevation(this._averageElevation,!0),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(e))}get pixelsPerMeter(){return this.projection.pixelsPerMeter(this.center.lat,this.worldSize)}get cameraPixelsPerMeter(){return e.mercatorZfromAltitude(this.center.lat,this.cameraWorldSizeForFog)}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.Point(this.width,this.height)}get bearing(){return e.wrap(this.rotation,-180,180)}set bearing(e){this.rotation=e}get rotation(){return-this.angle/Math.PI*180}set rotation(t){const r=-t*Math.PI/180;var n;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=(n=new e.ARRAY_TYPE(4),e.ARRAY_TYPE!=Float32Array&&(n[1]=0,n[2]=0),n[0]=1,n[3]=1,n),function(e,t,r){var n=t[0],o=t[1],i=t[2],a=t[3],s=Math.sin(r),l=Math.cos(r);e[0]=n*l+i*s,e[1]=o*l+a*s,e[2]=n*-s+i*l,e[3]=o*-s+a*l}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const r=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())}get aspect(){return this.width/this.height}get fov(){return this._fov/Math.PI*180}get fovX(){return this._fov}get fovY(){const e=1/Math.tan(.5*this.fovX);return 2*Math.atan(1/this.aspect/e)}set fov(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=e.degToRad(t),this._calcMatrices())}get averageElevation(){return this._averageElevation}set averageElevation(e){this._averageElevation=e,this._calcFogMatrices(),this._distanceTileDataCache={}}get zoom(){return this._zoom}set zoom(e){const t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._setZoom(t),this._updateSeaLevelZoom(),this._constrain(),this._calcMatrices())}_setZoom(e){this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom}_updateCameraOnTerrain(){if(!this._elevation||!this._elevation.isDataAvailableAtPoint(this.locationCoordinate(this.center)))return this._centerAltitude=0,this._seaLevelZoom=null,void(this._centerAltitudeValidForExaggeration=void 0);const e=this._elevation;this._centerAltitude=e.getAtPointOrZero(this.locationCoordinate(this.center)),this._centerAltitudeValidForExaggeration=e.exaggeration(),this._updateSeaLevelZoom()}_updateSeaLevelZoom(){void 0!==this._centerAltitudeValidForExaggeration&&(this._seaLevelZoom=this._zoomFromMercatorZ((this.pixelsPerMeter*this._centerAltitude+this.cameraToCenterDistance)/this.worldSize))}sampleAverageElevation(){if(!this._elevation)return 0;const t=this._elevation,r=[[.5,.2],[.3,.5],[.5,.5],[.7,.5],[.5,.8]],n=this.horizonLineFromTop();let o=0,i=0;for(let a=0;at.maxzoom&&(r=t.maxzoom);const a=this.locationCoordinate(this.center),s=this.center.lat,l=1<{const r=1/4e4,n=new e.MercatorCoordinate(t.x+r,t.y,t.z),o=new e.MercatorCoordinate(t.x,t.y+r,t.z),i=t.toLngLat(),a=n.toLngLat(),s=o.toLngLat(),l=this.locationCoordinate(i),c=this.locationCoordinate(a),u=this.locationCoordinate(s),d=Math.hypot(c.x-l.x,c.y-l.y),f=Math.hypot(u.x-l.x,u.y-l.y);return Math.sqrt(d*f)*x/r},A=t=>{const r=b,n=_;return{aabb:e.tileAABB(this,l,0,0,0,t,n,r,this.projection),zoom:0,x:0,y:0,minZ:n,maxZ:r,wrap:t,fullyVisible:!1}},S=[];let C=[];const E=r,T=t.reparseOverscaled?n:r,I=e=>e*e,k=I((m-this._centerAltitude)*h),M=e=>{if(!this._elevation||!e.tileID||!i)return;const t=this._elevation.getMinMaxForTile(e.tileID),r=e.aabb;t?(r.min[2]=t.min,r.max[2]=t.max,r.center[2]=(r.min[2]+r.max[2])/2):(e.shouldSplit=R(e),e.shouldSplit||(r.min[2]=r.max[2]=r.center[2]=this._centerAltitude))},R=t=>{if(t.zoom=.9)return!0}else if(o&&(a=I(t.aabb.distanceZ(g)*h)),this.projection.isReprojectedInTileSpace&&n<=5){const r=Math.pow(2,t.zoom),n=w(new e.MercatorCoordinate((t.x+.5)/r,(t.y+.5)/r));l=n>.85?1:n}const c=r*r+i*i+a,d=I((1<{if(t*I(.707)0;){const n=S.pop(),a=n.x,s=n.y;let d=n.fullyVisible;if(!d){const e=n.aabb.intersects(f);if(0===e)continue;d=2===e}if(n.zoom!==E&&R(n))for(let t=0;t<4;t++){const r=(a<<1)+t%2,c=(s<<1)+(t>>1),f={aabb:i?n.aabb.quadrant(t):e.tileAABB(this,l,n.zoom+1,r,c,n.wrap,n.minZ,n.maxZ,this.projection),zoom:n.zoom+1,x:r,y:c,wrap:n.wrap,fullyVisible:d,tileID:void 0,shouldSplit:void 0,minZ:n.minZ,maxZ:n.maxZ};o&&!u&&(f.tileID=new e.OverscaledTileID(n.zoom+1===E?T:n.zoom+1,n.wrap,n.zoom+1,r,c),M(f)),S.push(f)}else{const o=n.zoom===E?T:n.zoom;if(t.minzoom&&t.minzoom>o)continue;const i=c[0]-(.5+a+(n.wrap<{const i=[0,0,0,1],a=[e.EXTENT,e.EXTENT,0,1],s=this.calculateFogTileMatrix(o.tileID.toUnwrapped());e.transformMat4$1(i,i,s),e.transformMat4$1(a,a,s);const l=e.getAABBPointSquareDist(i,a);if(0===l)return!0;let c=!1;const u=this._elevation;if(u&&l>r&&0!==n){const r=this.calculateProjMatrix(o.tileID.toUnwrapped());let i;t.isTerrainDEM||(i=u.getMinMaxForTile(o.tileID)),i||(i={min:_,max:b});const a=e.furthestTileCorner(this.rotation),s=[a[0]*e.EXTENT,a[1]*e.EXTENT,i.max];e.transformMat4(s,s,r),c=(1-s[1])*this.height*.5e.distanceSq-t.distanceSq)).map((e=>e.tileID))}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(t){const r=e.clamp(t.lat,-e.MAX_MERCATOR_LATITUDE,e.MAX_MERCATOR_LATITUDE),n=this.projection.project(t.lng,r);return new e.Point(n.x*this.worldSize,n.y*this.worldSize)}unproject(e){return this.projection.unproject(e.x/this.worldSize,e.y/this.worldSize)}get point(){return this.project(this.center)}get pointMerc(){return this.point._div(this.worldSize)}get pixelsPerMeterRatio(){return this.pixelsPerMeter/e.mercatorZfromAltitude(1,this.center.lat)/this.worldSize}setLocationAtPoint(t,r){let n,o;const i=this.centerPoint;if("globe"===this.projection.name){const e=this.worldSize;n=(r.x-i.x)/e,o=(r.y-i.y)/e}else{const e=this.pointCoordinate(r),t=this.pointCoordinate(i);n=e.x-t.x,o=e.y-t.y}const a=this.locationCoordinate(t);this.setLocation(new e.MercatorCoordinate(a.x-n,a.y-o))}setLocation(e){this.center=this.coordinateLocation(e),this.projection.wrap&&(this.center=this.center.wrap())}locationPoint(e){return this.projection.locationPoint(this,e)}locationPoint3D(e){return this.projection.locationPoint(this,e,!0)}pointLocation(e){return this.coordinateLocation(this.pointCoordinate(e))}pointLocation3D(e){return this.coordinateLocation(this.pointCoordinate3D(e))}locationCoordinate(t,r){const n=r?e.mercatorZfromAltitude(r,t.lat):void 0,o=this.projection.project(t.lng,t.lat);return new e.MercatorCoordinate(o.x,o.y,n)}coordinateLocation(e){return this.projection.unproject(e.x,e.y)}pointRayIntersection(t,r){const n=null!=r?r:this._centerAltitude,o=[t.x,t.y,0,1],i=[t.x,t.y,1,1];e.transformMat4$1(o,o,this.pixelMatrixInverse),e.transformMat4$1(i,i,this.pixelMatrixInverse);const a=i[3];e.scale$1(o,o,1/o[3]),e.scale$1(i,i,1/a);const s=o[2],l=i[2];return{p0:o,p1:i,t:s===l?0:(n-s)/(l-s)}}screenPointToMercatorRay(t){const r=[t.x,t.y,0,1],n=[t.x,t.y,1,1];return e.transformMat4$1(r,r,this.pixelMatrixInverse),e.transformMat4$1(n,n,this.pixelMatrixInverse),e.scale$1(r,r,1/r[3]),e.scale$1(n,n,1/n[3]),r[2]=e.mercatorZfromAltitude(r[2],this._center.lat)*this.worldSize,n[2]=e.mercatorZfromAltitude(n[2],this._center.lat)*this.worldSize,e.scale$1(r,r,1/this.worldSize),e.scale$1(n,n,1/this.worldSize),new e.Ray([r[0],r[1],r[2]],e.normalize([],e.sub([],n,r)))}rayIntersectionCoordinate(t){const{p0:r,p1:n,t:o}=t,i=e.mercatorZfromAltitude(r[2],this._center.lat),a=e.mercatorZfromAltitude(n[2],this._center.lat);return new e.MercatorCoordinate(e.number(r[0],n[0],o)/this.worldSize,e.number(r[1],n[1],o)/this.worldSize,e.number(i,a,o))}pointCoordinate(e,t=this._centerAltitude){return this.projection.pointCoordinate(this,e.x,e.y,t)}pointCoordinate3D(t){if(!this.elevation)return this.pointCoordinate(t);let r=this.projection.pointCoordinate3D(this,t.x,t.y);if(r)return new e.MercatorCoordinate(r[0],r[1],r[2]);let n=0,o=this.horizonLineFromTop();if(t.y>o)return this.pointCoordinate(t);const i=.02*o,a=t.clone();for(let t=0;t<10&&o-n>i;t++){a.y=e.number(n,o,.66);const t=this.projection.pointCoordinate3D(this,a.x,a.y);t?(o=a.y,r=t):n=a.y}return r?new e.MercatorCoordinate(r[0],r[1],r[2]):this.pointCoordinate(t)}isPointAboveHorizon(e){return this.projection.isPointAboveHorizon(this,e)}isPointOnSurface(t){if(t.y<0||t.y>this.height||t.x<0||t.x>this.width)return!1;if(this.elevation||this.zoom>=e.GLOBE_ZOOM_THRESHOLD_MAX)return!this.isPointAboveHorizon(t);const r=this.pointCoordinate(t);return r.y>=0&&r.y<=1}_coordinatePoint(t,r){const n=r&&this.elevation?this.elevation.getAtPointOrZero(t,this._centerAltitude):this._centerAltitude,o=[t.x*this.worldSize,t.y*this.worldSize,n+t.toAltitude(),1];return e.transformMat4$1(o,o,this.pixelMatrix),o[3]>0?new e.Point(o[0]/o[3],o[1]/o[3]):new e.Point(Number.MAX_VALUE,Number.MAX_VALUE)}_getBoundsNonRectangular(){const{top:t,left:r}=this._edgeInsets,n=this.height-this._edgeInsets.bottom,o=this.width-this._edgeInsets.right,i=this.pointLocation3D(new e.Point(r,t)),a=this.pointLocation3D(new e.Point(o,t)),s=this.pointLocation3D(new e.Point(o,n)),l=this.pointLocation3D(new e.Point(r,n));let c=Math.min(i.lng,a.lng,s.lng,l.lng),u=Math.max(i.lng,a.lng,s.lng,l.lng),d=Math.min(i.lat,a.lat,s.lat,l.lat),f=Math.max(i.lat,a.lat,s.lat,l.lat);const p=Math.pow(2,-this.zoom)/16*270,h="globe"===this.projection.name?1:4,m=(t,r,n,o,i)=>{const a=(t+n)/2,s=(r+o)/2,l=new e.Point(a,s),{lng:g,lat:y}=this.pointLocation3D(l),v=Math.max(0,c-g,d-y,g-u,y-f);c=Math.min(c,g),u=Math.max(u,g),d=Math.min(d,y),f=Math.max(f,y),(ip)&&(m(t,r,a,s,i+1),m(a,s,n,o,i+1))};if(m(r,t,o,t,1),m(o,t,o,n,1),m(o,n,r,n,1),m(r,n,r,t,1),"globe"===this.projection.name){const[t,r]=e.polesInViewport(this);t?(f=90,u=180,c=-180):r&&(d=-90,u=180,c=-180)}return new e.LngLatBounds(new e.LngLat(c,d),new e.LngLat(u,f))}_getBoundsRectangular(t,r){const{top:n,left:o}=this._edgeInsets,i=this.height-this._edgeInsets.bottom,a=this.width-this._edgeInsets.right,s=new e.Point(o,n),l=new e.Point(a,n),c=new e.Point(a,i),u=new e.Point(o,i);let d=this.pointCoordinate(s,t),f=this.pointCoordinate(l,t);const p=this.pointCoordinate(c,r),h=this.pointCoordinate(u,r),m=(e,t)=>(t.y-e.y)/(t.x-e.x);return d.y>1&&f.y>=0?d=new e.MercatorCoordinate((1-h.y)/m(h,d)+h.x,1):d.y<0&&f.y<=1&&(d=new e.MercatorCoordinate(-h.y/m(h,d)+h.x,0)),f.y>1&&d.y>=0?f=new e.MercatorCoordinate((1-p.y)/m(p,f)+p.x,1):f.y<0&&d.y<=1&&(f=new e.MercatorCoordinate(-p.y/m(p,f)+p.x,0)),(new e.LngLatBounds).extend(this.coordinateLocation(d)).extend(this.coordinateLocation(f)).extend(this.coordinateLocation(h)).extend(this.coordinateLocation(p))}_getBoundsRectangularTerrain(){const e=this.elevation;if(!e.visibleDemTiles.length||e.isUsingMockSource())return this._getBoundsRectangular(0,0);const t=e.visibleDemTiles.reduce(((e,t)=>{if(t.dem){const r=t.dem.tree;e.min=Math.min(e.min,r.minimums[0]),e.max=Math.max(e.max,r.maximums[0])}return e}),{min:Number.MAX_VALUE,max:0});return this._getBoundsRectangular(t.min*e.exaggeration(),t.max*e.exaggeration())}getBounds(){return"mercator"===this.projection.name||"equirectangular"===this.projection.name?this._terrainEnabled()?this._getBoundsRectangularTerrain():this._getBoundsRectangular(0,0):this._getBoundsNonRectangular()}horizonLineFromTop(e=!0){const t=this.height/2/Math.tan(this._fov/2)/Math.tan(Math.max(this._pitch,.1))+this.centerOffset.y,r=this.height/2-t*(1-this._horizonShift);return e?Math.max(0,r):r}getMaxBounds(){return this.maxBounds}setMaxBounds(t){this.maxBounds=t,this.minLat=-e.MAX_MERCATOR_LATITUDE,this.maxLat=e.MAX_MERCATOR_LATITUDE,this.minLng=-180,this.maxLng=180,t&&(this.minLat=t.getSouth(),this.maxLat=t.getNorth(),this.minLng=t.getWest(),this.maxLng=t.getEast(),this.maxLngd&&(s=d-c),d-ut&&(a=t-l),t-e.5?_-1:_,x>.5?x-1:x,0]),this.alignedProjMatrix=w,s=e.create(),e.scale(s,s,[this.width/2,-this.height/2,1]),e.translate(s,s,[1,-1,0]),this.labelPlaneMatrix=s,s=e.create(),e.scale(s,s,[1,-1,1]),e.translate(s,s,[-1,-1,0]),e.scale(s,s,[2/this.width,2/this.height,1]),this.glCoordMatrix=s,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),this._calcFogMatrices(),this._distanceTileDataCache={},s=e.invert(new Float64Array(16),this.pixelMatrix),!s)throw new Error("failed to invert matrix");if(this.pixelMatrixInverse=s,"globe"===this.projection.name||this.mercatorFromTransition){this.globeMatrix=e.calculateGlobeMatrix(this);const t=[this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]];this.globeCenterInViewSpace=e.transformMat4(t,t,i),this.globeRadius=this.worldSize/2/Math.PI-1}else this.globeMatrix=s;this._projMatrixCache={},this._alignedProjMatrixCache={},this._pixelsToTileUnitsCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};const t=this.cameraWorldSizeForFog,r=this.cameraPixelsPerMeter,n=this._camera.position,o=1/this.height/this._pixelsPerMercatorPixel,i=[t,t,r];e.scale$2(i,i,o),e.scale$2(n,n,-1),e.multiply$2(n,n,i);const a=e.create();e.translate(a,a,n),e.scale(a,a,i),this.mercatorFogMatrix=a,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(t,r,o)}_computeCameraPosition(e){const t=(e=e||this.pixelsPerMeter)/this.pixelsPerMeter,r=this._camera.forward(),n=this.point,o=this._mercatorZfromZoom(this._seaLevelZoom?this._seaLevelZoom:this._zoom)*t-e/this.worldSize*this._centerAltitude;return[n.x/this.worldSize-r[0]*o,n.y/this.worldSize-r[1]*o,e/this.worldSize*this._centerAltitude-r[2]*o]}_updateCameraState(){this.height&&(this._camera.setPitchBearing(this._pitch,this.angle),this._camera.position=this._computeCameraPosition())}_translateCameraConstrained(t){const r=this._maxCameraBoundsDistance()*Math.cos(this._pitch),n=this._camera.position[2],o=t[2];let i=1;this.projection.wrap&&(this.center=this.center.wrap()),o>0&&(i=Math.min((r-n)/o,1)),this._camera.position=e.scaleAndAdd([],this._camera.position,t,i),this._updateStateFromCamera()}_updateStateFromCamera(){const t=this._camera.position,r=this._camera.forward(),{pitch:n,bearing:o}=this._camera.getPitchBearing(),i=e.mercatorZfromAltitude(this._centerAltitude,this.center.lat)*this._pixelsPerMercatorPixel,a=this._mercatorZfromZoom(this._maxZoom)*Math.cos(e.degToRad(this._maxPitch)),s=Math.max((t[2]-i)/Math.cos(n),a),l=this._zoomFromMercatorZ(s);e.scaleAndAdd(t,t,r,s),this._pitch=e.clamp(n,e.degToRad(this.minPitch),e.degToRad(this.maxPitch)),this.angle=e.wrap(o,-Math.PI,Math.PI),this._setZoom(e.clamp(l,this._minZoom,this._maxZoom)),this._updateSeaLevelZoom(),this._center=this.coordinateLocation(new e.MercatorCoordinate(t[0],t[1],t[2])),this._unmodified=!1,this._constrain(),this._calcMatrices()}_worldSizeFromZoom(e){return Math.pow(2,e)*this.tileSize}_mercatorZfromZoom(e){return this.cameraToCenterDistance/this._worldSizeFromZoom(e)}_minimumHeightOverTerrain(){const e=Math.min((null!=this._seaLevelZoom?this._seaLevelZoom:this._zoom)+4,this._maxZoom);return this._mercatorZfromZoom(e)}_zoomFromMercatorZ(e){return this.scaleZoom(this.cameraToCenterDistance/(e*this.tileSize))}zoomFromMercatorZAdjusted(t){let r=0,n=e.GLOBE_ZOOM_THRESHOLD_MAX,o=0,i=1/0;for(;n-r>1e-6&&n>r;){const e=r+.5*(n-r),a=this.tileSize*Math.pow(2,e),s=this.getCameraToCenterDistance(this.projection,e,a),l=this.scaleZoom(s/(t*this.tileSize)),c=Math.abs(e-l);cc||r.y>1)return!0}return!1}isHorizonVisible(){return this.pitch+e.radToDeg(this.fovAboveCenter)>88||this.anyCornerOffEdge(new e.Point(0,0),new e.Point(this.width,this.height))}zoomDeltaToMovement(t,r){const n=e.length(e.sub([],this._camera.position,t)),o=this._zoomFromMercatorZ(n)+r;return n-this._mercatorZfromZoom(o)}getCameraPoint(){if("globe"===this.projection.name){const t=function([t,r,n],o){const i=[t,r,n,1];e.transformMat4$1(i,i,o);const a=i[3]=Math.max(i[3],1e-6);return i[0]/=a,i[1]/=a,i[2]/=a,i}([this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]],this.pixelMatrix);return new e.Point(t[0],t[1])}{const t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,t))}}getCameraToCenterDistance(e,t=this.zoom,r=this.worldSize){const n=qn(e,t,this.width,this.height,1024),o=e.pixelSpaceConversion(this.center.lat,r,n);return.5/Math.tan(.5*this._fov)*this.height*o}getWorldToCameraMatrix(){const t=this._camera.getWorldToCamera(this.worldSize,"meters"===this.projection.zAxisUnit?this.pixelsPerMeter:1);return"globe"===this.projection.name&&e.multiply(t,t,this.globeMatrix),t}}function Jn(e,t){let r=!1,n=null;const o=()=>{n=null,r&&(e(),n=setTimeout(o,t),r=!1)};return()=>(r=!0,n||o(),n)}class Qn{constructor(t){this._hashName=t&&encodeURIComponent(t),e.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=Jn(this._updateHashUnthrottled.bind(this),300)}addTo(t){return this._map=t,e.window.addEventListener("hashchange",this._onHashChange,!1),t.on("moveend",this._updateHash),this}remove(){return this._map?(this._map.off("moveend",this._updateHash),e.window.removeEventListener("hashchange",this._onHashChange,!1),clearTimeout(this._updateHash()),this._map=void 0,this):this}getHashString(){const t=this._map;if(!t)return"";const r=eo(t);if(this._hashName){const t=this._hashName;let n=!1;const o=e.window.location.hash.slice(1).split("&").map((e=>{const o=e.split("=")[0];return o===t?(n=!0,`${o}=${r}`):e})).filter((e=>e));return n||o.push(`${t}=${r}`),`#${o.join("&")}`}return`#${r}`}_getCurrentHash(){const t=e.window.location.hash.replace("#","");if(this._hashName){let e;return t.split("&").map((e=>e.split("="))).forEach((t=>{t[0]===this._hashName&&(e=t)})),(e&&e[1]||"").split("/")}return t.split("/")}_onHashChange(){const e=this._map;if(!e)return!1;const t=this._getCurrentHash();if(t.length>=3&&!t.some((e=>isNaN(e)))){const r=e.dragRotate.isEnabled()&&e.touchZoomRotate.isEnabled()?+(t[3]||0):e.getBearing();return e.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:r,pitch:+(t[4]||0)}),!0}return!1}_updateHashUnthrottled(){const t=e.window.location.href.replace(/(#.+)?$/,this.getHashString());e.window.history.replaceState(e.window.history.state,null,t)}}function eo(e,t){const r=e.getCenter(),n=Math.round(100*e.getZoom())/100,o=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,o),a=Math.round(r.lng*i)/i,s=Math.round(r.lat*i)/i,l=e.getBearing(),c=e.getPitch();let u=t?`/${a}/${s}/${n}`:`${n}/${s}/${a}`;return(l||c)&&(u+="/"+Math.round(10*l)/10),c&&(u+=`/${Math.round(c)}`),u}const to={linearity:.3,easing:e.bezier(0,0,.3,1)},ro=e.extend({deceleration:2500,maxSpeed:1400},to),no=e.extend({deceleration:20,maxSpeed:1400},to),oo=e.extend({deceleration:1e3,maxSpeed:360},to),io=e.extend({deceleration:1e3,maxSpeed:90},to);class ao{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.exported.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,r=e.exported.now();for(;t.length>0&&r-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._map._prefersReducedMotion())return;if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const r={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0};for(const{settings:e}of this._inertiaBuffer)r.zoom+=e.zoomDelta||0,r.bearing+=e.bearingDelta||0,r.pitch+=e.pitchDelta||0,e.panDelta&&r.pan._add(e.panDelta),e.around&&(r.around=e.around),e.pinchAround&&(r.pinchAround=e.pinchAround);const n=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,o={};if(r.pan.mag()){const i=lo(r.pan.mag(),n,e.extend({},ro,t||{}));o.offset=r.pan.mult(i.amount/r.pan.mag()),o.center=this._map.transform.center,so(o,i)}if(r.zoom){const e=lo(r.zoom,n,no);o.zoom=this._map.transform.zoom+e.amount,so(o,e)}if(r.bearing){const t=lo(r.bearing,n,oo);o.bearing=this._map.transform.bearing+e.clamp(t.amount,-179,179),so(o,t)}if(r.pitch){const e=lo(r.pitch,n,io);o.pitch=this._map.transform.pitch+e.amount,so(o,e)}if(o.zoom||o.bearing){const e=void 0===r.pinchAround?r.around:r.pinchAround;o.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),o.noMoveStart=!0,o}}function so(e,t){(!e.duration||e.durationr.unproject(e))),s=i.reduce(((e,t,r,n)=>e.add(t.div(n.length))),new e.Point(0,0));super(t,{points:i,point:s,lngLats:a,lngLat:r.unproject(s),originalEvent:n}),this._defaultPrevented=!1}}class fo extends e.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){super(e,{originalEvent:r}),this._defaultPrevented=!1}}class po{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){this._mousedownPos=void 0}wheel(e){return this._firePreventable(new fo(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new co(e.type,this._map,e))}mouseup(e){this._map.fire(new co(e.type,this._map,e))}preclick(t){const r=e.extend({},t);r.type="preclick",this._map.fire(new co(r.type,this._map,r))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||(this.preclick(e),this._map.fire(new co(e.type,this._map,e)))}dblclick(e){return this._firePreventable(new co(e.type,this._map,e))}mouseover(e){this._map.fire(new co(e.type,this._map,e))}mouseout(e){this._map.fire(new co(e.type,this._map,e))}touchstart(e){return this._firePreventable(new uo(e.type,this._map,e))}touchmove(e){this._map.fire(new uo(e.type,this._map,e))}touchend(e){this._map.fire(new uo(e.type,this._map,e))}touchcancel(e){this._map.fire(new uo(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ho{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._contextMenuEvent=void 0}mousemove(e){this._map.fire(new co(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new co("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new co(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class mo{constructor(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(u(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active)return;const r=t,n=this._startPos,o=this._lastPos;if(!n||!o||o.equals(r)||!this._box&&r.dist(n){this._box&&(this._box.style.transform=`translate(${a}px,${l}px)`,this._box.style.width=s-a+"px",this._box.style.height=c-l+"px")}))}mouseupWindow(t,r){if(!this._active)return;const n=this._startPos,o=r;if(n&&0===t.button){if(this.reset(),p(),n.x!==o.x||n.y!==o.y)return this._map.fire(new e.Event("boxzoomend",{originalEvent:t})),{cameraAnimation:e=>e.fitScreenCoordinates(n,o,this._map.getBearing(),{linear:!1})};this._fireEvent("boxzoomcancel",t)}}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}blur(){this.reset()}reset(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.remove(),this._box=null),d(),delete this._startPos,delete this._lastPos}_fireEvent(t,r){return this._map.fire(new e.Event(t,{originalEvent:r}))}}function go(e,t){const r={};for(let n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(0===this.startTime&&(this.startTime=t.timeStamp),n.length===this.numTouches&&(this.centroid=function(t){const r=new e.Point(0,0);for(const e of t)r._add(e);return r.div(t.length)}(r),this.touches=go(n,r)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;const n=go(r,t);for(const e in this.touches){const t=n[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){const e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class vo{constructor(e){this.singleTap=new yo(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,this.lastTap=void 0,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){const n=this.singleTap.touchend(e,t,r);if(n){const t=e.timeStamp-this.lastTime<500,r=!this.lastTap||this.lastTap.dist(n)<30;if(t&&r||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}}}class bo{constructor(){this._zoomIn=new vo({numTouches:1,numTaps:2}),this._zoomOut=new vo({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,t,r){const n=this._zoomIn.touchend(e,t,r),o=this._zoomOut.touchend(e,t,r);return n?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(n)},{originalEvent:e})}):o?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(o)},{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}}const _o={0:1,2:2};class xo{constructor(e){this.reset(),this._clickTolerance=e.clickTolerance||1}blur(){this.reset()}reset(){this._active=!1,this._moved=!1,this._lastPoint=void 0,this._eventButton=void 0}_correctButton(e,t){return!1}_move(e,t){return{}}mousedown(e,t){if(this._lastPoint)return;const r=g(e);this._correctButton(e,r)&&(this._lastPoint=t,this._eventButton=r)}mousemoveWindow(e,t){const r=this._lastPoint;if(r)if(e.preventDefault(),null!=this._eventButton&&function(e,t){const r=_o[t];return void 0===e.buttons||(e.buttons&r)!==r}(e,this._eventButton))this.reset();else if(this._moved||!(t.dist(r)0&&(this._active=!0);const o=go(n,r),i=new e.Point(0,0),a=new e.Point(0,0);let s=0;for(const e in o){const t=o[e],r=this._touches[e];r&&(i._add(t),a._add(t.sub(r)),s++,o[e]=t)}if(this._touches=o,s{this._alertContainer.classList.remove("mapboxgl-touch-pan-blocker-show"),this._alertContainer.setAttribute("role","null")}),500)}}class Eo{constructor(){this.reset()}reset(){this._active=!1,this._firstTwoTouches=void 0}_start(e){}_move(e,t,r){return{}}touchstart(e,t,r){this._firstTwoTouches||r.length<2||(this._firstTwoTouches=[r[0].identifier,r[1].identifier],this._start([t[0],t[1]]))}touchmove(e,t,r){const n=this._firstTwoTouches;if(!n)return;e.preventDefault();const[o,i]=n,a=To(r,t,o),s=To(r,t,i);if(!a||!s)return;const l=this._aroundCenter?null:a.add(s).div(2);return this._move([a,s],l,e)}touchend(e,t,r){if(!this._firstTwoTouches)return;const[n,o]=this._firstTwoTouches,i=To(r,t,n),a=To(r,t,o);i&&a||(this._active&&p(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function To(e,t,r){for(let n=0;nMath.abs(e.x)}class Oo extends Eo{constructor(e){super(),this._map=e}reset(){super.reset(),this._valid=void 0,this._firstMove=void 0,this._lastPoints=void 0}_start(e){this._lastPoints=e,Po(e[0].sub(e[1]))&&(this._valid=!1)}_move(t,r,n){const o=this._lastPoints;if(!o)return;const i=t[0].sub(o[0]),a=t[1].sub(o[1]);return this._map._cooperativeGestures&&!e.isFullscreen()&&n.touches.length<3||(this._valid=this.gestureBeginsVertically(i,a,n.timeStamp),!this._valid)?void 0:(this._lastPoints=t,this._active=!0,{pitchDelta:(i.y+a.y)/2*-.5})}gestureBeginsVertically(e,t,r){if(void 0!==this._valid)return this._valid;const n=e.mag()>=2,o=t.mag()>=2;if(!n&&!o)return;if(!n||!o)return null==this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;const i=e.y>0==t.y>0;return Po(e)&&Po(t)&&i}}const Lo={panStep:100,bearingStep:15,pitchStep:10};class Do{constructor(){const e=Lo;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep,this._rotationDisabled=!1}blur(){this.reset()}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,r=0,n=0,o=0,i=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),o=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),o=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),i=-1);break;case 40:e.shiftKey?n=-1:(e.preventDefault(),i=1);break;default:return}return this._rotationDisabled&&(r=0,n=0),{cameraAnimation:a=>{const s=a.getZoom();a.easeTo({duration:300,easeId:"keyboardHandler",easing:No,zoom:t?Math.round(s)+t*(e.shiftKey?2:1):s,bearing:a.getBearing()+r*this._bearingStep,pitch:a.getPitch()+n*this._pitchStep,offset:[-o*this._panStep,-i*this._panStep],center:a.getCenter()},{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 No(e){return e*(2-e)}const Fo=4.000244140625;class zo{constructor(t,r){this._map=t,this._el=t.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,e.bindAll(["_onTimeout","_addScrollZoomBlocker","_showBlockerAlert"],this)}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around,this._map._cooperativeGestures&&this._addScrollZoomBlocker())}disable(){this.isEnabled()&&(this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove()))}wheel(t){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!(t.ctrlKey||t.metaKey||this.isZooming()||e.isFullscreen()))return void this._showBlockerAlert();"hidden"!==this._alertContainer.style.visibility&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}let r=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const n=e.exported.now(),o=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%Fo==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":o>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(o*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=t,this._delta-=r,this._active||this._start(t)),t.preventDefault()}_onTimeout(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)}_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 t=h(this._el,e);this._aroundPoint=this._aroundCenter?this._map.transform.centerPoint:t,this._aroundCoord=this._map.transform.pointCoordinate3D(this._aroundPoint),this._targetZoom=void 0,this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const t=this._map.transform;"wheel"===this._type&&t.projection.wrap&&(t._center.lng>=180||t._center.lng<=-180)&&(this._prevEase=null,this._easing=null,this._lastWheelEvent=null,this._lastWheelEventTime=0);const r=()=>t._terrainEnabled()&&this._aroundCoord?t.computeZoomRelativeTo(this._aroundCoord):t.zoom;if(0!==this._delta){const e="wheel"===this._type&&Math.abs(this._delta)>Fo?this._wheelZoomRate:this._defaultZoomRate;let n=2/(1+Math.exp(-Math.abs(this._delta*e)));this._delta<0&&0!==n&&(n=1/n);const o=r(),i=Math.pow(2,o),a="number"==typeof this._targetZoom?t.zoomScale(this._targetZoom):i;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(a*n))),"wheel"===this._type&&(this._startZoom=o,this._easing=this._smoothOutEasing(200)),this._delta=0}const n="number"==typeof this._targetZoom?this._targetZoom:r(),o=this._startZoom,i=this._easing;let a,s=!1;if("wheel"===this._type&&o&&i){const t=Math.min((e.exported.now()-this._lastWheelEventTime)/200,1),r=i(t);a=e.number(o,n,r),t<1?this._frameId||(this._frameId=!0):s=!0}else a=n,s=!0;return this._active=!0,s&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!s,zoomDelta:a-r(),around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let r=e.ease;if(this._prevEase){const t=this._prevEase,n=(e.exported.now()-t.start)/t.duration,o=t.easing(n+.01)-t.easing(n),i=.27/Math.sqrt(o*o+1e-4)*.01,a=Math.sqrt(.0729-i*i);r=e.bezier(i,a,.25,1)}return this._prevEase={start:e.exported.now(),duration:t,easing:r},r}blur(){this.reset()}reset(){this._active=!1}_addScrollZoomBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=i("div","mapboxgl-scroll-zoom-blocker",this._map._container),this._alertContainer.textContent=/(Mac|iPad)/i.test(e.window.navigator.userAgent)?this._map._getUIString("ScrollZoomBlocker.CmdMessage"):this._map._getUIString("ScrollZoomBlocker.CtrlMessage"),this._alertContainer.style.fontSize=`${Math.max(10,Math.min(24,Math.floor(.05*this._el.clientWidth)))}px`)}_showBlockerAlert(){this._alertContainer.style.visibility="visible",this._alertContainer.classList.add("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","alert"),clearTimeout(this._alertTimer),this._alertTimer=setTimeout((()=>{this._alertContainer.classList.remove("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","null")}),200)}}class Bo{constructor(e,t){this._clickZoom=e,this._tapZoom=t}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 jo{constructor(){this.reset()}reset(){this._active=!1}blur(){this.reset()}dblclick(e,t){return e.preventDefault(),{cameraAnimation:r=>{r.easeTo({duration:300,zoom:r.getZoom()+(e.shiftKey?-1:1),around:r.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Uo{constructor(){this._tap=new vo({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,this._swipePoint=void 0,this._swipeTouch=0,this._tapTime=0,this._tap.reset()}touchstart(e,t,r){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=t[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(e,t,r))}touchmove(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;const n=t[0],o=n.y-this._swipePoint.y;return this._swipePoint=n,e.preventDefault(),this._active=!0,{zoomDelta:o/128}}}else this._tap.touchmove(e,t,r)}touchend(e,t,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(e,t,r)&&(this._tapTime=e.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class $o{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Vo{constructor(e,t,r){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=r}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Go{constructor(e,t,r,n){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=n,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("mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const Ho=e=>e.zoom||e.drag||e.pitch||e.rotate;class Wo extends e.Event{}class qo{constructor(){this.constants=[1,1,.01],this.radius=0}setup(t,r){const n=e.sub([],r,t);this.radius=e.length(n[2]<0?e.div([],n,this.constants):[n[0],n[1],0])}projectRay(t){e.div(t,t,this.constants),e.normalize(t,t),e.mul$1(t,t,this.constants);const r=e.scale$2([],t,this.radius);if(r[2]>0){const t=e.scale$2([],[0,0,1],e.dot(r,[0,0,1])),n=e.scale$2([],e.normalize([],[r[0],r[1],0]),this.radius),o=e.add([],r,e.scale$2([],e.sub([],e.add([],n,t),r),2));r[0]=o[0],r[1]=o[1]}return r}}function Xo(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}class Zo{constructor(t,r){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ao(t),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new qo,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(r),e.bindAll(["handleEvent","handleWindowEvent"],this);const n=this._el;this._listeners=[[n,"touchstart",{passive:!0}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[e.window,"blur",void 0]];for(const[t,r,n]of this._listeners)t.addEventListener(r,t===e.window.document?this.handleWindowEvent:this.handleEvent,n)}destroy(){for(const[t,r,n]of this._listeners)t.removeEventListener(r,t===e.window.document?this.handleWindowEvent:this.handleEvent,n)}_addDefaultHandlers(e){const t=this._map,r=t.getCanvasContainer();this._add("mapEvent",new po(t,e));const n=t.boxZoom=new mo(t,e);this._add("boxZoom",n);const o=new bo,i=new jo;t.doubleClickZoom=new Bo(i,o),this._add("tapZoom",o),this._add("clickZoom",i);const a=new Uo;this._add("tapDragZoom",a);const s=t.touchPitch=new Oo(t);this._add("touchPitch",s);const l=new Ao(e),c=new So(e);t.dragRotate=new Vo(e,l,c),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",c,["mouseRotate"]);const u=new wo(e),d=new Co(t,e);t.dragPan=new $o(r,u,d),this._add("mousePan",u),this._add("touchPan",d,["touchZoom","touchRotate"]);const f=new Ro,p=new ko;t.touchZoomRotate=new Go(r,p,f,a),this._add("touchRotate",f,["touchPan","touchZoom"]),this._add("touchZoom",p,["touchPan","touchRotate"]),this._add("blockableMapEvent",new ho(t));const h=t.scrollZoom=new zo(t,this);this._add("scrollZoom",h,["mousePan"]);const m=t.keyboard=new Do;this._add("keyboard",m);for(const r of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])e.interactive&&e[r]&&t[r].enable(e[r])}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(const{handler:e}of this._handlers)e.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!!Ho(this._eventsInProgress)||this.isZooming()}_isDragging(){return!!this._eventsInProgress.drag}_blockedByActive(e,t,r){for(const n in e)if(n!==r&&(!t||t.indexOf(n)<0))return!0;return!1}handleWindowEvent(e){this.handleEvent(e,`${e.type}Window`)}_getMapTouches(e){const t=[];for(const r of e)this._el.contains(r.target)&&t.push(r);return t}handleEvent(e,t){this._updatingCamera=!0;const r="renderFrame"===e.type,n=r?void 0:e,o={needsRenderFrame:!1},i={},a={},s=e.touches?this._getMapTouches(e.touches):void 0,l=s?m(this._el,s):r?void 0:h(this._el,e);for(const{handlerName:r,handler:c,allowed:u}of this._handlers){if(!c.isEnabled())continue;let d;this._blockedByActive(a,u,r)?c.reset():c[t||e.type]&&(d=c[t||e.type](e,l,s),this.mergeHandlerResult(o,i,d,r,n),d&&d.needsRenderFrame&&this._triggerRenderFrame()),(d||c.isActive())&&(a[r]=c)}const c={};for(const e in this._previousActiveHandlers)a[e]||(c[e]=n);this._previousActiveHandlers=a,(Object.keys(c).length||Xo(o))&&(this._changes.push([o,i,c]),this._triggerRenderFrame()),(Object.keys(a).length||Xo(o))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:u}=o;u&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],u(this._map))}mergeHandlerResult(t,r,n,o,i){if(!n)return;e.extend(t,n);const a={handlerName:o,originalEvent:n.originalEvent||i};void 0!==n.zoomDelta&&(r.zoom=a),void 0!==n.panDelta&&(r.drag=a),void 0!==n.pitchDelta&&(r.pitch=a),void 0!==n.bearingDelta&&(r.rotate=a)}_applyChanges(){const t={},r={},n={};for(const[o,i,a]of this._changes)o.panDelta&&(t.panDelta=(t.panDelta||new e.Point(0,0))._add(o.panDelta)),o.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+o.zoomDelta),o.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+o.bearingDelta),o.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+o.pitchDelta),void 0!==o.around&&(t.around=o.around),void 0!==o.aroundCoord&&(t.aroundCoord=o.aroundCoord),void 0!==o.pinchAround&&(t.pinchAround=o.pinchAround),o.noInertia&&(t.noInertia=o.noInertia),e.extend(r,i),e.extend(n,a);this._updateMapTransform(t,r,n),this._changes=[]}_updateMapTransform(t,r,n){const o=this._map,i=o.transform,a=e=>[e.x,e.y,e.z];if((()=>{const e=this._eventsInProgress.drag;return e&&!this._handlersById[e.handlerName].isActive()})()&&!Xo(t)){const e=i.zoom;i.cameraElevationReference="sea",i.recenterOnTerrain(),i.cameraElevationReference="ground",e!==i.zoom&&this._map._update(!0)}if(i._isCameraConstrained&&o._stop(!0),!Xo(t))return void this._fireEvents(r,n,!0);let{panDelta:s,zoomDelta:l,bearingDelta:c,pitchDelta:u,around:d,aroundCoord:f,pinchAround:p}=t;i._isCameraConstrained&&(l>0&&(l=0),i._isCameraConstrained=!1),void 0!==p&&(d=p),(l||(e=>r[e]&&!this._eventsInProgress[e])("drag"))&&d&&(this._dragOrigin=a(i.pointCoordinate3D(d)),this._trackingEllipsoid.setup(i._camera.position,this._dragOrigin)),i.cameraElevationReference="sea",o._stop(!0),d=d||o.transform.centerPoint,c&&(i.bearing+=c),u&&(i.pitch+=u),i._updateCameraState();const h=[0,0,0];if(s)if("mercator"===i.projection.name){const e=this._trackingEllipsoid.projectRay(i.screenPointToMercatorRay(d).dir),t=this._trackingEllipsoid.projectRay(i.screenPointToMercatorRay(d.sub(s)).dir);h[0]=t[0]-e[0],h[1]=t[1]-e[1]}else{const t=i.pointCoordinate(d);if("globe"===i.projection.name){s=s.rotate(-i.angle);const r=i._pixelsPerMercatorPixel/i.worldSize;h[0]=-s.x*e.mercatorScale(e.latFromMercatorY(t.y))*r,h[1]=-s.y*e.mercatorScale(i.center.lat)*r}else{const e=i.pointCoordinate(d.sub(s));t&&e&&(h[0]=e.x-t.x,h[1]=e.y-t.y)}}const m=i.zoom,g=[0,0,0];if(l){const t=a(f||i.pointCoordinate3D(d)),r={dir:e.normalize([],e.sub([],t,i._camera.position))};if(r.dir[2]<0){const n=i.zoomDeltaToMovement(t,l);e.scale$2(g,r.dir,n)}}const y=e.add(h,h,g);i._translateCameraConstrained(y),l&&Math.abs(i.zoom-m)>1e-4&&i.recenterOnTerrain(),i.cameraElevationReference="ground",this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(r,n,!0)}_fireEvents(t,r,n){const o=Ho(this._eventsInProgress),i=Ho(t),a={};for(const e in t){const{originalEvent:r}=t[e];this._eventsInProgress[e]||(a[`${e}start`]=r),this._eventsInProgress[e]=t[e]}!o&&i&&this._fireEvent("movestart",i.originalEvent);for(const e in a)this._fireEvent(e,a[e]);i&&this._fireEvent("move",i.originalEvent);for(const e in t){const{originalEvent:r}=t[e];this._fireEvent(e,r)}const s={};let l;for(const e in this._eventsInProgress){const{handlerName:t,originalEvent:n}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=r[t]||n,s[`${e}end`]=l)}for(const e in s)this._fireEvent(e,s[e]);const c=Ho(this._eventsInProgress);if(n&&(o||i)&&!c){this._updatingCamera=!0;const t=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),r=e=>0!==e&&-this._bearingSnap{this._frameId=void 0,this.handleEvent(new Wo("renderFrame",{timeStamp:e})),this._applyChanges()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}const Yo="map.setFreeCameraOptions(...) and map.getFreeCameraOptions() are not yet supported for non-mercator projections.";class Ko extends e.Evented{constructor(t,r){super(),this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=r.bearingSnap,this._respectPrefersReducedMotion=!1!==r.respectPrefersReducedMotion,e.bindAll(["_renderFrameCallback"],this)}getCenter(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}panBy(t,r,n){return t=e.Point.convert(t).mult(-1),this.panTo(this.transform.center,e.extend({offset:t},r),n)}panTo(t,r,n){return this.easeTo(e.extend({center:t},r),n)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(t,r,n){return this.easeTo(e.extend({zoom:t},r),n)}zoomIn(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}zoomOut(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}getBearing(){return this.transform.bearing}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(t,r,n){return this.easeTo(e.extend({bearing:t},r),n)}resetNorth(t,r){return this.rotateTo(0,e.extend({duration:1e3},t),r),this}resetNorthPitch(t,r){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},t),r),this}snapToNorth(e,t){return Math.abs(this.getBearing())e.aspect?r/(2*Math.tan(.5*e.fovX)*e.aspect):n/(2*Math.tan(.5*e.fovY)*e.aspect)}_cameraForBoundsOnGlobe(t,r,n,o,i,a){const s=t.clone(),l=this._extendCameraOptions(a);s.bearing=o,s.pitch=i;const c=e.LngLat.convert(r),u=e.LngLat.convert(n),d=.5*(c.lat+u.lat),f=.5*(c.lng+u.lng),p=e.latLngToECEF(d,f),h=e.normalize([],p),m=e.normalize([],e.cross([],h,[0,1,0])),g=e.cross([],m,h),y=[m[0],m[1],m[2],0,g[0],g[1],g[2],0,h[0],h[1],h[2],0,0,0,0,1],v=[p,e.latLngToECEF(c.lat,c.lng),e.latLngToECEF(u.lat,c.lng),e.latLngToECEF(u.lat,u.lng),e.latLngToECEF(c.lat,u.lng),e.latLngToECEF(d,c.lng),e.latLngToECEF(d,u.lng),e.latLngToECEF(c.lat,f),e.latLngToECEF(u.lat,f)];let b=e.Aabb.fromPoints(v.map((t=>[e.dot(m,t),e.dot(g,t),e.dot(h,t)])));const _=e.transformMat4([],b.center,y);0===e.squaredLength(_)&&e.set(_,0,0,1),e.normalize(_,_),e.scale$2(_,_,e.GLOBE_RADIUS),s.center=e.ecefToLatLng(_);const x=s.getWorldToCameraMatrix(),w=e.invert(new Float64Array(16),x);b=e.Aabb.applyTransform(b,e.multiply([],x,y)),e.transformMat4(_,_,x);const A=.5*(b.max[2]-b.min[2]),S=this._minimumAABBFrustumDistance(s,b),C=e.scale$2([],[0,0,1],A),E=e.add(C,_,C),T=S+(0===s.pitch?0:e.distance(_,E)),I=s.globeCenterInViewSpace,k=e.sub([],_,[I[0],I[1],I[2]]);e.normalize(k,k),e.scale$2(k,k,T);const M=e.add([],_,k);e.transformMat4(M,M,w);const R=e.earthRadius/e.GLOBE_RADIUS,P=e.length(M),O=e.mercatorZfromAltitude(Math.max(P*R-e.earthRadius,Number.EPSILON),0),L=Math.min(s.zoomFromMercatorZAdjusted(O),l.maxZoom);return L>.5*(e.GLOBE_ZOOM_THRESHOLD_MIN+e.GLOBE_ZOOM_THRESHOLD_MAX)?(s.setProjection({name:"mercator"}),s.zoom=L,this._cameraForBounds(s,r,n,o,i,a)):{center:s.center,zoom:L,bearing:o,pitch:i}}queryTerrainElevation(t,r){const n=this.transform.elevation;return n?(r=e.extend({},{exaggerated:!0},r),n.getAtPoint(e.MercatorCoordinate.fromLngLat(t),null,r.exaggerated)):null}_cameraForBounds(t,r,n,o,i,a){if("globe"===t.projection.name)return this._cameraForBoundsOnGlobe(t,r,n,o,i,a);const s=t.clone(),l=this._extendCameraOptions(a),c=s.padding;s.bearing=o,s.pitch=i;const u=e.LngLat.convert(r),d=e.LngLat.convert(n),f=new e.LngLat(u.lng,d.lat),p=new e.LngLat(d.lng,u.lat),h=s.project(u),m=s.project(d),g=this.queryTerrainElevation(u),y=this.queryTerrainElevation(d),v=this.queryTerrainElevation(f),b=this.queryTerrainElevation(p),_=[[h.x,h.y,Math.min(g||0,y||0,v||0,b||0)],[m.x,m.y,Math.max(g||0,y||0,v||0,b||0)]];let x=e.Aabb.fromPoints(_);const w=s.getWorldToCameraMatrix(),A=e.invert(new Float64Array(16),w);x=e.Aabb.applyTransform(x,w);const S=e.sub([],x.max,x.min),C=c.left||0,E=c.right||0,T=c.bottom||0,I=c.top||0,{left:k,right:M,top:R,bottom:P}=l.padding,O=.5*(C+E),L=.5*(I+T),D=Math.min(s.scaleZoom(s.scale*Math.min((s.width-(C+E+k+M))/S[0],(s.height-(T+I+P+R))/S[1])),l.maxZoom),N=s.scale/s.zoomScale(D);x=new e.Aabb([x.min[0]-(k+O)*N,x.min[1]-(P+L)*N,x.min[2]],[x.max[0]+(M+O)*N,x.max[1]+(R+L)*N,x.max[2]]);const F=.5*S[2],z=this._minimumAABBFrustumDistance(s,x),B=[0,0,1,0];e.transformMat4$1(B,B,w),e.normalize$2(B,B);const j=e.scale$2([],B,z+F),U=e.add([],x.center,j),$=("number"==typeof l.offset.x&&"number"==typeof l.offset.y?new e.Point(l.offset.x,l.offset.y):e.Point.convert(l.offset)).rotate(-e.degToRad(o));x.center[0]-=$.x*N,x.center[1]+=$.y*N,e.transformMat4(x.center,x.center,A),e.transformMat4(U,U,A);const V=[x.center[0],x.center[1],U[2]*s.pixelsPerMeter];e.scale$2(V,V,1/s.worldSize);const G=e.lngFromMercatorX(V[0]),H=e.latFromMercatorY(V[1]),W=Math.min(s._zoomFromMercatorZ(V[2]),l.maxZoom),q=new e.LngLat(G,H);return s.mercatorFromTransition&&W<.5*(e.GLOBE_ZOOM_THRESHOLD_MIN+e.GLOBE_ZOOM_THRESHOLD_MAX)?(s.setProjection({name:"globe"}),s.zoom=W,this._cameraForBounds(s,r,n,o,i,a)):{center:q,zoom:W,bearing:o,pitch:i}}fitBounds(e,t,r){const n=this.cameraForBounds(e,t);return this._fitInternal(n,t,r)}fitScreenCoordinates(t,r,n,o,i){const a=e.Point.convert(t),s=e.Point.convert(r),l=new e.Point(Math.min(a.x,s.x),Math.min(a.y,s.y)),c=new e.Point(Math.max(a.x,s.x),Math.max(a.y,s.y));if("mercator"===this.transform.projection.name&&this.transform.anyCornerOffEdge(a,s))return this;const u=this.transform.pointLocation3D(l),d=this.transform.pointLocation3D(c),f=this.transform.pointLocation3D(new e.Point(l.x,c.y)),p=this.transform.pointLocation3D(new e.Point(c.x,l.y)),h=[Math.min(u.lng,d.lng,f.lng,p.lng),Math.min(u.lat,d.lat,f.lat,p.lat)],m=[Math.max(u.lng,d.lng,f.lng,p.lng),Math.max(u.lat,d.lat,f.lat,p.lat)],g=o&&o.pitch?o.pitch:this.getPitch(),y=this._cameraForBounds(this.transform,h,m,n,g,o);return this._fitInternal(y,o,i)}_fitInternal(t,r,n){return t?(delete(r=e.extend(t,r)).padding,r.linear?this.easeTo(r,n):this.flyTo(r,n)):this}jumpTo(t,r){this.stop();const n=t.preloadOnly?this.transform.clone():this.transform;let o=!1,i=!1,a=!1;return"zoom"in t&&n.zoom!==+t.zoom&&(o=!0,n.zoom=+t.zoom),void 0!==t.center&&(n.center=e.LngLat.convert(t.center)),"bearing"in t&&n.bearing!==+t.bearing&&(i=!0,n.bearing=+t.bearing),"pitch"in t&&n.pitch!==+t.pitch&&(a=!0,n.pitch=+t.pitch),null==t.padding||n.isPaddingEqual(t.padding)||(n.padding=t.padding),t.preloadOnly?(this._preloadTiles(n),this):(this.fire(new e.Event("movestart",r)).fire(new e.Event("move",r)),o&&this.fire(new e.Event("zoomstart",r)).fire(new e.Event("zoom",r)).fire(new e.Event("zoomend",r)),i&&this.fire(new e.Event("rotatestart",r)).fire(new e.Event("rotate",r)).fire(new e.Event("rotateend",r)),a&&this.fire(new e.Event("pitchstart",r)).fire(new e.Event("pitch",r)).fire(new e.Event("pitchend",r)),this.fire(new e.Event("moveend",r)))}getFreeCameraOptions(){return this.transform.projection.supportsFreeCamera||e.warnOnce(Yo),this.transform.getFreeCameraOptions()}setFreeCameraOptions(t,r){const n=this.transform;if(!n.projection.supportsFreeCamera)return e.warnOnce(Yo),this;this.stop();const o=n.zoom,i=n.pitch,a=n.bearing;n.setFreeCameraOptions(t);const s=o!==n.zoom,l=i!==n.pitch,c=a!==n.bearing;return this.fire(new e.Event("movestart",r)).fire(new e.Event("move",r)),s&&this.fire(new e.Event("zoomstart",r)).fire(new e.Event("zoom",r)).fire(new e.Event("zoomend",r)),c&&this.fire(new e.Event("rotatestart",r)).fire(new e.Event("rotate",r)).fire(new e.Event("rotateend",r)),l&&this.fire(new e.Event("pitchstart",r)).fire(new e.Event("pitch",r)).fire(new e.Event("pitchend",r)),this.fire(new e.Event("moveend",r)),this}easeTo(t,r){this._stop(!1,t.easeId),(!1===(t=e.extend({offset:[0,0],duration:500,easing:e.ease},t)).animate||this._prefersReducedMotion(t))&&(t.duration=0);const n=this.transform,o=this.getZoom(),i=this.getBearing(),a=this.getPitch(),s=this.getPadding(),l="zoom"in t?+t.zoom:o,c="bearing"in t?this._normalizeBearing(t.bearing,i):i,u="pitch"in t?+t.pitch:a,d="padding"in t?t.padding:n.padding,f=e.Point.convert(t.offset);let p,h,m;if("globe"===n.projection.name){const r=e.MercatorCoordinate.fromLngLat(n.center),o=f.rotate(-n.angle);r.x+=o.x/n.worldSize,r.y+=o.y/n.worldSize;const i=r.toLngLat(),a=e.LngLat.convert(t.center||i);this._normalizeCenter(a),p=n.centerPoint.add(o),h=new e.Point(r.x,r.y).mult(n.worldSize),m=new e.Point(e.mercatorXfromLng(a.lng),e.mercatorYfromLat(a.lat)).mult(n.worldSize).sub(h)}else{p=n.centerPoint.add(f);const r=n.pointLocation(p),o=e.LngLat.convert(t.center||r);this._normalizeCenter(o),h=n.project(r),m=n.project(o).sub(h)}const g=n.zoomScale(l-o);let y,v;t.around&&(y=e.LngLat.convert(t.around),v=n.locationPoint(y));const b=this._zooming||l!==o,_=this._rotating||i!==c,x=this._pitching||u!==a,w=!n.isPaddingEqual(d),A=n=>A=>{if(b&&(n.zoom=e.number(o,l,A)),_&&(n.bearing=e.number(i,c,A)),x&&(n.pitch=e.number(a,u,A)),w&&(n.interpolatePadding(s,d,A),p=n.centerPoint.add(f)),y)n.setLocationAtPoint(y,v);else{const e=n.zoomScale(n.zoom-o),t=l>o?Math.min(2,g):Math.max(.5,g),r=Math.pow(t,1-A),i=n.unproject(h.add(m.mult(A*r)).mult(e));n.setLocationAtPoint(n.renderWorldCopies?i.wrap():i,p)}return t.preloadOnly||this._fireMoveEvents(r),n};if(t.preloadOnly){const e=this._emulate(A,t.duration,n);return this._preloadTiles(e),this}const S={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=b,this._rotating=_,this._pitching=x,this._padding=w,this._easeId=t.easeId,this._prepareEase(r,t.noMoveStart,S),this._ease(A(n),(e=>{n.recenterOnTerrain(),this._afterEase(r,e)}),t),this}_prepareEase(t,r,n={}){this._moving=!0,this.transform.cameraElevationReference="sea",r||n.moving||this.fire(new e.Event("movestart",t)),this._zooming&&!n.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!n.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!n.pitching&&this.fire(new e.Event("pitchstart",t))}_fireMoveEvents(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))}_afterEase(t,r){if(this._easeId&&r&&this._easeId===r)return;this._easeId=void 0,this.transform.cameraElevationReference="ground";const n=this._zooming,o=this._rotating,i=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new e.Event("zoomend",t)),o&&this.fire(new e.Event("rotateend",t)),i&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}flyTo(t,r){if(this._prefersReducedMotion(t)){const n=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(n,r)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);const n=this.transform,o=this.getZoom(),i=this.getBearing(),a=this.getPitch(),s=this.getPadding(),l="zoom"in t?e.clamp(+t.zoom,n.minZoom,n.maxZoom):o,c="bearing"in t?this._normalizeBearing(t.bearing,i):i,u="pitch"in t?+t.pitch:a,d="padding"in t?t.padding:n.padding,f=n.zoomScale(l-o),p=e.Point.convert(t.offset);let h=n.centerPoint.add(p);const m=n.pointLocation(h),g=e.LngLat.convert(t.center||m);this._normalizeCenter(g);const y=n.project(m),v=n.project(g).sub(y);let b=t.curve;const _=Math.max(n.width,n.height),x=_/f,w=v.mag();if("minZoom"in t){const r=e.clamp(Math.min(t.minZoom,o,l),n.minZoom,n.maxZoom),i=_/n.zoomScale(r-o);b=Math.sqrt(i/w*2)}const A=b*b;function S(e){const t=(x*x-_*_+(e?-1:1)*A*A*w*w)/(2*(e?x:_)*A*w);return Math.log(Math.sqrt(t*t+1)-t)}function C(e){return(Math.exp(e)-Math.exp(-e))/2}function E(e){return(Math.exp(e)+Math.exp(-e))/2}const T=S(0);let I=function(e){return E(T)/E(T+b*e)},k=function(e){return _*((E(T)*(C(t=T+b*e)/E(t))-C(T))/A)/w;var t},M=(S(1)-T)/b;if(Math.abs(w)<1e-6||!isFinite(M)){if(Math.abs(_-x)<1e-6)return this.easeTo(t,r);const e=x<_?-1:1;M=Math.abs(Math.log(x/_))/b,k=function(){return 0},I=function(t){return Math.exp(e*b*t)}}t.duration="duration"in t?+t.duration:1e3*M/("screenSpeed"in t?+t.screenSpeed/b:+t.speed),t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0);const R=i!==c,P=u!==a,O=!n.isPaddingEqual(d),L=n=>f=>{const m=f*M,b=1/I(m);n.zoom=1===f?l:o+n.scaleZoom(b),R&&(n.bearing=e.number(i,c,f)),P&&(n.pitch=e.number(a,u,f)),O&&(n.interpolatePadding(s,d,f),h=n.centerPoint.add(p));const _=1===f?g:n.unproject(y.add(v.mult(k(m))).mult(b));return n.setLocationAtPoint(n.renderWorldCopies?_.wrap():_,h),n._updateCameraOnTerrain(),t.preloadOnly||this._fireMoveEvents(r),n};if(t.preloadOnly){const e=this._emulate(L,t.duration,n);return this._preloadTiles(e),this}return this._zooming=!0,this._rotating=R,this._pitching=P,this._padding=O,this._prepareEase(r,!1),this._ease(L(n),(()=>this._afterEase(r)),t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),this._easeFrameId=void 0,this._onEaseFrame=void 0),this._onEaseEnd){const e=this._onEaseEnd;this._onEaseEnd=void 0,e.call(this,t)}if(!e){const e=this.handlers;e&&e.stop(!1)}return this}_ease(t,r,n){!1===n.animate||0===n.duration?(t(1),r()):(this._easeStart=e.exported.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const t=Math.min((e.exported.now()-this._easeStart)/this._easeOptions.duration,1),r=this._onEaseFrame;r&&r(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(t,r){t=e.wrap(t,-180,180);const n=Math.abs(t-r);return Math.abs(t-360-r)180?-360:r<-180?360:0}_prefersReducedMotion(t){return this._respectPrefersReducedMotion&&e.exported.prefersReducedMotion&&!(t&&t.essential)}_emulate(e,t,r){const n=Math.ceil(15*t/1e3),o=[],i=e(r.clone());for(let e=0;e<=n;e++){const t=i(e/n);o.push(t.clone())}return o}}class Jo{constructor(t={}){this.options=t,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(e){const t=this.options&&this.options.compact;return this._map=e,this._container=i("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=i("button","mapboxgl-ctrl-attrib-button",this._container),i("span","mapboxgl-ctrl-icon",this._compactButton).setAttribute("aria-hidden","true"),this._compactButton.type="button",this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0}_setElementTitle(e,t){const r=this._map._getUIString(`AttributionControl.${t}`);e.setAttribute("aria-label",r),e.removeAttribute("title"),e.firstElementChild&&e.firstElementChild.setAttribute("title",r)}_toggleAttribution(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","true"))}_updateEditLink(){let t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));const r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){const n=r.reduce(((e,t,n)=>(t.value&&(e+=`${t.key}=${t.value}${ne.length-t.length)),e=e.filter(((t,r)=>{for(let n=r+1;n=0)return!1;return!0})),this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=[...this.options.customAttribution,...e]:e.unshift(this.options.customAttribution));const r=e.join(" | ");r!==this._attribHTML&&(this._attribHTML=r,e.length?(this._innerContainer.innerHTML=r,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")}}class Qo{constructor(){e.bindAll(["_updateLogo","_updateCompact"],this)}onAdd(e){this._map=e,this._container=i("div","mapboxgl-ctrl");const t=i("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)}getDefaultPosition(){return"bottom-left"}_updateLogo(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")}_logoRequired(){if(!this._map.style)return!0;const e=this._map.style._sourceCaches;if(0===Object.entries(e).length)return!0;for(const t in e){const r=e[t].getSource();if(r.hasOwnProperty("mapbox_logo")&&!r.mapbox_logo)return!1}return!0}_updateCompact(){const e=this._container.children;if(e.length){const t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}}}class ei{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){const t=this._currentlyRunning,r=t?this._queue.concat(t):this._queue;for(const t of r)if(t.id===e)return void(t.cancelled=!0)}run(e=0){const t=this._currentlyRunning=this._queue;this._queue=[];for(const r of t)if(!r.cancelled&&(r.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}function ti(t,r,n){if(t=new e.LngLat(t.lng,t.lat),r){const o=new e.LngLat(t.lng-360,t.lat),i=new e.LngLat(t.lng+360,t.lat),a=360*Math.ceil(Math.abs(t.lng-n.center.lng)/360),s=n.locationPoint(t).distSqr(r),l=r.x<0||r.y<0||r.x>n.width||r.y>n.height;n.locationPoint(o).distSqr(r)180;){const e=n.locationPoint(t);if(e.x>=0&&e.y>=0&&e.x<=n.width&&e.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}const ri={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};class ni extends e.Evented{constructor(t,r){if(super(),(t instanceof e.window.HTMLElement||r)&&(t=e.extend({element:t},r)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this),this._anchor=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&t.pitchAlignment||"auto",this._updateMoving=()=>this._update(!0),this._occludedOpacity=t&&t.occludedOpacity||.2,t&&t.element)this._element=t.element,this._offset=e.Point.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=i("div");const r=41,n=27,o=a("svg",{display:"block",height:r*this._scale+"px",width:n*this._scale+"px",viewBox:`0 0 ${n} ${r}`},this._element),s=a("radialGradient",{id:"shadowGradient"},a("defs",{},o));a("stop",{offset:"10%","stop-opacity":.4},s),a("stop",{offset:"100%","stop-opacity":.05},s),a("ellipse",{cx:13.5,cy:34.8,rx:10.5,ry:5.25,fill:"url(#shadowGradient)"},o),a("path",{fill:this._color,d:"M27,13.5C27,19.07 20.25,27 14.75,34.5C14.02,35.5 12.98,35.5 12.25,34.5C6.75,27 0,19.22 0,13.5C0,6.04 6.04,0 13.5,0C20.96,0 27,6.04 27,13.5Z"},o),a("path",{opacity:.25,d:"M13.5,0C6.04,0 0,6.04 0,13.5C0,19.22 6.75,27 12.25,34.5C13,35.52 14.02,35.5 14.75,34.5C20.25,27 27,19.07 27,13.5C27,6.04 20.96,0 13.5,0ZM13.5,1C20.42,1 26,6.58 26,13.5C26,15.9 24.5,19.18 22.22,22.74C19.95,26.3 16.71,30.14 13.94,33.91C13.74,34.18 13.61,34.32 13.5,34.44C13.39,34.32 13.26,34.18 13.06,33.91C10.28,30.13 7.41,26.31 5.02,22.77C2.62,19.23 1,15.95 1,13.5C1,6.58 6.58,1 13.5,1Z"},o),a("circle",{fill:"white",cx:13.5,cy:13.5,r:5.5},o),this._offset=e.Point.convert(t&&t.offset||[0,-14])}this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label","Map marker"),this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",(e=>{e.preventDefault()})),this._element.addEventListener("mousedown",(e=>{e.preventDefault()}));const n=this._element.classList;for(const e in ri)n.remove(`mapboxgl-marker-anchor-${e}`);n.add(`mapboxgl-marker-anchor-${this._anchor}`),this._popup=null}addTo(e){return e===this._map||(this.remove(),this._map=e,e.getCanvasContainer().appendChild(this._element),e.on("move",this._updateMoving),e.on("moveend",this._update),e.on("remove",this._clearFadeTimer),e._addMarker(this),this.setDraggable(this._draggable),this._update(),e.on("click",this._onMapClick)),this}remove(){const e=this._map;return e&&(e.off("click",this._onMapClick),e.off("move",this._updateMoving),e.off("moveend",this._update),e.off("mousedown",this._addDragHandler),e.off("touchstart",this._addDragHandler),e.off("mouseup",this._onUp),e.off("touchend",this._onUp),e.off("mousemove",this._onMove),e.off("touchmove",this._onMove),e.off("remove",this._clearFadeTimer),e._removeMarker(this),this._map=void 0),this._clearFadeTimer(),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(!0),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeAttribute("role"),this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const t=38.1,r=13.5,n=Math.sqrt(Math.pow(r,2)/2);e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-t],"bottom-left":[n,-1*(t-r+n)],"bottom-right":[-n,-1*(t-r+n)],left:[r,-1*(t-r)],right:[-r,-1*(t-r)]}:this._offset}this._popup=e,e._marker=this,this._lngLat&&this._popup.setLngLat(this._lngLat),this._element.setAttribute("role","button"),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress),this._element.setAttribute("aria-expanded","false")}return this}_onKeyPress(e){const t=e.code,r=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==r&&13!==r||this.togglePopup()}_onMapClick(e){const t=e.originalEvent.target,r=this._element;this._popup&&(t===r||r.contains(t))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const e=this._popup;return e?(e.isOpen()?(e.remove(),this._element.setAttribute("aria-expanded","false")):this._map&&(e.addTo(this._map),this._element.setAttribute("aria-expanded","true")),this):this}_behindTerrain(){const e=this._map,t=this._pos;if(!e||!t)return!1;const r=e.unproject(t),n=e.getFreeCameraOptions();if(!n.position)return!1;const o=n.position.toLngLat();return o.distanceTo(r)<.9*o.distanceTo(this._lngLat)}_evaluateOpacity(){const t=this._map;if(!t)return;const r=this._pos;if(!r||r.x<0||r.x>t.transform.width||r.y<0||r.y>t.transform.height)return void this._clearFadeTimer();const n=t.unproject(r);let o;t._showingGlobe()&&e.isLngLatBehindGlobe(t.transform,this._lngLat)?o=0:(o=1-t._queryFogOpacity(n),t.transform._terrainEnabled()&&t.getTerrain()&&this._behindTerrain()&&(o*=this._occludedOpacity)),this._element.style.opacity=`${o}`,this._element.style.pointerEvents=o>0?"auto":"none",this._popup&&this._popup._setOpacity(o),this._fadeTimer=null}_clearFadeTimer(){this._fadeTimer&&(clearTimeout(this._fadeTimer),this._fadeTimer=null)}_updateDOM(){const e=this._pos;if(!e||!this._map)return;const t=this._offset.mult(this._scale);this._element.style.transform=`\n translate(${e.x}px,${e.y}px)\n ${ri[this._anchor]}\n ${this._calculateXYTransform()} ${this._calculateZTransform()}\n translate(${t.x}px,${t.y}px)\n `}_calculateXYTransform(){const t=this._pos,r=this._map,n=this.getPitchAlignment();if(!r||!t||"map"!==n)return"";if(!r._showingGlobe()){const e=r.getPitch();return e?`rotateX(${e}deg)`:""}const o=e.radToDeg(e.globeTiltAtLngLat(r.transform,this._lngLat)),i=t.sub(e.globeCenterToScreenPoint(r.transform)),a=Math.abs(i.x)+Math.abs(i.y);if(0===a)return"";const s=o/a;return`rotateX(${-i.y*s}deg) rotateY(${i.x*s}deg)`}_calculateZTransform(){const t=this._pos,r=this._map;if(!r||!t)return"";let n=0;const o=this.getRotationAlignment();if("map"===o)if(r._showingGlobe()){const t=r.project(new e.LngLat(this._lngLat.lng,this._lngLat.lat+.001)),o=r.project(new e.LngLat(this._lngLat.lng,this._lngLat.lat-.001)).sub(t);n=e.radToDeg(Math.atan2(o.y,o.x))-90}else n=-r.getBearing();else if("horizon"===o){const o=e.smoothstep(4,6,r.getZoom()),i=e.globeCenterToScreenPoint(r.transform);i.y+=o*r.transform.height;const a=t.sub(i),s=e.radToDeg(Math.atan2(a.y,a.x));n=(s>90?s-270:s+90)*(1-o)}return n+=this._rotation,n?`rotateZ(${n}deg)`:""}_update(t){e.window.cancelAnimationFrame(this._updateFrameId);const r=this._map;r&&(r.transform.renderWorldCopies&&(this._lngLat=ti(this._lngLat,this._pos,r.transform)),this._pos=r.project(this._lngLat),!0===t?this._updateFrameId=e.window.requestAnimationFrame((()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())})):this._pos=this._pos.round(),r._requestDomTask((()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(r._showingGlobe()||r.getTerrain()||r.getFog())&&!this._fadeTimer&&(this._fadeTimer=setTimeout(this._evaluateOpacity.bind(this),60)))})))}getOffset(){return this._offset}setOffset(t){return this._offset=e.Point.convert(t),this._update(),this}_onMove(t){const r=this._map;if(!r)return;const n=this._pointerdownPos,o=this._positionDelta;if(n&&o){if(!this._isDragging){const e=this._clickTolerance||r._clickTolerance;if(t.point.dist(n)=this._endTime)return this._end;const r=e.easeCubicInOut((t-this._startTime)/(this._endTime-this._startTime));return this._start*(1-r)+this._end*r}isEasing(e){return e>=this._startTime&&e<=this._endTime}jumpTo(e){this._startTime=-1/0,this._endTime=-1/0,this._start=e,this._end=e}easeTo(e,t,r){this._start=this.getValue(t),this._end=e,this._startTime=t,this._endTime=t+r}}const li={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","Map.Title":"Map","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScrollZoomBlocker.CtrlMessage":"Use ctrl + scroll to zoom the map","ScrollZoomBlocker.CmdMessage":"Use ⌘ + scroll to zoom the map","TouchPanBlocker.Message":"Use two fingers to move the map"},ci={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:85,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,performanceMetricsCollection:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,optimizeForTerrain:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,minTileCacheSize:null,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",localFontFamily:null,transformRequest:null,accessToken:null,fadeDuration:300,respectPrefersReducedMotion:!0,crossSourceCollisions:!0},ui={showCompass:!0,showZoom:!0,visualizePitch:!1};class di{constructor(t,r,n=!1){this._clickTolerance=10,this.element=r,this.mouseRotate=new Ao({clickTolerance:t.dragRotate._mouseRotate._clickTolerance}),this.map=t,n&&(this.mousePitch=new So({clickTolerance:t.dragRotate._mousePitch._clickTolerance})),e.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),r.addEventListener("mousedown",this.mousedown),r.addEventListener("touchstart",this.touchstart,{passive:!1}),r.addEventListener("touchmove",this.touchmove),r.addEventListener("touchend",this.touchend),r.addEventListener("touchcancel",this.reset)}down(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),u()}move(e,t){const r=this.map,n=this.mouseRotate.mousemoveWindow(e,t),o=n&&n.bearingDelta;if(o&&r.setBearing(r.getBearing()+o),this.mousePitch){const n=this.mousePitch.mousemoveWindow(e,t),o=n&&n.pitchDelta;o&&r.setPitch(r.getPitch()+o)}}off(){const e=this.element;e.removeEventListener("mousedown",this.mousedown),e.removeEventListener("touchstart",this.touchstart,{passive:!1}),e.removeEventListener("touchmove",this.touchmove),e.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){d(),e.window.removeEventListener("mousemove",this.mousemove),e.window.removeEventListener("mouseup",this.mouseup)}mousedown(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:()=>t.preventDefault()}),h(this.element,t)),e.window.addEventListener("mousemove",this.mousemove),e.window.addEventListener("mouseup",this.mouseup)}mousemove(e){this.move(e,h(this.element,e))}mouseup(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()}touchstart(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=m(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>e.preventDefault()},this._startPos))}touchmove(e){1!==e.targetTouches.length?this.reset():(this._lastPos=m(this.element,e.targetTouches)[0],this.move({preventDefault:()=>e.preventDefault()},this._lastPos))}touchend(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&t.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(t.antialias&&e.isSafariWithAntialiasingBug(e.window)&&(t.antialias=!1,e.warnOnce("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Kn(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies),t),this._interactive=t.interactive,this._minTileCacheSize=t.minTileCacheSize,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._useWebGL2=t.useWebGL2,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=t.crossSourceCollisions,this._collectResourceTiming=t.collectResourceTiming,this._optimizeForTerrain=t.optimizeForTerrain,this._language=this._parseLanguage(t.language),this._worldview=t.worldview,this._renderTaskQueue=new ei,this._domRenderTaskQueue=new ei,this._controls=[],this._markers=[],this._popups=[],this._mapId=e.uniqueId(),this._locale=e.extend({},li,t.locale),this._clickTolerance=t.clickTolerance,this._cooperativeGestures=t.cooperativeGestures,this._performanceMetricsCollection=t.performanceMetricsCollection,this._containerWidth=0,this._containerHeight=0,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new si(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken,t.testMode),this._silenceAuthErrors=!!t.testMode,"string"==typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error(`Container '${t.container}' not found.`)}else{if(!(t.container instanceof e.window.HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(this._container.childNodes.length>0&&e.warnOnce("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),void 0!==e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1),e.window.addEventListener("webkitfullscreenchange",this._onWindowResize,!1),e.window.addEventListener("visibilitychange",this._onVisibilityChange,!1)),this.handlers=new Zo(this,t),this._localFontFamily=t.localFontFamily,this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),t.projection&&this.setProjection(t.projection),this._hash=t.hash&&new Qn("string"==typeof t.hash&&t.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),t.attributionControl&&this.addControl(new Jo({customAttribution:t.customAttribution})),this._logoControl=new Qo,this.addControl(this._logoControl,t.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(t=>{this._update("style"===t.dataType),this.fire(new e.Event(`${t.dataType}data`,t))})),this.on("dataloading",(t=>{this.fire(new e.Event(`${t.dataType}dataloading`,t))}))}_getMapId(){return this._mapId}addControl(t,r){if(void 0===r&&(r=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const n=t.onAdd(this);this._controls.push(t);const o=this._controlPositions[r];return-1!==r.indexOf("bottom")?o.insertBefore(n,o.firstChild):o.appendChild(n),this}removeControl(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const r=this._controls.indexOf(t);return r>-1&&this._controls.splice(r,1),t.onRemove(this),this}hasControl(e){return this._controls.indexOf(e)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(t){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const r=!this._moving;return r&&this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t)),this.fire(new e.Event("resize",t)),r&&this.fire(new e.Event("moveend",t)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()}setMinZoom(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t?this.setZoom(t):this.fire(new e.Event("zoomstart")).fire(new e.Event("zoom")).fire(new e.Event("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t?this.setPitch(t):this.fire(new e.Event("pitchstart")).fire(new e.Event("pitch")).fire(new e.Event("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.renderWorldCopies=e,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(t){return"auto"===t?e.window.navigator.language:Array.isArray(t)?0===t.length?void 0:t.map((t=>"auto"===t?e.window.navigator.language:t)):t}setLanguage(e){const t=this._parseLanguage(e);if(!this.style||t===this._language)return this;this._language=t,this.style._reloadSources();for(const e of this._controls)e._setLanguage&&e._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(e){return this.style&&e!==this._worldview?(this._worldview=e,this.style._reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return"globe"===this.transform.projection.name}setProjection(e){return this._lazyInitEmptyStyle(),e?"string"==typeof e&&(e={name:e}):e=null,this._useExplicitProjection=!!e,this._prioritizeAndUpdateProjection(e,this.style.stylesheet?this.style.stylesheet.projection:null)}_updateProjectionTransition(){if("globe"!==this.getProjection().name)return;const t=this.transform,r=t.projection.name;let n;"globe"===r&&t.zoom>=e.GLOBE_ZOOM_THRESHOLD_MAX?(t.setMercatorFromTransition(),n=!0):"mercator"===r&&t.zoom=e.GLOBE_ZOOM_THRESHOLD_MAX?this.transform.setMercatorFromTransition():this.transform.setProjection(t),this.style.applyProjectionUpdate(),r){this.painter.clearBackgroundTiles();for(const e in this.style._sourceCaches)this.style._sourceCaches[e].clearTiles();this._update(!0),this._forceMarkerAndPopupUpdate(!0)}return this}project(t){return this.transform.locationPoint3D(e.LngLat.convert(t))}unproject(t){return this.transform.pointLocation3D(e.Point.convert(t))}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(e,t,r){if("mouseenter"===e||"mouseover"===e){let n=!1;const o=o=>{const i=t.filter((e=>this.getLayer(e))),a=i.length?this.queryRenderedFeatures(o.point,{layers:i}):[];a.length?n||(n=!0,r.call(this,new co(e,this,o.originalEvent,{features:a}))):n=!1},i=()=>{n=!1};return{layers:new Set(t),listener:r,delegates:{mousemove:o,mouseout:i}}}if("mouseleave"===e||"mouseout"===e){let n=!1;const o=o=>{const i=t.filter((e=>this.getLayer(e)));(i.length?this.queryRenderedFeatures(o.point,{layers:i}):[]).length?n=!0:n&&(n=!1,r.call(this,new co(e,this,o.originalEvent)))},i=t=>{n&&(n=!1,r.call(this,new co(e,this,t.originalEvent)))};return{layers:new Set(t),listener:r,delegates:{mousemove:o,mouseout:i}}}{const n=e=>{const n=t.filter((e=>this.getLayer(e))),o=n.length?this.queryRenderedFeatures(e.point,{layers:n}):[];o.length&&(e.features=o,r.call(this,e),delete e.features)};return{layers:new Set(t),listener:r,delegates:{[e]:n}}}}on(e,t,r){if(void 0===r)return super.on(e,t);Array.isArray(t)||(t=[t]);const n=this._createDelegatedListener(e,t,r);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(n);for(const e in n.delegates)this.on(e,n.delegates[e]);return this}once(e,t,r){if(void 0===r)return super.once(e,t);Array.isArray(t)||(t=[t]);const n=this._createDelegatedListener(e,t,r);for(const e in n.delegates)this.once(e,n.delegates[e]);return this}off(e,t,r){if(void 0===r)return super.off(e,t);t=new Set(Array.isArray(t)?t:[t]);const n=(e,t)=>{if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0},o=this._delegatedListeners?this._delegatedListeners[e]:void 0;return o&&(e=>{for(let o=0;o{t?this.fire(new e.ErrorEvent(t)):n&&this._updateDiff(n,r)}))}else"object"==typeof t&&this._updateDiff(t,r)}_updateDiff(t,r){try{this.style.setState(t)&&this._update(!0)}catch(n){e.warnOnce(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`),this._updateStyle(t,r)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(e.warnOnce("There is no style added to the map."),!1)}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){return!!this.style&&this.style._isSourceCacheLoaded(e)}areTilesLoaded(){const e=this.style&&this.style._sourceCaches;for(const t in e){const r=e[t]._tiles;for(const e in r){const t=r[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}}return!0}addSourceType(e,t,r){this._lazyInitEmptyStyle(),this.style.addSourceType(e,t,r)}removeSource(e){return this.style.removeSource(e),this._updateTerrain(),this._update(!0)}getSource(e){return this.style.getSource(e)}addImage(t,r,{pixelRatio:n=1,sdf:o=!1,stretchX:i,stretchY:a,content:s}={}){if(this._lazyInitEmptyStyle(),r instanceof e.window.HTMLImageElement||e.window.ImageBitmap&&r instanceof e.window.ImageBitmap){const{width:l,height:c,data:u}=e.exported.getImageData(r);this.style.addImage(t,{data:new e.RGBAImage({width:l,height:c},u),pixelRatio:n,stretchX:i,stretchY:a,content:s,sdf:o,version:0})}else if(void 0===r.width||void 0===r.height)this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:l,height:c}=r,u=r;this.style.addImage(t,{data:new e.RGBAImage({width:l,height:c},new Uint8Array(u.data)),pixelRatio:n,stretchX:i,stretchY:a,content:s,sdf:o,version:0,userImage:u}),u.onAdd&&u.onAdd(this,t)}}updateImage(t,r){const n=this.style.getImage(t);if(!n)return void this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const o=r instanceof e.window.HTMLImageElement||e.window.ImageBitmap&&r instanceof e.window.ImageBitmap?e.exported.getImageData(r):r,{width:i,height:a}=o;void 0!==i&&void 0!==a?i===n.data.width&&a===n.data.height?(n.data.replace(o.data,!(r instanceof e.window.HTMLImageElement||e.window.ImageBitmap&&r instanceof e.window.ImageBitmap)),this.style.updateImage(t,n)):this.fire(new e.ErrorEvent(new Error(`The width and height of the updated image (${i}, ${a})\n must be that same as the previous version of the image\n (${n.data.width}, ${n.data.height})`))):this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")))}hasImage(t){return t?!!this.style.getImage(t):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(t,r){e.getImage(this._requestManager.transformRequest(t,e.ResourceType.Image),((t,n)=>{r(t,n instanceof e.window.HTMLImageElement?e.exported.getImageData(n):n)}))}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){return this.style.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,n={}){return this.style.setPaintProperty(e,t,r,n),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,n={}){return this.style.setLayoutProperty(e,t,r,n),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setTerrain(e){return this._lazyInitEmptyStyle(),!e&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(e),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(e){return this._lazyInitEmptyStyle(),this.style.setFog(e),this._update(!0)}getFog(){return this.style?this.style.getFog():null}_queryFogOpacity(t){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(e.LngLat.convert(t),this.transform):0}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}_updateContainerDimensions(){if(!this._container)return;const t=this._container.getBoundingClientRect().width||400,r=this._container.getBoundingClientRect().height||300;let n,o,i,a=this._container;for(;a&&(!o||!i);){const t=e.window.getComputedStyle(a).transform;t&&"none"!==t&&(n=t.match(/matrix.*\((.+)\)/)[1].split(", "),n[0]&&"0"!==n[0]&&"1"!==n[0]&&(o=n[0]),n[3]&&"0"!==n[3]&&"1"!==n[3]&&(i=n[3])),a=a.parentElement}this._containerWidth=o?Math.abs(t/o):t,this._containerHeight=i?Math.abs(r/i):r}_detectMissingCSS(){"rgb(250, 128, 114)"!==e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&e.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const e=this._container;e.classList.add("mapboxgl-map"),(this._missingCSSCanary=i("div","mapboxgl-canary",e)).style.visibility="hidden",this._detectMissingCSS();const t=this._canvasContainer=i("div","mapboxgl-canvas-container",e);this._interactive&&t.classList.add("mapboxgl-interactive"),this._canvas=i("canvas","mapboxgl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const r=this._controlContainer=i("div","mapboxgl-control-container",e),n=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((e=>{n[e]=i("div",`mapboxgl-ctrl-${e}`,r)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(t,r){const n=e.exported.devicePixelRatio||1;this._canvas.width=n*Math.ceil(t),this._canvas.height=n*Math.ceil(r),this._canvas.style.width=`${t}px`,this._canvas.style.height=`${r}px`}_addMarker(e){this._markers.push(e)}_removeMarker(e){const t=this._markers.indexOf(e);-1!==t&&this._markers.splice(t,1)}_addPopup(e){this._popups.push(e)}_removePopup(e){const t=this._popups.indexOf(e);-1!==t&&this._popups.splice(t,1)}_setupPainter(){const t=e.extend({},r.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),n=this._useWebGL2&&this._canvas.getContext("webgl2",t),o=n||this._canvas.getContext("webgl",t)||this._canvas.getContext("experimental-webgl",t);o?(this._useWebGL2&&!n&&e.warnOnce("Failed to create WebGL 2 context. Using WebGL 1."),e.storeAuthState(o,!0),this.painter=new zn(o,this.transform,!!n),this.on("data",(e=>{"source"===e.dataType&&this.painter.setTileLoadedFlag(!0)})),e.exported$1.testSupport(o)):this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(t){t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:t}))}_contextRestored(t){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:t}))}_onMapScroll(e){if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style?(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_requestDomTask(e){!this.loaded()||this.loaded()&&!this.isMoving()?e():this._domRenderTaskQueue.add(e)}_render(t){let r;const n=this.painter.context.extTimerQuery,o=e.exported.now();if(this.listens("gpu-timing-frame")&&(r=n.createQueryEXT(),n.beginQueryEXT(n.TIME_ELAPSED_EXT,r)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],e.window.performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],e.window.performance.now())),this._renderTaskQueue.run(t),this._domRenderTaskQueue.run(t),this._removed)return;this._updateProjectionTransition();const i=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const t=this.transform.zoom,r=this.transform.pitch,n=e.exported.now(),o=new e.EvaluationParameters(t,{now:n,fadeDuration:i,pitch:r,transition:this.style.getTransition()});this.style.update(o)}this.style&&this.style.fog&&this.style.fog.hasTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let a=!1;if(this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),a=this._updateAverageElevation(o),this.style._updateSources(this.transform),this._forceMarkerAndPopupUpdate()):a=this._updateAverageElevation(o),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,i,this._crossSourceCollisions),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showTerrainWireframe:this.showTerrainWireframe,showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:i,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new e.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.Event("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),r){const t=e.exported.now()-o;n.endQueryEXT(n.TIME_ELAPSED_EXT,r),setTimeout((()=>{const i=n.getQueryObjectEXT(r,n.QUERY_RESULT_EXT)/1e6;n.deleteQueryEXT(r),this.fire(new e.Event("gpu-timing-frame",{cpuTime:t,gpuTime:i})),e.window.performance.mark("frame-gpu",{startTime:o,detail:{gpuTime:i}})}),50)}if(this.listens("gpu-timing-layer")){const t=this.painter.collectGpuTimers();setTimeout((()=>{const r=this.painter.queryGpuTimers(t);this.fire(new e.Event("gpu-timing-layer",{layerTimes:r}))}),50)}if(this.listens("gpu-timing-deferred-render")){const t=this.painter.collectDeferredRenderGpuQueries();setTimeout((()=>{const r=this.painter.queryGpuTimeDeferredRender(t);this.fire(new e.Event("gpu-timing-deferred-render",{gpuTime:r}))}),50)}const s=this._sourcesDirty||this._styleDirty||this._placementDirty||a;if(s||this._repaint)this.triggerRepaint();else{const t=!this.isMoving()&&this.loaded();if(t&&(a=this._updateAverageElevation(o,!0)),a)this.triggerRepaint();else if(this._triggerFrame(!1),t&&(this.fire(new e.Event("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const t=this._calculateSpeedIndex();this.fire(new e.Event("speedindexcompleted",{speedIndex:t})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||s||(this._fullyLoaded=!0,e.LivePerformanceUtils.mark(e.PerformanceMarkers.fullLoad),this._performanceMetricsCollection&&e.postPerformanceEvent(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(e){for(const t of this._markers)e&&!this.getRenderWorldCopies()&&(t._lngLat=t._lngLat.wrap()),t._update();for(const t of this._popups)!e||this.getRenderWorldCopies()||t._trackPointer||(t._lngLat=t._lngLat.wrap()),t._update()}_updateAverageElevation(e,t=!1){const r=e=>(this.transform.averageElevation=e,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return 0!==this.transform.averageElevation&&r(0);if((t||e-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(e)){const t=this.transform.averageElevation;let n=this.transform.sampleAverageElevation(),o=!1;this.transform.elevation&&(o=this.transform.elevation.exaggeration()!==this._averageElevationExaggeration,this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(n)?n=0:this._averageElevationLastSampledAt=e;const i=Math.abs(t-n);if(i>1){if(this._isInitialLoad||o)return this._averageElevation.jumpTo(n),r(n);this._averageElevation.easeTo(n,e,300)}else if(i>1e-4)return this._averageElevation.jumpTo(n),r(n)}return!!this._averageElevation.isEasing(e)&&r(this._averageElevation.getValue(e))}_authenticate(){e.getMapSessionAPI(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,(t=>{if(t&&(t.message===e.AUTH_ERR_MSG||401===t.status)){const t=this.painter.context.gl;e.storeAuthState(t,!1),this._logoControl instanceof Qo&&this._logoControl._updateLogo(),t&&t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT|t.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new e.ErrorEvent(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}})),e.postMapLoadEvent(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,(()=>{}))}_updateTerrain(){const e=this._isDragging();this.painter.updateTerrain(this.style,e)}_calculateSpeedIndex(){const e=this.painter.canvasCopy(),t=this.painter.getCanvasCopiesAndTimestamps();t.timeStamps.push(performance.now());const r=this.painter.context.gl,n=r.createFramebuffer();function o(e){r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e,0);const t=new Uint8Array(r.drawingBufferWidth*r.drawingBufferHeight*4);return r.readPixels(0,0,r.drawingBufferWidth,r.drawingBufferHeight,r.RGBA,r.UNSIGNED_BYTE,t),t}return r.bindFramebuffer(r.FRAMEBUFFER,n),this._canvasPixelComparison(o(e),t.canvasCopies.map(o),t.timeStamps)}_canvasPixelComparison(e,t,r){let n=r[1]-r[0];const o=e.length/4;for(let i=0;i{const t=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,t&&this._render(e)})))}_preloadTiles(t){const r=this.style?Object.values(this.style._sourceCaches):[];return e.asyncAll(r,((e,r)=>e._preloadTiles(t,r)),(()=>{this.triggerRepaint()})),this}_onWindowOnline(){this._update()}_onWindowResize(e){this._trackResize&&this.resize({originalEvent:e})._update()}_onVisibilityChange(){"hidden"===e.window.document.visibilityState&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(e){this._showTerrainWireframe!==e&&(this._showTerrainWireframe=e,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(e){this._speedIndexTiming!==e&&(this._speedIndexTiming=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(e){this._showTileAABBs!==e&&(this._showTileAABBs=e,e&&this._update())}_setCacheLimits(t,r){e.setCacheLimits(t,r)}get version(){return e.version}},NavigationControl:class{constructor(t){this.options=e.extend({},ui,t),this._container=i("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this.options.showZoom&&(e.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(e=>{this._map&&this._map.zoomIn({},{originalEvent:e})})),i("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(e=>{this._map&&this._map.zoomOut({},{originalEvent:e})})),i("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(e.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(e=>{const t=this._map;t&&(this.options.visualizePitch?t.resetNorthPitch({},{originalEvent:e}):t.resetNorth({},{originalEvent:e}))})),this._compassIcon=i("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const e=this._map;if(!e)return;const t=e.getZoom(),r=t===e.getMaxZoom(),n=t===e.getMinZoom();this._zoomInButton.disabled=r,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",r.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())}_rotateCompassArrow(){const e=this._map;if(!e)return;const t=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(e.transform.pitch*(Math.PI/180)),.5)}) rotateX(${e.transform.pitch}deg) rotateZ(${e.transform.angle*(180/Math.PI)}deg)`:`rotate(${e.transform.angle*(180/Math.PI)}deg)`;e._requestDomTask((()=>{this._compassIcon&&(this._compassIcon.style.transform=t)}))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),e.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&e.on("pitch",this._rotateCompassArrow),e.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new di(e,this._compass,this.options.visualizePitch)),this._container}onRemove(){const e=this._map;e&&(this._container.remove(),this.options.showZoom&&e.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&e.off("pitch",this._rotateCompassArrow),e.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(e,t){const r=i("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}_setButtonTitle(e,t){if(!this._map)return;const r=this._map._getUIString(`NavigationControl.${t}`);e.setAttribute("aria-label",r),e.firstElementChild&&e.firstElementChild.setAttribute("title",r)}},GeolocateControl:class extends e.Evented{constructor(t){super(),this.options=e.extend({geolocation:e.window.navigator.geolocation},fi,t),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=Jn(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(e){return this._map=e,this._container=i("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){void 0!==this._geolocationWatchID&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(t){const r=(e=!!this.options.geolocation)=>{this._supportsGeolocation=e,t(e)};void 0!==this._supportsGeolocation?t(this._supportsGeolocation):void 0!==e.window.navigator.permissions?e.window.navigator.permissions.query({name:"geolocation"}).then((e=>r("denied"!==e.state))).catch((()=>r())):r()}_isOutOfMapMaxBounds(e){const t=this._map.getMaxBounds(),r=e.coords;return!!t&&(r.longitudet.getEast()||r.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}}_updateCamera(t){const r=new e.LngLat(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,o=this._map.getBearing(),i=e.extend({bearing:o},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),i,{geolocateSource:!0})}_updateMarker(t){if(t){const r=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const t=this._map.transform,r=e.mercatorZfromAltitude(1,t._center.lat)*t.worldSize,n=Math.ceil(2*this._accuracy*r);this._circleElement.style.width=`${n}px`,this._circleElement.style.height=`${n}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&"number"==typeof this._heading?(this._userLocationDotMarker.setRotation(this._heading),this._dotElement.classList.add("mapboxgl-user-location-show-heading")):(this._dotElement.classList.remove("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",e),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&this._noTimeout)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(t){if(void 0!==this._map){if(this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this._geolocateButton=i("button","mapboxgl-ctrl-geolocate",this._container),i("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",!1===t){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}else{const e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",e),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i("div","mapboxgl-user-location"),this._dotElement.appendChild(i("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(i("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new ni({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=i("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ni({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(t=>{t.geolocateSource||"ACTIVE_LOCK"!==this._watchState||t.originalEvent&&"resize"===t.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new e.Event("trackuserlocationend")))}))}}_onDeviceOrientation(e){this._userLocationDotMarker&&(e.webkitCompassHeading?this._heading=e.webkitCompassHeading:!0===e.absolute&&(this._heading=-1*e.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(e={maximumAge:6e5,timeout:0},this._noTimeout=!0):(e=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,e),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const t=()=>{e.window.addEventListener("ondeviceorientationabsolute"in e.window?"deviceorientationabsolute":"deviceorientation",this._onDeviceOrientation)};void 0!==e.window.DeviceMotionEvent&&"function"==typeof e.window.DeviceMotionEvent.requestPermission?DeviceOrientationEvent.requestPermission().then((e=>{"granted"===e&&t()})).catch(console.error):t()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),e.window.removeEventListener("deviceorientation",this._onDeviceOrientation),e.window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Jo,ScaleControl:class{constructor(t){this.options=e.extend({},pi,t),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch(e){return!1}}(),e.bindAll(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const e=this.options.maxWidth||100,t=this._map,r=t._containerHeight/2,n=t._containerWidth/2-e/2,o=t.unproject([n,r]),i=t.unproject([n+e,r]),a=o.distanceTo(i);if("imperial"===this.options.unit){const t=3.2808*a;t>5280?this._setScale(e,t/5280,"mile"):this._setScale(e,t,"foot")}else"nautical"===this.options.unit?this._setScale(e,a/1852,"nautical-mile"):a>=1e3?this._setScale(e,a/1e3,"kilometer"):this._setScale(e,a,"meter")}_setScale(e,t,r){this._map._requestDomTask((()=>{const n=function(e){const t=Math.pow(10,`${Math.floor(e)}`.length-1);let r=e/t;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:function(e){const t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(r),t*r}(t),o=n/t;this._container.innerHTML=this._isNumberFormatSupported&&"nautical-mile"!==r?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:r}).format(n):`${n} ${hi[r]}`,this._container.style.width=e*o+"px"}))}onAdd(e){return this._map=e,this._language=e.getLanguage(),this._container=i("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(e){this._language=e,this._update()}setUnit(e){this.options.unit=e,this._update()}},FullscreenControl:class{constructor(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in e.window.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=i("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!e.window.document.fullscreenEnabled&&!e.window.document.webkitFullscreenEnabled)}_setupUI(){const t=this._fullscreenButton=i("button","mapboxgl-ctrl-fullscreen",this._controlContainer);i("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden","true"),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",e)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(e.window.document.fullscreenElement||e.window.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends e.Evented{constructor(t){super(),this.options=e.extend(Object.create(oi),t),e.bindAll(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(t&&t.className?t.className.trim().split(/\s+/):[])}addTo(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&t.on("preclick",this._onClose),this.options.closeOnMove&&t.on("move",this._onClose),t.on("remove",this.remove),this._update(),t._addPopup(this),this._focusFirstElement(),this._trackPointer?(t.on("mousemove",this._onMouseEvent),t.on("mouseup",this._onMouseEvent),t._canvasContainer.classList.add("mapboxgl-track-pointer")):t.on("move",this._update),this.fire(new e.Event("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const t=this._map;return t&&(t.off("move",this._update),t.off("move",this._onClose),t.off("preclick",this._onClose),t.off("click",this._onClose),t.off("remove",this.remove),t.off("mousemove",this._onMouseEvent),t.off("mouseup",this._onMouseEvent),t.off("drag",this._onMouseEvent),t._canvasContainer&&t._canvasContainer.classList.remove("mapboxgl-track-pointer"),t._removePopup(this),this._map=void 0),this.fire(new e.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(t){this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update();const r=this._map;return r&&(r.on("move",this._update),r.off("mousemove",this._onMouseEvent),r._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const e=this._map;return e&&(e.off("move",this._update),e.on("mousemove",this._onMouseEvent),e.on("drag",this._onMouseEvent),e._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(t){return this.setDOMContent(e.window.document.createTextNode(t))}setHTML(t){const r=e.window.document.createDocumentFragment(),n=e.window.document.createElement("body");let o;for(n.innerHTML=t;o=n.firstChild,o;)r.appendChild(o);return this.setDOMContent(r)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){let t=this._content;if(t)for(;t.hasChildNodes();)t.firstChild&&t.removeChild(t.firstChild);else t=this._content=i("div","mapboxgl-popup-content",this._container||void 0);if(t.appendChild(e),this.options.closeButton){const e=this._closeButton=i("button","mapboxgl-popup-close-button",t);e.type="button",e.setAttribute("aria-label","Close popup"),e.setAttribute("aria-hidden","true"),e.innerHTML="×",e.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(e){return this._classList.add(e),this._updateClassList(),this}removeClassName(e){return this._classList.delete(e),this._updateClassList(),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){let t;return this._classList.delete(e)?t=!1:(this._classList.add(e),t=!0),this._updateClassList(),t}_onMouseEvent(e){this._update(e.point)}_getAnchor(e){if(this.options.anchor)return this.options.anchor;const t=this._map,r=this._container,n=this._pos;if(!t||!r||!n)return"bottom";const o=r.offsetWidth,i=r.offsetHeight,a=n.xt.transform.width-o/2;if(n.y+et.transform.height-i){if(a)return"bottom-left";if(s)return"bottom-right"}return a?"left":s?"right":"bottom"}_updateClassList(){const e=this._container;if(!e)return;const t=[...this._classList];t.push("mapboxgl-popup"),this._anchor&&t.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&t.push("mapboxgl-popup-track-pointer"),e.className=t.join(" ")}_update(t){const r=this._map,n=this._content;if(!r||!this._lngLat&&!this._trackPointer||!n)return;let o=this._container;if(o||(o=this._container=i("div","mapboxgl-popup",r.getContainer()),this._tip=i("div","mapboxgl-popup-tip",o),o.appendChild(n)),this.options.maxWidth&&o.style.maxWidth!==this.options.maxWidth&&(o.style.maxWidth=this.options.maxWidth),r.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=ti(this._lngLat,this._pos,r.transform)),!this._trackPointer||t){const e=this._pos=this._trackPointer&&t?t:r.project(this._lngLat),n=ai(this.options.offset),o=this._anchor=this._getAnchor(n.y),i=ai(this.options.offset,o),a=e.add(i).round();r._requestDomTask((()=>{this._container&&o&&(this._container.style.transform=`${ri[o]} translate(${a.x}px,${a.y}px)`)}))}if(!this._marker&&r._showingGlobe()){const t=e.isLngLatBehindGlobe(r.transform,this._lngLat)?0:1;this._setOpacity(t)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const e=this._container.querySelector(ii);e&&e.focus()}_onClose(){this.remove()}_setOpacity(e){this._container&&(this._container.style.opacity=`${e}`),this._content&&(this._content.style.pointerEvents=e?"auto":"none")}},Marker:ni,Style:Qt,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,FreeCameraOptions:Vn,Evented:e.Evented,config:e.config,prewarm:function(){Be().acquire(Ne)},clearPrewarmedResources:function(){const e=ze;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(Ne),ze=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return Fe.workerCount},set workerCount(e){Fe.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage(t){e.clearTileCache(t)},workerUrl:"",workerClass:null,setNow:e.exported.setNow,restoreNow:e.exported.restoreNow};return mi})),r}()},"49EM":function(e,t,r){e.exports=function(e){function t(t,r){var n={each:u,map:function(e,t){var r=[];return u(e,(function(e,n){r.push(t(e,n))})),r},mapTimes:function(e,t){var r=[];return d(e,(function(e){r.push(t(e))})),r},eachTimes:d},o=function(){},i={animate:!1,animationSpeed:0,customPin:!1,initializeLeg:o,onClick:o,circleSpiralSwitchover:9,circleFootSeparation:25,spiralFootSeparation:28,spiralLengthStart:15,spiralLengthFactor:4},a=2*Math.PI,s=[];for(var l in r)i[l]=r[l];function c(){n.each(s.reverse(),(function(e,t){i.animate?(e.elements.container.style.transitionDelay=i.animationSpeed/1e3/s.length*t+"s",e.elements.container.className+=" exit",setTimeout((function(){e.mapboxMarker.remove()}),i.animationSpeed+100)):e.mapboxMarker.remove()})),s=[]}function u(e,t){var r=0;if(!e||!e.length)return[];for(r=0;r=i.circleSpiralSwitchover?function(e){var t=i.spiralLengthStart,r=0;return n.mapTimes(e,(function(e){var n;return r+=i.spiralFootSeparation/t+5e-4*e,n={x:t*Math.cos(r),y:t*Math.sin(r),angle:r,legLength:t,index:e},t+=a*i.spiralLengthFactor/r,n}))}(u):function(e){var t=i.circleFootSeparation*(2+e)/a,r=a/e;return n.mapTimes(e,(function(e){var n=e*r;return{x:t*Math.cos(n),y:t*Math.sin(n),angle:n,legLength:t,index:e}}))}(u);c(),l=n.map(o,(function(t,n){var o,a,s=d[n],l=function(e){var t=document.createElement("div"),r=document.createElement("div"),n=document.createElement("div");return t.className="spider-leg-container"+(i.animate?" animate initial ":" "),n.className="spider-leg-line",r.className="spider-leg-pin"+(i.customPin?"":" default-spider-pin"),t.appendChild(n),t.appendChild(r),t.style["margin-left"]=e.x+"px",t.style["margin-top"]=e.y+"px",n.style.height=e.legLength+"px",n.style.transform="rotate("+(e.angle-Math.PI/2)+"rad)",{container:t,line:n,pin:r}}(s);return o=new e.Marker(l.container).setLngLat(r),a={feature:t,elements:l,mapboxMarker:o,param:s},i.initializeLeg(a),l.container.onclick=function(e){i.onClick(e,a)},a})),n.each(l.reverse(),(function(e){e.mapboxMarker.addTo(t)})),i.animate&&setTimeout((function(){n.each(l.reverse(),(function(e,t){e.elements.container.className=(e.elements.container.className||"").replace("initial",""),e.elements.container.style.transitionDelay=i.animationSpeed/1e3/l.length*t+"s"}))})),s=l},this.unspiderfy=c,this.each=function(e){n.each(s,e)}}function r(e,t,r){return[e[0]+(t||0),e[1]+(r||0)]}return t.popupOffsetForSpiderLeg=function(e,t){var n=e.param.x,o=e.param.y;return{top:r([0,t=t||0],n,o),"top-left":r([t,t],n,o),"top-right":r([-t,t],n,o),bottom:r([0,-t],n,o),"bottom-left":r([t,-t],n,o),"bottom-right":r([-t,-t],n,o),left:r([t,-t],n,o),right:r([-t,-t],n,o)}},t}(r("4ZJM"))},MgzW:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},bbcx:(e,t,r)=>{"use strict";var n=r("82c2"),o=r("PrET"),i=r("1u+m"),a=r("WDQk"),s=r("wVpn"),l=o(a(),Object);n(l,{getPolyfill:a,implementation:i,shim:s}),e.exports=l},WDQk:(e,t,r)=>{"use strict";var n=r("1u+m");e.exports=function(){return"function"==typeof Object.is?Object.is:n}},wVpn:(e,t,r)=>{"use strict";var n=r("WDQk"),o=r("82c2");e.exports=function(){var e=n();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},sYn3:(e,t,r)=>{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r("1KsK"),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),n=a(e),s=t&&"[object String]"===i.call(e),f=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var h=c&&r;if(s&&e.length>0&&!o.call(e,0))for(var m=0;m0)for(var g=0;g{"use strict";var n=Array.prototype.slice,o=r("1KsK"),i=Object.keys,a=i?function(e){return i(e)}:r("sYn3"),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?s(n.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},"1KsK":e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},vRGJ:e=>{e.exports=function e(r,n,o){n=n||[];var i,a=(o=o||{}).strict,s=!1!==o.end,l=o.sensitive?"":"i",c=!1!==o.lookahead,u=0,d=n.length,f=0,p=0,h=0,m="";if(r instanceof RegExp){for(;i=t.exec(r.source);)"\\"!==i[0][0]&&n.push({name:i[1]||p++,optional:!1,offset:i.index});return r}if(Array.isArray(r))return r=r.map((function(t){return e(t,n,o).source})),new RegExp(r.join("|"),l);for(r=r.replace(/\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g,(function(e,t,o,i,a,s,l,c){if(h=c+e.length,"\\"===e[0])return m+=e,e;if("."===e)return m+="\\.",u+=1,"\\.";if(m=t||o?"":r.slice(h,c),"*"===e)return u+=3,"(.*)";if("/("===e)return m+="/",u+=2,"/(?:";t=t||"",o=o?"\\.":"",l=l||"",a=a?a.replace(/\\.|\*/,(function(e){return"*"===e?"(.*)":e})):m?"((?:(?!/|"+m+").)+?)":"([^/"+o+"]+?)",n.push({name:i,optional:!!l,offset:c+u});var d="(?:"+o+t+a+(s?"((?:[/"+o+"].+?)?)":"")+")"+l;return u+=d.length-e.length,d}));i=t.exec(r);)"\\"!==i[0][0]&&((d+f===n.length||n[d+f].offset>i.index)&&n.splice(d+f,0,{name:p++,optional:!1,offset:i.index}),f++);return r+=a?"":"/"===r[r.length-1]?"?":"/?",s?r+="$":"/"!==r[r.length-1]&&(r+=c?"(?=/|$)":"(?:/|$)"),new RegExp("^"+r,l)};var t=/\\.|\((?:\?<(.*?)>)?(?!\?)/g},gzWB:e=>{e.exports=function(e,t,r,n){var o=e[0],i=e[1],a=!1;void 0===r&&(r=0),void 0===n&&(n=t.length);for(var s=(n-r)/2,l=0,c=s-1;li!=p>i&&o<(f-u)*(i-d)/(p-d)+u&&(a=!a)}return a}},cQc6:(e,t,r)=>{var n=r("gzWB"),o=r("wfnw");e.exports=function(e,t,r,i){return t.length>0&&Array.isArray(t[0])?o(e,t,r,i):n(e,t,r,i)},e.exports.nested=o,e.exports.flat=n},wfnw:e=>{e.exports=function(e,t,r,n){var o=e[0],i=e[1],a=!1;void 0===r&&(r=0),void 0===n&&(n=t.length);for(var s=n-r,l=0,c=s-1;li!=p>i&&o<(f-u)*(i-d)/(p-d)+u&&(a=!a)}return a}},"3L5V":function(e,t,r){var n=r("8oxB");e.exports=function(){"use strict";function e(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]t?1:e0))break;if(null===r.right)break;if(n(e,r.right.key)>0&&(l=r.right,r.right=l.left,l.left=r,null===(r=l).right))break;i.right=r,i=r,r=r.right}}return i.right=r.left,a.left=r.right,r.left=o.right,r.right=o.left,r}function i(e,r,n,i){var a=new t(e,r);if(null===n)return a.left=a.right=null,a;var s=i(e,(n=o(e,n,i)).key);return s<0?(a.left=n.left,a.right=n,n.left=null):s>=0&&(a.right=n.right,a.left=n,n.right=null),a}function a(e,t,r){var n=null,i=null;if(t){var a=r((t=o(e,t,r)).key,e);0===a?(n=t.left,i=t.right):a<0?(i=t.right,t.right=null,n=t):(n=t.left,t.left=null,i=t)}return{left:n,right:i}}function s(e,t,r,n,o){if(e){n(t+(r?"└── ":"├── ")+o(e)+"\n");var i=t+(r?" ":"│ ");e.left&&s(e.left,i,!1,n,o),e.right&&s(e.right,i,!0,n,o)}}var l=function(){function n(e){void 0===e&&(e=r),this._root=null,this._size=0,this._comparator=e}return n.prototype.insert=function(e,t){return this._size++,this._root=i(e,t,this._root,this._comparator)},n.prototype.add=function(e,r){var n=new t(e,r);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,a=o(e,this._root,i),s=i(e,a.key);return 0===s?this._root=a:(s<0?(n.left=a.left,n.right=a,a.left=null):s>0&&(n.right=a.right,n.left=a,a.right=null),this._size++,this._root=n),this._root},n.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},n.prototype._remove=function(e,t,r){var n;return null===t?null:0===r(e,(t=o(e,t,r)).key)?(null===t.left?n=t.right:(n=o(e,t.left,r)).right=t.right,this._size--,n):t},n.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=o(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},n.prototype.findStatic=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(0===n)return t;t=n<0?t.left:t.right}return null},n.prototype.find=function(e){return this._root&&(this._root=o(e,this._root,this._comparator),0!==this._comparator(e,this._root.key))?null:this._root},n.prototype.contains=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(0===n)return!0;t=n<0?t.left:t.right}return!1},n.prototype.forEach=function(e,t){for(var r=this._root,n=[],o=!1;!o;)null!==r?(n.push(r),r=r.left):0!==n.length?(r=n.pop(),e.call(t,r),r=r.right):o=!0;return this},n.prototype.range=function(e,t,r,n){for(var o=[],i=this._comparator,a=this._root;0!==o.length||a;)if(a)o.push(a),a=a.left;else{if(i((a=o.pop()).key,t)>0)break;if(i(a.key,e)>=0&&r.call(n,a))return this;a=a.right}return this},n.prototype.keys=function(){var e=[];return this.forEach((function(t){var r=t.key;return e.push(r)})),e},n.prototype.values=function(){var e=[];return this.forEach((function(t){var r=t.data;return e.push(r)})),e},n.prototype.min=function(){return this._root?this.minNode(this._root).key:null},n.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},n.prototype.minNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.left;)e=e.left;return e},n.prototype.maxNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.right;)e=e.right;return e},n.prototype.at=function(e){for(var t=this._root,r=!1,n=0,o=[];!r;)if(t)o.push(t),t=t.left;else if(o.length>0){if(t=o.pop(),n===e)return t;n++,t=t.right}else r=!0;return null},n.prototype.next=function(e){var t=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var n=this._comparator;t;){var o=n(e.key,t.key);if(0===o)break;o<0?(r=t,t=t.left):t=t.right}return r},n.prototype.prev=function(e){var t=this._root,r=null;if(null!==e.left){for(r=e.left;r.right;)r=r.right;return r}for(var n=this._comparator;t;){var o=n(e.key,t.key);if(0===o)break;o<0?t=t.left:(r=t,t=t.right)}return r},n.prototype.clear=function(){return this._root=null,this._size=0,this},n.prototype.toList=function(){return function(e){for(var r=e,n=[],o=!1,i=new t(null,null),a=i;!o;)r?(n.push(r),r=r.left):n.length>0?r=(r=a=a.next=n.pop()).right:o=!0;return a.next=null,i.next}(this._root)},n.prototype.load=function(e,r,n){void 0===r&&(r=[]),void 0===n&&(n=!1);var o=e.length,i=this._comparator;if(n&&d(e,r,0,o-1,i),null===this._root)this._root=c(e,r,0,o),this._size=o;else{var a=function(e,r,n){for(var o=new t(null,null),i=o,a=e,s=r;null!==a&&null!==s;)n(a.key,s.key)<0?(i.next=a,a=a.next):(i.next=s,s=s.next),i=i.next;return null!==a?i.next=a:null!==s&&(i.next=s),o.next}(this.toList(),function(e,r){for(var n=new t(null,null),o=n,i=0;i0){var a=n+Math.floor(i/2),s=e[a],l=r[a],u=new t(s,l);return u.left=c(e,r,n,a),u.right=c(e,r,a+1,o),u}return null}function u(e,t,r){var n=r-t;if(n>0){var o=t+Math.floor(n/2),i=u(e,t,o),a=e.head;return a.left=i,e.head=e.head.next,a.right=u(e,o+1,r),a}return null}function d(e,t,r,n,o){if(!(r>=n)){for(var i=e[r+n>>1],a=r-1,s=n+1;;){do{a++}while(o(e[a],i)<0);do{s--}while(o(e[s],i)>0);if(a>=s)break;var l=e[a];e[a]=e[s],e[s]=l,l=t[a],t[a]=t[s],t[s]=l}d(e,t,r,s,o),d(e,t,s+1,n,o)}}const f=(e,t)=>e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y,p=(e,t)=>{if(t.ur.x{if(-hc==u>-c?(i=c,c=t[++d]):(i=u,u=n[++f]);let p=0;if(dc==u>-c?(a=c+i,s=i-(a-c),c=t[++d]):(a=u+i,s=i-(a-u),u=n[++f]),i=a,0!==s&&(o[p++]=s);dc==u>-c?(a=i+c,l=a-i,s=i-(a-l)+(c-l),c=t[++d]):(a=i+u,l=a-i,s=i-(a-l)+(u-l),u=n[++f]),i=a,0!==s&&(o[p++]=s);for(;d=33306690738754716e-32*c?l:-function(e,t,r,n,o,i,a){let s,l,c,u,d,f,p,h,m,g,y,v,b,A,k,M,R,P;const O=e-o,L=r-o,D=t-i,N=n-i;A=O*N,f=_*O,p=f-(f-O),h=O-p,f=_*N,m=f-(f-N),g=N-m,k=h*g-(A-p*m-h*m-p*g),M=D*L,f=_*D,p=f-(f-D),h=D-p,f=_*L,m=f-(f-L),g=L-m,R=h*g-(M-p*m-h*m-p*g),y=k-R,d=k-y,S[0]=k-(y+d)+(d-R),v=A+y,d=v-A,b=A-(v-d)+(y-d),y=b-M,d=b-y,S[1]=b-(y+d)+(d-M),P=v+y,d=P-v,S[2]=v-(P-d)+(y-d),S[3]=P;let F=function(e,t){let r=t[0];for(let n=1;n=z||-F>=z)return F;if(d=e-O,s=e-(O+d)+(d-o),d=r-L,c=r-(L+d)+(d-o),d=t-D,l=t-(D+d)+(d-i),d=n-N,u=n-(N+d)+(d-i),0===s&&0===l&&0===c&&0===u)return F;if(z=11093356479670487e-47*a+x*Math.abs(F),F+=O*u+N*s-(D*c+L*l),F>=z||-F>=z)return F;A=s*N,f=_*s,p=f-(f-s),h=s-p,f=_*N,m=f-(f-N),g=N-m,k=h*g-(A-p*m-h*m-p*g),M=l*L,f=_*l,p=f-(f-l),h=l-p,f=_*L,m=f-(f-L),g=L-m,R=h*g-(M-p*m-h*m-p*g),y=k-R,d=k-y,I[0]=k-(y+d)+(d-R),v=A+y,d=v-A,b=A-(v-d)+(y-d),y=b-M,d=b-y,I[1]=b-(y+d)+(d-M),P=v+y,d=P-v,I[2]=v-(P-d)+(y-d),I[3]=P;const B=w(4,S,4,I,C);A=O*u,f=_*O,p=f-(f-O),h=O-p,f=_*u,m=f-(f-u),g=u-m,k=h*g-(A-p*m-h*m-p*g),M=D*c,f=_*D,p=f-(f-D),h=D-p,f=_*c,m=f-(f-c),g=c-m,R=h*g-(M-p*m-h*m-p*g),y=k-R,d=k-y,I[0]=k-(y+d)+(d-R),v=A+y,d=v-A,b=A-(v-d)+(y-d),y=b-M,d=b-y,I[1]=b-(y+d)+(d-M),P=v+y,d=P-v,I[2]=v-(P-d)+(y-d),I[3]=P;const j=w(B,C,4,I,E);A=s*u,f=_*s,p=f-(f-s),h=s-p,f=_*u,m=f-(f-u),g=u-m,k=h*g-(A-p*m-h*m-p*g),M=l*c,f=_*l,p=f-(f-l),h=l-p,f=_*c,m=f-(f-c),g=c-m,R=h*g-(M-p*m-h*m-p*g),y=k-R,d=k-y,I[0]=k-(y+d)+(d-R),v=A+y,d=v-A,b=A-(v-d)+(y-d),y=b-M,d=b-y,I[1]=b-(y+d)+(d-M),P=v+y,d=P-v,I[2]=v-(P-d)+(y-d),I[3]=P;const U=w(j,E,4,I,T);return T[U-1]}(e,t,r,n,o,i,c)}const M=(e,t)=>e.x*t.y-e.y*t.x,R=(e,t)=>e.x*t.x+e.y*t.y,P=(e,t,r)=>{const n=k(e.x,e.y,t.x,t.y,r.x,r.y);return n>0?-1:n<0?1:0},O=e=>Math.sqrt(R(e,e)),L=(e,t,r)=>{const n={x:t.x-e.x,y:t.y-e.y},o={x:r.x-e.x,y:r.y-e.y};return M(o,n)/O(o)/O(n)},D=(e,t,r)=>{const n={x:t.x-e.x,y:t.y-e.y},o={x:r.x-e.x,y:r.y-e.y};return R(o,n)/O(o)/O(n)},N=(e,t,r)=>0===t.y?null:{x:e.x+t.x/t.y*(r-e.y),y:r},F=(e,t,r)=>0===t.x?null:{x:r,y:e.y+t.y/t.x*(r-e.x)};class z{static compare(e,t){const r=z.comparePoints(e.point,t.point);return 0!==r?r:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:j.compare(e.segment,t.segment))}static comparePoints(e,t){return e.xt.x?1:e.yt.y?1:0}constructor(e,t){void 0===e.events?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let e=0,r=t.length;e{const n=r.otherSE;t.set(r,{sine:L(this.point,e.point,n.point),cosine:D(this.point,e.point,n.point)})};return(e,n)=>{t.has(e)||r(e),t.has(n)||r(n);const{sine:o,cosine:i}=t.get(e),{sine:a,cosine:s}=t.get(n);return o>=0&&a>=0?is?-1:0:o<0&&a<0?is?1:0:ao?1:0}}}let B=0;class j{static compare(e,t){const r=e.leftSE.point.x,n=t.leftSE.point.x,o=e.rightSE.point.x,i=t.rightSE.point.x;if(ia&&s>l)return-1;const r=e.comparePoint(t.leftSE.point);if(r<0)return 1;if(r>0)return-1;const n=t.comparePoint(e.rightSE.point);return 0!==n?n:-1}if(r>n){if(as&&a>c)return 1;const r=t.comparePoint(e.leftSE.point);if(0!==r)return r;const n=e.comparePoint(t.rightSE.point);return n<0?1:n>0?-1:1}if(as)return 1;if(oi){const r=e.comparePoint(t.rightSE.point);if(r<0)return 1;if(r>0)return-1}if(o!==i){const e=l-a,t=o-r,u=c-s,d=i-n;if(e>t&&ud)return-1}return o>i?1:oc?1:e.idt.id?1:0}constructor(e,t,r,n){this.id=++B,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=r,this.windings=n}static fromRing(e,t,r){let n,o,i;const a=z.comparePoints(e,t);if(a<0)n=e,o=t,i=1;else{if(!(a>0))throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);n=t,o=e,i=-1}const s=new z(n,!0),l=new z(o,!1);return new j(s,l,[r],[i])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:et?e:t}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}comparePoint(e){if(this.isAnEndpoint(e))return 0;const t=this.leftSE.point,r=this.rightSE.point,n=this.vector();if(t.x===r.x)return e.x===t.x?0:e.x{if(0===t.x)return F(r,n,e.x);if(0===n.x)return F(e,t,r.x);if(0===t.y)return N(r,n,e.y);if(0===n.y)return N(e,t,r.y);const o=M(t,n);if(0==o)return null;const i={x:r.x-e.x,y:r.y-e.y},a=M(i,t)/o,s=M(i,n)/o;return{x:(e.x+s*t.x+(r.x+a*n.x))/2,y:(e.y+s*t.y+(r.y+a*n.y))/2}})(o,this.vector(),a,e.vector());return null===h?null:f(n,h)?v.round(h.x,h.y):null}split(e){const t=[],r=void 0!==e.events,n=new z(e,!0),o=new z(e,!1),i=this.rightSE;this.replaceRightSE(o),t.push(o),t.push(n);const a=new j(n,i,this.rings.slice(),this.windings.slice());return z.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),z.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(n.checkForConsuming(),o.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,t=this.windings.length;e0){const e=t;t=r,r=e}if(t.prev===r){const e=t;t=r,r=e}for(let e=0,n=r.rings.length;e1===e.length&&e[0].isSubject;this._isInResult=r(e)!==r(t);break}default:throw new Error(`Unrecognized operation type found ${Y.type}`)}return this._isInResult}}class U{constructor(e,t,r){if(!Array.isArray(e)||0===e.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=r,this.segments=[],"number"!=typeof e[0][0]||"number"!=typeof e[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const n=v.round(e[0][0],e[0][1]);this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let o=n;for(let t=1,r=e.length;tthis.bbox.ur.x&&(this.bbox.ur.x=r.x),r.y>this.bbox.ur.y&&(this.bbox.ur.y=r.y),o=r)}n.x===o.x&&n.y===o.y||this.segments.push(j.fromRing(o,n,this))}getSweepEvents(){const e=[];for(let t=0,r=this.segments.length;tthis.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=t}getSweepEvents(){const e=this.exteriorRing.getSweepEvents();for(let t=0,r=this.interiorRings.length;tthis.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=t}getSweepEvents(){const e=[];for(let t=0,r=this.polys.length;t0&&(e=r)}let t=e.segment.prevInResult(),r=t?t.prevInResult():null;for(;;){if(!t)return null;if(!r)return t.ringOut;if(r.ringOut!==t.ringOut)return r.ringOut.enclosingRing()!==t.ringOut?t.ringOut:t.ringOut.enclosingRing();t=r.prevInResult(),r=t?t.prevInResult():null}}}class H{constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){const e=[this.exteriorRing.getGeom()];if(null===e[0])return null;for(let t=0,r=this.interiorRings.length;t1&&void 0!==arguments[1]?arguments[1]:j.compare;this.queue=e,this.tree=new l(t),this.segments=[]}process(e){const t=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),r;const n=e.isLeft?this.tree.add(t):this.tree.find(t);if(!n)throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);let o,i,a=n,s=n;for(;void 0===o;)a=this.tree.prev(a),null===a?o=null:void 0===a.key.consumedBy&&(o=a.key);for(;void 0===i;)s=this.tree.next(s),null===s?i=null:void 0===s.key.consumedBy&&(i=s.key);if(e.isLeft){let n=null;if(o){const e=o.getIntersection(t);if(null!==e&&(t.isAnEndpoint(e)||(n=e),!o.isAnEndpoint(e))){const t=this._splitSafely(o,e);for(let e=0,n=t.length;e0?(this.tree.remove(t),r.push(e)):(this.segments.push(t),t.prev=o)}else{if(o&&i){const e=o.getIntersection(i);if(null!==e){if(!o.isAnEndpoint(e)){const t=this._splitSafely(o,e);for(let e=0,n=t.length;eX)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const i=new q(o);let a=o.size,s=o.pop();for(;s;){const e=s.key;if(o.size===a){const t=e.segment;throw new Error(`Unable to pop() ${e.isLeft?"left":"right"} SweepEvent [${e.point.x}, ${e.point.y}] from segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] from queue.`)}if(o.size>X)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(i.segments.length>Z)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const t=i.process(e);for(let e=0,r=t.length;e1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("Istr"),o=r("82gj"),i=r("/ekA"),a=r("s1vs");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(a),c=function(e,t,r){return Math.min(Math.max(r,e),t)};var u=12;function d(e,t){return e*Math.sqrt(1-t*t)}var f=["duration","bounce"],p=["stiffness","damping","mass"];function h(e,t){return t.some((function(t){return void 0!==e[t]}))}function m(e){var t=e.from,r=void 0===t?0:t,i=e.to,a=void 0===i?1:i,s=e.restSpeed,l=void 0===s?2:s,m=e.restDelta,y=n.__rest(e,["from","to","restSpeed","restDelta"]),v={done:!1,value:r},b=function(e){var t=n.__assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!h(e,p)&&h(e,f)){var r=function(e){var t,r,n=e.duration,i=void 0===n?800:n,a=e.bounce,s=void 0===a?.25:a,l=e.velocity,f=void 0===l?0:l,p=e.mass,h=void 0===p?1:p;o.warning(i<=1e4,"Spring duration must be 10 seconds or less");var m=1-s;m=c(.05,1,m),i=c(.01,10,i/1e3),m<1?(t=function(e){var t=e*m,r=t*i;return.001-(t-f)/d(e,m)*Math.exp(-r)},r=function(e){var r=e*m*i,n=r*f+f,o=Math.pow(m,2)*Math.pow(e,2)*i,a=Math.exp(-r),s=d(Math.pow(e,2),m);return(.001-t(e)>0?-1:1)*((n-o)*a)/s}):(t=function(e){return Math.exp(-e*i)*((e-f)*i+1)-.001},r=function(e){return Math.exp(-e*i)*(i*i*(f-e))});var g=function(e,t,r){for(var n=r,o=1;o=S;else{var r=1e3*T(e),n=Math.abs(r)<=l,o=Math.abs(a-t)<=m;v.done=n&&o}return v.value=v.done?a:t,v},flipTarget:function(){var e;A=-A,r=(e=[a,r])[0],a=e[1],I()}}}m.needsInterpolation=function(e,t){return"string"==typeof e||"string"==typeof t};var g=function(e){return 0},y=function(e,t,r){var n=t-e;return 0===n?1:(r-e)/n},v=function(e,t,r){return-r*e+r*t+e},b=function(e,t,r){var n=e*e,o=t*t;return Math.sqrt(Math.max(0,r*(o-n)+n))},_=[i.hex,i.rgba,i.hsla],x=function(e){return _.find((function(t){return t.test(e)}))},w=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},A=function(e,t){var r=x(e),a=x(t);o.invariant(!!r,w(e)),o.invariant(!!a,w(t)),o.invariant(r.transform===a.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var s=r.parse(e),l=a.parse(t),c=n.__assign({},s),u=r===i.hsla?v:b;return function(e){for(var t in c)"alpha"!==t&&(c[t]=u(s[t],l[t],e));return c.alpha=v(s.alpha,l.alpha,e),r.transform(c)}},S={x:0,y:0,z:0},C=function(e){return"number"==typeof e},E=function(e,t){return function(r){return t(e(r))}},T=function(){for(var e=[],t=0;t=a.numNumbers,"Complex values '"+e+"' and '"+t+"' too different to mix. Ensure all colors are of the same type."),T(k(n.parsed,a.parsed),r)},O=function(e,t){return function(r){return v(e,t,r)}};function L(e,t,r){var n=void 0===r?{}:r,a=n.clamp,s=void 0===a||a,l=n.ease,u=n.mixer,d=e.length;o.invariant(d===t.length,"Both input and output ranges must be the same length"),o.invariant(!l||!Array.isArray(l)||l.length===d-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[d-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var f=function(e,t,r){for(var n,o=[],a=r||("number"==typeof(n=e[0])?O:"string"==typeof n?i.color.test(n)?A:P:Array.isArray(n)?k:"object"==typeof n?M:void 0),s=e.length-1,l=0;l=e[n]&&(i=n-1,a=!0),!a){for(var s=1;so||s===n);s++);i=s-1}var l=y(e[i],e[i+1],o);return t[i](l)}}(e,f);return s?function(t){return p(c(e[0],e[d-1],t))}:p}var D=function(e){return function(t){return 1-e(1-t)}},N=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},F=function(e){return function(t){return Math.pow(t,e)}},z=function(e){return function(t){return t*t*((e+1)*t-e)}},B=function(e){var t=z(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}},j=4/11,U=8/11,$=function(e){return e},V=F(2),G=D(V),H=N(V),W=function(e){return 1-Math.sin(Math.acos(e))},q=D(W),X=N(q),Z=z(1.525),Y=D(Z),K=N(Z),J=B(1.525),Q=4356/361,ee=35442/1805,te=16061/1805,re=function(e){if(1===e||0===e)return e;var t=e*e;return e=l,c},flipTarget:function(){u.reverse(),p=f()}}}function ae(e){var t=e.velocity,r=void 0===t?0:t,n=e.from,o=void 0===n?0:n,i=e.power,a=void 0===i?.8:i,s=e.timeConstant,l=void 0===s?350:s,c=e.restDelta,u=void 0===c?.5:c,d=e.modifyTarget,f={done:!1,value:o},p=a*r,h=o+p,m=void 0===d?h:d(h);return m!==h&&(p=m-o),{next:function(e){var t=-p*Math.exp(-e/l);return f.done=!(t>u||t<-u),f.value=f.done?m:m+t,f},flipTarget:function(){}}}var se={keyframes:ie,spring:m,decay:ae};function le(e,t,r){return void 0===r&&(r=0),e-t-r}var ce=function(e){var t=function(t){var r=t.delta;return e(r)};return{start:function(){return l.default.update(t,!0)},stop:function(){return a.cancelSync.update(t)}}};function ue(e){var t,r,o,i,a,s=e.from,l=e.autoplay,c=void 0===l||l,u=e.driver,d=void 0===u?ce:u,f=e.elapsed,p=void 0===f?0:f,h=e.repeat,g=void 0===h?0:h,y=e.repeatType,v=void 0===y?"loop":y,b=e.repeatDelay,_=void 0===b?0:b,x=e.onPlay,w=e.onStop,A=e.onComplete,S=e.onRepeat,C=e.onUpdate,E=n.__rest(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),T=E.to,I=0,k=E.duration,M=!1,R=!0,P=function(e){if(Array.isArray(e.to))return ie;if(se[e.type])return se[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?ie:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?m:ie}(E);(null===(r=(t=P).needsInterpolation)||void 0===r?void 0:r.call(t,s,T))&&(a=L([0,100],[s,T],{clamp:!1}),s=0,T=100);var O=P(n.__assign(n.__assign({},E),{from:s,to:T}));return c&&(null==x||x(),(o=d((function(e){if(R||(e=-e),p+=e,!M){var t=O.next(Math.max(0,p));i=t.value,a&&(i=a(i)),M=R?t.done:p<=0}null==C||C(i),M&&(0===I&&(null!=k||(k=p)),I=t+r:e<=-r}(p,k,_,R)&&(I++,"reverse"===v?p=function(e,t,r,n){return void 0===r&&(r=0),void 0===n&&(n=!0),n?le(t+-e,t,r):t-(e-t)+r}(p,k,_,R=I%2==0):(p=le(p,k,_),"mirror"===v&&O.flipTarget()),M=!1,S&&S()):(o.stop(),A&&A()))}))).start()),{stop:function(){null==w||w(),o.stop()}}}function de(e,t){return t?e*(1e3/t):0}var fe=function(e){return 180*e/Math.PI},pe=function(e){return e},he=function(e){return void 0===e&&(e=pe),function(t,r,n){var o=r-n,i=-(0-t+1)*(0-e(Math.abs(o)));return o<=0?r+i:r-i}},me=he(),ge=he(Math.sqrt),ye=function(e){return e*Math.PI/180},ve=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},be=function(e){return ve(e)&&e.hasOwnProperty("z")},_e=function(e,t){return Math.abs(e-t)},xe=function(e,t){return void 0===t&&(t=2),t=Math.pow(10,t),Math.round(e*t)/t},we=function(e,t,r,n){return void 0===n&&(n=0),xe(e+r*(t-e)/Math.max(n,r))},Ae=function(e,t){return 1-3*t+3*e},Se=function(e,t){return 3*t-6*e},Ce=function(e){return 3*e},Ee=function(e,t,r){return((Ae(t,r)*e+Se(t,r))*e+Ce(t))*e},Te=function(e,t,r){return 3*Ae(t,r)*e*e+2*Se(t,r)*e+Ce(t)},Ie=.1;t.angle=function(e,t){return void 0===t&&(t=S),fe(Math.atan2(t.y-e.y,t.x-e.x))},t.animate=ue,t.anticipate=J,t.applyOffset=function(e,t){var r=!0;return void 0===t&&(t=e,r=!1),function(n){return r?n-e+t:(e=n,r=!0,t)}},t.attract=me,t.attractExpo=ge,t.backIn=Z,t.backInOut=K,t.backOut=Y,t.bounceIn=ne,t.bounceInOut=function(e){return e<.5?.5*(1-re(1-2*e)):.5*re(2*e-1)+.5},t.bounceOut=re,t.circIn=W,t.circInOut=X,t.circOut=q,t.clamp=c,t.createAnticipate=B,t.createAttractor=he,t.createBackIn=z,t.createExpoIn=F,t.cubicBezier=function(e,t,r,n){if(e===t&&r===n)return $;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=Ee(i*Ie,e,r);return function(i){return 0===i||1===i?i:Ee(function(t){for(var n=0,i=1;10!==i&&o[i]<=t;++i)n+=Ie;--i;var a=n+(t-o[i])/(o[i+1]-o[i])*Ie,s=Te(a,e,r);return s>=.001?function(e,t,r,n){for(var o=0;o<8;++o){var i=Te(t,r,n);if(0===i)return t;t-=(Ee(t,r,n)-e)/i}return t}(t,a,e,r):0===s?a:function(e,t,r,n,o){var i,a,s=0;do{(i=Ee(a=t+(r-t)/2,n,o)-e)>0?r=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,n,n+Ie,e,r)}(i),t,n)}},t.decay=ae,t.degreesToRadians=ye,t.distance=function(e,t){if(C(e)&&C(t))return _e(e,t);if(ve(e)&&ve(t)){var r=_e(e.x,t.x),n=_e(e.y,t.y),o=be(e)&&be(t)?_e(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}},t.easeIn=V,t.easeInOut=H,t.easeOut=G,t.inertia=function(e){var t,r=e.from,o=void 0===r?0:r,i=e.velocity,s=void 0===i?0:i,l=e.min,c=e.max,u=e.power,d=void 0===u?.8:u,f=e.timeConstant,p=void 0===f?750:f,h=e.bounceStiffness,m=void 0===h?500:h,g=e.bounceDamping,y=void 0===g?10:g,v=e.restDelta,b=void 0===v?1:v,_=e.modifyTarget,x=e.driver,w=e.onUpdate,A=e.onComplete;function S(e){return void 0!==l&&ec}function C(e){return void 0===l?c:void 0===c||Math.abs(l-e)R||-1===P&&eo)return e[t-1];if(t===r-1)return i;o=a}}},t.spring=m,t.steps=function(e,t){return void 0===t&&(t="end"),function(r){var n=(r="end"===t?Math.min(r,.999):Math.max(r,.001))*e,o="end"===t?Math.floor(n):Math.ceil(n);return c(0,1,o/e)}},t.toDecimal=xe,t.velocityPerFrame=function(e,t){return e/(1e3/t)},t.velocityPerSecond=de,t.wrap=function(e,t,r){var n=t-e;return((r-e)%n+n)%n+e}},"8oxB":e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,u=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u1)for(var r=1;r{"use strict";var n=r("WbBG");function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},"17x9":(e,t,r)=>{e.exports=r("16Al")()},WbBG:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},Ficz:(e,t,r)=>{"use strict";function n(e,t,r,n,i){o(e,t,r||0,n||e.length-1,i||a)}function o(e,t,r,n,a){for(;n>r;){if(n-r>600){var s=n-r+1,l=t-r+1,c=Math.log(s),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);o(e,t,Math.max(r,Math.floor(t-l*u/s+d)),Math.min(n,Math.floor(t+(s-l)*u/s+d)),a)}var f=e[t],p=r,h=n;for(i(e,r,t),a(e[n],f)>0&&i(e,r,n);p0;)h--}0===a(e[r],f)?i(e,r,h):i(e,++h,n),h<=t&&(r=h+1),t<=h&&(n=h-1)}}function i(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function a(e,t){return et?1:0}r.r(t),r.d(t,{default:()=>n})},"A1R+":(e,t,r)=>{"use strict";e.exports=o,e.exports.default=o;var n=r("Ficz");function o(e,t){if(!(this instanceof o))return new o(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function i(e,t,r){if(!r)return t.indexOf(e);for(var n=0;n=e.minX&&t.maxY>=e.minY}function m(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,t,r,o,i){for(var a,s=[t,r];s.length;)(r=s.pop())-(t=s.pop())<=o||(a=t+Math.ceil((r-t)/o/2)*o,n(e,a,t,r,i),s.push(t,a,a,r))}o.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,r=[],n=this.toBBox;if(!h(e,t))return r;for(var o,i,a,s,l=[];t;){for(o=0,i=t.children.length;o=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(o,i,t)},_split:function(e,t){var r=e[t],n=r.children.length,o=this._minEntries;this._chooseSplitAxis(r,o,n);var i=this._chooseSplitIndex(r,o,n),s=m(r.children.splice(i,r.children.length-i));s.height=r.height,s.leaf=r.leaf,a(r,this.toBBox),a(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(r,s)},_splitRoot:function(e,t){this.data=m([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,r){var n,o,i,a,l,c,u,f,p,h,m,g,y,v;for(c=u=1/0,n=t;n<=r-t;n++)p=o=s(e,0,n,this.toBBox),h=i=s(e,n,r,this.toBBox),void 0,void 0,void 0,void 0,m=Math.max(p.minX,h.minX),g=Math.max(p.minY,h.minY),y=Math.min(p.maxX,h.maxX),v=Math.min(p.maxY,h.maxY),a=Math.max(0,y-m)*Math.max(0,v-g),l=d(o)+d(i),a=t;o--)i=e.children[o],l(u,e.leaf?a(i):i),d+=f(u);return d},_adjustParentBBoxes:function(e,t,r){for(var n=r;n>=0;n--)l(t[n],e)},_condense:function(e){for(var t,r=e.length-1;r>=0;r--)0===e[r].children.length?r>0?(t=e[r-1].children).splice(t.indexOf(e[r]),1):this.clear():a(e[r],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},"p/5y":(e,t,r)=>{"use strict";r.d(t,{M:()=>n});var n=(0,r("q1tI").createContext)({dragDropManager:void 0})},hpHf:(e,t,r)=>{"use strict";r.d(t,{Q:()=>Me});var n=r("nKUr"),o=r("q1tI"),i=r("aKzv"),a="dnd-core/INIT_COORDS",s="dnd-core/BEGIN_DRAG",l="dnd-core/PUBLISH_DRAG_SOURCE",c="dnd-core/HOVER",u="dnd-core/DROP",d="dnd-core/END_DRAG";function f(e,t){return{type:a,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e){return"object"===p(e)}var m={type:a,payload:{clientOffset:null,sourceClientOffset:null}};function g(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},n=r.publishSource,o=void 0===n||n,a=r.clientOffset,l=r.getSourceClientOffset,c=e.getMonitor(),u=e.getRegistry();e.dispatch(f(a)),function(e,t,r){(0,i.V)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){(0,i.V)(r.getSource(e),"Expected sourceIds to be registered.")}))}(t,c,u);var d=function(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}(t,c);if(null!==d){var p=null;if(a){if(!l)throw new Error("getSourceClientOffset must be defined");!function(e){(0,i.V)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(l),p=l(d)}e.dispatch(f(a,p));var g=u.getSource(d).beginDrag(c,d);if(null!=g){!function(e){(0,i.V)(h(e),"Item must be an object.")}(g),u.pinSource(d);var y=u.getSourceType(d);return{type:s,payload:{itemType:y,item:g,sourceId:d,clientOffset:a||null,sourceClientOffset:p||null,isSourcePublic:!!o}}}}else e.dispatch(m)}}function y(e){return function(){if(e.getMonitor().isDragging())return{type:l}}}function v(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function b(e){return function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).clientOffset;!function(e){(0,i.V)(Array.isArray(e),"Expected targetIds to be an array.")}(t);var n=t.slice(0),o=e.getMonitor(),a=e.getRegistry();return function(e,t,r){(0,i.V)(t.isDragging(),"Cannot call hover while not dragging."),(0,i.V)(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n=0;n--){var o=e[n];v(t.getTargetType(o),r)||e.splice(n,1)}}(n,a,o.getItemType()),function(e,t,r){e.forEach((function(e){r.getTarget(e).hover(t,e)}))}(n,o,a),{type:c,payload:{targetIds:n,clientOffset:r||null}}}}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},r=e.getMonitor(),n=e.getRegistry();!function(e){(0,i.V)(e.isDragging(),"Cannot call drop while not dragging."),(0,i.V)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(r);var o=function(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(r);o.forEach((function(o,a){var s=function(e,t,r,n){var o=r.getTarget(e),a=o?o.drop(n,e):void 0;return function(e){(0,i.V)(void 0===e||h(e),"Drop result must either be an object or undefined.")}(a),void 0===a&&(a=0===t?{}:n.getDropResult()),a}(o,a,n,r),l={type:u,payload:{dropResult:x(x({},t),s)}};e.dispatch(l)}))}}function S(e){return function(){var t=e.getMonitor(),r=e.getRegistry();!function(e){(0,i.V)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var n=t.getSourceId();return null!=n&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:d}}}function C(e,t){for(var r=0;r0;n.backend&&(e&&!n.isSetUp?(n.backend.setup(),n.isSetUp=!0):!e&&n.isSetUp&&(n.backend.teardown(),n.isSetUp=!1))})),this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}var t,r;return t=e,r=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,r=function(e){return{beginDrag:g(e),publishDragSource:y(e),hover:b(e),drop:A(e),endDrag:S(e)}}(this);return Object.keys(r).reduce((function(n,o){var i,a=r[o];return n[o]=(i=a,function(){for(var r=arguments.length,n=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:F,n=arguments.length>1?arguments[1]:void 0,o=n.payload;switch(n.type){case a:case s:return{initialSourceClientOffset:o.sourceClientOffset,initialClientOffset:o.clientOffset,clientOffset:o.clientOffset};case c:return e=r.clientOffset,t=o.clientOffset,!e&&!t||e&&t&&e.x===t.x&&e.y===t.y?r:D(D({},r),{},{clientOffset:o.clientOffset});case d:case u:return F;default:return r}}var B="dnd-core/ADD_SOURCE",j="dnd-core/ADD_TARGET",U="dnd-core/REMOVE_SOURCE",$="dnd-core/REMOVE_TARGET";function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function G(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:W,n=arguments.length>1?arguments[1]:void 0,o=n.payload;switch(n.type){case s:return G(G({},r),{},{itemType:o.itemType,item:o.item,sourceId:o.sourceId,isSourcePublic:o.isSourcePublic,dropResult:null,didDrop:!1});case l:return G(G({},r),{},{isSourcePublic:!0});case c:return G(G({},r),{},{targetIds:o.targetIds});case $:return-1===r.targetIds.indexOf(o.targetId)?r:G(G({},r),{},{targetIds:(e=r.targetIds,t=o.targetId,e.filter((function(e){return e!==t})))});case u:return G(G({},r),{},{dropResult:o.dropResult,didDrop:!0,targetIds:[]});case d:return G(G({},r),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return r}}function X(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case B:case j:return e+1;case U:case $:return e-1;default:return e}}var Z=[],Y=[];function K(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case c:break;case B:case j:case $:case U:return Z;default:return Y}var t=e.payload,r=t.targetIds,n=void 0===r?[]:r,o=t.prevTargetIds,i=void 0===o?[]:o,a=function(e,t){var r=new Map,n=function(e){r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);var o=[];return r.forEach((function(e,t){1===e&&o.push(t)})),o}(n,i),s=a.length>0||!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O;if(e.length!==t.length)return!1;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0)+1}function Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:K(r.dirtyHandlerIds,{type:n.type,payload:ee(ee({},n.payload),{},{prevTargetIds:(e=r,t=[],"dragOperation.targetIds".split(".").reduce((function(e,r){return e&&e[r]?e[r]:t||null}),e))})}),dragOffset:z(r.dragOffset,n),refCount:X(r.refCount,n),dragOperation:q(r.dragOperation,n),stateId:J(r.stateId)}}function ne(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oe(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0}).handlerIds;(0,i.V)("function"==typeof e,"listener must be a function."),(0,i.V)(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var n=this.store.getState().stateId;return this.store.subscribe((function(){var o=t.store.getState(),i=o.stateId;try{var a=i===n||i===n+1&&!function(e,t){return e!==Z&&(e===Y||void 0===t||(r=e,t.filter((function(e){return r.indexOf(e)>-1}))).length>0);var r}(o.dirtyHandlerIds,r);a||e()}finally{n=i}}))}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,i.V)("function"==typeof e,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe((function(){var n=t.store.getState().dragOffset;n!==r&&(r=n,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return(0,i.V)(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return(0,i.V)(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&v(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return(0,i.V)(t,"Expected to find a valid source. sourceId=".concat(e)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){if(!e)return!1;var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1}).shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),n=this.getItemType();if(n&&!v(r,n))return!1;var o=this.getTargetIds();if(!o.length)return!1;var i=o.indexOf(e);return t?i===o.length-1:i>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return n=(e=this.store.getState().dragOffset).clientOffset,o=e.initialClientOffset,i=e.initialSourceClientOffset,n&&o&&i?ne((r=i,{x:(t=n).x+r.x,y:t.y+r.y}),o):null;var e,t,r,n,o,i}},{key:"getDifferenceFromInitialOffset",value:function(){return t=(e=this.store.getState().dragOffset).clientOffset,r=e.initialClientOffset,t&&r?ne(t,r):null;var e,t,r}}],r&&oe(t.prototype,r),e}(),le=0;function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function ue(e,t){t&&Array.isArray(e)?e.forEach((function(e){return ue(e,!1)})):(0,i.V)("string"==typeof e||"symbol"===ce(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(ae||(ae={}));const de="undefined"!=typeof global?global:self,fe=de.MutationObserver||de.WebKitMutationObserver;function pe(e){return function(){const t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}const he="function"==typeof fe?function(e){let t=1;const r=new fe(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}:pe;class me{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const ge=new class{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.indexthis.capacity){for(let t=0,r=e.length-this.index;t{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=he(this.flush),this.requestErrorThrow=pe((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},ye=new class{create(e){const t=this.freeTasks,r=t.length?t.pop():new me(this.onError,(e=>t[t.length]=e));return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}(ge.registerPendingError);function ve(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]&&arguments[1];return(0,i.V)(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}},{key:"getTarget",value:function(e){return(0,i.V)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return(0,i.V)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return(0,i.V)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return xe(e)===ae.SOURCE}},{key:"isTargetId",value:function(e){return xe(e)===ae.TARGET}},{key:"removeSource",value:function(e){var t,r=this;(0,i.V)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:U,payload:{sourceId:e}}}(e)),t=function(){r.dragSources.delete(e),r.types.delete(e)},ge.enqueueTask(ye.create(t))}},{key:"removeTarget",value:function(e){(0,i.V)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:$,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);(0,i.V)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){(0,i.V)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,r){var n=function(e){var t=(le++).toString();switch(e){case ae.SOURCE:return"S".concat(t);case ae.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}(e);return this.types.set(n,t),e===ae.SOURCE?this.dragSources.set(n,r):e===ae.TARGET&&this.dropTargets.set(n,r),n}}],r&&ve(t.prototype,r),e}();function Se(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(t=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__,P(re,t&&r&&r({name:"dnd-core",instanceId:"dnd-core"}))),a=new se(i,new Ae(i)),s=new T(i,a),l=e(s,n,o);return s.receiveBackend(l),s}var Ce=r("p/5y"),Ee=["children"];function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:Re(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=t;return o[ke]||(o[ke]={dragDropManager:Se(e,t,r,n)}),o[ke]}(e.backend,e.context,e.options,e.debugMode);return[t,!e.context]}(function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Ee)),s=(r=2,function(e){if(Array.isArray(e))return e}(t=a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Te(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Te(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=s[0],c=s[1];return(0,o.useEffect)((function(){if(c){var e=Re();return++Ie,function(){0==--Ie&&(e[ke]=null)}}}),[]),(0,n.jsx)(Ce.M.Provider,Object.assign({value:l},{children:i}),void 0)}));function Re(){return void 0!==r.g?r.g:window}},yl30:(e,t,r)=>{"use strict";var n=r("q1tI"),o=r("MgzW"),i=r("QCnb");function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r