jmapcloud-jakartowns 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,154 @@
1
+ !function(){var u,Xe,Wt={5655:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return ns}});var In=function(){function StyleSheet(u){var Xe=this;this._insertTag=function(u){var Wt;Wt=0===Xe.tags.length?Xe.insertionPoint?Xe.insertionPoint.nextSibling:Xe.prepend?Xe.container.firstChild:Xe.before:Xe.tags[Xe.tags.length-1].nextSibling,Xe.container.insertBefore(u,Wt),Xe.tags.push(u)},this.isSpeedy=void 0===u.speedy||u.speedy,this.tags=[],this.ctr=0,this.nonce=u.nonce,this.key=u.key,this.container=u.container,this.prepend=u.prepend,this.insertionPoint=u.insertionPoint,this.before=null}var u=StyleSheet.prototype;return u.hydrate=function hydrate(u){u.forEach(this._insertTag)},u.insert=function insert(u){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function createStyleElement(u){var Xe=document.createElement("style");return Xe.setAttribute("data-emotion",u.key),void 0!==u.nonce&&Xe.setAttribute("nonce",u.nonce),Xe.appendChild(document.createTextNode("")),Xe.setAttribute("data-s",""),Xe}(this));var Xe=this.tags[this.tags.length-1];if(this.isSpeedy){var Wt=function sheetForTag(u){if(u.sheet)return u.sheet;for(var Xe=0;Xe<document.styleSheets.length;Xe++)if(document.styleSheets[Xe].ownerNode===u)return document.styleSheets[Xe]}(Xe);try{Wt.insertRule(u,Wt.cssRules.length)}catch(u){}}else Xe.appendChild(document.createTextNode(u));this.ctr++},u.flush=function flush(){this.tags.forEach((function(u){var Xe;return null==(Xe=u.parentNode)?void 0:Xe.removeChild(u)})),this.tags=[],this.ctr=0},StyleSheet}(),fr=Math.abs,_r=String.fromCharCode,wr=Object.assign;function trim(u){return u.trim()}function Utility_replace(u,Xe,Wt){return u.replace(Xe,Wt)}function indexof(u,Xe){return u.indexOf(Xe)}function Utility_charat(u,Xe){return 0|u.charCodeAt(Xe)}function Utility_substr(u,Xe,Wt){return u.slice(Xe,Wt)}function Utility_strlen(u){return u.length}function Utility_sizeof(u){return u.length}function Utility_append(u,Xe){return Xe.push(u),u}var Ar=1,Kr=1,no=0,io=0,oo=0,ao="";function node(u,Xe,Wt,In,fr,_r,wr){return{value:u,root:Xe,parent:Wt,type:In,props:fr,children:_r,line:Ar,column:Kr,length:wr,return:""}}function Tokenizer_copy(u,Xe){return wr(node("",null,null,"",null,null,0),u,{length:-u.length},Xe)}function prev(){return oo=io>0?Utility_charat(ao,--io):0,Kr--,10===oo&&(Kr=1,Ar--),oo}function next(){return oo=io<no?Utility_charat(ao,io++):0,Kr++,10===oo&&(Kr=1,Ar++),oo}function peek(){return Utility_charat(ao,io)}function caret(){return io}function slice(u,Xe){return Utility_substr(ao,u,Xe)}function token(u){switch(u){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(u){return Ar=Kr=1,no=Utility_strlen(ao=u),io=0,[]}function dealloc(u){return ao="",u}function delimit(u){return trim(slice(io-1,delimiter(91===u?u+2:40===u?u+1:u)))}function whitespace(u){for(;(oo=peek())&&oo<33;)next();return token(u)>2||token(oo)>3?"":" "}function escaping(u,Xe){for(;--Xe&&next()&&!(oo<48||oo>102||oo>57&&oo<65||oo>70&&oo<97););return slice(u,caret()+(Xe<6&&32==peek()&&32==next()))}function delimiter(u){for(;next();)switch(oo){case u:return io;case 34:case 39:34!==u&&39!==u&&delimiter(oo);break;case 40:41===u&&delimiter(u);break;case 92:next()}return io}function commenter(u,Xe){for(;next()&&u+oo!==57&&(u+oo!==84||47!==peek()););return"/*"+slice(Xe,io-1)+"*"+_r(47===u?u:next())}function identifier(u){for(;!token(peek());)next();return slice(u,io)}var so="-ms-",co="-moz-",ho="-webkit-",go="comm",xo="rule",ko="decl",Co="@keyframes";function Serializer_serialize(u,Xe){for(var Wt="",In=Utility_sizeof(u),fr=0;fr<In;fr++)Wt+=Xe(u[fr],fr,u,Xe)||"";return Wt}function stringify(u,Xe,Wt,In){switch(u.type){case"@layer":if(u.children.length)break;case"@import":case ko:return u.return=u.return||u.value;case go:return"";case Co:return u.return=u.value+"{"+Serializer_serialize(u.children,In)+"}";case xo:u.value=u.props.join(",")}return Utility_strlen(Wt=Serializer_serialize(u.children,In))?u.return=u.value+"{"+Wt+"}":""}function compile(u){return dealloc(parse("",null,null,null,[""],u=alloc(u),0,[0],u))}function parse(u,Xe,Wt,In,fr,wr,Ar,Kr,no){for(var io=0,oo=0,ao=Ar,so=0,co=0,ho=0,go=1,xo=1,ko=1,Co=0,Io="",zo=fr,Bo=wr,ca=In,ua=Io;xo;)switch(ho=Co,Co=next()){case 40:if(108!=ho&&58==Utility_charat(ua,ao-1)){-1!=indexof(ua+=Utility_replace(delimit(Co),"&","&\f"),"&\f")&&(ko=-1);break}case 34:case 39:case 91:ua+=delimit(Co);break;case 9:case 10:case 13:case 32:ua+=whitespace(ho);break;case 92:ua+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:Utility_append(comment(commenter(next(),caret()),Xe,Wt),no);break;default:ua+="/"}break;case 123*go:Kr[io++]=Utility_strlen(ua)*ko;case 125*go:case 59:case 0:switch(Co){case 0:case 125:xo=0;case 59+oo:-1==ko&&(ua=Utility_replace(ua,/\f/g,"")),co>0&&Utility_strlen(ua)-ao&&Utility_append(co>32?declaration(ua+";",In,Wt,ao-1):declaration(Utility_replace(ua," ","")+";",In,Wt,ao-2),no);break;case 59:ua+=";";default:if(Utility_append(ca=ruleset(ua,Xe,Wt,io,oo,fr,Kr,Io,zo=[],Bo=[],ao),wr),123===Co)if(0===oo)parse(ua,Xe,ca,ca,zo,wr,ao,Kr,Bo);else switch(99===so&&110===Utility_charat(ua,3)?100:so){case 100:case 108:case 109:case 115:parse(u,ca,ca,In&&Utility_append(ruleset(u,ca,ca,0,0,fr,Kr,Io,fr,zo=[],ao),Bo),fr,Bo,ao,Kr,In?zo:Bo);break;default:parse(ua,ca,ca,ca,[""],Bo,0,Kr,Bo)}}io=oo=co=0,go=ko=1,Io=ua="",ao=Ar;break;case 58:ao=1+Utility_strlen(ua),co=ho;default:if(go<1)if(123==Co)--go;else if(125==Co&&0==go++&&125==prev())continue;switch(ua+=_r(Co),Co*go){case 38:ko=oo>0?1:(ua+="\f",-1);break;case 44:Kr[io++]=(Utility_strlen(ua)-1)*ko,ko=1;break;case 64:45===peek()&&(ua+=delimit(next())),so=peek(),oo=ao=Utility_strlen(Io=ua+=identifier(caret())),Co++;break;case 45:45===ho&&2==Utility_strlen(ua)&&(go=0)}}return wr}function ruleset(u,Xe,Wt,In,_r,wr,Ar,Kr,no,io,oo){for(var ao=_r-1,so=0===_r?wr:[""],co=Utility_sizeof(so),ho=0,go=0,ko=0;ho<In;++ho)for(var Co=0,Io=Utility_substr(u,ao+1,ao=fr(go=Ar[ho])),zo=u;Co<co;++Co)(zo=trim(go>0?so[Co]+" "+Io:Utility_replace(Io,/&\f/g,so[Co])))&&(no[ko++]=zo);return node(u,Xe,Wt,0===_r?xo:Kr,no,io,oo)}function comment(u,Xe,Wt){return node(u,Xe,Wt,go,_r(function Tokenizer_char(){return oo}()),Utility_substr(u,2,-2),0)}function declaration(u,Xe,Wt,In){return node(u,Xe,Wt,ko,Utility_substr(u,0,In),Utility_substr(u,In+1,-1),In)}var Io=function identifierWithPointTracking(u,Xe,Wt){for(var In=0,fr=0;In=fr,fr=peek(),38===In&&12===fr&&(Xe[Wt]=1),!token(fr);)next();return slice(u,io)},zo=function getRules(u,Xe){return dealloc(function toRules(u,Xe){var Wt=-1,In=44;do{switch(token(In)){case 0:38===In&&12===peek()&&(Xe[Wt]=1),u[Wt]+=Io(io-1,Xe,Wt);break;case 2:u[Wt]+=delimit(In);break;case 4:if(44===In){u[++Wt]=58===peek()?"&\f":"",Xe[Wt]=u[Wt].length;break}default:u[Wt]+=_r(In)}}while(In=next());return u}(alloc(u),Xe))},Bo=new WeakMap,ca=function compat(u){if("rule"===u.type&&u.parent&&!(u.length<1)){for(var Xe=u.value,Wt=u.parent,In=u.column===Wt.column&&u.line===Wt.line;"rule"!==Wt.type;)if(!(Wt=Wt.parent))return;if((1!==u.props.length||58===Xe.charCodeAt(0)||Bo.get(Wt))&&!In){Bo.set(u,!0);for(var fr=[],_r=zo(Xe,fr),wr=Wt.props,Ar=0,Kr=0;Ar<_r.length;Ar++)for(var no=0;no<wr.length;no++,Kr++)u.props[Kr]=fr[Ar]?_r[Ar].replace(/&\f/g,wr[no]):wr[no]+" "+_r[Ar]}}},ua=function removeLabel(u){if("decl"===u.type){var Xe=u.value;108===Xe.charCodeAt(0)&&98===Xe.charCodeAt(2)&&(u.return="",u.value="")}};function emotion_cache_browser_esm_prefix(u,Xe){switch(function hash(u,Xe){return 45^Utility_charat(u,0)?(((Xe<<2^Utility_charat(u,0))<<2^Utility_charat(u,1))<<2^Utility_charat(u,2))<<2^Utility_charat(u,3):0}(u,Xe)){case 5103:return ho+"print-"+u+u;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ho+u+u;case 5349:case 4246:case 4810:case 6968:case 2756:return ho+u+co+u+so+u+u;case 6828:case 4268:return ho+u+so+u+u;case 6165:return ho+u+so+"flex-"+u+u;case 5187:return ho+u+Utility_replace(u,/(\w+).+(:[^]+)/,ho+"box-$1$2"+so+"flex-$1$2")+u;case 5443:return ho+u+so+"flex-item-"+Utility_replace(u,/flex-|-self/,"")+u;case 4675:return ho+u+so+"flex-line-pack"+Utility_replace(u,/align-content|flex-|-self/,"")+u;case 5548:return ho+u+so+Utility_replace(u,"shrink","negative")+u;case 5292:return ho+u+so+Utility_replace(u,"basis","preferred-size")+u;case 6060:return ho+"box-"+Utility_replace(u,"-grow","")+ho+u+so+Utility_replace(u,"grow","positive")+u;case 4554:return ho+Utility_replace(u,/([^-])(transform)/g,"$1"+ho+"$2")+u;case 6187:return Utility_replace(Utility_replace(Utility_replace(u,/(zoom-|grab)/,ho+"$1"),/(image-set)/,ho+"$1"),u,"")+u;case 5495:case 3959:return Utility_replace(u,/(image-set\([^]*)/,ho+"$1$`$1");case 4968:return Utility_replace(Utility_replace(u,/(.+:)(flex-)?(.*)/,ho+"box-pack:$3"+so+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ho+u+u;case 4095:case 3583:case 4068:case 2532:return Utility_replace(u,/(.+)-inline(.+)/,ho+"$1$2")+u;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Utility_strlen(u)-1-Xe>6)switch(Utility_charat(u,Xe+1)){case 109:if(45!==Utility_charat(u,Xe+4))break;case 102:return Utility_replace(u,/(.+:)(.+)-([^]+)/,"$1"+ho+"$2-$3$1"+co+(108==Utility_charat(u,Xe+3)?"$3":"$2-$3"))+u;case 115:return~indexof(u,"stretch")?emotion_cache_browser_esm_prefix(Utility_replace(u,"stretch","fill-available"),Xe)+u:u}break;case 4949:if(115!==Utility_charat(u,Xe+1))break;case 6444:switch(Utility_charat(u,Utility_strlen(u)-3-(~indexof(u,"!important")&&10))){case 107:return Utility_replace(u,":",":"+ho)+u;case 101:return Utility_replace(u,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ho+(45===Utility_charat(u,14)?"inline-":"")+"box$3$1"+ho+"$2$3$1"+so+"$2box$3")+u}break;case 5936:switch(Utility_charat(u,Xe+11)){case 114:return ho+u+so+Utility_replace(u,/[svh]\w+-[tblr]{2}/,"tb")+u;case 108:return ho+u+so+Utility_replace(u,/[svh]\w+-[tblr]{2}/,"tb-rl")+u;case 45:return ho+u+so+Utility_replace(u,/[svh]\w+-[tblr]{2}/,"lr")+u}return ho+u+so+u+u}return u}var Da=[function prefixer(u,Xe,Wt,In){if(u.length>-1&&!u.return)switch(u.type){case ko:u.return=emotion_cache_browser_esm_prefix(u.value,u.length);break;case Co:return Serializer_serialize([Tokenizer_copy(u,{value:Utility_replace(u.value,"@","@"+ho)})],In);case xo:if(u.length)return function Utility_combine(u,Xe){return u.map(Xe).join("")}(u.props,(function(Xe){switch(function Utility_match(u,Xe){return(u=Xe.exec(u))?u[0]:u}(Xe,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Serializer_serialize([Tokenizer_copy(u,{props:[Utility_replace(Xe,/:(read-\w+)/,":-moz-$1")]})],In);case"::placeholder":return Serializer_serialize([Tokenizer_copy(u,{props:[Utility_replace(Xe,/:(plac\w+)/,":"+ho+"input-$1")]}),Tokenizer_copy(u,{props:[Utility_replace(Xe,/:(plac\w+)/,":-moz-$1")]}),Tokenizer_copy(u,{props:[Utility_replace(Xe,/:(plac\w+)/,so+"input-$1")]})],In)}return""}))}}],ns=function createCache(u){var Xe=u.key;if("css"===Xe){var Wt=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(Wt,(function(u){-1!==u.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(u),u.setAttribute("data-s",""))}))}var fr,_r,wr=u.stylisPlugins||Da,Ar={},Kr=[];fr=u.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+Xe+' "]'),(function(u){for(var Xe=u.getAttribute("data-emotion").split(" "),Wt=1;Wt<Xe.length;Wt++)Ar[Xe[Wt]]=!0;Kr.push(u)}));var no,io,oo=[stringify,(io=function(u){no.insert(u)},function(u){u.root||(u=u.return)&&io(u)})],ao=function middleware(u){var Xe=Utility_sizeof(u);return function(Wt,In,fr,_r){for(var wr="",Ar=0;Ar<Xe;Ar++)wr+=u[Ar](Wt,In,fr,_r)||"";return wr}}([ca,ua].concat(wr,oo));_r=function insert(u,Xe,Wt,In){no=Wt,function stylis(u){Serializer_serialize(compile(u),ao)}(u?u+"{"+Xe.styles+"}":Xe.styles),In&&(so.inserted[Xe.name]=!0)};var so={key:Xe,sheet:new In({key:Xe,container:fr,nonce:u.nonce,speedy:u.speedy,prepend:u.prepend,insertionPoint:u.insertionPoint}),nonce:u.nonce,inserted:Ar,registered:{},insert:_r};return so.sheet.hydrate(Kr),so}},6289:function(u,Xe,Wt){"use strict";function memoize(u){var Xe=Object.create(null);return function(Wt){return void 0===Xe[Wt]&&(Xe[Wt]=u(Wt)),Xe[Wt]}}Wt.d(Xe,{A:function(){return memoize}})},9898:function(u,Xe,Wt){"use strict";Wt.d(Xe,{C:function(){return Kr},T:function(){return io},a:function(){return ao},w:function(){return no}});var In=Wt(6540),fr=Wt(5655),_r=Wt(8168),wr=function weakMemoize(u){var Xe=new WeakMap;return function(Wt){if(Xe.has(Wt))return Xe.get(Wt);var In=u(Wt);return Xe.set(Wt,In),In}},Ar=(Wt(3174),Wt(1287),In.createContext("undefined"!=typeof HTMLElement?(0,fr.A)({key:"css"}):null)),Kr=Ar.Provider,no=function withEmotionCache(u){return(0,In.forwardRef)((function(Xe,Wt){var fr=(0,In.useContext)(Ar);return u(Xe,fr,Wt)}))},io=In.createContext({}),oo=wr((function(u){return wr((function(Xe){return function getTheme(u,Xe){return"function"==typeof Xe?Xe(u):(0,_r.A)({},u,Xe)}(u,Xe)}))})),ao=function ThemeProvider(u){var Xe=In.useContext(io);return u.theme!==Xe&&(Xe=oo(Xe)(u.theme)),In.createElement(io.Provider,{value:Xe},u.children)}},7437:function(u,Xe,Wt){"use strict";Wt.d(Xe,{AH:function(){return css},i7:function(){return no},mL:function(){return Kr}});var In=Wt(9898),fr=Wt(6540),_r=Wt(41),wr=Wt(1287),Ar=Wt(3174),Kr=(Wt(5655),Wt(4146),(0,In.w)((function(u,Xe){var Wt=u.styles,Kr=(0,Ar.J)([Wt],void 0,fr.useContext(In.T)),no=fr.useRef();return(0,wr.i)((function(){var u=Xe.key+"-global",Wt=new Xe.sheet.constructor({key:u,nonce:Xe.sheet.nonce,container:Xe.sheet.container,speedy:Xe.sheet.isSpeedy}),In=!1,fr=document.querySelector('style[data-emotion="'+u+" "+Kr.name+'"]');return Xe.sheet.tags.length&&(Wt.before=Xe.sheet.tags[0]),null!==fr&&(In=!0,fr.setAttribute("data-emotion",u),Wt.hydrate([fr])),no.current=[Wt,In],function(){Wt.flush()}}),[Xe]),(0,wr.i)((function(){var u=no.current,Wt=u[0];if(u[1])u[1]=!1;else{if(void 0!==Kr.next&&(0,_r.sk)(Xe,Kr.next,!0),Wt.tags.length){var In=Wt.tags[Wt.tags.length-1].nextElementSibling;Wt.before=In,Wt.flush()}Xe.insert("",Kr,Wt,!1)}}),[Xe,Kr.name]),null})));function css(){for(var u=arguments.length,Xe=new Array(u),Wt=0;Wt<u;Wt++)Xe[Wt]=arguments[Wt];return(0,Ar.J)(Xe)}var no=function keyframes(){var u=css.apply(void 0,arguments),Xe="animation-"+u.name;return{name:Xe,styles:"@keyframes "+Xe+"{"+u.styles+"}",anim:1,toString:function toString(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},3174:function(u,Xe,Wt){"use strict";Wt.d(Xe,{J:function(){return serializeStyles}});var In={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},fr=Wt(6289),_r=!1,wr=/[A-Z]|^ms/g,Ar=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Kr=function isCustomProperty(u){return 45===u.charCodeAt(1)},no=function isProcessableValue(u){return null!=u&&"boolean"!=typeof u},io=(0,fr.A)((function(u){return Kr(u)?u:u.replace(wr,"-$&").toLowerCase()})),oo=function processStyleValue(u,Xe){switch(u){case"animation":case"animationName":if("string"==typeof Xe)return Xe.replace(Ar,(function(u,Xe,Wt){return so={name:Xe,styles:Wt,next:so},Xe}))}return 1===In[u]||Kr(u)||"number"!=typeof Xe||0===Xe?Xe:Xe+"px"},ao="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function handleInterpolation(u,Xe,Wt){if(null==Wt)return"";var In=Wt;if(void 0!==In.__emotion_styles)return In;switch(typeof Wt){case"boolean":return"";case"object":var fr=Wt;if(1===fr.anim)return so={name:fr.name,styles:fr.styles,next:so},fr.name;var wr=Wt;if(void 0!==wr.styles){var Ar=wr.next;if(void 0!==Ar)for(;void 0!==Ar;)so={name:Ar.name,styles:Ar.styles,next:so},Ar=Ar.next;return wr.styles+";"}return function createStringFromObject(u,Xe,Wt){var In="";if(Array.isArray(Wt))for(var fr=0;fr<Wt.length;fr++)In+=handleInterpolation(u,Xe,Wt[fr])+";";else for(var wr in Wt){var Ar=Wt[wr];if("object"!=typeof Ar){var Kr=Ar;null!=Xe&&void 0!==Xe[Kr]?In+=wr+"{"+Xe[Kr]+"}":no(Kr)&&(In+=io(wr)+":"+oo(wr,Kr)+";")}else{if("NO_COMPONENT_SELECTOR"===wr&&_r)throw new Error(ao);if(!Array.isArray(Ar)||"string"!=typeof Ar[0]||null!=Xe&&void 0!==Xe[Ar[0]]){var so=handleInterpolation(u,Xe,Ar);switch(wr){case"animation":case"animationName":In+=io(wr)+":"+so+";";break;default:In+=wr+"{"+so+"}"}}else for(var co=0;co<Ar.length;co++)no(Ar[co])&&(In+=io(wr)+":"+oo(wr,Ar[co])+";")}}return In}(u,Xe,Wt);case"function":if(void 0!==u){var Kr=so,co=Wt(u);return so=Kr,handleInterpolation(u,Xe,co)}}var ho=Wt;if(null==Xe)return ho;var go=Xe[ho];return void 0!==go?go:ho}var so,co=/label:\s*([^\s;{]+)\s*(;|$)/g;function serializeStyles(u,Xe,Wt){if(1===u.length&&"object"==typeof u[0]&&null!==u[0]&&void 0!==u[0].styles)return u[0];var In=!0,fr="";so=void 0;var _r=u[0];null==_r||void 0===_r.raw?(In=!1,fr+=handleInterpolation(Wt,Xe,_r)):fr+=_r[0];for(var wr=1;wr<u.length;wr++){if(fr+=handleInterpolation(Wt,Xe,u[wr]),In)fr+=_r[wr]}co.lastIndex=0;for(var Ar,Kr="";null!==(Ar=co.exec(fr));)Kr+="-"+Ar[1];var no=function murmur2(u){for(var Xe,Wt=0,In=0,fr=u.length;fr>=4;++In,fr-=4)Xe=1540483477*(65535&(Xe=255&u.charCodeAt(In)|(255&u.charCodeAt(++In))<<8|(255&u.charCodeAt(++In))<<16|(255&u.charCodeAt(++In))<<24))+(59797*(Xe>>>16)<<16),Wt=1540483477*(65535&(Xe^=Xe>>>24))+(59797*(Xe>>>16)<<16)^1540483477*(65535&Wt)+(59797*(Wt>>>16)<<16);switch(fr){case 3:Wt^=(255&u.charCodeAt(In+2))<<16;case 2:Wt^=(255&u.charCodeAt(In+1))<<8;case 1:Wt=1540483477*(65535&(Wt^=255&u.charCodeAt(In)))+(59797*(Wt>>>16)<<16)}return(((Wt=1540483477*(65535&(Wt^=Wt>>>13))+(59797*(Wt>>>16)<<16))^Wt>>>15)>>>0).toString(36)}(fr)+Kr;return{name:no,styles:fr,next:so}}},1287:function(u,Xe,Wt){"use strict";var In;Wt.d(Xe,{i:function(){return Ar},s:function(){return wr}});var fr=Wt(6540),_r=!!(In||(In=Wt.t(fr,2))).useInsertionEffect&&(In||(In=Wt.t(fr,2))).useInsertionEffect,wr=_r||function syncFallback(u){return u()},Ar=_r||fr.useLayoutEffect},41:function(u,Xe,Wt){"use strict";Wt.d(Xe,{Rk:function(){return getRegisteredStyles},SF:function(){return In},sk:function(){return fr}});function getRegisteredStyles(u,Xe,Wt){var In="";return Wt.split(" ").forEach((function(Wt){void 0!==u[Wt]?Xe.push(u[Wt]+";"):Wt&&(In+=Wt+" ")})),In}var In=function registerStyles(u,Xe,Wt){var In=u.key+"-"+Xe.name;!1===Wt&&void 0===u.registered[In]&&(u.registered[In]=Xe.styles)},fr=function insertStyles(u,Xe,Wt){In(u,Xe,Wt);var fr=u.key+"-"+Xe.name;if(void 0===u.inserted[Xe.name]){var _r=Xe;do{u.insert(Xe===_r?"."+fr:"",_r,u.sheet,!0),_r=_r.next}while(void 0!==_r)}}},4865:function(u,Xe){"use strict";var Wt=[128065],In="f06e",fr="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z";Xe.mw={prefix:"fas",iconName:"eye",icon:[576,512,Wt,In,fr]},Xe.pS=Xe.mw},7312:function(u,Xe){"use strict";var Wt="eye-slash",In=[],fr="f070",_r="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z";Xe.mw={prefix:"fas",iconName:Wt,icon:[640,512,In,fr,_r]},Xe.k6=Xe.mw},838:function(u,Xe){"use strict";var Wt="layer-group",In=[],fr="f5fd",_r="M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z";Xe.mw={prefix:"fas",iconName:Wt,icon:[576,512,In,fr,_r]},Xe.qI=Xe.mw},9781:function(u,Xe,Wt){"use strict";var In=Wt(4994);Xe.A=void 0;var fr=In(Wt(2032)),_r=Wt(4848);Xe.A=(0,fr.default)((0,_r.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")},1656:function(u,Xe,Wt){"use strict";var In=Wt(4994);Xe.A=void 0;var fr=In(Wt(2032)),_r=Wt(4848);Xe.A=(0,fr.default)((0,_r.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")},2048:function(u,Xe,Wt){"use strict";var In=Wt(4994);Xe.A=void 0;var fr=In(Wt(2032)),_r=Wt(4848);Xe.A=(0,fr.default)((0,_r.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},6434:function(u,Xe,Wt){"use strict";var In=Wt(4994);Xe.A=void 0;var fr=In(Wt(2032)),_r=Wt(4848);Xe.A=(0,fr.default)((0,_r.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"Launch")},5673:function(u,Xe,Wt){"use strict";var In=Wt(4994);Xe.A=void 0;var fr=In(Wt(2032)),_r=Wt(4848);Xe.A=(0,fr.default)((0,_r.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},6768:function(u,Xe,Wt){"use strict";var In=Wt(4994);Xe.A=void 0;var fr=In(Wt(2032)),_r=Wt(4848);Xe.A=(0,fr.default)((0,_r.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 7M2 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 3zM7.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.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},2032:function(u,Xe,Wt){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Object.defineProperty(Xe,"default",{enumerable:!0,get:function(){return In.createSvgIcon}});var In=Wt(8928)},5607:function(u,Xe,Wt){"use strict";Wt.d(Xe,{b:function(){return DefaultPropsProvider_useDefaultProps}});var In=Wt(6540),fr=Wt(7379);Wt(4848);const _r=In.createContext(void 0);function useDefaultProps({props:u,name:Xe}){return function getThemeProps(u){const{theme:Xe,name:Wt,props:In}=u;if(!Xe||!Xe.components||!Xe.components[Wt])return In;const _r=Xe.components[Wt];return _r.defaultProps?(0,fr.A)(_r.defaultProps,In):_r.styleOverrides||_r.variants?In:(0,fr.A)(_r,In)}({props:u,name:Xe,theme:{components:In.useContext(_r)}})}function DefaultPropsProvider_useDefaultProps(u){return useDefaultProps(u)}},6544:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return kl}});var In=Wt(8168),fr=Wt(8587),_r=Wt(9453),wr=Wt(1317),Ar=Wt(4188),Kr=Wt(3571),no=Wt(8749);var io=Wt(771);var oo={black:"#000",white:"#fff"};var ao={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var so={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var co={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var ho={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var go={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var xo={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var ko={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"};const Co=["mode","contrastThreshold","tonalOffset"],Io={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:oo.white,default:oo.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}},zo={text:{primary:oo.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:oo.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 addLightOrDark(u,Xe,Wt,In){const fr=In.light||In,_r=In.dark||1.5*In;u[Xe]||(u.hasOwnProperty(Wt)?u[Xe]=u[Wt]:"light"===Xe?u.light=(0,io.a)(u.main,fr):"dark"===Xe&&(u.dark=(0,io.e$)(u.main,_r)))}function createPalette(u){const{mode:Xe="light",contrastThreshold:Wt=3,tonalOffset:Ar=.2}=u,Kr=(0,fr.A)(u,Co),no=u.primary||function getDefaultPrimary(u="light"){return"dark"===u?{main:go[200],light:go[50],dark:go[400]}:{main:go[700],light:go[400],dark:go[800]}}(Xe),Bo=u.secondary||function getDefaultSecondary(u="light"){return"dark"===u?{main:so[200],light:so[50],dark:so[400]}:{main:so[500],light:so[300],dark:so[700]}}(Xe),ca=u.error||function getDefaultError(u="light"){return"dark"===u?{main:co[500],light:co[300],dark:co[700]}:{main:co[700],light:co[400],dark:co[800]}}(Xe),ua=u.info||function getDefaultInfo(u="light"){return"dark"===u?{main:xo[400],light:xo[300],dark:xo[700]}:{main:xo[700],light:xo[500],dark:xo[900]}}(Xe),Da=u.success||function getDefaultSuccess(u="light"){return"dark"===u?{main:ko[400],light:ko[300],dark:ko[700]}:{main:ko[800],light:ko[500],dark:ko[900]}}(Xe),ns=u.warning||function getDefaultWarning(u="light"){return"dark"===u?{main:ho[400],light:ho[300],dark:ho[700]}:{main:"#ed6c02",light:ho[500],dark:ho[900]}}(Xe);function getContrastText(u){return(0,io.eM)(u,zo.text.primary)>=Wt?zo.text.primary:Io.text.primary}const augmentColor=({color:u,name:Xe,mainShade:Wt=500,lightShade:fr=300,darkShade:wr=700})=>{if(!(u=(0,In.A)({},u)).main&&u[Wt]&&(u.main=u[Wt]),!u.hasOwnProperty("main"))throw new Error((0,_r.A)(11,Xe?` (${Xe})`:"",Wt));if("string"!=typeof u.main)throw new Error((0,_r.A)(12,Xe?` (${Xe})`:"",JSON.stringify(u.main)));return addLightOrDark(u,"light",fr,Ar),addLightOrDark(u,"dark",wr,Ar),u.contrastText||(u.contrastText=getContrastText(u.main)),u},yl={dark:zo,light:Io};return(0,wr.A)((0,In.A)({common:(0,In.A)({},oo),mode:Xe,primary:augmentColor({color:no,name:"primary"}),secondary:augmentColor({color:Bo,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:augmentColor({color:ca,name:"error"}),warning:augmentColor({color:ns,name:"warning"}),info:augmentColor({color:ua,name:"info"}),success:augmentColor({color:Da,name:"success"}),grey:ao,contrastThreshold:Wt,getContrastText,augmentColor,tonalOffset:Ar},yl[Xe]),Kr)}const Bo=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const ca={textTransform:"uppercase"},ua='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(u,Xe){const Wt="function"==typeof Xe?Xe(u):Xe,{fontFamily:_r=ua,fontSize:Ar=14,fontWeightLight:Kr=300,fontWeightRegular:no=400,fontWeightMedium:io=500,fontWeightBold:oo=700,htmlFontSize:ao=16,allVariants:so,pxToRem:co}=Wt,ho=(0,fr.A)(Wt,Bo);const go=Ar/14,xo=co||(u=>u/ao*go+"rem"),buildVariant=(u,Xe,Wt,fr,wr)=>{return(0,In.A)({fontFamily:_r,fontWeight:u,fontSize:xo(Xe),lineHeight:Wt},_r===ua?{letterSpacing:(Ar=fr/Xe,Math.round(1e5*Ar)/1e5)+"em"}:{},wr,so);var Ar},ko={h1:buildVariant(Kr,96,1.167,-1.5),h2:buildVariant(Kr,60,1.2,-.5),h3:buildVariant(no,48,1.167,0),h4:buildVariant(no,34,1.235,.25),h5:buildVariant(no,24,1.334,0),h6:buildVariant(io,20,1.6,.15),subtitle1:buildVariant(no,16,1.75,.15),subtitle2:buildVariant(io,14,1.57,.1),body1:buildVariant(no,16,1.5,.15),body2:buildVariant(no,14,1.43,.15),button:buildVariant(io,14,1.75,.4,ca),caption:buildVariant(no,12,1.66,.4),overline:buildVariant(no,12,2.66,1,ca),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,wr.A)((0,In.A)({htmlFontSize:ao,pxToRem:xo,fontFamily:_r,fontSize:Ar,fontWeightLight:Kr,fontWeightRegular:no,fontWeightMedium:io,fontWeightBold:oo},ko),ho,{clone:!1})}function createShadow(...u){return[`${u[0]}px ${u[1]}px ${u[2]}px ${u[3]}px rgba(0,0,0,0.2)`,`${u[4]}px ${u[5]}px ${u[6]}px ${u[7]}px rgba(0,0,0,0.14)`,`${u[8]}px ${u[9]}px ${u[10]}px ${u[11]}px rgba(0,0,0,0.12)`].join(",")}var Da=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],ns=Wt(7091);var yl={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const vl=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function createTheme_createTheme(u={},...Xe){const{mixins:Wt={},palette:io={},transitions:oo={},typography:ao={}}=u,so=(0,fr.A)(u,vl);if(u.vars)throw new Error((0,_r.A)(18));const co=createPalette(io),ho=(0,no.A)(u);let go=(0,wr.A)(ho,{mixins:(xo=ho.breakpoints,ko=Wt,(0,In.A)({toolbar:{minHeight:56,[xo.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[xo.up("sm")]:{minHeight:64}}},ko)),palette:co,shadows:Da.slice(),typography:createTypography(co,ao),transitions:(0,ns.Ay)(oo),zIndex:(0,In.A)({},yl)});var xo,ko;return go=(0,wr.A)(go,so),go=Xe.reduce(((u,Xe)=>(0,wr.A)(u,Xe)),go),go.unstable_sxConfig=(0,In.A)({},Ar.A,null==so?void 0:so.unstable_sxConfig),go.unstable_sx=function sx(u){return(0,Kr.A)({sx:u,theme:this})},go}var kl=createTheme_createTheme},7091:function(u,Xe,Wt){"use strict";Wt.d(Xe,{Ay:function(){return createTransitions},p0:function(){return Ar}});var In=Wt(8587),fr=Wt(8168);const _r=["duration","easing","delay"],wr={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)"},Ar={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(u){return`${Math.round(u)}ms`}function getAutoHeightDuration(u){if(!u)return 0;const Xe=u/36;return Math.round(10*(4+15*Xe**.25+Xe/5))}function createTransitions(u){const Xe=(0,fr.A)({},wr,u.easing),Wt=(0,fr.A)({},Ar,u.duration);return(0,fr.A)({getAutoHeightDuration,create:(u=["all"],fr={})=>{const{duration:wr=Wt.standard,easing:Ar=Xe.easeInOut,delay:Kr=0}=fr;(0,In.A)(fr,_r);return(Array.isArray(u)?u:[u]).map((u=>`${u} ${"string"==typeof wr?wr:formatMs(wr)} ${Ar} ${"string"==typeof Kr?Kr:formatMs(Kr)}`)).join(",")}},u,{easing:Xe,duration:Wt})}},2765:function(u,Xe,Wt){"use strict";const In=(0,Wt(6544).A)();Xe.A=In},8312:function(u,Xe){"use strict";Xe.A="$$material"},9770:function(u,Xe,Wt){"use strict";var In=Wt(4438);Xe.A=u=>(0,In.A)(u)&&"classes"!==u},4438:function(u,Xe){"use strict";Xe.A=function slotShouldForwardProp(u){return"ownerState"!==u&&"theme"!==u&&"sx"!==u&&"as"!==u}},1848:function(u,Xe,Wt){"use strict";var In=Wt(6461),fr=Wt(2765),_r=Wt(8312),wr=Wt(9770);const Ar=(0,In.Ay)({themeId:_r.A,defaultTheme:fr.A,rootShouldForwardProp:wr.A});Xe.Ay=Ar},8466:function(u,Xe,Wt){"use strict";var In=Wt(3967);Xe.A=In.A},862:function(u,Xe,Wt){"use strict";var In=Wt(6673);Xe.A=In.A},5003:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return createSvgIcon}});var In=Wt(8168),fr=Wt(6540),_r=Wt(8587),wr=Wt(4164),Ar=Wt(5659),Kr=Wt(8466),no=Wt(5607),io=Wt(1848),oo=Wt(8413),ao=Wt(1609);function getSvgIconUtilityClass(u){return(0,ao.Ay)("MuiSvgIcon",u)}(0,oo.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var so=Wt(4848);const co=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],ho=(0,io.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,"inherit"!==Wt.color&&Xe[`color${(0,Kr.A)(Wt.color)}`],Xe[`fontSize${(0,Kr.A)(Wt.fontSize)}`]]}})((({theme:u,ownerState:Xe})=>{var Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:Xe.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(Wt=u.transitions)||null==(In=Wt.create)?void 0:In.call(Wt,"fill",{duration:null==(fr=u.transitions)||null==(fr=fr.duration)?void 0:fr.shorter}),fontSize:{inherit:"inherit",small:(null==(_r=u.typography)||null==(wr=_r.pxToRem)?void 0:wr.call(_r,20))||"1.25rem",medium:(null==(Ar=u.typography)||null==(Kr=Ar.pxToRem)?void 0:Kr.call(Ar,24))||"1.5rem",large:(null==(no=u.typography)||null==(io=no.pxToRem)?void 0:io.call(no,35))||"2.1875rem"}[Xe.fontSize],color:null!=(oo=null==(ao=(u.vars||u).palette)||null==(ao=ao[Xe.color])?void 0:ao.main)?oo:{action:null==(so=(u.vars||u).palette)||null==(so=so.action)?void 0:so.active,disabled:null==(co=(u.vars||u).palette)||null==(co=co.action)?void 0:co.disabled,inherit:void 0}[Xe.color]}})),go=fr.forwardRef((function SvgIcon(u,Xe){const Wt=(0,no.b)({props:u,name:"MuiSvgIcon"}),{children:io,className:oo,color:ao="inherit",component:go="svg",fontSize:xo="medium",htmlColor:ko,inheritViewBox:Co=!1,titleAccess:Io,viewBox:zo="0 0 24 24"}=Wt,Bo=(0,_r.A)(Wt,co),ca=fr.isValidElement(io)&&"svg"===io.type,ua=(0,In.A)({},Wt,{color:ao,component:go,fontSize:xo,instanceFontSize:u.fontSize,inheritViewBox:Co,viewBox:zo,hasSvgAsChild:ca}),Da={};Co||(Da.viewBox=zo);const ns=(u=>{const{color:Xe,fontSize:Wt,classes:In}=u,fr={root:["root","inherit"!==Xe&&`color${(0,Kr.A)(Xe)}`,`fontSize${(0,Kr.A)(Wt)}`]};return(0,Ar.A)(fr,getSvgIconUtilityClass,In)})(ua);return(0,so.jsxs)(ho,(0,In.A)({as:go,className:(0,wr.A)(ns.root,oo),focusable:"false",color:ko,"aria-hidden":!Io||void 0,role:Io?"img":void 0,ref:Xe},Da,Bo,ca&&io.props,{ownerState:ua,children:[ca?io.props.children:io,Io?(0,so.jsx)("title",{children:Io}):null]}))}));go.muiName="SvgIcon";var xo=go;function createSvgIcon(u,Xe){function Component(Wt,fr){return(0,so.jsx)(xo,(0,In.A)({"data-testid":`${Xe}Icon`,ref:fr},Wt,{children:u}))}return Component.muiName=xo.muiName,fr.memo(fr.forwardRef(Component))}},1935:function(u,Xe,Wt){"use strict";var In=Wt(4705);Xe.A=In.A},8928:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{capitalize:function(){return fr.A},createChainedFunction:function(){return _r.A},createSvgIcon:function(){return wr.A},debounce:function(){return Ar.A},deprecatedPropType:function(){return Kr},isMuiElement:function(){return no.A},ownerDocument:function(){return io.A},ownerWindow:function(){return oo.A},requirePropFactory:function(){return ao},setRef:function(){return so},unstable_ClassNameGenerator:function(){return zo},unstable_useEnhancedEffect:function(){return co.A},unstable_useId:function(){return ho.A},unsupportedProp:function(){return go},useControlled:function(){return xo.A},useEventCallback:function(){return ko.A},useForkRef:function(){return Co.A},useIsFocusVisible:function(){return Io.A}});var In=Wt(9071),fr=Wt(8466),_r=Wt(862),wr=Wt(5003),Ar=Wt(1935);var Kr=function deprecatedPropType(u,Xe){return()=>null},no=Wt(8593),io=Wt(6248),oo=Wt(3749);Wt(8168);var ao=function requirePropFactory(u,Xe){return()=>null},so=Wt(7365).A,co=Wt(2778),ho=Wt(1668);var go=function unsupportedProp(u,Xe,Wt,In,fr){return null},xo=Wt(1381),ko=Wt(3034),Co=Wt(6852),Io=Wt(1984);const zo={configure:u=>{In.A.configure(u)}}},8593:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return fr}});var In=Wt(6540);var fr=function isMuiElement(u,Xe){var Wt,fr;return In.isValidElement(u)&&-1!==Xe.indexOf(null!=(Wt=u.type.muiName)?Wt:null==(fr=u.type)||null==(fr=fr._payload)||null==(fr=fr.value)?void 0:fr.muiName)}},6248:function(u,Xe,Wt){"use strict";var In=Wt(2325);Xe.A=In.A},3749:function(u,Xe,Wt){"use strict";var In=Wt(4877);Xe.A=In.A},1381:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return fr}});var In=Wt(6540);var fr=function useControlled({controlled:u,default:Xe,name:Wt,state:fr="value"}){const{current:_r}=In.useRef(void 0!==u),[wr,Ar]=In.useState(Xe);return[_r?u:wr,In.useCallback((u=>{_r||Ar(u)}),[])]}},2778:function(u,Xe,Wt){"use strict";var In=Wt(1529);Xe.A=In.A},3034:function(u,Xe,Wt){"use strict";var In=Wt(1547);Xe.A=In.A},6852:function(u,Xe,Wt){"use strict";var In=Wt(1523);Xe.A=In.A},1668:function(u,Xe,Wt){"use strict";var In=Wt(4661);Xe.A=In.A},1984:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return no}});var In=Wt(6540),fr=Wt(3068);let _r=!0,wr=!1;const Ar=new fr.E,Kr={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 handleKeyDown(u){u.metaKey||u.altKey||u.ctrlKey||(_r=!0)}function handlePointerDown(){_r=!1}function handleVisibilityChange(){"hidden"===this.visibilityState&&wr&&(_r=!0)}function isFocusVisible(u){const{target:Xe}=u;try{return Xe.matches(":focus-visible")}catch(u){}return _r||function focusTriggersKeyboardModality(u){const{type:Xe,tagName:Wt}=u;return!("INPUT"!==Wt||!Kr[Xe]||u.readOnly)||"TEXTAREA"===Wt&&!u.readOnly||!!u.isContentEditable}(Xe)}var no=function useIsFocusVisible(){const u=In.useCallback((u=>{null!=u&&function prepare(u){u.addEventListener("keydown",handleKeyDown,!0),u.addEventListener("mousedown",handlePointerDown,!0),u.addEventListener("pointerdown",handlePointerDown,!0),u.addEventListener("touchstart",handlePointerDown,!0),u.addEventListener("visibilitychange",handleVisibilityChange,!0)}(u.ownerDocument)}),[]),Xe=In.useRef(!1);return{isFocusVisibleRef:Xe,onFocus:function handleFocusVisible(u){return!!isFocusVisible(u)&&(Xe.current=!0,!0)},onBlur:function handleBlurVisible(){return!!Xe.current&&(wr=!0,Ar.start(100,(()=>{wr=!1})),Xe.current=!1,!0)},ref:u}}},9940:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return GlobalStyles}});Wt(6540);var In=Wt(7437),fr=Wt(4848);function GlobalStyles(u){const{styles:Xe,defaultTheme:Wt={}}=u,_r="function"==typeof Xe?u=>Xe(function isEmpty(u){return null==u||0===Object.keys(u).length}(u)?Wt:u):Xe;return(0,fr.jsx)(In.mL,{styles:_r})}},2532:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{GlobalStyles:function(){return Bo.A},StyledEngineProvider:function(){return StyledEngineProvider},ThemeContext:function(){return Kr.T},css:function(){return ko.AH},default:function(){return styled},internal_processStyles:function(){return internal_processStyles},keyframes:function(){return ko.i7}});var In=Wt(8168),fr=Wt(6540),_r=Wt(6289),wr=/^((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)-.*))$/,Ar=(0,_r.A)((function(u){return wr.test(u)||111===u.charCodeAt(0)&&110===u.charCodeAt(1)&&u.charCodeAt(2)<91})),Kr=Wt(9898),no=Wt(41),io=Wt(3174),oo=Wt(1287),ao=Ar,so=function testOmitPropsOnComponent(u){return"theme"!==u},co=function getDefaultShouldForwardProp(u){return"string"==typeof u&&u.charCodeAt(0)>96?ao:so},ho=function composeShouldForwardProps(u,Xe,Wt){var In;if(Xe){var fr=Xe.shouldForwardProp;In=u.__emotion_forwardProp&&fr?function(Xe){return u.__emotion_forwardProp(Xe)&&fr(Xe)}:fr}return"function"!=typeof In&&Wt&&(In=u.__emotion_forwardProp),In},go=function Insertion(u){var Xe=u.cache,Wt=u.serialized,In=u.isStringTag;return(0,no.SF)(Xe,Wt,In),(0,oo.s)((function(){return(0,no.sk)(Xe,Wt,In)})),null},xo=function createStyled(u,Xe){var Wt,_r,wr=u.__emotion_real===u,Ar=wr&&u.__emotion_base||u;void 0!==Xe&&(Wt=Xe.label,_r=Xe.target);var oo=ho(u,Xe,wr),ao=oo||co(Ar),so=!ao("as");return function(){var xo=arguments,ko=wr&&void 0!==u.__emotion_styles?u.__emotion_styles.slice(0):[];if(void 0!==Wt&&ko.push("label:"+Wt+";"),null==xo[0]||void 0===xo[0].raw)ko.push.apply(ko,xo);else{ko.push(xo[0][0]);for(var Co=xo.length,Io=1;Io<Co;Io++)ko.push(xo[Io],xo[0][Io])}var zo=(0,Kr.w)((function(u,Xe,Wt){var In=so&&u.as||Ar,wr="",ho=[],xo=u;if(null==u.theme){for(var Co in xo={},u)xo[Co]=u[Co];xo.theme=fr.useContext(Kr.T)}"string"==typeof u.className?wr=(0,no.Rk)(Xe.registered,ho,u.className):null!=u.className&&(wr=u.className+" ");var Io=(0,io.J)(ko.concat(ho),Xe.registered,xo);wr+=Xe.key+"-"+Io.name,void 0!==_r&&(wr+=" "+_r);var zo=so&&void 0===oo?co(In):ao,Bo={};for(var ca in u)so&&"as"===ca||zo(ca)&&(Bo[ca]=u[ca]);return Bo.className=wr,Wt&&(Bo.ref=Wt),fr.createElement(fr.Fragment,null,fr.createElement(go,{cache:Xe,serialized:Io,isStringTag:"string"==typeof In}),fr.createElement(In,Bo))}));return zo.displayName=void 0!==Wt?Wt:"Styled("+("string"==typeof Ar?Ar:Ar.displayName||Ar.name||"Component")+")",zo.defaultProps=u.defaultProps,zo.__emotion_real=zo,zo.__emotion_base=Ar,zo.__emotion_styles=ko,zo.__emotion_forwardProp=oo,Object.defineProperty(zo,"toString",{value:function value(){return"."+_r}}),zo.withComponent=function(u,Wt){return createStyled(u,(0,In.A)({},Xe,Wt,{shouldForwardProp:ho(zo,Wt,!0)})).apply(void 0,ko)},zo}}.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(u){xo[u]=xo(u)}));var ko=Wt(7437),Co=Wt(5655),Io=Wt(4848);let zo;function StyledEngineProvider(u){const{injectFirst:Xe,children:Wt}=u;return Xe&&zo?(0,Io.jsx)(Kr.C,{value:zo,children:Wt}):Wt}"object"==typeof document&&(zo=(0,Co.A)({key:"css",prepend:!0}));var Bo=Wt(9940);function styled(u,Xe){return xo(u,Xe)}const internal_processStyles=(u,Xe)=>{Array.isArray(u.__emotion_styles)&&(u.__emotion_styles=Xe(u.__emotion_styles))}},771:function(u,Xe,Wt){"use strict";var In=Wt(4994);Xe.X4=alpha,Xe.e$=darken,Xe.eM=function getContrastRatio(u,Xe){const Wt=getLuminance(u),In=getLuminance(Xe);return(Math.max(Wt,In)+.05)/(Math.min(Wt,In)+.05)},Xe.a=lighten;var fr=In(Wt(8944)),_r=In(Wt(7535));function clampWrapper(u,Xe=0,Wt=1){return(0,_r.default)(u,Xe,Wt)}function hexToRgb(u){u=u.slice(1);const Xe=new RegExp(`.{1,${u.length>=6?2:1}}`,"g");let Wt=u.match(Xe);return Wt&&1===Wt[0].length&&(Wt=Wt.map((u=>u+u))),Wt?`rgb${4===Wt.length?"a":""}(${Wt.map(((u,Xe)=>Xe<3?parseInt(u,16):Math.round(parseInt(u,16)/255*1e3)/1e3)).join(", ")})`:""}function decomposeColor(u){if(u.type)return u;if("#"===u.charAt(0))return decomposeColor(hexToRgb(u));const Xe=u.indexOf("("),Wt=u.substring(0,Xe);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(Wt))throw new Error((0,fr.default)(9,u));let In,_r=u.substring(Xe+1,u.length-1);if("color"===Wt){if(_r=_r.split(" "),In=_r.shift(),4===_r.length&&"/"===_r[3].charAt(0)&&(_r[3]=_r[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(In))throw new Error((0,fr.default)(10,In))}else _r=_r.split(",");return _r=_r.map((u=>parseFloat(u))),{type:Wt,values:_r,colorSpace:In}}const colorChannel=u=>{const Xe=decomposeColor(u);return Xe.values.slice(0,3).map(((u,Wt)=>-1!==Xe.type.indexOf("hsl")&&0!==Wt?`${u}%`:u)).join(" ")};function recomposeColor(u){const{type:Xe,colorSpace:Wt}=u;let{values:In}=u;return-1!==Xe.indexOf("rgb")?In=In.map(((u,Xe)=>Xe<3?parseInt(u,10):u)):-1!==Xe.indexOf("hsl")&&(In[1]=`${In[1]}%`,In[2]=`${In[2]}%`),In=-1!==Xe.indexOf("color")?`${Wt} ${In.join(" ")}`:`${In.join(", ")}`,`${Xe}(${In})`}function hslToRgb(u){u=decomposeColor(u);const{values:Xe}=u,Wt=Xe[0],In=Xe[1]/100,fr=Xe[2]/100,_r=In*Math.min(fr,1-fr),f=(u,Xe=(u+Wt/30)%12)=>fr-_r*Math.max(Math.min(Xe-3,9-Xe,1),-1);let wr="rgb";const Ar=[Math.round(255*f(0)),Math.round(255*f(8)),Math.round(255*f(4))];return"hsla"===u.type&&(wr+="a",Ar.push(Xe[3])),recomposeColor({type:wr,values:Ar})}function getLuminance(u){let Xe="hsl"===(u=decomposeColor(u)).type||"hsla"===u.type?decomposeColor(hslToRgb(u)).values:u.values;return Xe=Xe.map((Xe=>("color"!==u.type&&(Xe/=255),Xe<=.03928?Xe/12.92:((Xe+.055)/1.055)**2.4))),Number((.2126*Xe[0]+.7152*Xe[1]+.0722*Xe[2]).toFixed(3))}function alpha(u,Xe){return u=decomposeColor(u),Xe=clampWrapper(Xe),"rgb"!==u.type&&"hsl"!==u.type||(u.type+="a"),"color"===u.type?u.values[3]=`/${Xe}`:u.values[3]=Xe,recomposeColor(u)}function darken(u,Xe){if(u=decomposeColor(u),Xe=clampWrapper(Xe),-1!==u.type.indexOf("hsl"))u.values[2]*=1-Xe;else if(-1!==u.type.indexOf("rgb")||-1!==u.type.indexOf("color"))for(let Wt=0;Wt<3;Wt+=1)u.values[Wt]*=1-Xe;return recomposeColor(u)}function lighten(u,Xe){if(u=decomposeColor(u),Xe=clampWrapper(Xe),-1!==u.type.indexOf("hsl"))u.values[2]+=(100-u.values[2])*Xe;else if(-1!==u.type.indexOf("rgb"))for(let Wt=0;Wt<3;Wt+=1)u.values[Wt]+=(255-u.values[Wt])*Xe;else if(-1!==u.type.indexOf("color"))for(let Wt=0;Wt<3;Wt+=1)u.values[Wt]+=(1-u.values[Wt])*Xe;return recomposeColor(u)}function emphasize(u,Xe=.15){return getLuminance(u)>.5?darken(u,Xe):lighten(u,Xe)}},6461:function(u,Xe,Wt){"use strict";var In=Wt(4994);Xe.Ay=function createStyled(u={}){const{themeId:Xe,defaultTheme:Wt=so,rootShouldForwardProp:In=shouldForwardProp,slotShouldForwardProp:Kr=shouldForwardProp}=u,systemSx=u=>(0,no.default)((0,fr.default)({},u,{theme:resolveTheme((0,fr.default)({},u,{defaultTheme:Wt,themeId:Xe}))}));return systemSx.__mui_systemSx=!0,(u,no={})=>{(0,wr.internal_processStyles)(u,(u=>u.filter((u=>!(null!=u&&u.__mui_systemSx)))));const{name:io,slot:oo,skipVariantsResolver:so,skipSx:co,overridesResolver:ho=defaultOverridesResolver(lowercaseFirstLetter(oo))}=no,go=(0,_r.default)(no,ao),xo=void 0!==so?so:oo&&"Root"!==oo&&"root"!==oo||!1,ko=co||!1;let Co=shouldForwardProp;"Root"===oo||"root"===oo?Co=In:oo?Co=Kr:function isStringTag(u){return"string"==typeof u&&u.charCodeAt(0)>96}(u)&&(Co=void 0);const Io=(0,wr.default)(u,(0,fr.default)({shouldForwardProp:Co,label:undefined},go)),transformStyleArg=u=>"function"==typeof u&&u.__emotion_real!==u||(0,Ar.isPlainObject)(u)?In=>processStyleArg(u,(0,fr.default)({},In,{theme:resolveTheme({theme:In.theme,defaultTheme:Wt,themeId:Xe})})):u,muiStyledResolver=(In,..._r)=>{let wr=transformStyleArg(In);const Ar=_r?_r.map(transformStyleArg):[];io&&ho&&Ar.push((u=>{const In=resolveTheme((0,fr.default)({},u,{defaultTheme:Wt,themeId:Xe}));if(!In.components||!In.components[io]||!In.components[io].styleOverrides)return null;const _r=In.components[io].styleOverrides,wr={};return Object.entries(_r).forEach((([Xe,Wt])=>{wr[Xe]=processStyleArg(Wt,(0,fr.default)({},u,{theme:In}))})),ho(u,wr)})),io&&!xo&&Ar.push((u=>{var In;const _r=resolveTheme((0,fr.default)({},u,{defaultTheme:Wt,themeId:Xe}));return processStyleArg({variants:null==_r||null==(In=_r.components)||null==(In=In[io])?void 0:In.variants},(0,fr.default)({},u,{theme:_r}))})),ko||Ar.push(systemSx);const Kr=Ar.length-_r.length;if(Array.isArray(In)&&Kr>0){const u=new Array(Kr).fill("");wr=[...In,...u],wr.raw=[...In.raw,...u]}const no=Io(wr,...Ar);return u.muiName&&(no.muiName=u.muiName),no};return Io.withConfig&&(muiStyledResolver.withConfig=Io.withConfig),muiStyledResolver}};var fr=In(Wt(4634)),_r=In(Wt(4893)),wr=function _interopRequireWildcard(u,Xe){if(!Xe&&u&&u.__esModule)return u;if(null===u||"object"!=typeof u&&"function"!=typeof u)return{default:u};var Wt=_getRequireWildcardCache(Xe);if(Wt&&Wt.has(u))return Wt.get(u);var In={__proto__:null},fr=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _r in u)if("default"!==_r&&Object.prototype.hasOwnProperty.call(u,_r)){var wr=fr?Object.getOwnPropertyDescriptor(u,_r):null;wr&&(wr.get||wr.set)?Object.defineProperty(In,_r,wr):In[_r]=u[_r]}return In.default=u,Wt&&Wt.set(u,In),In}(Wt(2532)),Ar=Wt(4239),Kr=(In(Wt(7149)),In(Wt(7320)),In(Wt(3142))),no=In(Wt(3857));const io=["ownerState"],oo=["variants"],ao=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function _getRequireWildcardCache(u){if("function"!=typeof WeakMap)return null;var Xe=new WeakMap,Wt=new WeakMap;return(_getRequireWildcardCache=function(u){return u?Wt:Xe})(u)}function shouldForwardProp(u){return"ownerState"!==u&&"theme"!==u&&"sx"!==u&&"as"!==u}const so=(0,Kr.default)(),lowercaseFirstLetter=u=>u?u.charAt(0).toLowerCase()+u.slice(1):u;function resolveTheme({defaultTheme:u,theme:Xe,themeId:Wt}){return function isEmpty(u){return 0===Object.keys(u).length}(Xe)?u:Xe[Wt]||Xe}function defaultOverridesResolver(u){return u?(Xe,Wt)=>Wt[u]:null}function processStyleArg(u,Xe){let{ownerState:Wt}=Xe,In=(0,_r.default)(Xe,io);const wr="function"==typeof u?u((0,fr.default)({ownerState:Wt},In)):u;if(Array.isArray(wr))return wr.flatMap((u=>processStyleArg(u,(0,fr.default)({ownerState:Wt},In))));if(wr&&"object"==typeof wr&&Array.isArray(wr.variants)){const{variants:u=[]}=wr;let Xe=(0,_r.default)(wr,oo);return u.forEach((u=>{let _r=!0;"function"==typeof u.props?_r=u.props((0,fr.default)({ownerState:Wt},In,Wt)):Object.keys(u.props).forEach((Xe=>{(null==Wt?void 0:Wt[Xe])!==u.props[Xe]&&In[Xe]!==u.props[Xe]&&(_r=!1)})),_r&&(Array.isArray(Xe)||(Xe=[Xe]),Xe.push("function"==typeof u.style?u.style((0,fr.default)({ownerState:Wt},In,Wt)):u.style))})),Xe}return wr}},9452:function(u,Xe,Wt){"use strict";Wt.d(Xe,{EU:function(){return createEmptyBreakpointObject},NI:function(){return handleBreakpoints},iZ:function(){return mergeBreakpointsInOrder},kW:function(){return resolveBreakpointValues},vf:function(){return removeUnusedBreakpoints},zu:function(){return fr}});var In=Wt(1317);const fr={xs:0,sm:600,md:900,lg:1200,xl:1536},_r={keys:["xs","sm","md","lg","xl"],up:u=>`@media (min-width:${fr[u]}px)`};function handleBreakpoints(u,Xe,Wt){const In=u.theme||{};if(Array.isArray(Xe)){const u=In.breakpoints||_r;return Xe.reduce(((In,fr,_r)=>(In[u.up(u.keys[_r])]=Wt(Xe[_r]),In)),{})}if("object"==typeof Xe){const u=In.breakpoints||_r;return Object.keys(Xe).reduce(((In,_r)=>{if(-1!==Object.keys(u.values||fr).indexOf(_r)){In[u.up(_r)]=Wt(Xe[_r],_r)}else{const u=_r;In[u]=Xe[u]}return In}),{})}return Wt(Xe)}function createEmptyBreakpointObject(u={}){var Xe;return(null==(Xe=u.keys)?void 0:Xe.reduce(((Xe,Wt)=>(Xe[u.up(Wt)]={},Xe)),{}))||{}}function removeUnusedBreakpoints(u,Xe){return u.reduce(((u,Xe)=>{const Wt=u[Xe];return(!Wt||0===Object.keys(Wt).length)&&delete u[Xe],u}),Xe)}function mergeBreakpointsInOrder(u,...Xe){const Wt=createEmptyBreakpointObject(u),fr=[Wt,...Xe].reduce(((u,Xe)=>(0,In.A)(u,Xe)),{});return removeUnusedBreakpoints(Object.keys(Wt),fr)}function resolveBreakpointValues({values:u,breakpoints:Xe,base:Wt}){const In=Wt||function computeBreakpointsBase(u,Xe){if("object"!=typeof u)return{};const Wt={},In=Object.keys(Xe);return Array.isArray(u)?In.forEach(((Xe,In)=>{In<u.length&&(Wt[Xe]=!0)})):In.forEach((Xe=>{null!=u[Xe]&&(Wt[Xe]=!0)})),Wt}(u,Xe),fr=Object.keys(In);if(0===fr.length)return u;let _r;return fr.reduce(((Xe,Wt,In)=>(Array.isArray(u)?(Xe[Wt]=null!=u[In]?u[In]:u[_r],_r=In):"object"==typeof u?(Xe[Wt]=null!=u[Wt]?u[Wt]:u[_r],_r=Wt):Xe[Wt]=u,Xe)),{})}},8336:function(u,Xe,Wt){"use strict";function applyStyles(u,Xe){const Wt=this;if(Wt.vars&&"function"==typeof Wt.getColorSchemeSelector){const In=Wt.getColorSchemeSelector(u).replace(/(\[[^\]]+\])/,"*:where($1)");return{[In]:Xe}}return Wt.palette.mode===u?Xe:{}}Wt.d(Xe,{A:function(){return applyStyles}})},8094:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return createBreakpoints}});var In=Wt(8587),fr=Wt(8168);const _r=["values","unit","step"],sortBreakpointsValues=u=>{const Xe=Object.keys(u).map((Xe=>({key:Xe,val:u[Xe]})))||[];return Xe.sort(((u,Xe)=>u.val-Xe.val)),Xe.reduce(((u,Xe)=>(0,fr.A)({},u,{[Xe.key]:Xe.val})),{})};function createBreakpoints(u){const{values:Xe={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:Wt="px",step:wr=5}=u,Ar=(0,In.A)(u,_r),Kr=sortBreakpointsValues(Xe),no=Object.keys(Kr);function up(u){return`@media (min-width:${"number"==typeof Xe[u]?Xe[u]:u}${Wt})`}function down(u){return`@media (max-width:${("number"==typeof Xe[u]?Xe[u]:u)-wr/100}${Wt})`}function between(u,In){const fr=no.indexOf(In);return`@media (min-width:${"number"==typeof Xe[u]?Xe[u]:u}${Wt}) and (max-width:${(-1!==fr&&"number"==typeof Xe[no[fr]]?Xe[no[fr]]:In)-wr/100}${Wt})`}return(0,fr.A)({keys:no,values:Kr,up,down,between,only:function only(u){return no.indexOf(u)+1<no.length?between(u,no[no.indexOf(u)+1]):up(u)},not:function not(u){const Xe=no.indexOf(u);return 0===Xe?up(no[1]):Xe===no.length-1?down(no[Xe]):between(u,no[no.indexOf(u)+1]).replace("@media","@media not all and")},unit:Wt},Ar)}},8749:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return so}});var In=Wt(8168),fr=Wt(8587),_r=Wt(1317),wr=Wt(8094);var Ar={borderRadius:4},Kr=Wt(8248);var no=Wt(3571),io=Wt(4188),oo=Wt(8336);const ao=["breakpoints","palette","spacing","shape"];var so=function createTheme(u={},...Xe){const{breakpoints:Wt={},palette:so={},spacing:co,shape:ho={}}=u,go=(0,fr.A)(u,ao),xo=(0,wr.A)(Wt),ko=function createSpacing(u=8){if(u.mui)return u;const Xe=(0,Kr.LX)({spacing:u}),spacing=(...u)=>(0===u.length?[1]:u).map((u=>{const Wt=Xe(u);return"number"==typeof Wt?`${Wt}px`:Wt})).join(" ");return spacing.mui=!0,spacing}(co);let Co=(0,_r.A)({breakpoints:xo,direction:"ltr",components:{},palette:(0,In.A)({mode:"light"},so),spacing:ko,shape:(0,In.A)({},Ar,ho)},go);return Co.applyStyles=oo.A,Co=Xe.reduce(((u,Xe)=>(0,_r.A)(u,Xe)),Co),Co.unstable_sxConfig=(0,In.A)({},io.A,null==go?void 0:go.unstable_sxConfig),Co.unstable_sx=function sx(u){return(0,no.A)({sx:u,theme:this})},Co}},3142:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return In.A},private_createBreakpoints:function(){return fr.A},unstable_applyStyles:function(){return _r.A}});var In=Wt(8749),fr=Wt(8094),_r=Wt(8336)},4620:function(u,Xe,Wt){"use strict";var In=Wt(1317);Xe.A=function merge(u,Xe){return Xe?(0,In.A)(u,Xe,{clone:!1}):u}},8248:function(u,Xe,Wt){"use strict";Wt.d(Xe,{LX:function(){return createUnarySpacing},MA:function(){return createUnaryUnit},_W:function(){return getValue},Lc:function(){return margin},Ms:function(){return padding}});var In=Wt(9452),fr=Wt(6481),_r=Wt(4620);const wr={m:"margin",p:"padding"},Ar={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Kr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},no=function memoize(u){const Xe={};return Wt=>(void 0===Xe[Wt]&&(Xe[Wt]=u(Wt)),Xe[Wt])}((u=>{if(u.length>2){if(!Kr[u])return[u];u=Kr[u]}const[Xe,Wt]=u.split(""),In=wr[Xe],fr=Ar[Wt]||"";return Array.isArray(fr)?fr.map((u=>In+u)):[In+fr]})),io=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],oo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],ao=[...io,...oo];function createUnaryUnit(u,Xe,Wt,In){var _r;const wr=null!=(_r=(0,fr.Yn)(u,Xe,!1))?_r:Wt;return"number"==typeof wr?u=>"string"==typeof u?u:wr*u:Array.isArray(wr)?u=>"string"==typeof u?u:wr[u]:"function"==typeof wr?wr:()=>{}}function createUnarySpacing(u){return createUnaryUnit(u,"spacing",8)}function getValue(u,Xe){if("string"==typeof Xe||null==Xe)return Xe;const Wt=u(Math.abs(Xe));return Xe>=0?Wt:"number"==typeof Wt?-Wt:`-${Wt}`}function resolveCssProperty(u,Xe,Wt,fr){if(-1===Xe.indexOf(Wt))return null;const _r=function getStyleFromPropValue(u,Xe){return Wt=>u.reduce(((u,In)=>(u[In]=getValue(Xe,Wt),u)),{})}(no(Wt),fr),wr=u[Wt];return(0,In.NI)(u,wr,_r)}function spacing_style(u,Xe){const Wt=createUnarySpacing(u.theme);return Object.keys(u).map((In=>resolveCssProperty(u,Xe,In,Wt))).reduce(_r.A,{})}function margin(u){return spacing_style(u,io)}function padding(u){return spacing_style(u,oo)}function spacing(u){return spacing_style(u,ao)}margin.propTypes={},margin.filterProps=io,padding.propTypes={},padding.filterProps=oo,spacing.propTypes={},spacing.filterProps=ao},6481:function(u,Xe,Wt){"use strict";Wt.d(Xe,{BO:function(){return getStyleValue},Yn:function(){return getPath}});var In=Wt(3967),fr=Wt(9452);function getPath(u,Xe,Wt=!0){if(!Xe||"string"!=typeof Xe)return null;if(u&&u.vars&&Wt){const Wt=`vars.${Xe}`.split(".").reduce(((u,Xe)=>u&&u[Xe]?u[Xe]:null),u);if(null!=Wt)return Wt}return Xe.split(".").reduce(((u,Xe)=>u&&null!=u[Xe]?u[Xe]:null),u)}function getStyleValue(u,Xe,Wt,In=Wt){let fr;return fr="function"==typeof u?u(Wt):Array.isArray(u)?u[Wt]||In:getPath(u,Wt)||In,Xe&&(fr=Xe(fr,In,u)),fr}Xe.Ay=function style(u){const{prop:Xe,cssProperty:Wt=u.prop,themeKey:_r,transform:wr}=u,fn=u=>{if(null==u[Xe])return null;const Ar=u[Xe],Kr=getPath(u.theme,_r)||{};return(0,fr.NI)(u,Ar,(u=>{let fr=getStyleValue(Kr,wr,u);return u===fr&&"string"==typeof u&&(fr=getStyleValue(Kr,wr,`${Xe}${"default"===u?"":(0,In.A)(u)}`,u)),!1===Wt?fr:{[Wt]:fr}}))};return fn.propTypes={},fn.filterProps=[Xe],fn}},4188:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return Da}});var In=Wt(8248),fr=Wt(6481),_r=Wt(4620);var wr=function compose(...u){const Xe=u.reduce(((u,Xe)=>(Xe.filterProps.forEach((Wt=>{u[Wt]=Xe})),u)),{}),fn=u=>Object.keys(u).reduce(((Wt,In)=>Xe[In]?(0,_r.A)(Wt,Xe[In](u)):Wt),{});return fn.propTypes={},fn.filterProps=u.reduce(((u,Xe)=>u.concat(Xe.filterProps)),[]),fn},Ar=Wt(9452);function borderTransform(u){return"number"!=typeof u?u:`${u}px solid`}function createBorderStyle(u,Xe){return(0,fr.Ay)({prop:u,themeKey:"borders",transform:Xe})}const Kr=createBorderStyle("border",borderTransform),no=createBorderStyle("borderTop",borderTransform),io=createBorderStyle("borderRight",borderTransform),oo=createBorderStyle("borderBottom",borderTransform),ao=createBorderStyle("borderLeft",borderTransform),so=createBorderStyle("borderColor"),co=createBorderStyle("borderTopColor"),ho=createBorderStyle("borderRightColor"),go=createBorderStyle("borderBottomColor"),xo=createBorderStyle("borderLeftColor"),ko=createBorderStyle("outline",borderTransform),Co=createBorderStyle("outlineColor"),borderRadius=u=>{if(void 0!==u.borderRadius&&null!==u.borderRadius){const Xe=(0,In.MA)(u.theme,"shape.borderRadius",4,"borderRadius"),styleFromPropValue=u=>({borderRadius:(0,In._W)(Xe,u)});return(0,Ar.NI)(u,u.borderRadius,styleFromPropValue)}return null};borderRadius.propTypes={},borderRadius.filterProps=["borderRadius"];wr(Kr,no,io,oo,ao,so,co,ho,go,xo,borderRadius,ko,Co);const gap=u=>{if(void 0!==u.gap&&null!==u.gap){const Xe=(0,In.MA)(u.theme,"spacing",8,"gap"),styleFromPropValue=u=>({gap:(0,In._W)(Xe,u)});return(0,Ar.NI)(u,u.gap,styleFromPropValue)}return null};gap.propTypes={},gap.filterProps=["gap"];const columnGap=u=>{if(void 0!==u.columnGap&&null!==u.columnGap){const Xe=(0,In.MA)(u.theme,"spacing",8,"columnGap"),styleFromPropValue=u=>({columnGap:(0,In._W)(Xe,u)});return(0,Ar.NI)(u,u.columnGap,styleFromPropValue)}return null};columnGap.propTypes={},columnGap.filterProps=["columnGap"];const rowGap=u=>{if(void 0!==u.rowGap&&null!==u.rowGap){const Xe=(0,In.MA)(u.theme,"spacing",8,"rowGap"),styleFromPropValue=u=>({rowGap:(0,In._W)(Xe,u)});return(0,Ar.NI)(u,u.rowGap,styleFromPropValue)}return null};rowGap.propTypes={},rowGap.filterProps=["rowGap"];wr(gap,columnGap,rowGap,(0,fr.Ay)({prop:"gridColumn"}),(0,fr.Ay)({prop:"gridRow"}),(0,fr.Ay)({prop:"gridAutoFlow"}),(0,fr.Ay)({prop:"gridAutoColumns"}),(0,fr.Ay)({prop:"gridAutoRows"}),(0,fr.Ay)({prop:"gridTemplateColumns"}),(0,fr.Ay)({prop:"gridTemplateRows"}),(0,fr.Ay)({prop:"gridTemplateAreas"}),(0,fr.Ay)({prop:"gridArea"}));function paletteTransform(u,Xe){return"grey"===Xe?Xe:u}wr((0,fr.Ay)({prop:"color",themeKey:"palette",transform:paletteTransform}),(0,fr.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),(0,fr.Ay)({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform}));function sizingTransform(u){return u<=1&&0!==u?100*u+"%":u}const Io=(0,fr.Ay)({prop:"width",transform:sizingTransform}),maxWidth=u=>{if(void 0!==u.maxWidth&&null!==u.maxWidth){const styleFromPropValue=Xe=>{var Wt,In;const fr=(null==(Wt=u.theme)||null==(Wt=Wt.breakpoints)||null==(Wt=Wt.values)?void 0:Wt[Xe])||Ar.zu[Xe];return fr?"px"!==(null==(In=u.theme)||null==(In=In.breakpoints)?void 0:In.unit)?{maxWidth:`${fr}${u.theme.breakpoints.unit}`}:{maxWidth:fr}:{maxWidth:sizingTransform(Xe)}};return(0,Ar.NI)(u,u.maxWidth,styleFromPropValue)}return null};maxWidth.filterProps=["maxWidth"];const zo=(0,fr.Ay)({prop:"minWidth",transform:sizingTransform}),Bo=(0,fr.Ay)({prop:"height",transform:sizingTransform}),ca=(0,fr.Ay)({prop:"maxHeight",transform:sizingTransform}),ua=(0,fr.Ay)({prop:"minHeight",transform:sizingTransform});(0,fr.Ay)({prop:"size",cssProperty:"width",transform:sizingTransform}),(0,fr.Ay)({prop:"size",cssProperty:"height",transform:sizingTransform}),wr(Io,maxWidth,zo,Bo,ca,ua,(0,fr.Ay)({prop:"boxSizing"}));var Da={border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:borderTransform},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:In.Ms},pt:{style:In.Ms},pr:{style:In.Ms},pb:{style:In.Ms},pl:{style:In.Ms},px:{style:In.Ms},py:{style:In.Ms},padding:{style:In.Ms},paddingTop:{style:In.Ms},paddingRight:{style:In.Ms},paddingBottom:{style:In.Ms},paddingLeft:{style:In.Ms},paddingX:{style:In.Ms},paddingY:{style:In.Ms},paddingInline:{style:In.Ms},paddingInlineStart:{style:In.Ms},paddingInlineEnd:{style:In.Ms},paddingBlock:{style:In.Ms},paddingBlockStart:{style:In.Ms},paddingBlockEnd:{style:In.Ms},m:{style:In.Lc},mt:{style:In.Lc},mr:{style:In.Lc},mb:{style:In.Lc},ml:{style:In.Lc},mx:{style:In.Lc},my:{style:In.Lc},margin:{style:In.Lc},marginTop:{style:In.Lc},marginRight:{style:In.Lc},marginBottom:{style:In.Lc},marginLeft:{style:In.Lc},marginX:{style:In.Lc},marginY:{style:In.Lc},marginInline:{style:In.Lc},marginInlineStart:{style:In.Lc},marginInlineEnd:{style:In.Lc},marginBlock:{style:In.Lc},marginBlockStart:{style:In.Lc},marginBlockEnd:{style:In.Lc},displayPrint:{cssProperty:!1,transform:u=>({"@media print":{display:u}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}},9599:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return extendSxProp}});var In=Wt(8168),fr=Wt(8587),_r=Wt(1317),wr=Wt(4188);const Ar=["sx"],splitProps=u=>{var Xe,Wt;const In={systemProps:{},otherProps:{}},fr=null!=(Xe=null==u||null==(Wt=u.theme)?void 0:Wt.unstable_sxConfig)?Xe:wr.A;return Object.keys(u).forEach((Xe=>{fr[Xe]?In.systemProps[Xe]=u[Xe]:In.otherProps[Xe]=u[Xe]})),In};function extendSxProp(u){const{sx:Xe}=u,Wt=(0,fr.A)(u,Ar),{systemProps:wr,otherProps:Kr}=splitProps(Wt);let no;return no=Array.isArray(Xe)?[wr,...Xe]:"function"==typeof Xe?(...u)=>{const Wt=Xe(...u);return(0,_r.Q)(Wt)?(0,In.A)({},wr,Wt):wr}:(0,In.A)({},wr,Xe),(0,In.A)({},Kr,{sx:no})}},3857:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return In.A},extendSxProp:function(){return fr.A},unstable_createStyleFunctionSx:function(){return In.k},unstable_defaultSxConfig:function(){return _r.A}});var In=Wt(3571),fr=Wt(9599),_r=Wt(4188)},3571:function(u,Xe,Wt){"use strict";Wt.d(Xe,{k:function(){return unstable_createStyleFunctionSx}});var In=Wt(3967),fr=Wt(4620),_r=Wt(6481),wr=Wt(9452),Ar=Wt(4188);function unstable_createStyleFunctionSx(){function getThemeValue(u,Xe,Wt,fr){const Ar={[u]:Xe,theme:Wt},Kr=fr[u];if(!Kr)return{[u]:Xe};const{cssProperty:no=u,themeKey:io,transform:oo,style:ao}=Kr;if(null==Xe)return null;if("typography"===io&&"inherit"===Xe)return{[u]:Xe};const so=(0,_r.Yn)(Wt,io)||{};if(ao)return ao(Ar);return(0,wr.NI)(Ar,Xe,(Xe=>{let Wt=(0,_r.BO)(so,oo,Xe);return Xe===Wt&&"string"==typeof Xe&&(Wt=(0,_r.BO)(so,oo,`${u}${"default"===Xe?"":(0,In.A)(Xe)}`,Xe)),!1===no?Wt:{[no]:Wt}}))}return function styleFunctionSx(u){var Xe;const{sx:Wt,theme:In={}}=u||{};if(!Wt)return null;const _r=null!=(Xe=In.unstable_sxConfig)?Xe:Ar.A;function traverse(u){let Xe=u;if("function"==typeof u)Xe=u(In);else if("object"!=typeof u)return u;if(!Xe)return null;const Wt=(0,wr.EU)(In.breakpoints),Ar=Object.keys(Wt);let Kr=Wt;return Object.keys(Xe).forEach((u=>{const Wt=function callIfFn(u,Xe){return"function"==typeof u?u(Xe):u}(Xe[u],In);if(null!=Wt)if("object"==typeof Wt)if(_r[u])Kr=(0,fr.A)(Kr,getThemeValue(u,Wt,In,_r));else{const Xe=(0,wr.NI)({theme:In},Wt,(Xe=>({[u]:Xe})));!function objectsHaveSameKeys(...u){const Xe=u.reduce(((u,Xe)=>u.concat(Object.keys(Xe))),[]),Wt=new Set(Xe);return u.every((u=>Wt.size===Object.keys(u).length))}(Xe,Wt)?Kr=(0,fr.A)(Kr,Xe):Kr[u]=styleFunctionSx({sx:Wt,theme:In})}else Kr=(0,fr.A)(Kr,getThemeValue(u,Wt,In,_r))})),(0,wr.vf)(Ar,Kr)}return Array.isArray(Wt)?Wt.map(traverse):traverse(Wt)}}const Kr=unstable_createStyleFunctionSx();Kr.filterProps=["sx"],Xe.A=Kr},2923:function(u,Xe,Wt){"use strict";Xe.A=void 0;var In=function _interopRequireWildcard(u,Xe){if(!Xe&&u&&u.__esModule)return u;if(null===u||"object"!=typeof u&&"function"!=typeof u)return{default:u};var Wt=_getRequireWildcardCache(Xe);if(Wt&&Wt.has(u))return Wt.get(u);var In={__proto__:null},fr=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _r in u)if("default"!==_r&&Object.prototype.hasOwnProperty.call(u,_r)){var wr=fr?Object.getOwnPropertyDescriptor(u,_r):null;wr&&(wr.get||wr.set)?Object.defineProperty(In,_r,wr):In[_r]=u[_r]}return In.default=u,Wt&&Wt.set(u,In),In}(Wt(6540)),fr=Wt(2532);function _getRequireWildcardCache(u){if("function"!=typeof WeakMap)return null;var Xe=new WeakMap,Wt=new WeakMap;return(_getRequireWildcardCache=function(u){return u?Wt:Xe})(u)}Xe.A=function useTheme(u=null){const Xe=In.useContext(fr.ThemeContext);return!Xe||function isObjectEmpty(u){return 0===Object.keys(u).length}(Xe)?u:Xe}},9071:function(u,Xe){"use strict";const defaultGenerator=u=>u,Wt=(()=>{let u=defaultGenerator;return{configure(Xe){u=Xe},generate:Xe=>u(Xe),reset(){u=defaultGenerator}}})();Xe.A=Wt},3967:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return capitalize}});var In=Wt(9453);function capitalize(u){if("string"!=typeof u)throw new Error((0,In.A)(7));return u.charAt(0).toUpperCase()+u.slice(1)}},7149:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return In.A}});var In=Wt(3967)},7535:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return In}});var In=function clamp(u,Xe=Number.MIN_SAFE_INTEGER,Wt=Number.MAX_SAFE_INTEGER){return Math.max(Xe,Math.min(u,Wt))}},5659:function(u,Xe,Wt){"use strict";function composeClasses(u,Xe,Wt=void 0){const In={};return Object.keys(u).forEach((fr=>{In[fr]=u[fr].reduce(((u,In)=>{if(In){const fr=Xe(In);""!==fr&&u.push(fr),Wt&&Wt[In]&&u.push(Wt[In])}return u}),[]).join(" ")})),In}Wt.d(Xe,{A:function(){return composeClasses}})},6673:function(u,Xe,Wt){"use strict";function createChainedFunction(...u){return u.reduce(((u,Xe)=>null==Xe?u:function chainedFunction(...Wt){u.apply(this,Wt),Xe.apply(this,Wt)}),(()=>{}))}Wt.d(Xe,{A:function(){return createChainedFunction}})},4705:function(u,Xe,Wt){"use strict";function debounce(u,Xe=166){let Wt;function debounced(...In){clearTimeout(Wt),Wt=setTimeout((()=>{u.apply(this,In)}),Xe)}return debounced.clear=()=>{clearTimeout(Wt)},debounced}Wt.d(Xe,{A:function(){return debounce}})},1317:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return deepmerge},Q:function(){return isPlainObject}});var In=Wt(8168);function isPlainObject(u){if("object"!=typeof u||null===u)return!1;const Xe=Object.getPrototypeOf(u);return!(null!==Xe&&Xe!==Object.prototype&&null!==Object.getPrototypeOf(Xe)||Symbol.toStringTag in u||Symbol.iterator in u)}function deepClone(u){if(!isPlainObject(u))return u;const Xe={};return Object.keys(u).forEach((Wt=>{Xe[Wt]=deepClone(u[Wt])})),Xe}function deepmerge(u,Xe,Wt={clone:!0}){const fr=Wt.clone?(0,In.A)({},u):u;return isPlainObject(u)&&isPlainObject(Xe)&&Object.keys(Xe).forEach((In=>{isPlainObject(Xe[In])&&Object.prototype.hasOwnProperty.call(u,In)&&isPlainObject(u[In])?fr[In]=deepmerge(u[In],Xe[In],Wt):Wt.clone?fr[In]=isPlainObject(Xe[In])?deepClone(Xe[In]):Xe[In]:fr[In]=Xe[In]})),fr}},4239:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return In.A},isPlainObject:function(){return In.Q}});var In=Wt(1317)},9453:function(u,Xe,Wt){"use strict";function formatMuiErrorMessage(u){let Xe="https://mui.com/production-error/?code="+u;for(let u=1;u<arguments.length;u+=1)Xe+="&args[]="+encodeURIComponent(arguments[u]);return"Minified MUI error #"+u+"; visit "+Xe+" for the full message."}Wt.d(Xe,{A:function(){return formatMuiErrorMessage}})},8944:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return In.A}});var In=Wt(9453)},1609:function(u,Xe,Wt){"use strict";Wt.d(Xe,{Ay:function(){return generateUtilityClass}});var In=Wt(9071);const fr={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 generateUtilityClass(u,Xe,Wt="Mui"){const _r=fr[Xe];return _r?`${Wt}-${_r}`:`${In.A.generate(u)}-${Xe}`}},8413:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return generateUtilityClasses}});var In=Wt(1609);function generateUtilityClasses(u,Xe,Wt="Mui"){const fr={};return Xe.forEach((Xe=>{fr[Xe]=(0,In.Ay)(u,Xe,Wt)})),fr}},7320:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return getDisplayName},getFunctionName:function(){return getFunctionName}});var In=Wt(4363);const fr=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function getFunctionName(u){const Xe=`${u}`.match(fr);return Xe&&Xe[1]||""}function getFunctionComponentName(u,Xe=""){return u.displayName||u.name||getFunctionName(u)||Xe}function getWrappedName(u,Xe,Wt){const In=getFunctionComponentName(Xe);return u.displayName||(""!==In?`${Wt}(${In})`:Wt)}function getDisplayName(u){if(null!=u){if("string"==typeof u)return u;if("function"==typeof u)return getFunctionComponentName(u,"Component");if("object"==typeof u)switch(u.$$typeof){case In.ForwardRef:return getWrappedName(u,u.render,"ForwardRef");case In.Memo:return getWrappedName(u,u.type,"memo");default:return}}}},2325:function(u,Xe,Wt){"use strict";function ownerDocument(u){return u&&u.ownerDocument||document}Wt.d(Xe,{A:function(){return ownerDocument}})},4877:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return ownerWindow}});var In=Wt(2325);function ownerWindow(u){return(0,In.A)(u).defaultView||window}},7379:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return resolveProps}});var In=Wt(8168);function resolveProps(u,Xe){const Wt=(0,In.A)({},Xe);return Object.keys(u).forEach((fr=>{if(fr.toString().match(/^(components|slots)$/))Wt[fr]=(0,In.A)({},u[fr],Wt[fr]);else if(fr.toString().match(/^(componentsProps|slotProps)$/)){const _r=u[fr]||{},wr=Xe[fr];Wt[fr]={},wr&&Object.keys(wr)?_r&&Object.keys(_r)?(Wt[fr]=(0,In.A)({},wr),Object.keys(_r).forEach((u=>{Wt[fr][u]=resolveProps(_r[u],wr[u])}))):Wt[fr]=wr:Wt[fr]=_r}else void 0===Wt[fr]&&(Wt[fr]=u[fr])})),Wt}},7365:function(u,Xe,Wt){"use strict";function setRef(u,Xe){"function"==typeof u?u(Xe):u&&(u.current=Xe)}Wt.d(Xe,{A:function(){return setRef}})},1529:function(u,Xe,Wt){"use strict";var In=Wt(6540);const fr="undefined"!=typeof window?In.useLayoutEffect:In.useEffect;Xe.A=fr},1547:function(u,Xe,Wt){"use strict";var In=Wt(6540),fr=Wt(1529);Xe.A=function useEventCallback(u){const Xe=In.useRef(u);return(0,fr.A)((()=>{Xe.current=u})),In.useRef(((...u)=>(0,Xe.current)(...u))).current}},1523:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return useForkRef}});var In=Wt(6540),fr=Wt(7365);function useForkRef(...u){return In.useMemo((()=>u.every((u=>null==u))?null:Xe=>{u.forEach((u=>{(0,fr.A)(u,Xe)}))}),u)}},4661:function(u,Xe,Wt){"use strict";var In;Wt.d(Xe,{A:function(){return useId}});var fr=Wt(6540);let _r=0;const wr=(In||(In=Wt.t(fr,2)))["useId".toString()];function useId(u){if(void 0!==wr){const Xe=wr();return null!=u?u:Xe}return function useGlobalId(u){const[Xe,Wt]=fr.useState(u),In=u||Xe;return fr.useEffect((()=>{null==Xe&&(_r+=1,Wt(`mui-${_r}`))}),[Xe]),In}(u)}},3068:function(u,Xe,Wt){"use strict";Wt.d(Xe,{E:function(){return Timeout},A:function(){return useTimeout}});var In=Wt(6540);const fr={};const _r=[];class Timeout{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Timeout}start(u,Xe){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,Xe()}),u)}}function useTimeout(){const u=function useLazyRef(u,Xe){const Wt=In.useRef(fr);return Wt.current===fr&&(Wt.current=u(Xe)),Wt}(Timeout.create).current;return function useOnMount(u){In.useEffect(u,_r)}(u.disposeEffect),u}},1508:function(u){function r(u){var Xe,Wt,In="";if("string"==typeof u||"number"==typeof u)In+=u;else if("object"==typeof u)if(Array.isArray(u)){var fr=u.length;for(Xe=0;Xe<fr;Xe++)u[Xe]&&(Wt=r(u[Xe]))&&(In&&(In+=" "),In+=Wt)}else for(Wt in u)u[Wt]&&(In&&(In+=" "),In+=Wt);return In}function e(){for(var u,Xe,Wt=0,In="",fr=arguments.length;Wt<fr;Wt++)(u=arguments[Wt])&&(Xe=r(u))&&(In&&(In+=" "),In+=Xe);return In}u.exports=e,u.exports.clsx=e},4146:function(u,Xe,Wt){"use strict";var In=Wt(4363),fr={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},_r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},wr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ar={};function getStatics(u){return In.isMemo(u)?wr:Ar[u.$$typeof]||fr}Ar[In.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ar[In.Memo]=wr;var Kr=Object.defineProperty,no=Object.getOwnPropertyNames,io=Object.getOwnPropertySymbols,oo=Object.getOwnPropertyDescriptor,ao=Object.getPrototypeOf,so=Object.prototype;u.exports=function hoistNonReactStatics(u,Xe,Wt){if("string"!=typeof Xe){if(so){var In=ao(Xe);In&&In!==so&&hoistNonReactStatics(u,In,Wt)}var fr=no(Xe);io&&(fr=fr.concat(io(Xe)));for(var wr=getStatics(u),Ar=getStatics(Xe),co=0;co<fr.length;++co){var ho=fr[co];if(!(_r[ho]||Wt&&Wt[ho]||Ar&&Ar[ho]||wr&&wr[ho])){var go=oo(Xe,ho);try{Kr(u,ho,go)}catch(u){}}}}return u}},2694:function(u,Xe,Wt){"use strict";var In=Wt(6925);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,u.exports=function(){function shim(u,Xe,Wt,fr,_r,wr){if(wr!==In){var Ar=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 Ar.name="Invariant Violation",Ar}}function getShim(){return shim}shim.isRequired=shim;var u={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return u.PropTypes=u,u}},5556:function(u,Xe,Wt){u.exports=Wt(2694)()},6925:function(u){"use strict";u.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:function(u,Xe,Wt){"use strict";var In=Wt(6540),fr=Wt(9982);function p(u){for(var Xe="https://reactjs.org/docs/error-decoder.html?invariant="+u,Wt=1;Wt<arguments.length;Wt++)Xe+="&args[]="+encodeURIComponent(arguments[Wt]);return"Minified React error #"+u+"; visit "+Xe+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var _r=new Set,wr={};function fa(u,Xe){ha(u,Xe),ha(u+"Capture",Xe)}function ha(u,Xe){for(wr[u]=Xe,u=0;u<Xe.length;u++)_r.add(Xe[u])}var Ar=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Kr=Object.prototype.hasOwnProperty,no=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,io={},oo={};function v(u,Xe,Wt,In,fr,_r,wr){this.acceptsBooleans=2===Xe||3===Xe||4===Xe,this.attributeName=In,this.attributeNamespace=fr,this.mustUseProperty=Wt,this.propertyName=u,this.type=Xe,this.sanitizeURL=_r,this.removeEmptyString=wr}var ao={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(u){ao[u]=new v(u,0,!1,u,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(u){var Xe=u[0];ao[Xe]=new v(Xe,1,!1,u[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(u){ao[u]=new v(u,2,!1,u.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(u){ao[u]=new v(u,2,!1,u,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(u){ao[u]=new v(u,3,!1,u.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(u){ao[u]=new v(u,3,!0,u,null,!1,!1)})),["capture","download"].forEach((function(u){ao[u]=new v(u,4,!1,u,null,!1,!1)})),["cols","rows","size","span"].forEach((function(u){ao[u]=new v(u,6,!1,u,null,!1,!1)})),["rowSpan","start"].forEach((function(u){ao[u]=new v(u,5,!1,u.toLowerCase(),null,!1,!1)}));var so=/[\-:]([a-z])/g;function sa(u){return u[1].toUpperCase()}function ta(u,Xe,Wt,In){var fr=ao.hasOwnProperty(Xe)?ao[Xe]:null;(null!==fr?0!==fr.type:In||!(2<Xe.length)||"o"!==Xe[0]&&"O"!==Xe[0]||"n"!==Xe[1]&&"N"!==Xe[1])&&(function qa(u,Xe,Wt,In){if(null==Xe||function pa(u,Xe,Wt,In){if(null!==Wt&&0===Wt.type)return!1;switch(typeof Xe){case"function":case"symbol":return!0;case"boolean":return!In&&(null!==Wt?!Wt.acceptsBooleans:"data-"!==(u=u.toLowerCase().slice(0,5))&&"aria-"!==u);default:return!1}}(u,Xe,Wt,In))return!0;if(In)return!1;if(null!==Wt)switch(Wt.type){case 3:return!Xe;case 4:return!1===Xe;case 5:return isNaN(Xe);case 6:return isNaN(Xe)||1>Xe}return!1}(Xe,Wt,fr,In)&&(Wt=null),In||null===fr?function oa(u){return!!Kr.call(oo,u)||!Kr.call(io,u)&&(no.test(u)?oo[u]=!0:(io[u]=!0,!1))}(Xe)&&(null===Wt?u.removeAttribute(Xe):u.setAttribute(Xe,""+Wt)):fr.mustUseProperty?u[fr.propertyName]=null===Wt?3!==fr.type&&"":Wt:(Xe=fr.attributeName,In=fr.attributeNamespace,null===Wt?u.removeAttribute(Xe):(Wt=3===(fr=fr.type)||4===fr&&!0===Wt?"":""+Wt,In?u.setAttributeNS(In,Xe,Wt):u.setAttribute(Xe,Wt))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(u){var Xe=u.replace(so,sa);ao[Xe]=new v(Xe,1,!1,u,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(u){var Xe=u.replace(so,sa);ao[Xe]=new v(Xe,1,!1,u,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(u){var Xe=u.replace(so,sa);ao[Xe]=new v(Xe,1,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(u){ao[u]=new v(u,1,!1,u.toLowerCase(),null,!1,!1)})),ao.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(u){ao[u]=new v(u,1,!1,u.toLowerCase(),null,!0,!0)}));var co=In.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ho=Symbol.for("react.element"),go=Symbol.for("react.portal"),xo=Symbol.for("react.fragment"),ko=Symbol.for("react.strict_mode"),Co=Symbol.for("react.profiler"),Io=Symbol.for("react.provider"),zo=Symbol.for("react.context"),Bo=Symbol.for("react.forward_ref"),ca=Symbol.for("react.suspense"),ua=Symbol.for("react.suspense_list"),Da=Symbol.for("react.memo"),ns=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var yl=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var vl=Symbol.iterator;function Ka(u){return null===u||"object"!=typeof u?null:"function"==typeof(u=vl&&u[vl]||u["@@iterator"])?u:null}var kl,Al=Object.assign;function Ma(u){if(void 0===kl)try{throw Error()}catch(u){var Xe=u.stack.trim().match(/\n( *(at )?)/);kl=Xe&&Xe[1]||""}return"\n"+kl+u}var Ml=!1;function Oa(u,Xe){if(!u||Ml)return"";Ml=!0;var Wt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(Xe)if(Xe=function(){throw Error()},Object.defineProperty(Xe.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(Xe,[])}catch(u){var In=u}Reflect.construct(u,[],Xe)}else{try{Xe.call()}catch(u){In=u}u.call(Xe.prototype)}else{try{throw Error()}catch(u){In=u}u()}}catch(Xe){if(Xe&&In&&"string"==typeof Xe.stack){for(var fr=Xe.stack.split("\n"),_r=In.stack.split("\n"),wr=fr.length-1,Ar=_r.length-1;1<=wr&&0<=Ar&&fr[wr]!==_r[Ar];)Ar--;for(;1<=wr&&0<=Ar;wr--,Ar--)if(fr[wr]!==_r[Ar]){if(1!==wr||1!==Ar)do{if(wr--,0>--Ar||fr[wr]!==_r[Ar]){var Kr="\n"+fr[wr].replace(" at new "," at ");return u.displayName&&Kr.includes("<anonymous>")&&(Kr=Kr.replace("<anonymous>",u.displayName)),Kr}}while(1<=wr&&0<=Ar);break}}}finally{Ml=!1,Error.prepareStackTrace=Wt}return(u=u?u.displayName||u.name:"")?Ma(u):""}function Pa(u){switch(u.tag){case 5:return Ma(u.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return u=Oa(u.type,!1);case 11:return u=Oa(u.type.render,!1);case 1:return u=Oa(u.type,!0);default:return""}}function Qa(u){if(null==u)return null;if("function"==typeof u)return u.displayName||u.name||null;if("string"==typeof u)return u;switch(u){case xo:return"Fragment";case go:return"Portal";case Co:return"Profiler";case ko:return"StrictMode";case ca:return"Suspense";case ua:return"SuspenseList"}if("object"==typeof u)switch(u.$$typeof){case zo:return(u.displayName||"Context")+".Consumer";case Io:return(u._context.displayName||"Context")+".Provider";case Bo:var Xe=u.render;return(u=u.displayName)||(u=""!==(u=Xe.displayName||Xe.name||"")?"ForwardRef("+u+")":"ForwardRef"),u;case Da:return null!==(Xe=u.displayName||null)?Xe:Qa(u.type)||"Memo";case ns:Xe=u._payload,u=u._init;try{return Qa(u(Xe))}catch(u){}}return null}function Ra(u){var Xe=u.type;switch(u.tag){case 24:return"Cache";case 9:return(Xe.displayName||"Context")+".Consumer";case 10:return(Xe._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=(u=Xe.render).displayName||u.name||"",Xe.displayName||(""!==u?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return Xe;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(Xe);case 8:return Xe===ko?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof Xe)return Xe.displayName||Xe.name||null;if("string"==typeof Xe)return Xe}return null}function Sa(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":case"object":return u;default:return""}}function Ta(u){var Xe=u.type;return(u=u.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===Xe||"radio"===Xe)}function Va(u){u._valueTracker||(u._valueTracker=function Ua(u){var Xe=Ta(u)?"checked":"value",Wt=Object.getOwnPropertyDescriptor(u.constructor.prototype,Xe),In=""+u[Xe];if(!u.hasOwnProperty(Xe)&&void 0!==Wt&&"function"==typeof Wt.get&&"function"==typeof Wt.set){var fr=Wt.get,_r=Wt.set;return Object.defineProperty(u,Xe,{configurable:!0,get:function(){return fr.call(this)},set:function(u){In=""+u,_r.call(this,u)}}),Object.defineProperty(u,Xe,{enumerable:Wt.enumerable}),{getValue:function(){return In},setValue:function(u){In=""+u},stopTracking:function(){u._valueTracker=null,delete u[Xe]}}}}(u))}function Wa(u){if(!u)return!1;var Xe=u._valueTracker;if(!Xe)return!0;var Wt=Xe.getValue(),In="";return u&&(In=Ta(u)?u.checked?"true":"false":u.value),(u=In)!==Wt&&(Xe.setValue(u),!0)}function Xa(u){if(void 0===(u=u||("undefined"!=typeof document?document:void 0)))return null;try{return u.activeElement||u.body}catch(Xe){return u.body}}function Ya(u,Xe){var Wt=Xe.checked;return Al({},Xe,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=Wt?Wt:u._wrapperState.initialChecked})}function Za(u,Xe){var Wt=null==Xe.defaultValue?"":Xe.defaultValue,In=null!=Xe.checked?Xe.checked:Xe.defaultChecked;Wt=Sa(null!=Xe.value?Xe.value:Wt),u._wrapperState={initialChecked:In,initialValue:Wt,controlled:"checkbox"===Xe.type||"radio"===Xe.type?null!=Xe.checked:null!=Xe.value}}function ab(u,Xe){null!=(Xe=Xe.checked)&&ta(u,"checked",Xe,!1)}function bb(u,Xe){ab(u,Xe);var Wt=Sa(Xe.value),In=Xe.type;if(null!=Wt)"number"===In?(0===Wt&&""===u.value||u.value!=Wt)&&(u.value=""+Wt):u.value!==""+Wt&&(u.value=""+Wt);else if("submit"===In||"reset"===In)return void u.removeAttribute("value");Xe.hasOwnProperty("value")?cb(u,Xe.type,Wt):Xe.hasOwnProperty("defaultValue")&&cb(u,Xe.type,Sa(Xe.defaultValue)),null==Xe.checked&&null!=Xe.defaultChecked&&(u.defaultChecked=!!Xe.defaultChecked)}function db(u,Xe,Wt){if(Xe.hasOwnProperty("value")||Xe.hasOwnProperty("defaultValue")){var In=Xe.type;if(!("submit"!==In&&"reset"!==In||void 0!==Xe.value&&null!==Xe.value))return;Xe=""+u._wrapperState.initialValue,Wt||Xe===u.value||(u.value=Xe),u.defaultValue=Xe}""!==(Wt=u.name)&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,""!==Wt&&(u.name=Wt)}function cb(u,Xe,Wt){"number"===Xe&&Xa(u.ownerDocument)===u||(null==Wt?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+Wt&&(u.defaultValue=""+Wt))}var Rl=Array.isArray;function fb(u,Xe,Wt,In){if(u=u.options,Xe){Xe={};for(var fr=0;fr<Wt.length;fr++)Xe["$"+Wt[fr]]=!0;for(Wt=0;Wt<u.length;Wt++)fr=Xe.hasOwnProperty("$"+u[Wt].value),u[Wt].selected!==fr&&(u[Wt].selected=fr),fr&&In&&(u[Wt].defaultSelected=!0)}else{for(Wt=""+Sa(Wt),Xe=null,fr=0;fr<u.length;fr++){if(u[fr].value===Wt)return u[fr].selected=!0,void(In&&(u[fr].defaultSelected=!0));null!==Xe||u[fr].disabled||(Xe=u[fr])}null!==Xe&&(Xe.selected=!0)}}function gb(u,Xe){if(null!=Xe.dangerouslySetInnerHTML)throw Error(p(91));return Al({},Xe,{value:void 0,defaultValue:void 0,children:""+u._wrapperState.initialValue})}function hb(u,Xe){var Wt=Xe.value;if(null==Wt){if(Wt=Xe.children,Xe=Xe.defaultValue,null!=Wt){if(null!=Xe)throw Error(p(92));if(Rl(Wt)){if(1<Wt.length)throw Error(p(93));Wt=Wt[0]}Xe=Wt}null==Xe&&(Xe=""),Wt=Xe}u._wrapperState={initialValue:Sa(Wt)}}function ib(u,Xe){var Wt=Sa(Xe.value),In=Sa(Xe.defaultValue);null!=Wt&&((Wt=""+Wt)!==u.value&&(u.value=Wt),null==Xe.defaultValue&&u.defaultValue!==Wt&&(u.defaultValue=Wt)),null!=In&&(u.defaultValue=""+In)}function jb(u){var Xe=u.textContent;Xe===u._wrapperState.initialValue&&""!==Xe&&null!==Xe&&(u.value=Xe)}function kb(u){switch(u){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function lb(u,Xe){return null==u||"http://www.w3.org/1999/xhtml"===u?kb(Xe):"http://www.w3.org/2000/svg"===u&&"foreignObject"===Xe?"http://www.w3.org/1999/xhtml":u}var Ol,Ll,Dl=(Ll=function(u,Xe){if("http://www.w3.org/2000/svg"!==u.namespaceURI||"innerHTML"in u)u.innerHTML=Xe;else{for((Ol=Ol||document.createElement("div")).innerHTML="<svg>"+Xe.valueOf().toString()+"</svg>",Xe=Ol.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;Xe.firstChild;)u.appendChild(Xe.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(u,Xe,Wt,In){MSApp.execUnsafeLocalFunction((function(){return Ll(u,Xe)}))}:Ll);function ob(u,Xe){if(Xe){var Wt=u.firstChild;if(Wt&&Wt===u.lastChild&&3===Wt.nodeType)return void(Wt.nodeValue=Xe)}u.textContent=Xe}var Bl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nl=["Webkit","ms","Moz","O"];function rb(u,Xe,Wt){return null==Xe||"boolean"==typeof Xe||""===Xe?"":Wt||"number"!=typeof Xe||0===Xe||Bl.hasOwnProperty(u)&&Bl[u]?(""+Xe).trim():Xe+"px"}function sb(u,Xe){for(var Wt in u=u.style,Xe)if(Xe.hasOwnProperty(Wt)){var In=0===Wt.indexOf("--"),fr=rb(Wt,Xe[Wt],In);"float"===Wt&&(Wt="cssFloat"),In?u.setProperty(Wt,fr):u[Wt]=fr}}Object.keys(Bl).forEach((function(u){Nl.forEach((function(Xe){Xe=Xe+u.charAt(0).toUpperCase()+u.substring(1),Bl[Xe]=Bl[u]}))}));var Vl=Al({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(u,Xe){if(Xe){if(Vl[u]&&(null!=Xe.children||null!=Xe.dangerouslySetInnerHTML))throw Error(p(137,u));if(null!=Xe.dangerouslySetInnerHTML){if(null!=Xe.children)throw Error(p(60));if("object"!=typeof Xe.dangerouslySetInnerHTML||!("__html"in Xe.dangerouslySetInnerHTML))throw Error(p(61))}if(null!=Xe.style&&"object"!=typeof Xe.style)throw Error(p(62))}}function vb(u,Xe){if(-1===u.indexOf("-"))return"string"==typeof Xe.is;switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ul=null;function xb(u){return(u=u.target||u.srcElement||window).correspondingUseElement&&(u=u.correspondingUseElement),3===u.nodeType?u.parentNode:u}var $l=null,Wl=null,Zl=null;function Bb(u){if(u=Cb(u)){if("function"!=typeof $l)throw Error(p(280));var Xe=u.stateNode;Xe&&(Xe=Db(Xe),$l(u.stateNode,u.type,Xe))}}function Eb(u){Wl?Zl?Zl.push(u):Zl=[u]:Wl=u}function Fb(){if(Wl){var u=Wl,Xe=Zl;if(Zl=Wl=null,Bb(u),Xe)for(u=0;u<Xe.length;u++)Bb(Xe[u])}}function Gb(u,Xe){return u(Xe)}function Hb(){}var Gl=!1;function Jb(u,Xe,Wt){if(Gl)return u(Xe,Wt);Gl=!0;try{return Gb(u,Xe,Wt)}finally{Gl=!1,(null!==Wl||null!==Zl)&&(Hb(),Fb())}}function Kb(u,Xe){var Wt=u.stateNode;if(null===Wt)return null;var In=Db(Wt);if(null===In)return null;Wt=In[Xe];e:switch(Xe){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(In=!In.disabled)||(In=!("button"===(u=u.type)||"input"===u||"select"===u||"textarea"===u)),u=!In;break e;default:u=!1}if(u)return null;if(Wt&&"function"!=typeof Wt)throw Error(p(231,Xe,typeof Wt));return Wt}var Xl=!1;if(Ar)try{var Jl={};Object.defineProperty(Jl,"passive",{get:function(){Xl=!0}}),window.addEventListener("test",Jl,Jl),window.removeEventListener("test",Jl,Jl)}catch(Ll){Xl=!1}function Nb(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){var no=Array.prototype.slice.call(arguments,3);try{Xe.apply(Wt,no)}catch(u){this.onError(u)}}var Ql=!1,rc=null,ic=!1,oc=null,lc={onError:function(u){Ql=!0,rc=u}};function Tb(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){Ql=!1,rc=null,Nb.apply(lc,arguments)}function Vb(u){var Xe=u,Wt=u;if(u.alternate)for(;Xe.return;)Xe=Xe.return;else{u=Xe;do{!!(4098&(Xe=u).flags)&&(Wt=Xe.return),u=Xe.return}while(u)}return 3===Xe.tag?Wt:null}function Wb(u){if(13===u.tag){var Xe=u.memoizedState;if(null===Xe&&(null!==(u=u.alternate)&&(Xe=u.memoizedState)),null!==Xe)return Xe.dehydrated}return null}function Xb(u){if(Vb(u)!==u)throw Error(p(188))}function Zb(u){return null!==(u=function Yb(u){var Xe=u.alternate;if(!Xe){if(null===(Xe=Vb(u)))throw Error(p(188));return Xe!==u?null:u}for(var Wt=u,In=Xe;;){var fr=Wt.return;if(null===fr)break;var _r=fr.alternate;if(null===_r){if(null!==(In=fr.return)){Wt=In;continue}break}if(fr.child===_r.child){for(_r=fr.child;_r;){if(_r===Wt)return Xb(fr),u;if(_r===In)return Xb(fr),Xe;_r=_r.sibling}throw Error(p(188))}if(Wt.return!==In.return)Wt=fr,In=_r;else{for(var wr=!1,Ar=fr.child;Ar;){if(Ar===Wt){wr=!0,Wt=fr,In=_r;break}if(Ar===In){wr=!0,In=fr,Wt=_r;break}Ar=Ar.sibling}if(!wr){for(Ar=_r.child;Ar;){if(Ar===Wt){wr=!0,Wt=_r,In=fr;break}if(Ar===In){wr=!0,In=_r,Wt=fr;break}Ar=Ar.sibling}if(!wr)throw Error(p(189))}}if(Wt.alternate!==In)throw Error(p(190))}if(3!==Wt.tag)throw Error(p(188));return Wt.stateNode.current===Wt?u:Xe}(u))?$b(u):null}function $b(u){if(5===u.tag||6===u.tag)return u;for(u=u.child;null!==u;){var Xe=$b(u);if(null!==Xe)return Xe;u=u.sibling}return null}var gc=fr.unstable_scheduleCallback,bc=fr.unstable_cancelCallback,eu=fr.unstable_shouldYield,tu=fr.unstable_requestPaint,nu=fr.unstable_now,iu=fr.unstable_getCurrentPriorityLevel,su=fr.unstable_ImmediatePriority,cu=fr.unstable_UserBlockingPriority,uu=fr.unstable_NormalPriority,hu=fr.unstable_LowPriority,Iu=fr.unstable_IdlePriority,zu=null,Lu=null;var Du=Math.clz32?Math.clz32:function nc(u){return u>>>=0,0===u?32:31-(Fu(u)/Nu|0)|0},Fu=Math.log,Nu=Math.LN2;var Vu=64,Uu=4194304;function tc(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&u;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&u;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function uc(u,Xe){var Wt=u.pendingLanes;if(0===Wt)return 0;var In=0,fr=u.suspendedLanes,_r=u.pingedLanes,wr=268435455&Wt;if(0!==wr){var Ar=wr&~fr;0!==Ar?In=tc(Ar):0!==(_r&=wr)&&(In=tc(_r))}else 0!==(wr=Wt&~fr)?In=tc(wr):0!==_r&&(In=tc(_r));if(0===In)return 0;if(0!==Xe&&Xe!==In&&!(Xe&fr)&&((fr=In&-In)>=(_r=Xe&-Xe)||16===fr&&4194240&_r))return Xe;if(4&In&&(In|=16&Wt),0!==(Xe=u.entangledLanes))for(u=u.entanglements,Xe&=In;0<Xe;)fr=1<<(Wt=31-Du(Xe)),In|=u[Wt],Xe&=~fr;return In}function vc(u,Xe){switch(u){case 1:case 2:case 4:return Xe+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return Xe+5e3;default:return-1}}function xc(u){return 0!==(u=-1073741825&u.pendingLanes)?u:1073741824&u?1073741824:0}function yc(){var u=Vu;return!(4194240&(Vu<<=1))&&(Vu=64),u}function zc(u){for(var Xe=[],Wt=0;31>Wt;Wt++)Xe.push(u);return Xe}function Ac(u,Xe,Wt){u.pendingLanes|=Xe,536870912!==Xe&&(u.suspendedLanes=0,u.pingedLanes=0),(u=u.eventTimes)[Xe=31-Du(Xe)]=Wt}function Cc(u,Xe){var Wt=u.entangledLanes|=Xe;for(u=u.entanglements;Wt;){var In=31-Du(Wt),fr=1<<In;fr&Xe|u[In]&Xe&&(u[In]|=Xe),Wt&=~fr}}var qu=0;function Dc(u){return 1<(u&=-u)?4<u?268435455&u?16:536870912:4:1}var td,id,sd,ld,cd,ud=!1,dd=[],md=null,yd=null,_d=null,vd=new Map,xd=new Map,wd=[],Sd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Sc(u,Xe){switch(u){case"focusin":case"focusout":md=null;break;case"dragenter":case"dragleave":yd=null;break;case"mouseover":case"mouseout":_d=null;break;case"pointerover":case"pointerout":vd.delete(Xe.pointerId);break;case"gotpointercapture":case"lostpointercapture":xd.delete(Xe.pointerId)}}function Tc(u,Xe,Wt,In,fr,_r){return null===u||u.nativeEvent!==_r?(u={blockedOn:Xe,domEventName:Wt,eventSystemFlags:In,nativeEvent:_r,targetContainers:[fr]},null!==Xe&&(null!==(Xe=Cb(Xe))&&id(Xe)),u):(u.eventSystemFlags|=In,Xe=u.targetContainers,null!==fr&&-1===Xe.indexOf(fr)&&Xe.push(fr),u)}function Vc(u){var Xe=Wc(u.target);if(null!==Xe){var Wt=Vb(Xe);if(null!==Wt)if(13===(Xe=Wt.tag)){if(null!==(Xe=Wb(Wt)))return u.blockedOn=Xe,void cd(u.priority,(function(){sd(Wt)}))}else if(3===Xe&&Wt.stateNode.current.memoizedState.isDehydrated)return void(u.blockedOn=3===Wt.tag?Wt.stateNode.containerInfo:null)}u.blockedOn=null}function Xc(u){if(null!==u.blockedOn)return!1;for(var Xe=u.targetContainers;0<Xe.length;){var Wt=Yc(u.domEventName,u.eventSystemFlags,Xe[0],u.nativeEvent);if(null!==Wt)return null!==(Xe=Cb(Wt))&&id(Xe),u.blockedOn=Wt,!1;var In=new(Wt=u.nativeEvent).constructor(Wt.type,Wt);Ul=In,Wt.target.dispatchEvent(In),Ul=null,Xe.shift()}return!0}function Zc(u,Xe,Wt){Xc(u)&&Wt.delete(Xe)}function $c(){ud=!1,null!==md&&Xc(md)&&(md=null),null!==yd&&Xc(yd)&&(yd=null),null!==_d&&Xc(_d)&&(_d=null),vd.forEach(Zc),xd.forEach(Zc)}function ad(u,Xe){u.blockedOn===Xe&&(u.blockedOn=null,ud||(ud=!0,fr.unstable_scheduleCallback(fr.unstable_NormalPriority,$c)))}function bd(u){function b(Xe){return ad(Xe,u)}if(0<dd.length){ad(dd[0],u);for(var Xe=1;Xe<dd.length;Xe++){var Wt=dd[Xe];Wt.blockedOn===u&&(Wt.blockedOn=null)}}for(null!==md&&ad(md,u),null!==yd&&ad(yd,u),null!==_d&&ad(_d,u),vd.forEach(b),xd.forEach(b),Xe=0;Xe<wd.length;Xe++)(Wt=wd[Xe]).blockedOn===u&&(Wt.blockedOn=null);for(;0<wd.length&&null===(Xe=wd[0]).blockedOn;)Vc(Xe),null===Xe.blockedOn&&wd.shift()}var kd=co.ReactCurrentBatchConfig,Ad=!0;function ed(u,Xe,Wt,In){var fr=qu,_r=kd.transition;kd.transition=null;try{qu=1,fd(u,Xe,Wt,In)}finally{qu=fr,kd.transition=_r}}function gd(u,Xe,Wt,In){var fr=qu,_r=kd.transition;kd.transition=null;try{qu=4,fd(u,Xe,Wt,In)}finally{qu=fr,kd.transition=_r}}function fd(u,Xe,Wt,In){if(Ad){var fr=Yc(u,Xe,Wt,In);if(null===fr)hd(u,Xe,In,Td,Wt),Sc(u,In);else if(function Uc(u,Xe,Wt,In,fr){switch(Xe){case"focusin":return md=Tc(md,u,Xe,Wt,In,fr),!0;case"dragenter":return yd=Tc(yd,u,Xe,Wt,In,fr),!0;case"mouseover":return _d=Tc(_d,u,Xe,Wt,In,fr),!0;case"pointerover":var _r=fr.pointerId;return vd.set(_r,Tc(vd.get(_r)||null,u,Xe,Wt,In,fr)),!0;case"gotpointercapture":return _r=fr.pointerId,xd.set(_r,Tc(xd.get(_r)||null,u,Xe,Wt,In,fr)),!0}return!1}(fr,u,Xe,Wt,In))In.stopPropagation();else if(Sc(u,In),4&Xe&&-1<Sd.indexOf(u)){for(;null!==fr;){var _r=Cb(fr);if(null!==_r&&td(_r),null===(_r=Yc(u,Xe,Wt,In))&&hd(u,Xe,In,Td,Wt),_r===fr)break;fr=_r}null!==fr&&In.stopPropagation()}else hd(u,Xe,In,null,Wt)}}var Td=null;function Yc(u,Xe,Wt,In){if(Td=null,null!==(u=Wc(u=xb(In))))if(null===(Xe=Vb(u)))u=null;else if(13===(Wt=Xe.tag)){if(null!==(u=Wb(Xe)))return u;u=null}else if(3===Wt){if(Xe.stateNode.current.memoizedState.isDehydrated)return 3===Xe.tag?Xe.stateNode.containerInfo:null;u=null}else Xe!==u&&(u=null);return Td=u,null}function jd(u){switch(u){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(iu()){case su:return 1;case cu:return 4;case uu:case hu:return 16;case Iu:return 536870912;default:return 16}default:return 16}}var Cd=null,Ed=null,Id=null;function nd(){if(Id)return Id;var u,Xe,Wt=Ed,In=Wt.length,fr="value"in Cd?Cd.value:Cd.textContent,_r=fr.length;for(u=0;u<In&&Wt[u]===fr[u];u++);var wr=In-u;for(Xe=1;Xe<=wr&&Wt[In-Xe]===fr[_r-Xe];Xe++);return Id=fr.slice(u,1<Xe?1-Xe:void 0)}function od(u){var Xe=u.keyCode;return"charCode"in u?0===(u=u.charCode)&&13===Xe&&(u=13):u=Xe,10===u&&(u=13),32<=u||13===u?u:0}function pd(){return!0}function qd(){return!1}function rd(u){function b(Xe,Wt,In,fr,_r){for(var wr in this._reactName=Xe,this._targetInst=In,this.type=Wt,this.nativeEvent=fr,this.target=_r,this.currentTarget=null,u)u.hasOwnProperty(wr)&&(Xe=u[wr],this[wr]=Xe?Xe(fr):fr[wr]);return this.isDefaultPrevented=(null!=fr.defaultPrevented?fr.defaultPrevented:!1===fr.returnValue)?pd:qd,this.isPropagationStopped=qd,this}return Al(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():"unknown"!=typeof u.returnValue&&(u.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():"unknown"!=typeof u.cancelBubble&&(u.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),b}var Md,Rd,Od,Ld={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dd=rd(Ld),Fd=Al({},Ld,{view:0,detail:0}),Bd=rd(Fd),Nd=Al({},Fd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(u){return void 0===u.relatedTarget?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==Od&&(Od&&"mousemove"===u.type?(Md=u.screenX-Od.screenX,Rd=u.screenY-Od.screenY):Rd=Md=0,Od=u),Md)},movementY:function(u){return"movementY"in u?u.movementY:Rd}}),Vd=rd(Nd),Ud=rd(Al({},Nd,{dataTransfer:0})),$d=rd(Al({},Fd,{relatedTarget:0})),Wd=rd(Al({},Ld,{animationName:0,elapsedTime:0,pseudoElement:0})),Zd=Al({},Ld,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),Hd=rd(Zd),Gd=rd(Al({},Ld,{data:0})),Kd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Yd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(u){var Xe=this.nativeEvent;return Xe.getModifierState?Xe.getModifierState(u):!!(u=Yd[u])&&!!Xe[u]}function zd(){return Pd}var Jd=Al({},Fd,{key:function(u){if(u.key){var Xe=Kd[u.key]||u.key;if("Unidentified"!==Xe)return Xe}return"keypress"===u.type?13===(u=od(u))?"Enter":String.fromCharCode(u):"keydown"===u.type||"keyup"===u.type?Xd[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(u){return"keypress"===u.type?od(u):0},keyCode:function(u){return"keydown"===u.type||"keyup"===u.type?u.keyCode:0},which:function(u){return"keypress"===u.type?od(u):"keydown"===u.type||"keyup"===u.type?u.keyCode:0}}),Qd=rd(Jd),Rh=rd(Al({},Nd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Oh=rd(Al({},Fd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd})),Lh=rd(Al({},Ld,{propertyName:0,elapsedTime:0,pseudoElement:0})),Dh=Al({},Nd,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),Fh=rd(Dh),jh=[9,13,27,32],Hh=Ar&&"CompositionEvent"in window,Gh=null;Ar&&"documentMode"in document&&(Gh=document.documentMode);var Kh=Ar&&"TextEvent"in window&&!Gh,Jh=Ar&&(!Hh||Gh&&8<Gh&&11>=Gh),Qh=String.fromCharCode(32),ep=!1;function ge(u,Xe){switch(u){case"keyup":return-1!==jh.indexOf(Xe.keyCode);case"keydown":return 229!==Xe.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he(u){return"object"==typeof(u=u.detail)&&"data"in u?u.data:null}var tp=!1;var np={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(u){var Xe=u&&u.nodeName&&u.nodeName.toLowerCase();return"input"===Xe?!!np[u.type]:"textarea"===Xe}function ne(u,Xe,Wt,In){Eb(In),0<(Xe=oe(Xe,"onChange")).length&&(Wt=new Dd("onChange","change",null,Wt,In),u.push({event:Wt,listeners:Xe}))}var rp=null,ip=null;function re(u){se(u,0)}function te(u){if(Wa(ue(u)))return u}function ve(u,Xe){if("change"===u)return Xe}var op=!1;if(Ar){var ap;if(Ar){var sp="oninput"in document;if(!sp){var lp=document.createElement("div");lp.setAttribute("oninput","return;"),sp="function"==typeof lp.oninput}ap=sp}else ap=!1;op=ap&&(!document.documentMode||9<document.documentMode)}function Ae(){rp&&(rp.detachEvent("onpropertychange",Be),ip=rp=null)}function Be(u){if("value"===u.propertyName&&te(ip)){var Xe=[];ne(Xe,ip,u,xb(u)),Jb(re,Xe)}}function Ce(u,Xe,Wt){"focusin"===u?(Ae(),ip=Wt,(rp=Xe).attachEvent("onpropertychange",Be)):"focusout"===u&&Ae()}function De(u){if("selectionchange"===u||"keyup"===u||"keydown"===u)return te(ip)}function Ee(u,Xe){if("click"===u)return te(Xe)}function Fe(u,Xe){if("input"===u||"change"===u)return te(Xe)}var cp="function"==typeof Object.is?Object.is:function Ge(u,Xe){return u===Xe&&(0!==u||1/u==1/Xe)||u!=u&&Xe!=Xe};function Ie(u,Xe){if(cp(u,Xe))return!0;if("object"!=typeof u||null===u||"object"!=typeof Xe||null===Xe)return!1;var Wt=Object.keys(u),In=Object.keys(Xe);if(Wt.length!==In.length)return!1;for(In=0;In<Wt.length;In++){var fr=Wt[In];if(!Kr.call(Xe,fr)||!cp(u[fr],Xe[fr]))return!1}return!0}function Je(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function Ke(u,Xe){var Wt,In=Je(u);for(u=0;In;){if(3===In.nodeType){if(Wt=u+In.textContent.length,u<=Xe&&Wt>=Xe)return{node:In,offset:Xe-u};u=Wt}e:{for(;In;){if(In.nextSibling){In=In.nextSibling;break e}In=In.parentNode}In=void 0}In=Je(In)}}function Le(u,Xe){return!(!u||!Xe)&&(u===Xe||(!u||3!==u.nodeType)&&(Xe&&3===Xe.nodeType?Le(u,Xe.parentNode):"contains"in u?u.contains(Xe):!!u.compareDocumentPosition&&!!(16&u.compareDocumentPosition(Xe))))}function Me(){for(var u=window,Xe=Xa();Xe instanceof u.HTMLIFrameElement;){try{var Wt="string"==typeof Xe.contentWindow.location.href}catch(u){Wt=!1}if(!Wt)break;Xe=Xa((u=Xe.contentWindow).document)}return Xe}function Ne(u){var Xe=u&&u.nodeName&&u.nodeName.toLowerCase();return Xe&&("input"===Xe&&("text"===u.type||"search"===u.type||"tel"===u.type||"url"===u.type||"password"===u.type)||"textarea"===Xe||"true"===u.contentEditable)}function Oe(u){var Xe=Me(),Wt=u.focusedElem,In=u.selectionRange;if(Xe!==Wt&&Wt&&Wt.ownerDocument&&Le(Wt.ownerDocument.documentElement,Wt)){if(null!==In&&Ne(Wt))if(Xe=In.start,void 0===(u=In.end)&&(u=Xe),"selectionStart"in Wt)Wt.selectionStart=Xe,Wt.selectionEnd=Math.min(u,Wt.value.length);else if((u=(Xe=Wt.ownerDocument||document)&&Xe.defaultView||window).getSelection){u=u.getSelection();var fr=Wt.textContent.length,_r=Math.min(In.start,fr);In=void 0===In.end?_r:Math.min(In.end,fr),!u.extend&&_r>In&&(fr=In,In=_r,_r=fr),fr=Ke(Wt,_r);var wr=Ke(Wt,In);fr&&wr&&(1!==u.rangeCount||u.anchorNode!==fr.node||u.anchorOffset!==fr.offset||u.focusNode!==wr.node||u.focusOffset!==wr.offset)&&((Xe=Xe.createRange()).setStart(fr.node,fr.offset),u.removeAllRanges(),_r>In?(u.addRange(Xe),u.extend(wr.node,wr.offset)):(Xe.setEnd(wr.node,wr.offset),u.addRange(Xe)))}for(Xe=[],u=Wt;u=u.parentNode;)1===u.nodeType&&Xe.push({element:u,left:u.scrollLeft,top:u.scrollTop});for("function"==typeof Wt.focus&&Wt.focus(),Wt=0;Wt<Xe.length;Wt++)(u=Xe[Wt]).element.scrollLeft=u.left,u.element.scrollTop=u.top}}var dp=Ar&&"documentMode"in document&&11>=document.documentMode,hp=null,pp=null,fp=null,mp=!1;function Ue(u,Xe,Wt){var In=Wt.window===Wt?Wt.document:9===Wt.nodeType?Wt:Wt.ownerDocument;mp||null==hp||hp!==Xa(In)||("selectionStart"in(In=hp)&&Ne(In)?In={start:In.selectionStart,end:In.selectionEnd}:In={anchorNode:(In=(In.ownerDocument&&In.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:In.anchorOffset,focusNode:In.focusNode,focusOffset:In.focusOffset},fp&&Ie(fp,In)||(fp=In,0<(In=oe(pp,"onSelect")).length&&(Xe=new Dd("onSelect","select",null,Xe,Wt),u.push({event:Xe,listeners:In}),Xe.target=hp)))}function Ve(u,Xe){var Wt={};return Wt[u.toLowerCase()]=Xe.toLowerCase(),Wt["Webkit"+u]="webkit"+Xe,Wt["Moz"+u]="moz"+Xe,Wt}var gp={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},yp={},_p={};function Ze(u){if(yp[u])return yp[u];if(!gp[u])return u;var Xe,Wt=gp[u];for(Xe in Wt)if(Wt.hasOwnProperty(Xe)&&Xe in _p)return yp[u]=Wt[Xe];return u}Ar&&(_p=document.createElement("div").style,"AnimationEvent"in window||(delete gp.animationend.animation,delete gp.animationiteration.animation,delete gp.animationstart.animation),"TransitionEvent"in window||delete gp.transitionend.transition);var vp=Ze("animationend"),bp=Ze("animationiteration"),xp=Ze("animationstart"),wp=Ze("transitionend"),Sp=new Map,kp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ff(u,Xe){Sp.set(u,Xe),fa(Xe,[u])}for(var Ap=0;Ap<kp.length;Ap++){var Tp=kp[Ap];ff(Tp.toLowerCase(),"on"+(Tp[0].toUpperCase()+Tp.slice(1)))}ff(vp,"onAnimationEnd"),ff(bp,"onAnimationIteration"),ff(xp,"onAnimationStart"),ff("dblclick","onDoubleClick"),ff("focusin","onFocus"),ff("focusout","onBlur"),ff(wp,"onTransitionEnd"),ha("onMouseEnter",["mouseout","mouseover"]),ha("onMouseLeave",["mouseout","mouseover"]),ha("onPointerEnter",["pointerout","pointerover"]),ha("onPointerLeave",["pointerout","pointerover"]),fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fa("onBeforeInput",["compositionend","keypress","textInput","paste"]),fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cp="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ep=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cp));function nf(u,Xe,Wt){var In=u.type||"unknown-event";u.currentTarget=Wt,function Ub(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){if(Tb.apply(this,arguments),Ql){if(!Ql)throw Error(p(198));var no=rc;Ql=!1,rc=null,ic||(ic=!0,oc=no)}}(In,Xe,void 0,u),u.currentTarget=null}function se(u,Xe){Xe=!!(4&Xe);for(var Wt=0;Wt<u.length;Wt++){var In=u[Wt],fr=In.event;In=In.listeners;e:{var _r=void 0;if(Xe)for(var wr=In.length-1;0<=wr;wr--){var Ar=In[wr],Kr=Ar.instance,no=Ar.currentTarget;if(Ar=Ar.listener,Kr!==_r&&fr.isPropagationStopped())break e;nf(fr,Ar,no),_r=Kr}else for(wr=0;wr<In.length;wr++){if(Kr=(Ar=In[wr]).instance,no=Ar.currentTarget,Ar=Ar.listener,Kr!==_r&&fr.isPropagationStopped())break e;nf(fr,Ar,no),_r=Kr}}}if(ic)throw u=oc,ic=!1,oc=null,u}function D(u,Xe){var Wt=Xe[Up];void 0===Wt&&(Wt=Xe[Up]=new Set);var In=u+"__bubble";Wt.has(In)||(pf(Xe,u,2,!1),Wt.add(In))}function qf(u,Xe,Wt){var In=0;Xe&&(In|=4),pf(Wt,u,In,Xe)}var Pp="_reactListening"+Math.random().toString(36).slice(2);function sf(u){if(!u[Pp]){u[Pp]=!0,_r.forEach((function(Xe){"selectionchange"!==Xe&&(Ep.has(Xe)||qf(Xe,!1,u),qf(Xe,!0,u))}));var Xe=9===u.nodeType?u:u.ownerDocument;null===Xe||Xe[Pp]||(Xe[Pp]=!0,qf("selectionchange",!1,Xe))}}function pf(u,Xe,Wt,In){switch(jd(Xe)){case 1:var fr=ed;break;case 4:fr=gd;break;default:fr=fd}Wt=fr.bind(null,Xe,Wt,u),fr=void 0,!Xl||"touchstart"!==Xe&&"touchmove"!==Xe&&"wheel"!==Xe||(fr=!0),In?void 0!==fr?u.addEventListener(Xe,Wt,{capture:!0,passive:fr}):u.addEventListener(Xe,Wt,!0):void 0!==fr?u.addEventListener(Xe,Wt,{passive:fr}):u.addEventListener(Xe,Wt,!1)}function hd(u,Xe,Wt,In,fr){var _r=In;if(!(1&Xe||2&Xe||null===In))e:for(;;){if(null===In)return;var wr=In.tag;if(3===wr||4===wr){var Ar=In.stateNode.containerInfo;if(Ar===fr||8===Ar.nodeType&&Ar.parentNode===fr)break;if(4===wr)for(wr=In.return;null!==wr;){var Kr=wr.tag;if((3===Kr||4===Kr)&&((Kr=wr.stateNode.containerInfo)===fr||8===Kr.nodeType&&Kr.parentNode===fr))return;wr=wr.return}for(;null!==Ar;){if(null===(wr=Wc(Ar)))return;if(5===(Kr=wr.tag)||6===Kr){In=_r=wr;continue e}Ar=Ar.parentNode}}In=In.return}Jb((function(){var In=_r,fr=xb(Wt),wr=[];e:{var Ar=Sp.get(u);if(void 0!==Ar){var Kr=Dd,no=u;switch(u){case"keypress":if(0===od(Wt))break e;case"keydown":case"keyup":Kr=Qd;break;case"focusin":no="focus",Kr=$d;break;case"focusout":no="blur",Kr=$d;break;case"beforeblur":case"afterblur":Kr=$d;break;case"click":if(2===Wt.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Kr=Vd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Kr=Ud;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Kr=Oh;break;case vp:case bp:case xp:Kr=Wd;break;case wp:Kr=Lh;break;case"scroll":Kr=Bd;break;case"wheel":Kr=Fh;break;case"copy":case"cut":case"paste":Kr=Hd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Kr=Rh}var io=!!(4&Xe),oo=!io&&"scroll"===u,ao=io?null!==Ar?Ar+"Capture":null:Ar;io=[];for(var so,co=In;null!==co;){var ho=(so=co).stateNode;if(5===so.tag&&null!==ho&&(so=ho,null!==ao&&(null!=(ho=Kb(co,ao))&&io.push(tf(co,ho,so)))),oo)break;co=co.return}0<io.length&&(Ar=new Kr(Ar,no,null,Wt,fr),wr.push({event:Ar,listeners:io}))}}if(!(7&Xe)){if(Kr="mouseout"===u||"pointerout"===u,(!(Ar="mouseover"===u||"pointerover"===u)||Wt===Ul||!(no=Wt.relatedTarget||Wt.fromElement)||!Wc(no)&&!no[Vp])&&(Kr||Ar)&&(Ar=fr.window===fr?fr:(Ar=fr.ownerDocument)?Ar.defaultView||Ar.parentWindow:window,Kr?(Kr=In,null!==(no=(no=Wt.relatedTarget||Wt.toElement)?Wc(no):null)&&(no!==(oo=Vb(no))||5!==no.tag&&6!==no.tag)&&(no=null)):(Kr=null,no=In),Kr!==no)){if(io=Vd,ho="onMouseLeave",ao="onMouseEnter",co="mouse","pointerout"!==u&&"pointerover"!==u||(io=Rh,ho="onPointerLeave",ao="onPointerEnter",co="pointer"),oo=null==Kr?Ar:ue(Kr),so=null==no?Ar:ue(no),(Ar=new io(ho,co+"leave",Kr,Wt,fr)).target=oo,Ar.relatedTarget=so,ho=null,Wc(fr)===In&&((io=new io(ao,co+"enter",no,Wt,fr)).target=so,io.relatedTarget=oo,ho=io),oo=ho,Kr&&no)e:{for(ao=no,co=0,so=io=Kr;so;so=vf(so))co++;for(so=0,ho=ao;ho;ho=vf(ho))so++;for(;0<co-so;)io=vf(io),co--;for(;0<so-co;)ao=vf(ao),so--;for(;co--;){if(io===ao||null!==ao&&io===ao.alternate)break e;io=vf(io),ao=vf(ao)}io=null}else io=null;null!==Kr&&wf(wr,Ar,Kr,io,!1),null!==no&&null!==oo&&wf(wr,oo,no,io,!0)}if("select"===(Kr=(Ar=In?ue(In):window).nodeName&&Ar.nodeName.toLowerCase())||"input"===Kr&&"file"===Ar.type)var go=ve;else if(me(Ar))if(op)go=Fe;else{go=De;var xo=Ce}else(Kr=Ar.nodeName)&&"input"===Kr.toLowerCase()&&("checkbox"===Ar.type||"radio"===Ar.type)&&(go=Ee);switch(go&&(go=go(u,In))?ne(wr,go,Wt,fr):(xo&&xo(u,Ar,In),"focusout"===u&&(xo=Ar._wrapperState)&&xo.controlled&&"number"===Ar.type&&cb(Ar,"number",Ar.value)),xo=In?ue(In):window,u){case"focusin":(me(xo)||"true"===xo.contentEditable)&&(hp=xo,pp=In,fp=null);break;case"focusout":fp=pp=hp=null;break;case"mousedown":mp=!0;break;case"contextmenu":case"mouseup":case"dragend":mp=!1,Ue(wr,Wt,fr);break;case"selectionchange":if(dp)break;case"keydown":case"keyup":Ue(wr,Wt,fr)}var ko;if(Hh)e:{switch(u){case"compositionstart":var Co="onCompositionStart";break e;case"compositionend":Co="onCompositionEnd";break e;case"compositionupdate":Co="onCompositionUpdate";break e}Co=void 0}else tp?ge(u,Wt)&&(Co="onCompositionEnd"):"keydown"===u&&229===Wt.keyCode&&(Co="onCompositionStart");Co&&(Jh&&"ko"!==Wt.locale&&(tp||"onCompositionStart"!==Co?"onCompositionEnd"===Co&&tp&&(ko=nd()):(Ed="value"in(Cd=fr)?Cd.value:Cd.textContent,tp=!0)),0<(xo=oe(In,Co)).length&&(Co=new Gd(Co,u,null,Wt,fr),wr.push({event:Co,listeners:xo}),ko?Co.data=ko:null!==(ko=he(Wt))&&(Co.data=ko))),(ko=Kh?function je(u,Xe){switch(u){case"compositionend":return he(Xe);case"keypress":return 32!==Xe.which?null:(ep=!0,Qh);case"textInput":return(u=Xe.data)===Qh&&ep?null:u;default:return null}}(u,Wt):function ke(u,Xe){if(tp)return"compositionend"===u||!Hh&&ge(u,Xe)?(u=nd(),Id=Ed=Cd=null,tp=!1,u):null;switch(u){case"paste":default:return null;case"keypress":if(!(Xe.ctrlKey||Xe.altKey||Xe.metaKey)||Xe.ctrlKey&&Xe.altKey){if(Xe.char&&1<Xe.char.length)return Xe.char;if(Xe.which)return String.fromCharCode(Xe.which)}return null;case"compositionend":return Jh&&"ko"!==Xe.locale?null:Xe.data}}(u,Wt))&&(0<(In=oe(In,"onBeforeInput")).length&&(fr=new Gd("onBeforeInput","beforeinput",null,Wt,fr),wr.push({event:fr,listeners:In}),fr.data=ko))}se(wr,Xe)}))}function tf(u,Xe,Wt){return{instance:u,listener:Xe,currentTarget:Wt}}function oe(u,Xe){for(var Wt=Xe+"Capture",In=[];null!==u;){var fr=u,_r=fr.stateNode;5===fr.tag&&null!==_r&&(fr=_r,null!=(_r=Kb(u,Wt))&&In.unshift(tf(u,_r,fr)),null!=(_r=Kb(u,Xe))&&In.push(tf(u,_r,fr))),u=u.return}return In}function vf(u){if(null===u)return null;do{u=u.return}while(u&&5!==u.tag);return u||null}function wf(u,Xe,Wt,In,fr){for(var _r=Xe._reactName,wr=[];null!==Wt&&Wt!==In;){var Ar=Wt,Kr=Ar.alternate,no=Ar.stateNode;if(null!==Kr&&Kr===In)break;5===Ar.tag&&null!==no&&(Ar=no,fr?null!=(Kr=Kb(Wt,_r))&&wr.unshift(tf(Wt,Kr,Ar)):fr||null!=(Kr=Kb(Wt,_r))&&wr.push(tf(Wt,Kr,Ar))),Wt=Wt.return}0!==wr.length&&u.push({event:Xe,listeners:wr})}var Ip=/\r\n?/g,Mp=/\u0000|\uFFFD/g;function zf(u){return("string"==typeof u?u:""+u).replace(Ip,"\n").replace(Mp,"")}function Af(u,Xe,Wt){if(Xe=zf(Xe),zf(u)!==Xe&&Wt)throw Error(p(425))}function Bf(){}var Rp=null,zp=null;function Ef(u,Xe){return"textarea"===u||"noscript"===u||"string"==typeof Xe.children||"number"==typeof Xe.children||"object"==typeof Xe.dangerouslySetInnerHTML&&null!==Xe.dangerouslySetInnerHTML&&null!=Xe.dangerouslySetInnerHTML.__html}var Op="function"==typeof setTimeout?setTimeout:void 0,Lp="function"==typeof clearTimeout?clearTimeout:void 0,Dp="function"==typeof Promise?Promise:void 0,Fp="function"==typeof queueMicrotask?queueMicrotask:void 0!==Dp?function(u){return Dp.resolve(null).then(u).catch(If)}:Op;function If(u){setTimeout((function(){throw u}))}function Kf(u,Xe){var Wt=Xe,In=0;do{var fr=Wt.nextSibling;if(u.removeChild(Wt),fr&&8===fr.nodeType)if("/$"===(Wt=fr.data)){if(0===In)return u.removeChild(fr),void bd(Xe);In--}else"$"!==Wt&&"$?"!==Wt&&"$!"!==Wt||In++;Wt=fr}while(Wt);bd(Xe)}function Lf(u){for(;null!=u;u=u.nextSibling){var Xe=u.nodeType;if(1===Xe||3===Xe)break;if(8===Xe){if("$"===(Xe=u.data)||"$!"===Xe||"$?"===Xe)break;if("/$"===Xe)return null}}return u}function Mf(u){u=u.previousSibling;for(var Xe=0;u;){if(8===u.nodeType){var Wt=u.data;if("$"===Wt||"$!"===Wt||"$?"===Wt){if(0===Xe)return u;Xe--}else"/$"===Wt&&Xe++}u=u.previousSibling}return null}var Bp=Math.random().toString(36).slice(2),jp="__reactFiber$"+Bp,Np="__reactProps$"+Bp,Vp="__reactContainer$"+Bp,Up="__reactEvents$"+Bp,$p="__reactListeners$"+Bp,Wp="__reactHandles$"+Bp;function Wc(u){var Xe=u[jp];if(Xe)return Xe;for(var Wt=u.parentNode;Wt;){if(Xe=Wt[Vp]||Wt[jp]){if(Wt=Xe.alternate,null!==Xe.child||null!==Wt&&null!==Wt.child)for(u=Mf(u);null!==u;){if(Wt=u[jp])return Wt;u=Mf(u)}return Xe}Wt=(u=Wt).parentNode}return null}function Cb(u){return!(u=u[jp]||u[Vp])||5!==u.tag&&6!==u.tag&&13!==u.tag&&3!==u.tag?null:u}function ue(u){if(5===u.tag||6===u.tag)return u.stateNode;throw Error(p(33))}function Db(u){return u[Np]||null}var qp=[],Zp=-1;function Uf(u){return{current:u}}function E(u){0>Zp||(u.current=qp[Zp],qp[Zp]=null,Zp--)}function G(u,Xe){Zp++,qp[Zp]=u.current,u.current=Xe}var Hp={},Gp=Uf(Hp),Kp=Uf(!1),Xp=Hp;function Yf(u,Xe){var Wt=u.type.contextTypes;if(!Wt)return Hp;var In=u.stateNode;if(In&&In.__reactInternalMemoizedUnmaskedChildContext===Xe)return In.__reactInternalMemoizedMaskedChildContext;var fr,_r={};for(fr in Wt)_r[fr]=Xe[fr];return In&&((u=u.stateNode).__reactInternalMemoizedUnmaskedChildContext=Xe,u.__reactInternalMemoizedMaskedChildContext=_r),_r}function Zf(u){return null!=(u=u.childContextTypes)}function $f(){E(Kp),E(Gp)}function ag(u,Xe,Wt){if(Gp.current!==Hp)throw Error(p(168));G(Gp,Xe),G(Kp,Wt)}function bg(u,Xe,Wt){var In=u.stateNode;if(Xe=Xe.childContextTypes,"function"!=typeof In.getChildContext)return Wt;for(var fr in In=In.getChildContext())if(!(fr in Xe))throw Error(p(108,Ra(u)||"Unknown",fr));return Al({},Wt,In)}function cg(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||Hp,Xp=Gp.current,G(Gp,u),G(Kp,Kp.current),!0}function dg(u,Xe,Wt){var In=u.stateNode;if(!In)throw Error(p(169));Wt?(u=bg(u,Xe,Xp),In.__reactInternalMemoizedMergedChildContext=u,E(Kp),E(Gp),G(Gp,u)):E(Kp),G(Kp,Wt)}var Yp=null,Jp=!1,Qp=!1;function hg(u){null===Yp?Yp=[u]:Yp.push(u)}function jg(){if(!Qp&&null!==Yp){Qp=!0;var u=0,Xe=qu;try{var Wt=Yp;for(qu=1;u<Wt.length;u++){var In=Wt[u];do{In=In(!0)}while(null!==In)}Yp=null,Jp=!1}catch(Xe){throw null!==Yp&&(Yp=Yp.slice(u+1)),gc(su,jg),Xe}finally{qu=Xe,Qp=!1}}return null}var ef=[],rf=0,of=null,af=0,lf=[],cf=0,uf=null,df=1,hf="";function tg(u,Xe){ef[rf++]=af,ef[rf++]=of,of=u,af=Xe}function ug(u,Xe,Wt){lf[cf++]=df,lf[cf++]=hf,lf[cf++]=uf,uf=u;var In=df;u=hf;var fr=32-Du(In)-1;In&=~(1<<fr),Wt+=1;var _r=32-Du(Xe)+fr;if(30<_r){var wr=fr-fr%5;_r=(In&(1<<wr)-1).toString(32),In>>=wr,fr-=wr,df=1<<32-Du(Xe)+fr|Wt<<fr|In,hf=_r+u}else df=1<<_r|Wt<<fr|In,hf=u}function vg(u){null!==u.return&&(tg(u,1),ug(u,1,0))}function wg(u){for(;u===of;)of=ef[--rf],ef[rf]=null,af=ef[--rf],ef[rf]=null;for(;u===uf;)uf=lf[--cf],lf[cf]=null,hf=lf[--cf],lf[cf]=null,df=lf[--cf],lf[cf]=null}var mf=null,gf=null,yf=!1,_f=null;function Ag(u,Xe){var Wt=Bg(5,null,null,0);Wt.elementType="DELETED",Wt.stateNode=Xe,Wt.return=u,null===(Xe=u.deletions)?(u.deletions=[Wt],u.flags|=16):Xe.push(Wt)}function Cg(u,Xe){switch(u.tag){case 5:var Wt=u.type;return null!==(Xe=1!==Xe.nodeType||Wt.toLowerCase()!==Xe.nodeName.toLowerCase()?null:Xe)&&(u.stateNode=Xe,mf=u,gf=Lf(Xe.firstChild),!0);case 6:return null!==(Xe=""===u.pendingProps||3!==Xe.nodeType?null:Xe)&&(u.stateNode=Xe,mf=u,gf=null,!0);case 13:return null!==(Xe=8!==Xe.nodeType?null:Xe)&&(Wt=null!==uf?{id:df,overflow:hf}:null,u.memoizedState={dehydrated:Xe,treeContext:Wt,retryLane:1073741824},(Wt=Bg(18,null,null,0)).stateNode=Xe,Wt.return=u,u.child=Wt,mf=u,gf=null,!0);default:return!1}}function Dg(u){return!(!(1&u.mode)||128&u.flags)}function Eg(u){if(yf){var Xe=gf;if(Xe){var Wt=Xe;if(!Cg(u,Xe)){if(Dg(u))throw Error(p(418));Xe=Lf(Wt.nextSibling);var In=mf;Xe&&Cg(u,Xe)?Ag(In,Wt):(u.flags=-4097&u.flags|2,yf=!1,mf=u)}}else{if(Dg(u))throw Error(p(418));u.flags=-4097&u.flags|2,yf=!1,mf=u}}}function Fg(u){for(u=u.return;null!==u&&5!==u.tag&&3!==u.tag&&13!==u.tag;)u=u.return;mf=u}function Gg(u){if(u!==mf)return!1;if(!yf)return Fg(u),yf=!0,!1;var Xe;if((Xe=3!==u.tag)&&!(Xe=5!==u.tag)&&(Xe="head"!==(Xe=u.type)&&"body"!==Xe&&!Ef(u.type,u.memoizedProps)),Xe&&(Xe=gf)){if(Dg(u))throw Hg(),Error(p(418));for(;Xe;)Ag(u,Xe),Xe=Lf(Xe.nextSibling)}if(Fg(u),13===u.tag){if(!(u=null!==(u=u.memoizedState)?u.dehydrated:null))throw Error(p(317));e:{for(u=u.nextSibling,Xe=0;u;){if(8===u.nodeType){var Wt=u.data;if("/$"===Wt){if(0===Xe){gf=Lf(u.nextSibling);break e}Xe--}else"$"!==Wt&&"$!"!==Wt&&"$?"!==Wt||Xe++}u=u.nextSibling}gf=null}}else gf=mf?Lf(u.stateNode.nextSibling):null;return!0}function Hg(){for(var u=gf;u;)u=Lf(u.nextSibling)}function Ig(){gf=mf=null,yf=!1}function Jg(u){null===_f?_f=[u]:_f.push(u)}var bf=co.ReactCurrentBatchConfig;function Lg(u,Xe,Wt){if(null!==(u=Wt.ref)&&"function"!=typeof u&&"object"!=typeof u){if(Wt._owner){if(Wt=Wt._owner){if(1!==Wt.tag)throw Error(p(309));var In=Wt.stateNode}if(!In)throw Error(p(147,u));var fr=In,_r=""+u;return null!==Xe&&null!==Xe.ref&&"function"==typeof Xe.ref&&Xe.ref._stringRef===_r?Xe.ref:(Xe=function(u){var Xe=fr.refs;null===u?delete Xe[_r]:Xe[_r]=u},Xe._stringRef=_r,Xe)}if("string"!=typeof u)throw Error(p(284));if(!Wt._owner)throw Error(p(290,u))}return u}function Mg(u,Xe){throw u=Object.prototype.toString.call(Xe),Error(p(31,"[object Object]"===u?"object with keys {"+Object.keys(Xe).join(", ")+"}":u))}function Ng(u){return(0,u._init)(u._payload)}function Og(u){function b(Xe,Wt){if(u){var In=Xe.deletions;null===In?(Xe.deletions=[Wt],Xe.flags|=16):In.push(Wt)}}function c(Xe,Wt){if(!u)return null;for(;null!==Wt;)b(Xe,Wt),Wt=Wt.sibling;return null}function d(u,Xe){for(u=new Map;null!==Xe;)null!==Xe.key?u.set(Xe.key,Xe):u.set(Xe.index,Xe),Xe=Xe.sibling;return u}function e(u,Xe){return(u=Pg(u,Xe)).index=0,u.sibling=null,u}function f(Xe,Wt,In){return Xe.index=In,u?null!==(In=Xe.alternate)?(In=In.index)<Wt?(Xe.flags|=2,Wt):In:(Xe.flags|=2,Wt):(Xe.flags|=1048576,Wt)}function g(Xe){return u&&null===Xe.alternate&&(Xe.flags|=2),Xe}function h(u,Xe,Wt,In){return null===Xe||6!==Xe.tag?((Xe=Qg(Wt,u.mode,In)).return=u,Xe):((Xe=e(Xe,Wt)).return=u,Xe)}function k(u,Xe,Wt,In){var fr=Wt.type;return fr===xo?m(u,Xe,Wt.props.children,In,Wt.key):null!==Xe&&(Xe.elementType===fr||"object"==typeof fr&&null!==fr&&fr.$$typeof===ns&&Ng(fr)===Xe.type)?((In=e(Xe,Wt.props)).ref=Lg(u,Xe,Wt),In.return=u,In):((In=Rg(Wt.type,Wt.key,Wt.props,null,u.mode,In)).ref=Lg(u,Xe,Wt),In.return=u,In)}function l(u,Xe,Wt,In){return null===Xe||4!==Xe.tag||Xe.stateNode.containerInfo!==Wt.containerInfo||Xe.stateNode.implementation!==Wt.implementation?((Xe=Sg(Wt,u.mode,In)).return=u,Xe):((Xe=e(Xe,Wt.children||[])).return=u,Xe)}function m(u,Xe,Wt,In,fr){return null===Xe||7!==Xe.tag?((Xe=Tg(Wt,u.mode,In,fr)).return=u,Xe):((Xe=e(Xe,Wt)).return=u,Xe)}function q(u,Xe,Wt){if("string"==typeof Xe&&""!==Xe||"number"==typeof Xe)return(Xe=Qg(""+Xe,u.mode,Wt)).return=u,Xe;if("object"==typeof Xe&&null!==Xe){switch(Xe.$$typeof){case ho:return(Wt=Rg(Xe.type,Xe.key,Xe.props,null,u.mode,Wt)).ref=Lg(u,null,Xe),Wt.return=u,Wt;case go:return(Xe=Sg(Xe,u.mode,Wt)).return=u,Xe;case ns:return q(u,(0,Xe._init)(Xe._payload),Wt)}if(Rl(Xe)||Ka(Xe))return(Xe=Tg(Xe,u.mode,Wt,null)).return=u,Xe;Mg(u,Xe)}return null}function r(u,Xe,Wt,In){var fr=null!==Xe?Xe.key:null;if("string"==typeof Wt&&""!==Wt||"number"==typeof Wt)return null!==fr?null:h(u,Xe,""+Wt,In);if("object"==typeof Wt&&null!==Wt){switch(Wt.$$typeof){case ho:return Wt.key===fr?k(u,Xe,Wt,In):null;case go:return Wt.key===fr?l(u,Xe,Wt,In):null;case ns:return r(u,Xe,(fr=Wt._init)(Wt._payload),In)}if(Rl(Wt)||Ka(Wt))return null!==fr?null:m(u,Xe,Wt,In,null);Mg(u,Wt)}return null}function y(u,Xe,Wt,In,fr){if("string"==typeof In&&""!==In||"number"==typeof In)return h(Xe,u=u.get(Wt)||null,""+In,fr);if("object"==typeof In&&null!==In){switch(In.$$typeof){case ho:return k(Xe,u=u.get(null===In.key?Wt:In.key)||null,In,fr);case go:return l(Xe,u=u.get(null===In.key?Wt:In.key)||null,In,fr);case ns:return y(u,Xe,Wt,(0,In._init)(In._payload),fr)}if(Rl(In)||Ka(In))return m(Xe,u=u.get(Wt)||null,In,fr,null);Mg(Xe,In)}return null}function n(Xe,Wt,In,fr){for(var _r=null,wr=null,Ar=Wt,Kr=Wt=0,no=null;null!==Ar&&Kr<In.length;Kr++){Ar.index>Kr?(no=Ar,Ar=null):no=Ar.sibling;var io=r(Xe,Ar,In[Kr],fr);if(null===io){null===Ar&&(Ar=no);break}u&&Ar&&null===io.alternate&&b(Xe,Ar),Wt=f(io,Wt,Kr),null===wr?_r=io:wr.sibling=io,wr=io,Ar=no}if(Kr===In.length)return c(Xe,Ar),yf&&tg(Xe,Kr),_r;if(null===Ar){for(;Kr<In.length;Kr++)null!==(Ar=q(Xe,In[Kr],fr))&&(Wt=f(Ar,Wt,Kr),null===wr?_r=Ar:wr.sibling=Ar,wr=Ar);return yf&&tg(Xe,Kr),_r}for(Ar=d(Xe,Ar);Kr<In.length;Kr++)null!==(no=y(Ar,Xe,Kr,In[Kr],fr))&&(u&&null!==no.alternate&&Ar.delete(null===no.key?Kr:no.key),Wt=f(no,Wt,Kr),null===wr?_r=no:wr.sibling=no,wr=no);return u&&Ar.forEach((function(u){return b(Xe,u)})),yf&&tg(Xe,Kr),_r}function t(Xe,Wt,In,fr){var _r=Ka(In);if("function"!=typeof _r)throw Error(p(150));if(null==(In=_r.call(In)))throw Error(p(151));for(var wr=_r=null,Ar=Wt,Kr=Wt=0,no=null,io=In.next();null!==Ar&&!io.done;Kr++,io=In.next()){Ar.index>Kr?(no=Ar,Ar=null):no=Ar.sibling;var oo=r(Xe,Ar,io.value,fr);if(null===oo){null===Ar&&(Ar=no);break}u&&Ar&&null===oo.alternate&&b(Xe,Ar),Wt=f(oo,Wt,Kr),null===wr?_r=oo:wr.sibling=oo,wr=oo,Ar=no}if(io.done)return c(Xe,Ar),yf&&tg(Xe,Kr),_r;if(null===Ar){for(;!io.done;Kr++,io=In.next())null!==(io=q(Xe,io.value,fr))&&(Wt=f(io,Wt,Kr),null===wr?_r=io:wr.sibling=io,wr=io);return yf&&tg(Xe,Kr),_r}for(Ar=d(Xe,Ar);!io.done;Kr++,io=In.next())null!==(io=y(Ar,Xe,Kr,io.value,fr))&&(u&&null!==io.alternate&&Ar.delete(null===io.key?Kr:io.key),Wt=f(io,Wt,Kr),null===wr?_r=io:wr.sibling=io,wr=io);return u&&Ar.forEach((function(u){return b(Xe,u)})),yf&&tg(Xe,Kr),_r}return function J(u,Xe,Wt,In){if("object"==typeof Wt&&null!==Wt&&Wt.type===xo&&null===Wt.key&&(Wt=Wt.props.children),"object"==typeof Wt&&null!==Wt){switch(Wt.$$typeof){case ho:e:{for(var fr=Wt.key,_r=Xe;null!==_r;){if(_r.key===fr){if((fr=Wt.type)===xo){if(7===_r.tag){c(u,_r.sibling),(Xe=e(_r,Wt.props.children)).return=u,u=Xe;break e}}else if(_r.elementType===fr||"object"==typeof fr&&null!==fr&&fr.$$typeof===ns&&Ng(fr)===_r.type){c(u,_r.sibling),(Xe=e(_r,Wt.props)).ref=Lg(u,_r,Wt),Xe.return=u,u=Xe;break e}c(u,_r);break}b(u,_r),_r=_r.sibling}Wt.type===xo?((Xe=Tg(Wt.props.children,u.mode,In,Wt.key)).return=u,u=Xe):((In=Rg(Wt.type,Wt.key,Wt.props,null,u.mode,In)).ref=Lg(u,Xe,Wt),In.return=u,u=In)}return g(u);case go:e:{for(_r=Wt.key;null!==Xe;){if(Xe.key===_r){if(4===Xe.tag&&Xe.stateNode.containerInfo===Wt.containerInfo&&Xe.stateNode.implementation===Wt.implementation){c(u,Xe.sibling),(Xe=e(Xe,Wt.children||[])).return=u,u=Xe;break e}c(u,Xe);break}b(u,Xe),Xe=Xe.sibling}(Xe=Sg(Wt,u.mode,In)).return=u,u=Xe}return g(u);case ns:return J(u,Xe,(_r=Wt._init)(Wt._payload),In)}if(Rl(Wt))return n(u,Xe,Wt,In);if(Ka(Wt))return t(u,Xe,Wt,In);Mg(u,Wt)}return"string"==typeof Wt&&""!==Wt||"number"==typeof Wt?(Wt=""+Wt,null!==Xe&&6===Xe.tag?(c(u,Xe.sibling),(Xe=e(Xe,Wt)).return=u,u=Xe):(c(u,Xe),(Xe=Qg(Wt,u.mode,In)).return=u,u=Xe),g(u)):c(u,Xe)}}var xf=Og(!0),Sf=Og(!1),kf=Uf(null),Tf=null,Cf=null,Pf=null;function $g(){Pf=Cf=Tf=null}function ah(u){var Xe=kf.current;E(kf),u._currentValue=Xe}function bh(u,Xe,Wt){for(;null!==u;){var In=u.alternate;if((u.childLanes&Xe)!==Xe?(u.childLanes|=Xe,null!==In&&(In.childLanes|=Xe)):null!==In&&(In.childLanes&Xe)!==Xe&&(In.childLanes|=Xe),u===Wt)break;u=u.return}}function ch(u,Xe){Tf=u,Pf=Cf=null,null!==(u=u.dependencies)&&null!==u.firstContext&&(!!(u.lanes&Xe)&&(hm=!0),u.firstContext=null)}function eh(u){var Xe=u._currentValue;if(Pf!==u)if(u={context:u,memoizedValue:Xe,next:null},null===Cf){if(null===Tf)throw Error(p(308));Cf=u,Tf.dependencies={lanes:0,firstContext:u}}else Cf=Cf.next=u;return Xe}var Rf=null;function gh(u){null===Rf?Rf=[u]:Rf.push(u)}function hh(u,Xe,Wt,In){var fr=Xe.interleaved;return null===fr?(Wt.next=Wt,gh(Xe)):(Wt.next=fr.next,fr.next=Wt),Xe.interleaved=Wt,ih(u,In)}function ih(u,Xe){u.lanes|=Xe;var Wt=u.alternate;for(null!==Wt&&(Wt.lanes|=Xe),Wt=u,u=u.return;null!==u;)u.childLanes|=Xe,null!==(Wt=u.alternate)&&(Wt.childLanes|=Xe),Wt=u,u=u.return;return 3===Wt.tag?Wt.stateNode:null}var Of=!1;function kh(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lh(u,Xe){u=u.updateQueue,Xe.updateQueue===u&&(Xe.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function mh(u,Xe){return{eventTime:u,lane:Xe,tag:0,payload:null,callback:null,next:null}}function nh(u,Xe,Wt){var In=u.updateQueue;if(null===In)return null;if(In=In.shared,2&Im){var fr=In.pending;return null===fr?Xe.next=Xe:(Xe.next=fr.next,fr.next=Xe),In.pending=Xe,ih(u,Wt)}return null===(fr=In.interleaved)?(Xe.next=Xe,gh(In)):(Xe.next=fr.next,fr.next=Xe),In.interleaved=Xe,ih(u,Wt)}function oh(u,Xe,Wt){if(null!==(Xe=Xe.updateQueue)&&(Xe=Xe.shared,4194240&Wt)){var In=Xe.lanes;Wt|=In&=u.pendingLanes,Xe.lanes=Wt,Cc(u,Wt)}}function ph(u,Xe){var Wt=u.updateQueue,In=u.alternate;if(null!==In&&Wt===(In=In.updateQueue)){var fr=null,_r=null;if(null!==(Wt=Wt.firstBaseUpdate)){do{var wr={eventTime:Wt.eventTime,lane:Wt.lane,tag:Wt.tag,payload:Wt.payload,callback:Wt.callback,next:null};null===_r?fr=_r=wr:_r=_r.next=wr,Wt=Wt.next}while(null!==Wt);null===_r?fr=_r=Xe:_r=_r.next=Xe}else fr=_r=Xe;return Wt={baseState:In.baseState,firstBaseUpdate:fr,lastBaseUpdate:_r,shared:In.shared,effects:In.effects},void(u.updateQueue=Wt)}null===(u=Wt.lastBaseUpdate)?Wt.firstBaseUpdate=Xe:u.next=Xe,Wt.lastBaseUpdate=Xe}function qh(u,Xe,Wt,In){var fr=u.updateQueue;Of=!1;var _r=fr.firstBaseUpdate,wr=fr.lastBaseUpdate,Ar=fr.shared.pending;if(null!==Ar){fr.shared.pending=null;var Kr=Ar,no=Kr.next;Kr.next=null,null===wr?_r=no:wr.next=no,wr=Kr;var io=u.alternate;null!==io&&((Ar=(io=io.updateQueue).lastBaseUpdate)!==wr&&(null===Ar?io.firstBaseUpdate=no:Ar.next=no,io.lastBaseUpdate=Kr))}if(null!==_r){var oo=fr.baseState;for(wr=0,io=no=Kr=null,Ar=_r;;){var ao=Ar.lane,so=Ar.eventTime;if((In&ao)===ao){null!==io&&(io=io.next={eventTime:so,lane:0,tag:Ar.tag,payload:Ar.payload,callback:Ar.callback,next:null});e:{var co=u,ho=Ar;switch(ao=Xe,so=Wt,ho.tag){case 1:if("function"==typeof(co=ho.payload)){oo=co.call(so,oo,ao);break e}oo=co;break e;case 3:co.flags=-65537&co.flags|128;case 0:if(null==(ao="function"==typeof(co=ho.payload)?co.call(so,oo,ao):co))break e;oo=Al({},oo,ao);break e;case 2:Of=!0}}null!==Ar.callback&&0!==Ar.lane&&(u.flags|=64,null===(ao=fr.effects)?fr.effects=[Ar]:ao.push(Ar))}else so={eventTime:so,lane:ao,tag:Ar.tag,payload:Ar.payload,callback:Ar.callback,next:null},null===io?(no=io=so,Kr=oo):io=io.next=so,wr|=ao;if(null===(Ar=Ar.next)){if(null===(Ar=fr.shared.pending))break;Ar=(ao=Ar).next,ao.next=null,fr.lastBaseUpdate=ao,fr.shared.pending=null}}if(null===io&&(Kr=oo),fr.baseState=Kr,fr.firstBaseUpdate=no,fr.lastBaseUpdate=io,null!==(Xe=fr.shared.interleaved)){fr=Xe;do{wr|=fr.lane,fr=fr.next}while(fr!==Xe)}else null===_r&&(fr.shared.lanes=0);Bm|=wr,u.lanes=wr,u.memoizedState=oo}}function sh(u,Xe,Wt){if(u=Xe.effects,Xe.effects=null,null!==u)for(Xe=0;Xe<u.length;Xe++){var In=u[Xe],fr=In.callback;if(null!==fr){if(In.callback=null,In=Wt,"function"!=typeof fr)throw Error(p(191,fr));fr.call(In)}}}var Df={},Ff=Uf(Df),jf=Uf(Df),Nf=Uf(Df);function xh(u){if(u===Df)throw Error(p(174));return u}function yh(u,Xe){switch(G(Nf,Xe),G(jf,u),G(Ff,Df),u=Xe.nodeType){case 9:case 11:Xe=(Xe=Xe.documentElement)?Xe.namespaceURI:lb(null,"");break;default:Xe=lb(Xe=(u=8===u?Xe.parentNode:Xe).namespaceURI||null,u=u.tagName)}E(Ff),G(Ff,Xe)}function zh(){E(Ff),E(jf),E(Nf)}function Ah(u){xh(Nf.current);var Xe=xh(Ff.current),Wt=lb(Xe,u.type);Xe!==Wt&&(G(jf,u),G(Ff,Wt))}function Bh(u){jf.current===u&&(E(Ff),E(jf))}var Vf=Uf(0);function Ch(u){for(var Xe=u;null!==Xe;){if(13===Xe.tag){var Wt=Xe.memoizedState;if(null!==Wt&&(null===(Wt=Wt.dehydrated)||"$?"===Wt.data||"$!"===Wt.data))return Xe}else if(19===Xe.tag&&void 0!==Xe.memoizedProps.revealOrder){if(128&Xe.flags)return Xe}else if(null!==Xe.child){Xe.child.return=Xe,Xe=Xe.child;continue}if(Xe===u)break;for(;null===Xe.sibling;){if(null===Xe.return||Xe.return===u)return null;Xe=Xe.return}Xe.sibling.return=Xe.return,Xe=Xe.sibling}return null}var Wf=[];function Eh(){for(var u=0;u<Wf.length;u++)Wf[u]._workInProgressVersionPrimary=null;Wf.length=0}var Hf=co.ReactCurrentDispatcher,Gf=co.ReactCurrentBatchConfig,Xf=0,Jf=null,Qf=null,em=null,tm=!1,nm=!1,rm=0,im=0;function P(){throw Error(p(321))}function Mh(u,Xe){if(null===Xe)return!1;for(var Wt=0;Wt<Xe.length&&Wt<u.length;Wt++)if(!cp(u[Wt],Xe[Wt]))return!1;return!0}function Nh(u,Xe,Wt,In,fr,_r){if(Xf=_r,Jf=Xe,Xe.memoizedState=null,Xe.updateQueue=null,Xe.lanes=0,Hf.current=null===u||null===u.memoizedState?am:sm,u=Wt(In,fr),nm){_r=0;do{if(nm=!1,rm=0,25<=_r)throw Error(p(301));_r+=1,em=Qf=null,Xe.updateQueue=null,Hf.current=lm,u=Wt(In,fr)}while(nm)}if(Hf.current=om,Xe=null!==Qf&&null!==Qf.next,Xf=0,em=Qf=Jf=null,tm=!1,Xe)throw Error(p(300));return u}function Sh(){var u=0!==rm;return rm=0,u}function Th(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===em?Jf.memoizedState=em=u:em=em.next=u,em}function Uh(){if(null===Qf){var u=Jf.alternate;u=null!==u?u.memoizedState:null}else u=Qf.next;var Xe=null===em?Jf.memoizedState:em.next;if(null!==Xe)em=Xe,Qf=u;else{if(null===u)throw Error(p(310));u={memoizedState:(Qf=u).memoizedState,baseState:Qf.baseState,baseQueue:Qf.baseQueue,queue:Qf.queue,next:null},null===em?Jf.memoizedState=em=u:em=em.next=u}return em}function Vh(u,Xe){return"function"==typeof Xe?Xe(u):Xe}function Wh(u){var Xe=Uh(),Wt=Xe.queue;if(null===Wt)throw Error(p(311));Wt.lastRenderedReducer=u;var In=Qf,fr=In.baseQueue,_r=Wt.pending;if(null!==_r){if(null!==fr){var wr=fr.next;fr.next=_r.next,_r.next=wr}In.baseQueue=fr=_r,Wt.pending=null}if(null!==fr){_r=fr.next,In=In.baseState;var Ar=wr=null,Kr=null,no=_r;do{var io=no.lane;if((Xf&io)===io)null!==Kr&&(Kr=Kr.next={lane:0,action:no.action,hasEagerState:no.hasEagerState,eagerState:no.eagerState,next:null}),In=no.hasEagerState?no.eagerState:u(In,no.action);else{var oo={lane:io,action:no.action,hasEagerState:no.hasEagerState,eagerState:no.eagerState,next:null};null===Kr?(Ar=Kr=oo,wr=In):Kr=Kr.next=oo,Jf.lanes|=io,Bm|=io}no=no.next}while(null!==no&&no!==_r);null===Kr?wr=In:Kr.next=Ar,cp(In,Xe.memoizedState)||(hm=!0),Xe.memoizedState=In,Xe.baseState=wr,Xe.baseQueue=Kr,Wt.lastRenderedState=In}if(null!==(u=Wt.interleaved)){fr=u;do{_r=fr.lane,Jf.lanes|=_r,Bm|=_r,fr=fr.next}while(fr!==u)}else null===fr&&(Wt.lanes=0);return[Xe.memoizedState,Wt.dispatch]}function Xh(u){var Xe=Uh(),Wt=Xe.queue;if(null===Wt)throw Error(p(311));Wt.lastRenderedReducer=u;var In=Wt.dispatch,fr=Wt.pending,_r=Xe.memoizedState;if(null!==fr){Wt.pending=null;var wr=fr=fr.next;do{_r=u(_r,wr.action),wr=wr.next}while(wr!==fr);cp(_r,Xe.memoizedState)||(hm=!0),Xe.memoizedState=_r,null===Xe.baseQueue&&(Xe.baseState=_r),Wt.lastRenderedState=_r}return[_r,In]}function Yh(){}function Zh(u,Xe){var Wt=Jf,In=Uh(),fr=Xe(),_r=!cp(In.memoizedState,fr);if(_r&&(In.memoizedState=fr,hm=!0),In=In.queue,$h(ai.bind(null,Wt,In,u),[u]),In.getSnapshot!==Xe||_r||null!==em&&1&em.memoizedState.tag){if(Wt.flags|=2048,bi(9,ci.bind(null,Wt,In,fr,Xe),void 0,null),null===Mm)throw Error(p(349));30&Xf||di(Wt,Xe,fr)}return fr}function di(u,Xe,Wt){u.flags|=16384,u={getSnapshot:Xe,value:Wt},null===(Xe=Jf.updateQueue)?(Xe={lastEffect:null,stores:null},Jf.updateQueue=Xe,Xe.stores=[u]):null===(Wt=Xe.stores)?Xe.stores=[u]:Wt.push(u)}function ci(u,Xe,Wt,In){Xe.value=Wt,Xe.getSnapshot=In,ei(Xe)&&fi(u)}function ai(u,Xe,Wt){return Wt((function(){ei(Xe)&&fi(u)}))}function ei(u){var Xe=u.getSnapshot;u=u.value;try{var Wt=Xe();return!cp(u,Wt)}catch(u){return!0}}function fi(u){var Xe=ih(u,1);null!==Xe&&gi(Xe,u,1,-1)}function hi(u){var Xe=Th();return"function"==typeof u&&(u=u()),Xe.memoizedState=Xe.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:u},Xe.queue=u,u=u.dispatch=ii.bind(null,Jf,u),[Xe.memoizedState,u]}function bi(u,Xe,Wt,In){return u={tag:u,create:Xe,destroy:Wt,deps:In,next:null},null===(Xe=Jf.updateQueue)?(Xe={lastEffect:null,stores:null},Jf.updateQueue=Xe,Xe.lastEffect=u.next=u):null===(Wt=Xe.lastEffect)?Xe.lastEffect=u.next=u:(In=Wt.next,Wt.next=u,u.next=In,Xe.lastEffect=u),u}function ji(){return Uh().memoizedState}function ki(u,Xe,Wt,In){var fr=Th();Jf.flags|=u,fr.memoizedState=bi(1|Xe,Wt,void 0,void 0===In?null:In)}function li(u,Xe,Wt,In){var fr=Uh();In=void 0===In?null:In;var _r=void 0;if(null!==Qf){var wr=Qf.memoizedState;if(_r=wr.destroy,null!==In&&Mh(In,wr.deps))return void(fr.memoizedState=bi(Xe,Wt,_r,In))}Jf.flags|=u,fr.memoizedState=bi(1|Xe,Wt,_r,In)}function mi(u,Xe){return ki(8390656,8,u,Xe)}function $h(u,Xe){return li(2048,8,u,Xe)}function ni(u,Xe){return li(4,2,u,Xe)}function oi(u,Xe){return li(4,4,u,Xe)}function pi(u,Xe){return"function"==typeof Xe?(u=u(),Xe(u),function(){Xe(null)}):null!=Xe?(u=u(),Xe.current=u,function(){Xe.current=null}):void 0}function qi(u,Xe,Wt){return Wt=null!=Wt?Wt.concat([u]):null,li(4,4,pi.bind(null,Xe,u),Wt)}function ri(){}function si(u,Xe){var Wt=Uh();Xe=void 0===Xe?null:Xe;var In=Wt.memoizedState;return null!==In&&null!==Xe&&Mh(Xe,In[1])?In[0]:(Wt.memoizedState=[u,Xe],u)}function ti(u,Xe){var Wt=Uh();Xe=void 0===Xe?null:Xe;var In=Wt.memoizedState;return null!==In&&null!==Xe&&Mh(Xe,In[1])?In[0]:(u=u(),Wt.memoizedState=[u,Xe],u)}function ui(u,Xe,Wt){return 21&Xf?(cp(Wt,Xe)||(Wt=yc(),Jf.lanes|=Wt,Bm|=Wt,u.baseState=!0),Xe):(u.baseState&&(u.baseState=!1,hm=!0),u.memoizedState=Wt)}function vi(u,Xe){var Wt=qu;qu=0!==Wt&&4>Wt?Wt:4,u(!0);var In=Gf.transition;Gf.transition={};try{u(!1),Xe()}finally{qu=Wt,Gf.transition=In}}function wi(){return Uh().memoizedState}function xi(u,Xe,Wt){var In=yi(u);if(Wt={lane:In,action:Wt,hasEagerState:!1,eagerState:null,next:null},zi(u))Ai(Xe,Wt);else if(null!==(Wt=hh(u,Xe,Wt,In))){gi(Wt,u,In,R()),Bi(Wt,Xe,In)}}function ii(u,Xe,Wt){var In=yi(u),fr={lane:In,action:Wt,hasEagerState:!1,eagerState:null,next:null};if(zi(u))Ai(Xe,fr);else{var _r=u.alternate;if(0===u.lanes&&(null===_r||0===_r.lanes)&&null!==(_r=Xe.lastRenderedReducer))try{var wr=Xe.lastRenderedState,Ar=_r(wr,Wt);if(fr.hasEagerState=!0,fr.eagerState=Ar,cp(Ar,wr)){var Kr=Xe.interleaved;return null===Kr?(fr.next=fr,gh(Xe)):(fr.next=Kr.next,Kr.next=fr),void(Xe.interleaved=fr)}}catch(u){}null!==(Wt=hh(u,Xe,fr,In))&&(gi(Wt,u,In,fr=R()),Bi(Wt,Xe,In))}}function zi(u){var Xe=u.alternate;return u===Jf||null!==Xe&&Xe===Jf}function Ai(u,Xe){nm=tm=!0;var Wt=u.pending;null===Wt?Xe.next=Xe:(Xe.next=Wt.next,Wt.next=Xe),u.pending=Xe}function Bi(u,Xe,Wt){if(4194240&Wt){var In=Xe.lanes;Wt|=In&=u.pendingLanes,Xe.lanes=Wt,Cc(u,Wt)}}var om={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:!1},am={readContext:eh,useCallback:function(u,Xe){return Th().memoizedState=[u,void 0===Xe?null:Xe],u},useContext:eh,useEffect:mi,useImperativeHandle:function(u,Xe,Wt){return Wt=null!=Wt?Wt.concat([u]):null,ki(4194308,4,pi.bind(null,Xe,u),Wt)},useLayoutEffect:function(u,Xe){return ki(4194308,4,u,Xe)},useInsertionEffect:function(u,Xe){return ki(4,2,u,Xe)},useMemo:function(u,Xe){var Wt=Th();return Xe=void 0===Xe?null:Xe,u=u(),Wt.memoizedState=[u,Xe],u},useReducer:function(u,Xe,Wt){var In=Th();return Xe=void 0!==Wt?Wt(Xe):Xe,In.memoizedState=In.baseState=Xe,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:Xe},In.queue=u,u=u.dispatch=xi.bind(null,Jf,u),[In.memoizedState,u]},useRef:function(u){return u={current:u},Th().memoizedState=u},useState:hi,useDebugValue:ri,useDeferredValue:function(u){return Th().memoizedState=u},useTransition:function(){var u=hi(!1),Xe=u[0];return u=vi.bind(null,u[1]),Th().memoizedState=u,[Xe,u]},useMutableSource:function(){},useSyncExternalStore:function(u,Xe,Wt){var In=Jf,fr=Th();if(yf){if(void 0===Wt)throw Error(p(407));Wt=Wt()}else{if(Wt=Xe(),null===Mm)throw Error(p(349));30&Xf||di(In,Xe,Wt)}fr.memoizedState=Wt;var _r={value:Wt,getSnapshot:Xe};return fr.queue=_r,mi(ai.bind(null,In,_r,u),[u]),In.flags|=2048,bi(9,ci.bind(null,In,_r,Wt,Xe),void 0,null),Wt},useId:function(){var u=Th(),Xe=Mm.identifierPrefix;if(yf){var Wt=hf;Xe=":"+Xe+"R"+(Wt=(df&~(1<<32-Du(df)-1)).toString(32)+Wt),0<(Wt=rm++)&&(Xe+="H"+Wt.toString(32)),Xe+=":"}else Xe=":"+Xe+"r"+(Wt=im++).toString(32)+":";return u.memoizedState=Xe},unstable_isNewReconciler:!1},sm={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Wh,useRef:ji,useState:function(){return Wh(Vh)},useDebugValue:ri,useDeferredValue:function(u){return ui(Uh(),Qf.memoizedState,u)},useTransition:function(){return[Wh(Vh)[0],Uh().memoizedState]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1},lm={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Xh,useRef:ji,useState:function(){return Xh(Vh)},useDebugValue:ri,useDeferredValue:function(u){var Xe=Uh();return null===Qf?Xe.memoizedState=u:ui(Xe,Qf.memoizedState,u)},useTransition:function(){return[Xh(Vh)[0],Uh().memoizedState]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1};function Ci(u,Xe){if(u&&u.defaultProps){for(var Wt in Xe=Al({},Xe),u=u.defaultProps)void 0===Xe[Wt]&&(Xe[Wt]=u[Wt]);return Xe}return Xe}function Di(u,Xe,Wt,In){Wt=null==(Wt=Wt(In,Xe=u.memoizedState))?Xe:Al({},Xe,Wt),u.memoizedState=Wt,0===u.lanes&&(u.updateQueue.baseState=Wt)}var cm={isMounted:function(u){return!!(u=u._reactInternals)&&Vb(u)===u},enqueueSetState:function(u,Xe,Wt){u=u._reactInternals;var In=R(),fr=yi(u),_r=mh(In,fr);_r.payload=Xe,null!=Wt&&(_r.callback=Wt),null!==(Xe=nh(u,_r,fr))&&(gi(Xe,u,fr,In),oh(Xe,u,fr))},enqueueReplaceState:function(u,Xe,Wt){u=u._reactInternals;var In=R(),fr=yi(u),_r=mh(In,fr);_r.tag=1,_r.payload=Xe,null!=Wt&&(_r.callback=Wt),null!==(Xe=nh(u,_r,fr))&&(gi(Xe,u,fr,In),oh(Xe,u,fr))},enqueueForceUpdate:function(u,Xe){u=u._reactInternals;var Wt=R(),In=yi(u),fr=mh(Wt,In);fr.tag=2,null!=Xe&&(fr.callback=Xe),null!==(Xe=nh(u,fr,In))&&(gi(Xe,u,In,Wt),oh(Xe,u,In))}};function Fi(u,Xe,Wt,In,fr,_r,wr){return"function"==typeof(u=u.stateNode).shouldComponentUpdate?u.shouldComponentUpdate(In,_r,wr):!Xe.prototype||!Xe.prototype.isPureReactComponent||(!Ie(Wt,In)||!Ie(fr,_r))}function Gi(u,Xe,Wt){var In=!1,fr=Hp,_r=Xe.contextType;return"object"==typeof _r&&null!==_r?_r=eh(_r):(fr=Zf(Xe)?Xp:Gp.current,_r=(In=null!=(In=Xe.contextTypes))?Yf(u,fr):Hp),Xe=new Xe(Wt,_r),u.memoizedState=null!==Xe.state&&void 0!==Xe.state?Xe.state:null,Xe.updater=cm,u.stateNode=Xe,Xe._reactInternals=u,In&&((u=u.stateNode).__reactInternalMemoizedUnmaskedChildContext=fr,u.__reactInternalMemoizedMaskedChildContext=_r),Xe}function Hi(u,Xe,Wt,In){u=Xe.state,"function"==typeof Xe.componentWillReceiveProps&&Xe.componentWillReceiveProps(Wt,In),"function"==typeof Xe.UNSAFE_componentWillReceiveProps&&Xe.UNSAFE_componentWillReceiveProps(Wt,In),Xe.state!==u&&cm.enqueueReplaceState(Xe,Xe.state,null)}function Ii(u,Xe,Wt,In){var fr=u.stateNode;fr.props=Wt,fr.state=u.memoizedState,fr.refs={},kh(u);var _r=Xe.contextType;"object"==typeof _r&&null!==_r?fr.context=eh(_r):(_r=Zf(Xe)?Xp:Gp.current,fr.context=Yf(u,_r)),fr.state=u.memoizedState,"function"==typeof(_r=Xe.getDerivedStateFromProps)&&(Di(u,Xe,_r,Wt),fr.state=u.memoizedState),"function"==typeof Xe.getDerivedStateFromProps||"function"==typeof fr.getSnapshotBeforeUpdate||"function"!=typeof fr.UNSAFE_componentWillMount&&"function"!=typeof fr.componentWillMount||(Xe=fr.state,"function"==typeof fr.componentWillMount&&fr.componentWillMount(),"function"==typeof fr.UNSAFE_componentWillMount&&fr.UNSAFE_componentWillMount(),Xe!==fr.state&&cm.enqueueReplaceState(fr,fr.state,null),qh(u,Wt,fr,In),fr.state=u.memoizedState),"function"==typeof fr.componentDidMount&&(u.flags|=4194308)}function Ji(u,Xe){try{var Wt="",In=Xe;do{Wt+=Pa(In),In=In.return}while(In);var fr=Wt}catch(u){fr="\nError generating stack: "+u.message+"\n"+u.stack}return{value:u,source:Xe,stack:fr,digest:null}}function Ki(u,Xe,Wt){return{value:u,source:null,stack:null!=Wt?Wt:null,digest:null!=Xe?Xe:null}}function Li(u,Xe){try{console.error(Xe.value)}catch(u){setTimeout((function(){throw u}))}}var um="function"==typeof WeakMap?WeakMap:Map;function Ni(u,Xe,Wt){(Wt=mh(-1,Wt)).tag=3,Wt.payload={element:null};var In=Xe.value;return Wt.callback=function(){Zm||(Zm=!0,Hm=In),Li(0,Xe)},Wt}function Qi(u,Xe,Wt){(Wt=mh(-1,Wt)).tag=3;var In=u.type.getDerivedStateFromError;if("function"==typeof In){var fr=Xe.value;Wt.payload=function(){return In(fr)},Wt.callback=function(){Li(0,Xe)}}var _r=u.stateNode;return null!==_r&&"function"==typeof _r.componentDidCatch&&(Wt.callback=function(){Li(0,Xe),"function"!=typeof In&&(null===Gm?Gm=new Set([this]):Gm.add(this));var u=Xe.stack;this.componentDidCatch(Xe.value,{componentStack:null!==u?u:""})}),Wt}function Si(u,Xe,Wt){var In=u.pingCache;if(null===In){In=u.pingCache=new um;var fr=new Set;In.set(Xe,fr)}else void 0===(fr=In.get(Xe))&&(fr=new Set,In.set(Xe,fr));fr.has(Wt)||(fr.add(Wt),u=Ti.bind(null,u,Xe,Wt),Xe.then(u,u))}function Ui(u){do{var Xe;if((Xe=13===u.tag)&&(Xe=null===(Xe=u.memoizedState)||null!==Xe.dehydrated),Xe)return u;u=u.return}while(null!==u);return null}function Vi(u,Xe,Wt,In,fr){return 1&u.mode?(u.flags|=65536,u.lanes=fr,u):(u===Xe?u.flags|=65536:(u.flags|=128,Wt.flags|=131072,Wt.flags&=-52805,1===Wt.tag&&(null===Wt.alternate?Wt.tag=17:((Xe=mh(-1,1)).tag=2,nh(Wt,Xe,1))),Wt.lanes|=1),u)}var dm=co.ReactCurrentOwner,hm=!1;function Xi(u,Xe,Wt,In){Xe.child=null===u?Sf(Xe,null,Wt,In):xf(Xe,u.child,Wt,In)}function Yi(u,Xe,Wt,In,fr){Wt=Wt.render;var _r=Xe.ref;return ch(Xe,fr),In=Nh(u,Xe,Wt,In,_r,fr),Wt=Sh(),null===u||hm?(yf&&Wt&&vg(Xe),Xe.flags|=1,Xi(u,Xe,In,fr),Xe.child):(Xe.updateQueue=u.updateQueue,Xe.flags&=-2053,u.lanes&=~fr,Zi(u,Xe,fr))}function $i(u,Xe,Wt,In,fr){if(null===u){var _r=Wt.type;return"function"!=typeof _r||aj(_r)||void 0!==_r.defaultProps||null!==Wt.compare||void 0!==Wt.defaultProps?((u=Rg(Wt.type,null,In,Xe,Xe.mode,fr)).ref=Xe.ref,u.return=Xe,Xe.child=u):(Xe.tag=15,Xe.type=_r,bj(u,Xe,_r,In,fr))}if(_r=u.child,!(u.lanes&fr)){var wr=_r.memoizedProps;if((Wt=null!==(Wt=Wt.compare)?Wt:Ie)(wr,In)&&u.ref===Xe.ref)return Zi(u,Xe,fr)}return Xe.flags|=1,(u=Pg(_r,In)).ref=Xe.ref,u.return=Xe,Xe.child=u}function bj(u,Xe,Wt,In,fr){if(null!==u){var _r=u.memoizedProps;if(Ie(_r,In)&&u.ref===Xe.ref){if(hm=!1,Xe.pendingProps=In=_r,!(u.lanes&fr))return Xe.lanes=u.lanes,Zi(u,Xe,fr);131072&u.flags&&(hm=!0)}}return cj(u,Xe,Wt,In,fr)}function dj(u,Xe,Wt){var In=Xe.pendingProps,fr=In.children,_r=null!==u?u.memoizedState:null;if("hidden"===In.mode)if(1&Xe.mode){if(!(1073741824&Wt))return u=null!==_r?_r.baseLanes|Wt:Wt,Xe.lanes=Xe.childLanes=1073741824,Xe.memoizedState={baseLanes:u,cachePool:null,transitions:null},Xe.updateQueue=null,G(Lm,Om),Om|=u,null;Xe.memoizedState={baseLanes:0,cachePool:null,transitions:null},In=null!==_r?_r.baseLanes:Wt,G(Lm,Om),Om|=In}else Xe.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(Lm,Om),Om|=Wt;else null!==_r?(In=_r.baseLanes|Wt,Xe.memoizedState=null):In=Wt,G(Lm,Om),Om|=In;return Xi(u,Xe,fr,Wt),Xe.child}function gj(u,Xe){var Wt=Xe.ref;(null===u&&null!==Wt||null!==u&&u.ref!==Wt)&&(Xe.flags|=512,Xe.flags|=2097152)}function cj(u,Xe,Wt,In,fr){var _r=Zf(Wt)?Xp:Gp.current;return _r=Yf(Xe,_r),ch(Xe,fr),Wt=Nh(u,Xe,Wt,In,_r,fr),In=Sh(),null===u||hm?(yf&&In&&vg(Xe),Xe.flags|=1,Xi(u,Xe,Wt,fr),Xe.child):(Xe.updateQueue=u.updateQueue,Xe.flags&=-2053,u.lanes&=~fr,Zi(u,Xe,fr))}function hj(u,Xe,Wt,In,fr){if(Zf(Wt)){var _r=!0;cg(Xe)}else _r=!1;if(ch(Xe,fr),null===Xe.stateNode)ij(u,Xe),Gi(Xe,Wt,In),Ii(Xe,Wt,In,fr),In=!0;else if(null===u){var wr=Xe.stateNode,Ar=Xe.memoizedProps;wr.props=Ar;var Kr=wr.context,no=Wt.contextType;"object"==typeof no&&null!==no?no=eh(no):no=Yf(Xe,no=Zf(Wt)?Xp:Gp.current);var io=Wt.getDerivedStateFromProps,oo="function"==typeof io||"function"==typeof wr.getSnapshotBeforeUpdate;oo||"function"!=typeof wr.UNSAFE_componentWillReceiveProps&&"function"!=typeof wr.componentWillReceiveProps||(Ar!==In||Kr!==no)&&Hi(Xe,wr,In,no),Of=!1;var ao=Xe.memoizedState;wr.state=ao,qh(Xe,In,wr,fr),Kr=Xe.memoizedState,Ar!==In||ao!==Kr||Kp.current||Of?("function"==typeof io&&(Di(Xe,Wt,io,In),Kr=Xe.memoizedState),(Ar=Of||Fi(Xe,Wt,Ar,In,ao,Kr,no))?(oo||"function"!=typeof wr.UNSAFE_componentWillMount&&"function"!=typeof wr.componentWillMount||("function"==typeof wr.componentWillMount&&wr.componentWillMount(),"function"==typeof wr.UNSAFE_componentWillMount&&wr.UNSAFE_componentWillMount()),"function"==typeof wr.componentDidMount&&(Xe.flags|=4194308)):("function"==typeof wr.componentDidMount&&(Xe.flags|=4194308),Xe.memoizedProps=In,Xe.memoizedState=Kr),wr.props=In,wr.state=Kr,wr.context=no,In=Ar):("function"==typeof wr.componentDidMount&&(Xe.flags|=4194308),In=!1)}else{wr=Xe.stateNode,lh(u,Xe),Ar=Xe.memoizedProps,no=Xe.type===Xe.elementType?Ar:Ci(Xe.type,Ar),wr.props=no,oo=Xe.pendingProps,ao=wr.context,"object"==typeof(Kr=Wt.contextType)&&null!==Kr?Kr=eh(Kr):Kr=Yf(Xe,Kr=Zf(Wt)?Xp:Gp.current);var so=Wt.getDerivedStateFromProps;(io="function"==typeof so||"function"==typeof wr.getSnapshotBeforeUpdate)||"function"!=typeof wr.UNSAFE_componentWillReceiveProps&&"function"!=typeof wr.componentWillReceiveProps||(Ar!==oo||ao!==Kr)&&Hi(Xe,wr,In,Kr),Of=!1,ao=Xe.memoizedState,wr.state=ao,qh(Xe,In,wr,fr);var co=Xe.memoizedState;Ar!==oo||ao!==co||Kp.current||Of?("function"==typeof so&&(Di(Xe,Wt,so,In),co=Xe.memoizedState),(no=Of||Fi(Xe,Wt,no,In,ao,co,Kr)||!1)?(io||"function"!=typeof wr.UNSAFE_componentWillUpdate&&"function"!=typeof wr.componentWillUpdate||("function"==typeof wr.componentWillUpdate&&wr.componentWillUpdate(In,co,Kr),"function"==typeof wr.UNSAFE_componentWillUpdate&&wr.UNSAFE_componentWillUpdate(In,co,Kr)),"function"==typeof wr.componentDidUpdate&&(Xe.flags|=4),"function"==typeof wr.getSnapshotBeforeUpdate&&(Xe.flags|=1024)):("function"!=typeof wr.componentDidUpdate||Ar===u.memoizedProps&&ao===u.memoizedState||(Xe.flags|=4),"function"!=typeof wr.getSnapshotBeforeUpdate||Ar===u.memoizedProps&&ao===u.memoizedState||(Xe.flags|=1024),Xe.memoizedProps=In,Xe.memoizedState=co),wr.props=In,wr.state=co,wr.context=Kr,In=no):("function"!=typeof wr.componentDidUpdate||Ar===u.memoizedProps&&ao===u.memoizedState||(Xe.flags|=4),"function"!=typeof wr.getSnapshotBeforeUpdate||Ar===u.memoizedProps&&ao===u.memoizedState||(Xe.flags|=1024),In=!1)}return jj(u,Xe,Wt,In,_r,fr)}function jj(u,Xe,Wt,In,fr,_r){gj(u,Xe);var wr=!!(128&Xe.flags);if(!In&&!wr)return fr&&dg(Xe,Wt,!1),Zi(u,Xe,_r);In=Xe.stateNode,dm.current=Xe;var Ar=wr&&"function"!=typeof Wt.getDerivedStateFromError?null:In.render();return Xe.flags|=1,null!==u&&wr?(Xe.child=xf(Xe,u.child,null,_r),Xe.child=xf(Xe,null,Ar,_r)):Xi(u,Xe,Ar,_r),Xe.memoizedState=In.state,fr&&dg(Xe,Wt,!0),Xe.child}function kj(u){var Xe=u.stateNode;Xe.pendingContext?ag(0,Xe.pendingContext,Xe.pendingContext!==Xe.context):Xe.context&&ag(0,Xe.context,!1),yh(u,Xe.containerInfo)}function lj(u,Xe,Wt,In,fr){return Ig(),Jg(fr),Xe.flags|=256,Xi(u,Xe,Wt,In),Xe.child}var pm,fm,mm,gm,ym={dehydrated:null,treeContext:null,retryLane:0};function nj(u){return{baseLanes:u,cachePool:null,transitions:null}}function oj(u,Xe,Wt){var In,fr=Xe.pendingProps,_r=Vf.current,wr=!1,Ar=!!(128&Xe.flags);if((In=Ar)||(In=(null===u||null!==u.memoizedState)&&!!(2&_r)),In?(wr=!0,Xe.flags&=-129):null!==u&&null===u.memoizedState||(_r|=1),G(Vf,1&_r),null===u)return Eg(Xe),null!==(u=Xe.memoizedState)&&null!==(u=u.dehydrated)?(1&Xe.mode?"$!"===u.data?Xe.lanes=8:Xe.lanes=1073741824:Xe.lanes=1,null):(Ar=fr.children,u=fr.fallback,wr?(fr=Xe.mode,wr=Xe.child,Ar={mode:"hidden",children:Ar},1&fr||null===wr?wr=pj(Ar,fr,0,null):(wr.childLanes=0,wr.pendingProps=Ar),u=Tg(u,fr,Wt,null),wr.return=Xe,u.return=Xe,wr.sibling=u,Xe.child=wr,Xe.child.memoizedState=nj(Wt),Xe.memoizedState=ym,u):qj(Xe,Ar));if(null!==(_r=u.memoizedState)&&null!==(In=_r.dehydrated))return function rj(u,Xe,Wt,In,fr,_r,wr){if(Wt)return 256&Xe.flags?(Xe.flags&=-257,sj(u,Xe,wr,In=Ki(Error(p(422))))):null!==Xe.memoizedState?(Xe.child=u.child,Xe.flags|=128,null):(_r=In.fallback,fr=Xe.mode,In=pj({mode:"visible",children:In.children},fr,0,null),(_r=Tg(_r,fr,wr,null)).flags|=2,In.return=Xe,_r.return=Xe,In.sibling=_r,Xe.child=In,1&Xe.mode&&xf(Xe,u.child,null,wr),Xe.child.memoizedState=nj(wr),Xe.memoizedState=ym,_r);if(!(1&Xe.mode))return sj(u,Xe,wr,null);if("$!"===fr.data){if(In=fr.nextSibling&&fr.nextSibling.dataset)var Ar=In.dgst;return In=Ar,sj(u,Xe,wr,In=Ki(_r=Error(p(419)),In,void 0))}if(Ar=!!(wr&u.childLanes),hm||Ar){if(null!==(In=Mm)){switch(wr&-wr){case 4:fr=2;break;case 16:fr=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:fr=32;break;case 536870912:fr=268435456;break;default:fr=0}0!==(fr=fr&(In.suspendedLanes|wr)?0:fr)&&fr!==_r.retryLane&&(_r.retryLane=fr,ih(u,fr),gi(In,u,fr,-1))}return tj(),sj(u,Xe,wr,In=Ki(Error(p(421))))}return"$?"===fr.data?(Xe.flags|=128,Xe.child=u.child,Xe=uj.bind(null,u),fr._reactRetry=Xe,null):(u=_r.treeContext,gf=Lf(fr.nextSibling),mf=Xe,yf=!0,_f=null,null!==u&&(lf[cf++]=df,lf[cf++]=hf,lf[cf++]=uf,df=u.id,hf=u.overflow,uf=Xe),Xe=qj(Xe,In.children),Xe.flags|=4096,Xe)}(u,Xe,Ar,fr,In,_r,Wt);if(wr){wr=fr.fallback,Ar=Xe.mode,In=(_r=u.child).sibling;var Kr={mode:"hidden",children:fr.children};return 1&Ar||Xe.child===_r?(fr=Pg(_r,Kr)).subtreeFlags=14680064&_r.subtreeFlags:((fr=Xe.child).childLanes=0,fr.pendingProps=Kr,Xe.deletions=null),null!==In?wr=Pg(In,wr):(wr=Tg(wr,Ar,Wt,null)).flags|=2,wr.return=Xe,fr.return=Xe,fr.sibling=wr,Xe.child=fr,fr=wr,wr=Xe.child,Ar=null===(Ar=u.child.memoizedState)?nj(Wt):{baseLanes:Ar.baseLanes|Wt,cachePool:null,transitions:Ar.transitions},wr.memoizedState=Ar,wr.childLanes=u.childLanes&~Wt,Xe.memoizedState=ym,fr}return u=(wr=u.child).sibling,fr=Pg(wr,{mode:"visible",children:fr.children}),!(1&Xe.mode)&&(fr.lanes=Wt),fr.return=Xe,fr.sibling=null,null!==u&&(null===(Wt=Xe.deletions)?(Xe.deletions=[u],Xe.flags|=16):Wt.push(u)),Xe.child=fr,Xe.memoizedState=null,fr}function qj(u,Xe){return(Xe=pj({mode:"visible",children:Xe},u.mode,0,null)).return=u,u.child=Xe}function sj(u,Xe,Wt,In){return null!==In&&Jg(In),xf(Xe,u.child,null,Wt),(u=qj(Xe,Xe.pendingProps.children)).flags|=2,Xe.memoizedState=null,u}function vj(u,Xe,Wt){u.lanes|=Xe;var In=u.alternate;null!==In&&(In.lanes|=Xe),bh(u.return,Xe,Wt)}function wj(u,Xe,Wt,In,fr){var _r=u.memoizedState;null===_r?u.memoizedState={isBackwards:Xe,rendering:null,renderingStartTime:0,last:In,tail:Wt,tailMode:fr}:(_r.isBackwards=Xe,_r.rendering=null,_r.renderingStartTime=0,_r.last=In,_r.tail=Wt,_r.tailMode=fr)}function xj(u,Xe,Wt){var In=Xe.pendingProps,fr=In.revealOrder,_r=In.tail;if(Xi(u,Xe,In.children,Wt),2&(In=Vf.current))In=1&In|2,Xe.flags|=128;else{if(null!==u&&128&u.flags)e:for(u=Xe.child;null!==u;){if(13===u.tag)null!==u.memoizedState&&vj(u,Wt,Xe);else if(19===u.tag)vj(u,Wt,Xe);else if(null!==u.child){u.child.return=u,u=u.child;continue}if(u===Xe)break e;for(;null===u.sibling;){if(null===u.return||u.return===Xe)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}In&=1}if(G(Vf,In),1&Xe.mode)switch(fr){case"forwards":for(Wt=Xe.child,fr=null;null!==Wt;)null!==(u=Wt.alternate)&&null===Ch(u)&&(fr=Wt),Wt=Wt.sibling;null===(Wt=fr)?(fr=Xe.child,Xe.child=null):(fr=Wt.sibling,Wt.sibling=null),wj(Xe,!1,fr,Wt,_r);break;case"backwards":for(Wt=null,fr=Xe.child,Xe.child=null;null!==fr;){if(null!==(u=fr.alternate)&&null===Ch(u)){Xe.child=fr;break}u=fr.sibling,fr.sibling=Wt,Wt=fr,fr=u}wj(Xe,!0,Wt,null,_r);break;case"together":wj(Xe,!1,null,null,void 0);break;default:Xe.memoizedState=null}else Xe.memoizedState=null;return Xe.child}function ij(u,Xe){!(1&Xe.mode)&&null!==u&&(u.alternate=null,Xe.alternate=null,Xe.flags|=2)}function Zi(u,Xe,Wt){if(null!==u&&(Xe.dependencies=u.dependencies),Bm|=Xe.lanes,!(Wt&Xe.childLanes))return null;if(null!==u&&Xe.child!==u.child)throw Error(p(153));if(null!==Xe.child){for(Wt=Pg(u=Xe.child,u.pendingProps),Xe.child=Wt,Wt.return=Xe;null!==u.sibling;)u=u.sibling,(Wt=Wt.sibling=Pg(u,u.pendingProps)).return=Xe;Wt.sibling=null}return Xe.child}function Dj(u,Xe){if(!yf)switch(u.tailMode){case"hidden":Xe=u.tail;for(var Wt=null;null!==Xe;)null!==Xe.alternate&&(Wt=Xe),Xe=Xe.sibling;null===Wt?u.tail=null:Wt.sibling=null;break;case"collapsed":Wt=u.tail;for(var In=null;null!==Wt;)null!==Wt.alternate&&(In=Wt),Wt=Wt.sibling;null===In?Xe||null===u.tail?u.tail=null:u.tail.sibling=null:In.sibling=null}}function S(u){var Xe=null!==u.alternate&&u.alternate.child===u.child,Wt=0,In=0;if(Xe)for(var fr=u.child;null!==fr;)Wt|=fr.lanes|fr.childLanes,In|=14680064&fr.subtreeFlags,In|=14680064&fr.flags,fr.return=u,fr=fr.sibling;else for(fr=u.child;null!==fr;)Wt|=fr.lanes|fr.childLanes,In|=fr.subtreeFlags,In|=fr.flags,fr.return=u,fr=fr.sibling;return u.subtreeFlags|=In,u.childLanes=Wt,Xe}function Ej(u,Xe,Wt){var In=Xe.pendingProps;switch(wg(Xe),Xe.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(Xe),null;case 1:case 17:return Zf(Xe.type)&&$f(),S(Xe),null;case 3:return In=Xe.stateNode,zh(),E(Kp),E(Gp),Eh(),In.pendingContext&&(In.context=In.pendingContext,In.pendingContext=null),null!==u&&null!==u.child||(Gg(Xe)?Xe.flags|=4:null===u||u.memoizedState.isDehydrated&&!(256&Xe.flags)||(Xe.flags|=1024,null!==_f&&(Fj(_f),_f=null))),fm(u,Xe),S(Xe),null;case 5:Bh(Xe);var fr=xh(Nf.current);if(Wt=Xe.type,null!==u&&null!=Xe.stateNode)mm(u,Xe,Wt,In,fr),u.ref!==Xe.ref&&(Xe.flags|=512,Xe.flags|=2097152);else{if(!In){if(null===Xe.stateNode)throw Error(p(166));return S(Xe),null}if(u=xh(Ff.current),Gg(Xe)){In=Xe.stateNode,Wt=Xe.type;var _r=Xe.memoizedProps;switch(In[jp]=Xe,In[Np]=_r,u=!!(1&Xe.mode),Wt){case"dialog":D("cancel",In),D("close",In);break;case"iframe":case"object":case"embed":D("load",In);break;case"video":case"audio":for(fr=0;fr<Cp.length;fr++)D(Cp[fr],In);break;case"source":D("error",In);break;case"img":case"image":case"link":D("error",In),D("load",In);break;case"details":D("toggle",In);break;case"input":Za(In,_r),D("invalid",In);break;case"select":In._wrapperState={wasMultiple:!!_r.multiple},D("invalid",In);break;case"textarea":hb(In,_r),D("invalid",In)}for(var Ar in ub(Wt,_r),fr=null,_r)if(_r.hasOwnProperty(Ar)){var Kr=_r[Ar];"children"===Ar?"string"==typeof Kr?In.textContent!==Kr&&(!0!==_r.suppressHydrationWarning&&Af(In.textContent,Kr,u),fr=["children",Kr]):"number"==typeof Kr&&In.textContent!==""+Kr&&(!0!==_r.suppressHydrationWarning&&Af(In.textContent,Kr,u),fr=["children",""+Kr]):wr.hasOwnProperty(Ar)&&null!=Kr&&"onScroll"===Ar&&D("scroll",In)}switch(Wt){case"input":Va(In),db(In,_r,!0);break;case"textarea":Va(In),jb(In);break;case"select":case"option":break;default:"function"==typeof _r.onClick&&(In.onclick=Bf)}In=fr,Xe.updateQueue=In,null!==In&&(Xe.flags|=4)}else{Ar=9===fr.nodeType?fr:fr.ownerDocument,"http://www.w3.org/1999/xhtml"===u&&(u=kb(Wt)),"http://www.w3.org/1999/xhtml"===u?"script"===Wt?((u=Ar.createElement("div")).innerHTML="<script><\/script>",u=u.removeChild(u.firstChild)):"string"==typeof In.is?u=Ar.createElement(Wt,{is:In.is}):(u=Ar.createElement(Wt),"select"===Wt&&(Ar=u,In.multiple?Ar.multiple=!0:In.size&&(Ar.size=In.size))):u=Ar.createElementNS(u,Wt),u[jp]=Xe,u[Np]=In,pm(u,Xe,!1,!1),Xe.stateNode=u;e:{switch(Ar=vb(Wt,In),Wt){case"dialog":D("cancel",u),D("close",u),fr=In;break;case"iframe":case"object":case"embed":D("load",u),fr=In;break;case"video":case"audio":for(fr=0;fr<Cp.length;fr++)D(Cp[fr],u);fr=In;break;case"source":D("error",u),fr=In;break;case"img":case"image":case"link":D("error",u),D("load",u),fr=In;break;case"details":D("toggle",u),fr=In;break;case"input":Za(u,In),fr=Ya(u,In),D("invalid",u);break;case"option":default:fr=In;break;case"select":u._wrapperState={wasMultiple:!!In.multiple},fr=Al({},In,{value:void 0}),D("invalid",u);break;case"textarea":hb(u,In),fr=gb(u,In),D("invalid",u)}for(_r in ub(Wt,fr),Kr=fr)if(Kr.hasOwnProperty(_r)){var no=Kr[_r];"style"===_r?sb(u,no):"dangerouslySetInnerHTML"===_r?null!=(no=no?no.__html:void 0)&&Dl(u,no):"children"===_r?"string"==typeof no?("textarea"!==Wt||""!==no)&&ob(u,no):"number"==typeof no&&ob(u,""+no):"suppressContentEditableWarning"!==_r&&"suppressHydrationWarning"!==_r&&"autoFocus"!==_r&&(wr.hasOwnProperty(_r)?null!=no&&"onScroll"===_r&&D("scroll",u):null!=no&&ta(u,_r,no,Ar))}switch(Wt){case"input":Va(u),db(u,In,!1);break;case"textarea":Va(u),jb(u);break;case"option":null!=In.value&&u.setAttribute("value",""+Sa(In.value));break;case"select":u.multiple=!!In.multiple,null!=(_r=In.value)?fb(u,!!In.multiple,_r,!1):null!=In.defaultValue&&fb(u,!!In.multiple,In.defaultValue,!0);break;default:"function"==typeof fr.onClick&&(u.onclick=Bf)}switch(Wt){case"button":case"input":case"select":case"textarea":In=!!In.autoFocus;break e;case"img":In=!0;break e;default:In=!1}}In&&(Xe.flags|=4)}null!==Xe.ref&&(Xe.flags|=512,Xe.flags|=2097152)}return S(Xe),null;case 6:if(u&&null!=Xe.stateNode)gm(u,Xe,u.memoizedProps,In);else{if("string"!=typeof In&&null===Xe.stateNode)throw Error(p(166));if(Wt=xh(Nf.current),xh(Ff.current),Gg(Xe)){if(In=Xe.stateNode,Wt=Xe.memoizedProps,In[jp]=Xe,(_r=In.nodeValue!==Wt)&&null!==(u=mf))switch(u.tag){case 3:Af(In.nodeValue,Wt,!!(1&u.mode));break;case 5:!0!==u.memoizedProps.suppressHydrationWarning&&Af(In.nodeValue,Wt,!!(1&u.mode))}_r&&(Xe.flags|=4)}else(In=(9===Wt.nodeType?Wt:Wt.ownerDocument).createTextNode(In))[jp]=Xe,Xe.stateNode=In}return S(Xe),null;case 13:if(E(Vf),In=Xe.memoizedState,null===u||null!==u.memoizedState&&null!==u.memoizedState.dehydrated){if(yf&&null!==gf&&1&Xe.mode&&!(128&Xe.flags))Hg(),Ig(),Xe.flags|=98560,_r=!1;else if(_r=Gg(Xe),null!==In&&null!==In.dehydrated){if(null===u){if(!_r)throw Error(p(318));if(!(_r=null!==(_r=Xe.memoizedState)?_r.dehydrated:null))throw Error(p(317));_r[jp]=Xe}else Ig(),!(128&Xe.flags)&&(Xe.memoizedState=null),Xe.flags|=4;S(Xe),_r=!1}else null!==_f&&(Fj(_f),_f=null),_r=!0;if(!_r)return 65536&Xe.flags?Xe:null}return 128&Xe.flags?(Xe.lanes=Wt,Xe):((In=null!==In)!==(null!==u&&null!==u.memoizedState)&&In&&(Xe.child.flags|=8192,1&Xe.mode&&(null===u||1&Vf.current?0===Dm&&(Dm=3):tj())),null!==Xe.updateQueue&&(Xe.flags|=4),S(Xe),null);case 4:return zh(),fm(u,Xe),null===u&&sf(Xe.stateNode.containerInfo),S(Xe),null;case 10:return ah(Xe.type._context),S(Xe),null;case 19:if(E(Vf),null===(_r=Xe.memoizedState))return S(Xe),null;if(In=!!(128&Xe.flags),null===(Ar=_r.rendering))if(In)Dj(_r,!1);else{if(0!==Dm||null!==u&&128&u.flags)for(u=Xe.child;null!==u;){if(null!==(Ar=Ch(u))){for(Xe.flags|=128,Dj(_r,!1),null!==(In=Ar.updateQueue)&&(Xe.updateQueue=In,Xe.flags|=4),Xe.subtreeFlags=0,In=Wt,Wt=Xe.child;null!==Wt;)u=In,(_r=Wt).flags&=14680066,null===(Ar=_r.alternate)?(_r.childLanes=0,_r.lanes=u,_r.child=null,_r.subtreeFlags=0,_r.memoizedProps=null,_r.memoizedState=null,_r.updateQueue=null,_r.dependencies=null,_r.stateNode=null):(_r.childLanes=Ar.childLanes,_r.lanes=Ar.lanes,_r.child=Ar.child,_r.subtreeFlags=0,_r.deletions=null,_r.memoizedProps=Ar.memoizedProps,_r.memoizedState=Ar.memoizedState,_r.updateQueue=Ar.updateQueue,_r.type=Ar.type,u=Ar.dependencies,_r.dependencies=null===u?null:{lanes:u.lanes,firstContext:u.firstContext}),Wt=Wt.sibling;return G(Vf,1&Vf.current|2),Xe.child}u=u.sibling}null!==_r.tail&&nu()>Wm&&(Xe.flags|=128,In=!0,Dj(_r,!1),Xe.lanes=4194304)}else{if(!In)if(null!==(u=Ch(Ar))){if(Xe.flags|=128,In=!0,null!==(Wt=u.updateQueue)&&(Xe.updateQueue=Wt,Xe.flags|=4),Dj(_r,!0),null===_r.tail&&"hidden"===_r.tailMode&&!Ar.alternate&&!yf)return S(Xe),null}else 2*nu()-_r.renderingStartTime>Wm&&1073741824!==Wt&&(Xe.flags|=128,In=!0,Dj(_r,!1),Xe.lanes=4194304);_r.isBackwards?(Ar.sibling=Xe.child,Xe.child=Ar):(null!==(Wt=_r.last)?Wt.sibling=Ar:Xe.child=Ar,_r.last=Ar)}return null!==_r.tail?(Xe=_r.tail,_r.rendering=Xe,_r.tail=Xe.sibling,_r.renderingStartTime=nu(),Xe.sibling=null,Wt=Vf.current,G(Vf,In?1&Wt|2:1&Wt),Xe):(S(Xe),null);case 22:case 23:return Hj(),In=null!==Xe.memoizedState,null!==u&&null!==u.memoizedState!==In&&(Xe.flags|=8192),In&&1&Xe.mode?!!(1073741824&Om)&&(S(Xe),6&Xe.subtreeFlags&&(Xe.flags|=8192)):S(Xe),null;case 24:case 25:return null}throw Error(p(156,Xe.tag))}function Ij(u,Xe){switch(wg(Xe),Xe.tag){case 1:return Zf(Xe.type)&&$f(),65536&(u=Xe.flags)?(Xe.flags=-65537&u|128,Xe):null;case 3:return zh(),E(Kp),E(Gp),Eh(),65536&(u=Xe.flags)&&!(128&u)?(Xe.flags=-65537&u|128,Xe):null;case 5:return Bh(Xe),null;case 13:if(E(Vf),null!==(u=Xe.memoizedState)&&null!==u.dehydrated){if(null===Xe.alternate)throw Error(p(340));Ig()}return 65536&(u=Xe.flags)?(Xe.flags=-65537&u|128,Xe):null;case 19:return E(Vf),null;case 4:return zh(),null;case 10:return ah(Xe.type._context),null;case 22:case 23:return Hj(),null;default:return null}}pm=function(u,Xe){for(var Wt=Xe.child;null!==Wt;){if(5===Wt.tag||6===Wt.tag)u.appendChild(Wt.stateNode);else if(4!==Wt.tag&&null!==Wt.child){Wt.child.return=Wt,Wt=Wt.child;continue}if(Wt===Xe)break;for(;null===Wt.sibling;){if(null===Wt.return||Wt.return===Xe)return;Wt=Wt.return}Wt.sibling.return=Wt.return,Wt=Wt.sibling}},fm=function(){},mm=function(u,Xe,Wt,In){var fr=u.memoizedProps;if(fr!==In){u=Xe.stateNode,xh(Ff.current);var _r,Ar=null;switch(Wt){case"input":fr=Ya(u,fr),In=Ya(u,In),Ar=[];break;case"select":fr=Al({},fr,{value:void 0}),In=Al({},In,{value:void 0}),Ar=[];break;case"textarea":fr=gb(u,fr),In=gb(u,In),Ar=[];break;default:"function"!=typeof fr.onClick&&"function"==typeof In.onClick&&(u.onclick=Bf)}for(io in ub(Wt,In),Wt=null,fr)if(!In.hasOwnProperty(io)&&fr.hasOwnProperty(io)&&null!=fr[io])if("style"===io){var Kr=fr[io];for(_r in Kr)Kr.hasOwnProperty(_r)&&(Wt||(Wt={}),Wt[_r]="")}else"dangerouslySetInnerHTML"!==io&&"children"!==io&&"suppressContentEditableWarning"!==io&&"suppressHydrationWarning"!==io&&"autoFocus"!==io&&(wr.hasOwnProperty(io)?Ar||(Ar=[]):(Ar=Ar||[]).push(io,null));for(io in In){var no=In[io];if(Kr=null!=fr?fr[io]:void 0,In.hasOwnProperty(io)&&no!==Kr&&(null!=no||null!=Kr))if("style"===io)if(Kr){for(_r in Kr)!Kr.hasOwnProperty(_r)||no&&no.hasOwnProperty(_r)||(Wt||(Wt={}),Wt[_r]="");for(_r in no)no.hasOwnProperty(_r)&&Kr[_r]!==no[_r]&&(Wt||(Wt={}),Wt[_r]=no[_r])}else Wt||(Ar||(Ar=[]),Ar.push(io,Wt)),Wt=no;else"dangerouslySetInnerHTML"===io?(no=no?no.__html:void 0,Kr=Kr?Kr.__html:void 0,null!=no&&Kr!==no&&(Ar=Ar||[]).push(io,no)):"children"===io?"string"!=typeof no&&"number"!=typeof no||(Ar=Ar||[]).push(io,""+no):"suppressContentEditableWarning"!==io&&"suppressHydrationWarning"!==io&&(wr.hasOwnProperty(io)?(null!=no&&"onScroll"===io&&D("scroll",u),Ar||Kr===no||(Ar=[])):(Ar=Ar||[]).push(io,no))}Wt&&(Ar=Ar||[]).push("style",Wt);var io=Ar;(Xe.updateQueue=io)&&(Xe.flags|=4)}},gm=function(u,Xe,Wt,In){Wt!==In&&(Xe.flags|=4)};var _m=!1,vm=!1,bm="function"==typeof WeakSet?WeakSet:Set,xm=null;function Lj(u,Xe){var Wt=u.ref;if(null!==Wt)if("function"==typeof Wt)try{Wt(null)}catch(Wt){W(u,Xe,Wt)}else Wt.current=null}function Mj(u,Xe,Wt){try{Wt()}catch(Wt){W(u,Xe,Wt)}}var wm=!1;function Pj(u,Xe,Wt){var In=Xe.updateQueue;if(null!==(In=null!==In?In.lastEffect:null)){var fr=In=In.next;do{if((fr.tag&u)===u){var _r=fr.destroy;fr.destroy=void 0,void 0!==_r&&Mj(Xe,Wt,_r)}fr=fr.next}while(fr!==In)}}function Qj(u,Xe){if(null!==(Xe=null!==(Xe=Xe.updateQueue)?Xe.lastEffect:null)){var Wt=Xe=Xe.next;do{if((Wt.tag&u)===u){var In=Wt.create;Wt.destroy=In()}Wt=Wt.next}while(Wt!==Xe)}}function Rj(u){var Xe=u.ref;if(null!==Xe){var Wt=u.stateNode;u.tag,u=Wt,"function"==typeof Xe?Xe(u):Xe.current=u}}function Sj(u){var Xe=u.alternate;null!==Xe&&(u.alternate=null,Sj(Xe)),u.child=null,u.deletions=null,u.sibling=null,5===u.tag&&(null!==(Xe=u.stateNode)&&(delete Xe[jp],delete Xe[Np],delete Xe[Up],delete Xe[$p],delete Xe[Wp])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function Tj(u){return 5===u.tag||3===u.tag||4===u.tag}function Uj(u){e:for(;;){for(;null===u.sibling;){if(null===u.return||Tj(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;5!==u.tag&&6!==u.tag&&18!==u.tag;){if(2&u.flags)continue e;if(null===u.child||4===u.tag)continue e;u.child.return=u,u=u.child}if(!(2&u.flags))return u.stateNode}}function Vj(u,Xe,Wt){var In=u.tag;if(5===In||6===In)u=u.stateNode,Xe?8===Wt.nodeType?Wt.parentNode.insertBefore(u,Xe):Wt.insertBefore(u,Xe):(8===Wt.nodeType?(Xe=Wt.parentNode).insertBefore(u,Wt):(Xe=Wt).appendChild(u),null!=(Wt=Wt._reactRootContainer)||null!==Xe.onclick||(Xe.onclick=Bf));else if(4!==In&&null!==(u=u.child))for(Vj(u,Xe,Wt),u=u.sibling;null!==u;)Vj(u,Xe,Wt),u=u.sibling}function Wj(u,Xe,Wt){var In=u.tag;if(5===In||6===In)u=u.stateNode,Xe?Wt.insertBefore(u,Xe):Wt.appendChild(u);else if(4!==In&&null!==(u=u.child))for(Wj(u,Xe,Wt),u=u.sibling;null!==u;)Wj(u,Xe,Wt),u=u.sibling}var Sm=null,km=!1;function Yj(u,Xe,Wt){for(Wt=Wt.child;null!==Wt;)Zj(u,Xe,Wt),Wt=Wt.sibling}function Zj(u,Xe,Wt){if(Lu&&"function"==typeof Lu.onCommitFiberUnmount)try{Lu.onCommitFiberUnmount(zu,Wt)}catch(u){}switch(Wt.tag){case 5:vm||Lj(Wt,Xe);case 6:var In=Sm,fr=km;Sm=null,Yj(u,Xe,Wt),km=fr,null!==(Sm=In)&&(km?(u=Sm,Wt=Wt.stateNode,8===u.nodeType?u.parentNode.removeChild(Wt):u.removeChild(Wt)):Sm.removeChild(Wt.stateNode));break;case 18:null!==Sm&&(km?(u=Sm,Wt=Wt.stateNode,8===u.nodeType?Kf(u.parentNode,Wt):1===u.nodeType&&Kf(u,Wt),bd(u)):Kf(Sm,Wt.stateNode));break;case 4:In=Sm,fr=km,Sm=Wt.stateNode.containerInfo,km=!0,Yj(u,Xe,Wt),Sm=In,km=fr;break;case 0:case 11:case 14:case 15:if(!vm&&(null!==(In=Wt.updateQueue)&&null!==(In=In.lastEffect))){fr=In=In.next;do{var _r=fr,wr=_r.destroy;_r=_r.tag,void 0!==wr&&(2&_r||4&_r)&&Mj(Wt,Xe,wr),fr=fr.next}while(fr!==In)}Yj(u,Xe,Wt);break;case 1:if(!vm&&(Lj(Wt,Xe),"function"==typeof(In=Wt.stateNode).componentWillUnmount))try{In.props=Wt.memoizedProps,In.state=Wt.memoizedState,In.componentWillUnmount()}catch(u){W(Wt,Xe,u)}Yj(u,Xe,Wt);break;case 21:Yj(u,Xe,Wt);break;case 22:1&Wt.mode?(vm=(In=vm)||null!==Wt.memoizedState,Yj(u,Xe,Wt),vm=In):Yj(u,Xe,Wt);break;default:Yj(u,Xe,Wt)}}function ak(u){var Xe=u.updateQueue;if(null!==Xe){u.updateQueue=null;var Wt=u.stateNode;null===Wt&&(Wt=u.stateNode=new bm),Xe.forEach((function(Xe){var In=bk.bind(null,u,Xe);Wt.has(Xe)||(Wt.add(Xe),Xe.then(In,In))}))}}function ck(u,Xe){var Wt=Xe.deletions;if(null!==Wt)for(var In=0;In<Wt.length;In++){var fr=Wt[In];try{var _r=u,wr=Xe,Ar=wr;e:for(;null!==Ar;){switch(Ar.tag){case 5:Sm=Ar.stateNode,km=!1;break e;case 3:case 4:Sm=Ar.stateNode.containerInfo,km=!0;break e}Ar=Ar.return}if(null===Sm)throw Error(p(160));Zj(_r,wr,fr),Sm=null,km=!1;var Kr=fr.alternate;null!==Kr&&(Kr.return=null),fr.return=null}catch(u){W(fr,Xe,u)}}if(12854&Xe.subtreeFlags)for(Xe=Xe.child;null!==Xe;)dk(Xe,u),Xe=Xe.sibling}function dk(u,Xe){var Wt=u.alternate,In=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:if(ck(Xe,u),ek(u),4&In){try{Pj(3,u,u.return),Qj(3,u)}catch(Xe){W(u,u.return,Xe)}try{Pj(5,u,u.return)}catch(Xe){W(u,u.return,Xe)}}break;case 1:ck(Xe,u),ek(u),512&In&&null!==Wt&&Lj(Wt,Wt.return);break;case 5:if(ck(Xe,u),ek(u),512&In&&null!==Wt&&Lj(Wt,Wt.return),32&u.flags){var fr=u.stateNode;try{ob(fr,"")}catch(Xe){W(u,u.return,Xe)}}if(4&In&&null!=(fr=u.stateNode)){var _r=u.memoizedProps,wr=null!==Wt?Wt.memoizedProps:_r,Ar=u.type,Kr=u.updateQueue;if(u.updateQueue=null,null!==Kr)try{"input"===Ar&&"radio"===_r.type&&null!=_r.name&&ab(fr,_r),vb(Ar,wr);var no=vb(Ar,_r);for(wr=0;wr<Kr.length;wr+=2){var io=Kr[wr],oo=Kr[wr+1];"style"===io?sb(fr,oo):"dangerouslySetInnerHTML"===io?Dl(fr,oo):"children"===io?ob(fr,oo):ta(fr,io,oo,no)}switch(Ar){case"input":bb(fr,_r);break;case"textarea":ib(fr,_r);break;case"select":var ao=fr._wrapperState.wasMultiple;fr._wrapperState.wasMultiple=!!_r.multiple;var so=_r.value;null!=so?fb(fr,!!_r.multiple,so,!1):ao!==!!_r.multiple&&(null!=_r.defaultValue?fb(fr,!!_r.multiple,_r.defaultValue,!0):fb(fr,!!_r.multiple,_r.multiple?[]:"",!1))}fr[Np]=_r}catch(Xe){W(u,u.return,Xe)}}break;case 6:if(ck(Xe,u),ek(u),4&In){if(null===u.stateNode)throw Error(p(162));fr=u.stateNode,_r=u.memoizedProps;try{fr.nodeValue=_r}catch(Xe){W(u,u.return,Xe)}}break;case 3:if(ck(Xe,u),ek(u),4&In&&null!==Wt&&Wt.memoizedState.isDehydrated)try{bd(Xe.containerInfo)}catch(Xe){W(u,u.return,Xe)}break;case 4:default:ck(Xe,u),ek(u);break;case 13:ck(Xe,u),ek(u),8192&(fr=u.child).flags&&(_r=null!==fr.memoizedState,fr.stateNode.isHidden=_r,!_r||null!==fr.alternate&&null!==fr.alternate.memoizedState||($m=nu())),4&In&&ak(u);break;case 22:if(io=null!==Wt&&null!==Wt.memoizedState,1&u.mode?(vm=(no=vm)||io,ck(Xe,u),vm=no):ck(Xe,u),ek(u),8192&In){if(no=null!==u.memoizedState,(u.stateNode.isHidden=no)&&!io&&1&u.mode)for(xm=u,io=u.child;null!==io;){for(oo=xm=io;null!==xm;){switch(so=(ao=xm).child,ao.tag){case 0:case 11:case 14:case 15:Pj(4,ao,ao.return);break;case 1:Lj(ao,ao.return);var co=ao.stateNode;if("function"==typeof co.componentWillUnmount){In=ao,Wt=ao.return;try{Xe=In,co.props=Xe.memoizedProps,co.state=Xe.memoizedState,co.componentWillUnmount()}catch(u){W(In,Wt,u)}}break;case 5:Lj(ao,ao.return);break;case 22:if(null!==ao.memoizedState){gk(oo);continue}}null!==so?(so.return=ao,xm=so):gk(oo)}io=io.sibling}e:for(io=null,oo=u;;){if(5===oo.tag){if(null===io){io=oo;try{fr=oo.stateNode,no?"function"==typeof(_r=fr.style).setProperty?_r.setProperty("display","none","important"):_r.display="none":(Ar=oo.stateNode,wr=null!=(Kr=oo.memoizedProps.style)&&Kr.hasOwnProperty("display")?Kr.display:null,Ar.style.display=rb("display",wr))}catch(Xe){W(u,u.return,Xe)}}}else if(6===oo.tag){if(null===io)try{oo.stateNode.nodeValue=no?"":oo.memoizedProps}catch(Xe){W(u,u.return,Xe)}}else if((22!==oo.tag&&23!==oo.tag||null===oo.memoizedState||oo===u)&&null!==oo.child){oo.child.return=oo,oo=oo.child;continue}if(oo===u)break e;for(;null===oo.sibling;){if(null===oo.return||oo.return===u)break e;io===oo&&(io=null),oo=oo.return}io===oo&&(io=null),oo.sibling.return=oo.return,oo=oo.sibling}}break;case 19:ck(Xe,u),ek(u),4&In&&ak(u);case 21:}}function ek(u){var Xe=u.flags;if(2&Xe){try{e:{for(var Wt=u.return;null!==Wt;){if(Tj(Wt)){var In=Wt;break e}Wt=Wt.return}throw Error(p(160))}switch(In.tag){case 5:var fr=In.stateNode;32&In.flags&&(ob(fr,""),In.flags&=-33),Wj(u,Uj(u),fr);break;case 3:case 4:var _r=In.stateNode.containerInfo;Vj(u,Uj(u),_r);break;default:throw Error(p(161))}}catch(Xe){W(u,u.return,Xe)}u.flags&=-3}4096&Xe&&(u.flags&=-4097)}function hk(u,Xe,Wt){xm=u,ik(u,Xe,Wt)}function ik(u,Xe,Wt){for(var In=!!(1&u.mode);null!==xm;){var fr=xm,_r=fr.child;if(22===fr.tag&&In){var wr=null!==fr.memoizedState||_m;if(!wr){var Ar=fr.alternate,Kr=null!==Ar&&null!==Ar.memoizedState||vm;Ar=_m;var no=vm;if(_m=wr,(vm=Kr)&&!no)for(xm=fr;null!==xm;)Kr=(wr=xm).child,22===wr.tag&&null!==wr.memoizedState?jk(fr):null!==Kr?(Kr.return=wr,xm=Kr):jk(fr);for(;null!==_r;)xm=_r,ik(_r,Xe,Wt),_r=_r.sibling;xm=fr,_m=Ar,vm=no}kk(u)}else 8772&fr.subtreeFlags&&null!==_r?(_r.return=fr,xm=_r):kk(u)}}function kk(u){for(;null!==xm;){var Xe=xm;if(8772&Xe.flags){var Wt=Xe.alternate;try{if(8772&Xe.flags)switch(Xe.tag){case 0:case 11:case 15:vm||Qj(5,Xe);break;case 1:var In=Xe.stateNode;if(4&Xe.flags&&!vm)if(null===Wt)In.componentDidMount();else{var fr=Xe.elementType===Xe.type?Wt.memoizedProps:Ci(Xe.type,Wt.memoizedProps);In.componentDidUpdate(fr,Wt.memoizedState,In.__reactInternalSnapshotBeforeUpdate)}var _r=Xe.updateQueue;null!==_r&&sh(Xe,_r,In);break;case 3:var wr=Xe.updateQueue;if(null!==wr){if(Wt=null,null!==Xe.child)switch(Xe.child.tag){case 5:case 1:Wt=Xe.child.stateNode}sh(Xe,wr,Wt)}break;case 5:var Ar=Xe.stateNode;if(null===Wt&&4&Xe.flags){Wt=Ar;var Kr=Xe.memoizedProps;switch(Xe.type){case"button":case"input":case"select":case"textarea":Kr.autoFocus&&Wt.focus();break;case"img":Kr.src&&(Wt.src=Kr.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===Xe.memoizedState){var no=Xe.alternate;if(null!==no){var io=no.memoizedState;if(null!==io){var oo=io.dehydrated;null!==oo&&bd(oo)}}}break;default:throw Error(p(163))}vm||512&Xe.flags&&Rj(Xe)}catch(u){W(Xe,Xe.return,u)}}if(Xe===u){xm=null;break}if(null!==(Wt=Xe.sibling)){Wt.return=Xe.return,xm=Wt;break}xm=Xe.return}}function gk(u){for(;null!==xm;){var Xe=xm;if(Xe===u){xm=null;break}var Wt=Xe.sibling;if(null!==Wt){Wt.return=Xe.return,xm=Wt;break}xm=Xe.return}}function jk(u){for(;null!==xm;){var Xe=xm;try{switch(Xe.tag){case 0:case 11:case 15:var Wt=Xe.return;try{Qj(4,Xe)}catch(u){W(Xe,Wt,u)}break;case 1:var In=Xe.stateNode;if("function"==typeof In.componentDidMount){var fr=Xe.return;try{In.componentDidMount()}catch(u){W(Xe,fr,u)}}var _r=Xe.return;try{Rj(Xe)}catch(u){W(Xe,_r,u)}break;case 5:var wr=Xe.return;try{Rj(Xe)}catch(u){W(Xe,wr,u)}}}catch(u){W(Xe,Xe.return,u)}if(Xe===u){xm=null;break}var Ar=Xe.sibling;if(null!==Ar){Ar.return=Xe.return,xm=Ar;break}xm=Xe.return}}var Am,Tm=Math.ceil,Cm=co.ReactCurrentDispatcher,Em=co.ReactCurrentOwner,Pm=co.ReactCurrentBatchConfig,Im=0,Mm=null,Rm=null,zm=0,Om=0,Lm=Uf(0),Dm=0,Fm=null,Bm=0,jm=0,Nm=0,Vm=null,Um=null,$m=0,Wm=1/0,qm=null,Zm=!1,Hm=null,Gm=null,Km=!1,Xm=null,Ym=0,Jm=0,Qm=null,eg=-1,ng=0;function R(){return 6&Im?nu():-1!==eg?eg:eg=nu()}function yi(u){return 1&u.mode?2&Im&&0!==zm?zm&-zm:null!==bf.transition?(0===ng&&(ng=yc()),ng):0!==(u=qu)?u:u=void 0===(u=window.event)?16:jd(u.type):1}function gi(u,Xe,Wt,In){if(50<Jm)throw Jm=0,Qm=null,Error(p(185));Ac(u,Wt,In),2&Im&&u===Mm||(u===Mm&&(!(2&Im)&&(jm|=Wt),4===Dm&&Ck(u,zm)),Dk(u,In),1===Wt&&0===Im&&!(1&Xe.mode)&&(Wm=nu()+500,Jp&&jg()))}function Dk(u,Xe){var Wt=u.callbackNode;!function wc(u,Xe){for(var Wt=u.suspendedLanes,In=u.pingedLanes,fr=u.expirationTimes,_r=u.pendingLanes;0<_r;){var wr=31-Du(_r),Ar=1<<wr,Kr=fr[wr];-1===Kr?Ar&Wt&&!(Ar&In)||(fr[wr]=vc(Ar,Xe)):Kr<=Xe&&(u.expiredLanes|=Ar),_r&=~Ar}}(u,Xe);var In=uc(u,u===Mm?zm:0);if(0===In)null!==Wt&&bc(Wt),u.callbackNode=null,u.callbackPriority=0;else if(Xe=In&-In,u.callbackPriority!==Xe){if(null!=Wt&&bc(Wt),1===Xe)0===u.tag?function ig(u){Jp=!0,hg(u)}(Ek.bind(null,u)):hg(Ek.bind(null,u)),Fp((function(){!(6&Im)&&jg()})),Wt=null;else{switch(Dc(In)){case 1:Wt=su;break;case 4:Wt=cu;break;case 16:default:Wt=uu;break;case 536870912:Wt=Iu}Wt=Fk(Wt,Gk.bind(null,u))}u.callbackPriority=Xe,u.callbackNode=Wt}}function Gk(u,Xe){if(eg=-1,ng=0,6&Im)throw Error(p(327));var Wt=u.callbackNode;if(Hk()&&u.callbackNode!==Wt)return null;var In=uc(u,u===Mm?zm:0);if(0===In)return null;if(30&In||In&u.expiredLanes||Xe)Xe=Ik(u,In);else{Xe=In;var fr=Im;Im|=2;var _r=Jk();for(Mm===u&&zm===Xe||(qm=null,Wm=nu()+500,Kk(u,Xe));;)try{Lk();break}catch(Xe){Mk(u,Xe)}$g(),Cm.current=_r,Im=fr,null!==Rm?Xe=0:(Mm=null,zm=0,Xe=Dm)}if(0!==Xe){if(2===Xe&&(0!==(fr=xc(u))&&(In=fr,Xe=Nk(u,fr))),1===Xe)throw Wt=Fm,Kk(u,0),Ck(u,In),Dk(u,nu()),Wt;if(6===Xe)Ck(u,In);else{if(fr=u.current.alternate,!(30&In||function Ok(u){for(var Xe=u;;){if(16384&Xe.flags){var Wt=Xe.updateQueue;if(null!==Wt&&null!==(Wt=Wt.stores))for(var In=0;In<Wt.length;In++){var fr=Wt[In],_r=fr.getSnapshot;fr=fr.value;try{if(!cp(_r(),fr))return!1}catch(u){return!1}}}if(Wt=Xe.child,16384&Xe.subtreeFlags&&null!==Wt)Wt.return=Xe,Xe=Wt;else{if(Xe===u)break;for(;null===Xe.sibling;){if(null===Xe.return||Xe.return===u)return!0;Xe=Xe.return}Xe.sibling.return=Xe.return,Xe=Xe.sibling}}return!0}(fr)||(Xe=Ik(u,In),2===Xe&&(_r=xc(u),0!==_r&&(In=_r,Xe=Nk(u,_r))),1!==Xe)))throw Wt=Fm,Kk(u,0),Ck(u,In),Dk(u,nu()),Wt;switch(u.finishedWork=fr,u.finishedLanes=In,Xe){case 0:case 1:throw Error(p(345));case 2:case 5:Pk(u,Um,qm);break;case 3:if(Ck(u,In),(130023424&In)===In&&10<(Xe=$m+500-nu())){if(0!==uc(u,0))break;if(((fr=u.suspendedLanes)&In)!==In){R(),u.pingedLanes|=u.suspendedLanes&fr;break}u.timeoutHandle=Op(Pk.bind(null,u,Um,qm),Xe);break}Pk(u,Um,qm);break;case 4:if(Ck(u,In),(4194240&In)===In)break;for(Xe=u.eventTimes,fr=-1;0<In;){var wr=31-Du(In);_r=1<<wr,(wr=Xe[wr])>fr&&(fr=wr),In&=~_r}if(In=fr,10<(In=(120>(In=nu()-In)?120:480>In?480:1080>In?1080:1920>In?1920:3e3>In?3e3:4320>In?4320:1960*Tm(In/1960))-In)){u.timeoutHandle=Op(Pk.bind(null,u,Um,qm),In);break}Pk(u,Um,qm);break;default:throw Error(p(329))}}}return Dk(u,nu()),u.callbackNode===Wt?Gk.bind(null,u):null}function Nk(u,Xe){var Wt=Vm;return u.current.memoizedState.isDehydrated&&(Kk(u,Xe).flags|=256),2!==(u=Ik(u,Xe))&&(Xe=Um,Um=Wt,null!==Xe&&Fj(Xe)),u}function Fj(u){null===Um?Um=u:Um.push.apply(Um,u)}function Ck(u,Xe){for(Xe&=~Nm,Xe&=~jm,u.suspendedLanes|=Xe,u.pingedLanes&=~Xe,u=u.expirationTimes;0<Xe;){var Wt=31-Du(Xe),In=1<<Wt;u[Wt]=-1,Xe&=~In}}function Ek(u){if(6&Im)throw Error(p(327));Hk();var Xe=uc(u,0);if(!(1&Xe))return Dk(u,nu()),null;var Wt=Ik(u,Xe);if(0!==u.tag&&2===Wt){var In=xc(u);0!==In&&(Xe=In,Wt=Nk(u,In))}if(1===Wt)throw Wt=Fm,Kk(u,0),Ck(u,Xe),Dk(u,nu()),Wt;if(6===Wt)throw Error(p(345));return u.finishedWork=u.current.alternate,u.finishedLanes=Xe,Pk(u,Um,qm),Dk(u,nu()),null}function Qk(u,Xe){var Wt=Im;Im|=1;try{return u(Xe)}finally{0===(Im=Wt)&&(Wm=nu()+500,Jp&&jg())}}function Rk(u){null!==Xm&&0===Xm.tag&&!(6&Im)&&Hk();var Xe=Im;Im|=1;var Wt=Pm.transition,In=qu;try{if(Pm.transition=null,qu=1,u)return u()}finally{qu=In,Pm.transition=Wt,!(6&(Im=Xe))&&jg()}}function Hj(){Om=Lm.current,E(Lm)}function Kk(u,Xe){u.finishedWork=null,u.finishedLanes=0;var Wt=u.timeoutHandle;if(-1!==Wt&&(u.timeoutHandle=-1,Lp(Wt)),null!==Rm)for(Wt=Rm.return;null!==Wt;){var In=Wt;switch(wg(In),In.tag){case 1:null!=(In=In.type.childContextTypes)&&$f();break;case 3:zh(),E(Kp),E(Gp),Eh();break;case 5:Bh(In);break;case 4:zh();break;case 13:case 19:E(Vf);break;case 10:ah(In.type._context);break;case 22:case 23:Hj()}Wt=Wt.return}if(Mm=u,Rm=u=Pg(u.current,null),zm=Om=Xe,Dm=0,Fm=null,Nm=jm=Bm=0,Um=Vm=null,null!==Rf){for(Xe=0;Xe<Rf.length;Xe++)if(null!==(In=(Wt=Rf[Xe]).interleaved)){Wt.interleaved=null;var fr=In.next,_r=Wt.pending;if(null!==_r){var wr=_r.next;_r.next=fr,In.next=wr}Wt.pending=In}Rf=null}return u}function Mk(u,Xe){for(;;){var Wt=Rm;try{if($g(),Hf.current=om,tm){for(var In=Jf.memoizedState;null!==In;){var fr=In.queue;null!==fr&&(fr.pending=null),In=In.next}tm=!1}if(Xf=0,em=Qf=Jf=null,nm=!1,rm=0,Em.current=null,null===Wt||null===Wt.return){Dm=1,Fm=Xe,Rm=null;break}e:{var _r=u,wr=Wt.return,Ar=Wt,Kr=Xe;if(Xe=zm,Ar.flags|=32768,null!==Kr&&"object"==typeof Kr&&"function"==typeof Kr.then){var no=Kr,io=Ar,oo=io.tag;if(!(1&io.mode||0!==oo&&11!==oo&&15!==oo)){var ao=io.alternate;ao?(io.updateQueue=ao.updateQueue,io.memoizedState=ao.memoizedState,io.lanes=ao.lanes):(io.updateQueue=null,io.memoizedState=null)}var so=Ui(wr);if(null!==so){so.flags&=-257,Vi(so,wr,Ar,0,Xe),1&so.mode&&Si(_r,no,Xe),Kr=no;var co=(Xe=so).updateQueue;if(null===co){var ho=new Set;ho.add(Kr),Xe.updateQueue=ho}else co.add(Kr);break e}if(!(1&Xe)){Si(_r,no,Xe),tj();break e}Kr=Error(p(426))}else if(yf&&1&Ar.mode){var go=Ui(wr);if(null!==go){!(65536&go.flags)&&(go.flags|=256),Vi(go,wr,Ar,0,Xe),Jg(Ji(Kr,Ar));break e}}_r=Kr=Ji(Kr,Ar),4!==Dm&&(Dm=2),null===Vm?Vm=[_r]:Vm.push(_r),_r=wr;do{switch(_r.tag){case 3:_r.flags|=65536,Xe&=-Xe,_r.lanes|=Xe,ph(_r,Ni(0,Kr,Xe));break e;case 1:Ar=Kr;var xo=_r.type,ko=_r.stateNode;if(!(128&_r.flags||"function"!=typeof xo.getDerivedStateFromError&&(null===ko||"function"!=typeof ko.componentDidCatch||null!==Gm&&Gm.has(ko)))){_r.flags|=65536,Xe&=-Xe,_r.lanes|=Xe,ph(_r,Qi(_r,Ar,Xe));break e}}_r=_r.return}while(null!==_r)}Sk(Wt)}catch(u){Xe=u,Rm===Wt&&null!==Wt&&(Rm=Wt=Wt.return);continue}break}}function Jk(){var u=Cm.current;return Cm.current=om,null===u?om:u}function tj(){0!==Dm&&3!==Dm&&2!==Dm||(Dm=4),null===Mm||!(268435455&Bm)&&!(268435455&jm)||Ck(Mm,zm)}function Ik(u,Xe){var Wt=Im;Im|=2;var In=Jk();for(Mm===u&&zm===Xe||(qm=null,Kk(u,Xe));;)try{Tk();break}catch(Xe){Mk(u,Xe)}if($g(),Im=Wt,Cm.current=In,null!==Rm)throw Error(p(261));return Mm=null,zm=0,Dm}function Tk(){for(;null!==Rm;)Uk(Rm)}function Lk(){for(;null!==Rm&&!eu();)Uk(Rm)}function Uk(u){var Xe=Am(u.alternate,u,Om);u.memoizedProps=u.pendingProps,null===Xe?Sk(u):Rm=Xe,Em.current=null}function Sk(u){var Xe=u;do{var Wt=Xe.alternate;if(u=Xe.return,32768&Xe.flags){if(null!==(Wt=Ij(Wt,Xe)))return Wt.flags&=32767,void(Rm=Wt);if(null===u)return Dm=6,void(Rm=null);u.flags|=32768,u.subtreeFlags=0,u.deletions=null}else if(null!==(Wt=Ej(Wt,Xe,Om)))return void(Rm=Wt);if(null!==(Xe=Xe.sibling))return void(Rm=Xe);Rm=Xe=u}while(null!==Xe);0===Dm&&(Dm=5)}function Pk(u,Xe,Wt){var In=qu,fr=Pm.transition;try{Pm.transition=null,qu=1,function Wk(u,Xe,Wt,In){do{Hk()}while(null!==Xm);if(6&Im)throw Error(p(327));Wt=u.finishedWork;var fr=u.finishedLanes;if(null===Wt)return null;if(u.finishedWork=null,u.finishedLanes=0,Wt===u.current)throw Error(p(177));u.callbackNode=null,u.callbackPriority=0;var _r=Wt.lanes|Wt.childLanes;if(function Bc(u,Xe){var Wt=u.pendingLanes&~Xe;u.pendingLanes=Xe,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=Xe,u.mutableReadLanes&=Xe,u.entangledLanes&=Xe,Xe=u.entanglements;var In=u.eventTimes;for(u=u.expirationTimes;0<Wt;){var fr=31-Du(Wt),_r=1<<fr;Xe[fr]=0,In[fr]=-1,u[fr]=-1,Wt&=~_r}}(u,_r),u===Mm&&(Rm=Mm=null,zm=0),!(2064&Wt.subtreeFlags)&&!(2064&Wt.flags)||Km||(Km=!0,Fk(uu,(function(){return Hk(),null}))),_r=!!(15990&Wt.flags),!!(15990&Wt.subtreeFlags)||_r){_r=Pm.transition,Pm.transition=null;var wr=qu;qu=1;var Ar=Im;Im|=4,Em.current=null,function Oj(u,Xe){if(Rp=Ad,Ne(u=Me())){if("selectionStart"in u)var Wt={start:u.selectionStart,end:u.selectionEnd};else e:{var In=(Wt=(Wt=u.ownerDocument)&&Wt.defaultView||window).getSelection&&Wt.getSelection();if(In&&0!==In.rangeCount){Wt=In.anchorNode;var fr=In.anchorOffset,_r=In.focusNode;In=In.focusOffset;try{Wt.nodeType,_r.nodeType}catch(u){Wt=null;break e}var wr=0,Ar=-1,Kr=-1,no=0,io=0,oo=u,ao=null;t:for(;;){for(var so;oo!==Wt||0!==fr&&3!==oo.nodeType||(Ar=wr+fr),oo!==_r||0!==In&&3!==oo.nodeType||(Kr=wr+In),3===oo.nodeType&&(wr+=oo.nodeValue.length),null!==(so=oo.firstChild);)ao=oo,oo=so;for(;;){if(oo===u)break t;if(ao===Wt&&++no===fr&&(Ar=wr),ao===_r&&++io===In&&(Kr=wr),null!==(so=oo.nextSibling))break;ao=(oo=ao).parentNode}oo=so}Wt=-1===Ar||-1===Kr?null:{start:Ar,end:Kr}}else Wt=null}Wt=Wt||{start:0,end:0}}else Wt=null;for(zp={focusedElem:u,selectionRange:Wt},Ad=!1,xm=Xe;null!==xm;)if(u=(Xe=xm).child,1028&Xe.subtreeFlags&&null!==u)u.return=Xe,xm=u;else for(;null!==xm;){Xe=xm;try{var co=Xe.alternate;if(1024&Xe.flags)switch(Xe.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==co){var ho=co.memoizedProps,go=co.memoizedState,xo=Xe.stateNode,ko=xo.getSnapshotBeforeUpdate(Xe.elementType===Xe.type?ho:Ci(Xe.type,ho),go);xo.__reactInternalSnapshotBeforeUpdate=ko}break;case 3:var Co=Xe.stateNode.containerInfo;1===Co.nodeType?Co.textContent="":9===Co.nodeType&&Co.documentElement&&Co.removeChild(Co.documentElement);break;default:throw Error(p(163))}}catch(u){W(Xe,Xe.return,u)}if(null!==(u=Xe.sibling)){u.return=Xe.return,xm=u;break}xm=Xe.return}return co=wm,wm=!1,co}(u,Wt),dk(Wt,u),Oe(zp),Ad=!!Rp,zp=Rp=null,u.current=Wt,hk(Wt,u,fr),tu(),Im=Ar,qu=wr,Pm.transition=_r}else u.current=Wt;if(Km&&(Km=!1,Xm=u,Ym=fr),_r=u.pendingLanes,0===_r&&(Gm=null),function mc(u){if(Lu&&"function"==typeof Lu.onCommitFiberRoot)try{Lu.onCommitFiberRoot(zu,u,void 0,!(128&~u.current.flags))}catch(u){}}(Wt.stateNode),Dk(u,nu()),null!==Xe)for(In=u.onRecoverableError,Wt=0;Wt<Xe.length;Wt++)fr=Xe[Wt],In(fr.value,{componentStack:fr.stack,digest:fr.digest});if(Zm)throw Zm=!1,u=Hm,Hm=null,u;return!!(1&Ym)&&0!==u.tag&&Hk(),_r=u.pendingLanes,1&_r?u===Qm?Jm++:(Jm=0,Qm=u):Jm=0,jg(),null}(u,Xe,Wt,In)}finally{Pm.transition=fr,qu=In}return null}function Hk(){if(null!==Xm){var u=Dc(Ym),Xe=Pm.transition,Wt=qu;try{if(Pm.transition=null,qu=16>u?16:u,null===Xm)var In=!1;else{if(u=Xm,Xm=null,Ym=0,6&Im)throw Error(p(331));var fr=Im;for(Im|=4,xm=u.current;null!==xm;){var _r=xm,wr=_r.child;if(16&xm.flags){var Ar=_r.deletions;if(null!==Ar){for(var Kr=0;Kr<Ar.length;Kr++){var no=Ar[Kr];for(xm=no;null!==xm;){var io=xm;switch(io.tag){case 0:case 11:case 15:Pj(8,io,_r)}var oo=io.child;if(null!==oo)oo.return=io,xm=oo;else for(;null!==xm;){var ao=(io=xm).sibling,so=io.return;if(Sj(io),io===no){xm=null;break}if(null!==ao){ao.return=so,xm=ao;break}xm=so}}}var co=_r.alternate;if(null!==co){var ho=co.child;if(null!==ho){co.child=null;do{var go=ho.sibling;ho.sibling=null,ho=go}while(null!==ho)}}xm=_r}}if(2064&_r.subtreeFlags&&null!==wr)wr.return=_r,xm=wr;else e:for(;null!==xm;){if(2048&(_r=xm).flags)switch(_r.tag){case 0:case 11:case 15:Pj(9,_r,_r.return)}var xo=_r.sibling;if(null!==xo){xo.return=_r.return,xm=xo;break e}xm=_r.return}}var ko=u.current;for(xm=ko;null!==xm;){var Co=(wr=xm).child;if(2064&wr.subtreeFlags&&null!==Co)Co.return=wr,xm=Co;else e:for(wr=ko;null!==xm;){if(2048&(Ar=xm).flags)try{switch(Ar.tag){case 0:case 11:case 15:Qj(9,Ar)}}catch(u){W(Ar,Ar.return,u)}if(Ar===wr){xm=null;break e}var Io=Ar.sibling;if(null!==Io){Io.return=Ar.return,xm=Io;break e}xm=Ar.return}}if(Im=fr,jg(),Lu&&"function"==typeof Lu.onPostCommitFiberRoot)try{Lu.onPostCommitFiberRoot(zu,u)}catch(u){}In=!0}return In}finally{qu=Wt,Pm.transition=Xe}}return!1}function Xk(u,Xe,Wt){u=nh(u,Xe=Ni(0,Xe=Ji(Wt,Xe),1),1),Xe=R(),null!==u&&(Ac(u,1,Xe),Dk(u,Xe))}function W(u,Xe,Wt){if(3===u.tag)Xk(u,u,Wt);else for(;null!==Xe;){if(3===Xe.tag){Xk(Xe,u,Wt);break}if(1===Xe.tag){var In=Xe.stateNode;if("function"==typeof Xe.type.getDerivedStateFromError||"function"==typeof In.componentDidCatch&&(null===Gm||!Gm.has(In))){Xe=nh(Xe,u=Qi(Xe,u=Ji(Wt,u),1),1),u=R(),null!==Xe&&(Ac(Xe,1,u),Dk(Xe,u));break}}Xe=Xe.return}}function Ti(u,Xe,Wt){var In=u.pingCache;null!==In&&In.delete(Xe),Xe=R(),u.pingedLanes|=u.suspendedLanes&Wt,Mm===u&&(zm&Wt)===Wt&&(4===Dm||3===Dm&&(130023424&zm)===zm&&500>nu()-$m?Kk(u,0):Nm|=Wt),Dk(u,Xe)}function Yk(u,Xe){0===Xe&&(1&u.mode?(Xe=Uu,!(130023424&(Uu<<=1))&&(Uu=4194304)):Xe=1);var Wt=R();null!==(u=ih(u,Xe))&&(Ac(u,Xe,Wt),Dk(u,Wt))}function uj(u){var Xe=u.memoizedState,Wt=0;null!==Xe&&(Wt=Xe.retryLane),Yk(u,Wt)}function bk(u,Xe){var Wt=0;switch(u.tag){case 13:var In=u.stateNode,fr=u.memoizedState;null!==fr&&(Wt=fr.retryLane);break;case 19:In=u.stateNode;break;default:throw Error(p(314))}null!==In&&In.delete(Xe),Yk(u,Wt)}function Fk(u,Xe){return gc(u,Xe)}function $k(u,Xe,Wt,In){this.tag=u,this.key=Wt,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=Xe,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=In,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(u,Xe,Wt,In){return new $k(u,Xe,Wt,In)}function aj(u){return!(!(u=u.prototype)||!u.isReactComponent)}function Pg(u,Xe){var Wt=u.alternate;return null===Wt?((Wt=Bg(u.tag,Xe,u.key,u.mode)).elementType=u.elementType,Wt.type=u.type,Wt.stateNode=u.stateNode,Wt.alternate=u,u.alternate=Wt):(Wt.pendingProps=Xe,Wt.type=u.type,Wt.flags=0,Wt.subtreeFlags=0,Wt.deletions=null),Wt.flags=14680064&u.flags,Wt.childLanes=u.childLanes,Wt.lanes=u.lanes,Wt.child=u.child,Wt.memoizedProps=u.memoizedProps,Wt.memoizedState=u.memoizedState,Wt.updateQueue=u.updateQueue,Xe=u.dependencies,Wt.dependencies=null===Xe?null:{lanes:Xe.lanes,firstContext:Xe.firstContext},Wt.sibling=u.sibling,Wt.index=u.index,Wt.ref=u.ref,Wt}function Rg(u,Xe,Wt,In,fr,_r){var wr=2;if(In=u,"function"==typeof u)aj(u)&&(wr=1);else if("string"==typeof u)wr=5;else e:switch(u){case xo:return Tg(Wt.children,fr,_r,Xe);case ko:wr=8,fr|=8;break;case Co:return(u=Bg(12,Wt,Xe,2|fr)).elementType=Co,u.lanes=_r,u;case ca:return(u=Bg(13,Wt,Xe,fr)).elementType=ca,u.lanes=_r,u;case ua:return(u=Bg(19,Wt,Xe,fr)).elementType=ua,u.lanes=_r,u;case yl:return pj(Wt,fr,_r,Xe);default:if("object"==typeof u&&null!==u)switch(u.$$typeof){case Io:wr=10;break e;case zo:wr=9;break e;case Bo:wr=11;break e;case Da:wr=14;break e;case ns:wr=16,In=null;break e}throw Error(p(130,null==u?u:typeof u,""))}return(Xe=Bg(wr,Wt,Xe,fr)).elementType=u,Xe.type=In,Xe.lanes=_r,Xe}function Tg(u,Xe,Wt,In){return(u=Bg(7,u,In,Xe)).lanes=Wt,u}function pj(u,Xe,Wt,In){return(u=Bg(22,u,In,Xe)).elementType=yl,u.lanes=Wt,u.stateNode={isHidden:!1},u}function Qg(u,Xe,Wt){return(u=Bg(6,u,null,Xe)).lanes=Wt,u}function Sg(u,Xe,Wt){return(Xe=Bg(4,null!==u.children?u.children:[],u.key,Xe)).lanes=Wt,Xe.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},Xe}function al(u,Xe,Wt,In,fr){this.tag=Xe,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=In,this.onRecoverableError=fr,this.mutableSourceEagerHydrationData=null}function bl(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){return u=new al(u,Xe,Wt,Ar,Kr),1===Xe?(Xe=1,!0===_r&&(Xe|=8)):Xe=0,_r=Bg(3,null,null,Xe),u.current=_r,_r.stateNode=u,_r.memoizedState={element:In,isDehydrated:Wt,cache:null,transitions:null,pendingSuspenseBoundaries:null},kh(_r),u}function dl(u){if(!u)return Hp;e:{if(Vb(u=u._reactInternals)!==u||1!==u.tag)throw Error(p(170));var Xe=u;do{switch(Xe.tag){case 3:Xe=Xe.stateNode.context;break e;case 1:if(Zf(Xe.type)){Xe=Xe.stateNode.__reactInternalMemoizedMergedChildContext;break e}}Xe=Xe.return}while(null!==Xe);throw Error(p(171))}if(1===u.tag){var Wt=u.type;if(Zf(Wt))return bg(u,Wt,Xe)}return Xe}function el(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){return(u=bl(Wt,In,!0,u,0,_r,0,Ar,Kr)).context=dl(null),Wt=u.current,(_r=mh(In=R(),fr=yi(Wt))).callback=null!=Xe?Xe:null,nh(Wt,_r,fr),u.current.lanes=fr,Ac(u,fr,In),Dk(u,In),u}function fl(u,Xe,Wt,In){var fr=Xe.current,_r=R(),wr=yi(fr);return Wt=dl(Wt),null===Xe.context?Xe.context=Wt:Xe.pendingContext=Wt,(Xe=mh(_r,wr)).payload={element:u},null!==(In=void 0===In?null:In)&&(Xe.callback=In),null!==(u=nh(fr,Xe,wr))&&(gi(u,fr,wr,_r),oh(u,fr,wr)),wr}function gl(u){return(u=u.current).child?(u.child.tag,u.child.stateNode):null}function hl(u,Xe){if(null!==(u=u.memoizedState)&&null!==u.dehydrated){var Wt=u.retryLane;u.retryLane=0!==Wt&&Wt<Xe?Wt:Xe}}function il(u,Xe){hl(u,Xe),(u=u.alternate)&&hl(u,Xe)}Am=function(u,Xe,Wt){if(null!==u)if(u.memoizedProps!==Xe.pendingProps||Kp.current)hm=!0;else{if(!(u.lanes&Wt||128&Xe.flags))return hm=!1,function yj(u,Xe,Wt){switch(Xe.tag){case 3:kj(Xe),Ig();break;case 5:Ah(Xe);break;case 1:Zf(Xe.type)&&cg(Xe);break;case 4:yh(Xe,Xe.stateNode.containerInfo);break;case 10:var In=Xe.type._context,fr=Xe.memoizedProps.value;G(kf,In._currentValue),In._currentValue=fr;break;case 13:if(null!==(In=Xe.memoizedState))return null!==In.dehydrated?(G(Vf,1&Vf.current),Xe.flags|=128,null):Wt&Xe.child.childLanes?oj(u,Xe,Wt):(G(Vf,1&Vf.current),null!==(u=Zi(u,Xe,Wt))?u.sibling:null);G(Vf,1&Vf.current);break;case 19:if(In=!!(Wt&Xe.childLanes),128&u.flags){if(In)return xj(u,Xe,Wt);Xe.flags|=128}if(null!==(fr=Xe.memoizedState)&&(fr.rendering=null,fr.tail=null,fr.lastEffect=null),G(Vf,Vf.current),In)break;return null;case 22:case 23:return Xe.lanes=0,dj(u,Xe,Wt)}return Zi(u,Xe,Wt)}(u,Xe,Wt);hm=!!(131072&u.flags)}else hm=!1,yf&&1048576&Xe.flags&&ug(Xe,af,Xe.index);switch(Xe.lanes=0,Xe.tag){case 2:var In=Xe.type;ij(u,Xe),u=Xe.pendingProps;var fr=Yf(Xe,Gp.current);ch(Xe,Wt),fr=Nh(null,Xe,In,u,fr,Wt);var _r=Sh();return Xe.flags|=1,"object"==typeof fr&&null!==fr&&"function"==typeof fr.render&&void 0===fr.$$typeof?(Xe.tag=1,Xe.memoizedState=null,Xe.updateQueue=null,Zf(In)?(_r=!0,cg(Xe)):_r=!1,Xe.memoizedState=null!==fr.state&&void 0!==fr.state?fr.state:null,kh(Xe),fr.updater=cm,Xe.stateNode=fr,fr._reactInternals=Xe,Ii(Xe,In,u,Wt),Xe=jj(null,Xe,In,!0,_r,Wt)):(Xe.tag=0,yf&&_r&&vg(Xe),Xi(null,Xe,fr,Wt),Xe=Xe.child),Xe;case 16:In=Xe.elementType;e:{switch(ij(u,Xe),u=Xe.pendingProps,In=(fr=In._init)(In._payload),Xe.type=In,fr=Xe.tag=function Zk(u){if("function"==typeof u)return aj(u)?1:0;if(null!=u){if((u=u.$$typeof)===Bo)return 11;if(u===Da)return 14}return 2}(In),u=Ci(In,u),fr){case 0:Xe=cj(null,Xe,In,u,Wt);break e;case 1:Xe=hj(null,Xe,In,u,Wt);break e;case 11:Xe=Yi(null,Xe,In,u,Wt);break e;case 14:Xe=$i(null,Xe,In,Ci(In.type,u),Wt);break e}throw Error(p(306,In,""))}return Xe;case 0:return In=Xe.type,fr=Xe.pendingProps,cj(u,Xe,In,fr=Xe.elementType===In?fr:Ci(In,fr),Wt);case 1:return In=Xe.type,fr=Xe.pendingProps,hj(u,Xe,In,fr=Xe.elementType===In?fr:Ci(In,fr),Wt);case 3:e:{if(kj(Xe),null===u)throw Error(p(387));In=Xe.pendingProps,fr=(_r=Xe.memoizedState).element,lh(u,Xe),qh(Xe,In,null,Wt);var wr=Xe.memoizedState;if(In=wr.element,_r.isDehydrated){if(_r={element:In,isDehydrated:!1,cache:wr.cache,pendingSuspenseBoundaries:wr.pendingSuspenseBoundaries,transitions:wr.transitions},Xe.updateQueue.baseState=_r,Xe.memoizedState=_r,256&Xe.flags){Xe=lj(u,Xe,In,Wt,fr=Ji(Error(p(423)),Xe));break e}if(In!==fr){Xe=lj(u,Xe,In,Wt,fr=Ji(Error(p(424)),Xe));break e}for(gf=Lf(Xe.stateNode.containerInfo.firstChild),mf=Xe,yf=!0,_f=null,Wt=Sf(Xe,null,In,Wt),Xe.child=Wt;Wt;)Wt.flags=-3&Wt.flags|4096,Wt=Wt.sibling}else{if(Ig(),In===fr){Xe=Zi(u,Xe,Wt);break e}Xi(u,Xe,In,Wt)}Xe=Xe.child}return Xe;case 5:return Ah(Xe),null===u&&Eg(Xe),In=Xe.type,fr=Xe.pendingProps,_r=null!==u?u.memoizedProps:null,wr=fr.children,Ef(In,fr)?wr=null:null!==_r&&Ef(In,_r)&&(Xe.flags|=32),gj(u,Xe),Xi(u,Xe,wr,Wt),Xe.child;case 6:return null===u&&Eg(Xe),null;case 13:return oj(u,Xe,Wt);case 4:return yh(Xe,Xe.stateNode.containerInfo),In=Xe.pendingProps,null===u?Xe.child=xf(Xe,null,In,Wt):Xi(u,Xe,In,Wt),Xe.child;case 11:return In=Xe.type,fr=Xe.pendingProps,Yi(u,Xe,In,fr=Xe.elementType===In?fr:Ci(In,fr),Wt);case 7:return Xi(u,Xe,Xe.pendingProps,Wt),Xe.child;case 8:case 12:return Xi(u,Xe,Xe.pendingProps.children,Wt),Xe.child;case 10:e:{if(In=Xe.type._context,fr=Xe.pendingProps,_r=Xe.memoizedProps,wr=fr.value,G(kf,In._currentValue),In._currentValue=wr,null!==_r)if(cp(_r.value,wr)){if(_r.children===fr.children&&!Kp.current){Xe=Zi(u,Xe,Wt);break e}}else for(null!==(_r=Xe.child)&&(_r.return=Xe);null!==_r;){var Ar=_r.dependencies;if(null!==Ar){wr=_r.child;for(var Kr=Ar.firstContext;null!==Kr;){if(Kr.context===In){if(1===_r.tag){(Kr=mh(-1,Wt&-Wt)).tag=2;var no=_r.updateQueue;if(null!==no){var io=(no=no.shared).pending;null===io?Kr.next=Kr:(Kr.next=io.next,io.next=Kr),no.pending=Kr}}_r.lanes|=Wt,null!==(Kr=_r.alternate)&&(Kr.lanes|=Wt),bh(_r.return,Wt,Xe),Ar.lanes|=Wt;break}Kr=Kr.next}}else if(10===_r.tag)wr=_r.type===Xe.type?null:_r.child;else if(18===_r.tag){if(null===(wr=_r.return))throw Error(p(341));wr.lanes|=Wt,null!==(Ar=wr.alternate)&&(Ar.lanes|=Wt),bh(wr,Wt,Xe),wr=_r.sibling}else wr=_r.child;if(null!==wr)wr.return=_r;else for(wr=_r;null!==wr;){if(wr===Xe){wr=null;break}if(null!==(_r=wr.sibling)){_r.return=wr.return,wr=_r;break}wr=wr.return}_r=wr}Xi(u,Xe,fr.children,Wt),Xe=Xe.child}return Xe;case 9:return fr=Xe.type,In=Xe.pendingProps.children,ch(Xe,Wt),In=In(fr=eh(fr)),Xe.flags|=1,Xi(u,Xe,In,Wt),Xe.child;case 14:return fr=Ci(In=Xe.type,Xe.pendingProps),$i(u,Xe,In,fr=Ci(In.type,fr),Wt);case 15:return bj(u,Xe,Xe.type,Xe.pendingProps,Wt);case 17:return In=Xe.type,fr=Xe.pendingProps,fr=Xe.elementType===In?fr:Ci(In,fr),ij(u,Xe),Xe.tag=1,Zf(In)?(u=!0,cg(Xe)):u=!1,ch(Xe,Wt),Gi(Xe,In,fr),Ii(Xe,In,fr,Wt),jj(null,Xe,In,!0,u,Wt);case 19:return xj(u,Xe,Wt);case 22:return dj(u,Xe,Wt)}throw Error(p(156,Xe.tag))};var rg="function"==typeof reportError?reportError:function(u){console.error(u)};function ll(u){this._internalRoot=u}function ml(u){this._internalRoot=u}function nl(u){return!(!u||1!==u.nodeType&&9!==u.nodeType&&11!==u.nodeType)}function ol(u){return!(!u||1!==u.nodeType&&9!==u.nodeType&&11!==u.nodeType&&(8!==u.nodeType||" react-mount-point-unstable "!==u.nodeValue))}function pl(){}function rl(u,Xe,Wt,In,fr){var _r=Wt._reactRootContainer;if(_r){var wr=_r;if("function"==typeof fr){var Ar=fr;fr=function(){var u=gl(wr);Ar.call(u)}}fl(Xe,wr,u,fr)}else wr=function ql(u,Xe,Wt,In,fr){if(fr){if("function"==typeof In){var _r=In;In=function(){var u=gl(wr);_r.call(u)}}var wr=el(Xe,In,u,0,null,!1,0,"",pl);return u._reactRootContainer=wr,u[Vp]=wr.current,sf(8===u.nodeType?u.parentNode:u),Rk(),wr}for(;fr=u.lastChild;)u.removeChild(fr);if("function"==typeof In){var Ar=In;In=function(){var u=gl(Kr);Ar.call(u)}}var Kr=bl(u,0,!1,null,0,!1,0,"",pl);return u._reactRootContainer=Kr,u[Vp]=Kr.current,sf(8===u.nodeType?u.parentNode:u),Rk((function(){fl(Xe,Kr,Wt,In)})),Kr}(Wt,Xe,u,fr,In);return gl(wr)}ml.prototype.render=ll.prototype.render=function(u){var Xe=this._internalRoot;if(null===Xe)throw Error(p(409));fl(u,Xe,null,null)},ml.prototype.unmount=ll.prototype.unmount=function(){var u=this._internalRoot;if(null!==u){this._internalRoot=null;var Xe=u.containerInfo;Rk((function(){fl(null,u,null,null)})),Xe[Vp]=null}},ml.prototype.unstable_scheduleHydration=function(u){if(u){var Xe=ld();u={blockedOn:null,target:u,priority:Xe};for(var Wt=0;Wt<wd.length&&0!==Xe&&Xe<wd[Wt].priority;Wt++);wd.splice(Wt,0,u),0===Wt&&Vc(u)}},td=function(u){switch(u.tag){case 3:var Xe=u.stateNode;if(Xe.current.memoizedState.isDehydrated){var Wt=tc(Xe.pendingLanes);0!==Wt&&(Cc(Xe,1|Wt),Dk(Xe,nu()),!(6&Im)&&(Wm=nu()+500,jg()))}break;case 13:Rk((function(){var Xe=ih(u,1);if(null!==Xe){var Wt=R();gi(Xe,u,1,Wt)}})),il(u,1)}},id=function(u){if(13===u.tag){var Xe=ih(u,134217728);if(null!==Xe)gi(Xe,u,134217728,R());il(u,134217728)}},sd=function(u){if(13===u.tag){var Xe=yi(u),Wt=ih(u,Xe);if(null!==Wt)gi(Wt,u,Xe,R());il(u,Xe)}},ld=function(){return qu},cd=function(u,Xe){var Wt=qu;try{return qu=u,Xe()}finally{qu=Wt}},$l=function(u,Xe,Wt){switch(Xe){case"input":if(bb(u,Wt),Xe=Wt.name,"radio"===Wt.type&&null!=Xe){for(Wt=u;Wt.parentNode;)Wt=Wt.parentNode;for(Wt=Wt.querySelectorAll("input[name="+JSON.stringify(""+Xe)+'][type="radio"]'),Xe=0;Xe<Wt.length;Xe++){var In=Wt[Xe];if(In!==u&&In.form===u.form){var fr=Db(In);if(!fr)throw Error(p(90));Wa(In),bb(In,fr)}}}break;case"textarea":ib(u,Wt);break;case"select":null!=(Xe=Wt.value)&&fb(u,!!Wt.multiple,Xe,!1)}},Gb=Qk,Hb=Rk;var og={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Qk]},sg={findFiberByHostInstance:Wc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},lg={bundleType:sg.bundleType,version:sg.version,rendererPackageName:sg.rendererPackageName,rendererConfig:sg.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:co.ReactCurrentDispatcher,findHostInstanceByFiber:function(u){return null===(u=Zb(u))?null:u.stateNode},findFiberByHostInstance:sg.findFiberByHostInstance||function jl(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var pg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pg.isDisabled&&pg.supportsFiber)try{zu=pg.inject(lg),Lu=pg}catch(Ll){}}Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=og,Xe.createPortal=function(u,Xe){var Wt=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nl(Xe))throw Error(p(200));return function cl(u,Xe,Wt){var In=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:go,key:null==In?null:""+In,children:u,containerInfo:Xe,implementation:Wt}}(u,Xe,null,Wt)},Xe.createRoot=function(u,Xe){if(!nl(u))throw Error(p(299));var Wt=!1,In="",fr=rg;return null!=Xe&&(!0===Xe.unstable_strictMode&&(Wt=!0),void 0!==Xe.identifierPrefix&&(In=Xe.identifierPrefix),void 0!==Xe.onRecoverableError&&(fr=Xe.onRecoverableError)),Xe=bl(u,1,!1,null,0,Wt,0,In,fr),u[Vp]=Xe.current,sf(8===u.nodeType?u.parentNode:u),new ll(Xe)},Xe.findDOMNode=function(u){if(null==u)return null;if(1===u.nodeType)return u;var Xe=u._reactInternals;if(void 0===Xe){if("function"==typeof u.render)throw Error(p(188));throw u=Object.keys(u).join(","),Error(p(268,u))}return u=null===(u=Zb(Xe))?null:u.stateNode},Xe.flushSync=function(u){return Rk(u)},Xe.hydrate=function(u,Xe,Wt){if(!ol(Xe))throw Error(p(200));return rl(null,u,Xe,!0,Wt)},Xe.hydrateRoot=function(u,Xe,Wt){if(!nl(u))throw Error(p(405));var In=null!=Wt&&Wt.hydratedSources||null,fr=!1,_r="",wr=rg;if(null!=Wt&&(!0===Wt.unstable_strictMode&&(fr=!0),void 0!==Wt.identifierPrefix&&(_r=Wt.identifierPrefix),void 0!==Wt.onRecoverableError&&(wr=Wt.onRecoverableError)),Xe=el(Xe,null,u,1,null!=Wt?Wt:null,fr,0,_r,wr),u[Vp]=Xe.current,sf(u),In)for(u=0;u<In.length;u++)fr=(fr=(Wt=In[u])._getVersion)(Wt._source),null==Xe.mutableSourceEagerHydrationData?Xe.mutableSourceEagerHydrationData=[Wt,fr]:Xe.mutableSourceEagerHydrationData.push(Wt,fr);return new ml(Xe)},Xe.render=function(u,Xe,Wt){if(!ol(Xe))throw Error(p(200));return rl(null,u,Xe,!1,Wt)},Xe.unmountComponentAtNode=function(u){if(!ol(u))throw Error(p(40));return!!u._reactRootContainer&&(Rk((function(){rl(null,null,u,!1,(function(){u._reactRootContainer=null,u[Vp]=null}))})),!0)},Xe.unstable_batchedUpdates=Qk,Xe.unstable_renderSubtreeIntoContainer=function(u,Xe,Wt,In){if(!ol(Wt))throw Error(p(200));if(null==u||void 0===u._reactInternals)throw Error(p(38));return rl(u,Xe,Wt,!1,In)},Xe.version="18.3.1-next-f1338f8080-20240426"},5338:function(u,Xe,Wt){"use strict";var In=Wt(961);Xe.H=In.createRoot,In.hydrateRoot},961:function(u,Xe,Wt){"use strict";!function checkDCE(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(u){console.error(u)}}(),u.exports=Wt(2551)},6027:function(u,Xe,Wt){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Object.defineProperty(Xe,"DraggableCore",{enumerable:!0,get:function(){return io.default}}),Xe.default=void 0;var In=function _interopRequireWildcard(u,Xe){if(!Xe&&u&&u.__esModule)return u;if(null===u||"object"!=typeof u&&"function"!=typeof u)return{default:u};var Wt=_getRequireWildcardCache(Xe);if(Wt&&Wt.has(u))return Wt.get(u);var In={},fr=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _r in u)if("default"!==_r&&Object.prototype.hasOwnProperty.call(u,_r)){var wr=fr?Object.getOwnPropertyDescriptor(u,_r):null;wr&&(wr.get||wr.set)?Object.defineProperty(In,_r,wr):In[_r]=u[_r]}In.default=u,Wt&&Wt.set(u,In);return In}(Wt(6540)),fr=_interopRequireDefault(Wt(5556)),_r=_interopRequireDefault(Wt(961)),wr=_interopRequireDefault(Wt(1508)),Ar=Wt(1089),Kr=Wt(1726),no=Wt(7056),io=_interopRequireDefault(Wt(6888)),oo=_interopRequireDefault(Wt(8696));function _interopRequireDefault(u){return u&&u.__esModule?u:{default:u}}function _getRequireWildcardCache(u){if("function"!=typeof WeakMap)return null;var Xe=new WeakMap,Wt=new WeakMap;return(_getRequireWildcardCache=function(u){return u?Wt:Xe})(u)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(u){for(var Xe=1;Xe<arguments.length;Xe++){var Wt=arguments[Xe];for(var In in Wt)Object.prototype.hasOwnProperty.call(Wt,In)&&(u[In]=Wt[In])}return u},_extends.apply(this,arguments)}function _defineProperty(u,Xe,Wt){return(Xe=function _toPropertyKey(u){var Xe=function _toPrimitive(u,Xe){if("object"!=typeof u||null===u)return u;var Wt=u[Symbol.toPrimitive];if(void 0!==Wt){var In=Wt.call(u,Xe||"default");if("object"!=typeof In)return In;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===Xe?String:Number)(u)}(u,"string");return"symbol"==typeof Xe?Xe:String(Xe)}(Xe))in u?Object.defineProperty(u,Xe,{value:Wt,enumerable:!0,configurable:!0,writable:!0}):u[Xe]=Wt,u}class Draggable extends In.Component{static getDerivedStateFromProps(u,Xe){let{position:Wt}=u,{prevPropsPosition:In}=Xe;return!Wt||In&&Wt.x===In.x&&Wt.y===In.y?null:((0,oo.default)("Draggable: getDerivedStateFromProps %j",{position:Wt,prevPropsPosition:In}),{x:Wt.x,y:Wt.y,prevPropsPosition:{...Wt}})}constructor(u){super(u),_defineProperty(this,"onDragStart",((u,Xe)=>{(0,oo.default)("Draggable: onDragStart: %j",Xe);if(!1===this.props.onStart(u,(0,Kr.createDraggableData)(this,Xe)))return!1;this.setState({dragging:!0,dragged:!0})})),_defineProperty(this,"onDrag",((u,Xe)=>{if(!this.state.dragging)return!1;(0,oo.default)("Draggable: onDrag: %j",Xe);const Wt=(0,Kr.createDraggableData)(this,Xe),In={x:Wt.x,y:Wt.y,slackX:0,slackY:0};if(this.props.bounds){const{x:u,y:Xe}=In;In.x+=this.state.slackX,In.y+=this.state.slackY;const[fr,_r]=(0,Kr.getBoundPosition)(this,In.x,In.y);In.x=fr,In.y=_r,In.slackX=this.state.slackX+(u-In.x),In.slackY=this.state.slackY+(Xe-In.y),Wt.x=In.x,Wt.y=In.y,Wt.deltaX=In.x-this.state.x,Wt.deltaY=In.y-this.state.y}if(!1===this.props.onDrag(u,Wt))return!1;this.setState(In)})),_defineProperty(this,"onDragStop",((u,Xe)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(u,(0,Kr.createDraggableData)(this,Xe)))return!1;(0,oo.default)("Draggable: onDragStop: %j",Xe);const Wt={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:u,y:Xe}=this.props.position;Wt.x=u,Wt.y=Xe}this.setState(Wt)})),this.state={dragging:!1,dragged:!1,x:u.position?u.position.x:u.defaultPosition.x,y:u.position?u.position.y:u.defaultPosition.y,prevPropsPosition:{...u.position},slackX:0,slackY:0,isElementSVG:!1},!u.position||u.onDrag||u.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var u,Xe;return null!==(u=null===(Xe=this.props)||void 0===Xe||null===(Xe=Xe.nodeRef)||void 0===Xe?void 0:Xe.current)&&void 0!==u?u:_r.default.findDOMNode(this)}render(){const{axis:u,bounds:Xe,children:Wt,defaultPosition:fr,defaultClassName:_r,defaultClassNameDragging:no,defaultClassNameDragged:oo,position:ao,positionOffset:so,scale:co,...ho}=this.props;let go={},xo=null;const ko=!Boolean(ao)||this.state.dragging,Co=ao||fr,Io={x:(0,Kr.canDragX)(this)&&ko?this.state.x:Co.x,y:(0,Kr.canDragY)(this)&&ko?this.state.y:Co.y};this.state.isElementSVG?xo=(0,Ar.createSVGTransform)(Io,so):go=(0,Ar.createCSSTransform)(Io,so);const zo=(0,wr.default)(Wt.props.className||"",_r,{[no]:this.state.dragging,[oo]:this.state.dragged});return In.createElement(io.default,_extends({},ho,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),In.cloneElement(In.Children.only(Wt),{className:zo,style:{...Wt.props.style,...go},transform:xo}))}}Xe.default=Draggable,_defineProperty(Draggable,"displayName","Draggable"),_defineProperty(Draggable,"propTypes",{...io.default.propTypes,axis:fr.default.oneOf(["both","x","y","none"]),bounds:fr.default.oneOfType([fr.default.shape({left:fr.default.number,right:fr.default.number,top:fr.default.number,bottom:fr.default.number}),fr.default.string,fr.default.oneOf([!1])]),defaultClassName:fr.default.string,defaultClassNameDragging:fr.default.string,defaultClassNameDragged:fr.default.string,defaultPosition:fr.default.shape({x:fr.default.number,y:fr.default.number}),positionOffset:fr.default.shape({x:fr.default.oneOfType([fr.default.number,fr.default.string]),y:fr.default.oneOfType([fr.default.number,fr.default.string])}),position:fr.default.shape({x:fr.default.number,y:fr.default.number}),className:no.dontSetMe,style:no.dontSetMe,transform:no.dontSetMe}),_defineProperty(Draggable,"defaultProps",{...io.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})},6888:function(u,Xe,Wt){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.default=void 0;var In=function _interopRequireWildcard(u,Xe){if(!Xe&&u&&u.__esModule)return u;if(null===u||"object"!=typeof u&&"function"!=typeof u)return{default:u};var Wt=_getRequireWildcardCache(Xe);if(Wt&&Wt.has(u))return Wt.get(u);var In={},fr=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _r in u)if("default"!==_r&&Object.prototype.hasOwnProperty.call(u,_r)){var wr=fr?Object.getOwnPropertyDescriptor(u,_r):null;wr&&(wr.get||wr.set)?Object.defineProperty(In,_r,wr):In[_r]=u[_r]}In.default=u,Wt&&Wt.set(u,In);return In}(Wt(6540)),fr=_interopRequireDefault(Wt(5556)),_r=_interopRequireDefault(Wt(961)),wr=Wt(1089),Ar=Wt(1726),Kr=Wt(7056),no=_interopRequireDefault(Wt(8696));function _interopRequireDefault(u){return u&&u.__esModule?u:{default:u}}function _getRequireWildcardCache(u){if("function"!=typeof WeakMap)return null;var Xe=new WeakMap,Wt=new WeakMap;return(_getRequireWildcardCache=function(u){return u?Wt:Xe})(u)}function _defineProperty(u,Xe,Wt){return(Xe=function _toPropertyKey(u){var Xe=function _toPrimitive(u,Xe){if("object"!=typeof u||null===u)return u;var Wt=u[Symbol.toPrimitive];if(void 0!==Wt){var In=Wt.call(u,Xe||"default");if("object"!=typeof In)return In;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===Xe?String:Number)(u)}(u,"string");return"symbol"==typeof Xe?Xe:String(Xe)}(Xe))in u?Object.defineProperty(u,Xe,{value:Wt,enumerable:!0,configurable:!0,writable:!0}):u[Xe]=Wt,u}const io={start:"touchstart",move:"touchmove",stop:"touchend"},oo={start:"mousedown",move:"mousemove",stop:"mouseup"};let ao=oo;class DraggableCore extends In.Component{constructor(){super(...arguments),_defineProperty(this,"dragging",!1),_defineProperty(this,"lastX",NaN),_defineProperty(this,"lastY",NaN),_defineProperty(this,"touchIdentifier",null),_defineProperty(this,"mounted",!1),_defineProperty(this,"handleDragStart",(u=>{if(this.props.onMouseDown(u),!this.props.allowAnyClick&&"number"==typeof u.button&&0!==u.button)return!1;const Xe=this.findDOMNode();if(!Xe||!Xe.ownerDocument||!Xe.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:Wt}=Xe;if(this.props.disabled||!(u.target instanceof Wt.defaultView.Node)||this.props.handle&&!(0,wr.matchesSelectorAndParentsTo)(u.target,this.props.handle,Xe)||this.props.cancel&&(0,wr.matchesSelectorAndParentsTo)(u.target,this.props.cancel,Xe))return;"touchstart"===u.type&&u.preventDefault();const In=(0,wr.getTouchIdentifier)(u);this.touchIdentifier=In;const fr=(0,Ar.getControlPosition)(u,In,this);if(null==fr)return;const{x:_r,y:Kr}=fr,io=(0,Ar.createCoreData)(this,_r,Kr);(0,no.default)("DraggableCore: handleDragStart: %j",io),(0,no.default)("calling",this.props.onStart);!1!==this.props.onStart(u,io)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,wr.addUserSelectStyles)(Wt),this.dragging=!0,this.lastX=_r,this.lastY=Kr,(0,wr.addEvent)(Wt,ao.move,this.handleDrag),(0,wr.addEvent)(Wt,ao.stop,this.handleDragStop))})),_defineProperty(this,"handleDrag",(u=>{const Xe=(0,Ar.getControlPosition)(u,this.touchIdentifier,this);if(null==Xe)return;let{x:Wt,y:In}=Xe;if(Array.isArray(this.props.grid)){let u=Wt-this.lastX,Xe=In-this.lastY;if([u,Xe]=(0,Ar.snapToGrid)(this.props.grid,u,Xe),!u&&!Xe)return;Wt=this.lastX+u,In=this.lastY+Xe}const fr=(0,Ar.createCoreData)(this,Wt,In);(0,no.default)("DraggableCore: handleDrag: %j",fr);if(!1!==this.props.onDrag(u,fr)&&!1!==this.mounted)this.lastX=Wt,this.lastY=In;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(u){const Xe=document.createEvent("MouseEvents");Xe.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(Xe)}})),_defineProperty(this,"handleDragStop",(u=>{if(!this.dragging)return;const Xe=(0,Ar.getControlPosition)(u,this.touchIdentifier,this);if(null==Xe)return;let{x:Wt,y:In}=Xe;if(Array.isArray(this.props.grid)){let u=Wt-this.lastX||0,Xe=In-this.lastY||0;[u,Xe]=(0,Ar.snapToGrid)(this.props.grid,u,Xe),Wt=this.lastX+u,In=this.lastY+Xe}const fr=(0,Ar.createCoreData)(this,Wt,In);if(!1===this.props.onStop(u,fr)||!1===this.mounted)return!1;const _r=this.findDOMNode();_r&&this.props.enableUserSelectHack&&(0,wr.removeUserSelectStyles)(_r.ownerDocument),(0,no.default)("DraggableCore: handleDragStop: %j",fr),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,_r&&((0,no.default)("DraggableCore: Removing handlers"),(0,wr.removeEvent)(_r.ownerDocument,ao.move,this.handleDrag),(0,wr.removeEvent)(_r.ownerDocument,ao.stop,this.handleDragStop))})),_defineProperty(this,"onMouseDown",(u=>(ao=oo,this.handleDragStart(u)))),_defineProperty(this,"onMouseUp",(u=>(ao=oo,this.handleDragStop(u)))),_defineProperty(this,"onTouchStart",(u=>(ao=io,this.handleDragStart(u)))),_defineProperty(this,"onTouchEnd",(u=>(ao=io,this.handleDragStop(u))))}componentDidMount(){this.mounted=!0;const u=this.findDOMNode();u&&(0,wr.addEvent)(u,io.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const u=this.findDOMNode();if(u){const{ownerDocument:Xe}=u;(0,wr.removeEvent)(Xe,oo.move,this.handleDrag),(0,wr.removeEvent)(Xe,io.move,this.handleDrag),(0,wr.removeEvent)(Xe,oo.stop,this.handleDragStop),(0,wr.removeEvent)(Xe,io.stop,this.handleDragStop),(0,wr.removeEvent)(u,io.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,wr.removeUserSelectStyles)(Xe)}}findDOMNode(){var u,Xe;return null!==(u=this.props)&&void 0!==u&&u.nodeRef?null===(Xe=this.props)||void 0===Xe||null===(Xe=Xe.nodeRef)||void 0===Xe?void 0:Xe.current:_r.default.findDOMNode(this)}render(){return In.cloneElement(In.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}Xe.default=DraggableCore,_defineProperty(DraggableCore,"displayName","DraggableCore"),_defineProperty(DraggableCore,"propTypes",{allowAnyClick:fr.default.bool,children:fr.default.node.isRequired,disabled:fr.default.bool,enableUserSelectHack:fr.default.bool,offsetParent:function(u,Xe){if(u[Xe]&&1!==u[Xe].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:fr.default.arrayOf(fr.default.number),handle:fr.default.string,cancel:fr.default.string,nodeRef:fr.default.object,onStart:fr.default.func,onDrag:fr.default.func,onStop:fr.default.func,onMouseDown:fr.default.func,scale:fr.default.number,className:Kr.dontSetMe,style:Kr.dontSetMe,transform:Kr.dontSetMe}),_defineProperty(DraggableCore,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},5794:function(u,Xe,Wt){"use strict";const{default:In,DraggableCore:fr}=Wt(6027);u.exports=In,u.exports.default=In,u.exports.DraggableCore=fr},1089:function(u,Xe,Wt){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.addClassName=addClassName,Xe.addEvent=function addEvent(u,Xe,Wt,In){if(!u)return;const fr={capture:!0,...In};u.addEventListener?u.addEventListener(Xe,Wt,fr):u.attachEvent?u.attachEvent("on"+Xe,Wt):u["on"+Xe]=Wt},Xe.addUserSelectStyles=function addUserSelectStyles(u){if(!u)return;let Xe=u.getElementById("react-draggable-style-el");Xe||(Xe=u.createElement("style"),Xe.type="text/css",Xe.id="react-draggable-style-el",Xe.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",Xe.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",u.getElementsByTagName("head")[0].appendChild(Xe));u.body&&addClassName(u.body,"react-draggable-transparent-selection")},Xe.createCSSTransform=function createCSSTransform(u,Xe){const Wt=getTranslation(u,Xe,"px");return{[(0,fr.browserPrefixToKey)("transform",fr.default)]:Wt}},Xe.createSVGTransform=function createSVGTransform(u,Xe){return getTranslation(u,Xe,"")},Xe.getTouch=function getTouch(u,Xe){return u.targetTouches&&(0,In.findInArray)(u.targetTouches,(u=>Xe===u.identifier))||u.changedTouches&&(0,In.findInArray)(u.changedTouches,(u=>Xe===u.identifier))},Xe.getTouchIdentifier=function getTouchIdentifier(u){if(u.targetTouches&&u.targetTouches[0])return u.targetTouches[0].identifier;if(u.changedTouches&&u.changedTouches[0])return u.changedTouches[0].identifier},Xe.getTranslation=getTranslation,Xe.innerHeight=function innerHeight(u){let Xe=u.clientHeight;const Wt=u.ownerDocument.defaultView.getComputedStyle(u);return Xe-=(0,In.int)(Wt.paddingTop),Xe-=(0,In.int)(Wt.paddingBottom),Xe},Xe.innerWidth=function innerWidth(u){let Xe=u.clientWidth;const Wt=u.ownerDocument.defaultView.getComputedStyle(u);return Xe-=(0,In.int)(Wt.paddingLeft),Xe-=(0,In.int)(Wt.paddingRight),Xe},Xe.matchesSelector=matchesSelector,Xe.matchesSelectorAndParentsTo=function matchesSelectorAndParentsTo(u,Xe,Wt){let In=u;do{if(matchesSelector(In,Xe))return!0;if(In===Wt)return!1;In=In.parentNode}while(In);return!1},Xe.offsetXYFromParent=function offsetXYFromParent(u,Xe,Wt){const In=Xe===Xe.ownerDocument.body?{left:0,top:0}:Xe.getBoundingClientRect(),fr=(u.clientX+Xe.scrollLeft-In.left)/Wt,_r=(u.clientY+Xe.scrollTop-In.top)/Wt;return{x:fr,y:_r}},Xe.outerHeight=function outerHeight(u){let Xe=u.clientHeight;const Wt=u.ownerDocument.defaultView.getComputedStyle(u);return Xe+=(0,In.int)(Wt.borderTopWidth),Xe+=(0,In.int)(Wt.borderBottomWidth),Xe},Xe.outerWidth=function outerWidth(u){let Xe=u.clientWidth;const Wt=u.ownerDocument.defaultView.getComputedStyle(u);return Xe+=(0,In.int)(Wt.borderLeftWidth),Xe+=(0,In.int)(Wt.borderRightWidth),Xe},Xe.removeClassName=removeClassName,Xe.removeEvent=function removeEvent(u,Xe,Wt,In){if(!u)return;const fr={capture:!0,...In};u.removeEventListener?u.removeEventListener(Xe,Wt,fr):u.detachEvent?u.detachEvent("on"+Xe,Wt):u["on"+Xe]=null},Xe.removeUserSelectStyles=function removeUserSelectStyles(u){if(!u)return;try{if(u.body&&removeClassName(u.body,"react-draggable-transparent-selection"),u.selection)u.selection.empty();else{const Xe=(u.defaultView||window).getSelection();Xe&&"Caret"!==Xe.type&&Xe.removeAllRanges()}}catch(u){}};var In=Wt(7056),fr=function _interopRequireWildcard(u,Xe){if(!Xe&&u&&u.__esModule)return u;if(null===u||"object"!=typeof u&&"function"!=typeof u)return{default:u};var Wt=_getRequireWildcardCache(Xe);if(Wt&&Wt.has(u))return Wt.get(u);var In={},fr=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _r in u)if("default"!==_r&&Object.prototype.hasOwnProperty.call(u,_r)){var wr=fr?Object.getOwnPropertyDescriptor(u,_r):null;wr&&(wr.get||wr.set)?Object.defineProperty(In,_r,wr):In[_r]=u[_r]}In.default=u,Wt&&Wt.set(u,In);return In}(Wt(3514));function _getRequireWildcardCache(u){if("function"!=typeof WeakMap)return null;var Xe=new WeakMap,Wt=new WeakMap;return(_getRequireWildcardCache=function(u){return u?Wt:Xe})(u)}let _r="";function matchesSelector(u,Xe){return _r||(_r=(0,In.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(Xe){return(0,In.isFunction)(u[Xe])}))),!!(0,In.isFunction)(u[_r])&&u[_r](Xe)}function getTranslation(u,Xe,Wt){let{x:In,y:fr}=u,_r="translate(".concat(In).concat(Wt,",").concat(fr).concat(Wt,")");if(Xe){const u="".concat("string"==typeof Xe.x?Xe.x:Xe.x+Wt),In="".concat("string"==typeof Xe.y?Xe.y:Xe.y+Wt);_r="translate(".concat(u,", ").concat(In,")")+_r}return _r}function addClassName(u,Xe){u.classList?u.classList.add(Xe):u.className.match(new RegExp("(?:^|\\s)".concat(Xe,"(?!\\S)")))||(u.className+=" ".concat(Xe))}function removeClassName(u,Xe){u.classList?u.classList.remove(Xe):u.className=u.className.replace(new RegExp("(?:^|\\s)".concat(Xe,"(?!\\S)"),"g"),"")}},3514:function(u,Xe){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.browserPrefixToKey=browserPrefixToKey,Xe.browserPrefixToStyle=function browserPrefixToStyle(u,Xe){return Xe?"-".concat(Xe.toLowerCase(),"-").concat(u):u},Xe.default=void 0,Xe.getPrefix=getPrefix;const Wt=["Moz","Webkit","O","ms"];function getPrefix(){var u;let Xe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const In=null===(u=window.document)||void 0===u||null===(u=u.documentElement)||void 0===u?void 0:u.style;if(!In)return"";if(Xe in In)return"";for(let u=0;u<Wt.length;u++)if(browserPrefixToKey(Xe,Wt[u])in In)return Wt[u];return""}function browserPrefixToKey(u,Xe){return Xe?"".concat(Xe).concat(function kebabToTitleCase(u){let Xe="",Wt=!0;for(let In=0;In<u.length;In++)Wt?(Xe+=u[In].toUpperCase(),Wt=!1):"-"===u[In]?Wt=!0:Xe+=u[In];return Xe}(u)):u}Xe.default=getPrefix()},8696:function(u,Xe){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.default=function log(){0}},1726:function(u,Xe,Wt){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.canDragX=function canDragX(u){return"both"===u.props.axis||"x"===u.props.axis},Xe.canDragY=function canDragY(u){return"both"===u.props.axis||"y"===u.props.axis},Xe.createCoreData=function createCoreData(u,Xe,Wt){const fr=!(0,In.isNum)(u.lastX),_r=findDOMNode(u);return fr?{node:_r,deltaX:0,deltaY:0,lastX:Xe,lastY:Wt,x:Xe,y:Wt}:{node:_r,deltaX:Xe-u.lastX,deltaY:Wt-u.lastY,lastX:u.lastX,lastY:u.lastY,x:Xe,y:Wt}},Xe.createDraggableData=function createDraggableData(u,Xe){const Wt=u.props.scale;return{node:Xe.node,x:u.state.x+Xe.deltaX/Wt,y:u.state.y+Xe.deltaY/Wt,deltaX:Xe.deltaX/Wt,deltaY:Xe.deltaY/Wt,lastX:u.state.x,lastY:u.state.y}},Xe.getBoundPosition=function getBoundPosition(u,Xe,Wt){if(!u.props.bounds)return[Xe,Wt];let{bounds:_r}=u.props;_r="string"==typeof _r?_r:function cloneBounds(u){return{left:u.left,top:u.top,right:u.right,bottom:u.bottom}}(_r);const wr=findDOMNode(u);if("string"==typeof _r){const{ownerDocument:u}=wr,Xe=u.defaultView;let Wt;if(Wt="parent"===_r?wr.parentNode:u.querySelector(_r),!(Wt instanceof Xe.HTMLElement))throw new Error('Bounds selector "'+_r+'" could not find an element.');const Ar=Wt,Kr=Xe.getComputedStyle(wr),no=Xe.getComputedStyle(Ar);_r={left:-wr.offsetLeft+(0,In.int)(no.paddingLeft)+(0,In.int)(Kr.marginLeft),top:-wr.offsetTop+(0,In.int)(no.paddingTop)+(0,In.int)(Kr.marginTop),right:(0,fr.innerWidth)(Ar)-(0,fr.outerWidth)(wr)-wr.offsetLeft+(0,In.int)(no.paddingRight)-(0,In.int)(Kr.marginRight),bottom:(0,fr.innerHeight)(Ar)-(0,fr.outerHeight)(wr)-wr.offsetTop+(0,In.int)(no.paddingBottom)-(0,In.int)(Kr.marginBottom)}}(0,In.isNum)(_r.right)&&(Xe=Math.min(Xe,_r.right));(0,In.isNum)(_r.bottom)&&(Wt=Math.min(Wt,_r.bottom));(0,In.isNum)(_r.left)&&(Xe=Math.max(Xe,_r.left));(0,In.isNum)(_r.top)&&(Wt=Math.max(Wt,_r.top));return[Xe,Wt]},Xe.getControlPosition=function getControlPosition(u,Xe,Wt){const In="number"==typeof Xe?(0,fr.getTouch)(u,Xe):null;if("number"==typeof Xe&&!In)return null;const _r=findDOMNode(Wt),wr=Wt.props.offsetParent||_r.offsetParent||_r.ownerDocument.body;return(0,fr.offsetXYFromParent)(In||u,wr,Wt.props.scale)},Xe.snapToGrid=function snapToGrid(u,Xe,Wt){const In=Math.round(Xe/u[0])*u[0],fr=Math.round(Wt/u[1])*u[1];return[In,fr]};var In=Wt(7056),fr=Wt(1089);function findDOMNode(u){const Xe=u.findDOMNode();if(!Xe)throw new Error("<DraggableCore>: Unmounted during event!");return Xe}},7056:function(u,Xe){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.dontSetMe=function dontSetMe(u,Xe,Wt){if(u[Xe])return new Error("Invalid prop ".concat(Xe," passed to ").concat(Wt," - do not set this, set it on the child."))},Xe.findInArray=function findInArray(u,Xe){for(let Wt=0,In=u.length;Wt<In;Wt++)if(Xe.apply(Xe,[u[Wt],Wt,u]))return u[Wt]},Xe.int=function int(u){return parseInt(u,10)},Xe.isFunction=function isFunction(u){return"function"==typeof u||"[object Function]"===Object.prototype.toString.call(u)},Xe.isNum=function isNum(u){return"number"==typeof u&&!isNaN(u)}},2799:function(u,Xe){"use strict";var Wt,In=Symbol.for("react.element"),fr=Symbol.for("react.portal"),_r=Symbol.for("react.fragment"),wr=Symbol.for("react.strict_mode"),Ar=Symbol.for("react.profiler"),Kr=Symbol.for("react.provider"),no=Symbol.for("react.context"),io=Symbol.for("react.server_context"),oo=Symbol.for("react.forward_ref"),ao=Symbol.for("react.suspense"),so=Symbol.for("react.suspense_list"),co=Symbol.for("react.memo"),ho=Symbol.for("react.lazy"),go=Symbol.for("react.offscreen");function v(u){if("object"==typeof u&&null!==u){var Xe=u.$$typeof;switch(Xe){case In:switch(u=u.type){case _r:case Ar:case wr:case ao:case so:return u;default:switch(u=u&&u.$$typeof){case io:case no:case oo:case ho:case co:case Kr:return u;default:return Xe}}case fr:return Xe}}}Wt=Symbol.for("react.module.reference"),Xe.ContextConsumer=no,Xe.ContextProvider=Kr,Xe.Element=In,Xe.ForwardRef=oo,Xe.Fragment=_r,Xe.Lazy=ho,Xe.Memo=co,Xe.Portal=fr,Xe.Profiler=Ar,Xe.StrictMode=wr,Xe.Suspense=ao,Xe.SuspenseList=so,Xe.isAsyncMode=function(){return!1},Xe.isConcurrentMode=function(){return!1},Xe.isContextConsumer=function(u){return v(u)===no},Xe.isContextProvider=function(u){return v(u)===Kr},Xe.isElement=function(u){return"object"==typeof u&&null!==u&&u.$$typeof===In},Xe.isForwardRef=function(u){return v(u)===oo},Xe.isFragment=function(u){return v(u)===_r},Xe.isLazy=function(u){return v(u)===ho},Xe.isMemo=function(u){return v(u)===co},Xe.isPortal=function(u){return v(u)===fr},Xe.isProfiler=function(u){return v(u)===Ar},Xe.isStrictMode=function(u){return v(u)===wr},Xe.isSuspense=function(u){return v(u)===ao},Xe.isSuspenseList=function(u){return v(u)===so},Xe.isValidElementType=function(u){return"string"==typeof u||"function"==typeof u||u===_r||u===Ar||u===wr||u===ao||u===so||u===go||"object"==typeof u&&null!==u&&(u.$$typeof===ho||u.$$typeof===co||u.$$typeof===Kr||u.$$typeof===no||u.$$typeof===oo||u.$$typeof===Wt||void 0!==u.getModuleId)},Xe.typeOf=v},4363:function(u,Xe,Wt){"use strict";u.exports=Wt(2799)},1020:function(u,Xe,Wt){"use strict";var In=Wt(6540),fr=Symbol.for("react.element"),_r=Symbol.for("react.fragment"),wr=Object.prototype.hasOwnProperty,Ar=In.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Kr={key:!0,ref:!0,__self:!0,__source:!0};function q(u,Xe,Wt){var In,_r={},no=null,io=null;for(In in void 0!==Wt&&(no=""+Wt),void 0!==Xe.key&&(no=""+Xe.key),void 0!==Xe.ref&&(io=Xe.ref),Xe)wr.call(Xe,In)&&!Kr.hasOwnProperty(In)&&(_r[In]=Xe[In]);if(u&&u.defaultProps)for(In in Xe=u.defaultProps)void 0===_r[In]&&(_r[In]=Xe[In]);return{$$typeof:fr,type:u,key:no,ref:io,props:_r,_owner:Ar.current}}Xe.Fragment=_r,Xe.jsx=q,Xe.jsxs=q},5287:function(u,Xe){"use strict";var Wt=Symbol.for("react.element"),In=Symbol.for("react.portal"),fr=Symbol.for("react.fragment"),_r=Symbol.for("react.strict_mode"),wr=Symbol.for("react.profiler"),Ar=Symbol.for("react.provider"),Kr=Symbol.for("react.context"),no=Symbol.for("react.forward_ref"),io=Symbol.for("react.suspense"),oo=Symbol.for("react.memo"),ao=Symbol.for("react.lazy"),so=Symbol.iterator;var co={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ho=Object.assign,go={};function E(u,Xe,Wt){this.props=u,this.context=Xe,this.refs=go,this.updater=Wt||co}function F(){}function G(u,Xe,Wt){this.props=u,this.context=Xe,this.refs=go,this.updater=Wt||co}E.prototype.isReactComponent={},E.prototype.setState=function(u,Xe){if("object"!=typeof u&&"function"!=typeof u&&null!=u)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,Xe,"setState")},E.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")},F.prototype=E.prototype;var xo=G.prototype=new F;xo.constructor=G,ho(xo,E.prototype),xo.isPureReactComponent=!0;var ko=Array.isArray,Co=Object.prototype.hasOwnProperty,Io={current:null},zo={key:!0,ref:!0,__self:!0,__source:!0};function M(u,Xe,In){var fr,_r={},wr=null,Ar=null;if(null!=Xe)for(fr in void 0!==Xe.ref&&(Ar=Xe.ref),void 0!==Xe.key&&(wr=""+Xe.key),Xe)Co.call(Xe,fr)&&!zo.hasOwnProperty(fr)&&(_r[fr]=Xe[fr]);var Kr=arguments.length-2;if(1===Kr)_r.children=In;else if(1<Kr){for(var no=Array(Kr),io=0;io<Kr;io++)no[io]=arguments[io+2];_r.children=no}if(u&&u.defaultProps)for(fr in Kr=u.defaultProps)void 0===_r[fr]&&(_r[fr]=Kr[fr]);return{$$typeof:Wt,type:u,key:wr,ref:Ar,props:_r,_owner:Io.current}}function O(u){return"object"==typeof u&&null!==u&&u.$$typeof===Wt}var Bo=/\/+/g;function Q(u,Xe){return"object"==typeof u&&null!==u&&null!=u.key?function escape(u){var Xe={"=":"=0",":":"=2"};return"$"+u.replace(/[=:]/g,(function(u){return Xe[u]}))}(""+u.key):Xe.toString(36)}function R(u,Xe,fr,_r,wr){var Ar=typeof u;"undefined"!==Ar&&"boolean"!==Ar||(u=null);var Kr=!1;if(null===u)Kr=!0;else switch(Ar){case"string":case"number":Kr=!0;break;case"object":switch(u.$$typeof){case Wt:case In:Kr=!0}}if(Kr)return wr=wr(Kr=u),u=""===_r?"."+Q(Kr,0):_r,ko(wr)?(fr="",null!=u&&(fr=u.replace(Bo,"$&/")+"/"),R(wr,Xe,fr,"",(function(u){return u}))):null!=wr&&(O(wr)&&(wr=function N(u,Xe){return{$$typeof:Wt,type:u.type,key:Xe,ref:u.ref,props:u.props,_owner:u._owner}}(wr,fr+(!wr.key||Kr&&Kr.key===wr.key?"":(""+wr.key).replace(Bo,"$&/")+"/")+u)),Xe.push(wr)),1;if(Kr=0,_r=""===_r?".":_r+":",ko(u))for(var no=0;no<u.length;no++){var io=_r+Q(Ar=u[no],no);Kr+=R(Ar,Xe,fr,io,wr)}else if(io=function A(u){return null===u||"object"!=typeof u?null:"function"==typeof(u=so&&u[so]||u["@@iterator"])?u:null}(u),"function"==typeof io)for(u=io.call(u),no=0;!(Ar=u.next()).done;)Kr+=R(Ar=Ar.value,Xe,fr,io=_r+Q(Ar,no++),wr);else if("object"===Ar)throw Xe=String(u),Error("Objects are not valid as a React child (found: "+("[object Object]"===Xe?"object with keys {"+Object.keys(u).join(", ")+"}":Xe)+"). If you meant to render a collection of children, use an array instead.");return Kr}function S(u,Xe,Wt){if(null==u)return u;var In=[],fr=0;return R(u,In,"","",(function(u){return Xe.call(Wt,u,fr++)})),In}function T(u){if(-1===u._status){var Xe=u._result;(Xe=Xe()).then((function(Xe){0!==u._status&&-1!==u._status||(u._status=1,u._result=Xe)}),(function(Xe){0!==u._status&&-1!==u._status||(u._status=2,u._result=Xe)})),-1===u._status&&(u._status=0,u._result=Xe)}if(1===u._status)return u._result.default;throw u._result}var ca={current:null},ua={transition:null},Da={ReactCurrentDispatcher:ca,ReactCurrentBatchConfig:ua,ReactCurrentOwner:Io};function X(){throw Error("act(...) is not supported in production builds of React.")}Xe.Children={map:S,forEach:function(u,Xe,Wt){S(u,(function(){Xe.apply(this,arguments)}),Wt)},count:function(u){var Xe=0;return S(u,(function(){Xe++})),Xe},toArray:function(u){return S(u,(function(u){return u}))||[]},only:function(u){if(!O(u))throw Error("React.Children.only expected to receive a single React element child.");return u}},Xe.Component=E,Xe.Fragment=fr,Xe.Profiler=wr,Xe.PureComponent=G,Xe.StrictMode=_r,Xe.Suspense=io,Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Da,Xe.act=X,Xe.cloneElement=function(u,Xe,In){if(null==u)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+u+".");var fr=ho({},u.props),_r=u.key,wr=u.ref,Ar=u._owner;if(null!=Xe){if(void 0!==Xe.ref&&(wr=Xe.ref,Ar=Io.current),void 0!==Xe.key&&(_r=""+Xe.key),u.type&&u.type.defaultProps)var Kr=u.type.defaultProps;for(no in Xe)Co.call(Xe,no)&&!zo.hasOwnProperty(no)&&(fr[no]=void 0===Xe[no]&&void 0!==Kr?Kr[no]:Xe[no])}var no=arguments.length-2;if(1===no)fr.children=In;else if(1<no){Kr=Array(no);for(var io=0;io<no;io++)Kr[io]=arguments[io+2];fr.children=Kr}return{$$typeof:Wt,type:u.type,key:_r,ref:wr,props:fr,_owner:Ar}},Xe.createContext=function(u){return(u={$$typeof:Kr,_currentValue:u,_currentValue2:u,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:Ar,_context:u},u.Consumer=u},Xe.createElement=M,Xe.createFactory=function(u){var Xe=M.bind(null,u);return Xe.type=u,Xe},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(u){return{$$typeof:no,render:u}},Xe.isValidElement=O,Xe.lazy=function(u){return{$$typeof:ao,_payload:{_status:-1,_result:u},_init:T}},Xe.memo=function(u,Xe){return{$$typeof:oo,type:u,compare:void 0===Xe?null:Xe}},Xe.startTransition=function(u){var Xe=ua.transition;ua.transition={};try{u()}finally{ua.transition=Xe}},Xe.unstable_act=X,Xe.useCallback=function(u,Xe){return ca.current.useCallback(u,Xe)},Xe.useContext=function(u){return ca.current.useContext(u)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(u){return ca.current.useDeferredValue(u)},Xe.useEffect=function(u,Xe){return ca.current.useEffect(u,Xe)},Xe.useId=function(){return ca.current.useId()},Xe.useImperativeHandle=function(u,Xe,Wt){return ca.current.useImperativeHandle(u,Xe,Wt)},Xe.useInsertionEffect=function(u,Xe){return ca.current.useInsertionEffect(u,Xe)},Xe.useLayoutEffect=function(u,Xe){return ca.current.useLayoutEffect(u,Xe)},Xe.useMemo=function(u,Xe){return ca.current.useMemo(u,Xe)},Xe.useReducer=function(u,Xe,Wt){return ca.current.useReducer(u,Xe,Wt)},Xe.useRef=function(u){return ca.current.useRef(u)},Xe.useState=function(u){return ca.current.useState(u)},Xe.useSyncExternalStore=function(u,Xe,Wt){return ca.current.useSyncExternalStore(u,Xe,Wt)},Xe.useTransition=function(){return ca.current.useTransition()},Xe.version="18.3.1"},6540:function(u,Xe,Wt){"use strict";u.exports=Wt(5287)},4848:function(u,Xe,Wt){"use strict";u.exports=Wt(1020)},7463:function(u,Xe){"use strict";function f(u,Xe){var Wt=u.length;u.push(Xe);e:for(;0<Wt;){var In=Wt-1>>>1,fr=u[In];if(!(0<g(fr,Xe)))break e;u[In]=Xe,u[Wt]=fr,Wt=In}}function h(u){return 0===u.length?null:u[0]}function k(u){if(0===u.length)return null;var Xe=u[0],Wt=u.pop();if(Wt!==Xe){u[0]=Wt;e:for(var In=0,fr=u.length,_r=fr>>>1;In<_r;){var wr=2*(In+1)-1,Ar=u[wr],Kr=wr+1,no=u[Kr];if(0>g(Ar,Wt))Kr<fr&&0>g(no,Ar)?(u[In]=no,u[Kr]=Wt,In=Kr):(u[In]=Ar,u[wr]=Wt,In=wr);else{if(!(Kr<fr&&0>g(no,Wt)))break e;u[In]=no,u[Kr]=Wt,In=Kr}}}return Xe}function g(u,Xe){var Wt=u.sortIndex-Xe.sortIndex;return 0!==Wt?Wt:u.id-Xe.id}if("object"==typeof performance&&"function"==typeof performance.now){var Wt=performance;Xe.unstable_now=function(){return Wt.now()}}else{var In=Date,fr=In.now();Xe.unstable_now=function(){return In.now()-fr}}var _r=[],wr=[],Ar=1,Kr=null,no=3,io=!1,oo=!1,ao=!1,so="function"==typeof setTimeout?setTimeout:null,co="function"==typeof clearTimeout?clearTimeout:null,ho="undefined"!=typeof setImmediate?setImmediate:null;function G(u){for(var Xe=h(wr);null!==Xe;){if(null===Xe.callback)k(wr);else{if(!(Xe.startTime<=u))break;k(wr),Xe.sortIndex=Xe.expirationTime,f(_r,Xe)}Xe=h(wr)}}function H(u){if(ao=!1,G(u),!oo)if(null!==h(_r))oo=!0,I(J);else{var Xe=h(wr);null!==Xe&&K(H,Xe.startTime-u)}}function J(u,Wt){oo=!1,ao&&(ao=!1,co(Co),Co=-1),io=!0;var In=no;try{for(G(Wt),Kr=h(_r);null!==Kr&&(!(Kr.expirationTime>Wt)||u&&!M());){var fr=Kr.callback;if("function"==typeof fr){Kr.callback=null,no=Kr.priorityLevel;var Ar=fr(Kr.expirationTime<=Wt);Wt=Xe.unstable_now(),"function"==typeof Ar?Kr.callback=Ar:Kr===h(_r)&&k(_r),G(Wt)}else k(_r);Kr=h(_r)}if(null!==Kr)var so=!0;else{var ho=h(wr);null!==ho&&K(H,ho.startTime-Wt),so=!1}return so}finally{Kr=null,no=In,io=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var go,xo=!1,ko=null,Co=-1,Io=5,zo=-1;function M(){return!(Xe.unstable_now()-zo<Io)}function R(){if(null!==ko){var u=Xe.unstable_now();zo=u;var Wt=!0;try{Wt=ko(!0,u)}finally{Wt?go():(xo=!1,ko=null)}}else xo=!1}if("function"==typeof ho)go=function(){ho(R)};else if("undefined"!=typeof MessageChannel){var Bo=new MessageChannel,ca=Bo.port2;Bo.port1.onmessage=R,go=function(){ca.postMessage(null)}}else go=function(){so(R,0)};function I(u){ko=u,xo||(xo=!0,go())}function K(u,Wt){Co=so((function(){u(Xe.unstable_now())}),Wt)}Xe.unstable_IdlePriority=5,Xe.unstable_ImmediatePriority=1,Xe.unstable_LowPriority=4,Xe.unstable_NormalPriority=3,Xe.unstable_Profiling=null,Xe.unstable_UserBlockingPriority=2,Xe.unstable_cancelCallback=function(u){u.callback=null},Xe.unstable_continueExecution=function(){oo||io||(oo=!0,I(J))},Xe.unstable_forceFrameRate=function(u){0>u||125<u?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Io=0<u?Math.floor(1e3/u):5},Xe.unstable_getCurrentPriorityLevel=function(){return no},Xe.unstable_getFirstCallbackNode=function(){return h(_r)},Xe.unstable_next=function(u){switch(no){case 1:case 2:case 3:var Xe=3;break;default:Xe=no}var Wt=no;no=Xe;try{return u()}finally{no=Wt}},Xe.unstable_pauseExecution=function(){},Xe.unstable_requestPaint=function(){},Xe.unstable_runWithPriority=function(u,Xe){switch(u){case 1:case 2:case 3:case 4:case 5:break;default:u=3}var Wt=no;no=u;try{return Xe()}finally{no=Wt}},Xe.unstable_scheduleCallback=function(u,Wt,In){var fr=Xe.unstable_now();switch("object"==typeof In&&null!==In?In="number"==typeof(In=In.delay)&&0<In?fr+In:fr:In=fr,u){case 1:var Kr=-1;break;case 2:Kr=250;break;case 5:Kr=1073741823;break;case 4:Kr=1e4;break;default:Kr=5e3}return u={id:Ar++,callback:Wt,priorityLevel:u,startTime:In,expirationTime:Kr=In+Kr,sortIndex:-1},In>fr?(u.sortIndex=In,f(wr,u),null===h(_r)&&u===h(wr)&&(ao?(co(Co),Co=-1):ao=!0,K(H,In-fr))):(u.sortIndex=Kr,f(_r,u),oo||io||(oo=!0,I(J))),u},Xe.unstable_shouldYield=M,Xe.unstable_wrapCallback=function(u){var Xe=no;return function(){var Wt=no;no=Xe;try{return u.apply(this,arguments)}finally{no=Wt}}}},9982:function(u,Xe,Wt){"use strict";u.exports=Wt(7463)},7154:function(u,Xe,Wt){"use strict";var In=Wt(6540);var fr="function"==typeof Object.is?Object.is:function n(u,Xe){return u===Xe&&(0!==u||1/u==1/Xe)||u!=u&&Xe!=Xe},_r=In.useSyncExternalStore,wr=In.useRef,Ar=In.useEffect,Kr=In.useMemo,no=In.useDebugValue;Xe.useSyncExternalStoreWithSelector=function(u,Xe,Wt,In,io){var oo=wr(null);if(null===oo.current){var ao={hasValue:!1,value:null};oo.current=ao}else ao=oo.current;oo=Kr((function(){function a(Xe){if(!wr){if(wr=!0,u=Xe,Xe=In(Xe),void 0!==io&&ao.hasValue){var Wt=ao.value;if(io(Wt,Xe))return _r=Wt}return _r=Xe}if(Wt=_r,fr(u,Xe))return Wt;var Ar=In(Xe);return void 0!==io&&io(Wt,Ar)?Wt:(u=Xe,_r=Ar)}var u,_r,wr=!1,Ar=void 0===Wt?null:Wt;return[function(){return a(Xe())},null===Ar?void 0:function(){return a(Ar())}]}),[Xe,Wt,In,io]);var so=_r(u,oo[0],oo[1]);return Ar((function(){ao.hasValue=!0,ao.value=so}),[so]),no(so),so}},8418:function(u,Xe,Wt){"use strict";u.exports=Wt(7154)},4634:function(u){function _extends(){return u.exports=_extends=Object.assign?Object.assign.bind():function(u){for(var Xe=1;Xe<arguments.length;Xe++){var Wt=arguments[Xe];for(var In in Wt)({}).hasOwnProperty.call(Wt,In)&&(u[In]=Wt[In])}return u},u.exports.__esModule=!0,u.exports.default=u.exports,_extends.apply(null,arguments)}u.exports=_extends,u.exports.__esModule=!0,u.exports.default=u.exports},4994:function(u){u.exports=function _interopRequireDefault(u){return u&&u.__esModule?u:{default:u}},u.exports.__esModule=!0,u.exports.default=u.exports},4893:function(u){u.exports=function _objectWithoutPropertiesLoose(u,Xe){if(null==u)return{};var Wt={};for(var In in u)if({}.hasOwnProperty.call(u,In)){if(Xe.includes(In))continue;Wt[In]=u[In]}return Wt},u.exports.__esModule=!0,u.exports.default=u.exports},6443:function(u){u.exports=function(){"use strict";var u={},Xe={};function define(Wt,In,fr){if(Xe[Wt]=fr,"index"===Wt){var _r="var sharedModule = {}; ("+Xe.shared+")(sharedModule); ("+Xe.worker+")(sharedModule);",wr={};return Xe.shared(wr),Xe.index(u,wr),"undefined"!=typeof window&&u.setWorkerUrl(window.URL.createObjectURL(new Blob([_r],{type:"text/javascript"}))),u}}return define("shared",["exports"],(function(u){function e(u,Xe,Wt,In){return new(Wt||(Wt=Promise))((function(fr,_r){function a(u){try{l(In.next(u))}catch(u){_r(u)}}function o(u){try{l(In.throw(u))}catch(u){_r(u)}}function l(u){var Xe;u.done?fr(u.value):(Xe=u.value,Xe instanceof Wt?Xe:new Wt((function(u){u(Xe)}))).then(a,o)}l((In=In.apply(u,Xe||[])).next())}))}function r(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}"function"==typeof SuppressedError&&SuppressedError;var Xe=i;function i(u,Xe){this.x=u,this.y=Xe}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,Xe){return this.clone()._rotateAround(u,Xe)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var Xe=u.x-this.x,Wt=u.y-this.y;return Xe*Xe+Wt*Wt},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,Xe){return Math.atan2(this.x*Xe-this.y*u,this.x*u+this.y*Xe)},_matMult:function(u){var Xe=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=Xe,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var Xe=Math.cos(u),Wt=Math.sin(u),In=Wt*this.x+Xe*this.y;return this.x=Xe*this.x-Wt*this.y,this.y=In,this},_rotateAround:function(u,Xe){var Wt=Math.cos(u),In=Math.sin(u),fr=Xe.y+In*(this.x-Xe.x)+Wt*(this.y-Xe.y);return this.x=Xe.x+Wt*(this.x-Xe.x)-In*(this.y-Xe.y),this.y=fr,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(u){return u instanceof i?u:Array.isArray(u)?new i(u[0],u[1]):u};var Wt=r(Xe),In=o;function o(u,Xe,Wt,In){this.cx=3*u,this.bx=3*(Wt-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Xe,this.by=3*(In-Xe)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=Xe,this.p2x=Wt,this.p2y=In}o.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,Xe){if(void 0===Xe&&(Xe=1e-6),u<0)return 0;if(u>1)return 1;for(var Wt=u,In=0;In<8;In++){var fr=this.sampleCurveX(Wt)-u;if(Math.abs(fr)<Xe)return Wt;var _r=this.sampleCurveDerivativeX(Wt);if(Math.abs(_r)<1e-6)break;Wt-=fr/_r}var wr=0,Ar=1;for(Wt=u,In=0;In<20&&(fr=this.sampleCurveX(Wt),!(Math.abs(fr-u)<Xe));In++)u>fr?wr=Wt:Ar=Wt,Wt=.5*(Ar-wr)+wr;return Wt},solve:function(u,Xe){return this.sampleCurveY(this.solveCurveX(u,Xe))}};var fr=r(In);let _r,wr;function h(){return null==_r&&(_r="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),_r}function p(){if(null==wr&&(wr=!1,h())){const u=5,Xe=new OffscreenCanvas(u,u).getContext("2d",{willReadFrequently:!0});if(Xe){for(let Wt=0;Wt<u*u;Wt++){const In=4*Wt;Xe.fillStyle=`rgb(${In},${In+1},${In+2})`,Xe.fillRect(Wt%u,Math.floor(Wt/u),1,1)}const Wt=Xe.getImageData(0,0,u,u).data;for(let Xe=0;Xe<u*u*4;Xe++)if(Xe%4!=3&&Wt[Xe]!==Xe){wr=!0;break}}}return wr||!1}function f(u,Xe,Wt,In){const _r=new fr(u,Xe,Wt,In);return u=>_r.solve(u)}const Ar=f(.25,.1,.25,1);function y(u,Xe,Wt){return Math.min(Wt,Math.max(Xe,u))}function m(u,Xe,Wt){const In=Wt-Xe,fr=((u-Xe)%In+In)%In+Xe;return fr===Xe?Wt:fr}function g(u,...Xe){for(const Wt of Xe)for(const Xe in Wt)u[Xe]=Wt[Xe];return u}let Kr=1;function v(u,Xe,Wt){const In={};for(const Wt in u)In[Wt]=Xe.call(this,u[Wt],Wt,u);return In}function b(u,Xe,Wt){const In={};for(const Wt in u)Xe.call(this,u[Wt],Wt,u)&&(In[Wt]=u[Wt]);return In}function w(u){return Array.isArray(u)?u.map(w):"object"==typeof u&&u?v(u,w):u}const no={};function A(u){no[u]||("undefined"!=typeof console&&console.warn(u),no[u]=!0)}function S(u,Xe,Wt){return(Wt.y-u.y)*(Xe.x-u.x)>(Xe.y-u.y)*(Wt.x-u.x)}function k(u){return"undefined"!=typeof WorkerGlobalScope&&void 0!==u&&u instanceof WorkerGlobalScope}let io=null;function I(u){return"undefined"!=typeof ImageBitmap&&u instanceof ImageBitmap}const oo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function P(u,Xe,Wt,In,fr){return e(this,void 0,void 0,(function*(){if("undefined"==typeof VideoFrame)throw new Error("VideoFrame not supported");const _r=new VideoFrame(u,{timestamp:0});try{const wr=null==_r?void 0:_r.format;if(!wr||!wr.startsWith("BGR")&&!wr.startsWith("RGB"))throw new Error(`Unrecognized format ${wr}`);const Ar=wr.startsWith("BGR"),Kr=new Uint8ClampedArray(In*fr*4);if(yield _r.copyTo(Kr,function(u,Xe,Wt,In,fr){const _r=4*Math.max(-Xe,0),wr=(Math.max(0,Wt)-Wt)*In*4+_r,Ar=4*In,Kr=Math.max(0,Xe),no=Math.max(0,Wt);return{rect:{x:Kr,y:no,width:Math.min(u.width,Xe+In)-Kr,height:Math.min(u.height,Wt+fr)-no},layout:[{offset:wr,stride:Ar}]}}(u,Xe,Wt,In,fr)),Ar)for(let u=0;u<Kr.length;u+=4){const Xe=Kr[u];Kr[u]=Kr[u+2],Kr[u+2]=Xe}return Kr}finally{_r.close()}}))}let ao,so;const co="AbortError";function E(){return new Error(co)}const ho={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function T(u){return ho.REGISTERED_PROTOCOLS[u.substring(0,u.indexOf("://"))]}const go="global-dispatcher";class L extends Error{constructor(u,Xe,Wt,In){super(`AJAXError: ${Xe} (${u}): ${Wt}`),this.status=u,this.statusText=Xe,this.url=Wt,this.body=In}}const D=()=>k(self)?self.worker&&self.worker.referrer:("blob:"===window.location.protocol?window.parent:window).location.href,O=function(u,Xe){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const Wt=T(u.url);if(Wt)return Wt(u,Xe);if(k(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:go},Xe)}if(!(/^file:/.test(Wt=u.url)||/^file:/.test(D())&&!/^\w+:/.test(Wt))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(u,Xe){return e(this,void 0,void 0,(function*(){const Wt=new Request(u.url,{method:u.method||"GET",body:u.body,credentials:u.credentials,headers:u.headers,cache:u.cache,referrer:D(),signal:Xe.signal});"json"!==u.type||Wt.headers.has("Accept")||Wt.headers.set("Accept","application/json");const In=yield fetch(Wt);if(!In.ok){const Xe=yield In.blob();throw new L(In.status,In.statusText,u.url,Xe)}let fr;fr="arrayBuffer"===u.type||"image"===u.type?In.arrayBuffer():"json"===u.type?In.json():In.text();const _r=yield fr;if(Xe.signal.aborted)throw E();return{data:_r,cacheControl:In.headers.get("Cache-Control"),expires:In.headers.get("Expires")}}))}(u,Xe);if(k(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:go},Xe)}var Wt;return function(u,Xe){return new Promise(((Wt,In)=>{var fr;const _r=new XMLHttpRequest;_r.open(u.method||"GET",u.url,!0),"arrayBuffer"!==u.type&&"image"!==u.type||(_r.responseType="arraybuffer");for(const Xe in u.headers)_r.setRequestHeader(Xe,u.headers[Xe]);"json"===u.type&&(_r.responseType="text",(null===(fr=u.headers)||void 0===fr?void 0:fr.Accept)||_r.setRequestHeader("Accept","application/json")),_r.withCredentials="include"===u.credentials,_r.onerror=()=>{In(new Error(_r.statusText))},_r.onload=()=>{if(!Xe.signal.aborted)if((_r.status>=200&&_r.status<300||0===_r.status)&&null!==_r.response){let Xe=_r.response;if("json"===u.type)try{Xe=JSON.parse(_r.response)}catch(u){return void In(u)}Wt({data:Xe,cacheControl:_r.getResponseHeader("Cache-Control"),expires:_r.getResponseHeader("Expires")})}else{const Xe=new Blob([_r.response],{type:_r.getResponseHeader("Content-Type")});In(new L(_r.status,_r.statusText,u.url,Xe))}},Xe.signal.addEventListener("abort",(()=>{_r.abort(),In(E())})),_r.send(u.body)}))}(u,Xe)};function j(u){if(!u||u.indexOf("://")<=0||0===u.indexOf("data:image/")||0===u.indexOf("blob:"))return!0;const Xe=new URL(u),Wt=window.location;return Xe.protocol===Wt.protocol&&Xe.host===Wt.host}function R(u,Xe,Wt){Wt[u]&&-1!==Wt[u].indexOf(Xe)||(Wt[u]=Wt[u]||[],Wt[u].push(Xe))}function U(u,Xe,Wt){if(Wt&&Wt[u]){const In=Wt[u].indexOf(Xe);-1!==In&&Wt[u].splice(In,1)}}class q{constructor(u,Xe={}){g(this,Xe),this.type=u}}class N extends q{constructor(u,Xe={}){super("error",g({error:u},Xe))}}class Z{on(u,Xe){return this._listeners=this._listeners||{},R(u,Xe,this._listeners),this}off(u,Xe){return U(u,Xe,this._listeners),U(u,Xe,this._oneTimeListeners),this}once(u,Xe){return Xe?(this._oneTimeListeners=this._oneTimeListeners||{},R(u,Xe,this._oneTimeListeners),this):new Promise((Xe=>this.once(u,Xe)))}fire(u,Xe){"string"==typeof u&&(u=new q(u,Xe||{}));const Wt=u.type;if(this.listens(Wt)){u.target=this;const Xe=this._listeners&&this._listeners[Wt]?this._listeners[Wt].slice():[];for(const Wt of Xe)Wt.call(this,u);const In=this._oneTimeListeners&&this._oneTimeListeners[Wt]?this._oneTimeListeners[Wt].slice():[];for(const Xe of In)U(Wt,Xe,this._oneTimeListeners),Xe.call(this,u);const fr=this._eventedParent;fr&&(g(u,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),fr.fire(u))}else u instanceof N&&console.error(u.error);return this}listens(u){return this._listeners&&this._listeners[u]&&this._listeners[u].length>0||this._oneTimeListeners&&this._oneTimeListeners[u]&&this._oneTimeListeners[u].length>0||this._eventedParent&&this._eventedParent.listens(u)}setEventedParent(u,Xe){return this._eventedParent=u,this._eventedParentData=Xe,this}}var xo={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const ko=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function X(u,Xe){const Wt={};for(const Xe in u)"ref"!==Xe&&(Wt[Xe]=u[Xe]);return ko.forEach((u=>{u in Xe&&(Wt[u]=Xe[u])})),Wt}function H(u,Xe){if(Array.isArray(u)){if(!Array.isArray(Xe)||u.length!==Xe.length)return!1;for(let Wt=0;Wt<u.length;Wt++)if(!H(u[Wt],Xe[Wt]))return!1;return!0}if("object"==typeof u&&null!==u&&null!==Xe){if("object"!=typeof Xe)return!1;if(Object.keys(u).length!==Object.keys(Xe).length)return!1;for(const Wt in u)if(!H(u[Wt],Xe[Wt]))return!1;return!0}return u===Xe}function Y(u,Xe){u.push(Xe)}function J(u,Xe,Wt){Y(Wt,{command:"addSource",args:[u,Xe[u]]})}function W(u,Xe,Wt){Y(Xe,{command:"removeSource",args:[u]}),Wt[u]=!0}function Q(u,Xe,Wt,In){W(u,Wt,In),J(u,Xe,Wt)}function tt(u,Xe,Wt){let In;for(In in u[Wt])if(Object.prototype.hasOwnProperty.call(u[Wt],In)&&"data"!==In&&!H(u[Wt][In],Xe[Wt][In]))return!1;for(In in Xe[Wt])if(Object.prototype.hasOwnProperty.call(Xe[Wt],In)&&"data"!==In&&!H(u[Wt][In],Xe[Wt][In]))return!1;return!0}function et(u,Xe,Wt,In,fr,_r){u=u||{},Xe=Xe||{};for(const wr in u)Object.prototype.hasOwnProperty.call(u,wr)&&(H(u[wr],Xe[wr])||Wt.push({command:_r,args:[In,wr,Xe[wr],fr]}));for(const wr in Xe)Object.prototype.hasOwnProperty.call(Xe,wr)&&!Object.prototype.hasOwnProperty.call(u,wr)&&(H(u[wr],Xe[wr])||Wt.push({command:_r,args:[In,wr,Xe[wr],fr]}))}function rt(u){return u.id}function nt(u,Xe){return u[Xe.id]=Xe,u}class it{constructor(u,Xe,Wt,In){this.message=(u?`${u}: `:"")+Wt,In&&(this.identifier=In),null!=Xe&&Xe.__line__&&(this.line=Xe.__line__)}}function st(u,...Xe){for(const Wt of Xe)for(const Xe in Wt)u[Xe]=Wt[Xe];return u}class at extends Error{constructor(u,Xe){super(Xe),this.message=Xe,this.key=u}}class ot{constructor(u,Xe=[]){this.parent=u,this.bindings={};for(const[u,Wt]of Xe)this.bindings[u]=Wt}concat(u){return new ot(this,u)}get(u){if(this.bindings[u])return this.bindings[u];if(this.parent)return this.parent.get(u);throw new Error(`${u} not found in scope.`)}has(u){return!!this.bindings[u]||!!this.parent&&this.parent.has(u)}}const Co={kind:"null"},Io={kind:"number"},zo={kind:"string"},Bo={kind:"boolean"},ca={kind:"color"},ua={kind:"object"},Da={kind:"value"},ns={kind:"collator"},yl={kind:"formatted"},vl={kind:"padding"},kl={kind:"resolvedImage"},Al={kind:"variableAnchorOffsetCollection"};function bt(u,Xe){return{kind:"array",itemType:u,N:Xe}}function wt(u){if("array"===u.kind){const Xe=wt(u.itemType);return"number"==typeof u.N?`array<${Xe}, ${u.N}>`:"value"===u.itemType.kind?"array":`array<${Xe}>`}return u.kind}const Ml=[Co,Io,zo,Bo,ca,yl,ua,bt(Da),vl,kl,Al];function At(u,Xe){if("error"===Xe.kind)return null;if("array"===u.kind){if("array"===Xe.kind&&(0===Xe.N&&"value"===Xe.itemType.kind||!At(u.itemType,Xe.itemType))&&("number"!=typeof u.N||u.N===Xe.N))return null}else{if(u.kind===Xe.kind)return null;if("value"===u.kind)for(const u of Ml)if(!At(u,Xe))return null}return`Expected ${wt(u)} but found ${wt(Xe)} instead.`}function St(u,Xe){return Xe.some((Xe=>Xe.kind===u.kind))}function kt(u,Xe){return Xe.some((Xe=>"null"===Xe?null===u:"array"===Xe?Array.isArray(u):"object"===Xe?u&&!Array.isArray(u)&&"object"==typeof u:Xe===typeof u))}function Mt(u,Xe){return"array"===u.kind&&"array"===Xe.kind?u.itemType.kind===Xe.itemType.kind&&"number"==typeof u.N:u.kind===Xe.kind}const Rl=.96422,Ol=.82521,Ll=4/29,Dl=6/29,Bl=3*Dl*Dl,Nl=Dl*Dl*Dl,Vl=Math.PI/180,Ul=180/Math.PI;function Tt(u){return(u%=360)<0&&(u+=360),u}function $t([u,Xe,Wt,In]){let fr,_r;const wr=Dt((.2225045*(u=Lt(u))+.7168786*(Xe=Lt(Xe))+.0606169*(Wt=Lt(Wt)))/1);u===Xe&&Xe===Wt?fr=_r=wr:(fr=Dt((.4360747*u+.3850649*Xe+.1430804*Wt)/Rl),_r=Dt((.0139322*u+.0971045*Xe+.7141733*Wt)/Ol));const Ar=116*wr-16;return[Ar<0?0:Ar,500*(fr-wr),200*(wr-_r),In]}function Lt(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function Dt(u){return u>Nl?Math.pow(u,1/3):u/Bl+Ll}function Ot([u,Xe,Wt,In]){let fr=(u+16)/116,_r=isNaN(Xe)?fr:fr+Xe/500,wr=isNaN(Wt)?fr:fr-Wt/200;return fr=1*Rt(fr),_r=Rl*Rt(_r),wr=Ol*Rt(wr),[jt(3.1338561*_r-1.6168667*fr-.4906146*wr),jt(-.9787684*_r+1.9161415*fr+.033454*wr),jt(.0719453*_r-.2289914*fr+1.4052427*wr),In]}function jt(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function Rt(u){return u>Dl?u*u*u:Bl*(u-Ll)}function Ut(u){return parseInt(u.padEnd(2,u),16)/255}function qt(u,Xe){return Nt(Xe?u/100:u,0,1)}function Nt(u,Xe,Wt){return Math.min(Math.max(Xe,u),Wt)}function Zt(u){return!u.some(Number.isNaN)}const $l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Kt{constructor(u,Xe,Wt,In=1,fr=!0){this.r=u,this.g=Xe,this.b=Wt,this.a=In,fr||(this.r*=In,this.g*=In,this.b*=In,In||this.overwriteGetter("rgb",[u,Xe,Wt,In]))}static parse(u){if(u instanceof Kt)return u;if("string"!=typeof u)return;const Xe=function(u){if("transparent"===(u=u.toLowerCase().trim()))return[0,0,0,0];const Xe=$l[u];if(Xe){const[u,Wt,In]=Xe;return[u/255,Wt/255,In/255,1]}if(u.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(u)){const Xe=u.length<6?1:2;let Wt=1;return[Ut(u.slice(Wt,Wt+=Xe)),Ut(u.slice(Wt,Wt+=Xe)),Ut(u.slice(Wt,Wt+=Xe)),Ut(u.slice(Wt,Wt+Xe)||"ff")]}if(u.startsWith("rgb")){const Xe=u.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Xe){const[u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao]=Xe,so=[fr||" ",Ar||" ",io].join("");if(" "===so||" /"===so||",,"===so||",,,"===so){const u=[In,wr,no].join(""),Xe="%%%"===u?100:""===u?255:0;if(Xe){const u=[Nt(+Wt/Xe,0,1),Nt(+_r/Xe,0,1),Nt(+Kr/Xe,0,1),oo?qt(+oo,ao):1];if(Zt(u))return u}}return}}const Wt=u.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Wt){const[u,Xe,In,fr,_r,wr,Ar,Kr,no]=Wt,io=[In||" ",_r||" ",Ar].join("");if(" "===io||" /"===io||",,"===io||",,,"===io){const u=[+Xe,Nt(+fr,0,100),Nt(+wr,0,100),Kr?qt(+Kr,no):1];if(Zt(u))return function([u,Xe,Wt,In]){function i(In){const fr=(In+u/30)%12,_r=Xe*Math.min(Wt,1-Wt);return Wt-_r*Math.max(-1,Math.min(fr-3,9-fr,1))}return u=Tt(u),Xe/=100,Wt/=100,[i(0),i(8),i(4),In]}(u)}}}(u);return Xe?new Kt(...Xe,!1):void 0}get rgb(){const{r:u,g:Xe,b:Wt,a:In}=this,fr=In||1/0;return this.overwriteGetter("rgb",[u/fr,Xe/fr,Wt/fr,In])}get hcl(){return this.overwriteGetter("hcl",function(u){const[Xe,Wt,In,fr]=$t(u),_r=Math.sqrt(Wt*Wt+In*In);return[Math.round(1e4*_r)?Tt(Math.atan2(In,Wt)*Ul):NaN,_r,Xe,fr]}(this.rgb))}get lab(){return this.overwriteGetter("lab",$t(this.rgb))}overwriteGetter(u,Xe){return Object.defineProperty(this,u,{value:Xe}),Xe}toString(){const[u,Xe,Wt,In]=this.rgb;return`rgba(${[u,Xe,Wt].map((u=>Math.round(255*u))).join(",")},${In})`}}Kt.black=new Kt(0,0,0,1),Kt.white=new Kt(1,1,1,1),Kt.transparent=new Kt(0,0,0,0),Kt.red=new Kt(1,0,0,1);class Xt{constructor(u,Xe,Wt){this.sensitivity=u?Xe?"variant":"case":Xe?"accent":"base",this.locale=Wt,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(u,Xe){return this.collator.compare(u,Xe)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ht{constructor(u,Xe,Wt,In,fr){this.text=u,this.image=Xe,this.scale=Wt,this.fontStack=In,this.textColor=fr}}class Yt{constructor(u){this.sections=u}static fromString(u){return new Yt([new Ht(u,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((u=>0!==u.text.length||u.image&&0!==u.image.name.length))}static factory(u){return u instanceof Yt?u:Yt.fromString(u)}toString(){return 0===this.sections.length?"":this.sections.map((u=>u.text)).join("")}}class Jt{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Jt)return u;if("number"==typeof u)return new Jt([u,u,u,u]);if(Array.isArray(u)&&!(u.length<1||u.length>4)){for(const Xe of u)if("number"!=typeof Xe)return;switch(u.length){case 1:u=[u[0],u[0],u[0],u[0]];break;case 2:u=[u[0],u[1],u[0],u[1]];break;case 3:u=[u[0],u[1],u[2],u[1]]}return new Jt(u)}}toString(){return JSON.stringify(this.values)}}const Wl=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Qt{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Qt)return u;if(Array.isArray(u)&&!(u.length<1)&&u.length%2==0){for(let Xe=0;Xe<u.length;Xe+=2){const Wt=u[Xe],In=u[Xe+1];if("string"!=typeof Wt||!Wl.has(Wt))return;if(!Array.isArray(In)||2!==In.length||"number"!=typeof In[0]||"number"!=typeof In[1])return}return new Qt(u)}}toString(){return JSON.stringify(this.values)}}class te{constructor(u){this.name=u.name,this.available=u.available}toString(){return this.name}static fromString(u){return u?new te({name:u,available:!1}):null}}function ee(u,Xe,Wt,In){return"number"==typeof u&&u>=0&&u<=255&&"number"==typeof Xe&&Xe>=0&&Xe<=255&&"number"==typeof Wt&&Wt>=0&&Wt<=255?void 0===In||"number"==typeof In&&In>=0&&In<=1?null:`Invalid rgba value [${[u,Xe,Wt,In].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof In?[u,Xe,Wt,In]:[u,Xe,Wt]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function re(u){if(null===u||"string"==typeof u||"boolean"==typeof u||"number"==typeof u||u instanceof Kt||u instanceof Xt||u instanceof Yt||u instanceof Jt||u instanceof Qt||u instanceof te)return!0;if(Array.isArray(u)){for(const Xe of u)if(!re(Xe))return!1;return!0}if("object"==typeof u){for(const Xe in u)if(!re(u[Xe]))return!1;return!0}return!1}function ne(u){if(null===u)return Co;if("string"==typeof u)return zo;if("boolean"==typeof u)return Bo;if("number"==typeof u)return Io;if(u instanceof Kt)return ca;if(u instanceof Xt)return ns;if(u instanceof Yt)return yl;if(u instanceof Jt)return vl;if(u instanceof Qt)return Al;if(u instanceof te)return kl;if(Array.isArray(u)){const Xe=u.length;let Wt;for(const Xe of u){const u=ne(Xe);if(Wt){if(Wt===u)continue;Wt=Da;break}Wt=u}return bt(Wt||Da,Xe)}return ua}function ie(u){const Xe=typeof u;return null===u?"":"string"===Xe||"number"===Xe||"boolean"===Xe?String(u):u instanceof Kt||u instanceof Yt||u instanceof Jt||u instanceof Qt||u instanceof te?u.toString():JSON.stringify(u)}class se{constructor(u,Xe){this.type=u,this.value=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'literal' expression requires exactly one argument, but found ${u.length-1} instead.`);if(!re(u[1]))return Xe.error("invalid value");const Wt=u[1];let In=ne(Wt);const fr=Xe.expectedType;return"array"!==In.kind||0!==In.N||!fr||"array"!==fr.kind||"number"==typeof fr.N&&0!==fr.N||(In=fr),new se(In,Wt)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ae{constructor(u){this.name="ExpressionEvaluationError",this.message=u}toJSON(){return this.message}}const Zl={string:zo,number:Io,boolean:Bo,object:ua};class le{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");let Wt,In=1;const fr=u[0];if("array"===fr){let fr,_r;if(u.length>2){const Wt=u[1];if("string"!=typeof Wt||!(Wt in Zl)||"object"===Wt)return Xe.error('The item type argument of "array" must be one of string, number, boolean',1);fr=Zl[Wt],In++}else fr=Da;if(u.length>3){if(null!==u[2]&&("number"!=typeof u[2]||u[2]<0||u[2]!==Math.floor(u[2])))return Xe.error('The length argument to "array" must be a positive integer literal',2);_r=u[2],In++}Wt=bt(fr,_r)}else{if(!Zl[fr])throw new Error(`Types doesn't contain name = ${fr}`);Wt=Zl[fr]}const _r=[];for(;In<u.length;In++){const Wt=Xe.parse(u[In],In,Da);if(!Wt)return null;_r.push(Wt)}return new le(Wt,_r)}evaluate(u){for(let Xe=0;Xe<this.args.length;Xe++){const Wt=this.args[Xe].evaluate(u);if(!At(this.type,ne(Wt)))return Wt;if(Xe===this.args.length-1)throw new ae(`Expected value to be of type ${wt(this.type)}, but found ${wt(ne(Wt))} instead.`)}throw new Error}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}const Gl={"to-boolean":Bo,"to-color":ca,"to-number":Io,"to-string":zo};class ce{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");const Wt=u[0];if(!Gl[Wt])throw new Error(`Can't parse ${Wt} as it is not part of the known types`);if(("to-boolean"===Wt||"to-string"===Wt)&&2!==u.length)return Xe.error("Expected one argument.");const In=Gl[Wt],fr=[];for(let Wt=1;Wt<u.length;Wt++){const In=Xe.parse(u[Wt],Wt,Da);if(!In)return null;fr.push(In)}return new ce(In,fr)}evaluate(u){switch(this.type.kind){case"boolean":return Boolean(this.args[0].evaluate(u));case"color":{let Xe,Wt;for(const In of this.args){if(Xe=In.evaluate(u),Wt=null,Xe instanceof Kt)return Xe;if("string"==typeof Xe){const Wt=u.parseColor(Xe);if(Wt)return Wt}else if(Array.isArray(Xe)&&(Wt=Xe.length<3||Xe.length>4?`Invalid rbga value ${JSON.stringify(Xe)}: expected an array containing either three or four numeric values.`:ee(Xe[0],Xe[1],Xe[2],Xe[3]),!Wt))return new Kt(Xe[0]/255,Xe[1]/255,Xe[2]/255,Xe[3])}throw new ae(Wt||`Could not parse color from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"padding":{let Xe;for(const Wt of this.args){Xe=Wt.evaluate(u);const In=Jt.parse(Xe);if(In)return In}throw new ae(`Could not parse padding from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"variableAnchorOffsetCollection":{let Xe;for(const Wt of this.args){Xe=Wt.evaluate(u);const In=Qt.parse(Xe);if(In)return In}throw new ae(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"number":{let Xe=null;for(const Wt of this.args){if(Xe=Wt.evaluate(u),null===Xe)return 0;const In=Number(Xe);if(!isNaN(In))return In}throw new ae(`Could not convert ${JSON.stringify(Xe)} to number.`)}case"formatted":return Yt.fromString(ie(this.args[0].evaluate(u)));case"resolvedImage":return te.fromString(ie(this.args[0].evaluate(u)));default:return ie(this.args[0].evaluate(u))}}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}const Xl=["Unknown","Point","LineString","Polygon"];class pe{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Xl[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(u){let Xe=this._parseColorCache[u];return Xe||(Xe=this._parseColorCache[u]=Kt.parse(u)),Xe}}class fe{constructor(u,Xe,Wt=[],In,fr=new ot,_r=[]){this.registry=u,this.path=Wt,this.key=Wt.map((u=>`[${u}]`)).join(""),this.scope=fr,this.errors=_r,this.expectedType=In,this._isConstant=Xe}parse(u,Xe,Wt,In,fr={}){return Xe?this.concat(Xe,Wt,In)._parse(u,fr):this._parse(u,fr)}_parse(u,Xe){function r(u,Xe,Wt){return"assert"===Wt?new le(Xe,[u]):"coerce"===Wt?new ce(Xe,[u]):u}if(null!==u&&"string"!=typeof u&&"boolean"!=typeof u&&"number"!=typeof u||(u=["literal",u]),Array.isArray(u)){if(0===u.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const Wt=u[0];if("string"!=typeof Wt)return this.error(`Expression name must be a string, but found ${typeof Wt} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const In=this.registry[Wt];if(In){let Wt=In.parse(u,this);if(!Wt)return null;if(this.expectedType){const u=this.expectedType,In=Wt.type;if("string"!==u.kind&&"number"!==u.kind&&"boolean"!==u.kind&&"object"!==u.kind&&"array"!==u.kind||"value"!==In.kind)if("color"!==u.kind&&"formatted"!==u.kind&&"resolvedImage"!==u.kind||"value"!==In.kind&&"string"!==In.kind)if("padding"!==u.kind||"value"!==In.kind&&"number"!==In.kind&&"array"!==In.kind)if("variableAnchorOffsetCollection"!==u.kind||"value"!==In.kind&&"array"!==In.kind){if(this.checkSubtype(u,In))return null}else Wt=r(Wt,u,Xe.typeAnnotation||"coerce");else Wt=r(Wt,u,Xe.typeAnnotation||"coerce");else Wt=r(Wt,u,Xe.typeAnnotation||"coerce");else Wt=r(Wt,u,Xe.typeAnnotation||"assert")}if(!(Wt instanceof se)&&"resolvedImage"!==Wt.type.kind&&this._isConstant(Wt)){const Xe=new pe;try{Wt=new se(Wt.type,Wt.evaluate(Xe))}catch(u){return this.error(u.message),null}}return Wt}return this.error(`Unknown expression "${Wt}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===u?"'undefined' value invalid. Use null instead.":"object"==typeof u?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof u} instead.`)}concat(u,Xe,Wt){const In="number"==typeof u?this.path.concat(u):this.path,fr=Wt?this.scope.concat(Wt):this.scope;return new fe(this.registry,this._isConstant,In,Xe||null,fr,this.errors)}error(u,...Xe){const Wt=`${this.key}${Xe.map((u=>`[${u}]`)).join("")}`;this.errors.push(new at(Wt,u))}checkSubtype(u,Xe){const Wt=At(u,Xe);return Wt&&this.error(Wt),Wt}}class de{constructor(u,Xe){this.type=Xe.type,this.bindings=[].concat(u),this.result=Xe}evaluate(u){return this.result.evaluate(u)}eachChild(u){for(const Xe of this.bindings)u(Xe[1]);u(this.result)}static parse(u,Xe){if(u.length<4)return Xe.error(`Expected at least 3 arguments, but found ${u.length-1} instead.`);const Wt=[];for(let In=1;In<u.length-1;In+=2){const fr=u[In];if("string"!=typeof fr)return Xe.error(`Expected string, but found ${typeof fr} instead.`,In);if(/[^a-zA-Z0-9_]/.test(fr))return Xe.error("Variable names must contain only alphanumeric characters or '_'.",In);const _r=Xe.parse(u[In+1],In+1);if(!_r)return null;Wt.push([fr,_r])}const In=Xe.parse(u[u.length-1],u.length-1,Xe.expectedType,Wt);return In?new de(Wt,In):null}outputDefined(){return this.result.outputDefined()}}class ye{constructor(u,Xe){this.type=Xe.type,this.name=u,this.boundExpression=Xe}static parse(u,Xe){if(2!==u.length||"string"!=typeof u[1])return Xe.error("'var' expression requires exactly one string literal argument.");const Wt=u[1];return Xe.scope.has(Wt)?new ye(Wt,Xe.scope.get(Wt)):Xe.error(`Unknown variable "${Wt}". Make sure "${Wt}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(u){return this.boundExpression.evaluate(u)}eachChild(){}outputDefined(){return!1}}class me{constructor(u,Xe,Wt){this.type=u,this.index=Xe,this.input=Wt}static parse(u,Xe){if(3!==u.length)return Xe.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const Wt=Xe.parse(u[1],1,Io),In=Xe.parse(u[2],2,bt(Xe.expectedType||Da));return Wt&&In?new me(In.type.itemType,Wt,In):null}evaluate(u){const Xe=this.index.evaluate(u),Wt=this.input.evaluate(u);if(Xe<0)throw new ae(`Array index out of bounds: ${Xe} < 0.`);if(Xe>=Wt.length)throw new ae(`Array index out of bounds: ${Xe} > ${Wt.length-1}.`);if(Xe!==Math.floor(Xe))throw new ae(`Array index must be an integer, but found ${Xe} instead.`);return Wt[Xe]}eachChild(u){u(this.index),u(this.input)}outputDefined(){return!1}}class ge{constructor(u,Xe){this.type=Bo,this.needle=u,this.haystack=Xe}static parse(u,Xe){if(3!==u.length)return Xe.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const Wt=Xe.parse(u[1],1,Da),In=Xe.parse(u[2],2,Da);return Wt&&In?St(Wt.type,[Bo,zo,Io,Co,Da])?new ge(Wt,In):Xe.error(`Expected first argument to be of type boolean, string, number or null, but found ${wt(Wt.type)} instead`):null}evaluate(u){const Xe=this.needle.evaluate(u),Wt=this.haystack.evaluate(u);if(!Wt)return!1;if(!kt(Xe,["boolean","string","number","null"]))throw new ae(`Expected first argument to be of type boolean, string, number or null, but found ${wt(ne(Xe))} instead.`);if(!kt(Wt,["string","array"]))throw new ae(`Expected second argument to be of type array or string, but found ${wt(ne(Wt))} instead.`);return Wt.indexOf(Xe)>=0}eachChild(u){u(this.needle),u(this.haystack)}outputDefined(){return!0}}class xe{constructor(u,Xe,Wt){this.type=Io,this.needle=u,this.haystack=Xe,this.fromIndex=Wt}static parse(u,Xe){if(u.length<=2||u.length>=5)return Xe.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const Wt=Xe.parse(u[1],1,Da),In=Xe.parse(u[2],2,Da);if(!Wt||!In)return null;if(!St(Wt.type,[Bo,zo,Io,Co,Da]))return Xe.error(`Expected first argument to be of type boolean, string, number or null, but found ${wt(Wt.type)} instead`);if(4===u.length){const fr=Xe.parse(u[3],3,Io);return fr?new xe(Wt,In,fr):null}return new xe(Wt,In)}evaluate(u){const Xe=this.needle.evaluate(u),Wt=this.haystack.evaluate(u);if(!kt(Xe,["boolean","string","number","null"]))throw new ae(`Expected first argument to be of type boolean, string, number or null, but found ${wt(ne(Xe))} instead.`);let In;if(this.fromIndex&&(In=this.fromIndex.evaluate(u)),kt(Wt,["string"])){const u=Wt.indexOf(Xe,In);return-1===u?-1:[...Wt.slice(0,u)].length}if(kt(Wt,["array"]))return Wt.indexOf(Xe,In);throw new ae(`Expected second argument to be of type array or string, but found ${wt(ne(Wt))} instead.`)}eachChild(u){u(this.needle),u(this.haystack),this.fromIndex&&u(this.fromIndex)}outputDefined(){return!1}}class ve{constructor(u,Xe,Wt,In,fr,_r){this.inputType=u,this.type=Xe,this.input=Wt,this.cases=In,this.outputs=fr,this.otherwise=_r}static parse(u,Xe){if(u.length<5)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if(u.length%2!=1)return Xe.error("Expected an even number of arguments.");let Wt,In;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(In=Xe.expectedType);const fr={},_r=[];for(let wr=2;wr<u.length-1;wr+=2){let Ar=u[wr];const Kr=u[wr+1];Array.isArray(Ar)||(Ar=[Ar]);const no=Xe.concat(wr);if(0===Ar.length)return no.error("Expected at least one branch label.");for(const u of Ar){if("number"!=typeof u&&"string"!=typeof u)return no.error("Branch labels must be numbers or strings.");if("number"==typeof u&&Math.abs(u)>Number.MAX_SAFE_INTEGER)return no.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof u&&Math.floor(u)!==u)return no.error("Numeric branch labels must be integer values.");if(Wt){if(no.checkSubtype(Wt,ne(u)))return null}else Wt=ne(u);if(void 0!==fr[String(u)])return no.error("Branch labels must be unique.");fr[String(u)]=_r.length}const io=Xe.parse(Kr,wr,In);if(!io)return null;In=In||io.type,_r.push(io)}const wr=Xe.parse(u[1],1,Da);if(!wr)return null;const Ar=Xe.parse(u[u.length-1],u.length-1,In);return Ar?"value"!==wr.type.kind&&Xe.concat(1).checkSubtype(Wt,wr.type)?null:new ve(Wt,In,wr,fr,_r,Ar):null}evaluate(u){const Xe=this.input.evaluate(u);return(ne(Xe)===this.inputType&&this.outputs[this.cases[Xe]]||this.otherwise).evaluate(u)}eachChild(u){u(this.input),this.outputs.forEach(u),u(this.otherwise)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))&&this.otherwise.outputDefined()}}class be{constructor(u,Xe,Wt){this.type=u,this.branches=Xe,this.otherwise=Wt}static parse(u,Xe){if(u.length<4)return Xe.error(`Expected at least 3 arguments, but found only ${u.length-1}.`);if(u.length%2!=0)return Xe.error("Expected an odd number of arguments.");let Wt;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(Wt=Xe.expectedType);const In=[];for(let fr=1;fr<u.length-1;fr+=2){const _r=Xe.parse(u[fr],fr,Bo);if(!_r)return null;const wr=Xe.parse(u[fr+1],fr+1,Wt);if(!wr)return null;In.push([_r,wr]),Wt=Wt||wr.type}const fr=Xe.parse(u[u.length-1],u.length-1,Wt);if(!fr)return null;if(!Wt)throw new Error("Can't infer output type");return new be(Wt,In,fr)}evaluate(u){for(const[Xe,Wt]of this.branches)if(Xe.evaluate(u))return Wt.evaluate(u);return this.otherwise.evaluate(u)}eachChild(u){for(const[Xe,Wt]of this.branches)u(Xe),u(Wt);u(this.otherwise)}outputDefined(){return this.branches.every((([u,Xe])=>Xe.outputDefined()))&&this.otherwise.outputDefined()}}class we{constructor(u,Xe,Wt,In){this.type=u,this.input=Xe,this.beginIndex=Wt,this.endIndex=In}static parse(u,Xe){if(u.length<=2||u.length>=5)return Xe.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const Wt=Xe.parse(u[1],1,Da),In=Xe.parse(u[2],2,Io);if(!Wt||!In)return null;if(!St(Wt.type,[bt(Da),zo,Da]))return Xe.error(`Expected first argument to be of type array or string, but found ${wt(Wt.type)} instead`);if(4===u.length){const fr=Xe.parse(u[3],3,Io);return fr?new we(Wt.type,Wt,In,fr):null}return new we(Wt.type,Wt,In)}evaluate(u){const Xe=this.input.evaluate(u),Wt=this.beginIndex.evaluate(u);let In;if(this.endIndex&&(In=this.endIndex.evaluate(u)),kt(Xe,["string"]))return[...Xe].slice(Wt,In).join("");if(kt(Xe,["array"]))return Xe.slice(Wt,In);throw new ae(`Expected first argument to be of type array or string, but found ${wt(ne(Xe))} instead.`)}eachChild(u){u(this.input),u(this.beginIndex),this.endIndex&&u(this.endIndex)}outputDefined(){return!1}}function _e(u,Xe){const Wt=u.length-1;let In,fr,_r=0,wr=Wt,Ar=0;for(;_r<=wr;)if(Ar=Math.floor((_r+wr)/2),In=u[Ar],fr=u[Ar+1],In<=Xe){if(Ar===Wt||Xe<fr)return Ar;_r=Ar+1}else{if(!(In>Xe))throw new ae("Input is not a number.");wr=Ar-1}return 0}class Ae{constructor(u,Xe,Wt){this.type=u,this.input=Xe,this.labels=[],this.outputs=[];for(const[u,Xe]of Wt)this.labels.push(u),this.outputs.push(Xe)}static parse(u,Xe){if(u.length-1<4)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return Xe.error("Expected an even number of arguments.");const Wt=Xe.parse(u[1],1,Io);if(!Wt)return null;const In=[];let fr=null;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(fr=Xe.expectedType);for(let Wt=1;Wt<u.length;Wt+=2){const _r=1===Wt?-1/0:u[Wt],wr=u[Wt+1],Ar=Wt,Kr=Wt+1;if("number"!=typeof _r)return Xe.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Ar);if(In.length&&In[In.length-1][0]>=_r)return Xe.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ar);const no=Xe.parse(wr,Kr,fr);if(!no)return null;fr=fr||no.type,In.push([_r,no])}return new Ae(fr,Wt,In)}evaluate(u){const Xe=this.labels,Wt=this.outputs;if(1===Xe.length)return Wt[0].evaluate(u);const In=this.input.evaluate(u);if(In<=Xe[0])return Wt[0].evaluate(u);const fr=Xe.length;return In>=Xe[fr-1]?Wt[fr-1].evaluate(u):Wt[_e(Xe,In)].evaluate(u)}eachChild(u){u(this.input);for(const Xe of this.outputs)u(Xe)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))}}function Se(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Jl=Me;function Me(u,Xe,Wt,In){this.cx=3*u,this.bx=3*(Wt-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Xe,this.by=3*(In-Xe)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=Xe,this.p2x=Wt,this.p2y=In}Me.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,Xe){if(void 0===Xe&&(Xe=1e-6),u<0)return 0;if(u>1)return 1;for(var Wt=u,In=0;In<8;In++){var fr=this.sampleCurveX(Wt)-u;if(Math.abs(fr)<Xe)return Wt;var _r=this.sampleCurveDerivativeX(Wt);if(Math.abs(_r)<1e-6)break;Wt-=fr/_r}var wr=0,Ar=1;for(Wt=u,In=0;In<20&&(fr=this.sampleCurveX(Wt),!(Math.abs(fr-u)<Xe));In++)u>fr?wr=Wt:Ar=Wt,Wt=.5*(Ar-wr)+wr;return Wt},solve:function(u,Xe){return this.sampleCurveY(this.solveCurveX(u,Xe))}};var Ql=Se(Jl);function ze(u,Xe,Wt){return u+Wt*(Xe-u)}function Pe(u,Xe,Wt){return u.map(((u,In)=>ze(u,Xe[In],Wt)))}const rc={number:ze,color:function(u,Xe,Wt,In="rgb"){switch(In){case"rgb":{const[In,fr,_r,wr]=Pe(u.rgb,Xe.rgb,Wt);return new Kt(In,fr,_r,wr,!1)}case"hcl":{const[In,fr,_r,wr]=u.hcl,[Ar,Kr,no,io]=Xe.hcl;let oo,ao;if(isNaN(In)||isNaN(Ar))isNaN(In)?isNaN(Ar)?oo=NaN:(oo=Ar,1!==_r&&0!==_r||(ao=Kr)):(oo=In,1!==no&&0!==no||(ao=fr));else{let u=Ar-In;Ar>In&&u>180?u-=360:Ar<In&&In-Ar>180&&(u+=360),oo=In+Wt*u}const[so,co,ho,go]=function([u,Xe,Wt,In]){return u=isNaN(u)?0:u*Vl,Ot([Wt,Math.cos(u)*Xe,Math.sin(u)*Xe,In])}([oo,null!=ao?ao:ze(fr,Kr,Wt),ze(_r,no,Wt),ze(wr,io,Wt)]);return new Kt(so,co,ho,go,!1)}case"lab":{const[In,fr,_r,wr]=Ot(Pe(u.lab,Xe.lab,Wt));return new Kt(In,fr,_r,wr,!1)}}},array:Pe,padding:function(u,Xe,Wt){return new Jt(Pe(u.values,Xe.values,Wt))},variableAnchorOffsetCollection:function(u,Xe,Wt){const In=u.values,fr=Xe.values;if(In.length!==fr.length)throw new ae(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${Xe.toString()}`);const _r=[];for(let u=0;u<In.length;u+=2){if(In[u]!==fr[u])throw new ae(`Cannot interpolate values containing mismatched anchors. from[${u}]: ${In[u]}, to[${u}]: ${fr[u]}`);_r.push(In[u]);const[Xe,wr]=In[u+1],[Ar,Kr]=fr[u+1];_r.push([ze(Xe,Ar,Wt),ze(wr,Kr,Wt)])}return new Qt(_r)}};class Be{constructor(u,Xe,Wt,In,fr){this.type=u,this.operator=Xe,this.interpolation=Wt,this.input=In,this.labels=[],this.outputs=[];for(const[u,Xe]of fr)this.labels.push(u),this.outputs.push(Xe)}static interpolationFactor(u,Xe,Wt,In){let fr=0;if("exponential"===u.name)fr=Ve(Xe,u.base,Wt,In);else if("linear"===u.name)fr=Ve(Xe,1,Wt,In);else if("cubic-bezier"===u.name){const _r=u.controlPoints;fr=new Ql(_r[0],_r[1],_r[2],_r[3]).solve(Ve(Xe,1,Wt,In))}return fr}static parse(u,Xe){let[Wt,In,fr,..._r]=u;if(!Array.isArray(In)||0===In.length)return Xe.error("Expected an interpolation type expression.",1);if("linear"===In[0])In={name:"linear"};else if("exponential"===In[0]){const u=In[1];if("number"!=typeof u)return Xe.error("Exponential interpolation requires a numeric base.",1,1);In={name:"exponential",base:u}}else{if("cubic-bezier"!==In[0])return Xe.error(`Unknown interpolation type ${String(In[0])}`,1,0);{const u=In.slice(1);if(4!==u.length||u.some((u=>"number"!=typeof u||u<0||u>1)))return Xe.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);In={name:"cubic-bezier",controlPoints:u}}}if(u.length-1<4)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return Xe.error("Expected an even number of arguments.");if(fr=Xe.parse(fr,2,Io),!fr)return null;const wr=[];let Ar=null;"interpolate-hcl"===Wt||"interpolate-lab"===Wt?Ar=ca:Xe.expectedType&&"value"!==Xe.expectedType.kind&&(Ar=Xe.expectedType);for(let u=0;u<_r.length;u+=2){const Wt=_r[u],In=_r[u+1],fr=u+3,Kr=u+4;if("number"!=typeof Wt)return Xe.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',fr);if(wr.length&&wr[wr.length-1][0]>=Wt)return Xe.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',fr);const no=Xe.parse(In,Kr,Ar);if(!no)return null;Ar=Ar||no.type,wr.push([Wt,no])}return Mt(Ar,Io)||Mt(Ar,ca)||Mt(Ar,vl)||Mt(Ar,Al)||Mt(Ar,bt(Io))?new Be(Ar,Wt,In,fr,wr):Xe.error(`Type ${wt(Ar)} is not interpolatable.`)}evaluate(u){const Xe=this.labels,Wt=this.outputs;if(1===Xe.length)return Wt[0].evaluate(u);const In=this.input.evaluate(u);if(In<=Xe[0])return Wt[0].evaluate(u);const fr=Xe.length;if(In>=Xe[fr-1])return Wt[fr-1].evaluate(u);const _r=_e(Xe,In),wr=Be.interpolationFactor(this.interpolation,In,Xe[_r],Xe[_r+1]),Ar=Wt[_r].evaluate(u),Kr=Wt[_r+1].evaluate(u);switch(this.operator){case"interpolate":return rc[this.type.kind](Ar,Kr,wr);case"interpolate-hcl":return rc.color(Ar,Kr,wr,"hcl");case"interpolate-lab":return rc.color(Ar,Kr,wr,"lab")}}eachChild(u){u(this.input);for(const Xe of this.outputs)u(Xe)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))}}function Ve(u,Xe,Wt,In){const fr=In-Wt,_r=u-Wt;return 0===fr?0:1===Xe?_r/fr:(Math.pow(Xe,_r)-1)/(Math.pow(Xe,fr)-1)}class Ee{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expectected at least one argument.");let Wt=null;const In=Xe.expectedType;In&&"value"!==In.kind&&(Wt=In);const fr=[];for(const In of u.slice(1)){const u=Xe.parse(In,1+fr.length,Wt,void 0,{typeAnnotation:"omit"});if(!u)return null;Wt=Wt||u.type,fr.push(u)}if(!Wt)throw new Error("No output type");const _r=In&&fr.some((u=>At(In,u.type)));return new Ee(_r?Da:Wt,fr)}evaluate(u){let Xe,Wt=null,In=0;for(const fr of this.args)if(In++,Wt=fr.evaluate(u),Wt&&Wt instanceof te&&!Wt.available&&(Xe||(Xe=Wt.name),Wt=null,In===this.args.length&&(Wt=Xe)),null!==Wt)break;return Wt}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}function Fe(u,Xe){return"=="===u||"!="===u?"boolean"===Xe.kind||"string"===Xe.kind||"number"===Xe.kind||"null"===Xe.kind||"value"===Xe.kind:"string"===Xe.kind||"number"===Xe.kind||"value"===Xe.kind}function Te(u,Xe,Wt,In){return 0===In.compare(Xe,Wt)}function $e(u,Xe,Wt){const In="=="!==u&&"!="!==u;return class i{constructor(u,Xe,Wt){this.type=Bo,this.lhs=u,this.rhs=Xe,this.collator=Wt,this.hasUntypedArgument="value"===u.type.kind||"value"===Xe.type.kind}static parse(u,Xe){if(3!==u.length&&4!==u.length)return Xe.error("Expected two or three arguments.");const Wt=u[0];let fr=Xe.parse(u[1],1,Da);if(!fr)return null;if(!Fe(Wt,fr.type))return Xe.concat(1).error(`"${Wt}" comparisons are not supported for type '${wt(fr.type)}'.`);let _r=Xe.parse(u[2],2,Da);if(!_r)return null;if(!Fe(Wt,_r.type))return Xe.concat(2).error(`"${Wt}" comparisons are not supported for type '${wt(_r.type)}'.`);if(fr.type.kind!==_r.type.kind&&"value"!==fr.type.kind&&"value"!==_r.type.kind)return Xe.error(`Cannot compare types '${wt(fr.type)}' and '${wt(_r.type)}'.`);In&&("value"===fr.type.kind&&"value"!==_r.type.kind?fr=new le(_r.type,[fr]):"value"!==fr.type.kind&&"value"===_r.type.kind&&(_r=new le(fr.type,[_r])));let wr=null;if(4===u.length){if("string"!==fr.type.kind&&"string"!==_r.type.kind&&"value"!==fr.type.kind&&"value"!==_r.type.kind)return Xe.error("Cannot use collator to compare non-string types.");if(wr=Xe.parse(u[3],3,ns),!wr)return null}return new i(fr,_r,wr)}evaluate(fr){const _r=this.lhs.evaluate(fr),wr=this.rhs.evaluate(fr);if(In&&this.hasUntypedArgument){const Xe=ne(_r),Wt=ne(wr);if(Xe.kind!==Wt.kind||"string"!==Xe.kind&&"number"!==Xe.kind)throw new ae(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${Xe.kind}, ${Wt.kind}) instead.`)}if(this.collator&&!In&&this.hasUntypedArgument){const u=ne(_r),Wt=ne(wr);if("string"!==u.kind||"string"!==Wt.kind)return Xe(fr,_r,wr)}return this.collator?Wt(fr,_r,wr,this.collator.evaluate(fr)):Xe(fr,_r,wr)}eachChild(u){u(this.lhs),u(this.rhs),this.collator&&u(this.collator)}outputDefined(){return!0}}}const ic=$e("==",(function(u,Xe,Wt){return Xe===Wt}),Te),oc=$e("!=",(function(u,Xe,Wt){return Xe!==Wt}),(function(u,Xe,Wt,In){return!Te(0,Xe,Wt,In)})),lc=$e("<",(function(u,Xe,Wt){return Xe<Wt}),(function(u,Xe,Wt,In){return In.compare(Xe,Wt)<0})),gc=$e(">",(function(u,Xe,Wt){return Xe>Wt}),(function(u,Xe,Wt,In){return In.compare(Xe,Wt)>0})),bc=$e("<=",(function(u,Xe,Wt){return Xe<=Wt}),(function(u,Xe,Wt,In){return In.compare(Xe,Wt)<=0})),eu=$e(">=",(function(u,Xe,Wt){return Xe>=Wt}),(function(u,Xe,Wt,In){return In.compare(Xe,Wt)>=0}));class qe{constructor(u,Xe,Wt){this.type=ns,this.locale=Wt,this.caseSensitive=u,this.diacriticSensitive=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error("Expected one argument.");const Wt=u[1];if("object"!=typeof Wt||Array.isArray(Wt))return Xe.error("Collator options argument must be an object.");const In=Xe.parse(void 0!==Wt["case-sensitive"]&&Wt["case-sensitive"],1,Bo);if(!In)return null;const fr=Xe.parse(void 0!==Wt["diacritic-sensitive"]&&Wt["diacritic-sensitive"],1,Bo);if(!fr)return null;let _r=null;return Wt.locale&&(_r=Xe.parse(Wt.locale,1,zo),!_r)?null:new qe(In,fr,_r)}evaluate(u){return new Xt(this.caseSensitive.evaluate(u),this.diacriticSensitive.evaluate(u),this.locale?this.locale.evaluate(u):null)}eachChild(u){u(this.caseSensitive),u(this.diacriticSensitive),this.locale&&u(this.locale)}outputDefined(){return!1}}class Ne{constructor(u,Xe,Wt,In,fr){this.type=zo,this.number=u,this.locale=Xe,this.currency=Wt,this.minFractionDigits=In,this.maxFractionDigits=fr}static parse(u,Xe){if(3!==u.length)return Xe.error("Expected two arguments.");const Wt=Xe.parse(u[1],1,Io);if(!Wt)return null;const In=u[2];if("object"!=typeof In||Array.isArray(In))return Xe.error("NumberFormat options argument must be an object.");let fr=null;if(In.locale&&(fr=Xe.parse(In.locale,1,zo),!fr))return null;let _r=null;if(In.currency&&(_r=Xe.parse(In.currency,1,zo),!_r))return null;let wr=null;if(In["min-fraction-digits"]&&(wr=Xe.parse(In["min-fraction-digits"],1,Io),!wr))return null;let Ar=null;return In["max-fraction-digits"]&&(Ar=Xe.parse(In["max-fraction-digits"],1,Io),!Ar)?null:new Ne(Wt,fr,_r,wr,Ar)}evaluate(u){return new Intl.NumberFormat(this.locale?this.locale.evaluate(u):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(u):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(u):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(u):void 0}).format(this.number.evaluate(u))}eachChild(u){u(this.number),this.locale&&u(this.locale),this.currency&&u(this.currency),this.minFractionDigits&&u(this.minFractionDigits),this.maxFractionDigits&&u(this.maxFractionDigits)}outputDefined(){return!1}}class Ze{constructor(u){this.type=yl,this.sections=u}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");const Wt=u[1];if(!Array.isArray(Wt)&&"object"==typeof Wt)return Xe.error("First argument must be an image or text section.");const In=[];let fr=!1;for(let Wt=1;Wt<=u.length-1;++Wt){const _r=u[Wt];if(fr&&"object"==typeof _r&&!Array.isArray(_r)){fr=!1;let u=null;if(_r["font-scale"]&&(u=Xe.parse(_r["font-scale"],1,Io),!u))return null;let Wt=null;if(_r["text-font"]&&(Wt=Xe.parse(_r["text-font"],1,bt(zo)),!Wt))return null;let wr=null;if(_r["text-color"]&&(wr=Xe.parse(_r["text-color"],1,ca),!wr))return null;const Ar=In[In.length-1];Ar.scale=u,Ar.font=Wt,Ar.textColor=wr}else{const _r=Xe.parse(u[Wt],1,Da);if(!_r)return null;const wr=_r.type.kind;if("string"!==wr&&"value"!==wr&&"null"!==wr&&"resolvedImage"!==wr)return Xe.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");fr=!0,In.push({content:_r,scale:null,font:null,textColor:null})}}return new Ze(In)}evaluate(u){return new Yt(this.sections.map((Xe=>{const Wt=Xe.content.evaluate(u);return ne(Wt)===kl?new Ht("",Wt,null,null,null):new Ht(ie(Wt),null,Xe.scale?Xe.scale.evaluate(u):null,Xe.font?Xe.font.evaluate(u).join(","):null,Xe.textColor?Xe.textColor.evaluate(u):null)})))}eachChild(u){for(const Xe of this.sections)u(Xe.content),Xe.scale&&u(Xe.scale),Xe.font&&u(Xe.font),Xe.textColor&&u(Xe.textColor)}outputDefined(){return!1}}class Ge{constructor(u){this.type=kl,this.input=u}static parse(u,Xe){if(2!==u.length)return Xe.error("Expected two arguments.");const Wt=Xe.parse(u[1],1,zo);return Wt?new Ge(Wt):Xe.error("No image name provided.")}evaluate(u){const Xe=this.input.evaluate(u),Wt=te.fromString(Xe);return Wt&&u.availableImages&&(Wt.available=u.availableImages.indexOf(Xe)>-1),Wt}eachChild(u){u(this.input)}outputDefined(){return!1}}class Ke{constructor(u){this.type=Io,this.input=u}static parse(u,Xe){if(2!==u.length)return Xe.error(`Expected 1 argument, but found ${u.length-1} instead.`);const Wt=Xe.parse(u[1],1);return Wt?"array"!==Wt.type.kind&&"string"!==Wt.type.kind&&"value"!==Wt.type.kind?Xe.error(`Expected argument of type string or array, but found ${wt(Wt.type)} instead.`):new Ke(Wt):null}evaluate(u){const Xe=this.input.evaluate(u);if("string"==typeof Xe)return[...Xe].length;if(Array.isArray(Xe))return Xe.length;throw new ae(`Expected value to be of type string or array, but found ${wt(ne(Xe))} instead.`)}eachChild(u){u(this.input)}outputDefined(){return!1}}const tu=8192;function He(u,Xe){const Wt=(180+u[0])/360,In=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,fr=Math.pow(2,Xe.z);return[Math.round(Wt*fr*tu),Math.round(In*fr*tu)]}function Ye(u,Xe){const Wt=Math.pow(2,Xe.z);return[(fr=(u[0]/tu+Xe.x)/Wt,360*fr-180),(In=(u[1]/tu+Xe.y)/Wt,360/Math.PI*Math.atan(Math.exp((180-360*In)*Math.PI/180))-90)];var In,fr}function Je(u,Xe){u[0]=Math.min(u[0],Xe[0]),u[1]=Math.min(u[1],Xe[1]),u[2]=Math.max(u[2],Xe[0]),u[3]=Math.max(u[3],Xe[1])}function We(u,Xe){return!(u[0]<=Xe[0]||u[2]>=Xe[2]||u[1]<=Xe[1]||u[3]>=Xe[3])}function Qe(u,Xe,Wt){const In=u[0]-Xe[0],fr=u[1]-Xe[1],_r=u[0]-Wt[0],wr=u[1]-Wt[1];return In*wr-_r*fr==0&&In*_r<=0&&fr*wr<=0}function tr(u,Xe,Wt,In){return 0!=(fr=[In[0]-Wt[0],In[1]-Wt[1]])[0]*(_r=[Xe[0]-u[0],Xe[1]-u[1]])[1]-fr[1]*_r[0]&&!(!ar(u,Xe,Wt,In)||!ar(Wt,In,u,Xe));var fr,_r}function er(u,Xe,Wt){for(const In of Wt)for(let Wt=0;Wt<In.length-1;++Wt)if(tr(u,Xe,In[Wt],In[Wt+1]))return!0;return!1}function rr(u,Xe,Wt=!1){let In=!1;for(const Ar of Xe)for(let Xe=0;Xe<Ar.length-1;Xe++){if(Qe(u,Ar[Xe],Ar[Xe+1]))return Wt;(_r=Ar[Xe])[1]>(fr=u)[1]!=(wr=Ar[Xe+1])[1]>fr[1]&&fr[0]<(wr[0]-_r[0])*(fr[1]-_r[1])/(wr[1]-_r[1])+_r[0]&&(In=!In)}var fr,_r,wr;return In}function nr(u,Xe){for(const Wt of Xe)if(rr(u,Wt))return!0;return!1}function ir(u,Xe){for(const Wt of u)if(!rr(Wt,Xe))return!1;for(let Wt=0;Wt<u.length-1;++Wt)if(er(u[Wt],u[Wt+1],Xe))return!1;return!0}function sr(u,Xe){for(const Wt of Xe)if(ir(u,Wt))return!0;return!1}function ar(u,Xe,Wt,In){const fr=In[0]-Wt[0],_r=In[1]-Wt[1],wr=(u[0]-Wt[0])*_r-fr*(u[1]-Wt[1]),Ar=(Xe[0]-Wt[0])*_r-fr*(Xe[1]-Wt[1]);return wr>0&&Ar<0||wr<0&&Ar>0}function or(u,Xe,Wt){const In=[];for(let fr=0;fr<u.length;fr++){const _r=[];for(let In=0;In<u[fr].length;In++){const wr=He(u[fr][In],Wt);Je(Xe,wr),_r.push(wr)}In.push(_r)}return In}function lr(u,Xe,Wt){const In=[];for(let fr=0;fr<u.length;fr++){const _r=or(u[fr],Xe,Wt);In.push(_r)}return In}function ur(u,Xe,Wt,In){if(u[0]<Wt[0]||u[0]>Wt[2]){const Xe=.5*In;let fr=u[0]-Wt[0]>Xe?-In:Wt[0]-u[0]>Xe?In:0;0===fr&&(fr=u[0]-Wt[2]>Xe?-In:Wt[2]-u[0]>Xe?In:0),u[0]+=fr}Je(Xe,u)}function cr(u,Xe,Wt,In){const fr=Math.pow(2,In.z)*tu,_r=[In.x*tu,In.y*tu],wr=[];for(const In of u)for(const u of In){const In=[u.x+_r[0],u.y+_r[1]];ur(In,Xe,Wt,fr),wr.push(In)}return wr}function hr(u,Xe,Wt,In){const fr=Math.pow(2,In.z)*tu,_r=[In.x*tu,In.y*tu],wr=[];for(const Wt of u){const u=[];for(const In of Wt){const Wt=[In.x+_r[0],In.y+_r[1]];Je(Xe,Wt),u.push(Wt)}wr.push(u)}if(Xe[2]-Xe[0]<=fr/2){(Ar=Xe)[0]=Ar[1]=1/0,Ar[2]=Ar[3]=-1/0;for(const u of wr)for(const In of u)ur(In,Xe,Wt,fr)}var Ar;return wr}class pr{constructor(u,Xe){this.type=Bo,this.geojson=u,this.geometries=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'within' expression requires exactly one argument, but found ${u.length-1} instead.`);if(re(u[1])){const Xe=u[1];if("FeatureCollection"===Xe.type){const u=[];for(const Wt of Xe.features){const{type:Xe,coordinates:In}=Wt.geometry;"Polygon"===Xe&&u.push(In),"MultiPolygon"===Xe&&u.push(...In)}if(u.length)return new pr(Xe,{type:"MultiPolygon",coordinates:u})}else if("Feature"===Xe.type){const u=Xe.geometry.type;if("Polygon"===u||"MultiPolygon"===u)return new pr(Xe,Xe.geometry)}else if("Polygon"===Xe.type||"MultiPolygon"===Xe.type)return new pr(Xe,Xe)}return Xe.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(null!=u.geometry()&&null!=u.canonicalID()){if("Point"===u.geometryType())return function(u,Xe){const Wt=[1/0,1/0,-1/0,-1/0],In=[1/0,1/0,-1/0,-1/0],fr=u.canonicalID();if("Polygon"===Xe.type){const _r=or(Xe.coordinates,In,fr),wr=cr(u.geometry(),Wt,In,fr);if(!We(Wt,In))return!1;for(const u of wr)if(!rr(u,_r))return!1}if("MultiPolygon"===Xe.type){const _r=lr(Xe.coordinates,In,fr),wr=cr(u.geometry(),Wt,In,fr);if(!We(Wt,In))return!1;for(const u of wr)if(!nr(u,_r))return!1}return!0}(u,this.geometries);if("LineString"===u.geometryType())return function(u,Xe){const Wt=[1/0,1/0,-1/0,-1/0],In=[1/0,1/0,-1/0,-1/0],fr=u.canonicalID();if("Polygon"===Xe.type){const _r=or(Xe.coordinates,In,fr),wr=hr(u.geometry(),Wt,In,fr);if(!We(Wt,In))return!1;for(const u of wr)if(!ir(u,_r))return!1}if("MultiPolygon"===Xe.type){const _r=lr(Xe.coordinates,In,fr),wr=hr(u.geometry(),Wt,In,fr);if(!We(Wt,In))return!1;for(const u of wr)if(!sr(u,_r))return!1}return!0}(u,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let nu=class{constructor(u=[],Xe=(u,Xe)=>u<Xe?-1:u>Xe?1:0){if(this.data=u,this.length=this.data.length,this.compare=Xe,this.length>0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(0===this.length)return;const u=this.data[0],Xe=this.data.pop();return--this.length>0&&(this.data[0]=Xe,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:Xe,compare:Wt}=this,In=Xe[u];for(;u>0;){const fr=u-1>>1,_r=Xe[fr];if(Wt(In,_r)>=0)break;Xe[u]=_r,u=fr}Xe[u]=In}_down(u){const{data:Xe,compare:Wt}=this,In=this.length>>1,fr=Xe[u];for(;u<In;){let In=1+(u<<1);const _r=In+1;if(_r<this.length&&Wt(Xe[_r],Xe[In])<0&&(In=_r),Wt(Xe[In],fr)>=0)break;Xe[u]=Xe[In],u=In}Xe[u]=fr}};function dr(u,Xe,Wt,In,fr){yr(u,Xe,Wt,In||u.length-1,fr||gr)}function yr(u,Xe,Wt,In,fr){for(;In>Wt;){if(In-Wt>600){var _r=In-Wt+1,wr=Xe-Wt+1,Ar=Math.log(_r),Kr=.5*Math.exp(2*Ar/3),no=.5*Math.sqrt(Ar*Kr*(_r-Kr)/_r)*(wr-_r/2<0?-1:1);yr(u,Xe,Math.max(Wt,Math.floor(Xe-wr*Kr/_r+no)),Math.min(In,Math.floor(Xe+(_r-wr)*Kr/_r+no)),fr)}var io=u[Xe],oo=Wt,ao=In;for(mr(u,Wt,Xe),fr(u[In],io)>0&&mr(u,Wt,In);oo<ao;){for(mr(u,oo,ao),oo++,ao--;fr(u[oo],io)<0;)oo++;for(;fr(u[ao],io)>0;)ao--}0===fr(u[Wt],io)?mr(u,Wt,ao):mr(u,++ao,In),ao<=Xe&&(Wt=ao+1),Xe<=ao&&(In=ao-1)}}function mr(u,Xe,Wt){var In=u[Xe];u[Xe]=u[Wt],u[Wt]=In}function gr(u,Xe){return u<Xe?-1:u>Xe?1:0}function xr(u,Xe){if(u.length<=1)return[u];const Wt=[];let In,fr;for(const Xe of u){const u=br(Xe);0!==u&&(Xe.area=Math.abs(u),void 0===fr&&(fr=u<0),fr===u<0?(In&&Wt.push(In),In=[Xe]):In.push(Xe))}if(In&&Wt.push(In),Xe>1)for(let u=0;u<Wt.length;u++)Wt[u].length<=Xe||(dr(Wt[u],Xe,1,Wt[u].length-1,vr),Wt[u]=Wt[u].slice(0,Xe));return Wt}function vr(u,Xe){return Xe.area-u.area}function br(u){let Xe=0;for(let Wt,In,fr=0,_r=u.length,wr=_r-1;fr<_r;wr=fr++)Wt=u[fr],In=u[wr],Xe+=(In.x-Wt.x)*(Wt.y+In.y);return Xe}const iu=1/298.257223563,su=iu*(2-iu),cu=Math.PI/180;class Sr{constructor(u){const Xe=6378.137*cu*1e3,Wt=Math.cos(u*cu),In=1/(1-su*(1-Wt*Wt)),fr=Math.sqrt(In);this.kx=Xe*fr*Wt,this.ky=Xe*fr*In*(1-su)}distance(u,Xe){const Wt=this.wrap(u[0]-Xe[0])*this.kx,In=(u[1]-Xe[1])*this.ky;return Math.sqrt(Wt*Wt+In*In)}pointOnLine(u,Xe){let Wt,In,fr,_r,wr=1/0;for(let Ar=0;Ar<u.length-1;Ar++){let Kr=u[Ar][0],no=u[Ar][1],io=this.wrap(u[Ar+1][0]-Kr)*this.kx,oo=(u[Ar+1][1]-no)*this.ky,ao=0;0===io&&0===oo||(ao=(this.wrap(Xe[0]-Kr)*this.kx*io+(Xe[1]-no)*this.ky*oo)/(io*io+oo*oo),ao>1?(Kr=u[Ar+1][0],no=u[Ar+1][1]):ao>0&&(Kr+=io/this.kx*ao,no+=oo/this.ky*ao)),io=this.wrap(Xe[0]-Kr)*this.kx,oo=(Xe[1]-no)*this.ky;const so=io*io+oo*oo;so<wr&&(wr=so,Wt=Kr,In=no,fr=Ar,_r=ao)}return{point:[Wt,In],index:fr,t:Math.max(0,Math.min(1,_r))}}wrap(u){for(;u<-180;)u+=360;for(;u>180;)u-=360;return u}}function kr(u,Xe){return Xe[0]-u[0]}function Mr(u){return u[1]-u[0]+1}function Ir(u,Xe){return u[1]>=u[0]&&u[1]<Xe}function zr(u,Xe){if(u[0]>u[1])return[null,null];const Wt=Mr(u);if(Xe){if(2===Wt)return[u,null];const Xe=Math.floor(Wt/2);return[[u[0],u[0]+Xe],[u[0]+Xe,u[1]]]}if(1===Wt)return[u,null];const In=Math.floor(Wt/2)-1;return[[u[0],u[0]+In],[u[0]+In+1,u[1]]]}function Pr(u,Xe){if(!Ir(Xe,u.length))return[1/0,1/0,-1/0,-1/0];const Wt=[1/0,1/0,-1/0,-1/0];for(let In=Xe[0];In<=Xe[1];++In)Je(Wt,u[In]);return Wt}function Cr(u){const Xe=[1/0,1/0,-1/0,-1/0];for(const Wt of u)for(const u of Wt)Je(Xe,u);return Xe}function Br(u){return u[0]!==-1/0&&u[1]!==-1/0&&u[2]!==1/0&&u[3]!==1/0}function Vr(u,Xe,Wt){if(!Br(u)||!Br(Xe))return NaN;let In=0,fr=0;return u[2]<Xe[0]&&(In=Xe[0]-u[2]),u[0]>Xe[2]&&(In=u[0]-Xe[2]),u[1]>Xe[3]&&(fr=u[1]-Xe[3]),u[3]<Xe[1]&&(fr=Xe[1]-u[3]),Wt.distance([0,0],[In,fr])}function Er(u,Xe,Wt){const In=Wt.pointOnLine(Xe,u);return Wt.distance(u,In.point)}function Fr(u,Xe,Wt,In,fr){const _r=Math.min(Er(u,[Wt,In],fr),Er(Xe,[Wt,In],fr)),wr=Math.min(Er(Wt,[u,Xe],fr),Er(In,[u,Xe],fr));return Math.min(_r,wr)}function Tr(u,Xe,Wt,In,fr){if(!Ir(Xe,u.length)||!Ir(In,Wt.length))return 1/0;let _r=1/0;for(let wr=Xe[0];wr<Xe[1];++wr){const Xe=u[wr],Ar=u[wr+1];for(let u=In[0];u<In[1];++u){const In=Wt[u],wr=Wt[u+1];if(tr(Xe,Ar,In,wr))return 0;_r=Math.min(_r,Fr(Xe,Ar,In,wr,fr))}}return _r}function $r(u,Xe,Wt,In,fr){if(!Ir(Xe,u.length)||!Ir(In,Wt.length))return NaN;let _r=1/0;for(let wr=Xe[0];wr<=Xe[1];++wr)for(let Xe=In[0];Xe<=In[1];++Xe)if(_r=Math.min(_r,fr.distance(u[wr],Wt[Xe])),0===_r)return _r;return _r}function Lr(u,Xe,Wt){if(rr(u,Xe,!0))return 0;let In=1/0;for(const fr of Xe){const Xe=fr[0],_r=fr[fr.length-1];if(Xe!==_r&&(In=Math.min(In,Er(u,[_r,Xe],Wt)),0===In))return In;const wr=Wt.pointOnLine(fr,u);if(In=Math.min(In,Wt.distance(u,wr.point)),0===In)return In}return In}function Dr(u,Xe,Wt,In){if(!Ir(Xe,u.length))return NaN;for(let In=Xe[0];In<=Xe[1];++In)if(rr(u[In],Wt,!0))return 0;let fr=1/0;for(let _r=Xe[0];_r<Xe[1];++_r){const Xe=u[_r],wr=u[_r+1];for(const u of Wt)for(let Wt=0,_r=u.length,Ar=_r-1;Wt<_r;Ar=Wt++){const _r=u[Ar],Kr=u[Wt];if(tr(Xe,wr,_r,Kr))return 0;fr=Math.min(fr,Fr(Xe,wr,_r,Kr,In))}}return fr}function Or(u,Xe){for(const Wt of u)for(const u of Wt)if(rr(u,Xe,!0))return!0;return!1}function jr(u,Xe,Wt,In=1/0){const fr=Cr(u),_r=Cr(Xe);if(In!==1/0&&Vr(fr,_r,Wt)>=In)return In;if(We(fr,_r)){if(Or(u,Xe))return 0}else if(Or(Xe,u))return 0;let wr=1/0;for(const In of u)for(let u=0,fr=In.length,_r=fr-1;u<fr;_r=u++){const fr=In[_r],Ar=In[u];for(const u of Xe)for(let Xe=0,In=u.length,_r=In-1;Xe<In;_r=Xe++){const In=u[_r],Kr=u[Xe];if(tr(fr,Ar,In,Kr))return 0;wr=Math.min(wr,Fr(fr,Ar,In,Kr,Wt))}}return wr}function Rr(u,Xe,Wt,In,fr,_r){if(!_r)return;const wr=Vr(Pr(In,_r),fr,Wt);wr<Xe&&u.push([wr,_r,[0,0]])}function Ur(u,Xe,Wt,In,fr,_r,wr){if(!_r||!wr)return;const Ar=Vr(Pr(In,_r),Pr(fr,wr),Wt);Ar<Xe&&u.push([Ar,_r,wr])}function qr(u,Xe,Wt,In,fr=1/0){let _r=Math.min(In.distance(u[0],Wt[0][0]),fr);if(0===_r)return _r;const wr=new nu([[0,[0,u.length-1],[0,0]]],kr),Ar=Cr(Wt);for(;wr.length>0;){const fr=wr.pop();if(fr[0]>=_r)continue;const Kr=fr[1],no=Xe?50:100;if(Mr(Kr)<=no){if(!Ir(Kr,u.length))return NaN;if(Xe){const Xe=Dr(u,Kr,Wt,In);if(isNaN(Xe)||0===Xe)return Xe;_r=Math.min(_r,Xe)}else for(let Xe=Kr[0];Xe<=Kr[1];++Xe){const fr=Lr(u[Xe],Wt,In);if(_r=Math.min(_r,fr),0===_r)return 0}}else{const Wt=zr(Kr,Xe);Rr(wr,_r,In,u,Ar,Wt[0]),Rr(wr,_r,In,u,Ar,Wt[1])}}return _r}function Nr(u,Xe,Wt,In,fr,_r=1/0){let wr=Math.min(_r,fr.distance(u[0],Wt[0]));if(0===wr)return wr;const Ar=new nu([[0,[0,u.length-1],[0,Wt.length-1]]],kr);for(;Ar.length>0;){const _r=Ar.pop();if(_r[0]>=wr)continue;const Kr=_r[1],no=_r[2],io=Xe?50:100,oo=In?50:100;if(Mr(Kr)<=io&&Mr(no)<=oo){if(!Ir(Kr,u.length)&&Ir(no,Wt.length))return NaN;let _r;if(Xe&&In)_r=Tr(u,Kr,Wt,no,fr),wr=Math.min(wr,_r);else if(Xe&&!In){const Xe=u.slice(Kr[0],Kr[1]+1);for(let u=no[0];u<=no[1];++u)if(_r=Er(Wt[u],Xe,fr),wr=Math.min(wr,_r),0===wr)return wr}else if(!Xe&&In){const Xe=Wt.slice(no[0],no[1]+1);for(let Wt=Kr[0];Wt<=Kr[1];++Wt)if(_r=Er(u[Wt],Xe,fr),wr=Math.min(wr,_r),0===wr)return wr}else _r=$r(u,Kr,Wt,no,fr),wr=Math.min(wr,_r)}else{const _r=zr(Kr,Xe),io=zr(no,In);Ur(Ar,wr,fr,u,Wt,_r[0],io[0]),Ur(Ar,wr,fr,u,Wt,_r[0],io[1]),Ur(Ar,wr,fr,u,Wt,_r[1],io[0]),Ur(Ar,wr,fr,u,Wt,_r[1],io[1])}}return wr}function Zr(u){return"MultiPolygon"===u.type?u.coordinates.map((u=>({type:"Polygon",coordinates:u}))):"MultiLineString"===u.type?u.coordinates.map((u=>({type:"LineString",coordinates:u}))):"MultiPoint"===u.type?u.coordinates.map((u=>({type:"Point",coordinates:u}))):[u]}class Gr{constructor(u,Xe){this.type=Io,this.geojson=u,this.geometries=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'distance' expression requires exactly one argument, but found ${u.length-1} instead.`);if(re(u[1])){const Xe=u[1];if("FeatureCollection"===Xe.type)return new Gr(Xe,Xe.features.map((u=>Zr(u.geometry))).flat());if("Feature"===Xe.type)return new Gr(Xe,Zr(Xe.geometry));if("type"in Xe&&"coordinates"in Xe)return new Gr(Xe,Zr(Xe))}return Xe.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(null!=u.geometry()&&null!=u.canonicalID()){if("Point"===u.geometryType())return function(u,Xe){const Wt=u.geometry(),In=Wt.flat().map((Xe=>Ye([Xe.x,Xe.y],u.canonical)));if(0===Wt.length)return NaN;const fr=new Sr(In[0][1]);let _r=1/0;for(const u of Xe){switch(u.type){case"Point":_r=Math.min(_r,Nr(In,!1,[u.coordinates],!1,fr,_r));break;case"LineString":_r=Math.min(_r,Nr(In,!1,u.coordinates,!0,fr,_r));break;case"Polygon":_r=Math.min(_r,qr(In,!1,u.coordinates,fr,_r))}if(0===_r)return _r}return _r}(u,this.geometries);if("LineString"===u.geometryType())return function(u,Xe){const Wt=u.geometry(),In=Wt.flat().map((Xe=>Ye([Xe.x,Xe.y],u.canonical)));if(0===Wt.length)return NaN;const fr=new Sr(In[0][1]);let _r=1/0;for(const u of Xe){switch(u.type){case"Point":_r=Math.min(_r,Nr(In,!0,[u.coordinates],!1,fr,_r));break;case"LineString":_r=Math.min(_r,Nr(In,!0,u.coordinates,!0,fr,_r));break;case"Polygon":_r=Math.min(_r,qr(In,!0,u.coordinates,fr,_r))}if(0===_r)return _r}return _r}(u,this.geometries);if("Polygon"===u.geometryType())return function(u,Xe){const Wt=u.geometry();if(0===Wt.length||0===Wt[0].length)return NaN;const In=xr(Wt,0).map((Xe=>Xe.map((Xe=>Xe.map((Xe=>Ye([Xe.x,Xe.y],u.canonical))))))),fr=new Sr(In[0][0][0][1]);let _r=1/0;for(const u of Xe)for(const Xe of In){switch(u.type){case"Point":_r=Math.min(_r,qr([u.coordinates],!1,Xe,fr,_r));break;case"LineString":_r=Math.min(_r,qr(u.coordinates,!0,Xe,fr,_r));break;case"Polygon":_r=Math.min(_r,jr(Xe,u.coordinates,fr,_r))}if(0===_r)return _r}return _r}(u,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const uu={"==":ic,"!=":oc,">":gc,"<":lc,">=":eu,"<=":bc,array:le,at:me,boolean:le,case:be,coalesce:Ee,collator:qe,format:Ze,image:Ge,in:ge,"index-of":xe,interpolate:Be,"interpolate-hcl":Be,"interpolate-lab":Be,length:Ke,let:de,literal:se,match:ve,number:le,"number-format":Ne,object:le,slice:we,step:Ae,string:le,"to-boolean":ce,"to-color":ce,"to-number":ce,"to-string":ce,var:ye,within:pr,distance:Gr};class Xr{constructor(u,Xe,Wt,In){this.name=u,this.type=Xe,this._evaluate=Wt,this.args=In}evaluate(u){return this._evaluate(u,this.args)}eachChild(u){this.args.forEach(u)}outputDefined(){return!1}static parse(u,Xe){const Wt=u[0],In=Xr.definitions[Wt];if(!In)return Xe.error(`Unknown expression "${Wt}". If you wanted a literal array, use ["literal", [...]].`,0);const fr=Array.isArray(In)?In[0]:In.type,_r=Array.isArray(In)?[[In[1],In[2]]]:In.overloads,wr=_r.filter((([Xe])=>!Array.isArray(Xe)||Xe.length===u.length-1));let Ar=null;for(const[In,_r]of wr){Ar=new fe(Xe.registry,Qr,Xe.path,null,Xe.scope);const wr=[];let Kr=!1;for(let Xe=1;Xe<u.length;Xe++){const Wt=u[Xe],fr=Array.isArray(In)?In[Xe-1]:In.type,_r=Ar.parse(Wt,1+wr.length,fr);if(!_r){Kr=!0;break}wr.push(_r)}if(!Kr)if(Array.isArray(In)&&In.length!==wr.length)Ar.error(`Expected ${In.length} arguments, but found ${wr.length} instead.`);else{for(let u=0;u<wr.length;u++){const Xe=Array.isArray(In)?In[u]:In.type,Wt=wr[u];Ar.concat(u+1).checkSubtype(Xe,Wt.type)}if(0===Ar.errors.length)return new Xr(Wt,fr,_r,wr)}}if(1===wr.length)Xe.errors.push(...Ar.errors);else{const Wt=(wr.length?wr:_r).map((([u])=>{return Xe=u,Array.isArray(Xe)?`(${Xe.map(wt).join(", ")})`:`(${wt(Xe.type)}...)`;var Xe})).join(" | "),In=[];for(let Wt=1;Wt<u.length;Wt++){const fr=Xe.parse(u[Wt],1+In.length);if(!fr)return null;In.push(wt(fr.type))}Xe.error(`Expected arguments of type ${Wt}, but found (${In.join(", ")}) instead.`)}return null}static register(u,Xe){Xr.definitions=Xe;for(const Wt in Xe)u[Wt]=Xr}}function Hr(u,[Xe,Wt,In,fr]){Xe=Xe.evaluate(u),Wt=Wt.evaluate(u),In=In.evaluate(u);const _r=fr?fr.evaluate(u):1,wr=ee(Xe,Wt,In,_r);if(wr)throw new ae(wr);return new Kt(Xe/255,Wt/255,In/255,_r,!1)}function Yr(u,Xe){return u in Xe}function Jr(u,Xe){const Wt=Xe[u];return void 0===Wt?null:Wt}function Wr(u){return{type:u}}function Qr(u){if(u instanceof ye)return Qr(u.boundExpression);if(u instanceof Xr&&"error"===u.name)return!1;if(u instanceof qe)return!1;if(u instanceof pr)return!1;if(u instanceof Gr)return!1;const Xe=u instanceof ce||u instanceof le;let Wt=!0;return u.eachChild((u=>{Wt=Xe?Wt&&Qr(u):Wt&&u instanceof se})),!!Wt&&tn(u)&&rn(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function tn(u){if(u instanceof Xr){if("get"===u.name&&1===u.args.length)return!1;if("feature-state"===u.name)return!1;if("has"===u.name&&1===u.args.length)return!1;if("properties"===u.name||"geometry-type"===u.name||"id"===u.name)return!1;if(/^filter-/.test(u.name))return!1}if(u instanceof pr)return!1;if(u instanceof Gr)return!1;let Xe=!0;return u.eachChild((u=>{Xe&&!tn(u)&&(Xe=!1)})),Xe}function en(u){if(u instanceof Xr&&"feature-state"===u.name)return!1;let Xe=!0;return u.eachChild((u=>{Xe&&!en(u)&&(Xe=!1)})),Xe}function rn(u,Xe){if(u instanceof Xr&&Xe.indexOf(u.name)>=0)return!1;let Wt=!0;return u.eachChild((u=>{Wt&&!rn(u,Xe)&&(Wt=!1)})),Wt}function nn(u){return{result:"success",value:u}}function sn(u){return{result:"error",value:u}}function an(u){return"data-driven"===u["property-type"]||"cross-faded-data-driven"===u["property-type"]}function on(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function ln(u){return!!u.expression&&u.expression.interpolated}function un(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":null===u?"null":typeof u}function cn(u){return"object"==typeof u&&null!==u&&!Array.isArray(u)}function hn(u){return u}function pn(u,Xe){const Wt="color"===Xe.type,In=u.stops&&"object"==typeof u.stops[0][0],fr=In||!(In||void 0!==u.property),_r=u.type||(ln(Xe)?"exponential":"interval");if(Wt||"padding"===Xe.type){const In=Wt?Kt.parse:Jt.parse;(u=st({},u)).stops&&(u.stops=u.stops.map((u=>[u[0],In(u[1])]))),u.default=In(u.default?u.default:Xe.default)}if(u.colorSpace&&"rgb"!==(wr=u.colorSpace)&&"hcl"!==wr&&"lab"!==wr)throw new Error(`Unknown color space: "${u.colorSpace}"`);var wr;let Ar,Kr,no;if("exponential"===_r)Ar=mn;else if("interval"===_r)Ar=yn;else if("categorical"===_r){Ar=dn,Kr=Object.create(null);for(const Xe of u.stops)Kr[Xe[0]]=Xe[1];no=typeof u.stops[0][0]}else{if("identity"!==_r)throw new Error(`Unknown function type "${_r}"`);Ar=gn}if(In){const Wt={},In=[];for(let Xe=0;Xe<u.stops.length;Xe++){const fr=u.stops[Xe],_r=fr[0].zoom;void 0===Wt[_r]&&(Wt[_r]={zoom:_r,type:u.type,property:u.property,default:u.default,stops:[]},In.push(_r)),Wt[_r].stops.push([fr[0].value,fr[1]])}const fr=[];for(const u of In)fr.push([Wt[u].zoom,pn(Wt[u],Xe)]);const _r={name:"linear"};return{kind:"composite",interpolationType:_r,interpolationFactor:Be.interpolationFactor.bind(void 0,_r),zoomStops:fr.map((u=>u[0])),evaluate:({zoom:Wt},In)=>mn({stops:fr,base:u.base},Xe,Wt).evaluate(Wt,In)}}if(fr){const Wt="exponential"===_r?{name:"exponential",base:void 0!==u.base?u.base:1}:null;return{kind:"camera",interpolationType:Wt,interpolationFactor:Be.interpolationFactor.bind(void 0,Wt),zoomStops:u.stops.map((u=>u[0])),evaluate:({zoom:Wt})=>Ar(u,Xe,Wt,Kr,no)}}return{kind:"source",evaluate(Wt,In){const fr=In&&In.properties?In.properties[u.property]:void 0;return void 0===fr?fn(u.default,Xe.default):Ar(u,Xe,fr,Kr,no)}}}function fn(u,Xe,Wt){return void 0!==u?u:void 0!==Xe?Xe:void 0!==Wt?Wt:void 0}function dn(u,Xe,Wt,In,fr){return fn(typeof Wt===fr?In[Wt]:void 0,u.default,Xe.default)}function yn(u,Xe,Wt){if("number"!==un(Wt))return fn(u.default,Xe.default);const In=u.stops.length;if(1===In)return u.stops[0][1];if(Wt<=u.stops[0][0])return u.stops[0][1];if(Wt>=u.stops[In-1][0])return u.stops[In-1][1];const fr=_e(u.stops.map((u=>u[0])),Wt);return u.stops[fr][1]}function mn(u,Xe,Wt){const In=void 0!==u.base?u.base:1;if("number"!==un(Wt))return fn(u.default,Xe.default);const fr=u.stops.length;if(1===fr)return u.stops[0][1];if(Wt<=u.stops[0][0])return u.stops[0][1];if(Wt>=u.stops[fr-1][0])return u.stops[fr-1][1];const _r=_e(u.stops.map((u=>u[0])),Wt),wr=function(u,Xe,Wt,In){const fr=In-Wt,_r=u-Wt;return 0===fr?0:1===Xe?_r/fr:(Math.pow(Xe,_r)-1)/(Math.pow(Xe,fr)-1)}(Wt,In,u.stops[_r][0],u.stops[_r+1][0]),Ar=u.stops[_r][1],Kr=u.stops[_r+1][1],no=rc[Xe.type]||hn;return"function"==typeof Ar.evaluate?{evaluate(...Xe){const Wt=Ar.evaluate.apply(void 0,Xe),In=Kr.evaluate.apply(void 0,Xe);if(void 0!==Wt&&void 0!==In)return no(Wt,In,wr,u.colorSpace)}}:no(Ar,Kr,wr,u.colorSpace)}function gn(u,Xe,Wt){switch(Xe.type){case"color":Wt=Kt.parse(Wt);break;case"formatted":Wt=Yt.fromString(Wt.toString());break;case"resolvedImage":Wt=te.fromString(Wt.toString());break;case"padding":Wt=Jt.parse(Wt);break;default:un(Wt)===Xe.type||"enum"===Xe.type&&Xe.values[Wt]||(Wt=void 0)}return fn(Wt,u.default,Xe.default)}Xr.register(uu,{error:[{kind:"error"},[zo],(u,[Xe])=>{throw new ae(Xe.evaluate(u))}],typeof:[zo,[Da],(u,[Xe])=>wt(ne(Xe.evaluate(u)))],"to-rgba":[bt(Io,4),[ca],(u,[Xe])=>{const[Wt,In,fr,_r]=Xe.evaluate(u).rgb;return[255*Wt,255*In,255*fr,_r]}],rgb:[ca,[Io,Io,Io],Hr],rgba:[ca,[Io,Io,Io,Io],Hr],has:{type:Bo,overloads:[[[zo],(u,[Xe])=>Yr(Xe.evaluate(u),u.properties())],[[zo,ua],(u,[Xe,Wt])=>Yr(Xe.evaluate(u),Wt.evaluate(u))]]},get:{type:Da,overloads:[[[zo],(u,[Xe])=>Jr(Xe.evaluate(u),u.properties())],[[zo,ua],(u,[Xe,Wt])=>Jr(Xe.evaluate(u),Wt.evaluate(u))]]},"feature-state":[Da,[zo],(u,[Xe])=>Jr(Xe.evaluate(u),u.featureState||{})],properties:[ua,[],u=>u.properties()],"geometry-type":[zo,[],u=>u.geometryType()],id:[Da,[],u=>u.id()],zoom:[Io,[],u=>u.globals.zoom],"heatmap-density":[Io,[],u=>u.globals.heatmapDensity||0],"line-progress":[Io,[],u=>u.globals.lineProgress||0],accumulated:[Da,[],u=>void 0===u.globals.accumulated?null:u.globals.accumulated],"+":[Io,Wr(Io),(u,Xe)=>{let Wt=0;for(const In of Xe)Wt+=In.evaluate(u);return Wt}],"*":[Io,Wr(Io),(u,Xe)=>{let Wt=1;for(const In of Xe)Wt*=In.evaluate(u);return Wt}],"-":{type:Io,overloads:[[[Io,Io],(u,[Xe,Wt])=>Xe.evaluate(u)-Wt.evaluate(u)],[[Io],(u,[Xe])=>-Xe.evaluate(u)]]},"/":[Io,[Io,Io],(u,[Xe,Wt])=>Xe.evaluate(u)/Wt.evaluate(u)],"%":[Io,[Io,Io],(u,[Xe,Wt])=>Xe.evaluate(u)%Wt.evaluate(u)],ln2:[Io,[],()=>Math.LN2],pi:[Io,[],()=>Math.PI],e:[Io,[],()=>Math.E],"^":[Io,[Io,Io],(u,[Xe,Wt])=>Math.pow(Xe.evaluate(u),Wt.evaluate(u))],sqrt:[Io,[Io],(u,[Xe])=>Math.sqrt(Xe.evaluate(u))],log10:[Io,[Io],(u,[Xe])=>Math.log(Xe.evaluate(u))/Math.LN10],ln:[Io,[Io],(u,[Xe])=>Math.log(Xe.evaluate(u))],log2:[Io,[Io],(u,[Xe])=>Math.log(Xe.evaluate(u))/Math.LN2],sin:[Io,[Io],(u,[Xe])=>Math.sin(Xe.evaluate(u))],cos:[Io,[Io],(u,[Xe])=>Math.cos(Xe.evaluate(u))],tan:[Io,[Io],(u,[Xe])=>Math.tan(Xe.evaluate(u))],asin:[Io,[Io],(u,[Xe])=>Math.asin(Xe.evaluate(u))],acos:[Io,[Io],(u,[Xe])=>Math.acos(Xe.evaluate(u))],atan:[Io,[Io],(u,[Xe])=>Math.atan(Xe.evaluate(u))],min:[Io,Wr(Io),(u,Xe)=>Math.min(...Xe.map((Xe=>Xe.evaluate(u))))],max:[Io,Wr(Io),(u,Xe)=>Math.max(...Xe.map((Xe=>Xe.evaluate(u))))],abs:[Io,[Io],(u,[Xe])=>Math.abs(Xe.evaluate(u))],round:[Io,[Io],(u,[Xe])=>{const Wt=Xe.evaluate(u);return Wt<0?-Math.round(-Wt):Math.round(Wt)}],floor:[Io,[Io],(u,[Xe])=>Math.floor(Xe.evaluate(u))],ceil:[Io,[Io],(u,[Xe])=>Math.ceil(Xe.evaluate(u))],"filter-==":[Bo,[zo,Da],(u,[Xe,Wt])=>u.properties()[Xe.value]===Wt.value],"filter-id-==":[Bo,[Da],(u,[Xe])=>u.id()===Xe.value],"filter-type-==":[Bo,[zo],(u,[Xe])=>u.geometryType()===Xe.value],"filter-<":[Bo,[zo,Da],(u,[Xe,Wt])=>{const In=u.properties()[Xe.value],fr=Wt.value;return typeof In==typeof fr&&In<fr}],"filter-id-<":[Bo,[Da],(u,[Xe])=>{const Wt=u.id(),In=Xe.value;return typeof Wt==typeof In&&Wt<In}],"filter->":[Bo,[zo,Da],(u,[Xe,Wt])=>{const In=u.properties()[Xe.value],fr=Wt.value;return typeof In==typeof fr&&In>fr}],"filter-id->":[Bo,[Da],(u,[Xe])=>{const Wt=u.id(),In=Xe.value;return typeof Wt==typeof In&&Wt>In}],"filter-<=":[Bo,[zo,Da],(u,[Xe,Wt])=>{const In=u.properties()[Xe.value],fr=Wt.value;return typeof In==typeof fr&&In<=fr}],"filter-id-<=":[Bo,[Da],(u,[Xe])=>{const Wt=u.id(),In=Xe.value;return typeof Wt==typeof In&&Wt<=In}],"filter->=":[Bo,[zo,Da],(u,[Xe,Wt])=>{const In=u.properties()[Xe.value],fr=Wt.value;return typeof In==typeof fr&&In>=fr}],"filter-id->=":[Bo,[Da],(u,[Xe])=>{const Wt=u.id(),In=Xe.value;return typeof Wt==typeof In&&Wt>=In}],"filter-has":[Bo,[Da],(u,[Xe])=>Xe.value in u.properties()],"filter-has-id":[Bo,[],u=>null!==u.id()&&void 0!==u.id()],"filter-type-in":[Bo,[bt(zo)],(u,[Xe])=>Xe.value.indexOf(u.geometryType())>=0],"filter-id-in":[Bo,[bt(Da)],(u,[Xe])=>Xe.value.indexOf(u.id())>=0],"filter-in-small":[Bo,[zo,bt(Da)],(u,[Xe,Wt])=>Wt.value.indexOf(u.properties()[Xe.value])>=0],"filter-in-large":[Bo,[zo,bt(Da)],(u,[Xe,Wt])=>function(u,Xe,Wt,In){for(;Wt<=In;){const fr=Wt+In>>1;if(Xe[fr]===u)return!0;Xe[fr]>u?In=fr-1:Wt=fr+1}return!1}(u.properties()[Xe.value],Wt.value,0,Wt.value.length-1)],all:{type:Bo,overloads:[[[Bo,Bo],(u,[Xe,Wt])=>Xe.evaluate(u)&&Wt.evaluate(u)],[Wr(Bo),(u,Xe)=>{for(const Wt of Xe)if(!Wt.evaluate(u))return!1;return!0}]]},any:{type:Bo,overloads:[[[Bo,Bo],(u,[Xe,Wt])=>Xe.evaluate(u)||Wt.evaluate(u)],[Wr(Bo),(u,Xe)=>{for(const Wt of Xe)if(Wt.evaluate(u))return!0;return!1}]]},"!":[Bo,[Bo],(u,[Xe])=>!Xe.evaluate(u)],"is-supported-script":[Bo,[zo],(u,[Xe])=>{const Wt=u.globals&&u.globals.isSupportedScript;return!Wt||Wt(Xe.evaluate(u))}],upcase:[zo,[zo],(u,[Xe])=>Xe.evaluate(u).toUpperCase()],downcase:[zo,[zo],(u,[Xe])=>Xe.evaluate(u).toLowerCase()],concat:[zo,Wr(Da),(u,Xe)=>Xe.map((Xe=>ie(Xe.evaluate(u)))).join("")],"resolved-locale":[zo,[ns],(u,[Xe])=>Xe.evaluate(u).resolvedLocale()]});class xn{constructor(u,Xe){var Wt;this.expression=u,this._warningHistory={},this._evaluator=new pe,this._defaultValue=Xe?"color"===(Wt=Xe).type&&cn(Wt.default)?new Kt(0,0,0,0):"color"===Wt.type?Kt.parse(Wt.default)||null:"padding"===Wt.type?Jt.parse(Wt.default)||null:"variableAnchorOffsetCollection"===Wt.type?Qt.parse(Wt.default)||null:void 0===Wt.default?null:Wt.default:null,this._enumValues=Xe&&"enum"===Xe.type?Xe.values:null}evaluateWithoutErrorHandling(u,Xe,Wt,In,fr,_r){return this._evaluator.globals=u,this._evaluator.feature=Xe,this._evaluator.featureState=Wt,this._evaluator.canonical=In,this._evaluator.availableImages=fr||null,this._evaluator.formattedSection=_r,this.expression.evaluate(this._evaluator)}evaluate(u,Xe,Wt,In,fr,_r){this._evaluator.globals=u,this._evaluator.feature=Xe||null,this._evaluator.featureState=Wt||null,this._evaluator.canonical=In,this._evaluator.availableImages=fr||null,this._evaluator.formattedSection=_r||null;try{const u=this.expression.evaluate(this._evaluator);if(null==u||"number"==typeof u&&u!=u)return this._defaultValue;if(this._enumValues&&!(u in this._enumValues))throw new ae(`Expected value to be one of ${Object.keys(this._enumValues).map((u=>JSON.stringify(u))).join(", ")}, but found ${JSON.stringify(u)} instead.`);return u}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,"undefined"!=typeof console&&console.warn(u.message)),this._defaultValue}}}function vn(u){return Array.isArray(u)&&u.length>0&&"string"==typeof u[0]&&u[0]in uu}function bn(u,Xe){const Wt=new fe(uu,Qr,[],Xe?function(u){const Xe={color:ca,string:zo,number:Io,enum:zo,boolean:Bo,formatted:yl,padding:vl,resolvedImage:kl,variableAnchorOffsetCollection:Al};return"array"===u.type?bt(Xe[u.value]||Da,u.length):Xe[u.type]}(Xe):void 0),In=Wt.parse(u,void 0,void 0,void 0,Xe&&"string"===Xe.type?{typeAnnotation:"coerce"}:void 0);return In?nn(new xn(In,Xe)):sn(Wt.errors)}class wn{constructor(u,Xe){this.kind=u,this._styleExpression=Xe,this.isStateDependent="constant"!==u&&!en(Xe.expression)}evaluateWithoutErrorHandling(u,Xe,Wt,In,fr,_r){return this._styleExpression.evaluateWithoutErrorHandling(u,Xe,Wt,In,fr,_r)}evaluate(u,Xe,Wt,In,fr,_r){return this._styleExpression.evaluate(u,Xe,Wt,In,fr,_r)}}class _n{constructor(u,Xe,Wt,In){this.kind=u,this.zoomStops=Wt,this._styleExpression=Xe,this.isStateDependent="camera"!==u&&!en(Xe.expression),this.interpolationType=In}evaluateWithoutErrorHandling(u,Xe,Wt,In,fr,_r){return this._styleExpression.evaluateWithoutErrorHandling(u,Xe,Wt,In,fr,_r)}evaluate(u,Xe,Wt,In,fr,_r){return this._styleExpression.evaluate(u,Xe,Wt,In,fr,_r)}interpolationFactor(u,Xe,Wt){return this.interpolationType?Be.interpolationFactor(this.interpolationType,u,Xe,Wt):0}}function An(u,Xe){const Wt=bn(u,Xe);if("error"===Wt.result)return Wt;const In=Wt.value.expression,fr=tn(In);if(!fr&&!an(Xe))return sn([new at("","data expressions not supported")]);const _r=rn(In,["zoom"]);if(!_r&&!on(Xe))return sn([new at("","zoom expressions not supported")]);const wr=kn(In);return wr||_r?wr instanceof at?sn([wr]):wr instanceof Be&&!ln(Xe)?sn([new at("",'"interpolate" expressions cannot be used with this property')]):nn(wr?new _n(fr?"camera":"composite",Wt.value,wr.labels,wr instanceof Be?wr.interpolation:void 0):new wn(fr?"constant":"source",Wt.value)):sn([new at("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Sn{constructor(u,Xe){this._parameters=u,this._specification=Xe,st(this,pn(this._parameters,this._specification))}static deserialize(u){return new Sn(u._parameters,u._specification)}static serialize(u){return{_parameters:u._parameters,_specification:u._specification}}}function kn(u){let Xe=null;if(u instanceof de)Xe=kn(u.result);else if(u instanceof Ee){for(const Wt of u.args)if(Xe=kn(Wt),Xe)break}else(u instanceof Ae||u instanceof Be)&&u.input instanceof Xr&&"zoom"===u.input.name&&(Xe=u);return Xe instanceof at||u.eachChild((u=>{const Wt=kn(u);Wt instanceof at?Xe=Wt:!Xe&&Wt?Xe=new at("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):Xe&&Wt&&Xe!==Wt&&(Xe=new at("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),Xe}function Mn(u){if(!0===u||!1===u)return!0;if(!Array.isArray(u)||0===u.length)return!1;switch(u[0]){case"has":return u.length>=2&&"$id"!==u[1]&&"$type"!==u[1];case"in":return u.length>=3&&("string"!=typeof u[1]||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==u.length||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const Xe of u.slice(1))if(!Mn(Xe)&&"boolean"!=typeof Xe)return!1;return!0;default:return!0}}const hu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function zn(u){if(null==u)return{filter:()=>!0,needGeometry:!1};Mn(u)||(u=Bn(u));const Xe=bn(u,hu);if("error"===Xe.result)throw new Error(Xe.value.map((u=>`${u.key}: ${u.message}`)).join(", "));return{filter:(u,Wt,In)=>Xe.value.evaluate(u,Wt,{},In),needGeometry:Cn(u)}}function Pn(u,Xe){return u<Xe?-1:u>Xe?1:0}function Cn(u){if(!Array.isArray(u))return!1;if("within"===u[0]||"distance"===u[0])return!0;for(let Xe=1;Xe<u.length;Xe++)if(Cn(u[Xe]))return!0;return!1}function Bn(u){if(!u)return!0;const Xe=u[0];return u.length<=1?"any"!==Xe:"=="===Xe?Vn(u[1],u[2],"=="):"!="===Xe?Tn(Vn(u[1],u[2],"==")):"<"===Xe||">"===Xe||"<="===Xe||">="===Xe?Vn(u[1],u[2],Xe):"any"===Xe?(Wt=u.slice(1),["any"].concat(Wt.map(Bn))):"all"===Xe?["all"].concat(u.slice(1).map(Bn)):"none"===Xe?["all"].concat(u.slice(1).map(Bn).map(Tn)):"in"===Xe?En(u[1],u.slice(2)):"!in"===Xe?Tn(En(u[1],u.slice(2))):"has"===Xe?Fn(u[1]):"!has"!==Xe||Tn(Fn(u[1]));var Wt}function Vn(u,Xe,Wt){switch(u){case"$type":return[`filter-type-${Wt}`,Xe];case"$id":return[`filter-id-${Wt}`,Xe];default:return[`filter-${Wt}`,u,Xe]}}function En(u,Xe){if(0===Xe.length)return!1;switch(u){case"$type":return["filter-type-in",["literal",Xe]];case"$id":return["filter-id-in",["literal",Xe]];default:return Xe.length>200&&!Xe.some((u=>typeof u!=typeof Xe[0]))?["filter-in-large",u,["literal",Xe.sort(Pn)]]:["filter-in-small",u,["literal",Xe]]}}function Fn(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Tn(u){return["!",u]}function $n(u){const Xe=typeof u;if("number"===Xe||"boolean"===Xe||"string"===Xe||null==u)return JSON.stringify(u);if(Array.isArray(u)){let Xe="[";for(const Wt of u)Xe+=`${$n(Wt)},`;return`${Xe}]`}const Wt=Object.keys(u).sort();let In="{";for(let Xe=0;Xe<Wt.length;Xe++)In+=`${JSON.stringify(Wt[Xe])}:${$n(u[Wt[Xe]])},`;return`${In}}`}function Ln(u){let Xe="";for(const Wt of ko)Xe+=`/${$n(u[Wt])}`;return Xe}function Dn(u){const Xe=u.value;return Xe?[new it(u.key,Xe,"constants have been deprecated as of v8")]:[]}function On(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function jn(u){if(Array.isArray(u))return u.map(jn);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const Xe={};for(const Wt in u)Xe[Wt]=jn(u[Wt]);return Xe}return On(u)}function Rn(u){const Xe=u.key,Wt=u.value,In=u.valueSpec||{},fr=u.objectElementValidators||{},_r=u.style,wr=u.styleSpec,Ar=u.validateSpec;let Kr=[];const no=un(Wt);if("object"!==no)return[new it(Xe,Wt,`object expected, ${no} found`)];for(const u in Wt){const no=u.split(".")[0],io=In[no]||In["*"];let oo;if(fr[no])oo=fr[no];else if(In[no])oo=Ar;else if(fr["*"])oo=fr["*"];else{if(!In["*"]){Kr.push(new it(Xe,Wt[u],`unknown property "${u}"`));continue}oo=Ar}Kr=Kr.concat(oo({key:(Xe?`${Xe}.`:Xe)+u,value:Wt[u],valueSpec:io,style:_r,styleSpec:wr,object:Wt,objectKey:u,validateSpec:Ar},Wt))}for(const u in In)fr[u]||In[u].required&&void 0===In[u].default&&void 0===Wt[u]&&Kr.push(new it(Xe,Wt,`missing required property "${u}"`));return Kr}function Un(u){const Xe=u.value,Wt=u.valueSpec,In=u.style,fr=u.styleSpec,_r=u.key,wr=u.arrayElementValidator||u.validateSpec;if("array"!==un(Xe))return[new it(_r,Xe,`array expected, ${un(Xe)} found`)];if(Wt.length&&Xe.length!==Wt.length)return[new it(_r,Xe,`array length ${Wt.length} expected, length ${Xe.length} found`)];if(Wt["min-length"]&&Xe.length<Wt["min-length"])return[new it(_r,Xe,`array length at least ${Wt["min-length"]} expected, length ${Xe.length} found`)];let Ar={type:Wt.value,values:Wt.values};fr.$version<7&&(Ar.function=Wt.function),"object"===un(Wt.value)&&(Ar=Wt.value);let Kr=[];for(let Wt=0;Wt<Xe.length;Wt++)Kr=Kr.concat(wr({array:Xe,arrayIndex:Wt,value:Xe[Wt],valueSpec:Ar,validateSpec:u.validateSpec,style:In,styleSpec:fr,key:`${_r}[${Wt}]`}));return Kr}function qn(u){const Xe=u.key,Wt=u.value,In=u.valueSpec;let fr=un(Wt);return"number"===fr&&Wt!=Wt&&(fr="NaN"),"number"!==fr?[new it(Xe,Wt,`number expected, ${fr} found`)]:"minimum"in In&&Wt<In.minimum?[new it(Xe,Wt,`${Wt} is less than the minimum value ${In.minimum}`)]:"maximum"in In&&Wt>In.maximum?[new it(Xe,Wt,`${Wt} is greater than the maximum value ${In.maximum}`)]:[]}function Nn(u){const Xe=u.valueSpec,Wt=On(u.value.type);let In,fr,_r,wr={};const Ar="categorical"!==Wt&&void 0===u.value.property,Kr=!Ar,no="array"===un(u.value.stops)&&"array"===un(u.value.stops[0])&&"object"===un(u.value.stops[0][0]),io=Rn({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(u){if("identity"===Wt)return[new it(u.key,u.value,'identity function may not have a "stops" property')];let Xe=[];const In=u.value;return Xe=Xe.concat(Un({key:u.key,value:In,valueSpec:u.valueSpec,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,arrayElementValidator:h})),"array"===un(In)&&0===In.length&&Xe.push(new it(u.key,In,"array must have at least one stop")),Xe},default:function(u){return u.validateSpec({key:u.key,value:u.value,valueSpec:Xe,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec})}}});return"identity"===Wt&&Ar&&io.push(new it(u.key,u.value,'missing required property "property"')),"identity"===Wt||u.value.stops||io.push(new it(u.key,u.value,'missing required property "stops"')),"exponential"===Wt&&u.valueSpec.expression&&!ln(u.valueSpec)&&io.push(new it(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(Kr&&!an(u.valueSpec)?io.push(new it(u.key,u.value,"property functions not supported")):Ar&&!on(u.valueSpec)&&io.push(new it(u.key,u.value,"zoom functions not supported"))),"categorical"!==Wt&&!no||void 0!==u.value.property||io.push(new it(u.key,u.value,'"property" property is required')),io;function h(u){let Wt=[];const In=u.value,Ar=u.key;if("array"!==un(In))return[new it(Ar,In,`array expected, ${un(In)} found`)];if(2!==In.length)return[new it(Ar,In,`array length 2 expected, length ${In.length} found`)];if(no){if("object"!==un(In[0]))return[new it(Ar,In,`object expected, ${un(In[0])} found`)];if(void 0===In[0].zoom)return[new it(Ar,In,"object stop key must have zoom")];if(void 0===In[0].value)return[new it(Ar,In,"object stop key must have value")];if(_r&&_r>On(In[0].zoom))return[new it(Ar,In[0].zoom,"stop zoom values must appear in ascending order")];On(In[0].zoom)!==_r&&(_r=On(In[0].zoom),fr=void 0,wr={}),Wt=Wt.concat(Rn({key:`${Ar}[0]`,value:In[0],valueSpec:{zoom:{}},validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{zoom:qn,value:p}}))}else Wt=Wt.concat(p({key:`${Ar}[0]`,value:In[0],valueSpec:{},validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec},In));return vn(jn(In[1]))?Wt.concat([new it(`${Ar}[1]`,In[1],"expressions are not allowed in function stops.")]):Wt.concat(u.validateSpec({key:`${Ar}[1]`,value:In[1],valueSpec:Xe,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec}))}function p(u,_r){const Ar=un(u.value),Kr=On(u.value),no=null!==u.value?u.value:_r;if(In){if(Ar!==In)return[new it(u.key,no,`${Ar} stop domain type must match previous stop domain type ${In}`)]}else In=Ar;if("number"!==Ar&&"string"!==Ar&&"boolean"!==Ar)return[new it(u.key,no,"stop domain value must be a number, string, or boolean")];if("number"!==Ar&&"categorical"!==Wt){let In=`number expected, ${Ar} found`;return an(Xe)&&void 0===Wt&&(In+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new it(u.key,no,In)]}return"categorical"!==Wt||"number"!==Ar||isFinite(Kr)&&Math.floor(Kr)===Kr?"categorical"!==Wt&&"number"===Ar&&void 0!==fr&&Kr<fr?[new it(u.key,no,"stop domain values must appear in ascending order")]:(fr=Kr,"categorical"===Wt&&Kr in wr?[new it(u.key,no,"stop domain values must be unique")]:(wr[Kr]=!0,[])):[new it(u.key,no,`integer expected, found ${Kr}`)]}}function Zn(u){const Xe=("property"===u.expressionContext?An:bn)(jn(u.value),u.valueSpec);if("error"===Xe.result)return Xe.value.map((Xe=>new it(`${u.key}${Xe.key}`,u.value,Xe.message)));const Wt=Xe.value.expression||Xe.value._styleExpression.expression;if("property"===u.expressionContext&&"text-font"===u.propertyKey&&!Wt.outputDefined())return[new it(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===u.expressionContext&&"layout"===u.propertyType&&!en(Wt))return[new it(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===u.expressionContext&&!en(Wt))return[new it(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&0===u.expressionContext.indexOf("cluster")){if(!rn(Wt,["zoom","feature-state"]))return[new it(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===u.expressionContext&&!tn(Wt))return[new it(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Gn(u){const Xe=u.key,Wt=u.value,In=u.valueSpec,fr=[];return Array.isArray(In.values)?-1===In.values.indexOf(On(Wt))&&fr.push(new it(Xe,Wt,`expected one of [${In.values.join(", ")}], ${JSON.stringify(Wt)} found`)):-1===Object.keys(In.values).indexOf(On(Wt))&&fr.push(new it(Xe,Wt,`expected one of [${Object.keys(In.values).join(", ")}], ${JSON.stringify(Wt)} found`)),fr}function Kn(u){return Mn(jn(u.value))?Zn(st({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Xn(u)}function Xn(u){const Xe=u.value,Wt=u.key;if("array"!==un(Xe))return[new it(Wt,Xe,`array expected, ${un(Xe)} found`)];const In=u.styleSpec;let fr,_r=[];if(Xe.length<1)return[new it(Wt,Xe,"filter array must have at least 1 element")];switch(_r=_r.concat(Gn({key:`${Wt}[0]`,value:Xe[0],valueSpec:In.filter_operator,style:u.style,styleSpec:u.styleSpec})),On(Xe[0])){case"<":case"<=":case">":case">=":Xe.length>=2&&"$type"===On(Xe[1])&&_r.push(new it(Wt,Xe,`"$type" cannot be use with operator "${Xe[0]}"`));case"==":case"!=":3!==Xe.length&&_r.push(new it(Wt,Xe,`filter array for operator "${Xe[0]}" must have 3 elements`));case"in":case"!in":Xe.length>=2&&(fr=un(Xe[1]),"string"!==fr&&_r.push(new it(`${Wt}[1]`,Xe[1],`string expected, ${fr} found`)));for(let wr=2;wr<Xe.length;wr++)fr=un(Xe[wr]),"$type"===On(Xe[1])?_r=_r.concat(Gn({key:`${Wt}[${wr}]`,value:Xe[wr],valueSpec:In.geometry_type,style:u.style,styleSpec:u.styleSpec})):"string"!==fr&&"number"!==fr&&"boolean"!==fr&&_r.push(new it(`${Wt}[${wr}]`,Xe[wr],`string, number, or boolean expected, ${fr} found`));break;case"any":case"all":case"none":for(let In=1;In<Xe.length;In++)_r=_r.concat(Xn({key:`${Wt}[${In}]`,value:Xe[In],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":fr=un(Xe[1]),2!==Xe.length?_r.push(new it(Wt,Xe,`filter array for "${Xe[0]}" operator must have 2 elements`)):"string"!==fr&&_r.push(new it(`${Wt}[1]`,Xe[1],`string expected, ${fr} found`))}return _r}function Hn(u,Xe){const Wt=u.key,In=u.validateSpec,fr=u.style,_r=u.styleSpec,wr=u.value,Ar=u.objectKey,Kr=_r[`${Xe}_${u.layerType}`];if(!Kr)return[];const no=Ar.match(/^(.*)-transition$/);if("paint"===Xe&&no&&Kr[no[1]]&&Kr[no[1]].transition)return In({key:Wt,value:wr,valueSpec:_r.transition,style:fr,styleSpec:_r});const io=u.valueSpec||Kr[Ar];if(!io)return[new it(Wt,wr,`unknown property "${Ar}"`)];let oo;if("string"===un(wr)&&an(io)&&!io.tokens&&(oo=/^{([^}]+)}$/.exec(wr)))return[new it(Wt,wr,`"${Ar}" does not support interpolation syntax\nUse an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(oo[1])} }\`.`)];const ao=[];return"symbol"===u.layerType&&("text-field"===Ar&&fr&&!fr.glyphs&&ao.push(new it(Wt,wr,'use of "text-field" requires a style "glyphs" property')),"text-font"===Ar&&cn(jn(wr))&&"identity"===On(wr.type)&&ao.push(new it(Wt,wr,'"text-font" does not support identity functions'))),ao.concat(In({key:u.key,value:wr,valueSpec:io,style:fr,styleSpec:_r,expressionContext:"property",propertyType:Xe,propertyKey:Ar}))}function Yn(u){return Hn(u,"paint")}function Jn(u){return Hn(u,"layout")}function Wn(u){let Xe=[];const Wt=u.value,In=u.key,fr=u.style,_r=u.styleSpec;Wt.type||Wt.ref||Xe.push(new it(In,Wt,'either "type" or "ref" is required'));let wr=On(Wt.type);const Ar=On(Wt.ref);if(Wt.id){const _r=On(Wt.id);for(let wr=0;wr<u.arrayIndex;wr++){const u=fr.layers[wr];On(u.id)===_r&&Xe.push(new it(In,Wt.id,`duplicate layer id "${Wt.id}", previously used at line ${u.id.__line__}`))}}if("ref"in Wt){let u;["type","source","source-layer","filter","layout"].forEach((u=>{u in Wt&&Xe.push(new it(In,Wt[u],`"${u}" is prohibited for ref layers`))})),fr.layers.forEach((Xe=>{On(Xe.id)===Ar&&(u=Xe)})),u?u.ref?Xe.push(new it(In,Wt.ref,"ref cannot reference another ref layer")):wr=On(u.type):Xe.push(new it(In,Wt.ref,`ref layer "${Ar}" not found`))}else if("background"!==wr)if(Wt.source){const u=fr.sources&&fr.sources[Wt.source],_r=u&&On(u.type);u?"vector"===_r&&"raster"===wr?Xe.push(new it(In,Wt.source,`layer "${Wt.id}" requires a raster source`)):"raster-dem"!==_r&&"hillshade"===wr?Xe.push(new it(In,Wt.source,`layer "${Wt.id}" requires a raster-dem source`)):"raster"===_r&&"raster"!==wr?Xe.push(new it(In,Wt.source,`layer "${Wt.id}" requires a vector source`)):"vector"!==_r||Wt["source-layer"]?"raster-dem"===_r&&"hillshade"!==wr?Xe.push(new it(In,Wt.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==wr||!Wt.paint||!Wt.paint["line-gradient"]||"geojson"===_r&&u.lineMetrics||Xe.push(new it(In,Wt,`layer "${Wt.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):Xe.push(new it(In,Wt,`layer "${Wt.id}" must specify a "source-layer"`)):Xe.push(new it(In,Wt.source,`source "${Wt.source}" not found`))}else Xe.push(new it(In,Wt,'missing required property "source"'));return Xe=Xe.concat(Rn({key:In,value:Wt,valueSpec:_r.layer,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":()=>[],type:()=>u.validateSpec({key:`${In}.type`,value:Wt.type,valueSpec:_r.layer.type,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,object:Wt,objectKey:"type"}),filter:Kn,layout:u=>Rn({layer:Wt,key:u.key,value:u.value,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":u=>Jn(st({layerType:wr},u))}}),paint:u=>Rn({layer:Wt,key:u.key,value:u.value,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":u=>Yn(st({layerType:wr},u))}})}})),Xe}function Qn(u){const Xe=u.value,Wt=u.key,In=un(Xe);return"string"!==In?[new it(Wt,Xe,`string expected, ${In} found`)]:[]}const Iu={promoteId:function({key:u,value:Xe}){if("string"===un(Xe))return Qn({key:u,value:Xe});{const Wt=[];for(const In in Xe)Wt.push(...Qn({key:`${u}.${In}`,value:Xe[In]}));return Wt}}};function ei(u){const Xe=u.value,Wt=u.key,In=u.styleSpec,fr=u.style,_r=u.validateSpec;if(!Xe.type)return[new it(Wt,Xe,'"type" is required')];const wr=On(Xe.type);let Ar;switch(wr){case"vector":case"raster":return Ar=Rn({key:Wt,value:Xe,valueSpec:In[`source_${wr.replace("-","_")}`],style:u.style,styleSpec:In,objectElementValidators:Iu,validateSpec:_r}),Ar;case"raster-dem":return Ar=function(u){var Xe;const Wt=null!==(Xe=u.sourceName)&&void 0!==Xe?Xe:"",In=u.value,fr=u.styleSpec,_r=fr.source_raster_dem,wr=u.style;let Ar=[];const Kr=un(In);if(void 0===In)return Ar;if("object"!==Kr)return Ar.push(new it("source_raster_dem",In,`object expected, ${Kr} found`)),Ar;const no="custom"===On(In.encoding),io=["redFactor","greenFactor","blueFactor","baseShift"],oo=u.value.encoding?`"${u.value.encoding}"`:"Default";for(const Xe in In)!no&&io.includes(Xe)?Ar.push(new it(Xe,In[Xe],`In "${Wt}": "${Xe}" is only valid when "encoding" is set to "custom". ${oo} encoding found`)):_r[Xe]?Ar=Ar.concat(u.validateSpec({key:Xe,value:In[Xe],valueSpec:_r[Xe],validateSpec:u.validateSpec,style:wr,styleSpec:fr})):Ar.push(new it(Xe,In[Xe],`unknown property "${Xe}"`));return Ar}({sourceName:Wt,value:Xe,style:u.style,styleSpec:In,validateSpec:_r}),Ar;case"geojson":if(Ar=Rn({key:Wt,value:Xe,valueSpec:In.source_geojson,style:fr,styleSpec:In,validateSpec:_r,objectElementValidators:Iu}),Xe.cluster)for(const u in Xe.clusterProperties){const[In,fr]=Xe.clusterProperties[u],wr="string"==typeof In?[In,["accumulated"],["get",u]]:In;Ar.push(...Zn({key:`${Wt}.${u}.map`,value:fr,validateSpec:_r,expressionContext:"cluster-map"})),Ar.push(...Zn({key:`${Wt}.${u}.reduce`,value:wr,validateSpec:_r,expressionContext:"cluster-reduce"}))}return Ar;case"video":return Rn({key:Wt,value:Xe,valueSpec:In.source_video,style:fr,validateSpec:_r,styleSpec:In});case"image":return Rn({key:Wt,value:Xe,valueSpec:In.source_image,style:fr,validateSpec:_r,styleSpec:In});case"canvas":return[new it(Wt,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Gn({key:`${Wt}.type`,value:Xe.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:fr,validateSpec:_r,styleSpec:In})}}function ri(u){const Xe=u.value,Wt=u.styleSpec,In=Wt.light,fr=u.style;let _r=[];const wr=un(Xe);if(void 0===Xe)return _r;if("object"!==wr)return _r=_r.concat([new it("light",Xe,`object expected, ${wr} found`)]),_r;for(const wr in Xe){const Ar=wr.match(/^(.*)-transition$/);_r=_r.concat(Ar&&In[Ar[1]]&&In[Ar[1]].transition?u.validateSpec({key:wr,value:Xe[wr],valueSpec:Wt.transition,validateSpec:u.validateSpec,style:fr,styleSpec:Wt}):In[wr]?u.validateSpec({key:wr,value:Xe[wr],valueSpec:In[wr],validateSpec:u.validateSpec,style:fr,styleSpec:Wt}):[new it(wr,Xe[wr],`unknown property "${wr}"`)])}return _r}function ni(u){const Xe=u.value,Wt=u.styleSpec,In=Wt.sky,fr=u.style,_r=un(Xe);if(void 0===Xe)return[];if("object"!==_r)return[new it("sky",Xe,`object expected, ${_r} found`)];let wr=[];for(const _r in Xe)wr=wr.concat(In[_r]?u.validateSpec({key:_r,value:Xe[_r],valueSpec:In[_r],style:fr,styleSpec:Wt}):[new it(_r,Xe[_r],`unknown property "${_r}"`)]);return wr}function ii(u){const Xe=u.value,Wt=u.styleSpec,In=Wt.terrain,fr=u.style;let _r=[];const wr=un(Xe);if(void 0===Xe)return _r;if("object"!==wr)return _r=_r.concat([new it("terrain",Xe,`object expected, ${wr} found`)]),_r;for(const wr in Xe)_r=_r.concat(In[wr]?u.validateSpec({key:wr,value:Xe[wr],valueSpec:In[wr],validateSpec:u.validateSpec,style:fr,styleSpec:Wt}):[new it(wr,Xe[wr],`unknown property "${wr}"`)]);return _r}function si(u){let Xe=[];const Wt=u.value,In=u.key;if(Array.isArray(Wt)){const fr=[],_r=[];for(const wr in Wt)Wt[wr].id&&fr.includes(Wt[wr].id)&&Xe.push(new it(In,Wt,`all the sprites' ids must be unique, but ${Wt[wr].id} is duplicated`)),fr.push(Wt[wr].id),Wt[wr].url&&_r.includes(Wt[wr].url)&&Xe.push(new it(In,Wt,`all the sprites' URLs must be unique, but ${Wt[wr].url} is duplicated`)),_r.push(Wt[wr].url),Xe=Xe.concat(Rn({key:`${In}[${wr}]`,value:Wt[wr],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:u.validateSpec}));return Xe}return Qn({key:In,value:Wt})}const zu={"*":()=>[],array:Un,boolean:function(u){const Xe=u.value,Wt=u.key,In=un(Xe);return"boolean"!==In?[new it(Wt,Xe,`boolean expected, ${In} found`)]:[]},number:qn,color:function(u){const Xe=u.key,Wt=u.value,In=un(Wt);return"string"!==In?[new it(Xe,Wt,`color expected, ${In} found`)]:Kt.parse(String(Wt))?[]:[new it(Xe,Wt,`color expected, "${Wt}" found`)]},constants:Dn,enum:Gn,filter:Kn,function:Nn,layer:Wn,object:Rn,source:ei,light:ri,sky:ni,terrain:ii,projection:function(u){const Xe=u.value,Wt=u.styleSpec,In=Wt.projection,fr=u.style,_r=un(Xe);if(void 0===Xe)return[];if("object"!==_r)return[new it("projection",Xe,`object expected, ${_r} found`)];let wr=[];for(const _r in Xe)wr=wr.concat(In[_r]?u.validateSpec({key:_r,value:Xe[_r],valueSpec:In[_r],style:fr,styleSpec:Wt}):[new it(_r,Xe[_r],`unknown property "${_r}"`)]);return wr},string:Qn,formatted:function(u){return 0===Qn(u).length?[]:Zn(u)},resolvedImage:function(u){return 0===Qn(u).length?[]:Zn(u)},padding:function(u){const Xe=u.key,Wt=u.value;if("array"===un(Wt)){if(Wt.length<1||Wt.length>4)return[new it(Xe,Wt,`padding requires 1 to 4 values; ${Wt.length} values found`)];const In={type:"number"};let fr=[];for(let _r=0;_r<Wt.length;_r++)fr=fr.concat(u.validateSpec({key:`${Xe}[${_r}]`,value:Wt[_r],validateSpec:u.validateSpec,valueSpec:In}));return fr}return qn({key:Xe,value:Wt,valueSpec:{}})},variableAnchorOffsetCollection:function(u){const Xe=u.key,Wt=u.value,In=un(Wt),fr=u.styleSpec;if("array"!==In||Wt.length<1||Wt.length%2!=0)return[new it(Xe,Wt,"variableAnchorOffsetCollection requires a non-empty array of even length")];let _r=[];for(let In=0;In<Wt.length;In+=2)_r=_r.concat(Gn({key:`${Xe}[${In}]`,value:Wt[In],valueSpec:fr.layout_symbol["text-anchor"]})),_r=_r.concat(Un({key:`${Xe}[${In+1}]`,value:Wt[In+1],valueSpec:{length:2,value:"number"},validateSpec:u.validateSpec,style:u.style,styleSpec:fr}));return _r},sprite:si};function oi(u){const Xe=u.value,Wt=u.valueSpec,In=u.styleSpec;return u.validateSpec=oi,Wt.expression&&cn(On(Xe))?Nn(u):Wt.expression&&vn(jn(Xe))?Zn(u):Wt.type&&zu[Wt.type]?zu[Wt.type](u):Rn(st({},u,{valueSpec:Wt.type?In[Wt.type]:Wt}))}function li(u){const Xe=u.value,Wt=u.key,In=Qn(u);return In.length||(-1===Xe.indexOf("{fontstack}")&&In.push(new it(Wt,Xe,'"glyphs" url must include a "{fontstack}" token')),-1===Xe.indexOf("{range}")&&In.push(new it(Wt,Xe,'"glyphs" url must include a "{range}" token'))),In}function ui(u,Xe=xo){let Wt=[];return Wt=Wt.concat(oi({key:"",value:u,valueSpec:Xe.$root,styleSpec:Xe,style:u,validateSpec:oi,objectElementValidators:{glyphs:li,"*":()=>[]}})),u.constants&&(Wt=Wt.concat(Dn({key:"constants",value:u.constants,style:u,styleSpec:Xe,validateSpec:oi}))),hi(Wt)}function ci(u){return function(Xe){return u({...Xe,validateSpec:oi})}}function hi(u){return[].concat(u).sort(((u,Xe)=>u.line-Xe.line))}function pi(u){return function(...Xe){return hi(u.apply(this,Xe))}}ui.source=pi(ci(ei)),ui.sprite=pi(ci(si)),ui.glyphs=pi(ci(li)),ui.light=pi(ci(ri)),ui.sky=pi(ci(ni)),ui.terrain=pi(ci(ii)),ui.layer=pi(ci(Wn)),ui.filter=pi(ci(Kn)),ui.paintProperty=pi(ci(Yn)),ui.layoutProperty=pi(ci(Jn));const Lu=ui,Du=Lu.light,Fu=Lu.sky,Nu=Lu.paintProperty,Vu=Lu.layoutProperty;function xi(u,Xe){let Wt=!1;if(Xe&&Xe.length)for(const In of Xe)u.fire(new N(new Error(In.message))),Wt=!0;return Wt}class vi{constructor(u,Xe,Wt){const In=this.cells=[];if(u instanceof ArrayBuffer){this.arrayBuffer=u;const fr=new Int32Array(this.arrayBuffer);u=fr[0],this.d=(Xe=fr[1])+2*(Wt=fr[2]);for(let u=0;u<this.d*this.d;u++){const Xe=fr[3+u],Wt=fr[3+u+1];In.push(Xe===Wt?null:fr.subarray(Xe,Wt))}const _r=fr[3+In.length+1];this.keys=fr.subarray(fr[3+In.length],_r),this.bboxes=fr.subarray(_r),this.insert=this._insertReadonly}else{this.d=Xe+2*Wt;for(let u=0;u<this.d*this.d;u++)In.push([]);this.keys=[],this.bboxes=[]}this.n=Xe,this.extent=u,this.padding=Wt,this.scale=Xe/u,this.uid=0;const fr=Wt/Xe*u;this.min=-fr,this.max=u+fr}insert(u,Xe,Wt,In,fr){this._forEachCell(Xe,Wt,In,fr,this._insertCell,this.uid++,void 0,void 0),this.keys.push(u),this.bboxes.push(Xe),this.bboxes.push(Wt),this.bboxes.push(In),this.bboxes.push(fr)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(u,Xe,Wt,In,fr,_r){this.cells[fr].push(_r)}query(u,Xe,Wt,In,fr){const _r=this.min,wr=this.max;if(u<=_r&&Xe<=_r&&wr<=Wt&&wr<=In&&!fr)return Array.prototype.slice.call(this.keys);{const _r=[];return this._forEachCell(u,Xe,Wt,In,this._queryCell,_r,{},fr),_r}}_queryCell(u,Xe,Wt,In,fr,_r,wr,Ar){const Kr=this.cells[fr];if(null!==Kr){const fr=this.keys,no=this.bboxes;for(let io=0;io<Kr.length;io++){const oo=Kr[io];if(void 0===wr[oo]){const Kr=4*oo;(Ar?Ar(no[Kr+0],no[Kr+1],no[Kr+2],no[Kr+3]):u<=no[Kr+2]&&Xe<=no[Kr+3]&&Wt>=no[Kr+0]&&In>=no[Kr+1])?(wr[oo]=!0,_r.push(fr[oo])):wr[oo]=!1}}}}_forEachCell(u,Xe,Wt,In,fr,_r,wr,Ar){const Kr=this._convertToCellCoord(u),no=this._convertToCellCoord(Xe),io=this._convertToCellCoord(Wt),oo=this._convertToCellCoord(In);for(let ao=Kr;ao<=io;ao++)for(let Kr=no;Kr<=oo;Kr++){const no=this.d*Kr+ao;if((!Ar||Ar(this._convertFromCellCoord(ao),this._convertFromCellCoord(Kr),this._convertFromCellCoord(ao+1),this._convertFromCellCoord(Kr+1)))&&fr.call(this,u,Xe,Wt,In,no,_r,wr,Ar))return}}_convertFromCellCoord(u){return(u-this.padding)/this.scale}_convertToCellCoord(u){return Math.max(0,Math.min(this.d-1,Math.floor(u*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const u=this.cells,Xe=3+this.cells.length+1+1;let Wt=0;for(let u=0;u<this.cells.length;u++)Wt+=this.cells[u].length;const In=new Int32Array(Xe+Wt+this.keys.length+this.bboxes.length);In[0]=this.extent,In[1]=this.n,In[2]=this.padding;let fr=Xe;for(let Xe=0;Xe<u.length;Xe++){const Wt=u[Xe];In[3+Xe]=fr,In.set(Wt,fr),fr+=Wt.length}return In[3+u.length]=fr,In.set(this.keys,fr),fr+=this.keys.length,In[3+u.length+1]=fr,In.set(this.bboxes,fr),fr+=this.bboxes.length,In.buffer}static serialize(u,Xe){const Wt=u.toArrayBuffer();return Xe&&Xe.push(Wt),{buffer:Wt}}static deserialize(u){return new vi(u.buffer)}}const Uu={};function wi(u,Xe,Wt={}){if(Uu[u])throw new Error(`${u} is already registered.`);Object.defineProperty(Xe,"_classRegistryKey",{value:u,writeable:!1}),Uu[u]={klass:Xe,omit:Wt.omit||[],shallow:Wt.shallow||[]}}wi("Object",Object),wi("TransferableGridIndex",vi),wi("Color",Kt),wi("Error",Error),wi("AJAXError",L),wi("ResolvedImage",te),wi("StylePropertyFunction",Sn),wi("StyleExpression",xn,{omit:["_evaluator"]}),wi("ZoomDependentExpression",_n),wi("ZoomConstantExpression",wn),wi("CompoundExpression",Xr,{omit:["_evaluate"]});for(const u in uu)uu[u]._classRegistryKey||wi(`Expression_${u}`,uu[u]);function _i(u){return u&&"undefined"!=typeof ArrayBuffer&&(u instanceof ArrayBuffer||u.constructor&&"ArrayBuffer"===u.constructor.name)}function Ai(u){return u.$name||u.constructor._classRegistryKey}function Si(u){return!function(u){if(null===u||"object"!=typeof u)return!1;const Xe=Ai(u);return!(!Xe||"Object"===Xe)}(u)&&(null==u||"boolean"==typeof u||"number"==typeof u||"string"==typeof u||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof Error||_i(u)||I(u)||ArrayBuffer.isView(u)||u instanceof ImageData)}function ki(u,Xe){if(Si(u))return(_i(u)||I(u))&&Xe&&Xe.push(u),ArrayBuffer.isView(u)&&Xe&&Xe.push(u.buffer),u instanceof ImageData&&Xe&&Xe.push(u.data.buffer),u;if(Array.isArray(u)){const Wt=[];for(const In of u)Wt.push(ki(In,Xe));return Wt}if("object"!=typeof u)throw new Error("can't serialize object of type "+typeof u);const Wt=Ai(u);if(!Wt)throw new Error(`can't serialize object of unregistered class ${u.constructor.name}`);if(!Uu[Wt])throw new Error(`${Wt} is not registered.`);const{klass:In}=Uu[Wt],fr=In.serialize?In.serialize(u,Xe):{};if(In.serialize){if(Xe&&fr===Xe[Xe.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const In in u){if(!u.hasOwnProperty(In))continue;if(Uu[Wt].omit.indexOf(In)>=0)continue;const _r=u[In];fr[In]=Uu[Wt].shallow.indexOf(In)>=0?_r:ki(_r,Xe)}u instanceof Error&&(fr.message=u.message)}if(fr.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==Wt&&(fr.$name=Wt),fr}function Mi(u){if(Si(u))return u;if(Array.isArray(u))return u.map(Mi);if("object"!=typeof u)throw new Error("can't deserialize object of type "+typeof u);const Xe=Ai(u)||"Object";if(!Uu[Xe])throw new Error(`can't deserialize unregistered class ${Xe}`);const{klass:Wt}=Uu[Xe];if(!Wt)throw new Error(`can't deserialize unregistered class ${Xe}`);if(Wt.deserialize)return Wt.deserialize(u);const In=Object.create(Wt.prototype);for(const Wt of Object.keys(u)){if("$name"===Wt)continue;const fr=u[Wt];In[Wt]=Uu[Xe].shallow.indexOf(Wt)>=0?fr:Mi(fr)}return In}class Ii{constructor(){this.first=!0}update(u,Xe){const Wt=Math.floor(u);return this.first?(this.first=!1,this.lastIntegerZoom=Wt,this.lastIntegerZoomTime=0,this.lastZoom=u,this.lastFloorZoom=Wt,!0):(this.lastFloorZoom>Wt?(this.lastIntegerZoom=Wt+1,this.lastIntegerZoomTime=Xe):this.lastFloorZoom<Wt&&(this.lastIntegerZoom=Wt,this.lastIntegerZoomTime=Xe),u!==this.lastZoom&&(this.lastZoom=u,this.lastFloorZoom=Wt,!0))}}const qu={"Latin-1 Supplement":u=>u>=128&&u<=255,"Hangul Jamo":u=>u>=4352&&u<=4607,Khmer:u=>u>=6016&&u<=6143,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Katakana:u=>u>=12448&&u<=12543,Kanbun:u=>u>=12688&&u<=12703,"CJK Strokes":u=>u>=12736&&u<=12783,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"Private Use Area":u=>u>=57344&&u<=63743,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function Pi(u){for(const Xe of u)if(Ti(Xe.charCodeAt(0)))return!0;return!1}function Ci(u){for(const Xe of u)if(!Ei(Xe.charCodeAt(0)))return!1;return!0}function Bi(u){const Xe=u.map((u=>{try{return new RegExp(`\\p{sc=${u}}`,"u").source}catch(u){return null}})).filter((u=>u));return new RegExp(Xe.join("|"),"u")}const td=Bi(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ei(u){return!td.test(String.fromCodePoint(u))}const id=Bi(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ti(u){return!(746!==u&&747!==u&&(u<4352||!(qu["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||qu["CJK Compatibility"](u)||qu["CJK Strokes"](u)||!(!qu["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||12336===u)||qu["Enclosed CJK Letters and Months"](u)||qu["Ideographic Description Characters"](u)||qu.Kanbun(u)||qu.Katakana(u)&&12540!==u||!(!qu["Halfwidth and Fullwidth Forms"](u)||65288===u||65289===u||65293===u||u>=65306&&u<=65310||65339===u||65341===u||65343===u||u>=65371&&u<=65503||65507===u||u>=65512&&u<=65519)||!(!qu["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||qu["Vertical Forms"](u)||qu["Yijing Hexagram Symbols"](u)||/\p{sc=Cans}/u.test(String.fromCodePoint(u))||/\p{sc=Hang}/u.test(String.fromCodePoint(u))||id.test(String.fromCodePoint(u)))))}function $i(u){return!(Ti(u)||function(u){return!!(qu["Latin-1 Supplement"](u)&&(167===u||169===u||174===u||177===u||188===u||189===u||190===u||215===u||247===u)||qu["General Punctuation"](u)&&(8214===u||8224===u||8225===u||8240===u||8241===u||8251===u||8252===u||8258===u||8263===u||8264===u||8265===u||8273===u)||qu["Letterlike Symbols"](u)||qu["Number Forms"](u)||qu["Miscellaneous Technical"](u)&&(u>=8960&&u<=8967||u>=8972&&u<=8991||u>=8996&&u<=9e3||9003===u||u>=9085&&u<=9114||u>=9150&&u<=9165||9167===u||u>=9169&&u<=9179||u>=9186&&u<=9215)||qu["Control Pictures"](u)&&9251!==u||qu["Optical Character Recognition"](u)||qu["Enclosed Alphanumerics"](u)||qu["Geometric Shapes"](u)||qu["Miscellaneous Symbols"](u)&&!(u>=9754&&u<=9759)||qu["Miscellaneous Symbols and Arrows"](u)&&(u>=11026&&u<=11055||u>=11088&&u<=11097||u>=11192&&u<=11243)||qu["CJK Symbols and Punctuation"](u)||qu.Katakana(u)||qu["Private Use Area"](u)||qu["CJK Compatibility Forms"](u)||qu["Small Form Variants"](u)||qu["Halfwidth and Fullwidth Forms"](u)||8734===u||8756===u||8757===u||u>=9984&&u<=10087||u>=10102&&u<=10131||65532===u||65533===u)}(u))}const sd=Bi(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Di(u){return sd.test(String.fromCodePoint(u))}function Oi(u,Xe){return!(!Xe&&Di(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||qu.Khmer(u))}function ji(u){for(const Xe of u)if(Di(Xe.charCodeAt(0)))return!0;return!1}const ld=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(u){this.pluginStatus=u.pluginStatus,this.pluginURL=u.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(u){this.applyArabicShaping=u.applyArabicShaping,this.processBidirectionalText=u.processBidirectionalText,this.processStyledBidirectionalText=u.processStyledBidirectionalText}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Ui{constructor(u,Xe){this.zoom=u,Xe?(this.now=Xe.now,this.fadeDuration=Xe.fadeDuration,this.zoomHistory=Xe.zoomHistory,this.transition=Xe.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ii,this.transition={})}isSupportedScript(u){return function(u,Xe){for(const Wt of u)if(!Oi(Wt.charCodeAt(0),Xe))return!1;return!0}(u,"loaded"===ld.getRTLTextPluginStatus())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const u=this.zoom,Xe=u-Math.floor(u),Wt=this.crossFadingFactor();return u>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:Xe+(1-Xe)*Wt}:{fromScale:.5,toScale:1,t:1-(1-Wt)*Xe}}}class qi{constructor(u,Xe){this.property=u,this.value=Xe,this.expression=function(u,Xe){if(cn(u))return new Sn(u,Xe);if(vn(u)){const Wt=An(u,Xe);if("error"===Wt.result)throw new Error(Wt.value.map((u=>`${u.key}: ${u.message}`)).join(", "));return Wt.value}{let Wt=u;return"color"===Xe.type&&"string"==typeof u?Wt=Kt.parse(u):"padding"!==Xe.type||"number"!=typeof u&&!Array.isArray(u)?"variableAnchorOffsetCollection"===Xe.type&&Array.isArray(u)&&(Wt=Qt.parse(u)):Wt=Jt.parse(u),{kind:"constant",evaluate:()=>Wt}}}(void 0===Xe?u.specification.default:Xe,u.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(u,Xe,Wt){return this.property.possiblyEvaluate(this,u,Xe,Wt)}}class Ni{constructor(u){this.property=u,this.value=new qi(u,void 0)}transitioned(u,Xe){return new Gi(this.property,this.value,Xe,g({},u.transition,this.transition),u.now)}untransitioned(){return new Gi(this.property,this.value,null,{},0)}}class Zi{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitionablePropertyValues)}getValue(u){return w(this._values[u].value.value)}setValue(u,Xe){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Ni(this._values[u].property)),this._values[u].value=new qi(this._values[u].property,null===Xe?void 0:w(Xe))}getTransition(u){return w(this._values[u].transition)}setTransition(u,Xe){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Ni(this._values[u].property)),this._values[u].transition=w(Xe)||void 0}serialize(){const u={};for(const Xe of Object.keys(this._values)){const Wt=this.getValue(Xe);void 0!==Wt&&(u[Xe]=Wt);const In=this.getTransition(Xe);void 0!==In&&(u[`${Xe}-transition`]=In)}return u}transitioned(u,Xe){const Wt=new Ki(this._properties);for(const In of Object.keys(this._values))Wt._values[In]=this._values[In].transitioned(u,Xe._values[In]);return Wt}untransitioned(){const u=new Ki(this._properties);for(const Xe of Object.keys(this._values))u._values[Xe]=this._values[Xe].untransitioned();return u}}class Gi{constructor(u,Xe,Wt,In,fr){this.property=u,this.value=Xe,this.begin=fr+In.delay||0,this.end=this.begin+In.duration||0,u.specification.transition&&(In.delay||In.duration)&&(this.prior=Wt)}possiblyEvaluate(u,Xe,Wt){const In=u.now||0,fr=this.value.possiblyEvaluate(u,Xe,Wt),_r=this.prior;if(_r){if(In>this.end)return this.prior=null,fr;if(this.value.isDataDriven())return this.prior=null,fr;if(In<this.begin)return _r.possiblyEvaluate(u,Xe,Wt);{const wr=(In-this.begin)/(this.end-this.begin);return this.property.interpolate(_r.possiblyEvaluate(u,Xe,Wt),fr,function(u){if(u<=0)return 0;if(u>=1)return 1;const Xe=u*u,Wt=Xe*u;return 4*(u<.5?Wt:3*(u-Xe)+Wt-.75)}(wr))}}return fr}}class Ki{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitioningPropertyValues)}possiblyEvaluate(u,Xe,Wt){const In=new Yi(this._properties);for(const fr of Object.keys(this._values))In._values[fr]=this._values[fr].possiblyEvaluate(u,Xe,Wt);return In}hasTransition(){for(const u of Object.keys(this._values))if(this._values[u].prior)return!0;return!1}}class Xi{constructor(u){this._properties=u,this._values=Object.create(u.defaultPropertyValues)}hasValue(u){return void 0!==this._values[u].value}getValue(u){return w(this._values[u].value)}setValue(u,Xe){this._values[u]=new qi(this._values[u].property,null===Xe?void 0:w(Xe))}serialize(){const u={};for(const Xe of Object.keys(this._values)){const Wt=this.getValue(Xe);void 0!==Wt&&(u[Xe]=Wt)}return u}possiblyEvaluate(u,Xe,Wt){const In=new Yi(this._properties);for(const fr of Object.keys(this._values))In._values[fr]=this._values[fr].possiblyEvaluate(u,Xe,Wt);return In}}class Hi{constructor(u,Xe,Wt){this.property=u,this.value=Xe,this.parameters=Wt}isConstant(){return"constant"===this.value.kind}constantOr(u){return"constant"===this.value.kind?this.value.value:u}evaluate(u,Xe,Wt,In){return this.property.evaluate(this.value,this.parameters,u,Xe,Wt,In)}}class Yi{constructor(u){this._properties=u,this._values=Object.create(u.defaultPossiblyEvaluatedValues)}get(u){return this._values[u]}}class Ji{constructor(u){this.specification=u}possiblyEvaluate(u,Xe){if(u.isDataDriven())throw new Error("Value should not be data driven");return u.expression.evaluate(Xe)}interpolate(u,Xe,Wt){const In=rc[this.specification.type];return In?In(u,Xe,Wt):u}}class Wi{constructor(u,Xe){this.specification=u,this.overrides=Xe}possiblyEvaluate(u,Xe,Wt,In){return new Hi(this,"constant"===u.expression.kind||"camera"===u.expression.kind?{kind:"constant",value:u.expression.evaluate(Xe,null,{},Wt,In)}:u.expression,Xe)}interpolate(u,Xe,Wt){if("constant"!==u.value.kind||"constant"!==Xe.value.kind)return u;if(void 0===u.value.value||void 0===Xe.value.value)return new Hi(this,{kind:"constant",value:void 0},u.parameters);const In=rc[this.specification.type];if(In){const fr=In(u.value.value,Xe.value.value,Wt);return new Hi(this,{kind:"constant",value:fr},u.parameters)}return u}evaluate(u,Xe,Wt,In,fr,_r){return"constant"===u.kind?u.value:u.evaluate(Xe,Wt,In,fr,_r)}}class Qi extends Wi{possiblyEvaluate(u,Xe,Wt,In){if(void 0===u.value)return new Hi(this,{kind:"constant",value:void 0},Xe);if("constant"===u.expression.kind){const fr=u.expression.evaluate(Xe,null,{},Wt,In),_r="resolvedImage"===u.property.specification.type&&"string"!=typeof fr?fr.name:fr,wr=this._calculate(_r,_r,_r,Xe);return new Hi(this,{kind:"constant",value:wr},Xe)}if("camera"===u.expression.kind){const Wt=this._calculate(u.expression.evaluate({zoom:Xe.zoom-1}),u.expression.evaluate({zoom:Xe.zoom}),u.expression.evaluate({zoom:Xe.zoom+1}),Xe);return new Hi(this,{kind:"constant",value:Wt},Xe)}return new Hi(this,u.expression,Xe)}evaluate(u,Xe,Wt,In,fr,_r){if("source"===u.kind){const wr=u.evaluate(Xe,Wt,In,fr,_r);return this._calculate(wr,wr,wr,Xe)}return"composite"===u.kind?this._calculate(u.evaluate({zoom:Math.floor(Xe.zoom)-1},Wt,In),u.evaluate({zoom:Math.floor(Xe.zoom)},Wt,In),u.evaluate({zoom:Math.floor(Xe.zoom)+1},Wt,In),Xe):u.value}_calculate(u,Xe,Wt,In){return In.zoom>In.zoomHistory.lastIntegerZoom?{from:u,to:Xe}:{from:Wt,to:Xe}}interpolate(u){return u}}class ts{constructor(u){this.specification=u}possiblyEvaluate(u,Xe,Wt,In){if(void 0!==u.value){if("constant"===u.expression.kind){const fr=u.expression.evaluate(Xe,null,{},Wt,In);return this._calculate(fr,fr,fr,Xe)}return this._calculate(u.expression.evaluate(new Ui(Math.floor(Xe.zoom-1),Xe)),u.expression.evaluate(new Ui(Math.floor(Xe.zoom),Xe)),u.expression.evaluate(new Ui(Math.floor(Xe.zoom+1),Xe)),Xe)}}_calculate(u,Xe,Wt,In){return In.zoom>In.zoomHistory.lastIntegerZoom?{from:u,to:Xe}:{from:Wt,to:Xe}}interpolate(u){return u}}class es{constructor(u){this.specification=u}possiblyEvaluate(u,Xe,Wt,In){return!!u.expression.evaluate(Xe,null,{},Wt,In)}interpolate(){return!1}}class rs{constructor(u){this.properties=u,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const Xe in u){const Wt=u[Xe];Wt.specification.overridable&&this.overridableProperties.push(Xe);const In=this.defaultPropertyValues[Xe]=new qi(Wt,void 0),fr=this.defaultTransitionablePropertyValues[Xe]=new Ni(Wt);this.defaultTransitioningPropertyValues[Xe]=fr.untransitioned(),this.defaultPossiblyEvaluatedValues[Xe]=In.possiblyEvaluate({})}}}wi("DataDrivenProperty",Wi),wi("DataConstantProperty",Ji),wi("CrossFadedDataDrivenProperty",Qi),wi("CrossFadedProperty",ts),wi("ColorRampProperty",es);const cd="-transition";class is extends Z{constructor(u,Xe){if(super(),this.id=u.id,this.type=u.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==u.type&&(this.metadata=u.metadata,this.minzoom=u.minzoom,this.maxzoom=u.maxzoom,"background"!==u.type&&(this.source=u.source,this.sourceLayer=u["source-layer"],this.filter=u.filter),Xe.layout&&(this._unevaluatedLayout=new Xi(Xe.layout)),Xe.paint)){this._transitionablePaint=new Zi(Xe.paint);for(const Xe in u.paint)this.setPaintProperty(Xe,u.paint[Xe],{validate:!1});for(const Xe in u.layout)this.setLayoutProperty(Xe,u.layout[Xe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Yi(Xe.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(u){return"visibility"===u?this.visibility:this._unevaluatedLayout.getValue(u)}setLayoutProperty(u,Xe,Wt={}){null!=Xe&&this._validate(Vu,`layers.${this.id}.layout.${u}`,u,Xe,Wt)||("visibility"!==u?this._unevaluatedLayout.setValue(u,Xe):this.visibility=Xe)}getPaintProperty(u){return u.endsWith(cd)?this._transitionablePaint.getTransition(u.slice(0,-11)):this._transitionablePaint.getValue(u)}setPaintProperty(u,Xe,Wt={}){if(null!=Xe&&this._validate(Nu,`layers.${this.id}.paint.${u}`,u,Xe,Wt))return!1;if(u.endsWith(cd))return this._transitionablePaint.setTransition(u.slice(0,-11),Xe||void 0),!1;{const Wt=this._transitionablePaint._values[u],In="cross-faded-data-driven"===Wt.property.specification["property-type"],fr=Wt.value.isDataDriven(),_r=Wt.value;this._transitionablePaint.setValue(u,Xe),this._handleSpecialPaintPropertyUpdate(u);const wr=this._transitionablePaint._values[u].value;return wr.isDataDriven()||fr||In||this._handleOverridablePaintPropertyUpdate(u,_r,wr)}}_handleSpecialPaintPropertyUpdate(u){}_handleOverridablePaintPropertyUpdate(u,Xe,Wt){return!1}isHidden(u){return!!(this.minzoom&&u<this.minzoom)||!!(this.maxzoom&&u>=this.maxzoom)||"none"===this.visibility}updateTransitions(u){this._transitioningPaint=this._transitionablePaint.transitioned(u,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(u,Xe){u.getCrossfadeParameters&&(this._crossfadeParameters=u.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(u,void 0,Xe)),this.paint=this._transitioningPaint.possiblyEvaluate(u,void 0,Xe)}serialize(){const u={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&&(u.layout=u.layout||{},u.layout.visibility=this.visibility),b(u,((u,Xe)=>!(void 0===u||"layout"===Xe&&!Object.keys(u).length||"paint"===Xe&&!Object.keys(u).length)))}_validate(u,Xe,Wt,In,fr={}){return(!fr||!1!==fr.validate)&&xi(this,u.call(Lu,{key:Xe,layerType:this.type,objectKey:Wt,value:In,styleSpec:xo,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const u in this.paint._values){const Xe=this.paint.get(u);if(Xe instanceof Hi&&an(Xe.property.specification)&&("source"===Xe.value.kind||"composite"===Xe.value.kind)&&Xe.value.isStateDependent)return!0}return!1}}const ud={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class as{constructor(u,Xe){this._structArray=u,this._pos1=Xe*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class os{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(u,Xe){return u._trim(),Xe&&(u.isTransferred=!0,Xe.push(u.arrayBuffer)),{length:u.length,arrayBuffer:u.arrayBuffer}}static deserialize(u){const Xe=Object.create(this.prototype);return Xe.arrayBuffer=u.arrayBuffer,Xe.length=u.length,Xe.capacity=u.arrayBuffer.byteLength/Xe.bytesPerElement,Xe._refreshViews(),Xe}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(u){this.reserve(u),this.length=u}reserve(u){if(u>this.capacity){this.capacity=Math.max(u,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const Xe=this.uint8;this._refreshViews(),Xe&&this.uint8.set(Xe)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ls(u,Xe=1){let Wt=0,In=0;return{members:u.map((u=>{const fr=ud[u.type].BYTES_PER_ELEMENT,_r=Wt=us(Wt,Math.max(Xe,fr)),wr=u.components||1;return In=Math.max(In,fr),Wt+=fr*wr,{name:u.name,type:u.type,components:wr,offset:_r}})),size:us(Wt,Math.max(In,Xe)),alignment:Xe}}function us(u,Xe){return Math.ceil(u/Xe)*Xe}class cs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe){const Wt=this.length;return this.resize(Wt+1),this.emplace(Wt,u,Xe)}emplace(u,Xe,Wt){const In=2*u;return this.int16[In+0]=Xe,this.int16[In+1]=Wt,u}}cs.prototype.bytesPerElement=4,wi("StructArrayLayout2i4",cs);class hs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt){const In=this.length;return this.resize(In+1),this.emplace(In,u,Xe,Wt)}emplace(u,Xe,Wt,In){const fr=3*u;return this.int16[fr+0]=Xe,this.int16[fr+1]=Wt,this.int16[fr+2]=In,u}}hs.prototype.bytesPerElement=6,wi("StructArrayLayout3i6",hs);class ps extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe,Wt,In)}emplace(u,Xe,Wt,In,fr){const _r=4*u;return this.int16[_r+0]=Xe,this.int16[_r+1]=Wt,this.int16[_r+2]=In,this.int16[_r+3]=fr,u}}ps.prototype.bytesPerElement=8,wi("StructArrayLayout4i8",ps);class fs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In,fr,_r){const wr=this.length;return this.resize(wr+1),this.emplace(wr,u,Xe,Wt,In,fr,_r)}emplace(u,Xe,Wt,In,fr,_r,wr){const Ar=6*u;return this.int16[Ar+0]=Xe,this.int16[Ar+1]=Wt,this.int16[Ar+2]=In,this.int16[Ar+3]=fr,this.int16[Ar+4]=_r,this.int16[Ar+5]=wr,u}}fs.prototype.bytesPerElement=12,wi("StructArrayLayout2i4i12",fs);class ds extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In,fr,_r){const wr=this.length;return this.resize(wr+1),this.emplace(wr,u,Xe,Wt,In,fr,_r)}emplace(u,Xe,Wt,In,fr,_r,wr){const Ar=4*u,Kr=8*u;return this.int16[Ar+0]=Xe,this.int16[Ar+1]=Wt,this.uint8[Kr+4]=In,this.uint8[Kr+5]=fr,this.uint8[Kr+6]=_r,this.uint8[Kr+7]=wr,u}}ds.prototype.bytesPerElement=8,wi("StructArrayLayout2i4ub8",ds);class ys extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe){const Wt=this.length;return this.resize(Wt+1),this.emplace(Wt,u,Xe)}emplace(u,Xe,Wt){const In=2*u;return this.float32[In+0]=Xe,this.float32[In+1]=Wt,u}}ys.prototype.bytesPerElement=8,wi("StructArrayLayout2f8",ys);class ms extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no){const io=this.length;return this.resize(io+1),this.emplace(io,u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no)}emplace(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io){const oo=10*u;return this.uint16[oo+0]=Xe,this.uint16[oo+1]=Wt,this.uint16[oo+2]=In,this.uint16[oo+3]=fr,this.uint16[oo+4]=_r,this.uint16[oo+5]=wr,this.uint16[oo+6]=Ar,this.uint16[oo+7]=Kr,this.uint16[oo+8]=no,this.uint16[oo+9]=io,u}}ms.prototype.bytesPerElement=20,wi("StructArrayLayout10ui20",ms);class gs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo){const ao=this.length;return this.resize(ao+1),this.emplace(ao,u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo)}emplace(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao){const so=12*u;return this.int16[so+0]=Xe,this.int16[so+1]=Wt,this.int16[so+2]=In,this.int16[so+3]=fr,this.uint16[so+4]=_r,this.uint16[so+5]=wr,this.uint16[so+6]=Ar,this.uint16[so+7]=Kr,this.int16[so+8]=no,this.int16[so+9]=io,this.int16[so+10]=oo,this.int16[so+11]=ao,u}}gs.prototype.bytesPerElement=24,wi("StructArrayLayout4i4ui4i24",gs);class xs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt){const In=this.length;return this.resize(In+1),this.emplace(In,u,Xe,Wt)}emplace(u,Xe,Wt,In){const fr=3*u;return this.float32[fr+0]=Xe,this.float32[fr+1]=Wt,this.float32[fr+2]=In,u}}xs.prototype.bytesPerElement=12,wi("StructArrayLayout3f12",xs);class vs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.uint32[1*u+0]=Xe,u}}vs.prototype.bytesPerElement=4,wi("StructArrayLayout1ul4",vs);class bs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){const no=this.length;return this.resize(no+1),this.emplace(no,u,Xe,Wt,In,fr,_r,wr,Ar,Kr)}emplace(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no){const io=10*u,oo=5*u;return this.int16[io+0]=Xe,this.int16[io+1]=Wt,this.int16[io+2]=In,this.int16[io+3]=fr,this.int16[io+4]=_r,this.int16[io+5]=wr,this.uint32[oo+3]=Ar,this.uint16[io+8]=Kr,this.uint16[io+9]=no,u}}bs.prototype.bytesPerElement=20,wi("StructArrayLayout6i1ul2ui20",bs);class ws extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In,fr,_r){const wr=this.length;return this.resize(wr+1),this.emplace(wr,u,Xe,Wt,In,fr,_r)}emplace(u,Xe,Wt,In,fr,_r,wr){const Ar=6*u;return this.int16[Ar+0]=Xe,this.int16[Ar+1]=Wt,this.int16[Ar+2]=In,this.int16[Ar+3]=fr,this.int16[Ar+4]=_r,this.int16[Ar+5]=wr,u}}ws.prototype.bytesPerElement=12,wi("StructArrayLayout2i2i2i12",ws);class _s extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In,fr){const _r=this.length;return this.resize(_r+1),this.emplace(_r,u,Xe,Wt,In,fr)}emplace(u,Xe,Wt,In,fr,_r){const wr=4*u,Ar=8*u;return this.float32[wr+0]=Xe,this.float32[wr+1]=Wt,this.float32[wr+2]=In,this.int16[Ar+6]=fr,this.int16[Ar+7]=_r,u}}_s.prototype.bytesPerElement=16,wi("StructArrayLayout2f1f2i16",_s);class As extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In,fr,_r){const wr=this.length;return this.resize(wr+1),this.emplace(wr,u,Xe,Wt,In,fr,_r)}emplace(u,Xe,Wt,In,fr,_r,wr){const Ar=16*u,Kr=4*u,no=8*u;return this.uint8[Ar+0]=Xe,this.uint8[Ar+1]=Wt,this.float32[Kr+1]=In,this.float32[Kr+2]=fr,this.int16[no+6]=_r,this.int16[no+7]=wr,u}}As.prototype.bytesPerElement=16,wi("StructArrayLayout2ub2f2i16",As);class Ss extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt){const In=this.length;return this.resize(In+1),this.emplace(In,u,Xe,Wt)}emplace(u,Xe,Wt,In){const fr=3*u;return this.uint16[fr+0]=Xe,this.uint16[fr+1]=Wt,this.uint16[fr+2]=In,u}}Ss.prototype.bytesPerElement=6,wi("StructArrayLayout3ui6",Ss);class ks extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go){const xo=this.length;return this.resize(xo+1),this.emplace(xo,u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go)}emplace(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go,xo){const ko=24*u,Co=12*u,Io=48*u;return this.int16[ko+0]=Xe,this.int16[ko+1]=Wt,this.uint16[ko+2]=In,this.uint16[ko+3]=fr,this.uint32[Co+2]=_r,this.uint32[Co+3]=wr,this.uint32[Co+4]=Ar,this.uint16[ko+10]=Kr,this.uint16[ko+11]=no,this.uint16[ko+12]=io,this.float32[Co+7]=oo,this.float32[Co+8]=ao,this.uint8[Io+36]=so,this.uint8[Io+37]=co,this.uint8[Io+38]=ho,this.uint32[Co+10]=go,this.int16[ko+22]=xo,u}}ks.prototype.bytesPerElement=48,wi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ks);class Ms extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go,xo,ko,Co,Io,zo,Bo,ca,ua,Da,ns,yl){const vl=this.length;return this.resize(vl+1),this.emplace(vl,u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go,xo,ko,Co,Io,zo,Bo,ca,ua,Da,ns,yl)}emplace(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go,xo,ko,Co,Io,zo,Bo,ca,ua,Da,ns,yl,vl){const kl=32*u,Al=16*u;return this.int16[kl+0]=Xe,this.int16[kl+1]=Wt,this.int16[kl+2]=In,this.int16[kl+3]=fr,this.int16[kl+4]=_r,this.int16[kl+5]=wr,this.int16[kl+6]=Ar,this.int16[kl+7]=Kr,this.uint16[kl+8]=no,this.uint16[kl+9]=io,this.uint16[kl+10]=oo,this.uint16[kl+11]=ao,this.uint16[kl+12]=so,this.uint16[kl+13]=co,this.uint16[kl+14]=ho,this.uint16[kl+15]=go,this.uint16[kl+16]=xo,this.uint16[kl+17]=ko,this.uint16[kl+18]=Co,this.uint16[kl+19]=Io,this.uint16[kl+20]=zo,this.uint16[kl+21]=Bo,this.uint16[kl+22]=ca,this.uint32[Al+12]=ua,this.float32[Al+13]=Da,this.float32[Al+14]=ns,this.uint16[kl+30]=yl,this.uint16[kl+31]=vl,u}}Ms.prototype.bytesPerElement=64,wi("StructArrayLayout8i15ui1ul2f2ui64",Ms);class Is extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.float32[1*u+0]=Xe,u}}Is.prototype.bytesPerElement=4,wi("StructArrayLayout1f4",Is);class zs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt){const In=this.length;return this.resize(In+1),this.emplace(In,u,Xe,Wt)}emplace(u,Xe,Wt,In){const fr=3*u;return this.uint16[6*u+0]=Xe,this.float32[fr+1]=Wt,this.float32[fr+2]=In,u}}zs.prototype.bytesPerElement=12,wi("StructArrayLayout1ui2f12",zs);class Ps extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt){const In=this.length;return this.resize(In+1),this.emplace(In,u,Xe,Wt)}emplace(u,Xe,Wt,In){const fr=4*u;return this.uint32[2*u+0]=Xe,this.uint16[fr+2]=Wt,this.uint16[fr+3]=In,u}}Ps.prototype.bytesPerElement=8,wi("StructArrayLayout1ul2ui8",Ps);class Cs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe){const Wt=this.length;return this.resize(Wt+1),this.emplace(Wt,u,Xe)}emplace(u,Xe,Wt){const In=2*u;return this.uint16[In+0]=Xe,this.uint16[In+1]=Wt,u}}Cs.prototype.bytesPerElement=4,wi("StructArrayLayout2ui4",Cs);class Bs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.uint16[1*u+0]=Xe,u}}Bs.prototype.bytesPerElement=2,wi("StructArrayLayout1ui2",Bs);class Vs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,In){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe,Wt,In)}emplace(u,Xe,Wt,In,fr){const _r=4*u;return this.float32[_r+0]=Xe,this.float32[_r+1]=Wt,this.float32[_r+2]=In,this.float32[_r+3]=fr,u}}Vs.prototype.bytesPerElement=16,wi("StructArrayLayout4f16",Vs);class Es extends as{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new Wt(this.anchorPointX,this.anchorPointY)}}Es.prototype.size=20;class Fs extends bs{get(u){return new Es(this,u)}}wi("CollisionBoxArray",Fs);class Ts extends as{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(u){this._structArray.uint8[this._pos1+37]=u}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(u){this._structArray.uint8[this._pos1+38]=u}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(u){this._structArray.uint32[this._pos4+10]=u}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Ts.prototype.size=48;class $s extends ks{get(u){return new Ts(this,u)}}wi("PlacedSymbolArray",$s);class Ls extends as{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(u){this._structArray.uint32[this._pos4+12]=u}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Ls.prototype.size=64;class Ds extends Ms{get(u){return new Ls(this,u)}}wi("SymbolInstanceArray",Ds);class Os extends Is{getoffsetX(u){return this.float32[1*u+0]}}wi("GlyphOffsetArray",Os);class js extends hs{getx(u){return this.int16[3*u+0]}gety(u){return this.int16[3*u+1]}gettileUnitDistanceFromAnchor(u){return this.int16[3*u+2]}}wi("SymbolLineVertexArray",js);class Rs extends as{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Rs.prototype.size=12;class Us extends zs{get(u){return new Rs(this,u)}}wi("TextAnchorOffsetArray",Us);class qs extends as{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]}}qs.prototype.size=8;class Ns extends Ps{get(u){return new qs(this,u)}}wi("FeatureIndexArray",Ns);class Zs extends cs{}class Gs extends cs{}class Ks extends cs{}class Xs extends fs{}class Hs extends ds{}class Ys extends ys{}class Js extends ms{}class Ws extends gs{}class Qs extends xs{}class ta extends vs{}class ea extends ws{}class ra extends As{}class na extends Ss{}class ia extends Cs{}const dd=ls([{name:"a_pos",components:2,type:"Int16"}],4),{members:md}=dd;class oa{constructor(u=[]){this.segments=u}prepareSegment(u,Xe,Wt,In){let fr=this.segments[this.segments.length-1];return u>oa.MAX_VERTEX_ARRAY_LENGTH&&A(`Max vertices per segment is ${oa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${u}`),(!fr||fr.vertexLength+u>oa.MAX_VERTEX_ARRAY_LENGTH||fr.sortKey!==In)&&(fr={vertexOffset:Xe.length,primitiveOffset:Wt.length,vertexLength:0,primitiveLength:0},void 0!==In&&(fr.sortKey=In),this.segments.push(fr)),fr}get(){return this.segments}destroy(){for(const u of this.segments)for(const Xe in u.vaos)u.vaos[Xe].destroy()}static simpleSegment(u,Xe,Wt,In){return new oa([{vertexOffset:u,primitiveOffset:Xe,vertexLength:Wt,primitiveLength:In,vaos:{},sortKey:0}])}}function la(u,Xe){return 256*(u=y(Math.floor(u),0,255))+y(Math.floor(Xe),0,255)}oa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,wi("SegmentVector",oa);const yd=ls([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var _d={exports:{}},vd={exports:function(u,Xe){var Wt,In,fr,_r,wr,Ar,Kr,no;for(In=u.length-(Wt=3&u.length),fr=Xe,wr=3432918353,Ar=461845907,no=0;no<In;)Kr=255&u.charCodeAt(no)|(255&u.charCodeAt(++no))<<8|(255&u.charCodeAt(++no))<<16|(255&u.charCodeAt(++no))<<24,++no,fr=27492+(65535&(_r=5*(65535&(fr=(fr^=Kr=(65535&(Kr=(Kr=(65535&Kr)*wr+(((Kr>>>16)*wr&65535)<<16)&4294967295)<<15|Kr>>>17))*Ar+(((Kr>>>16)*Ar&65535)<<16)&4294967295)<<13|fr>>>19))+((5*(fr>>>16)&65535)<<16)&4294967295))+((58964+(_r>>>16)&65535)<<16);switch(Kr=0,Wt){case 3:Kr^=(255&u.charCodeAt(no+2))<<16;case 2:Kr^=(255&u.charCodeAt(no+1))<<8;case 1:fr^=Kr=(65535&(Kr=(Kr=(65535&(Kr^=255&u.charCodeAt(no)))*wr+(((Kr>>>16)*wr&65535)<<16)&4294967295)<<15|Kr>>>17))*Ar+(((Kr>>>16)*Ar&65535)<<16)&4294967295}return fr^=u.length,fr=2246822507*(65535&(fr^=fr>>>16))+((2246822507*(fr>>>16)&65535)<<16)&4294967295,fr=3266489909*(65535&(fr^=fr>>>13))+((3266489909*(fr>>>16)&65535)<<16)&4294967295,(fr^=fr>>>16)>>>0}},xd={exports:function(u,Xe){for(var Wt,In=u.length,fr=Xe^In,_r=0;In>=4;)Wt=1540483477*(65535&(Wt=255&u.charCodeAt(_r)|(255&u.charCodeAt(++_r))<<8|(255&u.charCodeAt(++_r))<<16|(255&u.charCodeAt(++_r))<<24))+((1540483477*(Wt>>>16)&65535)<<16),fr=1540483477*(65535&fr)+((1540483477*(fr>>>16)&65535)<<16)^(Wt=1540483477*(65535&(Wt^=Wt>>>24))+((1540483477*(Wt>>>16)&65535)<<16)),In-=4,++_r;switch(In){case 3:fr^=(255&u.charCodeAt(_r+2))<<16;case 2:fr^=(255&u.charCodeAt(_r+1))<<8;case 1:fr=1540483477*(65535&(fr^=255&u.charCodeAt(_r)))+((1540483477*(fr>>>16)&65535)<<16)}return fr=1540483477*(65535&(fr^=fr>>>13))+((1540483477*(fr>>>16)&65535)<<16),(fr^=fr>>>15)>>>0}},wd=vd.exports,Sd=xd.exports;_d.exports=wd,_d.exports.murmur3=wd,_d.exports.murmur2=Sd;var kd=r(_d.exports);class ga{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(u,Xe,Wt,In){this.ids.push(xa(u)),this.positions.push(Xe,Wt,In)}getPositions(u){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const Xe=xa(u);let Wt=0,In=this.ids.length-1;for(;Wt<In;){const u=Wt+In>>1;this.ids[u]>=Xe?In=u:Wt=u+1}const fr=[];for(;this.ids[Wt]===Xe;)fr.push({index:this.positions[3*Wt],start:this.positions[3*Wt+1],end:this.positions[3*Wt+2]}),Wt++;return fr}static serialize(u,Xe){const Wt=new Float64Array(u.ids),In=new Uint32Array(u.positions);return va(Wt,In,0,Wt.length-1),Xe&&Xe.push(Wt.buffer,In.buffer),{ids:Wt,positions:In}}static deserialize(u){const Xe=new ga;return Xe.ids=u.ids,Xe.positions=u.positions,Xe.indexed=!0,Xe}}function xa(u){const Xe=+u;return!isNaN(Xe)&&Xe<=Number.MAX_SAFE_INTEGER?Xe:kd(String(u))}function va(u,Xe,Wt,In){for(;Wt<In;){const fr=u[Wt+In>>1];let _r=Wt-1,wr=In+1;for(;;){do{_r++}while(u[_r]<fr);do{wr--}while(u[wr]>fr);if(_r>=wr)break;ba(u,_r,wr),ba(Xe,3*_r,3*wr),ba(Xe,3*_r+1,3*wr+1),ba(Xe,3*_r+2,3*wr+2)}wr-Wt<In-wr?(va(u,Xe,Wt,wr),Wt=wr+1):(va(u,Xe,wr+1,In),In=wr)}}function ba(u,Xe,Wt){const In=u[Xe];u[Xe]=u[Wt],u[Wt]=In}wi("FeaturePositionMap",ga);class wa{constructor(u,Xe){this.gl=u.gl,this.location=Xe}}class _a extends wa{constructor(u,Xe){super(u,Xe),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1f(this.location,u))}}class Aa extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]&&u[3]===this.current[3]||(this.current=u,this.gl.uniform4f(this.location,u[0],u[1],u[2],u[3]))}}class Sa extends wa{constructor(u,Xe){super(u,Xe),this.current=Kt.transparent}set(u){u.r===this.current.r&&u.g===this.current.g&&u.b===this.current.b&&u.a===this.current.a||(this.current=u,this.gl.uniform4f(this.location,u.r,u.g,u.b,u.a))}}const Ad=new Float32Array(16);function Ma(u){return[la(255*u.r,255*u.g),la(255*u.b,255*u.a)]}class Ia{constructor(u,Xe,Wt){this.value=u,this.uniformNames=Xe.map((u=>`u_${u}`)),this.type=Wt}setUniform(u,Xe,Wt){u.set(Wt.constantOr(this.value))}getBinding(u,Xe,Wt){return"color"===this.type?new Sa(u,Xe):new _a(u,Xe)}}class za{constructor(u,Xe){this.uniformNames=Xe.map((u=>`u_${u}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(u,Xe){this.pixelRatioFrom=Xe.pixelRatio,this.pixelRatioTo=u.pixelRatio,this.patternFrom=Xe.tlbr,this.patternTo=u.tlbr}setUniform(u,Xe,Wt,In){const fr="u_pattern_to"===In?this.patternTo:"u_pattern_from"===In?this.patternFrom:"u_pixel_ratio_to"===In?this.pixelRatioTo:"u_pixel_ratio_from"===In?this.pixelRatioFrom:null;fr&&u.set(fr)}getBinding(u,Xe,Wt){return"u_pattern"===Wt.substr(0,9)?new Aa(u,Xe):new _a(u,Xe)}}class Pa{constructor(u,Xe,Wt,In){this.expression=u,this.type=Wt,this.maxValue=0,this.paintVertexAttributes=Xe.map((u=>({name:`a_${u}`,type:"Float32",components:"color"===Wt?2:1,offset:0}))),this.paintVertexArray=new In}populatePaintArray(u,Xe,Wt,In,fr){const _r=this.paintVertexArray.length,wr=this.expression.evaluate(new Ui(0),Xe,{},In,[],fr);this.paintVertexArray.resize(u),this._setPaintValue(_r,u,wr)}updatePaintArray(u,Xe,Wt,In){const fr=this.expression.evaluate({zoom:0},Wt,In);this._setPaintValue(u,Xe,fr)}_setPaintValue(u,Xe,Wt){if("color"===this.type){const In=Ma(Wt);for(let Wt=u;Wt<Xe;Wt++)this.paintVertexArray.emplace(Wt,In[0],In[1])}else{for(let In=u;In<Xe;In++)this.paintVertexArray.emplace(In,Wt);this.maxValue=Math.max(this.maxValue,Math.abs(Wt))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Ca{constructor(u,Xe,Wt,In,fr,_r){this.expression=u,this.uniformNames=Xe.map((u=>`u_${u}_t`)),this.type=Wt,this.useIntegerZoom=In,this.zoom=fr,this.maxValue=0,this.paintVertexAttributes=Xe.map((u=>({name:`a_${u}`,type:"Float32",components:"color"===Wt?4:2,offset:0}))),this.paintVertexArray=new _r}populatePaintArray(u,Xe,Wt,In,fr){const _r=this.expression.evaluate(new Ui(this.zoom),Xe,{},In,[],fr),wr=this.expression.evaluate(new Ui(this.zoom+1),Xe,{},In,[],fr),Ar=this.paintVertexArray.length;this.paintVertexArray.resize(u),this._setPaintValue(Ar,u,_r,wr)}updatePaintArray(u,Xe,Wt,In){const fr=this.expression.evaluate({zoom:this.zoom},Wt,In),_r=this.expression.evaluate({zoom:this.zoom+1},Wt,In);this._setPaintValue(u,Xe,fr,_r)}_setPaintValue(u,Xe,Wt,In){if("color"===this.type){const fr=Ma(Wt),_r=Ma(In);for(let Wt=u;Wt<Xe;Wt++)this.paintVertexArray.emplace(Wt,fr[0],fr[1],_r[0],_r[1])}else{for(let fr=u;fr<Xe;fr++)this.paintVertexArray.emplace(fr,Wt,In);this.maxValue=Math.max(this.maxValue,Math.abs(Wt),Math.abs(In))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(u,Xe){const Wt=this.useIntegerZoom?Math.floor(Xe.zoom):Xe.zoom,In=y(this.expression.interpolationFactor(Wt,this.zoom,this.zoom+1),0,1);u.set(In)}getBinding(u,Xe,Wt){return new _a(u,Xe)}}class Ba{constructor(u,Xe,Wt,In,fr,_r){this.expression=u,this.type=Xe,this.useIntegerZoom=Wt,this.zoom=In,this.layerId=_r,this.zoomInPaintVertexArray=new fr,this.zoomOutPaintVertexArray=new fr}populatePaintArray(u,Xe,Wt){const In=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(u),this.zoomOutPaintVertexArray.resize(u),this._setPaintValues(In,u,Xe.patterns&&Xe.patterns[this.layerId],Wt)}updatePaintArray(u,Xe,Wt,In,fr){this._setPaintValues(u,Xe,Wt.patterns&&Wt.patterns[this.layerId],fr)}_setPaintValues(u,Xe,Wt,In){if(!In||!Wt)return;const{min:fr,mid:_r,max:wr}=Wt,Ar=In[fr],Kr=In[_r],no=In[wr];if(Ar&&Kr&&no)for(let Wt=u;Wt<Xe;Wt++)this.zoomInPaintVertexArray.emplace(Wt,Kr.tl[0],Kr.tl[1],Kr.br[0],Kr.br[1],Ar.tl[0],Ar.tl[1],Ar.br[0],Ar.br[1],Kr.pixelRatio,Ar.pixelRatio),this.zoomOutPaintVertexArray.emplace(Wt,Kr.tl[0],Kr.tl[1],Kr.br[0],Kr.br[1],no.tl[0],no.tl[1],no.br[0],no.br[1],Kr.pixelRatio,no.pixelRatio)}upload(u){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=u.createVertexBuffer(this.zoomInPaintVertexArray,yd.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=u.createVertexBuffer(this.zoomOutPaintVertexArray,yd.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Va{constructor(u,Xe,Wt){this.binders={},this._buffers=[];const In=[];for(const fr in u.paint._values){if(!Wt(fr))continue;const _r=u.paint.get(fr);if(!(_r instanceof Hi&&an(_r.property.specification)))continue;const wr=Fa(fr,u.type),Ar=_r.value,Kr=_r.property.specification.type,no=_r.property.useIntegerZoom,io=_r.property.specification["property-type"],oo="cross-faded"===io||"cross-faded-data-driven"===io;if("constant"===Ar.kind)this.binders[fr]=oo?new za(Ar.value,wr):new Ia(Ar.value,wr,Kr),In.push(`/u_${fr}`);else if("source"===Ar.kind||oo){const Wt=Ta(fr,Kr,"source");this.binders[fr]=oo?new Ba(Ar,Kr,no,Xe,Wt,u.id):new Pa(Ar,wr,Kr,Wt),In.push(`/a_${fr}`)}else{const u=Ta(fr,Kr,"composite");this.binders[fr]=new Ca(Ar,wr,Kr,no,Xe,u),In.push(`/z_${fr}`)}}this.cacheKey=In.sort().join("")}getMaxValue(u){const Xe=this.binders[u];return Xe instanceof Pa||Xe instanceof Ca?Xe.maxValue:0}populatePaintArrays(u,Xe,Wt,In,fr){for(const _r in this.binders){const wr=this.binders[_r];(wr instanceof Pa||wr instanceof Ca||wr instanceof Ba)&&wr.populatePaintArray(u,Xe,Wt,In,fr)}}setConstantPatternPositions(u,Xe){for(const Wt in this.binders){const In=this.binders[Wt];In instanceof za&&In.setConstantPatternPositions(u,Xe)}}updatePaintArrays(u,Xe,Wt,In,fr){let _r=!1;for(const wr in u){const Ar=Xe.getPositions(wr);for(const Xe of Ar){const Ar=Wt.feature(Xe.index);for(const Wt in this.binders){const Kr=this.binders[Wt];if((Kr instanceof Pa||Kr instanceof Ca||Kr instanceof Ba)&&!0===Kr.expression.isStateDependent){const no=In.paint.get(Wt);Kr.expression=no.value,Kr.updatePaintArray(Xe.start,Xe.end,Ar,u[wr],fr),_r=!0}}}}return _r}defines(){const u=[];for(const Xe in this.binders){const Wt=this.binders[Xe];(Wt instanceof Ia||Wt instanceof za)&&u.push(...Wt.uniformNames.map((u=>`#define HAS_UNIFORM_${u}`)))}return u}getBinderAttributes(){const u=[];for(const Xe in this.binders){const Wt=this.binders[Xe];if(Wt instanceof Pa||Wt instanceof Ca)for(let Xe=0;Xe<Wt.paintVertexAttributes.length;Xe++)u.push(Wt.paintVertexAttributes[Xe].name);else if(Wt instanceof Ba)for(let Xe=0;Xe<yd.members.length;Xe++)u.push(yd.members[Xe].name)}return u}getBinderUniforms(){const u=[];for(const Xe in this.binders){const Wt=this.binders[Xe];if(Wt instanceof Ia||Wt instanceof za||Wt instanceof Ca)for(const Xe of Wt.uniformNames)u.push(Xe)}return u}getPaintVertexBuffers(){return this._buffers}getUniforms(u,Xe){const Wt=[];for(const In in this.binders){const fr=this.binders[In];if(fr instanceof Ia||fr instanceof za||fr instanceof Ca)for(const _r of fr.uniformNames)if(Xe[_r]){const wr=fr.getBinding(u,Xe[_r],_r);Wt.push({name:_r,property:In,binding:wr})}}return Wt}setUniforms(u,Xe,Wt,In){for(const{name:u,property:fr,binding:_r}of Xe)this.binders[fr].setUniform(_r,In,Wt.get(fr),u)}updatePaintBuffers(u){this._buffers=[];for(const Xe in this.binders){const Wt=this.binders[Xe];if(u&&Wt instanceof Ba){const Xe=2===u.fromScale?Wt.zoomInPaintVertexBuffer:Wt.zoomOutPaintVertexBuffer;Xe&&this._buffers.push(Xe)}else(Wt instanceof Pa||Wt instanceof Ca)&&Wt.paintVertexBuffer&&this._buffers.push(Wt.paintVertexBuffer)}}upload(u){for(const Xe in this.binders){const Wt=this.binders[Xe];(Wt instanceof Pa||Wt instanceof Ca||Wt instanceof Ba)&&Wt.upload(u)}this.updatePaintBuffers()}destroy(){for(const u in this.binders){const Xe=this.binders[u];(Xe instanceof Pa||Xe instanceof Ca||Xe instanceof Ba)&&Xe.destroy()}}}class Ea{constructor(u,Xe,Wt=()=>!0){this.programConfigurations={};for(const In of u)this.programConfigurations[In.id]=new Va(In,Xe,Wt);this.needsUpload=!1,this._featureMap=new ga,this._bufferOffset=0}populatePaintArrays(u,Xe,Wt,In,fr,_r){for(const Wt in this.programConfigurations)this.programConfigurations[Wt].populatePaintArrays(u,Xe,In,fr,_r);void 0!==Xe.id&&this._featureMap.add(Xe.id,Wt,this._bufferOffset,u),this._bufferOffset=u,this.needsUpload=!0}updatePaintArrays(u,Xe,Wt,In){for(const fr of Wt)this.needsUpload=this.programConfigurations[fr.id].updatePaintArrays(u,this._featureMap,Xe,fr,In)||this.needsUpload}get(u){return this.programConfigurations[u]}upload(u){if(this.needsUpload){for(const Xe in this.programConfigurations)this.programConfigurations[Xe].upload(u);this.needsUpload=!1}}destroy(){for(const u in this.programConfigurations)this.programConfigurations[u].destroy()}}function Fa(u,Xe){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[u]||[u.replace(`${Xe}-`,"").replace(/-/g,"_")]}function Ta(u,Xe,Wt){const In={color:{source:ys,composite:Vs},number:{source:Is,composite:ys}},fr=function(u){return{"line-pattern":{source:Js,composite:Js},"fill-pattern":{source:Js,composite:Js},"fill-extrusion-pattern":{source:Js,composite:Js}}[u]}(u);return fr&&fr[Wt]||In[Xe][Wt]}wi("ConstantBinder",Ia),wi("CrossFadedConstantBinder",za),wi("SourceExpressionBinder",Pa),wi("CrossFadedCompositeBinder",Ba),wi("CompositeExpressionBinder",Ca),wi("ProgramConfiguration",Va,{omit:["_buffers"]}),wi("ProgramConfigurationSet",Ea);const Td=8192,Cd=Math.pow(2,14)-1,Ed=-Cd-1;function Oa(u){const Xe=Td/u.extent,Wt=u.loadGeometry();for(let u=0;u<Wt.length;u++){const In=Wt[u];for(let u=0;u<In.length;u++){const Wt=In[u],fr=Math.round(Wt.x*Xe),_r=Math.round(Wt.y*Xe);Wt.x=y(fr,Ed,Cd),Wt.y=y(_r,Ed,Cd),(fr<Wt.x||fr>Wt.x+1||_r<Wt.y||_r>Wt.y+1)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return Wt}function ja(u,Xe){return{type:u.type,id:u.id,properties:u.properties,geometry:Xe?Oa(u):[]}}function Ra(u,Xe,Wt,In,fr){u.emplaceBack(2*Xe+(In+1)/2,2*Wt+(fr+1)/2)}class Ua{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new Gs,this.indexArray=new na,this.segments=new oa,this.programConfigurations=new Ea(u.layers,u.zoom),this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,Wt){const In=this.layers[0],fr=[];let _r=null,wr=!1;"circle"===In.type&&(_r=In.layout.get("circle-sort-key"),wr=!_r.isConstant());for(const{feature:Xe,id:In,index:Ar,sourceLayerIndex:Kr}of u){const u=this.layers[0]._featureFilter.needGeometry,no=ja(Xe,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),no,Wt))continue;const io=wr?_r.evaluate(no,{},Wt):void 0,oo={id:In,properties:Xe.properties,type:Xe.type,sourceLayerIndex:Kr,index:Ar,geometry:u?no.geometry:Oa(Xe),patterns:{},sortKey:io};fr.push(oo)}wr&&fr.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const In of fr){const{geometry:fr,index:_r,sourceLayerIndex:wr}=In,Ar=u[_r].feature;this.addFeature(In,fr,_r,Wt),Xe.featureIndex.insert(Ar,fr,_r,wr,this.index)}}update(u,Xe,Wt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,Wt)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,md),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(u,Xe,Wt,In){for(const Wt of Xe)for(const Xe of Wt){const Wt=Xe.x,In=Xe.y;if(Wt<0||Wt>=Td||In<0||In>=Td)continue;const fr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,u.sortKey),_r=fr.vertexLength;Ra(this.layoutVertexArray,Wt,In,-1,-1),Ra(this.layoutVertexArray,Wt,In,1,-1),Ra(this.layoutVertexArray,Wt,In,1,1),Ra(this.layoutVertexArray,Wt,In,-1,1),this.indexArray.emplaceBack(_r,_r+1,_r+2),this.indexArray.emplaceBack(_r,_r+3,_r+2),fr.vertexLength+=4,fr.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,Wt,{},In)}}function qa(u,Xe){for(let Wt=0;Wt<u.length;Wt++)if(Wa(Xe,u[Wt]))return!0;for(let Wt=0;Wt<Xe.length;Wt++)if(Wa(u,Xe[Wt]))return!0;return!!Ka(u,Xe)}function Na(u,Xe,Wt){return!!Wa(u,Xe)||!!Ha(Xe,u,Wt)}function Za(u,Xe){if(1===u.length)return Ja(Xe,u[0]);for(let Wt=0;Wt<Xe.length;Wt++){const In=Xe[Wt];for(let Xe=0;Xe<In.length;Xe++)if(Wa(u,In[Xe]))return!0}for(let Wt=0;Wt<u.length;Wt++)if(Ja(Xe,u[Wt]))return!0;for(let Wt=0;Wt<Xe.length;Wt++)if(Ka(u,Xe[Wt]))return!0;return!1}function Ga(u,Xe,Wt){if(u.length>1){if(Ka(u,Xe))return!0;for(let In=0;In<Xe.length;In++)if(Ha(Xe[In],u,Wt))return!0}for(let In=0;In<u.length;In++)if(Ha(u[In],Xe,Wt))return!0;return!1}function Ka(u,Xe){if(0===u.length||0===Xe.length)return!1;for(let Wt=0;Wt<u.length-1;Wt++){const In=u[Wt],fr=u[Wt+1];for(let u=0;u<Xe.length-1;u++)if(Xa(In,fr,Xe[u],Xe[u+1]))return!0}return!1}function Xa(u,Xe,Wt,In){return S(u,Wt,In)!==S(Xe,Wt,In)&&S(u,Xe,Wt)!==S(u,Xe,In)}function Ha(u,Xe,Wt){const In=Wt*Wt;if(1===Xe.length)return u.distSqr(Xe[0])<In;for(let Wt=1;Wt<Xe.length;Wt++)if(Ya(u,Xe[Wt-1],Xe[Wt])<In)return!0;return!1}function Ya(u,Xe,Wt){const In=Xe.distSqr(Wt);if(0===In)return u.distSqr(Xe);const fr=((u.x-Xe.x)*(Wt.x-Xe.x)+(u.y-Xe.y)*(Wt.y-Xe.y))/In;return u.distSqr(fr<0?Xe:fr>1?Wt:Wt.sub(Xe)._mult(fr)._add(Xe))}function Ja(u,Xe){let Wt,In,fr,_r=!1;for(let wr=0;wr<u.length;wr++){Wt=u[wr];for(let u=0,wr=Wt.length-1;u<Wt.length;wr=u++)In=Wt[u],fr=Wt[wr],In.y>Xe.y!=fr.y>Xe.y&&Xe.x<(fr.x-In.x)*(Xe.y-In.y)/(fr.y-In.y)+In.x&&(_r=!_r)}return _r}function Wa(u,Xe){let Wt=!1;for(let In=0,fr=u.length-1;In<u.length;fr=In++){const _r=u[In],wr=u[fr];_r.y>Xe.y!=wr.y>Xe.y&&Xe.x<(wr.x-_r.x)*(Xe.y-_r.y)/(wr.y-_r.y)+_r.x&&(Wt=!Wt)}return Wt}function Qa(u,Xe,Wt){const In=Wt[0],fr=Wt[2];if(u.x<In.x&&Xe.x<In.x||u.x>fr.x&&Xe.x>fr.x||u.y<In.y&&Xe.y<In.y||u.y>fr.y&&Xe.y>fr.y)return!1;const _r=S(u,Xe,Wt[0]);return _r!==S(u,Xe,Wt[1])||_r!==S(u,Xe,Wt[2])||_r!==S(u,Xe,Wt[3])}function to(u,Xe,Wt){const In=Xe.paint.get(u).value;return"constant"===In.kind?In.value:Wt.programConfigurations.get(Xe.id).getMaxValue(u)}function eo(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function ro(u,Xe,In,fr,_r){if(!Xe[0]&&!Xe[1])return u;const wr=Wt.convert(Xe)._mult(_r);"viewport"===In&&wr._rotate(-fr);const Ar=[];for(let Xe=0;Xe<u.length;Xe++)Ar.push(u[Xe].sub(wr));return Ar}let Id,Md;wi("CircleBucket",Ua,{omit:["layers"]});var Rd={get paint(){return Md=Md||new rs({"circle-radius":new Wi(xo.paint_circle["circle-radius"]),"circle-color":new Wi(xo.paint_circle["circle-color"]),"circle-blur":new Wi(xo.paint_circle["circle-blur"]),"circle-opacity":new Wi(xo.paint_circle["circle-opacity"]),"circle-translate":new Ji(xo.paint_circle["circle-translate"]),"circle-translate-anchor":new Ji(xo.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ji(xo.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ji(xo.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Wi(xo.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Wi(xo.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Wi(xo.paint_circle["circle-stroke-opacity"])})},get layout(){return Id=Id||new rs({"circle-sort-key":new Wi(xo.layout_circle["circle-sort-key"])})}},Od=1e-6,Ld="undefined"!=typeof Float32Array?Float32Array:Array;function lo(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u}function uo(u,Xe,Wt){var In=Xe[0],fr=Xe[1],_r=Xe[2],wr=Xe[3],Ar=Xe[4],Kr=Xe[5],no=Xe[6],io=Xe[7],oo=Xe[8],ao=Xe[9],so=Xe[10],co=Xe[11],ho=Xe[12],go=Xe[13],xo=Xe[14],ko=Xe[15],Co=Wt[0],Io=Wt[1],zo=Wt[2],Bo=Wt[3];return u[0]=Co*In+Io*Ar+zo*oo+Bo*ho,u[1]=Co*fr+Io*Kr+zo*ao+Bo*go,u[2]=Co*_r+Io*no+zo*so+Bo*xo,u[3]=Co*wr+Io*io+zo*co+Bo*ko,u[4]=(Co=Wt[4])*In+(Io=Wt[5])*Ar+(zo=Wt[6])*oo+(Bo=Wt[7])*ho,u[5]=Co*fr+Io*Kr+zo*ao+Bo*go,u[6]=Co*_r+Io*no+zo*so+Bo*xo,u[7]=Co*wr+Io*io+zo*co+Bo*ko,u[8]=(Co=Wt[8])*In+(Io=Wt[9])*Ar+(zo=Wt[10])*oo+(Bo=Wt[11])*ho,u[9]=Co*fr+Io*Kr+zo*ao+Bo*go,u[10]=Co*_r+Io*no+zo*so+Bo*xo,u[11]=Co*wr+Io*io+zo*co+Bo*ko,u[12]=(Co=Wt[12])*In+(Io=Wt[13])*Ar+(zo=Wt[14])*oo+(Bo=Wt[15])*ho,u[13]=Co*fr+Io*Kr+zo*ao+Bo*go,u[14]=Co*_r+Io*no+zo*so+Bo*xo,u[15]=Co*wr+Io*io+zo*co+Bo*ko,u}Math.hypot||(Math.hypot=function(){for(var u=0,Xe=arguments.length;Xe--;)u+=arguments[Xe]*arguments[Xe];return Math.sqrt(u)});var Dd,Fd=uo;function po(u,Xe,Wt){var In=Xe[0],fr=Xe[1],_r=Xe[2],wr=Xe[3];return u[0]=Wt[0]*In+Wt[4]*fr+Wt[8]*_r+Wt[12]*wr,u[1]=Wt[1]*In+Wt[5]*fr+Wt[9]*_r+Wt[13]*wr,u[2]=Wt[2]*In+Wt[6]*fr+Wt[10]*_r+Wt[14]*wr,u[3]=Wt[3]*In+Wt[7]*fr+Wt[11]*_r+Wt[15]*wr,u}Dd=new Ld(4),Ld!=Float32Array&&(Dd[0]=0,Dd[1]=0,Dd[2]=0,Dd[3]=0);class fo extends is{constructor(u){super(u,Rd)}createBucket(u){return new Ua(u)}queryRadius(u){const Xe=u;return to("circle-radius",this,Xe)+to("circle-stroke-width",this,Xe)+eo(this.paint.get("circle-translate"))}queryIntersectsFeature(u,Xe,Wt,In,fr,_r,wr,Ar){const Kr=ro(u,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),_r.angle,wr),no=this.paint.get("circle-radius").evaluate(Xe,Wt)+this.paint.get("circle-stroke-width").evaluate(Xe,Wt),io="map"===this.paint.get("circle-pitch-alignment"),oo=io?Kr:function(u,Xe){return u.map((u=>yo(u,Xe)))}(Kr,Ar),ao=io?no*wr:no;for(const u of In)for(const Xe of u){const u=io?Xe:yo(Xe,Ar);let Wt=ao;const In=po([],[Xe.x,Xe.y,0,1],Ar);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?Wt*=In[3]/_r.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(Wt*=_r.cameraToCenterDistance/In[3]),Na(oo,u,Wt))return!0}return!1}}function yo(u,Xe){const In=po([],[u.x,u.y,0,1],Xe);return new Wt(In[0]/In[3],In[1]/In[3])}class mo extends Ua{}let Bd;wi("HeatmapBucket",mo,{omit:["layers"]});var Nd={get paint(){return Bd=Bd||new rs({"heatmap-radius":new Wi(xo.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Wi(xo.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ji(xo.paint_heatmap["heatmap-intensity"]),"heatmap-color":new es(xo.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ji(xo.paint_heatmap["heatmap-opacity"])})}};function vo(u,{width:Xe,height:Wt},In,fr){if(fr){if(fr instanceof Uint8ClampedArray)fr=new Uint8Array(fr.buffer);else if(fr.length!==Xe*Wt*In)throw new RangeError(`mismatched image size. expected: ${fr.length} but got: ${Xe*Wt*In}`)}else fr=new Uint8Array(Xe*Wt*In);return u.width=Xe,u.height=Wt,u.data=fr,u}function bo(u,{width:Xe,height:Wt},In){if(Xe===u.width&&Wt===u.height)return;const fr=vo({},{width:Xe,height:Wt},In);wo(u,fr,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,Xe),height:Math.min(u.height,Wt)},In),u.width=Xe,u.height=Wt,u.data=fr.data}function wo(u,Xe,Wt,In,fr,_r){if(0===fr.width||0===fr.height)return Xe;if(fr.width>u.width||fr.height>u.height||Wt.x>u.width-fr.width||Wt.y>u.height-fr.height)throw new RangeError("out of range source coordinates for image copy");if(fr.width>Xe.width||fr.height>Xe.height||In.x>Xe.width-fr.width||In.y>Xe.height-fr.height)throw new RangeError("out of range destination coordinates for image copy");const wr=u.data,Ar=Xe.data;if(wr===Ar)throw new Error("srcData equals dstData, so image is already copied");for(let Kr=0;Kr<fr.height;Kr++){const no=((Wt.y+Kr)*u.width+Wt.x)*_r,io=((In.y+Kr)*Xe.width+In.x)*_r;for(let u=0;u<fr.width*_r;u++)Ar[io+u]=wr[no+u]}return Xe}class _o{constructor(u,Xe){vo(this,u,1,Xe)}resize(u){bo(this,u,1)}clone(){return new _o({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,Xe,Wt,In,fr){wo(u,Xe,Wt,In,fr,1)}}class Ao{constructor(u,Xe){vo(this,u,4,Xe)}resize(u){bo(this,u,4)}replace(u,Xe){Xe?this.data.set(u):this.data=u instanceof Uint8ClampedArray?new Uint8Array(u.buffer):u}clone(){return new Ao({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,Xe,Wt,In,fr){wo(u,Xe,Wt,In,fr,4)}}function So(u){const Xe={},Wt=u.resolution||256,In=u.clips?u.clips.length:1,fr=u.image||new Ao({width:Wt,height:In});if(Math.log(Wt)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${Wt}`);const s=(Wt,In,_r)=>{Xe[u.evaluationKey]=_r;const wr=u.expression.evaluate(Xe);fr.data[Wt+In+0]=Math.floor(255*wr.r/wr.a),fr.data[Wt+In+1]=Math.floor(255*wr.g/wr.a),fr.data[Wt+In+2]=Math.floor(255*wr.b/wr.a),fr.data[Wt+In+3]=Math.floor(255*wr.a)};if(u.clips)for(let Xe=0,fr=0;Xe<In;++Xe,fr+=4*Wt)for(let In=0,_r=0;In<Wt;In++,_r+=4){const wr=In/(Wt-1),{start:Ar,end:Kr}=u.clips[Xe];s(fr,_r,Ar*(1-wr)+Kr*wr)}else for(let u=0,Xe=0;u<Wt;u++,Xe+=4)s(0,Xe,u/(Wt-1));return fr}wi("AlphaImage",_o),wi("RGBAImage",Ao);const Vd="big-fb";class Mo extends is{createBucket(u){return new mo(u)}constructor(u){super(u,Nd),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(u){"heatmap-color"===u&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=So({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(Vd)&&this.heatmapFbos.delete(Vd)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}}let Ud;var $d={get paint(){return Ud=Ud||new rs({"hillshade-illumination-direction":new Ji(xo.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Ji(xo.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ji(xo.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ji(xo.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ji(xo.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ji(xo.paint_hillshade["hillshade-accent-color"])})}};class Po extends is{constructor(u){super(u,$d)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}}const Wd=ls([{name:"a_pos",components:2,type:"Int16"}],4),{members:Zd}=Wd;function Vo(u,Xe,Wt=2){const In=Xe&&Xe.length,fr=In?Xe[0]*Wt:u.length;let _r=Eo(u,0,fr,Wt,!0);const wr=[];if(!_r||_r.next===_r.prev)return wr;let Ar,Kr,no;if(In&&(_r=function(u,Xe,Wt,In){const fr=[];for(let Wt=0,_r=Xe.length;Wt<_r;Wt++){const wr=Eo(u,Xe[Wt]*In,Wt<_r-1?Xe[Wt+1]*In:u.length,In,!1);wr===wr.next&&(wr.steiner=!0),fr.push(No(wr))}fr.sort(jo);for(let u=0;u<fr.length;u++)Wt=Ro(fr[u],Wt);return Wt}(u,Xe,_r,Wt)),u.length>80*Wt){Ar=1/0,Kr=1/0;let Xe=-1/0,In=-1/0;for(let _r=Wt;_r<fr;_r+=Wt){const Wt=u[_r],fr=u[_r+1];Wt<Ar&&(Ar=Wt),fr<Kr&&(Kr=fr),Wt>Xe&&(Xe=Wt),fr>In&&(In=fr)}no=Math.max(Xe-Ar,In-Kr),no=0!==no?32767/no:0}return To(_r,wr,Wt,Ar,Kr,no,0),wr}function Eo(u,Xe,Wt,In,fr){let _r;if(fr===function(u,Xe,Wt,In){let fr=0;for(let _r=Xe,wr=Wt-In;_r<Wt;_r+=In)fr+=(u[wr]-u[_r])*(u[_r+1]+u[wr+1]),wr=_r;return fr}(u,Xe,Wt,In)>0)for(let fr=Xe;fr<Wt;fr+=In)_r=tl(fr/In|0,u[fr],u[fr+1],_r);else for(let fr=Wt-In;fr>=Xe;fr-=In)_r=tl(fr/In|0,u[fr],u[fr+1],_r);return _r&&Xo(_r,_r.next)&&(el(_r),_r=_r.next),_r}function Fo(u,Xe){if(!u)return u;Xe||(Xe=u);let Wt,In=u;do{if(Wt=!1,In.steiner||!Xo(In,In.next)&&0!==Ko(In.prev,In,In.next))In=In.next;else{if(el(In),In=Xe=In.prev,In===In.next)break;Wt=!0}}while(Wt||In!==Xe);return Xe}function To(u,Xe,Wt,In,fr,_r,wr){if(!u)return;!wr&&_r&&function(u,Xe,Wt,In){let fr=u;do{0===fr.z&&(fr.z=qo(fr.x,fr.y,Xe,Wt,In)),fr.prevZ=fr.prev,fr.nextZ=fr.next,fr=fr.next}while(fr!==u);fr.prevZ.nextZ=null,fr.prevZ=null,function(u){let Xe,Wt=1;do{let In,fr=u;u=null;let _r=null;for(Xe=0;fr;){Xe++;let wr=fr,Ar=0;for(let u=0;u<Wt&&(Ar++,wr=wr.nextZ,wr);u++);let Kr=Wt;for(;Ar>0||Kr>0&&wr;)0!==Ar&&(0===Kr||!wr||fr.z<=wr.z)?(In=fr,fr=fr.nextZ,Ar--):(In=wr,wr=wr.nextZ,Kr--),_r?_r.nextZ=In:u=In,In.prevZ=_r,_r=In;fr=wr}_r.nextZ=null,Wt*=2}while(Xe>1)}(fr)}(u,In,fr,_r);let Ar=u;for(;u.prev!==u.next;){const Kr=u.prev,no=u.next;if(_r?Lo(u,In,fr,_r):$o(u))Xe.push(Kr.i,u.i,no.i),el(u),u=no.next,Ar=no.next;else if((u=no)===Ar){wr?1===wr?To(u=Do(Fo(u),Xe),Xe,Wt,In,fr,_r,2):2===wr&&Oo(u,Xe,Wt,In,fr,_r):To(Fo(u),Xe,Wt,In,fr,_r,1);break}}}function $o(u){const Xe=u.prev,Wt=u,In=u.next;if(Ko(Xe,Wt,In)>=0)return!1;const fr=Xe.x,_r=Wt.x,wr=In.x,Ar=Xe.y,Kr=Wt.y,no=In.y,io=fr<_r?fr<wr?fr:wr:_r<wr?_r:wr,oo=Ar<Kr?Ar<no?Ar:no:Kr<no?Kr:no,ao=fr>_r?fr>wr?fr:wr:_r>wr?_r:wr,so=Ar>Kr?Ar>no?Ar:no:Kr>no?Kr:no;let co=In.next;for(;co!==Xe;){if(co.x>=io&&co.x<=ao&&co.y>=oo&&co.y<=so&&Zo(fr,Ar,_r,Kr,wr,no,co.x,co.y)&&Ko(co.prev,co,co.next)>=0)return!1;co=co.next}return!0}function Lo(u,Xe,Wt,In){const fr=u.prev,_r=u,wr=u.next;if(Ko(fr,_r,wr)>=0)return!1;const Ar=fr.x,Kr=_r.x,no=wr.x,io=fr.y,oo=_r.y,ao=wr.y,so=Ar<Kr?Ar<no?Ar:no:Kr<no?Kr:no,co=io<oo?io<ao?io:ao:oo<ao?oo:ao,ho=Ar>Kr?Ar>no?Ar:no:Kr>no?Kr:no,go=io>oo?io>ao?io:ao:oo>ao?oo:ao,xo=qo(so,co,Xe,Wt,In),ko=qo(ho,go,Xe,Wt,In);let Co=u.prevZ,Io=u.nextZ;for(;Co&&Co.z>=xo&&Io&&Io.z<=ko;){if(Co.x>=so&&Co.x<=ho&&Co.y>=co&&Co.y<=go&&Co!==fr&&Co!==wr&&Zo(Ar,io,Kr,oo,no,ao,Co.x,Co.y)&&Ko(Co.prev,Co,Co.next)>=0)return!1;if(Co=Co.prevZ,Io.x>=so&&Io.x<=ho&&Io.y>=co&&Io.y<=go&&Io!==fr&&Io!==wr&&Zo(Ar,io,Kr,oo,no,ao,Io.x,Io.y)&&Ko(Io.prev,Io,Io.next)>=0)return!1;Io=Io.nextZ}for(;Co&&Co.z>=xo;){if(Co.x>=so&&Co.x<=ho&&Co.y>=co&&Co.y<=go&&Co!==fr&&Co!==wr&&Zo(Ar,io,Kr,oo,no,ao,Co.x,Co.y)&&Ko(Co.prev,Co,Co.next)>=0)return!1;Co=Co.prevZ}for(;Io&&Io.z<=ko;){if(Io.x>=so&&Io.x<=ho&&Io.y>=co&&Io.y<=go&&Io!==fr&&Io!==wr&&Zo(Ar,io,Kr,oo,no,ao,Io.x,Io.y)&&Ko(Io.prev,Io,Io.next)>=0)return!1;Io=Io.nextZ}return!0}function Do(u,Xe){let Wt=u;do{const In=Wt.prev,fr=Wt.next.next;!Xo(In,fr)&&Ho(In,Wt,Wt.next,fr)&&Wo(In,fr)&&Wo(fr,In)&&(Xe.push(In.i,Wt.i,fr.i),el(Wt),el(Wt.next),Wt=u=fr),Wt=Wt.next}while(Wt!==u);return Fo(Wt)}function Oo(u,Xe,Wt,In,fr,_r){let wr=u;do{let u=wr.next.next;for(;u!==wr.prev;){if(wr.i!==u.i&&Go(wr,u)){let Ar=Qo(wr,u);return wr=Fo(wr,wr.next),Ar=Fo(Ar,Ar.next),To(wr,Xe,Wt,In,fr,_r,0),void To(Ar,Xe,Wt,In,fr,_r,0)}u=u.next}wr=wr.next}while(wr!==u)}function jo(u,Xe){return u.x-Xe.x}function Ro(u,Xe){const Wt=function(u,Xe){let Wt=Xe;const In=u.x,fr=u.y;let _r,wr=-1/0;do{if(fr<=Wt.y&&fr>=Wt.next.y&&Wt.next.y!==Wt.y){const u=Wt.x+(fr-Wt.y)*(Wt.next.x-Wt.x)/(Wt.next.y-Wt.y);if(u<=In&&u>wr&&(wr=u,_r=Wt.x<Wt.next.x?Wt:Wt.next,u===In))return _r}Wt=Wt.next}while(Wt!==Xe);if(!_r)return null;const Ar=_r,Kr=_r.x,no=_r.y;let io=1/0;Wt=_r;do{if(In>=Wt.x&&Wt.x>=Kr&&In!==Wt.x&&Zo(fr<no?In:wr,fr,Kr,no,fr<no?wr:In,fr,Wt.x,Wt.y)){const Xe=Math.abs(fr-Wt.y)/(In-Wt.x);Wo(Wt,u)&&(Xe<io||Xe===io&&(Wt.x>_r.x||Wt.x===_r.x&&Uo(_r,Wt)))&&(_r=Wt,io=Xe)}Wt=Wt.next}while(Wt!==Ar);return _r}(u,Xe);if(!Wt)return Xe;const In=Qo(Wt,u);return Fo(In,In.next),Fo(Wt,Wt.next)}function Uo(u,Xe){return Ko(u.prev,u,Xe.prev)<0&&Ko(Xe.next,u,u.next)<0}function qo(u,Xe,Wt,In,fr){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-Wt)*fr|0)|u<<8))|u<<4))|u<<2))|u<<1))|(Xe=1431655765&((Xe=858993459&((Xe=252645135&((Xe=16711935&((Xe=(Xe-In)*fr|0)|Xe<<8))|Xe<<4))|Xe<<2))|Xe<<1))<<1}function No(u){let Xe=u,Wt=u;do{(Xe.x<Wt.x||Xe.x===Wt.x&&Xe.y<Wt.y)&&(Wt=Xe),Xe=Xe.next}while(Xe!==u);return Wt}function Zo(u,Xe,Wt,In,fr,_r,wr,Ar){return(fr-wr)*(Xe-Ar)>=(u-wr)*(_r-Ar)&&(u-wr)*(In-Ar)>=(Wt-wr)*(Xe-Ar)&&(Wt-wr)*(_r-Ar)>=(fr-wr)*(In-Ar)}function Go(u,Xe){return u.next.i!==Xe.i&&u.prev.i!==Xe.i&&!function(u,Xe){let Wt=u;do{if(Wt.i!==u.i&&Wt.next.i!==u.i&&Wt.i!==Xe.i&&Wt.next.i!==Xe.i&&Ho(Wt,Wt.next,u,Xe))return!0;Wt=Wt.next}while(Wt!==u);return!1}(u,Xe)&&(Wo(u,Xe)&&Wo(Xe,u)&&function(u,Xe){let Wt=u,In=!1;const fr=(u.x+Xe.x)/2,_r=(u.y+Xe.y)/2;do{Wt.y>_r!=Wt.next.y>_r&&Wt.next.y!==Wt.y&&fr<(Wt.next.x-Wt.x)*(_r-Wt.y)/(Wt.next.y-Wt.y)+Wt.x&&(In=!In),Wt=Wt.next}while(Wt!==u);return In}(u,Xe)&&(Ko(u.prev,u,Xe.prev)||Ko(u,Xe.prev,Xe))||Xo(u,Xe)&&Ko(u.prev,u,u.next)>0&&Ko(Xe.prev,Xe,Xe.next)>0)}function Ko(u,Xe,Wt){return(Xe.y-u.y)*(Wt.x-Xe.x)-(Xe.x-u.x)*(Wt.y-Xe.y)}function Xo(u,Xe){return u.x===Xe.x&&u.y===Xe.y}function Ho(u,Xe,Wt,In){const fr=Jo(Ko(u,Xe,Wt)),_r=Jo(Ko(u,Xe,In)),wr=Jo(Ko(Wt,In,u)),Ar=Jo(Ko(Wt,In,Xe));return fr!==_r&&wr!==Ar||!(0!==fr||!Yo(u,Wt,Xe))||!(0!==_r||!Yo(u,In,Xe))||!(0!==wr||!Yo(Wt,u,In))||!(0!==Ar||!Yo(Wt,Xe,In))}function Yo(u,Xe,Wt){return Xe.x<=Math.max(u.x,Wt.x)&&Xe.x>=Math.min(u.x,Wt.x)&&Xe.y<=Math.max(u.y,Wt.y)&&Xe.y>=Math.min(u.y,Wt.y)}function Jo(u){return u>0?1:u<0?-1:0}function Wo(u,Xe){return Ko(u.prev,u,u.next)<0?Ko(u,Xe,u.next)>=0&&Ko(u,u.prev,Xe)>=0:Ko(u,Xe,u.prev)<0||Ko(u,u.next,Xe)<0}function Qo(u,Xe){const Wt=rl(u.i,u.x,u.y),In=rl(Xe.i,Xe.x,Xe.y),fr=u.next,_r=Xe.prev;return u.next=Xe,Xe.prev=u,Wt.next=fr,fr.prev=Wt,In.next=Wt,Wt.prev=In,_r.next=In,In.prev=_r,In}function tl(u,Xe,Wt,In){const fr=rl(u,Xe,Wt);return In?(fr.next=In.next,fr.prev=In,In.next.prev=fr,In.next=fr):(fr.prev=fr,fr.next=fr),fr}function el(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function rl(u,Xe,Wt){return{i:u,x:Xe,y:Wt,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function nl(u,Xe,Wt){const In=Wt.patternDependencies;let fr=!1;for(const Wt of Xe){const Xe=Wt.paint.get(`${u}-pattern`);Xe.isConstant()||(fr=!0);const _r=Xe.constantOr(null);_r&&(fr=!0,In[_r.to]=!0,In[_r.from]=!0)}return fr}function il(u,Xe,Wt,In,fr){const _r=fr.patternDependencies;for(const wr of Xe){const Xe=wr.paint.get(`${u}-pattern`).value;if("constant"!==Xe.kind){let u=Xe.evaluate({zoom:In-1},Wt,{},fr.availableImages),Ar=Xe.evaluate({zoom:In},Wt,{},fr.availableImages),Kr=Xe.evaluate({zoom:In+1},Wt,{},fr.availableImages);u=u&&u.name?u.name:u,Ar=Ar&&Ar.name?Ar.name:Ar,Kr=Kr&&Kr.name?Kr.name:Kr,_r[u]=!0,_r[Ar]=!0,_r[Kr]=!0,Wt.patterns[wr.id]={min:u,mid:Ar,max:Kr}}}return Wt}class sl{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ks,this.indexArray=new na,this.indexArray2=new ia,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.segments2=new oa,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,Wt){this.hasPattern=nl("fill",this.layers,Xe);const In=this.layers[0].layout.get("fill-sort-key"),fr=!In.isConstant(),_r=[];for(const{feature:wr,id:Ar,index:Kr,sourceLayerIndex:no}of u){const u=this.layers[0]._featureFilter.needGeometry,io=ja(wr,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),io,Wt))continue;const oo=fr?In.evaluate(io,{},Wt,Xe.availableImages):void 0,ao={id:Ar,properties:wr.properties,type:wr.type,sourceLayerIndex:no,index:Kr,geometry:u?io.geometry:Oa(wr),patterns:{},sortKey:oo};_r.push(ao)}fr&&_r.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const In of _r){const{geometry:fr,index:_r,sourceLayerIndex:wr}=In;if(this.hasPattern){const u=il("fill",this.layers,In,this.zoom,Xe);this.patternFeatures.push(u)}else this.addFeature(In,fr,_r,Wt,{});Xe.featureIndex.insert(u[_r].feature,fr,_r,wr,this.index)}}update(u,Xe,Wt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,Wt)}addFeatures(u,Xe,Wt){for(const u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,Xe,Wt)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Zd),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.indexBuffer2=u.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(u),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(u,Xe,Wt,In,fr){for(const u of xr(Xe,500)){let Xe=0;for(const Wt of u)Xe+=Wt.length;const Wt=this.segments.prepareSegment(Xe,this.layoutVertexArray,this.indexArray),In=Wt.vertexLength,fr=[],_r=[];for(const Xe of u){if(0===Xe.length)continue;Xe!==u[0]&&_r.push(fr.length/2);const Wt=this.segments2.prepareSegment(Xe.length,this.layoutVertexArray,this.indexArray2),In=Wt.vertexLength;this.layoutVertexArray.emplaceBack(Xe[0].x,Xe[0].y),this.indexArray2.emplaceBack(In+Xe.length-1,In),fr.push(Xe[0].x),fr.push(Xe[0].y);for(let u=1;u<Xe.length;u++)this.layoutVertexArray.emplaceBack(Xe[u].x,Xe[u].y),this.indexArray2.emplaceBack(In+u-1,In+u),fr.push(Xe[u].x),fr.push(Xe[u].y);Wt.vertexLength+=Xe.length,Wt.primitiveLength+=Xe.length}const wr=Vo(fr,_r);for(let u=0;u<wr.length;u+=3)this.indexArray.emplaceBack(In+wr[u],In+wr[u+1],In+wr[u+2]);Wt.vertexLength+=Xe,Wt.primitiveLength+=wr.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,Wt,fr,In)}}let Hd,Gd;wi("FillBucket",sl,{omit:["layers","patternFeatures"]});var Kd={get paint(){return Gd=Gd||new rs({"fill-antialias":new Ji(xo.paint_fill["fill-antialias"]),"fill-opacity":new Wi(xo.paint_fill["fill-opacity"]),"fill-color":new Wi(xo.paint_fill["fill-color"]),"fill-outline-color":new Wi(xo.paint_fill["fill-outline-color"]),"fill-translate":new Ji(xo.paint_fill["fill-translate"]),"fill-translate-anchor":new Ji(xo.paint_fill["fill-translate-anchor"]),"fill-pattern":new Qi(xo.paint_fill["fill-pattern"])})},get layout(){return Hd=Hd||new rs({"fill-sort-key":new Wi(xo.layout_fill["fill-sort-key"])})}};class ul extends is{constructor(u){super(u,Kd)}recalculate(u,Xe){super.recalculate(u,Xe);const Wt=this.paint._values["fill-outline-color"];"constant"===Wt.value.kind&&void 0===Wt.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(u){return new sl(u)}queryRadius(){return eo(this.paint.get("fill-translate"))}queryIntersectsFeature(u,Xe,Wt,In,fr,_r,wr){return Za(ro(u,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),_r.angle,wr),In)}isTileClipped(){return!0}}const Xd=ls([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Yd=ls([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Jd}=Xd;var Qd={},Rh=Xe,Oh=ml;function ml(u,Xe,Wt,In,fr){this.properties={},this.extent=Wt,this.type=0,this._pbf=u,this._geometry=-1,this._keys=In,this._values=fr,u.readFields(gl,this,Xe)}function gl(u,Xe,Wt){1==u?Xe.id=Wt.readVarint():2==u?function(u,Xe){for(var Wt=u.readVarint()+u.pos;u.pos<Wt;){var In=Xe._keys[u.readVarint()],fr=Xe._values[u.readVarint()];Xe.properties[In]=fr}}(Wt,Xe):3==u?Xe.type=Wt.readVarint():4==u&&(Xe._geometry=Wt.pos)}function xl(u){for(var Xe,Wt,In=0,fr=0,_r=u.length,wr=_r-1;fr<_r;wr=fr++)In+=((Wt=u[wr]).x-(Xe=u[fr]).x)*(Xe.y+Wt.y);return In}ml.types=["Unknown","Point","LineString","Polygon"],ml.prototype.loadGeometry=function(){var u=this._pbf;u.pos=this._geometry;for(var Xe,Wt=u.readVarint()+u.pos,In=1,fr=0,_r=0,wr=0,Ar=[];u.pos<Wt;){if(fr<=0){var Kr=u.readVarint();In=7&Kr,fr=Kr>>3}if(fr--,1===In||2===In)_r+=u.readSVarint(),wr+=u.readSVarint(),1===In&&(Xe&&Ar.push(Xe),Xe=[]),Xe.push(new Rh(_r,wr));else{if(7!==In)throw new Error("unknown command "+In);Xe&&Xe.push(Xe[0].clone())}}return Xe&&Ar.push(Xe),Ar},ml.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var Xe=u.readVarint()+u.pos,Wt=1,In=0,fr=0,_r=0,wr=1/0,Ar=-1/0,Kr=1/0,no=-1/0;u.pos<Xe;){if(In<=0){var io=u.readVarint();Wt=7&io,In=io>>3}if(In--,1===Wt||2===Wt)(fr+=u.readSVarint())<wr&&(wr=fr),fr>Ar&&(Ar=fr),(_r+=u.readSVarint())<Kr&&(Kr=_r),_r>no&&(no=_r);else if(7!==Wt)throw new Error("unknown command "+Wt)}return[wr,Kr,Ar,no]},ml.prototype.toGeoJSON=function(u,Xe,Wt){var In,fr,_r=this.extent*Math.pow(2,Wt),wr=this.extent*u,Ar=this.extent*Xe,Kr=this.loadGeometry(),no=ml.types[this.type];function c(u){for(var Xe=0;Xe<u.length;Xe++){var Wt=u[Xe];u[Xe]=[360*(Wt.x+wr)/_r-180,360/Math.PI*Math.atan(Math.exp((180-360*(Wt.y+Ar)/_r)*Math.PI/180))-90]}}switch(this.type){case 1:var io=[];for(In=0;In<Kr.length;In++)io[In]=Kr[In][0];c(Kr=io);break;case 2:for(In=0;In<Kr.length;In++)c(Kr[In]);break;case 3:for(Kr=function(u){var Xe=u.length;if(Xe<=1)return[u];for(var Wt,In,fr=[],_r=0;_r<Xe;_r++){var wr=xl(u[_r]);0!==wr&&(void 0===In&&(In=wr<0),In===wr<0?(Wt&&fr.push(Wt),Wt=[u[_r]]):Wt.push(u[_r]))}return Wt&&fr.push(Wt),fr}(Kr),In=0;In<Kr.length;In++)for(fr=0;fr<Kr[In].length;fr++)c(Kr[In][fr])}1===Kr.length?Kr=Kr[0]:no="Multi"+no;var oo={type:"Feature",geometry:{type:no,coordinates:Kr},properties:this.properties};return"id"in this&&(oo.id=this.id),oo};var Lh=Oh,Dh=wl;function wl(u,Xe){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=u,this._keys=[],this._values=[],this._features=[],u.readFields(_l,this,Xe),this.length=this._features.length}function _l(u,Xe,Wt){15===u?Xe.version=Wt.readVarint():1===u?Xe.name=Wt.readString():5===u?Xe.extent=Wt.readVarint():2===u?Xe._features.push(Wt.pos):3===u?Xe._keys.push(Wt.readString()):4===u&&Xe._values.push(function(u){for(var Xe=null,Wt=u.readVarint()+u.pos;u.pos<Wt;){var In=u.readVarint()>>3;Xe=1===In?u.readString():2===In?u.readFloat():3===In?u.readDouble():4===In?u.readVarint64():5===In?u.readVarint():6===In?u.readSVarint():7===In?u.readBoolean():null}return Xe}(Wt))}wl.prototype.feature=function(u){if(u<0||u>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[u];var Xe=this._pbf.readVarint()+this._pbf.pos;return new Lh(this._pbf,Xe,this.extent,this._keys,this._values)};var Fh=Dh;function Sl(u,Xe,Wt){if(3===u){var In=new Fh(Wt,Wt.readVarint()+Wt.pos);In.length&&(Xe[In.name]=In)}}Qd.VectorTile=function(u,Xe){this.layers=u.readFields(Sl,{},Xe)},Qd.VectorTileFeature=Oh,Qd.VectorTileLayer=Dh;const jh=Qd.VectorTileFeature.types,Hh=Math.pow(2,13);function Il(u,Xe,Wt,In,fr,_r,wr,Ar){u.emplaceBack(Xe,Wt,2*Math.floor(In*Hh)+wr,fr*Hh*2,_r*Hh*2,Math.round(Ar))}class zl{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new Xs,this.centroidVertexArray=new Zs,this.indexArray=new na,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,Wt){this.features=[],this.hasPattern=nl("fill-extrusion",this.layers,Xe);for(const{feature:In,id:fr,index:_r,sourceLayerIndex:wr}of u){const u=this.layers[0]._featureFilter.needGeometry,Ar=ja(In,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),Ar,Wt))continue;const Kr={id:fr,sourceLayerIndex:wr,index:_r,geometry:u?Ar.geometry:Oa(In),properties:In.properties,type:In.type,patterns:{}};this.hasPattern?this.features.push(il("fill-extrusion",this.layers,Kr,this.zoom,Xe)):this.addFeature(Kr,Kr.geometry,_r,Wt,{}),Xe.featureIndex.insert(In,Kr.geometry,_r,wr,this.index,!0)}}addFeatures(u,Xe,Wt){for(const u of this.features){const{geometry:In}=u;this.addFeature(u,In,u.index,Xe,Wt)}}update(u,Xe,Wt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,Wt)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Jd),this.centroidVertexBuffer=u.createVertexBuffer(this.centroidVertexArray,Yd.members,!0),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(u,Xe,Wt,In,fr){for(const Wt of xr(Xe,500)){const Xe={x:0,y:0,vertexCount:0};let In=0;for(const u of Wt)In+=u.length;let fr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const u of Wt){if(0===u.length)continue;if(Cl(u))continue;let Wt=0;for(let In=0;In<u.length;In++){const _r=u[In];if(In>=1){const wr=u[In-1];if(!Pl(_r,wr)){fr.vertexLength+4>oa.MAX_VERTEX_ARRAY_LENGTH&&(fr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const u=_r.sub(wr)._perp()._unit(),In=wr.dist(_r);Wt+In>32768&&(Wt=0),Il(this.layoutVertexArray,_r.x,_r.y,u.x,u.y,0,0,Wt),Il(this.layoutVertexArray,_r.x,_r.y,u.x,u.y,0,1,Wt),Xe.x+=2*_r.x,Xe.y+=2*_r.y,Xe.vertexCount+=2,Wt+=In,Il(this.layoutVertexArray,wr.x,wr.y,u.x,u.y,0,0,Wt),Il(this.layoutVertexArray,wr.x,wr.y,u.x,u.y,0,1,Wt),Xe.x+=2*wr.x,Xe.y+=2*wr.y,Xe.vertexCount+=2;const Ar=fr.vertexLength;this.indexArray.emplaceBack(Ar,Ar+2,Ar+1),this.indexArray.emplaceBack(Ar+1,Ar+2,Ar+3),fr.vertexLength+=4,fr.primitiveLength+=2}}}}if(fr.vertexLength+In>oa.MAX_VERTEX_ARRAY_LENGTH&&(fr=this.segments.prepareSegment(In,this.layoutVertexArray,this.indexArray)),"Polygon"!==jh[u.type])continue;const _r=[],wr=[],Ar=fr.vertexLength;for(const u of Wt)if(0!==u.length){u!==Wt[0]&&wr.push(_r.length/2);for(let Wt=0;Wt<u.length;Wt++){const In=u[Wt];Il(this.layoutVertexArray,In.x,In.y,0,0,1,1,0),Xe.x+=In.x,Xe.y+=In.y,Xe.vertexCount+=1,_r.push(In.x),_r.push(In.y)}}const Kr=Vo(_r,wr);for(let u=0;u<Kr.length;u+=3)this.indexArray.emplaceBack(Ar+Kr[u],Ar+Kr[u+2],Ar+Kr[u+1]);fr.primitiveLength+=Kr.length/3,fr.vertexLength+=In;for(let u=0;u<Xe.vertexCount;u++){const u=Math.floor(Xe.x/Xe.vertexCount),Wt=Math.floor(Xe.y/Xe.vertexCount);this.centroidVertexArray.emplaceBack(u,Wt)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,Wt,fr,In)}}function Pl(u,Xe){return u.x===Xe.x&&(u.x<0||u.x>Td)||u.y===Xe.y&&(u.y<0||u.y>Td)}function Cl(u){return u.every((u=>u.x<0))||u.every((u=>u.x>Td))||u.every((u=>u.y<0))||u.every((u=>u.y>Td))}let Gh;wi("FillExtrusionBucket",zl,{omit:["layers","features"]});var Kh={get paint(){return Gh=Gh||new rs({"fill-extrusion-opacity":new Ji(xo["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Wi(xo["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ji(xo["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ji(xo["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Qi(xo["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Wi(xo["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Wi(xo["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ji(xo["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class El extends is{constructor(u){super(u,Kh)}createBucket(u){return new zl(u)}queryRadius(){return eo(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(u,Xe,In,fr,_r,wr,Ar,Kr){const no=ro(u,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),wr.angle,Ar),io=this.paint.get("fill-extrusion-height").evaluate(Xe,In),oo=this.paint.get("fill-extrusion-base").evaluate(Xe,In),ao=function(u,Xe){const In=[];for(const fr of u){const u=[fr.x,fr.y,0,1];po(u,u,Xe),In.push(new Wt(u[0]/u[3],u[1]/u[3]))}return In}(no,Kr),so=function(u,Xe,In,fr){const _r=[],wr=[],Ar=fr[8]*Xe,Kr=fr[9]*Xe,no=fr[10]*Xe,io=fr[11]*Xe,oo=fr[8]*In,ao=fr[9]*In,so=fr[10]*In,co=fr[11]*In;for(const Xe of u){const u=[],In=[];for(const _r of Xe){const Xe=_r.x,wr=_r.y,ho=fr[0]*Xe+fr[4]*wr+fr[12],go=fr[1]*Xe+fr[5]*wr+fr[13],xo=fr[2]*Xe+fr[6]*wr+fr[14],ko=fr[3]*Xe+fr[7]*wr+fr[15],Co=xo+no,Io=ko+io,zo=ho+oo,Bo=go+ao,ca=xo+so,ua=ko+co,Da=new Wt((ho+Ar)/Io,(go+Kr)/Io);Da.z=Co/Io,u.push(Da);const ns=new Wt(zo/ua,Bo/ua);ns.z=ca/ua,In.push(ns)}_r.push(u),wr.push(In)}return[_r,wr]}(fr,oo,io,Kr);return function(u,Xe,Wt){let In=1/0;Za(Wt,Xe)&&(In=Tl(Wt,Xe[0]));for(let fr=0;fr<Xe.length;fr++){const _r=Xe[fr],wr=u[fr];for(let u=0;u<_r.length-1;u++){const Xe=_r[u],fr=[Xe,_r[u+1],wr[u+1],wr[u],Xe];qa(Wt,fr)&&(In=Math.min(In,Tl(Wt,fr)))}}return In!==1/0&&In}(so[0],so[1],ao)}}function Fl(u,Xe){return u.x*Xe.x+u.y*Xe.y}function Tl(u,Xe){if(1===u.length){let Wt=0;const In=Xe[Wt++];let fr;for(;!fr||In.equals(fr);)if(fr=Xe[Wt++],!fr)return 1/0;for(;Wt<Xe.length;Wt++){const _r=Xe[Wt],wr=u[0],Ar=fr.sub(In),Kr=_r.sub(In),no=wr.sub(In),io=Fl(Ar,Ar),oo=Fl(Ar,Kr),ao=Fl(Kr,Kr),so=Fl(no,Ar),co=Fl(no,Kr),ho=io*ao-oo*oo,go=(ao*so-oo*co)/ho,xo=(io*co-oo*so)/ho,ko=In.z*(1-go-xo)+fr.z*go+_r.z*xo;if(isFinite(ko))return ko}return 1/0}{let u=1/0;for(const Wt of Xe)u=Math.min(u,Wt.z);return u}}const Jh=ls([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:Qh}=Jh,ep=ls([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:tp}=ep,np=Qd.VectorTileFeature.types,rp=Math.cos(Math.PI/180*37.5),ip=Math.pow(2,14)/.5;class ql{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((u=>{this.gradients[u.id]={}})),this.layoutVertexArray=new Hs,this.layoutVertexArray2=new Ys,this.indexArray=new na,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,Wt){this.hasPattern=nl("line",this.layers,Xe);const In=this.layers[0].layout.get("line-sort-key"),fr=!In.isConstant(),_r=[];for(const{feature:Xe,id:wr,index:Ar,sourceLayerIndex:Kr}of u){const u=this.layers[0]._featureFilter.needGeometry,no=ja(Xe,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),no,Wt))continue;const io=fr?In.evaluate(no,{},Wt):void 0,oo={id:wr,properties:Xe.properties,type:Xe.type,sourceLayerIndex:Kr,index:Ar,geometry:u?no.geometry:Oa(Xe),patterns:{},sortKey:io};_r.push(oo)}fr&&_r.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const In of _r){const{geometry:fr,index:_r,sourceLayerIndex:wr}=In;if(this.hasPattern){const u=il("line",this.layers,In,this.zoom,Xe);this.patternFeatures.push(u)}else this.addFeature(In,fr,_r,Wt,{});Xe.featureIndex.insert(u[_r].feature,fr,_r,wr,this.index)}}update(u,Xe,Wt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,Wt)}addFeatures(u,Xe,Wt){for(const u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,Xe,Wt)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=u.createVertexBuffer(this.layoutVertexArray2,tp)),this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Qh),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(u){if(u.properties&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_end"))return{start:+u.properties.mapbox_clip_start,end:+u.properties.mapbox_clip_end}}addFeature(u,Xe,Wt,In,fr){const _r=this.layers[0].layout,wr=_r.get("line-join").evaluate(u,{}),Ar=_r.get("line-cap"),Kr=_r.get("line-miter-limit"),no=_r.get("line-round-limit");this.lineClips=this.lineFeatureClips(u);for(const Wt of Xe)this.addLine(Wt,u,wr,Ar,Kr,no);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,Wt,fr,In)}addLine(u,Xe,Wt,In,fr,_r){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Xe=0;Xe<u.length-1;Xe++)this.totalDistance+=u[Xe].dist(u[Xe+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const wr="Polygon"===np[Xe.type];let Ar=u.length;for(;Ar>=2&&u[Ar-1].equals(u[Ar-2]);)Ar--;let Kr=0;for(;Kr<Ar-1&&u[Kr].equals(u[Kr+1]);)Kr++;if(Ar<(wr?3:2))return;"bevel"===Wt&&(fr=1.05);const no=this.overscaling<=16?15*Td/(512*this.overscaling):0,io=this.segments.prepareSegment(10*Ar,this.layoutVertexArray,this.indexArray);let oo,ao,so,co,ho;this.e1=this.e2=-1,wr&&(oo=u[Ar-2],ho=u[Kr].sub(oo)._unit()._perp());for(let Xe=Kr;Xe<Ar;Xe++){if(so=Xe===Ar-1?wr?u[Kr+1]:void 0:u[Xe+1],so&&u[Xe].equals(so))continue;ho&&(co=ho),oo&&(ao=oo),oo=u[Xe],ho=so?so.sub(oo)._unit()._perp():co,co=co||ho;let go=co.add(ho);0===go.x&&0===go.y||go._unit();const xo=co.x*ho.x+co.y*ho.y,ko=go.x*ho.x+go.y*ho.y,Co=0!==ko?1/ko:1/0,Io=2*Math.sqrt(2-2*ko),zo=ko<rp&&ao&&so,Bo=co.x*ho.y-co.y*ho.x>0;if(zo&&Xe>Kr){const u=oo.dist(ao);if(u>2*no){const Xe=oo.sub(oo.sub(ao)._mult(no/u)._round());this.updateDistance(ao,Xe),this.addCurrentVertex(Xe,co,0,0,io),ao=Xe}}const ca=ao&&so;let ua=ca?Wt:wr?"butt":In;if(ca&&"round"===ua&&(Co<_r?ua="miter":Co<=2&&(ua="fakeround")),"miter"===ua&&Co>fr&&(ua="bevel"),"bevel"===ua&&(Co>2&&(ua="flipbevel"),Co<fr&&(ua="miter")),ao&&this.updateDistance(ao,oo),"miter"===ua)go._mult(Co),this.addCurrentVertex(oo,go,0,0,io);else if("flipbevel"===ua){if(Co>100)go=ho.mult(-1);else{const u=Co*co.add(ho).mag()/co.sub(ho).mag();go._perp()._mult(u*(Bo?-1:1))}this.addCurrentVertex(oo,go,0,0,io),this.addCurrentVertex(oo,go.mult(-1),0,0,io)}else if("bevel"===ua||"fakeround"===ua){const u=-Math.sqrt(Co*Co-1),Xe=Bo?u:0,Wt=Bo?0:u;if(ao&&this.addCurrentVertex(oo,co,Xe,Wt,io),"fakeround"===ua){const u=Math.round(180*Io/Math.PI/20);for(let Xe=1;Xe<u;Xe++){let Wt=Xe/u;if(.5!==Wt){const u=Wt-.5;Wt+=Wt*u*(Wt-1)*((1.0904+xo*(xo*(3.55645-1.43519*xo)-3.2452))*u*u+(.848013+xo*(.215638*xo-1.06021)))}const In=ho.sub(co)._mult(Wt)._add(co)._unit()._mult(Bo?-1:1);this.addHalfVertex(oo,In.x,In.y,!1,Bo,0,io)}}so&&this.addCurrentVertex(oo,ho,-Xe,-Wt,io)}else if("butt"===ua)this.addCurrentVertex(oo,go,0,0,io);else if("square"===ua){const u=ao?1:-1;this.addCurrentVertex(oo,go,u,u,io)}else"round"===ua&&(ao&&(this.addCurrentVertex(oo,co,0,0,io),this.addCurrentVertex(oo,co,1,1,io,!0)),so&&(this.addCurrentVertex(oo,ho,-1,-1,io,!0),this.addCurrentVertex(oo,ho,0,0,io)));if(zo&&Xe<Ar-1){const u=oo.dist(so);if(u>2*no){const Xe=oo.add(so.sub(oo)._mult(no/u)._round());this.updateDistance(oo,Xe),this.addCurrentVertex(Xe,ho,0,0,io),oo=Xe}}}}addCurrentVertex(u,Xe,Wt,In,fr,_r=!1){const wr=Xe.y*In-Xe.x,Ar=-Xe.y-Xe.x*In;this.addHalfVertex(u,Xe.x+Xe.y*Wt,Xe.y-Xe.x*Wt,_r,!1,Wt,fr),this.addHalfVertex(u,wr,Ar,_r,!0,-In,fr),this.distance>ip/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(u,Xe,Wt,In,fr,_r))}addHalfVertex({x:u,y:Xe},Wt,In,fr,_r,wr,Ar){const Kr=.5*(this.lineClips?this.scaledDistance*(ip-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((u<<1)+(fr?1:0),(Xe<<1)+(_r?1:0),Math.round(63*Wt)+128,Math.round(63*In)+128,1+(0===wr?0:wr<0?-1:1)|(63&Kr)<<2,Kr>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const no=Ar.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,no),Ar.primitiveLength++),_r?this.e2=no:this.e1=no}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(u,Xe){this.distance+=u.dist(Xe),this.updateScaledDistance()}}let op,ap;wi("LineBucket",ql,{omit:["layers","patternFeatures"]});var sp={get paint(){return ap=ap||new rs({"line-opacity":new Wi(xo.paint_line["line-opacity"]),"line-color":new Wi(xo.paint_line["line-color"]),"line-translate":new Ji(xo.paint_line["line-translate"]),"line-translate-anchor":new Ji(xo.paint_line["line-translate-anchor"]),"line-width":new Wi(xo.paint_line["line-width"]),"line-gap-width":new Wi(xo.paint_line["line-gap-width"]),"line-offset":new Wi(xo.paint_line["line-offset"]),"line-blur":new Wi(xo.paint_line["line-blur"]),"line-dasharray":new ts(xo.paint_line["line-dasharray"]),"line-pattern":new Qi(xo.paint_line["line-pattern"]),"line-gradient":new es(xo.paint_line["line-gradient"])})},get layout(){return op=op||new rs({"line-cap":new Ji(xo.layout_line["line-cap"]),"line-join":new Wi(xo.layout_line["line-join"]),"line-miter-limit":new Ji(xo.layout_line["line-miter-limit"]),"line-round-limit":new Ji(xo.layout_line["line-round-limit"]),"line-sort-key":new Wi(xo.layout_line["line-sort-key"])})}};class Kl extends Wi{possiblyEvaluate(u,Xe){return Xe=new Ui(Math.floor(Xe.zoom),{now:Xe.now,fadeDuration:Xe.fadeDuration,zoomHistory:Xe.zoomHistory,transition:Xe.transition}),super.possiblyEvaluate(u,Xe)}evaluate(u,Xe,Wt,In){return Xe=g({},Xe,{zoom:Math.floor(Xe.zoom)}),super.evaluate(u,Xe,Wt,In)}}let lp;class Hl extends is{constructor(u){super(u,sp),this.gradientVersion=0,lp||(lp=new Kl(sp.paint.properties["line-width"].specification),lp.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(u){if("line-gradient"===u){const u=this.gradientExpression();this.stepInterpolant=!!function(u){return void 0!==u._styleExpression}(u)&&u._styleExpression.expression instanceof Ae,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(u,Xe){super.recalculate(u,Xe),this.paint._values["line-floorwidth"]=lp.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,u)}createBucket(u){return new ql(u)}queryRadius(u){const Xe=u,Wt=Yl(to("line-width",this,Xe),to("line-gap-width",this,Xe)),In=to("line-offset",this,Xe);return Wt/2+Math.abs(In)+eo(this.paint.get("line-translate"))}queryIntersectsFeature(u,Xe,In,fr,_r,wr,Ar){const Kr=ro(u,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),wr.angle,Ar),no=Ar/2*Yl(this.paint.get("line-width").evaluate(Xe,In),this.paint.get("line-gap-width").evaluate(Xe,In)),io=this.paint.get("line-offset").evaluate(Xe,In);return io&&(fr=function(u,Xe){const In=[];for(let fr=0;fr<u.length;fr++){const _r=u[fr],wr=[];for(let u=0;u<_r.length;u++){const In=_r[u-1],fr=_r[u],Ar=_r[u+1],Kr=0===u?new Wt(0,0):fr.sub(In)._unit()._perp(),no=u===_r.length-1?new Wt(0,0):Ar.sub(fr)._unit()._perp(),io=Kr._add(no)._unit(),oo=io.x*no.x+io.y*no.y;0!==oo&&io._mult(1/oo),wr.push(io._mult(Xe)._add(fr))}In.push(wr)}return In}(fr,io*Ar)),function(u,Xe,Wt){for(let In=0;In<Xe.length;In++){const fr=Xe[In];if(u.length>=3)for(let Xe=0;Xe<fr.length;Xe++)if(Wa(u,fr[Xe]))return!0;if(Ga(u,fr,Wt))return!0}return!1}(Kr,fr,no)}isTileClipped(){return!0}}function Yl(u,Xe){return Xe>0?Xe+2*u:u}const cp=ls([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),dp=ls([{name:"a_projected_pos",components:3,type:"Float32"}],4);ls([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const hp=ls([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ls([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const pp=ls([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),fp=ls([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function ru(u,Xe,Wt){return u.sections.forEach((u=>{u.text=function(u,Xe,Wt){const In=Xe.layout.get("text-transform").evaluate(Wt,{});return"uppercase"===In?u=u.toLocaleUpperCase():"lowercase"===In&&(u=u.toLocaleLowerCase()),ld.applyArabicShaping&&(u=ld.applyArabicShaping(u)),u}(u.text,Xe,Wt)})),u}ls([{name:"triangle",components:3,type:"Uint16"}]),ls([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ls([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ls([{type:"Float32",name:"offsetX"}]),ls([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ls([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const mp={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var gp=24,yp=lu,au=function(u,Xe,Wt,In,fr){var _r,wr,Ar=8*fr-In-1,Kr=(1<<Ar)-1,no=Kr>>1,io=-7,oo=Wt?fr-1:0,ao=Wt?-1:1,so=u[Xe+oo];for(oo+=ao,_r=so&(1<<-io)-1,so>>=-io,io+=Ar;io>0;_r=256*_r+u[Xe+oo],oo+=ao,io-=8);for(wr=_r&(1<<-io)-1,_r>>=-io,io+=In;io>0;wr=256*wr+u[Xe+oo],oo+=ao,io-=8);if(0===_r)_r=1-no;else{if(_r===Kr)return wr?NaN:1/0*(so?-1:1);wr+=Math.pow(2,In),_r-=no}return(so?-1:1)*wr*Math.pow(2,_r-In)},ou=function(u,Xe,Wt,In,fr,_r){var wr,Ar,Kr,no=8*_r-fr-1,io=(1<<no)-1,oo=io>>1,ao=23===fr?Math.pow(2,-24)-Math.pow(2,-77):0,so=In?0:_r-1,co=In?1:-1,ho=Xe<0||0===Xe&&1/Xe<0?1:0;for(Xe=Math.abs(Xe),isNaN(Xe)||Xe===1/0?(Ar=isNaN(Xe)?1:0,wr=io):(wr=Math.floor(Math.log(Xe)/Math.LN2),Xe*(Kr=Math.pow(2,-wr))<1&&(wr--,Kr*=2),(Xe+=wr+oo>=1?ao/Kr:ao*Math.pow(2,1-oo))*Kr>=2&&(wr++,Kr/=2),wr+oo>=io?(Ar=0,wr=io):wr+oo>=1?(Ar=(Xe*Kr-1)*Math.pow(2,fr),wr+=oo):(Ar=Xe*Math.pow(2,oo-1)*Math.pow(2,fr),wr=0));fr>=8;u[Wt+so]=255&Ar,so+=co,Ar/=256,fr-=8);for(wr=wr<<fr|Ar,no+=fr;no>0;u[Wt+so]=255&wr,so+=co,wr/=256,no-=8);u[Wt+so-co]|=128*ho};function lu(u){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(u)?u:new Uint8Array(u||0),this.pos=0,this.type=0,this.length=this.buf.length}lu.Varint=0,lu.Fixed64=1,lu.Bytes=2,lu.Fixed32=5;var _p=4294967296,vp=1/_p,bp="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");function pu(u){return u.type===lu.Bytes?u.readVarint()+u.pos:u.pos+1}function fu(u,Xe,Wt){return Wt?4294967296*Xe+(u>>>0):4294967296*(Xe>>>0)+(u>>>0)}function du(u,Xe,Wt){var In=Xe<=16383?1:Xe<=2097151?2:Xe<=268435455?3:Math.floor(Math.log(Xe)/(7*Math.LN2));Wt.realloc(In);for(var fr=Wt.pos-1;fr>=u;fr--)Wt.buf[fr+In]=Wt.buf[fr]}function yu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeVarint(u[Wt])}function mu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeSVarint(u[Wt])}function gu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeFloat(u[Wt])}function xu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeDouble(u[Wt])}function vu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeBoolean(u[Wt])}function bu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeFixed32(u[Wt])}function wu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeSFixed32(u[Wt])}function _u(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeFixed64(u[Wt])}function Au(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeSFixed64(u[Wt])}function Su(u,Xe){return(u[Xe]|u[Xe+1]<<8|u[Xe+2]<<16)+16777216*u[Xe+3]}function ku(u,Xe,Wt){u[Wt]=Xe,u[Wt+1]=Xe>>>8,u[Wt+2]=Xe>>>16,u[Wt+3]=Xe>>>24}function Mu(u,Xe){return(u[Xe]|u[Xe+1]<<8|u[Xe+2]<<16)+(u[Xe+3]<<24)}lu.prototype={destroy:function(){this.buf=null},readFields:function(u,Xe,Wt){for(Wt=Wt||this.length;this.pos<Wt;){var In=this.readVarint(),fr=In>>3,_r=this.pos;this.type=7&In,u(fr,Xe,this),this.pos===_r&&this.skip(In)}return Xe},readMessage:function(u,Xe){return this.readFields(u,Xe,this.readVarint()+this.pos)},readFixed32:function(){var u=Su(this.buf,this.pos);return this.pos+=4,u},readSFixed32:function(){var u=Mu(this.buf,this.pos);return this.pos+=4,u},readFixed64:function(){var u=Su(this.buf,this.pos)+Su(this.buf,this.pos+4)*_p;return this.pos+=8,u},readSFixed64:function(){var u=Su(this.buf,this.pos)+Mu(this.buf,this.pos+4)*_p;return this.pos+=8,u},readFloat:function(){var u=au(this.buf,this.pos,!0,23,4);return this.pos+=4,u},readDouble:function(){var u=au(this.buf,this.pos,!0,52,8);return this.pos+=8,u},readVarint:function(u){var Xe,Wt,In=this.buf;return Xe=127&(Wt=In[this.pos++]),Wt<128?Xe:(Xe|=(127&(Wt=In[this.pos++]))<<7,Wt<128?Xe:(Xe|=(127&(Wt=In[this.pos++]))<<14,Wt<128?Xe:(Xe|=(127&(Wt=In[this.pos++]))<<21,Wt<128?Xe:function(u,Xe,Wt){var In,fr,_r=Wt.buf;if(In=(112&(fr=_r[Wt.pos++]))>>4,fr<128)return fu(u,In,Xe);if(In|=(127&(fr=_r[Wt.pos++]))<<3,fr<128)return fu(u,In,Xe);if(In|=(127&(fr=_r[Wt.pos++]))<<10,fr<128)return fu(u,In,Xe);if(In|=(127&(fr=_r[Wt.pos++]))<<17,fr<128)return fu(u,In,Xe);if(In|=(127&(fr=_r[Wt.pos++]))<<24,fr<128)return fu(u,In,Xe);if(In|=(1&(fr=_r[Wt.pos++]))<<31,fr<128)return fu(u,In,Xe);throw new Error("Expected varint not more than 10 bytes")}(Xe|=(15&(Wt=In[this.pos]))<<28,u,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var u=this.readVarint();return u%2==1?(u+1)/-2:u/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var u=this.readVarint()+this.pos,Xe=this.pos;return this.pos=u,u-Xe>=12&&bp?function(u,Xe,Wt){return bp.decode(u.subarray(Xe,Wt))}(this.buf,Xe,u):function(u,Xe,Wt){for(var In="",fr=Xe;fr<Wt;){var _r,wr,Ar,Kr=u[fr],no=null,io=Kr>239?4:Kr>223?3:Kr>191?2:1;if(fr+io>Wt)break;1===io?Kr<128&&(no=Kr):2===io?128==(192&(_r=u[fr+1]))&&(no=(31&Kr)<<6|63&_r)<=127&&(no=null):3===io?(wr=u[fr+2],128==(192&(_r=u[fr+1]))&&128==(192&wr)&&((no=(15&Kr)<<12|(63&_r)<<6|63&wr)<=2047||no>=55296&&no<=57343)&&(no=null)):4===io&&(wr=u[fr+2],Ar=u[fr+3],128==(192&(_r=u[fr+1]))&&128==(192&wr)&&128==(192&Ar)&&((no=(15&Kr)<<18|(63&_r)<<12|(63&wr)<<6|63&Ar)<=65535||no>=1114112)&&(no=null)),null===no?(no=65533,io=1):no>65535&&(no-=65536,In+=String.fromCharCode(no>>>10&1023|55296),no=56320|1023&no),In+=String.fromCharCode(no),fr+=io}return In}(this.buf,Xe,u)},readBytes:function(){var u=this.readVarint()+this.pos,Xe=this.buf.subarray(this.pos,u);return this.pos=u,Xe},readPackedVarint:function(u,Xe){if(this.type!==lu.Bytes)return u.push(this.readVarint(Xe));var Wt=pu(this);for(u=u||[];this.pos<Wt;)u.push(this.readVarint(Xe));return u},readPackedSVarint:function(u){if(this.type!==lu.Bytes)return u.push(this.readSVarint());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSVarint());return u},readPackedBoolean:function(u){if(this.type!==lu.Bytes)return u.push(this.readBoolean());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readBoolean());return u},readPackedFloat:function(u){if(this.type!==lu.Bytes)return u.push(this.readFloat());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFloat());return u},readPackedDouble:function(u){if(this.type!==lu.Bytes)return u.push(this.readDouble());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readDouble());return u},readPackedFixed32:function(u){if(this.type!==lu.Bytes)return u.push(this.readFixed32());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFixed32());return u},readPackedSFixed32:function(u){if(this.type!==lu.Bytes)return u.push(this.readSFixed32());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSFixed32());return u},readPackedFixed64:function(u){if(this.type!==lu.Bytes)return u.push(this.readFixed64());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFixed64());return u},readPackedSFixed64:function(u){if(this.type!==lu.Bytes)return u.push(this.readSFixed64());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSFixed64());return u},skip:function(u){var Xe=7&u;if(Xe===lu.Varint)for(;this.buf[this.pos++]>127;);else if(Xe===lu.Bytes)this.pos=this.readVarint()+this.pos;else if(Xe===lu.Fixed32)this.pos+=4;else{if(Xe!==lu.Fixed64)throw new Error("Unimplemented type: "+Xe);this.pos+=8}},writeTag:function(u,Xe){this.writeVarint(u<<3|Xe)},realloc:function(u){for(var Xe=this.length||16;Xe<this.pos+u;)Xe*=2;if(Xe!==this.length){var Wt=new Uint8Array(Xe);Wt.set(this.buf),this.buf=Wt,this.length=Xe}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(u){this.realloc(4),ku(this.buf,u,this.pos),this.pos+=4},writeSFixed32:function(u){this.realloc(4),ku(this.buf,u,this.pos),this.pos+=4},writeFixed64:function(u){this.realloc(8),ku(this.buf,-1&u,this.pos),ku(this.buf,Math.floor(u*vp),this.pos+4),this.pos+=8},writeSFixed64:function(u){this.realloc(8),ku(this.buf,-1&u,this.pos),ku(this.buf,Math.floor(u*vp),this.pos+4),this.pos+=8},writeVarint:function(u){(u=+u||0)>268435455||u<0?function(u,Xe){var Wt,In;if(u>=0?(Wt=u%4294967296|0,In=u/4294967296|0):(In=~(-u/4294967296),4294967295^(Wt=~(-u%4294967296))?Wt=Wt+1|0:(Wt=0,In=In+1|0)),u>=0x10000000000000000||u<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");Xe.realloc(10),function(u,Xe,Wt){Wt.buf[Wt.pos++]=127&u|128,u>>>=7,Wt.buf[Wt.pos++]=127&u|128,u>>>=7,Wt.buf[Wt.pos++]=127&u|128,u>>>=7,Wt.buf[Wt.pos++]=127&u|128,Wt.buf[Wt.pos]=127&(u>>>=7)}(Wt,0,Xe),function(u,Xe){var Wt=(7&u)<<4;Xe.buf[Xe.pos++]|=Wt|((u>>>=3)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u)))))}(In,Xe)}(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))},writeSVarint:function(u){this.writeVarint(u<0?2*-u-1:2*u)},writeBoolean:function(u){this.writeVarint(Boolean(u))},writeString:function(u){u=String(u),this.realloc(4*u.length),this.pos++;var Xe=this.pos;this.pos=function(u,Xe,Wt){for(var In,fr,_r=0;_r<Xe.length;_r++){if((In=Xe.charCodeAt(_r))>55295&&In<57344){if(!fr){In>56319||_r+1===Xe.length?(u[Wt++]=239,u[Wt++]=191,u[Wt++]=189):fr=In;continue}if(In<56320){u[Wt++]=239,u[Wt++]=191,u[Wt++]=189,fr=In;continue}In=fr-55296<<10|In-56320|65536,fr=null}else fr&&(u[Wt++]=239,u[Wt++]=191,u[Wt++]=189,fr=null);In<128?u[Wt++]=In:(In<2048?u[Wt++]=In>>6|192:(In<65536?u[Wt++]=In>>12|224:(u[Wt++]=In>>18|240,u[Wt++]=In>>12&63|128),u[Wt++]=In>>6&63|128),u[Wt++]=63&In|128)}return Wt}(this.buf,u,this.pos);var Wt=this.pos-Xe;Wt>=128&&du(Xe,Wt,this),this.pos=Xe-1,this.writeVarint(Wt),this.pos+=Wt},writeFloat:function(u){this.realloc(4),ou(this.buf,u,this.pos,!0,23,4),this.pos+=4},writeDouble:function(u){this.realloc(8),ou(this.buf,u,this.pos,!0,52,8),this.pos+=8},writeBytes:function(u){var Xe=u.length;this.writeVarint(Xe),this.realloc(Xe);for(var Wt=0;Wt<Xe;Wt++)this.buf[this.pos++]=u[Wt]},writeRawMessage:function(u,Xe){this.pos++;var Wt=this.pos;u(Xe,this);var In=this.pos-Wt;In>=128&&du(Wt,In,this),this.pos=Wt-1,this.writeVarint(In),this.pos+=In},writeMessage:function(u,Xe,Wt){this.writeTag(u,lu.Bytes),this.writeRawMessage(Xe,Wt)},writePackedVarint:function(u,Xe){Xe.length&&this.writeMessage(u,yu,Xe)},writePackedSVarint:function(u,Xe){Xe.length&&this.writeMessage(u,mu,Xe)},writePackedBoolean:function(u,Xe){Xe.length&&this.writeMessage(u,vu,Xe)},writePackedFloat:function(u,Xe){Xe.length&&this.writeMessage(u,gu,Xe)},writePackedDouble:function(u,Xe){Xe.length&&this.writeMessage(u,xu,Xe)},writePackedFixed32:function(u,Xe){Xe.length&&this.writeMessage(u,bu,Xe)},writePackedSFixed32:function(u,Xe){Xe.length&&this.writeMessage(u,wu,Xe)},writePackedFixed64:function(u,Xe){Xe.length&&this.writeMessage(u,_u,Xe)},writePackedSFixed64:function(u,Xe){Xe.length&&this.writeMessage(u,Au,Xe)},writeBytesField:function(u,Xe){this.writeTag(u,lu.Bytes),this.writeBytes(Xe)},writeFixed32Field:function(u,Xe){this.writeTag(u,lu.Fixed32),this.writeFixed32(Xe)},writeSFixed32Field:function(u,Xe){this.writeTag(u,lu.Fixed32),this.writeSFixed32(Xe)},writeFixed64Field:function(u,Xe){this.writeTag(u,lu.Fixed64),this.writeFixed64(Xe)},writeSFixed64Field:function(u,Xe){this.writeTag(u,lu.Fixed64),this.writeSFixed64(Xe)},writeVarintField:function(u,Xe){this.writeTag(u,lu.Varint),this.writeVarint(Xe)},writeSVarintField:function(u,Xe){this.writeTag(u,lu.Varint),this.writeSVarint(Xe)},writeStringField:function(u,Xe){this.writeTag(u,lu.Bytes),this.writeString(Xe)},writeFloatField:function(u,Xe){this.writeTag(u,lu.Fixed32),this.writeFloat(Xe)},writeDoubleField:function(u,Xe){this.writeTag(u,lu.Fixed64),this.writeDouble(Xe)},writeBooleanField:function(u,Xe){this.writeVarintField(u,Boolean(Xe))}};var xp=r(yp);const wp=3;function Pu(u,Xe,Wt){1===u&&Wt.readMessage(Cu,Xe)}function Cu(u,Xe,Wt){if(3===u){const{id:u,bitmap:In,width:fr,height:_r,left:wr,top:Ar,advance:Kr}=Wt.readMessage(Bu,{});Xe.push({id:u,bitmap:new _o({width:fr+2*wp,height:_r+2*wp},In),metrics:{width:fr,height:_r,left:wr,top:Ar,advance:Kr}})}}function Bu(u,Xe,Wt){1===u?Xe.id=Wt.readVarint():2===u?Xe.bitmap=Wt.readBytes():3===u?Xe.width=Wt.readVarint():4===u?Xe.height=Wt.readVarint():5===u?Xe.left=Wt.readSVarint():6===u?Xe.top=Wt.readSVarint():7===u&&(Xe.advance=Wt.readVarint())}const Sp=wp;function Eu(u){let Xe=0,Wt=0;for(const In of u)Xe+=In.w*In.h,Wt=Math.max(Wt,In.w);u.sort(((u,Xe)=>Xe.h-u.h));const In=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(Xe/.95)),Wt),h:1/0}];let fr=0,_r=0;for(const Xe of u)for(let u=In.length-1;u>=0;u--){const Wt=In[u];if(!(Xe.w>Wt.w||Xe.h>Wt.h)){if(Xe.x=Wt.x,Xe.y=Wt.y,_r=Math.max(_r,Xe.y+Xe.h),fr=Math.max(fr,Xe.x+Xe.w),Xe.w===Wt.w&&Xe.h===Wt.h){const Xe=In.pop();u<In.length&&(In[u]=Xe)}else Xe.h===Wt.h?(Wt.x+=Xe.w,Wt.w-=Xe.w):Xe.w===Wt.w?(Wt.y+=Xe.h,Wt.h-=Xe.h):(In.push({x:Wt.x+Xe.w,y:Wt.y,w:Wt.w-Xe.w,h:Xe.h}),Wt.y+=Xe.h,Wt.h-=Xe.h);break}}return{w:fr,h:_r,fill:Xe/(fr*_r)||0}}const kp=1;class Tu{constructor(u,{pixelRatio:Xe,version:Wt,stretchX:In,stretchY:fr,content:_r,textFitWidth:wr,textFitHeight:Ar}){this.paddedRect=u,this.pixelRatio=Xe,this.stretchX=In,this.stretchY=fr,this.content=_r,this.version=Wt,this.textFitWidth=wr,this.textFitHeight=Ar}get tl(){return[this.paddedRect.x+kp,this.paddedRect.y+kp]}get br(){return[this.paddedRect.x+this.paddedRect.w-kp,this.paddedRect.y+this.paddedRect.h-kp]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*kp)/this.pixelRatio,(this.paddedRect.h-2*kp)/this.pixelRatio]}}class $u{constructor(u,Xe){const Wt={},In={};this.haveRenderCallbacks=[];const fr=[];this.addImages(u,Wt,fr),this.addImages(Xe,In,fr);const{w:_r,h:wr}=Eu(fr),Ar=new Ao({width:_r||1,height:wr||1});for(const Xe in u){const In=u[Xe],fr=Wt[Xe].paddedRect;Ao.copy(In.data,Ar,{x:0,y:0},{x:fr.x+kp,y:fr.y+kp},In.data)}for(const u in Xe){const Wt=Xe[u],fr=In[u].paddedRect,_r=fr.x+kp,wr=fr.y+kp,Kr=Wt.data.width,no=Wt.data.height;Ao.copy(Wt.data,Ar,{x:0,y:0},{x:_r,y:wr},Wt.data),Ao.copy(Wt.data,Ar,{x:0,y:no-1},{x:_r,y:wr-1},{width:Kr,height:1}),Ao.copy(Wt.data,Ar,{x:0,y:0},{x:_r,y:wr+no},{width:Kr,height:1}),Ao.copy(Wt.data,Ar,{x:Kr-1,y:0},{x:_r-1,y:wr},{width:1,height:no}),Ao.copy(Wt.data,Ar,{x:0,y:0},{x:_r+Kr,y:wr},{width:1,height:no})}this.image=Ar,this.iconPositions=Wt,this.patternPositions=In}addImages(u,Xe,Wt){for(const In in u){const fr=u[In],_r={x:0,y:0,w:fr.data.width+2*kp,h:fr.data.height+2*kp};Wt.push(_r),Xe[In]=new Tu(_r,fr),fr.hasRenderCallback&&this.haveRenderCallbacks.push(In)}}patchUpdatedImages(u,Xe){u.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const Wt in u.updatedImages)this.patchUpdatedImage(this.iconPositions[Wt],u.getImage(Wt),Xe),this.patchUpdatedImage(this.patternPositions[Wt],u.getImage(Wt),Xe)}patchUpdatedImage(u,Xe,Wt){if(!u||!Xe)return;if(u.version===Xe.version)return;u.version=Xe.version;const[In,fr]=u.tl;Wt.update(Xe.data,void 0,{x:In,y:fr})}}var Ap;wi("ImagePosition",Tu),wi("ImageAtlas",$u),u.ah=void 0,(Ap=u.ah||(u.ah={}))[Ap.none=0]="none",Ap[Ap.horizontal=1]="horizontal",Ap[Ap.vertical=2]="vertical",Ap[Ap.horizontalOnly=3]="horizontalOnly";const Tp=-17;class Ou{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(u,Xe){const Wt=new Ou;return Wt.scale=u||1,Wt.fontStack=Xe,Wt}static forImage(u){const Xe=new Ou;return Xe.imageName=u,Xe}}class ju{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(u,Xe){const Wt=new ju;for(let In=0;In<u.sections.length;In++){const fr=u.sections[In];fr.image?Wt.addImageSection(fr):Wt.addTextSection(fr,Xe)}return Wt}length(){return this.text.length}getSection(u){return this.sections[this.sectionIndex[u]]}getSectionIndex(u){return this.sectionIndex[u]}getCharCode(u){return this.text.charCodeAt(u)}verticalizePunctuation(){this.text=function(u){let Xe="";for(let Wt=0;Wt<u.length;Wt++){const In=u.charCodeAt(Wt+1)||null,fr=u.charCodeAt(Wt-1)||null;Xe+=In&&$i(In)&&!mp[u[Wt+1]]||fr&&$i(fr)&&!mp[u[Wt-1]]||!mp[u[Wt]]?u[Wt]:mp[u[Wt]]}return Xe}(this.text)}trim(){let u=0;for(let Xe=0;Xe<this.text.length&&Cp[this.text.charCodeAt(Xe)];Xe++)u++;let Xe=this.text.length;for(let Wt=this.text.length-1;Wt>=0&&Wt>=u&&Cp[this.text.charCodeAt(Wt)];Wt--)Xe--;this.text=this.text.substring(u,Xe),this.sectionIndex=this.sectionIndex.slice(u,Xe)}substring(u,Xe){const Wt=new ju;return Wt.text=this.text.substring(u,Xe),Wt.sectionIndex=this.sectionIndex.slice(u,Xe),Wt.sections=this.sections,Wt}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((u,Xe)=>Math.max(u,this.sections[Xe].scale)),0)}addTextSection(u,Xe){this.text+=u.text,this.sections.push(Ou.forText(u.scale,u.fontStack||Xe));const Wt=this.sections.length-1;for(let Xe=0;Xe<u.text.length;++Xe)this.sectionIndex.push(Wt)}addImageSection(u){const Xe=u.image?u.image.name:"";if(0===Xe.length)return void A("Can't add FormattedSection with an empty image.");const Wt=this.getNextImageSectionCharCode();Wt?(this.text+=String.fromCharCode(Wt),this.sections.push(Ou.forImage(Xe)),this.sectionIndex.push(this.sections.length-1)):A("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Ru(Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho){const go=ju.fromFeature(Xe,_r);let xo;ao===u.ah.vertical&&go.verticalizePunctuation();const{processBidirectionalText:ko,processStyledBidirectionalText:Co}=ld;if(ko&&1===go.sections.length){xo=[];const u=ko(go.toString(),Yu(go,io,wr,Wt,fr,co));for(const Xe of u){const u=new ju;u.text=Xe,u.sections=go.sections;for(let Wt=0;Wt<Xe.length;Wt++)u.sectionIndex.push(0);xo.push(u)}}else if(Co){xo=[];const u=Co(go.text,go.sectionIndex,Yu(go,io,wr,Wt,fr,co));for(const Xe of u){const u=new ju;u.text=Xe[0],u.sectionIndex=Xe[1],u.sections=go.sections,xo.push(u)}}else xo=function(u,Xe){const Wt=[],In=u.text;let fr=0;for(const In of Xe)Wt.push(u.substring(fr,In)),fr=In;return fr<In.length&&Wt.push(u.substring(fr,In.length)),Wt}(go,Yu(go,io,wr,Wt,fr,co));const Io=[],zo={positionedLines:Io,text:go.toString(),top:oo[1],bottom:oo[1],left:oo[0],right:oo[0],writingMode:ao,iconsInText:!1,verticalizable:!1};return function(Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao){let so=0,co=Tp,ho=0,go=0;const xo="right"===Kr?1:"left"===Kr?0:.5;let ko=0;for(const Ar of _r){Ar.trim();const _r=Ar.getMaxScale(),Kr=(_r-1)*gp,Io={positionedGlyphs:[],lineOffset:0};Xe.positionedLines[ko]=Io;const zo=Io.positionedGlyphs;let Bo=0;if(!Ar.length()){co+=wr,++ko;continue}for(let wr=0;wr<Ar.length();wr++){const ho=Ar.getSection(wr),go=Ar.getSectionIndex(wr),xo=Ar.getCharCode(wr);let ko=0,Io=null,ca=null,ua=null,Da=gp;const ns=!(no===u.ah.horizontal||!oo&&!Ti(xo)||oo&&(Cp[xo]||(Co=xo,/\p{sc=Arab}/u.test(String.fromCodePoint(Co)))));if(ho.imageName){const u=fr[ho.imageName];if(!u)continue;ua=ho.imageName,Xe.iconsInText=Xe.iconsInText||!0,ca=u.paddedRect;const Wt=u.displaySize;ho.scale=ho.scale*gp/ao,Io={width:Wt[0],height:Wt[1],left:kp,top:-Sp,advance:ns?Wt[1]:Wt[0]},ko=Kr+(gp-Wt[1]*ho.scale),Da=Io.advance;const In=ns?Wt[0]*ho.scale-gp*_r:Wt[1]*ho.scale-gp*_r;In>0&&In>Bo&&(Bo=In)}else{const u=In[ho.fontStack],Xe=u&&u[xo];if(Xe&&Xe.rect)ca=Xe.rect,Io=Xe.metrics;else{const u=Wt[ho.fontStack],Xe=u&&u[xo];if(!Xe)continue;Io=Xe.metrics}ko=(_r-ho.scale)*gp}ns?(Xe.verticalizable=!0,zo.push({glyph:xo,imageName:ua,x:so,y:co+ko,vertical:ns,scale:ho.scale,fontStack:ho.fontStack,sectionIndex:go,metrics:Io,rect:ca}),so+=Da*ho.scale+io):(zo.push({glyph:xo,imageName:ua,x:so,y:co+ko,vertical:ns,scale:ho.scale,fontStack:ho.fontStack,sectionIndex:go,metrics:Io,rect:ca}),so+=Io.advance*ho.scale+io)}0!==zo.length&&(ho=Math.max(so-io,ho),Wu(zo,0,zo.length-1,xo,Bo)),so=0;const ca=wr*_r+Bo;Io.lineOffset=Math.max(Bo,Kr),co+=ca,go=Math.max(ca,go),++ko}var Co;const Io=co-Tp,{horizontalAlign:zo,verticalAlign:Bo}=Ju(Ar);(function(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){const no=(Xe-Wt)*fr;let io=0;io=_r!==wr?-Ar*In-Tp:(-In*Kr+.5)*wr;for(const Xe of u)for(const u of Xe.positionedGlyphs)u.x+=no,u.y+=io})(Xe.positionedLines,xo,zo,Bo,ho,go,wr,Io,_r.length),Xe.top+=-Bo*Io,Xe.bottom=Xe.top+Io,Xe.left+=-zo*ho,Xe.right=Xe.left+ho}(zo,Wt,In,fr,xo,Ar,Kr,no,ao,io,so,ho),!function(u){for(const Xe of u)if(0!==Xe.positionedGlyphs.length)return!1;return!0}(Io)&&zo}const Cp={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Ep={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Pp={40:!0};function Zu(u,Xe,Wt,In,fr,_r){if(Xe.imageName){const u=In[Xe.imageName];return u?u.displaySize[0]*Xe.scale*gp/_r+fr:0}{const In=Wt[Xe.fontStack],_r=In&&In[u];return _r?_r.metrics.advance*Xe.scale+fr:0}}function Gu(u,Xe,Wt,In){const fr=Math.pow(u-Xe,2);return In?u<Xe?fr/2:2*fr:fr+Math.abs(Wt)*Wt}function Ku(u,Xe,Wt){let In=0;return 10===u&&(In-=1e4),Wt&&(In+=150),40!==u&&65288!==u||(In+=50),41!==Xe&&65289!==Xe||(In+=50),In}function Xu(u,Xe,Wt,In,fr,_r){let wr=null,Ar=Gu(Xe,Wt,fr,_r);for(const u of In){const In=Gu(Xe-u.x,Wt,fr,_r)+u.badness;In<=Ar&&(wr=u,Ar=In)}return{index:u,x:Xe,priorBreak:wr,badness:Ar}}function Hu(u){return u?Hu(u.priorBreak).concat(u.index):[]}function Yu(u,Xe,Wt,In,fr,_r){if(!u)return[];const wr=[],Ar=function(u,Xe,Wt,In,fr,_r){let wr=0;for(let Wt=0;Wt<u.length();Wt++){const Ar=u.getSection(Wt);wr+=Zu(u.getCharCode(Wt),Ar,In,fr,Xe,_r)}return wr/Math.max(1,Math.ceil(wr/Wt))}(u,Xe,Wt,In,fr,_r),Kr=u.text.indexOf("​")>=0;let no=0;for(let Wt=0;Wt<u.length();Wt++){const oo=u.getSection(Wt),ao=u.getCharCode(Wt);if(Cp[ao]||(no+=Zu(ao,oo,In,fr,Xe,_r)),Wt<u.length()-1){const Xe=!((io=ao)<11904)&&(!!qu["CJK Compatibility Forms"](io)||!!qu["CJK Compatibility"](io)||!!qu["CJK Strokes"](io)||!!qu["CJK Symbols and Punctuation"](io)||!!qu["Enclosed CJK Letters and Months"](io)||!!qu["Halfwidth and Fullwidth Forms"](io)||!!qu["Ideographic Description Characters"](io)||!!qu["Vertical Forms"](io)||id.test(String.fromCodePoint(io)));(Ep[ao]||Xe||oo.imageName||Wt!==u.length()-2&&Pp[u.getCharCode(Wt+1)])&&wr.push(Xu(Wt+1,no,Ar,wr,Ku(ao,u.getCharCode(Wt+1),Xe&&Kr),!1))}}var io;return Hu(Xu(u.length(),no,Ar,wr,0,!0))}function Ju(u){let Xe=.5,Wt=.5;switch(u){case"right":case"top-right":case"bottom-right":Xe=1;break;case"left":case"top-left":case"bottom-left":Xe=0}switch(u){case"bottom":case"bottom-right":case"bottom-left":Wt=1;break;case"top":case"top-right":case"top-left":Wt=0}return{horizontalAlign:Xe,verticalAlign:Wt}}function Wu(u,Xe,Wt,In,fr){if(!In&&!fr)return;const _r=u[Wt],wr=(u[Wt].x+_r.metrics.advance*_r.scale)*In;for(let In=Xe;In<=Wt;In++)u[In].x-=wr,u[In].y+=fr}function Qu(u,Xe,Wt){const{horizontalAlign:In,verticalAlign:fr}=Ju(Wt),_r=Xe[0]-u.displaySize[0]*In,wr=Xe[1]-u.displaySize[1]*fr;return{image:u,top:wr,bottom:wr+u.displaySize[1],left:_r,right:_r+u.displaySize[0]}}function tc(u){var Xe,Wt;let In=u.left,fr=u.top,_r=u.right-In,wr=u.bottom-fr;const Ar=null!==(Xe=u.image.textFitWidth)&&void 0!==Xe?Xe:"stretchOrShrink",Kr=null!==(Wt=u.image.textFitHeight)&&void 0!==Wt?Wt:"stretchOrShrink",no=(u.image.content[2]-u.image.content[0])/(u.image.content[3]-u.image.content[1]);if("proportional"===Kr){if("stretchOnly"===Ar&&_r/wr<no||"proportional"===Ar){const u=Math.ceil(wr*no);In*=u/_r,_r=u}}else if("proportional"===Ar&&"stretchOnly"===Kr&&0!==no&&_r/wr>no){const u=Math.ceil(_r/no);fr*=u/wr,wr=u}return{x1:In,y1:fr,x2:In+_r,y2:fr+wr}}function ec(u,Xe,Wt,In,fr,_r){const wr=u.image;let Ar;if(wr.content){const u=wr.content,Xe=wr.pixelRatio||1;Ar=[u[0]/Xe,u[1]/Xe,wr.displaySize[0]-u[2]/Xe,wr.displaySize[1]-u[3]/Xe]}const Kr=Xe.left*_r,no=Xe.right*_r;let io,oo,ao,so;"width"===Wt||"both"===Wt?(so=fr[0]+Kr-In[3],oo=fr[0]+no+In[1]):(so=fr[0]+(Kr+no-wr.displaySize[0])/2,oo=so+wr.displaySize[0]);const co=Xe.top*_r,ho=Xe.bottom*_r;return"height"===Wt||"both"===Wt?(io=fr[1]+co-In[0],ao=fr[1]+ho+In[2]):(io=fr[1]+(co+ho-wr.displaySize[1])/2,ao=io+wr.displaySize[1]),{image:wr,top:io,right:oo,bottom:ao,left:so,collisionPadding:Ar}}const Ip=255,Mp=128,Rp=Ip*Mp;function sc(u,Xe){const{expression:Wt}=Xe;if("constant"===Wt.kind)return{kind:"constant",layoutSize:Wt.evaluate(new Ui(u+1))};if("source"===Wt.kind)return{kind:"source"};{const{zoomStops:Xe,interpolationType:In}=Wt;let fr=0;for(;fr<Xe.length&&Xe[fr]<=u;)fr++;fr=Math.max(0,fr-1);let _r=fr;for(;_r<Xe.length&&Xe[_r]<u+1;)_r++;_r=Math.min(Xe.length-1,_r);const wr=Xe[fr],Ar=Xe[_r];return"composite"===Wt.kind?{kind:"composite",minZoom:wr,maxZoom:Ar,interpolationType:In}:{kind:"camera",minZoom:wr,maxZoom:Ar,minSize:Wt.evaluate(new Ui(wr)),maxSize:Wt.evaluate(new Ui(Ar)),interpolationType:In}}}function ac(u,Xe,Wt){let In="never";const fr=u.get(Xe);return fr?In=fr:u.get(Wt)&&(In="always"),In}const zp=Qd.VectorTileFeature.types,Op=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function uc(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao){const so=Ar?Math.min(Rp,Math.round(Ar[0])):0,co=Ar?Math.min(Rp,Math.round(Ar[1])):0;u.emplaceBack(Xe,Wt,Math.round(32*In),Math.round(32*fr),_r,wr,(so<<1)+(Kr?1:0),co,16*no,16*io,256*oo,256*ao)}function cc(u,Xe,Wt){u.emplaceBack(Xe.x,Xe.y,Wt),u.emplaceBack(Xe.x,Xe.y,Wt),u.emplaceBack(Xe.x,Xe.y,Wt),u.emplaceBack(Xe.x,Xe.y,Wt)}function hc(u){for(const Xe of u.sections)if(ji(Xe.text))return!0;return!1}class pc{constructor(u){this.layoutVertexArray=new Ws,this.indexArray=new na,this.programConfigurations=u,this.segments=new oa,this.dynamicLayoutVertexArray=new Qs,this.opacityVertexArray=new ta,this.hasVisibleVertices=!1,this.placedSymbolArray=new $s}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(u,Xe,Wt,In){this.isEmpty()||(Wt&&(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,cp.members),this.indexBuffer=u.createIndexBuffer(this.indexArray,Xe),this.dynamicLayoutVertexBuffer=u.createVertexBuffer(this.dynamicLayoutVertexArray,dp.members,!0),this.opacityVertexBuffer=u.createVertexBuffer(this.opacityVertexArray,Op,!0),this.opacityVertexBuffer.itemSize=1),(Wt||In)&&this.programConfigurations.upload(u))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}wi("SymbolBuffers",pc);class fc{constructor(u,Xe,Wt){this.layoutVertexArray=new u,this.layoutAttributes=Xe,this.indexArray=new Wt,this.segments=new oa,this.collisionVertexArray=new ra}upload(u){this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=u.createVertexBuffer(this.collisionVertexArray,hp.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}wi("CollisionBuffers",fc);class dc{constructor(Xe){this.collisionBoxArray=Xe.collisionBoxArray,this.zoom=Xe.zoom,this.overscaling=Xe.overscaling,this.layers=Xe.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=Xe.index,this.pixelRatio=Xe.pixelRatio,this.sourceLayerIndex=Xe.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=lo([]),this.placementViewportMatrix=lo([]);const Wt=this.layers[0]._unevaluatedLayout._values;this.textSizeData=sc(this.zoom,Wt["text-size"]),this.iconSizeData=sc(this.zoom,Wt["icon-size"]);const In=this.layers[0].layout,fr=In.get("symbol-sort-key"),_r=In.get("symbol-z-order");this.canOverlap="never"!==ac(In,"text-overlap","text-allow-overlap")||"never"!==ac(In,"icon-overlap","icon-allow-overlap")||In.get("text-ignore-placement")||In.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==_r&&!fr.isConstant(),this.sortFeaturesByY=("viewport-y"===_r||"auto"===_r&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===In.get("symbol-placement")&&(this.writingModes=In.get("text-writing-mode").map((Xe=>u.ah[Xe]))),this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id)),this.sourceID=Xe.sourceID}createArrays(){this.text=new pc(new Ea(this.layers,this.zoom,(u=>/^text/.test(u)))),this.icon=new pc(new Ea(this.layers,this.zoom,(u=>/^icon/.test(u)))),this.glyphOffsetArray=new Os,this.lineVertexArray=new js,this.symbolInstances=new Ds,this.textAnchorOffsets=new Us}calculateGlyphDependencies(u,Xe,Wt,In,fr){for(let _r=0;_r<u.length;_r++)if(Xe[u.charCodeAt(_r)]=!0,(Wt||In)&&fr){const Wt=mp[u.charAt(_r)];Wt&&(Xe[Wt.charCodeAt(0)]=!0)}}populate(Xe,Wt,In){const fr=this.layers[0],_r=fr.layout,wr=_r.get("text-font"),Ar=_r.get("text-field"),Kr=_r.get("icon-image"),no=("constant"!==Ar.value.kind||Ar.value.value instanceof Yt&&!Ar.value.value.isEmpty()||Ar.value.value.toString().length>0)&&("constant"!==wr.value.kind||wr.value.value.length>0),io="constant"!==Kr.value.kind||!!Kr.value.value||Object.keys(Kr.parameters).length>0,oo=_r.get("symbol-sort-key");if(this.features=[],!no&&!io)return;const ao=Wt.iconDependencies,so=Wt.glyphDependencies,co=Wt.availableImages,ho=new Ui(this.zoom);for(const{feature:Wt,id:Ar,index:Kr,sourceLayerIndex:go}of Xe){const Xe=fr._featureFilter.needGeometry,xo=ja(Wt,Xe);if(!fr._featureFilter.filter(ho,xo,In))continue;let ko,Co;if(Xe||(xo.geometry=Oa(Wt)),no){const u=fr.getValueAndResolveTokens("text-field",xo,In,co),Xe=Yt.factory(u),Wt=this.hasRTLText=this.hasRTLText||hc(Xe);(!Wt||"unavailable"===ld.getRTLTextPluginStatus()||Wt&&ld.isParsed())&&(ko=ru(Xe,fr,xo))}if(io){const u=fr.getValueAndResolveTokens("icon-image",xo,In,co);Co=u instanceof te?u:te.fromString(u)}if(!ko&&!Co)continue;const Io=this.sortFeaturesByKey?oo.evaluate(xo,{},In):void 0;if(this.features.push({id:Ar,text:ko,icon:Co,index:Kr,sourceLayerIndex:go,geometry:xo.geometry,properties:Wt.properties,type:zp[Wt.type],sortKey:Io}),Co&&(ao[Co.name]=!0),ko){const Xe=wr.evaluate(xo,{},In).join(","),Wt="viewport"!==_r.get("text-rotation-alignment")&&"point"!==_r.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(u.ah.vertical)>=0;for(const u of ko.sections)if(u.image)ao[u.image.name]=!0;else{const In=Pi(ko.toString()),fr=u.fontStack||Xe,_r=so[fr]=so[fr]||{};this.calculateGlyphDependencies(u.text,_r,Wt,this.allowVerticalPlacement,In)}}}"line"===_r.get("symbol-placement")&&(this.features=function(u){const Xe={},Wt={},In=[];let fr=0;function s(Xe){In.push(u[Xe]),fr++}function a(u,Xe,fr){const _r=Wt[u];return delete Wt[u],Wt[Xe]=_r,In[_r].geometry[0].pop(),In[_r].geometry[0]=In[_r].geometry[0].concat(fr[0]),_r}function o(u,Wt,fr){const _r=Xe[Wt];return delete Xe[Wt],Xe[u]=_r,In[_r].geometry[0].shift(),In[_r].geometry[0]=fr[0].concat(In[_r].geometry[0]),_r}function l(u,Xe,Wt){const In=Wt?Xe[0][Xe[0].length-1]:Xe[0][0];return`${u}:${In.x}:${In.y}`}for(let _r=0;_r<u.length;_r++){const wr=u[_r],Ar=wr.geometry,Kr=wr.text?wr.text.toString():null;if(!Kr){s(_r);continue}const no=l(Kr,Ar),io=l(Kr,Ar,!0);if(no in Wt&&io in Xe&&Wt[no]!==Xe[io]){const u=o(no,io,Ar),fr=a(no,io,In[u].geometry);delete Xe[no],delete Wt[io],Wt[l(Kr,In[fr].geometry,!0)]=fr,In[u].geometry=null}else no in Wt?a(no,io,Ar):io in Xe?o(no,io,Ar):(s(_r),Xe[no]=fr-1,Wt[io]=fr-1)}return In.filter((u=>u.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((u,Xe)=>u.sortKey-Xe.sortKey))}update(u,Xe,Wt){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(u,Xe,this.layers,Wt),this.icon.programConfigurations.updatePaintArrays(u,Xe,this.layers,Wt))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(u){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(u),this.iconCollisionBox.upload(u)),this.text.upload(u,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(u,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(u,Xe){const Wt=this.lineVertexArray.length;if(void 0!==u.segment){let Wt=u.dist(Xe[u.segment+1]),In=u.dist(Xe[u.segment]);const fr={};for(let In=u.segment+1;In<Xe.length;In++)fr[In]={x:Xe[In].x,y:Xe[In].y,tileUnitDistanceFromAnchor:Wt},In<Xe.length-1&&(Wt+=Xe[In+1].dist(Xe[In]));for(let Wt=u.segment||0;Wt>=0;Wt--)fr[Wt]={x:Xe[Wt].x,y:Xe[Wt].y,tileUnitDistanceFromAnchor:In},Wt>0&&(In+=Xe[Wt-1].dist(Xe[Wt]));for(let u=0;u<Xe.length;u++){const Xe=fr[u];this.lineVertexArray.emplaceBack(Xe.x,Xe.y,Xe.tileUnitDistanceFromAnchor)}}return{lineStartIndex:Wt,lineLength:this.lineVertexArray.length-Wt}}addSymbols(Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao){const so=Xe.indexArray,co=Xe.layoutVertexArray,ho=Xe.segments.prepareSegment(4*Wt.length,co,so,this.canOverlap?wr.sortKey:void 0),go=this.glyphOffsetArray.length,xo=ho.vertexLength,ko=this.allowVerticalPlacement&&Ar===u.ah.vertical?Math.PI/2:0,Co=wr.text&&wr.text.sections;for(let u=0;u<Wt.length;u++){const{tl:fr,tr:_r,bl:Ar,br:no,tex:io,pixelOffsetTL:oo,pixelOffsetBR:go,minFontScaleX:xo,minFontScaleY:Io,glyphOffset:zo,isSDF:Bo,sectionIndex:ca}=Wt[u],ua=ho.vertexLength,Da=zo[1];uc(co,Kr.x,Kr.y,fr.x,Da+fr.y,io.x,io.y,In,Bo,oo.x,oo.y,xo,Io),uc(co,Kr.x,Kr.y,_r.x,Da+_r.y,io.x+io.w,io.y,In,Bo,go.x,oo.y,xo,Io),uc(co,Kr.x,Kr.y,Ar.x,Da+Ar.y,io.x,io.y+io.h,In,Bo,oo.x,go.y,xo,Io),uc(co,Kr.x,Kr.y,no.x,Da+no.y,io.x+io.w,io.y+io.h,In,Bo,go.x,go.y,xo,Io),cc(Xe.dynamicLayoutVertexArray,Kr,ko),so.emplaceBack(ua,ua+1,ua+2),so.emplaceBack(ua+1,ua+2,ua+3),ho.vertexLength+=4,ho.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(zo[0]),u!==Wt.length-1&&ca===Wt[u+1].sectionIndex||Xe.programConfigurations.populatePaintArrays(co.length,wr,wr.index,{},ao,Co&&Co[ca])}Xe.placedSymbolArray.emplaceBack(Kr.x,Kr.y,go,this.glyphOffsetArray.length-go,xo,no,io,Kr.segment,In?In[0]:0,In?In[1]:0,fr[0],fr[1],Ar,0,!1,0,oo)}_addCollisionDebugVertex(u,Xe,Wt,In,fr,_r){return Xe.emplaceBack(0,0),u.emplaceBack(Wt.x,Wt.y,In,fr,Math.round(_r.x),Math.round(_r.y))}addCollisionDebugVertices(u,Xe,In,fr,_r,wr,Ar){const Kr=_r.segments.prepareSegment(4,_r.layoutVertexArray,_r.indexArray),no=Kr.vertexLength,io=_r.layoutVertexArray,oo=_r.collisionVertexArray,ao=Ar.anchorX,so=Ar.anchorY;this._addCollisionDebugVertex(io,oo,wr,ao,so,new Wt(u,Xe)),this._addCollisionDebugVertex(io,oo,wr,ao,so,new Wt(In,Xe)),this._addCollisionDebugVertex(io,oo,wr,ao,so,new Wt(In,fr)),this._addCollisionDebugVertex(io,oo,wr,ao,so,new Wt(u,fr)),Kr.vertexLength+=4;const co=_r.indexArray;co.emplaceBack(no,no+1),co.emplaceBack(no+1,no+2),co.emplaceBack(no+2,no+3),co.emplaceBack(no+3,no),Kr.primitiveLength+=4}addDebugCollisionBoxes(u,Xe,Wt,In){for(let fr=u;fr<Xe;fr++){const u=this.collisionBoxArray.get(fr);this.addCollisionDebugVertices(u.x1,u.y1,u.x2,u.y2,In?this.textCollisionBox:this.iconCollisionBox,u.anchorPoint,Wt)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new fc(ea,pp.members,ia),this.iconCollisionBox=new fc(ea,pp.members,ia);for(let u=0;u<this.symbolInstances.length;u++){const Xe=this.symbolInstances.get(u);this.addDebugCollisionBoxes(Xe.textBoxStartIndex,Xe.textBoxEndIndex,Xe,!0),this.addDebugCollisionBoxes(Xe.verticalTextBoxStartIndex,Xe.verticalTextBoxEndIndex,Xe,!0),this.addDebugCollisionBoxes(Xe.iconBoxStartIndex,Xe.iconBoxEndIndex,Xe,!1),this.addDebugCollisionBoxes(Xe.verticalIconBoxStartIndex,Xe.verticalIconBoxEndIndex,Xe,!1)}}_deserializeCollisionBoxesForSymbol(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){const no={};for(let In=Xe;In<Wt;In++){const Xe=u.get(In);no.textBox={x1:Xe.x1,y1:Xe.y1,x2:Xe.x2,y2:Xe.y2,anchorPointX:Xe.anchorPointX,anchorPointY:Xe.anchorPointY},no.textFeatureIndex=Xe.featureIndex;break}for(let Xe=In;Xe<fr;Xe++){const Wt=u.get(Xe);no.verticalTextBox={x1:Wt.x1,y1:Wt.y1,x2:Wt.x2,y2:Wt.y2,anchorPointX:Wt.anchorPointX,anchorPointY:Wt.anchorPointY},no.verticalTextFeatureIndex=Wt.featureIndex;break}for(let Xe=_r;Xe<wr;Xe++){const Wt=u.get(Xe);no.iconBox={x1:Wt.x1,y1:Wt.y1,x2:Wt.x2,y2:Wt.y2,anchorPointX:Wt.anchorPointX,anchorPointY:Wt.anchorPointY},no.iconFeatureIndex=Wt.featureIndex;break}for(let Xe=Ar;Xe<Kr;Xe++){const Wt=u.get(Xe);no.verticalIconBox={x1:Wt.x1,y1:Wt.y1,x2:Wt.x2,y2:Wt.y2,anchorPointX:Wt.anchorPointX,anchorPointY:Wt.anchorPointY},no.verticalIconFeatureIndex=Wt.featureIndex;break}return no}deserializeCollisionBoxes(u){this.collisionArrays=[];for(let Xe=0;Xe<this.symbolInstances.length;Xe++){const Wt=this.symbolInstances.get(Xe);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(u,Wt.textBoxStartIndex,Wt.textBoxEndIndex,Wt.verticalTextBoxStartIndex,Wt.verticalTextBoxEndIndex,Wt.iconBoxStartIndex,Wt.iconBoxEndIndex,Wt.verticalIconBoxStartIndex,Wt.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(u,Xe){const Wt=u.placedSymbolArray.get(Xe),In=Wt.vertexStartIndex+4*Wt.numGlyphs;for(let Xe=Wt.vertexStartIndex;Xe<In;Xe+=4)u.indexArray.emplaceBack(Xe,Xe+1,Xe+2),u.indexArray.emplaceBack(Xe+1,Xe+2,Xe+3)}getSortedSymbolIndexes(u){if(this.sortedAngle===u&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;const Xe=Math.sin(u),Wt=Math.cos(u),In=[],fr=[],_r=[];for(let u=0;u<this.symbolInstances.length;++u){_r.push(u);const wr=this.symbolInstances.get(u);In.push(0|Math.round(Xe*wr.anchorX+Wt*wr.anchorY)),fr.push(wr.featureIndex)}return _r.sort(((u,Xe)=>In[u]-In[Xe]||fr[Xe]-fr[u])),_r}addToSortKeyRanges(u,Xe){const Wt=this.sortKeyRanges[this.sortKeyRanges.length-1];Wt&&Wt.sortKey===Xe?Wt.symbolInstanceEnd=u+1:this.sortKeyRanges.push({sortKey:Xe,symbolInstanceStart:u,symbolInstanceEnd:u+1})}sortFeatures(u){if(this.sortFeaturesByY&&this.sortedAngle!==u&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(u),this.sortedAngle=u,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const u of this.symbolInstanceIndexes){const Xe=this.symbolInstances.get(u);this.featureSortOrder.push(Xe.featureIndex),[Xe.rightJustifiedTextSymbolIndex,Xe.centerJustifiedTextSymbolIndex,Xe.leftJustifiedTextSymbolIndex].forEach(((u,Xe,Wt)=>{u>=0&&Wt.indexOf(u)===Xe&&this.addIndicesForPlacedSymbol(this.text,u)})),Xe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Xe.verticalPlacedTextSymbolIndex),Xe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Xe.placedIconSymbolIndex),Xe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Xe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Lp,Dp;wi("SymbolBucket",dc,{omit:["layers","collisionBoxArray","features","compareText"]}),dc.MAX_GLYPHS=65535,dc.addDynamicAttributes=cc;var Fp={get paint(){return Dp=Dp||new rs({"icon-opacity":new Wi(xo.paint_symbol["icon-opacity"]),"icon-color":new Wi(xo.paint_symbol["icon-color"]),"icon-halo-color":new Wi(xo.paint_symbol["icon-halo-color"]),"icon-halo-width":new Wi(xo.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Wi(xo.paint_symbol["icon-halo-blur"]),"icon-translate":new Ji(xo.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ji(xo.paint_symbol["icon-translate-anchor"]),"text-opacity":new Wi(xo.paint_symbol["text-opacity"]),"text-color":new Wi(xo.paint_symbol["text-color"],{runtimeType:ca,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new Wi(xo.paint_symbol["text-halo-color"]),"text-halo-width":new Wi(xo.paint_symbol["text-halo-width"]),"text-halo-blur":new Wi(xo.paint_symbol["text-halo-blur"]),"text-translate":new Ji(xo.paint_symbol["text-translate"]),"text-translate-anchor":new Ji(xo.paint_symbol["text-translate-anchor"])})},get layout(){return Lp=Lp||new rs({"symbol-placement":new Ji(xo.layout_symbol["symbol-placement"]),"symbol-spacing":new Ji(xo.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ji(xo.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Wi(xo.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ji(xo.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ji(xo.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ji(xo.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ji(xo.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ji(xo.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ji(xo.layout_symbol["icon-rotation-alignment"]),"icon-size":new Wi(xo.layout_symbol["icon-size"]),"icon-text-fit":new Ji(xo.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ji(xo.layout_symbol["icon-text-fit-padding"]),"icon-image":new Wi(xo.layout_symbol["icon-image"]),"icon-rotate":new Wi(xo.layout_symbol["icon-rotate"]),"icon-padding":new Wi(xo.layout_symbol["icon-padding"]),"icon-keep-upright":new Ji(xo.layout_symbol["icon-keep-upright"]),"icon-offset":new Wi(xo.layout_symbol["icon-offset"]),"icon-anchor":new Wi(xo.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ji(xo.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ji(xo.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ji(xo.layout_symbol["text-rotation-alignment"]),"text-field":new Wi(xo.layout_symbol["text-field"]),"text-font":new Wi(xo.layout_symbol["text-font"]),"text-size":new Wi(xo.layout_symbol["text-size"]),"text-max-width":new Wi(xo.layout_symbol["text-max-width"]),"text-line-height":new Ji(xo.layout_symbol["text-line-height"]),"text-letter-spacing":new Wi(xo.layout_symbol["text-letter-spacing"]),"text-justify":new Wi(xo.layout_symbol["text-justify"]),"text-radial-offset":new Wi(xo.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ji(xo.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Wi(xo.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Wi(xo.layout_symbol["text-anchor"]),"text-max-angle":new Ji(xo.layout_symbol["text-max-angle"]),"text-writing-mode":new Ji(xo.layout_symbol["text-writing-mode"]),"text-rotate":new Wi(xo.layout_symbol["text-rotate"]),"text-padding":new Ji(xo.layout_symbol["text-padding"]),"text-keep-upright":new Ji(xo.layout_symbol["text-keep-upright"]),"text-transform":new Wi(xo.layout_symbol["text-transform"]),"text-offset":new Wi(xo.layout_symbol["text-offset"]),"text-allow-overlap":new Ji(xo.layout_symbol["text-allow-overlap"]),"text-overlap":new Ji(xo.layout_symbol["text-overlap"]),"text-ignore-placement":new Ji(xo.layout_symbol["text-ignore-placement"]),"text-optional":new Ji(xo.layout_symbol["text-optional"])})}};class xc{constructor(u){if(void 0===u.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=u.property.overrides?u.property.overrides.runtimeType:Co,this.defaultValue=u}evaluate(u){if(u.formattedSection){const Xe=this.defaultValue.property.overrides;if(Xe&&Xe.hasOverride(u.formattedSection))return Xe.getOverride(u.formattedSection)}return u.feature&&u.featureState?this.defaultValue.evaluate(u.feature,u.featureState):this.defaultValue.property.specification.default}eachChild(u){this.defaultValue.isConstant()||u(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}wi("FormatSectionOverride",xc,{omit:["defaultValue"]});class vc extends is{constructor(u){super(u,Fp)}recalculate(u,Xe){if(super.recalculate(u,Xe),"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"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){const u=this.layout.get("text-writing-mode");if(u){const Xe=[];for(const Wt of u)Xe.indexOf(Wt)<0&&Xe.push(Wt);this.layout._values["text-writing-mode"]=Xe}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(u,Xe,Wt,In){const fr=this.layout.get(u).evaluate(Xe,{},Wt,In),_r=this._unevaluatedLayout._values[u];return _r.isDataDriven()||vn(_r.value)||!fr?fr:function(u,Xe){return Xe.replace(/{([^{}]+)}/g,((Xe,Wt)=>u&&Wt in u?String(u[Wt]):""))}(Xe.properties,fr)}createBucket(u){return new dc(u)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const u of Fp.paint.overridableProperties){if(!vc.hasPaintOverride(this.layout,u))continue;const Xe=this.paint.get(u),Wt=new xc(Xe),In=new xn(Wt,Xe.property.specification);let fr=null;fr="constant"===Xe.value.kind||"source"===Xe.value.kind?new wn("source",In):new _n("composite",In,Xe.value.zoomStops),this.paint._values[u]=new Hi(Xe.property,fr,Xe.parameters)}}_handleOverridablePaintPropertyUpdate(u,Xe,Wt){return!(!this.layout||Xe.isDataDriven()||Wt.isDataDriven())&&vc.hasPaintOverride(this.layout,u)}static hasPaintOverride(u,Xe){const Wt=u.get("text-field"),In=Fp.paint.properties[Xe];let fr=!1;const s=u=>{for(const Xe of u)if(In.overrides&&In.overrides.hasOverride(Xe))return void(fr=!0)};if("constant"===Wt.value.kind&&Wt.value.value instanceof Yt)s(Wt.value.value.sections);else if("source"===Wt.value.kind){const t=u=>{fr||(u instanceof se&&ne(u.value)===yl?s(u.value.sections):u instanceof Ze?s(u.sections):u.eachChild(t))},u=Wt.value;u._styleExpression&&t(u._styleExpression.expression)}return fr}}let Bp;var jp={get paint(){return Bp=Bp||new rs({"background-color":new Ji(xo.paint_background["background-color"]),"background-pattern":new ts(xo.paint_background["background-pattern"]),"background-opacity":new Ji(xo.paint_background["background-opacity"])})}};class _c extends is{constructor(u){super(u,jp)}}let Np;var Vp={get paint(){return Np=Np||new rs({"raster-opacity":new Ji(xo.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ji(xo.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ji(xo.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ji(xo.paint_raster["raster-brightness-max"]),"raster-saturation":new Ji(xo.paint_raster["raster-saturation"]),"raster-contrast":new Ji(xo.paint_raster["raster-contrast"]),"raster-resampling":new Ji(xo.paint_raster["raster-resampling"]),"raster-fade-duration":new Ji(xo.paint_raster["raster-fade-duration"])})}};class kc extends is{constructor(u){super(u,Vp)}}class Mc extends is{constructor(u){super(u,{}),this.onAdd=u=>{this.implementation.onAdd&&this.implementation.onAdd(u,u.painter.context.gl)},this.onRemove=u=>{this.implementation.onRemove&&this.implementation.onRemove(u,u.painter.context.gl)},this.implementation=u}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Ic{constructor(u){this._methodToThrottle=u,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle()}),0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const Up=6371008.8;class Pc{constructor(u,Xe){if(isNaN(u)||isNaN(Xe))throw new Error(`Invalid LngLat object: (${u}, ${Xe})`);if(this.lng=+u,this.lat=+Xe,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Pc(m(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(u){const Xe=Math.PI/180,Wt=this.lat*Xe,In=u.lat*Xe,fr=Math.sin(Wt)*Math.sin(In)+Math.cos(Wt)*Math.cos(In)*Math.cos((u.lng-this.lng)*Xe);return Up*Math.acos(Math.min(fr,1))}static convert(u){if(u instanceof Pc)return u;if(Array.isArray(u)&&(2===u.length||3===u.length))return new Pc(Number(u[0]),Number(u[1]));if(!Array.isArray(u)&&"object"==typeof u&&null!==u)return new Pc(Number("lng"in u?u.lng:u.lon),Number(u.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const $p=2*Math.PI*Up;function Bc(u){return $p*Math.cos(u*Math.PI/180)}function Vc(u){return(180+u)/360}function Ec(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function Fc(u,Xe){return u/Bc(Xe)}function Tc(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}class $c{constructor(u,Xe,Wt=0){this.x=+u,this.y=+Xe,this.z=+Wt}static fromLngLat(u,Xe=0){const Wt=Pc.convert(u);return new $c(Vc(Wt.lng),Ec(Wt.lat),Fc(Xe,Wt.lat))}toLngLat(){return new Pc(360*this.x-180,Tc(this.y))}toAltitude(){return this.z*Bc(Tc(this.y))}meterInMercatorCoordinateUnits(){return 1/$p*(u=Tc(this.y),1/Math.cos(u*Math.PI/180));var u}}function Lc(u,Xe,Wt){var In=2*Math.PI*6378137/256/Math.pow(2,Wt);return[u*In-2*Math.PI*6378137/2,Xe*In-2*Math.PI*6378137/2]}class Dc{constructor(u,Xe,Wt){if(!function(u,Xe,Wt){return!(u<0||u>25||Wt<0||Wt>=Math.pow(2,u)||Xe<0||Xe>=Math.pow(2,u))}(u,Xe,Wt))throw new Error(`x=${Xe}, y=${Wt}, z=${u} outside of bounds. 0<=x<${Math.pow(2,u)}, 0<=y<${Math.pow(2,u)} 0<=z<=25 `);this.z=u,this.x=Xe,this.y=Wt,this.key=Rc(0,u,u,Xe,Wt)}equals(u){return this.z===u.z&&this.x===u.x&&this.y===u.y}url(u,Xe,Wt){const In=(_r=this.y,wr=this.z,Ar=Lc(256*(fr=this.x),256*(_r=Math.pow(2,wr)-_r-1),wr),Kr=Lc(256*(fr+1),256*(_r+1),wr),Ar[0]+","+Ar[1]+","+Kr[0]+","+Kr[1]);var fr,_r,wr,Ar,Kr;const no=function(u,Xe,Wt){let In,fr="";for(let _r=u;_r>0;_r--)In=1<<_r-1,fr+=(Xe&In?1:0)+(Wt&In?2:0);return fr}(this.z,this.x,this.y);return u[(this.x+this.y)%u.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String("tms"===Wt?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,Xe>1?"@2x":"").replace(/{quadkey}/g,no).replace(/{bbox-epsg-3857}/g,In)}isChildOf(u){const Xe=this.z-u.z;return Xe>0&&u.x===this.x>>Xe&&u.y===this.y>>Xe}getTilePoint(u){const Xe=Math.pow(2,this.z);return new Wt((u.x*Xe-this.x)*Td,(u.y*Xe-this.y)*Td)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Oc{constructor(u,Xe){this.wrap=u,this.canonical=Xe,this.key=Rc(u,Xe.z,Xe.z,Xe.x,Xe.y)}}class jc{constructor(u,Xe,Wt,In,fr){if(u<Wt)throw new Error(`overscaledZ should be >= z; overscaledZ = ${u}; z = ${Wt}`);this.overscaledZ=u,this.wrap=Xe,this.canonical=new Dc(Wt,+In,+fr),this.key=Rc(Xe,u,Wt,In,fr)}clone(){return new jc(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(u){return this.overscaledZ===u.overscaledZ&&this.wrap===u.wrap&&this.canonical.equals(u.canonical)}scaledTo(u){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const Xe=this.canonical.z-u;return u>this.canonical.z?new jc(u,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new jc(u,this.wrap,u,this.canonical.x>>Xe,this.canonical.y>>Xe)}calculateScaledKey(u,Xe){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const Wt=this.canonical.z-u;return u>this.canonical.z?Rc(this.wrap*+Xe,u,this.canonical.z,this.canonical.x,this.canonical.y):Rc(this.wrap*+Xe,u,u,this.canonical.x>>Wt,this.canonical.y>>Wt)}isChildOf(u){if(u.wrap!==this.wrap)return!1;const Xe=this.canonical.z-u.canonical.z;return 0===u.overscaledZ||u.overscaledZ<this.overscaledZ&&u.canonical.x===this.canonical.x>>Xe&&u.canonical.y===this.canonical.y>>Xe}children(u){if(this.overscaledZ>=u)return[new jc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const Xe=this.canonical.z+1,Wt=2*this.canonical.x,In=2*this.canonical.y;return[new jc(Xe,this.wrap,Xe,Wt,In),new jc(Xe,this.wrap,Xe,Wt+1,In),new jc(Xe,this.wrap,Xe,Wt,In+1),new jc(Xe,this.wrap,Xe,Wt+1,In+1)]}isLessThan(u){return this.wrap<u.wrap||!(this.wrap>u.wrap)&&(this.overscaledZ<u.overscaledZ||!(this.overscaledZ>u.overscaledZ)&&(this.canonical.x<u.canonical.x||!(this.canonical.x>u.canonical.x)&&this.canonical.y<u.canonical.y))}wrapped(){return new jc(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(u){return new jc(this.overscaledZ,u,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Oc(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(u){return this.canonical.getTilePoint(new $c(u.x-this.wrap,u.y))}}function Rc(u,Xe,Wt,In,fr){(u*=2)<0&&(u=-1*u-1);const _r=1<<Wt;return(_r*_r*u+_r*fr+In).toString(36)+Wt.toString(36)+Xe.toString(36)}wi("CanonicalTileID",Dc),wi("OverscaledTileID",jc,{omit:["posMatrix"]});class Uc{constructor(u,Xe,Wt,In=1,fr=1,_r=1,wr=0){if(this.uid=u,Xe.height!==Xe.width)throw new RangeError("DEM tiles must be square");if(Wt&&!["mapbox","terrarium","custom"].includes(Wt))return void A(`"${Wt}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=Xe.height;const Ar=this.dim=Xe.height-2;switch(this.data=new Uint32Array(Xe.data.buffer),Wt){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=In,this.greenFactor=fr,this.blueFactor=_r,this.baseShift=wr;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let u=0;u<Ar;u++)this.data[this._idx(-1,u)]=this.data[this._idx(0,u)],this.data[this._idx(Ar,u)]=this.data[this._idx(Ar-1,u)],this.data[this._idx(u,-1)]=this.data[this._idx(u,0)],this.data[this._idx(u,Ar)]=this.data[this._idx(u,Ar-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(Ar,-1)]=this.data[this._idx(Ar-1,0)],this.data[this._idx(-1,Ar)]=this.data[this._idx(0,Ar-1)],this.data[this._idx(Ar,Ar)]=this.data[this._idx(Ar-1,Ar-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let u=0;u<Ar;u++)for(let Xe=0;Xe<Ar;Xe++){const Wt=this.get(u,Xe);Wt>this.max&&(this.max=Wt),Wt<this.min&&(this.min=Wt)}}get(u,Xe){const Wt=new Uint8Array(this.data.buffer),In=4*this._idx(u,Xe);return this.unpack(Wt[In],Wt[In+1],Wt[In+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(u,Xe){if(u<-1||u>=this.dim+1||Xe<-1||Xe>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(Xe+1)*this.stride+(u+1)}unpack(u,Xe,Wt){return u*this.redFactor+Xe*this.greenFactor+Wt*this.blueFactor-this.baseShift}getPixels(){return new Ao({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(u,Xe,Wt){if(this.dim!==u.dim)throw new Error("dem dimension mismatch");let In=Xe*this.dim,fr=Xe*this.dim+this.dim,_r=Wt*this.dim,wr=Wt*this.dim+this.dim;switch(Xe){case-1:In=fr-1;break;case 1:fr=In+1}switch(Wt){case-1:_r=wr-1;break;case 1:wr=_r+1}const Ar=-Xe*this.dim,Kr=-Wt*this.dim;for(let Xe=_r;Xe<wr;Xe++)for(let Wt=In;Wt<fr;Wt++)this.data[this._idx(Wt,Xe)]=u.data[this._idx(Wt+Ar,Xe+Kr)]}}wi("DEMData",Uc);class qc{constructor(u){this._stringToNumber={},this._numberToString=[];for(let Xe=0;Xe<u.length;Xe++){const Wt=u[Xe];this._stringToNumber[Wt]=Xe,this._numberToString[Xe]=Wt}}encode(u){return this._stringToNumber[u]}decode(u){if(u>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${u} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[u]}}class Nc{constructor(u,Xe,Wt,In,fr){this.type="Feature",this._vectorTileFeature=u,u._z=Xe,u._x=Wt,u._y=In,this.properties=u.properties,this.id=fr}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(u){this._geometry=u}toJSON(){const u={geometry:this.geometry};for(const Xe in this)"_geometry"!==Xe&&"_vectorTileFeature"!==Xe&&(u[Xe]=this[Xe]);return u}}class Zc{constructor(u,Xe){this.tileID=u,this.x=u.canonical.x,this.y=u.canonical.y,this.z=u.canonical.z,this.grid=new vi(Td,16,0),this.grid3D=new vi(Td,16,0),this.featureIndexArray=new Ns,this.promoteId=Xe}insert(u,Xe,Wt,In,fr,_r){const wr=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(Wt,In,fr);const Ar=_r?this.grid3D:this.grid;for(let u=0;u<Xe.length;u++){const Wt=Xe[u],In=[1/0,1/0,-1/0,-1/0];for(let u=0;u<Wt.length;u++){const Xe=Wt[u];In[0]=Math.min(In[0],Xe.x),In[1]=Math.min(In[1],Xe.y),In[2]=Math.max(In[2],Xe.x),In[3]=Math.max(In[3],Xe.y)}In[0]<Td&&In[1]<Td&&In[2]>=0&&In[3]>=0&&Ar.insert(wr,In[0],In[1],In[2],In[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Qd.VectorTile(new xp(this.rawTileData)).layers,this.sourceLayerCoder=new qc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(u,Xe,In,fr){this.loadVTLayers();const _r=u.params||{},wr=Td/u.tileSize/u.scale,Ar=zn(_r.filter),Kr=u.queryGeometry,no=u.queryPadding*wr,io=Kc(Kr),oo=this.grid.query(io.minX-no,io.minY-no,io.maxX+no,io.maxY+no),ao=Kc(u.cameraQueryGeometry),so=this.grid3D.query(ao.minX-no,ao.minY-no,ao.maxX+no,ao.maxY+no,((Xe,In,fr,_r)=>function(u,Xe,In,fr,_r){for(const Wt of u)if(Xe<=Wt.x&&In<=Wt.y&&fr>=Wt.x&&_r>=Wt.y)return!0;const wr=[new Wt(Xe,In),new Wt(Xe,_r),new Wt(fr,_r),new Wt(fr,In)];if(u.length>2)for(const Xe of wr)if(Wa(u,Xe))return!0;for(let Xe=0;Xe<u.length-1;Xe++)if(Qa(u[Xe],u[Xe+1],wr))return!0;return!1}(u.cameraQueryGeometry,Xe-no,In-no,fr+no,_r+no)));for(const u of so)oo.push(u);oo.sort(Xc);const co={};let ho;for(let Wt=0;Wt<oo.length;Wt++){const no=oo[Wt];if(no===ho)continue;ho=no;const io=this.featureIndexArray.get(no);let ao=null;this.loadMatchingFeature(co,io.bucketIndex,io.sourceLayerIndex,io.featureIndex,Ar,_r.layers,_r.availableImages,Xe,In,fr,((Xe,Wt,In)=>(ao||(ao=Oa(Xe)),Wt.queryIntersectsFeature(Kr,Xe,In,ao,this.z,u.transform,wr,u.pixelPosMatrix))))}return co}loadMatchingFeature(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io){const oo=this.bucketLayerIDs[Xe];if(_r&&!function(u,Xe){for(let Wt=0;Wt<u.length;Wt++)if(Xe.indexOf(u[Wt])>=0)return!0;return!1}(_r,oo))return;const ao=this.sourceLayerCoder.decode(Wt),so=this.vtLayers[ao].feature(In);if(fr.needGeometry){const u=ja(so,!0);if(!fr.filter(new Ui(this.tileID.overscaledZ),u,this.tileID.canonical))return}else if(!fr.filter(new Ui(this.tileID.overscaledZ),so))return;const co=this.getId(so,ao);for(let Xe=0;Xe<oo.length;Xe++){const Wt=oo[Xe];if(_r&&_r.indexOf(Wt)<0)continue;const fr=Ar[Wt];if(!fr)continue;let ao={};co&&no&&(ao=no.getState(fr.sourceLayer||"_geojsonTileLayer",co));const ho=g({},Kr[Wt]);ho.paint=Gc(ho.paint,fr.paint,so,ao,wr),ho.layout=Gc(ho.layout,fr.layout,so,ao,wr);const go=!io||io(so,fr,ao);if(!go)continue;const xo=new Nc(so,this.z,this.x,this.y,co);xo.layer=ho;let ko=u[Wt];void 0===ko&&(ko=u[Wt]=[]),ko.push({featureIndex:In,feature:xo,intersectionZ:go})}}lookupSymbolFeatures(u,Xe,Wt,In,fr,_r,wr,Ar){const Kr={};this.loadVTLayers();const no=zn(fr);for(const fr of u)this.loadMatchingFeature(Kr,Wt,In,fr,no,_r,wr,Ar,Xe);return Kr}hasLayer(u){for(const Xe of this.bucketLayerIDs)for(const Wt of Xe)if(u===Wt)return!0;return!1}getId(u,Xe){let Wt=u.id;return this.promoteId&&(Wt=u.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[Xe]],"boolean"==typeof Wt&&(Wt=Number(Wt))),Wt}}function Gc(u,Xe,Wt,In,fr){return v(u,((u,_r)=>{const wr=Xe instanceof Yi?Xe.get(_r):null;return wr&&wr.evaluate?wr.evaluate(Wt,In,fr):wr}))}function Kc(u){let Xe=1/0,Wt=1/0,In=-1/0,fr=-1/0;for(const _r of u)Xe=Math.min(Xe,_r.x),Wt=Math.min(Wt,_r.y),In=Math.max(In,_r.x),fr=Math.max(fr,_r.y);return{minX:Xe,minY:Wt,maxX:In,maxY:fr}}function Xc(u,Xe){return Xe-u}function Hc(u,Xe,In,fr,_r){const wr=[];for(let Ar=0;Ar<u.length;Ar++){const Kr=u[Ar];let no;for(let u=0;u<Kr.length-1;u++){let Ar=Kr[u],io=Kr[u+1];Ar.x<Xe&&io.x<Xe||(Ar.x<Xe?Ar=new Wt(Xe,Ar.y+(Xe-Ar.x)/(io.x-Ar.x)*(io.y-Ar.y))._round():io.x<Xe&&(io=new Wt(Xe,Ar.y+(Xe-Ar.x)/(io.x-Ar.x)*(io.y-Ar.y))._round()),Ar.y<In&&io.y<In||(Ar.y<In?Ar=new Wt(Ar.x+(In-Ar.y)/(io.y-Ar.y)*(io.x-Ar.x),In)._round():io.y<In&&(io=new Wt(Ar.x+(In-Ar.y)/(io.y-Ar.y)*(io.x-Ar.x),In)._round()),Ar.x>=fr&&io.x>=fr||(Ar.x>=fr?Ar=new Wt(fr,Ar.y+(fr-Ar.x)/(io.x-Ar.x)*(io.y-Ar.y))._round():io.x>=fr&&(io=new Wt(fr,Ar.y+(fr-Ar.x)/(io.x-Ar.x)*(io.y-Ar.y))._round()),Ar.y>=_r&&io.y>=_r||(Ar.y>=_r?Ar=new Wt(Ar.x+(_r-Ar.y)/(io.y-Ar.y)*(io.x-Ar.x),_r)._round():io.y>=_r&&(io=new Wt(Ar.x+(_r-Ar.y)/(io.y-Ar.y)*(io.x-Ar.x),_r)._round()),no&&Ar.equals(no[no.length-1])||(no=[Ar],wr.push(no)),no.push(io)))))}}return wr}wi("FeatureIndex",Zc,{omit:["rawTileData","sourceLayerCoder"]});class Yc extends Wt{constructor(u,Xe,Wt,In){super(u,Xe),this.angle=Wt,void 0!==In&&(this.segment=In)}clone(){return new Yc(this.x,this.y,this.angle,this.segment)}}function Jc(u,Xe,Wt,In,fr){if(void 0===Xe.segment||0===Wt)return!0;let _r=Xe,wr=Xe.segment+1,Ar=0;for(;Ar>-Wt/2;){if(wr--,wr<0)return!1;Ar-=u[wr].dist(_r),_r=u[wr]}Ar+=u[wr].dist(u[wr+1]),wr++;const Kr=[];let no=0;for(;Ar<Wt/2;){const Xe=u[wr],Wt=u[wr+1];if(!Wt)return!1;let _r=u[wr-1].angleTo(Xe)-Xe.angleTo(Wt);for(_r=Math.abs((_r+3*Math.PI)%(2*Math.PI)-Math.PI),Kr.push({distance:Ar,angleDelta:_r}),no+=_r;Ar-Kr[0].distance>In;)no-=Kr.shift().angleDelta;if(no>fr)return!1;wr++,Ar+=Xe.dist(Wt)}return!0}function Wc(u){let Xe=0;for(let Wt=0;Wt<u.length-1;Wt++)Xe+=u[Wt].dist(u[Wt+1]);return Xe}function Qc(u,Xe,Wt){return u?.6*Xe*Wt:0}function th(u,Xe){return Math.max(u?u.right-u.left:0,Xe?Xe.right-Xe.left:0)}function eh(u,Xe,Wt,In,fr,_r){const wr=Qc(Wt,fr,_r),Ar=th(Wt,In)*_r;let Kr=0;const no=Wc(u)/2;for(let Wt=0;Wt<u.length-1;Wt++){const In=u[Wt],fr=u[Wt+1],_r=In.dist(fr);if(Kr+_r>no){const io=(no-Kr)/_r,oo=rc.number(In.x,fr.x,io),ao=rc.number(In.y,fr.y,io),so=new Yc(oo,ao,fr.angleTo(In),Wt);return so._round(),!wr||Jc(u,so,Ar,wr,Xe)?so:void 0}Kr+=_r}}function rh(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){const no=Qc(In,_r,wr),io=th(In,fr),oo=io*wr,ao=0===u[0].x||u[0].x===Kr||0===u[0].y||u[0].y===Kr;return Xe-oo<Xe/4&&(Xe=oo+Xe/4),nh(u,ao?Xe/2*Ar%Xe:(io/2+2*_r)*wr*Ar%Xe,Xe,no,Wt,oo,ao,!1,Kr)}function nh(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){const no=_r/2,io=Wc(u);let oo=0,ao=Xe-Wt,so=[];for(let Xe=0;Xe<u.length-1;Xe++){const wr=u[Xe],Ar=u[Xe+1],co=wr.dist(Ar),ho=Ar.angleTo(wr);for(;ao+Wt<oo+co;){ao+=Wt;const go=(ao-oo)/co,xo=rc.number(wr.x,Ar.x,go),ko=rc.number(wr.y,Ar.y,go);if(xo>=0&&xo<Kr&&ko>=0&&ko<Kr&&ao-no>=0&&ao+no<=io){const Wt=new Yc(xo,ko,ho,Xe);Wt._round(),In&&!Jc(u,Wt,_r,In,fr)||so.push(Wt)}}oo+=co}return Ar||so.length||wr||(so=nh(u,oo/2,Wt,In,fr,_r,wr,!0,Kr)),so}wi("Anchor",Yc);const Wp=kp;function sh(u,Xe,In,fr){const _r=[],wr=u.image,Ar=wr.pixelRatio,Kr=wr.paddedRect.w-2*Wp,no=wr.paddedRect.h-2*Wp;let io={x1:u.left,y1:u.top,x2:u.right,y2:u.bottom};const oo=wr.stretchX||[[0,Kr]],ao=wr.stretchY||[[0,no]],f=(u,Xe)=>u+Xe[1]-Xe[0],so=oo.reduce(f,0),co=ao.reduce(f,0),ho=Kr-so,go=no-co;let xo=0,ko=so,Co=0,Io=co,zo=0,Bo=ho,ca=0,ua=go;if(wr.content&&fr){const Xe=wr.content,Wt=Xe[2]-Xe[0],In=Xe[3]-Xe[1];(wr.textFitWidth||wr.textFitHeight)&&(io=tc(u)),xo=ah(oo,0,Xe[0]),Co=ah(ao,0,Xe[1]),ko=ah(oo,Xe[0],Xe[2]),Io=ah(ao,Xe[1],Xe[3]),zo=Xe[0]-xo,ca=Xe[1]-Co,Bo=Wt-ko,ua=In-Io}const Da=io.x1,ns=io.y1,yl=io.x2-Da,vl=io.y2-ns,C=(u,fr,_r,Kr)=>{const no=lh(u.stretch-xo,ko,yl,Da),io=uh(u.fixed-zo,Bo,u.stretch,so),oo=lh(fr.stretch-Co,Io,vl,ns),ao=uh(fr.fixed-ca,ua,fr.stretch,co),ho=lh(_r.stretch-xo,ko,yl,Da),go=uh(_r.fixed-zo,Bo,_r.stretch,so),kl=lh(Kr.stretch-Co,Io,vl,ns),Al=uh(Kr.fixed-ca,ua,Kr.stretch,co),Ml=new Wt(no,oo),Rl=new Wt(ho,oo),Ol=new Wt(ho,kl),Ll=new Wt(no,kl),Dl=new Wt(io/Ar,ao/Ar),Bl=new Wt(go/Ar,Al/Ar),Nl=Xe*Math.PI/180;if(Nl){const u=Math.sin(Nl),Xe=Math.cos(Nl),Wt=[Xe,-u,u,Xe];Ml._matMult(Wt),Rl._matMult(Wt),Ll._matMult(Wt),Ol._matMult(Wt)}const Vl=u.stretch+u.fixed,Ul=fr.stretch+fr.fixed;return{tl:Ml,tr:Rl,bl:Ll,br:Ol,tex:{x:wr.paddedRect.x+Wp+Vl,y:wr.paddedRect.y+Wp+Ul,w:_r.stretch+_r.fixed-Vl,h:Kr.stretch+Kr.fixed-Ul},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Dl,pixelOffsetBR:Bl,minFontScaleX:Bo/Ar/yl,minFontScaleY:ua/Ar/vl,isSDF:In}};if(fr&&(wr.stretchX||wr.stretchY)){const u=oh(oo,ho,so),Xe=oh(ao,go,co);for(let Wt=0;Wt<u.length-1;Wt++){const In=u[Wt],fr=u[Wt+1];for(let u=0;u<Xe.length-1;u++)_r.push(C(In,Xe[u],fr,Xe[u+1]))}}else _r.push(C({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Kr+1},{fixed:0,stretch:no+1}));return _r}function ah(u,Xe,Wt){let In=0;for(const fr of u)In+=Math.max(Xe,Math.min(Wt,fr[1]))-Math.max(Xe,Math.min(Wt,fr[0]));return In}function oh(u,Xe,Wt){const In=[{fixed:-Wp,stretch:0}];for(const[Xe,Wt]of u){const u=In[In.length-1];In.push({fixed:Xe-u.stretch,stretch:u.stretch}),In.push({fixed:Xe-u.stretch,stretch:u.stretch+(Wt-Xe)})}return In.push({fixed:Xe+Wp,stretch:Wt}),In}function lh(u,Xe,Wt,In){return u/Xe*Wt+In}function uh(u,Xe,Wt,In){return u-Xe*Wt/In}class ch{constructor(u,Xe,In,fr,_r,wr,Ar,Kr,no,io){var oo;if(this.boxStartIndex=u.length,no){let u=wr.top,Xe=wr.bottom;const Wt=wr.collisionPadding;Wt&&(u-=Wt[1],Xe+=Wt[3]);let In=Xe-u;In>0&&(In=Math.max(10,In),this.circleDiameter=In)}else{const no=(null===(oo=wr.image)||void 0===oo?void 0:oo.content)&&(wr.image.textFitWidth||wr.image.textFitHeight)?tc(wr):{x1:wr.left,y1:wr.top,x2:wr.right,y2:wr.bottom};no.y1=no.y1*Ar-Kr[0],no.y2=no.y2*Ar+Kr[2],no.x1=no.x1*Ar-Kr[3],no.x2=no.x2*Ar+Kr[1];const ao=wr.collisionPadding;if(ao&&(no.x1-=ao[0]*Ar,no.y1-=ao[1]*Ar,no.x2+=ao[2]*Ar,no.y2+=ao[3]*Ar),io){const u=new Wt(no.x1,no.y1),Xe=new Wt(no.x2,no.y1),In=new Wt(no.x1,no.y2),fr=new Wt(no.x2,no.y2),_r=io*Math.PI/180;u._rotate(_r),Xe._rotate(_r),In._rotate(_r),fr._rotate(_r),no.x1=Math.min(u.x,Xe.x,In.x,fr.x),no.x2=Math.max(u.x,Xe.x,In.x,fr.x),no.y1=Math.min(u.y,Xe.y,In.y,fr.y),no.y2=Math.max(u.y,Xe.y,In.y,fr.y)}u.emplaceBack(Xe.x,Xe.y,no.x1,no.y1,no.x2,no.y2,In,fr,_r)}this.boxEndIndex=u.length}}class hh{constructor(u=[],Xe=(u,Xe)=>u<Xe?-1:u>Xe?1:0){if(this.data=u,this.length=this.data.length,this.compare=Xe,this.length>0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(0===this.length)return;const u=this.data[0],Xe=this.data.pop();return--this.length>0&&(this.data[0]=Xe,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:Xe,compare:Wt}=this,In=Xe[u];for(;u>0;){const fr=u-1>>1,_r=Xe[fr];if(Wt(In,_r)>=0)break;Xe[u]=_r,u=fr}Xe[u]=In}_down(u){const{data:Xe,compare:Wt}=this,In=this.length>>1,fr=Xe[u];for(;u<In;){let In=1+(u<<1);const _r=In+1;if(_r<this.length&&Wt(Xe[_r],Xe[In])<0&&(In=_r),Wt(Xe[In],fr)>=0)break;Xe[u]=Xe[In],u=In}Xe[u]=fr}}function ph(u,Xe=1,In=!1){let fr=1/0,_r=1/0,wr=-1/0,Ar=-1/0;const Kr=u[0];for(let u=0;u<Kr.length;u++){const Xe=Kr[u];(!u||Xe.x<fr)&&(fr=Xe.x),(!u||Xe.y<_r)&&(_r=Xe.y),(!u||Xe.x>wr)&&(wr=Xe.x),(!u||Xe.y>Ar)&&(Ar=Xe.y)}const no=Math.min(wr-fr,Ar-_r);let io=no/2;const oo=new hh([],fh);if(0===no)return new Wt(fr,_r);for(let Xe=fr;Xe<wr;Xe+=no)for(let Wt=_r;Wt<Ar;Wt+=no)oo.push(new dh(Xe+io,Wt+io,io,u));let ao=function(u){let Xe=0,Wt=0,In=0;const fr=u[0];for(let u=0,_r=fr.length,wr=_r-1;u<_r;wr=u++){const _r=fr[u],Ar=fr[wr],Kr=_r.x*Ar.y-Ar.x*_r.y;Wt+=(_r.x+Ar.x)*Kr,In+=(_r.y+Ar.y)*Kr,Xe+=3*Kr}return new dh(Wt/Xe,In/Xe,0,u)}(u),so=oo.length;for(;oo.length;){const Wt=oo.pop();(Wt.d>ao.d||!ao.d)&&(ao=Wt,In&&console.log("found best %d after %d probes",Math.round(1e4*Wt.d)/1e4,so)),Wt.max-ao.d<=Xe||(io=Wt.h/2,oo.push(new dh(Wt.p.x-io,Wt.p.y-io,io,u)),oo.push(new dh(Wt.p.x+io,Wt.p.y-io,io,u)),oo.push(new dh(Wt.p.x-io,Wt.p.y+io,io,u)),oo.push(new dh(Wt.p.x+io,Wt.p.y+io,io,u)),so+=4)}return In&&(console.log(`num probes: ${so}`),console.log(`best distance: ${ao.d}`)),ao.p}function fh(u,Xe){return Xe.max-u.max}function dh(u,Xe,In,fr){this.p=new Wt(u,Xe),this.h=In,this.d=function(u,Xe){let Wt=!1,In=1/0;for(let fr=0;fr<Xe.length;fr++){const _r=Xe[fr];for(let Xe=0,fr=_r.length,wr=fr-1;Xe<fr;wr=Xe++){const fr=_r[Xe],Ar=_r[wr];fr.y>u.y!=Ar.y>u.y&&u.x<(Ar.x-fr.x)*(u.y-fr.y)/(Ar.y-fr.y)+fr.x&&(Wt=!Wt),In=Math.min(In,Ya(u,fr,Ar))}}return(Wt?1:-1)*Math.sqrt(In)}(this.p,fr),this.max=this.d+this.h*Math.SQRT2}var qp;u.aq=void 0,(qp=u.aq||(u.aq={}))[qp.center=1]="center",qp[qp.left=2]="left",qp[qp.right=3]="right",qp[qp.top=4]="top",qp[qp.bottom=5]="bottom",qp[qp["top-left"]=6]="top-left",qp[qp["top-right"]=7]="top-right",qp[qp["bottom-left"]=8]="bottom-left",qp[qp["bottom-right"]=9]="bottom-right";const Zp=7,Hp=Number.POSITIVE_INFINITY;function xh(u,Xe){return Xe[1]!==Hp?function(u,Xe,Wt){let In=0,fr=0;switch(Xe=Math.abs(Xe),Wt=Math.abs(Wt),u){case"top-right":case"top-left":case"top":fr=Wt-Zp;break;case"bottom-right":case"bottom-left":case"bottom":fr=-Wt+Zp}switch(u){case"top-right":case"bottom-right":case"right":In=-Xe;break;case"top-left":case"bottom-left":case"left":In=Xe}return[In,fr]}(u,Xe[0],Xe[1]):function(u,Xe){let Wt=0,In=0;Xe<0&&(Xe=0);const fr=Xe/Math.SQRT2;switch(u){case"top-right":case"top-left":In=fr-Zp;break;case"bottom-right":case"bottom-left":In=-fr+Zp;break;case"bottom":In=-Xe+Zp;break;case"top":In=Xe-Zp}switch(u){case"top-right":case"bottom-right":Wt=-fr;break;case"top-left":case"bottom-left":Wt=fr;break;case"left":Wt=Xe;break;case"right":Wt=-Xe}return[Wt,In]}(u,Xe[0])}function vh(u,Xe,Wt){var In;const fr=u.layout,_r=null===(In=fr.get("text-variable-anchor-offset"))||void 0===In?void 0:In.evaluate(Xe,{},Wt);if(_r){const u=_r.values,Xe=[];for(let Wt=0;Wt<u.length;Wt+=2){const In=Xe[Wt]=u[Wt],fr=u[Wt+1].map((u=>u*gp));In.startsWith("top")?fr[1]-=Zp:In.startsWith("bottom")&&(fr[1]+=Zp),Xe[Wt+1]=fr}return new Qt(Xe)}const wr=fr.get("text-variable-anchor");if(wr){let In;In=void 0!==u._unevaluatedLayout.getValue("text-radial-offset")?[fr.get("text-radial-offset").evaluate(Xe,{},Wt)*gp,Hp]:fr.get("text-offset").evaluate(Xe,{},Wt).map((u=>u*gp));const _r=[];for(const u of wr)_r.push(u,xh(u,In));return new Qt(_r)}return null}function bh(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function wh(Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo){let ao=wr.textMaxSize.evaluate(Wt,{});void 0===ao&&(ao=Ar);const so=Xe.layers[0].layout,co=so.get("icon-offset").evaluate(Wt,{},oo),ho=Ah(In.horizontal),go=Ar/24,xo=Xe.tilePixelRatio*go,ko=Xe.tilePixelRatio*ao/24,Co=Xe.tilePixelRatio*Kr,Io=Xe.tilePixelRatio*so.get("symbol-spacing"),zo=so.get("text-padding")*Xe.tilePixelRatio,Bo=function(u,Xe,Wt,In=1){const fr=u.get("icon-padding").evaluate(Xe,{},Wt),_r=fr&&fr.values;return[_r[0]*In,_r[1]*In,_r[2]*In,_r[3]*In]}(so,Wt,oo,Xe.tilePixelRatio),ca=so.get("text-max-angle")/180*Math.PI,ua="viewport"!==so.get("text-rotation-alignment")&&"point"!==so.get("symbol-placement"),Da="map"===so.get("icon-rotation-alignment")&&"point"!==so.get("symbol-placement"),ns=so.get("symbol-placement"),yl=Io/2,vl=so.get("icon-text-fit");let kl;fr&&"none"!==vl&&(Xe.allowVerticalPlacement&&In.vertical&&(kl=ec(fr,In.vertical,vl,so.get("icon-text-fit-padding"),co,go)),ho&&(fr=ec(fr,ho,vl,so.get("icon-text-fit-padding"),co,go)));const B=(Kr,ao)=>{ao.x<0||ao.x>=Td||ao.y<0||ao.y>=Td||function(Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go,xo,ko,Co,Io,zo,Bo,ca,ua,Da){const ns=Xe.addToLineVertexArray(Wt,In);let yl,vl,kl,Al,Ml=0,Rl=0,Ol=0,Ll=0,Dl=-1,Bl=-1;const Nl={};let Vl=kd("");if(Xe.allowVerticalPlacement&&fr.vertical){const u=Kr.layout.get("text-rotate").evaluate(zo,{},ua)+90;kl=new ch(no,Wt,io,oo,ao,fr.vertical,so,co,ho,u),Ar&&(Al=new ch(no,Wt,io,oo,ao,Ar,xo,ko,ho,u))}if(_r){const In=Kr.layout.get("icon-rotate").evaluate(zo,{}),fr="none"!==Kr.layout.get("icon-text-fit"),wr=sh(_r,In,ca,fr),so=Ar?sh(Ar,In,ca,fr):void 0;vl=new ch(no,Wt,io,oo,ao,_r,xo,ko,!1,In),Ml=4*wr.length;const co=Xe.iconSizeData;let ho=null;"source"===co.kind?(ho=[Mp*Kr.layout.get("icon-size").evaluate(zo,{})],ho[0]>Rp&&A(`${Xe.layerIds[0]}: Value for "icon-size" is >= ${Ip}. Reduce your "icon-size".`)):"composite"===co.kind&&(ho=[Mp*Bo.compositeIconSizes[0].evaluate(zo,{},ua),Mp*Bo.compositeIconSizes[1].evaluate(zo,{},ua)],(ho[0]>Rp||ho[1]>Rp)&&A(`${Xe.layerIds[0]}: Value for "icon-size" is >= ${Ip}. Reduce your "icon-size".`)),Xe.addSymbols(Xe.icon,wr,ho,Io,Co,zo,u.ah.none,Wt,ns.lineStartIndex,ns.lineLength,-1,ua),Dl=Xe.icon.placedSymbolArray.length-1,so&&(Rl=4*so.length,Xe.addSymbols(Xe.icon,so,ho,Io,Co,zo,u.ah.vertical,Wt,ns.lineStartIndex,ns.lineLength,-1,ua),Bl=Xe.icon.placedSymbolArray.length-1)}const Ul=Object.keys(fr.horizontal);for(const In of Ul){const _r=fr.horizontal[In];if(!yl){Vl=kd(_r.text);const u=Kr.layout.get("text-rotate").evaluate(zo,{},ua);yl=new ch(no,Wt,io,oo,ao,_r,so,co,ho,u)}const Ar=1===_r.positionedLines.length;if(Ol+=_h(Xe,Wt,_r,wr,Kr,ho,zo,go,ns,fr.vertical?u.ah.horizontal:u.ah.horizontalOnly,Ar?Ul:[In],Nl,Dl,Bo,ua),Ar)break}fr.vertical&&(Ll+=_h(Xe,Wt,fr.vertical,wr,Kr,ho,zo,go,ns,u.ah.vertical,["vertical"],Nl,Bl,Bo,ua));const $l=yl?yl.boxStartIndex:Xe.collisionBoxArray.length,Wl=yl?yl.boxEndIndex:Xe.collisionBoxArray.length,Zl=kl?kl.boxStartIndex:Xe.collisionBoxArray.length,Gl=kl?kl.boxEndIndex:Xe.collisionBoxArray.length,Xl=vl?vl.boxStartIndex:Xe.collisionBoxArray.length,Jl=vl?vl.boxEndIndex:Xe.collisionBoxArray.length,Ql=Al?Al.boxStartIndex:Xe.collisionBoxArray.length,rc=Al?Al.boxEndIndex:Xe.collisionBoxArray.length;let ic=-1;const Y=(u,Xe)=>u&&u.circleDiameter?Math.max(u.circleDiameter,Xe):Xe;ic=Y(yl,ic),ic=Y(kl,ic),ic=Y(vl,ic),ic=Y(Al,ic);const oc=ic>-1?1:0;oc&&(ic*=Da/gp),Xe.glyphOffsetArray.length>=dc.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==zo.sortKey&&Xe.addToSortKeyRanges(Xe.symbolInstances.length,zo.sortKey);const lc=vh(Kr,zo,ua),[gc,bc]=function(Xe,Wt){const In=Xe.length,fr=null==Wt?void 0:Wt.values;if((null==fr?void 0:fr.length)>0)for(let Wt=0;Wt<fr.length;Wt+=2){const In=fr[Wt+1];Xe.emplaceBack(u.aq[fr[Wt]],In[0],In[1])}return[In,Xe.length]}(Xe.textAnchorOffsets,lc);Xe.symbolInstances.emplaceBack(Wt.x,Wt.y,Nl.right>=0?Nl.right:-1,Nl.center>=0?Nl.center:-1,Nl.left>=0?Nl.left:-1,Nl.vertical||-1,Dl,Bl,Vl,$l,Wl,Zl,Gl,Xl,Jl,Ql,rc,io,Ol,Ll,Ml,Rl,oc,0,so,ic,gc,bc)}(Xe,ao,Kr,In,fr,_r,kl,Xe.layers[0],Xe.collisionBoxArray,Wt.index,Wt.sourceLayerIndex,Xe.index,xo,[zo,zo,zo,zo],ua,no,Co,Bo,Da,co,Wt,wr,io,oo,Ar)};if("line"===ns)for(const u of Hc(Wt.geometry,0,0,Td,Td)){const Wt=rh(u,Io,ca,In.vertical||ho,fr,24,ko,Xe.overscaling,Td);for(const In of Wt)ho&&Sh(Xe,ho.text,yl,In)||B(u,In)}else if("line-center"===ns){for(const u of Wt.geometry)if(u.length>1){const Xe=eh(u,ca,In.vertical||ho,fr,24,ko);Xe&&B(u,Xe)}}else if("Polygon"===Wt.type)for(const u of xr(Wt.geometry,0)){const Xe=ph(u,16);B(u[0],new Yc(Xe.x,Xe.y,0))}else if("LineString"===Wt.type)for(const u of Wt.geometry)B(u,new Yc(u[0].x,u[0].y,0));else if("Point"===Wt.type)for(const u of Wt.geometry)for(const Xe of u)B([Xe],new Yc(Xe.x,Xe.y,0))}function _h(u,Xe,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho){const go=function(u,Xe,In,fr,_r,wr,Ar,Kr){const no=fr.layout.get("text-rotate").evaluate(wr,{})*Math.PI/180,io=[];for(const u of Xe.positionedLines)for(const fr of u.positionedGlyphs){if(!fr.rect)continue;const wr=fr.rect||{};let oo=Sp+1,ao=!0,so=1,co=0;const ho=(_r||Kr)&&fr.vertical,go=fr.metrics.advance*fr.scale/2;if(Kr&&Xe.verticalizable&&(co=u.lineOffset/2-(fr.imageName?-(gp-fr.metrics.width*fr.scale)/2:(fr.scale-1)*gp)),fr.imageName){const u=Ar[fr.imageName];ao=u.sdf,so=u.pixelRatio,oo=kp/so}const xo=_r?[fr.x+go,fr.y]:[0,0];let ko=_r?[0,0]:[fr.x+go+In[0],fr.y+In[1]-co],Co=[0,0];ho&&(Co=ko,ko=[0,0]);const Io=fr.metrics.isDoubleResolution?2:1,zo=(fr.metrics.left-oo)*fr.scale-go+ko[0],Bo=(-fr.metrics.top-oo)*fr.scale+ko[1],ca=zo+wr.w/Io*fr.scale/so,ua=Bo+wr.h/Io*fr.scale/so,Da=new Wt(zo,Bo),ns=new Wt(ca,Bo),yl=new Wt(zo,ua),vl=new Wt(ca,ua);if(ho){const u=new Wt(-go,go-Tp),Xe=-Math.PI/2,In=gp/2-go,_r=new Wt(5-Tp-In,-(fr.imageName?In:0)),wr=new Wt(...Co);Da._rotateAround(Xe,u)._add(_r)._add(wr),ns._rotateAround(Xe,u)._add(_r)._add(wr),yl._rotateAround(Xe,u)._add(_r)._add(wr),vl._rotateAround(Xe,u)._add(_r)._add(wr)}if(no){const u=Math.sin(no),Xe=Math.cos(no),Wt=[Xe,-u,u,Xe];Da._matMult(Wt),ns._matMult(Wt),yl._matMult(Wt),vl._matMult(Wt)}const kl=new Wt(0,0),Al=new Wt(0,0);io.push({tl:Da,tr:ns,bl:yl,br:vl,tex:wr,writingMode:Xe.writingMode,glyphOffset:xo,sectionIndex:fr.sectionIndex,isSDF:ao,pixelOffsetTL:kl,pixelOffsetBR:Al,minFontScaleX:0,minFontScaleY:0})}return io}(0,In,Kr,_r,wr,Ar,fr,u.allowVerticalPlacement),xo=u.textSizeData;let ko=null;"source"===xo.kind?(ko=[Mp*_r.layout.get("text-size").evaluate(Ar,{})],ko[0]>Rp&&A(`${u.layerIds[0]}: Value for "text-size" is >= ${Ip}. Reduce your "text-size".`)):"composite"===xo.kind&&(ko=[Mp*co.compositeTextSizes[0].evaluate(Ar,{},ho),Mp*co.compositeTextSizes[1].evaluate(Ar,{},ho)],(ko[0]>Rp||ko[1]>Rp)&&A(`${u.layerIds[0]}: Value for "text-size" is >= ${Ip}. Reduce your "text-size".`)),u.addSymbols(u.text,go,ko,Kr,wr,Ar,io,Xe,no.lineStartIndex,no.lineLength,so,ho);for(const Xe of oo)ao[Xe]=u.text.placedSymbolArray.length-1;return 4*go.length}function Ah(u){for(const Xe in u)return u[Xe];return null}function Sh(u,Xe,Wt,In){const fr=u.compareText;if(Xe in fr){const u=fr[Xe];for(let Xe=u.length-1;Xe>=0;Xe--)if(In.dist(u[Xe])<Wt)return!0}else fr[Xe]=[];return fr[Xe].push(In),!1}const Gp=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Mh{static from(u){if(!(u instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[Xe,Wt]=new Uint8Array(u,0,2);if(219!==Xe)throw new Error("Data does not appear to be in a KDBush format.");const In=Wt>>4;if(1!==In)throw new Error(`Got v${In} data when expected v1.`);const fr=Gp[15&Wt];if(!fr)throw new Error("Unrecognized array type.");const[_r]=new Uint16Array(u,2,1),[wr]=new Uint32Array(u,4,1);return new Mh(wr,_r,fr,u)}constructor(u,Xe=64,Wt=Float64Array,In){if(isNaN(u)||u<0)throw new Error(`Unpexpected numItems value: ${u}.`);this.numItems=+u,this.nodeSize=Math.min(Math.max(+Xe,2),65535),this.ArrayType=Wt,this.IndexArrayType=u<65536?Uint16Array:Uint32Array;const fr=Gp.indexOf(this.ArrayType),_r=2*u*this.ArrayType.BYTES_PER_ELEMENT,wr=u*this.IndexArrayType.BYTES_PER_ELEMENT,Ar=(8-wr%8)%8;if(fr<0)throw new Error(`Unexpected typed array class: ${Wt}.`);In&&In instanceof ArrayBuffer?(this.data=In,this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+wr+Ar,2*u),this._pos=2*u,this._finished=!0):(this.data=new ArrayBuffer(8+_r+wr+Ar),this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+wr+Ar,2*u),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+fr]),new Uint16Array(this.data,2,1)[0]=Xe,new Uint32Array(this.data,4,1)[0]=u)}add(u,Xe){const Wt=this._pos>>1;return this.ids[Wt]=Wt,this.coords[this._pos++]=u,this.coords[this._pos++]=Xe,Wt}finish(){const u=this._pos>>1;if(u!==this.numItems)throw new Error(`Added ${u} items when expected ${this.numItems}.`);return Ih(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(u,Xe,Wt,In){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:fr,coords:_r,nodeSize:wr}=this,Ar=[0,fr.length-1,0],Kr=[];for(;Ar.length;){const no=Ar.pop()||0,io=Ar.pop()||0,oo=Ar.pop()||0;if(io-oo<=wr){for(let wr=oo;wr<=io;wr++){const Ar=_r[2*wr],no=_r[2*wr+1];Ar>=u&&Ar<=Wt&&no>=Xe&&no<=In&&Kr.push(fr[wr])}continue}const ao=oo+io>>1,so=_r[2*ao],co=_r[2*ao+1];so>=u&&so<=Wt&&co>=Xe&&co<=In&&Kr.push(fr[ao]),(0===no?u<=so:Xe<=co)&&(Ar.push(oo),Ar.push(ao-1),Ar.push(1-no)),(0===no?Wt>=so:In>=co)&&(Ar.push(ao+1),Ar.push(io),Ar.push(1-no))}return Kr}within(u,Xe,Wt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:In,coords:fr,nodeSize:_r}=this,wr=[0,In.length-1,0],Ar=[],Kr=Wt*Wt;for(;wr.length;){const no=wr.pop()||0,io=wr.pop()||0,oo=wr.pop()||0;if(io-oo<=_r){for(let Wt=oo;Wt<=io;Wt++)Bh(fr[2*Wt],fr[2*Wt+1],u,Xe)<=Kr&&Ar.push(In[Wt]);continue}const ao=oo+io>>1,so=fr[2*ao],co=fr[2*ao+1];Bh(so,co,u,Xe)<=Kr&&Ar.push(In[ao]),(0===no?u-Wt<=so:Xe-Wt<=co)&&(wr.push(oo),wr.push(ao-1),wr.push(1-no)),(0===no?u+Wt>=so:Xe+Wt>=co)&&(wr.push(ao+1),wr.push(io),wr.push(1-no))}return Ar}}function Ih(u,Xe,Wt,In,fr,_r){if(fr-In<=Wt)return;const wr=In+fr>>1;zh(u,Xe,wr,In,fr,_r),Ih(u,Xe,Wt,In,wr-1,1-_r),Ih(u,Xe,Wt,wr+1,fr,1-_r)}function zh(u,Xe,Wt,In,fr,_r){for(;fr>In;){if(fr-In>600){const wr=fr-In+1,Ar=Wt-In+1,Kr=Math.log(wr),no=.5*Math.exp(2*Kr/3),io=.5*Math.sqrt(Kr*no*(wr-no)/wr)*(Ar-wr/2<0?-1:1);zh(u,Xe,Wt,Math.max(In,Math.floor(Wt-Ar*no/wr+io)),Math.min(fr,Math.floor(Wt+(wr-Ar)*no/wr+io)),_r)}const wr=Xe[2*Wt+_r];let Ar=In,Kr=fr;for(Ph(u,Xe,In,Wt),Xe[2*fr+_r]>wr&&Ph(u,Xe,In,fr);Ar<Kr;){for(Ph(u,Xe,Ar,Kr),Ar++,Kr--;Xe[2*Ar+_r]<wr;)Ar++;for(;Xe[2*Kr+_r]>wr;)Kr--}Xe[2*In+_r]===wr?Ph(u,Xe,In,Kr):(Kr++,Ph(u,Xe,Kr,fr)),Kr<=Wt&&(In=Kr+1),Wt<=Kr&&(fr=Kr-1)}}function Ph(u,Xe,Wt,In){Ch(u,Wt,In),Ch(Xe,2*Wt,2*In),Ch(Xe,2*Wt+1,2*In+1)}function Ch(u,Xe,Wt){const In=u[Xe];u[Xe]=u[Wt],u[Wt]=In}function Bh(u,Xe,Wt,In){const fr=u-Wt,_r=Xe-In;return fr*fr+_r*_r}var Kp;u.bg=void 0,(Kp=u.bg||(u.bg={})).create="create",Kp.load="load",Kp.fullLoad="fullLoad";let Xp=null,Yp=[];const Jp=1e3/60,Qp="loadTime",ef="fullLoadTime",rf={mark(u){performance.mark(u)},frame(u){const Xe=u;null!=Xp&&Yp.push(Xe-Xp),Xp=Xe},clearMetrics(){Xp=null,Yp=[],performance.clearMeasures(Qp),performance.clearMeasures(ef);for(const Xe in u.bg)performance.clearMarks(u.bg[Xe])},getPerformanceMetrics(){performance.measure(Qp,u.bg.create,u.bg.load),performance.measure(ef,u.bg.create,u.bg.fullLoad);const Xe=performance.getEntriesByName(Qp)[0].duration,Wt=performance.getEntriesByName(ef)[0].duration,In=Yp.length,fr=1/(Yp.reduce(((u,Xe)=>u+Xe),0)/In/1e3),_r=Yp.filter((u=>u>Jp)).reduce(((u,Xe)=>u+(Xe-Jp)/Jp),0);return{loadTime:Xe,fullLoadTime:Wt,fps:fr,percentDroppedFrames:_r/(In+_r)*100,totalFrames:In}}};u.$=class extends ps{},u.A=Ld,u.B=Fu,u.C=function(u){if(null==io){const Xe=u.navigator?u.navigator.userAgent:null;io=!!u.safari||!(!Xe||!(/\b(iPad|iPhone|iPod)\b/.test(Xe)||Xe.match("Safari")&&!Xe.match("Chrome")))}return io},u.D=Ji,u.E=Z,u.F=class{constructor(u,Xe){this.target=u,this.mapId=Xe,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Ic((()=>this.process())),this.subscription=function(u,Xe,Wt){return u.addEventListener(Xe,Wt,!1),{unsubscribe:()=>{u.removeEventListener(Xe,Wt,!1)}}}(this.target,"message",(u=>this.receive(u))),this.globalScope=k(self)?u:window}registerMessageHandler(u,Xe){this.messageHandlers[u]=Xe}sendAsync(u,Xe){return new Promise(((Wt,In)=>{const fr=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[fr]={resolve:Wt,reject:In},Xe&&Xe.signal.addEventListener("abort",(()=>{delete this.resolveRejects[fr];const Xe={id:fr,type:"<cancel>",origin:location.origin,targetMapId:u.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Xe)}),{once:!0});const _r=[],wr=Object.assign(Object.assign({},u),{id:fr,sourceMapId:this.mapId,origin:location.origin,data:ki(u.data,_r)});this.target.postMessage(wr,{transfer:_r})}))}receive(u){const Xe=u.data,Wt=Xe.id;if(!("file://"!==Xe.origin&&"file://"!==location.origin&&"resource://android"!==Xe.origin&&"resource://android"!==location.origin&&Xe.origin!==location.origin||Xe.targetMapId&&this.mapId!==Xe.targetMapId)){if("<cancel>"===Xe.type){delete this.tasks[Wt];const u=this.abortControllers[Wt];return delete this.abortControllers[Wt],void(u&&u.abort())}if(k(self)||Xe.mustQueue)return this.tasks[Wt]=Xe,this.taskQueue.push(Wt),void this.invoker.trigger();this.processTask(Wt,Xe)}}process(){if(0===this.taskQueue.length)return;const u=this.taskQueue.shift(),Xe=this.tasks[u];delete this.tasks[u],this.taskQueue.length>0&&this.invoker.trigger(),Xe&&this.processTask(u,Xe)}processTask(u,Xe){return e(this,void 0,void 0,(function*(){if("<response>"===Xe.type){const Wt=this.resolveRejects[u];if(delete this.resolveRejects[u],!Wt)return;return void(Xe.error?Wt.reject(Mi(Xe.error)):Wt.resolve(Mi(Xe.data)))}if(!this.messageHandlers[Xe.type])return void this.completeTask(u,new Error(`Could not find a registered handler for ${Xe.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const Wt=Mi(Xe.data),In=new AbortController;this.abortControllers[u]=In;try{const fr=yield this.messageHandlers[Xe.type](Xe.sourceMapId,Wt,In);this.completeTask(u,null,fr)}catch(Wt){this.completeTask(u,Wt)}}))}completeTask(u,Xe,Wt){const In=[];delete this.abortControllers[u];const fr={id:u,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:Xe?ki(Xe):null,data:ki(Wt,In)};this.target.postMessage(fr,{transfer:In})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},u.G=go,u.H=function(){var u=new Ld(16);return Ld!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},u.I=Tu,u.J=function(u,Xe,Wt){var In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho=Wt[0],go=Wt[1],xo=Wt[2];return Xe===u?(u[12]=Xe[0]*ho+Xe[4]*go+Xe[8]*xo+Xe[12],u[13]=Xe[1]*ho+Xe[5]*go+Xe[9]*xo+Xe[13],u[14]=Xe[2]*ho+Xe[6]*go+Xe[10]*xo+Xe[14],u[15]=Xe[3]*ho+Xe[7]*go+Xe[11]*xo+Xe[15]):(fr=Xe[1],_r=Xe[2],wr=Xe[3],Ar=Xe[4],Kr=Xe[5],no=Xe[6],io=Xe[7],oo=Xe[8],ao=Xe[9],so=Xe[10],co=Xe[11],u[0]=In=Xe[0],u[1]=fr,u[2]=_r,u[3]=wr,u[4]=Ar,u[5]=Kr,u[6]=no,u[7]=io,u[8]=oo,u[9]=ao,u[10]=so,u[11]=co,u[12]=In*ho+Ar*go+oo*xo+Xe[12],u[13]=fr*ho+Kr*go+ao*xo+Xe[13],u[14]=_r*ho+no*go+so*xo+Xe[14],u[15]=wr*ho+io*go+co*xo+Xe[15]),u},u.K=function(u,Xe,Wt){var In=Wt[0],fr=Wt[1],_r=Wt[2];return u[0]=Xe[0]*In,u[1]=Xe[1]*In,u[2]=Xe[2]*In,u[3]=Xe[3]*In,u[4]=Xe[4]*fr,u[5]=Xe[5]*fr,u[6]=Xe[6]*fr,u[7]=Xe[7]*fr,u[8]=Xe[8]*_r,u[9]=Xe[9]*_r,u[10]=Xe[10]*_r,u[11]=Xe[11]*_r,u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15],u},u.L=uo,u.M=function(u,Xe){const Wt={};for(let In=0;In<Xe.length;In++){const fr=Xe[In];fr in u&&(Wt[fr]=u[fr])}return Wt},u.N=Pc,u.O=Vc,u.P=Wt,u.Q=Ec,u.R=Ao,u.S=jc,u.T=Zi,u.U=h,u.V=p,u.W=P,u.X=Td,u.Y=ls,u.Z=$c,u._=e,u.a=ho,u.a$=function(u,Xe){var Wt=u[0],In=u[1],fr=u[2],_r=u[3],wr=u[4],Ar=u[5],Kr=u[6],no=u[7],io=u[8],oo=u[9],ao=u[10],so=u[11],co=u[12],ho=u[13],go=u[14],xo=u[15],ko=Xe[0],Co=Xe[1],Io=Xe[2],zo=Xe[3],Bo=Xe[4],ca=Xe[5],ua=Xe[6],Da=Xe[7],ns=Xe[8],yl=Xe[9],vl=Xe[10],kl=Xe[11],Al=Xe[12],Ml=Xe[13],Rl=Xe[14],Ol=Xe[15];return Math.abs(Wt-ko)<=Od*Math.max(1,Math.abs(Wt),Math.abs(ko))&&Math.abs(In-Co)<=Od*Math.max(1,Math.abs(In),Math.abs(Co))&&Math.abs(fr-Io)<=Od*Math.max(1,Math.abs(fr),Math.abs(Io))&&Math.abs(_r-zo)<=Od*Math.max(1,Math.abs(_r),Math.abs(zo))&&Math.abs(wr-Bo)<=Od*Math.max(1,Math.abs(wr),Math.abs(Bo))&&Math.abs(Ar-ca)<=Od*Math.max(1,Math.abs(Ar),Math.abs(ca))&&Math.abs(Kr-ua)<=Od*Math.max(1,Math.abs(Kr),Math.abs(ua))&&Math.abs(no-Da)<=Od*Math.max(1,Math.abs(no),Math.abs(Da))&&Math.abs(io-ns)<=Od*Math.max(1,Math.abs(io),Math.abs(ns))&&Math.abs(oo-yl)<=Od*Math.max(1,Math.abs(oo),Math.abs(yl))&&Math.abs(ao-vl)<=Od*Math.max(1,Math.abs(ao),Math.abs(vl))&&Math.abs(so-kl)<=Od*Math.max(1,Math.abs(so),Math.abs(kl))&&Math.abs(co-Al)<=Od*Math.max(1,Math.abs(co),Math.abs(Al))&&Math.abs(ho-Ml)<=Od*Math.max(1,Math.abs(ho),Math.abs(Ml))&&Math.abs(go-Rl)<=Od*Math.max(1,Math.abs(go),Math.abs(Rl))&&Math.abs(xo-Ol)<=Od*Math.max(1,Math.abs(xo),Math.abs(Ol))},u.a0=oa,u.a1=Dc,u.a2=it,u.a3=u=>{const Xe=window.document.createElement("video");return Xe.muted=!0,new Promise((Wt=>{Xe.onloadstart=()=>{Wt(Xe)};for(const Wt of u){const u=window.document.createElement("source");j(Wt)||(Xe.crossOrigin="Anonymous"),u.src=Wt,Xe.appendChild(u)}}))},u.a4=function(){return Kr++},u.a5=Fs,u.a6=dc,u.a7=zn,u.a8=ja,u.a9=Nc,u.aA=function(u){if("custom"===u.type)return new Mc(u);switch(u.type){case"background":return new _c(u);case"circle":return new fo(u);case"fill":return new ul(u);case"fill-extrusion":return new El(u);case"heatmap":return new Mo(u);case"hillshade":return new Po(u);case"line":return new Hl(u);case"raster":return new kc(u);case"symbol":return new vc(u)}},u.aB=w,u.aC=function(u,Xe){if(!u)return[{command:"setStyle",args:[Xe]}];let Wt=[];try{if(!H(u.version,Xe.version))return[{command:"setStyle",args:[Xe]}];H(u.center,Xe.center)||Wt.push({command:"setCenter",args:[Xe.center]}),H(u.zoom,Xe.zoom)||Wt.push({command:"setZoom",args:[Xe.zoom]}),H(u.bearing,Xe.bearing)||Wt.push({command:"setBearing",args:[Xe.bearing]}),H(u.pitch,Xe.pitch)||Wt.push({command:"setPitch",args:[Xe.pitch]}),H(u.sprite,Xe.sprite)||Wt.push({command:"setSprite",args:[Xe.sprite]}),H(u.glyphs,Xe.glyphs)||Wt.push({command:"setGlyphs",args:[Xe.glyphs]}),H(u.transition,Xe.transition)||Wt.push({command:"setTransition",args:[Xe.transition]}),H(u.light,Xe.light)||Wt.push({command:"setLight",args:[Xe.light]}),H(u.terrain,Xe.terrain)||Wt.push({command:"setTerrain",args:[Xe.terrain]}),H(u.sky,Xe.sky)||Wt.push({command:"setSky",args:[Xe.sky]}),H(u.projection,Xe.projection)||Wt.push({command:"setProjection",args:[Xe.projection]});const In={},fr=[];!function(u,Xe,Wt,In){let fr;for(fr in Xe=Xe||{},u=u||{})Object.prototype.hasOwnProperty.call(u,fr)&&(Object.prototype.hasOwnProperty.call(Xe,fr)||W(fr,Wt,In));for(fr in Xe)Object.prototype.hasOwnProperty.call(Xe,fr)&&(Object.prototype.hasOwnProperty.call(u,fr)?H(u[fr],Xe[fr])||("geojson"===u[fr].type&&"geojson"===Xe[fr].type&&tt(u,Xe,fr)?Y(Wt,{command:"setGeoJSONSourceData",args:[fr,Xe[fr].data]}):Q(fr,Xe,Wt,In)):J(fr,Xe,Wt))}(u.sources,Xe.sources,fr,In);const _r=[];u.layers&&u.layers.forEach((u=>{"source"in u&&In[u.source]?Wt.push({command:"removeLayer",args:[u.id]}):_r.push(u)})),Wt=Wt.concat(fr),function(u,Xe,Wt){Xe=Xe||[];const In=(u=u||[]).map(rt),fr=Xe.map(rt),_r=u.reduce(nt,{}),wr=Xe.reduce(nt,{}),Ar=In.slice(),Kr=Object.create(null);let no,io,oo,ao,so;for(let u=0,Xe=0;u<In.length;u++)no=In[u],Object.prototype.hasOwnProperty.call(wr,no)?Xe++:(Y(Wt,{command:"removeLayer",args:[no]}),Ar.splice(Ar.indexOf(no,Xe),1));for(let u=0,Xe=0;u<fr.length;u++)no=fr[fr.length-1-u],Ar[Ar.length-1-u]!==no&&(Object.prototype.hasOwnProperty.call(_r,no)?(Y(Wt,{command:"removeLayer",args:[no]}),Ar.splice(Ar.lastIndexOf(no,Ar.length-Xe),1)):Xe++,ao=Ar[Ar.length-u],Y(Wt,{command:"addLayer",args:[wr[no],ao]}),Ar.splice(Ar.length-u,0,no),Kr[no]=!0);for(let u=0;u<fr.length;u++)if(no=fr[u],io=_r[no],oo=wr[no],!Kr[no]&&!H(io,oo))if(H(io.source,oo.source)&&H(io["source-layer"],oo["source-layer"])&&H(io.type,oo.type)){for(so in et(io.layout,oo.layout,Wt,no,null,"setLayoutProperty"),et(io.paint,oo.paint,Wt,no,null,"setPaintProperty"),H(io.filter,oo.filter)||Y(Wt,{command:"setFilter",args:[no,oo.filter]}),H(io.minzoom,oo.minzoom)&&H(io.maxzoom,oo.maxzoom)||Y(Wt,{command:"setLayerZoomRange",args:[no,oo.minzoom,oo.maxzoom]}),io)Object.prototype.hasOwnProperty.call(io,so)&&"layout"!==so&&"paint"!==so&&"filter"!==so&&"metadata"!==so&&"minzoom"!==so&&"maxzoom"!==so&&(0===so.indexOf("paint.")?et(io[so],oo[so],Wt,no,so.slice(6),"setPaintProperty"):H(io[so],oo[so])||Y(Wt,{command:"setLayerProperty",args:[no,so,oo[so]]}));for(so in oo)Object.prototype.hasOwnProperty.call(oo,so)&&!Object.prototype.hasOwnProperty.call(io,so)&&"layout"!==so&&"paint"!==so&&"filter"!==so&&"metadata"!==so&&"minzoom"!==so&&"maxzoom"!==so&&(0===so.indexOf("paint.")?et(io[so],oo[so],Wt,no,so.slice(6),"setPaintProperty"):H(io[so],oo[so])||Y(Wt,{command:"setLayerProperty",args:[no,so,oo[so]]}))}else Y(Wt,{command:"removeLayer",args:[no]}),ao=Ar[Ar.lastIndexOf(no)+1],Y(Wt,{command:"addLayer",args:[oo,ao]})}(_r,Xe.layers,Wt)}catch(u){console.warn("Unable to compute style diff:",u),Wt=[{command:"setStyle",args:[Xe]}]}return Wt},u.aD=function(u){const Xe=[],Wt=u.id;return void 0===Wt&&Xe.push({message:`layers.${Wt}: missing required property "id"`}),void 0===u.render&&Xe.push({message:`layers.${Wt}: missing required method "render"`}),u.renderingMode&&"2d"!==u.renderingMode&&"3d"!==u.renderingMode&&Xe.push({message:`layers.${Wt}: property "renderingMode" must be either "2d" or "3d"`}),Xe},u.aE=function t(u,Xe){if(Array.isArray(u)){if(!Array.isArray(Xe)||u.length!==Xe.length)return!1;for(let Wt=0;Wt<u.length;Wt++)if(!t(u[Wt],Xe[Wt]))return!1;return!0}if("object"==typeof u&&null!==u&&null!==Xe){if("object"!=typeof Xe)return!1;if(Object.keys(u).length!==Object.keys(Xe).length)return!1;for(const Wt in u)if(!t(u[Wt],Xe[Wt]))return!1;return!0}return u===Xe},u.aF=v,u.aG=b,u.aH=class extends wa{constructor(u,Xe){super(u,Xe),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1i(this.location,u))}},u.aI=_a,u.aJ=class extends wa{constructor(u,Xe){super(u,Xe),this.current=Ad}set(u){if(u[12]!==this.current[12]||u[0]!==this.current[0])return this.current=u,void this.gl.uniformMatrix4fv(this.location,!1,u);for(let Xe=1;Xe<16;Xe++)if(u[Xe]!==this.current[Xe]){this.current=u,this.gl.uniformMatrix4fv(this.location,!1,u);break}}},u.aK=Aa,u.aL=Sa,u.aM=Kt,u.aN=class extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]||(this.current=u,this.gl.uniform3f(this.location,u[0],u[1],u[2]))}},u.aO=class extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]||(this.current=u,this.gl.uniform2f(this.location,u[0],u[1]))}},u.aP=function(u,Xe,Wt,In,fr,_r,wr){var Ar=1/(Xe-Wt),Kr=1/(In-fr),no=1/(_r-wr);return u[0]=-2*Ar,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=-2*Kr,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=2*no,u[11]=0,u[12]=(Xe+Wt)*Ar,u[13]=(fr+In)*Kr,u[14]=(wr+_r)*no,u[15]=1,u},u.aQ=Fd,u.aR=class extends _s{},u.aS=fp,u.aT=class extends Ss{},u.aU=Vd,u.aV=function(u){return u<=1?1:Math.pow(2,Math.ceil(Math.log(u)/Math.LN2))},u.aW=So,u.aX=Zs,u.aY=na,u.aZ=class extends Bs{},u.a_=function(u,Xe){return u[0]===Xe[0]&&u[1]===Xe[1]&&u[2]===Xe[2]&&u[3]===Xe[3]&&u[4]===Xe[4]&&u[5]===Xe[5]&&u[6]===Xe[6]&&u[7]===Xe[7]&&u[8]===Xe[8]&&u[9]===Xe[9]&&u[10]===Xe[10]&&u[11]===Xe[11]&&u[12]===Xe[12]&&u[13]===Xe[13]&&u[14]===Xe[14]&&u[15]===Xe[15]},u.aa=function(u){const Xe={};if(u.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((u,Wt,In,fr)=>{const _r=In||fr;return Xe[Wt]=!_r||_r.toLowerCase(),""})),Xe["max-age"]){const u=parseInt(Xe["max-age"],10);isNaN(u)?delete Xe["max-age"]:Xe["max-age"]=u}return Xe},u.ab=function(u,Xe){const Wt=[];for(const In in u)In in Xe||Wt.push(In);return Wt},u.ac=y,u.ad=function(u,Xe,Wt){var In=Math.sin(Wt),fr=Math.cos(Wt),_r=Xe[0],wr=Xe[1],Ar=Xe[2],Kr=Xe[3],no=Xe[4],io=Xe[5],oo=Xe[6],ao=Xe[7];return Xe!==u&&(u[8]=Xe[8],u[9]=Xe[9],u[10]=Xe[10],u[11]=Xe[11],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15]),u[0]=_r*fr+no*In,u[1]=wr*fr+io*In,u[2]=Ar*fr+oo*In,u[3]=Kr*fr+ao*In,u[4]=no*fr-_r*In,u[5]=io*fr-wr*In,u[6]=oo*fr-Ar*In,u[7]=ao*fr-Kr*In,u},u.ae=function(u){var Xe=new Ld(16);return Xe[0]=u[0],Xe[1]=u[1],Xe[2]=u[2],Xe[3]=u[3],Xe[4]=u[4],Xe[5]=u[5],Xe[6]=u[6],Xe[7]=u[7],Xe[8]=u[8],Xe[9]=u[9],Xe[10]=u[10],Xe[11]=u[11],Xe[12]=u[12],Xe[13]=u[13],Xe[14]=u[14],Xe[15]=u[15],Xe},u.af=po,u.ag=function(u,Xe){let Wt=0,In=0;if("constant"===u.kind)In=u.layoutSize;else if("source"!==u.kind){const{interpolationType:fr,minZoom:_r,maxZoom:wr}=u,Ar=fr?y(Be.interpolationFactor(fr,Xe,_r,wr),0,1):0;"camera"===u.kind?In=rc.number(u.minSize,u.maxSize,Ar):Wt=Ar}return{uSizeT:Wt,uSize:In}},u.ai=function(u,{uSize:Xe,uSizeT:Wt},{lowerSize:In,upperSize:fr}){return"source"===u.kind?In/Mp:"composite"===u.kind?rc.number(In/Mp,fr/Mp,Wt):Xe},u.aj=cc,u.ak=function(u,Xe,In,fr){const _r=Xe.y-u.y,wr=Xe.x-u.x,Ar=fr.y-In.y,Kr=fr.x-In.x,no=Ar*wr-Kr*_r;if(0===no)return null;const io=(Kr*(u.y-In.y)-Ar*(u.x-In.x))/no;return new Wt(u.x+io*wr,u.y+io*_r)},u.al=Hc,u.am=qa,u.an=lo,u.ao=function(u){let Xe=1/0,Wt=1/0,In=-1/0,fr=-1/0;for(const _r of u)Xe=Math.min(Xe,_r.x),Wt=Math.min(Wt,_r.y),In=Math.max(In,_r.x),fr=Math.max(fr,_r.y);return[Xe,Wt,In,fr]},u.ap=gp,u.ar=ac,u.as=function(u,Xe){var Wt=Xe[0],In=Xe[1],fr=Xe[2],_r=Xe[3],wr=Xe[4],Ar=Xe[5],Kr=Xe[6],no=Xe[7],io=Xe[8],oo=Xe[9],ao=Xe[10],so=Xe[11],co=Xe[12],ho=Xe[13],go=Xe[14],xo=Xe[15],ko=Wt*Ar-In*wr,Co=Wt*Kr-fr*wr,Io=Wt*no-_r*wr,zo=In*Kr-fr*Ar,Bo=In*no-_r*Ar,ca=fr*no-_r*Kr,ua=io*ho-oo*co,Da=io*go-ao*co,ns=io*xo-so*co,yl=oo*go-ao*ho,vl=oo*xo-so*ho,kl=ao*xo-so*go,Al=ko*kl-Co*vl+Io*yl+zo*ns-Bo*Da+ca*ua;return Al?(u[0]=(Ar*kl-Kr*vl+no*yl)*(Al=1/Al),u[1]=(fr*vl-In*kl-_r*yl)*Al,u[2]=(ho*ca-go*Bo+xo*zo)*Al,u[3]=(ao*Bo-oo*ca-so*zo)*Al,u[4]=(Kr*ns-wr*kl-no*Da)*Al,u[5]=(Wt*kl-fr*ns+_r*Da)*Al,u[6]=(go*Io-co*ca-xo*Co)*Al,u[7]=(io*ca-ao*Io+so*Co)*Al,u[8]=(wr*vl-Ar*ns+no*ua)*Al,u[9]=(In*ns-Wt*vl-_r*ua)*Al,u[10]=(co*Bo-ho*Io+xo*ko)*Al,u[11]=(oo*Io-io*Bo-so*ko)*Al,u[12]=(Ar*Da-wr*yl-Kr*ua)*Al,u[13]=(Wt*yl-In*Da+fr*ua)*Al,u[14]=(ho*Co-co*zo-go*ko)*Al,u[15]=(io*zo-oo*Co+ao*ko)*Al,u):null},u.at=bh,u.au=Ju,u.av=Mh,u.aw=function(){const u={},Xe=xo.$version;for(const Wt in xo.$root){const In=xo.$root[Wt];if(In.required){let fr=null;fr="version"===Wt?Xe:"array"===In.type?[]:{},null!=fr&&(u[Wt]=fr)}}return u},u.ax=Ii,u.ay=D,u.az=function(u){u=u.slice();const Xe=Object.create(null);for(let Wt=0;Wt<u.length;Wt++)Xe[u[Wt].id]=u[Wt];for(let Wt=0;Wt<u.length;Wt++)"ref"in u[Wt]&&(u[Wt]=X(u[Wt],Xe[u[Wt].ref]));return u},u.b=I,u.b0=function(u,Xe){return u[0]=Xe[0],u[1]=Xe[1],u[2]=Xe[2],u[3]=Xe[3],u[4]=Xe[4],u[5]=Xe[5],u[6]=Xe[6],u[7]=Xe[7],u[8]=Xe[8],u[9]=Xe[9],u[10]=Xe[10],u[11]=Xe[11],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15],u},u.b1=function(u,Xe,Wt){return u[0]=Xe[0]*Wt[0],u[1]=Xe[1]*Wt[1],u[2]=Xe[2]*Wt[2],u[3]=Xe[3]*Wt[3],u},u.b2=function(u,Xe){return u[0]*Xe[0]+u[1]*Xe[1]+u[2]*Xe[2]+u[3]*Xe[3]},u.b3=m,u.b4=Oc,u.b5=Fc,u.b6=function(u,Xe,Wt,In,fr){var _r,wr=1/Math.tan(Xe/2);return u[0]=wr/Wt,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=wr,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=-1,u[12]=0,u[13]=0,u[15]=0,null!=fr&&fr!==1/0?(u[10]=(fr+In)*(_r=1/(In-fr)),u[14]=2*fr*In*_r):(u[10]=-1,u[14]=-2*In),u},u.b7=function(u,Xe,Wt){var In=Math.sin(Wt),fr=Math.cos(Wt),_r=Xe[4],wr=Xe[5],Ar=Xe[6],Kr=Xe[7],no=Xe[8],io=Xe[9],oo=Xe[10],ao=Xe[11];return Xe!==u&&(u[0]=Xe[0],u[1]=Xe[1],u[2]=Xe[2],u[3]=Xe[3],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15]),u[4]=_r*fr+no*In,u[5]=wr*fr+io*In,u[6]=Ar*fr+oo*In,u[7]=Kr*fr+ao*In,u[8]=no*fr-_r*In,u[9]=io*fr-wr*In,u[10]=oo*fr-Ar*In,u[11]=ao*fr-Kr*In,u},u.b8=f,u.b9=Ar,u.bA=yp,u.bB=function(u){return u.message===co},u.bC=bn,u.bD=ld,u.ba=function(u){return u*Math.PI/180},u.bb=function(u,Xe){const{x:Wt,y:In}=$c.fromLngLat(Xe);return!(u<0||u>25||In<0||In>=1||Wt<0||Wt>=1)},u.bc=function(u,Xe){return u[0]=Xe[0],u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=Xe[1],u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=Xe[2],u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u},u.bd=class extends hs{},u.be=Up,u.bf=rf,u.bh=L,u.bi=function(u,Xe){ho.REGISTERED_PROTOCOLS[u]=Xe},u.bj=function(u){delete ho.REGISTERED_PROTOCOLS[u]},u.bk=function(u,Xe){const Wt={};for(let In=0;In<u.length;In++){const fr=Xe&&Xe[u[In].id]||Ln(u[In]);Xe&&(Xe[u[In].id]=fr);let _r=Wt[fr];_r||(_r=Wt[fr]=[]),_r.push(u[In])}const In=[];for(const u in Wt)In.push(Wt[u]);return In},u.bl=wi,u.bm=qc,u.bn=Zc,u.bo=$u,u.bp=function(Xe){Xe.bucket.createArrays(),Xe.bucket.tilePixelRatio=Td/(512*Xe.bucket.overscaling),Xe.bucket.compareText={},Xe.bucket.iconsNeedLinear=!1;const Wt=Xe.bucket.layers[0],In=Wt.layout,fr=Wt._unevaluatedLayout._values,_r={layoutIconSize:fr["icon-size"].possiblyEvaluate(new Ui(Xe.bucket.zoom+1),Xe.canonical),layoutTextSize:fr["text-size"].possiblyEvaluate(new Ui(Xe.bucket.zoom+1),Xe.canonical),textMaxSize:fr["text-size"].possiblyEvaluate(new Ui(18))};if("composite"===Xe.bucket.textSizeData.kind){const{minZoom:u,maxZoom:Wt}=Xe.bucket.textSizeData;_r.compositeTextSizes=[fr["text-size"].possiblyEvaluate(new Ui(u),Xe.canonical),fr["text-size"].possiblyEvaluate(new Ui(Wt),Xe.canonical)]}if("composite"===Xe.bucket.iconSizeData.kind){const{minZoom:u,maxZoom:Wt}=Xe.bucket.iconSizeData;_r.compositeIconSizes=[fr["icon-size"].possiblyEvaluate(new Ui(u),Xe.canonical),fr["icon-size"].possiblyEvaluate(new Ui(Wt),Xe.canonical)]}const wr=In.get("text-line-height")*gp,Ar="viewport"!==In.get("text-rotation-alignment")&&"point"!==In.get("symbol-placement"),Kr=In.get("text-keep-upright"),no=In.get("text-size");for(const fr of Xe.bucket.features){const io=In.get("text-font").evaluate(fr,{},Xe.canonical).join(","),oo=no.evaluate(fr,{},Xe.canonical),ao=_r.layoutTextSize.evaluate(fr,{},Xe.canonical),so=_r.layoutIconSize.evaluate(fr,{},Xe.canonical),co={horizontal:{},vertical:void 0},ho=fr.text;let go,xo=[0,0];if(ho){const _r=ho.toString(),no=In.get("text-letter-spacing").evaluate(fr,{},Xe.canonical)*gp,so=Ci(_r)?no:0,go=In.get("text-anchor").evaluate(fr,{},Xe.canonical),ko=vh(Wt,fr,Xe.canonical);if(!ko){const u=In.get("text-radial-offset").evaluate(fr,{},Xe.canonical);xo=u?xh(go,[u*gp,Hp]):In.get("text-offset").evaluate(fr,{},Xe.canonical).map((u=>u*gp))}let Co=Ar?"center":In.get("text-justify").evaluate(fr,{},Xe.canonical);const Io="point"===In.get("symbol-placement")?In.get("text-max-width").evaluate(fr,{},Xe.canonical)*gp:1/0,w=()=>{Xe.bucket.allowVerticalPlacement&&Pi(_r)&&(co.vertical=Ru(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,io,Io,wr,go,"left",so,xo,u.ah.vertical,!0,ao,oo))};if(!Ar&&ko){const Wt=new Set;if("auto"===Co)for(let u=0;u<ko.values.length;u+=2)Wt.add(bh(ko.values[u]));else Wt.add(Co);let In=!1;for(const fr of Wt)if(!co.horizontal[fr])if(In)co.horizontal[fr]=co.horizontal[0];else{const Wt=Ru(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,io,Io,wr,"center",fr,so,xo,u.ah.horizontal,!1,ao,oo);Wt&&(co.horizontal[fr]=Wt,In=1===Wt.positionedLines.length)}w()}else{"auto"===Co&&(Co=bh(go));const Wt=Ru(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,io,Io,wr,go,Co,so,xo,u.ah.horizontal,!1,ao,oo);Wt&&(co.horizontal[Co]=Wt),w(),Pi(_r)&&Ar&&Kr&&(co.vertical=Ru(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,io,Io,wr,go,Co,so,xo,u.ah.vertical,!1,ao,oo))}}let ko=!1;if(fr.icon&&fr.icon.name){const u=Xe.imageMap[fr.icon.name];u&&(go=Qu(Xe.imagePositions[fr.icon.name],In.get("icon-offset").evaluate(fr,{},Xe.canonical),In.get("icon-anchor").evaluate(fr,{},Xe.canonical)),ko=!!u.sdf,void 0===Xe.bucket.sdfIcons?Xe.bucket.sdfIcons=ko:Xe.bucket.sdfIcons!==ko&&A("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(u.pixelRatio!==Xe.bucket.pixelRatio||0!==In.get("icon-rotate").constantOr(1))&&(Xe.bucket.iconsNeedLinear=!0))}const Co=Ah(co.horizontal)||co.vertical;Xe.bucket.iconsInText=!!Co&&Co.iconsInText,(Co||go)&&wh(Xe.bucket,fr,co,go,Xe.imageMap,_r,ao,so,xo,ko,Xe.canonical)}Xe.showCollisionBoxes&&Xe.bucket.generateCollisionDebugBuffers()},u.bq=ql,u.br=sl,u.bs=zl,u.bt=Qd,u.bu=xp,u.bv=class{constructor(u){this._marks={start:[u.url,"start"].join("#"),end:[u.url,"end"].join("#"),measure:u.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let u=performance.getEntriesByName(this._marks.measure);return 0===u.length&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),u=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),u}},u.bw=function(u,Xe,Wt,In,fr){return e(this,void 0,void 0,(function*(){if(p())try{return yield P(u,Xe,Wt,In,fr)}catch(u){}return function(u,Xe,Wt,In,fr){const _r=u.width,wr=u.height;ao&&so||(ao=new OffscreenCanvas(_r,wr),so=ao.getContext("2d",{willReadFrequently:!0})),ao.width=_r,ao.height=wr,so.drawImage(u,0,0,_r,wr);const Ar=so.getImageData(Xe,Wt,In,fr);return so.clearRect(0,0,_r,wr),Ar.data}(u,Xe,Wt,In,fr)}))},u.bx=Uc,u.by=r,u.bz=Xe,u.c=E,u.d=u=>e(void 0,void 0,void 0,(function*(){if(0===u.byteLength)return createImageBitmap(new ImageData(1,1));const Xe=new Blob([new Uint8Array(u)],{type:"image/png"});try{return createImageBitmap(Xe)}catch(u){throw new Error(`Could not load image because of ${u.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),u.e=g,u.f=u=>new Promise(((Xe,Wt)=>{const In=new Image;In.onload=()=>{Xe(In),URL.revokeObjectURL(In.src),In.onload=null,window.requestAnimationFrame((()=>{In.src=oo}))},In.onerror=()=>Wt(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 fr=new Blob([new Uint8Array(u)],{type:"image/png"});In.src=u.byteLength?URL.createObjectURL(fr):oo})),u.g=T,u.h=(u,Xe)=>O(g(u,{type:"json"}),Xe),u.i=k,u.j=N,u.k=q,u.l=(u,Xe)=>O(g(u,{type:"arrayBuffer"}),Xe),u.m=O,u.n=function(u){return new xp(u).readFields(Pu,[])},u.o=_o,u.p=Eu,u.q=rs,u.r=Du,u.s=j,u.t=xi,u.u=Lu,u.v=xo,u.w=A,u.x=function([u,Xe,Wt]){return Xe+=90,Xe*=Math.PI/180,Wt*=Math.PI/180,{x:u*Math.cos(Xe)*Math.sin(Wt),y:u*Math.sin(Xe)*Math.sin(Wt),z:u*Math.cos(Wt)}},u.y=rc,u.z=Ui})),define("worker",["./shared"],(function(u){class t{constructor(u){this.keyCache={},u&&this.replace(u)}replace(u){this._layerConfigs={},this._layers={},this.update(u,[])}update(Xe,Wt){for(const Wt of Xe){this._layerConfigs[Wt.id]=Wt;const Xe=this._layers[Wt.id]=u.aA(Wt);Xe._featureFilter=u.a7(Xe.filter),this.keyCache[Wt.id]&&delete this.keyCache[Wt.id]}for(const u of Wt)delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u];this.familiesBySource={};const In=u.bk(Object.values(this._layerConfigs),this.keyCache);for(const u of In){const Xe=u.map((u=>this._layers[u.id])),Wt=Xe[0];if("none"===Wt.visibility)continue;const In=Wt.source||"";let fr=this.familiesBySource[In];fr||(fr=this.familiesBySource[In]={});const _r=Wt.sourceLayer||"_geojsonTileLayer";let wr=fr[_r];wr||(wr=fr[_r]=[]),wr.push(Xe)}}}class o{constructor(Xe){const Wt={},In=[];for(const u in Xe){const fr=Xe[u],_r=Wt[u]={};for(const u in fr){const Xe=fr[+u];if(!Xe||0===Xe.bitmap.width||0===Xe.bitmap.height)continue;const Wt={x:0,y:0,w:Xe.bitmap.width+2,h:Xe.bitmap.height+2};In.push(Wt),_r[u]={rect:Wt,metrics:Xe.metrics}}}const{w:fr,h:_r}=u.p(In),wr=new u.o({width:fr||1,height:_r||1});for(const In in Xe){const fr=Xe[In];for(const Xe in fr){const _r=fr[+Xe];if(!_r||0===_r.bitmap.width||0===_r.bitmap.height)continue;const Ar=Wt[In][Xe].rect;u.o.copy(_r.bitmap,wr,{x:0,y:0},{x:Ar.x+1,y:Ar.y+1},_r.bitmap)}}this.image=wr,this.positions=Wt}}u.bl("GlyphAtlas",o);class i{constructor(Xe){this.tileID=new u.S(Xe.tileID.overscaledZ,Xe.tileID.wrap,Xe.tileID.canonical.z,Xe.tileID.canonical.x,Xe.tileID.canonical.y),this.uid=Xe.uid,this.zoom=Xe.zoom,this.pixelRatio=Xe.pixelRatio,this.tileSize=Xe.tileSize,this.source=Xe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Xe.showCollisionBoxes,this.collectResourceTiming=!!Xe.collectResourceTiming,this.returnDependencies=!!Xe.returnDependencies,this.promoteId=Xe.promoteId,this.inFlightDependencies=[]}parse(Xe,Wt,In,fr){return u._(this,void 0,void 0,(function*(){this.status="parsing",this.data=Xe,this.collisionBoxArray=new u.a5;const _r=new u.bm(Object.keys(Xe.layers).sort()),wr=new u.bn(this.tileID,this.promoteId);wr.bucketLayerIDs=[];const Ar={},Kr={featureIndex:wr,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:In},no=Wt.familiesBySource[this.source];for(const Wt in no){const fr=Xe.layers[Wt];if(!fr)continue;1===fr.version&&u.w(`Vector tile source "${this.source}" layer "${Wt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const io=_r.encode(Wt),oo=[];for(let u=0;u<fr.length;u++){const Xe=fr.feature(u),In=wr.getId(Xe,Wt);oo.push({feature:Xe,id:In,index:u,sourceLayerIndex:io})}for(const Xe of no[Wt]){const Wt=Xe[0];Wt.source!==this.source&&u.w(`layer.source = ${Wt.source} does not equal this.source = ${this.source}`),Wt.minzoom&&this.zoom<Math.floor(Wt.minzoom)||Wt.maxzoom&&this.zoom>=Wt.maxzoom||"none"!==Wt.visibility&&(s(Xe,this.zoom,In),(Ar[Wt.id]=Wt.createBucket({index:wr.bucketLayerIDs.length,layers:Xe,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:io,sourceID:this.source})).populate(oo,Kr,this.tileID.canonical),wr.bucketLayerIDs.push(Xe.map((u=>u.id))))}}const io=u.aF(Kr.glyphDependencies,(u=>Object.keys(u).map(Number)));this.inFlightDependencies.forEach((u=>null==u?void 0:u.abort())),this.inFlightDependencies=[];let oo=Promise.resolve({});if(Object.keys(io).length){const u=new AbortController;this.inFlightDependencies.push(u),oo=fr.sendAsync({type:"GG",data:{stacks:io,source:this.source,tileID:this.tileID,type:"glyphs"}},u)}const ao=Object.keys(Kr.iconDependencies);let so=Promise.resolve({});if(ao.length){const u=new AbortController;this.inFlightDependencies.push(u),so=fr.sendAsync({type:"GI",data:{icons:ao,source:this.source,tileID:this.tileID,type:"icons"}},u)}const co=Object.keys(Kr.patternDependencies);let ho=Promise.resolve({});if(co.length){const u=new AbortController;this.inFlightDependencies.push(u),ho=fr.sendAsync({type:"GI",data:{icons:co,source:this.source,tileID:this.tileID,type:"patterns"}},u)}const[go,xo,ko]=yield Promise.all([oo,so,ho]),Co=new o(go),Io=new u.bo(xo,ko);for(const Xe in Ar){const Wt=Ar[Xe];Wt instanceof u.a6?(s(Wt.layers,this.zoom,In),u.bp({bucket:Wt,glyphMap:go,glyphPositions:Co.positions,imageMap:xo,imagePositions:Io.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Wt.hasPattern&&(Wt instanceof u.bq||Wt instanceof u.br||Wt instanceof u.bs)&&(s(Wt.layers,this.zoom,In),Wt.addFeatures(Kr,this.tileID.canonical,Io.patternPositions))}return this.status="done",{buckets:Object.values(Ar).filter((u=>!u.isEmpty())),featureIndex:wr,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Co.image,imageAtlas:Io,glyphMap:this.returnDependencies?go:null,iconMap:this.returnDependencies?xo:null,glyphPositions:this.returnDependencies?Co.positions:null}}))}}function s(Xe,Wt,In){const fr=new u.z(Wt);for(const u of Xe)u.recalculate(fr,In)}class r{constructor(u,Xe,Wt){this.actor=u,this.layerIndex=Xe,this.availableImages=Wt,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Xe,Wt){return u._(this,void 0,void 0,(function*(){const In=yield u.l(Xe.request,Wt);try{return{vectorTile:new u.bt.VectorTile(new u.bu(In.data)),rawData:In.data,cacheControl:In.cacheControl,expires:In.expires}}catch(u){const Wt=new Uint8Array(In.data);let fr=`Unable to parse the tile at ${Xe.request.url}, `;throw fr+=31===Wt[0]&&139===Wt[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${u.message}`,new Error(fr)}}))}loadTile(Xe){return u._(this,void 0,void 0,(function*(){const Wt=Xe.uid,In=!!(Xe&&Xe.request&&Xe.request.collectResourceTiming)&&new u.bv(Xe.request),fr=new i(Xe);this.loading[Wt]=fr;const _r=new AbortController;fr.abort=_r;try{const wr=yield this.loadVectorTile(Xe,_r);if(delete this.loading[Wt],!wr)return null;const Ar=wr.rawData,Kr={};wr.expires&&(Kr.expires=wr.expires),wr.cacheControl&&(Kr.cacheControl=wr.cacheControl);const no={};if(In){const u=In.finish();u&&(no.resourceTiming=JSON.parse(JSON.stringify(u)))}fr.vectorTile=wr.vectorTile;const io=fr.parse(wr.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Wt]=fr,this.fetching[Wt]={rawTileData:Ar,cacheControl:Kr,resourceTiming:no};try{const Xe=yield io;return u.e({rawTileData:Ar.slice(0)},Xe,Kr,no)}finally{delete this.fetching[Wt]}}catch(u){throw delete this.loading[Wt],fr.status="done",this.loaded[Wt]=fr,u}}))}reloadTile(Xe){return u._(this,void 0,void 0,(function*(){const Wt=Xe.uid;if(!this.loaded||!this.loaded[Wt])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const In=this.loaded[Wt];if(In.showCollisionBoxes=Xe.showCollisionBoxes,"parsing"===In.status){const Xe=yield In.parse(In.vectorTile,this.layerIndex,this.availableImages,this.actor);let fr;if(this.fetching[Wt]){const{rawTileData:In,cacheControl:_r,resourceTiming:wr}=this.fetching[Wt];delete this.fetching[Wt],fr=u.e({rawTileData:In.slice(0)},Xe,_r,wr)}else fr=Xe;return fr}if("done"===In.status&&In.vectorTile)return In.parse(In.vectorTile,this.layerIndex,this.availableImages,this.actor)}))}abortTile(Xe){return u._(this,void 0,void 0,(function*(){const u=this.loading,Wt=Xe.uid;u&&u[Wt]&&u[Wt].abort&&(u[Wt].abort.abort(),delete u[Wt])}))}removeTile(Xe){return u._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[Xe.uid]&&delete this.loaded[Xe.uid]}))}}class n{constructor(){this.loaded={}}loadTile(Xe){return u._(this,void 0,void 0,(function*(){const{uid:Wt,encoding:In,rawImageData:fr,redFactor:_r,greenFactor:wr,blueFactor:Ar,baseShift:Kr}=Xe,no=fr.width+2,io=fr.height+2,oo=u.b(fr)?new u.R({width:no,height:io},yield u.bw(fr,-1,-1,no,io)):fr,ao=new u.bx(Wt,oo,In,_r,wr,Ar,Kr);return this.loaded=this.loaded||{},this.loaded[Wt]=ao,ao}))}removeTile(u){const Xe=this.loaded,Wt=u.uid;Xe&&Xe[Wt]&&delete Xe[Wt]}}function a(u,Xe){if(0!==u.length){l(u[0],Xe);for(var Wt=1;Wt<u.length;Wt++)l(u[Wt],!Xe)}}function l(u,Xe){for(var Wt=0,In=0,fr=0,_r=u.length,wr=_r-1;fr<_r;wr=fr++){var Ar=(u[fr][0]-u[wr][0])*(u[wr][1]+u[fr][1]),Kr=Wt+Ar;In+=Math.abs(Wt)>=Math.abs(Ar)?Wt-Kr+Ar:Ar-Kr+Wt,Wt=Kr}Wt+In>=0!=!!Xe&&u.reverse()}var Xe=u.by((function e(u,Xe){var Wt,In=u&&u.type;if("FeatureCollection"===In)for(Wt=0;Wt<u.features.length;Wt++)e(u.features[Wt],Xe);else if("GeometryCollection"===In)for(Wt=0;Wt<u.geometries.length;Wt++)e(u.geometries[Wt],Xe);else if("Feature"===In)e(u.geometry,Xe);else if("Polygon"===In)a(u.coordinates,Xe);else if("MultiPolygon"===In)for(Wt=0;Wt<u.coordinates.length;Wt++)a(u.coordinates[Wt],Xe);return u}));const Wt=u.bt.VectorTileFeature.prototype.toGeoJSON;var In={exports:{}},fr=u.bz,_r=u.bt.VectorTileFeature,wr=p;function p(u,Xe){this.options=Xe||{},this.features=u,this.length=u.length}function m(u,Xe){this.id="number"==typeof u.id?u.id:void 0,this.type=u.type,this.rawGeometry=1===u.type?[u.geometry]:u.geometry,this.properties=u.tags,this.extent=Xe||4096}p.prototype.feature=function(u){return new m(this.features[u],this.options.extent)},m.prototype.loadGeometry=function(){var u=this.rawGeometry;this.geometry=[];for(var Xe=0;Xe<u.length;Xe++){for(var Wt=u[Xe],In=[],_r=0;_r<Wt.length;_r++)In.push(new fr(Wt[_r][0],Wt[_r][1]));this.geometry.push(In)}return this.geometry},m.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var u=this.geometry,Xe=1/0,Wt=-1/0,In=1/0,fr=-1/0,_r=0;_r<u.length;_r++)for(var wr=u[_r],Ar=0;Ar<wr.length;Ar++){var Kr=wr[Ar];Xe=Math.min(Xe,Kr.x),Wt=Math.max(Wt,Kr.x),In=Math.min(In,Kr.y),fr=Math.max(fr,Kr.y)}return[Xe,In,Wt,fr]},m.prototype.toGeoJSON=_r.prototype.toGeoJSON;var Ar=u.bA,Kr=wr;function w(u){var Xe=new Ar;return function(u,Xe){for(var Wt in u.layers)Xe.writeMessage(3,x,u.layers[Wt])}(u,Xe),Xe.finish()}function x(u,Xe){var Wt;Xe.writeVarintField(15,u.version||1),Xe.writeStringField(1,u.name||""),Xe.writeVarintField(5,u.extent||4096);var In={keys:[],values:[],keycache:{},valuecache:{}};for(Wt=0;Wt<u.length;Wt++)In.feature=u.feature(Wt),Xe.writeMessage(2,b,In);var fr=In.keys;for(Wt=0;Wt<fr.length;Wt++)Xe.writeStringField(3,fr[Wt]);var _r=In.values;for(Wt=0;Wt<_r.length;Wt++)Xe.writeMessage(4,P,_r[Wt])}function b(u,Xe){var Wt=u.feature;void 0!==Wt.id&&Xe.writeVarintField(1,Wt.id),Xe.writeMessage(2,S,u),Xe.writeVarintField(3,Wt.type),Xe.writeMessage(4,I,Wt)}function S(u,Xe){var Wt=u.feature,In=u.keys,fr=u.values,_r=u.keycache,wr=u.valuecache;for(var Ar in Wt.properties){var Kr=Wt.properties[Ar],no=_r[Ar];if(null!==Kr){void 0===no&&(In.push(Ar),_r[Ar]=no=In.length-1),Xe.writeVarint(no);var io=typeof Kr;"string"!==io&&"boolean"!==io&&"number"!==io&&(Kr=JSON.stringify(Kr));var oo=io+":"+Kr,ao=wr[oo];void 0===ao&&(fr.push(Kr),wr[oo]=ao=fr.length-1),Xe.writeVarint(ao)}}}function _(u,Xe){return(Xe<<3)+(7&u)}function M(u){return u<<1^u>>31}function I(u,Xe){for(var Wt=u.loadGeometry(),In=u.type,fr=0,_r=0,wr=Wt.length,Ar=0;Ar<wr;Ar++){var Kr=Wt[Ar],no=1;1===In&&(no=Kr.length),Xe.writeVarint(_(1,no));for(var io=3===In?Kr.length-1:Kr.length,oo=0;oo<io;oo++){1===oo&&1!==In&&Xe.writeVarint(_(2,io-1));var ao=Kr[oo].x-fr,so=Kr[oo].y-_r;Xe.writeVarint(M(ao)),Xe.writeVarint(M(so)),fr+=ao,_r+=so}3===In&&Xe.writeVarint(_(7,1))}}function P(u,Xe){var Wt=typeof u;"string"===Wt?Xe.writeStringField(1,u):"boolean"===Wt?Xe.writeBooleanField(7,u):"number"===Wt&&(u%1!=0?Xe.writeDoubleField(3,u):u<0?Xe.writeSVarintField(6,u):Xe.writeVarintField(5,u))}In.exports=w,In.exports.fromVectorTileJs=w,In.exports.fromGeojsonVt=function(u,Xe){Xe=Xe||{};var Wt={};for(var In in u)Wt[In]=new Kr(u[In].features,Xe),Wt[In].name=In,Wt[In].version=Xe.version,Wt[In].extent=Xe.extent;return w({layers:Wt})},In.exports.GeoJSONWrapper=Kr;var no=u.by(In.exports);const io={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:u=>u},oo=Math.fround||(ao=new Float32Array(1),u=>(ao[0]=+u,ao[0]));var ao;const so=3,co=5,ho=6;class z{constructor(u){this.options=Object.assign(Object.create(io),u),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(u){const{log:Xe,minZoom:Wt,maxZoom:In}=this.options;Xe&&console.time("total time");const fr=`prepare ${u.length} points`;Xe&&console.time(fr),this.points=u;const _r=[];for(let Xe=0;Xe<u.length;Xe++){const Wt=u[Xe];if(!Wt.geometry)continue;const[In,fr]=Wt.geometry.coordinates,wr=oo(G(In)),Ar=oo(j(fr));_r.push(wr,Ar,1/0,Xe,-1,1),this.options.reduce&&_r.push(0)}let wr=this.trees[In+1]=this._createTree(_r);Xe&&console.timeEnd(fr);for(let u=In;u>=Wt;u--){const Wt=+Date.now();wr=this.trees[u]=this._createTree(this._cluster(wr,u)),Xe&&console.log("z%d: %d clusters in %dms",u,wr.numItems,+Date.now()-Wt)}return Xe&&console.timeEnd("total time"),this}getClusters(u,Xe){let Wt=((u[0]+180)%360+360)%360-180;const In=Math.max(-90,Math.min(90,u[1]));let fr=180===u[2]?180:((u[2]+180)%360+360)%360-180;const _r=Math.max(-90,Math.min(90,u[3]));if(u[2]-u[0]>=360)Wt=-180,fr=180;else if(Wt>fr){const u=this.getClusters([Wt,In,180,_r],Xe),wr=this.getClusters([-180,In,fr,_r],Xe);return u.concat(wr)}const wr=this.trees[this._limitZoom(Xe)],Ar=wr.range(G(Wt),j(_r),G(fr),j(In)),Kr=wr.data,no=[];for(const u of Ar){const Xe=this.stride*u;no.push(Kr[Xe+co]>1?A(Kr,Xe,this.clusterProps):this.points[Kr[Xe+so]])}return no}getChildren(u){const Xe=this._getOriginId(u),Wt=this._getOriginZoom(u),In="No cluster with the specified id.",fr=this.trees[Wt];if(!fr)throw new Error(In);const _r=fr.data;if(Xe*this.stride>=_r.length)throw new Error(In);const wr=this.options.radius/(this.options.extent*Math.pow(2,Wt-1)),Ar=fr.within(_r[Xe*this.stride],_r[Xe*this.stride+1],wr),Kr=[];for(const Xe of Ar){const Wt=Xe*this.stride;_r[Wt+4]===u&&Kr.push(_r[Wt+co]>1?A(_r,Wt,this.clusterProps):this.points[_r[Wt+so]])}if(0===Kr.length)throw new Error(In);return Kr}getLeaves(u,Xe,Wt){const In=[];return this._appendLeaves(In,u,Xe=Xe||10,Wt=Wt||0,0),In}getTile(u,Xe,Wt){const In=this.trees[this._limitZoom(u)],fr=Math.pow(2,u),{extent:_r,radius:wr}=this.options,Ar=wr/_r,Kr=(Wt-Ar)/fr,no=(Wt+1+Ar)/fr,io={features:[]};return this._addTileFeatures(In.range((Xe-Ar)/fr,Kr,(Xe+1+Ar)/fr,no),In.data,Xe,Wt,fr,io),0===Xe&&this._addTileFeatures(In.range(1-Ar/fr,Kr,1,no),In.data,fr,Wt,fr,io),Xe===fr-1&&this._addTileFeatures(In.range(0,Kr,Ar/fr,no),In.data,-1,Wt,fr,io),io.features.length?io:null}getClusterExpansionZoom(u){let Xe=this._getOriginZoom(u)-1;for(;Xe<=this.options.maxZoom;){const Wt=this.getChildren(u);if(Xe++,1!==Wt.length)break;u=Wt[0].properties.cluster_id}return Xe}_appendLeaves(u,Xe,Wt,In,fr){const _r=this.getChildren(Xe);for(const Xe of _r){const _r=Xe.properties;if(_r&&_r.cluster?fr+_r.point_count<=In?fr+=_r.point_count:fr=this._appendLeaves(u,_r.cluster_id,Wt,In,fr):fr<In?fr++:u.push(Xe),u.length===Wt)break}return fr}_createTree(Xe){const Wt=new u.av(Xe.length/this.stride|0,this.options.nodeSize,Float32Array);for(let u=0;u<Xe.length;u+=this.stride)Wt.add(Xe[u],Xe[u+1]);return Wt.finish(),Wt.data=Xe,Wt}_addTileFeatures(u,Xe,Wt,In,fr,_r){for(const wr of u){const u=wr*this.stride,Ar=Xe[u+co]>1;let Kr,no,io;if(Ar)Kr=E(Xe,u,this.clusterProps),no=Xe[u],io=Xe[u+1];else{const Wt=this.points[Xe[u+so]];Kr=Wt.properties;const[In,fr]=Wt.geometry.coordinates;no=G(In),io=j(fr)}const oo={type:1,geometry:[[Math.round(this.options.extent*(no*fr-Wt)),Math.round(this.options.extent*(io*fr-In))]],tags:Kr};let ao;ao=Ar||this.options.generateId?Xe[u+so]:this.points[Xe[u+so]].id,void 0!==ao&&(oo.id=ao),_r.features.push(oo)}}_limitZoom(u){return Math.max(this.options.minZoom,Math.min(Math.floor(+u),this.options.maxZoom+1))}_cluster(u,Xe){const{radius:Wt,extent:In,reduce:fr,minPoints:_r}=this.options,wr=Wt/(In*Math.pow(2,Xe)),Ar=u.data,Kr=[],no=this.stride;for(let Wt=0;Wt<Ar.length;Wt+=no){if(Ar[Wt+2]<=Xe)continue;Ar[Wt+2]=Xe;const In=Ar[Wt],io=Ar[Wt+1],oo=u.within(Ar[Wt],Ar[Wt+1],wr),ao=Ar[Wt+co];let so=ao;for(const u of oo){const Wt=u*no;Ar[Wt+2]>Xe&&(so+=Ar[Wt+co])}if(so>ao&&so>=_r){let u,_r=In*ao,wr=io*ao,ho=-1;const go=(Wt/no<<5)+(Xe+1)+this.points.length;for(const In of oo){const Kr=In*no;if(Ar[Kr+2]<=Xe)continue;Ar[Kr+2]=Xe;const io=Ar[Kr+co];_r+=Ar[Kr]*io,wr+=Ar[Kr+1]*io,Ar[Kr+4]=go,fr&&(u||(u=this._map(Ar,Wt,!0),ho=this.clusterProps.length,this.clusterProps.push(u)),fr(u,this._map(Ar,Kr)))}Ar[Wt+4]=go,Kr.push(_r/so,wr/so,1/0,go,-1,so),fr&&Kr.push(ho)}else{for(let u=0;u<no;u++)Kr.push(Ar[Wt+u]);if(so>1)for(const u of oo){const Wt=u*no;if(!(Ar[Wt+2]<=Xe)){Ar[Wt+2]=Xe;for(let u=0;u<no;u++)Kr.push(Ar[Wt+u])}}}}return Kr}_getOriginId(u){return u-this.points.length>>5}_getOriginZoom(u){return(u-this.points.length)%32}_map(u,Xe,Wt){if(u[Xe+co]>1){const In=this.clusterProps[u[Xe+ho]];return Wt?Object.assign({},In):In}const In=this.points[u[Xe+so]].properties,fr=this.options.map(In);return Wt&&fr===In?Object.assign({},fr):fr}}function A(u,Xe,Wt){return{type:"Feature",id:u[Xe+so],properties:E(u,Xe,Wt),geometry:{type:"Point",coordinates:[(In=u[Xe],360*(In-.5)),R(u[Xe+1])]}};var In}function E(u,Xe,Wt){const In=u[Xe+co],fr=In>=1e4?`${Math.round(In/1e3)}k`:In>=1e3?Math.round(In/100)/10+"k":In,_r=u[Xe+ho],wr=-1===_r?{}:Object.assign({},Wt[_r]);return Object.assign(wr,{cluster:!0,cluster_id:u[Xe+so],point_count:In,point_count_abbreviated:fr})}function G(u){return u/360+.5}function j(u){const Xe=Math.sin(u*Math.PI/180),Wt=.5-.25*Math.log((1+Xe)/(1-Xe))/Math.PI;return Wt<0?0:Wt>1?1:Wt}function R(u){const Xe=(180-360*u)*Math.PI/180;return 360*Math.atan(Math.exp(Xe))/Math.PI-90}function Z(u,Xe,Wt,In){let fr=In;const _r=Xe+(Wt-Xe>>1);let wr,Ar=Wt-Xe;const Kr=u[Xe],no=u[Xe+1],io=u[Wt],oo=u[Wt+1];for(let In=Xe+3;In<Wt;In+=3){const Xe=N(u[In],u[In+1],Kr,no,io,oo);if(Xe>fr)wr=In,fr=Xe;else if(Xe===fr){const u=Math.abs(In-_r);u<Ar&&(wr=In,Ar=u)}}fr>In&&(wr-Xe>3&&Z(u,Xe,wr,In),u[wr+2]=fr,Wt-wr>3&&Z(u,wr,Wt,In))}function N(u,Xe,Wt,In,fr,_r){let wr=fr-Wt,Ar=_r-In;if(0!==wr||0!==Ar){const Kr=((u-Wt)*wr+(Xe-In)*Ar)/(wr*wr+Ar*Ar);Kr>1?(Wt=fr,In=_r):Kr>0&&(Wt+=wr*Kr,In+=Ar*Kr)}return wr=u-Wt,Ar=Xe-In,wr*wr+Ar*Ar}function J(u,Xe,Wt,In){const fr={id:null==u?null:u,type:Xe,geometry:Wt,tags:In,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===Xe||"MultiPoint"===Xe||"LineString"===Xe)W(fr,Wt);else if("Polygon"===Xe)W(fr,Wt[0]);else if("MultiLineString"===Xe)for(const u of Wt)W(fr,u);else if("MultiPolygon"===Xe)for(const u of Wt)W(fr,u[0]);return fr}function W(u,Xe){for(let Wt=0;Wt<Xe.length;Wt+=3)u.minX=Math.min(u.minX,Xe[Wt]),u.minY=Math.min(u.minY,Xe[Wt+1]),u.maxX=Math.max(u.maxX,Xe[Wt]),u.maxY=Math.max(u.maxY,Xe[Wt+1])}function Y(u,Xe,Wt,In){if(!Xe.geometry)return;const fr=Xe.geometry.coordinates;if(fr&&0===fr.length)return;const _r=Xe.geometry.type,wr=Math.pow(Wt.tolerance/((1<<Wt.maxZoom)*Wt.extent),2);let Ar=[],Kr=Xe.id;if(Wt.promoteId?Kr=Xe.properties[Wt.promoteId]:Wt.generateId&&(Kr=In||0),"Point"===_r)V(fr,Ar);else if("MultiPoint"===_r)for(const u of fr)V(u,Ar);else if("LineString"===_r)X(fr,Ar,wr,!1);else if("MultiLineString"===_r){if(Wt.lineMetrics){for(const Wt of fr)Ar=[],X(Wt,Ar,wr,!1),u.push(J(Kr,"LineString",Ar,Xe.properties));return}q(fr,Ar,wr,!1)}else if("Polygon"===_r)q(fr,Ar,wr,!0);else{if("MultiPolygon"!==_r){if("GeometryCollection"===_r){for(const fr of Xe.geometry.geometries)Y(u,{id:Kr,geometry:fr,properties:Xe.properties},Wt,In);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const u of fr){const Xe=[];q(u,Xe,wr,!0),Ar.push(Xe)}}u.push(J(Kr,_r,Ar,Xe.properties))}function V(u,Xe){Xe.push(H(u[0]),B(u[1]),0)}function X(u,Xe,Wt,In){let fr,_r,wr=0;for(let Wt=0;Wt<u.length;Wt++){const Ar=H(u[Wt][0]),Kr=B(u[Wt][1]);Xe.push(Ar,Kr,0),Wt>0&&(wr+=In?(fr*Kr-Ar*_r)/2:Math.sqrt(Math.pow(Ar-fr,2)+Math.pow(Kr-_r,2))),fr=Ar,_r=Kr}const Ar=Xe.length-3;Xe[2]=1,Z(Xe,0,Ar,Wt),Xe[Ar+2]=1,Xe.size=Math.abs(wr),Xe.start=0,Xe.end=Xe.size}function q(u,Xe,Wt,In){for(let fr=0;fr<u.length;fr++){const _r=[];X(u[fr],_r,Wt,In),Xe.push(_r)}}function H(u){return u/360+.5}function B(u){const Xe=Math.sin(u*Math.PI/180),Wt=.5-.25*Math.log((1+Xe)/(1-Xe))/Math.PI;return Wt<0?0:Wt>1?1:Wt}function U(u,Xe,Wt,In,fr,_r,wr,Ar){if(In/=Xe,_r>=(Wt/=Xe)&&wr<In)return u;if(wr<Wt||_r>=In)return null;const Kr=[];for(const Xe of u){const u=Xe.geometry;let _r=Xe.type;const wr=0===fr?Xe.minX:Xe.minY,no=0===fr?Xe.maxX:Xe.maxY;if(wr>=Wt&&no<In){Kr.push(Xe);continue}if(no<Wt||wr>=In)continue;let io=[];if("Point"===_r||"MultiPoint"===_r)$(u,io,Wt,In,fr);else if("LineString"===_r)K(u,io,Wt,In,fr,!1,Ar.lineMetrics);else if("MultiLineString"===_r)ee(u,io,Wt,In,fr,!1);else if("Polygon"===_r)ee(u,io,Wt,In,fr,!0);else if("MultiPolygon"===_r)for(const Xe of u){const u=[];ee(Xe,u,Wt,In,fr,!0),u.length&&io.push(u)}if(io.length){if(Ar.lineMetrics&&"LineString"===_r){for(const u of io)Kr.push(J(Xe.id,_r,u,Xe.tags));continue}"LineString"!==_r&&"MultiLineString"!==_r||(1===io.length?(_r="LineString",io=io[0]):_r="MultiLineString"),"Point"!==_r&&"MultiPoint"!==_r||(_r=3===io.length?"Point":"MultiPoint"),Kr.push(J(Xe.id,_r,io,Xe.tags))}}return Kr.length?Kr:null}function $(u,Xe,Wt,In,fr){for(let _r=0;_r<u.length;_r+=3){const wr=u[_r+fr];wr>=Wt&&wr<=In&&te(Xe,u[_r],u[_r+1],u[_r+2])}}function K(u,Xe,Wt,In,fr,_r,wr){let Ar=Q(u);const Kr=0===fr?oe:ie;let no,io,oo=u.start;for(let ao=0;ao<u.length-3;ao+=3){const so=u[ao],co=u[ao+1],ho=u[ao+2],go=u[ao+3],xo=u[ao+4],ko=0===fr?so:co,Co=0===fr?go:xo;let Io=!1;wr&&(no=Math.sqrt(Math.pow(so-go,2)+Math.pow(co-xo,2))),ko<Wt?Co>Wt&&(io=Kr(Ar,so,co,go,xo,Wt),wr&&(Ar.start=oo+no*io)):ko>In?Co<In&&(io=Kr(Ar,so,co,go,xo,In),wr&&(Ar.start=oo+no*io)):te(Ar,so,co,ho),Co<Wt&&ko>=Wt&&(io=Kr(Ar,so,co,go,xo,Wt),Io=!0),Co>In&&ko<=In&&(io=Kr(Ar,so,co,go,xo,In),Io=!0),!_r&&Io&&(wr&&(Ar.end=oo+no*io),Xe.push(Ar),Ar=Q(u)),wr&&(oo+=no)}let ao=u.length-3;const so=u[ao],co=u[ao+1],ho=0===fr?so:co;ho>=Wt&&ho<=In&&te(Ar,so,co,u[ao+2]),ao=Ar.length-3,_r&&ao>=3&&(Ar[ao]!==Ar[0]||Ar[ao+1]!==Ar[1])&&te(Ar,Ar[0],Ar[1],Ar[2]),Ar.length&&Xe.push(Ar)}function Q(u){const Xe=[];return Xe.size=u.size,Xe.start=u.start,Xe.end=u.end,Xe}function ee(u,Xe,Wt,In,fr,_r){for(const wr of u)K(wr,Xe,Wt,In,fr,_r,!1)}function te(u,Xe,Wt,In){u.push(Xe,Wt,In)}function oe(u,Xe,Wt,In,fr,_r){const wr=(_r-Xe)/(In-Xe);return te(u,_r,Wt+(fr-Wt)*wr,1),wr}function ie(u,Xe,Wt,In,fr,_r){const wr=(_r-Wt)/(fr-Wt);return te(u,Xe+(In-Xe)*wr,_r,1),wr}function se(u,Xe){const Wt=[];for(let In=0;In<u.length;In++){const fr=u[In],_r=fr.type;let wr;if("Point"===_r||"MultiPoint"===_r||"LineString"===_r)wr=re(fr.geometry,Xe);else if("MultiLineString"===_r||"Polygon"===_r){wr=[];for(const u of fr.geometry)wr.push(re(u,Xe))}else if("MultiPolygon"===_r){wr=[];for(const u of fr.geometry){const Wt=[];for(const In of u)Wt.push(re(In,Xe));wr.push(Wt)}}Wt.push(J(fr.id,_r,wr,fr.tags))}return Wt}function re(u,Xe){const Wt=[];Wt.size=u.size,void 0!==u.start&&(Wt.start=u.start,Wt.end=u.end);for(let In=0;In<u.length;In+=3)Wt.push(u[In]+Xe,u[In+1],u[In+2]);return Wt}function ne(u,Xe){if(u.transformed)return u;const Wt=1<<u.z,In=u.x,fr=u.y;for(const _r of u.features){const u=_r.geometry,wr=_r.type;if(_r.geometry=[],1===wr)for(let wr=0;wr<u.length;wr+=2)_r.geometry.push(ae(u[wr],u[wr+1],Xe,Wt,In,fr));else for(let wr=0;wr<u.length;wr++){const Ar=[];for(let _r=0;_r<u[wr].length;_r+=2)Ar.push(ae(u[wr][_r],u[wr][_r+1],Xe,Wt,In,fr));_r.geometry.push(Ar)}}return u.transformed=!0,u}function ae(u,Xe,Wt,In,fr,_r){return[Math.round(Wt*(u*In-fr)),Math.round(Wt*(Xe*In-_r))]}function le(u,Xe,Wt,In,fr){const _r=Xe===fr.maxZoom?0:fr.tolerance/((1<<Xe)*fr.extent),wr={features:[],numPoints:0,numSimplified:0,numFeatures:u.length,source:null,x:Wt,y:In,z:Xe,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const Xe of u)ce(wr,Xe,_r,fr);return wr}function ce(u,Xe,Wt,In){const fr=Xe.geometry,_r=Xe.type,wr=[];if(u.minX=Math.min(u.minX,Xe.minX),u.minY=Math.min(u.minY,Xe.minY),u.maxX=Math.max(u.maxX,Xe.maxX),u.maxY=Math.max(u.maxY,Xe.maxY),"Point"===_r||"MultiPoint"===_r)for(let Xe=0;Xe<fr.length;Xe+=3)wr.push(fr[Xe],fr[Xe+1]),u.numPoints++,u.numSimplified++;else if("LineString"===_r)ue(wr,fr,u,Wt,!1,!1);else if("MultiLineString"===_r||"Polygon"===_r)for(let Xe=0;Xe<fr.length;Xe++)ue(wr,fr[Xe],u,Wt,"Polygon"===_r,0===Xe);else if("MultiPolygon"===_r)for(let Xe=0;Xe<fr.length;Xe++){const In=fr[Xe];for(let Xe=0;Xe<In.length;Xe++)ue(wr,In[Xe],u,Wt,!0,0===Xe)}if(wr.length){let Wt=Xe.tags||null;if("LineString"===_r&&In.lineMetrics){Wt={};for(const u in Xe.tags)Wt[u]=Xe.tags[u];Wt.mapbox_clip_start=fr.start/fr.size,Wt.mapbox_clip_end=fr.end/fr.size}const Ar={geometry:wr,type:"Polygon"===_r||"MultiPolygon"===_r?3:"LineString"===_r||"MultiLineString"===_r?2:1,tags:Wt};null!==Xe.id&&(Ar.id=Xe.id),u.features.push(Ar)}}function ue(u,Xe,Wt,In,fr,_r){const wr=In*In;if(In>0&&Xe.size<(fr?wr:In))return void(Wt.numPoints+=Xe.length/3);const Ar=[];for(let u=0;u<Xe.length;u+=3)(0===In||Xe[u+2]>wr)&&(Wt.numSimplified++,Ar.push(Xe[u],Xe[u+1])),Wt.numPoints++;fr&&function(u,Xe){let Wt=0;for(let Xe=0,In=u.length,fr=In-2;Xe<In;fr=Xe,Xe+=2)Wt+=(u[Xe]-u[fr])*(u[Xe+1]+u[fr+1]);if(Wt>0===Xe)for(let Xe=0,Wt=u.length;Xe<Wt/2;Xe+=2){const In=u[Xe],fr=u[Xe+1];u[Xe]=u[Wt-2-Xe],u[Xe+1]=u[Wt-1-Xe],u[Wt-2-Xe]=In,u[Wt-1-Xe]=fr}}(Ar,_r),u.push(Ar)}const go={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class de{constructor(u,Xe){const Wt=(Xe=this.options=function(u,Xe){for(const Wt in Xe)u[Wt]=Xe[Wt];return u}(Object.create(go),Xe)).debug;if(Wt&&console.time("preprocess data"),Xe.maxZoom<0||Xe.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Xe.promoteId&&Xe.generateId)throw new Error("promoteId and generateId cannot be used together.");let In=function(u,Xe){const Wt=[];if("FeatureCollection"===u.type)for(let In=0;In<u.features.length;In++)Y(Wt,u.features[In],Xe,In);else Y(Wt,"Feature"===u.type?u:{geometry:u},Xe);return Wt}(u,Xe);this.tiles={},this.tileCoords=[],Wt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Xe.indexMaxZoom,Xe.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),In=function(u,Xe){const Wt=Xe.buffer/Xe.extent;let In=u;const fr=U(u,1,-1-Wt,Wt,0,-1,2,Xe),_r=U(u,1,1-Wt,2+Wt,0,-1,2,Xe);return(fr||_r)&&(In=U(u,1,-Wt,1+Wt,0,-1,2,Xe)||[],fr&&(In=se(fr,1).concat(In)),_r&&(In=In.concat(se(_r,-1)))),In}(In,Xe),In.length&&this.splitTile(In,0,0,0),Wt&&(In.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(u,Xe,Wt,In,fr,_r,wr){const Ar=[u,Xe,Wt,In],Kr=this.options,no=Kr.debug;for(;Ar.length;){In=Ar.pop(),Wt=Ar.pop(),Xe=Ar.pop(),u=Ar.pop();const io=1<<Xe,oo=fe(Xe,Wt,In);let ao=this.tiles[oo];if(!ao&&(no>1&&console.time("creation"),ao=this.tiles[oo]=le(u,Xe,Wt,In,Kr),this.tileCoords.push({z:Xe,x:Wt,y:In}),no)){no>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Xe,Wt,In,ao.numFeatures,ao.numPoints,ao.numSimplified),console.timeEnd("creation"));const u=`z${Xe}`;this.stats[u]=(this.stats[u]||0)+1,this.total++}if(ao.source=u,null==fr){if(Xe===Kr.indexMaxZoom||ao.numPoints<=Kr.indexMaxPoints)continue}else{if(Xe===Kr.maxZoom||Xe===fr)continue;if(null!=fr){const u=fr-Xe;if(Wt!==_r>>u||In!==wr>>u)continue}}if(ao.source=null,0===u.length)continue;no>1&&console.time("clipping");const so=.5*Kr.buffer/Kr.extent,co=.5-so,ho=.5+so,go=1+so;let xo=null,ko=null,Co=null,Io=null,zo=U(u,io,Wt-so,Wt+ho,0,ao.minX,ao.maxX,Kr),Bo=U(u,io,Wt+co,Wt+go,0,ao.minX,ao.maxX,Kr);u=null,zo&&(xo=U(zo,io,In-so,In+ho,1,ao.minY,ao.maxY,Kr),ko=U(zo,io,In+co,In+go,1,ao.minY,ao.maxY,Kr),zo=null),Bo&&(Co=U(Bo,io,In-so,In+ho,1,ao.minY,ao.maxY,Kr),Io=U(Bo,io,In+co,In+go,1,ao.minY,ao.maxY,Kr),Bo=null),no>1&&console.timeEnd("clipping"),Ar.push(xo||[],Xe+1,2*Wt,2*In),Ar.push(ko||[],Xe+1,2*Wt,2*In+1),Ar.push(Co||[],Xe+1,2*Wt+1,2*In),Ar.push(Io||[],Xe+1,2*Wt+1,2*In+1)}}getTile(u,Xe,Wt){u=+u,Xe=+Xe,Wt=+Wt;const In=this.options,{extent:fr,debug:_r}=In;if(u<0||u>24)return null;const wr=1<<u,Ar=fe(u,Xe=Xe+wr&wr-1,Wt);if(this.tiles[Ar])return ne(this.tiles[Ar],fr);_r>1&&console.log("drilling down to z%d-%d-%d",u,Xe,Wt);let Kr,no=u,io=Xe,oo=Wt;for(;!Kr&&no>0;)no--,io>>=1,oo>>=1,Kr=this.tiles[fe(no,io,oo)];return Kr&&Kr.source?(_r>1&&(console.log("found parent tile z%d-%d-%d",no,io,oo),console.time("drilling down")),this.splitTile(Kr.source,no,io,oo,u,Xe,Wt),_r>1&&console.timeEnd("drilling down"),this.tiles[Ar]?ne(this.tiles[Ar],fr):null):null}}function fe(u,Xe,Wt){return 32*((1<<u)*Wt+Xe)+u}function ge(u,Xe){return Xe?u.properties[Xe]:u.id}function pe(u,Xe){if(null==u)return!0;if("Feature"===u.type)return null!=ge(u,Xe);if("FeatureCollection"===u.type){const Wt=new Set;for(const In of u.features){const u=ge(In,Xe);if(null==u)return!1;if(Wt.has(u))return!1;Wt.add(u)}return!0}return!1}function me(u,Xe){const Wt=new Map;if(null==u);else if("Feature"===u.type)Wt.set(ge(u,Xe),u);else for(const In of u.features)Wt.set(ge(In,Xe),In);return Wt}class ye extends r{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Xe,In){return u._(this,void 0,void 0,(function*(){const In=Xe.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const fr=this._geoJSONIndex.getTile(In.z,In.x,In.y);if(!fr)return null;const _r=new class{constructor(Xe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=u.X,this.length=Xe.length,this._features=Xe}feature(Xe){return new class{constructor(Xe){this._feature=Xe,this.extent=u.X,this.type=Xe.type,this.properties=Xe.tags,"id"in Xe&&!isNaN(Xe.id)&&(this.id=parseInt(Xe.id,10))}loadGeometry(){if(1===this._feature.type){const Xe=[];for(const Wt of this._feature.geometry)Xe.push([new u.P(Wt[0],Wt[1])]);return Xe}{const Xe=[];for(const Wt of this._feature.geometry){const In=[];for(const Xe of Wt)In.push(new u.P(Xe[0],Xe[1]));Xe.push(In)}return Xe}}toGeoJSON(u,Xe,In){return Wt.call(this,u,Xe,In)}}(this._features[Xe])}}(fr.features);let wr=no(_r);return 0===wr.byteOffset&&wr.byteLength===wr.buffer.byteLength||(wr=new Uint8Array(wr)),{vectorTile:_r,rawData:wr.buffer}}))}loadData(Xe){return u._(this,void 0,void 0,(function*(){var Wt;null===(Wt=this._pendingRequest)||void 0===Wt||Wt.abort();const In=!!(Xe&&Xe.request&&Xe.request.collectResourceTiming)&&new u.bv(Xe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Xe,this._pendingRequest),this._geoJSONIndex=Xe.cluster?new z(function({superclusterOptions:Xe,clusterProperties:Wt}){if(!Wt||!Xe)return Xe;const In={},fr={},_r={accumulated:null,zoom:0},wr={properties:null},Ar=Object.keys(Wt);for(const Xe of Ar){const[_r,wr]=Wt[Xe],Ar=u.bC(wr),Kr=u.bC("string"==typeof _r?[_r,["accumulated"],["get",Xe]]:_r);In[Xe]=Ar.value,fr[Xe]=Kr.value}return Xe.map=u=>{wr.properties=u;const Xe={};for(const u of Ar)Xe[u]=In[u].evaluate(_r,wr);return Xe},Xe.reduce=(u,Xe)=>{wr.properties=Xe;for(const Xe of Ar)_r.accumulated=u[Xe],u[Xe]=fr[Xe].evaluate(_r,wr)},Xe}(Xe)).load((yield this._pendingData).features):(fr=yield this._pendingData,new de(fr,Xe.geojsonVtOptions)),this.loaded={};const Wt={};if(In){const u=In.finish();u&&(Wt.resourceTiming={},Wt.resourceTiming[Xe.source]=JSON.parse(JSON.stringify(u)))}return Wt}catch(Xe){if(delete this._pendingRequest,u.bB(Xe))return{abandoned:!0};throw Xe}var fr}))}getData(){return u._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(u){const Xe=this.loaded;return Xe&&Xe[u.uid]?super.reloadTile(u):this.loadTile(u)}loadAndProcessGeoJSON(Wt,In){return u._(this,void 0,void 0,(function*(){let fr=yield this.loadGeoJSON(Wt,In);if(delete this._pendingRequest,"object"!=typeof fr)throw new Error(`Input data given to '${Wt.source}' is not a valid GeoJSON object.`);if(Xe(fr,!0),Wt.filter){const Xe=u.bC(Wt.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===Xe.result)throw new Error(Xe.value.map((u=>`${u.key}: ${u.message}`)).join(", "));const In=fr.features.filter((u=>Xe.value.evaluate({zoom:0},u)));fr={type:"FeatureCollection",features:In}}return fr}))}loadGeoJSON(Xe,Wt){return u._(this,void 0,void 0,(function*(){const{promoteId:In}=Xe;if(Xe.request){const fr=yield u.h(Xe.request,Wt);return this._dataUpdateable=pe(fr.data,In)?me(fr.data,In):void 0,fr.data}if("string"==typeof Xe.data)try{const u=JSON.parse(Xe.data);return this._dataUpdateable=pe(u,In)?me(u,In):void 0,u}catch(u){throw new Error(`Input data given to '${Xe.source}' is not a valid GeoJSON object.`)}if(!Xe.dataDiff)throw new Error(`Input data given to '${Xe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Xe.source}`);return function(u,Xe,Wt){var In,fr,_r,wr;if(Xe.removeAll&&u.clear(),Xe.remove)for(const Wt of Xe.remove)u.delete(Wt);if(Xe.add)for(const In of Xe.add){const Xe=ge(In,Wt);null!=Xe&&u.set(Xe,In)}if(Xe.update)for(const Wt of Xe.update){let Xe=u.get(Wt.id);if(null==Xe)continue;const Ar=!Wt.removeAllProperties&&((null===(In=Wt.removeProperties)||void 0===In?void 0:In.length)>0||(null===(fr=Wt.addOrUpdateProperties)||void 0===fr?void 0:fr.length)>0);if((Wt.newGeometry||Wt.removeAllProperties||Ar)&&(Xe=Object.assign({},Xe),u.set(Wt.id,Xe),Ar&&(Xe.properties=Object.assign({},Xe.properties))),Wt.newGeometry&&(Xe.geometry=Wt.newGeometry),Wt.removeAllProperties)Xe.properties={};else if((null===(_r=Wt.removeProperties)||void 0===_r?void 0:_r.length)>0)for(const u of Wt.removeProperties)Object.prototype.hasOwnProperty.call(Xe.properties,u)&&delete Xe.properties[u];if((null===(wr=Wt.addOrUpdateProperties)||void 0===wr?void 0:wr.length)>0)for(const{key:u,value:In}of Wt.addOrUpdateProperties)Xe.properties[u]=In}}(this._dataUpdateable,Xe.dataDiff,In),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(Xe){return u._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(u){return this._geoJSONIndex.getClusterExpansionZoom(u.clusterId)}getClusterChildren(u){return this._geoJSONIndex.getChildren(u.clusterId)}getClusterLeaves(u){return this._geoJSONIndex.getLeaves(u.clusterId,u.limit,u.offset)}}class ve{constructor(Xe){this.self=Xe,this.actor=new u.F(Xe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(u,Xe)=>{if(this.externalWorkerSourceTypes[u])throw new Error(`Worker source with name "${u}" already registered.`);this.externalWorkerSourceTypes[u]=Xe},this.self.addProtocol=u.bi,this.self.removeProtocol=u.bj,this.self.registerRTLTextPlugin=Xe=>{if(u.bD.isParsed())throw new Error("RTL text plugin already registered.");u.bD.setMethods(Xe)},this.actor.registerMessageHandler("LDT",((u,Xe)=>this._getDEMWorkerSource(u,Xe.source).loadTile(Xe))),this.actor.registerMessageHandler("RDT",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(Xe,Wt.source).removeTile(Wt)})))),this.actor.registerMessageHandler("GCEZ",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,Wt.type,Wt.source).getClusterExpansionZoom(Wt)})))),this.actor.registerMessageHandler("GCC",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,Wt.type,Wt.source).getClusterChildren(Wt)})))),this.actor.registerMessageHandler("GCL",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,Wt.type,Wt.source).getClusterLeaves(Wt)})))),this.actor.registerMessageHandler("LD",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).loadData(Xe))),this.actor.registerMessageHandler("GD",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).getData())),this.actor.registerMessageHandler("LT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).loadTile(Xe))),this.actor.registerMessageHandler("RT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).reloadTile(Xe))),this.actor.registerMessageHandler("AT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).abortTile(Xe))),this.actor.registerMessageHandler("RMT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).removeTile(Xe))),this.actor.registerMessageHandler("RS",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){if(!this.workerSources[Xe]||!this.workerSources[Xe][Wt.type]||!this.workerSources[Xe][Wt.type][Wt.source])return;const u=this.workerSources[Xe][Wt.type][Wt.source];delete this.workerSources[Xe][Wt.type][Wt.source],void 0!==u.removeSource&&u.removeSource(Wt)})))),this.actor.registerMessageHandler("RM",(Xe=>u._(this,void 0,void 0,(function*(){delete this.layerIndexes[Xe],delete this.availableImages[Xe],delete this.workerSources[Xe],delete this.demWorkerSources[Xe]})))),this.actor.registerMessageHandler("SR",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){this.referrer=Wt})))),this.actor.registerMessageHandler("SRPS",((u,Xe)=>this._syncRTLPluginState(u,Xe))),this.actor.registerMessageHandler("IS",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){this.self.importScripts(Wt)})))),this.actor.registerMessageHandler("SI",((u,Xe)=>this._setImages(u,Xe))),this.actor.registerMessageHandler("UL",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){this._getLayerIndex(Xe).update(Wt.layers,Wt.removedIds)})))),this.actor.registerMessageHandler("SL",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){this._getLayerIndex(Xe).replace(Wt)}))))}_setImages(Xe,Wt){return u._(this,void 0,void 0,(function*(){this.availableImages[Xe]=Wt;for(const u in this.workerSources[Xe]){const In=this.workerSources[Xe][u];for(const u in In)In[u].availableImages=Wt}}))}_syncRTLPluginState(Xe,Wt){return u._(this,void 0,void 0,(function*(){if(u.bD.isParsed())return u.bD.getState();if("loading"!==Wt.pluginStatus)return u.bD.setState(Wt),Wt;const Xe=Wt.pluginURL;if(this.self.importScripts(Xe),u.bD.isParsed()){const Wt={pluginStatus:"loaded",pluginURL:Xe};return u.bD.setState(Wt),Wt}throw u.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Xe}`)}))}_getAvailableImages(u){let Xe=this.availableImages[u];return Xe||(Xe=[]),Xe}_getLayerIndex(u){let Xe=this.layerIndexes[u];return Xe||(Xe=this.layerIndexes[u]=new t),Xe}_getWorkerSource(u,Xe,Wt){if(this.workerSources[u]||(this.workerSources[u]={}),this.workerSources[u][Xe]||(this.workerSources[u][Xe]={}),!this.workerSources[u][Xe][Wt]){const In={sendAsync:(Xe,Wt)=>(Xe.targetMapId=u,this.actor.sendAsync(Xe,Wt))};switch(Xe){case"vector":this.workerSources[u][Xe][Wt]=new r(In,this._getLayerIndex(u),this._getAvailableImages(u));break;case"geojson":this.workerSources[u][Xe][Wt]=new ye(In,this._getLayerIndex(u),this._getAvailableImages(u));break;default:this.workerSources[u][Xe][Wt]=new this.externalWorkerSourceTypes[Xe](In,this._getLayerIndex(u),this._getAvailableImages(u))}}return this.workerSources[u][Xe][Wt]}_getDEMWorkerSource(u,Xe){return this.demWorkerSources[u]||(this.demWorkerSources[u]={}),this.demWorkerSources[u][Xe]||(this.demWorkerSources[u][Xe]=new n),this.demWorkerSources[u][Xe]}}return u.i(self)&&(self.worker=new ve(self)),ve})),define("index",["exports","./shared"],(function(u,Xe){var Wt="4.7.1";let In,fr;const _r={now:"undefined"!=typeof performance&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:u=>new Promise(((Wt,In)=>{const fr=requestAnimationFrame(Wt);u.signal.addEventListener("abort",(()=>{cancelAnimationFrame(fr),In(Xe.c())}))})),getImageData(u,Xe=0){return this.getImageCanvasContext(u).getImageData(-Xe,-Xe,u.width+2*Xe,u.height+2*Xe)},getImageCanvasContext(u){const Xe=window.document.createElement("canvas"),Wt=Xe.getContext("2d",{willReadFrequently:!0});if(!Wt)throw new Error("failed to create canvas 2d context");return Xe.width=u.width,Xe.height=u.height,Wt.drawImage(u,0,0,u.width,u.height),Wt},resolveURL:u=>(In||(In=document.createElement("a")),In.href=u,In.href),hardwareConcurrency:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==fr&&(fr=matchMedia("(prefers-reduced-motion: reduce)")),fr.matches)}};class r{static testProp(u){if(!r.docStyle)return u[0];for(let Xe=0;Xe<u.length;Xe++)if(u[Xe]in r.docStyle)return u[Xe];return u[0]}static create(u,Xe,Wt){const In=window.document.createElement(u);return void 0!==Xe&&(In.className=Xe),Wt&&Wt.appendChild(In),In}static createNS(u,Xe){return window.document.createElementNS(u,Xe)}static disableDrag(){r.docStyle&&r.selectProp&&(r.userSelect=r.docStyle[r.selectProp],r.docStyle[r.selectProp]="none")}static enableDrag(){r.docStyle&&r.selectProp&&(r.docStyle[r.selectProp]=r.userSelect)}static setTransform(u,Xe){u.style[r.transformProp]=Xe}static addEventListener(u,Xe,Wt,In={}){u.addEventListener(Xe,Wt,"passive"in In?In:In.capture)}static removeEventListener(u,Xe,Wt,In={}){u.removeEventListener(Xe,Wt,"passive"in In?In:In.capture)}static suppressClickInternal(u){u.preventDefault(),u.stopPropagation(),window.removeEventListener("click",r.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",r.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",r.suppressClickInternal,!0)}),0)}static getScale(u){const Xe=u.getBoundingClientRect();return{x:Xe.width/u.offsetWidth||1,y:Xe.height/u.offsetHeight||1,boundingClientRect:Xe}}static getPoint(u,Wt,In){const fr=Wt.boundingClientRect;return new Xe.P((In.clientX-fr.left)/Wt.x-u.clientLeft,(In.clientY-fr.top)/Wt.y-u.clientTop)}static mousePos(u,Xe){const Wt=r.getScale(u);return r.getPoint(u,Wt,Xe)}static touchPos(u,Xe){const Wt=[],In=r.getScale(u);for(let fr=0;fr<Xe.length;fr++)Wt.push(r.getPoint(u,In,Xe[fr]));return Wt}static mouseButton(u){return u.button}static remove(u){u.parentNode&&u.parentNode.removeChild(u)}}r.docStyle="undefined"!=typeof window&&window.document&&window.document.documentElement.style,r.selectProp=r.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),r.transformProp=r.testProp(["transform","WebkitTransform"]);const wr={supported:!1,testSupport:function(u){!no&&Kr&&(io?d(u):Ar=u)}};let Ar,Kr,no=!1,io=!1;function d(u){const Xe=u.createTexture();u.bindTexture(u.TEXTURE_2D,Xe);try{if(u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,Kr),u.isContextLost())return;wr.supported=!0}catch(u){}u.deleteTexture(Xe),no=!0}var oo;"undefined"!=typeof document&&(Kr=document.createElement("img"),Kr.onload=()=>{Ar&&d(Ar),Ar=null,io=!0},Kr.onerror=()=>{no=!0,Ar=null},Kr.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(u){let Wt,In,fr,_r;u.resetRequestQueue=()=>{Wt=[],In=0,fr=0,_r={}},u.addThrottleControl=u=>{const Xe=fr++;return _r[Xe]=u,Xe},u.removeThrottleControl=u=>{delete _r[u],l()},u.getImage=(u,In,fr=!0)=>new Promise(((_r,Ar)=>{wr.supported&&(u.headers||(u.headers={}),u.headers.accept="image/webp,*/*"),Xe.e(u,{type:"image"}),Wt.push({abortController:In,requestParameters:u,supportImageRefresh:fr,state:"queued",onError:u=>{Ar(u)},onSuccess:u=>{_r(u)}}),l()}));const r=u=>Xe._(this,void 0,void 0,(function*(){u.state="running";const{requestParameters:Wt,supportImageRefresh:fr,onError:_r,onSuccess:wr,abortController:Ar}=u,Kr=!1===fr&&!Xe.i(self)&&!Xe.g(Wt.url)&&(!Wt.headers||Object.keys(Wt.headers).reduce(((u,Xe)=>u&&"accept"===Xe),!0));In++;const no=Kr?h(Wt,Ar):Xe.m(Wt,Ar);try{const Wt=yield no;delete u.abortController,u.state="completed",Wt.data instanceof HTMLImageElement||Xe.b(Wt.data)?wr(Wt):Wt.data&&wr({data:yield(io=Wt.data,"function"==typeof createImageBitmap?Xe.d(io):Xe.f(io)),cacheControl:Wt.cacheControl,expires:Wt.expires})}catch(Xe){delete u.abortController,_r(Xe)}finally{In--,l()}var io})),l=()=>{const u=(()=>{for(const u of Object.keys(_r))if(_r[u]())return!0;return!1})()?Xe.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:Xe.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Xe=In;Xe<u&&Wt.length>0;Xe++){const u=Wt.shift();u.abortController.signal.aborted?Xe--:r(u)}},h=(u,Wt)=>new Promise(((In,fr)=>{const _r=new Image,wr=u.url,Ar=u.credentials;Ar&&"include"===Ar?_r.crossOrigin="use-credentials":(Ar&&"same-origin"===Ar||!Xe.s(wr))&&(_r.crossOrigin="anonymous"),Wt.signal.addEventListener("abort",(()=>{_r.src="",fr(Xe.c())})),_r.fetchPriority="high",_r.onload=()=>{_r.onerror=_r.onload=null,In({data:_r})},_r.onerror=()=>{_r.onerror=_r.onload=null,Wt.signal.aborted||fr(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."))},_r.src=wr}))}(oo||(oo={})),oo.resetRequestQueue();class p{constructor(u){this._transformRequestFn=u}transformRequest(u,Xe){return this._transformRequestFn&&this._transformRequestFn(u,Xe)||{url:u}}setTransformRequest(u){this._transformRequestFn=u}}function m(u){var Wt=new Xe.A(3);return Wt[0]=u[0],Wt[1]=u[1],Wt[2]=u[2],Wt}var ao,g=function(u,Xe,Wt){return u[0]=Xe[0]-Wt[0],u[1]=Xe[1]-Wt[1],u[2]=Xe[2]-Wt[2],u};ao=new Xe.A(3),Xe.A!=Float32Array&&(ao[0]=0,ao[1]=0,ao[2]=0);var v=function(u){var Xe=u[0],Wt=u[1];return Xe*Xe+Wt*Wt};function x(u){const Xe=[];if("string"==typeof u)Xe.push({id:"default",url:u});else if(u&&u.length>0){const Wt=[];for(const{id:In,url:fr}of u){const u=`${In}${fr}`;-1===Wt.indexOf(u)&&(Wt.push(u),Xe.push({id:In,url:fr}))}}return Xe}function y(u,Xe,Wt){const In=u.split("?");return In[0]+=`${Xe}${Wt}`,In.join("?")}!function(){var u=new Xe.A(2);Xe.A!=Float32Array&&(u[0]=0,u[1]=0)}();class b{constructor(u,Xe,Wt,In){this.context=u,this.format=Wt,this.texture=u.gl.createTexture(),this.update(Xe,In)}update(u,Wt,In){const{width:fr,height:_r}=u,wr=!(this.size&&this.size[0]===fr&&this.size[1]===_r||In),{context:Ar}=this,{gl:Kr}=Ar;if(this.useMipmap=Boolean(Wt&&Wt.useMipmap),Kr.bindTexture(Kr.TEXTURE_2D,this.texture),Ar.pixelStoreUnpackFlipY.set(!1),Ar.pixelStoreUnpack.set(1),Ar.pixelStoreUnpackPremultiplyAlpha.set(this.format===Kr.RGBA&&(!Wt||!1!==Wt.premultiply)),wr)this.size=[fr,_r],u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||Xe.b(u)?Kr.texImage2D(Kr.TEXTURE_2D,0,this.format,this.format,Kr.UNSIGNED_BYTE,u):Kr.texImage2D(Kr.TEXTURE_2D,0,this.format,fr,_r,0,this.format,Kr.UNSIGNED_BYTE,u.data);else{const{x:Wt,y:wr}=In||{x:0,y:0};u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||Xe.b(u)?Kr.texSubImage2D(Kr.TEXTURE_2D,0,Wt,wr,Kr.RGBA,Kr.UNSIGNED_BYTE,u):Kr.texSubImage2D(Kr.TEXTURE_2D,0,Wt,wr,fr,_r,Kr.RGBA,Kr.UNSIGNED_BYTE,u.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Kr.generateMipmap(Kr.TEXTURE_2D)}bind(u,Xe,Wt){const{context:In}=this,{gl:fr}=In;fr.bindTexture(fr.TEXTURE_2D,this.texture),Wt!==fr.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Wt=fr.LINEAR),u!==this.filter&&(fr.texParameteri(fr.TEXTURE_2D,fr.TEXTURE_MAG_FILTER,u),fr.texParameteri(fr.TEXTURE_2D,fr.TEXTURE_MIN_FILTER,Wt||u),this.filter=u),Xe!==this.wrap&&(fr.texParameteri(fr.TEXTURE_2D,fr.TEXTURE_WRAP_S,Xe),fr.texParameteri(fr.TEXTURE_2D,fr.TEXTURE_WRAP_T,Xe),this.wrap=Xe)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:u}=this.context;u.deleteTexture(this.texture),this.texture=null}}function w(u){const{userImage:Xe}=u;return!!(Xe&&Xe.render&&Xe.render())&&(u.data.replace(new Uint8Array(Xe.data.buffer)),!0)}class T extends Xe.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new Xe.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(u){if(this.loaded!==u&&(this.loaded=u,u)){for(const{ids:u,promiseResolve:Xe}of this.requestors)Xe(this._getImagesForIds(u));this.requestors=[]}}getImage(u){const Wt=this.images[u];if(Wt&&!Wt.data&&Wt.spriteData){const u=Wt.spriteData;Wt.data=new Xe.R({width:u.width,height:u.height},u.context.getImageData(u.x,u.y,u.width,u.height).data),Wt.spriteData=null}return Wt}addImage(u,Xe){if(this.images[u])throw new Error(`Image id ${u} already exist, use updateImage instead`);this._validate(u,Xe)&&(this.images[u]=Xe)}_validate(u,Wt){let In=!0;const fr=Wt.data||Wt.spriteData;return this._validateStretch(Wt.stretchX,fr&&fr.width)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "stretchX" value`))),In=!1),this._validateStretch(Wt.stretchY,fr&&fr.height)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "stretchY" value`))),In=!1),this._validateContent(Wt.content,Wt)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "content" value`))),In=!1),In}_validateStretch(u,Xe){if(!u)return!0;let Wt=0;for(const In of u){if(In[0]<Wt||In[1]<In[0]||Xe<In[1])return!1;Wt=In[1]}return!0}_validateContent(u,Xe){if(!u)return!0;if(4!==u.length)return!1;const Wt=Xe.spriteData,In=Wt&&Wt.width||Xe.data.width,fr=Wt&&Wt.height||Xe.data.height;return!(u[0]<0||In<u[0]||u[1]<0||fr<u[1]||u[2]<0||In<u[2]||u[3]<0||fr<u[3]||u[2]<u[0]||u[3]<u[1])}updateImage(u,Xe,Wt=!0){const In=this.getImage(u);if(Wt&&(In.data.width!==Xe.data.width||In.data.height!==Xe.data.height))throw new Error(`size mismatch between old image (${In.data.width}x${In.data.height}) and new image (${Xe.data.width}x${Xe.data.height}).`);Xe.version=In.version+1,this.images[u]=Xe,this.updatedImages[u]=!0}removeImage(u){const Xe=this.images[u];delete this.images[u],delete this.patterns[u],Xe.userImage&&Xe.userImage.onRemove&&Xe.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(u){return new Promise(((Xe,Wt)=>{let In=!0;if(!this.isLoaded())for(const Xe of u)this.images[Xe]||(In=!1);this.isLoaded()||In?Xe(this._getImagesForIds(u)):this.requestors.push({ids:u,promiseResolve:Xe})}))}_getImagesForIds(u){const Wt={};for(const In of u){let u=this.getImage(In);u||(this.fire(new Xe.k("styleimagemissing",{id:In})),u=this.getImage(In)),u?Wt[In]={data:u.data.clone(),pixelRatio:u.pixelRatio,sdf:u.sdf,version:u.version,stretchX:u.stretchX,stretchY:u.stretchY,content:u.content,textFitWidth:u.textFitWidth,textFitHeight:u.textFitHeight,hasRenderCallback:Boolean(u.userImage&&u.userImage.render)}:Xe.w(`Image "${In}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return Wt}getPixelSize(){const{width:u,height:Xe}=this.atlasImage;return{width:u,height:Xe}}getPattern(u){const Wt=this.patterns[u],In=this.getImage(u);if(!In)return null;if(Wt&&Wt.position.version===In.version)return Wt.position;if(Wt)Wt.position.version=In.version;else{const Wt={w:In.data.width+2,h:In.data.height+2,x:0,y:0},fr=new Xe.I(Wt,In);this.patterns[u]={bin:Wt,position:fr}}return this._updatePatternAtlas(),this.patterns[u].position}bind(u){const Xe=u.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new b(u,this.atlasImage,Xe.RGBA),this.atlasTexture.bind(Xe.LINEAR,Xe.CLAMP_TO_EDGE)}_updatePatternAtlas(){const u=[];for(const Xe in this.patterns)u.push(this.patterns[Xe].bin);const{w:Wt,h:In}=Xe.p(u),fr=this.atlasImage;fr.resize({width:Wt||1,height:In||1});for(const u in this.patterns){const{bin:Wt}=this.patterns[u],In=Wt.x+1,_r=Wt.y+1,wr=this.getImage(u).data,Ar=wr.width,Kr=wr.height;Xe.R.copy(wr,fr,{x:0,y:0},{x:In,y:_r},{width:Ar,height:Kr}),Xe.R.copy(wr,fr,{x:0,y:Kr-1},{x:In,y:_r-1},{width:Ar,height:1}),Xe.R.copy(wr,fr,{x:0,y:0},{x:In,y:_r+Kr},{width:Ar,height:1}),Xe.R.copy(wr,fr,{x:Ar-1,y:0},{x:In-1,y:_r},{width:1,height:Kr}),Xe.R.copy(wr,fr,{x:0,y:0},{x:In+Ar,y:_r},{width:1,height:Kr})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(u){for(const Wt of u){if(this.callbackDispatchedThisFrame[Wt])continue;this.callbackDispatchedThisFrame[Wt]=!0;const u=this.getImage(Wt);u||Xe.w(`Image with ID: "${Wt}" was not found`),w(u)&&this.updateImage(Wt,u)}}}const so=1e20;function E(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){for(let no=Xe;no<Xe+In;no++)P(u,Wt*_r+no,_r,fr,wr,Ar,Kr);for(let no=Wt;no<Wt+fr;no++)P(u,no*_r+Xe,1,In,wr,Ar,Kr)}function P(u,Xe,Wt,In,fr,_r,wr){_r[0]=0,wr[0]=-so,wr[1]=so,fr[0]=u[Xe];for(let Ar=1,Kr=0,no=0;Ar<In;Ar++){fr[Ar]=u[Xe+Ar*Wt];const In=Ar*Ar;do{const u=_r[Kr];no=(fr[Ar]-fr[u]+In-u*u)/(Ar-u)/2}while(no<=wr[Kr]&&--Kr>-1);Kr++,_r[Kr]=Ar,wr[Kr]=no,wr[Kr+1]=so}for(let Ar=0,Kr=0;Ar<In;Ar++){for(;wr[Kr+1]<Ar;)Kr++;const In=_r[Kr],no=Ar-In;u[Xe+Ar*Wt]=fr[In]+no*no}}class C{constructor(u,Xe){this.requestManager=u,this.localIdeographFontFamily=Xe,this.entries={}}setURL(u){this.url=u}getGlyphs(u){return Xe._(this,void 0,void 0,(function*(){const Xe=[];for(const Wt in u)for(const In of u[Wt])Xe.push(this._getAndCacheGlyphsPromise(Wt,In));const Wt=yield Promise.all(Xe),In={};for(const{stack:u,id:Xe,glyph:fr}of Wt)In[u]||(In[u]={}),In[u][Xe]=fr&&{id:fr.id,bitmap:fr.bitmap.clone(),metrics:fr.metrics};return In}))}_getAndCacheGlyphsPromise(u,Wt){return Xe._(this,void 0,void 0,(function*(){let Xe=this.entries[u];Xe||(Xe=this.entries[u]={glyphs:{},requests:{},ranges:{}});let In=Xe.glyphs[Wt];if(void 0!==In)return{stack:u,id:Wt,glyph:In};if(In=this._tinySDF(Xe,u,Wt),In)return Xe.glyphs[Wt]=In,{stack:u,id:Wt,glyph:In};const fr=Math.floor(Wt/256);if(256*fr>65535)throw new Error("glyphs > 65535 not supported");if(Xe.ranges[fr])return{stack:u,id:Wt,glyph:In};if(!this.url)throw new Error("glyphsUrl is not set");if(!Xe.requests[fr]){const Wt=C.loadGlyphRange(u,fr,this.url,this.requestManager);Xe.requests[fr]=Wt}const _r=yield Xe.requests[fr];for(const u in _r)this._doesCharSupportLocalGlyph(+u)||(Xe.glyphs[+u]=_r[+u]);return Xe.ranges[fr]=!0,{stack:u,id:Wt,glyph:_r[Wt]||null}}))}_doesCharSupportLocalGlyph(u){return!!this.localIdeographFontFamily&&/\p{Ideo}|\p{sc=Hang}|\p{sc=Hira}|\p{sc=Kana}/u.test(String.fromCodePoint(u))}_tinySDF(u,Wt,In){const fr=this.localIdeographFontFamily;if(!fr)return;if(!this._doesCharSupportLocalGlyph(In))return;let _r=u.tinySDF;if(!_r){let Xe="400";/bold/i.test(Wt)?Xe="900":/medium/i.test(Wt)?Xe="500":/light/i.test(Wt)&&(Xe="200"),_r=u.tinySDF=new C.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:fr,fontWeight:Xe})}const wr=_r.draw(String.fromCharCode(In));return{id:In,bitmap:new Xe.o({width:wr.width||60,height:wr.height||60},wr.data),metrics:{width:wr.glyphWidth/2||24,height:wr.glyphHeight/2||24,left:wr.glyphLeft/2+.5||0,top:wr.glyphTop/2-27.5||-8,advance:wr.glyphAdvance/2||24,isDoubleResolution:!0}}}}C.loadGlyphRange=function(u,Wt,In,fr){return Xe._(this,void 0,void 0,(function*(){const _r=256*Wt,wr=_r+255,Ar=fr.transformRequest(In.replace("{fontstack}",u).replace("{range}",`${_r}-${wr}`),"Glyphs"),Kr=yield Xe.l(Ar,new AbortController);if(!Kr||!Kr.data)throw new Error(`Could not load glyph range. range: ${Wt}, ${_r}-${wr}`);const no={};for(const u of Xe.n(Kr.data))no[u.id]=u;return no}))},C.TinySDF=class{constructor({fontSize:u=24,buffer:Xe=3,radius:Wt=8,cutoff:In=.25,fontFamily:fr="sans-serif",fontWeight:_r="normal",fontStyle:wr="normal"}={}){this.buffer=Xe,this.cutoff=In,this.radius=Wt;const Ar=this.size=u+4*Xe,Kr=this._createCanvas(Ar),no=this.ctx=Kr.getContext("2d",{willReadFrequently:!0});no.font=`${wr} ${_r} ${u}px ${fr}`,no.textBaseline="alphabetic",no.textAlign="left",no.fillStyle="black",this.gridOuter=new Float64Array(Ar*Ar),this.gridInner=new Float64Array(Ar*Ar),this.f=new Float64Array(Ar),this.z=new Float64Array(Ar+1),this.v=new Uint16Array(Ar)}_createCanvas(u){const Xe=document.createElement("canvas");return Xe.width=Xe.height=u,Xe}draw(u){const{width:Xe,actualBoundingBoxAscent:Wt,actualBoundingBoxDescent:In,actualBoundingBoxLeft:fr,actualBoundingBoxRight:_r}=this.ctx.measureText(u),wr=Math.ceil(Wt),Ar=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(_r-fr))),Kr=Math.min(this.size-this.buffer,wr+Math.ceil(In)),no=Ar+2*this.buffer,io=Kr+2*this.buffer,oo=Math.max(no*io,0),ao=new Uint8ClampedArray(oo),co={data:ao,width:no,height:io,glyphWidth:Ar,glyphHeight:Kr,glyphTop:wr,glyphLeft:0,glyphAdvance:Xe};if(0===Ar||0===Kr)return co;const{ctx:ho,buffer:go,gridInner:xo,gridOuter:ko}=this;ho.clearRect(go,go,Ar,Kr),ho.fillText(u,go,go+wr);const Co=ho.getImageData(go,go,Ar,Kr);ko.fill(so,0,oo),xo.fill(0,0,oo);for(let u=0;u<Kr;u++)for(let Xe=0;Xe<Ar;Xe++){const Wt=Co.data[4*(u*Ar+Xe)+3]/255;if(0===Wt)continue;const In=(u+go)*no+Xe+go;if(1===Wt)ko[In]=0,xo[In]=so;else{const u=.5-Wt;ko[In]=u>0?u*u:0,xo[In]=u<0?u*u:0}}E(ko,0,0,no,io,no,this.f,this.v,this.z),E(xo,go,go,Ar,Kr,no,this.f,this.v,this.z);for(let u=0;u<oo;u++){const Xe=Math.sqrt(ko[u])-Math.sqrt(xo[u]);ao[u]=Math.round(255-255*(Xe/this.radius+this.cutoff))}return co}};class S{constructor(){this.specification=Xe.v.light.position}possiblyEvaluate(u,Wt){return Xe.x(u.expression.evaluate(Wt))}interpolate(u,Wt,In){return{x:Xe.y.number(u.x,Wt.x,In),y:Xe.y.number(u.y,Wt.y,In),z:Xe.y.number(u.z,Wt.z,In)}}}let co;class D extends Xe.E{constructor(u){super(),co=co||new Xe.q({anchor:new Xe.D(Xe.v.light.anchor),position:new S,color:new Xe.D(Xe.v.light.color),intensity:new Xe.D(Xe.v.light.intensity)}),this._transitionable=new Xe.T(co),this.setLight(u),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(u,Wt={}){if(!this._validate(Xe.r,u,Wt))for(const Xe in u){const Wt=u[Xe];Xe.endsWith("-transition")?this._transitionable.setTransition(Xe.slice(0,-11),Wt):this._transitionable.setValue(Xe,Wt)}}updateTransitions(u){this._transitioning=this._transitionable.transitioned(u,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(u){this.properties=this._transitioning.possiblyEvaluate(u)}_validate(u,Wt,In){return(!In||!1!==In.validate)&&Xe.t(this,u.call(Xe.u,{value:Wt,style:{glyphs:!0,sprite:!0},styleSpec:Xe.v}))}}const ho=new Xe.q({"sky-color":new Xe.D(Xe.v.sky["sky-color"]),"horizon-color":new Xe.D(Xe.v.sky["horizon-color"]),"fog-color":new Xe.D(Xe.v.sky["fog-color"]),"fog-ground-blend":new Xe.D(Xe.v.sky["fog-ground-blend"]),"horizon-fog-blend":new Xe.D(Xe.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new Xe.D(Xe.v.sky["sky-horizon-blend"]),"atmosphere-blend":new Xe.D(Xe.v.sky["atmosphere-blend"])});class A extends Xe.E{constructor(u){super(),this._transitionable=new Xe.T(ho),this.setSky(u),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new Xe.z(0))}setSky(u,Wt={}){if(!this._validate(Xe.B,u,Wt)){u||(u={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const Xe in u){const Wt=u[Xe];Xe.endsWith("-transition")?this._transitionable.setTransition(Xe.slice(0,-11),Wt):this._transitionable.setValue(Xe,Wt)}}}getSky(){return this._transitionable.serialize()}updateTransitions(u){this._transitioning=this._transitionable.transitioned(u,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(u){this.properties=this._transitioning.possiblyEvaluate(u)}_validate(u,Wt,In={}){return!1!==(null==In?void 0:In.validate)&&Xe.t(this,u.call(Xe.u,Xe.e({value:Wt,style:{glyphs:!0,sprite:!0},styleSpec:Xe.v})))}calculateFogBlendOpacity(u){return u<60?0:u<70?(u-60)/10:1}}class R{constructor(u,Xe){this.width=u,this.height=Xe,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(u,Xe){const Wt=u.join(",")+String(Xe);return this.dashEntry[Wt]||(this.dashEntry[Wt]=this.addDash(u,Xe)),this.dashEntry[Wt]}getDashRanges(u,Xe,Wt){const In=[];let fr=u.length%2==1?-u[u.length-1]*Wt:0,_r=u[0]*Wt,wr=!0;In.push({left:fr,right:_r,isDash:wr,zeroLength:0===u[0]});let Ar=u[0];for(let Xe=1;Xe<u.length;Xe++){wr=!wr;const Kr=u[Xe];fr=Ar*Wt,Ar+=Kr,_r=Ar*Wt,In.push({left:fr,right:_r,isDash:wr,zeroLength:0===Kr})}return In}addRoundDash(u,Xe,Wt){const In=Xe/2;for(let Xe=-Wt;Xe<=Wt;Xe++){const fr=this.width*(this.nextRow+Wt+Xe);let _r=0,wr=u[_r];for(let Ar=0;Ar<this.width;Ar++){Ar/wr.right>1&&(wr=u[++_r]);const Kr=Math.abs(Ar-wr.left),no=Math.abs(Ar-wr.right),io=Math.min(Kr,no);let oo;const ao=Xe/Wt*(In+1);if(wr.isDash){const u=In-Math.abs(ao);oo=Math.sqrt(io*io+u*u)}else oo=In-Math.sqrt(io*io+ao*ao);this.data[fr+Ar]=Math.max(0,Math.min(255,oo+128))}}}addRegularDash(u){for(let Xe=u.length-1;Xe>=0;--Xe){const Wt=u[Xe],In=u[Xe+1];Wt.zeroLength?u.splice(Xe,1):In&&In.isDash===Wt.isDash&&(In.left=Wt.left,u.splice(Xe,1))}const Xe=u[0],Wt=u[u.length-1];Xe.isDash===Wt.isDash&&(Xe.left=Wt.left-this.width,Wt.right=Xe.right+this.width);const In=this.width*this.nextRow;let fr=0,_r=u[fr];for(let Xe=0;Xe<this.width;Xe++){Xe/_r.right>1&&(_r=u[++fr]);const Wt=Math.abs(Xe-_r.left),wr=Math.abs(Xe-_r.right),Ar=Math.min(Wt,wr);this.data[In+Xe]=Math.max(0,Math.min(255,(_r.isDash?Ar:-Ar)+128))}}addDash(u,Wt){const In=Wt?7:0,fr=2*In+1;if(this.nextRow+fr>this.height)return Xe.w("LineAtlas out of space"),null;let _r=0;for(let Xe=0;Xe<u.length;Xe++)_r+=u[Xe];if(0!==_r){const Xe=this.width/_r,fr=this.getDashRanges(u,this.width,Xe);Wt?this.addRoundDash(fr,Xe,In):this.addRegularDash(fr)}const wr={y:(this.nextRow+In+.5)/this.height,height:2*In/this.height,width:_r};return this.nextRow+=fr,this.dirty=!0,wr}bind(u){const Xe=u.gl;this.texture?(Xe.bindTexture(Xe.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,Xe.texSubImage2D(Xe.TEXTURE_2D,0,0,0,this.width,this.height,Xe.ALPHA,Xe.UNSIGNED_BYTE,this.data))):(this.texture=Xe.createTexture(),Xe.bindTexture(Xe.TEXTURE_2D,this.texture),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_WRAP_S,Xe.REPEAT),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_WRAP_T,Xe.REPEAT),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_MIN_FILTER,Xe.LINEAR),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_MAG_FILTER,Xe.LINEAR),Xe.texImage2D(Xe.TEXTURE_2D,0,Xe.ALPHA,this.width,this.height,0,Xe.ALPHA,Xe.UNSIGNED_BYTE,this.data))}}const go="maplibre_preloaded_worker_pool";class L{constructor(){this.active={}}acquire(u){if(!this.workers)for(this.workers=[];this.workers.length<L.workerCount;)this.workers.push(new Worker(Xe.a.WORKER_URL));return this.active[u]=!0,this.workers.slice()}release(u){delete this.active[u],0===this.numActive()&&(this.workers.forEach((u=>{u.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[go]}numActive(){return Object.keys(this.active).length}}const xo=Math.floor(_r.hardwareConcurrency/2);let ko,Co;function N(){return ko||(ko=new L),ko}L.workerCount=Xe.C(globalThis)?Math.max(Math.min(xo,3),1):1;class U{constructor(u,Wt){this.workerPool=u,this.actors=[],this.currentActor=0,this.id=Wt;const In=this.workerPool.acquire(Wt);for(let u=0;u<In.length;u++){const fr=new Xe.F(In[u],Wt);fr.name=`Worker ${u}`,this.actors.push(fr)}if(!this.actors.length)throw new Error("No actors found")}broadcast(u,Xe){const Wt=[];for(const In of this.actors)Wt.push(In.sendAsync({type:u,data:Xe}));return Promise.all(Wt)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(u=!0){this.actors.forEach((u=>{u.remove()})),this.actors=[],u&&this.workerPool.release(this.id)}registerMessageHandler(u,Xe){for(const Wt of this.actors)Wt.registerMessageHandler(u,Xe)}}function j(){return Co||(Co=new U(N(),Xe.G),Co.registerMessageHandler("GR",((u,Wt,In)=>Xe.m(Wt,In)))),Co}function Z(u,Wt){const In=Xe.H();return Xe.J(In,In,[1,1,0]),Xe.K(In,In,[.5*u.width,.5*u.height,1]),Xe.L(In,In,u.calculatePosMatrix(Wt.toUnwrapped()))}function q(u,Xe,Wt,In,fr,_r){const wr=function(u,Xe,Wt){if(u)for(const In of u){const u=Xe[In];if(u&&u.source===Wt&&"fill-extrusion"===u.type)return!0}else for(const u in Xe){const In=Xe[u];if(In.source===Wt&&"fill-extrusion"===In.type)return!0}return!1}(fr&&fr.layers,Xe,u.id),Ar=_r.maxPitchScaleFactor(),Kr=u.tilesIn(In,Ar,wr);Kr.sort(V);const no=[];for(const In of Kr)no.push({wrappedTileID:In.tileID.wrapped().key,queryResults:In.tile.queryRenderedFeatures(Xe,Wt,u._state,In.queryGeometry,In.cameraQueryGeometry,In.scale,fr,_r,Ar,Z(u.transform,In.tileID))});const io=function(u){const Xe={},Wt={};for(const In of u){const u=In.queryResults,fr=In.wrappedTileID,_r=Wt[fr]=Wt[fr]||{};for(const Wt in u){const In=u[Wt],fr=_r[Wt]=_r[Wt]||{},wr=Xe[Wt]=Xe[Wt]||[];for(const u of In)fr[u.featureIndex]||(fr[u.featureIndex]=!0,wr.push(u))}}return Xe}(no);for(const Xe in io)io[Xe].forEach((Xe=>{const Wt=Xe.feature,In=u.getFeatureState(Wt.layer["source-layer"],Wt.id);Wt.source=Wt.layer.source,Wt.layer["source-layer"]&&(Wt.sourceLayer=Wt.layer["source-layer"]),Wt.state=In}));return io}function V(u,Xe){const Wt=u.tileID,In=Xe.tileID;return Wt.overscaledZ-In.overscaledZ||Wt.canonical.y-In.canonical.y||Wt.wrap-In.wrap||Wt.canonical.x-In.canonical.x}function G(u,Wt,In){return Xe._(this,void 0,void 0,(function*(){let fr=u;if(u.url?fr=(yield Xe.h(Wt.transformRequest(u.url,"Source"),In)).data:yield _r.frameAsync(In),!fr)return null;const wr=Xe.M(Xe.e(fr,u),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in fr&&fr.vector_layers&&(wr.vectorLayerIds=fr.vector_layers.map((u=>u.id))),wr}))}class H{constructor(u,Xe){u&&(Xe?this.setSouthWest(u).setNorthEast(Xe):Array.isArray(u)&&(4===u.length?this.setSouthWest([u[0],u[1]]).setNorthEast([u[2],u[3]]):this.setSouthWest(u[0]).setNorthEast(u[1])))}setNorthEast(u){return this._ne=u instanceof Xe.N?new Xe.N(u.lng,u.lat):Xe.N.convert(u),this}setSouthWest(u){return this._sw=u instanceof Xe.N?new Xe.N(u.lng,u.lat):Xe.N.convert(u),this}extend(u){const Wt=this._sw,In=this._ne;let fr,_r;if(u instanceof Xe.N)fr=u,_r=u;else{if(!(u instanceof H))return Array.isArray(u)?4===u.length||u.every(Array.isArray)?this.extend(H.convert(u)):this.extend(Xe.N.convert(u)):u&&("lng"in u||"lon"in u)&&"lat"in u?this.extend(Xe.N.convert(u)):this;if(fr=u._sw,_r=u._ne,!fr||!_r)return this}return Wt||In?(Wt.lng=Math.min(fr.lng,Wt.lng),Wt.lat=Math.min(fr.lat,Wt.lat),In.lng=Math.max(_r.lng,In.lng),In.lat=Math.max(_r.lat,In.lat)):(this._sw=new Xe.N(fr.lng,fr.lat),this._ne=new Xe.N(_r.lng,_r.lat)),this}getCenter(){return new Xe.N((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 Xe.N(this.getWest(),this.getNorth())}getSouthEast(){return new Xe.N(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(u){const{lng:Wt,lat:In}=Xe.N.convert(u);let fr=this._sw.lng<=Wt&&Wt<=this._ne.lng;return this._sw.lng>this._ne.lng&&(fr=this._sw.lng>=Wt&&Wt>=this._ne.lng),this._sw.lat<=In&&In<=this._ne.lat&&fr}static convert(u){return u instanceof H?u:u?new H(u):u}static fromLngLat(u,Wt=0){const In=360*Wt/40075017,fr=In/Math.cos(Math.PI/180*u.lat);return new H(new Xe.N(u.lng-fr,u.lat-In),new Xe.N(u.lng+fr,u.lat+In))}adjustAntiMeridian(){const u=new Xe.N(this._sw.lng,this._sw.lat),Wt=new Xe.N(this._ne.lng,this._ne.lat);return new H(u,u.lng>Wt.lng?new Xe.N(Wt.lng+360,Wt.lat):Wt)}}class W{constructor(u,Xe,Wt){this.bounds=H.convert(this.validateBounds(u)),this.minzoom=Xe||0,this.maxzoom=Wt||24}validateBounds(u){return Array.isArray(u)&&4===u.length?[Math.max(-180,u[0]),Math.max(-90,u[1]),Math.min(180,u[2]),Math.min(90,u[3])]:[-180,-90,180,90]}contains(u){const Wt=Math.pow(2,u.z),In=Math.floor(Xe.O(this.bounds.getWest())*Wt),fr=Math.floor(Xe.Q(this.bounds.getNorth())*Wt),_r=Math.ceil(Xe.O(this.bounds.getEast())*Wt),wr=Math.ceil(Xe.Q(this.bounds.getSouth())*Wt);return u.x>=In&&u.x<_r&&u.y>=fr&&u.y<wr}}class $ extends Xe.E{constructor(u,Wt,In,fr){if(super(),this.id=u,this.dispatcher=In,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,Xe.e(this,Xe.M(Wt,["url","scheme","tileSize","promoteId"])),this._options=Xe.e({type:"vector"},Wt),this._collectResourceTiming=Wt.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(fr)}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const u=yield G(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),u&&(Xe.e(this,u),u.bounds&&(this.tileBounds=new W(u.bounds,this.minzoom,this.maxzoom)),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})))}catch(u){this._tileJSONRequest=null,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}onAdd(u){this.map=u,this.load()}setSourceProperty(u){this._tileJSONRequest&&this._tileJSONRequest.abort(),u(),this.load()}setTiles(u){return this.setSourceProperty((()=>{this._options.tiles=u})),this}setUrl(u){return this.setSourceProperty((()=>{this.url=u,this._options.url=u})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return Xe.e({},this._options)}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Wt={request:this.map._requestManager.transformRequest(Xe,"Tile"),uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,tileSize:this.tileSize*u.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Wt.request.collectResourceTiming=this._collectResourceTiming;let In="RT";if(u.actor&&"expired"!==u.state){if("loading"===u.state)return new Promise(((Xe,Wt)=>{u.reloadPromise={resolve:Xe,reject:Wt}}))}else u.actor=this.dispatcher.getActor(),In="LT";u.abortController=new AbortController;try{const Xe=yield u.actor.sendAsync({type:In,data:Wt},u.abortController);if(delete u.abortController,u.aborted)return;this._afterTileLoadWorkerResponse(u,Xe)}catch(Xe){if(delete u.abortController,u.aborted)return;if(Xe&&404!==Xe.status)throw Xe;this._afterTileLoadWorkerResponse(u,null)}}))}_afterTileLoadWorkerResponse(u,Xe){if(Xe&&Xe.resourceTiming&&(u.resourceTiming=Xe.resourceTiming),Xe&&this.map._refreshExpiredTiles&&u.setExpiryData(Xe),u.loadVectorData(Xe,this.map.painter),u.reloadPromise){const Xe=u.reloadPromise;u.reloadPromise=null,this.loadTile(u).then(Xe.resolve).catch(Xe.reject)}}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController),u.actor&&(yield u.actor.sendAsync({type:"AT",data:{uid:u.uid,type:this.type,source:this.id}}))}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.unloadVectorData(),u.actor&&(yield u.actor.sendAsync({type:"RMT",data:{uid:u.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class X extends Xe.E{constructor(u,Wt,In,fr){super(),this.id=u,this.dispatcher=In,this.setEventedParent(fr),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=Xe.e({type:"raster"},Wt),Xe.e(this,Xe.M(Wt,["url","scheme","tileSize"]))}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const u=yield G(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,u&&(Xe.e(this,u),u.bounds&&(this.tileBounds=new W(u.bounds,this.minzoom,this.maxzoom)),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})))}catch(u){this._tileJSONRequest=null,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}onAdd(u){this.map=u,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(u){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),u(),this.load()}setTiles(u){return this.setSourceProperty((()=>{this._options.tiles=u})),this}setUrl(u){return this.setSourceProperty((()=>{this.url=u,this._options.url=u})),this}serialize(){return Xe.e({},this._options)}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);u.abortController=new AbortController;try{const Wt=yield oo.getImage(this.map._requestManager.transformRequest(Xe,"Tile"),u.abortController,this.map._refreshExpiredTiles);if(delete u.abortController,u.aborted)return void(u.state="unloaded");if(Wt&&Wt.data){this.map._refreshExpiredTiles&&Wt.cacheControl&&Wt.expires&&u.setExpiryData({cacheControl:Wt.cacheControl,expires:Wt.expires});const Xe=this.map.painter.context,In=Xe.gl,fr=Wt.data;u.texture=this.map.painter.getTileTexture(fr.width),u.texture?u.texture.update(fr,{useMipmap:!0}):(u.texture=new b(Xe,fr,In.RGBA,{useMipmap:!0}),u.texture.bind(In.LINEAR,In.CLAMP_TO_EDGE,In.LINEAR_MIPMAP_NEAREST)),u.state="loaded"}}catch(Xe){if(delete u.abortController,u.aborted)u.state="unloaded";else if(Xe)throw u.state="errored",Xe}}))}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController)}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.texture&&this.map.painter.saveTileTexture(u.texture)}))}hasTransition(){return!1}}class K extends X{constructor(u,Wt,In,fr){super(u,Wt,In,fr),this.type="raster-dem",this.maxzoom=22,this._options=Xe.e({type:"raster-dem"},Wt),this.encoding=Wt.encoding||"mapbox",this.redFactor=Wt.redFactor,this.greenFactor=Wt.greenFactor,this.blueFactor=Wt.blueFactor,this.baseShift=Wt.baseShift}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Wt=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),In=this.map._requestManager.transformRequest(Wt,"Tile");u.neighboringTiles=this._getNeighboringTiles(u.tileID),u.abortController=new AbortController;try{const Wt=yield oo.getImage(In,u.abortController,this.map._refreshExpiredTiles);if(delete u.abortController,u.aborted)return void(u.state="unloaded");if(Wt&&Wt.data){const In=Wt.data;this.map._refreshExpiredTiles&&Wt.cacheControl&&Wt.expires&&u.setExpiryData({cacheControl:Wt.cacheControl,expires:Wt.expires});const fr=Xe.b(In)&&Xe.U()?In:yield this.readImageNow(In),_r={type:this.type,uid:u.uid,source:this.id,rawImageData:fr,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!u.actor||"expired"===u.state){u.actor=this.dispatcher.getActor();const Xe=yield u.actor.sendAsync({type:"LDT",data:_r});u.dem=Xe,u.needsHillshadePrepare=!0,u.needsTerrainPrepare=!0,u.state="loaded"}}}catch(Xe){if(delete u.abortController,u.aborted)u.state="unloaded";else if(Xe)throw u.state="errored",Xe}}))}readImageNow(u){return Xe._(this,void 0,void 0,(function*(){if("undefined"!=typeof VideoFrame&&Xe.V()){const Wt=u.width+2,In=u.height+2;try{return new Xe.R({width:Wt,height:In},yield Xe.W(u,-1,-1,Wt,In))}catch(u){}}return _r.getImageData(u,1)}))}_getNeighboringTiles(u){const Wt=u.canonical,In=Math.pow(2,Wt.z),fr=(Wt.x-1+In)%In,_r=0===Wt.x?u.wrap-1:u.wrap,wr=(Wt.x+1+In)%In,Ar=Wt.x+1===In?u.wrap+1:u.wrap,Kr={};return Kr[new Xe.S(u.overscaledZ,_r,Wt.z,fr,Wt.y).key]={backfilled:!1},Kr[new Xe.S(u.overscaledZ,Ar,Wt.z,wr,Wt.y).key]={backfilled:!1},Wt.y>0&&(Kr[new Xe.S(u.overscaledZ,_r,Wt.z,fr,Wt.y-1).key]={backfilled:!1},Kr[new Xe.S(u.overscaledZ,u.wrap,Wt.z,Wt.x,Wt.y-1).key]={backfilled:!1},Kr[new Xe.S(u.overscaledZ,Ar,Wt.z,wr,Wt.y-1).key]={backfilled:!1}),Wt.y+1<In&&(Kr[new Xe.S(u.overscaledZ,_r,Wt.z,fr,Wt.y+1).key]={backfilled:!1},Kr[new Xe.S(u.overscaledZ,u.wrap,Wt.z,Wt.x,Wt.y+1).key]={backfilled:!1},Kr[new Xe.S(u.overscaledZ,Ar,Wt.z,wr,Wt.y+1).key]={backfilled:!1}),Kr}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.demTexture&&this.map.painter.saveTileTexture(u.demTexture),u.fbo&&(u.fbo.destroy(),delete u.fbo),u.dem&&delete u.dem,delete u.neighboringTiles,u.state="unloaded",u.actor&&(yield u.actor.sendAsync({type:"RDT",data:{type:this.type,uid:u.uid,source:this.id}}))}))}}class J extends Xe.E{constructor(u,Wt,In,fr){super(),this.id=u,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=In.getActor(),this.setEventedParent(fr),this._data=Wt.data,this._options=Xe.e({},Wt),this._collectResourceTiming=Wt.collectResourceTiming,void 0!==Wt.maxzoom&&(this.maxzoom=Wt.maxzoom),Wt.type&&(this.type=Wt.type),Wt.attribution&&(this.attribution=Wt.attribution),this.promoteId=Wt.promoteId;const _r=Xe.X/this.tileSize;void 0!==Wt.clusterMaxZoom&&this.maxzoom<=Wt.clusterMaxZoom&&Xe.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${Wt.clusterMaxZoom}".`),this.workerOptions=Xe.e({source:this.id,cluster:Wt.cluster||!1,geojsonVtOptions:{buffer:(void 0!==Wt.buffer?Wt.buffer:128)*_r,tolerance:(void 0!==Wt.tolerance?Wt.tolerance:.375)*_r,extent:Xe.X,maxZoom:this.maxzoom,lineMetrics:Wt.lineMetrics||!1,generateId:Wt.generateId||!1},superclusterOptions:{maxZoom:void 0!==Wt.clusterMaxZoom?Wt.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,Wt.clusterMinPoints||2),extent:Xe.X,radius:(Wt.clusterRadius||50)*_r,log:!1,generateId:Wt.generateId||!1},clusterProperties:Wt.clusterProperties,filter:Wt.filter},Wt.workerOptions),"string"==typeof this.promoteId&&(this.workerOptions.promoteId=this.promoteId)}load(){return Xe._(this,void 0,void 0,(function*(){yield this._updateWorkerData()}))}onAdd(u){this.map=u,this.load()}setData(u){return this._data=u,this._updateWorkerData(),this}updateData(u){return this._updateWorkerData(u),this}getData(){return Xe._(this,void 0,void 0,(function*(){const u=Xe.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:u})}))}setClusterOptions(u){return this.workerOptions.cluster=u.cluster,u&&(void 0!==u.clusterRadius&&(this.workerOptions.superclusterOptions.radius=u.clusterRadius),void 0!==u.clusterMaxZoom&&(this.workerOptions.superclusterOptions.maxZoom=u.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(u){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:u,source:this.id}})}getClusterChildren(u){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:u,source:this.id}})}getClusterLeaves(u,Xe,Wt){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:u,limit:Xe,offset:Wt}})}_updateWorkerData(u){return Xe._(this,void 0,void 0,(function*(){const Wt=Xe.e({type:this.type},this.workerOptions);u?Wt.dataDiff=u:"string"==typeof this._data?(Wt.request=this.map._requestManager.transformRequest(_r.resolveURL(this._data),"Source"),Wt.request.collectResourceTiming=this._collectResourceTiming):Wt.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new Xe.k("dataloading",{dataType:"source"}));try{const u=yield this.actor.sendAsync({type:"LD",data:Wt});if(this._pendingLoads--,this._removed||u.abandoned)return void this.fire(new Xe.k("dataabort",{dataType:"source"}));let In=null;u.resourceTiming&&u.resourceTiming[this.id]&&(In=u.resourceTiming[this.id].slice(0));const fr={dataType:"source"};this._collectResourceTiming&&In&&In.length>0&&Xe.e(fr,{resourceTiming:In}),this.fire(new Xe.k("data",Object.assign(Object.assign({},fr),{sourceDataType:"metadata"}))),this.fire(new Xe.k("data",Object.assign(Object.assign({},fr),{sourceDataType:"content"})))}catch(u){if(this._pendingLoads--,this._removed)return void this.fire(new Xe.k("dataabort",{dataType:"source"}));this.fire(new Xe.j(u))}}))}loaded(){return 0===this._pendingLoads}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.actor?"RT":"LT";u.actor=this.actor;const Wt={type:this.type,uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};u.abortController=new AbortController;const In=yield this.actor.sendAsync({type:Xe,data:Wt},u.abortController);delete u.abortController,u.unloadVectorData(),u.aborted||u.loadVectorData(In,this.map.painter,"RT"===Xe)}))}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController),u.aborted=!0}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:u.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return Xe.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Io=Xe.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Q extends Xe.E{constructor(u,Xe,Wt,In){super(),this.id=u,this.dispatcher=Wt,this.coordinates=Xe.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(In),this.options=Xe}load(u){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const Xe=yield oo.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,Xe&&Xe.data&&(this.image=Xe.data,u&&(this.coordinates=u),this._finishLoading())}catch(u){this._request=null,this._loaded=!0,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}updateImage(u){return u.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=u.url,this.load(u.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(u){this.map=u,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(u){this.coordinates=u;const Wt=u.map(Xe.Z.fromLngLat);this.tileID=function(u){let Wt=1/0,In=1/0,fr=-1/0,_r=-1/0;for(const Xe of u)Wt=Math.min(Wt,Xe.x),In=Math.min(In,Xe.y),fr=Math.max(fr,Xe.x),_r=Math.max(_r,Xe.y);const wr=Math.max(fr-Wt,_r-In),Ar=Math.max(0,Math.floor(-Math.log(wr)/Math.LN2)),Kr=Math.pow(2,Ar);return new Xe.a1(Ar,Math.floor((Wt+fr)/2*Kr),Math.floor((In+_r)/2*Kr))}(Wt),this.minzoom=this.maxzoom=this.tileID.z;const In=Wt.map((u=>this.tileID.getTilePoint(u)._round()));return this._boundsArray=new Xe.$,this._boundsArray.emplaceBack(In[0].x,In[0].y,0,0),this._boundsArray.emplaceBack(In[1].x,In[1].y,Xe.X,0),this._boundsArray.emplaceBack(In[3].x,In[3].y,0,Xe.X),this._boundsArray.emplaceBack(In[2].x,In[2].y,Xe.X,Xe.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const u=this.map.painter.context,Wt=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,Io.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new b(u,this.image,Wt.RGBA),this.texture.bind(Wt.LINEAR,Wt.CLAMP_TO_EDGE));let In=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,In=!0)}In&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(u){return Xe._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(u.tileID.canonical)?(this.tiles[String(u.tileID.wrap)]=u,u.buckets={}):u.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class tt extends Q{constructor(u,Xe,Wt,In){super(u,Xe,Wt,In),this.roundZoom=!0,this.type="video",this.options=Xe}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1;const u=this.options;this.urls=[];for(const Xe of u.urls)this.urls.push(this.map._requestManager.transformRequest(Xe,"Source").url);try{const u=yield Xe.a3(this.urls);if(this._loaded=!0,!u)return;this.video=u,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(u){this.fire(new Xe.j(u))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(u){if(this.video){const Wt=this.video.seekable;u<Wt.start(0)||u>Wt.end(0)?this.fire(new Xe.j(new Xe.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${Wt.start(0)} and ${Wt.end(0)}-second mark.`))):this.video.currentTime=u}}getVideo(){return this.video}onAdd(u){this.map||(this.map=u,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 u=this.map.painter.context,Wt=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,Io.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(Wt.LINEAR,Wt.CLAMP_TO_EDGE),Wt.texSubImage2D(Wt.TEXTURE_2D,0,0,0,Wt.RGBA,Wt.UNSIGNED_BYTE,this.video)):(this.texture=new b(u,this.video,Wt.RGBA),this.texture.bind(Wt.LINEAR,Wt.CLAMP_TO_EDGE));let In=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,In=!0)}In&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class et extends Q{constructor(u,Wt,In,fr){super(u,Wt,In,fr),Wt.coordinates?Array.isArray(Wt.coordinates)&&4===Wt.coordinates.length&&!Wt.coordinates.some((u=>!Array.isArray(u)||2!==u.length||u.some((u=>"number"!=typeof u))))||this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'missing required property "coordinates"'))),Wt.animate&&"boolean"!=typeof Wt.animate&&this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'optional "animate" property must be a boolean value'))),Wt.canvas?"string"==typeof Wt.canvas||Wt.canvas instanceof HTMLCanvasElement||this.fire(new Xe.j(new Xe.a2(`sources.${u}`,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 Xe.j(new Xe.a2(`sources.${u}`,null,'missing required property "canvas"'))),this.options=Wt,this.animate=void 0===Wt.animate||Wt.animate}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new Xe.j(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(u){this.map=u,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let u=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,u=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,u=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const Wt=this.map.painter.context,In=Wt.gl;this.boundsBuffer||(this.boundsBuffer=Wt.createVertexBuffer(this._boundsArray,Io.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture?(u||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new b(Wt,this.canvas,In.RGBA,{premultiply:!0});let fr=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,fr=!0)}fr&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const u of[this.canvas.width,this.canvas.height])if(isNaN(u)||u<=0)return!0;return!1}}const zo={},at=u=>{switch(u){case"geojson":return J;case"image":return Q;case"raster":return X;case"raster-dem":return K;case"vector":return $;case"video":return tt;case"canvas":return et}return zo[u]},Bo="RTLPluginLoaded";class ot extends Xe.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=j()}_syncState(u){return this.status=u,this.dispatcher.broadcast("SRPS",{pluginStatus:u,pluginURL:this.url}).catch((u=>{throw this.status="error",u}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(u){return Xe._(this,arguments,void 0,(function*(u,Xe=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=_r.resolveURL(u),!this.url)throw new Error(`requested url ${u} is invalid`);if("unavailable"===this.status){if(!Xe)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()}))}_requestImport(){return Xe._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new Xe.k(Bo))}))}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let ca=null;function nt(){return ca||(ca=new ot),ca}class lt{constructor(u,Wt){this.timeAdded=0,this.fadeEndTime=0,this.tileID=u,this.uid=Xe.a4(),this.uses=0,this.tileSize=Wt,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(u){const Xe=u+this.timeAdded;Xe<this.fadeEndTime||(this.fadeEndTime=Xe)}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(u){this.demTexture&&u.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(u,Wt,In){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",u){u.featureIndex&&(this.latestFeatureIndex=u.featureIndex,u.rawTileData?(this.latestRawTileData=u.rawTileData,this.latestFeatureIndex.rawTileData=u.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=u.collisionBoxArray,this.buckets=function(u,Xe){const Wt={};if(!Xe)return Wt;for(const In of u){const u=In.layerIds.map((u=>Xe.getLayer(u))).filter(Boolean);if(0!==u.length){In.layers=u,In.stateDependentLayerIds&&(In.stateDependentLayers=In.stateDependentLayerIds.map((Xe=>u.filter((u=>u.id===Xe))[0])));for(const Xe of u)Wt[Xe.id]=In}}return Wt}(u.buckets,Wt.style),this.hasSymbolBuckets=!1;for(const u in this.buckets){const Wt=this.buckets[u];if(Wt instanceof Xe.a6){if(this.hasSymbolBuckets=!0,!In)break;Wt.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const u in this.buckets){const Wt=this.buckets[u];if(Wt instanceof Xe.a6&&Wt.hasRTLText){this.hasRTLText=!0,nt().lazyLoad();break}}this.queryPadding=0;for(const u in this.buckets){const Xe=this.buckets[u];this.queryPadding=Math.max(this.queryPadding,Wt.style.getLayer(u).queryRadius(Xe))}u.imageAtlas&&(this.imageAtlas=u.imageAtlas),u.glyphAtlasImage&&(this.glyphAtlasImage=u.glyphAtlasImage)}else this.collisionBoxArray=new Xe.a5}unloadVectorData(){for(const u in this.buckets)this.buckets[u].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(u){return this.buckets[u.id]}upload(u){for(const Xe in this.buckets){const Wt=this.buckets[Xe];Wt.uploadPending()&&Wt.upload(u)}const Xe=u.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new b(u,this.imageAtlas.image,Xe.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new b(u,this.glyphAtlasImage,Xe.ALPHA),this.glyphAtlasImage=null)}prepare(u){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(u,this.imageAtlasTexture)}queryRenderedFeatures(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:In,cameraQueryGeometry:fr,scale:_r,tileSize:this.tileSize,pixelPosMatrix:no,transform:Ar,params:wr,queryPadding:this.queryPadding*Kr},u,Xe,Wt):{}}querySourceFeatures(u,Wt){const In=this.latestFeatureIndex;if(!In||!In.rawTileData)return;const fr=In.loadVTLayers(),_r=Wt&&Wt.sourceLayer?Wt.sourceLayer:"",wr=fr._geojsonTileLayer||fr[_r];if(!wr)return;const Ar=Xe.a7(Wt&&Wt.filter),{z:Kr,x:no,y:io}=this.tileID.canonical,oo={z:Kr,x:no,y:io};for(let Wt=0;Wt<wr.length;Wt++){const fr=wr.feature(Wt);if(Ar.needGeometry){const u=Xe.a8(fr,!0);if(!Ar.filter(new Xe.z(this.tileID.overscaledZ),u,this.tileID.canonical))continue}else if(!Ar.filter(new Xe.z(this.tileID.overscaledZ),fr))continue;const ao=In.getId(fr,_r),so=new Xe.a9(fr,Kr,no,io,ao);so.tile=oo,u.push(so)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(u){const Wt=this.expirationTime;if(u.cacheControl){const Wt=Xe.aa(u.cacheControl);Wt["max-age"]&&(this.expirationTime=Date.now()+1e3*Wt["max-age"])}else u.expires&&(this.expirationTime=new Date(u.expires).getTime());if(this.expirationTime){const u=Date.now();let Xe=!1;if(this.expirationTime>u)Xe=!1;else if(Wt)if(this.expirationTime<Wt)Xe=!0;else{const In=this.expirationTime-Wt;In?this.expirationTime=u+Math.max(In,3e4):Xe=!0}else Xe=!0;Xe?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)}setFeatureState(u,Xe){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||0===Object.keys(u).length)return;const Wt=this.latestFeatureIndex.loadVTLayers();for(const In in this.buckets){if(!Xe.style.hasLayer(In))continue;const fr=this.buckets[In],_r=fr.layers[0].sourceLayer||"_geojsonTileLayer",wr=Wt[_r],Ar=u[_r];if(!wr||!Ar||0===Object.keys(Ar).length)continue;fr.update(Ar,wr,this.imageAtlas&&this.imageAtlas.patternPositions||{});const Kr=Xe&&Xe.style&&Xe.style.getLayer(In);Kr&&(this.queryPadding=Math.max(this.queryPadding,Kr.queryRadius(fr)))}}holdingForFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<_r.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(u){this.symbolFadeHoldUntil=_r.now()+u}setDependencies(u,Xe){const Wt={};for(const u of Xe)Wt[u]=!0;this.dependencies[u]=Wt}hasDependency(u,Xe){for(const Wt of u){const u=this.dependencies[Wt];if(u)for(const Wt of Xe)if(u[Wt])return!0}return!1}}class ht{constructor(u,Xe){this.max=u,this.onRemove=Xe,this.reset()}reset(){for(const u in this.data)for(const Xe of this.data[u])Xe.timeout&&clearTimeout(Xe.timeout),this.onRemove(Xe.value);return this.data={},this.order=[],this}add(u,Xe,Wt){const In=u.wrapped().key;void 0===this.data[In]&&(this.data[In]=[]);const fr={value:Xe,timeout:void 0};if(void 0!==Wt&&(fr.timeout=setTimeout((()=>{this.remove(u,fr)}),Wt)),this.data[In].push(fr),this.order.push(In),this.order.length>this.max){const u=this._getAndRemoveByKey(this.order[0]);u&&this.onRemove(u)}return this}has(u){return u.wrapped().key in this.data}getAndRemove(u){return this.has(u)?this._getAndRemoveByKey(u.wrapped().key):null}_getAndRemoveByKey(u){const Xe=this.data[u].shift();return Xe.timeout&&clearTimeout(Xe.timeout),0===this.data[u].length&&delete this.data[u],this.order.splice(this.order.indexOf(u),1),Xe.value}getByKey(u){const Xe=this.data[u];return Xe?Xe[0].value:null}get(u){return this.has(u)?this.data[u.wrapped().key][0].value:null}remove(u,Xe){if(!this.has(u))return this;const Wt=u.wrapped().key,In=void 0===Xe?0:this.data[Wt].indexOf(Xe),fr=this.data[Wt][In];return this.data[Wt].splice(In,1),fr.timeout&&clearTimeout(fr.timeout),0===this.data[Wt].length&&delete this.data[Wt],this.onRemove(fr.value),this.order.splice(this.order.indexOf(Wt),1),this}setMaxSize(u){for(this.max=u;this.order.length>this.max;){const u=this._getAndRemoveByKey(this.order[0]);u&&this.onRemove(u)}return this}filter(u){const Xe=[];for(const Wt in this.data)for(const In of this.data[Wt])u(In.value)||Xe.push(In);for(const u of Xe)this.remove(u.value.tileID,u)}}class ct{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(u,Wt,In){const fr=String(Wt);if(this.stateChanges[u]=this.stateChanges[u]||{},this.stateChanges[u][fr]=this.stateChanges[u][fr]||{},Xe.e(this.stateChanges[u][fr],In),null===this.deletedStates[u]){this.deletedStates[u]={};for(const Xe in this.state[u])Xe!==fr&&(this.deletedStates[u][Xe]=null)}else if(this.deletedStates[u]&&null===this.deletedStates[u][fr]){this.deletedStates[u][fr]={};for(const Xe in this.state[u][fr])In[Xe]||(this.deletedStates[u][fr][Xe]=null)}else for(const Xe in In)this.deletedStates[u]&&this.deletedStates[u][fr]&&null===this.deletedStates[u][fr][Xe]&&delete this.deletedStates[u][fr][Xe]}removeFeatureState(u,Xe,Wt){if(null===this.deletedStates[u])return;const In=String(Xe);if(this.deletedStates[u]=this.deletedStates[u]||{},Wt&&void 0!==Xe)null!==this.deletedStates[u][In]&&(this.deletedStates[u][In]=this.deletedStates[u][In]||{},this.deletedStates[u][In][Wt]=null);else if(void 0!==Xe)if(this.stateChanges[u]&&this.stateChanges[u][In])for(Wt in this.deletedStates[u][In]={},this.stateChanges[u][In])this.deletedStates[u][In][Wt]=null;else this.deletedStates[u][In]=null;else this.deletedStates[u]=null}getState(u,Wt){const In=String(Wt),fr=Xe.e({},(this.state[u]||{})[In],(this.stateChanges[u]||{})[In]);if(null===this.deletedStates[u])return{};if(this.deletedStates[u]){const Xe=this.deletedStates[u][Wt];if(null===Xe)return{};for(const u in Xe)delete fr[u]}return fr}initializeTileState(u,Xe){u.setFeatureState(this.state,Xe)}coalesceChanges(u,Wt){const In={};for(const u in this.stateChanges){this.state[u]=this.state[u]||{};const Wt={};for(const In in this.stateChanges[u])this.state[u][In]||(this.state[u][In]={}),Xe.e(this.state[u][In],this.stateChanges[u][In]),Wt[In]=this.state[u][In];In[u]=Wt}for(const u in this.deletedStates){this.state[u]=this.state[u]||{};const Wt={};if(null===this.deletedStates[u])for(const Xe in this.state[u])Wt[Xe]={},this.state[u][Xe]={};else for(const Xe in this.deletedStates[u]){if(null===this.deletedStates[u][Xe])this.state[u][Xe]={};else for(const Wt of Object.keys(this.deletedStates[u][Xe]))delete this.state[u][Xe][Wt];Wt[Xe]=this.state[u][Xe]}In[u]=In[u]||{},Xe.e(In[u],Wt)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(In).length)for(const Xe in u)u[Xe].setFeatureState(In,Wt)}}class ut extends Xe.E{constructor(u,Xe,Wt){super(),this.id=u,this.dispatcher=Wt,this.on("data",(u=>this._dataHandler(u))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((u,Xe,Wt,In)=>{const fr=new(at(Xe.type))(u,Xe,Wt,In);if(fr.id!==u)throw new Error(`Expected Source id to be ${u} instead of ${fr.id}`);return fr})(u,Xe,Wt,this),this._tiles={},this._cache=new ht(0,(u=>this._unloadTile(u))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ct,this._didEmitContent=!1,this._updated=!1}onAdd(u){this.map=u,this._maxTileCacheSize=u?u._maxTileCacheSize:null,this._maxTileCacheZoomLevels=u?u._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(u)}onRemove(u){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(u)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const u in this._tiles){const Xe=this._tiles[u];if("loaded"!==Xe.state&&"errored"!==Xe.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const u=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,u&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(u,Wt,In){return Xe._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(u),this._tileLoaded(u,Wt,In)}catch(Wt){u.state="errored",404!==Wt.status?this._source.fire(new Xe.j(Wt,{tile:u})):this.update(this.transform,this.terrain)}}))}_unloadTile(u){this._source.unloadTile&&this._source.unloadTile(u)}_abortTile(u){this._source.abortTile&&this._source.abortTile(u),this._source.fire(new Xe.k("dataabort",{tile:u,coord:u.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(u){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const Xe in this._tiles){const Wt=this._tiles[Xe];Wt.upload(u),Wt.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((u=>u.tileID)).sort(dt).map((u=>u.key))}getRenderableIds(u){const Wt=[];for(const Xe in this._tiles)this._isIdRenderable(Xe,u)&&Wt.push(this._tiles[Xe]);return u?Wt.sort(((u,Wt)=>{const In=u.tileID,fr=Wt.tileID,_r=new Xe.P(In.canonical.x,In.canonical.y)._rotate(this.transform.angle),wr=new Xe.P(fr.canonical.x,fr.canonical.y)._rotate(this.transform.angle);return In.overscaledZ-fr.overscaledZ||wr.y-_r.y||wr.x-_r.x})).map((u=>u.tileID.key)):Wt.map((u=>u.tileID)).sort(dt).map((u=>u.key))}hasRenderableParent(u){const Xe=this.findLoadedParent(u,0);return!!Xe&&this._isIdRenderable(Xe.tileID.key)}_isIdRenderable(u,Xe){return this._tiles[u]&&this._tiles[u].hasData()&&!this._coveredTiles[u]&&(Xe||!this._tiles[u].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const u in this._tiles)"errored"!==this._tiles[u].state&&this._reloadTile(u,"reloading")}}_reloadTile(u,Wt){return Xe._(this,void 0,void 0,(function*(){const Xe=this._tiles[u];Xe&&("loading"!==Xe.state&&(Xe.state=Wt),yield this._loadTile(Xe,u,Wt))}))}_tileLoaded(u,Wt,In){u.timeAdded=_r.now(),"expired"===In&&(u.refreshedUponExpiration=!0),this._setTileReloadTimer(Wt,u),"raster-dem"===this.getSource().type&&u.dem&&this._backfillDEM(u),this._state.initializeTileState(u,this.map?this.map.painter:null),u.aborted||this._source.fire(new Xe.k("data",{dataType:"source",tile:u,coord:u.tileID}))}_backfillDEM(u){const Xe=this.getRenderableIds();for(let Wt=0;Wt<Xe.length;Wt++){const In=Xe[Wt];if(u.neighboringTiles&&u.neighboringTiles[In]){const Xe=this.getTileByID(In);i(u,Xe),i(Xe,u)}}function i(u,Xe){u.needsHillshadePrepare=!0,u.needsTerrainPrepare=!0;let Wt=Xe.tileID.canonical.x-u.tileID.canonical.x;const In=Xe.tileID.canonical.y-u.tileID.canonical.y,fr=Math.pow(2,u.tileID.canonical.z),_r=Xe.tileID.key;0===Wt&&0===In||Math.abs(In)>1||(Math.abs(Wt)>1&&(1===Math.abs(Wt+fr)?Wt+=fr:1===Math.abs(Wt-fr)&&(Wt-=fr)),Xe.dem&&u.dem&&(u.dem.backfillBorder(Xe.dem,Wt,In),u.neighboringTiles&&u.neighboringTiles[_r]&&(u.neighboringTiles[_r].backfilled=!0)))}}getTile(u){return this.getTileByID(u.key)}getTileByID(u){return this._tiles[u]}_retainLoadedChildren(u,Xe,Wt,In){for(const fr in this._tiles){let _r=this._tiles[fr];if(In[fr]||!_r.hasData()||_r.tileID.overscaledZ<=Xe||_r.tileID.overscaledZ>Wt)continue;let wr=_r.tileID;for(;_r&&_r.tileID.overscaledZ>Xe+1;){const u=_r.tileID.scaledTo(_r.tileID.overscaledZ-1);_r=this._tiles[u.key],_r&&_r.hasData()&&(wr=u)}let Ar=wr;for(;Ar.overscaledZ>Xe;)if(Ar=Ar.scaledTo(Ar.overscaledZ-1),u[Ar.key]){In[wr.key]=wr;break}}}findLoadedParent(u,Xe){if(u.key in this._loadedParentTiles){const Wt=this._loadedParentTiles[u.key];return Wt&&Wt.tileID.overscaledZ>=Xe?Wt:null}for(let Wt=u.overscaledZ-1;Wt>=Xe;Wt--){const Xe=u.scaledTo(Wt),In=this._getLoadedTile(Xe);if(In)return In}}findLoadedSibling(u){return this._getLoadedTile(u)}_getLoadedTile(u){const Xe=this._tiles[u.key];return Xe&&Xe.hasData()?Xe:this._cache.getByKey(u.wrapped().key)}updateCacheSize(u){const Wt=Math.ceil(u.width/this._source.tileSize)+1,In=Math.ceil(u.height/this._source.tileSize)+1,fr=Math.floor(Wt*In*(null===this._maxTileCacheZoomLevels?Xe.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),_r="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,fr):fr;this._cache.setMaxSize(_r)}handleWrapJump(u){const Xe=Math.round((u-(void 0===this._prevLng?u:this._prevLng))/360);if(this._prevLng=u,Xe){const u={};for(const Wt in this._tiles){const In=this._tiles[Wt];In.tileID=In.tileID.unwrapTo(In.tileID.wrap+Xe),u[In.tileID.key]=In}this._tiles=u;for(const u in this._timers)clearTimeout(this._timers[u]),delete this._timers[u];for(const u in this._tiles)this._setTileReloadTimer(u,this._tiles[u])}}_updateCoveredAndRetainedTiles(u,Xe,Wt,In,fr,wr){const Ar={},Kr={},no=Object.keys(u),io=_r.now();for(const Wt of no){const In=u[Wt],fr=this._tiles[Wt];if(!fr||0!==fr.fadeEndTime&&fr.fadeEndTime<=io)continue;const _r=this.findLoadedParent(In,Xe),wr=this.findLoadedSibling(In),no=_r||wr||null;no&&(this._addTile(no.tileID),Ar[no.tileID.key]=no.tileID),Kr[Wt]=In}this._retainLoadedChildren(Kr,In,Wt,u);for(const Xe in Ar)u[Xe]||(this._coveredTiles[Xe]=!0,u[Xe]=Ar[Xe]);if(wr){const Xe={},Wt={};for(const u of fr)this._tiles[u.key].hasData()?Xe[u.key]=u:Wt[u.key]=u;for(const In in Wt){const fr=Wt[In].children(this._source.maxzoom);this._tiles[fr[0].key]&&this._tiles[fr[1].key]&&this._tiles[fr[2].key]&&this._tiles[fr[3].key]&&(Xe[fr[0].key]=u[fr[0].key]=fr[0],Xe[fr[1].key]=u[fr[1].key]=fr[1],Xe[fr[2].key]=u[fr[2].key]=fr[2],Xe[fr[3].key]=u[fr[3].key]=fr[3],delete Wt[In])}for(const In in Wt){const fr=Wt[In],_r=this.findLoadedParent(fr,this._source.minzoom),wr=this.findLoadedSibling(fr),Ar=_r||wr||null;if(Ar){Xe[Ar.tileID.key]=u[Ar.tileID.key]=Ar.tileID;for(const u in Xe)Xe[u].isChildOf(Ar.tileID)&&delete Xe[u]}}for(const u in this._tiles)Xe[u]||(this._coveredTiles[u]=!0)}}update(u,Wt){if(!this._sourceLoaded||this._paused)return;let In;this.transform=u,this.terrain=Wt,this.updateCacheSize(u),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?In=u.getVisibleUnwrappedCoordinates(this._source.tileID).map((u=>new Xe.S(u.canonical.z,u.wrap,u.canonical.z,u.canonical.x,u.canonical.y))):(In=u.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:Wt}),this._source.hasTile&&(In=In.filter((u=>this._source.hasTile(u))))):In=[];const fr=u.coveringZoomLevel(this._source),_r=Math.max(fr-ut.maxOverzooming,this._source.minzoom),wr=Math.max(fr+ut.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const u={};for(const Xe of In)if(Xe.canonical.z>this._source.minzoom){const Wt=Xe.scaledTo(Xe.canonical.z-1);u[Wt.key]=Wt;const In=Xe.scaledTo(Math.max(this._source.minzoom,Math.min(Xe.canonical.z,5)));u[In.key]=In}In=In.concat(Object.values(u))}const Ar=0===In.length&&!this._updated&&this._didEmitContent;this._updated=!0,Ar&&this.fire(new Xe.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const Kr=this._updateRetainedTiles(In,fr);_t(this._source.type)&&this._updateCoveredAndRetainedTiles(Kr,_r,wr,fr,In,Wt);for(const u in Kr)this._tiles[u].clearFadeHold();const no=Xe.ab(this._tiles,Kr);for(const u of no){const Xe=this._tiles[u];Xe.hasSymbolBuckets&&!Xe.holdingForFade()?Xe.setHoldDuration(this.map._fadeDuration):Xe.hasSymbolBuckets&&!Xe.symbolFadeFinished()||this._removeTile(u)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const u in this._tiles)this._tiles[u].holdingForFade()&&this._removeTile(u)}_updateRetainedTiles(u,Xe){var Wt;const In={},fr={},_r=Math.max(Xe-ut.maxOverzooming,this._source.minzoom),wr=Math.max(Xe+ut.maxUnderzooming,this._source.minzoom),Ar={};for(const Wt of u){const u=this._addTile(Wt);In[Wt.key]=Wt,u.hasData()||Xe<this._source.maxzoom&&(Ar[Wt.key]=Wt)}this._retainLoadedChildren(Ar,Xe,wr,In);for(const wr of u){let u=this._tiles[wr.key];if(u.hasData())continue;if(Xe+1>this._source.maxzoom){const u=wr.children(this._source.maxzoom)[0],Xe=this.getTile(u);if(Xe&&Xe.hasData()){In[u.key]=u;continue}}else{const u=wr.children(this._source.maxzoom);if(In[u[0].key]&&In[u[1].key]&&In[u[2].key]&&In[u[3].key])continue}let Ar=u.wasRequested();for(let Xe=wr.overscaledZ-1;Xe>=_r;--Xe){const _r=wr.scaledTo(Xe);if(fr[_r.key])break;if(fr[_r.key]=!0,u=this.getTile(_r),!u&&Ar&&(u=this._addTile(_r)),u){const Xe=u.hasData();if((Xe||!(null===(Wt=this.map)||void 0===Wt?void 0:Wt.cancelPendingTileRequestsWhileZooming)||Ar)&&(In[_r.key]=_r),Ar=u.wasRequested(),Xe)break}}}return In}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const u in this._tiles){const Xe=[];let Wt,In=this._tiles[u].tileID;for(;In.overscaledZ>0;){if(In.key in this._loadedParentTiles){Wt=this._loadedParentTiles[In.key];break}Xe.push(In.key);const u=In.scaledTo(In.overscaledZ-1);if(Wt=this._getLoadedTile(u),Wt)break;In=u}for(const u of Xe)this._loadedParentTiles[u]=Wt}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const u in this._tiles){const Xe=this._tiles[u].tileID,Wt=this._getLoadedTile(Xe);this._loadedSiblingTiles[Xe.key]=Wt}}_addTile(u){let Wt=this._tiles[u.key];if(Wt)return Wt;Wt=this._cache.getAndRemove(u),Wt&&(this._setTileReloadTimer(u.key,Wt),Wt.tileID=u,this._state.initializeTileState(Wt,this.map?this.map.painter:null),this._cacheTimers[u.key]&&(clearTimeout(this._cacheTimers[u.key]),delete this._cacheTimers[u.key],this._setTileReloadTimer(u.key,Wt)));const In=Wt;return Wt||(Wt=new lt(u,this._source.tileSize*u.overscaleFactor()),this._loadTile(Wt,u.key,Wt.state)),Wt.uses++,this._tiles[u.key]=Wt,In||this._source.fire(new Xe.k("dataloading",{tile:Wt,coord:Wt.tileID,dataType:"source"})),Wt}_setTileReloadTimer(u,Xe){u in this._timers&&(clearTimeout(this._timers[u]),delete this._timers[u]);const Wt=Xe.getExpiryTimeout();Wt&&(this._timers[u]=setTimeout((()=>{this._reloadTile(u,"expired"),delete this._timers[u]}),Wt))}_removeTile(u){const Xe=this._tiles[u];Xe&&(Xe.uses--,delete this._tiles[u],this._timers[u]&&(clearTimeout(this._timers[u]),delete this._timers[u]),Xe.uses>0||(Xe.hasData()&&"reloading"!==Xe.state?this._cache.add(Xe.tileID,Xe,Xe.getExpiryTimeout()):(Xe.aborted=!0,this._abortTile(Xe),this._unloadTile(Xe))))}_dataHandler(u){const Xe=u.sourceDataType;"source"===u.dataType&&"metadata"===Xe&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===u.dataType&&"content"===Xe&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const u in this._tiles)this._removeTile(u);this._cache.reset()}tilesIn(u,Wt,In){const fr=[],_r=this.transform;if(!_r)return fr;const wr=In?_r.getCameraQueryGeometry(u):u,Ar=u.map((u=>_r.pointCoordinate(u,this.terrain))),Kr=wr.map((u=>_r.pointCoordinate(u,this.terrain))),no=this.getIds();let io=1/0,oo=1/0,ao=-1/0,so=-1/0;for(const u of Kr)io=Math.min(io,u.x),oo=Math.min(oo,u.y),ao=Math.max(ao,u.x),so=Math.max(so,u.y);for(let u=0;u<no.length;u++){const In=this._tiles[no[u]];if(In.holdingForFade())continue;const wr=In.tileID,co=Math.pow(2,_r.zoom-In.tileID.overscaledZ),ho=Wt*In.queryPadding*Xe.X/In.tileSize/co,go=[wr.getTilePoint(new Xe.Z(io,oo)),wr.getTilePoint(new Xe.Z(ao,so))];if(go[0].x-ho<Xe.X&&go[0].y-ho<Xe.X&&go[1].x+ho>=0&&go[1].y+ho>=0){const u=Ar.map((u=>wr.getTilePoint(u))),Xe=Kr.map((u=>wr.getTilePoint(u)));fr.push({tile:In,tileID:wr,queryGeometry:u,cameraQueryGeometry:Xe,scale:co})}}return fr}getVisibleCoordinates(u){const Xe=this.getRenderableIds(u).map((u=>this._tiles[u].tileID));for(const u of Xe)u.posMatrix=this.transform.calculatePosMatrix(u.toUnwrapped());return Xe}hasTransition(){if(this._source.hasTransition())return!0;if(_t(this._source.type)){const u=_r.now();for(const Xe in this._tiles)if(this._tiles[Xe].fadeEndTime>=u)return!0}return!1}setFeatureState(u,Xe,Wt){this._state.updateState(u=u||"_geojsonTileLayer",Xe,Wt)}removeFeatureState(u,Xe,Wt){this._state.removeFeatureState(u=u||"_geojsonTileLayer",Xe,Wt)}getFeatureState(u,Xe){return this._state.getState(u=u||"_geojsonTileLayer",Xe)}setDependencies(u,Xe,Wt){const In=this._tiles[u];In&&In.setDependencies(Xe,Wt)}reloadTilesForDependencies(u,Xe){for(const Wt in this._tiles)this._tiles[Wt].hasDependency(u,Xe)&&this._reloadTile(Wt,"reloading");this._cache.filter((Wt=>!Wt.hasDependency(u,Xe)))}}function dt(u,Xe){const Wt=Math.abs(2*u.wrap)-+(u.wrap<0),In=Math.abs(2*Xe.wrap)-+(Xe.wrap<0);return u.overscaledZ-Xe.overscaledZ||In-Wt||Xe.canonical.y-u.canonical.y||Xe.canonical.x-u.canonical.x}function _t(u){return"raster"===u||"image"===u||"video"===u}ut.maxOverzooming=10,ut.maxUnderzooming=3;class pt{constructor(u,Xe){this.reset(u,Xe)}reset(u,Xe){this.points=u||[],this._distances=[0];for(let u=1;u<this.points.length;u++)this._distances[u]=this._distances[u-1]+this.points[u].dist(this.points[u-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(Xe||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(u){if(1===this.points.length)return this.points[0];u=Xe.ac(u,0,1);let Wt=1,In=this._distances[Wt];const fr=u*this.paddedLength+this.padding;for(;In<fr&&Wt<this._distances.length;)In=this._distances[++Wt];const _r=Wt-1,wr=this._distances[_r],Ar=In-wr,Kr=Ar>0?(fr-wr)/Ar:0;return this.points[_r].mult(1-Kr).add(this.points[Wt].mult(Kr))}}function mt(u,Xe){let Wt=!0;return"always"===u||"never"!==u&&"never"!==Xe||(Wt=!1),Wt}class ft{constructor(u,Xe,Wt){const In=this.boxCells=[],fr=this.circleCells=[];this.xCellCount=Math.ceil(u/Wt),this.yCellCount=Math.ceil(Xe/Wt);for(let u=0;u<this.xCellCount*this.yCellCount;u++)In.push([]),fr.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=u,this.height=Xe,this.xScale=this.xCellCount/u,this.yScale=this.yCellCount/Xe,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(u,Xe,Wt,In,fr){this._forEachCell(Xe,Wt,In,fr,this._insertBoxCell,this.boxUid++),this.boxKeys.push(u),this.bboxes.push(Xe),this.bboxes.push(Wt),this.bboxes.push(In),this.bboxes.push(fr)}insertCircle(u,Xe,Wt,In){this._forEachCell(Xe-In,Wt-In,Xe+In,Wt+In,this._insertCircleCell,this.circleUid++),this.circleKeys.push(u),this.circles.push(Xe),this.circles.push(Wt),this.circles.push(In)}_insertBoxCell(u,Xe,Wt,In,fr,_r){this.boxCells[fr].push(_r)}_insertCircleCell(u,Xe,Wt,In,fr,_r){this.circleCells[fr].push(_r)}_query(u,Xe,Wt,In,fr,_r,wr){if(Wt<0||u>this.width||In<0||Xe>this.height)return[];const Ar=[];if(u<=0&&Xe<=0&&this.width<=Wt&&this.height<=In){if(fr)return[{key:null,x1:u,y1:Xe,x2:Wt,y2:In}];for(let u=0;u<this.boxKeys.length;u++)Ar.push({key:this.boxKeys[u],x1:this.bboxes[4*u],y1:this.bboxes[4*u+1],x2:this.bboxes[4*u+2],y2:this.bboxes[4*u+3]});for(let u=0;u<this.circleKeys.length;u++){const Xe=this.circles[3*u],Wt=this.circles[3*u+1],In=this.circles[3*u+2];Ar.push({key:this.circleKeys[u],x1:Xe-In,y1:Wt-In,x2:Xe+In,y2:Wt+In})}}else this._forEachCell(u,Xe,Wt,In,this._queryCell,Ar,{hitTest:fr,overlapMode:_r,seenUids:{box:{},circle:{}}},wr);return Ar}query(u,Xe,Wt,In){return this._query(u,Xe,Wt,In,!1,null)}hitTest(u,Xe,Wt,In,fr,_r){return this._query(u,Xe,Wt,In,!0,fr,_r).length>0}hitTestCircle(u,Xe,Wt,In,fr){const _r=u-Wt,wr=u+Wt,Ar=Xe-Wt,Kr=Xe+Wt;if(wr<0||_r>this.width||Kr<0||Ar>this.height)return!1;const no=[];return this._forEachCell(_r,Ar,wr,Kr,this._queryCellCircle,no,{hitTest:!0,overlapMode:In,circle:{x:u,y:Xe,radius:Wt},seenUids:{box:{},circle:{}}},fr),no.length>0}_queryCell(u,Xe,Wt,In,fr,_r,wr,Ar){const{seenUids:Kr,hitTest:no,overlapMode:io}=wr,oo=this.boxCells[fr];if(null!==oo){const fr=this.bboxes;for(const wr of oo)if(!Kr.box[wr]){Kr.box[wr]=!0;const oo=4*wr,ao=this.boxKeys[wr];if(u<=fr[oo+2]&&Xe<=fr[oo+3]&&Wt>=fr[oo+0]&&In>=fr[oo+1]&&(!Ar||Ar(ao))&&(!no||!mt(io,ao.overlapMode))&&(_r.push({key:ao,x1:fr[oo],y1:fr[oo+1],x2:fr[oo+2],y2:fr[oo+3]}),no))return!0}}const ao=this.circleCells[fr];if(null!==ao){const fr=this.circles;for(const wr of ao)if(!Kr.circle[wr]){Kr.circle[wr]=!0;const oo=3*wr,ao=this.circleKeys[wr];if(this._circleAndRectCollide(fr[oo],fr[oo+1],fr[oo+2],u,Xe,Wt,In)&&(!Ar||Ar(ao))&&(!no||!mt(io,ao.overlapMode))){const u=fr[oo],Xe=fr[oo+1],Wt=fr[oo+2];if(_r.push({key:ao,x1:u-Wt,y1:Xe-Wt,x2:u+Wt,y2:Xe+Wt}),no)return!0}}}return!1}_queryCellCircle(u,Xe,Wt,In,fr,_r,wr,Ar){const{circle:Kr,seenUids:no,overlapMode:io}=wr,oo=this.boxCells[fr];if(null!==oo){const u=this.bboxes;for(const Xe of oo)if(!no.box[Xe]){no.box[Xe]=!0;const Wt=4*Xe,In=this.boxKeys[Xe];if(this._circleAndRectCollide(Kr.x,Kr.y,Kr.radius,u[Wt+0],u[Wt+1],u[Wt+2],u[Wt+3])&&(!Ar||Ar(In))&&!mt(io,In.overlapMode))return _r.push(!0),!0}}const ao=this.circleCells[fr];if(null!==ao){const u=this.circles;for(const Xe of ao)if(!no.circle[Xe]){no.circle[Xe]=!0;const Wt=3*Xe,In=this.circleKeys[Xe];if(this._circlesCollide(u[Wt],u[Wt+1],u[Wt+2],Kr.x,Kr.y,Kr.radius)&&(!Ar||Ar(In))&&!mt(io,In.overlapMode))return _r.push(!0),!0}}}_forEachCell(u,Xe,Wt,In,fr,_r,wr,Ar){const Kr=this._convertToXCellCoord(u),no=this._convertToYCellCoord(Xe),io=this._convertToXCellCoord(Wt),oo=this._convertToYCellCoord(In);for(let ao=Kr;ao<=io;ao++)for(let Kr=no;Kr<=oo;Kr++)if(fr.call(this,u,Xe,Wt,In,this.xCellCount*Kr+ao,_r,wr,Ar))return}_convertToXCellCoord(u){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(u*this.xScale)))}_convertToYCellCoord(u){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(u*this.yScale)))}_circlesCollide(u,Xe,Wt,In,fr,_r){const wr=In-u,Ar=fr-Xe,Kr=Wt+_r;return Kr*Kr>wr*wr+Ar*Ar}_circleAndRectCollide(u,Xe,Wt,In,fr,_r,wr){const Ar=(_r-In)/2,Kr=Math.abs(u-(In+Ar));if(Kr>Ar+Wt)return!1;const no=(wr-fr)/2,io=Math.abs(Xe-(fr+no));if(io>no+Wt)return!1;if(Kr<=Ar||io<=no)return!0;const oo=Kr-Ar,ao=io-no;return oo*oo+ao*ao<=Wt*Wt}}function gt(u,Wt,In,fr,_r){const wr=Xe.H();return Wt?(Xe.K(wr,wr,[1/_r,1/_r,1]),In||Xe.ad(wr,wr,fr.angle)):Xe.L(wr,fr.labelPlaneMatrix,u),wr}function vt(u,Wt,In,fr,_r){if(Wt){const Wt=Xe.ae(u);return Xe.K(Wt,Wt,[_r,_r,1]),In||Xe.ad(Wt,Wt,-fr.angle),Wt}return fr.glCoordMatrix}function xt(u,Wt,In,fr){let _r;fr?(_r=[u,Wt,fr(u,Wt),1],Xe.af(_r,_r,In)):(_r=[u,Wt,0,1],kt(_r,_r,In));const wr=_r[3];return{point:new Xe.P(_r[0]/wr,_r[1]/wr),signedDistanceFromCamera:wr,isOccluded:!1}}function yt(u,Xe){return.5+u/Xe*.5}function bt(u,Xe){return u.x>=-Xe[0]&&u.x<=Xe[0]&&u.y>=-Xe[1]&&u.y<=Xe[1]}function wt(u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho){const go=fr?u.textSizeData:u.iconSizeData,xo=Xe.ag(go,In.transform.zoom),ko=[256/In.width*2+1,256/In.height*2+1],Co=fr?u.text.dynamicLayoutVertexArray:u.icon.dynamicLayoutVertexArray;Co.clear();const Io=u.lineVertexArray,zo=fr?u.text.placedSymbolArray:u.icon.placedSymbolArray,Bo=In.transform.width/In.transform.height;let ca=!1;for(let fr=0;fr<zo.length;fr++){const ua=zo.get(fr);if(ua.hidden||ua.writingMode===Xe.ah.vertical&&!ca){Rt(ua.numGlyphs,Co);continue}ca=!1;const Da=xt(ua.anchorX,ua.anchorY,Wt,ho);if(!bt(Da.point,ko)){Rt(ua.numGlyphs,Co);continue}const ns=yt(In.transform.cameraToCenterDistance,Da.signedDistanceFromCamera),yl=Xe.ai(go,xo,ua),vl=Ar?yl/ns:yl*ns,kl={getElevation:ho,labelPlaneMatrix:_r,lineVertexArray:Io,pitchWithMap:Ar,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:io,tileAnchorPoint:new Xe.P(ua.anchorX,ua.anchorY),unwrappedTileID:oo,width:ao,height:so,translation:co},Al=Et(kl,ua,vl,!1,Kr,Wt,wr,u.glyphOffsetArray,Co,Bo,no);ca=Al.useVertical,(Al.notEnoughRoom||ca||Al.needsFlipping&&Et(kl,ua,vl,!0,Kr,Wt,wr,u.glyphOffsetArray,Co,Bo,no).notEnoughRoom)&&Rt(ua.numGlyphs,Co)}fr?u.text.dynamicLayoutVertexBuffer.updateData(Co):u.icon.dynamicLayoutVertexBuffer.updateData(Co)}function Tt(u,Xe,Wt,In,fr,_r,wr,Ar){const Kr=_r.glyphStartIndex+_r.numGlyphs,no=_r.lineStartIndex,io=_r.lineStartIndex+_r.lineLength,oo=Xe.getoffsetX(_r.glyphStartIndex),ao=Xe.getoffsetX(Kr-1),so=Mt(u*oo,Wt,In,fr,_r.segment,no,io,Ar,wr);if(!so)return null;const co=Mt(u*ao,Wt,In,fr,_r.segment,no,io,Ar,wr);return co?Ar.projectionCache.anyProjectionOccluded?null:{first:so,last:co}:null}function It(u,Wt,In,fr){return u===Xe.ah.horizontal&&Math.abs(In.y-Wt.y)>Math.abs(In.x-Wt.x)*fr?{useVertical:!0}:(u===Xe.ah.vertical?Wt.y<In.y:Wt.x>In.x)?{needsFlipping:!0}:null}function Et(u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo){const ao=In/24,so=Wt.lineOffsetX*ao,co=Wt.lineOffsetY*ao;let ho;if(Wt.numGlyphs>1){const Xe=Wt.glyphStartIndex+Wt.numGlyphs,In=Wt.lineStartIndex,wr=Wt.lineStartIndex+Wt.lineLength,no=Tt(ao,Kr,so,co,fr,Wt,oo,u);if(!no)return{notEnoughRoom:!0};const go=xt(no.first.point.x,no.first.point.y,Ar,u.getElevation).point,xo=xt(no.last.point.x,no.last.point.y,Ar,u.getElevation).point;if(_r&&!fr){const u=It(Wt.writingMode,go,xo,io);if(u)return u}ho=[no.first];for(let _r=Wt.glyphStartIndex+1;_r<Xe-1;_r++)ho.push(Mt(ao*Kr.getoffsetX(_r),so,co,fr,Wt.segment,In,wr,u,oo));ho.push(no.last)}else{if(_r&&!fr){const In=xt(u.tileAnchorPoint.x,u.tileAnchorPoint.y,wr,u.getElevation).point,fr=Wt.lineStartIndex+Wt.segment+1,_r=new Xe.P(u.lineVertexArray.getx(fr),u.lineVertexArray.gety(fr)),Ar=xt(_r.x,_r.y,wr,u.getElevation),Kr=Ar.signedDistanceFromCamera>0?Ar.point:function(u,Xe,Wt,In,fr,_r){return Pt(u,Xe,Wt,1,fr,_r)}(u.tileAnchorPoint,_r,In,0,wr,u),no=It(Wt.writingMode,In,Kr,io);if(no)return no}const In=Mt(ao*Kr.getoffsetX(Wt.glyphStartIndex),so,co,fr,Wt.segment,Wt.lineStartIndex,Wt.lineStartIndex+Wt.lineLength,u,oo);if(!In||u.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ho=[In]}for(const u of ho)Xe.aj(no,u.point,u.angle);return{}}function Pt(u,Xe,Wt,In,fr,_r){const wr=u.add(u.sub(Xe)._unit()),Ar=void 0!==fr?xt(wr.x,wr.y,fr,_r.getElevation).point:St(wr.x,wr.y,_r).point,Kr=Wt.sub(Ar);return Wt.add(Kr._mult(In/Kr.mag()))}function Ct(u,Wt,In){const fr=Wt.projectionCache;if(fr.projections[u])return fr.projections[u];const _r=new Xe.P(Wt.lineVertexArray.getx(u),Wt.lineVertexArray.gety(u)),wr=St(_r.x,_r.y,Wt);if(wr.signedDistanceFromCamera>0)return fr.projections[u]=wr.point,fr.anyProjectionOccluded=fr.anyProjectionOccluded||wr.isOccluded,wr.point;const Ar=u-In.direction;return function(u,Xe,Wt,In,fr){return Pt(u,Xe,Wt,In,void 0,fr)}(0===In.distanceFromAnchor?Wt.tileAnchorPoint:new Xe.P(Wt.lineVertexArray.getx(Ar),Wt.lineVertexArray.gety(Ar)),_r,In.previousVertex,In.absOffsetX-In.distanceFromAnchor+1,Wt)}function St(u,Xe,Wt){const In=u+Wt.translation[0],fr=Xe+Wt.translation[1];let _r;return!Wt.pitchWithMap&&Wt.projection.useSpecialProjectionForSymbols?(_r=Wt.projection.projectTileCoordinates(In,fr,Wt.unwrappedTileID,Wt.getElevation),_r.point.x=(.5*_r.point.x+.5)*Wt.width,_r.point.y=(.5*-_r.point.y+.5)*Wt.height):(_r=xt(In,fr,Wt.labelPlaneMatrix,Wt.getElevation),_r.isOccluded=!1),_r}function zt(u,Xe,Wt){return u._unit()._perp()._mult(Xe*Wt)}function Dt(u,Wt,In,fr,_r,wr,Ar,Kr,no){if(Kr.projectionCache.offsets[u])return Kr.projectionCache.offsets[u];const io=In.add(Wt);if(u+no.direction<fr||u+no.direction>=_r)return Kr.projectionCache.offsets[u]=io,io;const oo=Ct(u+no.direction,Kr,no),ao=zt(oo.sub(In),Ar,no.direction),so=In.add(ao),co=oo.add(ao);return Kr.projectionCache.offsets[u]=Xe.ak(wr,io,so,co)||io,Kr.projectionCache.offsets[u]}function Mt(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){const no=In?u-Xe:u+Xe;let io=no>0?1:-1,oo=0;In&&(io*=-1,oo=Math.PI),io<0&&(oo+=Math.PI);let ao,so=io>0?_r+fr:_r+fr+1;Ar.projectionCache.cachedAnchorPoint?ao=Ar.projectionCache.cachedAnchorPoint:(ao=St(Ar.tileAnchorPoint.x,Ar.tileAnchorPoint.y,Ar).point,Ar.projectionCache.cachedAnchorPoint=ao);let co,ho,go=ao,xo=ao,ko=0,Co=0;const Io=Math.abs(no),zo=[];let Bo;for(;ko+Co<=Io;){if(so+=io,so<_r||so>=wr)return null;ko+=Co,xo=go,ho=co;const u={absOffsetX:Io,direction:io,distanceFromAnchor:ko,previousVertex:xo};if(go=Ct(so,Ar,u),0===Wt)zo.push(xo),Bo=go.sub(xo);else{let Xe;const In=go.sub(xo);Xe=0===In.mag()?zt(Ct(so+io,Ar,u).sub(go),Wt,io):zt(In,Wt,io),ho||(ho=xo.add(Xe)),co=Dt(so,Xe,go,_r,wr,ho,Wt,Ar,u),zo.push(ho),Bo=co.sub(ho)}Co=Bo.mag()}const ca=Bo._mult((Io-ko)/Co)._add(ho||xo),ua=oo+Math.atan2(go.y-xo.y,go.x-xo.x);return zo.push(ca),{point:ca,angle:Kr?ua:0,path:zo}}const ua=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Rt(u,Xe){for(let Wt=0;Wt<u;Wt++){const u=Xe.length;Xe.resize(u+4),Xe.float32.set(ua,3*u)}}function kt(u,Xe,Wt){const In=Xe[0],fr=Xe[1];return u[0]=Wt[0]*In+Wt[4]*fr+Wt[12],u[1]=Wt[1]*In+Wt[5]*fr+Wt[13],u[3]=Wt[3]*In+Wt[7]*fr+Wt[15],u}const Da=100;class Ft{constructor(u,Xe,Wt=new ft(u.width+200,u.height+200,25),In=new ft(u.width+200,u.height+200,25)){this.transform=u,this.mapProjection=Xe,this.grid=Wt,this.ignoredGrid=In,this.pitchFactor=Math.cos(u._pitch)*u.cameraToCenterDistance,this.screenRightBoundary=u.width+Da,this.screenBottomBoundary=u.height+Da,this.gridRightBoundary=u.width+200,this.gridBottomBoundary=u.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io){const oo=u.anchorPointX+Ar[0],ao=u.anchorPointY+Ar[1],so=this.projectAndGetPerspectiveRatio(In,oo,ao,fr,no),co=Wt*so.perspectiveRatio;let ho;if(_r||wr)ho=this._projectCollisionBox(u,co,In,fr,_r,wr,Ar,so,no,io);else{const Xe=so.point.x+(io?io.x*co:0),Wt=so.point.y+(io?io.y*co:0);ho={allPointsOccluded:!1,box:[Xe+u.x1*co,Wt+u.y1*co,Xe+u.x2*co,Wt+u.y2*co]}}const[go,xo,ko,Co]=ho.box;return this.mapProjection.useSpecialProjectionForSymbols&&(_r?ho.allPointsOccluded:this.mapProjection.isOccluded(oo,ao,fr))||so.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(go,xo,ko,Co)||"always"!==Xe&&this.grid.hitTest(go,xo,ko,Co,Xe,Kr)?{box:[go,xo,ko,Co],placeable:!1,offscreen:!1}:{box:[go,xo,ko,Co],placeable:!0,offscreen:this.isOffscreen(go,xo,ko,Co)}}placeCollisionCircles(u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go){const xo=[],ko=new Xe.P(Wt.anchorX,Wt.anchorY),Co=this.getPerspectiveRatio(wr,ko.x,ko.y,Ar,go),Io=(oo?_r/Co:_r*Co)/Xe.ap,zo={getElevation:go,labelPlaneMatrix:Kr,lineVertexArray:In,pitchWithMap:oo,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:ko,unwrappedTileID:Ar,width:this.transform.width,height:this.transform.height,translation:ho},Bo=Tt(Io,fr,Wt.lineOffsetX*Io,Wt.lineOffsetY*Io,!1,Wt,!1,zo);let ca=!1,ua=!1,ns=!0;if(Bo){const Wt=.5*so*Co+co,In=new Xe.P(-100,-100),fr=new Xe.P(this.screenRightBoundary,this.screenBottomBoundary),_r=new pt,wr=Bo.first,Ar=Bo.last;let Kr=[];for(let u=wr.path.length-1;u>=1;u--)Kr.push(wr.path[u]);for(let u=1;u<Ar.path.length;u++)Kr.push(Ar.path[u]);const oo=2.5*Wt;if(no){const u=this.projectPathToScreenSpace(Kr,zo,no);Kr=u.some((u=>u.signedDistanceFromCamera<=0))?[]:u.map((u=>u.point))}let ho=[];if(Kr.length>0){const u=Kr[0].clone(),Wt=Kr[0].clone();for(let Xe=1;Xe<Kr.length;Xe++)u.x=Math.min(u.x,Kr[Xe].x),u.y=Math.min(u.y,Kr[Xe].y),Wt.x=Math.max(Wt.x,Kr[Xe].x),Wt.y=Math.max(Wt.y,Kr[Xe].y);ho=u.x>=In.x&&Wt.x<=fr.x&&u.y>=In.y&&Wt.y<=fr.y?[Kr]:Wt.x<In.x||u.x>fr.x||Wt.y<In.y||u.y>fr.y?[]:Xe.al([Kr],In.x,In.y,fr.x,fr.y)}for(const Xe of ho){_r.reset(Xe,.25*Wt);let In=0;In=_r.length<=.5*Wt?1:Math.ceil(_r.paddedLength/oo)+1;for(let Xe=0;Xe<In;Xe++){const fr=Xe/Math.max(In-1,1),wr=_r.lerp(fr),Ar=wr.x+Da,Kr=wr.y+Da;xo.push(Ar,Kr,Wt,0);const no=Ar-Wt,oo=Kr-Wt,so=Ar+Wt,co=Kr+Wt;if(ns=ns&&this.isOffscreen(no,oo,so,co),ua=ua||this.isInsideGrid(no,oo,so,co),"always"!==u&&this.grid.hitTestCircle(Ar,Kr,Wt,u,ao)&&(ca=!0,!io))return{circles:[],offscreen:!1,collisionDetected:ca}}}}return{circles:!io&&ca||!ua||Co<this.perspectiveRatioCutoff?[]:xo,offscreen:ns,collisionDetected:ca}}projectPathToScreenSpace(u,Xe,Wt){return u.map((u=>xt(u.x,u.y,Wt,Xe.getElevation)))}queryRenderedSymbols(u){if(0===u.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const Wt=[];let In=1/0,fr=1/0,_r=-1/0,wr=-1/0;for(const Ar of u){const u=new Xe.P(Ar.x+Da,Ar.y+Da);In=Math.min(In,u.x),fr=Math.min(fr,u.y),_r=Math.max(_r,u.x),wr=Math.max(wr,u.y),Wt.push(u)}const Ar=this.grid.query(In,fr,_r,wr).concat(this.ignoredGrid.query(In,fr,_r,wr)),Kr={},no={};for(const u of Ar){const In=u.key;if(void 0===Kr[In.bucketInstanceId]&&(Kr[In.bucketInstanceId]={}),Kr[In.bucketInstanceId][In.featureIndex])continue;const fr=[new Xe.P(u.x1,u.y1),new Xe.P(u.x2,u.y1),new Xe.P(u.x2,u.y2),new Xe.P(u.x1,u.y2)];Xe.am(Wt,fr)&&(Kr[In.bucketInstanceId][In.featureIndex]=!0,void 0===no[In.bucketInstanceId]&&(no[In.bucketInstanceId]=[]),no[In.bucketInstanceId].push(In.featureIndex))}return no}insertCollisionBox(u,Xe,Wt,In,fr,_r){(Wt?this.ignoredGrid:this.grid).insert({bucketInstanceId:In,featureIndex:fr,collisionGroupID:_r,overlapMode:Xe},u[0],u[1],u[2],u[3])}insertCollisionCircles(u,Xe,Wt,In,fr,_r){const wr=Wt?this.ignoredGrid:this.grid,Ar={bucketInstanceId:In,featureIndex:fr,collisionGroupID:_r,overlapMode:Xe};for(let Xe=0;Xe<u.length;Xe+=4)wr.insertCircle(Ar,u[Xe],u[Xe+1],u[Xe+2])}projectAndGetPerspectiveRatio(u,Wt,In,fr,_r){let wr;_r?(wr=[Wt,In,_r(Wt,In),1],Xe.af(wr,wr,u)):(wr=[Wt,In,0,1],kt(wr,wr,u));const Ar=wr[3];return{point:new Xe.P((wr[0]/Ar+1)/2*this.transform.width+Da,(-wr[1]/Ar+1)/2*this.transform.height+Da),perspectiveRatio:.5+this.transform.cameraToCenterDistance/Ar*.5,isOccluded:!1,signedDistanceFromCamera:Ar}}getPerspectiveRatio(u,Xe,Wt,In,fr){const _r=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(Xe,Wt,In,fr):xt(Xe,Wt,u,fr);return.5+this.transform.cameraToCenterDistance/_r.signedDistanceFromCamera*.5}isOffscreen(u,Xe,Wt,In){return Wt<Da||u>=this.screenRightBoundary||In<Da||Xe>this.screenBottomBoundary}isInsideGrid(u,Xe,Wt,In){return Wt>=0&&u<this.gridRightBoundary&&In>=0&&Xe<this.gridBottomBoundary}getViewportMatrix(){const u=Xe.an([]);return Xe.J(u,u,[-100,-100,0]),u}_projectCollisionBox(u,Wt,In,fr,_r,wr,Ar,Kr,no,io){let oo=new Xe.P(1,0),ao=new Xe.P(0,1);const so=new Xe.P(u.anchorPointX+Ar[0],u.anchorPointY+Ar[1]);if(wr&&!_r){const u=this.projectAndGetPerspectiveRatio(In,so.x+1,so.y,fr,no).point.sub(Kr.point).unit(),Wt=Math.atan(u.y/u.x)+(u.x<0?Math.PI:0),_r=Math.sin(Wt),wr=Math.cos(Wt);oo=new Xe.P(wr,_r),ao=new Xe.P(-_r,wr)}else if(!wr&&_r){const u=-this.transform.angle,Wt=Math.sin(u),In=Math.cos(u);oo=new Xe.P(In,Wt),ao=new Xe.P(-Wt,In)}let co=Kr.point,ho=Wt;if(_r){co=so;const u=this.transform.zoom-Math.floor(this.transform.zoom);ho=Math.pow(2,-u),ho*=this.mapProjection.getPitchedTextCorrection(this.transform,so,fr),io||(ho*=Xe.ac(.5+Kr.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}io&&(co=co.add(oo.mult(io.x*ho)).add(ao.mult(io.y*ho)));const go=u.x1*ho,xo=u.x2*ho,ko=(go+xo)/2,Co=u.y1*ho,Io=u.y2*ho,zo=(Co+Io)/2,Bo=[{offsetX:go,offsetY:Co},{offsetX:ko,offsetY:Co},{offsetX:xo,offsetY:Co},{offsetX:xo,offsetY:zo},{offsetX:xo,offsetY:Io},{offsetX:ko,offsetY:Io},{offsetX:go,offsetY:Io},{offsetX:go,offsetY:zo}];let ca=[];for(const{offsetX:u,offsetY:Wt}of Bo)ca.push(new Xe.P(co.x+oo.x*u+ao.x*Wt,co.y+oo.y*u+ao.y*Wt));let ua=!1;if(_r){const u=ca.map((u=>this.projectAndGetPerspectiveRatio(In,u.x,u.y,fr,no)));ua=u.some((u=>!u.isOccluded)),ca=u.map((u=>u.point))}else ua=!0;return{box:Xe.ao(ca),allPointsOccluded:!ua}}}function Bt(u,Wt,In){return Wt*(Xe.X/(u.tileSize*Math.pow(2,In-u.tileID.overscaledZ)))}class Ot{constructor(u,Xe,Wt,In){this.opacity=u?Math.max(0,Math.min(1,u.opacity+(u.placed?Xe:-Xe))):In&&Wt?1:0,this.placed=Wt}isHidden(){return 0===this.opacity&&!this.placed}}class Nt{constructor(u,Xe,Wt,In,fr){this.text=new Ot(u?u.text:null,Xe,Wt,fr),this.icon=new Ot(u?u.icon:null,Xe,In,fr)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ut{constructor(u,Xe,Wt){this.text=u,this.icon=Xe,this.skipFade=Wt}}class jt{constructor(){this.invProjMatrix=Xe.H(),this.viewportMatrix=Xe.H(),this.circles=[]}}class Zt{constructor(u,Xe,Wt,In,fr){this.bucketInstanceId=u,this.featureIndex=Xe,this.sourceLayerIndex=Wt,this.bucketIndex=In,this.tileID=fr}}class qt{constructor(u){this.crossSourceCollisions=u,this.maxGroupID=0,this.collisionGroups={}}get(u){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[u]){const Xe=++this.maxGroupID;this.collisionGroups[u]={ID:Xe,predicate:u=>u.collisionGroupID===Xe}}return this.collisionGroups[u]}}function Vt(u,Wt,In,fr,_r){const{horizontalAlign:wr,verticalAlign:Ar}=Xe.au(u);return new Xe.P(-(wr-.5)*Wt+fr[0]*_r,-(Ar-.5)*In+fr[1]*_r)}class Gt{constructor(u,Xe,Wt,In,fr,_r){this.transform=u.clone(),this.terrain=Wt,this.collisionIndex=new Ft(this.transform,Xe),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=In,this.retainedQueryData={},this.collisionGroups=new qt(fr),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=_r,_r&&(_r.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(u){const Xe=this.terrain;return Xe?(Wt,In)=>Xe.getElevation(u,Wt,In):null}getBucketParts(u,Wt,In,fr){const _r=In.getBucket(Wt),wr=In.latestFeatureIndex;if(!_r||!wr||Wt.id!==_r.layerIds[0])return;const Ar=In.collisionBoxArray,Kr=_r.layers[0].layout,no=_r.layers[0].paint,io=Math.pow(2,this.transform.zoom-In.tileID.overscaledZ),oo=In.tileSize/Xe.X,ao=In.tileID.toUnwrapped(),so=this.transform.calculatePosMatrix(ao),co="map"===Kr.get("text-pitch-alignment"),ho="map"===Kr.get("text-rotation-alignment"),go=Bt(In,1,this.transform.zoom),xo=this.collisionIndex.mapProjection.translatePosition(this.transform,In,no.get("text-translate"),no.get("text-translate-anchor")),ko=this.collisionIndex.mapProjection.translatePosition(this.transform,In,no.get("icon-translate"),no.get("icon-translate-anchor")),Co=gt(so,co,ho,this.transform,go);let Io=null;if(co){const u=vt(so,co,ho,this.transform,go);Io=Xe.L([],this.transform.labelPlaneMatrix,u)}this.retainedQueryData[_r.bucketInstanceId]=new Zt(_r.bucketInstanceId,wr,_r.sourceLayerIndex,_r.index,In.tileID);const zo={bucket:_r,layout:Kr,translationText:xo,translationIcon:ko,posMatrix:so,unwrappedTileID:ao,textLabelPlaneMatrix:Co,labelToScreenMatrix:Io,scale:io,textPixelRatio:oo,holdingForFade:In.holdingForFade(),collisionBoxArray:Ar,partiallyEvaluatedTextSize:Xe.ag(_r.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(_r.sourceID)};if(fr)for(const Xe of _r.sortKeyRanges){const{sortKey:Wt,symbolInstanceStart:In,symbolInstanceEnd:fr}=Xe;u.push({sortKey:Wt,symbolInstanceStart:In,symbolInstanceEnd:fr,parameters:zo})}else u.push({symbolInstanceStart:0,symbolInstanceEnd:_r.symbolInstances.length,parameters:zo})}attemptAnchorPlacement(u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go,xo,ko,Co){const Io=Xe.aq[u.textAnchor],zo=[u.textOffset0,u.textOffset1],Bo=Vt(Io,In,fr,zo,_r),ca=this.collisionIndex.placeCollisionBox(Wt,ao,Kr,no,io,Ar,wr,go,oo.predicate,Co,Bo);if((!ko||this.collisionIndex.placeCollisionBox(ko,ao,Kr,no,io,Ar,wr,xo,oo.predicate,Co,Bo).placeable)&&ca.placeable){let u;if(this.prevPlacement&&this.prevPlacement.variableOffsets[so.crossTileID]&&this.prevPlacement.placements[so.crossTileID]&&this.prevPlacement.placements[so.crossTileID].text&&(u=this.prevPlacement.variableOffsets[so.crossTileID].anchor),0===so.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[so.crossTileID]={textOffset:zo,width:In,height:fr,anchor:Io,textBoxScale:_r,prevAnchor:u},this.markUsedJustification(co,Io,so,ho),co.allowVerticalPlacement&&(this.markUsedOrientation(co,ho,so),this.placedOrientations[so.crossTileID]=ho),{shift:Bo,placedGlyphBoxes:ca}}}placeLayerBucketPart(u,Wt,In){const{bucket:fr,layout:_r,translationText:wr,translationIcon:Ar,posMatrix:Kr,unwrappedTileID:no,textLabelPlaneMatrix:io,labelToScreenMatrix:oo,textPixelRatio:ao,holdingForFade:so,collisionBoxArray:co,partiallyEvaluatedTextSize:ho,collisionGroup:go}=u.parameters,xo=_r.get("text-optional"),ko=_r.get("icon-optional"),Co=Xe.ar(_r,"text-overlap","text-allow-overlap"),Io="always"===Co,zo=Xe.ar(_r,"icon-overlap","icon-allow-overlap"),Bo="always"===zo,ca="map"===_r.get("text-rotation-alignment"),ua="map"===_r.get("text-pitch-alignment"),Da="none"!==_r.get("icon-text-fit"),ns="viewport-y"===_r.get("symbol-z-order"),yl=Io&&(Bo||!fr.hasIconData()||ko),vl=Bo&&(Io||!fr.hasTextData()||xo);!fr.collisionArrays&&co&&fr.deserializeCollisionBoxes(co);const kl=this._getTerrainElevationFunc(this.retainedQueryData[fr.bucketInstanceId].tileID),D=(u,co,Bo)=>{var ns,Al;if(Wt[u.crossTileID])return;if(so)return void(this.placements[u.crossTileID]=new Ut(!1,!1,!1));let Ml=!1,Rl=!1,Ol=!0,Ll=null,Dl={box:null,placeable:!1,offscreen:null},Bl={box:null,placeable:!1,offscreen:null},Nl=null,Vl=null,Ul=null,$l=0,Wl=0,Zl=0;co.textFeatureIndex?$l=co.textFeatureIndex:u.useRuntimeCollisionCircles&&($l=u.featureIndex),co.verticalTextFeatureIndex&&(Wl=co.verticalTextFeatureIndex);const Gl=co.textBox;if(Gl){const i=Wt=>{let In=Xe.ah.horizontal;if(fr.allowVerticalPlacement&&!Wt&&this.prevPlacement){const Xe=this.prevPlacement.placedOrientations[u.crossTileID];Xe&&(this.placedOrientations[u.crossTileID]=Xe,In=Xe,this.markUsedOrientation(fr,In,u))}return In},o=(Wt,In)=>{if(fr.allowVerticalPlacement&&u.numVerticalGlyphVertices>0&&co.verticalTextBox){for(const u of fr.writingModes)if(u===Xe.ah.vertical?(Dl=In(),Bl=Dl):Dl=Wt(),Dl&&Dl.placeable)break}else Dl=Wt()},Wt=u.textAnchorOffsetStartIndex,_r=u.textAnchorOffsetEndIndex;if(_r===Wt){const a=(Xe,Wt)=>{const In=this.collisionIndex.placeCollisionBox(Xe,Co,ao,Kr,no,ua,ca,wr,go.predicate,kl);return In&&In.placeable&&(this.markUsedOrientation(fr,Wt,u),this.placedOrientations[u.crossTileID]=Wt),In};o((()=>a(Gl,Xe.ah.horizontal)),(()=>{const Wt=co.verticalTextBox;return fr.allowVerticalPlacement&&u.numVerticalGlyphVertices>0&&Wt?a(Wt,Xe.ah.vertical):{box:null,offscreen:null}})),i(Dl&&Dl.placeable)}else{let io=Xe.aq[null===(Al=null===(ns=this.prevPlacement)||void 0===ns?void 0:ns.variableOffsets[u.crossTileID])||void 0===Al?void 0:Al.anchor];const m=(oo,so,co)=>{const ho=oo.x2-oo.x1,xo=oo.y2-oo.y1,ko=u.textBoxScale,Io=Da&&"never"===zo?so:null;let Bo=null,ns="never"===Co?1:2,yl="never";io&&ns++;for(let Xe=0;Xe<ns;Xe++){for(let Xe=Wt;Xe<_r;Xe++){const Wt=fr.textAnchorOffsets.get(Xe);if(io&&Wt.textAnchor!==io)continue;const In=this.attemptAnchorPlacement(Wt,oo,ho,xo,ko,ca,ua,ao,Kr,no,go,yl,u,fr,co,wr,Ar,Io,kl);if(In&&(Bo=In.placedGlyphBoxes,Bo&&Bo.placeable))return Ml=!0,Ll=In.shift,Bo}io?io=null:yl=Co}return In&&!Bo&&(Bo={box:this.collisionIndex.placeCollisionBox(Gl,"always",ao,Kr,no,ua,ca,wr,go.predicate,kl,new Xe.P(0,0)).box,offscreen:!1,placeable:!1}),Bo};o((()=>m(Gl,co.iconBox,Xe.ah.horizontal)),(()=>{const Wt=co.verticalTextBox;return fr.allowVerticalPlacement&&(!Dl||!Dl.placeable)&&u.numVerticalGlyphVertices>0&&Wt?m(Wt,co.verticalIconBox,Xe.ah.vertical):{box:null,occluded:!0,offscreen:null}})),Dl&&(Ml=Dl.placeable,Ol=Dl.offscreen);const oo=i(Dl&&Dl.placeable);if(!Ml&&this.prevPlacement){const Xe=this.prevPlacement.variableOffsets[u.crossTileID];Xe&&(this.variableOffsets[u.crossTileID]=Xe,this.markUsedJustification(fr,Xe.anchor,u,oo))}}}if(Nl=Dl,Ml=Nl&&Nl.placeable,Ol=Nl&&Nl.offscreen,u.useRuntimeCollisionCircles){const Wt=fr.text.placedSymbolArray.get(u.centerJustifiedTextSymbolIndex),Ar=Xe.ai(fr.textSizeData,ho,Wt),ao=_r.get("text-padding");Vl=this.collisionIndex.placeCollisionCircles(Co,Wt,fr.lineVertexArray,fr.glyphOffsetArray,Ar,Kr,no,io,oo,In,ua,go.predicate,u.collisionCircleDiameter,ao,wr,kl),Vl.circles.length&&Vl.collisionDetected&&!In&&Xe.w("Collisions detected, but collision boxes are not shown"),Ml=Io||Vl.circles.length>0&&!Vl.collisionDetected,Ol=Ol&&Vl.offscreen}if(co.iconFeatureIndex&&(Zl=co.iconFeatureIndex),co.iconBox){const t=u=>this.collisionIndex.placeCollisionBox(u,zo,ao,Kr,no,ua,ca,Ar,go.predicate,kl,Da&&Ll?Ll:void 0);Bl&&Bl.placeable&&co.verticalIconBox?(Ul=t(co.verticalIconBox),Rl=Ul.placeable):(Ul=t(co.iconBox),Rl=Ul.placeable),Ol=Ol&&Ul.offscreen}const Xl=xo||0===u.numHorizontalGlyphVertices&&0===u.numVerticalGlyphVertices,Jl=ko||0===u.numIconVertices;Xl||Jl?Jl?Xl||(Rl=Rl&&Ml):Ml=Rl&&Ml:Rl=Ml=Rl&&Ml;const Ql=Rl&&Ul.placeable;if(Ml&&Nl.placeable&&this.collisionIndex.insertCollisionBox(Nl.box,Co,_r.get("text-ignore-placement"),fr.bucketInstanceId,Bl&&Bl.placeable&&Wl?Wl:$l,go.ID),Ql&&this.collisionIndex.insertCollisionBox(Ul.box,zo,_r.get("icon-ignore-placement"),fr.bucketInstanceId,Zl,go.ID),Vl&&Ml&&this.collisionIndex.insertCollisionCircles(Vl.circles,Co,_r.get("text-ignore-placement"),fr.bucketInstanceId,$l,go.ID),In&&this.storeCollisionData(fr.bucketInstanceId,Bo,co,Nl,Ul,Vl),0===u.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");if(0===fr.bucketInstanceId)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[u.crossTileID]=new Ut(Ml||yl,Rl||vl,Ol||fr.justReloaded),Wt[u.crossTileID]=!0};if(ns){if(0!==u.symbolInstanceStart)throw new Error("bucket.bucketInstanceId should be 0");const Xe=fr.getSortedSymbolIndexes(this.transform.angle);for(let u=Xe.length-1;u>=0;--u){const Wt=Xe[u];D(fr.symbolInstances.get(Wt),fr.collisionArrays[Wt],Wt)}}else for(let Xe=u.symbolInstanceStart;Xe<u.symbolInstanceEnd;Xe++)D(fr.symbolInstances.get(Xe),fr.collisionArrays[Xe],Xe);if(In&&fr.bucketInstanceId in this.collisionCircleArrays){const u=this.collisionCircleArrays[fr.bucketInstanceId];Xe.as(u.invProjMatrix,Kr),u.viewportMatrix=this.collisionIndex.getViewportMatrix()}fr.justReloaded=!1}storeCollisionData(u,Xe,Wt,In,fr,_r){if(Wt.textBox||Wt.iconBox){let _r,wr;this.collisionBoxArrays.has(u)?_r=this.collisionBoxArrays.get(u):(_r=new Map,this.collisionBoxArrays.set(u,_r)),_r.has(Xe)?wr=_r.get(Xe):(wr={text:null,icon:null},_r.set(Xe,wr)),Wt.textBox&&(wr.text=In.box),Wt.iconBox&&(wr.icon=fr.box)}if(_r){let Xe=this.collisionCircleArrays[u];void 0===Xe&&(Xe=this.collisionCircleArrays[u]=new jt);for(let u=0;u<_r.circles.length;u+=4)Xe.circles.push(_r.circles[u+0]),Xe.circles.push(_r.circles[u+1]),Xe.circles.push(_r.circles[u+2]),Xe.circles.push(_r.collisionDetected?1:0)}}markUsedJustification(u,Wt,In,fr){let _r;_r=fr===Xe.ah.vertical?In.verticalPlacedTextSymbolIndex:{left:In.leftJustifiedTextSymbolIndex,center:In.centerJustifiedTextSymbolIndex,right:In.rightJustifiedTextSymbolIndex}[Xe.at(Wt)];const wr=[In.leftJustifiedTextSymbolIndex,In.centerJustifiedTextSymbolIndex,In.rightJustifiedTextSymbolIndex,In.verticalPlacedTextSymbolIndex];for(const Xe of wr)Xe>=0&&(u.text.placedSymbolArray.get(Xe).crossTileID=_r>=0&&Xe!==_r?0:In.crossTileID)}markUsedOrientation(u,Wt,In){const fr=Wt===Xe.ah.horizontal||Wt===Xe.ah.horizontalOnly?Wt:0,_r=Wt===Xe.ah.vertical?Wt:0,wr=[In.leftJustifiedTextSymbolIndex,In.centerJustifiedTextSymbolIndex,In.rightJustifiedTextSymbolIndex];for(const Xe of wr)u.text.placedSymbolArray.get(Xe).placedOrientation=fr;In.verticalPlacedTextSymbolIndex&&(u.text.placedSymbolArray.get(In.verticalPlacedTextSymbolIndex).placedOrientation=_r)}commit(u){this.commitTime=u,this.zoomAtLastRecencyCheck=this.transform.zoom;const Xe=this.prevPlacement;let Wt=!1;this.prevZoomAdjustment=Xe?Xe.zoomAdjustment(this.transform.zoom):0;const In=Xe?Xe.symbolFadeChange(u):1,fr=Xe?Xe.opacities:{},_r=Xe?Xe.variableOffsets:{},wr=Xe?Xe.placedOrientations:{};for(const u in this.placements){const Xe=this.placements[u],_r=fr[u];_r?(this.opacities[u]=new Nt(_r,In,Xe.text,Xe.icon),Wt=Wt||Xe.text!==_r.text.placed||Xe.icon!==_r.icon.placed):(this.opacities[u]=new Nt(null,In,Xe.text,Xe.icon,Xe.skipFade),Wt=Wt||Xe.text||Xe.icon)}for(const u in fr){const Xe=fr[u];if(!this.opacities[u]){const fr=new Nt(Xe,In,!1,!1);fr.isHidden()||(this.opacities[u]=fr,Wt=Wt||Xe.text.placed||Xe.icon.placed)}}for(const u in _r)this.variableOffsets[u]||!this.opacities[u]||this.opacities[u].isHidden()||(this.variableOffsets[u]=_r[u]);for(const u in wr)this.placedOrientations[u]||!this.opacities[u]||this.opacities[u].isHidden()||(this.placedOrientations[u]=wr[u]);if(Xe&&void 0===Xe.lastPlacementChangeTime)throw new Error("Last placement time for previous placement is not defined");Wt?this.lastPlacementChangeTime=u:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=Xe?Xe.lastPlacementChangeTime:u)}updateLayerOpacities(u,Xe){const Wt={};for(const In of Xe){const Xe=In.getBucket(u);Xe&&In.latestFeatureIndex&&u.id===Xe.layerIds[0]&&this.updateBucketOpacities(Xe,In.tileID,Wt,In.collisionBoxArray)}}updateBucketOpacities(u,Wt,In,fr){u.hasTextData()&&(u.text.opacityVertexArray.clear(),u.text.hasVisibleVertices=!1),u.hasIconData()&&(u.icon.opacityVertexArray.clear(),u.icon.hasVisibleVertices=!1),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexArray.clear(),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexArray.clear();const _r=u.layers[0],wr=_r.layout,Ar=new Nt(null,0,!1,!1,!0),Kr=wr.get("text-allow-overlap"),no=wr.get("icon-allow-overlap"),io=_r._unevaluatedLayout.hasValue("text-variable-anchor")||_r._unevaluatedLayout.hasValue("text-variable-anchor-offset"),oo="map"===wr.get("text-rotation-alignment"),ao="map"===wr.get("text-pitch-alignment"),so="none"!==wr.get("icon-text-fit"),co=new Nt(null,0,Kr&&(no||!u.hasIconData()||wr.get("icon-optional")),no&&(Kr||!u.hasTextData()||wr.get("text-optional")),!0);!u.collisionArrays&&fr&&(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData())&&u.deserializeCollisionBoxes(fr);const m=(u,Xe,Wt)=>{for(let In=0;In<Xe/4;In++)u.opacityVertexArray.emplaceBack(Wt);u.hasVisibleVertices=u.hasVisibleVertices||Wt!==Ol},ho=this.collisionBoxArrays.get(u.bucketInstanceId);for(let Wt=0;Wt<u.symbolInstances.length;Wt++){const fr=u.symbolInstances.get(Wt),{numHorizontalGlyphVertices:_r,numVerticalGlyphVertices:wr,crossTileID:Kr}=fr;let no=this.opacities[Kr];In[Kr]?no=Ar:no||(no=co,this.opacities[Kr]=no),In[Kr]=!0;const go=fr.numIconVertices>0,xo=this.placedOrientations[fr.crossTileID],ko=xo===Xe.ah.vertical,Co=xo===Xe.ah.horizontal||xo===Xe.ah.horizontalOnly;if(_r>0||wr>0){const Xe=te(no.text);m(u.text,_r,ko?Ol:Xe),m(u.text,wr,Co?Ol:Xe);const Wt=no.text.isHidden();[fr.rightJustifiedTextSymbolIndex,fr.centerJustifiedTextSymbolIndex,fr.leftJustifiedTextSymbolIndex].forEach((Xe=>{Xe>=0&&(u.text.placedSymbolArray.get(Xe).hidden=Wt||ko?1:0)})),fr.verticalPlacedTextSymbolIndex>=0&&(u.text.placedSymbolArray.get(fr.verticalPlacedTextSymbolIndex).hidden=Wt||Co?1:0);const In=this.variableOffsets[fr.crossTileID];In&&this.markUsedJustification(u,In.anchor,fr,xo);const Ar=this.placedOrientations[fr.crossTileID];Ar&&(this.markUsedJustification(u,"left",fr,Ar),this.markUsedOrientation(u,Ar,fr))}if(go){const Xe=te(no.icon),Wt=!(so&&fr.verticalPlacedIconSymbolIndex&&ko);fr.placedIconSymbolIndex>=0&&(m(u.icon,fr.numIconVertices,Wt?Xe:Ol),u.icon.placedSymbolArray.get(fr.placedIconSymbolIndex).hidden=no.icon.isHidden()),fr.verticalPlacedIconSymbolIndex>=0&&(m(u.icon,fr.numVerticalIconVertices,Wt?Ol:Xe),u.icon.placedSymbolArray.get(fr.verticalPlacedIconSymbolIndex).hidden=no.icon.isHidden())}const Io=ho&&ho.has(Wt)?ho.get(Wt):{text:null,icon:null};if(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData()){const In=u.collisionArrays[Wt];if(In){let Wt=new Xe.P(0,0);if(In.textBox||In.verticalTextBox){let Xe=!0;if(io){const u=this.variableOffsets[Kr];u?(Wt=Vt(u.anchor,u.width,u.height,u.textOffset,u.textBoxScale),oo&&Wt._rotate(ao?this.transform.angle:-this.transform.angle)):Xe=!1}if(In.textBox||In.verticalTextBox){let fr;In.textBox&&(fr=ko),In.verticalTextBox&&(fr=Co),Ht(u.textCollisionBox.collisionVertexArray,no.text.placed,!Xe||fr,Io.text,Wt.x,Wt.y)}}if(In.iconBox||In.verticalIconBox){const Xe=Boolean(!Co&&In.verticalIconBox);let fr;In.iconBox&&(fr=Xe),In.verticalIconBox&&(fr=!Xe),Ht(u.iconCollisionBox.collisionVertexArray,no.icon.placed,fr,Io.icon,so?Wt.x:0,so?Wt.y:0)}}}}if(u.sortFeatures(this.transform.angle),this.retainedQueryData[u.bucketInstanceId]&&(this.retainedQueryData[u.bucketInstanceId].featureSortOrder=u.featureSortOrder),u.hasTextData()&&u.text.opacityVertexBuffer&&u.text.opacityVertexBuffer.updateData(u.text.opacityVertexArray),u.hasIconData()&&u.icon.opacityVertexBuffer&&u.icon.opacityVertexBuffer.updateData(u.icon.opacityVertexArray),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexBuffer&&u.iconCollisionBox.collisionVertexBuffer.updateData(u.iconCollisionBox.collisionVertexArray),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexBuffer&&u.textCollisionBox.collisionVertexBuffer.updateData(u.textCollisionBox.collisionVertexArray),u.text.opacityVertexArray.length!==u.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${u.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${u.text.layoutVertexArray.length}) / 4`);if(u.icon.opacityVertexArray.length!==u.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${u.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${u.icon.layoutVertexArray.length}) / 4`);if(u.bucketInstanceId in this.collisionCircleArrays){const Xe=this.collisionCircleArrays[u.bucketInstanceId];u.placementInvProjMatrix=Xe.invProjMatrix,u.placementViewportMatrix=Xe.viewportMatrix,u.collisionCircleArray=Xe.circles,delete this.collisionCircleArrays[u.bucketInstanceId]}}symbolFadeChange(u){return 0===this.fadeDuration?1:(u-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(u){return Math.max(0,(this.transform.zoom-u)/1.5)}hasTransitions(u){return this.stale||u-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(u,Xe){const Wt=this.zoomAtLastRecencyCheck===Xe?1-this.zoomAdjustment(Xe):1;return this.zoomAtLastRecencyCheck=Xe,this.commitTime+this.fadeDuration*Wt>u}setStale(){this.stale=!0}}function Ht(u,Xe,Wt,In,fr,_r){In&&0!==In.length||(In=[0,0,0,0]);const wr=In[0]-Da,Ar=In[1]-Da,Kr=In[2]-Da,no=In[3]-Da;u.emplaceBack(Xe?1:0,Wt?1:0,fr||0,_r||0,wr,Ar),u.emplaceBack(Xe?1:0,Wt?1:0,fr||0,_r||0,Kr,Ar),u.emplaceBack(Xe?1:0,Wt?1:0,fr||0,_r||0,Kr,no),u.emplaceBack(Xe?1:0,Wt?1:0,fr||0,_r||0,wr,no)}const ns=Math.pow(2,25),yl=Math.pow(2,24),vl=Math.pow(2,17),kl=Math.pow(2,16),Al=Math.pow(2,9),Ml=Math.pow(2,8),Rl=Math.pow(2,1);function te(u){if(0===u.opacity&&!u.placed)return 0;if(1===u.opacity&&u.placed)return 4294967295;const Xe=u.placed?1:0,Wt=Math.floor(127*u.opacity);return Wt*ns+Xe*yl+Wt*vl+Xe*kl+Wt*Al+Xe*Ml+Wt*Rl+Xe}const Ol=0;function ie(){return{isOccluded:(u,Xe,Wt)=>!1,getPitchedTextCorrection:(u,Xe,Wt)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(u,Xe,Wt,In){throw new Error("Not implemented.")},translatePosition:(u,Xe,Wt,In)=>function(u,Xe,Wt,In,fr=!1){if(!Wt[0]&&!Wt[1])return[0,0];const _r=fr?"map"===In?u.angle:0:"viewport"===In?-u.angle:0;if(_r){const u=Math.sin(_r),Xe=Math.cos(_r);Wt=[Wt[0]*Xe-Wt[1]*u,Wt[0]*u+Wt[1]*Xe]}return[fr?Wt[0]:Bt(Xe,Wt[0],u.zoom),fr?Wt[1]:Bt(Xe,Wt[1],u.zoom)]}(u,Xe,Wt,In),getCircleRadiusCorrection:u=>1}}class ae{constructor(u){this._sortAcrossTiles="viewport-y"!==u.layout.get("symbol-z-order")&&!u.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(u,Xe,Wt,In,fr){const _r=this._bucketParts;for(;this._currentTileIndex<u.length;)if(Xe.getBucketParts(_r,In,u[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,fr())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,_r.sort(((u,Xe)=>u.sortKey-Xe.sortKey)));this._currentPartIndex<_r.length;)if(Xe.placeLayerBucketPart(_r[this._currentPartIndex],this._seenCrossTileIDs,Wt),this._currentPartIndex++,fr())return!0;return!1}}class se{constructor(u,Xe,Wt,In,fr,_r,wr,Ar){this.placement=new Gt(u,ie(),Xe,_r,wr,Ar),this._currentPlacementIndex=Wt.length-1,this._forceFullPlacement=In,this._showCollisionBoxes=fr,this._done=!1}isDone(){return this._done}continuePlacement(u,Xe,Wt){const In=_r.now(),s=()=>!this._forceFullPlacement&&_r.now()-In>2;for(;this._currentPlacementIndex>=0;){const In=Xe[u[this._currentPlacementIndex]],fr=this.placement.collisionIndex.transform.zoom;if("symbol"===In.type&&(!In.minzoom||In.minzoom<=fr)&&(!In.maxzoom||In.maxzoom>fr)){if(this._inProgressLayer||(this._inProgressLayer=new ae(In)),this._inProgressLayer.continuePlacement(Wt[In.source],this.placement,this._showCollisionBoxes,In,s))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(u){return this.placement.commit(u),this.placement}}const Ll=512/Xe.X/2;class re{constructor(u,Wt,In){this.tileID=u,this.bucketInstanceId=In,this._symbolsByKey={};const fr=new Map;for(let u=0;u<Wt.length;u++){const Xe=Wt.get(u),In=Xe.key,_r=fr.get(In);_r?_r.push(Xe):fr.set(In,[Xe])}for(const[u,Wt]of fr){const In={positions:Wt.map((u=>({x:Math.floor(u.anchorX*Ll),y:Math.floor(u.anchorY*Ll)}))),crossTileIDs:Wt.map((u=>u.crossTileID))};if(In.positions.length>128){const u=new Xe.av(In.positions.length,16,Uint16Array);for(const{x:Xe,y:Wt}of In.positions)u.add(Xe,Wt);u.finish(),delete In.positions,In.index=u}this._symbolsByKey[u]=In}}getScaledCoordinates(u,Wt){const{x:In,y:fr,z:_r}=this.tileID.canonical,{x:wr,y:Ar,z:Kr}=Wt.canonical,no=Ll/Math.pow(2,Kr-_r),io=(Ar*Xe.X+u.anchorY)*no,oo=fr*Xe.X*Ll;return{x:Math.floor((wr*Xe.X+u.anchorX)*no-In*Xe.X*Ll),y:Math.floor(io-oo)}}findMatches(u,Xe,Wt){const In=this.tileID.canonical.z<Xe.canonical.z?1:Math.pow(2,this.tileID.canonical.z-Xe.canonical.z);for(let fr=0;fr<u.length;fr++){const _r=u.get(fr);if(_r.crossTileID)continue;const wr=this._symbolsByKey[_r.key];if(!wr)continue;const Ar=this.getScaledCoordinates(_r,Xe);if(wr.index){const u=wr.index.range(Ar.x-In,Ar.y-In,Ar.x+In,Ar.y+In).sort();for(const Xe of u){const u=wr.crossTileIDs[Xe];if(!Wt[u]){Wt[u]=!0,_r.crossTileID=u;break}}}else if(wr.positions)for(let u=0;u<wr.positions.length;u++){const Xe=wr.positions[u],fr=wr.crossTileIDs[u];if(Math.abs(Xe.x-Ar.x)<=In&&Math.abs(Xe.y-Ar.y)<=In&&!Wt[fr]){Wt[fr]=!0,_r.crossTileID=fr;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map((({crossTileIDs:u})=>u))}}class ne{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class le{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(u){const Xe=Math.round((u-this.lng)/360);if(0!==Xe)for(const u in this.indexes){const Wt=this.indexes[u],In={};for(const u in Wt){const fr=Wt[u];fr.tileID=fr.tileID.unwrapTo(fr.tileID.wrap+Xe),In[fr.tileID.key]=fr}this.indexes[u]=In}this.lng=u}addBucket(u,Xe,Wt){if(this.indexes[u.overscaledZ]&&this.indexes[u.overscaledZ][u.key]){if(this.indexes[u.overscaledZ][u.key].bucketInstanceId===Xe.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(u.overscaledZ,this.indexes[u.overscaledZ][u.key])}for(let u=0;u<Xe.symbolInstances.length;u++)Xe.symbolInstances.get(u).crossTileID=0;this.usedCrossTileIDs[u.overscaledZ]||(this.usedCrossTileIDs[u.overscaledZ]={});const In=this.usedCrossTileIDs[u.overscaledZ];for(const Wt in this.indexes){const fr=this.indexes[Wt];if(Number(Wt)>u.overscaledZ)for(const Wt in fr){const _r=fr[Wt];_r.tileID.isChildOf(u)&&_r.findMatches(Xe.symbolInstances,u,In)}else{const _r=fr[u.scaledTo(Number(Wt)).key];_r&&_r.findMatches(Xe.symbolInstances,u,In)}}for(let u=0;u<Xe.symbolInstances.length;u++){const fr=Xe.symbolInstances.get(u);fr.crossTileID||(fr.crossTileID=Wt.generate(),In[fr.crossTileID]=!0)}return void 0===this.indexes[u.overscaledZ]&&(this.indexes[u.overscaledZ]={}),this.indexes[u.overscaledZ][u.key]=new re(u,Xe.symbolInstances,Xe.bucketInstanceId),!0}removeBucketCrossTileIDs(u,Xe){for(const Wt of Xe.getCrossTileIDsLists())for(const Xe of Wt)delete this.usedCrossTileIDs[u][Xe]}removeStaleBuckets(u){let Xe=!1;for(const Wt in this.indexes){const In=this.indexes[Wt];for(const fr in In)u[In[fr].bucketInstanceId]||(this.removeBucketCrossTileIDs(Wt,In[fr]),delete In[fr],Xe=!0)}return Xe}}class he{constructor(){this.layerIndexes={},this.crossTileIDs=new ne,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(u,Xe,Wt){let In=this.layerIndexes[u.id];void 0===In&&(In=this.layerIndexes[u.id]=new le);let fr=!1;const _r={};In.handleWrapJump(Wt);for(const Wt of Xe){const Xe=Wt.getBucket(u);Xe&&u.id===Xe.layerIds[0]&&(Xe.bucketInstanceId||(Xe.bucketInstanceId=++this.maxBucketInstanceId),In.addBucket(Wt.tileID,Xe,this.crossTileIDs)&&(fr=!0),_r[Xe.bucketInstanceId]=!0)}return In.removeStaleBuckets(_r)&&(fr=!0),fr}pruneUnusedLayers(u){const Xe={};u.forEach((u=>{Xe[u]=!0}));for(const u in this.layerIndexes)Xe[u]||delete this.layerIndexes[u]}}const ce=(u,Wt)=>Xe.t(u,Wt&&Wt.filter((u=>"source.canvas"!==u.identifier))),Dl=Xe.aw();class de extends Xe.E{constructor(u,Wt={}){super(),this._rtlPluginLoaded=()=>{for(const u in this.sourceCaches){const Xe=this.sourceCaches[u].getSource().type;"vector"!==Xe&&"geojson"!==Xe||this.sourceCaches[u].reload()}},this.map=u,this.dispatcher=new U(N(),u._getMapId()),this.dispatcher.registerMessageHandler("GG",((u,Xe)=>this.getGlyphs(u,Xe))),this.dispatcher.registerMessageHandler("GI",((u,Xe)=>this.getImages(u,Xe))),this.imageManager=new T,this.imageManager.setEventedParent(this),this.glyphManager=new C(u._requestManager,Wt.localIdeographFontFamily),this.lineAtlas=new R(256,512),this.crossTileSymbolIndex=new he,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new Xe.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",Xe.ay()),nt().on(Bo,this._rtlPluginLoaded),this.on("data",(u=>{if("source"!==u.dataType||"metadata"!==u.sourceDataType)return;const Xe=this.sourceCaches[u.sourceId];if(!Xe)return;const Wt=Xe.getSource();if(Wt&&Wt.vectorLayerIds)for(const u in this._layers){const Xe=this._layers[u];Xe.source===Wt.id&&this._validateLayer(Xe)}}))}loadURL(u,Wt={},In){this.fire(new Xe.k("dataloading",{dataType:"style"})),Wt.validate="boolean"!=typeof Wt.validate||Wt.validate;const fr=this.map._requestManager.transformRequest(u,"Style");this._loadStyleRequest=new AbortController;const _r=this._loadStyleRequest;Xe.h(fr,this._loadStyleRequest).then((u=>{this._loadStyleRequest=null,this._load(u.data,Wt,In)})).catch((u=>{this._loadStyleRequest=null,u&&!_r.signal.aborted&&this.fire(new Xe.j(u))}))}loadJSON(u,Wt={},In){this.fire(new Xe.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,_r.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,Wt.validate=!1!==Wt.validate,this._load(u,Wt,In)})).catch((()=>{}))}loadEmpty(){this.fire(new Xe.k("dataloading",{dataType:"style"})),this._load(Dl,{validate:!1})}_load(u,Wt,In){var fr;const _r=Wt.transformStyle?Wt.transformStyle(In,u):u;if(!Wt.validate||!ce(this,Xe.u(_r))){this._loaded=!0,this.stylesheet=_r;for(const u in _r.sources)this.addSource(u,_r.sources[u],{validate:!1});_r.sprite?this._loadSprite(_r.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(_r.glyphs),this._createLayers(),this.light=new D(this.stylesheet.light),this.sky=new A(this.stylesheet.sky),this.map.setTerrain(null!==(fr=this.stylesheet.terrain)&&void 0!==fr?fr:null),this.fire(new Xe.k("data",{dataType:"style"})),this.fire(new Xe.k("style.load"))}}_createLayers(){const u=Xe.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",u),this._order=u.map((u=>u.id)),this._layers={},this._serializedLayers=null;for(const Wt of u){const u=Xe.aA(Wt);u.setEventedParent(this,{layer:{id:Wt.id}}),this._layers[Wt.id]=u}}_loadSprite(u,Wt=!1,In=void 0){let fr;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(u,Wt,In,fr){return Xe._(this,void 0,void 0,(function*(){const wr=x(u),Ar=In>1?"@2x":"",Kr={},no={};for(const{id:u,url:In}of wr){const _r=Wt.transformRequest(y(In,Ar,".json"),"SpriteJSON");Kr[u]=Xe.h(_r,fr);const wr=Wt.transformRequest(y(In,Ar,".png"),"SpriteImage");no[u]=oo.getImage(wr,fr)}return yield Promise.all([...Object.values(Kr),...Object.values(no)]),function(u,Wt){return Xe._(this,void 0,void 0,(function*(){const Xe={};for(const In in u){Xe[In]={};const fr=_r.getImageCanvasContext((yield Wt[In]).data),wr=(yield u[In]).data;for(const u in wr){const{width:Wt,height:_r,x:Ar,y:Kr,sdf:no,pixelRatio:io,stretchX:oo,stretchY:ao,content:so,textFitWidth:co,textFitHeight:ho}=wr[u];Xe[In][u]={data:null,pixelRatio:io,sdf:no,stretchX:oo,stretchY:ao,content:so,textFitWidth:co,textFitHeight:ho,spriteData:{width:Wt,height:_r,x:Ar,y:Kr,context:fr}}}}return Xe}))}(Kr,no)}))}(u,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((u=>{if(this._spriteRequest=null,u)for(const Xe in u){this._spritesImagesIds[Xe]=[];const In=this._spritesImagesIds[Xe]?this._spritesImagesIds[Xe].filter((Xe=>!(Xe in u))):[];for(const u of In)this.imageManager.removeImage(u),this._changedImages[u]=!0;for(const In in u[Xe]){const fr="default"===Xe?In:`${Xe}:${In}`;this._spritesImagesIds[Xe].push(fr),fr in this.imageManager.images?this.imageManager.updateImage(fr,u[Xe][In],!1):this.imageManager.addImage(fr,u[Xe][In]),Wt&&(this._changedImages[fr]=!0)}}})).catch((u=>{this._spriteRequest=null,fr=u,this.fire(new Xe.j(fr))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),Wt&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"})),In&&In(fr)}))}_unloadSprite(){for(const u of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(u),this._changedImages[u]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}_validateLayer(u){const Wt=this.sourceCaches[u.source];if(!Wt)return;const In=u.sourceLayer;if(!In)return;const fr=Wt.getSource();("geojson"===fr.type||fr.vectorLayerIds&&-1===fr.vectorLayerIds.indexOf(In))&&this.fire(new Xe.j(new Error(`Source layer "${In}" does not exist on source "${fr.id}" as specified by style layer "${u.id}".`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const u in this.sourceCaches)if(!this.sourceCaches[u].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(u,Wt=!1){const In=this._serializedAllLayers();if(!u||0===u.length)return Object.values(Wt?Xe.aB(In):In);const fr=[];for(const _r of u)if(In[_r]){const u=Wt?Xe.aB(In[_r]):In[_r];fr.push(u)}return fr}_serializedAllLayers(){let u=this._serializedLayers;if(u)return u;u=this._serializedLayers={};const Xe=Object.keys(this._layers);for(const Wt of Xe){const Xe=this._layers[Wt];"custom"!==Xe.type&&(u[Wt]=Xe.serialize())}return u}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;if(this.sky&&this.sky.hasTransition())return!0;for(const u in this.sourceCaches)if(this.sourceCaches[u].hasTransition())return!0;for(const u in this._layers)if(this._layers[u].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(u){if(!this._loaded)return;const Wt=this._changed;if(Wt){const Xe=Object.keys(this._updatedLayers),Wt=Object.keys(this._removedLayers);(Xe.length||Wt.length)&&this._updateWorkerLayers(Xe,Wt);for(const u in this._updatedSources){const Xe=this._updatedSources[u];if("reload"===Xe)this._reloadSource(u);else{if("clear"!==Xe)throw new Error(`Invalid action ${Xe}`);this._clearSource(u)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const Xe in this._updatedPaintProps)this._layers[Xe].updateTransitions(u);this.light.updateTransitions(u),this.sky.updateTransitions(u),this._resetUpdates()}const In={};for(const u in this.sourceCaches){const Xe=this.sourceCaches[u];In[u]=Xe.used,Xe.used=!1}for(const Xe of this._order){const Wt=this._layers[Xe];Wt.recalculate(u,this._availableImages),!Wt.isHidden(u.zoom)&&Wt.source&&(this.sourceCaches[Wt.source].used=!0)}for(const u in In){const Wt=this.sourceCaches[u];!!In[u]!=!!Wt.used&&Wt.fire(new Xe.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:u}))}this.light.recalculate(u),this.sky.recalculate(u),this.z=u.zoom,Wt&&this.fire(new Xe.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const u=Object.keys(this._changedImages);if(u.length){for(const Xe in this.sourceCaches)this.sourceCaches[Xe].reloadTilesForDependencies(["icons","patterns"],u);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const u in this.sourceCaches)this.sourceCaches[u].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(u,Xe){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(u,!1),removedIds:Xe})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(u,Wt={}){var In;this._checkLoaded();const fr=this.serialize();if(u=Wt.transformStyle?Wt.transformStyle(fr,u):u,(null===(In=Wt.validate)||void 0===In||In)&&ce(this,Xe.u(u)))return!1;(u=Xe.aB(u)).layers=Xe.az(u.layers);const _r=Xe.aC(fr,u),wr=this._getOperationsToPerform(_r);if(wr.unimplemented.length>0)throw new Error(`Unimplemented: ${wr.unimplemented.join(", ")}.`);if(0===wr.operations.length)return!1;for(const u of wr.operations)u();return this.stylesheet=u,this._serializedLayers=null,!0}_getOperationsToPerform(u){const Xe=[],Wt=[];for(const In of u)switch(In.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":Xe.push((()=>this.addLayer.apply(this,In.args)));break;case"removeLayer":Xe.push((()=>this.removeLayer.apply(this,In.args)));break;case"setPaintProperty":Xe.push((()=>this.setPaintProperty.apply(this,In.args)));break;case"setLayoutProperty":Xe.push((()=>this.setLayoutProperty.apply(this,In.args)));break;case"setFilter":Xe.push((()=>this.setFilter.apply(this,In.args)));break;case"addSource":Xe.push((()=>this.addSource.apply(this,In.args)));break;case"removeSource":Xe.push((()=>this.removeSource.apply(this,In.args)));break;case"setLayerZoomRange":Xe.push((()=>this.setLayerZoomRange.apply(this,In.args)));break;case"setLight":Xe.push((()=>this.setLight.apply(this,In.args)));break;case"setGeoJSONSourceData":Xe.push((()=>this.setGeoJSONSourceData.apply(this,In.args)));break;case"setGlyphs":Xe.push((()=>this.setGlyphs.apply(this,In.args)));break;case"setSprite":Xe.push((()=>this.setSprite.apply(this,In.args)));break;case"setSky":Xe.push((()=>this.setSky.apply(this,In.args)));break;case"setTerrain":Xe.push((()=>this.map.setTerrain.apply(this,In.args)));break;case"setTransition":Xe.push((()=>{}));break;default:Wt.push(In.command)}return{operations:Xe,unimplemented:Wt}}addImage(u,Wt){if(this.getImage(u))return this.fire(new Xe.j(new Error(`An image named "${u}" already exists.`)));this.imageManager.addImage(u,Wt),this._afterImageUpdated(u)}updateImage(u,Xe){this.imageManager.updateImage(u,Xe)}getImage(u){return this.imageManager.getImage(u)}removeImage(u){if(!this.getImage(u))return this.fire(new Xe.j(new Error(`An image named "${u}" does not exist.`)));this.imageManager.removeImage(u),this._afterImageUpdated(u)}_afterImageUpdated(u){this._availableImages=this.imageManager.listImages(),this._changedImages[u]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(u,Wt,In={}){if(this._checkLoaded(),void 0!==this.sourceCaches[u])throw new Error(`Source "${u}" already exists.`);if(!Wt.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(Wt).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(Wt.type)>=0&&this._validate(Xe.u.source,`sources.${u}`,Wt,null,In))return;this.map&&this.map._collectResourceTiming&&(Wt.collectResourceTiming=!0);const fr=this.sourceCaches[u]=new ut(u,Wt,this.dispatcher);fr.style=this,fr.setEventedParent(this,(()=>({isSourceLoaded:fr.loaded(),source:fr.serialize(),sourceId:u}))),fr.onAdd(this.map),this._changed=!0}removeSource(u){if(this._checkLoaded(),void 0===this.sourceCaches[u])throw new Error("There is no source with this ID");for(const Wt in this._layers)if(this._layers[Wt].source===u)return this.fire(new Xe.j(new Error(`Source "${u}" cannot be removed while layer "${Wt}" is using it.`)));const Wt=this.sourceCaches[u];delete this.sourceCaches[u],delete this._updatedSources[u],Wt.fire(new Xe.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:u})),Wt.setEventedParent(null),Wt.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(u,Xe){if(this._checkLoaded(),void 0===this.sourceCaches[u])throw new Error(`There is no source with this ID=${u}`);const Wt=this.sourceCaches[u].getSource();if("geojson"!==Wt.type)throw new Error(`geojsonSource.type is ${Wt.type}, which is !== 'geojson`);Wt.setData(Xe),this._changed=!0}getSource(u){return this.sourceCaches[u]&&this.sourceCaches[u].getSource()}addLayer(u,Wt,In={}){this._checkLoaded();const fr=u.id;if(this.getLayer(fr))return void this.fire(new Xe.j(new Error(`Layer "${fr}" already exists on this map.`)));let _r;if("custom"===u.type){if(ce(this,Xe.aD(u)))return;_r=Xe.aA(u)}else{if("source"in u&&"object"==typeof u.source&&(this.addSource(fr,u.source),u=Xe.aB(u),u=Xe.e(u,{source:fr})),this._validate(Xe.u.layer,`layers.${fr}`,u,{arrayIndex:-1},In))return;_r=Xe.aA(u),this._validateLayer(_r),_r.setEventedParent(this,{layer:{id:fr}})}const wr=Wt?this._order.indexOf(Wt):this._order.length;if(Wt&&-1===wr)this.fire(new Xe.j(new Error(`Cannot add layer "${fr}" before non-existing layer "${Wt}".`)));else{if(this._order.splice(wr,0,fr),this._layerOrderChanged=!0,this._layers[fr]=_r,this._removedLayers[fr]&&_r.source&&"custom"!==_r.type){const u=this._removedLayers[fr];delete this._removedLayers[fr],u.type!==_r.type?this._updatedSources[_r.source]="clear":(this._updatedSources[_r.source]="reload",this.sourceCaches[_r.source].pause())}this._updateLayer(_r),_r.onAdd&&_r.onAdd(this.map)}}moveLayer(u,Wt){if(this._checkLoaded(),this._changed=!0,!this._layers[u])return void this.fire(new Xe.j(new Error(`The layer '${u}' does not exist in the map's style and cannot be moved.`)));if(u===Wt)return;const In=this._order.indexOf(u);this._order.splice(In,1);const fr=Wt?this._order.indexOf(Wt):this._order.length;Wt&&-1===fr?this.fire(new Xe.j(new Error(`Cannot move layer "${u}" before non-existing layer "${Wt}".`))):(this._order.splice(fr,0,u),this._layerOrderChanged=!0)}removeLayer(u){this._checkLoaded();const Wt=this._layers[u];if(!Wt)return void this.fire(new Xe.j(new Error(`Cannot remove non-existing layer "${u}".`)));Wt.setEventedParent(null);const In=this._order.indexOf(u);this._order.splice(In,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[u]=Wt,delete this._layers[u],this._serializedLayers&&delete this._serializedLayers[u],delete this._updatedLayers[u],delete this._updatedPaintProps[u],Wt.onRemove&&Wt.onRemove(this.map)}getLayer(u){return this._layers[u]}getLayersOrder(){return[...this._order]}hasLayer(u){return u in this._layers}setLayerZoomRange(u,Wt,In){this._checkLoaded();const fr=this.getLayer(u);fr?fr.minzoom===Wt&&fr.maxzoom===In||(null!=Wt&&(fr.minzoom=Wt),null!=In&&(fr.maxzoom=In),this._updateLayer(fr)):this.fire(new Xe.j(new Error(`Cannot set the zoom range of non-existing layer "${u}".`)))}setFilter(u,Wt,In={}){this._checkLoaded();const fr=this.getLayer(u);if(fr){if(!Xe.aE(fr.filter,Wt))return null==Wt?(fr.filter=void 0,void this._updateLayer(fr)):void(this._validate(Xe.u.filter,`layers.${fr.id}.filter`,Wt,null,In)||(fr.filter=Xe.aB(Wt),this._updateLayer(fr)))}else this.fire(new Xe.j(new Error(`Cannot filter non-existing layer "${u}".`)))}getFilter(u){return Xe.aB(this.getLayer(u).filter)}setLayoutProperty(u,Wt,In,fr={}){this._checkLoaded();const _r=this.getLayer(u);_r?Xe.aE(_r.getLayoutProperty(Wt),In)||(_r.setLayoutProperty(Wt,In,fr),this._updateLayer(_r)):this.fire(new Xe.j(new Error(`Cannot style non-existing layer "${u}".`)))}getLayoutProperty(u,Wt){const In=this.getLayer(u);if(In)return In.getLayoutProperty(Wt);this.fire(new Xe.j(new Error(`Cannot get style of non-existing layer "${u}".`)))}setPaintProperty(u,Wt,In,fr={}){this._checkLoaded();const _r=this.getLayer(u);_r?Xe.aE(_r.getPaintProperty(Wt),In)||(_r.setPaintProperty(Wt,In,fr)&&this._updateLayer(_r),this._changed=!0,this._updatedPaintProps[u]=!0,this._serializedLayers=null):this.fire(new Xe.j(new Error(`Cannot style non-existing layer "${u}".`)))}getPaintProperty(u,Xe){return this.getLayer(u).getPaintProperty(Xe)}setFeatureState(u,Wt){this._checkLoaded();const In=u.source,fr=u.sourceLayer,_r=this.sourceCaches[In];if(void 0===_r)return void this.fire(new Xe.j(new Error(`The source '${In}' does not exist in the map's style.`)));const wr=_r.getSource().type;"geojson"===wr&&fr?this.fire(new Xe.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==wr||fr?(void 0===u.id&&this.fire(new Xe.j(new Error("The feature id parameter must be provided."))),_r.setFeatureState(fr,u.id,Wt)):this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(u,Wt){this._checkLoaded();const In=u.source,fr=this.sourceCaches[In];if(void 0===fr)return void this.fire(new Xe.j(new Error(`The source '${In}' does not exist in the map's style.`)));const _r=fr.getSource().type,wr="vector"===_r?u.sourceLayer:void 0;"vector"!==_r||wr?Wt&&"string"!=typeof u.id&&"number"!=typeof u.id?this.fire(new Xe.j(new Error("A feature id is required to remove its specific state property."))):fr.removeFeatureState(wr,u.id,Wt):this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(u){this._checkLoaded();const Wt=u.source,In=u.sourceLayer,fr=this.sourceCaches[Wt];if(void 0!==fr)return"vector"!==fr.getSource().type||In?(void 0===u.id&&this.fire(new Xe.j(new Error("The feature id parameter must be provided."))),fr.getFeatureState(In,u.id)):void this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new Xe.j(new Error(`The source '${Wt}' does not exist in the map's style.`)))}getTransition(){return Xe.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const u=Xe.aF(this.sourceCaches,(u=>u.serialize())),Wt=this._serializeByIds(this._order,!0),In=this.map.getTerrain()||void 0,fr=this.stylesheet;return Xe.aG({version:fr.version,name:fr.name,metadata:fr.metadata,light:fr.light,sky:fr.sky,center:fr.center,zoom:fr.zoom,bearing:fr.bearing,pitch:fr.pitch,sprite:fr.sprite,glyphs:fr.glyphs,transition:fr.transition,sources:u,layers:Wt,terrain:In},(u=>void 0!==u))}_updateLayer(u){this._updatedLayers[u.id]=!0,u.source&&!this._updatedSources[u.source]&&"raster"!==this.sourceCaches[u.source].getSource().type&&(this._updatedSources[u.source]="reload",this.sourceCaches[u.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(u){const e=u=>"fill-extrusion"===this._layers[u].type,Xe={},Wt=[];for(let In=this._order.length-1;In>=0;In--){const fr=this._order[In];if(e(fr)){Xe[fr]=In;for(const Xe of u){const u=Xe[fr];if(u)for(const Xe of u)Wt.push(Xe)}}}Wt.sort(((u,Xe)=>Xe.intersectionZ-u.intersectionZ));const In=[];for(let fr=this._order.length-1;fr>=0;fr--){const _r=this._order[fr];if(e(_r))for(let u=Wt.length-1;u>=0;u--){const _r=Wt[u].feature;if(Xe[_r.layer.id]<fr)break;In.push(_r),Wt.pop()}else for(const Xe of u){const u=Xe[_r];if(u)for(const Xe of u)In.push(Xe.feature)}}return In}queryRenderedFeatures(u,Wt,In){Wt&&Wt.filter&&this._validate(Xe.u.filter,"queryRenderedFeatures.filter",Wt.filter,null,Wt);const fr={};if(Wt&&Wt.layers){if(!Array.isArray(Wt.layers))return this.fire(new Xe.j(new Error("parameters.layers must be an Array."))),[];for(const u of Wt.layers){const Wt=this._layers[u];if(!Wt)return this.fire(new Xe.j(new Error(`The layer '${u}' does not exist in the map's style and cannot be queried for features.`))),[];fr[Wt.source]=!0}}const _r=[];Wt.availableImages=this._availableImages;const wr=this._serializedAllLayers();for(const Xe in this.sourceCaches)Wt.layers&&!fr[Xe]||_r.push(q(this.sourceCaches[Xe],this._layers,wr,u,Wt,In));return this.placement&&_r.push(function(u,Xe,Wt,In,fr,_r,wr){const Ar={},Kr=_r.queryRenderedSymbols(In),no=[];for(const u of Object.keys(Kr).map(Number))no.push(wr[u]);no.sort(V);for(const Wt of no){const In=Wt.featureIndex.lookupSymbolFeatures(Kr[Wt.bucketInstanceId],Xe,Wt.bucketIndex,Wt.sourceLayerIndex,fr.filter,fr.layers,fr.availableImages,u);for(const u in In){const Xe=Ar[u]=Ar[u]||[],fr=In[u];fr.sort(((u,Xe)=>{const In=Wt.featureSortOrder;if(In){const Wt=In.indexOf(u.featureIndex);return In.indexOf(Xe.featureIndex)-Wt}return Xe.featureIndex-u.featureIndex}));for(const u of fr)Xe.push(u)}}for(const Xe in Ar)Ar[Xe].forEach((In=>{const fr=In.feature,_r=Wt[u[Xe].source].getFeatureState(fr.layer["source-layer"],fr.id);fr.source=fr.layer.source,fr.layer["source-layer"]&&(fr.sourceLayer=fr.layer["source-layer"]),fr.state=_r}));return Ar}(this._layers,wr,this.sourceCaches,u,Wt,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(_r)}querySourceFeatures(u,Wt){Wt&&Wt.filter&&this._validate(Xe.u.filter,"querySourceFeatures.filter",Wt.filter,null,Wt);const In=this.sourceCaches[u];return In?function(u,Xe){const Wt=u.getRenderableIds().map((Xe=>u.getTileByID(Xe))),In=[],fr={};for(let u=0;u<Wt.length;u++){const _r=Wt[u],wr=_r.tileID.canonical.key;fr[wr]||(fr[wr]=!0,_r.querySourceFeatures(In,Xe))}return In}(In,Wt):[]}getLight(){return this.light.getLight()}setLight(u,Wt={}){this._checkLoaded();const In=this.light.getLight();let fr=!1;for(const Wt in u)if(!Xe.aE(u[Wt],In[Wt])){fr=!0;break}if(!fr)return;const wr={now:_r.now(),transition:Xe.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(u,Wt),this.light.updateTransitions(wr)}getSky(){var u;return null===(u=this.stylesheet)||void 0===u?void 0:u.sky}setSky(u,Wt={}){const In=this.getSky();let fr=!1;if(!u&&!In)return;if(u&&!In)fr=!0;else if(!u&&In)fr=!0;else for(const Wt in u)if(!Xe.aE(u[Wt],In[Wt])){fr=!0;break}if(!fr)return;const wr={now:_r.now(),transition:Xe.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=u,this.sky.setSky(u,Wt),this.sky.updateTransitions(wr)}_validate(u,Wt,In,fr,_r={}){return(!_r||!1!==_r.validate)&&ce(this,u.call(Xe.u,Xe.e({key:Wt,style:this.serialize(),value:In,styleSpec:Xe.v},fr)))}_remove(u=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),nt().off(Bo,this._rtlPluginLoaded);for(const u in this._layers)this._layers[u].setEventedParent(null);for(const u in this.sourceCaches){const Xe=this.sourceCaches[u];Xe.setEventedParent(null),Xe.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),u&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(u)}_clearSource(u){this.sourceCaches[u].clearTiles()}_reloadSource(u){this.sourceCaches[u].resume(),this.sourceCaches[u].reload()}_updateSources(u){for(const Xe in this.sourceCaches)this.sourceCaches[Xe].update(u,this.map.terrain)}_generateCollisionBoxes(){for(const u in this.sourceCaches)this._reloadSource(u)}_updatePlacement(u,Xe,Wt,In,fr=!1){let wr=!1,Ar=!1;const Kr={};for(const Xe of this._order){const Wt=this._layers[Xe];if("symbol"!==Wt.type)continue;if(!Kr[Wt.source]){const u=this.sourceCaches[Wt.source];Kr[Wt.source]=u.getRenderableIds(!0).map((Xe=>u.getTileByID(Xe))).sort(((u,Xe)=>Xe.tileID.overscaledZ-u.tileID.overscaledZ||(u.tileID.isLessThan(Xe.tileID)?-1:1)))}const In=this.crossTileSymbolIndex.addLayer(Wt,Kr[Wt.source],u.center.lng);wr=wr||In}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((fr=fr||this._layerOrderChanged||0===Wt)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(_r.now(),u.zoom))&&(this.pauseablePlacement=new se(u,this.map.terrain,this._order,fr,Xe,Wt,In,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Kr),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(_r.now()),Ar=!0),wr&&this.pauseablePlacement.placement.setStale()),Ar||wr)for(const u of this._order){const Xe=this._layers[u];"symbol"===Xe.type&&this.placement.updateLayerOpacities(Xe,Kr[Xe.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(_r.now())}_releaseSymbolFadeTiles(){for(const u in this.sourceCaches)this.sourceCaches[u].releaseSymbolFadeTiles()}getImages(u,Wt){return Xe._(this,void 0,void 0,(function*(){const u=yield this.imageManager.getImages(Wt.icons);this._updateTilesForChangedImages();const Xe=this.sourceCaches[Wt.source];return Xe&&Xe.setDependencies(Wt.tileID.key,Wt.type,Wt.icons),u}))}getGlyphs(u,Wt){return Xe._(this,void 0,void 0,(function*(){const u=yield this.glyphManager.getGlyphs(Wt.stacks),Xe=this.sourceCaches[Wt.source];return Xe&&Xe.setDependencies(Wt.tileID.key,Wt.type,[""]),u}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(u,Wt={}){this._checkLoaded(),u&&this._validate(Xe.u.glyphs,"glyphs",u,null,Wt)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=u,this.glyphManager.entries={},this.glyphManager.setURL(u))}addSprite(u,Wt,In={},fr){this._checkLoaded();const _r=[{id:u,url:Wt}],wr=[...x(this.stylesheet.sprite),..._r];this._validate(Xe.u.sprite,"sprite",wr,null,In)||(this.stylesheet.sprite=wr,this._loadSprite(_r,!0,fr))}removeSprite(u){this._checkLoaded();const Wt=x(this.stylesheet.sprite);if(Wt.find((Xe=>Xe.id===u))){if(this._spritesImagesIds[u])for(const Xe of this._spritesImagesIds[u])this.imageManager.removeImage(Xe),this._changedImages[Xe]=!0;Wt.splice(Wt.findIndex((Xe=>Xe.id===u)),1),this.stylesheet.sprite=Wt.length>0?Wt:void 0,delete this._spritesImagesIds[u],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}else this.fire(new Xe.j(new Error(`Sprite "${u}" doesn't exists on this map.`)))}getSprite(){return x(this.stylesheet.sprite)}setSprite(u,Wt={},In){this._checkLoaded(),u&&this._validate(Xe.u.sprite,"sprite",u,null,Wt)||(this.stylesheet.sprite=u,u?this._loadSprite(u,!0,In):(this._unloadSprite(),In&&In(null)))}}var Bl=Xe.Y([{name:"a_pos",type:"Int16",components:2}]);const Nl={prelude:me("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\n","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\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(unpack_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;}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}"),background:me("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:me("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:me("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);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\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(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);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:me("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:me("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 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;varying 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;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}"),heatmapTexture:me("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}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:me("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:me("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:me("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:me("#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_FragColor=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);}"),fillOutline:me("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);gl_FragColor=outline_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;}"),fillOutlinePattern:me("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\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 vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillPattern:me("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\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 vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:me("varying vec4 v_color;void main() {gl_FragColor=v_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;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec4 v_color;\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\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:me("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\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 vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:me("#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,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\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:me("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;\n#define PI 3.141592653589793\nvoid 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 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;}"),line:me("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\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);gl_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;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\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 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;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\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#endif\nv_width2=vec2(outset,inset);}"),lineGradient:me("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\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);vec4 color=texture2D(u_image,v_uv);gl_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_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\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 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\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#endif\nv_width2=vec2(outset,inset);}"),linePattern:me("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\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_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\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_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\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;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\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#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:me("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\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);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\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\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\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\n#pragma mapbox: initialize lowp float floorwidth\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;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\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#endif\nv_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),raster:me("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\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 float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:me("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_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\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_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:me("#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 inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}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_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\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_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:me("#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_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\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_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}"),terrain:me("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:me("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:me("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:me("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function me(u,Xe){const Wt=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,In=Xe.match(/attribute ([\w]+) ([\w]+)/g),fr=u.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),_r=Xe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),wr=_r?_r.concat(fr):fr,Ar={};return{fragmentSource:u=u.replace(Wt,((u,Xe,Wt,In,fr)=>(Ar[fr]=!0,"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${fr}\nvarying ${Wt} ${In} ${fr};\n#else\nuniform ${Wt} ${In} u_${fr};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${fr}\n ${Wt} ${In} ${fr} = u_${fr};\n#endif\n`))),vertexSource:Xe=Xe.replace(Wt,((u,Xe,Wt,In,fr)=>{const _r="float"===In?"vec2":"vec4",wr=fr.match(/color/)?"color":_r;return Ar[fr]?"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${fr}\nuniform lowp float u_${fr}_t;\nattribute ${Wt} ${_r} a_${fr};\nvarying ${Wt} ${In} ${fr};\n#else\nuniform ${Wt} ${In} u_${fr};\n#endif\n`:"vec4"===wr?`\n#ifndef HAS_UNIFORM_u_${fr}\n ${fr} = a_${fr};\n#else\n ${Wt} ${In} ${fr} = u_${fr};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${fr}\n ${fr} = unpack_mix_${wr}(a_${fr}, u_${fr}_t);\n#else\n ${Wt} ${In} ${fr} = u_${fr};\n#endif\n`:"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${fr}\nuniform lowp float u_${fr}_t;\nattribute ${Wt} ${_r} a_${fr};\n#else\nuniform ${Wt} ${In} u_${fr};\n#endif\n`:"vec4"===wr?`\n#ifndef HAS_UNIFORM_u_${fr}\n ${Wt} ${In} ${fr} = a_${fr};\n#else\n ${Wt} ${In} ${fr} = u_${fr};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${fr}\n ${Wt} ${In} ${fr} = unpack_mix_${wr}(a_${fr}, u_${fr}_t);\n#else\n ${Wt} ${In} ${fr} = u_${fr};\n#endif\n`})),staticAttributes:In,staticUniforms:wr}}class fe{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(u,Xe,Wt,In,fr,_r,wr,Ar,Kr){this.context=u;let no=this.boundPaintVertexBuffers.length!==In.length;for(let u=0;!no&&u<In.length;u++)this.boundPaintVertexBuffers[u]!==In[u]&&(no=!0);!this.vao||this.boundProgram!==Xe||this.boundLayoutVertexBuffer!==Wt||no||this.boundIndexBuffer!==fr||this.boundVertexOffset!==_r||this.boundDynamicVertexBuffer!==wr||this.boundDynamicVertexBuffer2!==Ar||this.boundDynamicVertexBuffer3!==Kr?this.freshBind(Xe,Wt,In,fr,_r,wr,Ar,Kr):(u.bindVertexArray.set(this.vao),wr&&wr.bind(),fr&&fr.dynamicDraw&&fr.bind(),Ar&&Ar.bind(),Kr&&Kr.bind())}freshBind(u,Xe,Wt,In,fr,_r,wr,Ar){const Kr=u.numAttributes,no=this.context,io=no.gl;this.vao&&this.destroy(),this.vao=no.createVertexArray(),no.bindVertexArray.set(this.vao),this.boundProgram=u,this.boundLayoutVertexBuffer=Xe,this.boundPaintVertexBuffers=Wt,this.boundIndexBuffer=In,this.boundVertexOffset=fr,this.boundDynamicVertexBuffer=_r,this.boundDynamicVertexBuffer2=wr,this.boundDynamicVertexBuffer3=Ar,Xe.enableAttributes(io,u);for(const Xe of Wt)Xe.enableAttributes(io,u);_r&&_r.enableAttributes(io,u),wr&&wr.enableAttributes(io,u),Ar&&Ar.enableAttributes(io,u),Xe.bind(),Xe.setVertexAttribPointers(io,u,fr);for(const Xe of Wt)Xe.bind(),Xe.setVertexAttribPointers(io,u,fr);_r&&(_r.bind(),_r.setVertexAttribPointers(io,u,fr)),In&&In.bind(),wr&&(wr.bind(),wr.setVertexAttribPointers(io,u,fr)),Ar&&(Ar.bind(),Ar.setVertexAttribPointers(io,u,fr)),no.currentNumAttributes=Kr}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const ge=(u,Wt,In,fr,_r)=>({u_matrix:u,u_texture:0,u_ele_delta:Wt,u_fog_matrix:In,u_fog_color:fr?fr.properties.get("fog-color"):Xe.aM.white,u_fog_ground_blend:fr?fr.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:fr?fr.calculateFogBlendOpacity(_r):0,u_horizon_color:fr?fr.properties.get("horizon-color"):Xe.aM.white,u_horizon_fog_blend:fr?fr.properties.get("horizon-fog-blend"):1});function ve(u){const Xe=[];for(let Wt=0;Wt<u.length;Wt++){if(null===u[Wt])continue;const In=u[Wt].split(" ");Xe.push(In.pop())}return Xe}class xe{constructor(u,Wt,In,fr,_r,wr){const Ar=u.gl;this.program=Ar.createProgram();const Kr=ve(Wt.staticAttributes),no=In?In.getBinderAttributes():[],io=Kr.concat(no),oo=Nl.prelude.staticUniforms?ve(Nl.prelude.staticUniforms):[],ao=Wt.staticUniforms?ve(Wt.staticUniforms):[],so=In?In.getBinderUniforms():[],co=oo.concat(ao).concat(so),ho=[];for(const u of co)ho.indexOf(u)<0&&ho.push(u);const go=In?In.defines():[];_r&&go.push("#define OVERDRAW_INSPECTOR;"),wr&&go.push("#define TERRAIN3D;");const xo=go.concat(Nl.prelude.fragmentSource,Wt.fragmentSource).join("\n"),ko=go.concat(Nl.prelude.vertexSource,Wt.vertexSource).join("\n"),Co=Ar.createShader(Ar.FRAGMENT_SHADER);if(Ar.isContextLost())return void(this.failedToCreate=!0);if(Ar.shaderSource(Co,xo),Ar.compileShader(Co),!Ar.getShaderParameter(Co,Ar.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Ar.getShaderInfoLog(Co)}`);Ar.attachShader(this.program,Co);const Io=Ar.createShader(Ar.VERTEX_SHADER);if(Ar.isContextLost())return void(this.failedToCreate=!0);if(Ar.shaderSource(Io,ko),Ar.compileShader(Io),!Ar.getShaderParameter(Io,Ar.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Ar.getShaderInfoLog(Io)}`);Ar.attachShader(this.program,Io),this.attributes={};const zo={};this.numAttributes=io.length;for(let u=0;u<this.numAttributes;u++)io[u]&&(Ar.bindAttribLocation(this.program,u,io[u]),this.attributes[io[u]]=u);if(Ar.linkProgram(this.program),!Ar.getProgramParameter(this.program,Ar.LINK_STATUS))throw new Error(`Program failed to link: ${Ar.getProgramInfoLog(this.program)}`);Ar.deleteShader(Io),Ar.deleteShader(Co);for(let u=0;u<ho.length;u++){const Xe=ho[u];if(Xe&&!zo[Xe]){const u=Ar.getUniformLocation(this.program,Xe);u&&(zo[Xe]=u)}}this.fixedUniforms=fr(u,zo),this.terrainUniforms=((u,Wt)=>({u_depth:new Xe.aH(u,Wt.u_depth),u_terrain:new Xe.aH(u,Wt.u_terrain),u_terrain_dim:new Xe.aI(u,Wt.u_terrain_dim),u_terrain_matrix:new Xe.aJ(u,Wt.u_terrain_matrix),u_terrain_unpack:new Xe.aK(u,Wt.u_terrain_unpack),u_terrain_exaggeration:new Xe.aI(u,Wt.u_terrain_exaggeration)}))(u,zo),this.binderUniforms=In?In.getUniforms(u,zo):[]}draw(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go,xo){const ko=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(Wt),u.setStencilMode(In),u.setColorMode(fr),u.setCullFace(_r),Ar){u.activeTexture.set(ko.TEXTURE2),ko.bindTexture(ko.TEXTURE_2D,Ar.depthTexture),u.activeTexture.set(ko.TEXTURE3),ko.bindTexture(ko.TEXTURE_2D,Ar.texture);for(const u in this.terrainUniforms)this.terrainUniforms[u].set(Ar[u])}for(const u in this.fixedUniforms)this.fixedUniforms[u].set(wr[u]);co&&co.setUniforms(u,this.binderUniforms,ao,{zoom:so});let Co=0;switch(Xe){case ko.LINES:Co=2;break;case ko.TRIANGLES:Co=3;break;case ko.LINE_STRIP:Co=1}for(const Wt of oo.get()){const In=Wt.vaos||(Wt.vaos={});(In[Kr]||(In[Kr]=new fe)).bind(u,this,no,co?co.getPaintVertexBuffers():[],io,Wt.vertexOffset,ho,go,xo),ko.drawElements(Xe,Wt.primitiveLength*Co,ko.UNSIGNED_SHORT,Wt.primitiveOffset*Co*2)}}}function ye(u,Xe,Wt){const In=1/Bt(Wt,1,Xe.transform.tileZoom),fr=Math.pow(2,Wt.tileID.overscaledZ),_r=Wt.tileSize*Math.pow(2,Xe.transform.tileZoom)/fr,wr=_r*(Wt.tileID.canonical.x+Wt.tileID.wrap*fr),Ar=_r*Wt.tileID.canonical.y;return{u_image:0,u_texsize:Wt.imageAtlasTexture.size,u_scale:[In,u.fromScale,u.toScale],u_fade:u.t,u_pixel_coord_upper:[wr>>16,Ar>>16],u_pixel_coord_lower:[65535&wr,65535&Ar]}}const be=(u,Wt,In,fr)=>{const _r=Wt.style.light,wr=_r.properties.get("position"),Ar=[wr.x,wr.y,wr.z],Kr=function(){var u=new Xe.A(9);return Xe.A!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[5]=0,u[6]=0,u[7]=0),u[0]=1,u[4]=1,u[8]=1,u}();"viewport"===_r.properties.get("anchor")&&function(u,Xe){var Wt=Math.sin(Xe),In=Math.cos(Xe);u[0]=In,u[1]=Wt,u[2]=0,u[3]=-Wt,u[4]=In,u[5]=0,u[6]=0,u[7]=0,u[8]=1}(Kr,-Wt.transform.angle),function(u,Xe,Wt){var In=Xe[0],fr=Xe[1],_r=Xe[2];u[0]=In*Wt[0]+fr*Wt[3]+_r*Wt[6],u[1]=In*Wt[1]+fr*Wt[4]+_r*Wt[7],u[2]=In*Wt[2]+fr*Wt[5]+_r*Wt[8]}(Ar,Ar,Kr);const no=_r.properties.get("color");return{u_matrix:u,u_lightpos:Ar,u_lightintensity:_r.properties.get("intensity"),u_lightcolor:[no.r,no.g,no.b],u_vertical_gradient:+In,u_opacity:fr}},we=(u,Wt,In,fr,_r,wr,Ar)=>Xe.e(be(u,Wt,In,fr),ye(wr,Wt,Ar),{u_height_factor:-Math.pow(2,_r.overscaledZ)/Ar.tileSize/8}),Te=u=>({u_matrix:u}),Ie=(u,Wt,In,fr)=>Xe.e(Te(u),ye(In,Wt,fr)),Ee=(u,Xe)=>({u_matrix:u,u_world:Xe}),Pe=(u,Wt,In,fr,_r)=>Xe.e(Ie(u,Wt,In,fr),{u_world:_r}),Ce=(u,Xe,Wt,In)=>{const fr=u.transform;let _r,wr;if("map"===In.paint.get("circle-pitch-alignment")){const u=Bt(Wt,1,fr.zoom);_r=!0,wr=[u,u]}else _r=!1,wr=fr.pixelsToGLUnits;return{u_camera_to_center_distance:fr.cameraToCenterDistance,u_scale_with_map:+("map"===In.paint.get("circle-pitch-scale")),u_matrix:u.translatePosMatrix(Xe.posMatrix,Wt,In.paint.get("circle-translate"),In.paint.get("circle-translate-anchor")),u_pitch_with_map:+_r,u_device_pixel_ratio:u.pixelRatio,u_extrude_scale:wr}},Se=(u,Xe,Wt)=>({u_matrix:u,u_inv_matrix:Xe,u_camera_to_center_distance:Wt.cameraToCenterDistance,u_viewport_size:[Wt.width,Wt.height]}),ze=(u,Xe,Wt=1)=>({u_matrix:u,u_color:Xe,u_overlay:0,u_overlay_scale:Wt}),De=u=>({u_matrix:u}),Me=(u,Xe,Wt,In)=>({u_matrix:u,u_extrude_scale:Bt(Xe,1,Wt),u_intensity:In}),Ae=(u,Wt,In,fr)=>{const _r=Xe.H();Xe.aP(_r,0,u.width,u.height,0,0,1);const wr=u.context.gl;return{u_matrix:_r,u_world:[wr.drawingBufferWidth,wr.drawingBufferHeight],u_image:In,u_color_ramp:fr,u_opacity:Wt.paint.get("heatmap-opacity")}};function Re(u,Wt){const In=Math.pow(2,Wt.canonical.z),fr=Wt.canonical.y;return[new Xe.Z(0,fr/In).toLngLat().lat,new Xe.Z(0,(fr+1)/In).toLngLat().lat]}const ke=(u,Xe,Wt,In)=>{const fr=u.transform;return{u_matrix:Ne(u,Xe,Wt,In),u_ratio:1/Bt(Xe,1,fr.zoom),u_device_pixel_ratio:u.pixelRatio,u_units_to_pixels:[1/fr.pixelsToGLUnits[0],1/fr.pixelsToGLUnits[1]]}},Le=(u,Wt,In,fr,_r)=>Xe.e(ke(u,Wt,In,_r),{u_image:0,u_image_height:fr}),Fe=(u,Xe,Wt,In,fr)=>{const _r=u.transform,wr=Oe(Xe,_r);return{u_matrix:Ne(u,Xe,Wt,fr),u_texsize:Xe.imageAtlasTexture.size,u_ratio:1/Bt(Xe,1,_r.zoom),u_device_pixel_ratio:u.pixelRatio,u_image:0,u_scale:[wr,In.fromScale,In.toScale],u_fade:In.t,u_units_to_pixels:[1/_r.pixelsToGLUnits[0],1/_r.pixelsToGLUnits[1]]}},Be=(u,Wt,In,fr,_r,wr)=>{const Ar=u.lineAtlas,Kr=Oe(Wt,u.transform),no="round"===In.layout.get("line-cap"),io=Ar.getDash(fr.from,no),oo=Ar.getDash(fr.to,no),ao=io.width*_r.fromScale,so=oo.width*_r.toScale;return Xe.e(ke(u,Wt,In,wr),{u_patternscale_a:[Kr/ao,-io.height/2],u_patternscale_b:[Kr/so,-oo.height/2],u_sdfgamma:Ar.width/(256*Math.min(ao,so)*u.pixelRatio)/2,u_image:0,u_tex_y_a:io.y,u_tex_y_b:oo.y,u_mix:_r.t})};function Oe(u,Xe){return 1/Bt(u,1,Xe.tileZoom)}function Ne(u,Xe,Wt,In){return u.translatePosMatrix(In?In.posMatrix:Xe.tileID.posMatrix,Xe,Wt.paint.get("line-translate"),Wt.paint.get("line-translate-anchor"))}const Ue=(u,Xe,Wt,In,fr)=>{return{u_matrix:u,u_tl_parent:Xe,u_scale_parent:Wt,u_buffer_scale:1,u_fade_t:In.mix,u_opacity:In.opacity*fr.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:fr.paint.get("raster-brightness-min"),u_brightness_high:fr.paint.get("raster-brightness-max"),u_saturation_factor:(wr=fr.paint.get("raster-saturation"),wr>0?1-1/(1.001-wr):-wr),u_contrast_factor:(_r=fr.paint.get("raster-contrast"),_r>0?1/(1-_r):1+_r),u_spin_weights:je(fr.paint.get("raster-hue-rotate"))};var _r,wr};function je(u){u*=Math.PI/180;const Xe=Math.sin(u),Wt=Math.cos(u);return[(2*Wt+1)/3,(-Math.sqrt(3)*Xe-Wt+1)/3,(Math.sqrt(3)*Xe-Wt+1)/3]}const Ze=(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so)=>{const co=wr.transform;return{u_is_size_zoom_constant:+("constant"===u||"source"===u),u_is_size_feature_constant:+("constant"===u||"camera"===u),u_size_t:Xe?Xe.uSizeT:0,u_size:Xe?Xe.uSize:0,u_camera_to_center_distance:co.cameraToCenterDistance,u_pitch:co.pitch/360*2*Math.PI,u_rotate_symbol:+Wt,u_aspect_ratio:co.width/co.height,u_fade_change:wr.options.fadeDuration?wr.symbolFadeChange:1,u_matrix:Ar,u_label_plane_matrix:Kr,u_coord_matrix:no,u_is_text:+oo,u_pitch_with_map:+In,u_is_along_line:fr,u_is_variable_anchor:_r,u_texsize:ao,u_texture:0,u_translation:io,u_pitched_scale:so}},qe=(u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho)=>{const go=Ar.transform;return Xe.e(Ze(u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,ho),{u_gamma_scale:fr?Math.cos(go._pitch)*go.cameraToCenterDistance:1,u_device_pixel_ratio:Ar.pixelRatio,u_is_halo:+co})},Ve=(u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co)=>Xe.e(qe(u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,!0,ao,!0,co),{u_texsize_icon:so,u_texture_icon:1}),Ge=(u,Xe,Wt)=>({u_matrix:u,u_opacity:Xe,u_color:Wt}),He=(u,Wt,In,fr,_r,wr)=>Xe.e(function(u,Xe,Wt,In){const fr=Wt.imageManager.getPattern(u.from.toString()),_r=Wt.imageManager.getPattern(u.to.toString()),{width:wr,height:Ar}=Wt.imageManager.getPixelSize(),Kr=Math.pow(2,In.tileID.overscaledZ),no=In.tileSize*Math.pow(2,Wt.transform.tileZoom)/Kr,io=no*(In.tileID.canonical.x+In.tileID.wrap*Kr),oo=no*In.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:fr.tl,u_pattern_br_a:fr.br,u_pattern_tl_b:_r.tl,u_pattern_br_b:_r.br,u_texsize:[wr,Ar],u_mix:Xe.t,u_pattern_size_a:fr.displaySize,u_pattern_size_b:_r.displaySize,u_scale_a:Xe.fromScale,u_scale_b:Xe.toScale,u_tile_units_to_pixels:1/Bt(In,1,Wt.transform.tileZoom),u_pixel_coord_upper:[io>>16,oo>>16],u_pixel_coord_lower:[65535&io,65535&oo]}}(fr,wr,In,_r),{u_matrix:u,u_opacity:Wt}),Vl={fillExtrusion:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_lightpos:new Xe.aN(u,Wt.u_lightpos),u_lightintensity:new Xe.aI(u,Wt.u_lightintensity),u_lightcolor:new Xe.aN(u,Wt.u_lightcolor),u_vertical_gradient:new Xe.aI(u,Wt.u_vertical_gradient),u_opacity:new Xe.aI(u,Wt.u_opacity)}),fillExtrusionPattern:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_lightpos:new Xe.aN(u,Wt.u_lightpos),u_lightintensity:new Xe.aI(u,Wt.u_lightintensity),u_lightcolor:new Xe.aN(u,Wt.u_lightcolor),u_vertical_gradient:new Xe.aI(u,Wt.u_vertical_gradient),u_height_factor:new Xe.aI(u,Wt.u_height_factor),u_image:new Xe.aH(u,Wt.u_image),u_texsize:new Xe.aO(u,Wt.u_texsize),u_pixel_coord_upper:new Xe.aO(u,Wt.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,Wt.u_pixel_coord_lower),u_scale:new Xe.aN(u,Wt.u_scale),u_fade:new Xe.aI(u,Wt.u_fade),u_opacity:new Xe.aI(u,Wt.u_opacity)}),fill:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix)}),fillPattern:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_image:new Xe.aH(u,Wt.u_image),u_texsize:new Xe.aO(u,Wt.u_texsize),u_pixel_coord_upper:new Xe.aO(u,Wt.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,Wt.u_pixel_coord_lower),u_scale:new Xe.aN(u,Wt.u_scale),u_fade:new Xe.aI(u,Wt.u_fade)}),fillOutline:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_world:new Xe.aO(u,Wt.u_world)}),fillOutlinePattern:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_world:new Xe.aO(u,Wt.u_world),u_image:new Xe.aH(u,Wt.u_image),u_texsize:new Xe.aO(u,Wt.u_texsize),u_pixel_coord_upper:new Xe.aO(u,Wt.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,Wt.u_pixel_coord_lower),u_scale:new Xe.aN(u,Wt.u_scale),u_fade:new Xe.aI(u,Wt.u_fade)}),circle:(u,Wt)=>({u_camera_to_center_distance:new Xe.aI(u,Wt.u_camera_to_center_distance),u_scale_with_map:new Xe.aH(u,Wt.u_scale_with_map),u_pitch_with_map:new Xe.aH(u,Wt.u_pitch_with_map),u_extrude_scale:new Xe.aO(u,Wt.u_extrude_scale),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_matrix:new Xe.aJ(u,Wt.u_matrix)}),collisionBox:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_pixel_extrude_scale:new Xe.aO(u,Wt.u_pixel_extrude_scale)}),collisionCircle:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_inv_matrix:new Xe.aJ(u,Wt.u_inv_matrix),u_camera_to_center_distance:new Xe.aI(u,Wt.u_camera_to_center_distance),u_viewport_size:new Xe.aO(u,Wt.u_viewport_size)}),debug:(u,Wt)=>({u_color:new Xe.aL(u,Wt.u_color),u_matrix:new Xe.aJ(u,Wt.u_matrix),u_overlay:new Xe.aH(u,Wt.u_overlay),u_overlay_scale:new Xe.aI(u,Wt.u_overlay_scale)}),clippingMask:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix)}),heatmap:(u,Wt)=>({u_extrude_scale:new Xe.aI(u,Wt.u_extrude_scale),u_intensity:new Xe.aI(u,Wt.u_intensity),u_matrix:new Xe.aJ(u,Wt.u_matrix)}),heatmapTexture:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_world:new Xe.aO(u,Wt.u_world),u_image:new Xe.aH(u,Wt.u_image),u_color_ramp:new Xe.aH(u,Wt.u_color_ramp),u_opacity:new Xe.aI(u,Wt.u_opacity)}),hillshade:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_image:new Xe.aH(u,Wt.u_image),u_latrange:new Xe.aO(u,Wt.u_latrange),u_light:new Xe.aO(u,Wt.u_light),u_shadow:new Xe.aL(u,Wt.u_shadow),u_highlight:new Xe.aL(u,Wt.u_highlight),u_accent:new Xe.aL(u,Wt.u_accent)}),hillshadePrepare:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_image:new Xe.aH(u,Wt.u_image),u_dimension:new Xe.aO(u,Wt.u_dimension),u_zoom:new Xe.aI(u,Wt.u_zoom),u_unpack:new Xe.aK(u,Wt.u_unpack)}),line:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_ratio:new Xe.aI(u,Wt.u_ratio),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,Wt.u_units_to_pixels)}),lineGradient:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_ratio:new Xe.aI(u,Wt.u_ratio),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,Wt.u_units_to_pixels),u_image:new Xe.aH(u,Wt.u_image),u_image_height:new Xe.aI(u,Wt.u_image_height)}),linePattern:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_texsize:new Xe.aO(u,Wt.u_texsize),u_ratio:new Xe.aI(u,Wt.u_ratio),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_image:new Xe.aH(u,Wt.u_image),u_units_to_pixels:new Xe.aO(u,Wt.u_units_to_pixels),u_scale:new Xe.aN(u,Wt.u_scale),u_fade:new Xe.aI(u,Wt.u_fade)}),lineSDF:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_ratio:new Xe.aI(u,Wt.u_ratio),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,Wt.u_units_to_pixels),u_patternscale_a:new Xe.aO(u,Wt.u_patternscale_a),u_patternscale_b:new Xe.aO(u,Wt.u_patternscale_b),u_sdfgamma:new Xe.aI(u,Wt.u_sdfgamma),u_image:new Xe.aH(u,Wt.u_image),u_tex_y_a:new Xe.aI(u,Wt.u_tex_y_a),u_tex_y_b:new Xe.aI(u,Wt.u_tex_y_b),u_mix:new Xe.aI(u,Wt.u_mix)}),raster:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_tl_parent:new Xe.aO(u,Wt.u_tl_parent),u_scale_parent:new Xe.aI(u,Wt.u_scale_parent),u_buffer_scale:new Xe.aI(u,Wt.u_buffer_scale),u_fade_t:new Xe.aI(u,Wt.u_fade_t),u_opacity:new Xe.aI(u,Wt.u_opacity),u_image0:new Xe.aH(u,Wt.u_image0),u_image1:new Xe.aH(u,Wt.u_image1),u_brightness_low:new Xe.aI(u,Wt.u_brightness_low),u_brightness_high:new Xe.aI(u,Wt.u_brightness_high),u_saturation_factor:new Xe.aI(u,Wt.u_saturation_factor),u_contrast_factor:new Xe.aI(u,Wt.u_contrast_factor),u_spin_weights:new Xe.aN(u,Wt.u_spin_weights)}),symbolIcon:(u,Wt)=>({u_is_size_zoom_constant:new Xe.aH(u,Wt.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,Wt.u_is_size_feature_constant),u_size_t:new Xe.aI(u,Wt.u_size_t),u_size:new Xe.aI(u,Wt.u_size),u_camera_to_center_distance:new Xe.aI(u,Wt.u_camera_to_center_distance),u_pitch:new Xe.aI(u,Wt.u_pitch),u_rotate_symbol:new Xe.aH(u,Wt.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,Wt.u_aspect_ratio),u_fade_change:new Xe.aI(u,Wt.u_fade_change),u_matrix:new Xe.aJ(u,Wt.u_matrix),u_label_plane_matrix:new Xe.aJ(u,Wt.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,Wt.u_coord_matrix),u_is_text:new Xe.aH(u,Wt.u_is_text),u_pitch_with_map:new Xe.aH(u,Wt.u_pitch_with_map),u_is_along_line:new Xe.aH(u,Wt.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,Wt.u_is_variable_anchor),u_texsize:new Xe.aO(u,Wt.u_texsize),u_texture:new Xe.aH(u,Wt.u_texture),u_translation:new Xe.aO(u,Wt.u_translation),u_pitched_scale:new Xe.aI(u,Wt.u_pitched_scale)}),symbolSDF:(u,Wt)=>({u_is_size_zoom_constant:new Xe.aH(u,Wt.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,Wt.u_is_size_feature_constant),u_size_t:new Xe.aI(u,Wt.u_size_t),u_size:new Xe.aI(u,Wt.u_size),u_camera_to_center_distance:new Xe.aI(u,Wt.u_camera_to_center_distance),u_pitch:new Xe.aI(u,Wt.u_pitch),u_rotate_symbol:new Xe.aH(u,Wt.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,Wt.u_aspect_ratio),u_fade_change:new Xe.aI(u,Wt.u_fade_change),u_matrix:new Xe.aJ(u,Wt.u_matrix),u_label_plane_matrix:new Xe.aJ(u,Wt.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,Wt.u_coord_matrix),u_is_text:new Xe.aH(u,Wt.u_is_text),u_pitch_with_map:new Xe.aH(u,Wt.u_pitch_with_map),u_is_along_line:new Xe.aH(u,Wt.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,Wt.u_is_variable_anchor),u_texsize:new Xe.aO(u,Wt.u_texsize),u_texture:new Xe.aH(u,Wt.u_texture),u_gamma_scale:new Xe.aI(u,Wt.u_gamma_scale),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_is_halo:new Xe.aH(u,Wt.u_is_halo),u_translation:new Xe.aO(u,Wt.u_translation),u_pitched_scale:new Xe.aI(u,Wt.u_pitched_scale)}),symbolTextAndIcon:(u,Wt)=>({u_is_size_zoom_constant:new Xe.aH(u,Wt.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,Wt.u_is_size_feature_constant),u_size_t:new Xe.aI(u,Wt.u_size_t),u_size:new Xe.aI(u,Wt.u_size),u_camera_to_center_distance:new Xe.aI(u,Wt.u_camera_to_center_distance),u_pitch:new Xe.aI(u,Wt.u_pitch),u_rotate_symbol:new Xe.aH(u,Wt.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,Wt.u_aspect_ratio),u_fade_change:new Xe.aI(u,Wt.u_fade_change),u_matrix:new Xe.aJ(u,Wt.u_matrix),u_label_plane_matrix:new Xe.aJ(u,Wt.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,Wt.u_coord_matrix),u_is_text:new Xe.aH(u,Wt.u_is_text),u_pitch_with_map:new Xe.aH(u,Wt.u_pitch_with_map),u_is_along_line:new Xe.aH(u,Wt.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,Wt.u_is_variable_anchor),u_texsize:new Xe.aO(u,Wt.u_texsize),u_texsize_icon:new Xe.aO(u,Wt.u_texsize_icon),u_texture:new Xe.aH(u,Wt.u_texture),u_texture_icon:new Xe.aH(u,Wt.u_texture_icon),u_gamma_scale:new Xe.aI(u,Wt.u_gamma_scale),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_is_halo:new Xe.aH(u,Wt.u_is_halo),u_translation:new Xe.aO(u,Wt.u_translation),u_pitched_scale:new Xe.aI(u,Wt.u_pitched_scale)}),background:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_opacity:new Xe.aI(u,Wt.u_opacity),u_color:new Xe.aL(u,Wt.u_color)}),backgroundPattern:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_opacity:new Xe.aI(u,Wt.u_opacity),u_image:new Xe.aH(u,Wt.u_image),u_pattern_tl_a:new Xe.aO(u,Wt.u_pattern_tl_a),u_pattern_br_a:new Xe.aO(u,Wt.u_pattern_br_a),u_pattern_tl_b:new Xe.aO(u,Wt.u_pattern_tl_b),u_pattern_br_b:new Xe.aO(u,Wt.u_pattern_br_b),u_texsize:new Xe.aO(u,Wt.u_texsize),u_mix:new Xe.aI(u,Wt.u_mix),u_pattern_size_a:new Xe.aO(u,Wt.u_pattern_size_a),u_pattern_size_b:new Xe.aO(u,Wt.u_pattern_size_b),u_scale_a:new Xe.aI(u,Wt.u_scale_a),u_scale_b:new Xe.aI(u,Wt.u_scale_b),u_pixel_coord_upper:new Xe.aO(u,Wt.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,Wt.u_pixel_coord_lower),u_tile_units_to_pixels:new Xe.aI(u,Wt.u_tile_units_to_pixels)}),terrain:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_texture:new Xe.aH(u,Wt.u_texture),u_ele_delta:new Xe.aI(u,Wt.u_ele_delta),u_fog_matrix:new Xe.aJ(u,Wt.u_fog_matrix),u_fog_color:new Xe.aL(u,Wt.u_fog_color),u_fog_ground_blend:new Xe.aI(u,Wt.u_fog_ground_blend),u_fog_ground_blend_opacity:new Xe.aI(u,Wt.u_fog_ground_blend_opacity),u_horizon_color:new Xe.aL(u,Wt.u_horizon_color),u_horizon_fog_blend:new Xe.aI(u,Wt.u_horizon_fog_blend)}),terrainDepth:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_ele_delta:new Xe.aI(u,Wt.u_ele_delta)}),terrainCoords:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_texture:new Xe.aH(u,Wt.u_texture),u_terrain_coords_id:new Xe.aI(u,Wt.u_terrain_coords_id),u_ele_delta:new Xe.aI(u,Wt.u_ele_delta)}),sky:(u,Wt)=>({u_sky_color:new Xe.aL(u,Wt.u_sky_color),u_horizon_color:new Xe.aL(u,Wt.u_horizon_color),u_horizon:new Xe.aI(u,Wt.u_horizon),u_sky_horizon_blend:new Xe.aI(u,Wt.u_sky_horizon_blend)})};class $e{constructor(u,Xe,Wt){this.context=u;const In=u.gl;this.buffer=In.createBuffer(),this.dynamicDraw=Boolean(Wt),this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),In.bufferData(In.ELEMENT_ARRAY_BUFFER,Xe.arrayBuffer,this.dynamicDraw?In.DYNAMIC_DRAW:In.STATIC_DRAW),this.dynamicDraw||delete Xe.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){const Xe=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),Xe.bufferSubData(Xe.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Ul={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Ke{constructor(u,Xe,Wt,In){this.length=Xe.length,this.attributes=Wt,this.itemSize=Xe.bytesPerElement,this.dynamicDraw=In,this.context=u;const fr=u.gl;this.buffer=fr.createBuffer(),u.bindVertexBuffer.set(this.buffer),fr.bufferData(fr.ARRAY_BUFFER,Xe.arrayBuffer,this.dynamicDraw?fr.DYNAMIC_DRAW:fr.STATIC_DRAW),this.dynamicDraw||delete Xe.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const Xe=this.context.gl;this.bind(),Xe.bufferSubData(Xe.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,Xe){for(let Wt=0;Wt<this.attributes.length;Wt++){const In=Xe.attributes[this.attributes[Wt].name];void 0!==In&&u.enableVertexAttribArray(In)}}setVertexAttribPointers(u,Xe,Wt){for(let In=0;In<this.attributes.length;In++){const fr=this.attributes[In],_r=Xe.attributes[fr.name];void 0!==_r&&u.vertexAttribPointer(_r,fr.components,u[Ul[fr.type]],!1,this.itemSize,fr.offset+this.itemSize*(Wt||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const $l=new WeakMap;function Ye(u){var Xe;if($l.has(u))return $l.get(u);{const Wt=null===(Xe=u.getParameter(u.VERSION))||void 0===Xe?void 0:Xe.startsWith("WebGL 2.0");return $l.set(u,Wt),Wt}}class Qe{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ti extends Qe{getDefault(){return Xe.aM.transparent}set(u){const Xe=this.current;(u.r!==Xe.r||u.g!==Xe.g||u.b!==Xe.b||u.a!==Xe.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class ei extends Qe{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class ii extends Qe{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class ai extends Qe{getDefault(){return[!0,!0,!0,!0]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||u[3]!==Xe[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class si extends Qe{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class oi extends Qe{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class ri extends Qe{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const Xe=this.current;(u.func!==Xe.func||u.ref!==Xe.ref||u.mask!==Xe.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class ni extends Qe{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class li extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.STENCIL_TEST):Xe.disable(Xe.STENCIL_TEST),this.current=u,this.dirty=!1}}class hi extends Qe{getDefault(){return[0,1]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class ci extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.DEPTH_TEST):Xe.disable(Xe.DEPTH_TEST),this.current=u,this.dirty=!1}}class ui extends Qe{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class di extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.BLEND):Xe.disable(Xe.BLEND),this.current=u,this.dirty=!1}}class _i extends Qe{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class pi extends Qe{getDefault(){return Xe.aM.transparent}set(u){const Xe=this.current;(u.r!==Xe.r||u.g!==Xe.g||u.b!==Xe.b||u.a!==Xe.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class mi extends Qe{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class fi extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.CULL_FACE):Xe.disable(Xe.CULL_FACE),this.current=u,this.dirty=!1}}class gi extends Qe{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class vi extends Qe{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class xi extends Qe{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class yi extends Qe{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class bi extends Qe{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||u[3]!==Xe[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class wi extends Qe{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindFramebuffer(Xe.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class Ti extends Qe{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindRenderbuffer(Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Ii extends Qe{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindTexture(Xe.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class Ei extends Qe{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindBuffer(Xe.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Pi extends Qe{getDefault(){return null}set(u){const Xe=this.gl;Xe.bindBuffer(Xe.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Ci extends Qe{getDefault(){return null}set(u){var Xe;if(u===this.current&&!this.dirty)return;const Wt=this.gl;Ye(Wt)?Wt.bindVertexArray(u):null===(Xe=Wt.getExtension("OES_vertex_array_object"))||void 0===Xe||Xe.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class Si extends Qe{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class zi extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class Di extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class Mi extends Qe{constructor(u,Xe){super(u),this.context=u,this.parent=Xe}getDefault(){return null}}class Ai extends Mi{setDirty(){this.dirty=!0}set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferTexture2D(Xe.FRAMEBUFFER,Xe.COLOR_ATTACHMENT0,Xe.TEXTURE_2D,u,0),this.current=u,this.dirty=!1}}class Ri extends Mi{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferRenderbuffer(Xe.FRAMEBUFFER,Xe.DEPTH_ATTACHMENT,Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class ki extends Mi{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferRenderbuffer(Xe.FRAMEBUFFER,Xe.DEPTH_STENCIL_ATTACHMENT,Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Li{constructor(u,Xe,Wt,In,fr){this.context=u,this.width=Xe,this.height=Wt;const _r=u.gl,wr=this.framebuffer=_r.createFramebuffer();if(this.colorAttachment=new Ai(u,wr),In)this.depthAttachment=fr?new ki(u,wr):new Ri(u,wr);else if(fr)throw new Error("Stencil cannot be set without depth");if(_r.checkFramebufferStatus(_r.FRAMEBUFFER)!==_r.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,Xe=this.colorAttachment.get();if(Xe&&u.deleteTexture(Xe),this.depthAttachment){const Xe=this.depthAttachment.get();Xe&&u.deleteRenderbuffer(Xe)}u.deleteFramebuffer(this.framebuffer)}}class Fi{constructor(u,Xe,Wt){this.blendFunction=u,this.blendColor=Xe,this.mask=Wt}}Fi.Replace=[1,0],Fi.disabled=new Fi(Fi.Replace,Xe.aM.transparent,[!1,!1,!1,!1]),Fi.unblended=new Fi(Fi.Replace,Xe.aM.transparent,[!0,!0,!0,!0]),Fi.alphaBlended=new Fi([1,771],Xe.aM.transparent,[!0,!0,!0,!0]);class Bi{constructor(u){var Xe,Wt;if(this.gl=u,this.clearColor=new ti(this),this.clearDepth=new ei(this),this.clearStencil=new ii(this),this.colorMask=new ai(this),this.depthMask=new si(this),this.stencilMask=new oi(this),this.stencilFunc=new ri(this),this.stencilOp=new ni(this),this.stencilTest=new li(this),this.depthRange=new hi(this),this.depthTest=new ci(this),this.depthFunc=new ui(this),this.blend=new di(this),this.blendFunc=new _i(this),this.blendColor=new pi(this),this.blendEquation=new mi(this),this.cullFace=new fi(this),this.cullFaceSide=new gi(this),this.frontFace=new vi(this),this.program=new xi(this),this.activeTexture=new yi(this),this.viewport=new bi(this),this.bindFramebuffer=new wi(this),this.bindRenderbuffer=new Ti(this),this.bindTexture=new Ii(this),this.bindVertexBuffer=new Ei(this),this.bindElementBuffer=new Pi(this),this.bindVertexArray=new Ci(this),this.pixelStoreUnpack=new Si(this),this.pixelStoreUnpackPremultiplyAlpha=new zi(this),this.pixelStoreUnpackFlipY=new Di(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),Ye(u)){this.HALF_FLOAT=u.HALF_FLOAT;const In=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!==(Xe=u.RGBA16F)&&void 0!==Xe?Xe:null==In?void 0:In.RGBA16F_EXT,this.RGB16F=null!==(Wt=u.RGB16F)&&void 0!==Wt?Wt:null==In?void 0:In.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const Xe=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=null==Xe?void 0:Xe.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(u,Xe){return new $e(this,u,Xe)}createVertexBuffer(u,Xe,Wt){return new Ke(this,u,Xe,Wt)}createRenderbuffer(u,Xe,Wt){const In=this.gl,fr=In.createRenderbuffer();return this.bindRenderbuffer.set(fr),In.renderbufferStorage(In.RENDERBUFFER,u,Xe,Wt),this.bindRenderbuffer.set(null),fr}createFramebuffer(u,Xe,Wt,In){return new Li(this,u,Xe,Wt,In)}clear({color:u,depth:Xe,stencil:Wt}){const In=this.gl;let fr=0;u&&(fr|=In.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),void 0!==Xe&&(fr|=In.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(Xe),this.depthMask.set(!0)),void 0!==Wt&&(fr|=In.STENCIL_BUFFER_BIT,this.clearStencil.set(Wt),this.stencilMask.set(255)),In.clear(fr)}setCullFace(u){!1===u.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){Xe.aE(u.blendFunction,Fi.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return Ye(this.gl)?this.gl.createVertexArray():null===(u=this.gl.getExtension("OES_vertex_array_object"))||void 0===u?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var Xe;return Ye(this.gl)?this.gl.deleteVertexArray(u):null===(Xe=this.gl.getExtension("OES_vertex_array_object"))||void 0===Xe?void 0:Xe.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class Oi{constructor(u,Xe,Wt){this.func=u,this.mask=Xe,this.range=Wt}}Oi.ReadOnly=!1,Oi.ReadWrite=!0,Oi.disabled=new Oi(519,Oi.ReadOnly,[0,1]);const Wl=7680;class Ui{constructor(u,Xe,Wt,In,fr,_r){this.test=u,this.ref=Xe,this.mask=Wt,this.fail=In,this.depthFail=fr,this.pass=_r}}Ui.disabled=new Ui({func:519,mask:0},0,0,Wl,Wl,Wl);class ji{constructor(u,Xe,Wt){this.enable=u,this.mode=Xe,this.frontFace=Wt}}let Zl;function qi(u,Wt,In,fr,_r){const wr=u.context,Ar=wr.gl,Kr=u.useProgram("collisionBox"),no=[];let io=0,oo=0;for(let so=0;so<fr.length;so++){const co=fr[so],ho=Wt.getTile(co).getBucket(In);if(!ho)continue;const go=_r?ho.textCollisionBox:ho.iconCollisionBox,xo=ho.collisionCircleArray;if(xo.length>0){const Wt=Xe.H();Xe.aQ(Wt,ho.placementInvProjMatrix,u.transform.glCoordMatrix),Xe.aQ(Wt,Wt,ho.placementViewportMatrix),no.push({circleArray:xo,circleOffset:oo,transform:co.posMatrix,invTransform:Wt,coord:co}),io+=xo.length/4,oo=io}go&&Kr.draw(wr,Ar.LINES,Oi.disabled,Ui.disabled,u.colorModeForRenderPass(),ji.disabled,{u_matrix:co.posMatrix,u_pixel_extrude_scale:[1/(ao=u.transform).width,1/ao.height]},u.style.map.terrain&&u.style.map.terrain.getTerrainData(co),In.id,go.layoutVertexBuffer,go.indexBuffer,go.segments,null,u.transform.zoom,null,null,go.collisionVertexBuffer)}var ao;if(!_r||!no.length)return;const so=u.useProgram("collisionCircle"),co=new Xe.aR;co.resize(4*io),co._trim();let ho=0;for(const u of no)for(let Xe=0;Xe<u.circleArray.length/4;Xe++){const Wt=4*Xe,In=u.circleArray[Wt+0],fr=u.circleArray[Wt+1],_r=u.circleArray[Wt+2],wr=u.circleArray[Wt+3];co.emplace(ho++,In,fr,_r,wr,0),co.emplace(ho++,In,fr,_r,wr,1),co.emplace(ho++,In,fr,_r,wr,2),co.emplace(ho++,In,fr,_r,wr,3)}(!Zl||Zl.length<2*io)&&(Zl=function(u){const Wt=2*u,In=new Xe.aT;In.resize(Wt),In._trim();for(let u=0;u<Wt;u++){const Xe=6*u;In.uint16[Xe+0]=4*u+0,In.uint16[Xe+1]=4*u+1,In.uint16[Xe+2]=4*u+2,In.uint16[Xe+3]=4*u+2,In.uint16[Xe+4]=4*u+3,In.uint16[Xe+5]=4*u+0}return In}(io));const go=wr.createIndexBuffer(Zl,!0),xo=wr.createVertexBuffer(co,Xe.aS.members,!0);for(const Wt of no){const fr=Se(Wt.transform,Wt.invTransform,u.transform);so.draw(wr,Ar.TRIANGLES,Oi.disabled,Ui.disabled,u.colorModeForRenderPass(),ji.disabled,fr,u.style.map.terrain&&u.style.map.terrain.getTerrainData(Wt.coord),In.id,xo,go,Xe.a0.simpleSegment(0,2*Wt.circleOffset,Wt.circleArray.length,Wt.circleArray.length/2),null,u.transform.zoom,null,null,null)}xo.destroy(),go.destroy()}ji.disabled=new ji(!1,1029,2305),ji.backCCW=new ji(!0,1029,2305);const Gl=Xe.an(new Float32Array(16));function Gi(u,Wt,In,fr,_r,wr){const{horizontalAlign:Ar,verticalAlign:Kr}=Xe.au(u);return new Xe.P((-(Ar-.5)*Wt/_r+fr[0])*wr,(-(Kr-.5)*In/_r+fr[1])*wr)}function Hi(u,Wt,In,fr,_r,wr){const Ar=Wt.tileAnchorPoint.add(new Xe.P(Wt.translation[0],Wt.translation[1]));if(Wt.pitchWithMap){let u=fr.mult(wr);In||(u=u.rotate(-_r));const Xe=Ar.add(u);return xt(Xe.x,Xe.y,Wt.labelPlaneMatrix,Wt.getElevation).point}if(In){const Xe=St(Wt.tileAnchorPoint.x+1,Wt.tileAnchorPoint.y,Wt).point.sub(u),In=Math.atan(Xe.y/Xe.x)+(Xe.x<0?Math.PI:0);return u.add(fr.rotate(In))}return u.add(fr)}function Wi(u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co){const ho=u.text.placedSymbolArray,go=u.text.dynamicLayoutVertexArray,xo=u.icon.dynamicLayoutVertexArray,ko={};go.clear();for(let xo=0;xo<ho.length;xo++){const Co=ho.get(xo),Io=Co.hidden||!Co.crossTileID||u.allowVerticalPlacement&&!Co.placedOrientation?null:fr[Co.crossTileID];if(Io){const fr=new Xe.P(Co.anchorX,Co.anchorY),ho={getElevation:co,width:_r.width,height:_r.height,labelPlaneMatrix:wr,lineVertexArray:null,pitchWithMap:In,projection:oo,projectionCache:null,tileAnchorPoint:fr,translation:ao,unwrappedTileID:so},xo=In?xt(fr.x,fr.y,Ar,co):St(fr.x,fr.y,ho),zo=yt(_r.cameraToCenterDistance,xo.signedDistanceFromCamera);let Bo=Xe.ai(u.textSizeData,no,Co)*zo/Xe.ap;In&&(Bo*=u.tilePixelRatio/Kr);const{width:ca,height:ua,anchor:Da,textOffset:ns,textBoxScale:yl}=Io,vl=Gi(Da,ca,ua,ns,yl,Bo),kl=oo.getPitchedTextCorrection(_r,fr.add(new Xe.P(ao[0],ao[1])),so),Al=Hi(xo.point,ho,Wt,vl,_r.angle,kl),Ml=u.allowVerticalPlacement&&Co.placedOrientation===Xe.ah.vertical?Math.PI/2:0;for(let u=0;u<Co.numGlyphs;u++)Xe.aj(go,Al,Ml);io&&Co.associatedIconIndex>=0&&(ko[Co.associatedIconIndex]={shiftedAnchor:Al,angle:Ml})}else Rt(Co.numGlyphs,go)}if(io){xo.clear();const Wt=u.icon.placedSymbolArray;for(let u=0;u<Wt.length;u++){const In=Wt.get(u);if(In.hidden)Rt(In.numGlyphs,xo);else{const Wt=ko[u];if(Wt)for(let u=0;u<In.numGlyphs;u++)Xe.aj(xo,Wt.shiftedAnchor,Wt.angle);else Rt(In.numGlyphs,xo)}}u.icon.dynamicLayoutVertexBuffer.updateData(xo)}u.text.dynamicLayoutVertexBuffer.updateData(go)}function $i(u,Xe,Wt){return Wt.iconsInText&&Xe?"symbolTextAndIcon":u?"symbolSDF":"symbolIcon"}function Xi(u,Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao){const so=u.context,co=so.gl,ho=u.transform,go=ie(),xo="map"===Kr,ko="map"===no,Co="viewport"!==Kr&&"point"!==In.layout.get("symbol-placement"),Io=xo&&!ko&&!Co,zo=!ko&&Co,Bo=!In.layout.get("symbol-sort-key").isConstant();let ca=!1;const ua=u.depthModeForSublayer(0,Oi.ReadOnly),Da=In._unevaluatedLayout.hasValue("text-variable-anchor")||In._unevaluatedLayout.hasValue("text-variable-anchor-offset"),ns=[],yl=go.getCircleRadiusCorrection(ho);for(const Kr of fr){const fr=Wt.getTile(Kr),no=fr.getBucket(In);if(!no)continue;const oo=_r?no.text:no.icon;if(!oo||!oo.segments.get().length||!oo.hasVisibleVertices)continue;const ao=oo.programConfigurations.get(In.id),so=_r||no.sdfIcons,ua=_r?no.textSizeData:no.iconSizeData,vl=ko||0!==ho.pitch,kl=u.useProgram($i(so,_r,no),ao),Al=Xe.ag(ua,ho.zoom),Ml=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Kr);let Rl,Ol,Ll,Dl,Bl=[0,0],Nl=null;if(_r)Ol=fr.glyphAtlasTexture,Ll=co.LINEAR,Rl=fr.glyphAtlasTexture.size,no.iconsInText&&(Bl=fr.imageAtlasTexture.size,Nl=fr.imageAtlasTexture,Dl=vl||u.options.rotating||u.options.zooming||"composite"===ua.kind||"camera"===ua.kind?co.LINEAR:co.NEAREST);else{const Xe=1!==In.layout.get("icon-size").constantOr(0)||no.iconsNeedLinear;Ol=fr.imageAtlasTexture,Ll=so||u.options.rotating||u.options.zooming||Xe||vl?co.LINEAR:co.NEAREST,Rl=fr.imageAtlasTexture.size}const Vl=Bt(fr,1,u.transform.zoom),Ul=zo?Kr.posMatrix:Gl,$l=gt(Ul,ko,xo,u.transform,Vl),Wl=vt(Ul,ko,xo,u.transform,Vl),Zl=vt(Kr.posMatrix,ko,xo,u.transform,Vl),Xl=go.translatePosition(u.transform,fr,wr,Ar),Jl=Da&&no.hasTextData(),Ql="none"!==In.layout.get("icon-text-fit")&&Jl&&no.hasIconData();if(Co){const Xe=u.style.map.terrain?(Xe,Wt)=>u.style.map.terrain.getElevation(Kr,Xe,Wt):null,Wt="map"===In.layout.get("text-rotation-alignment");wt(no,Kr.posMatrix,u,_r,$l,Zl,ko,io,Wt,go,Kr.toUnwrapped(),ho.width,ho.height,Xl,Xe)}const rc=Kr.posMatrix,ic=_r&&Da||Ql,oc=Co||ic?Gl:$l,lc=Wl,gc=so&&0!==In.paint.get(_r?"text-halo-width":"icon-halo-width").constantOr(1);let bc;bc=so?no.iconsInText?Ve(ua.kind,Al,Io,ko,Co,ic,u,rc,oc,lc,Xl,Rl,Bl,yl):qe(ua.kind,Al,Io,ko,Co,ic,u,rc,oc,lc,Xl,_r,Rl,!0,yl):Ze(ua.kind,Al,Io,ko,Co,ic,u,rc,oc,lc,Xl,_r,Rl,yl);const eu={program:kl,buffers:oo,uniformValues:bc,atlasTexture:Ol,atlasTextureIcon:Nl,atlasInterpolation:Ll,atlasInterpolationIcon:Dl,isSDF:so,hasHalo:gc};if(Bo&&no.canOverlap){ca=!0;const u=oo.segments.get();for(const Wt of u)ns.push({segments:new Xe.a0([Wt]),sortKey:Wt.sortKey,state:eu,terrainData:Ml})}else ns.push({segments:oo.segments,sortKey:0,state:eu,terrainData:Ml})}ca&&ns.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Xe of ns){const Wt=Xe.state;if(so.activeTexture.set(co.TEXTURE0),Wt.atlasTexture.bind(Wt.atlasInterpolation,co.CLAMP_TO_EDGE),Wt.atlasTextureIcon&&(so.activeTexture.set(co.TEXTURE1),Wt.atlasTextureIcon&&Wt.atlasTextureIcon.bind(Wt.atlasInterpolationIcon,co.CLAMP_TO_EDGE)),Wt.isSDF){const fr=Wt.uniformValues;Wt.hasHalo&&(fr.u_is_halo=1,Ki(Wt.buffers,Xe.segments,In,u,Wt.program,ua,oo,ao,fr,Xe.terrainData)),fr.u_is_halo=0}Ki(Wt.buffers,Xe.segments,In,u,Wt.program,ua,oo,ao,Wt.uniformValues,Xe.terrainData)}}function Ki(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no){const io=In.context;fr.draw(io,io.gl.TRIANGLES,_r,wr,Ar,ji.disabled,Kr,no,Wt.id,u.layoutVertexBuffer,u.indexBuffer,Xe,Wt.paint,In.transform.zoom,u.programConfigurations.get(Wt.id),u.dynamicLayoutVertexBuffer,u.opacityVertexBuffer)}function Ji(u,Wt,In,fr){const _r=u.context,wr=_r.gl,Ar=Ui.disabled,Kr=new Fi([wr.ONE,wr.ONE],Xe.aM.transparent,[!0,!0,!0,!0]),no=Wt.getBucket(In);if(!no)return;const io=fr.key;let oo=In.heatmapFbos.get(io);oo||(oo=Qi(_r,Wt.tileSize,Wt.tileSize),In.heatmapFbos.set(io,oo)),_r.bindFramebuffer.set(oo.framebuffer),_r.viewport.set([0,0,Wt.tileSize,Wt.tileSize]),_r.clear({color:Xe.aM.transparent});const ao=no.programConfigurations.get(In.id),so=u.useProgram("heatmap",ao),co=u.style.map.terrain.getTerrainData(fr);so.draw(_r,wr.TRIANGLES,Oi.disabled,Ar,Kr,ji.disabled,Me(fr.posMatrix,Wt,u.transform.zoom,In.paint.get("heatmap-intensity")),co,In.id,no.layoutVertexBuffer,no.indexBuffer,no.segments,In.paint,u.transform.zoom,ao)}function Yi(u,Xe,Wt){const In=u.context,fr=In.gl;In.setColorMode(u.colorModeForRenderPass());const _r=ta(In,Xe),wr=Wt.key,Ar=Xe.heatmapFbos.get(wr);Ar&&(In.activeTexture.set(fr.TEXTURE0),fr.bindTexture(fr.TEXTURE_2D,Ar.colorAttachment.get()),In.activeTexture.set(fr.TEXTURE1),_r.bind(fr.LINEAR,fr.CLAMP_TO_EDGE),u.useProgram("heatmapTexture").draw(In,fr.TRIANGLES,Oi.disabled,Ui.disabled,u.colorModeForRenderPass(),ji.disabled,Ae(u,Xe,0,1),null,Xe.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments,Xe.paint,u.transform.zoom),Ar.destroy(),Xe.heatmapFbos.delete(wr))}function Qi(u,Xe,Wt){var In,fr;const _r=u.gl,wr=_r.createTexture();_r.bindTexture(_r.TEXTURE_2D,wr),_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_WRAP_S,_r.CLAMP_TO_EDGE),_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_WRAP_T,_r.CLAMP_TO_EDGE),_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_MIN_FILTER,_r.LINEAR),_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_MAG_FILTER,_r.LINEAR);const Ar=null!==(In=u.HALF_FLOAT)&&void 0!==In?In:_r.UNSIGNED_BYTE,Kr=null!==(fr=u.RGBA16F)&&void 0!==fr?fr:_r.RGBA;_r.texImage2D(_r.TEXTURE_2D,0,Kr,Xe,Wt,0,_r.RGBA,Ar,null);const no=u.createFramebuffer(Xe,Wt,!1,!1);return no.colorAttachment.set(wr),no}function ta(u,Xe){return Xe.colorRampTexture||(Xe.colorRampTexture=new b(u,Xe.colorRamp,u.gl.RGBA)),Xe.colorRampTexture}function ea(u,Xe,Wt,In,fr){if(!Wt||!In||!In.imageAtlas)return;const _r=In.imageAtlas.patternPositions;let wr=_r[Wt.to.toString()],Ar=_r[Wt.from.toString()];if(!wr&&Ar&&(wr=Ar),!Ar&&wr&&(Ar=wr),!wr||!Ar){const u=fr.getPaintProperty(Xe);wr=_r[u],Ar=_r[u]}wr&&Ar&&u.setConstantPatternPositions(wr,Ar)}function ia(u,Xe,Wt,In,fr,_r,wr){const Ar=u.context.gl,Kr="fill-pattern",no=Wt.paint.get(Kr),io=no&&no.constantOr(1),oo=Wt.getCrossfadeParameters();let ao,so,co,ho,go;wr?(so=io&&!Wt.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ao=Ar.LINES):(so=io?"fillPattern":"fill",ao=Ar.TRIANGLES);const xo=no.constantOr(null);for(const no of In){const In=Xe.getTile(no);if(io&&!In.patternsLoaded())continue;const ko=In.getBucket(Wt);if(!ko)continue;const Co=ko.programConfigurations.get(Wt.id),Io=u.useProgram(so,Co),zo=u.style.map.terrain&&u.style.map.terrain.getTerrainData(no);io&&(u.context.activeTexture.set(Ar.TEXTURE0),In.imageAtlasTexture.bind(Ar.LINEAR,Ar.CLAMP_TO_EDGE),Co.updatePaintBuffers(oo)),ea(Co,Kr,xo,In,Wt);const Bo=zo?no:null,ca=u.translatePosMatrix(Bo?Bo.posMatrix:no.posMatrix,In,Wt.paint.get("fill-translate"),Wt.paint.get("fill-translate-anchor"));if(wr){ho=ko.indexBuffer2,go=ko.segments2;const Xe=[Ar.drawingBufferWidth,Ar.drawingBufferHeight];co="fillOutlinePattern"===so&&io?Pe(ca,u,oo,In,Xe):Ee(ca,Xe)}else ho=ko.indexBuffer,go=ko.segments,co=io?Ie(ca,u,oo,In):Te(ca);Io.draw(u.context,ao,fr,u.stencilModeForClipping(no),_r,ji.disabled,co,zo,Wt.id,ko.layoutVertexBuffer,ho,go,Wt.paint,u.transform.zoom,Co)}}function aa(u,Xe,Wt,In,fr,_r,wr){const Ar=u.context,Kr=Ar.gl,no="fill-extrusion-pattern",io=Wt.paint.get(no),oo=io.constantOr(1),ao=Wt.getCrossfadeParameters(),so=Wt.paint.get("fill-extrusion-opacity"),co=io.constantOr(null);for(const io of In){const In=Xe.getTile(io),ho=In.getBucket(Wt);if(!ho)continue;const go=u.style.map.terrain&&u.style.map.terrain.getTerrainData(io),xo=ho.programConfigurations.get(Wt.id),ko=u.useProgram(oo?"fillExtrusionPattern":"fillExtrusion",xo);oo&&(u.context.activeTexture.set(Kr.TEXTURE0),In.imageAtlasTexture.bind(Kr.LINEAR,Kr.CLAMP_TO_EDGE),xo.updatePaintBuffers(ao)),ea(xo,no,co,In,Wt);const Co=u.translatePosMatrix(io.posMatrix,In,Wt.paint.get("fill-extrusion-translate"),Wt.paint.get("fill-extrusion-translate-anchor")),Io=Wt.paint.get("fill-extrusion-vertical-gradient"),zo=oo?we(Co,u,Io,so,io,ao,In):be(Co,u,Io,so);ko.draw(Ar,Ar.gl.TRIANGLES,fr,_r,wr,ji.backCCW,zo,go,Wt.id,ho.layoutVertexBuffer,ho.indexBuffer,ho.segments,Wt.paint,u.transform.zoom,xo,u.style.map.terrain&&ho.centroidVertexBuffer)}}function sa(u,Xe,Wt,In,fr,_r,wr){const Ar=u.context,Kr=Ar.gl,no=Wt.fbo;if(!no)return;const io=u.useProgram("hillshade"),oo=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Xe);Ar.activeTexture.set(Kr.TEXTURE0),Kr.bindTexture(Kr.TEXTURE_2D,no.colorAttachment.get()),io.draw(Ar,Kr.TRIANGLES,fr,_r,wr,ji.disabled,((u,Xe,Wt,In)=>{const fr=Wt.paint.get("hillshade-shadow-color"),_r=Wt.paint.get("hillshade-highlight-color"),wr=Wt.paint.get("hillshade-accent-color");let Ar=Wt.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===Wt.paint.get("hillshade-illumination-anchor")&&(Ar-=u.transform.angle);const Kr=!u.options.moving;return{u_matrix:In?In.posMatrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped(),Kr),u_image:0,u_latrange:Re(0,Xe.tileID),u_light:[Wt.paint.get("hillshade-exaggeration"),Ar],u_shadow:fr,u_highlight:_r,u_accent:wr}})(u,Wt,In,oo?Xe:null),oo,In.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments)}function oa(u,Wt,In,fr,_r,wr){const Ar=u.context,Kr=Ar.gl,no=Wt.dem;if(no&&no.data){const io=no.dim,oo=no.stride,ao=no.getPixels();if(Ar.activeTexture.set(Kr.TEXTURE1),Ar.pixelStoreUnpackPremultiplyAlpha.set(!1),Wt.demTexture=Wt.demTexture||u.getTileTexture(oo),Wt.demTexture){const u=Wt.demTexture;u.update(ao,{premultiply:!1}),u.bind(Kr.NEAREST,Kr.CLAMP_TO_EDGE)}else Wt.demTexture=new b(Ar,ao,Kr.RGBA,{premultiply:!1}),Wt.demTexture.bind(Kr.NEAREST,Kr.CLAMP_TO_EDGE);Ar.activeTexture.set(Kr.TEXTURE0);let so=Wt.fbo;if(!so){const u=new b(Ar,{width:io,height:io,data:null},Kr.RGBA);u.bind(Kr.LINEAR,Kr.CLAMP_TO_EDGE),so=Wt.fbo=Ar.createFramebuffer(io,io,!0,!1),so.colorAttachment.set(u.texture)}Ar.bindFramebuffer.set(so.framebuffer),Ar.viewport.set([0,0,io,io]),u.useProgram("hillshadePrepare").draw(Ar,Kr.TRIANGLES,fr,_r,wr,ji.disabled,((u,Wt)=>{const In=Wt.stride,fr=Xe.H();return Xe.aP(fr,0,Xe.X,-Xe.X,0,0,1),Xe.J(fr,fr,[0,-Xe.X,0]),{u_matrix:fr,u_image:1,u_dimension:[In,In],u_zoom:u.overscaledZ,u_unpack:Wt.getUnpackVector()}})(Wt.tileID,no),null,In.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments),Wt.needsHillshadePrepare=!1}}function ra(u,Wt,In,fr,wr,Ar){const Kr=fr.paint.get("raster-fade-duration");if(!Ar&&Kr>0){const fr=_r.now(),Ar=(fr-u.timeAdded)/Kr,no=Wt?(fr-Wt.timeAdded)/Kr:-1,io=In.getSource(),oo=wr.coveringZoomLevel({tileSize:io.tileSize,roundZoom:io.roundZoom}),ao=!Wt||Math.abs(Wt.tileID.overscaledZ-oo)>Math.abs(u.tileID.overscaledZ-oo),so=ao&&u.refreshedUponExpiration?1:Xe.ac(ao?Ar:1-no,0,1);return u.refreshedUponExpiration&&Ar>=1&&(u.refreshedUponExpiration=!1),Wt?{opacity:1,mix:1-so}:{opacity:so,mix:0}}return{opacity:1,mix:0}}const Xl=new Xe.aM(1,0,0,1),Jl=new Xe.aM(0,1,0,1),Ql=new Xe.aM(0,0,1,1),rc=new Xe.aM(1,0,1,1),ic=new Xe.aM(0,1,1,1);function da(u,Xe,Wt,In){pa(u,0,Xe+Wt/2,u.transform.width,Wt,In)}function _a(u,Xe,Wt,In){pa(u,Xe-Wt/2,0,Wt,u.transform.height,In)}function pa(u,Xe,Wt,In,fr,_r){const wr=u.context,Ar=wr.gl;Ar.enable(Ar.SCISSOR_TEST),Ar.scissor(Xe*u.pixelRatio,Wt*u.pixelRatio,In*u.pixelRatio,fr*u.pixelRatio),wr.clear({color:_r}),Ar.disable(Ar.SCISSOR_TEST)}function ma(u,Wt,In){const fr=u.context,_r=fr.gl,wr=In.posMatrix,Ar=u.useProgram("debug"),Kr=Oi.disabled,no=Ui.disabled,io=u.colorModeForRenderPass(),oo="$debug",ao=u.style.map.terrain&&u.style.map.terrain.getTerrainData(In);fr.activeTexture.set(_r.TEXTURE0);const so=Wt.getTileByID(In.key).latestRawTileData,co=Math.floor((so&&so.byteLength||0)/1024),ho=Wt.getTile(In).tileSize,go=512/Math.min(ho,512)*(In.overscaledZ/u.transform.zoom)*.5;let xo=In.canonical.toString();In.overscaledZ!==In.canonical.z&&(xo+=` => ${In.overscaledZ}`),function(u,Xe){u.initDebugOverlayCanvas();const Wt=u.debugOverlayCanvas,In=u.context.gl,fr=u.debugOverlayCanvas.getContext("2d");fr.clearRect(0,0,Wt.width,Wt.height),fr.shadowColor="white",fr.shadowBlur=2,fr.lineWidth=1.5,fr.strokeStyle="white",fr.textBaseline="top",fr.font="bold 36px Open Sans, sans-serif",fr.fillText(Xe,5,5),fr.strokeText(Xe,5,5),u.debugOverlayTexture.update(Wt),u.debugOverlayTexture.bind(In.LINEAR,In.CLAMP_TO_EDGE)}(u,`${xo} ${co}kB`),Ar.draw(fr,_r.TRIANGLES,Kr,no,Fi.alphaBlended,ji.disabled,ze(wr,Xe.aM.transparent,go),null,oo,u.debugBuffer,u.quadTriangleIndexBuffer,u.debugSegments),Ar.draw(fr,_r.LINE_STRIP,Kr,no,io,ji.disabled,ze(wr,Xe.aM.red),ao,oo,u.debugBuffer,u.tileBorderIndexBuffer,u.debugSegments)}function fa(u,Xe,Wt){const In=u.context,fr=In.gl,_r=u.colorModeForRenderPass(),wr=new Oi(fr.LEQUAL,Oi.ReadWrite,u.depthRangeFor3D),Ar=u.useProgram("terrain"),Kr=Xe.getTerrainMesh();In.bindFramebuffer.set(null),In.viewport.set([0,0,u.width,u.height]);for(const no of Wt){const Wt=u.renderToTexture.getTexture(no),io=Xe.getTerrainData(no.tileID);In.activeTexture.set(fr.TEXTURE0),fr.bindTexture(fr.TEXTURE_2D,Wt.texture);const oo=u.transform.calculatePosMatrix(no.tileID.toUnwrapped()),ao=Xe.getMeshFrameDelta(u.transform.zoom),so=u.transform.calculateFogMatrix(no.tileID.toUnwrapped()),co=ge(oo,ao,so,u.style.sky,u.transform.pitch);Ar.draw(In,fr.TRIANGLES,wr,Ui.disabled,_r,ji.backCCW,co,io,"terrain",Kr.vertexBuffer,Kr.indexBuffer,Kr.segments)}}class ga{constructor(u,Xe,Wt){this.vertexBuffer=u,this.indexBuffer=Xe,this.segments=Wt}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class va{constructor(u,Wt){this.context=new Bi(u),this.transform=Wt,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:Xe.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ut.maxUnderzooming+ut.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new he}resize(u,Xe,Wt){if(this.width=Math.floor(u*Wt),this.height=Math.floor(Xe*Wt),this.pixelRatio=Wt,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const u of this.style._order)this.style._layers[u].resize()}setup(){const u=this.context,Wt=new Xe.aX;Wt.emplaceBack(0,0),Wt.emplaceBack(Xe.X,0),Wt.emplaceBack(0,Xe.X),Wt.emplaceBack(Xe.X,Xe.X),this.tileExtentBuffer=u.createVertexBuffer(Wt,Bl.members),this.tileExtentSegments=Xe.a0.simpleSegment(0,0,4,2);const In=new Xe.aX;In.emplaceBack(0,0),In.emplaceBack(Xe.X,0),In.emplaceBack(0,Xe.X),In.emplaceBack(Xe.X,Xe.X),this.debugBuffer=u.createVertexBuffer(In,Bl.members),this.debugSegments=Xe.a0.simpleSegment(0,0,4,5);const fr=new Xe.$;fr.emplaceBack(0,0,0,0),fr.emplaceBack(Xe.X,0,Xe.X,0),fr.emplaceBack(0,Xe.X,0,Xe.X),fr.emplaceBack(Xe.X,Xe.X,Xe.X,Xe.X),this.rasterBoundsBuffer=u.createVertexBuffer(fr,Io.members),this.rasterBoundsSegments=Xe.a0.simpleSegment(0,0,4,2);const _r=new Xe.aX;_r.emplaceBack(0,0),_r.emplaceBack(1,0),_r.emplaceBack(0,1),_r.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(_r,Bl.members),this.viewportSegments=Xe.a0.simpleSegment(0,0,4,2);const wr=new Xe.aZ;wr.emplaceBack(0),wr.emplaceBack(1),wr.emplaceBack(3),wr.emplaceBack(2),wr.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(wr);const Ar=new Xe.aY;Ar.emplaceBack(0,1,2),Ar.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(Ar);const Kr=this.context.gl;this.stencilClearMode=new Ui({func:Kr.ALWAYS,mask:0},0,255,Kr.ZERO,Kr.ZERO,Kr.ZERO)}clearStencil(){const u=this.context,Wt=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const In=Xe.H();Xe.aP(In,0,this.width,this.height,0,0,1),Xe.K(In,In,[Wt.drawingBufferWidth,Wt.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,Wt.TRIANGLES,Oi.disabled,this.stencilClearMode,Fi.disabled,ji.disabled,De(In),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,Xe){if(this.currentStencilSource===u.source||!u.isTileClipped()||!Xe||!Xe.length)return;this.currentStencilSource=u.source;const Wt=this.context,In=Wt.gl;this.nextStencilID+Xe.length>256&&this.clearStencil(),Wt.setColorMode(Fi.disabled),Wt.setDepthMode(Oi.disabled);const fr=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const u of Xe){const Xe=this._tileClippingMaskIDs[u.key]=this.nextStencilID++,_r=this.style.map.terrain&&this.style.map.terrain.getTerrainData(u);fr.draw(Wt,In.TRIANGLES,Oi.disabled,new Ui({func:In.ALWAYS,mask:0},Xe,255,In.KEEP,In.KEEP,In.REPLACE),Fi.disabled,ji.disabled,De(u.posMatrix),_r,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,Xe=this.context.gl;return new Ui({func:Xe.NOTEQUAL,mask:255},u,255,Xe.KEEP,Xe.KEEP,Xe.REPLACE)}stencilModeForClipping(u){const Xe=this.context.gl;return new Ui({func:Xe.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,Xe.KEEP,Xe.KEEP,Xe.REPLACE)}stencilConfigForOverlap(u){const Xe=this.context.gl,Wt=u.sort(((u,Xe)=>Xe.overscaledZ-u.overscaledZ)),In=Wt[Wt.length-1].overscaledZ,fr=Wt[0].overscaledZ-In+1;if(fr>1){this.currentStencilSource=void 0,this.nextStencilID+fr>256&&this.clearStencil();const u={};for(let Wt=0;Wt<fr;Wt++)u[Wt+In]=new Ui({func:Xe.GEQUAL,mask:255},Wt+this.nextStencilID,255,Xe.KEEP,Xe.KEEP,Xe.REPLACE);return this.nextStencilID+=fr,[u,Wt]}return[{[In]:Ui.disabled},Wt]}colorModeForRenderPass(){const u=this.context.gl;if(this._showOverdrawInspector){const Wt=1/8;return new Fi([u.CONSTANT_COLOR,u.ONE],new Xe.aM(Wt,Wt,Wt,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?Fi.unblended:Fi.alphaBlended}depthModeForSublayer(u,Xe,Wt){if(!this.opaquePassEnabledForLayer())return Oi.disabled;const In=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new Oi(Wt||this.context.gl.LEQUAL,Xe,[In,In])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,Wt){this.style=u,this.options=Wt,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(_r.now()),this.imageManager.beginFrame();const In=this.style._order,fr=this.style.sourceCaches,wr={},Ar={},Kr={};for(const u in fr){const Xe=fr[u];Xe.used&&Xe.prepare(this.context),wr[u]=Xe.getVisibleCoordinates(),Ar[u]=wr[u].slice().reverse(),Kr[u]=Xe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let u=0;u<In.length;u++)if(this.style._layers[In[u]].is3D()){this.opaquePassCutoff=u;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const u of In){const Xe=this.style._layers[u];if(!Xe.hasOffscreenPass()||Xe.isHidden(this.transform.zoom))continue;const Wt=Ar[Xe.source];("custom"===Xe.type||Wt.length)&&this.renderLayer(this,fr[Xe.source],Xe,Wt)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:Wt.showOverdrawInspector?Xe.aM.black:Xe.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(u,Wt){const In=u.context,fr=In.gl,_r=((u,Xe,Wt)=>({u_sky_color:u.properties.get("sky-color"),u_horizon_color:u.properties.get("horizon-color"),u_horizon:(Xe.height/2+Xe.getHorizon())*Wt,u_sky_horizon_blend:u.properties.get("sky-horizon-blend")*Xe.height/2*Wt}))(Wt,u.style.map.transform,u.pixelRatio),wr=new Oi(fr.LEQUAL,Oi.ReadWrite,[0,1]),Ar=Ui.disabled,Kr=u.colorModeForRenderPass(),no=u.useProgram("sky");if(!Wt.mesh){const u=new Xe.aX;u.emplaceBack(-1,-1),u.emplaceBack(1,-1),u.emplaceBack(1,1),u.emplaceBack(-1,1);const fr=new Xe.aY;fr.emplaceBack(0,1,2),fr.emplaceBack(0,2,3),Wt.mesh=new ga(In.createVertexBuffer(u,Bl.members),In.createIndexBuffer(fr),Xe.a0.simpleSegment(0,0,u.length,fr.length))}no.draw(In,fr.TRIANGLES,wr,Ar,Kr,ji.disabled,_r,void 0,"sky",Wt.mesh.vertexBuffer,Wt.mesh.indexBuffer,Wt.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=Wt.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=In.length-1;this.currentLayer>=0;this.currentLayer--){const u=this.style._layers[In[this.currentLayer]],Xe=fr[u.source],Wt=wr[u.source];this._renderTileClippingMasks(u,Wt),this.renderLayer(this,Xe,u,Wt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<In.length;this.currentLayer++){const u=this.style._layers[In[this.currentLayer]],Xe=fr[u.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(u))continue;const Wt=("symbol"===u.type?Kr:Ar)[u.source];this._renderTileClippingMasks(u,wr[u.source]),this.renderLayer(this,Xe,u,Wt)}if(this.options.showTileBoundaries){const u=function(u,Xe){let Wt=null;const In=Object.values(u._layers).flatMap((Wt=>Wt.source&&!Wt.isHidden(Xe)?[u.sourceCaches[Wt.source]]:[])),fr=In.filter((u=>"vector"===u.getSource().type)),_r=In.filter((u=>"vector"!==u.getSource().type)),r=u=>{(!Wt||Wt.getSource().maxzoom<u.getSource().maxzoom)&&(Wt=u)};return fr.forEach((u=>r(u))),Wt||_r.forEach((u=>r(u))),Wt}(this.style,this.transform.zoom);u&&function(u,Xe,Wt){for(let In=0;In<Wt.length;In++)ma(u,Xe,Wt[In])}(this,u,u.getVisibleCoordinates())}this.options.showPadding&&function(u){const Xe=u.transform.padding;da(u,u.transform.height-(Xe.top||0),3,Xl),da(u,Xe.bottom||0,3,Jl),_a(u,Xe.left||0,3,Ql),_a(u,u.transform.width-(Xe.right||0),3,rc);const Wt=u.transform.centerPoint;!function(u,Xe,Wt,In){pa(u,Xe-1,Wt-10,2,20,In),pa(u,Xe-10,Wt-1,20,2,In)}(u,Wt.x,u.transform.height-Wt.y,ic)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const Wt=this.terrainFacilitator.matrix,In=this.transform.modelViewProjectionMatrix;let fr=this.terrainFacilitator.dirty;fr||(fr=u?!Xe.a_(Wt,In):!Xe.a$(Wt,In)),fr||(fr=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),fr&&(Xe.b0(Wt,In),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(u,Wt){const In=u.context,fr=In.gl,_r=Fi.unblended,wr=new Oi(fr.LEQUAL,Oi.ReadWrite,[0,1]),Ar=Wt.getTerrainMesh(),Kr=Wt.sourceCache.getRenderableTiles(),no=u.useProgram("terrainDepth");In.bindFramebuffer.set(Wt.getFramebuffer("depth").framebuffer),In.viewport.set([0,0,u.width/devicePixelRatio,u.height/devicePixelRatio]),In.clear({color:Xe.aM.transparent,depth:1});for(const Xe of Kr){const Kr=Wt.getTerrainData(Xe.tileID),io={u_matrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped()),u_ele_delta:Wt.getMeshFrameDelta(u.transform.zoom)};no.draw(In,fr.TRIANGLES,wr,Ui.disabled,_r,ji.backCCW,io,Kr,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments)}In.bindFramebuffer.set(null),In.viewport.set([0,0,u.width,u.height])}(this,this.style.map.terrain),function(u,Wt){const In=u.context,fr=In.gl,_r=Fi.unblended,wr=new Oi(fr.LEQUAL,Oi.ReadWrite,[0,1]),Ar=Wt.getTerrainMesh(),Kr=Wt.getCoordsTexture(),no=Wt.sourceCache.getRenderableTiles(),io=u.useProgram("terrainCoords");In.bindFramebuffer.set(Wt.getFramebuffer("coords").framebuffer),In.viewport.set([0,0,u.width/devicePixelRatio,u.height/devicePixelRatio]),In.clear({color:Xe.aM.transparent,depth:1}),Wt.coordsIndex=[];for(const Xe of no){const no=Wt.getTerrainData(Xe.tileID);In.activeTexture.set(fr.TEXTURE0),fr.bindTexture(fr.TEXTURE_2D,Kr.texture);const oo={u_matrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped()),u_terrain_coords_id:(255-Wt.coordsIndex.length)/255,u_texture:0,u_ele_delta:Wt.getMeshFrameDelta(u.transform.zoom)};io.draw(In,fr.TRIANGLES,wr,Ui.disabled,_r,ji.backCCW,oo,no,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments),Wt.coordsIndex.push(Xe.tileID.key)}In.bindFramebuffer.set(null),In.viewport.set([0,0,u.width,u.height])}(this,this.style.map.terrain))}renderLayer(u,Wt,In,fr){if(!In.isHidden(this.transform.zoom)&&("background"===In.type||"custom"===In.type||(fr||[]).length))switch(this.id=In.id,In.type){case"symbol":!function(u,Wt,In,fr,_r){if("translucent"!==u.renderPass)return;const wr=Ui.disabled,Ar=u.colorModeForRenderPass();(In._unevaluatedLayout.hasValue("text-variable-anchor")||In._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(u,Wt,In,fr,_r,wr,Ar,Kr,no){const io=Wt.transform,oo=ie(),ao="map"===_r,so="map"===wr;for(const _r of u){const u=fr.getTile(_r),wr=u.getBucket(In);if(!wr||!wr.text||!wr.text.segments.get().length)continue;const co=Xe.ag(wr.textSizeData,io.zoom),ho=Bt(u,1,Wt.transform.zoom),go=gt(_r.posMatrix,so,ao,Wt.transform,ho),xo="none"!==In.layout.get("icon-text-fit")&&wr.hasIconData();if(co){const Xe=Math.pow(2,io.zoom-u.tileID.overscaledZ),In=Wt.style.map.terrain?(u,Xe)=>Wt.style.map.terrain.getElevation(_r,u,Xe):null,fr=oo.translatePosition(io,u,Ar,Kr);Wi(wr,ao,so,no,io,go,_r.posMatrix,Xe,co,xo,oo,fr,_r.toUnwrapped(),In)}}}(fr,u,In,Wt,In.layout.get("text-rotation-alignment"),In.layout.get("text-pitch-alignment"),In.paint.get("text-translate"),In.paint.get("text-translate-anchor"),_r),0!==In.paint.get("icon-opacity").constantOr(1)&&Xi(u,Wt,In,fr,!1,In.paint.get("icon-translate"),In.paint.get("icon-translate-anchor"),In.layout.get("icon-rotation-alignment"),In.layout.get("icon-pitch-alignment"),In.layout.get("icon-keep-upright"),wr,Ar),0!==In.paint.get("text-opacity").constantOr(1)&&Xi(u,Wt,In,fr,!0,In.paint.get("text-translate"),In.paint.get("text-translate-anchor"),In.layout.get("text-rotation-alignment"),In.layout.get("text-pitch-alignment"),In.layout.get("text-keep-upright"),wr,Ar),Wt.map.showCollisionBoxes&&(qi(u,Wt,In,fr,!0),qi(u,Wt,In,fr,!1))}(u,Wt,In,fr,this.style.placement.variableOffsets);break;case"circle":!function(u,Wt,In,fr){if("translucent"!==u.renderPass)return;const _r=In.paint.get("circle-opacity"),wr=In.paint.get("circle-stroke-width"),Ar=In.paint.get("circle-stroke-opacity"),Kr=!In.layout.get("circle-sort-key").isConstant();if(0===_r.constantOr(1)&&(0===wr.constantOr(1)||0===Ar.constantOr(1)))return;const no=u.context,io=no.gl,oo=u.depthModeForSublayer(0,Oi.ReadOnly),ao=Ui.disabled,so=u.colorModeForRenderPass(),co=[];for(let _r=0;_r<fr.length;_r++){const wr=fr[_r],Ar=Wt.getTile(wr),no=Ar.getBucket(In);if(!no)continue;const io=no.programConfigurations.get(In.id),oo=u.useProgram("circle",io),ao=no.layoutVertexBuffer,so=no.indexBuffer,ho=u.style.map.terrain&&u.style.map.terrain.getTerrainData(wr),go={programConfiguration:io,program:oo,layoutVertexBuffer:ao,indexBuffer:so,uniformValues:Ce(u,wr,Ar,In),terrainData:ho};if(Kr){const u=no.segments.get();for(const Wt of u)co.push({segments:new Xe.a0([Wt]),sortKey:Wt.sortKey,state:go})}else co.push({segments:no.segments,sortKey:0,state:go})}Kr&&co.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Xe of co){const{programConfiguration:Wt,program:fr,layoutVertexBuffer:_r,indexBuffer:wr,uniformValues:Ar,terrainData:Kr}=Xe.state;fr.draw(no,io.TRIANGLES,oo,ao,so,ji.disabled,Ar,Kr,In.id,_r,wr,Xe.segments,In.paint,u.transform.zoom,Wt)}}(u,Wt,In,fr);break;case"heatmap":!function(u,Wt,In,fr){if(0===In.paint.get("heatmap-opacity"))return;const _r=u.context;if(u.style.map.terrain){for(const Xe of fr){const fr=Wt.getTile(Xe);Wt.hasRenderableParent(Xe)||("offscreen"===u.renderPass?Ji(u,fr,In,Xe):"translucent"===u.renderPass&&Yi(u,In,Xe))}_r.viewport.set([0,0,u.width,u.height])}else"offscreen"===u.renderPass?function(u,Wt,In,fr){const _r=u.context,wr=_r.gl,Ar=Ui.disabled,Kr=new Fi([wr.ONE,wr.ONE],Xe.aM.transparent,[!0,!0,!0,!0]);(function(u,Wt,In){const fr=u.gl;u.activeTexture.set(fr.TEXTURE1),u.viewport.set([0,0,Wt.width/4,Wt.height/4]);let _r=In.heatmapFbos.get(Xe.aU);_r?(fr.bindTexture(fr.TEXTURE_2D,_r.colorAttachment.get()),u.bindFramebuffer.set(_r.framebuffer)):(_r=Qi(u,Wt.width/4,Wt.height/4),In.heatmapFbos.set(Xe.aU,_r))})(_r,u,In),_r.clear({color:Xe.aM.transparent});for(let Xe=0;Xe<fr.length;Xe++){const no=fr[Xe];if(Wt.hasRenderableParent(no))continue;const io=Wt.getTile(no),oo=io.getBucket(In);if(!oo)continue;const ao=oo.programConfigurations.get(In.id),so=u.useProgram("heatmap",ao),{zoom:co}=u.transform;so.draw(_r,wr.TRIANGLES,Oi.disabled,Ar,Kr,ji.disabled,Me(no.posMatrix,io,co,In.paint.get("heatmap-intensity")),null,In.id,oo.layoutVertexBuffer,oo.indexBuffer,oo.segments,In.paint,u.transform.zoom,ao)}_r.viewport.set([0,0,u.width,u.height])}(u,Wt,In,fr):"translucent"===u.renderPass&&function(u,Wt){const In=u.context,fr=In.gl;In.setColorMode(u.colorModeForRenderPass());const _r=Wt.heatmapFbos.get(Xe.aU);_r&&(In.activeTexture.set(fr.TEXTURE0),fr.bindTexture(fr.TEXTURE_2D,_r.colorAttachment.get()),In.activeTexture.set(fr.TEXTURE1),ta(In,Wt).bind(fr.LINEAR,fr.CLAMP_TO_EDGE),u.useProgram("heatmapTexture").draw(In,fr.TRIANGLES,Oi.disabled,Ui.disabled,u.colorModeForRenderPass(),ji.disabled,Ae(u,Wt,0,1),null,Wt.id,u.viewportBuffer,u.quadTriangleIndexBuffer,u.viewportSegments,Wt.paint,u.transform.zoom))}(u,In)}(u,Wt,In,fr);break;case"line":!function(u,Wt,In,fr){if("translucent"!==u.renderPass)return;const _r=In.paint.get("line-opacity"),wr=In.paint.get("line-width");if(0===_r.constantOr(1)||0===wr.constantOr(1))return;const Ar=u.depthModeForSublayer(0,Oi.ReadOnly),Kr=u.colorModeForRenderPass(),no=In.paint.get("line-dasharray"),io=In.paint.get("line-pattern"),oo=io.constantOr(1),ao=In.paint.get("line-gradient"),so=In.getCrossfadeParameters(),co=oo?"linePattern":no?"lineSDF":ao?"lineGradient":"line",ho=u.context,go=ho.gl;let xo=!0;for(const _r of fr){const fr=Wt.getTile(_r);if(oo&&!fr.patternsLoaded())continue;const wr=fr.getBucket(In);if(!wr)continue;const ko=wr.programConfigurations.get(In.id),Co=u.context.program.get(),Io=u.useProgram(co,ko),zo=xo||Io.program!==Co,Bo=u.style.map.terrain&&u.style.map.terrain.getTerrainData(_r),ca=io.constantOr(null);if(ca&&fr.imageAtlas){const u=fr.imageAtlas,Xe=u.patternPositions[ca.to.toString()],Wt=u.patternPositions[ca.from.toString()];Xe&&Wt&&ko.setConstantPatternPositions(Xe,Wt)}const ua=Bo?_r:null,Da=oo?Fe(u,fr,In,so,ua):no?Be(u,fr,In,no,so,ua):ao?Le(u,fr,In,wr.lineClipsArray.length,ua):ke(u,fr,In,ua);if(oo)ho.activeTexture.set(go.TEXTURE0),fr.imageAtlasTexture.bind(go.LINEAR,go.CLAMP_TO_EDGE),ko.updatePaintBuffers(so);else if(no&&(zo||u.lineAtlas.dirty))ho.activeTexture.set(go.TEXTURE0),u.lineAtlas.bind(ho);else if(ao){const fr=wr.gradients[In.id];let Ar=fr.texture;if(In.gradientVersion!==fr.version){let Kr=256;if(In.stepInterpolant){const In=Wt.getSource().maxzoom,fr=_r.canonical.z===In?Math.ceil(1<<u.transform.maxZoom-_r.canonical.z):1;Kr=Xe.ac(Xe.aV(wr.maxLineLength/Xe.X*1024*fr),256,ho.maxTextureSize)}fr.gradient=Xe.aW({expression:In.gradientExpression(),evaluationKey:"lineProgress",resolution:Kr,image:fr.gradient||void 0,clips:wr.lineClipsArray}),fr.texture?fr.texture.update(fr.gradient):fr.texture=new b(ho,fr.gradient,go.RGBA),fr.version=In.gradientVersion,Ar=fr.texture}ho.activeTexture.set(go.TEXTURE0),Ar.bind(In.stepInterpolant?go.NEAREST:go.LINEAR,go.CLAMP_TO_EDGE)}Io.draw(ho,go.TRIANGLES,Ar,u.stencilModeForClipping(_r),Kr,ji.disabled,Da,Bo,In.id,wr.layoutVertexBuffer,wr.indexBuffer,wr.segments,In.paint,u.transform.zoom,ko,wr.layoutVertexBuffer2),xo=!1}}(u,Wt,In,fr);break;case"fill":!function(u,Wt,In,fr){const _r=In.paint.get("fill-color"),wr=In.paint.get("fill-opacity");if(0===wr.constantOr(1))return;const Ar=u.colorModeForRenderPass(),Kr=In.paint.get("fill-pattern"),no=u.opaquePassEnabledForLayer()&&!Kr.constantOr(1)&&1===_r.constantOr(Xe.aM.transparent).a&&1===wr.constantOr(0)?"opaque":"translucent";if(u.renderPass===no){const Xe=u.depthModeForSublayer(1,"opaque"===u.renderPass?Oi.ReadWrite:Oi.ReadOnly);ia(u,Wt,In,fr,Xe,Ar,!1)}if("translucent"===u.renderPass&&In.paint.get("fill-antialias")){const Xe=u.depthModeForSublayer(In.getPaintProperty("fill-outline-color")?2:0,Oi.ReadOnly);ia(u,Wt,In,fr,Xe,Ar,!0)}}(u,Wt,In,fr);break;case"fill-extrusion":!function(u,Xe,Wt,In){const fr=Wt.paint.get("fill-extrusion-opacity");if(0!==fr&&"translucent"===u.renderPass){const _r=new Oi(u.context.gl.LEQUAL,Oi.ReadWrite,u.depthRangeFor3D);if(1!==fr||Wt.paint.get("fill-extrusion-pattern").constantOr(1))aa(u,Xe,Wt,In,_r,Ui.disabled,Fi.disabled),aa(u,Xe,Wt,In,_r,u.stencilModeFor3D(),u.colorModeForRenderPass());else{const fr=u.colorModeForRenderPass();aa(u,Xe,Wt,In,_r,Ui.disabled,fr)}}}(u,Wt,In,fr);break;case"hillshade":!function(u,Xe,Wt,In){if("offscreen"!==u.renderPass&&"translucent"!==u.renderPass)return;const fr=u.context,_r=u.depthModeForSublayer(0,Oi.ReadOnly),wr=u.colorModeForRenderPass(),[Ar,Kr]="translucent"===u.renderPass?u.stencilConfigForOverlap(In):[{},In];for(const In of Kr){const fr=Xe.getTile(In);void 0!==fr.needsHillshadePrepare&&fr.needsHillshadePrepare&&"offscreen"===u.renderPass?oa(u,fr,Wt,_r,Ui.disabled,wr):"translucent"===u.renderPass&&sa(u,In,fr,Wt,_r,Ar[In.overscaledZ],wr)}fr.viewport.set([0,0,u.width,u.height])}(u,Wt,In,fr);break;case"raster":!function(u,Xe,Wt,In){if("translucent"!==u.renderPass)return;if(0===Wt.paint.get("raster-opacity"))return;if(!In.length)return;const fr=u.context,_r=fr.gl,wr=Xe.getSource(),Ar=u.useProgram("raster"),Kr=u.colorModeForRenderPass(),[no,io]=wr instanceof Q?[{},In]:u.stencilConfigForOverlap(In),oo=io[io.length-1].overscaledZ,ao=!u.options.moving;for(const In of io){const io=u.depthModeForSublayer(In.overscaledZ-oo,1===Wt.paint.get("raster-opacity")?Oi.ReadWrite:Oi.ReadOnly,_r.LESS),so=Xe.getTile(In);so.registerFadeDuration(Wt.paint.get("raster-fade-duration"));const co=Xe.findLoadedParent(In,0),ho=Xe.findLoadedSibling(In),go=ra(so,co||ho||null,Xe,Wt,u.transform,u.style.map.terrain);let xo,ko;const Co="nearest"===Wt.paint.get("raster-resampling")?_r.NEAREST:_r.LINEAR;fr.activeTexture.set(_r.TEXTURE0),so.texture.bind(Co,_r.CLAMP_TO_EDGE,_r.LINEAR_MIPMAP_NEAREST),fr.activeTexture.set(_r.TEXTURE1),co?(co.texture.bind(Co,_r.CLAMP_TO_EDGE,_r.LINEAR_MIPMAP_NEAREST),xo=Math.pow(2,co.tileID.overscaledZ-so.tileID.overscaledZ),ko=[so.tileID.canonical.x*xo%1,so.tileID.canonical.y*xo%1]):so.texture.bind(Co,_r.CLAMP_TO_EDGE,_r.LINEAR_MIPMAP_NEAREST),so.texture.useMipmap&&fr.extTextureFilterAnisotropic&&u.transform.pitch>20&&_r.texParameterf(_r.TEXTURE_2D,fr.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,fr.extTextureFilterAnisotropicMax);const Io=u.style.map.terrain&&u.style.map.terrain.getTerrainData(In),zo=Io?In:null,Bo=zo?zo.posMatrix:u.transform.calculatePosMatrix(In.toUnwrapped(),ao),ca=Ue(Bo,ko||[0,0],xo||1,go,Wt);wr instanceof Q?Ar.draw(fr,_r.TRIANGLES,io,Ui.disabled,Kr,ji.disabled,ca,Io,Wt.id,wr.boundsBuffer,u.quadTriangleIndexBuffer,wr.boundsSegments):Ar.draw(fr,_r.TRIANGLES,io,no[In.overscaledZ],Kr,ji.disabled,ca,Io,Wt.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments)}}(u,Wt,In,fr);break;case"background":!function(u,Xe,Wt,In){const fr=Wt.paint.get("background-color"),_r=Wt.paint.get("background-opacity");if(0===_r)return;const wr=u.context,Ar=wr.gl,Kr=u.transform,no=Kr.tileSize,io=Wt.paint.get("background-pattern");if(u.isPatternMissing(io))return;const oo=!io&&1===fr.a&&1===_r&&u.opaquePassEnabledForLayer()?"opaque":"translucent";if(u.renderPass!==oo)return;const ao=Ui.disabled,so=u.depthModeForSublayer(0,"opaque"===oo?Oi.ReadWrite:Oi.ReadOnly),co=u.colorModeForRenderPass(),ho=u.useProgram(io?"backgroundPattern":"background"),go=In||Kr.coveringTiles({tileSize:no,terrain:u.style.map.terrain});io&&(wr.activeTexture.set(Ar.TEXTURE0),u.imageManager.bind(u.context));const xo=Wt.getCrossfadeParameters();for(const Xe of go){const Kr=In?Xe.posMatrix:u.transform.calculatePosMatrix(Xe.toUnwrapped()),oo=io?He(Kr,_r,u,io,{tileID:Xe,tileSize:no},xo):Ge(Kr,_r,fr),go=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Xe);ho.draw(wr,Ar.TRIANGLES,so,ao,co,ji.disabled,oo,go,Wt.id,u.tileExtentBuffer,u.quadTriangleIndexBuffer,u.tileExtentSegments)}}(u,0,In,fr);break;case"custom":!function(u,Xe,Wt){const In=u.context,fr=Wt.implementation;if("offscreen"===u.renderPass){const Xe=fr.prerender;Xe&&(u.setCustomLayerDefaults(),In.setColorMode(u.colorModeForRenderPass()),Xe.call(fr,In.gl,u.transform.customLayerMatrix()),In.setDirty(),u.setBaseState())}else if("translucent"===u.renderPass){u.setCustomLayerDefaults(),In.setColorMode(u.colorModeForRenderPass()),In.setStencilMode(Ui.disabled);const Xe="3d"===fr.renderingMode?new Oi(u.context.gl.LEQUAL,Oi.ReadWrite,u.depthRangeFor3D):u.depthModeForSublayer(0,Oi.ReadOnly);In.setDepthMode(Xe),fr.render(In.gl,u.transform.customLayerMatrix(),{farZ:u.transform.farZ,nearZ:u.transform.nearZ,fov:u.transform._fov,modelViewProjectionMatrix:u.transform.modelViewProjectionMatrix,projectionMatrix:u.transform.projectionMatrix}),In.setDirty(),u.setBaseState(),In.bindFramebuffer.set(null)}}(u,0,In)}}translatePosMatrix(u,Wt,In,fr,_r){if(!In[0]&&!In[1])return u;const wr=_r?"map"===fr?this.transform.angle:0:"viewport"===fr?-this.transform.angle:0;if(wr){const u=Math.sin(wr),Xe=Math.cos(wr);In=[In[0]*Xe-In[1]*u,In[0]*u+In[1]*Xe]}const Ar=[_r?In[0]:Bt(Wt,In[0],this.transform.zoom),_r?In[1]:Bt(Wt,In[1],this.transform.zoom),0],Kr=new Float32Array(16);return Xe.J(Kr,u,Ar),Kr}saveTileTexture(u){const Xe=this._tileTextures[u.size[0]];Xe?Xe.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const Xe=this._tileTextures[u];return Xe&&Xe.length>0?Xe.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const Xe=this.imageManager.getPattern(u.from.toString()),Wt=this.imageManager.getPattern(u.to.toString());return!Xe||!Wt}useProgram(u,Xe){this.cache=this.cache||{};const Wt=u+(Xe?Xe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Wt]||(this.cache[Wt]=new xe(this.context,Nl[u],Xe,Vl[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Wt]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new b(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:Xe}=this.context.gl;return this.width!==u||this.height!==Xe}}class xa{constructor(u,Xe){this.points=u,this.planes=Xe}static fromInvProjectionMatrix(u,Wt,In){const fr=Math.pow(2,In),_r=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((In=>{const _r=1/(In=Xe.af([],In,u))[3]/Wt*fr;return Xe.b1(In,In,[_r,_r,1/In[3],_r])})),wr=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((u=>{const Xe=function(u,Xe){var Wt=Xe[0],In=Xe[1],fr=Xe[2],_r=Wt*Wt+In*In+fr*fr;return _r>0&&(_r=1/Math.sqrt(_r)),u[0]=Xe[0]*_r,u[1]=Xe[1]*_r,u[2]=Xe[2]*_r,u}([],function(u,Xe,Wt){var In=Xe[0],fr=Xe[1],_r=Xe[2],wr=Wt[0],Ar=Wt[1],Kr=Wt[2];return u[0]=fr*Kr-_r*Ar,u[1]=_r*wr-In*Kr,u[2]=In*Ar-fr*wr,u}([],g([],_r[u[0]],_r[u[1]]),g([],_r[u[2]],_r[u[1]]))),Wt=-((In=Xe)[0]*(fr=_r[u[1]])[0]+In[1]*fr[1]+In[2]*fr[2]);var In,fr;return Xe.concat(Wt)}));return new xa(_r,wr)}}class ya{constructor(u,Xe){this.min=u,this.max=Xe,this.center=function(u,Xe){return u[0]=.5*Xe[0],u[1]=.5*Xe[1],u[2]=.5*Xe[2],u}([],function(u,Xe,Wt){return u[0]=Xe[0]+Wt[0],u[1]=Xe[1]+Wt[1],u[2]=Xe[2]+Wt[2],u}([],this.min,this.max))}quadrant(u){const Xe=[u%2==0,u<2],Wt=m(this.min),In=m(this.max);for(let u=0;u<Xe.length;u++)Wt[u]=Xe[u]?this.min[u]:this.center[u],In[u]=Xe[u]?this.center[u]:this.max[u];return In[2]=this.max[2],new ya(Wt,In)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){const Wt=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let In=!0;for(let fr=0;fr<u.planes.length;fr++){const _r=u.planes[fr];let wr=0;for(let u=0;u<Wt.length;u++)Xe.b2(_r,Wt[u])>=0&&wr++;if(0===wr)return 0;wr!==Wt.length&&(In=!1)}if(In)return 2;for(let Xe=0;Xe<3;Xe++){let Wt=Number.MAX_VALUE,In=-Number.MAX_VALUE;for(let fr=0;fr<u.points.length;fr++){const _r=u.points[fr][Xe]-this.min[Xe];Wt=Math.min(Wt,_r),In=Math.max(In,_r)}if(In<0||Wt>this.max[Xe]-this.min[Xe])return 0}return 1}}class ba{constructor(u=0,Xe=0,Wt=0,In=0){if(isNaN(u)||u<0||isNaN(Xe)||Xe<0||isNaN(Wt)||Wt<0||isNaN(In)||In<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=Xe,this.left=Wt,this.right=In}interpolate(u,Wt,In){return null!=Wt.top&&null!=u.top&&(this.top=Xe.y.number(u.top,Wt.top,In)),null!=Wt.bottom&&null!=u.bottom&&(this.bottom=Xe.y.number(u.bottom,Wt.bottom,In)),null!=Wt.left&&null!=u.left&&(this.left=Xe.y.number(u.left,Wt.left,In)),null!=Wt.right&&null!=u.right&&(this.right=Xe.y.number(u.right,Wt.right,In)),this}getCenter(u,Wt){const In=Xe.ac((this.left+u-this.right)/2,0,u),fr=Xe.ac((this.top+Wt-this.bottom)/2,0,Wt);return new Xe.P(In,fr)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new ba(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const oc=85.051129;class Ta{constructor(u,Wt,In,fr,_r){this.tileSize=512,this._renderWorldCopies=void 0===_r||!!_r,this._minZoom=u||0,this._maxZoom=Wt||22,this._minPitch=null==In?0:In,this._maxPitch=null==fr?60:fr,this.setMaxBounds(),this.width=0,this.height=0,this._center=new Xe.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ba,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new Ta(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.lngRange=u.lngRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){void 0===u?u=!0:null===u&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new Xe.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const Wt=-Xe.b3(u,-180,180)*Math.PI/180;this.angle!==Wt&&(this._unmodified=!1,this.angle=Wt,this._calcMatrices(),this.rotationMatrix=function(){var u=new Xe.A(4);return Xe.A!=Float32Array&&(u[1]=0,u[2]=0),u[0]=1,u[3]=1,u}(),function(u,Xe,Wt){var In=Xe[0],fr=Xe[1],_r=Xe[2],wr=Xe[3],Ar=Math.sin(Wt),Kr=Math.cos(Wt);u[0]=In*Kr+_r*Ar,u[1]=fr*Kr+wr*Ar,u[2]=In*-Ar+_r*Kr,u[3]=fr*-Ar+wr*Kr}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const Wt=Xe.ac(u,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==Wt&&(this._unmodified=!1,this._pitch=Wt,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const Xe=Math.min(Math.max(u,this.minZoom),this.maxZoom);this._zoom!==Xe&&(this._unmodified=!1,this._zoom=Xe,this.tileZoom=Math.max(0,Math.floor(Xe)),this.scale=this.zoomScale(Xe),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,Xe,Wt){this._unmodified=!1,this._edgeInsets.interpolate(u,Xe,Wt),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const Xe=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,Xe)}getVisibleUnwrappedCoordinates(u){const Wt=[new Xe.b4(0,u)];if(this._renderWorldCopies){const In=this.pointCoordinate(new Xe.P(0,0)),fr=this.pointCoordinate(new Xe.P(this.width,0)),_r=this.pointCoordinate(new Xe.P(this.width,this.height)),wr=this.pointCoordinate(new Xe.P(0,this.height)),Ar=Math.floor(Math.min(In.x,fr.x,_r.x,wr.x)),Kr=Math.floor(Math.max(In.x,fr.x,_r.x,wr.x)),no=1;for(let In=Ar-no;In<=Kr+no;In++)0!==In&&Wt.push(new Xe.b4(In,u))}return Wt}coveringTiles(u){var Wt,In;let fr=this.coveringZoomLevel(u);const _r=fr;if(void 0!==u.minzoom&&fr<u.minzoom)return[];void 0!==u.maxzoom&&fr>u.maxzoom&&(fr=u.maxzoom);const wr=this.pointCoordinate(this.getCameraPoint()),Ar=Xe.Z.fromLngLat(this.center),Kr=Math.pow(2,fr),no=[Kr*wr.x,Kr*wr.y,0],io=[Kr*Ar.x,Kr*Ar.y,0],oo=xa.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,fr);let ao=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(ao=fr);const so=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,p=u=>({aabb:new ya([u*Kr,0,0],[(u+1)*Kr,Kr,0]),zoom:0,x:0,y:0,wrap:u,fullyVisible:!1}),co=[],ho=[],go=fr,xo=u.reparseOverscaled?_r:fr;if(this._renderWorldCopies)for(let u=1;u<=3;u++)co.push(p(-u)),co.push(p(u));for(co.push(p(0));co.length>0;){const fr=co.pop(),_r=fr.x,wr=fr.y;let Ar=fr.fullyVisible;if(!Ar){const u=fr.aabb.intersects(oo);if(0===u)continue;Ar=2===u}const Kr=u.terrain?no:io,ko=fr.aabb.distanceX(Kr),Co=fr.aabb.distanceY(Kr),Io=Math.max(Math.abs(ko),Math.abs(Co));if(fr.zoom===go||Io>so+(1<<go-fr.zoom)-2&&fr.zoom>=ao){const u=go-fr.zoom,Wt=no[0]-.5-(_r<<u),In=no[1]-.5-(wr<<u);ho.push({tileID:new Xe.S(fr.zoom===go?xo:fr.zoom,fr.wrap,fr.zoom,_r,wr),distanceSq:v([io[0]-.5-_r,io[1]-.5-wr]),tileDistanceToCamera:Math.sqrt(Wt*Wt+In*In)})}else for(let Kr=0;Kr<4;Kr++){const no=(_r<<1)+Kr%2,io=(wr<<1)+(Kr>>1),oo=fr.zoom+1;let ao=fr.aabb.quadrant(Kr);if(u.terrain){const _r=new Xe.S(oo,fr.wrap,oo,no,io),wr=u.terrain.getMinMaxElevation(_r),Ar=null!==(Wt=wr.minElevation)&&void 0!==Wt?Wt:this.elevation,Kr=null!==(In=wr.maxElevation)&&void 0!==In?In:this.elevation;ao=new ya([ao.min[0],ao.min[1],Ar],[ao.max[0],ao.max[1],Kr])}co.push({aabb:ao,zoom:oo,x:no,y:io,wrap:fr.wrap,fullyVisible:Ar})}}return ho.sort(((u,Xe)=>u.distanceSq-Xe.distanceSq)).map((u=>u.tileID))}resize(u,Xe){this.width=u,this.height=Xe,this.pixelsToGLUnits=[2/u,-2/Xe],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const Wt=Xe.ac(u.lat,-85.051129,oc);return new Xe.P(Xe.O(u.lng)*this.worldSize,Xe.Q(Wt)*this.worldSize)}unproject(u){return new Xe.Z(u.x/this.worldSize,u.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(u){const Wt=this.elevation,In=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,fr=this.pointLocation(this.centerPoint,u),_r=u.getElevationForLngLatZoom(fr,this.tileZoom);if(!(this.elevation-_r))return;const wr=In+Wt-_r,Ar=Math.cos(this._pitch)*this.cameraToCenterDistance/wr/Xe.b5(1,fr.lat),Kr=this.scaleZoom(Ar/this.tileSize);this._elevation=_r,this._center=fr,this.zoom=Kr}setLocationAtPoint(u,Wt){const In=this.pointCoordinate(Wt),fr=this.pointCoordinate(this.centerPoint),_r=this.locationCoordinate(u),wr=new Xe.Z(_r.x-(In.x-fr.x),_r.y-(In.y-fr.y));this.center=this.coordinateLocation(wr),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,Xe){return Xe?this.coordinatePoint(this.locationCoordinate(u),Xe.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,Xe){return this.coordinateLocation(this.pointCoordinate(u,Xe))}locationCoordinate(u){return Xe.Z.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,Wt){if(Wt){const Xe=Wt.pointCoordinate(u);if(null!=Xe)return Xe}const In=[u.x,u.y,0,1],fr=[u.x,u.y,1,1];Xe.af(In,In,this.pixelMatrixInverse),Xe.af(fr,fr,this.pixelMatrixInverse);const _r=In[3],wr=fr[3],Ar=In[1]/_r,Kr=fr[1]/wr,no=In[2]/_r,io=fr[2]/wr,oo=no===io?0:(0-no)/(io-no);return new Xe.Z(Xe.y.number(In[0]/_r,fr[0]/wr,oo)/this.worldSize,Xe.y.number(Ar,Kr,oo)/this.worldSize)}coordinatePoint(u,Wt=0,In=this.pixelMatrix){const fr=[u.x*this.worldSize,u.y*this.worldSize,Wt,1];return Xe.af(fr,fr,In),new Xe.P(fr[0]/fr[3],fr[1]/fr[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return(new H).extend(this.pointLocation(new Xe.P(0,u))).extend(this.pointLocation(new Xe.P(this.width,u))).extend(this.pointLocation(new Xe.P(this.width,this.height))).extend(this.pointLocation(new Xe.P(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new H([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,oc])}calculateTileMatrix(u){const Wt=u.canonical,In=this.worldSize/this.zoomScale(Wt.z),fr=Wt.x+Math.pow(2,Wt.z)*u.wrap,_r=Xe.an(new Float64Array(16));return Xe.J(_r,_r,[fr*In,Wt.y*In,0]),Xe.K(_r,_r,[In/Xe.X,In/Xe.X,1]),_r}calculatePosMatrix(u,Wt=!1){const In=u.key,fr=Wt?this._alignedPosMatrixCache:this._posMatrixCache;if(fr[In])return fr[In];const _r=this.calculateTileMatrix(u);return Xe.L(_r,Wt?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,_r),fr[In]=new Float32Array(_r),fr[In]}calculateFogMatrix(u){const Wt=u.key,In=this._fogMatrixCache;if(In[Wt])return In[Wt];const fr=this.calculateTileMatrix(u);return Xe.L(fr,this.fogMatrix,fr),In[Wt]=new Float32Array(fr),In[Wt]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,Wt){Wt=Xe.ac(+Wt,this.minZoom,this.maxZoom);const In={center:new Xe.N(u.lng,u.lat),zoom:Wt};let fr=this.lngRange;if(!this._renderWorldCopies&&null===fr){const u=180-1e-10;fr=[-u,u]}const _r=this.tileSize*this.zoomScale(In.zoom);let wr=0,Ar=_r,Kr=0,no=_r,io=0,oo=0;const{x:ao,y:so}=this.size;if(this.latRange){const u=this.latRange;wr=Xe.Q(u[1])*_r,Ar=Xe.Q(u[0])*_r,Ar-wr<so&&(io=so/(Ar-wr))}fr&&(Kr=Xe.b3(Xe.O(fr[0])*_r,0,_r),no=Xe.b3(Xe.O(fr[1])*_r,0,_r),no<Kr&&(no+=_r),no-Kr<ao&&(oo=ao/(no-Kr)));const{x:co,y:ho}=this.project.call({worldSize:_r},u);let go,xo;const ko=Math.max(oo||0,io||0);if(ko){const u=new Xe.P(oo?(no+Kr)/2:co,io?(Ar+wr)/2:ho);return In.center=this.unproject.call({worldSize:_r},u).wrap(),In.zoom+=this.scaleZoom(ko),In}if(this.latRange){const u=so/2;ho-u<wr&&(xo=wr+u),ho+u>Ar&&(xo=Ar-u)}if(fr){const u=(Kr+no)/2;let Wt=co;this._renderWorldCopies&&(Wt=Xe.b3(co,u-_r/2,u+_r/2));const In=ao/2;Wt-In<Kr&&(go=Kr+In),Wt+In>no&&(go=no-In)}if(void 0!==go||void 0!==xo){const u=new Xe.P(null!=go?go:co,null!=xo?xo:ho);In.center=this.unproject.call({worldSize:_r},u).wrap()}return In}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:Xe,zoom:Wt}=this.getConstrained(this.center,this.zoom);this.center=Xe,this.zoom=Wt,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this.centerOffset,Wt=this.point.x,In=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=Xe.b5(1,this.center.lat)*this.worldSize;let fr=Xe.an(new Float64Array(16));Xe.K(fr,fr,[this.width/2,-this.height/2,1]),Xe.J(fr,fr,[1,-1,0]),this.labelPlaneMatrix=fr,fr=Xe.an(new Float64Array(16)),Xe.K(fr,fr,[1,-1,1]),Xe.J(fr,fr,[-1,-1,0]),Xe.K(fr,fr,[2/this.width,2/this.height,1]),this.glCoordMatrix=fr;const _r=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),wr=Math.min(this.elevation,this.minElevationForCurrentTile),Ar=_r-wr*this._pixelPerMeter/Math.cos(this._pitch),Kr=wr<0?Ar:_r,no=Math.PI/2+this._pitch,io=this._fov*(.5+u.y/this.height),oo=Math.sin(io)*Kr/Math.sin(Xe.ac(Math.PI-no-io,.01,Math.PI-.01)),ao=this.getHorizon(),so=2*Math.atan(ao/this.cameraToCenterDistance)*(.5+u.y/(2*ao)),co=Math.sin(so)*Kr/Math.sin(Xe.ac(Math.PI-no-so,.01,Math.PI-.01)),ho=Math.min(oo,co);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ho+Kr),this.nearZ=this.height/50,fr=new Float64Array(16),Xe.b6(fr,this._fov,this.width/this.height,this.nearZ,this.farZ),fr[8]=2*-u.x/this.width,fr[9]=2*u.y/this.height,this.projectionMatrix=Xe.ae(fr),Xe.K(fr,fr,[1,-1,1]),Xe.J(fr,fr,[0,0,-this.cameraToCenterDistance]),Xe.b7(fr,fr,this._pitch),Xe.ad(fr,fr,this.angle),Xe.J(fr,fr,[-Wt,-In,0]),this.mercatorMatrix=Xe.K([],fr,[this.worldSize,this.worldSize,this.worldSize]),Xe.K(fr,fr,[1,1,this._pixelPerMeter]),this.pixelMatrix=Xe.L(new Float64Array(16),this.labelPlaneMatrix,fr),Xe.J(fr,fr,[0,0,-this.elevation]),this.modelViewProjectionMatrix=fr,this.invModelViewProjectionMatrix=Xe.as([],fr),this.fogMatrix=new Float64Array(16),Xe.b6(this.fogMatrix,this._fov,this.width/this.height,_r,this.farZ),this.fogMatrix[8]=2*-u.x/this.width,this.fogMatrix[9]=2*u.y/this.height,Xe.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),Xe.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),Xe.b7(this.fogMatrix,this.fogMatrix,this._pitch),Xe.ad(this.fogMatrix,this.fogMatrix,this.angle),Xe.J(this.fogMatrix,this.fogMatrix,[-Wt,-In,0]),Xe.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),Xe.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=Xe.L(new Float64Array(16),this.labelPlaneMatrix,fr);const go=this.width%2/2,xo=this.height%2/2,ko=Math.cos(this.angle),Co=Math.sin(this.angle),Io=Wt-Math.round(Wt)+ko*go+Co*xo,zo=In-Math.round(In)+ko*xo+Co*go,Bo=new Float64Array(fr);if(Xe.J(Bo,Bo,[Io>.5?Io-1:Io,zo>.5?zo-1:zo,0]),this.alignedModelViewProjectionMatrix=Bo,fr=Xe.as(new Float64Array(16),this.pixelMatrix),!fr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=fr,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new Xe.P(0,0)),Wt=[u.x*this.worldSize,u.y*this.worldSize,0,1];return Xe.af(Wt,Wt,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new Xe.P(0,u))}getCameraQueryGeometry(u){const Wt=this.getCameraPoint();if(1===u.length)return[u[0],Wt];{let In=Wt.x,fr=Wt.y,_r=Wt.x,wr=Wt.y;for(const Xe of u)In=Math.min(In,Xe.x),fr=Math.min(fr,Xe.y),_r=Math.max(_r,Xe.x),wr=Math.max(wr,Xe.y);return[new Xe.P(In,fr),new Xe.P(_r,fr),new Xe.P(_r,wr),new Xe.P(In,wr),new Xe.P(In,fr)]}}lngLatToCameraDepth(u,Wt){const In=this.locationCoordinate(u),fr=[In.x*this.worldSize,In.y*this.worldSize,Wt,1];return Xe.af(fr,fr,this.modelViewProjectionMatrix),fr[2]/fr[3]}}function Ia(u,Xe){let Wt,In=!1,fr=null,_r=null;const r=()=>{fr=null,In&&(u.apply(_r,Wt),fr=setTimeout(r,Xe),In=!1)};return(...u)=>(In=!0,_r=this,Wt=u,fr||r(),fr)}class Ea{constructor(u){this._getCurrentHash=()=>{const u=window.location.hash.replace("#","");if(this._hashName){let Xe;return u.split("&").map((u=>u.split("="))).forEach((u=>{u[0]===this._hashName&&(Xe=u)})),(Xe&&Xe[1]||"").split("/")}return u.split("/")},this._onHashChange=()=>{const u=this._getCurrentHash();if(u.length>=3&&!u.some((u=>isNaN(u)))){const Xe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(u[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+u[2],+u[1]],zoom:+u[0],bearing:Xe,pitch:+(u[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const u=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,u)},this._removeHash=()=>{const u=this._getCurrentHash();if(0===u.length)return;const Xe=u.join("/");let Wt=Xe;Wt.split("&").length>0&&(Wt=Wt.split("&")[0]),this._hashName&&(Wt=`${this._hashName}=${Xe}`);let In=window.location.hash.replace(Wt,"");In.startsWith("#&")?In=In.slice(0,1)+In.slice(2):"#"===In&&(In="");let fr=window.location.href.replace(/(#.+)?$/,In);fr=fr.replace("&&","&"),window.history.replaceState(window.history.state,null,fr)},this._updateHash=Ia(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(u){const Xe=this._map.getCenter(),Wt=Math.round(100*this._map.getZoom())/100,In=Math.ceil((Wt*Math.LN2+Math.log(512/360/.5))/Math.LN10),fr=Math.pow(10,In),_r=Math.round(Xe.lng*fr)/fr,wr=Math.round(Xe.lat*fr)/fr,Ar=this._map.getBearing(),Kr=this._map.getPitch();let no="";if(no+=u?`/${_r}/${wr}/${Wt}`:`${Wt}/${wr}/${_r}`,(Ar||Kr)&&(no+="/"+Math.round(10*Ar)/10),Kr&&(no+=`/${Math.round(Kr)}`),this._hashName){const u=this._hashName;let Xe=!1;const Wt=window.location.hash.slice(1).split("&").map((Wt=>{const In=Wt.split("=")[0];return In===u?(Xe=!0,`${In}=${no}`):Wt})).filter((u=>u));return Xe||Wt.push(`${u}=${no}`),`#${Wt.join("&")}`}return`#${no}`}}const lc={linearity:.3,easing:Xe.b8(0,0,.3,1)},gc=Xe.e({deceleration:2500,maxSpeed:1400},lc),bc=Xe.e({deceleration:20,maxSpeed:1400},lc),eu=Xe.e({deceleration:1e3,maxSpeed:360},lc),tu=Xe.e({deceleration:1e3,maxSpeed:90},lc);class Ma{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:_r.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,Xe=_r.now();for(;u.length>0&&Xe-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const Wt={zoom:0,bearing:0,pitch:0,pan:new Xe.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:u}of this._inertiaBuffer)Wt.zoom+=u.zoomDelta||0,Wt.bearing+=u.bearingDelta||0,Wt.pitch+=u.pitchDelta||0,u.panDelta&&Wt.pan._add(u.panDelta),u.around&&(Wt.around=u.around),u.pinchAround&&(Wt.pinchAround=u.pinchAround);const In=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,fr={};if(Wt.pan.mag()){const _r=Ra(Wt.pan.mag(),In,Xe.e({},gc,u||{}));fr.offset=Wt.pan.mult(_r.amount/Wt.pan.mag()),fr.center=this._map.transform.center,Aa(fr,_r)}if(Wt.zoom){const u=Ra(Wt.zoom,In,bc);fr.zoom=this._map.transform.zoom+u.amount,Aa(fr,u)}if(Wt.bearing){const u=Ra(Wt.bearing,In,eu);fr.bearing=this._map.transform.bearing+Xe.ac(u.amount,-179,179),Aa(fr,u)}if(Wt.pitch){const u=Ra(Wt.pitch,In,tu);fr.pitch=this._map.transform.pitch+u.amount,Aa(fr,u)}if(fr.zoom||fr.bearing){const u=void 0===Wt.pinchAround?Wt.around:Wt.pinchAround;fr.around=u?this._map.unproject(u):this._map.getCenter()}return this.clear(),Xe.e(fr,{noMoveStart:!0})}}function Aa(u,Xe){(!u.duration||u.duration<Xe.duration)&&(u.duration=Xe.duration,u.easing=Xe.easing)}function Ra(u,Wt,In){const{maxSpeed:fr,linearity:_r,deceleration:wr}=In,Ar=Xe.ac(u*_r/(Wt/1e3),-fr,fr),Kr=Math.abs(Ar)/(wr*_r);return{easing:In.easing,duration:1e3*Kr,amount:Ar*(Kr/2)}}class ka extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,Wt,In,fr={}){const _r=r.mousePos(Wt.getCanvas(),In),wr=Wt.unproject(_r);super(u,Xe.e({point:_r,lngLat:wr,originalEvent:In},fr)),this._defaultPrevented=!1,this.target=Wt}}class La extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,Wt,In){const fr="touchend"===u?In.changedTouches:In.touches,_r=r.touchPos(Wt.getCanvasContainer(),fr),wr=_r.map((u=>Wt.unproject(u))),Ar=_r.reduce(((u,Xe,Wt,In)=>u.add(Xe.div(In.length))),new Xe.P(0,0));super(u,{points:_r,point:Ar,lngLats:wr,lngLat:Wt.unproject(Ar),originalEvent:In}),this._defaultPrevented=!1}}class Fa extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,Xe,Wt){super(u,{originalEvent:Wt}),this._defaultPrevented=!1}}class Ba{constructor(u,Xe){this._map=u,this._clickTolerance=Xe.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new Fa(u.type,this._map,u))}mousedown(u,Xe){return this._mousedownPos=Xe,this._firePreventable(new ka(u.type,this._map,u))}mouseup(u){this._map.fire(new ka(u.type,this._map,u))}click(u,Xe){this._mousedownPos&&this._mousedownPos.dist(Xe)>=this._clickTolerance||this._map.fire(new ka(u.type,this._map,u))}dblclick(u){return this._firePreventable(new ka(u.type,this._map,u))}mouseover(u){this._map.fire(new ka(u.type,this._map,u))}mouseout(u){this._map.fire(new ka(u.type,this._map,u))}touchstart(u){return this._firePreventable(new La(u.type,this._map,u))}touchmove(u){this._map.fire(new La(u.type,this._map,u))}touchend(u){this._map.fire(new La(u.type,this._map,u))}touchcancel(u){this._map.fire(new La(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Oa{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new ka(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ka("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new ka(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Na{constructor(u){this._map=u}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(u){return this.transform.pointLocation(Xe.P.convert(u),this._map.terrain)}}class Ua{constructor(u,Xe){this._map=u,this._tr=new Na(u),this._el=u.getCanvasContainer(),this._container=u.getContainer(),this._clickTolerance=Xe.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(u,Xe){this.isEnabled()&&u.shiftKey&&0===u.button&&(r.disableDrag(),this._startPos=this._lastPos=Xe,this._active=!0)}mousemoveWindow(u,Xe){if(!this._active)return;const Wt=Xe;if(this._lastPos.equals(Wt)||!this._box&&Wt.dist(this._startPos)<this._clickTolerance)return;const In=this._startPos;this._lastPos=Wt,this._box||(this._box=r.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const fr=Math.min(In.x,Wt.x),_r=Math.max(In.x,Wt.x),wr=Math.min(In.y,Wt.y),Ar=Math.max(In.y,Wt.y);r.setTransform(this._box,`translate(${fr}px,${wr}px)`),this._box.style.width=_r-fr+"px",this._box.style.height=Ar-wr+"px"}mouseupWindow(u,Wt){if(!this._active)return;if(0!==u.button)return;const In=this._startPos,fr=Wt;if(this.reset(),r.suppressClick(),In.x!==fr.x||In.y!==fr.y)return this._map.fire(new Xe.k("boxzoomend",{originalEvent:u})),{cameraAnimation:u=>u.fitScreenCoordinates(In,fr,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&27===u.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",u))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(u,Wt){return this._map.fire(new Xe.k(u,{originalEvent:Wt}))}}function ja(u,Xe){if(u.length!==Xe.length)throw new Error(`The number of touches and points are not equal - touches ${u.length}, points ${Xe.length}`);const Wt={};for(let In=0;In<u.length;In++)Wt[u[In].identifier]=Xe[In];return Wt}class Za{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,Wt,In){(this.centroid||In.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=u.timeStamp),In.length===this.numTouches&&(this.centroid=function(u){const Wt=new Xe.P(0,0);for(const Xe of u)Wt._add(Xe);return Wt.div(u.length)}(Wt),this.touches=ja(In,Wt)))}touchmove(u,Xe,Wt){if(this.aborted||!this.centroid)return;const In=ja(Wt,Xe);for(const u in this.touches){const Xe=In[u];(!Xe||Xe.dist(this.touches[u])>30)&&(this.aborted=!0)}}touchend(u,Xe,Wt){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),0===Wt.length){const u=!this.aborted&&this.centroid;if(this.reset(),u)return u}}}class qa{constructor(u){this.singleTap=new Za(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,Xe,Wt){this.singleTap.touchstart(u,Xe,Wt)}touchmove(u,Xe,Wt){this.singleTap.touchmove(u,Xe,Wt)}touchend(u,Xe,Wt){const In=this.singleTap.touchend(u,Xe,Wt);if(In){const Xe=u.timeStamp-this.lastTime<500,Wt=!this.lastTap||this.lastTap.dist(In)<30;if(Xe&&Wt||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=In,this.count===this.numTaps)return this.reset(),In}}}class Va{constructor(u){this._tr=new Na(u),this._zoomIn=new qa({numTouches:1,numTaps:2}),this._zoomOut=new qa({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,Xe,Wt){this._zoomIn.touchstart(u,Xe,Wt),this._zoomOut.touchstart(u,Xe,Wt)}touchmove(u,Xe,Wt){this._zoomIn.touchmove(u,Xe,Wt),this._zoomOut.touchmove(u,Xe,Wt)}touchend(u,Xe,Wt){const In=this._zoomIn.touchend(u,Xe,Wt),fr=this._zoomOut.touchend(u,Xe,Wt),_r=this._tr;return In?(this._active=!0,u.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:_r.zoom+1,around:_r.unproject(In)},{originalEvent:u})}):fr?(this._active=!0,u.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:_r.zoom-1,around:_r.unproject(fr)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ga{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const Xe=this._moveFunction(...u);if(Xe.bearingDelta||Xe.pitchDelta||Xe.around||Xe.panDelta)return this._active=!0,Xe}dragStart(u,Xe){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=Xe.length?Xe[0]:Xe,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,Xe){if(!this.isEnabled())return;const Wt=this._lastPoint;if(!Wt)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const In=Xe.length?Xe[0]:Xe;return!this._moved&&In.dist(Wt)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=In,this._move(Wt,In))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&r.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const nu={0:1,2:2};class Wa{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const Xe=r.mouseButton(u);this._eventButton=Xe}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(u,Xe){const Wt=nu[Xe];return void 0===u.buttons||(u.buttons&Wt)!==Wt}(u,this._eventButton)}isValidEndEvent(u){return r.mouseButton(u)===this._eventButton}}class $a{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return 1===u.targetTouches.length}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){this._firstTouch=u.targetTouches[0].identifier}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const Xa=u=>{u.mousedown=u.dragStart,u.mousemoveWindow=u.dragMove,u.mouseup=u.dragEnd,u.contextmenu=u=>{u.preventDefault()}},Ka=({enable:u,clickTolerance:Xe,bearingDegreesPerPixelMoved:Wt=.8})=>{const In=new Wa({checkCorrectEvent:u=>0===r.mouseButton(u)&&u.ctrlKey||2===r.mouseButton(u)});return new Ga({clickTolerance:Xe,move:(u,Xe)=>({bearingDelta:(Xe.x-u.x)*Wt}),moveStateManager:In,enable:u,assignEvents:Xa})},Ja=({enable:u,clickTolerance:Xe,pitchDegreesPerPixelMoved:Wt=-.5})=>{const In=new Wa({checkCorrectEvent:u=>0===r.mouseButton(u)&&u.ctrlKey||2===r.mouseButton(u)});return new Ga({clickTolerance:Xe,move:(u,Xe)=>({pitchDelta:(Xe.y-u.y)*Wt}),moveStateManager:In,enable:u,assignEvents:Xa})};class Ya{constructor(u,Xe){this._clickTolerance=u.clickTolerance||1,this._map=Xe,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new Xe.P(0,0)}_shouldBePrevented(u){return u<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(u,Xe,Wt){return this._calculateTransform(u,Xe,Wt)}touchmove(u,Xe,Wt){if(this._active){if(!this._shouldBePrevented(Wt.length))return u.preventDefault(),this._calculateTransform(u,Xe,Wt);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",u)}}touchend(u,Xe,Wt){this._calculateTransform(u,Xe,Wt),this._active&&this._shouldBePrevented(Wt.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,Wt,In){In.length>0&&(this._active=!0);const fr=ja(In,Wt),_r=new Xe.P(0,0),wr=new Xe.P(0,0);let Ar=0;for(const u in fr){const Xe=fr[u],Wt=this._touches[u];Wt&&(_r._add(Xe),wr._add(Xe.sub(Wt)),Ar++,fr[u]=Xe)}if(this._touches=fr,this._shouldBePrevented(Ar)||!wr.mag())return;const Kr=wr.div(Ar);return this._sum._add(Kr),this._sum.mag()<this._clickTolerance?void 0:{around:_r.div(Ar),panDelta:Kr}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Qa{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,Xe,Wt){this._firstTwoTouches||Wt.length<2||(this._firstTwoTouches=[Wt[0].identifier,Wt[1].identifier],this._start([Xe[0],Xe[1]]))}touchmove(u,Xe,Wt){if(!this._firstTwoTouches)return;u.preventDefault();const[In,fr]=this._firstTwoTouches,_r=ts(Wt,Xe,In),wr=ts(Wt,Xe,fr);if(!_r||!wr)return;const Ar=this._aroundCenter?null:_r.add(wr).div(2);return this._move([_r,wr],Ar,u)}touchend(u,Xe,Wt){if(!this._firstTwoTouches)return;const[In,fr]=this._firstTwoTouches,_r=ts(Wt,Xe,In),wr=ts(Wt,Xe,fr);_r&&wr||(this._active&&r.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&"center"===u.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function ts(u,Xe,Wt){for(let In=0;In<u.length;In++)if(u[In].identifier===Wt)return Xe[In]}function es(u,Xe){return Math.log(u/Xe)/Math.LN2}class is extends Qa{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,Xe){const Wt=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(es(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:es(this._distance,Wt),pinchAround:Xe}}}function as(u,Xe){return 180*u.angleWith(Xe)/Math.PI}class ss extends Qa{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,Xe,Wt){const In=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:as(this._vector,In),pinchAround:Xe}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const Xe=25/(Math.PI*this._minDiameter)*360,Wt=as(u,this._startVector);return Math.abs(Wt)<Xe}}function os(u){return Math.abs(u.y)>Math.abs(u.x)}class rs extends Qa{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,Xe,Wt){super.touchstart(u,Xe,Wt),this._currentTouchCount=Wt.length}_start(u){this._lastPoints=u,os(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,Xe,Wt){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const In=u[0].sub(this._lastPoints[0]),fr=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(In,fr,Wt.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(In.y+fr.y)/2*-.5}):void 0}gestureBeginsVertically(u,Xe,Wt){if(void 0!==this._valid)return this._valid;const In=u.mag()>=2,fr=Xe.mag()>=2;if(!In&&!fr)return;if(!In||!fr)return void 0===this._firstMove&&(this._firstMove=Wt),Wt-this._firstMove<100&&void 0;const _r=u.y>0==Xe.y>0;return os(u)&&os(Xe)&&_r}}const iu={panStep:100,bearingStep:15,pitchStep:10};class ls{constructor(u){this._tr=new Na(u);const Xe=iu;this._panStep=Xe.panStep,this._bearingStep=Xe.bearingStep,this._pitchStep=Xe.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let Xe=0,Wt=0,In=0,fr=0,_r=0;switch(u.keyCode){case 61:case 107:case 171:case 187:Xe=1;break;case 189:case 109:case 173:Xe=-1;break;case 37:u.shiftKey?Wt=-1:(u.preventDefault(),fr=-1);break;case 39:u.shiftKey?Wt=1:(u.preventDefault(),fr=1);break;case 38:u.shiftKey?In=1:(u.preventDefault(),_r=-1);break;case 40:u.shiftKey?In=-1:(u.preventDefault(),_r=1);break;default:return}return this._rotationDisabled&&(Wt=0,In=0),{cameraAnimation:wr=>{const Ar=this._tr;wr.easeTo({duration:300,easeId:"keyboardHandler",easing:hs,zoom:Xe?Math.round(Ar.zoom)+Xe*(u.shiftKey?2:1):Ar.zoom,bearing:Ar.bearing+Wt*this._bearingStep,pitch:Ar.pitch+In*this._pitchStep,offset:[-fr*this._panStep,-_r*this._panStep],center:Ar.center},{originalEvent:u})}}}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 hs(u){return u*(2-u)}const su=4.000244140625;class us{constructor(u,Xe){this._onTimeout=u=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(u)},this._map=u,this._tr=new Na(u),this._triggerRenderFrame=Xe,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&"center"===u.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(u){return!!this._map.cooperativeGestures.isEnabled()&&!(u.ctrlKey||this._map.cooperativeGestures.isBypassed(u))}wheel(u){if(!this.isEnabled())return;if(this._shouldBePrevented(u))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",u);let Xe=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const Wt=_r.now(),In=Wt-(this._lastWheelEventTime||0);this._lastWheelEventTime=Wt,0!==Xe&&Xe%su==0?this._type="wheel":0!==Xe&&Math.abs(Xe)<4?this._type="trackpad":In>400?(this._type=null,this._lastValue=Xe,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(In*Xe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,Xe+=this._lastValue)),u.shiftKey&&Xe&&(Xe/=4),this._type&&(this._lastWheelEvent=u,this._delta-=Xe,this._active||this._start(u)),u.preventDefault()}_start(u){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 Wt=r.mousePos(this._map.getCanvas(),u),In=this._tr;this._around=Wt.y>In.transform.height/2-In.transform.getHorizon()?Xe.N.convert(this._aroundCenter?In.center:In.unproject(Wt)):Xe.N.convert(In.center),this._aroundPoint=In.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const u=this._tr.transform;if(0!==this._delta){const Xe="wheel"===this._type&&Math.abs(this._delta)>su?this._wheelZoomRate:this._defaultZoomRate;let Wt=2/(1+Math.exp(-Math.abs(this._delta*Xe)));this._delta<0&&0!==Wt&&(Wt=1/Wt);const In="number"==typeof this._targetZoom?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(In*Wt))),"wheel"===this._type&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const Wt="number"==typeof this._targetZoom?this._targetZoom:u.zoom,In=this._startZoom,fr=this._easing;let wr,Ar=!1;const Kr=_r.now()-this._lastWheelEventTime;if("wheel"===this._type&&In&&fr&&Kr){const u=Math.min(Kr/200,1),_r=fr(u);wr=Xe.y.number(In,Wt,_r),u<1?this._frameId||(this._frameId=!0):Ar=!0}else wr=Wt,Ar=!0;return this._active=!0,Ar&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!Ar,zoomDelta:wr-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let Wt=Xe.b9;if(this._prevEase){const u=this._prevEase,In=(_r.now()-u.start)/u.duration,fr=u.easing(In+.01)-u.easing(In),wr=.27/Math.sqrt(fr*fr+1e-4)*.01,Ar=Math.sqrt(.0729-wr*wr);Wt=Xe.b8(wr,Ar,.25,1)}return this._prevEase={start:_r.now(),duration:u,easing:Wt},Wt}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ds{constructor(u,Xe){this._clickZoom=u,this._tapZoom=Xe}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 _s{constructor(u){this._tr=new Na(u),this.reset()}reset(){this._active=!1}dblclick(u,Xe){return u.preventDefault(),{cameraAnimation:Wt=>{Wt.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(Xe)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ps{constructor(){this._tap=new qa({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(u,Xe,Wt){if(!this._swipePoint)if(this._tapTime){const In=Xe[0],fr=u.timeStamp-this._tapTime<500,_r=this._tapPoint.dist(In)<30;fr&&_r?Wt.length>0&&(this._swipePoint=In,this._swipeTouch=Wt[0].identifier):this.reset()}else this._tap.touchstart(u,Xe,Wt)}touchmove(u,Xe,Wt){if(this._tapTime){if(this._swipePoint){if(Wt[0].identifier!==this._swipeTouch)return;const In=Xe[0],fr=In.y-this._swipePoint.y;return this._swipePoint=In,u.preventDefault(),this._active=!0,{zoomDelta:fr/128}}}else this._tap.touchmove(u,Xe,Wt)}touchend(u,Xe,Wt){if(this._tapTime)this._swipePoint&&0===Wt.length&&this.reset();else{const In=this._tap.touchend(u,Xe,Wt);In&&(this._tapTime=u.timeStamp,this._tapPoint=In)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ms{constructor(u,Xe,Wt){this._el=u,this._mousePan=Xe,this._touchPan=Wt}enable(u){this._inertiaOptions=u||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class fs{constructor(u,Xe,Wt){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=Xe,this._mousePitch=Wt}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 gs{constructor(u,Xe,Wt,In){this._el=u,this._touchZoom=Xe,this._touchRotate=Wt,this._tapDragZoom=In,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class vs{constructor(u,Xe){this._bypassKey=-1!==navigator.userAgent.indexOf("Mac")?"metaKey":"ctrlKey",this._map=u,this._options=Xe,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=r.create("div","maplibregl-cooperative-gesture-screen",u);let Xe=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(Xe=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const Wt=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),In=document.createElement("div");In.className="maplibregl-desktop-message",In.textContent=Xe,this._container.appendChild(In);const fr=document.createElement("div");fr.className="maplibregl-mobile-message",fr.textContent=Wt,this._container.appendChild(fr),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(r.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(u){return u[this._bypassKey]}notifyGestureBlocked(u,Wt){this._enabled&&(this._map.fire(new Xe.k("cooperativegestureprevented",{gestureType:u,originalEvent:Wt})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}const xs=u=>u.zoom||u.drag||u.pitch||u.rotate;class ys extends Xe.k{}function bs(u){return u.panDelta&&u.panDelta.mag()||u.zoomDelta||u.bearingDelta||u.pitchDelta}class ws{constructor(u,Xe){this.handleWindowEvent=u=>{this.handleEvent(u,`${u.type}Window`)},this.handleEvent=(u,Xe)=>{if("blur"===u.type)return void this.stop(!0);this._updatingCamera=!0;const Wt="renderFrame"===u.type?void 0:u,In={needsRenderFrame:!1},fr={},_r={},wr=u.touches,Ar=wr?this._getMapTouches(wr):void 0,Kr=Ar?r.touchPos(this._map.getCanvas(),Ar):r.mousePos(this._map.getCanvas(),u);for(const{handlerName:wr,handler:no,allowed:io}of this._handlers){if(!no.isEnabled())continue;let oo;this._blockedByActive(_r,io,wr)?no.reset():no[Xe||u.type]&&(oo=no[Xe||u.type](u,Kr,Ar),this.mergeHandlerResult(In,fr,oo,wr,Wt),oo&&oo.needsRenderFrame&&this._triggerRenderFrame()),(oo||no.isActive())&&(_r[wr]=no)}const no={};for(const u in this._previousActiveHandlers)_r[u]||(no[u]=Wt);this._previousActiveHandlers=_r,(Object.keys(no).length||bs(In))&&(this._changes.push([In,fr,no]),this._triggerRenderFrame()),(Object.keys(_r).length||bs(In))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:io}=In;io&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],io(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ma(u),this._bearingSnap=Xe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(Xe);const Wt=this._el;this._listeners=[[Wt,"touchstart",{passive:!0}],[Wt,"touchmove",{passive:!1}],[Wt,"touchend",void 0],[Wt,"touchcancel",void 0],[Wt,"mousedown",void 0],[Wt,"mousemove",void 0],[Wt,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Wt,"mouseover",void 0],[Wt,"mouseout",void 0],[Wt,"dblclick",void 0],[Wt,"click",void 0],[Wt,"keydown",{capture:!1}],[Wt,"keyup",void 0],[Wt,"wheel",{passive:!1}],[Wt,"contextmenu",void 0],[window,"blur",void 0]];for(const[u,Xe,Wt]of this._listeners)r.addEventListener(u,Xe,u===document?this.handleWindowEvent:this.handleEvent,Wt)}destroy(){for(const[u,Xe,Wt]of this._listeners)r.removeEventListener(u,Xe,u===document?this.handleWindowEvent:this.handleEvent,Wt)}_addDefaultHandlers(u){const Xe=this._map,Wt=Xe.getCanvasContainer();this._add("mapEvent",new Ba(Xe,u));const In=Xe.boxZoom=new Ua(Xe,u);this._add("boxZoom",In),u.interactive&&u.boxZoom&&In.enable();const fr=Xe.cooperativeGestures=new vs(Xe,u.cooperativeGestures);this._add("cooperativeGestures",fr),u.cooperativeGestures&&fr.enable();const _r=new Va(Xe),wr=new _s(Xe);Xe.doubleClickZoom=new ds(wr,_r),this._add("tapZoom",_r),this._add("clickZoom",wr),u.interactive&&u.doubleClickZoom&&Xe.doubleClickZoom.enable();const Ar=new ps;this._add("tapDragZoom",Ar);const Kr=Xe.touchPitch=new rs(Xe);this._add("touchPitch",Kr),u.interactive&&u.touchPitch&&Xe.touchPitch.enable(u.touchPitch);const no=Ka(u),io=Ja(u);Xe.dragRotate=new fs(u,no,io),this._add("mouseRotate",no,["mousePitch"]),this._add("mousePitch",io,["mouseRotate"]),u.interactive&&u.dragRotate&&Xe.dragRotate.enable();const oo=(({enable:u,clickTolerance:Xe})=>{const Wt=new Wa({checkCorrectEvent:u=>0===r.mouseButton(u)&&!u.ctrlKey});return new Ga({clickTolerance:Xe,move:(u,Xe)=>({around:Xe,panDelta:Xe.sub(u)}),activateOnStart:!0,moveStateManager:Wt,enable:u,assignEvents:Xa})})(u),ao=new Ya(u,Xe);Xe.dragPan=new ms(Wt,oo,ao),this._add("mousePan",oo),this._add("touchPan",ao,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&Xe.dragPan.enable(u.dragPan);const so=new ss,co=new is;Xe.touchZoomRotate=new gs(Wt,co,so,Ar),this._add("touchRotate",so,["touchPan","touchZoom"]),this._add("touchZoom",co,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&Xe.touchZoomRotate.enable(u.touchZoomRotate);const ho=Xe.scrollZoom=new us(Xe,(()=>this._triggerRenderFrame()));this._add("scrollZoom",ho,["mousePan"]),u.interactive&&u.scrollZoom&&Xe.scrollZoom.enable(u.scrollZoom);const go=Xe.keyboard=new ls(Xe);this._add("keyboard",go),u.interactive&&u.keyboard&&Xe.keyboard.enable(),this._add("blockableMapEvent",new Oa(Xe))}_add(u,Xe,Wt){this._handlers.push({handlerName:u,handler:Xe,allowed:Wt}),this._handlersById[u]=Xe}stop(u){if(!this._updatingCamera){for(const{handler:u}of this._handlers)u.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(xs(this._eventsInProgress))||this.isZooming()}_blockedByActive(u,Xe,Wt){for(const In in u)if(In!==Wt&&(!Xe||Xe.indexOf(In)<0))return!0;return!1}_getMapTouches(u){const Xe=[];for(const Wt of u)this._el.contains(Wt.target)&&Xe.push(Wt);return Xe}mergeHandlerResult(u,Wt,In,fr,_r){if(!In)return;Xe.e(u,In);const wr={handlerName:fr,originalEvent:In.originalEvent||_r};void 0!==In.zoomDelta&&(Wt.zoom=wr),void 0!==In.panDelta&&(Wt.drag=wr),void 0!==In.pitchDelta&&(Wt.pitch=wr),void 0!==In.bearingDelta&&(Wt.rotate=wr)}_applyChanges(){const u={},Wt={},In={};for(const[fr,_r,wr]of this._changes)fr.panDelta&&(u.panDelta=(u.panDelta||new Xe.P(0,0))._add(fr.panDelta)),fr.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+fr.zoomDelta),fr.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+fr.bearingDelta),fr.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+fr.pitchDelta),void 0!==fr.around&&(u.around=fr.around),void 0!==fr.pinchAround&&(u.pinchAround=fr.pinchAround),fr.noInertia&&(u.noInertia=fr.noInertia),Xe.e(Wt,_r),Xe.e(In,wr);this._updateMapTransform(u,Wt,In),this._changes=[]}_updateMapTransform(u,Xe,Wt){const In=this._map,fr=In._getTransformForUpdate(),_r=In.terrain;if(!(bs(u)||_r&&this._terrainMovement))return this._fireEvents(Xe,Wt,!0);let{panDelta:wr,zoomDelta:Ar,bearingDelta:Kr,pitchDelta:no,around:io,pinchAround:oo}=u;void 0!==oo&&(io=oo),In._stop(!0),io=io||In.transform.centerPoint;const ao=fr.pointLocation(wr?io.sub(wr):io);Kr&&(fr.bearing+=Kr),no&&(fr.pitch+=no),Ar&&(fr.zoom+=Ar),_r?this._terrainMovement||!Xe.drag&&!Xe.zoom?Xe.drag&&this._terrainMovement?fr.center=fr.pointLocation(fr.centerPoint.sub(wr)):fr.setLocationAtPoint(ao,io):(this._terrainMovement=!0,this._map._elevationFreeze=!0,fr.setLocationAtPoint(ao,io)):fr.setLocationAtPoint(ao,io),In._applyUpdatedTransform(fr),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(Xe,Wt,!0)}_fireEvents(u,Wt,In){const fr=xs(this._eventsInProgress),wr=xs(u),Ar={};for(const Xe in u){const{originalEvent:Wt}=u[Xe];this._eventsInProgress[Xe]||(Ar[`${Xe}start`]=Wt),this._eventsInProgress[Xe]=u[Xe]}!fr&&wr&&this._fireEvent("movestart",wr.originalEvent);for(const u in Ar)this._fireEvent(u,Ar[u]);wr&&this._fireEvent("move",wr.originalEvent);for(const Xe in u){const{originalEvent:Wt}=u[Xe];this._fireEvent(Xe,Wt)}const Kr={};let no;for(const u in this._eventsInProgress){const{handlerName:Xe,originalEvent:In}=this._eventsInProgress[u];this._handlersById[Xe].isActive()||(delete this._eventsInProgress[u],no=Wt[Xe]||In,Kr[`${u}end`]=no)}for(const u in Kr)this._fireEvent(u,Kr[u]);const io=xs(this._eventsInProgress),oo=(fr||wr)&&!io;if(oo&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const u=this._map._getTransformForUpdate();u.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(u)}if(In&&oo){this._updatingCamera=!0;const u=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),i=u=>0!==u&&-this._bearingSnap<u&&u<this._bearingSnap;!u||!u.essential&&_r.prefersReducedMotion?(this._map.fire(new Xe.k("moveend",{originalEvent:no})),i(this._map.getBearing())&&this._map.resetNorth()):(i(u.bearing||this._map.getBearing())&&(u.bearing=0),u.freezeElevation=!0,this._map.easeTo(u,{originalEvent:no})),this._updatingCamera=!1}}_fireEvent(u,Wt){this._map.fire(new Xe.k(u,Wt?{originalEvent:Wt}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((u=>{delete this._frameId,this.handleEvent(new ys("renderFrame",{timeStamp:u})),this._applyChanges()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class Ts extends Xe.E{constructor(u,Xe){super(),this._renderFrameCallback=()=>{const u=Math.min((_r.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(u)),u<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=Xe.bearingSnap,this.on("moveend",(()=>{delete this._requestedCameraState}))}getCenter(){return new Xe.N(this.transform.center.lng,this.transform.center.lat)}setCenter(u,Xe){return this.jumpTo({center:u},Xe)}panBy(u,Wt,In){return u=Xe.P.convert(u).mult(-1),this.panTo(this.transform.center,Xe.e({offset:u},Wt),In)}panTo(u,Wt,In){return this.easeTo(Xe.e({center:u},Wt),In)}getZoom(){return this.transform.zoom}setZoom(u,Xe){return this.jumpTo({zoom:u},Xe),this}zoomTo(u,Wt,In){return this.easeTo(Xe.e({zoom:u},Wt),In)}zoomIn(u,Xe){return this.zoomTo(this.getZoom()+1,u,Xe),this}zoomOut(u,Xe){return this.zoomTo(this.getZoom()-1,u,Xe),this}getBearing(){return this.transform.bearing}setBearing(u,Xe){return this.jumpTo({bearing:u},Xe),this}getPadding(){return this.transform.padding}setPadding(u,Xe){return this.jumpTo({padding:u},Xe),this}rotateTo(u,Wt,In){return this.easeTo(Xe.e({bearing:u},Wt),In)}resetNorth(u,Wt){return this.rotateTo(0,Xe.e({duration:1e3},u),Wt),this}resetNorthPitch(u,Wt){return this.easeTo(Xe.e({bearing:0,pitch:0,duration:1e3},u),Wt),this}snapToNorth(u,Xe){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,Xe):this}getPitch(){return this.transform.pitch}setPitch(u,Xe){return this.jumpTo({pitch:u},Xe),this}cameraForBounds(u,Xe){u=H.convert(u).adjustAntiMeridian();const Wt=Xe&&Xe.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),Wt,Xe)}_cameraForBoxAndBearing(u,Wt,In,fr){const _r={top:0,bottom:0,right:0,left:0};if("number"==typeof(fr=Xe.e({padding:_r,offset:[0,0],maxZoom:this.transform.maxZoom},fr)).padding){const u=fr.padding;fr.padding={top:u,bottom:u,right:u,left:u}}fr.padding=Xe.e(_r,fr.padding);const wr=this.transform,Ar=wr.padding,Kr=new H(u,Wt),no=wr.project(Kr.getNorthWest()),io=wr.project(Kr.getNorthEast()),oo=wr.project(Kr.getSouthEast()),ao=wr.project(Kr.getSouthWest()),so=Xe.ba(-In),co=no.rotate(so),ho=io.rotate(so),go=oo.rotate(so),xo=ao.rotate(so),ko=new Xe.P(Math.max(co.x,ho.x,xo.x,go.x),Math.max(co.y,ho.y,xo.y,go.y)),Co=new Xe.P(Math.min(co.x,ho.x,xo.x,go.x),Math.min(co.y,ho.y,xo.y,go.y)),Io=ko.sub(Co),zo=(wr.width-(Ar.left+Ar.right+fr.padding.left+fr.padding.right))/Io.x,Bo=(wr.height-(Ar.top+Ar.bottom+fr.padding.top+fr.padding.bottom))/Io.y;if(Bo<0||zo<0)return void Xe.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const ca=Math.min(wr.scaleZoom(wr.scale*Math.min(zo,Bo)),fr.maxZoom),ua=Xe.P.convert(fr.offset),Da=new Xe.P((fr.padding.left-fr.padding.right)/2,(fr.padding.top-fr.padding.bottom)/2).rotate(Xe.ba(In)),ns=ua.add(Da).mult(wr.scale/wr.zoomScale(ca));return{center:wr.unproject(no.add(oo).div(2).sub(ns)),zoom:ca,bearing:In}}fitBounds(u,Xe,Wt){return this._fitInternal(this.cameraForBounds(u,Xe),Xe,Wt)}fitScreenCoordinates(u,Wt,In,fr,_r){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(Xe.P.convert(u)),this.transform.pointLocation(Xe.P.convert(Wt)),In,fr),fr,_r)}_fitInternal(u,Wt,In){return u?(delete(Wt=Xe.e(u,Wt)).padding,Wt.linear?this.easeTo(Wt,In):this.flyTo(Wt,In)):this}jumpTo(u,Wt){this.stop();const In=this._getTransformForUpdate();let fr=!1,_r=!1,wr=!1;return"zoom"in u&&In.zoom!==+u.zoom&&(fr=!0,In.zoom=+u.zoom),void 0!==u.center&&(In.center=Xe.N.convert(u.center)),"bearing"in u&&In.bearing!==+u.bearing&&(_r=!0,In.bearing=+u.bearing),"pitch"in u&&In.pitch!==+u.pitch&&(wr=!0,In.pitch=+u.pitch),null==u.padding||In.isPaddingEqual(u.padding)||(In.padding=u.padding),this._applyUpdatedTransform(In),this.fire(new Xe.k("movestart",Wt)).fire(new Xe.k("move",Wt)),fr&&this.fire(new Xe.k("zoomstart",Wt)).fire(new Xe.k("zoom",Wt)).fire(new Xe.k("zoomend",Wt)),_r&&this.fire(new Xe.k("rotatestart",Wt)).fire(new Xe.k("rotate",Wt)).fire(new Xe.k("rotateend",Wt)),wr&&this.fire(new Xe.k("pitchstart",Wt)).fire(new Xe.k("pitch",Wt)).fire(new Xe.k("pitchend",Wt)),this.fire(new Xe.k("moveend",Wt))}calculateCameraOptionsFromTo(u,Wt,In,fr=0){const _r=Xe.Z.fromLngLat(u,Wt),wr=Xe.Z.fromLngLat(In,fr),Ar=wr.x-_r.x,Kr=wr.y-_r.y,no=wr.z-_r.z,io=Math.hypot(Ar,Kr,no);if(0===io)throw new Error("Can't calculate camera options with same From and To");const oo=Math.hypot(Ar,Kr),ao=this.transform.scaleZoom(this.transform.cameraToCenterDistance/io/this.transform.tileSize),so=180*Math.atan2(Ar,-Kr)/Math.PI;let co=180*Math.acos(oo/io)/Math.PI;return co=no<0?90-co:90+co,{center:wr.toLngLat(),zoom:ao,pitch:co,bearing:so}}easeTo(u,Wt){var In;this._stop(!1,u.easeId),(!1===(u=Xe.e({offset:[0,0],duration:500,easing:Xe.b9},u)).animate||!u.essential&&_r.prefersReducedMotion)&&(u.duration=0);const fr=this._getTransformForUpdate(),wr=fr.zoom,Ar=fr.bearing,Kr=fr.pitch,no=fr.padding,io="bearing"in u?this._normalizeBearing(u.bearing,Ar):Ar,oo="pitch"in u?+u.pitch:Kr,ao="padding"in u?u.padding:fr.padding,so=Xe.P.convert(u.offset);let co=fr.centerPoint.add(so);const ho=fr.pointLocation(co),{center:go,zoom:xo}=fr.getConstrained(Xe.N.convert(u.center||ho),null!==(In=u.zoom)&&void 0!==In?In:wr);this._normalizeCenter(go,fr);const ko=fr.project(ho),Co=fr.project(go).sub(ko),Io=fr.zoomScale(xo-wr);let zo,Bo;u.around&&(zo=Xe.N.convert(u.around),Bo=fr.locationPoint(zo));const ca={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||xo!==wr,this._rotating=this._rotating||Ar!==io,this._pitching=this._pitching||oo!==Kr,this._padding=!fr.isPaddingEqual(ao),this._easeId=u.easeId,this._prepareEase(Wt,u.noMoveStart,ca),this.terrain&&this._prepareElevation(go),this._ease((In=>{if(this._zooming&&(fr.zoom=Xe.y.number(wr,xo,In)),this._rotating&&(fr.bearing=Xe.y.number(Ar,io,In)),this._pitching&&(fr.pitch=Xe.y.number(Kr,oo,In)),this._padding&&(fr.interpolatePadding(no,ao,In),co=fr.centerPoint.add(so)),this.terrain&&!u.freezeElevation&&this._updateElevation(In),zo)fr.setLocationAtPoint(zo,Bo);else{const u=fr.zoomScale(fr.zoom-wr),Xe=xo>wr?Math.min(2,Io):Math.max(.5,Io),Wt=Math.pow(Xe,1-In),_r=fr.unproject(ko.add(Co.mult(In*Wt)).mult(u));fr.setLocationAtPoint(fr.renderWorldCopies?_r.wrap():_r,co)}this._applyUpdatedTransform(fr),this._fireMoveEvents(Wt)}),(Xe=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(Wt,Xe)}),u),this}_prepareEase(u,Wt,In={}){this._moving=!0,Wt||In.moving||this.fire(new Xe.k("movestart",u)),this._zooming&&!In.zooming&&this.fire(new Xe.k("zoomstart",u)),this._rotating&&!In.rotating&&this.fire(new Xe.k("rotatestart",u)),this._pitching&&!In.pitching&&this.fire(new Xe.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const Wt=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&Wt!==this._elevationTarget){const Xe=this._elevationTarget-this._elevationStart;this._elevationStart+=u*(Xe-(Wt-(Xe*u+this._elevationStart))/(1-u)),this._elevationTarget=Wt}this.transform.elevation=Xe.y.number(this._elevationStart,this._elevationTarget,u)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(u){const Xe=u.getCameraPosition(),Wt=this.terrain.getElevationForLngLatZoom(Xe.lngLat,u.zoom);if(Xe.altitude<Wt){const In=this.calculateCameraOptionsFromTo(Xe.lngLat,Wt,u.center,u.elevation);return{pitch:In.pitch,zoom:In.zoom}}return{}}_applyUpdatedTransform(u){const Xe=[];if(this.terrain&&Xe.push((u=>this._elevateCameraIfInsideTerrain(u))),this.transformCameraUpdate&&Xe.push((u=>this.transformCameraUpdate(u))),!Xe.length)return;const Wt=u.clone();for(const u of Xe){const Xe=Wt.clone(),{center:In,zoom:fr,pitch:_r,bearing:wr,elevation:Ar}=u(Xe);In&&(Xe.center=In),void 0!==fr&&(Xe.zoom=fr),void 0!==_r&&(Xe.pitch=_r),void 0!==wr&&(Xe.bearing=wr),void 0!==Ar&&(Xe.elevation=Ar),Wt.apply(Xe)}this.transform.apply(Wt)}_fireMoveEvents(u){this.fire(new Xe.k("move",u)),this._zooming&&this.fire(new Xe.k("zoom",u)),this._rotating&&this.fire(new Xe.k("rotate",u)),this._pitching&&this.fire(new Xe.k("pitch",u))}_afterEase(u,Wt){if(this._easeId&&Wt&&this._easeId===Wt)return;delete this._easeId;const In=this._zooming,fr=this._rotating,_r=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,In&&this.fire(new Xe.k("zoomend",u)),fr&&this.fire(new Xe.k("rotateend",u)),_r&&this.fire(new Xe.k("pitchend",u)),this.fire(new Xe.k("moveend",u))}flyTo(u,Wt){var In;if(!u.essential&&_r.prefersReducedMotion){const In=Xe.M(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(In,Wt)}this.stop(),u=Xe.e({offset:[0,0],speed:1.2,curve:1.42,easing:Xe.b9},u);const fr=this._getTransformForUpdate(),wr=fr.zoom,Ar=fr.bearing,Kr=fr.pitch,no=fr.padding,io="bearing"in u?this._normalizeBearing(u.bearing,Ar):Ar,oo="pitch"in u?+u.pitch:Kr,ao="padding"in u?u.padding:fr.padding,so=Xe.P.convert(u.offset);let co=fr.centerPoint.add(so);const ho=fr.pointLocation(co),{center:go,zoom:xo}=fr.getConstrained(Xe.N.convert(u.center||ho),null!==(In=u.zoom)&&void 0!==In?In:wr);this._normalizeCenter(go,fr);const ko=fr.zoomScale(xo-wr),Co=fr.project(ho),Io=fr.project(go).sub(Co);let zo=u.curve;const Bo=Math.max(fr.width,fr.height),ca=Bo/ko,ua=Io.mag();if("minZoom"in u){const Wt=Xe.ac(Math.min(u.minZoom,wr,xo),fr.minZoom,fr.maxZoom),In=Bo/fr.zoomScale(Wt-wr);zo=Math.sqrt(In/ua*2)}const Da=zo*zo;function P(u){const Xe=(ca*ca-Bo*Bo+(u?-1:1)*Da*Da*ua*ua)/(2*(u?ca:Bo)*Da*ua);return Math.log(Math.sqrt(Xe*Xe+1)-Xe)}function C(u){return(Math.exp(u)-Math.exp(-u))/2}function S(u){return(Math.exp(u)+Math.exp(-u))/2}const ns=P(!1);let D=function(u){return S(ns)/S(ns+zo*u)},M=function(u){return Bo*((S(ns)*(C(Xe=ns+zo*u)/S(Xe))-C(ns))/Da)/ua;var Xe},yl=(P(!0)-ns)/zo;if(Math.abs(ua)<1e-6||!isFinite(yl)){if(Math.abs(Bo-ca)<1e-6)return this.easeTo(u,Wt);const Xe=ca<Bo?-1:1;yl=Math.abs(Math.log(ca/Bo))/zo,M=()=>0,D=u=>Math.exp(Xe*zo*u)}return u.duration="duration"in u?+u.duration:1e3*yl/("screenSpeed"in u?+u.screenSpeed/zo:+u.speed),u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=Ar!==io,this._pitching=oo!==Kr,this._padding=!fr.isPaddingEqual(ao),this._prepareEase(Wt,!1),this.terrain&&this._prepareElevation(go),this._ease((In=>{const _r=In*yl,ho=1/D(_r);fr.zoom=1===In?xo:wr+fr.scaleZoom(ho),this._rotating&&(fr.bearing=Xe.y.number(Ar,io,In)),this._pitching&&(fr.pitch=Xe.y.number(Kr,oo,In)),this._padding&&(fr.interpolatePadding(no,ao,In),co=fr.centerPoint.add(so)),this.terrain&&!u.freezeElevation&&this._updateElevation(In);const ko=1===In?go:fr.unproject(Co.add(Io.mult(M(_r))).mult(ho));fr.setLocationAtPoint(fr.renderWorldCopies?ko.wrap():ko,co),this._applyUpdatedTransform(fr),this._fireMoveEvents(Wt)}),(()=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(Wt)}),u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,Xe){var Wt;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const u=this._onEaseEnd;delete this._onEaseEnd,u.call(this,Xe)}return u||null===(Wt=this.handlers)||void 0===Wt||Wt.stop(!1),this}_ease(u,Xe,Wt){!1===Wt.animate||0===Wt.duration?(u(1),Xe()):(this._easeStart=_r.now(),this._easeOptions=Wt,this._onEaseFrame=u,this._onEaseEnd=Xe,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,Wt){u=Xe.b3(u,-180,180);const In=Math.abs(u-Wt);return Math.abs(u-360-Wt)<In&&(u-=360),Math.abs(u+360-Wt)<In&&(u+=360),u}_normalizeCenter(u,Xe){if(!Xe.renderWorldCopies||Xe.lngRange)return;const Wt=u.lng-Xe.center.lng;u.lng+=Wt>180?-360:Wt<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(Xe.N.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const cu={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Es{constructor(u=cu){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=u=>{!u||"metadata"!==u.sourceDataType&&"visibility"!==u.sourceDataType&&"style"!==u.dataType&&"terrain"!==u.type||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,this._compact=this.options.compact,this._container=r.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=r.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(u,Xe){const Wt=this._map._getUIString(`AttributionControl.${Xe}`);u.title=Wt,u.setAttribute("aria-label",Wt)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map((u=>"string"!=typeof u?"":u))):"string"==typeof this.options.customAttribution&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const u=this._map.style.stylesheet;this.styleOwner=u.owner,this.styleId=u.id}const Xe=this._map.style.sourceCaches;for(const Wt in Xe){const In=Xe[Wt];if(In.used||In.usedForTerrain){const Xe=In.getSource();Xe.attribution&&u.indexOf(Xe.attribution)<0&&u.push(Xe.attribution)}}u=u.filter((u=>String(u).trim())),u.sort(((u,Xe)=>u.length-Xe.length)),u=u.filter(((Xe,Wt)=>{for(let In=Wt+1;In<u.length;In++)if(u[In].indexOf(Xe)>=0)return!1;return!0}));const Wt=u.join(" | ");Wt!==this._attribHTML&&(this._attribHTML=Wt,u.length?(this._innerContainer.innerHTML=Wt,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Ps{constructor(u={}){this._updateCompact=()=>{const u=this._container.children;if(u.length){const Xe=u[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&Xe.classList.add("maplibregl-compact"):Xe.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=r.create("div","maplibregl-ctrl");const Xe=r.create("a","maplibregl-ctrl-logo");return Xe.target="_blank",Xe.rel="noopener nofollow",Xe.href="https://maplibre.org/",Xe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),Xe.setAttribute("rel","noopener nofollow"),this._container.appendChild(Xe),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){r.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Cs{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const Xe=++this._id;return this._queue.push({callback:u,id:Xe,cancelled:!1}),Xe}remove(u){const Xe=this._currentlyRunning,Wt=Xe?this._queue.concat(Xe):this._queue;for(const Xe of Wt)if(Xe.id===u)return void(Xe.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const Xe=this._currentlyRunning=this._queue;this._queue=[];for(const Wt of Xe)if(!Wt.cancelled&&(Wt.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var uu=Xe.Y([{name:"a_pos3d",type:"Int16",components:3}]);class zs extends Xe.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,Wt){this.sourceCache.update(u,Wt),this._renderableTilesKeys=[];const In={};for(const fr of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:Wt}))In[fr.key]=!0,this._renderableTilesKeys.push(fr.key),this._tiles[fr.key]||(fr.posMatrix=new Float64Array(16),Xe.aP(fr.posMatrix,0,Xe.X,0,Xe.X,0,1),this._tiles[fr.key]=new lt(fr,this.tileSize));for(const u in this._tiles)In[u]||delete this._tiles[u]}freeRtt(u){for(const Xe in this._tiles){const Wt=this._tiles[Xe];(!u||Wt.tileID.equals(u)||Wt.tileID.isChildOf(u)||u.isChildOf(Wt.tileID))&&(Wt.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((u=>this.getTileByID(u)))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const Wt={};for(const In of this._renderableTilesKeys){const fr=this._tiles[In].tileID;if(fr.canonical.equals(u.canonical)){const fr=u.clone();fr.posMatrix=new Float64Array(16),Xe.aP(fr.posMatrix,0,Xe.X,0,Xe.X,0,1),Wt[In]=fr}else if(fr.canonical.isChildOf(u.canonical)){const _r=u.clone();_r.posMatrix=new Float64Array(16);const wr=fr.canonical.z-u.canonical.z,Ar=fr.canonical.x-(fr.canonical.x>>wr<<wr),Kr=fr.canonical.y-(fr.canonical.y>>wr<<wr),no=Xe.X>>wr;Xe.aP(_r.posMatrix,0,no,0,no,0,1),Xe.J(_r.posMatrix,_r.posMatrix,[-Ar*no,-Kr*no,0]),Wt[In]=_r}else if(u.canonical.isChildOf(fr.canonical)){const _r=u.clone();_r.posMatrix=new Float64Array(16);const wr=u.canonical.z-fr.canonical.z,Ar=u.canonical.x-(u.canonical.x>>wr<<wr),Kr=u.canonical.y-(u.canonical.y>>wr<<wr),no=Xe.X>>wr;Xe.aP(_r.posMatrix,0,Xe.X,0,Xe.X,0,1),Xe.J(_r.posMatrix,_r.posMatrix,[Ar*no,Kr*no,0]),Xe.K(_r.posMatrix,_r.posMatrix,[1/2**wr,1/2**wr,0]),Wt[In]=_r}}return Wt}getSourceTile(u,Xe){const Wt=this.sourceCache._source;let In=u.overscaledZ-this.deltaZoom;if(In>Wt.maxzoom&&(In=Wt.maxzoom),In<Wt.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(In).key);let fr=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!fr||!fr.dem)&&Xe)for(;In>=Wt.minzoom&&(!fr||!fr.dem);)fr=this.sourceCache.getTileByID(u.scaledTo(In--).key);return fr}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter((Xe=>Xe.timeAdded>=u))}}class Ds{constructor(u,Xe,Wt){this.painter=u,this.sourceCache=new zs(Xe),this.options=Wt,this.exaggeration="number"==typeof Wt.exaggeration?Wt.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,Wt,In,fr=Xe.X){var _r;if(!(Wt>=0&&Wt<fr&&In>=0&&In<fr))return 0;const wr=this.getTerrainData(u),Ar=null===(_r=wr.tile)||void 0===_r?void 0:_r.dem;if(!Ar)return 0;const Kr=function(u,Xe,Wt){var In=Xe[0],fr=Xe[1];return u[0]=Wt[0]*In+Wt[4]*fr+Wt[12],u[1]=Wt[1]*In+Wt[5]*fr+Wt[13],u}([],[Wt/fr*Xe.X,In/fr*Xe.X],wr.u_terrain_matrix),no=[Kr[0]*Ar.dim,Kr[1]*Ar.dim],io=Math.floor(no[0]),oo=Math.floor(no[1]),ao=no[0]-io,so=no[1]-oo;return Ar.get(io,oo)*(1-ao)*(1-so)+Ar.get(io+1,oo)*ao*(1-so)+Ar.get(io,oo+1)*(1-ao)*so+Ar.get(io+1,oo+1)*ao*so}getElevationForLngLatZoom(u,Wt){if(!Xe.bb(Wt,u.wrap()))return 0;const{tileID:In,mercatorX:fr,mercatorY:_r}=this._getOverscaledTileIDFromLngLatZoom(u,Wt);return this.getElevation(In,fr%Xe.X,_r%Xe.X,Xe.X)}getElevation(u,Wt,In,fr=Xe.X){return this.getDEMElevation(u,Wt,In,fr)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const u=this.painter.context,Wt=new Xe.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new b(u,Wt,u.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new b(u,new Xe.R({width:1,height:1}),u.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=Xe.an([])}const Wt=this.sourceCache.getSourceTile(u,!0);if(Wt&&Wt.dem&&(!Wt.demTexture||Wt.needsTerrainPrepare)){const u=this.painter.context;Wt.demTexture=this.painter.getTileTexture(Wt.dem.stride),Wt.demTexture?Wt.demTexture.update(Wt.dem.getPixels(),{premultiply:!1}):Wt.demTexture=new b(u,Wt.dem.getPixels(),u.gl.RGBA,{premultiply:!1}),Wt.demTexture.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),Wt.needsTerrainPrepare=!1}const In=Wt&&Wt+Wt.tileID.key+u.key;if(In&&!this._demMatrixCache[In]){const In=this.sourceCache.sourceCache._source.maxzoom;let fr=u.canonical.z-Wt.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=In?fr=u.canonical.z-In:Xe.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const _r=u.canonical.x-(u.canonical.x>>fr<<fr),wr=u.canonical.y-(u.canonical.y>>fr<<fr),Ar=Xe.bc(new Float64Array(16),[1/(Xe.X<<fr),1/(Xe.X<<fr),0]);Xe.J(Ar,Ar,[_r*Xe.X,wr*Xe.X,0]),this._demMatrixCache[u.key]={matrix:Ar,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:Wt&&Wt.dem&&Wt.dem.dim||1,u_terrain_matrix:In?this._demMatrixCache[u.key].matrix:this._emptyDemMatrix,u_terrain_unpack:Wt&&Wt.dem&&Wt.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(Wt&&Wt.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:Wt}}getFramebuffer(u){const Xe=this.painter,Wt=Xe.width/devicePixelRatio,In=Xe.height/devicePixelRatio;return!this._fbo||this._fbo.width===Wt&&this._fbo.height===In||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new b(Xe.context,{width:Wt,height:In,data:null},Xe.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(Xe.context.gl.NEAREST,Xe.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new b(Xe.context,{width:Wt,height:In,data:null},Xe.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(Xe.context.gl.NEAREST,Xe.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=Xe.context.createFramebuffer(Wt,In,!0,!1),this._fbo.depthAttachment.set(Xe.context.createRenderbuffer(Xe.context.gl.DEPTH_COMPONENT16,Wt,In))),this._fbo.colorAttachment.set("coords"===u?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const Wt=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let u=0,Xe=0;u<this._coordsTextureSize;u++)for(let In=0;In<this._coordsTextureSize;In++,Xe+=4)Wt[Xe+0]=255&In,Wt[Xe+1]=255&u,Wt[Xe+2]=In>>8<<4|u>>8,Wt[Xe+3]=0;const In=new Xe.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(Wt.buffer)),fr=new b(u,In,u.gl.RGBA,{premultiply:!1});return fr.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=fr,fr}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const Wt=new Uint8Array(4),In=this.painter.context,fr=In.gl,_r=Math.round(u.x*this.painter.pixelRatio/devicePixelRatio),wr=Math.round(u.y*this.painter.pixelRatio/devicePixelRatio),Ar=Math.round(this.painter.height/devicePixelRatio);In.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),fr.readPixels(_r,Ar-wr-1,1,1,fr.RGBA,fr.UNSIGNED_BYTE,Wt),In.bindFramebuffer.set(null);const Kr=Wt[0]+(Wt[2]>>4<<8),no=Wt[1]+((15&Wt[2])<<8),io=this.coordsIndex[255-Wt[3]],oo=io&&this.sourceCache.getTileByID(io);if(!oo)return null;const ao=this._coordsTextureSize,so=(1<<oo.tileID.canonical.z)*ao;return new Xe.Z((oo.tileID.canonical.x*ao+Kr)/so+oo.tileID.wrap,(oo.tileID.canonical.y*ao+no)/so,this.getElevation(oo.tileID,Kr,no,ao))}depthAtPoint(u){const Xe=new Uint8Array(4),Wt=this.painter.context,In=Wt.gl;return Wt.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),In.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,In.RGBA,In.UNSIGNED_BYTE,Xe),Wt.bindFramebuffer.set(null),(Xe[0]/16777216+Xe[1]/65536+Xe[2]/256+Xe[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,Wt=new Xe.bd,In=new Xe.aY,fr=this.meshSize,_r=Xe.X/fr,wr=fr*fr;for(let u=0;u<=fr;u++)for(let Xe=0;Xe<=fr;Xe++)Wt.emplaceBack(Xe*_r,u*_r,0);for(let u=0;u<wr;u+=fr+1)for(let Xe=0;Xe<fr;Xe++)In.emplaceBack(Xe+u,fr+Xe+u+1,fr+Xe+u+2),In.emplaceBack(Xe+u,fr+Xe+u+2,Xe+u+1);const Ar=Wt.length,Kr=Ar+2*(fr+1);for(const u of[0,1])for(let In=0;In<=fr;In++)for(const fr of[0,1])Wt.emplaceBack(In*_r,u*Xe.X,fr);for(let u=0;u<2*fr;u+=2)In.emplaceBack(Kr+u,Kr+u+1,Kr+u+3),In.emplaceBack(Kr+u,Kr+u+3,Kr+u+2),In.emplaceBack(Ar+u,Ar+u+3,Ar+u+1),In.emplaceBack(Ar+u,Ar+u+2,Ar+u+3);const no=Wt.length,io=no+2*(fr+1);for(const u of[0,1])for(let In=0;In<=fr;In++)for(const fr of[0,1])Wt.emplaceBack(u*Xe.X,In*_r,fr);for(let u=0;u<2*fr;u+=2)In.emplaceBack(no+u,no+u+1,no+u+3),In.emplaceBack(no+u,no+u+3,no+u+2),In.emplaceBack(io+u,io+u+3,io+u+1),In.emplaceBack(io+u,io+u+2,io+u+3);return this._mesh=new ga(u.createVertexBuffer(Wt,uu.members),u.createIndexBuffer(In),Xe.a0.simpleSegment(0,0,Wt.length,In.length)),this._mesh}getMeshFrameDelta(u){return 2*Math.PI*Xe.be/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,Xe){var Wt;const{tileID:In}=this._getOverscaledTileIDFromLngLatZoom(u,Xe);return null!==(Wt=this.getMinMaxElevation(In).minElevation)&&void 0!==Wt?Wt:0}getMinMaxElevation(u){const Xe=this.getTerrainData(u).tile,Wt={minElevation:null,maxElevation:null};return Xe&&Xe.dem&&(Wt.minElevation=Xe.dem.min*this.exaggeration,Wt.maxElevation=Xe.dem.max*this.exaggeration),Wt}_getOverscaledTileIDFromLngLatZoom(u,Wt){const In=Xe.Z.fromLngLat(u.wrap()),fr=(1<<Wt)*Xe.X,_r=In.x*fr,wr=In.y*fr,Ar=Math.floor(_r/Xe.X),Kr=Math.floor(wr/Xe.X);return{tileID:new Xe.S(Wt,0,Wt,Ar,Kr),mercatorX:_r,mercatorY:wr}}}class Ms{constructor(u,Xe,Wt){this._context=u,this._size=Xe,this._tileSize=Wt,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const Xe=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),Wt=new b(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return Wt.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),Xe.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),Xe.colorAttachment.set(Wt.texture),{id:u,fbo:Xe,texture:Wt,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter((Xe=>u.id!==Xe)),this._recentlyUsed.push(u.id)}stampObject(u){u.stamp=++this._stamp}getOrCreateFreeObject(){for(const u of this._recentlyUsed)if(!this._objects[u].inUse)return this._objects[u];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&!1===this._objects.some((u=>!u.inUse))}}const hu={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Rs{constructor(u,Xe){this.painter=u,this.terrain=Xe,this.pool=new Ms(u.context,30,Xe.sourceCache.tileSize*Xe.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,Xe){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter((Wt=>!u._layers[Wt].isHidden(Xe))),this._coordsDescendingInv={};for(const Xe in u.sourceCaches){this._coordsDescendingInv[Xe]={};const Wt=u.sourceCaches[Xe].getVisibleCoordinates();for(const u of Wt){const Wt=this.terrain.sourceCache.getTerrainCoords(u);for(const u in Wt)this._coordsDescendingInv[Xe][u]||(this._coordsDescendingInv[Xe][u]=[]),this._coordsDescendingInv[Xe][u].push(Wt[u])}}this._coordsDescendingInvStr={};for(const Xe of u._order){const Wt=u._layers[Xe],In=Wt.source;if(hu[Wt.type]&&!this._coordsDescendingInvStr[In]){this._coordsDescendingInvStr[In]={};for(const u in this._coordsDescendingInv[In])this._coordsDescendingInvStr[In][u]=this._coordsDescendingInv[In][u].map((u=>u.key)).sort().join()}}for(const u of this._renderableTiles)for(const Xe in this._coordsDescendingInvStr){const Wt=this._coordsDescendingInvStr[Xe][u.tileID.key];Wt&&Wt!==u.rttCoords[Xe]&&(u.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const Wt=u.type,In=this.painter,fr=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(hu[Wt]&&(this._prevType&&hu[this._prevType]||this._stacks.push([]),this._prevType=Wt,this._stacks[this._stacks.length-1].push(u.id),!fr))return!0;if(hu[this._prevType]||hu[Wt]&&fr){this._prevType=Wt;const u=this._stacks.length-1,fr=this._stacks[u]||[];for(const Wt of this._renderableTiles){if(this.pool.isFull()&&(fa(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Wt),Wt.rtt[u]){const Xe=this.pool.getObjectForId(Wt.rtt[u].id);if(Xe.stamp===Wt.rtt[u].stamp){this.pool.useObject(Xe);continue}}const _r=this.pool.getOrCreateFreeObject();this.pool.useObject(_r),this.pool.stampObject(_r),Wt.rtt[u]={id:_r.id,stamp:_r.stamp},In.context.bindFramebuffer.set(_r.fbo.framebuffer),In.context.clear({color:Xe.aM.transparent,stencil:0}),In.currentStencilSource=void 0;for(let u=0;u<fr.length;u++){const Xe=In.style._layers[fr[u]],wr=Xe.source?this._coordsDescendingInv[Xe.source][Wt.tileID.key]:[Wt.tileID];In.context.viewport.set([0,0,_r.fbo.width,_r.fbo.height]),In._renderTileClippingMasks(Xe,wr),In.renderLayer(In,In.style.sourceCaches[Xe.source],Xe,wr),Xe.source&&(Wt.rttCoords[Xe.source]=this._coordsDescendingInvStr[Xe.source][Wt.tileID.key])}}return fa(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),hu[Wt]}return!1}}const Iu={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},zu=Wt,Lu={hash:!1,interactive:!0,bearingSnap:7,attributionControl:cu,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:Xe.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Bs=u=>{u.touchstart=u.dragStart,u.touchmoveWindow=u.dragMove,u.touchend=u.dragEnd},Du={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ns{constructor(u,Wt,In=!1){this.mousedown=u=>{this.startMouse(Xe.e({},u,{ctrlKey:!0,preventDefault:()=>u.preventDefault()}),r.mousePos(this.element,u)),r.addEventListener(window,"mousemove",this.mousemove),r.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=u=>{this.moveMouse(u,r.mousePos(this.element,u))},this.mouseup=u=>{this.mouseRotate.dragEnd(u),this.mousePitch&&this.mousePitch.dragEnd(u),this.offTemp()},this.touchstart=u=>{1!==u.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,u.targetTouches)[0],this.startTouch(u,this._startPos),r.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.addEventListener(window,"touchend",this.touchend))},this.touchmove=u=>{1!==u.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,u.targetTouches)[0],this.moveTouch(u,this._lastPos))},this.touchend=u=>{0===u.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const fr=u.dragRotate._mouseRotate.getClickTolerance(),_r=u.dragRotate._mousePitch.getClickTolerance();this.element=Wt,this.mouseRotate=Ka({clickTolerance:fr,enable:!0}),this.touchRotate=(({enable:u,clickTolerance:Xe,bearingDegreesPerPixelMoved:Wt=.8})=>{const In=new $a;return new Ga({clickTolerance:Xe,move:(u,Xe)=>({bearingDelta:(Xe.x-u.x)*Wt}),moveStateManager:In,enable:u,assignEvents:Bs})})({clickTolerance:fr,enable:!0}),this.map=u,In&&(this.mousePitch=Ja({clickTolerance:_r,enable:!0}),this.touchPitch=(({enable:u,clickTolerance:Xe,pitchDegreesPerPixelMoved:Wt=-.5})=>{const In=new $a;return new Ga({clickTolerance:Xe,move:(u,Xe)=>({pitchDelta:(Xe.y-u.y)*Wt}),moveStateManager:In,enable:u,assignEvents:Bs})})({clickTolerance:_r,enable:!0})),r.addEventListener(Wt,"mousedown",this.mousedown),r.addEventListener(Wt,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(Wt,"touchcancel",this.reset)}startMouse(u,Xe){this.mouseRotate.dragStart(u,Xe),this.mousePitch&&this.mousePitch.dragStart(u,Xe),r.disableDrag()}startTouch(u,Xe){this.touchRotate.dragStart(u,Xe),this.touchPitch&&this.touchPitch.dragStart(u,Xe),r.disableDrag()}moveMouse(u,Xe){const Wt=this.map,{bearingDelta:In}=this.mouseRotate.dragMove(u,Xe)||{};if(In&&Wt.setBearing(Wt.getBearing()+In),this.mousePitch){const{pitchDelta:In}=this.mousePitch.dragMove(u,Xe)||{};In&&Wt.setPitch(Wt.getPitch()+In)}}moveTouch(u,Xe){const Wt=this.map,{bearingDelta:In}=this.touchRotate.dragMove(u,Xe)||{};if(In&&Wt.setBearing(Wt.getBearing()+In),this.touchPitch){const{pitchDelta:In}=this.touchPitch.dragMove(u,Xe)||{};In&&Wt.setPitch(Wt.getPitch()+In)}}off(){const u=this.element;r.removeEventListener(u,"mousedown",this.mousedown),r.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend),r.removeEventListener(u,"touchcancel",this.reset),this.offTemp()}offTemp(){r.enableDrag(),r.removeEventListener(window,"mousemove",this.mousemove),r.removeEventListener(window,"mouseup",this.mouseup),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend)}}let Fu;function js(u,Wt,In){const fr=new Xe.N(u.lng,u.lat);if(u=new Xe.N(u.lng,u.lat),Wt){const fr=new Xe.N(u.lng-360,u.lat),_r=new Xe.N(u.lng+360,u.lat),wr=In.locationPoint(u).distSqr(Wt);In.locationPoint(fr).distSqr(Wt)<wr?u=fr:In.locationPoint(_r).distSqr(Wt)<wr&&(u=_r)}for(;Math.abs(u.lng-In.center.lng)>180;){const Xe=In.locationPoint(u);if(Xe.x>=0&&Xe.y>=0&&Xe.x<=In.width&&Xe.y<=In.height)break;u.lng>In.center.lng?u.lng-=360:u.lng+=360}return u.lng!==fr.lng&&In.locationPoint(u).y>In.height/2-In.getHorizon()?u:fr}const Nu={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function qs(u,Xe,Wt){const In=u.classList;for(const u in Nu)In.remove(`maplibregl-${Wt}-anchor-${u}`);In.add(`maplibregl-${Wt}-anchor-${Xe}`)}class Vs extends Xe.E{constructor(u){if(super(),this._onKeyPress=u=>{const Xe=u.code,Wt=u.charCode||u.keyCode;"Space"!==Xe&&"Enter"!==Xe&&32!==Wt&&13!==Wt||this.togglePopup()},this._onMapClick=u=>{const Xe=u.originalEvent.target,Wt=this._element;this._popup&&(Xe===Wt||Wt.contains(Xe))&&this.togglePopup()},this._update=u=>{var Xe;if(!this._map)return;const Wt=this._map.loaded()&&!this._map.isMoving();("terrain"===(null==u?void 0:u.type)||"render"===(null==u?void 0:u.type)&&!Wt)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?js(this._lngLat,this._flatPos,this._map.transform):null===(Xe=this._lngLat)||void 0===Xe?void 0:Xe.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let In="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?In=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(In=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let fr="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?fr="rotateX(0deg)":"map"===this._pitchAlignment&&(fr=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||u&&"moveend"!==u.type||(this._pos=this._pos.round()),r.setTransform(this._element,`${Nu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${fr} ${In}`),_r.frameAsync(new AbortController).then((()=>{this._updateOpacity(u&&"moveend"===u.type)})).catch((()=>{}))},this._onMove=u=>{if(!this._isDragging){const Xe=this._clickTolerance||this._map._clickTolerance;this._isDragging=u.point.dist(this._pointerdownPos)>=Xe}this._isDragging&&(this._pos=u.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new Xe.k("dragstart"))),this.fire(new Xe.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new Xe.k("dragend")),this._state="inactive"},this._addDragHandler=u=>{this._element.contains(u.originalEvent.target)&&(u.preventDefault(),this._positionDelta=u.point.sub(this._pos).add(this._offset),this._pointerdownPos=u.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._subpixelPositioning=u&&u.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&"auto"!==u.pitchAlignment?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(null==u?void 0:u.opacity,null==u?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=Xe.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");const Wt=r.createNS("http://www.w3.org/2000/svg","svg"),In=41,fr=27;Wt.setAttributeNS(null,"display","block"),Wt.setAttributeNS(null,"height",`${In}px`),Wt.setAttributeNS(null,"width",`${fr}px`),Wt.setAttributeNS(null,"viewBox",`0 0 ${fr} ${In}`);const _r=r.createNS("http://www.w3.org/2000/svg","g");_r.setAttributeNS(null,"stroke","none"),_r.setAttributeNS(null,"stroke-width","1"),_r.setAttributeNS(null,"fill","none"),_r.setAttributeNS(null,"fill-rule","evenodd");const wr=r.createNS("http://www.w3.org/2000/svg","g");wr.setAttributeNS(null,"fill-rule","nonzero");const Ar=r.createNS("http://www.w3.org/2000/svg","g");Ar.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Ar.setAttributeNS(null,"fill","#000000");const Kr=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const u of Kr){const Xe=r.createNS("http://www.w3.org/2000/svg","ellipse");Xe.setAttributeNS(null,"opacity","0.04"),Xe.setAttributeNS(null,"cx","10.5"),Xe.setAttributeNS(null,"cy","5.80029008"),Xe.setAttributeNS(null,"rx",u.rx),Xe.setAttributeNS(null,"ry",u.ry),Ar.appendChild(Xe)}const no=r.createNS("http://www.w3.org/2000/svg","g");no.setAttributeNS(null,"fill",this._color);const io=r.createNS("http://www.w3.org/2000/svg","path");io.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),no.appendChild(io);const oo=r.createNS("http://www.w3.org/2000/svg","g");oo.setAttributeNS(null,"opacity","0.25"),oo.setAttributeNS(null,"fill","#000000");const ao=r.createNS("http://www.w3.org/2000/svg","path");ao.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),oo.appendChild(ao);const so=r.createNS("http://www.w3.org/2000/svg","g");so.setAttributeNS(null,"transform","translate(6.0, 7.0)"),so.setAttributeNS(null,"fill","#FFFFFF");const co=r.createNS("http://www.w3.org/2000/svg","g");co.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ho=r.createNS("http://www.w3.org/2000/svg","circle");ho.setAttributeNS(null,"fill","#000000"),ho.setAttributeNS(null,"opacity","0.25"),ho.setAttributeNS(null,"cx","5.5"),ho.setAttributeNS(null,"cy","5.5"),ho.setAttributeNS(null,"r","5.4999962");const go=r.createNS("http://www.w3.org/2000/svg","circle");go.setAttributeNS(null,"fill","#FFFFFF"),go.setAttributeNS(null,"cx","5.5"),go.setAttributeNS(null,"cy","5.5"),go.setAttributeNS(null,"r","5.4999962"),co.appendChild(ho),co.appendChild(go),wr.appendChild(Ar),wr.appendChild(no),wr.appendChild(oo),wr.appendChild(so),wr.appendChild(co),Wt.appendChild(wr),Wt.setAttributeNS(null,"height",In*this._scale+"px"),Wt.setAttributeNS(null,"width",fr*this._scale+"px"),this._element.appendChild(Wt),this._offset=Xe.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(u=>{u.preventDefault()})),this._element.addEventListener("mousedown",(u=>{u.preventDefault()})),qs(this._element,this._anchor,"marker"),u&&u.className)for(const Xe of u.className.split(" "))this._element.classList.add(Xe);this._popup=null}addTo(u){return this.remove(),this._map=u,this._element.setAttribute("aria-label",u._getUIString("Marker.Title")),u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=Xe.N.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const Xe=38.1,Wt=13.5,In=Math.abs(Wt)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-Xe],"bottom-left":[In,-1*(Xe-Wt+In)],"bottom-right":[-In,-1*(Xe-Wt+In)],left:[Wt,-1*(Xe-Wt)],right:[-Wt,-1*(Xe-Wt)]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(u){return this._subpixelPositioning=u,this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var Wt,In;if(!(null===(Wt=this._map)||void 0===Wt?void 0:Wt.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}const fr=this._map,_r=fr.terrain.depthAtPoint(this._pos),wr=fr.terrain.getElevationForLngLatZoom(this._lngLat,fr.transform.tileZoom);if(fr.transform.lngLatToCameraDepth(this._lngLat,wr)-_r<.006)return void(this._element.style.opacity=this._opacity);const Ar=-this._offset.y/fr.transform._pixelPerMeter,Kr=Math.sin(fr.getPitch()*Math.PI/180)*Ar,no=fr.terrain.depthAtPoint(new Xe.P(this._pos.x,this._pos.y-this._offset.y)),io=fr.transform.lngLatToCameraDepth(this._lngLat,wr+Kr)-no>.006;(null===(In=this._popup)||void 0===In?void 0:In.isOpen())&&io&&this._popup.remove(),this._element.style.opacity=io?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=Xe.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(u){return this._draggable=!!u,this._map&&(u?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&"auto"!==u?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,Xe){return void 0===u&&void 0===Xe&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==u&&(this._opacity=u),void 0!==Xe&&(this._opacityWhenCovered=Xe),this._map&&this._updateOpacity(!0),this}}const Vu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Uu=0,qu=!1;const td={maxWidth:100,unit:"metric"};function Xs(u,Xe,Wt){const In=Wt&&Wt.maxWidth||100,fr=u._container.clientHeight/2,_r=u.unproject([0,fr]),wr=u.unproject([In,fr]),Ar=_r.distanceTo(wr);if(Wt&&"imperial"===Wt.unit){const Wt=3.2808*Ar;Wt>5280?Ks(Xe,In,Wt/5280,u._getUIString("ScaleControl.Miles")):Ks(Xe,In,Wt,u._getUIString("ScaleControl.Feet"))}else Wt&&"nautical"===Wt.unit?Ks(Xe,In,Ar/1852,u._getUIString("ScaleControl.NauticalMiles")):Ar>=1e3?Ks(Xe,In,Ar/1e3,u._getUIString("ScaleControl.Kilometers")):Ks(Xe,In,Ar,u._getUIString("ScaleControl.Meters"))}function Ks(u,Xe,Wt,In){const fr=function(u){const Xe=Math.pow(10,`${Math.floor(u)}`.length-1);let Wt=u/Xe;return Wt=Wt>=10?10:Wt>=5?5:Wt>=3?3:Wt>=2?2:Wt>=1?1:function(u){const Xe=Math.pow(10,Math.ceil(-Math.log(u)/Math.LN10));return Math.round(u*Xe)/Xe}(Wt),Xe*Wt}(Wt);u.style.width=Xe*(fr/Wt)+"px",u.innerHTML=`${fr}&nbsp;${In}`}const id={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},sd=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Qs(u){if(u){if("number"==typeof u){const Wt=Math.round(Math.abs(u)/Math.SQRT2);return{center:new Xe.P(0,0),top:new Xe.P(0,u),"top-left":new Xe.P(Wt,Wt),"top-right":new Xe.P(-Wt,Wt),bottom:new Xe.P(0,-u),"bottom-left":new Xe.P(Wt,-Wt),"bottom-right":new Xe.P(-Wt,-Wt),left:new Xe.P(u,0),right:new Xe.P(-u,0)}}if(u instanceof Xe.P||Array.isArray(u)){const Wt=Xe.P.convert(u);return{center:Wt,top:Wt,"top-left":Wt,"top-right":Wt,bottom:Wt,"bottom-left":Wt,"bottom-right":Wt,left:Wt,right:Wt}}return{center:Xe.P.convert(u.center||[0,0]),top:Xe.P.convert(u.top||[0,0]),"top-left":Xe.P.convert(u["top-left"]||[0,0]),"top-right":Xe.P.convert(u["top-right"]||[0,0]),bottom:Xe.P.convert(u.bottom||[0,0]),"bottom-left":Xe.P.convert(u["bottom-left"]||[0,0]),"bottom-right":Xe.P.convert(u["bottom-right"]||[0,0]),left:Xe.P.convert(u.left||[0,0]),right:Xe.P.convert(u.right||[0,0])}}return Qs(new Xe.P(0,0))}const ld=Wt;u.AJAXError=Xe.bh,u.Evented=Xe.E,u.LngLat=Xe.N,u.MercatorCoordinate=Xe.Z,u.Point=Xe.P,u.addProtocol=Xe.bi,u.config=Xe.a,u.removeProtocol=Xe.bj,u.AttributionControl=Es,u.BoxZoomHandler=Ua,u.CanvasSource=et,u.CooperativeGesturesHandler=vs,u.DoubleClickZoomHandler=ds,u.DragPanHandler=ms,u.DragRotateHandler=fs,u.EdgeInsets=ba,u.FullscreenControl=class extends Xe.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var u;let Xe=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;null===(u=null==Xe?void 0:Xe.shadowRoot)||void 0===u?void 0:u.fullscreenElement;)Xe=Xe.shadowRoot.fullscreenElement;Xe===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:Xe.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){r.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=r.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);r.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new Xe.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new Xe.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},u.GeoJSONSource=J,u.GeolocateControl=class extends Xe.E{constructor(u){super(),this._onSuccess=u=>{if(this._map){if(this._isOutOfMapMaxBounds(u))return this._setErrorState(),this.fire(new Xe.k("outofmaxbounds",u)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=u,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(u),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(u),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new Xe.k("geolocate",u)),this._finish()}},this._updateCamera=u=>{const Wt=new Xe.N(u.coords.longitude,u.coords.latitude),In=u.coords.accuracy,fr=this._map.getBearing(),_r=Xe.e({bearing:fr},this.options.fitBoundsOptions),wr=H.fromLngLat(Wt,In);this._map.fitBounds(wr,_r,{geolocateSource:!0})},this._updateMarker=u=>{if(u){const Wt=new Xe.N(u.coords.longitude,u.coords.latitude);this._accuracyCircleMarker.setLngLat(Wt).addTo(this._map),this._userLocationDotMarker.setLngLat(Wt).addTo(this._map),this._accuracy=u.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=u=>{if(this._map){if(this.options.trackUserLocation)if(1===u.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===u.code&&qu)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new Xe.k("error",u)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(u=>u.preventDefault())),this._geolocateButton=r.create("button","maplibregl-ctrl-geolocate",this._container),r.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=u=>{if(this._map){if(!1===u){Xe.w("Geolocation support is not available so the GeolocateControl will be disabled.");const u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)}else{const u=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Vs({element:this._dotElement}),this._circleElement=r.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Vs({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(u=>{u.geolocateSource||"ACTIVE_LOCK"!==this._watchState||u.originalEvent&&"resize"===u.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new Xe.k("trackuserlocationend")),this.fire(new Xe.k("userlocationlostfocus")))}))}},this.options=Xe.e({},Vu,u)}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return Xe._(this,arguments,void 0,(function*(u=!1){if(void 0!==Fu&&!u)return Fu;if(void 0===window.navigator.permissions)return Fu=!!window.navigator.geolocation,Fu;try{const u=yield window.navigator.permissions.query({name:"geolocation"});Fu="denied"!==u.state}catch(u){Fu=!!window.navigator.geolocation}return Fu}))}().then((u=>this._finishSetupUI(u))),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Uu=0,qu=!1}_isOutOfMapMaxBounds(u){const Xe=this._map.getMaxBounds(),Wt=u.coords;return Xe&&(Wt.longitude<Xe.getWest()||Wt.longitude>Xe.getEast()||Wt.latitude<Xe.getSouth()||Wt.latitude>Xe.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const u=this._map.getBounds(),Xe=u.getSouthEast(),Wt=u.getNorthEast(),In=Xe.distanceTo(Wt),fr=Math.ceil(this._accuracy/(In/this._map._container.clientHeight)*2);this._circleElement.style.width=`${fr}px`,this._circleElement.style.height=`${fr}px`}trigger(){if(!this._setup)return Xe.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new Xe.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Uu--,qu=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new Xe.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new Xe.k("trackuserlocationstart")),this.fire(new Xe.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Uu++,Uu>1?(u={maximumAge:6e5,timeout:0},qu=!0):(u=this.options.positionOptions,qu=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},u.Hash=Ea,u.ImageSource=Q,u.KeyboardHandler=ls,u.LngLatBounds=H,u.LogoControl=Ps,u.Map=class extends Ts{constructor(u){Xe.bf.mark(Xe.bg.create);const Wt=Object.assign(Object.assign({},Lu),u);if(null!=Wt.minZoom&&null!=Wt.maxZoom&&Wt.minZoom>Wt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=Wt.minPitch&&null!=Wt.maxPitch&&Wt.minPitch>Wt.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=Wt.minPitch&&Wt.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=Wt.maxPitch&&Wt.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Ta(Wt.minZoom,Wt.maxZoom,Wt.minPitch,Wt.maxPitch,Wt.renderWorldCopies),{bearingSnap:Wt.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Cs,this._controls=[],this._mapId=Xe.a4(),this._contextLost=u=>{u.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new Xe.k("webglcontextlost",{originalEvent:u}))},this._contextRestored=u=>{this._setupPainter(),this.resize(),this._update(),this.fire(new Xe.k("webglcontextrestored",{originalEvent:u}))},this._onMapScroll=u=>{if(u.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=Wt.interactive,this._maxTileCacheSize=Wt.maxTileCacheSize,this._maxTileCacheZoomLevels=Wt.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=!0===Wt.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=!0===Wt.preserveDrawingBuffer,this._antialias=!0===Wt.antialias,this._trackResize=!0===Wt.trackResize,this._bearingSnap=Wt.bearingSnap,this._refreshExpiredTiles=!0===Wt.refreshExpiredTiles,this._fadeDuration=Wt.fadeDuration,this._crossSourceCollisions=!0===Wt.crossSourceCollisions,this._collectResourceTiming=!0===Wt.collectResourceTiming,this._locale=Object.assign(Object.assign({},Iu),Wt.locale),this._clickTolerance=Wt.clickTolerance,this._overridePixelRatio=Wt.pixelRatio,this._maxCanvasSize=Wt.maxCanvasSize,this.transformCameraUpdate=Wt.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=!0===Wt.cancelPendingTileRequestsWhileZooming,this._imageQueueHandle=oo.addThrottleControl((()=>this.isMoving())),this._requestManager=new p(Wt.transformRequest),"string"==typeof Wt.container){if(this._container=document.getElementById(Wt.container),!this._container)throw new Error(`Container '${Wt.container}' not found.`)}else{if(!(Wt.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=Wt.container}if(Wt.maxBounds&&this.setMaxBounds(Wt.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))).on("moveend",(()=>this._update(!1))).on("zoom",(()=>this._update(!0))).on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})).once("idle",(()=>{this._idleTriggered=!0})),"undefined"!=typeof window){addEventListener("online",this._onWindowOnline,!1);let u=!1;const Xe=Ia((u=>{this._trackResize&&!this._removed&&(this.resize(u),this.redraw())}),50);this._resizeObserver=new ResizeObserver((Wt=>{u?Xe(Wt):u=!0})),this._resizeObserver.observe(this._container)}this.handlers=new ws(this,Wt),this._hash=Wt.hash&&new Ea("string"==typeof Wt.hash&&Wt.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:Wt.center,zoom:Wt.zoom,bearing:Wt.bearing,pitch:Wt.pitch}),Wt.bounds&&(this.resize(),this.fitBounds(Wt.bounds,Xe.e({},Wt.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=Wt.localIdeographFontFamily,this._validateStyle=Wt.validateStyle,Wt.style&&this.setStyle(Wt.style,{localIdeographFontFamily:Wt.localIdeographFontFamily}),Wt.attributionControl&&this.addControl(new Es("boolean"==typeof Wt.attributionControl?void 0:Wt.attributionControl)),Wt.maplibreLogo&&this.addControl(new Ps,Wt.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(u=>{this._update("style"===u.dataType),this.fire(new Xe.k(`${u.dataType}data`,u))})),this.on("dataloading",(u=>{this.fire(new Xe.k(`${u.dataType}dataloading`,u))})),this.on("dataabort",(u=>{this.fire(new Xe.k("sourcedataabort",u))}))}_getMapId(){return this._mapId}addControl(u,Wt){if(void 0===Wt&&(Wt=u.getDefaultPosition?u.getDefaultPosition():"top-right"),!u||!u.onAdd)return this.fire(new Xe.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const In=u.onAdd(this);this._controls.push(u);const fr=this._controlPositions[Wt];return-1!==Wt.indexOf("bottom")?fr.insertBefore(In,fr.firstChild):fr.appendChild(In),this}removeControl(u){if(!u||!u.onRemove)return this.fire(new Xe.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const Wt=this._controls.indexOf(u);return Wt>-1&&this._controls.splice(Wt,1),u.onRemove(this),this}hasControl(u){return this._controls.indexOf(u)>-1}calculateCameraOptionsFromTo(u,Xe,Wt,In){return null==In&&this.terrain&&(In=this.terrain.getElevationForLngLatZoom(Wt,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(u,Xe,Wt,In)}resize(u){var Wt;const In=this._containerDimensions(),fr=In[0],_r=In[1],wr=this._getClampedPixelRatio(fr,_r);if(this._resizeCanvas(fr,_r,wr),this.painter.resize(fr,_r,wr),this.painter.overLimit()){const u=this.painter.context.gl;this._maxCanvasSize=[u.drawingBufferWidth,u.drawingBufferHeight];const Xe=this._getClampedPixelRatio(fr,_r);this._resizeCanvas(fr,_r,Xe),this.painter.resize(fr,_r,Xe)}this.transform.resize(fr,_r),null===(Wt=this._requestedCameraState)||void 0===Wt||Wt.resize(fr,_r);const Ar=!this._moving;return Ar&&(this.stop(),this.fire(new Xe.k("movestart",u)).fire(new Xe.k("move",u))),this.fire(new Xe.k("resize",u)),Ar&&this.fire(new Xe.k("moveend",u)),this}_getClampedPixelRatio(u,Xe){const{0:Wt,1:In}=this._maxCanvasSize,fr=this.getPixelRatio(),_r=u*fr,wr=Xe*fr;return Math.min(_r>Wt?Wt/_r:1,wr>In?In/wr:1)*fr}getPixelRatio(){var u;return null!==(u=this._overridePixelRatio)&&void 0!==u?u:devicePixelRatio}setPixelRatio(u){this._overridePixelRatio=u,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(u){return this.transform.setMaxBounds(H.convert(u)),this._update()}setMinZoom(u){if((u=null==u?-2:u)>=-2&&u<=this.transform.maxZoom)return this.transform.minZoom=u,this._update(),this.getZoom()<u&&this.setZoom(u),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(u){if((u=null==u?22:u)>=this.transform.minZoom)return this.transform.maxZoom=u,this._update(),this.getZoom()>u&&this.setZoom(u),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(u){if((u=null==u?0:u)<0)throw new Error("minPitch must be greater than or equal to 0");if(u>=0&&u<=this.transform.maxPitch)return this.transform.minPitch=u,this._update(),this.getPitch()<u&&this.setPitch(u),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(u){if((u=null==u?60:u)>85)throw new Error("maxPitch must be less than or equal to 85");if(u>=this.transform.minPitch)return this.transform.maxPitch=u,this._update(),this.getPitch()>u&&this.setPitch(u),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(u){return this.transform.renderWorldCopies=u,this._update()}project(u){return this.transform.locationPoint(Xe.N.convert(u),this.style&&this.terrain)}unproject(u){return this.transform.pointLocation(Xe.P.convert(u),this.terrain)}isMoving(){var u;return this._moving||(null===(u=this.handlers)||void 0===u?void 0:u.isMoving())}isZooming(){var u;return this._zooming||(null===(u=this.handlers)||void 0===u?void 0:u.isZooming())}isRotating(){var u;return this._rotating||(null===(u=this.handlers)||void 0===u?void 0:u.isRotating())}_createDelegatedListener(u,Xe,Wt){if("mouseenter"===u||"mouseover"===u){let In=!1;const s=fr=>{const _r=Xe.filter((u=>this.getLayer(u))),wr=0!==_r.length?this.queryRenderedFeatures(fr.point,{layers:_r}):[];wr.length?In||(In=!0,Wt.call(this,new ka(u,this,fr.originalEvent,{features:wr}))):In=!1};return{layers:Xe,listener:Wt,delegates:{mousemove:s,mouseout:()=>{In=!1}}}}if("mouseleave"===u||"mouseout"===u){let In=!1;const s=fr=>{const _r=Xe.filter((u=>this.getLayer(u)));(0!==_r.length?this.queryRenderedFeatures(fr.point,{layers:_r}):[]).length?In=!0:In&&(In=!1,Wt.call(this,new ka(u,this,fr.originalEvent)))},o=Xe=>{In&&(In=!1,Wt.call(this,new ka(u,this,Xe.originalEvent)))};return{layers:Xe,listener:Wt,delegates:{mousemove:s,mouseout:o}}}{const a=u=>{const In=Xe.filter((u=>this.getLayer(u))),fr=0!==In.length?this.queryRenderedFeatures(u.point,{layers:In}):[];fr.length&&(u.features=fr,Wt.call(this,u),delete u.features)};return{layers:Xe,listener:Wt,delegates:{[u]:a}}}}_saveDelegatedListener(u,Xe){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[u]=this._delegatedListeners[u]||[],this._delegatedListeners[u].push(Xe)}_removeDelegatedListener(u,Xe,Wt){if(!this._delegatedListeners||!this._delegatedListeners[u])return;const In=this._delegatedListeners[u];for(let u=0;u<In.length;u++){const fr=In[u];if(fr.listener===Wt&&fr.layers.length===Xe.length&&fr.layers.every((u=>Xe.includes(u)))){for(const u in fr.delegates)this.off(u,fr.delegates[u]);return void In.splice(u,1)}}}on(u,Xe,Wt){if(void 0===Wt)return super.on(u,Xe);const In=this._createDelegatedListener(u,"string"==typeof Xe?[Xe]:Xe,Wt);this._saveDelegatedListener(u,In);for(const u in In.delegates)this.on(u,In.delegates[u]);return this}once(u,Xe,Wt){if(void 0===Wt)return super.once(u,Xe);const In="string"==typeof Xe?[Xe]:Xe,fr=this._createDelegatedListener(u,In,Wt);for(const Xe in fr.delegates){const _r=fr.delegates[Xe];fr.delegates[Xe]=(...Xe)=>{this._removeDelegatedListener(u,In,Wt),_r(...Xe)}}this._saveDelegatedListener(u,fr);for(const u in fr.delegates)this.once(u,fr.delegates[u]);return this}off(u,Xe,Wt){return void 0===Wt?super.off(u,Xe):(this._removeDelegatedListener(u,"string"==typeof Xe?[Xe]:Xe,Wt),this)}queryRenderedFeatures(u,Wt){if(!this.style)return[];let In;const fr=u instanceof Xe.P||Array.isArray(u),_r=fr?u:[[0,0],[this.transform.width,this.transform.height]];if(Wt=Wt||(fr?{}:u)||{},_r instanceof Xe.P||"number"==typeof _r[0])In=[Xe.P.convert(_r)];else{const u=Xe.P.convert(_r[0]),Wt=Xe.P.convert(_r[1]);In=[u,new Xe.P(Wt.x,u.y),Wt,new Xe.P(u.x,Wt.y),u]}return this.style.queryRenderedFeatures(In,Wt,this.transform)}querySourceFeatures(u,Xe){return this.style.querySourceFeatures(u,Xe)}setStyle(u,Wt){return!1!==(Wt=Xe.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},Wt)).diff&&Wt.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&u?(this._diffStyle(u,Wt),this):(this._localIdeographFontFamily=Wt.localIdeographFontFamily,this._updateStyle(u,Wt))}setTransformRequest(u){return this._requestManager.setTransformRequest(u),this}_getUIString(u){const Xe=this._locale[u];if(null==Xe)throw new Error(`Missing UI string '${u}'`);return Xe}_updateStyle(u,Xe){if(Xe.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(u,Xe)));const Wt=this.style&&Xe.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!u)),u?(this.style=new de(this,Xe||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof u?this.style.loadURL(u,Xe,Wt):this.style.loadJSON(u,Xe,Wt),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new de(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(u,Wt){if("string"==typeof u){const In=this._requestManager.transformRequest(u,"Style");Xe.h(In,new AbortController).then((u=>{this._updateDiff(u.data,Wt)})).catch((u=>{u&&this.fire(new Xe.j(u))}))}else"object"==typeof u&&this._updateDiff(u,Wt)}_updateDiff(u,Wt){try{this.style.setState(u,Wt)&&this._update(!0)}catch(In){Xe.w(`Unable to perform style diff: ${In.message||In.error||In}. Rebuilding the style from scratch.`),this._updateStyle(u,Wt)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():Xe.w("There is no style added to the map.")}addSource(u,Xe){return this._lazyInitEmptyStyle(),this.style.addSource(u,Xe),this._update(!0)}isSourceLoaded(u){const Wt=this.style&&this.style.sourceCaches[u];if(void 0!==Wt)return Wt.loaded();this.fire(new Xe.j(new Error(`There is no source with ID '${u}'`)))}setTerrain(u){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),u){const Wt=this.style.sourceCaches[u.source];if(!Wt)throw new Error(`cannot load terrain, because there exists no source with ID: ${u.source}`);null===this.terrain&&Wt.reload();for(const Wt in this.style._layers){const In=this.style._layers[Wt];"hillshade"===In.type&&In.source===u.source&&Xe.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Ds(this.painter,Wt,u),this.painter.renderToTexture=new Rs(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=Xe=>{"style"===Xe.dataType?this.terrain.sourceCache.freeRtt():"source"===Xe.dataType&&Xe.tile&&(Xe.sourceId!==u.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(Xe.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new Xe.k("terrain",{terrain:u})),this}getTerrain(){var u,Xe;return null!==(Xe=null===(u=this.terrain)||void 0===u?void 0:u.options)&&void 0!==Xe?Xe:null}areTilesLoaded(){const u=this.style&&this.style.sourceCaches;for(const Xe in u){const Wt=u[Xe]._tiles;for(const u in Wt){const Xe=Wt[u];if("loaded"!==Xe.state&&"errored"!==Xe.state)return!1}}return!0}removeSource(u){return this.style.removeSource(u),this._update(!0)}getSource(u){return this.style.getSource(u)}addImage(u,Wt,In={}){const{pixelRatio:fr=1,sdf:wr=!1,stretchX:Ar,stretchY:Kr,content:no,textFitWidth:io,textFitHeight:oo}=In;if(this._lazyInitEmptyStyle(),!(Wt instanceof HTMLImageElement||Xe.b(Wt))){if(void 0===Wt.width||void 0===Wt.height)return this.fire(new Xe.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:In,height:_r,data:ao}=Wt,so=Wt;return this.style.addImage(u,{data:new Xe.R({width:In,height:_r},new Uint8Array(ao)),pixelRatio:fr,stretchX:Ar,stretchY:Kr,content:no,textFitWidth:io,textFitHeight:oo,sdf:wr,version:0,userImage:so}),so.onAdd&&so.onAdd(this,u),this}}{const{width:In,height:ao,data:so}=_r.getImageData(Wt);this.style.addImage(u,{data:new Xe.R({width:In,height:ao},so),pixelRatio:fr,stretchX:Ar,stretchY:Kr,content:no,textFitWidth:io,textFitHeight:oo,sdf:wr,version:0})}}updateImage(u,Wt){const In=this.style.getImage(u);if(!In)return this.fire(new Xe.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const fr=Wt instanceof HTMLImageElement||Xe.b(Wt)?_r.getImageData(Wt):Wt,{width:wr,height:Ar,data:Kr}=fr;if(void 0===wr||void 0===Ar)return this.fire(new Xe.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(wr!==In.data.width||Ar!==In.data.height)return this.fire(new Xe.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const no=!(Wt instanceof HTMLImageElement||Xe.b(Wt));return In.data.replace(Kr,no),this.style.updateImage(u,In),this}getImage(u){return this.style.getImage(u)}hasImage(u){return u?!!this.style.getImage(u):(this.fire(new Xe.j(new Error("Missing required image id"))),!1)}removeImage(u){this.style.removeImage(u)}loadImage(u){return oo.getImage(this._requestManager.transformRequest(u,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(u,Xe){return this._lazyInitEmptyStyle(),this.style.addLayer(u,Xe),this._update(!0)}moveLayer(u,Xe){return this.style.moveLayer(u,Xe),this._update(!0)}removeLayer(u){return this.style.removeLayer(u),this._update(!0)}getLayer(u){return this.style.getLayer(u)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(u,Xe,Wt){return this.style.setLayerZoomRange(u,Xe,Wt),this._update(!0)}setFilter(u,Xe,Wt={}){return this.style.setFilter(u,Xe,Wt),this._update(!0)}getFilter(u){return this.style.getFilter(u)}setPaintProperty(u,Xe,Wt,In={}){return this.style.setPaintProperty(u,Xe,Wt,In),this._update(!0)}getPaintProperty(u,Xe){return this.style.getPaintProperty(u,Xe)}setLayoutProperty(u,Xe,Wt,In={}){return this.style.setLayoutProperty(u,Xe,Wt,In),this._update(!0)}getLayoutProperty(u,Xe){return this.style.getLayoutProperty(u,Xe)}setGlyphs(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(u,Xe),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(u,Xe,Wt={}){return this._lazyInitEmptyStyle(),this.style.addSprite(u,Xe,Wt,(u=>{u||this._update(!0)})),this}removeSprite(u){return this._lazyInitEmptyStyle(),this.style.removeSprite(u),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setSprite(u,Xe,(u=>{u||this._update(!0)})),this}setLight(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setLight(u,Xe),this._update(!0)}getLight(){return this.style.getLight()}setSky(u){return this._lazyInitEmptyStyle(),this.style.setSky(u),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(u,Xe){return this.style.setFeatureState(u,Xe),this._update()}removeFeatureState(u,Xe){return this.style.removeFeatureState(u,Xe),this._update()}getFeatureState(u){return this.style.getFeatureState(u)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let u=0,Xe=0;return this._container&&(u=this._container.clientWidth||400,Xe=this._container.clientHeight||300),[u,Xe]}_setupContainer(){const u=this._container;u.classList.add("maplibregl-map");const Xe=this._canvasContainer=r.create("div","maplibregl-canvas-container",u);this._interactive&&Xe.classList.add("maplibregl-interactive"),this._canvas=r.create("canvas","maplibregl-canvas",Xe),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const Wt=this._containerDimensions(),In=this._getClampedPixelRatio(Wt[0],Wt[1]);this._resizeCanvas(Wt[0],Wt[1],In);const fr=this._controlContainer=r.create("div","maplibregl-control-container",u),_r=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((u=>{_r[u]=r.create("div",`maplibregl-ctrl-${u} `,fr)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(u,Xe,Wt){this._canvas.width=Math.floor(Wt*u),this._canvas.height=Math.floor(Wt*Xe),this._canvas.style.width=`${u}px`,this._canvas.style.height=`${Xe}px`}_setupPainter(){const u={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let Xe=null;this._canvas.addEventListener("webglcontextcreationerror",(Wt=>{Xe={requestedAttributes:u},Wt&&(Xe.statusMessage=Wt.statusMessage,Xe.type=Wt.type)}),{once:!0});const Wt=this._canvas.getContext("webgl2",u)||this._canvas.getContext("webgl",u);if(!Wt){const u="Failed to initialize WebGL";throw Xe?(Xe.message=u,new Error(JSON.stringify(Xe))):new Error(u)}this.painter=new va(Wt,this.transform),wr.testSupport(Wt)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(u){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||u,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(u){return this._update(),this._renderTaskQueue.add(u)}_cancelRenderFrame(u){this._renderTaskQueue.remove(u)}_render(u){const Wt=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(u),this._removed)return;let In=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const u=this.transform.zoom,fr=_r.now();this.style.zoomHistory.update(u,fr);const wr=new Xe.z(u,{now:fr,fadeDuration:Wt,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ar=wr.crossFadingFactor();1===Ar&&Ar===this._crossFadingFactor||(In=!0,this._crossFadingFactor=Ar),this.style.update(wr)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,Wt,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:Wt,showPadding:this.showPadding}),this.fire(new Xe.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,Xe.bf.mark(Xe.bg.load),this.fire(new Xe.k("load"))),this.style&&(this.style.hasTransitions()||In)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const fr=this._sourcesDirty||this._styleDirty||this._placementDirty;return fr||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new Xe.k("idle")),!this._loaded||this._fullyLoaded||fr||(this._fullyLoaded=!0,Xe.bf.mark(Xe.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var u;this._hash&&this._hash.remove();for(const u of this._controls)u.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"undefined"!=typeof window&&removeEventListener("online",this._onWindowOnline,!1),oo.removeThrottleControl(this._imageQueueHandle),null===(u=this._resizeObserver)||void 0===u||u.disconnect();const Wt=this.painter.context.gl.getExtension("WEBGL_lose_context");(null==Wt?void 0:Wt.loseContext)&&Wt.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),r.remove(this._canvasContainer),r.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),Xe.bf.clearMetrics(),this._removed=!0,this.fire(new Xe.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,_r.frameAsync(this._frameRequest).then((u=>{Xe.bf.frame(u),this._frameRequest=null,this._render(u)})).catch((()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(u){this._showTileBoundaries!==u&&(this._showTileBoundaries=u,this._update())}get showPadding(){return!!this._showPadding}set showPadding(u){this._showPadding!==u&&(this._showPadding=u,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(u){this._showCollisionBoxes!==u&&(this._showCollisionBoxes=u,u?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(u){this._showOverdrawInspector!==u&&(this._showOverdrawInspector=u,this._update())}get repaint(){return!!this._repaint}set repaint(u){this._repaint!==u&&(this._repaint=u,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(u){this._vertices=u,this._update()}get version(){return zu}getCameraTargetElevation(){return this.transform.elevation}},u.MapMouseEvent=ka,u.MapTouchEvent=La,u.MapWheelEvent=Fa,u.Marker=Vs,u.NavigationControl=class{constructor(u){this._updateZoomButtons=()=>{const u=this._map.getZoom(),Xe=u===this._map.getMaxZoom(),Wt=u===this._map.getMinZoom();this._zoomInButton.disabled=Xe,this._zoomOutButton.disabled=Wt,this._zoomInButton.setAttribute("aria-disabled",Xe.toString()),this._zoomOutButton.setAttribute("aria-disabled",Wt.toString())},this._rotateCompassArrow=()=>{const u=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=u},this._setButtonTitle=(u,Xe)=>{const Wt=this._map._getUIString(`NavigationControl.${Xe}`);u.title=Wt,u.setAttribute("aria-label",Wt)},this.options=Xe.e({},Du,u),this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(u=>u.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(u=>this._map.zoomIn({},{originalEvent:u}))),r.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(u=>this._map.zoomOut({},{originalEvent:u}))),r.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})})),this._compassIcon=r.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(u){return this._map=u,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ns(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(u,Xe){const Wt=r.create("button",u,this._container);return Wt.type="button",Wt.addEventListener("click",Xe),Wt}},u.Popup=class extends Xe.E{constructor(u){super(),this.remove=()=>(this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new Xe.k("close"))),this),this._onMouseUp=u=>{this._update(u.point)},this._onMouseMove=u=>{this._update(u.point)},this._onDrag=u=>{this._update(u.point)},this._update=u=>{var Xe;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=r.create("div","maplibregl-popup",this._map.getContainer()),this._tip=r.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const u of this.options.className.split(" "))this._container.classList.add(u);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?js(this._lngLat,this._flatPos,this._map.transform):null===(Xe=this._lngLat)||void 0===Xe?void 0:Xe.wrap(),this._trackPointer&&!u)return;const Wt=this._flatPos=this._pos=this._trackPointer&&u?u:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&u?u:this._map.transform.locationPoint(this._lngLat));let In=this.options.anchor;const fr=Qs(this.options.offset);if(!In){const u=this._container.offsetWidth,Xe=this._container.offsetHeight;let _r;_r=Wt.y+fr.bottom.y<Xe?["top"]:Wt.y>this._map.transform.height-Xe?["bottom"]:[],Wt.x<u/2?_r.push("left"):Wt.x>this._map.transform.width-u/2&&_r.push("right"),In=0===_r.length?"bottom":_r.join("-")}let _r=Wt.add(fr[In]);this.options.subpixelPositioning||(_r=_r.round()),r.setTransform(this._container,`${Nu[In]} translate(${_r.x}px,${_r.y}px)`),qs(this._container,In,"popup")},this._onClose=()=>{this.remove()},this.options=Xe.e(Object.create(id),u)}addTo(u){return this._map&&this.remove(),this._map=u,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new Xe.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=Xe.N.convert(u),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const Xe=document.createDocumentFragment(),Wt=document.createElement("body");let In;for(Wt.innerHTML=u;In=Wt.firstChild,In;)Xe.appendChild(In);return this.setDOMContent(Xe)}getMaxWidth(){var u;return null===(u=this._container)||void 0===u?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_createCloseButton(){this.options.closeButton&&(this._closeButton=r.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const u=this._container.querySelector(sd);u&&u.focus()}},u.RasterDEMTileSource=K,u.RasterTileSource=X,u.ScaleControl=class{constructor(u){this._onMove=()=>{Xs(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,Xs(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},td),u)}getDefaultPosition(){return"bottom-left"}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-scale",u.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},u.ScrollZoomHandler=us,u.Style=de,u.TerrainControl=class{constructor(u){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=u}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=r.create("button","maplibregl-ctrl-terrain",this._container),r.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){r.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},u.TwoFingersTouchPitchHandler=rs,u.TwoFingersTouchRotateHandler=ss,u.TwoFingersTouchZoomHandler=is,u.TwoFingersTouchZoomRotateHandler=gs,u.VectorTileSource=$,u.VideoSource=tt,u.addSourceType=(u,Wt)=>Xe._(void 0,void 0,void 0,(function*(){if(at(u))throw new Error(`A source type called "${u}" already exists.`);((u,Xe)=>{zo[u]=Xe})(u,Wt)})),u.clearPrewarmedResources=function(){const u=ko;u&&(u.isPreloaded()&&1===u.numActive()?(u.release(go),ko=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()"))},u.getMaxParallelImageRequests=function(){return Xe.a.MAX_PARALLEL_IMAGE_REQUESTS},u.getRTLTextPluginStatus=function(){return nt().getRTLTextPluginStatus()},u.getVersion=function(){return ld},u.getWorkerCount=function(){return L.workerCount},u.getWorkerUrl=function(){return Xe.a.WORKER_URL},u.importScriptInWorkers=function(u){return j().broadcast("IS",u)},u.prewarm=function(){N().acquire(go)},u.setMaxParallelImageRequests=function(u){Xe.a.MAX_PARALLEL_IMAGE_REQUESTS=u},u.setRTLTextPlugin=function(u,Xe){return nt().setRTLTextPlugin(u,Xe)},u.setWorkerCount=function(u){L.workerCount=u},u.setWorkerUrl=function(u){Xe.a.WORKER_URL=u}})),u}()},8168:function(u,Xe,Wt){"use strict";function _extends(){return _extends=Object.assign?Object.assign.bind():function(u){for(var Xe=1;Xe<arguments.length;Xe++){var Wt=arguments[Xe];for(var In in Wt)({}).hasOwnProperty.call(Wt,In)&&(u[In]=Wt[In])}return u},_extends.apply(null,arguments)}Wt.d(Xe,{A:function(){return _extends}})},8587:function(u,Xe,Wt){"use strict";function _objectWithoutPropertiesLoose(u,Xe){if(null==u)return{};var Wt={};for(var In in u)if({}.hasOwnProperty.call(u,In)){if(Xe.includes(In))continue;Wt[In]=u[In]}return Wt}Wt.d(Xe,{A:function(){return _objectWithoutPropertiesLoose}})},4164:function(u,Xe,Wt){"use strict";function r(u){var Xe,Wt,In="";if("string"==typeof u||"number"==typeof u)In+=u;else if("object"==typeof u)if(Array.isArray(u)){var fr=u.length;for(Xe=0;Xe<fr;Xe++)u[Xe]&&(Wt=r(u[Xe]))&&(In&&(In+=" "),In+=Wt)}else for(Wt in u)u[Wt]&&(In&&(In+=" "),In+=Wt);return In}Xe.A=function clsx(){for(var u,Xe,Wt=0,In="",fr=arguments.length;Wt<fr;Wt++)(u=arguments[Wt])&&(Xe=r(u))&&(In&&(In+=" "),In+=Xe);return In}}},In={};function __webpack_require__(u){var Xe=In[u];if(void 0!==Xe)return Xe.exports;var fr=In[u]={exports:{}};return Wt[u].call(fr.exports,fr,fr.exports,__webpack_require__),fr.exports}__webpack_require__.n=function(u){var Xe=u&&u.__esModule?function(){return u.default}:function(){return u};return __webpack_require__.d(Xe,{a:Xe}),Xe},Xe=Object.getPrototypeOf?function(u){return Object.getPrototypeOf(u)}:function(u){return u.__proto__},__webpack_require__.t=function(Wt,In){if(1&In&&(Wt=this(Wt)),8&In)return Wt;if("object"==typeof Wt&&Wt){if(4&In&&Wt.__esModule)return Wt;if(16&In&&"function"==typeof Wt.then)return Wt}var fr=Object.create(null);__webpack_require__.r(fr);var _r={};u=u||[null,Xe({}),Xe([]),Xe(Xe)];for(var wr=2&In&&Wt;"object"==typeof wr&&!~u.indexOf(wr);wr=Xe(wr))Object.getOwnPropertyNames(wr).forEach((function(u){_r[u]=function(){return Wt[u]}}));return _r.default=function(){return Wt},__webpack_require__.d(fr,_r),fr},__webpack_require__.d=function(u,Xe){for(var Wt in Xe)__webpack_require__.o(Xe,Wt)&&!__webpack_require__.o(u,Wt)&&Object.defineProperty(u,Wt,{enumerable:!0,get:Xe[Wt]})},__webpack_require__.o=function(u,Xe){return Object.prototype.hasOwnProperty.call(u,Xe)},__webpack_require__.r=function(u){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})},__webpack_require__.p="https://cdn.jsdelivr.net/npm/jmapcloud-jakartowns@2.1.1/public/",function(){"use strict";var u={};function _newArrowCheck(u,Xe){if(u!==Xe)throw new TypeError("Cannot instantiate an arrow function")}__webpack_require__.r(u),__webpack_require__.d(u,{hasBrowserEnv:function(){return k_},hasStandardBrowserEnv:function(){return T_},hasStandardBrowserWebWorkerEnv:function(){return C_},navigator:function(){return A_},origin:function(){return E_}});var Xe=__webpack_require__(9898);const Wt="https://account.jakarto.com",In="https://maps.jakarto.com",fr="Jakarto";var _r;!function(u){u.JAKARTO_MAP_DESTROY_UI="JAKARTO-MAP-DESTROY-UI",u.JAKARTO_MAP_ZOOM_CHANGE="JAKARTO-MAP-ZOOM-CHANGE"}(_r||(_r={}));const wr="jakartowns-spheres-layer",Ar="jakartowns-spheres-source",Kr="https://maps.jakarto.com/tiles/data/spheres.json",no="spheres",io="https://tiles.jakarto.com/v1/wmts";var oo;!function(u){u.ALL="ALL",u.YEAR_2019="2019",u.YEAR_2020="2020",u.YEAR_2021="2021",u.YEAR_2022="2022"}(oo||(oo={}));const ao=[oo.ALL,oo.YEAR_2022,oo.YEAR_2021,oo.YEAR_2020,oo.YEAR_2019];function getAllWMTSYearVariables(){return ao.slice()}var so;!function(u){u.DEFAULT="Style de base",u.INTENSITE_MAX="Intensite maximale",u.PTS_BAS="Points les plus bas",u.INTENSITE_MAX_PTS_BAS="Intensite maximale des points bas",u.VERTICALITY="Verticalite"}(so||(so={}));const co=[so.DEFAULT,so.INTENSITE_MAX,so.PTS_BAS,so.INTENSITE_MAX_PTS_BAS,so.VERTICALITY];function getAllWMTSStyleVariables(){return co.slice()}function getDefaultLayerState(){return{isVectorLayerVisible:!0,allWMTSByYear:{[oo.YEAR_2019]:{isVisible:!1,isStyleExpanded:!1,selectedStyle:so.DEFAULT},[oo.YEAR_2020]:{isVisible:!1,isStyleExpanded:!1,selectedStyle:so.DEFAULT},[oo.YEAR_2021]:{isVisible:!1,isStyleExpanded:!1,selectedStyle:so.DEFAULT},[oo.YEAR_2022]:{isVisible:!1,isStyleExpanded:!1,selectedStyle:so.DEFAULT},[oo.ALL]:{isVisible:!0,isStyleExpanded:!1,selectedStyle:so.DEFAULT}},zoomLevel:-1}}function getDefaultViewerState(){return{parameters:{location:window.JMAP_OPTIONS?.map?.center||{x:0,y:0}},isInteractorActive:!1,isVisible:!0,isLoading:!0,isAuthenticated:!1}}var ho;!function(u){u.JAKARTO_RESET_STATE="JAKARTO_RESET_STATE",u.JAKARTO_ENABLE_STATE_EXTENSION="JAKARTO_ENABLE_STATE_EXTENSION",u.JAKARTO_VIEWER_SET_IS_INTERACTOR_ACTIVE="JAKARTO_VIEWER_SET_IS_INTERACTOR_ACTIVE",u.JAKARTO_VIEWER_SET_IS_VISIBLE="JAKARTO_VIEWER_SET_IS_VISIBLE",u.JAKARTO_VIEWER_SET_PARAMETERS="JAKARTO_VIEWER_SET_PARAMETERS",u.JAKARTO_VIEWER_SET_IS_LOADING="JAKARTO_VIEWER_SET_IS_LOADING",u.JAKARTO_VIEWER_SET_IS_AUTH="JAKARTO_VIEWER_SET_IS_AUTH",u.JAKARTO_LAYER_SET_IS_VECTOR_LAYER_VISIBLE="JAKARTO_LAYER_SET_IS_VECTOR_LAYER_VISIBLE",u.JAKARTO_LAYER_SET_WMTS_LAYER_VISIBILITY="JAKARTO_LAYER_SET_WMTS_LAYER_VISIBILITY",u.JAKARTO_LAYER_SET_WMTS_LAYER_EXPANSION="JAKARTO_LAYER_SET_WMTS_LAYER_EXPANSION",u.JAKARTO_LAYER_SELECT_WMTS_LAYER_STYLE="JAKARTO_LAYER_SELECT_WMTS_LAYER_STYLE",u.JAKARTO_LAYER_SET_ZOOM_LEVEL="JAKARTO_LAYER_SET_ZOOM_LEVEL"}(ho||(ho={}));const actions_extensionActionCreator_enableStateExtension=function(u){return{type:ho.JAKARTO_ENABLE_STATE_EXTENSION,isExtensionEnabled:u}};function store_getStore(){return JMap.getDataStore()}function getAppState(u){return u||(u=store_getStore().getState()),u.external.jmap_app}function getExtensionState(u){return u||(u=store_getStore().getState()),u.external[fr]}function getDefaultExtensionState(){return{main:{serverExtensionVersion:"unknown",isExtensionEnabled:!1},viewer:getDefaultViewerState(),layer:getDefaultLayerState()}}var go=__webpack_require__(4865),xo=__webpack_require__(7312);const noop=()=>{};let ko={},Co={},Io=null,zo={mark:noop,measure:noop};try{"undefined"!=typeof window&&(ko=window),"undefined"!=typeof document&&(Co=document),"undefined"!=typeof MutationObserver&&(Io=MutationObserver),"undefined"!=typeof performance&&(zo=performance)}catch(u){}const{userAgent:Bo=""}=ko.navigator||{},ca=ko,ua=Co,Da=Io,ns=zo,yl=(ca.document,!!ua.documentElement&&!!ua.head&&"function"==typeof ua.addEventListener&&"function"==typeof ua.createElement),vl=~Bo.indexOf("MSIE")||~Bo.indexOf("Trident/");var kl="classic",Al="duotone",Ml="sharp",Rl="sharp-duotone",Ol=[kl,Al,Ml,Rl],Ll={fak:"kit","fa-kit":"kit"},Dl={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"},Bl={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},Nl=[1,2,3,4,5,6,7,8,9,10],Vl=Nl.concat([11,12,13,14,15,16,17,18,19,20]),Ul={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},$l=[...Object.keys({classic:["fas","far","fal","fat"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds"]}),"solid","regular","light","thin","duotone","brands","2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Ul.GROUP,Ul.SWAP_OPACITY,Ul.PRIMARY,Ul.SECONDARY].concat(Nl.map((u=>"".concat(u,"x")))).concat(Vl.map((u=>"w-".concat(u)))),Wl={kit:"fak"},Zl={"kit-duotone":"fakd"};const Gl="___FONT_AWESOME___",Xl=16,Jl="svg-inline--fa",Ql="data-fa-i2svg",rc="data-fa-pseudo-element",ic="data-prefix",oc="data-icon",lc="fontawesome-i2svg",gc=["HTML","HEAD","STYLE","SCRIPT"],bc=(()=>{try{return!0}catch(u){return!1}})(),eu=[kl,Ml,Rl];function familyProxy(u){return new Proxy(u,{get:(u,Xe)=>Xe in u?u[Xe]:u[kl]})}const tu={...Bl};tu[kl]={...Bl[kl],...Ll,...Dl};const nu=familyProxy(tu),iu={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}};iu[kl]={...iu[kl],...Wl,...Zl};const su=familyProxy(iu),cu={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}};cu[kl]={...cu[kl],fak:"fa-kit"};const uu=familyProxy(cu),hu={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}};hu[kl]={...hu[kl],"fa-kit":"fak"};const Iu=familyProxy(hu),zu=/fa(s|r|l|t|d|b|k|kd|ss|sr|sl|st|sds)?[\-\ ]/,Lu="fa-layers-text",Du=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,Fu=(familyProxy({classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}}),["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"]),Nu=Ul,Vu=new Set;Object.keys(su[kl]).map(Vu.add.bind(Vu)),Object.keys(su[Ml]).map(Vu.add.bind(Vu)),Object.keys(su[Rl]).map(Vu.add.bind(Vu));const Uu=["kit",...$l],qu=ca.FontAwesomeConfig||{};if(ua&&"function"==typeof ua.querySelector){[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((u=>{let[Xe,Wt]=u;const In=function coerce(u){return""===u||"false"!==u&&("true"===u||u)}(function getAttrConfig(u){var Xe=ua.querySelector("script["+u+"]");if(Xe)return Xe.getAttribute(u)}(Xe));null!=In&&(qu[Wt]=In)}))}const td={styleDefault:"solid",familyDefault:"classic",cssPrefix:"fa",replacementClass:Jl,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};qu.familyPrefix&&(qu.cssPrefix=qu.familyPrefix);const id={...td,...qu};id.autoReplaceSvg||(id.observeMutations=!1);const sd={};Object.keys(td).forEach((u=>{Object.defineProperty(sd,u,{enumerable:!0,set:function(Xe){id[u]=Xe,ld.forEach((u=>u(sd)))},get:function(){return id[u]}})})),Object.defineProperty(sd,"familyPrefix",{enumerable:!0,set:function(u){id.cssPrefix=u,ld.forEach((u=>u(sd)))},get:function(){return id.cssPrefix}}),ca.FontAwesomeConfig=sd;const ld=[];const cd=Xl,ud={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function nextUniqueId(){let u=12,Xe="";for(;u-- >0;)Xe+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return Xe}function toArray(u){const Xe=[];for(let Wt=(u||[]).length>>>0;Wt--;)Xe[Wt]=u[Wt];return Xe}function classArray(u){return u.classList?toArray(u.classList):(u.getAttribute("class")||"").split(" ").filter((u=>u))}function htmlEscape(u){return"".concat(u).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function joinStyles(u){return Object.keys(u||{}).reduce(((Xe,Wt)=>Xe+"".concat(Wt,": ").concat(u[Wt].trim(),";")),"")}function transformIsMeaningful(u){return u.size!==ud.size||u.x!==ud.x||u.y!==ud.y||u.rotate!==ud.rotate||u.flipX||u.flipY}function css(){const u="fa",Xe=Jl,Wt=sd.cssPrefix,In=sd.replacementClass;let fr=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n animation-delay: -1ms;\n animation-duration: 1ms;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';if(Wt!==u||In!==Xe){const _r=new RegExp("\\.".concat(u,"\\-"),"g"),wr=new RegExp("\\--".concat(u,"\\-"),"g"),Ar=new RegExp("\\.".concat(Xe),"g");fr=fr.replace(_r,".".concat(Wt,"-")).replace(wr,"--".concat(Wt,"-")).replace(Ar,".".concat(In))}return fr}let dd=!1;function ensureCss(){sd.autoAddCss&&!dd&&(!function insertCss(u){if(!u||!yl)return;const Xe=ua.createElement("style");Xe.setAttribute("type","text/css"),Xe.innerHTML=u;const Wt=ua.head.childNodes;let In=null;for(let u=Wt.length-1;u>-1;u--){const Xe=Wt[u],fr=(Xe.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(fr)>-1&&(In=Xe)}return ua.head.insertBefore(Xe,In),u}(css()),dd=!0)}var md={mixout:()=>({dom:{css,insertCss:ensureCss}}),hooks:()=>({beforeDOMElementCreation(){ensureCss()},beforeI2svg(){ensureCss()}})};const yd=ca||{};yd[Gl]||(yd[Gl]={}),yd[Gl].styles||(yd[Gl].styles={}),yd[Gl].hooks||(yd[Gl].hooks={}),yd[Gl].shims||(yd[Gl].shims=[]);var _d=yd[Gl];const vd=[],listener=function(){ua.removeEventListener("DOMContentLoaded",listener),xd=1,vd.map((u=>u()))};let xd=!1;function toHtml(u){const{tag:Xe,attributes:Wt={},children:In=[]}=u;return"string"==typeof u?htmlEscape(u):"<".concat(Xe," ").concat(function joinAttributes(u){return Object.keys(u||{}).reduce(((Xe,Wt)=>Xe+"".concat(Wt,'="').concat(htmlEscape(u[Wt]),'" ')),"").trim()}(Wt),">").concat(In.map(toHtml).join(""),"</").concat(Xe,">")}function iconFromMapping(u,Xe,Wt){if(u&&u[Xe]&&u[Xe][Wt])return{prefix:Xe,iconName:Wt,icon:u[Xe][Wt]}}yl&&(xd=(ua.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(ua.readyState),xd||ua.addEventListener("DOMContentLoaded",listener));var wd=function fastReduceObject(u,Xe,Wt,In){var fr,_r,wr,Ar=Object.keys(u),Kr=Ar.length,no=void 0!==In?function bindInternal4(u,Xe){return function(Wt,In,fr,_r){return u.call(Xe,Wt,In,fr,_r)}}(Xe,In):Xe;for(void 0===Wt?(fr=1,wr=u[Ar[0]]):(fr=0,wr=Wt);fr<Kr;fr++)wr=no(wr,u[_r=Ar[fr]],_r,u);return wr};function toHex(u){const Xe=function ucs2decode(u){const Xe=[];let Wt=0;const In=u.length;for(;Wt<In;){const fr=u.charCodeAt(Wt++);if(fr>=55296&&fr<=56319&&Wt<In){const In=u.charCodeAt(Wt++);56320==(64512&In)?Xe.push(((1023&fr)<<10)+(1023&In)+65536):(Xe.push(fr),Wt--)}else Xe.push(fr)}return Xe}(u);return 1===Xe.length?Xe[0].toString(16):null}function normalizeIcons(u){return Object.keys(u).reduce(((Xe,Wt)=>{const In=u[Wt];return!!In.icon?Xe[In.iconName]=In.icon:Xe[Wt]=In,Xe}),{})}function defineIcons(u,Xe){let Wt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{skipHooks:In=!1}=Wt,fr=normalizeIcons(Xe);"function"!=typeof _d.hooks.addPack||In?_d.styles[u]={..._d.styles[u]||{},...fr}:_d.hooks.addPack(u,normalizeIcons(Xe)),"fas"===u&&defineIcons("fa",Xe)}const{styles:Sd,shims:kd}=_d,Ad={[kl]:Object.values(uu[kl]),[Ml]:Object.values(uu[Ml]),[Rl]:Object.values(uu[Rl])};let Td=null,Cd={},Ed={},Id={},Md={},Rd={};const Od={[kl]:Object.keys(nu[kl]),[Ml]:Object.keys(nu[Ml]),[Rl]:Object.keys(nu[Rl])};function getIconName(u,Xe){const Wt=Xe.split("-"),In=Wt[0],fr=Wt.slice(1).join("-");return In!==u||""===fr||function isReserved(u){return~Uu.indexOf(u)}(fr)?null:fr}const build=()=>{const lookup=u=>wd(Sd,((Xe,Wt,In)=>(Xe[In]=wd(Wt,u,{}),Xe)),{});Cd=lookup(((u,Xe,Wt)=>{if(Xe[3]&&(u[Xe[3]]=Wt),Xe[2]){Xe[2].filter((u=>"number"==typeof u)).forEach((Xe=>{u[Xe.toString(16)]=Wt}))}return u})),Ed=lookup(((u,Xe,Wt)=>{if(u[Wt]=Wt,Xe[2]){Xe[2].filter((u=>"string"==typeof u)).forEach((Xe=>{u[Xe]=Wt}))}return u})),Rd=lookup(((u,Xe,Wt)=>{const In=Xe[2];return u[Wt]=Wt,In.forEach((Xe=>{u[Xe]=Wt})),u}));const u="far"in Sd||sd.autoFetchSvg,Xe=wd(kd,((Xe,Wt)=>{const In=Wt[0];let fr=Wt[1];const _r=Wt[2];return"far"!==fr||u||(fr="fas"),"string"==typeof In&&(Xe.names[In]={prefix:fr,iconName:_r}),"number"==typeof In&&(Xe.unicodes[In.toString(16)]={prefix:fr,iconName:_r}),Xe}),{names:{},unicodes:{}});Id=Xe.names,Md=Xe.unicodes,Td=getCanonicalPrefix(sd.styleDefault,{family:sd.familyDefault})};function byUnicode(u,Xe){return(Cd[u]||{})[Xe]}function byAlias(u,Xe){return(Rd[u]||{})[Xe]}function byOldName(u){return Id[u]||{prefix:null,iconName:null}}function getDefaultUsablePrefix(){return Td}!function onChange(u){return ld.push(u),()=>{ld.splice(ld.indexOf(u),1)}}((u=>{Td=getCanonicalPrefix(u.styleDefault,{family:sd.familyDefault})})),build();function getCanonicalPrefix(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{family:Wt=kl}=Xe,In=nu[Wt][u],fr=su[Wt][u]||su[Wt][In],_r=u in _d.styles?u:null;return fr||_r||null}const Ld={[kl]:Object.keys(uu[kl]),[Ml]:Object.keys(uu[Ml]),[Rl]:Object.keys(uu[Rl])};function getCanonicalIcon(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{skipLookups:Wt=!1}=Xe,In={[kl]:"".concat(sd.cssPrefix,"-").concat(kl),[Ml]:"".concat(sd.cssPrefix,"-").concat(Ml),[Rl]:"".concat(sd.cssPrefix,"-").concat(Rl)};let fr=null,_r=kl;const wr=Ol.filter((u=>u!==Al));wr.forEach((Xe=>{(u.includes(In[Xe])||u.some((u=>Ld[Xe].includes(u))))&&(_r=Xe)}));const Ar=u.reduce(((u,Xe)=>{const Ar=getIconName(sd.cssPrefix,Xe);if(Sd[Xe]?(Xe=Ad[_r].includes(Xe)?Iu[_r][Xe]:Xe,fr=Xe,u.prefix=Xe):Od[_r].indexOf(Xe)>-1?(fr=Xe,u.prefix=getCanonicalPrefix(Xe,{family:_r})):Ar?u.iconName=Ar:Xe===sd.replacementClass||wr.some((u=>Xe===In[u]))||u.rest.push(Xe),!Wt&&u.prefix&&u.iconName){const Xe="fa"===fr?byOldName(u.iconName):{},Wt=byAlias(u.prefix,u.iconName);Xe.prefix&&(fr=null),u.iconName=Xe.iconName||Wt||u.iconName,u.prefix=Xe.prefix||u.prefix,"far"!==u.prefix||Sd.far||!Sd.fas||sd.autoFetchSvg||(u.prefix="fas")}return u}),{prefix:null,iconName:null,rest:[]});return(u.includes("fa-brands")||u.includes("fab"))&&(Ar.prefix="fab"),(u.includes("fa-duotone")||u.includes("fad"))&&(Ar.prefix="fad"),Ar.prefix||_r!==Ml||!Sd.fass&&!sd.autoFetchSvg||(Ar.prefix="fass",Ar.iconName=byAlias(Ar.prefix,Ar.iconName)||Ar.iconName),Ar.prefix||_r!==Rl||!Sd.fasds&&!sd.autoFetchSvg||(Ar.prefix="fasds",Ar.iconName=byAlias(Ar.prefix,Ar.iconName)||Ar.iconName),"fa"!==Ar.prefix&&"fa"!==fr||(Ar.prefix=getDefaultUsablePrefix()||"fas"),Ar}let Dd=[],Fd={};const Bd={},Nd=Object.keys(Bd);function chainHooks(u,Xe){for(var Wt=arguments.length,In=new Array(Wt>2?Wt-2:0),fr=2;fr<Wt;fr++)In[fr-2]=arguments[fr];return(Fd[u]||[]).forEach((u=>{Xe=u.apply(null,[Xe,...In])})),Xe}function callHooks(u){for(var Xe=arguments.length,Wt=new Array(Xe>1?Xe-1:0),In=1;In<Xe;In++)Wt[In-1]=arguments[In];(Fd[u]||[]).forEach((u=>{u.apply(null,Wt)}))}function callProvided(){const u=arguments[0],Xe=Array.prototype.slice.call(arguments,1);return Bd[u]?Bd[u].apply(null,Xe):void 0}function findIconDefinition(u){"fa"===u.prefix&&(u.prefix="fas");let{iconName:Xe}=u;const Wt=u.prefix||getDefaultUsablePrefix();if(Xe)return Xe=byAlias(Wt,Xe)||Xe,iconFromMapping(Vd.definitions,Wt,Xe)||iconFromMapping(_d.styles,Wt,Xe)}const Vd=new class Library{constructor(){this.definitions={}}add(){for(var u=arguments.length,Xe=new Array(u),Wt=0;Wt<u;Wt++)Xe[Wt]=arguments[Wt];const In=Xe.reduce(this._pullDefinitions,{});Object.keys(In).forEach((u=>{this.definitions[u]={...this.definitions[u]||{},...In[u]},defineIcons(u,In[u]);const Xe=uu[kl][u];Xe&&defineIcons(Xe,In[u]),build()}))}reset(){this.definitions={}}_pullDefinitions(u,Xe){const Wt=Xe.prefix&&Xe.iconName&&Xe.icon?{0:Xe}:Xe;return Object.keys(Wt).map((Xe=>{const{prefix:In,iconName:fr,icon:_r}=Wt[Xe],wr=_r[2];u[In]||(u[In]={}),wr.length>0&&wr.forEach((Xe=>{"string"==typeof Xe&&(u[In][Xe]=_r)})),u[In][fr]=_r})),u}},Ud={i2svg:function(){let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return yl?(callHooks("beforeI2svg",u),callProvided("pseudoElements2svg",u),callProvided("i2svg",u)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoReplaceSvgRoot:Xe}=u;!1===sd.autoReplaceSvg&&(sd.autoReplaceSvg=!0),sd.observeMutations=!0,function domready(u){yl&&(xd?setTimeout(u,0):vd.push(u))}((()=>{autoReplace({autoReplaceSvgRoot:Xe}),callHooks("watch",u)}))}},$d={icon:u=>{if(null===u)return null;if("object"==typeof u&&u.prefix&&u.iconName)return{prefix:u.prefix,iconName:byAlias(u.prefix,u.iconName)||u.iconName};if(Array.isArray(u)&&2===u.length){const Xe=0===u[1].indexOf("fa-")?u[1].slice(3):u[1],Wt=getCanonicalPrefix(u[0]);return{prefix:Wt,iconName:byAlias(Wt,Xe)||Xe}}if("string"==typeof u&&(u.indexOf("".concat(sd.cssPrefix,"-"))>-1||u.match(zu))){const Xe=getCanonicalIcon(u.split(" "),{skipLookups:!0});return{prefix:Xe.prefix||getDefaultUsablePrefix(),iconName:byAlias(Xe.prefix,Xe.iconName)||Xe.iconName}}if("string"==typeof u){const Xe=getDefaultUsablePrefix();return{prefix:Xe,iconName:byAlias(Xe,u)||u}}}},Wd={noAuto:()=>{sd.autoReplaceSvg=!1,sd.observeMutations=!1,callHooks("noAuto")},config:sd,dom:Ud,parse:$d,library:Vd,findIconDefinition,toHtml},autoReplace=function(){let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoReplaceSvgRoot:Xe=ua}=u;(Object.keys(_d.styles).length>0||sd.autoFetchSvg)&&yl&&sd.autoReplaceSvg&&Wd.dom.i2svg({node:Xe})};function domVariants(u,Xe){return Object.defineProperty(u,"abstract",{get:Xe}),Object.defineProperty(u,"html",{get:function(){return u.abstract.map((u=>toHtml(u)))}}),Object.defineProperty(u,"node",{get:function(){if(!yl)return;const Xe=ua.createElement("div");return Xe.innerHTML=u.html,Xe.children}}),u}function makeInlineSvgAbstract(u){const{icons:{main:Xe,mask:Wt},prefix:In,iconName:fr,transform:_r,symbol:wr,title:Ar,maskId:Kr,titleId:no,extra:io,watchable:oo=!1}=u,{width:ao,height:so}=Wt.found?Wt:Xe,co="fak"===In,ho=[sd.replacementClass,fr?"".concat(sd.cssPrefix,"-").concat(fr):""].filter((u=>-1===io.classes.indexOf(u))).filter((u=>""!==u||!!u)).concat(io.classes).join(" ");let go={children:[],attributes:{...io.attributes,"data-prefix":In,"data-icon":fr,class:ho,role:io.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(ao," ").concat(so)}};const xo=co&&!~io.classes.indexOf("fa-fw")?{width:"".concat(ao/so*16*.0625,"em")}:{};oo&&(go.attributes[Ql]=""),Ar&&(go.children.push({tag:"title",attributes:{id:go.attributes["aria-labelledby"]||"title-".concat(no||nextUniqueId())},children:[Ar]}),delete go.attributes.title);const ko={...go,prefix:In,iconName:fr,main:Xe,mask:Wt,maskId:Kr,transform:_r,symbol:wr,styles:{...xo,...io.styles}},{children:Co,attributes:Io}=Wt.found&&Xe.found?callProvided("generateAbstractMask",ko)||{children:[],attributes:{}}:callProvided("generateAbstractIcon",ko)||{children:[],attributes:{}};return ko.children=Co,ko.attributes=Io,wr?function asSymbol(u){let{prefix:Xe,iconName:Wt,children:In,attributes:fr,symbol:_r}=u;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:{...fr,id:!0===_r?"".concat(Xe,"-").concat(sd.cssPrefix,"-").concat(Wt):_r},children:In}]}]}(ko):function asIcon(u){let{children:Xe,main:Wt,mask:In,attributes:fr,styles:_r,transform:wr}=u;if(transformIsMeaningful(wr)&&Wt.found&&!In.found){const{width:u,height:Xe}=Wt,In={x:u/Xe/2,y:.5};fr.style=joinStyles({..._r,"transform-origin":"".concat(In.x+wr.x/16,"em ").concat(In.y+wr.y/16,"em")})}return[{tag:"svg",attributes:fr,children:Xe}]}(ko)}function makeLayersTextAbstract(u){const{content:Xe,width:Wt,height:In,transform:fr,title:_r,extra:wr,watchable:Ar=!1}=u,Kr={...wr.attributes,..._r?{title:_r}:{},class:wr.classes.join(" ")};Ar&&(Kr[Ql]="");const no={...wr.styles};transformIsMeaningful(fr)&&(no.transform=function transformForCss(u){let{transform:Xe,width:Wt=Xl,height:In=Xl,startCentered:fr=!1}=u,_r="";return _r+=fr&&vl?"translate(".concat(Xe.x/cd-Wt/2,"em, ").concat(Xe.y/cd-In/2,"em) "):fr?"translate(calc(-50% + ".concat(Xe.x/cd,"em), calc(-50% + ").concat(Xe.y/cd,"em)) "):"translate(".concat(Xe.x/cd,"em, ").concat(Xe.y/cd,"em) "),_r+="scale(".concat(Xe.size/cd*(Xe.flipX?-1:1),", ").concat(Xe.size/cd*(Xe.flipY?-1:1),") "),_r+="rotate(".concat(Xe.rotate,"deg) "),_r}({transform:fr,startCentered:!0,width:Wt,height:In}),no["-webkit-transform"]=no.transform);const io=joinStyles(no);io.length>0&&(Kr.style=io);const oo=[];return oo.push({tag:"span",attributes:Kr,children:[Xe]}),_r&&oo.push({tag:"span",attributes:{class:"sr-only"},children:[_r]}),oo}const{styles:Zd}=_d;function asFoundIcon(u){const Xe=u[0],Wt=u[1],[In]=u.slice(4);let fr=null;return fr=Array.isArray(In)?{tag:"g",attributes:{class:"".concat(sd.cssPrefix,"-").concat(Nu.GROUP)},children:[{tag:"path",attributes:{class:"".concat(sd.cssPrefix,"-").concat(Nu.SECONDARY),fill:"currentColor",d:In[0]}},{tag:"path",attributes:{class:"".concat(sd.cssPrefix,"-").concat(Nu.PRIMARY),fill:"currentColor",d:In[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:In}},{found:!0,width:Xe,height:Wt,icon:fr}}const Hd={found:!1,width:512,height:512};function findIcon(u,Xe){let Wt=Xe;return"fa"===Xe&&null!==sd.styleDefault&&(Xe=getDefaultUsablePrefix()),new Promise(((In,fr)=>{if("fa"===Wt){const Wt=byOldName(u)||{};u=Wt.iconName||u,Xe=Wt.prefix||Xe}if(u&&Xe&&Zd[Xe]&&Zd[Xe][u]){return In(asFoundIcon(Zd[Xe][u]))}!function maybeNotifyMissing(u,Xe){bc||sd.showMissingIcons||!u||console.error('Icon with name "'.concat(u,'" and prefix "').concat(Xe,'" is missing.'))}(u,Xe),In({...Hd,icon:sd.showMissingIcons&&u&&callProvided("missingIconAbstract")||{}})}))}const noop$1=()=>{},Gd=sd.measurePerformance&&ns&&ns.mark&&ns.measure?ns:{mark:noop$1,measure:noop$1},Kd='FA "6.6.0"',end=u=>{Gd.mark("".concat(Kd," ").concat(u," ends")),Gd.measure("".concat(Kd," ").concat(u),"".concat(Kd," ").concat(u," begins"),"".concat(Kd," ").concat(u," ends"))};var perf_begin=u=>(Gd.mark("".concat(Kd," ").concat(u," begins")),()=>end(u));const noop$2=()=>{};function isWatched(u){return"string"==typeof(u.getAttribute?u.getAttribute(Ql):null)}function createElementNS(u){return ua.createElementNS("http://www.w3.org/2000/svg",u)}function createElement(u){return ua.createElement(u)}function convertSVG(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{ceFn:Wt=("svg"===u.tag?createElementNS:createElement)}=Xe;if("string"==typeof u)return ua.createTextNode(u);const In=Wt(u.tag);Object.keys(u.attributes||[]).forEach((function(Xe){In.setAttribute(Xe,u.attributes[Xe])}));return(u.children||[]).forEach((function(u){In.appendChild(convertSVG(u,{ceFn:Wt}))})),In}const Xd={replace:function(u){const Xe=u[0];if(Xe.parentNode)if(u[1].forEach((u=>{Xe.parentNode.insertBefore(convertSVG(u),Xe)})),null===Xe.getAttribute(Ql)&&sd.keepOriginalSource){let u=ua.createComment(function nodeAsComment(u){let Xe=" ".concat(u.outerHTML," ");return Xe="".concat(Xe,"Font Awesome fontawesome.com "),Xe}(Xe));Xe.parentNode.replaceChild(u,Xe)}else Xe.remove()},nest:function(u){const Xe=u[0],Wt=u[1];if(~classArray(Xe).indexOf(sd.replacementClass))return Xd.replace(u);const In=new RegExp("".concat(sd.cssPrefix,"-.*"));if(delete Wt[0].attributes.id,Wt[0].attributes.class){const u=Wt[0].attributes.class.split(" ").reduce(((u,Xe)=>(Xe===sd.replacementClass||Xe.match(In)?u.toSvg.push(Xe):u.toNode.push(Xe),u)),{toNode:[],toSvg:[]});Wt[0].attributes.class=u.toSvg.join(" "),0===u.toNode.length?Xe.removeAttribute("class"):Xe.setAttribute("class",u.toNode.join(" "))}const fr=Wt.map((u=>toHtml(u))).join("\n");Xe.setAttribute(Ql,""),Xe.innerHTML=fr}};function performOperationSync(u){u()}function perform(u,Xe){const Wt="function"==typeof Xe?Xe:noop$2;if(0===u.length)Wt();else{let Xe=performOperationSync;"async"===sd.mutateApproach&&(Xe=ca.requestAnimationFrame||performOperationSync),Xe((()=>{const Xe=function getMutator(){return!0===sd.autoReplaceSvg?Xd.replace:Xd[sd.autoReplaceSvg]||Xd.replace}(),In=perf_begin("mutate");u.map(Xe),In(),Wt()}))}}let Yd=!1;function disableObservation(){Yd=!0}function enableObservation(){Yd=!1}let Jd=null;function observe(u){if(!Da)return;if(!sd.observeMutations)return;const{treeCallback:Xe=noop$2,nodeCallback:Wt=noop$2,pseudoElementsCallback:In=noop$2,observeMutationsRoot:fr=ua}=u;Jd=new Da((u=>{if(Yd)return;const fr=getDefaultUsablePrefix();toArray(u).forEach((u=>{if("childList"===u.type&&u.addedNodes.length>0&&!isWatched(u.addedNodes[0])&&(sd.searchPseudoElements&&In(u.target),Xe(u.target)),"attributes"===u.type&&u.target.parentNode&&sd.searchPseudoElements&&In(u.target.parentNode),"attributes"===u.type&&isWatched(u.target)&&~Fu.indexOf(u.attributeName))if("class"===u.attributeName&&function hasPrefixAndIcon(u){const Xe=u.getAttribute?u.getAttribute(ic):null,Wt=u.getAttribute?u.getAttribute(oc):null;return Xe&&Wt}(u.target)){const{prefix:Xe,iconName:Wt}=getCanonicalIcon(classArray(u.target));u.target.setAttribute(ic,Xe||fr),Wt&&u.target.setAttribute(oc,Wt)}else(function hasBeenReplaced(u){return u&&u.classList&&u.classList.contains&&u.classList.contains(sd.replacementClass)})(u.target)&&Wt(u.target)}))})),yl&&Jd.observe(fr,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function classParser(u){const Xe=u.getAttribute("data-prefix"),Wt=u.getAttribute("data-icon"),In=void 0!==u.innerText?u.innerText.trim():"";let fr=getCanonicalIcon(classArray(u));return fr.prefix||(fr.prefix=getDefaultUsablePrefix()),Xe&&Wt&&(fr.prefix=Xe,fr.iconName=Wt),fr.iconName&&fr.prefix||(fr.prefix&&In.length>0&&(fr.iconName=function byLigature(u,Xe){return(Ed[u]||{})[Xe]}(fr.prefix,u.innerText)||byUnicode(fr.prefix,toHex(u.innerText))),!fr.iconName&&sd.autoFetchSvg&&u.firstChild&&u.firstChild.nodeType===Node.TEXT_NODE&&(fr.iconName=u.firstChild.data)),fr}function parseMeta(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0};const{iconName:Wt,prefix:In,rest:fr}=classParser(u),_r=function attributesParser(u){const Xe=toArray(u.attributes).reduce(((u,Xe)=>("class"!==u.name&&"style"!==u.name&&(u[Xe.name]=Xe.value),u)),{}),Wt=u.getAttribute("title"),In=u.getAttribute("data-fa-title-id");return sd.autoA11y&&(Wt?Xe["aria-labelledby"]="".concat(sd.replacementClass,"-title-").concat(In||nextUniqueId()):(Xe["aria-hidden"]="true",Xe.focusable="false")),Xe}(u),wr=chainHooks("parseNodeAttributes",{},u);let Ar=Xe.styleParser?function styleParser(u){const Xe=u.getAttribute("style");let Wt=[];return Xe&&(Wt=Xe.split(";").reduce(((u,Xe)=>{const Wt=Xe.split(":"),In=Wt[0],fr=Wt.slice(1);return In&&fr.length>0&&(u[In]=fr.join(":").trim()),u}),{})),Wt}(u):[];return{iconName:Wt,title:u.getAttribute("title"),titleId:u.getAttribute("data-fa-title-id"),prefix:In,transform:ud,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:fr,styles:Ar,attributes:_r},...wr}}const{styles:Qd}=_d;function generateMutation(u){const Xe="nest"===sd.autoReplaceSvg?parseMeta(u,{styleParser:!1}):parseMeta(u);return~Xe.extra.classes.indexOf(Lu)?callProvided("generateLayersText",u,Xe):callProvided("generateSvgReplacementMutation",u,Xe)}let Rh=new Set;function onTree(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!yl)return Promise.resolve();const Wt=ua.documentElement.classList,hclAdd=u=>Wt.add("".concat(lc,"-").concat(u)),hclRemove=u=>Wt.remove("".concat(lc,"-").concat(u)),In=sd.autoFetchSvg?Rh:eu.map((u=>"fa-".concat(u))).concat(Object.keys(Qd));In.includes("fa")||In.push("fa");const fr=[".".concat(Lu,":not([").concat(Ql,"])")].concat(In.map((u=>".".concat(u,":not([").concat(Ql,"])")))).join(", ");if(0===fr.length)return Promise.resolve();let _r=[];try{_r=toArray(u.querySelectorAll(fr))}catch(u){}if(!(_r.length>0))return Promise.resolve();hclAdd("pending"),hclRemove("complete");const wr=perf_begin("onTree"),Ar=_r.reduce(((u,Xe)=>{try{const Wt=generateMutation(Xe);Wt&&u.push(Wt)}catch(u){bc||"MissingIcon"===u.name&&console.error(u)}return u}),[]);return new Promise(((u,Wt)=>{Promise.all(Ar).then((Wt=>{perform(Wt,(()=>{hclAdd("active"),hclAdd("complete"),hclRemove("pending"),"function"==typeof Xe&&Xe(),wr(),u()}))})).catch((u=>{wr(),Wt(u)}))}))}function onNode(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;generateMutation(u).then((u=>{u&&perform([u],Xe)}))}eu.map((u=>{Rh.add("fa-".concat(u))})),Object.keys(nu[kl]).map(Rh.add.bind(Rh)),Object.keys(nu[Ml]).map(Rh.add.bind(Rh)),Object.keys(nu[Rl]).map(Rh.add.bind(Rh)),Rh=[...Rh];const render=function(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:Wt=ud,symbol:In=!1,mask:fr=null,maskId:_r=null,title:wr=null,titleId:Ar=null,classes:Kr=[],attributes:no={},styles:io={}}=Xe;if(!u)return;const{prefix:oo,iconName:ao,icon:so}=u;return domVariants({type:"icon",...u},(()=>(callHooks("beforeDOMElementCreation",{iconDefinition:u,params:Xe}),sd.autoA11y&&(wr?no["aria-labelledby"]="".concat(sd.replacementClass,"-title-").concat(Ar||nextUniqueId()):(no["aria-hidden"]="true",no.focusable="false")),makeInlineSvgAbstract({icons:{main:asFoundIcon(so),mask:fr?asFoundIcon(fr.icon):{found:!1,width:null,height:null,icon:{}}},prefix:oo,iconName:ao,transform:{...ud,...Wt},symbol:In,title:wr,maskId:_r,titleId:Ar,extra:{attributes:no,styles:io,classes:Kr}}))))};var Oh={mixout(){return{icon:(u=render,function(Xe){let Wt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const In=(Xe||{}).icon?Xe:findIconDefinition(Xe||{});let{mask:fr}=Wt;return fr&&(fr=(fr||{}).icon?fr:findIconDefinition(fr||{})),u(In,{...Wt,mask:fr})})};var u},hooks:()=>({mutationObserverCallbacks:u=>(u.treeCallback=onTree,u.nodeCallback=onNode,u)}),provides(u){u.i2svg=function(u){const{node:Xe=ua,callback:Wt=()=>{}}=u;return onTree(Xe,Wt)},u.generateSvgReplacementMutation=function(u,Xe){const{iconName:Wt,title:In,titleId:fr,prefix:_r,transform:wr,symbol:Ar,mask:Kr,maskId:no,extra:io}=Xe;return new Promise(((Xe,oo)=>{Promise.all([findIcon(Wt,_r),Kr.iconName?findIcon(Kr.iconName,Kr.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then((Kr=>{let[oo,ao]=Kr;Xe([u,makeInlineSvgAbstract({icons:{main:oo,mask:ao},prefix:_r,iconName:Wt,transform:wr,symbol:Ar,maskId:no,title:In,titleId:fr,extra:io,watchable:!0})])})).catch(oo)}))},u.generateAbstractIcon=function(u){let{children:Xe,attributes:Wt,main:In,transform:fr,styles:_r}=u;const wr=joinStyles(_r);let Ar;return wr.length>0&&(Wt.style=wr),transformIsMeaningful(fr)&&(Ar=callProvided("generateAbstractTransformGrouping",{main:In,transform:fr,containerWidth:In.width,iconWidth:In.width})),Xe.push(Ar||In.icon),{children:Xe,attributes:Wt}}}},Lh={mixout:()=>({layer(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{classes:Wt=[]}=Xe;return domVariants({type:"layer"},(()=>{callHooks("beforeDOMElementCreation",{assembler:u,params:Xe});let In=[];return u((u=>{Array.isArray(u)?u.map((u=>{In=In.concat(u.abstract)})):In=In.concat(u.abstract)})),[{tag:"span",attributes:{class:["".concat(sd.cssPrefix,"-layers"),...Wt].join(" ")},children:In}]}))}})},Dh={mixout:()=>({counter(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{title:Wt=null,classes:In=[],attributes:fr={},styles:_r={}}=Xe;return domVariants({type:"counter",content:u},(()=>(callHooks("beforeDOMElementCreation",{content:u,params:Xe}),function makeLayersCounterAbstract(u){const{content:Xe,title:Wt,extra:In}=u,fr={...In.attributes,...Wt?{title:Wt}:{},class:In.classes.join(" ")},_r=joinStyles(In.styles);_r.length>0&&(fr.style=_r);const wr=[];return wr.push({tag:"span",attributes:fr,children:[Xe]}),Wt&&wr.push({tag:"span",attributes:{class:"sr-only"},children:[Wt]}),wr}({content:u.toString(),title:Wt,extra:{attributes:fr,styles:_r,classes:["".concat(sd.cssPrefix,"-layers-counter"),...In]}}))))}})},Fh={mixout:()=>({text(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:Wt=ud,title:In=null,classes:fr=[],attributes:_r={},styles:wr={}}=Xe;return domVariants({type:"text",content:u},(()=>(callHooks("beforeDOMElementCreation",{content:u,params:Xe}),makeLayersTextAbstract({content:u,transform:{...ud,...Wt},title:In,extra:{attributes:_r,styles:wr,classes:["".concat(sd.cssPrefix,"-layers-text"),...fr]}}))))}}),provides(u){u.generateLayersText=function(u,Xe){const{title:Wt,transform:In,extra:fr}=Xe;let _r=null,wr=null;if(vl){const Xe=parseInt(getComputedStyle(u).fontSize,10),Wt=u.getBoundingClientRect();_r=Wt.width/Xe,wr=Wt.height/Xe}return sd.autoA11y&&!Wt&&(fr.attributes["aria-hidden"]="true"),Promise.resolve([u,makeLayersTextAbstract({content:u.innerHTML,width:_r,height:wr,transform:In,title:Wt,extra:fr,watchable:!0})])}}};const jh=new RegExp('"',"ug"),Hh=[1105920,1112319],Gh={FontAwesome:{normal:"fas",400:"fas"},"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds"},"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"},"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},Kh=Object.keys(Gh).reduce(((u,Xe)=>(u[Xe.toLowerCase()]=Gh[Xe],u)),{}),Jh=Object.keys(Kh).reduce(((u,Xe)=>{const Wt=Kh[Xe];return u[Xe]=Wt[900]||[...Object.entries(Wt)][0][1],u}),{});function replaceForPosition(u,Xe){const Wt="".concat("data-fa-pseudo-element-pending").concat(Xe.replace(":","-"));return new Promise(((In,fr)=>{if(null!==u.getAttribute(Wt))return In();const _r=toArray(u.children).filter((u=>u.getAttribute(rc)===Xe))[0],wr=ca.getComputedStyle(u,Xe),Ar=wr.getPropertyValue("font-family"),Kr=Ar.match(Du),no=wr.getPropertyValue("font-weight"),io=wr.getPropertyValue("content");if(_r&&!Kr)return u.removeChild(_r),In();if(Kr&&"none"!==io&&""!==io){const io=wr.getPropertyValue("content");let oo=function getPrefix(u,Xe){const Wt=u.replace(/^['"]|['"]$/g,"").toLowerCase(),In=parseInt(Xe),fr=isNaN(In)?"normal":In;return(Kh[Wt]||{})[fr]||Jh[Wt]}(Ar,no);const{value:ao,isSecondary:so}=function hexValueFromContent(u){const Xe=u.replace(jh,""),Wt=function codePointAt(u,Xe){const Wt=u.length;let In,fr=u.charCodeAt(Xe);return fr>=55296&&fr<=56319&&Wt>Xe+1&&(In=u.charCodeAt(Xe+1),In>=56320&&In<=57343)?1024*(fr-55296)+In-56320+65536:fr}(Xe,0),In=Wt>=Hh[0]&&Wt<=Hh[1],fr=2===Xe.length&&Xe[0]===Xe[1];return{value:toHex(fr?Xe[0]:Xe),isSecondary:In||fr}}(io),co=Kr[0].startsWith("FontAwesome");let ho=byUnicode(oo,ao),go=ho;if(co){const u=function byOldUnicode(u){const Xe=Md[u],Wt=byUnicode("fas",u);return Xe||(Wt?{prefix:"fas",iconName:Wt}:null)||{prefix:null,iconName:null}}(ao);u.iconName&&u.prefix&&(ho=u.iconName,oo=u.prefix)}if(!ho||so||_r&&_r.getAttribute(ic)===oo&&_r.getAttribute(oc)===go)In();else{u.setAttribute(Wt,go),_r&&u.removeChild(_r);const wr=function blankMeta(){return{iconName:null,title:null,titleId:null,prefix:null,transform:ud,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}(),{extra:Ar}=wr;Ar.attributes[rc]=Xe,findIcon(ho,oo).then((fr=>{const _r=makeInlineSvgAbstract({...wr,icons:{main:fr,mask:{prefix:null,iconName:null,rest:[]}},prefix:oo,iconName:go,extra:Ar,watchable:!0}),Kr=ua.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===Xe?u.insertBefore(Kr,u.firstChild):u.appendChild(Kr),Kr.outerHTML=_r.map((u=>toHtml(u))).join("\n"),u.removeAttribute(Wt),In()})).catch(fr)}}else In()}))}function extension_replace(u){return Promise.all([replaceForPosition(u,"::before"),replaceForPosition(u,"::after")])}function processable(u){return!(u.parentNode===document.head||~gc.indexOf(u.tagName.toUpperCase())||u.getAttribute(rc)||u.parentNode&&"svg"===u.parentNode.tagName)}function searchPseudoElements(u){if(yl)return new Promise(((Xe,Wt)=>{const In=toArray(u.querySelectorAll("*")).filter(processable).map(extension_replace),fr=perf_begin("searchPseudoElements");disableObservation(),Promise.all(In).then((()=>{fr(),enableObservation(),Xe()})).catch((()=>{fr(),enableObservation(),Wt()}))}))}var Qh={hooks:()=>({mutationObserverCallbacks:u=>(u.pseudoElementsCallback=searchPseudoElements,u)}),provides(u){u.pseudoElements2svg=function(u){const{node:Xe=ua}=u;sd.searchPseudoElements&&searchPseudoElements(Xe)}}};let ep=!1;var tp={mixout:()=>({dom:{unwatch(){disableObservation(),ep=!0}}}),hooks:()=>({bootstrap(){observe(chainHooks("mutationObserverCallbacks",{}))},noAuto(){!function disconnect(){Jd&&Jd.disconnect()}()},watch(u){const{observeMutationsRoot:Xe}=u;ep?enableObservation():observe(chainHooks("mutationObserverCallbacks",{observeMutationsRoot:Xe}))}})};const parseTransformString=u=>u.toLowerCase().split(" ").reduce(((u,Xe)=>{const Wt=Xe.toLowerCase().split("-"),In=Wt[0];let fr=Wt.slice(1).join("-");if(In&&"h"===fr)return u.flipX=!0,u;if(In&&"v"===fr)return u.flipY=!0,u;if(fr=parseFloat(fr),isNaN(fr))return u;switch(In){case"grow":u.size=u.size+fr;break;case"shrink":u.size=u.size-fr;break;case"left":u.x=u.x-fr;break;case"right":u.x=u.x+fr;break;case"up":u.y=u.y-fr;break;case"down":u.y=u.y+fr;break;case"rotate":u.rotate=u.rotate+fr}return u}),{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0});var np={mixout:()=>({parse:{transform:u=>parseTransformString(u)}}),hooks:()=>({parseNodeAttributes(u,Xe){const Wt=Xe.getAttribute("data-fa-transform");return Wt&&(u.transform=parseTransformString(Wt)),u}}),provides(u){u.generateAbstractTransformGrouping=function(u){let{main:Xe,transform:Wt,containerWidth:In,iconWidth:fr}=u;const _r={transform:"translate(".concat(In/2," 256)")},wr="translate(".concat(32*Wt.x,", ").concat(32*Wt.y,") "),Ar="scale(".concat(Wt.size/16*(Wt.flipX?-1:1),", ").concat(Wt.size/16*(Wt.flipY?-1:1),") "),Kr="rotate(".concat(Wt.rotate," 0 0)"),no={transform:"".concat(wr," ").concat(Ar," ").concat(Kr)},io={transform:"translate(".concat(fr/2*-1," -256)")};return{tag:"g",attributes:{..._r},children:[{tag:"g",attributes:{...no},children:[{tag:Xe.icon.tag,children:Xe.icon.children,attributes:{...Xe.icon.attributes,...io}}]}]}}}};const rp={x:0,y:0,width:"100%",height:"100%"};function fillBlack(u){let Xe=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return u.attributes&&(u.attributes.fill||Xe)&&(u.attributes.fill="black"),u}var ip={hooks:()=>({parseNodeAttributes(u,Xe){const Wt=Xe.getAttribute("data-fa-mask"),In=Wt?getCanonicalIcon(Wt.split(" ").map((u=>u.trim()))):{prefix:null,iconName:null,rest:[]};return In.prefix||(In.prefix=getDefaultUsablePrefix()),u.mask=In,u.maskId=Xe.getAttribute("data-fa-mask-id"),u}}),provides(u){u.generateAbstractMask=function(u){let{children:Xe,attributes:Wt,main:In,mask:fr,maskId:_r,transform:wr}=u;const{width:Ar,icon:Kr}=In,{width:no,icon:io}=fr,oo=function transformForSvg(u){let{transform:Xe,containerWidth:Wt,iconWidth:In}=u;const fr={transform:"translate(".concat(Wt/2," 256)")},_r="translate(".concat(32*Xe.x,", ").concat(32*Xe.y,") "),wr="scale(".concat(Xe.size/16*(Xe.flipX?-1:1),", ").concat(Xe.size/16*(Xe.flipY?-1:1),") "),Ar="rotate(".concat(Xe.rotate," 0 0)");return{outer:fr,inner:{transform:"".concat(_r," ").concat(wr," ").concat(Ar)},path:{transform:"translate(".concat(In/2*-1," -256)")}}}({transform:wr,containerWidth:no,iconWidth:Ar}),ao={tag:"rect",attributes:{...rp,fill:"white"}},so=Kr.children?{children:Kr.children.map(fillBlack)}:{},co={tag:"g",attributes:{...oo.inner},children:[fillBlack({tag:Kr.tag,attributes:{...Kr.attributes,...oo.path},...so})]},ho={tag:"g",attributes:{...oo.outer},children:[co]},go="mask-".concat(_r||nextUniqueId()),xo="clip-".concat(_r||nextUniqueId()),ko={tag:"mask",attributes:{...rp,id:go,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"},children:[ao,ho]},Co={tag:"defs",children:[{tag:"clipPath",attributes:{id:xo},children:(Io=io,"g"===Io.tag?Io.children:[Io])},ko]};var Io;return Xe.push(Co,{tag:"rect",attributes:{fill:"currentColor","clip-path":"url(#".concat(xo,")"),mask:"url(#".concat(go,")"),...rp}}),{children:Xe,attributes:Wt}}}},op={provides(u){let Xe=!1;ca.matchMedia&&(Xe=ca.matchMedia("(prefers-reduced-motion: reduce)").matches),u.missingIconAbstract=function(){const u=[],Wt={fill:"currentColor"},In={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};u.push({tag:"path",attributes:{...Wt,d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"}});const fr={...In,attributeName:"opacity"},_r={tag:"circle",attributes:{...Wt,cx:"256",cy:"364",r:"28"},children:[]};return Xe||_r.children.push({tag:"animate",attributes:{...In,attributeName:"r",values:"28;14;28;28;14;28;"}},{tag:"animate",attributes:{...fr,values:"1;0;1;1;0;1;"}}),u.push(_r),u.push({tag:"path",attributes:{...Wt,opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"},children:Xe?[]:[{tag:"animate",attributes:{...fr,values:"1;0;0;0;0;1;"}}]}),Xe||u.push({tag:"path",attributes:{...Wt,opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"},children:[{tag:"animate",attributes:{...fr,values:"0;0;1;1;0;0;"}}]}),{tag:"g",attributes:{class:"missing"},children:u}}}};!function registerPlugins(u,Xe){let{mixoutsTo:Wt}=Xe;return Dd=u,Fd={},Object.keys(Bd).forEach((u=>{-1===Nd.indexOf(u)&&delete Bd[u]})),Dd.forEach((u=>{const Xe=u.mixout?u.mixout():{};if(Object.keys(Xe).forEach((u=>{"function"==typeof Xe[u]&&(Wt[u]=Xe[u]),"object"==typeof Xe[u]&&Object.keys(Xe[u]).forEach((In=>{Wt[u]||(Wt[u]={}),Wt[u][In]=Xe[u][In]}))})),u.hooks){const Xe=u.hooks();Object.keys(Xe).forEach((u=>{Fd[u]||(Fd[u]=[]),Fd[u].push(Xe[u])}))}u.provides&&u.provides(Bd)})),Wt}([md,Oh,Lh,Dh,Fh,Qh,tp,np,ip,op,{hooks:()=>({parseNodeAttributes(u,Xe){const Wt=Xe.getAttribute("data-fa-symbol"),In=null!==Wt&&(""===Wt||Wt);return u.symbol=In,u}})}],{mixoutsTo:Wd});const ap=Wd.parse,sp=Wd.icon;var lp=__webpack_require__(5556),cp=__webpack_require__.n(lp),dp=__webpack_require__(6540);function ownKeys(u,Xe){var Wt=Object.keys(u);if(Object.getOwnPropertySymbols){var In=Object.getOwnPropertySymbols(u);Xe&&(In=In.filter((function(Xe){return Object.getOwnPropertyDescriptor(u,Xe).enumerable}))),Wt.push.apply(Wt,In)}return Wt}function _objectSpread2(u){for(var Xe=1;Xe<arguments.length;Xe++){var Wt=null!=arguments[Xe]?arguments[Xe]:{};Xe%2?ownKeys(Object(Wt),!0).forEach((function(Xe){_defineProperty(u,Xe,Wt[Xe])})):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(Wt)):ownKeys(Object(Wt)).forEach((function(Xe){Object.defineProperty(u,Xe,Object.getOwnPropertyDescriptor(Wt,Xe))}))}return u}function _typeof(u){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},_typeof(u)}function _defineProperty(u,Xe,Wt){return Xe in u?Object.defineProperty(u,Xe,{value:Wt,enumerable:!0,configurable:!0,writable:!0}):u[Xe]=Wt,u}function _objectWithoutProperties(u,Xe){if(null==u)return{};var Wt,In,fr=function index_es_objectWithoutPropertiesLoose(u,Xe){if(null==u)return{};var Wt,In,fr={},_r=Object.keys(u);for(In=0;In<_r.length;In++)Wt=_r[In],Xe.indexOf(Wt)>=0||(fr[Wt]=u[Wt]);return fr}(u,Xe);if(Object.getOwnPropertySymbols){var _r=Object.getOwnPropertySymbols(u);for(In=0;In<_r.length;In++)Wt=_r[In],Xe.indexOf(Wt)>=0||Object.prototype.propertyIsEnumerable.call(u,Wt)&&(fr[Wt]=u[Wt])}return fr}function _toConsumableArray(u){return function _arrayWithoutHoles(u){if(Array.isArray(u))return _arrayLikeToArray(u)}(u)||function _iterableToArray(u){if("undefined"!=typeof Symbol&&null!=u[Symbol.iterator]||null!=u["@@iterator"])return Array.from(u)}(u)||function _unsupportedIterableToArray(u,Xe){if(!u)return;if("string"==typeof u)return _arrayLikeToArray(u,Xe);var Wt=Object.prototype.toString.call(u).slice(8,-1);"Object"===Wt&&u.constructor&&(Wt=u.constructor.name);if("Map"===Wt||"Set"===Wt)return Array.from(u);if("Arguments"===Wt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Wt))return _arrayLikeToArray(u,Xe)}(u)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(u,Xe){(null==Xe||Xe>u.length)&&(Xe=u.length);for(var Wt=0,In=new Array(Xe);Wt<Xe;Wt++)In[Wt]=u[Wt];return In}function camelize(u){return function _isNumerical(u){return(u-=0)==u}(u)?u:(u=u.replace(/[\-_\s]+(.)?/g,(function(u,Xe){return Xe?Xe.toUpperCase():""}))).substr(0,1).toLowerCase()+u.substr(1)}var hp=["style"];var pp=!1;try{pp=!0}catch(u){}function normalizeIconArgs(u){return u&&"object"===_typeof(u)&&u.prefix&&u.iconName&&u.icon?u:ap.icon?ap.icon(u):null===u?null:u&&"object"===_typeof(u)&&u.prefix&&u.iconName?u:Array.isArray(u)&&2===u.length?{prefix:u[0],iconName:u[1]}:"string"==typeof u?{prefix:"fas",iconName:u}:void 0}function objectWithKey(u,Xe){return Array.isArray(Xe)&&Xe.length>0||!Array.isArray(Xe)&&Xe?_defineProperty({},u,Xe):{}}var fp={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},mp=dp.forwardRef((function(u,Xe){var Wt=_objectSpread2(_objectSpread2({},fp),u),In=Wt.icon,fr=Wt.mask,_r=Wt.symbol,wr=Wt.className,Ar=Wt.title,Kr=Wt.titleId,no=Wt.maskId,io=normalizeIconArgs(In),oo=objectWithKey("classes",[].concat(_toConsumableArray(function classList(u){var Xe,Wt=u.beat,In=u.fade,fr=u.beatFade,_r=u.bounce,wr=u.shake,Ar=u.flash,Kr=u.spin,no=u.spinPulse,io=u.spinReverse,oo=u.pulse,ao=u.fixedWidth,so=u.inverse,co=u.border,ho=u.listItem,go=u.flip,xo=u.size,ko=u.rotation,Co=u.pull,Io=(_defineProperty(Xe={"fa-beat":Wt,"fa-fade":In,"fa-beat-fade":fr,"fa-bounce":_r,"fa-shake":wr,"fa-flash":Ar,"fa-spin":Kr,"fa-spin-reverse":io,"fa-spin-pulse":no,"fa-pulse":oo,"fa-fw":ao,"fa-inverse":so,"fa-border":co,"fa-li":ho,"fa-flip":!0===go,"fa-flip-horizontal":"horizontal"===go||"both"===go,"fa-flip-vertical":"vertical"===go||"both"===go},"fa-".concat(xo),null!=xo),_defineProperty(Xe,"fa-rotate-".concat(ko),null!=ko&&0!==ko),_defineProperty(Xe,"fa-pull-".concat(Co),null!=Co),_defineProperty(Xe,"fa-swap-opacity",u.swapOpacity),Xe);return Object.keys(Io).map((function(u){return Io[u]?u:null})).filter((function(u){return u}))}(Wt)),_toConsumableArray((wr||"").split(" ")))),ao=objectWithKey("transform","string"==typeof Wt.transform?ap.transform(Wt.transform):Wt.transform),so=objectWithKey("mask",normalizeIconArgs(fr)),co=sp(io,_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},oo),ao),so),{},{symbol:_r,title:Ar,titleId:Kr,maskId:no}));if(!co)return function log(){var u;!pp&&console&&"function"==typeof console.error&&(u=console).error.apply(u,arguments)}("Could not find icon",io),null;var ho=co.abstract,go={ref:Xe};return Object.keys(Wt).forEach((function(u){fp.hasOwnProperty(u)||(go[u]=Wt[u])})),gp(ho[0],go)}));mp.displayName="FontAwesomeIcon",mp.propTypes={beat:cp().bool,border:cp().bool,beatFade:cp().bool,bounce:cp().bool,className:cp().string,fade:cp().bool,flash:cp().bool,mask:cp().oneOfType([cp().object,cp().array,cp().string]),maskId:cp().string,fixedWidth:cp().bool,inverse:cp().bool,flip:cp().oneOf([!0,!1,"horizontal","vertical","both"]),icon:cp().oneOfType([cp().object,cp().array,cp().string]),listItem:cp().bool,pull:cp().oneOf(["right","left"]),pulse:cp().bool,rotation:cp().oneOf([0,90,180,270]),shake:cp().bool,size:cp().oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:cp().bool,spinPulse:cp().bool,spinReverse:cp().bool,symbol:cp().oneOfType([cp().bool,cp().string]),title:cp().string,titleId:cp().string,transform:cp().oneOfType([cp().string,cp().object]),swapOpacity:cp().bool};var gp=function convert(u,Xe){var Wt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof Xe)return Xe;var In=(Xe.children||[]).map((function(Xe){return convert(u,Xe)})),fr=Object.keys(Xe.attributes||{}).reduce((function(u,Wt){var In=Xe.attributes[Wt];switch(Wt){case"class":u.attrs.className=In,delete Xe.attributes.class;break;case"style":u.attrs.style=function styleToObject(u){return u.split(";").map((function(u){return u.trim()})).filter((function(u){return u})).reduce((function(u,Xe){var Wt=Xe.indexOf(":"),In=camelize(Xe.slice(0,Wt)),fr=Xe.slice(Wt+1).trim();return In.startsWith("webkit")?u[function capitalize(u){return u.charAt(0).toUpperCase()+u.slice(1)}(In)]=fr:u[In]=fr,u}),{})}(In);break;default:0===Wt.indexOf("aria-")||0===Wt.indexOf("data-")?u.attrs[Wt.toLowerCase()]=In:u.attrs[camelize(Wt)]=In}return u}),{attrs:{}}),_r=Wt.style,wr=void 0===_r?{}:_r,Ar=_objectWithoutProperties(Wt,hp);return fr.attrs.style=_objectSpread2(_objectSpread2({},fr.attrs.style),wr),u.apply(void 0,[Xe.tag,_objectSpread2(_objectSpread2({},fr.attrs),Ar)].concat(_toConsumableArray(In)))}.bind(null,dp.createElement),yp=__webpack_require__(8587),_p=__webpack_require__(8168),vp=__webpack_require__(4164),bp=__webpack_require__(1609),xp=__webpack_require__(5659),wp=__webpack_require__(3967),Sp=__webpack_require__(7379);var kp=__webpack_require__(8749);var Ap=function useTheme(u=null){const Wt=dp.useContext(Xe.T);return!Wt||function isObjectEmpty(u){return 0===Object.keys(u).length}(Wt)?u:Wt};const Tp=(0,kp.A)();var Cp=function useTheme_useTheme(u=Tp){return Ap(u)};function useThemeProps({props:u,name:Xe,defaultTheme:Wt,themeId:In}){let fr=Cp(Wt);In&&(fr=fr[In]||fr);const _r=function getThemeProps(u){const{theme:Xe,name:Wt,props:In}=u;return Xe&&Xe.components&&Xe.components[Wt]&&Xe.components[Wt].defaultProps?(0,Sp.A)(Xe.components[Wt].defaultProps,In):In}({theme:fr,name:Xe,props:u});return _r}var Ep=__webpack_require__(2532),Pp=__webpack_require__(1317),Ip=__webpack_require__(3571);const Mp=["ownerState"],Rp=["variants"],zp=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function shouldForwardProp(u){return"ownerState"!==u&&"theme"!==u&&"sx"!==u&&"as"!==u}const Op=(0,kp.A)(),lowercaseFirstLetter=u=>u?u.charAt(0).toLowerCase()+u.slice(1):u;function resolveTheme({defaultTheme:u,theme:Xe,themeId:Wt}){return function isEmpty(u){return 0===Object.keys(u).length}(Xe)?u:Xe[Wt]||Xe}function defaultOverridesResolver(u){return u?(Xe,Wt)=>Wt[u]:null}function processStyleArg(u,Xe){let{ownerState:Wt}=Xe,In=(0,yp.A)(Xe,Mp);const fr="function"==typeof u?u((0,_p.A)({ownerState:Wt},In)):u;if(Array.isArray(fr))return fr.flatMap((u=>processStyleArg(u,(0,_p.A)({ownerState:Wt},In))));if(fr&&"object"==typeof fr&&Array.isArray(fr.variants)){const{variants:u=[]}=fr;let Xe=(0,yp.A)(fr,Rp);return u.forEach((u=>{let fr=!0;"function"==typeof u.props?fr=u.props((0,_p.A)({ownerState:Wt},In,Wt)):Object.keys(u.props).forEach((Xe=>{(null==Wt?void 0:Wt[Xe])!==u.props[Xe]&&In[Xe]!==u.props[Xe]&&(fr=!1)})),fr&&(Array.isArray(Xe)||(Xe=[Xe]),Xe.push("function"==typeof u.style?u.style((0,_p.A)({ownerState:Wt},In,Wt)):u.style))})),Xe}return fr}const Lp=function createStyled(u={}){const{themeId:Xe,defaultTheme:Wt=Op,rootShouldForwardProp:In=shouldForwardProp,slotShouldForwardProp:fr=shouldForwardProp}=u,systemSx=u=>(0,Ip.A)((0,_p.A)({},u,{theme:resolveTheme((0,_p.A)({},u,{defaultTheme:Wt,themeId:Xe}))}));return systemSx.__mui_systemSx=!0,(u,_r={})=>{(0,Ep.internal_processStyles)(u,(u=>u.filter((u=>!(null!=u&&u.__mui_systemSx)))));const{name:wr,slot:Ar,skipVariantsResolver:Kr,skipSx:no,overridesResolver:io=defaultOverridesResolver(lowercaseFirstLetter(Ar))}=_r,oo=(0,yp.A)(_r,zp),ao=void 0!==Kr?Kr:Ar&&"Root"!==Ar&&"root"!==Ar||!1,so=no||!1;let co=shouldForwardProp;"Root"===Ar||"root"===Ar?co=In:Ar?co=fr:function isStringTag(u){return"string"==typeof u&&u.charCodeAt(0)>96}(u)&&(co=void 0);const ho=(0,Ep.default)(u,(0,_p.A)({shouldForwardProp:co,label:undefined},oo)),transformStyleArg=u=>"function"==typeof u&&u.__emotion_real!==u||(0,Pp.Q)(u)?In=>processStyleArg(u,(0,_p.A)({},In,{theme:resolveTheme({theme:In.theme,defaultTheme:Wt,themeId:Xe})})):u,muiStyledResolver=(In,...fr)=>{let _r=transformStyleArg(In);const Ar=fr?fr.map(transformStyleArg):[];wr&&io&&Ar.push((u=>{const In=resolveTheme((0,_p.A)({},u,{defaultTheme:Wt,themeId:Xe}));if(!In.components||!In.components[wr]||!In.components[wr].styleOverrides)return null;const fr=In.components[wr].styleOverrides,_r={};return Object.entries(fr).forEach((([Xe,Wt])=>{_r[Xe]=processStyleArg(Wt,(0,_p.A)({},u,{theme:In}))})),io(u,_r)})),wr&&!ao&&Ar.push((u=>{var In;const fr=resolveTheme((0,_p.A)({},u,{defaultTheme:Wt,themeId:Xe}));return processStyleArg({variants:null==fr||null==(In=fr.components)||null==(In=In[wr])?void 0:In.variants},(0,_p.A)({},u,{theme:fr}))})),so||Ar.push(systemSx);const Kr=Ar.length-fr.length;if(Array.isArray(In)&&Kr>0){const u=new Array(Kr).fill("");_r=[...In,...u],_r.raw=[...In.raw,...u]}const no=ho(_r,...Ar);return u.muiName&&(no.muiName=u.muiName),no};return ho.withConfig&&(muiStyledResolver.withConfig=ho.withConfig),muiStyledResolver}}();var Dp=Lp,Fp=__webpack_require__(4848);const Bp=["className","component","disableGutters","fixed","maxWidth","classes"],jp=(0,kp.A)(),Np=Dp("div",{name:"MuiContainer",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[`maxWidth${(0,wp.A)(String(Wt.maxWidth))}`],Wt.fixed&&Xe.fixed,Wt.disableGutters&&Xe.disableGutters]}}),useThemePropsDefault=u=>useThemeProps({props:u,name:"MuiContainer",defaultTheme:jp});var Vp=__webpack_require__(8466),Up=__webpack_require__(1848),$p=__webpack_require__(5607);const Wp=function createContainer(u={}){const{createStyledComponent:Xe=Np,useThemeProps:Wt=useThemePropsDefault,componentName:In="MuiContainer"}=u,fr=Xe((({theme:u,ownerState:Xe})=>(0,_p.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!Xe.disableGutters&&{paddingLeft:u.spacing(2),paddingRight:u.spacing(2),[u.breakpoints.up("sm")]:{paddingLeft:u.spacing(3),paddingRight:u.spacing(3)}})),(({theme:u,ownerState:Xe})=>Xe.fixed&&Object.keys(u.breakpoints.values).reduce(((Xe,Wt)=>{const In=Wt,fr=u.breakpoints.values[In];return 0!==fr&&(Xe[u.breakpoints.up(In)]={maxWidth:`${fr}${u.breakpoints.unit}`}),Xe}),{})),(({theme:u,ownerState:Xe})=>(0,_p.A)({},"xs"===Xe.maxWidth&&{[u.breakpoints.up("xs")]:{maxWidth:Math.max(u.breakpoints.values.xs,444)}},Xe.maxWidth&&"xs"!==Xe.maxWidth&&{[u.breakpoints.up(Xe.maxWidth)]:{maxWidth:`${u.breakpoints.values[Xe.maxWidth]}${u.breakpoints.unit}`}}))),_r=dp.forwardRef((function Container(u,Xe){const _r=Wt(u),{className:wr,component:Ar="div",disableGutters:Kr=!1,fixed:no=!1,maxWidth:io="lg"}=_r,oo=(0,yp.A)(_r,Bp),ao=(0,_p.A)({},_r,{component:Ar,disableGutters:Kr,fixed:no,maxWidth:io}),so=((u,Xe)=>{const{classes:Wt,fixed:In,disableGutters:fr,maxWidth:_r}=u,wr={root:["root",_r&&`maxWidth${(0,wp.A)(String(_r))}`,In&&"fixed",fr&&"disableGutters"]};return(0,xp.A)(wr,(u=>(0,bp.Ay)(Xe,u)),Wt)})(ao,In);return(0,Fp.jsx)(fr,(0,_p.A)({as:Ar,ownerState:ao,className:(0,vp.A)(so.root,wr),ref:Xe},oo))}));return _r}({createStyledComponent:(0,Up.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[`maxWidth${(0,Vp.A)(String(Wt.maxWidth))}`],Wt.fixed&&Xe.fixed,Wt.disableGutters&&Xe.disableGutters]}}),useThemeProps:u=>(0,$p.b)({props:u,name:"MuiContainer"})});var qp=Wp,Zp=__webpack_require__(771),Hp=__webpack_require__(9770),Gp=__webpack_require__(1381);var Kp=dp.createContext(void 0);function useFormControl(){return dp.useContext(Kp)}var Xp=__webpack_require__(6852),Yp=__webpack_require__(3034),Jp=__webpack_require__(1984);function _setPrototypeOf(u,Xe){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,Xe){return u.__proto__=Xe,u},_setPrototypeOf(u,Xe)}function _inheritsLoose(u,Xe){u.prototype=Object.create(Xe.prototype),u.prototype.constructor=u,_setPrototypeOf(u,Xe)}var Qp=dp.createContext(null);function getChildMapping(u,Xe){var Wt=Object.create(null);return u&&dp.Children.map(u,(function(u){return u})).forEach((function(u){Wt[u.key]=function mapper(u){return Xe&&(0,dp.isValidElement)(u)?Xe(u):u}(u)})),Wt}function getProp(u,Xe,Wt){return null!=Wt[Xe]?Wt[Xe]:u.props[Xe]}function getNextChildMapping(u,Xe,Wt){var In=getChildMapping(u.children),fr=function mergeChildMappings(u,Xe){function getValueForKey(Wt){return Wt in Xe?Xe[Wt]:u[Wt]}u=u||{},Xe=Xe||{};var Wt,In=Object.create(null),fr=[];for(var _r in u)_r in Xe?fr.length&&(In[_r]=fr,fr=[]):fr.push(_r);var wr={};for(var Ar in Xe){if(In[Ar])for(Wt=0;Wt<In[Ar].length;Wt++){var Kr=In[Ar][Wt];wr[In[Ar][Wt]]=getValueForKey(Kr)}wr[Ar]=getValueForKey(Ar)}for(Wt=0;Wt<fr.length;Wt++)wr[fr[Wt]]=getValueForKey(fr[Wt]);return wr}(Xe,In);return Object.keys(fr).forEach((function(_r){var wr=fr[_r];if((0,dp.isValidElement)(wr)){var Ar=_r in Xe,Kr=_r in In,no=Xe[_r],io=(0,dp.isValidElement)(no)&&!no.props.in;!Kr||Ar&&!io?Kr||!Ar||io?Kr&&Ar&&(0,dp.isValidElement)(no)&&(fr[_r]=(0,dp.cloneElement)(wr,{onExited:Wt.bind(null,wr),in:no.props.in,exit:getProp(wr,"exit",u),enter:getProp(wr,"enter",u)})):fr[_r]=(0,dp.cloneElement)(wr,{in:!1}):fr[_r]=(0,dp.cloneElement)(wr,{onExited:Wt.bind(null,wr),in:!0,exit:getProp(wr,"exit",u),enter:getProp(wr,"enter",u)})}})),fr}var ef=Object.values||function(u){return Object.keys(u).map((function(Xe){return u[Xe]}))},rf=function(u){function TransitionGroup(Xe,Wt){var In,fr=(In=u.call(this,Xe,Wt)||this).handleExited.bind(function _assertThisInitialized(u){if(void 0===u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(In));return In.state={contextValue:{isMounting:!0},handleExited:fr,firstRender:!0},In}_inheritsLoose(TransitionGroup,u);var Xe=TransitionGroup.prototype;return Xe.componentDidMount=function componentDidMount(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},Xe.componentWillUnmount=function componentWillUnmount(){this.mounted=!1},TransitionGroup.getDerivedStateFromProps=function getDerivedStateFromProps(u,Xe){var Wt,In,fr=Xe.children,_r=Xe.handleExited;return{children:Xe.firstRender?(Wt=u,In=_r,getChildMapping(Wt.children,(function(u){return(0,dp.cloneElement)(u,{onExited:In.bind(null,u),in:!0,appear:getProp(u,"appear",Wt),enter:getProp(u,"enter",Wt),exit:getProp(u,"exit",Wt)})}))):getNextChildMapping(u,fr,_r),firstRender:!1}},Xe.handleExited=function handleExited(u,Xe){var Wt=getChildMapping(this.props.children);u.key in Wt||(u.props.onExited&&u.props.onExited(Xe),this.mounted&&this.setState((function(Xe){var Wt=(0,_p.A)({},Xe.children);return delete Wt[u.key],{children:Wt}})))},Xe.render=function render(){var u=this.props,Xe=u.component,Wt=u.childFactory,In=(0,yp.A)(u,["component","childFactory"]),fr=this.state.contextValue,_r=ef(this.state.children).map(Wt);return delete In.appear,delete In.enter,delete In.exit,null===Xe?dp.createElement(Qp.Provider,{value:fr},_r):dp.createElement(Qp.Provider,{value:fr},dp.createElement(Xe,In,_r))},TransitionGroup}(dp.Component);rf.propTypes={},rf.defaultProps={component:"div",childFactory:function childFactory(u){return u}};var of=rf,af=__webpack_require__(7437),lf=__webpack_require__(3068);var cf=function Ripple(u){const{className:Xe,classes:Wt,pulsate:In=!1,rippleX:fr,rippleY:_r,rippleSize:wr,in:Ar,onExited:Kr,timeout:no}=u,[io,oo]=dp.useState(!1),ao=(0,vp.A)(Xe,Wt.ripple,Wt.rippleVisible,In&&Wt.ripplePulsate),so={width:wr,height:wr,top:-wr/2+_r,left:-wr/2+fr},co=(0,vp.A)(Wt.child,io&&Wt.childLeaving,In&&Wt.childPulsate);return Ar||io||oo(!0),dp.useEffect((()=>{if(!Ar&&null!=Kr){const u=setTimeout(Kr,no);return()=>{clearTimeout(u)}}}),[Kr,Ar,no]),(0,Fp.jsx)("span",{className:ao,style:so,children:(0,Fp.jsx)("span",{className:co})})},uf=__webpack_require__(8413);var df=(0,uf.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const hf=["center","classes","className"];let mf,gf,yf,_f,_=u=>u;const bf=(0,af.i7)(mf||(mf=_`
2
+ 0% {
3
+ transform: scale(0);
4
+ opacity: 0.1;
5
+ }
6
+
7
+ 100% {
8
+ transform: scale(1);
9
+ opacity: 0.3;
10
+ }
11
+ `)),xf=(0,af.i7)(gf||(gf=_`
12
+ 0% {
13
+ opacity: 1;
14
+ }
15
+
16
+ 100% {
17
+ opacity: 0;
18
+ }
19
+ `)),Sf=(0,af.i7)(yf||(yf=_`
20
+ 0% {
21
+ transform: scale(1);
22
+ }
23
+
24
+ 50% {
25
+ transform: scale(0.92);
26
+ }
27
+
28
+ 100% {
29
+ transform: scale(1);
30
+ }
31
+ `)),kf=(0,Up.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Tf=(0,Up.Ay)(cf,{name:"MuiTouchRipple",slot:"Ripple"})(_f||(_f=_`
32
+ opacity: 0;
33
+ position: absolute;
34
+
35
+ &.${0} {
36
+ opacity: 0.3;
37
+ transform: scale(1);
38
+ animation-name: ${0};
39
+ animation-duration: ${0}ms;
40
+ animation-timing-function: ${0};
41
+ }
42
+
43
+ &.${0} {
44
+ animation-duration: ${0}ms;
45
+ }
46
+
47
+ & .${0} {
48
+ opacity: 1;
49
+ display: block;
50
+ width: 100%;
51
+ height: 100%;
52
+ border-radius: 50%;
53
+ background-color: currentColor;
54
+ }
55
+
56
+ & .${0} {
57
+ opacity: 0;
58
+ animation-name: ${0};
59
+ animation-duration: ${0}ms;
60
+ animation-timing-function: ${0};
61
+ }
62
+
63
+ & .${0} {
64
+ position: absolute;
65
+ /* @noflip */
66
+ left: 0px;
67
+ top: 0;
68
+ animation-name: ${0};
69
+ animation-duration: 2500ms;
70
+ animation-timing-function: ${0};
71
+ animation-iteration-count: infinite;
72
+ animation-delay: 200ms;
73
+ }
74
+ `),df.rippleVisible,bf,550,(({theme:u})=>u.transitions.easing.easeInOut),df.ripplePulsate,(({theme:u})=>u.transitions.duration.shorter),df.child,df.childLeaving,xf,550,(({theme:u})=>u.transitions.easing.easeInOut),df.childPulsate,Sf,(({theme:u})=>u.transitions.easing.easeInOut)),Cf=dp.forwardRef((function TouchRipple(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiTouchRipple"}),{center:In=!1,classes:fr={},className:_r}=Wt,wr=(0,yp.A)(Wt,hf),[Ar,Kr]=dp.useState([]),no=dp.useRef(0),io=dp.useRef(null);dp.useEffect((()=>{io.current&&(io.current(),io.current=null)}),[Ar]);const oo=dp.useRef(!1),ao=(0,lf.A)(),so=dp.useRef(null),co=dp.useRef(null),ho=dp.useCallback((u=>{const{pulsate:Xe,rippleX:Wt,rippleY:In,rippleSize:_r,cb:wr}=u;Kr((u=>[...u,(0,Fp.jsx)(Tf,{classes:{ripple:(0,vp.A)(fr.ripple,df.ripple),rippleVisible:(0,vp.A)(fr.rippleVisible,df.rippleVisible),ripplePulsate:(0,vp.A)(fr.ripplePulsate,df.ripplePulsate),child:(0,vp.A)(fr.child,df.child),childLeaving:(0,vp.A)(fr.childLeaving,df.childLeaving),childPulsate:(0,vp.A)(fr.childPulsate,df.childPulsate)},timeout:550,pulsate:Xe,rippleX:Wt,rippleY:In,rippleSize:_r},no.current)])),no.current+=1,io.current=wr}),[fr]),go=dp.useCallback(((u={},Xe={},Wt=()=>{})=>{const{pulsate:fr=!1,center:_r=In||Xe.pulsate,fakeElement:wr=!1}=Xe;if("mousedown"===(null==u?void 0:u.type)&&oo.current)return void(oo.current=!1);"touchstart"===(null==u?void 0:u.type)&&(oo.current=!0);const Ar=wr?null:co.current,Kr=Ar?Ar.getBoundingClientRect():{width:0,height:0,left:0,top:0};let no,io,go;if(_r||void 0===u||0===u.clientX&&0===u.clientY||!u.clientX&&!u.touches)no=Math.round(Kr.width/2),io=Math.round(Kr.height/2);else{const{clientX:Xe,clientY:Wt}=u.touches&&u.touches.length>0?u.touches[0]:u;no=Math.round(Xe-Kr.left),io=Math.round(Wt-Kr.top)}if(_r)go=Math.sqrt((2*Kr.width**2+Kr.height**2)/3),go%2==0&&(go+=1);else{const u=2*Math.max(Math.abs((Ar?Ar.clientWidth:0)-no),no)+2,Xe=2*Math.max(Math.abs((Ar?Ar.clientHeight:0)-io),io)+2;go=Math.sqrt(u**2+Xe**2)}null!=u&&u.touches?null===so.current&&(so.current=()=>{ho({pulsate:fr,rippleX:no,rippleY:io,rippleSize:go,cb:Wt})},ao.start(80,(()=>{so.current&&(so.current(),so.current=null)}))):ho({pulsate:fr,rippleX:no,rippleY:io,rippleSize:go,cb:Wt})}),[In,ho,ao]),xo=dp.useCallback((()=>{go({},{pulsate:!0})}),[go]),ko=dp.useCallback(((u,Xe)=>{if(ao.clear(),"touchend"===(null==u?void 0:u.type)&&so.current)return so.current(),so.current=null,void ao.start(0,(()=>{ko(u,Xe)}));so.current=null,Kr((u=>u.length>0?u.slice(1):u)),io.current=Xe}),[ao]);return dp.useImperativeHandle(Xe,(()=>({pulsate:xo,start:go,stop:ko})),[xo,go,ko]),(0,Fp.jsx)(kf,(0,_p.A)({className:(0,vp.A)(df.root,fr.root,_r),ref:co},wr,{children:(0,Fp.jsx)(of,{component:null,exit:!0,children:Ar})}))}));var Pf=Cf;function getButtonBaseUtilityClass(u){return(0,bp.Ay)("MuiButtonBase",u)}var Rf=(0,uf.A)("MuiButtonBase",["root","disabled","focusVisible"]);const Of=["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"],Df=(0,Up.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(u,Xe)=>Xe.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"},[`&.${Rf.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ff=dp.forwardRef((function ButtonBase(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiButtonBase"}),{action:In,centerRipple:fr=!1,children:_r,className:wr,component:Ar="button",disabled:Kr=!1,disableRipple:no=!1,disableTouchRipple:io=!1,focusRipple:oo=!1,LinkComponent:ao="a",onBlur:so,onClick:co,onContextMenu:ho,onDragLeave:go,onFocus:xo,onFocusVisible:ko,onKeyDown:Co,onKeyUp:Io,onMouseDown:zo,onMouseLeave:Bo,onMouseUp:ca,onTouchEnd:ua,onTouchMove:Da,onTouchStart:ns,tabIndex:yl=0,TouchRippleProps:vl,touchRippleRef:kl,type:Al}=Wt,Ml=(0,yp.A)(Wt,Of),Rl=dp.useRef(null),Ol=dp.useRef(null),Ll=(0,Xp.A)(Ol,kl),{isFocusVisibleRef:Dl,onFocus:Bl,onBlur:Nl,ref:Vl}=(0,Jp.A)(),[Ul,$l]=dp.useState(!1);Kr&&Ul&&$l(!1),dp.useImperativeHandle(In,(()=>({focusVisible:()=>{$l(!0),Rl.current.focus()}})),[]);const[Wl,Zl]=dp.useState(!1);dp.useEffect((()=>{Zl(!0)}),[]);const Gl=Wl&&!no&&!Kr;function useRippleHandler(u,Xe,Wt=io){return(0,Yp.A)((In=>{Xe&&Xe(In);return!Wt&&Ol.current&&Ol.current[u](In),!0}))}dp.useEffect((()=>{Ul&&oo&&!no&&Wl&&Ol.current.pulsate()}),[no,oo,Ul,Wl]);const Xl=useRippleHandler("start",zo),Jl=useRippleHandler("stop",ho),Ql=useRippleHandler("stop",go),rc=useRippleHandler("stop",ca),ic=useRippleHandler("stop",(u=>{Ul&&u.preventDefault(),Bo&&Bo(u)})),oc=useRippleHandler("start",ns),lc=useRippleHandler("stop",ua),gc=useRippleHandler("stop",Da),bc=useRippleHandler("stop",(u=>{Nl(u),!1===Dl.current&&$l(!1),so&&so(u)}),!1),eu=(0,Yp.A)((u=>{Rl.current||(Rl.current=u.currentTarget),Bl(u),!0===Dl.current&&($l(!0),ko&&ko(u)),xo&&xo(u)})),isNonNativeButton=()=>{const u=Rl.current;return Ar&&"button"!==Ar&&!("A"===u.tagName&&u.href)},tu=dp.useRef(!1),nu=(0,Yp.A)((u=>{oo&&!tu.current&&Ul&&Ol.current&&" "===u.key&&(tu.current=!0,Ol.current.stop(u,(()=>{Ol.current.start(u)}))),u.target===u.currentTarget&&isNonNativeButton()&&" "===u.key&&u.preventDefault(),Co&&Co(u),u.target===u.currentTarget&&isNonNativeButton()&&"Enter"===u.key&&!Kr&&(u.preventDefault(),co&&co(u))})),iu=(0,Yp.A)((u=>{oo&&" "===u.key&&Ol.current&&Ul&&!u.defaultPrevented&&(tu.current=!1,Ol.current.stop(u,(()=>{Ol.current.pulsate(u)}))),Io&&Io(u),co&&u.target===u.currentTarget&&isNonNativeButton()&&" "===u.key&&!u.defaultPrevented&&co(u)}));let su=Ar;"button"===su&&(Ml.href||Ml.to)&&(su=ao);const cu={};"button"===su?(cu.type=void 0===Al?"button":Al,cu.disabled=Kr):(Ml.href||Ml.to||(cu.role="button"),Kr&&(cu["aria-disabled"]=Kr));const uu=(0,Xp.A)(Xe,Vl,Rl);const hu=(0,_p.A)({},Wt,{centerRipple:fr,component:Ar,disabled:Kr,disableRipple:no,disableTouchRipple:io,focusRipple:oo,tabIndex:yl,focusVisible:Ul}),Iu=(u=>{const{disabled:Xe,focusVisible:Wt,focusVisibleClassName:In,classes:fr}=u,_r={root:["root",Xe&&"disabled",Wt&&"focusVisible"]},wr=(0,xp.A)(_r,getButtonBaseUtilityClass,fr);return Wt&&In&&(wr.root+=` ${In}`),wr})(hu);return(0,Fp.jsxs)(Df,(0,_p.A)({as:su,className:(0,vp.A)(Iu.root,wr),ownerState:hu,onBlur:bc,onClick:co,onContextMenu:Jl,onFocus:eu,onKeyDown:nu,onKeyUp:iu,onMouseDown:Xl,onMouseLeave:ic,onMouseUp:rc,onDragLeave:Ql,onTouchEnd:lc,onTouchMove:gc,onTouchStart:oc,ref:uu,tabIndex:Kr?-1:yl,type:Al},cu,Ml,{children:[_r,Gl?(0,Fp.jsx)(Pf,(0,_p.A)({ref:Ll,center:fr},vl)):null]}))}));var jf=Ff;function getSwitchBaseUtilityClass(u){return(0,bp.Ay)("PrivateSwitchBase",u)}(0,uf.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Nf=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Vf=(0,Up.Ay)(jf)((({ownerState:u})=>(0,_p.A)({padding:9,borderRadius:"50%"},"start"===u.edge&&{marginLeft:"small"===u.size?-3:-12},"end"===u.edge&&{marginRight:"small"===u.size?-3:-12}))),Wf=(0,Up.Ay)("input",{shouldForwardProp:Hp.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Hf=dp.forwardRef((function SwitchBase(u,Xe){const{autoFocus:Wt,checked:In,checkedIcon:fr,className:_r,defaultChecked:wr,disabled:Ar,disableFocusRipple:Kr=!1,edge:no=!1,icon:io,id:oo,inputProps:ao,inputRef:so,name:co,onBlur:ho,onChange:go,onFocus:xo,readOnly:ko,required:Co=!1,tabIndex:Io,type:zo,value:Bo}=u,ca=(0,yp.A)(u,Nf),[ua,Da]=(0,Gp.A)({controlled:In,default:Boolean(wr),name:"SwitchBase",state:"checked"}),ns=useFormControl();let yl=Ar;ns&&void 0===yl&&(yl=ns.disabled);const vl="checkbox"===zo||"radio"===zo,kl=(0,_p.A)({},u,{checked:ua,disabled:yl,disableFocusRipple:Kr,edge:no}),Al=(u=>{const{classes:Xe,checked:Wt,disabled:In,edge:fr}=u,_r={root:["root",Wt&&"checked",In&&"disabled",fr&&`edge${(0,Vp.A)(fr)}`],input:["input"]};return(0,xp.A)(_r,getSwitchBaseUtilityClass,Xe)})(kl);return(0,Fp.jsxs)(Vf,(0,_p.A)({component:"span",className:(0,vp.A)(Al.root,_r),centerRipple:!0,focusRipple:!Kr,disabled:yl,tabIndex:null,role:void 0,onFocus:u=>{xo&&xo(u),ns&&ns.onFocus&&ns.onFocus(u)},onBlur:u=>{ho&&ho(u),ns&&ns.onBlur&&ns.onBlur(u)},ownerState:kl,ref:Xe},ca,{children:[(0,Fp.jsx)(Wf,(0,_p.A)({autoFocus:Wt,checked:In,defaultChecked:wr,className:Al.input,disabled:yl,id:vl?oo:void 0,name:co,onChange:u=>{if(u.nativeEvent.defaultPrevented)return;const Xe=u.target.checked;Da(Xe),go&&go(u,Xe)},readOnly:ko,ref:so,required:Co,ownerState:kl,tabIndex:Io,type:zo},"checkbox"===zo&&void 0===Bo?{}:{value:Bo},ao)),ua?fr:io]}))}));var Gf=Hf;function getSwitchUtilityClass(u){return(0,bp.Ay)("MuiSwitch",u)}var Xf=(0,uf.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);const Jf=["className","color","edge","size","sx"],Qf=(0,Up.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.edge&&Xe[`edge${(0,Vp.A)(Wt.edge)}`],Xe[`size${(0,Vp.A)(Wt.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,[`& .${Xf.thumb}`]:{width:16,height:16},[`& .${Xf.switchBase}`]:{padding:4,[`&.${Xf.checked}`]:{transform:"translateX(16px)"}}}}]}),em=(0,Up.Ay)(Gf,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.switchBase,{[`& .${Xf.input}`]:Xe.input},"default"!==Wt.color&&Xe[`color${(0,Vp.A)(Wt.color)}`]]}})((({theme:u})=>({position:"absolute",top:0,left:0,zIndex:1,color:u.vars?u.vars.palette.Switch.defaultColor:`${"light"===u.palette.mode?u.palette.common.white:u.palette.grey[300]}`,transition:u.transitions.create(["left","transform"],{duration:u.transitions.duration.shortest}),[`&.${Xf.checked}`]:{transform:"translateX(20px)"},[`&.${Xf.disabled}`]:{color:u.vars?u.vars.palette.Switch.defaultDisabledColor:`${"light"===u.palette.mode?u.palette.grey[100]:u.palette.grey[600]}`},[`&.${Xf.checked} + .${Xf.track}`]:{opacity:.5},[`&.${Xf.disabled} + .${Xf.track}`]:{opacity:u.vars?u.vars.opacity.switchTrackDisabled:""+("light"===u.palette.mode?.12:.2)},[`& .${Xf.input}`]:{left:"-100%",width:"300%"}})),(({theme:u})=>({"&:hover":{backgroundColor:u.vars?`rgba(${u.vars.palette.action.activeChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette.action.active,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(u.palette).filter((([,u])=>u.main&&u.light)).map((([Xe])=>({props:{color:Xe},style:{[`&.${Xf.checked}`]:{color:(u.vars||u).palette[Xe].main,"&:hover":{backgroundColor:u.vars?`rgba(${u.vars.palette[Xe].mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette[Xe].main,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Xf.disabled}`]:{color:u.vars?u.vars.palette.Switch[`${Xe}DisabledColor`]:`${"light"===u.palette.mode?(0,Zp.a)(u.palette[Xe].main,.62):(0,Zp.e$)(u.palette[Xe].main,.55)}`}},[`&.${Xf.checked} + .${Xf.track}`]:{backgroundColor:(u.vars||u).palette[Xe].main}}})))]}))),tm=(0,Up.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(u,Xe)=>Xe.track})((({theme:u})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:u.transitions.create(["opacity","background-color"],{duration:u.transitions.duration.shortest}),backgroundColor:u.vars?u.vars.palette.common.onBackground:`${"light"===u.palette.mode?u.palette.common.black:u.palette.common.white}`,opacity:u.vars?u.vars.opacity.switchTrack:""+("light"===u.palette.mode?.38:.3)}))),nm=(0,Up.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(u,Xe)=>Xe.thumb})((({theme:u})=>({boxShadow:(u.vars||u).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),rm=dp.forwardRef((function Switch(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiSwitch"}),{className:In,color:fr="primary",edge:_r=!1,size:wr="medium",sx:Ar}=Wt,Kr=(0,yp.A)(Wt,Jf),no=(0,_p.A)({},Wt,{color:fr,edge:_r,size:wr}),io=(u=>{const{classes:Xe,edge:Wt,size:In,color:fr,checked:_r,disabled:wr}=u,Ar={root:["root",Wt&&`edge${(0,Vp.A)(Wt)}`,`size${(0,Vp.A)(In)}`],switchBase:["switchBase",`color${(0,Vp.A)(fr)}`,_r&&"checked",wr&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},Kr=(0,xp.A)(Ar,getSwitchUtilityClass,Xe);return(0,_p.A)({},Xe,Kr)})(no),oo=(0,Fp.jsx)(nm,{className:io.thumb,ownerState:no});return(0,Fp.jsxs)(Qf,{className:(0,vp.A)(io.root,In),sx:Ar,ownerState:no,children:[(0,Fp.jsx)(em,(0,_p.A)({type:"checkbox",icon:oo,checkedIcon:oo,ref:Xe,ownerState:no},Kr,{classes:(0,_p.A)({},io,{root:io.switchBase})})),(0,Fp.jsx)(tm,{className:io.track,ownerState:no})]})}));var im=rm;const om=dp.createContext();const useRtl=()=>{const u=dp.useContext(om);return null!=u&&u};var am=function isHostComponent(u){return"string"==typeof u};var sm=function appendOwnerState(u,Xe,Wt){return void 0===u||am(u)?Xe:(0,_p.A)({},Xe,{ownerState:(0,_p.A)({},Xe.ownerState,Wt)})},lm=__webpack_require__(2765),cm=__webpack_require__(8312);function styles_useTheme_useTheme(){const u=Cp(lm.A);return u[cm.A]||u}var um=__webpack_require__(961),dm=!1,hm="unmounted",pm="exited",fm="entering",mm="entered",gm="exiting",ym=function(u){function Transition(Xe,Wt){var In;In=u.call(this,Xe,Wt)||this;var fr,_r=Wt&&!Wt.isMounting?Xe.enter:Xe.appear;return In.appearStatus=null,Xe.in?_r?(fr=pm,In.appearStatus=fm):fr=mm:fr=Xe.unmountOnExit||Xe.mountOnEnter?hm:pm,In.state={status:fr},In.nextCallback=null,In}_inheritsLoose(Transition,u),Transition.getDerivedStateFromProps=function getDerivedStateFromProps(u,Xe){return u.in&&Xe.status===hm?{status:pm}:null};var Xe=Transition.prototype;return Xe.componentDidMount=function componentDidMount(){this.updateStatus(!0,this.appearStatus)},Xe.componentDidUpdate=function componentDidUpdate(u){var Xe=null;if(u!==this.props){var Wt=this.state.status;this.props.in?Wt!==fm&&Wt!==mm&&(Xe=fm):Wt!==fm&&Wt!==mm||(Xe=gm)}this.updateStatus(!1,Xe)},Xe.componentWillUnmount=function componentWillUnmount(){this.cancelNextCallback()},Xe.getTimeouts=function getTimeouts(){var u,Xe,Wt,In=this.props.timeout;return u=Xe=Wt=In,null!=In&&"number"!=typeof In&&(u=In.exit,Xe=In.enter,Wt=void 0!==In.appear?In.appear:Xe),{exit:u,enter:Xe,appear:Wt}},Xe.updateStatus=function updateStatus(u,Xe){if(void 0===u&&(u=!1),null!==Xe)if(this.cancelNextCallback(),Xe===fm){if(this.props.unmountOnExit||this.props.mountOnEnter){var Wt=this.props.nodeRef?this.props.nodeRef.current:um.findDOMNode(this);Wt&&function forceReflow(u){u.scrollTop}(Wt)}this.performEnter(u)}else this.performExit();else this.props.unmountOnExit&&this.state.status===pm&&this.setState({status:hm})},Xe.performEnter=function performEnter(u){var Xe=this,Wt=this.props.enter,In=this.context?this.context.isMounting:u,fr=this.props.nodeRef?[In]:[um.findDOMNode(this),In],_r=fr[0],wr=fr[1],Ar=this.getTimeouts(),Kr=In?Ar.appear:Ar.enter;!u&&!Wt||dm?this.safeSetState({status:mm},(function(){Xe.props.onEntered(_r)})):(this.props.onEnter(_r,wr),this.safeSetState({status:fm},(function(){Xe.props.onEntering(_r,wr),Xe.onTransitionEnd(Kr,(function(){Xe.safeSetState({status:mm},(function(){Xe.props.onEntered(_r,wr)}))}))})))},Xe.performExit=function performExit(){var u=this,Xe=this.props.exit,Wt=this.getTimeouts(),In=this.props.nodeRef?void 0:um.findDOMNode(this);Xe&&!dm?(this.props.onExit(In),this.safeSetState({status:gm},(function(){u.props.onExiting(In),u.onTransitionEnd(Wt.exit,(function(){u.safeSetState({status:pm},(function(){u.props.onExited(In)}))}))}))):this.safeSetState({status:pm},(function(){u.props.onExited(In)}))},Xe.cancelNextCallback=function cancelNextCallback(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},Xe.safeSetState=function safeSetState(u,Xe){Xe=this.setNextCallback(Xe),this.setState(u,Xe)},Xe.setNextCallback=function setNextCallback(u){var Xe=this,Wt=!0;return this.nextCallback=function(In){Wt&&(Wt=!1,Xe.nextCallback=null,u(In))},this.nextCallback.cancel=function(){Wt=!1},this.nextCallback},Xe.onTransitionEnd=function onTransitionEnd(u,Xe){this.setNextCallback(Xe);var Wt=this.props.nodeRef?this.props.nodeRef.current:um.findDOMNode(this),In=null==u&&!this.props.addEndListener;if(Wt&&!In){if(this.props.addEndListener){var fr=this.props.nodeRef?[this.nextCallback]:[Wt,this.nextCallback],_r=fr[0],wr=fr[1];this.props.addEndListener(_r,wr)}null!=u&&setTimeout(this.nextCallback,u)}else setTimeout(this.nextCallback,0)},Xe.render=function render(){var u=this.state.status;if(u===hm)return null;var Xe=this.props,Wt=Xe.children,In=(Xe.in,Xe.mountOnEnter,Xe.unmountOnExit,Xe.appear,Xe.enter,Xe.exit,Xe.timeout,Xe.addEndListener,Xe.onEnter,Xe.onEntering,Xe.onEntered,Xe.onExit,Xe.onExiting,Xe.onExited,Xe.nodeRef,(0,yp.A)(Xe,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return dp.createElement(Qp.Provider,{value:null},"function"==typeof Wt?Wt(u,In):dp.cloneElement(dp.Children.only(Wt),In))},Transition}(dp.Component);function Transition_noop(){}ym.contextType=Qp,ym.propTypes={},ym.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Transition_noop,onEntering:Transition_noop,onEntered:Transition_noop,onExit:Transition_noop,onExiting:Transition_noop,onExited:Transition_noop},ym.UNMOUNTED=hm,ym.EXITED=pm,ym.ENTERING=fm,ym.ENTERED=mm,ym.EXITING=gm;var _m=ym;const reflow=u=>u.scrollTop;function getTransitionProps(u,Xe){var Wt,In;const{timeout:fr,easing:_r,style:wr={}}=u;return{duration:null!=(Wt=wr.transitionDuration)?Wt:"number"==typeof fr?fr:fr[Xe.mode]||0,easing:null!=(In=wr.transitionTimingFunction)?In:"object"==typeof _r?_r[Xe.mode]:_r,delay:wr.transitionDelay}}const vm=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getScale(u){return`scale(${u}, ${u**2})`}const bm={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"}},xm="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),wm=dp.forwardRef((function Grow(u,Xe){const{addEndListener:Wt,appear:In=!0,children:fr,easing:_r,in:wr,onEnter:Ar,onEntered:Kr,onEntering:no,onExit:io,onExited:oo,onExiting:ao,style:so,timeout:co="auto",TransitionComponent:ho=_m}=u,go=(0,yp.A)(u,vm),xo=(0,lf.A)(),ko=dp.useRef(),Co=styles_useTheme_useTheme(),Io=dp.useRef(null),zo=(0,Xp.A)(Io,fr.ref,Xe),normalizedTransitionCallback=u=>Xe=>{if(u){const Wt=Io.current;void 0===Xe?u(Wt):u(Wt,Xe)}},Bo=normalizedTransitionCallback(no),ca=normalizedTransitionCallback(((u,Xe)=>{reflow(u);const{duration:Wt,delay:In,easing:fr}=getTransitionProps({style:so,timeout:co,easing:_r},{mode:"enter"});let wr;"auto"===co?(wr=Co.transitions.getAutoHeightDuration(u.clientHeight),ko.current=wr):wr=Wt,u.style.transition=[Co.transitions.create("opacity",{duration:wr,delay:In}),Co.transitions.create("transform",{duration:xm?wr:.666*wr,delay:In,easing:fr})].join(","),Ar&&Ar(u,Xe)})),ua=normalizedTransitionCallback(Kr),Da=normalizedTransitionCallback(ao),ns=normalizedTransitionCallback((u=>{const{duration:Xe,delay:Wt,easing:In}=getTransitionProps({style:so,timeout:co,easing:_r},{mode:"exit"});let fr;"auto"===co?(fr=Co.transitions.getAutoHeightDuration(u.clientHeight),ko.current=fr):fr=Xe,u.style.transition=[Co.transitions.create("opacity",{duration:fr,delay:Wt}),Co.transitions.create("transform",{duration:xm?fr:.666*fr,delay:xm?Wt:Wt||.333*fr,easing:In})].join(","),u.style.opacity=0,u.style.transform=getScale(.75),io&&io(u)})),yl=normalizedTransitionCallback(oo);return(0,Fp.jsx)(ho,(0,_p.A)({appear:In,in:wr,nodeRef:Io,onEnter:ca,onEntered:ua,onEntering:Bo,onExit:ns,onExited:yl,onExiting:Da,addEndListener:u=>{"auto"===co&&xo.start(ko.current||0,u),Wt&&Wt(Io.current,u)},timeout:"auto"===co?null:co},go,{children:(u,Xe)=>dp.cloneElement(fr,(0,_p.A)({style:(0,_p.A)({opacity:0,transform:getScale(.75),visibility:"exited"!==u||wr?void 0:"hidden"},bm[u],so,fr.props.style),ref:zo},Xe))}))}));wm.muiSupportAuto=!0;var Sm=wm,km=__webpack_require__(2923),Am=__webpack_require__(1523),Tm=__webpack_require__(1529),Cm=__webpack_require__(2325);function getWindow(u){if(null==u)return window;if("[object Window]"!==u.toString()){var Xe=u.ownerDocument;return Xe&&Xe.defaultView||window}return u}function isElement(u){return u instanceof getWindow(u).Element||u instanceof Element}function isHTMLElement(u){return u instanceof getWindow(u).HTMLElement||u instanceof HTMLElement}function isShadowRoot(u){return"undefined"!=typeof ShadowRoot&&(u instanceof getWindow(u).ShadowRoot||u instanceof ShadowRoot)}var Em=Math.max,Pm=Math.min,Im=Math.round;function getUAString(){var u=navigator.userAgentData;return null!=u&&u.brands&&Array.isArray(u.brands)?u.brands.map((function(u){return u.brand+"/"+u.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(u,Xe,Wt){void 0===Xe&&(Xe=!1),void 0===Wt&&(Wt=!1);var In=u.getBoundingClientRect(),fr=1,_r=1;Xe&&isHTMLElement(u)&&(fr=u.offsetWidth>0&&Im(In.width)/u.offsetWidth||1,_r=u.offsetHeight>0&&Im(In.height)/u.offsetHeight||1);var wr=(isElement(u)?getWindow(u):window).visualViewport,Ar=!isLayoutViewport()&&Wt,Kr=(In.left+(Ar&&wr?wr.offsetLeft:0))/fr,no=(In.top+(Ar&&wr?wr.offsetTop:0))/_r,io=In.width/fr,oo=In.height/_r;return{width:io,height:oo,top:no,right:Kr+io,bottom:no+oo,left:Kr,x:Kr,y:no}}function getWindowScroll(u){var Xe=getWindow(u);return{scrollLeft:Xe.pageXOffset,scrollTop:Xe.pageYOffset}}function getNodeName(u){return u?(u.nodeName||"").toLowerCase():null}function getDocumentElement(u){return((isElement(u)?u.ownerDocument:u.document)||window.document).documentElement}function getWindowScrollBarX(u){return getBoundingClientRect(getDocumentElement(u)).left+getWindowScroll(u).scrollLeft}function getComputedStyle_getComputedStyle(u){return getWindow(u).getComputedStyle(u)}function isScrollParent(u){var Xe=getComputedStyle_getComputedStyle(u),Wt=Xe.overflow,In=Xe.overflowX,fr=Xe.overflowY;return/auto|scroll|overlay|hidden/.test(Wt+fr+In)}function getCompositeRect(u,Xe,Wt){void 0===Wt&&(Wt=!1);var In=isHTMLElement(Xe),fr=isHTMLElement(Xe)&&function isElementScaled(u){var Xe=u.getBoundingClientRect(),Wt=Im(Xe.width)/u.offsetWidth||1,In=Im(Xe.height)/u.offsetHeight||1;return 1!==Wt||1!==In}(Xe),_r=getDocumentElement(Xe),wr=getBoundingClientRect(u,fr,Wt),Ar={scrollLeft:0,scrollTop:0},Kr={x:0,y:0};return(In||!In&&!Wt)&&(("body"!==getNodeName(Xe)||isScrollParent(_r))&&(Ar=function getNodeScroll(u){return u!==getWindow(u)&&isHTMLElement(u)?function getHTMLElementScroll(u){return{scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}}(u):getWindowScroll(u)}(Xe)),isHTMLElement(Xe)?((Kr=getBoundingClientRect(Xe,!0)).x+=Xe.clientLeft,Kr.y+=Xe.clientTop):_r&&(Kr.x=getWindowScrollBarX(_r))),{x:wr.left+Ar.scrollLeft-Kr.x,y:wr.top+Ar.scrollTop-Kr.y,width:wr.width,height:wr.height}}function getLayoutRect(u){var Xe=getBoundingClientRect(u),Wt=u.offsetWidth,In=u.offsetHeight;return Math.abs(Xe.width-Wt)<=1&&(Wt=Xe.width),Math.abs(Xe.height-In)<=1&&(In=Xe.height),{x:u.offsetLeft,y:u.offsetTop,width:Wt,height:In}}function getParentNode(u){return"html"===getNodeName(u)?u:u.assignedSlot||u.parentNode||(isShadowRoot(u)?u.host:null)||getDocumentElement(u)}function getScrollParent(u){return["html","body","#document"].indexOf(getNodeName(u))>=0?u.ownerDocument.body:isHTMLElement(u)&&isScrollParent(u)?u:getScrollParent(getParentNode(u))}function listScrollParents(u,Xe){var Wt;void 0===Xe&&(Xe=[]);var In=getScrollParent(u),fr=In===(null==(Wt=u.ownerDocument)?void 0:Wt.body),_r=getWindow(In),wr=fr?[_r].concat(_r.visualViewport||[],isScrollParent(In)?In:[]):In,Ar=Xe.concat(wr);return fr?Ar:Ar.concat(listScrollParents(getParentNode(wr)))}function isTableElement(u){return["table","td","th"].indexOf(getNodeName(u))>=0}function getTrueOffsetParent(u){return isHTMLElement(u)&&"fixed"!==getComputedStyle_getComputedStyle(u).position?u.offsetParent:null}function getOffsetParent(u){for(var Xe=getWindow(u),Wt=getTrueOffsetParent(u);Wt&&isTableElement(Wt)&&"static"===getComputedStyle_getComputedStyle(Wt).position;)Wt=getTrueOffsetParent(Wt);return Wt&&("html"===getNodeName(Wt)||"body"===getNodeName(Wt)&&"static"===getComputedStyle_getComputedStyle(Wt).position)?Xe:Wt||function getContainingBlock(u){var Xe=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(u)&&"fixed"===getComputedStyle_getComputedStyle(u).position)return null;var Wt=getParentNode(u);for(isShadowRoot(Wt)&&(Wt=Wt.host);isHTMLElement(Wt)&&["html","body"].indexOf(getNodeName(Wt))<0;){var In=getComputedStyle_getComputedStyle(Wt);if("none"!==In.transform||"none"!==In.perspective||"paint"===In.contain||-1!==["transform","perspective"].indexOf(In.willChange)||Xe&&"filter"===In.willChange||Xe&&In.filter&&"none"!==In.filter)return Wt;Wt=Wt.parentNode}return null}(u)||Xe}var Mm="top",Rm="bottom",zm="right",Om="left",Lm="auto",Dm=[Mm,Rm,zm,Om],Fm="start",Bm="end",jm="viewport",Nm="popper",Vm=Dm.reduce((function(u,Xe){return u.concat([Xe+"-"+Fm,Xe+"-"+Bm])}),[]),Um=[].concat(Dm,[Lm]).reduce((function(u,Xe){return u.concat([Xe,Xe+"-"+Fm,Xe+"-"+Bm])}),[]),$m=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function order(u){var Xe=new Map,Wt=new Set,In=[];function sort(u){Wt.add(u.name),[].concat(u.requires||[],u.requiresIfExists||[]).forEach((function(u){if(!Wt.has(u)){var In=Xe.get(u);In&&sort(In)}})),In.push(u)}return u.forEach((function(u){Xe.set(u.name,u)})),u.forEach((function(u){Wt.has(u.name)||sort(u)})),In}var Wm={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var u=arguments.length,Xe=new Array(u),Wt=0;Wt<u;Wt++)Xe[Wt]=arguments[Wt];return!Xe.some((function(u){return!(u&&"function"==typeof u.getBoundingClientRect)}))}function popperGenerator(u){void 0===u&&(u={});var Xe=u,Wt=Xe.defaultModifiers,In=void 0===Wt?[]:Wt,fr=Xe.defaultOptions,_r=void 0===fr?Wm:fr;return function createPopper(u,Xe,Wt){void 0===Wt&&(Wt=_r);var fr,wr,Ar={placement:"bottom",orderedModifiers:[],options:Object.assign({},Wm,_r),modifiersData:{},elements:{reference:u,popper:Xe},attributes:{},styles:{}},Kr=[],no=!1,io={state:Ar,setOptions:function setOptions(Wt){var fr="function"==typeof Wt?Wt(Ar.options):Wt;cleanupModifierEffects(),Ar.options=Object.assign({},_r,Ar.options,fr),Ar.scrollParents={reference:isElement(u)?listScrollParents(u):u.contextElement?listScrollParents(u.contextElement):[],popper:listScrollParents(Xe)};var wr=function orderModifiers(u){var Xe=order(u);return $m.reduce((function(u,Wt){return u.concat(Xe.filter((function(u){return u.phase===Wt})))}),[])}(function mergeByName(u){var Xe=u.reduce((function(u,Xe){var Wt=u[Xe.name];return u[Xe.name]=Wt?Object.assign({},Wt,Xe,{options:Object.assign({},Wt.options,Xe.options),data:Object.assign({},Wt.data,Xe.data)}):Xe,u}),{});return Object.keys(Xe).map((function(u){return Xe[u]}))}([].concat(In,Ar.options.modifiers)));return Ar.orderedModifiers=wr.filter((function(u){return u.enabled})),function runModifierEffects(){Ar.orderedModifiers.forEach((function(u){var Xe=u.name,Wt=u.options,In=void 0===Wt?{}:Wt,fr=u.effect;if("function"==typeof fr){var _r=fr({state:Ar,name:Xe,instance:io,options:In}),wr=function noopFn(){};Kr.push(_r||wr)}}))}(),io.update()},forceUpdate:function forceUpdate(){if(!no){var u=Ar.elements,Xe=u.reference,Wt=u.popper;if(areValidElements(Xe,Wt)){Ar.rects={reference:getCompositeRect(Xe,getOffsetParent(Wt),"fixed"===Ar.options.strategy),popper:getLayoutRect(Wt)},Ar.reset=!1,Ar.placement=Ar.options.placement,Ar.orderedModifiers.forEach((function(u){return Ar.modifiersData[u.name]=Object.assign({},u.data)}));for(var In=0;In<Ar.orderedModifiers.length;In++)if(!0!==Ar.reset){var fr=Ar.orderedModifiers[In],_r=fr.fn,wr=fr.options,Kr=void 0===wr?{}:wr,oo=fr.name;"function"==typeof _r&&(Ar=_r({state:Ar,options:Kr,name:oo,instance:io})||Ar)}else Ar.reset=!1,In=-1}}},update:(fr=function(){return new Promise((function(u){io.forceUpdate(),u(Ar)}))},function(){return wr||(wr=new Promise((function(u){Promise.resolve().then((function(){wr=void 0,u(fr())}))}))),wr}),destroy:function destroy(){cleanupModifierEffects(),no=!0}};if(!areValidElements(u,Xe))return io;function cleanupModifierEffects(){Kr.forEach((function(u){return u()})),Kr=[]}return io.setOptions(Wt).then((function(u){!no&&Wt.onFirstUpdate&&Wt.onFirstUpdate(u)})),io}}var qm={passive:!0};function getBasePlacement(u){return u.split("-")[0]}function getVariation(u){return u.split("-")[1]}function getMainAxisFromPlacement(u){return["top","bottom"].indexOf(u)>=0?"x":"y"}function computeOffsets(u){var Xe,Wt=u.reference,In=u.element,fr=u.placement,_r=fr?getBasePlacement(fr):null,wr=fr?getVariation(fr):null,Ar=Wt.x+Wt.width/2-In.width/2,Kr=Wt.y+Wt.height/2-In.height/2;switch(_r){case Mm:Xe={x:Ar,y:Wt.y-In.height};break;case Rm:Xe={x:Ar,y:Wt.y+Wt.height};break;case zm:Xe={x:Wt.x+Wt.width,y:Kr};break;case Om:Xe={x:Wt.x-In.width,y:Kr};break;default:Xe={x:Wt.x,y:Wt.y}}var no=_r?getMainAxisFromPlacement(_r):null;if(null!=no){var io="y"===no?"height":"width";switch(wr){case Fm:Xe[no]=Xe[no]-(Wt[io]/2-In[io]/2);break;case Bm:Xe[no]=Xe[no]+(Wt[io]/2-In[io]/2)}}return Xe}var Zm={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mapToStyles(u){var Xe,Wt=u.popper,In=u.popperRect,fr=u.placement,_r=u.variation,wr=u.offsets,Ar=u.position,Kr=u.gpuAcceleration,no=u.adaptive,io=u.roundOffsets,oo=u.isFixed,ao=wr.x,so=void 0===ao?0:ao,co=wr.y,ho=void 0===co?0:co,go="function"==typeof io?io({x:so,y:ho}):{x:so,y:ho};so=go.x,ho=go.y;var xo=wr.hasOwnProperty("x"),ko=wr.hasOwnProperty("y"),Co=Om,Io=Mm,zo=window;if(no){var Bo=getOffsetParent(Wt),ca="clientHeight",ua="clientWidth";if(Bo===getWindow(Wt)&&"static"!==getComputedStyle_getComputedStyle(Bo=getDocumentElement(Wt)).position&&"absolute"===Ar&&(ca="scrollHeight",ua="scrollWidth"),fr===Mm||(fr===Om||fr===zm)&&_r===Bm)Io=Rm,ho-=(oo&&Bo===zo&&zo.visualViewport?zo.visualViewport.height:Bo[ca])-In.height,ho*=Kr?1:-1;if(fr===Om||(fr===Mm||fr===Rm)&&_r===Bm)Co=zm,so-=(oo&&Bo===zo&&zo.visualViewport?zo.visualViewport.width:Bo[ua])-In.width,so*=Kr?1:-1}var Da,ns=Object.assign({position:Ar},no&&Zm),yl=!0===io?function roundOffsetsByDPR(u,Xe){var Wt=u.x,In=u.y,fr=Xe.devicePixelRatio||1;return{x:Im(Wt*fr)/fr||0,y:Im(In*fr)/fr||0}}({x:so,y:ho},getWindow(Wt)):{x:so,y:ho};return so=yl.x,ho=yl.y,Kr?Object.assign({},ns,((Da={})[Io]=ko?"0":"",Da[Co]=xo?"0":"",Da.transform=(zo.devicePixelRatio||1)<=1?"translate("+so+"px, "+ho+"px)":"translate3d("+so+"px, "+ho+"px, 0)",Da)):Object.assign({},ns,((Xe={})[Io]=ko?ho+"px":"",Xe[Co]=xo?so+"px":"",Xe.transform="",Xe))}var Hm={name:"applyStyles",enabled:!0,phase:"write",fn:function applyStyles(u){var Xe=u.state;Object.keys(Xe.elements).forEach((function(u){var Wt=Xe.styles[u]||{},In=Xe.attributes[u]||{},fr=Xe.elements[u];isHTMLElement(fr)&&getNodeName(fr)&&(Object.assign(fr.style,Wt),Object.keys(In).forEach((function(u){var Xe=In[u];!1===Xe?fr.removeAttribute(u):fr.setAttribute(u,!0===Xe?"":Xe)})))}))},effect:function applyStyles_effect(u){var Xe=u.state,Wt={popper:{position:Xe.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(Xe.elements.popper.style,Wt.popper),Xe.styles=Wt,Xe.elements.arrow&&Object.assign(Xe.elements.arrow.style,Wt.arrow),function(){Object.keys(Xe.elements).forEach((function(u){var In=Xe.elements[u],fr=Xe.attributes[u]||{},_r=Object.keys(Xe.styles.hasOwnProperty(u)?Xe.styles[u]:Wt[u]).reduce((function(u,Xe){return u[Xe]="",u}),{});isHTMLElement(In)&&getNodeName(In)&&(Object.assign(In.style,_r),Object.keys(fr).forEach((function(u){In.removeAttribute(u)})))}))}},requires:["computeStyles"]};var Gm={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function offset(u){var Xe=u.state,Wt=u.options,In=u.name,fr=Wt.offset,_r=void 0===fr?[0,0]:fr,wr=Um.reduce((function(u,Wt){return u[Wt]=function distanceAndSkiddingToXY(u,Xe,Wt){var In=getBasePlacement(u),fr=[Om,Mm].indexOf(In)>=0?-1:1,_r="function"==typeof Wt?Wt(Object.assign({},Xe,{placement:u})):Wt,wr=_r[0],Ar=_r[1];return wr=wr||0,Ar=(Ar||0)*fr,[Om,zm].indexOf(In)>=0?{x:Ar,y:wr}:{x:wr,y:Ar}}(Wt,Xe.rects,_r),u}),{}),Ar=wr[Xe.placement],Kr=Ar.x,no=Ar.y;null!=Xe.modifiersData.popperOffsets&&(Xe.modifiersData.popperOffsets.x+=Kr,Xe.modifiersData.popperOffsets.y+=no),Xe.modifiersData[In]=wr}},Km={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(u){return u.replace(/left|right|bottom|top/g,(function(u){return Km[u]}))}var Xm={start:"end",end:"start"};function getOppositeVariationPlacement(u){return u.replace(/start|end/g,(function(u){return Xm[u]}))}function contains(u,Xe){var Wt=Xe.getRootNode&&Xe.getRootNode();if(u.contains(Xe))return!0;if(Wt&&isShadowRoot(Wt)){var In=Xe;do{if(In&&u.isSameNode(In))return!0;In=In.parentNode||In.host}while(In)}return!1}function rectToClientRect(u){return Object.assign({},u,{left:u.x,top:u.y,right:u.x+u.width,bottom:u.y+u.height})}function getClientRectFromMixedType(u,Xe,Wt){return Xe===jm?rectToClientRect(function getViewportRect(u,Xe){var Wt=getWindow(u),In=getDocumentElement(u),fr=Wt.visualViewport,_r=In.clientWidth,wr=In.clientHeight,Ar=0,Kr=0;if(fr){_r=fr.width,wr=fr.height;var no=isLayoutViewport();(no||!no&&"fixed"===Xe)&&(Ar=fr.offsetLeft,Kr=fr.offsetTop)}return{width:_r,height:wr,x:Ar+getWindowScrollBarX(u),y:Kr}}(u,Wt)):isElement(Xe)?function getInnerBoundingClientRect(u,Xe){var Wt=getBoundingClientRect(u,!1,"fixed"===Xe);return Wt.top=Wt.top+u.clientTop,Wt.left=Wt.left+u.clientLeft,Wt.bottom=Wt.top+u.clientHeight,Wt.right=Wt.left+u.clientWidth,Wt.width=u.clientWidth,Wt.height=u.clientHeight,Wt.x=Wt.left,Wt.y=Wt.top,Wt}(Xe,Wt):rectToClientRect(function getDocumentRect(u){var Xe,Wt=getDocumentElement(u),In=getWindowScroll(u),fr=null==(Xe=u.ownerDocument)?void 0:Xe.body,_r=Em(Wt.scrollWidth,Wt.clientWidth,fr?fr.scrollWidth:0,fr?fr.clientWidth:0),wr=Em(Wt.scrollHeight,Wt.clientHeight,fr?fr.scrollHeight:0,fr?fr.clientHeight:0),Ar=-In.scrollLeft+getWindowScrollBarX(u),Kr=-In.scrollTop;return"rtl"===getComputedStyle_getComputedStyle(fr||Wt).direction&&(Ar+=Em(Wt.clientWidth,fr?fr.clientWidth:0)-_r),{width:_r,height:wr,x:Ar,y:Kr}}(getDocumentElement(u)))}function getClippingRect(u,Xe,Wt,In){var fr="clippingParents"===Xe?function getClippingParents(u){var Xe=listScrollParents(getParentNode(u)),Wt=["absolute","fixed"].indexOf(getComputedStyle_getComputedStyle(u).position)>=0&&isHTMLElement(u)?getOffsetParent(u):u;return isElement(Wt)?Xe.filter((function(u){return isElement(u)&&contains(u,Wt)&&"body"!==getNodeName(u)})):[]}(u):[].concat(Xe),_r=[].concat(fr,[Wt]),wr=_r[0],Ar=_r.reduce((function(Xe,Wt){var fr=getClientRectFromMixedType(u,Wt,In);return Xe.top=Em(fr.top,Xe.top),Xe.right=Pm(fr.right,Xe.right),Xe.bottom=Pm(fr.bottom,Xe.bottom),Xe.left=Em(fr.left,Xe.left),Xe}),getClientRectFromMixedType(u,wr,In));return Ar.width=Ar.right-Ar.left,Ar.height=Ar.bottom-Ar.top,Ar.x=Ar.left,Ar.y=Ar.top,Ar}function mergePaddingObject(u){return Object.assign({},{top:0,right:0,bottom:0,left:0},u)}function expandToHashMap(u,Xe){return Xe.reduce((function(Xe,Wt){return Xe[Wt]=u,Xe}),{})}function detectOverflow(u,Xe){void 0===Xe&&(Xe={});var Wt=Xe,In=Wt.placement,fr=void 0===In?u.placement:In,_r=Wt.strategy,wr=void 0===_r?u.strategy:_r,Ar=Wt.boundary,Kr=void 0===Ar?"clippingParents":Ar,no=Wt.rootBoundary,io=void 0===no?jm:no,oo=Wt.elementContext,ao=void 0===oo?Nm:oo,so=Wt.altBoundary,co=void 0!==so&&so,ho=Wt.padding,go=void 0===ho?0:ho,xo=mergePaddingObject("number"!=typeof go?go:expandToHashMap(go,Dm)),ko=ao===Nm?"reference":Nm,Co=u.rects.popper,Io=u.elements[co?ko:ao],zo=getClippingRect(isElement(Io)?Io:Io.contextElement||getDocumentElement(u.elements.popper),Kr,io,wr),Bo=getBoundingClientRect(u.elements.reference),ca=computeOffsets({reference:Bo,element:Co,strategy:"absolute",placement:fr}),ua=rectToClientRect(Object.assign({},Co,ca)),Da=ao===Nm?ua:Bo,ns={top:zo.top-Da.top+xo.top,bottom:Da.bottom-zo.bottom+xo.bottom,left:zo.left-Da.left+xo.left,right:Da.right-zo.right+xo.right},yl=u.modifiersData.offset;if(ao===Nm&&yl){var vl=yl[fr];Object.keys(ns).forEach((function(u){var Xe=[zm,Rm].indexOf(u)>=0?1:-1,Wt=[Mm,Rm].indexOf(u)>=0?"y":"x";ns[u]+=vl[Wt]*Xe}))}return ns}var Ym={name:"flip",enabled:!0,phase:"main",fn:function flip(u){var Xe=u.state,Wt=u.options,In=u.name;if(!Xe.modifiersData[In]._skip){for(var fr=Wt.mainAxis,_r=void 0===fr||fr,wr=Wt.altAxis,Ar=void 0===wr||wr,Kr=Wt.fallbackPlacements,no=Wt.padding,io=Wt.boundary,oo=Wt.rootBoundary,ao=Wt.altBoundary,so=Wt.flipVariations,co=void 0===so||so,ho=Wt.allowedAutoPlacements,go=Xe.options.placement,xo=getBasePlacement(go),ko=Kr||(xo===go||!co?[getOppositePlacement(go)]:function getExpandedFallbackPlacements(u){if(getBasePlacement(u)===Lm)return[];var Xe=getOppositePlacement(u);return[getOppositeVariationPlacement(u),Xe,getOppositeVariationPlacement(Xe)]}(go)),Co=[go].concat(ko).reduce((function(u,Wt){return u.concat(getBasePlacement(Wt)===Lm?function computeAutoPlacement(u,Xe){void 0===Xe&&(Xe={});var Wt=Xe,In=Wt.placement,fr=Wt.boundary,_r=Wt.rootBoundary,wr=Wt.padding,Ar=Wt.flipVariations,Kr=Wt.allowedAutoPlacements,no=void 0===Kr?Um:Kr,io=getVariation(In),oo=io?Ar?Vm:Vm.filter((function(u){return getVariation(u)===io})):Dm,ao=oo.filter((function(u){return no.indexOf(u)>=0}));0===ao.length&&(ao=oo);var so=ao.reduce((function(Xe,Wt){return Xe[Wt]=detectOverflow(u,{placement:Wt,boundary:fr,rootBoundary:_r,padding:wr})[getBasePlacement(Wt)],Xe}),{});return Object.keys(so).sort((function(u,Xe){return so[u]-so[Xe]}))}(Xe,{placement:Wt,boundary:io,rootBoundary:oo,padding:no,flipVariations:co,allowedAutoPlacements:ho}):Wt)}),[]),Io=Xe.rects.reference,zo=Xe.rects.popper,Bo=new Map,ca=!0,ua=Co[0],Da=0;Da<Co.length;Da++){var ns=Co[Da],yl=getBasePlacement(ns),vl=getVariation(ns)===Fm,kl=[Mm,Rm].indexOf(yl)>=0,Al=kl?"width":"height",Ml=detectOverflow(Xe,{placement:ns,boundary:io,rootBoundary:oo,altBoundary:ao,padding:no}),Rl=kl?vl?zm:Om:vl?Rm:Mm;Io[Al]>zo[Al]&&(Rl=getOppositePlacement(Rl));var Ol=getOppositePlacement(Rl),Ll=[];if(_r&&Ll.push(Ml[yl]<=0),Ar&&Ll.push(Ml[Rl]<=0,Ml[Ol]<=0),Ll.every((function(u){return u}))){ua=ns,ca=!1;break}Bo.set(ns,Ll)}if(ca)for(var Dl=function _loop(u){var Xe=Co.find((function(Xe){var Wt=Bo.get(Xe);if(Wt)return Wt.slice(0,u).every((function(u){return u}))}));if(Xe)return ua=Xe,"break"},Bl=co?3:1;Bl>0;Bl--){if("break"===Dl(Bl))break}Xe.placement!==ua&&(Xe.modifiersData[In]._skip=!0,Xe.placement=ua,Xe.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function within(u,Xe,Wt){return Em(u,Pm(Xe,Wt))}var Jm={name:"preventOverflow",enabled:!0,phase:"main",fn:function preventOverflow(u){var Xe=u.state,Wt=u.options,In=u.name,fr=Wt.mainAxis,_r=void 0===fr||fr,wr=Wt.altAxis,Ar=void 0!==wr&&wr,Kr=Wt.boundary,no=Wt.rootBoundary,io=Wt.altBoundary,oo=Wt.padding,ao=Wt.tether,so=void 0===ao||ao,co=Wt.tetherOffset,ho=void 0===co?0:co,go=detectOverflow(Xe,{boundary:Kr,rootBoundary:no,padding:oo,altBoundary:io}),xo=getBasePlacement(Xe.placement),ko=getVariation(Xe.placement),Co=!ko,Io=getMainAxisFromPlacement(xo),zo=function getAltAxis(u){return"x"===u?"y":"x"}(Io),Bo=Xe.modifiersData.popperOffsets,ca=Xe.rects.reference,ua=Xe.rects.popper,Da="function"==typeof ho?ho(Object.assign({},Xe.rects,{placement:Xe.placement})):ho,ns="number"==typeof Da?{mainAxis:Da,altAxis:Da}:Object.assign({mainAxis:0,altAxis:0},Da),yl=Xe.modifiersData.offset?Xe.modifiersData.offset[Xe.placement]:null,vl={x:0,y:0};if(Bo){if(_r){var kl,Al="y"===Io?Mm:Om,Ml="y"===Io?Rm:zm,Rl="y"===Io?"height":"width",Ol=Bo[Io],Ll=Ol+go[Al],Dl=Ol-go[Ml],Bl=so?-ua[Rl]/2:0,Nl=ko===Fm?ca[Rl]:ua[Rl],Vl=ko===Fm?-ua[Rl]:-ca[Rl],Ul=Xe.elements.arrow,$l=so&&Ul?getLayoutRect(Ul):{width:0,height:0},Wl=Xe.modifiersData["arrow#persistent"]?Xe.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Zl=Wl[Al],Gl=Wl[Ml],Xl=within(0,ca[Rl],$l[Rl]),Jl=Co?ca[Rl]/2-Bl-Xl-Zl-ns.mainAxis:Nl-Xl-Zl-ns.mainAxis,Ql=Co?-ca[Rl]/2+Bl+Xl+Gl+ns.mainAxis:Vl+Xl+Gl+ns.mainAxis,rc=Xe.elements.arrow&&getOffsetParent(Xe.elements.arrow),ic=rc?"y"===Io?rc.clientTop||0:rc.clientLeft||0:0,oc=null!=(kl=null==yl?void 0:yl[Io])?kl:0,lc=Ol+Ql-oc,gc=within(so?Pm(Ll,Ol+Jl-oc-ic):Ll,Ol,so?Em(Dl,lc):Dl);Bo[Io]=gc,vl[Io]=gc-Ol}if(Ar){var bc,eu="x"===Io?Mm:Om,tu="x"===Io?Rm:zm,nu=Bo[zo],iu="y"===zo?"height":"width",su=nu+go[eu],cu=nu-go[tu],uu=-1!==[Mm,Om].indexOf(xo),hu=null!=(bc=null==yl?void 0:yl[zo])?bc:0,Iu=uu?su:nu-ca[iu]-ua[iu]-hu+ns.altAxis,zu=uu?nu+ca[iu]+ua[iu]-hu-ns.altAxis:cu,Lu=so&&uu?function withinMaxClamp(u,Xe,Wt){var In=within(u,Xe,Wt);return In>Wt?Wt:In}(Iu,nu,zu):within(so?Iu:su,nu,so?zu:cu);Bo[zo]=Lu,vl[zo]=Lu-nu}Xe.modifiersData[In]=vl}},requiresIfExists:["offset"]};var Qm={name:"arrow",enabled:!0,phase:"main",fn:function arrow(u){var Xe,Wt=u.state,In=u.name,fr=u.options,_r=Wt.elements.arrow,wr=Wt.modifiersData.popperOffsets,Ar=getBasePlacement(Wt.placement),Kr=getMainAxisFromPlacement(Ar),no=[Om,zm].indexOf(Ar)>=0?"height":"width";if(_r&&wr){var io=function toPaddingObject(u,Xe){return mergePaddingObject("number"!=typeof(u="function"==typeof u?u(Object.assign({},Xe.rects,{placement:Xe.placement})):u)?u:expandToHashMap(u,Dm))}(fr.padding,Wt),oo=getLayoutRect(_r),ao="y"===Kr?Mm:Om,so="y"===Kr?Rm:zm,co=Wt.rects.reference[no]+Wt.rects.reference[Kr]-wr[Kr]-Wt.rects.popper[no],ho=wr[Kr]-Wt.rects.reference[Kr],go=getOffsetParent(_r),xo=go?"y"===Kr?go.clientHeight||0:go.clientWidth||0:0,ko=co/2-ho/2,Co=io[ao],Io=xo-oo[no]-io[so],zo=xo/2-oo[no]/2+ko,Bo=within(Co,zo,Io),ca=Kr;Wt.modifiersData[In]=((Xe={})[ca]=Bo,Xe.centerOffset=Bo-zo,Xe)}},effect:function arrow_effect(u){var Xe=u.state,Wt=u.options.element,In=void 0===Wt?"[data-popper-arrow]":Wt;null!=In&&("string"!=typeof In||(In=Xe.elements.popper.querySelector(In)))&&contains(Xe.elements.popper,In)&&(Xe.elements.arrow=In)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getSideOffsets(u,Xe,Wt){return void 0===Wt&&(Wt={x:0,y:0}),{top:u.top-Xe.height-Wt.y,right:u.right-Xe.width+Wt.x,bottom:u.bottom-Xe.height+Wt.y,left:u.left-Xe.width-Wt.x}}function isAnySideFullyClipped(u){return[Mm,zm,Rm,Om].some((function(Xe){return u[Xe]>=0}))}var eg=popperGenerator({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function fn(){},effect:function effect(u){var Xe=u.state,Wt=u.instance,In=u.options,fr=In.scroll,_r=void 0===fr||fr,wr=In.resize,Ar=void 0===wr||wr,Kr=getWindow(Xe.elements.popper),no=[].concat(Xe.scrollParents.reference,Xe.scrollParents.popper);return _r&&no.forEach((function(u){u.addEventListener("scroll",Wt.update,qm)})),Ar&&Kr.addEventListener("resize",Wt.update,qm),function(){_r&&no.forEach((function(u){u.removeEventListener("scroll",Wt.update,qm)})),Ar&&Kr.removeEventListener("resize",Wt.update,qm)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function popperOffsets(u){var Xe=u.state,Wt=u.name;Xe.modifiersData[Wt]=computeOffsets({reference:Xe.rects.reference,element:Xe.rects.popper,strategy:"absolute",placement:Xe.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function computeStyles(u){var Xe=u.state,Wt=u.options,In=Wt.gpuAcceleration,fr=void 0===In||In,_r=Wt.adaptive,wr=void 0===_r||_r,Ar=Wt.roundOffsets,Kr=void 0===Ar||Ar,no={placement:getBasePlacement(Xe.placement),variation:getVariation(Xe.placement),popper:Xe.elements.popper,popperRect:Xe.rects.popper,gpuAcceleration:fr,isFixed:"fixed"===Xe.options.strategy};null!=Xe.modifiersData.popperOffsets&&(Xe.styles.popper=Object.assign({},Xe.styles.popper,mapToStyles(Object.assign({},no,{offsets:Xe.modifiersData.popperOffsets,position:Xe.options.strategy,adaptive:wr,roundOffsets:Kr})))),null!=Xe.modifiersData.arrow&&(Xe.styles.arrow=Object.assign({},Xe.styles.arrow,mapToStyles(Object.assign({},no,{offsets:Xe.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:Kr})))),Xe.attributes.popper=Object.assign({},Xe.attributes.popper,{"data-popper-placement":Xe.placement})},data:{}},Hm,Gm,Ym,Jm,Qm,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function hide(u){var Xe=u.state,Wt=u.name,In=Xe.rects.reference,fr=Xe.rects.popper,_r=Xe.modifiersData.preventOverflow,wr=detectOverflow(Xe,{elementContext:"reference"}),Ar=detectOverflow(Xe,{altBoundary:!0}),Kr=getSideOffsets(wr,In),no=getSideOffsets(Ar,fr,_r),io=isAnySideFullyClipped(Kr),oo=isAnySideFullyClipped(no);Xe.modifiersData[Wt]={referenceClippingOffsets:Kr,popperEscapeOffsets:no,isReferenceHidden:io,hasPopperEscaped:oo},Xe.attributes.popper=Object.assign({},Xe.attributes.popper,{"data-popper-reference-hidden":io,"data-popper-escaped":oo})}}]});var ng=function extractEventHandlers(u,Xe=[]){if(void 0===u)return{};const Wt={};return Object.keys(u).filter((Wt=>Wt.match(/^on[A-Z]/)&&"function"==typeof u[Wt]&&!Xe.includes(Wt))).forEach((Xe=>{Wt[Xe]=u[Xe]})),Wt};var rg=function omitEventHandlers(u){if(void 0===u)return{};const Xe={};return Object.keys(u).filter((Xe=>!(Xe.match(/^on[A-Z]/)&&"function"==typeof u[Xe]))).forEach((Wt=>{Xe[Wt]=u[Wt]})),Xe};var og=function mergeSlotProps(u){const{getSlotProps:Xe,additionalProps:Wt,externalSlotProps:In,externalForwardedProps:fr,className:_r}=u;if(!Xe){const u=(0,vp.A)(null==Wt?void 0:Wt.className,_r,null==fr?void 0:fr.className,null==In?void 0:In.className),Xe=(0,_p.A)({},null==Wt?void 0:Wt.style,null==fr?void 0:fr.style,null==In?void 0:In.style),wr=(0,_p.A)({},Wt,fr,In);return u.length>0&&(wr.className=u),Object.keys(Xe).length>0&&(wr.style=Xe),{props:wr,internalRef:void 0}}const wr=ng((0,_p.A)({},fr,In)),Ar=rg(In),Kr=rg(fr),no=Xe(wr),io=(0,vp.A)(null==no?void 0:no.className,null==Wt?void 0:Wt.className,_r,null==fr?void 0:fr.className,null==In?void 0:In.className),oo=(0,_p.A)({},null==no?void 0:no.style,null==Wt?void 0:Wt.style,null==fr?void 0:fr.style,null==In?void 0:In.style),ao=(0,_p.A)({},no,Wt,Kr,Ar);return io.length>0&&(ao.className=io),Object.keys(oo).length>0&&(ao.style=oo),{props:ao,internalRef:no.ref}};var sg=function resolveComponentProps(u,Xe,Wt){return"function"==typeof u?u(Xe,Wt):u};const lg=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];var pg=function useSlotProps(u){var Xe;const{elementType:Wt,externalSlotProps:In,ownerState:fr,skipResolvingSlotProps:_r=!1}=u,wr=(0,yp.A)(u,lg),Ar=_r?{}:sg(In,fr),{props:Kr,internalRef:no}=og((0,_p.A)({},wr,{externalSlotProps:Ar})),io=(0,Am.A)(no,null==Ar?void 0:Ar.ref,null==(Xe=u.additionalProps)?void 0:Xe.ref);return sm(Wt,(0,_p.A)({},Kr,{ref:io}),fr)},fg=__webpack_require__(7365);var mg=dp.forwardRef((function Portal(u,Xe){const{children:Wt,container:In,disablePortal:fr=!1}=u,[_r,wr]=dp.useState(null),Ar=(0,Am.A)(dp.isValidElement(Wt)?Wt.ref:null,Xe);if((0,Tm.A)((()=>{fr||wr(function getContainer(u){return"function"==typeof u?u():u}(In)||document.body)}),[In,fr]),(0,Tm.A)((()=>{if(_r&&!fr)return(0,fg.A)(Xe,_r),()=>{(0,fg.A)(Xe,null)}}),[Xe,_r,fr]),fr){if(dp.isValidElement(Wt)){const u={ref:Ar};return dp.cloneElement(Wt,u)}return(0,Fp.jsx)(dp.Fragment,{children:Wt})}return(0,Fp.jsx)(dp.Fragment,{children:_r?um.createPortal(Wt,_r):_r})}));function getPopperUtilityClass(u){return(0,bp.Ay)("MuiPopper",u)}(0,uf.A)("MuiPopper",["root"]);const gg=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],yg=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function resolveAnchorEl(u){return"function"==typeof u?u():u}function BasePopper_isHTMLElement(u){return void 0!==u.nodeType}const _g={},xg=dp.forwardRef((function PopperTooltip(u,Xe){var Wt;const{anchorEl:In,children:fr,direction:_r,disablePortal:wr,modifiers:Ar,open:Kr,placement:no,popperOptions:io,popperRef:oo,slotProps:ao={},slots:so={},TransitionProps:co}=u,ho=(0,yp.A)(u,gg),go=dp.useRef(null),xo=(0,Am.A)(go,Xe),ko=dp.useRef(null),Co=(0,Am.A)(ko,oo),Io=dp.useRef(Co);(0,Tm.A)((()=>{Io.current=Co}),[Co]),dp.useImperativeHandle(oo,(()=>ko.current),[]);const zo=function flipPlacement(u,Xe){if("ltr"===Xe)return u;switch(u){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 u}}(no,_r),[Bo,ca]=dp.useState(zo),[ua,Da]=dp.useState(resolveAnchorEl(In));dp.useEffect((()=>{ko.current&&ko.current.forceUpdate()})),dp.useEffect((()=>{In&&Da(resolveAnchorEl(In))}),[In]),(0,Tm.A)((()=>{if(!ua||!Kr)return;let u=[{name:"preventOverflow",options:{altBoundary:wr}},{name:"flip",options:{altBoundary:wr}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:u})=>{ca(u.placement)}}];null!=Ar&&(u=u.concat(Ar)),io&&null!=io.modifiers&&(u=u.concat(io.modifiers));const Xe=eg(ua,go.current,(0,_p.A)({placement:zo},io,{modifiers:u}));return Io.current(Xe),()=>{Xe.destroy(),Io.current(null)}}),[ua,wr,Ar,Kr,io,zo]);const ns={placement:Bo};null!==co&&(ns.TransitionProps=co);const yl=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"]},getPopperUtilityClass,Xe)})(u),vl=null!=(Wt=so.root)?Wt:"div",kl=pg({elementType:vl,externalSlotProps:ao.root,externalForwardedProps:ho,additionalProps:{role:"tooltip",ref:xo},ownerState:u,className:yl.root});return(0,Fp.jsx)(vl,(0,_p.A)({},kl,{children:"function"==typeof fr?fr(ns):fr}))})),kg=dp.forwardRef((function Popper(u,Xe){const{anchorEl:Wt,children:In,container:fr,direction:_r="ltr",disablePortal:wr=!1,keepMounted:Ar=!1,modifiers:Kr,open:no,placement:io="bottom",popperOptions:oo=_g,popperRef:ao,style:so,transition:co=!1,slotProps:ho={},slots:go={}}=u,xo=(0,yp.A)(u,yg),[ko,Co]=dp.useState(!0);if(!Ar&&!no&&(!co||ko))return null;let Io;if(fr)Io=fr;else if(Wt){const u=resolveAnchorEl(Wt);Io=u&&BasePopper_isHTMLElement(u)?(0,Cm.A)(u).body:(0,Cm.A)(null).body}const zo=no||!Ar||co&&!ko?void 0:"none",Bo=co?{in:no,onEnter:()=>{Co(!1)},onExited:()=>{Co(!0)}}:void 0;return(0,Fp.jsx)(mg,{disablePortal:wr,container:Io,children:(0,Fp.jsx)(xg,(0,_p.A)({anchorEl:Wt,direction:_r,disablePortal:wr,modifiers:Kr,ref:Xe,open:co?!ko:no,placement:io,popperOptions:oo,popperRef:ao,slotProps:ho,slots:go},xo,{style:(0,_p.A)({position:"fixed",top:0,left:0,display:zo},so),TransitionProps:Bo,children:In}))})}));var zg=kg;const Vg=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Ug=(0,Up.Ay)(zg,{name:"MuiPopper",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})({});var Wg=dp.forwardRef((function Popper(u,Xe){var Wt;const In=(0,km.A)(),fr=(0,$p.b)({props:u,name:"MuiPopper"}),{anchorEl:_r,component:wr,components:Ar,componentsProps:Kr,container:no,disablePortal:io,keepMounted:oo,modifiers:ao,open:so,placement:co,popperOptions:ho,popperRef:go,transition:xo,slots:ko,slotProps:Co}=fr,Io=(0,yp.A)(fr,Vg),zo=null!=(Wt=null==ko?void 0:ko.root)?Wt:null==Ar?void 0:Ar.Root,Bo=(0,_p.A)({anchorEl:_r,container:no,disablePortal:io,keepMounted:oo,modifiers:ao,open:so,placement:co,popperOptions:ho,popperRef:go,transition:xo},Io);return(0,Fp.jsx)(Ug,(0,_p.A)({as:wr,direction:null==In?void 0:In.direction,slots:{root:zo},slotProps:null!=Co?Co:Kr},Bo,{ref:Xe}))})),qg=__webpack_require__(1668);function getTooltipUtilityClass(u){return(0,bp.Ay)("MuiTooltip",u)}var Zg=(0,uf.A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const Kg=["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"];const Xg=(0,Up.Ay)(Wg,{name:"MuiTooltip",slot:"Popper",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.popper,!Wt.disableInteractive&&Xe.popperInteractive,Wt.arrow&&Xe.popperArrow,!Wt.open&&Xe.popperClose]}})((({theme:u,ownerState:Xe,open:Wt})=>(0,_p.A)({zIndex:(u.vars||u).zIndex.tooltip,pointerEvents:"none"},!Xe.disableInteractive&&{pointerEvents:"auto"},!Wt&&{pointerEvents:"none"},Xe.arrow&&{[`&[data-popper-placement*="bottom"] .${Zg.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Zg.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Zg.arrow}`]:(0,_p.A)({},Xe.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Zg.arrow}`]:(0,_p.A)({},Xe.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),Yg=(0,Up.Ay)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.tooltip,Wt.touch&&Xe.touch,Wt.arrow&&Xe.tooltipArrow,Xe[`tooltipPlacement${(0,Vp.A)(Wt.placement.split("-")[0])}`]]}})((({theme:u,ownerState:Xe})=>{return(0,_p.A)({backgroundColor:u.vars?u.vars.palette.Tooltip.bg:(0,Zp.X4)(u.palette.grey[700],.92),borderRadius:(u.vars||u).shape.borderRadius,color:(u.vars||u).palette.common.white,fontFamily:u.typography.fontFamily,padding:"4px 8px",fontSize:u.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:u.typography.fontWeightMedium},Xe.arrow&&{position:"relative",margin:0},Xe.touch&&{padding:"8px 16px",fontSize:u.typography.pxToRem(14),lineHeight:(Wt=16/14,Math.round(1e5*Wt)/1e5)+"em",fontWeight:u.typography.fontWeightRegular},{[`.${Zg.popper}[data-popper-placement*="left"] &`]:(0,_p.A)({transformOrigin:"right center"},Xe.isRtl?(0,_p.A)({marginLeft:"14px"},Xe.touch&&{marginLeft:"24px"}):(0,_p.A)({marginRight:"14px"},Xe.touch&&{marginRight:"24px"})),[`.${Zg.popper}[data-popper-placement*="right"] &`]:(0,_p.A)({transformOrigin:"left center"},Xe.isRtl?(0,_p.A)({marginRight:"14px"},Xe.touch&&{marginRight:"24px"}):(0,_p.A)({marginLeft:"14px"},Xe.touch&&{marginLeft:"24px"})),[`.${Zg.popper}[data-popper-placement*="top"] &`]:(0,_p.A)({transformOrigin:"center bottom",marginBottom:"14px"},Xe.touch&&{marginBottom:"24px"}),[`.${Zg.popper}[data-popper-placement*="bottom"] &`]:(0,_p.A)({transformOrigin:"center top",marginTop:"14px"},Xe.touch&&{marginTop:"24px"})});var Wt})),ey=(0,Up.Ay)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(u,Xe)=>Xe.arrow})((({theme:u})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:u.vars?u.vars.palette.Tooltip.bg:(0,Zp.X4)(u.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let ty=!1;const ny=new lf.E;let ry={x:0,y:0};function composeEventHandler(u,Xe){return(Wt,...In)=>{Xe&&Xe(Wt,...In),u(Wt,...In)}}const iy=dp.forwardRef((function Tooltip(u,Xe){var Wt,In,fr,_r,wr,Ar,Kr,no,io,oo,ao,so,co,ho,go,xo,ko,Co,Io;const zo=(0,$p.b)({props:u,name:"MuiTooltip"}),{arrow:Bo=!1,children:ca,components:ua={},componentsProps:Da={},describeChild:ns=!1,disableFocusListener:yl=!1,disableHoverListener:vl=!1,disableInteractive:kl=!1,disableTouchListener:Al=!1,enterDelay:Ml=100,enterNextDelay:Rl=0,enterTouchDelay:Ol=700,followCursor:Ll=!1,id:Dl,leaveDelay:Bl=0,leaveTouchDelay:Nl=1500,onClose:Vl,onOpen:Ul,open:$l,placement:Wl="bottom",PopperComponent:Zl,PopperProps:Gl={},slotProps:Xl={},slots:Jl={},title:Ql,TransitionComponent:rc=Sm,TransitionProps:ic}=zo,oc=(0,yp.A)(zo,Kg),lc=dp.isValidElement(ca)?ca:(0,Fp.jsx)("span",{children:ca}),gc=styles_useTheme_useTheme(),bc=useRtl(),[eu,tu]=dp.useState(),[nu,iu]=dp.useState(null),su=dp.useRef(!1),cu=kl||Ll,uu=(0,lf.A)(),hu=(0,lf.A)(),Iu=(0,lf.A)(),zu=(0,lf.A)(),[Lu,Du]=(0,Gp.A)({controlled:$l,default:!1,name:"Tooltip",state:"open"});let Fu=Lu;const Nu=(0,qg.A)(Dl),Vu=dp.useRef(),Uu=(0,Yp.A)((()=>{void 0!==Vu.current&&(document.body.style.WebkitUserSelect=Vu.current,Vu.current=void 0),zu.clear()}));dp.useEffect((()=>Uu),[Uu]);const handleOpen=u=>{ny.clear(),ty=!0,Du(!0),Ul&&!Fu&&Ul(u)},qu=(0,Yp.A)((u=>{ny.start(800+Bl,(()=>{ty=!1})),Du(!1),Vl&&Fu&&Vl(u),uu.start(gc.transitions.duration.shortest,(()=>{su.current=!1}))})),handleMouseOver=u=>{su.current&&"touchstart"!==u.type||(eu&&eu.removeAttribute("title"),hu.clear(),Iu.clear(),Ml||ty&&Rl?hu.start(ty?Rl:Ml,(()=>{handleOpen(u)})):handleOpen(u))},handleMouseLeave=u=>{hu.clear(),Iu.start(Bl,(()=>{qu(u)}))},{isFocusVisibleRef:td,onBlur:id,onFocus:sd,ref:ld}=(0,Jp.A)(),[,cd]=dp.useState(!1),handleBlur=u=>{id(u),!1===td.current&&(cd(!1),handleMouseLeave(u))},handleFocus=u=>{eu||tu(u.currentTarget),sd(u),!0===td.current&&(cd(!0),handleMouseOver(u))},detectTouchStart=u=>{su.current=!0;const Xe=lc.props;Xe.onTouchStart&&Xe.onTouchStart(u)},handleTouchStart=u=>{detectTouchStart(u),Iu.clear(),uu.clear(),Uu(),Vu.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",zu.start(Ol,(()=>{document.body.style.WebkitUserSelect=Vu.current,handleMouseOver(u)}))},handleTouchEnd=u=>{lc.props.onTouchEnd&&lc.props.onTouchEnd(u),Uu(),Iu.start(Nl,(()=>{qu(u)}))};dp.useEffect((()=>{if(Fu)return document.addEventListener("keydown",handleKeyDown),()=>{document.removeEventListener("keydown",handleKeyDown)};function handleKeyDown(u){"Escape"!==u.key&&"Esc"!==u.key||qu(u)}}),[qu,Fu]);const ud=(0,Xp.A)(lc.ref,ld,tu,Xe);Ql||0===Ql||(Fu=!1);const dd=dp.useRef(),md={},yd="string"==typeof Ql;ns?(md.title=Fu||!yd||vl?null:Ql,md["aria-describedby"]=Fu?Nu:null):(md["aria-label"]=yd?Ql:null,md["aria-labelledby"]=Fu&&!yd?Nu:null);const _d=(0,_p.A)({},md,oc,lc.props,{className:(0,vp.A)(oc.className,lc.props.className),onTouchStart:detectTouchStart,ref:ud},Ll?{onMouseMove:u=>{const Xe=lc.props;Xe.onMouseMove&&Xe.onMouseMove(u),ry={x:u.clientX,y:u.clientY},dd.current&&dd.current.update()}}:{});const vd={};Al||(_d.onTouchStart=handleTouchStart,_d.onTouchEnd=handleTouchEnd),vl||(_d.onMouseOver=composeEventHandler(handleMouseOver,_d.onMouseOver),_d.onMouseLeave=composeEventHandler(handleMouseLeave,_d.onMouseLeave),cu||(vd.onMouseOver=handleMouseOver,vd.onMouseLeave=handleMouseLeave)),yl||(_d.onFocus=composeEventHandler(handleFocus,_d.onFocus),_d.onBlur=composeEventHandler(handleBlur,_d.onBlur),cu||(vd.onFocus=handleFocus,vd.onBlur=handleBlur));const xd=dp.useMemo((()=>{var u;let Xe=[{name:"arrow",enabled:Boolean(nu),options:{element:nu,padding:4}}];return null!=(u=Gl.popperOptions)&&u.modifiers&&(Xe=Xe.concat(Gl.popperOptions.modifiers)),(0,_p.A)({},Gl.popperOptions,{modifiers:Xe})}),[nu,Gl]),wd=(0,_p.A)({},zo,{isRtl:bc,arrow:Bo,disableInteractive:cu,placement:Wl,PopperComponentProp:Zl,touch:su.current}),Sd=(u=>{const{classes:Xe,disableInteractive:Wt,arrow:In,touch:fr,placement:_r}=u,wr={popper:["popper",!Wt&&"popperInteractive",In&&"popperArrow"],tooltip:["tooltip",In&&"tooltipArrow",fr&&"touch",`tooltipPlacement${(0,Vp.A)(_r.split("-")[0])}`],arrow:["arrow"]};return(0,xp.A)(wr,getTooltipUtilityClass,Xe)})(wd),kd=null!=(Wt=null!=(In=Jl.popper)?In:ua.Popper)?Wt:Xg,Ad=null!=(fr=null!=(_r=null!=(wr=Jl.transition)?wr:ua.Transition)?_r:rc)?fr:Sm,Td=null!=(Ar=null!=(Kr=Jl.tooltip)?Kr:ua.Tooltip)?Ar:Yg,Cd=null!=(no=null!=(io=Jl.arrow)?io:ua.Arrow)?no:ey,Ed=sm(kd,(0,_p.A)({},Gl,null!=(oo=Xl.popper)?oo:Da.popper,{className:(0,vp.A)(Sd.popper,null==Gl?void 0:Gl.className,null==(ao=null!=(so=Xl.popper)?so:Da.popper)?void 0:ao.className)}),wd),Id=sm(Ad,(0,_p.A)({},ic,null!=(co=Xl.transition)?co:Da.transition),wd),Md=sm(Td,(0,_p.A)({},null!=(ho=Xl.tooltip)?ho:Da.tooltip,{className:(0,vp.A)(Sd.tooltip,null==(go=null!=(xo=Xl.tooltip)?xo:Da.tooltip)?void 0:go.className)}),wd),Rd=sm(Cd,(0,_p.A)({},null!=(ko=Xl.arrow)?ko:Da.arrow,{className:(0,vp.A)(Sd.arrow,null==(Co=null!=(Io=Xl.arrow)?Io:Da.arrow)?void 0:Co.className)}),wd);return(0,Fp.jsxs)(dp.Fragment,{children:[dp.cloneElement(lc,_d),(0,Fp.jsx)(kd,(0,_p.A)({as:null!=Zl?Zl:Wg,placement:Wl,anchorEl:Ll?{getBoundingClientRect:()=>({top:ry.y,left:ry.x,right:ry.x,bottom:ry.y,width:0,height:0})}:eu,popperRef:dd,open:!!eu&&Fu,id:Nu,transition:!0},vd,Ed,{popperOptions:xd,children:({TransitionProps:u})=>(0,Fp.jsx)(Ad,(0,_p.A)({timeout:gc.transitions.duration.shorter},u,Id,{children:(0,Fp.jsxs)(Td,(0,_p.A)({},Md,{children:[Ql,Bo?(0,Fp.jsx)(Cd,(0,_p.A)({},Rd,{ref:iu})):null]}))}))}))]})}));var oy=iy;function getButtonUtilityClass(u){return(0,bp.Ay)("MuiButton",u)}var ay=(0,uf.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"]);var sy=dp.createContext({});var ly=dp.createContext(void 0);const cy=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],commonIconStyles=u=>(0,_p.A)({},"small"===u.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===u.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===u.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),uy=(0,Up.Ay)(jf,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiButton",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[Wt.variant],Xe[`${Wt.variant}${(0,Vp.A)(Wt.color)}`],Xe[`size${(0,Vp.A)(Wt.size)}`],Xe[`${Wt.variant}Size${(0,Vp.A)(Wt.size)}`],"inherit"===Wt.color&&Xe.colorInherit,Wt.disableElevation&&Xe.disableElevation,Wt.fullWidth&&Xe.fullWidth]}})((({theme:u,ownerState:Xe})=>{var Wt,In;const fr="light"===u.palette.mode?u.palette.grey[300]:u.palette.grey[800],_r="light"===u.palette.mode?u.palette.grey.A100:u.palette.grey[700];return(0,_p.A)({},u.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(u.vars||u).shape.borderRadius,transition:u.transitions.create(["background-color","box-shadow","border-color","color"],{duration:u.transitions.duration.short}),"&:hover":(0,_p.A)({textDecoration:"none",backgroundColor:u.vars?`rgba(${u.vars.palette.text.primaryChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette.text.primary,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===Xe.variant&&"inherit"!==Xe.color&&{backgroundColor:u.vars?`rgba(${u.vars.palette[Xe.color].mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette[Xe.color].main,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===Xe.variant&&"inherit"!==Xe.color&&{border:`1px solid ${(u.vars||u).palette[Xe.color].main}`,backgroundColor:u.vars?`rgba(${u.vars.palette[Xe.color].mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette[Xe.color].main,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===Xe.variant&&{backgroundColor:u.vars?u.vars.palette.Button.inheritContainedHoverBg:_r,boxShadow:(u.vars||u).shadows[4],"@media (hover: none)":{boxShadow:(u.vars||u).shadows[2],backgroundColor:(u.vars||u).palette.grey[300]}},"contained"===Xe.variant&&"inherit"!==Xe.color&&{backgroundColor:(u.vars||u).palette[Xe.color].dark,"@media (hover: none)":{backgroundColor:(u.vars||u).palette[Xe.color].main}}),"&:active":(0,_p.A)({},"contained"===Xe.variant&&{boxShadow:(u.vars||u).shadows[8]}),[`&.${ay.focusVisible}`]:(0,_p.A)({},"contained"===Xe.variant&&{boxShadow:(u.vars||u).shadows[6]}),[`&.${ay.disabled}`]:(0,_p.A)({color:(u.vars||u).palette.action.disabled},"outlined"===Xe.variant&&{border:`1px solid ${(u.vars||u).palette.action.disabledBackground}`},"contained"===Xe.variant&&{color:(u.vars||u).palette.action.disabled,boxShadow:(u.vars||u).shadows[0],backgroundColor:(u.vars||u).palette.action.disabledBackground})},"text"===Xe.variant&&{padding:"6px 8px"},"text"===Xe.variant&&"inherit"!==Xe.color&&{color:(u.vars||u).palette[Xe.color].main},"outlined"===Xe.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===Xe.variant&&"inherit"!==Xe.color&&{color:(u.vars||u).palette[Xe.color].main,border:u.vars?`1px solid rgba(${u.vars.palette[Xe.color].mainChannel} / 0.5)`:`1px solid ${(0,Zp.X4)(u.palette[Xe.color].main,.5)}`},"contained"===Xe.variant&&{color:u.vars?u.vars.palette.text.primary:null==(Wt=(In=u.palette).getContrastText)?void 0:Wt.call(In,u.palette.grey[300]),backgroundColor:u.vars?u.vars.palette.Button.inheritContainedBg:fr,boxShadow:(u.vars||u).shadows[2]},"contained"===Xe.variant&&"inherit"!==Xe.color&&{color:(u.vars||u).palette[Xe.color].contrastText,backgroundColor:(u.vars||u).palette[Xe.color].main},"inherit"===Xe.color&&{color:"inherit",borderColor:"currentColor"},"small"===Xe.size&&"text"===Xe.variant&&{padding:"4px 5px",fontSize:u.typography.pxToRem(13)},"large"===Xe.size&&"text"===Xe.variant&&{padding:"8px 11px",fontSize:u.typography.pxToRem(15)},"small"===Xe.size&&"outlined"===Xe.variant&&{padding:"3px 9px",fontSize:u.typography.pxToRem(13)},"large"===Xe.size&&"outlined"===Xe.variant&&{padding:"7px 21px",fontSize:u.typography.pxToRem(15)},"small"===Xe.size&&"contained"===Xe.variant&&{padding:"4px 10px",fontSize:u.typography.pxToRem(13)},"large"===Xe.size&&"contained"===Xe.variant&&{padding:"8px 22px",fontSize:u.typography.pxToRem(15)},Xe.fullWidth&&{width:"100%"})}),(({ownerState:u})=>u.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ay.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ay.disabled}`]:{boxShadow:"none"}})),dy=(0,Up.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.startIcon,Xe[`iconSize${(0,Vp.A)(Wt.size)}`]]}})((({ownerState:u})=>(0,_p.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===u.size&&{marginLeft:-2},commonIconStyles(u)))),hy=(0,Up.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.endIcon,Xe[`iconSize${(0,Vp.A)(Wt.size)}`]]}})((({ownerState:u})=>(0,_p.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===u.size&&{marginRight:-2},commonIconStyles(u)))),py=dp.forwardRef((function Button(u,Xe){const Wt=dp.useContext(sy),In=dp.useContext(ly),fr=(0,Sp.A)(Wt,u),_r=(0,$p.b)({props:fr,name:"MuiButton"}),{children:wr,color:Ar="primary",component:Kr="button",className:no,disabled:io=!1,disableElevation:oo=!1,disableFocusRipple:ao=!1,endIcon:so,focusVisibleClassName:co,fullWidth:ho=!1,size:go="medium",startIcon:xo,type:ko,variant:Co="text"}=_r,Io=(0,yp.A)(_r,cy),zo=(0,_p.A)({},_r,{color:Ar,component:Kr,disabled:io,disableElevation:oo,disableFocusRipple:ao,fullWidth:ho,size:go,type:ko,variant:Co}),Bo=(u=>{const{color:Xe,disableElevation:Wt,fullWidth:In,size:fr,variant:_r,classes:wr}=u,Ar={root:["root",_r,`${_r}${(0,Vp.A)(Xe)}`,`size${(0,Vp.A)(fr)}`,`${_r}Size${(0,Vp.A)(fr)}`,`color${(0,Vp.A)(Xe)}`,Wt&&"disableElevation",In&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${(0,Vp.A)(fr)}`],endIcon:["icon","endIcon",`iconSize${(0,Vp.A)(fr)}`]},Kr=(0,xp.A)(Ar,getButtonUtilityClass,wr);return(0,_p.A)({},wr,Kr)})(zo),ca=xo&&(0,Fp.jsx)(dy,{className:Bo.startIcon,ownerState:zo,children:xo}),ua=so&&(0,Fp.jsx)(hy,{className:Bo.endIcon,ownerState:zo,children:so}),Da=In||"";return(0,Fp.jsxs)(uy,(0,_p.A)({ownerState:zo,className:(0,vp.A)(Wt.className,Bo.root,no,Da),component:Kr,disabled:io,focusRipple:!ao,focusVisibleClassName:(0,vp.A)(Bo.focusVisible,co),ref:Xe,type:ko},Io,{classes:Bo,children:[ca,wr,ua]}))}));var fy=py;function getDividerUtilityClass(u){return(0,bp.Ay)("MuiDivider",u)}(0,uf.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const my=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],gy=(0,Up.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.absolute&&Xe.absolute,Xe[Wt.variant],Wt.light&&Xe.light,"vertical"===Wt.orientation&&Xe.vertical,Wt.flexItem&&Xe.flexItem,Wt.children&&Xe.withChildren,Wt.children&&"vertical"===Wt.orientation&&Xe.withChildrenVertical,"right"===Wt.textAlign&&"vertical"!==Wt.orientation&&Xe.textAlignRight,"left"===Wt.textAlign&&"vertical"!==Wt.orientation&&Xe.textAlignLeft]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(u.vars||u).palette.divider,borderBottomWidth:"thin"},Xe.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},Xe.light&&{borderColor:u.vars?`rgba(${u.vars.palette.dividerChannel} / 0.08)`:(0,Zp.X4)(u.palette.divider,.08)},"inset"===Xe.variant&&{marginLeft:72},"middle"===Xe.variant&&"horizontal"===Xe.orientation&&{marginLeft:u.spacing(2),marginRight:u.spacing(2)},"middle"===Xe.variant&&"vertical"===Xe.orientation&&{marginTop:u.spacing(1),marginBottom:u.spacing(1)},"vertical"===Xe.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},Xe.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:u})=>(0,_p.A)({},u.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:u,ownerState:Xe})=>(0,_p.A)({},Xe.children&&"vertical"!==Xe.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(u.vars||u).palette.divider}`,borderTopStyle:"inherit"}})),(({theme:u,ownerState:Xe})=>(0,_p.A)({},Xe.children&&"vertical"===Xe.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(u.vars||u).palette.divider}`,borderLeftStyle:"inherit"}})),(({ownerState:u})=>(0,_p.A)({},"right"===u.textAlign&&"vertical"!==u.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===u.textAlign&&"vertical"!==u.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),yy=(0,Up.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.wrapper,"vertical"===Wt.orientation&&Xe.wrapperVertical]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({display:"inline-block",paddingLeft:`calc(${u.spacing(1)} * 1.2)`,paddingRight:`calc(${u.spacing(1)} * 1.2)`},"vertical"===Xe.orientation&&{paddingTop:`calc(${u.spacing(1)} * 1.2)`,paddingBottom:`calc(${u.spacing(1)} * 1.2)`}))),_y=dp.forwardRef((function Divider(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiDivider"}),{absolute:In=!1,children:fr,className:_r,component:wr=(fr?"div":"hr"),flexItem:Ar=!1,light:Kr=!1,orientation:no="horizontal",role:io=("hr"!==wr?"separator":void 0),textAlign:oo="center",variant:ao="fullWidth"}=Wt,so=(0,yp.A)(Wt,my),co=(0,_p.A)({},Wt,{absolute:In,component:wr,flexItem:Ar,light:Kr,orientation:no,role:io,textAlign:oo,variant:ao}),ho=(u=>{const{absolute:Xe,children:Wt,classes:In,flexItem:fr,light:_r,orientation:wr,textAlign:Ar,variant:Kr}=u,no={root:["root",Xe&&"absolute",Kr,_r&&"light","vertical"===wr&&"vertical",fr&&"flexItem",Wt&&"withChildren",Wt&&"vertical"===wr&&"withChildrenVertical","right"===Ar&&"vertical"!==wr&&"textAlignRight","left"===Ar&&"vertical"!==wr&&"textAlignLeft"],wrapper:["wrapper","vertical"===wr&&"wrapperVertical"]};return(0,xp.A)(no,getDividerUtilityClass,In)})(co);return(0,Fp.jsx)(gy,(0,_p.A)({as:wr,className:(0,vp.A)(ho.root,_r),role:io,ref:Xe,ownerState:co},so,{children:fr?(0,Fp.jsx)(yy,{className:ho.wrapper,ownerState:co,children:fr}):null}))}));_y.muiSkipListHighlight=!0;var vy=_y;const layerActionCreator_setIsVectorLayerVisible=function(u){return{type:ho.JAKARTO_LAYER_SET_IS_VECTOR_LAYER_VISIBLE,isVectorLayerVisible:u}},layerActionCreator_setWMTSLayerVisibilityByYear=function(u,Xe){return{type:ho.JAKARTO_LAYER_SET_WMTS_LAYER_VISIBILITY,year:u,isVisible:Xe}},layerActionCreator_setWMTSLayerStyleExpansionByYear=function(u,Xe){return{type:ho.JAKARTO_LAYER_SET_WMTS_LAYER_EXPANSION,year:u,isStyleExpanded:Xe}},layerActionCreator_selectWMTSLayerStyleByYear=function(u,Xe){return{type:ho.JAKARTO_LAYER_SELECT_WMTS_LAYER_STYLE,year:u,selectedStyle:Xe}},layerActionCreator_setCurrentZoomLevel=function(u){return{type:ho.JAKARTO_LAYER_SET_ZOOM_LEVEL,zoomLevel:u}};function getEncodedStyle(u){return u.replace(" ","%20")}function getTranslationKeyForStyle(u){const Xe="jakarto.layer.raster.style";switch(u){case so.DEFAULT:return`${Xe}.default`;case so.INTENSITE_MAX:return`${Xe}.intensite.max`;case so.INTENSITE_MAX_PTS_BAS:return`${Xe}.intensite.max.pts.bas`;case so.PTS_BAS:return`${Xe}.pts.bas`;case so.VERTICALITY:return`${Xe}.verticality`;default:return""}}function addCoverageLayers(){var u=this;getAllWMTSYearVariables().forEach(function(Xe){_newArrowCheck(this,u),function addWMTSLayer(u){const Xe=JMap.Map.getMap(),Wt=getEncodedStyle(getExtensionState().layer.allWMTSByYear[u].selectedStyle),In=Xe.getStyle().layers,fr=In?getFirstNoneRasterMaplibreLayerId(In):void 0;Xe.addSource(getWMTSLayerSourceFromYear(u),{type:"raster",tiles:[`${io}?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=${u}&STYLE=${Wt}&TILEMATRIX=EPSG:3857:{z}&TILEMATRIXSET=EPSG:3857&FORMAT=image/png&TILECOL={x}&TILEROW={y}`],tileSize:256}),Xe.addLayer({id:getWMTSLayerIdFromYear(u),type:"raster",source:getWMTSLayerSourceFromYear(u)},fr);const _r=getExtensionState().layer.allWMTSByYear[u].isVisible;_r||toggleLayerVisibilityById(getWMTSLayerIdFromYear(u))}(Xe)}.bind(this)),function addVectorLayer(){var u=this;const Xe=JMap.Map.getMap();Xe.addSource(Ar,{type:"vector",url:Kr}),Xe.addLayer({id:wr,type:"circle",source:Ar,"source-layer":no,paint:{"circle-radius":["interpolate",["linear"],["zoom"],8,1,11,2,16,3],"circle-color":"#191970"}}),Xe.on("click",wr,function(Xe){_newArrowCheck(this,u);const Wt=Xe.features?Xe.features[0]:void 0,In={longitude:Xe.lngLat.lng,latitude:Xe.lngLat.lat};Wt&&jakartowns&&jakartowns.app.jakartowns_instance&&jakartowns.app.jakartowns_instance.setPosition(In)}.bind(this))}()}function getFirstNoneRasterMaplibreLayerId(u){var Xe=this;if(0!==u.length){if(0===(u=u.filter(function(u){return _newArrowCheck(this,Xe),"jmap-basemap"!==u.id&&"jmap-background"!==u.id}.bind(this))).filter(function(u){return _newArrowCheck(this,Xe),"raster"===u.type}.bind(this)).length)return u[0].id;for(let Xe=u.length-1;Xe>=0;Xe--)if("raster"===u[Xe].type)return Xe===u.length-1?void 0:u[Xe+1].id}}function getWMTSLayerIdFromYear(u){return`jakartowns-wmts-layer-${u}`}function getWMTSLayerSourceFromYear(u){return`jakartowns-wmts-source-${u}`}function toggleLayerVisibilityById(u,Xe){if(!u)return;const Wt=JMap.Map.getMap(),In=Wt.getLayoutProperty(u,"visibility");Wt.setLayoutProperty(u,"visibility","none"===In?"visible":"none")}function checkWMTSYear(u){if("string"!=typeof u)throw Error("Parameter 'year' must be a string");if(!getAllWMTSYearVariables().includes(u))throw Error(`Not a valid WMTS year. Possible values are ${getAllWMTSYearVariables().join(", ")}.`)}const by={toggleVectorLayerVisibility:function(){store_getStore().dispatch(layerActionCreator_setIsVectorLayerVisible(!getExtensionState().layer.isVectorLayerVisible)),toggleLayerVisibilityById(wr)},toggleWMTSLayerVisibility:function(u){checkWMTSYear(u);const Xe=getExtensionState().layer.allWMTSByYear[u].isVisible;store_getStore().dispatch(layerActionCreator_setWMTSLayerVisibilityByYear(u,!Xe)),toggleLayerVisibilityById(getWMTSLayerIdFromYear(u))},toggleWMTSLayerStyleExpansion:function(u){checkWMTSYear(u);const Xe=getExtensionState().layer.allWMTSByYear[u].isStyleExpanded;store_getStore().dispatch(layerActionCreator_setWMTSLayerStyleExpansionByYear(u,!Xe))},selectWMTSLayerStyleForYear:function(u,Xe){checkWMTSYear(u),function checkWMTSStyle(u){if("string"!=typeof u)throw Error("Parameter 'style' must be a string");if(!getAllWMTSStyleVariables().includes(u))throw Error(`Not a valid WMTS style. Possible values are ${getAllWMTSStyleVariables().join(", ")}.`)}(Xe);if(getExtensionState().layer.allWMTSByYear[u].selectedStyle===Xe)throw Error(`Style '${Xe}' is already selected.`);store_getStore().dispatch(layerActionCreator_selectWMTSLayerStyleByYear(u,Xe)),function updateLayerStyle(u,Xe){const Wt=getEncodedStyle(Xe),In=JMap.Map.getMap(),fr=getWMTSLayerIdFromYear(u),_r=getWMTSLayerSourceFromYear(u);In.getLayer(fr)&&In.removeLayer(fr),In.getSource(_r)&&In.removeSource(_r);const wr=In.getStyle().layers,Ar=wr?getFirstNoneRasterMaplibreLayerId(wr):void 0;In.addSource(getWMTSLayerSourceFromYear(u),{type:"raster",tiles:[`${io}?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=${u}&STYLE=${Wt}&TILEMATRIX=EPSG:3857:{z}&TILEMATRIXSET=EPSG:3857&FORMAT=image/png&TILECOL={x}&TILEROW={y}`],tileSize:256}),In.addLayer({id:getWMTSLayerIdFromYear(u),type:"raster",source:getWMTSLayerSourceFromYear(u)},Ar),getExtensionState().layer.allWMTSByYear[u].isVisible||toggleLayerVisibilityById(getWMTSLayerIdFromYear(u))}(u,Xe)},setZoomLevel:function(u){store_getStore().dispatch(layerActionCreator_setCurrentZoomLevel(u));const Xe=getAllWMTSYearVariables();for(const Wt of Xe){getExtensionState().layer.allWMTSByYear[Wt].selectedStyle===so.VERTICALITY&&u<21&&this.selectWMTSLayerStyleForYear(Wt,so.DEFAULT)}}},xy="viewerDiv",wy="2rem",Sy="jmap-jakarto-floating-panel-container",ky="jmap-jakarto-floating-panel-content",Ay="position",Ty="rotation",Cy="tilt",viewerActionCreator_setIsInteractorActive=function(u){return{type:ho.JAKARTO_VIEWER_SET_IS_INTERACTOR_ACTIVE,isInteractorActive:u}},viewerActionCreator_setIsVisible=function(u){return{type:ho.JAKARTO_VIEWER_SET_IS_VISIBLE,isVisible:u}},viewerActionCreator_setParameters=function(u){return{type:ho.JAKARTO_VIEWER_SET_PARAMETERS,parameters:u}},viewerActionCreator_setIsLoading=function(u){return{type:ho.JAKARTO_VIEWER_SET_IS_LOADING,isLoading:u}},viewerActionCreator_setIsAuthenticated=function(u){return{type:ho.JAKARTO_VIEWER_SET_IS_AUTH,isAuthenticated:u}};var Ey=__webpack_require__(6443),Py=__webpack_require__.p+"408439996b62240a50e7.png";let Iy;function setMarkerLngLat(u){Iy&&Iy.setLngLat([u.x,u.y])}function onDragEnd(){if(Iy){const u=Iy.getLngLat(),Xe=getExtensionState().viewer.parameters;store_getStore().dispatch(viewerActionCreator_setParameters({...Xe,location:{x:u.lng,y:u.lat}})),jakartowns&&jakartowns.app.jakartowns_instance&&jakartowns.app.jakartowns_instance.setPosition({latitude:u.lat,longitude:u.lng})}}function handlePositionChange(u){const{detail:Xe}=u,{parameters:Wt}=getExtensionState().viewer,In={x:Xe.longitude,y:Xe.latitude};store_getStore().dispatch(viewerActionCreator_setParameters({...Wt,location:In})),setMarkerLngLat(In);const fr=function getDateForPanoId(u){if(!JMap.Map.isMapLoaded())return;let Xe;const Wt=JMap.Map.getMap().querySourceFeatures(Ar,{sourceLayer:no,filter:["==",["get","image_id"],u]});return Wt.length>0&&(Xe=Wt[0].properties?.date),Xe}(Xe.uid);store_getStore().dispatch(viewerActionCreator_setParameters({...getExtensionState().viewer.parameters,date:fr}))}function handleRotationChange(u){const{detail:Xe}=u,{parameters:Wt}=getExtensionState().viewer;store_getStore().dispatch(viewerActionCreator_setParameters({...Wt,pan:Xe})),function setMarkerRotation(u){Iy&&Iy.setRotation(u||0)}(function radToDeg(u){return 180*(u||0)/Math.PI}(2*Math.PI-Xe))}function handleTiltChange(u){const{detail:Xe}=u,{parameters:Wt}=getExtensionState().viewer;store_getStore().dispatch(viewerActionCreator_setParameters({...Wt,tilt:Xe}))}function handleFovChange(u){const{detail:Xe}=u,{parameters:Wt}=getExtensionState().viewer;store_getStore().dispatch(viewerActionCreator_setParameters({...Wt,fov:Xe}))}function bind(u,Xe){return function wrap(){return u.apply(Xe,arguments)}}const{toString:My}=Object.prototype,{getPrototypeOf:Ry}=Object,zy=(Oy=Object.create(null),u=>{const Xe=My.call(u);return Oy[Xe]||(Oy[Xe]=Xe.slice(8,-1).toLowerCase())});var Oy;const kindOfTest=u=>(u=u.toLowerCase(),Xe=>zy(Xe)===u),typeOfTest=u=>Xe=>typeof Xe===u,{isArray:Ly}=Array,Dy=typeOfTest("undefined");const Fy=kindOfTest("ArrayBuffer");const By=typeOfTest("string"),jy=typeOfTest("function"),Ny=typeOfTest("number"),isObject=u=>null!==u&&"object"==typeof u,isPlainObject=u=>{if("object"!==zy(u))return!1;const Xe=Ry(u);return!(null!==Xe&&Xe!==Object.prototype&&null!==Object.getPrototypeOf(Xe)||Symbol.toStringTag in u||Symbol.iterator in u)},Vy=kindOfTest("Date"),Uy=kindOfTest("File"),$y=kindOfTest("Blob"),Wy=kindOfTest("FileList"),qy=kindOfTest("URLSearchParams"),[Zy,Hy,Gy,Ky]=["ReadableStream","Request","Response","Headers"].map(kindOfTest);function forEach(u,Xe,{allOwnKeys:Wt=!1}={}){if(null==u)return;let In,fr;if("object"!=typeof u&&(u=[u]),Ly(u))for(In=0,fr=u.length;In<fr;In++)Xe.call(null,u[In],In,u);else{const fr=Wt?Object.getOwnPropertyNames(u):Object.keys(u),_r=fr.length;let wr;for(In=0;In<_r;In++)wr=fr[In],Xe.call(null,u[wr],wr,u)}}function findKey(u,Xe){Xe=Xe.toLowerCase();const Wt=Object.keys(u);let In,fr=Wt.length;for(;fr-- >0;)if(In=Wt[fr],Xe===In.toLowerCase())return In;return null}const Xy="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=u=>!Dy(u)&&u!==Xy;const Yy=(Jy="undefined"!=typeof Uint8Array&&Ry(Uint8Array),u=>Jy&&u instanceof Jy);var Jy;const Qy=kindOfTest("HTMLFormElement"),e_=(({hasOwnProperty:u})=>(Xe,Wt)=>u.call(Xe,Wt))(Object.prototype),t_=kindOfTest("RegExp"),reduceDescriptors=(u,Xe)=>{const Wt=Object.getOwnPropertyDescriptors(u),In={};forEach(Wt,((Wt,fr)=>{let _r;!1!==(_r=Xe(Wt,fr,u))&&(In[fr]=_r||Wt)})),Object.defineProperties(u,In)},n_="abcdefghijklmnopqrstuvwxyz",r_="0123456789",i_={DIGIT:r_,ALPHA:n_,ALPHA_DIGIT:n_+n_.toUpperCase()+r_};const o_=kindOfTest("AsyncFunction"),a_=(s_="function"==typeof setImmediate,l_=jy(Xy.postMessage),s_?setImmediate:l_?(c_=`axios@${Math.random()}`,u_=[],Xy.addEventListener("message",(({source:u,data:Xe})=>{u===Xy&&Xe===c_&&u_.length&&u_.shift()()}),!1),u=>{u_.push(u),Xy.postMessage(c_,"*")}):u=>setTimeout(u));var s_,l_,c_,u_;const d_="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Xy):"undefined"!=typeof process&&process.nextTick||a_;var h_={isArray:Ly,isArrayBuffer:Fy,isBuffer:function isBuffer(u){return null!==u&&!Dy(u)&&null!==u.constructor&&!Dy(u.constructor)&&jy(u.constructor.isBuffer)&&u.constructor.isBuffer(u)},isFormData:u=>{let Xe;return u&&("function"==typeof FormData&&u instanceof FormData||jy(u.append)&&("formdata"===(Xe=zy(u))||"object"===Xe&&jy(u.toString)&&"[object FormData]"===u.toString()))},isArrayBufferView:function isArrayBufferView(u){let Xe;return Xe="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(u):u&&u.buffer&&Fy(u.buffer),Xe},isString:By,isNumber:Ny,isBoolean:u=>!0===u||!1===u,isObject,isPlainObject,isReadableStream:Zy,isRequest:Hy,isResponse:Gy,isHeaders:Ky,isUndefined:Dy,isDate:Vy,isFile:Uy,isBlob:$y,isRegExp:t_,isFunction:jy,isStream:u=>isObject(u)&&jy(u.pipe),isURLSearchParams:qy,isTypedArray:Yy,isFileList:Wy,forEach,merge:function extension_merge(){const{caseless:u}=isContextDefined(this)&&this||{},Xe={},assignValue=(Wt,In)=>{const fr=u&&findKey(Xe,In)||In;isPlainObject(Xe[fr])&&isPlainObject(Wt)?Xe[fr]=extension_merge(Xe[fr],Wt):isPlainObject(Wt)?Xe[fr]=extension_merge({},Wt):Ly(Wt)?Xe[fr]=Wt.slice():Xe[fr]=Wt};for(let u=0,Xe=arguments.length;u<Xe;u++)arguments[u]&&forEach(arguments[u],assignValue);return Xe},extend:(u,Xe,Wt,{allOwnKeys:In}={})=>(forEach(Xe,((Xe,In)=>{Wt&&jy(Xe)?u[In]=bind(Xe,Wt):u[In]=Xe}),{allOwnKeys:In}),u),trim:u=>u.trim?u.trim():u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:u=>(65279===u.charCodeAt(0)&&(u=u.slice(1)),u),inherits:(u,Xe,Wt,In)=>{u.prototype=Object.create(Xe.prototype,In),u.prototype.constructor=u,Object.defineProperty(u,"super",{value:Xe.prototype}),Wt&&Object.assign(u.prototype,Wt)},toFlatObject:(u,Xe,Wt,In)=>{let fr,_r,wr;const Ar={};if(Xe=Xe||{},null==u)return Xe;do{for(fr=Object.getOwnPropertyNames(u),_r=fr.length;_r-- >0;)wr=fr[_r],In&&!In(wr,u,Xe)||Ar[wr]||(Xe[wr]=u[wr],Ar[wr]=!0);u=!1!==Wt&&Ry(u)}while(u&&(!Wt||Wt(u,Xe))&&u!==Object.prototype);return Xe},kindOf:zy,kindOfTest,endsWith:(u,Xe,Wt)=>{u=String(u),(void 0===Wt||Wt>u.length)&&(Wt=u.length),Wt-=Xe.length;const In=u.indexOf(Xe,Wt);return-1!==In&&In===Wt},toArray:u=>{if(!u)return null;if(Ly(u))return u;let Xe=u.length;if(!Ny(Xe))return null;const Wt=new Array(Xe);for(;Xe-- >0;)Wt[Xe]=u[Xe];return Wt},forEachEntry:(u,Xe)=>{const Wt=(u&&u[Symbol.iterator]).call(u);let In;for(;(In=Wt.next())&&!In.done;){const Wt=In.value;Xe.call(u,Wt[0],Wt[1])}},matchAll:(u,Xe)=>{let Wt;const In=[];for(;null!==(Wt=u.exec(Xe));)In.push(Wt);return In},isHTMLForm:Qy,hasOwnProperty:e_,hasOwnProp:e_,reduceDescriptors,freezeMethods:u=>{reduceDescriptors(u,((Xe,Wt)=>{if(jy(u)&&-1!==["arguments","caller","callee"].indexOf(Wt))return!1;const In=u[Wt];jy(In)&&(Xe.enumerable=!1,"writable"in Xe?Xe.writable=!1:Xe.set||(Xe.set=()=>{throw Error("Can not rewrite read-only method '"+Wt+"'")}))}))},toObjectSet:(u,Xe)=>{const Wt={},define=u=>{u.forEach((u=>{Wt[u]=!0}))};return Ly(u)?define(u):define(String(u).split(Xe)),Wt},toCamelCase:u=>u.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function replacer(u,Xe,Wt){return Xe.toUpperCase()+Wt})),noop:()=>{},toFiniteNumber:(u,Xe)=>null!=u&&Number.isFinite(u=+u)?u:Xe,findKey,global:Xy,isContextDefined,ALPHABET:i_,generateString:(u=16,Xe=i_.ALPHA_DIGIT)=>{let Wt="";const{length:In}=Xe;for(;u--;)Wt+=Xe[Math.random()*In|0];return Wt},isSpecCompliantForm:function isSpecCompliantForm(u){return!!(u&&jy(u.append)&&"FormData"===u[Symbol.toStringTag]&&u[Symbol.iterator])},toJSONObject:u=>{const Xe=new Array(10),visit=(u,Wt)=>{if(isObject(u)){if(Xe.indexOf(u)>=0)return;if(!("toJSON"in u)){Xe[Wt]=u;const In=Ly(u)?[]:{};return forEach(u,((u,Xe)=>{const fr=visit(u,Wt+1);!Dy(fr)&&(In[Xe]=fr)})),Xe[Wt]=void 0,In}}return u};return visit(u,0)},isAsyncFn:o_,isThenable:u=>u&&(isObject(u)||jy(u))&&jy(u.then)&&jy(u.catch),setImmediate:a_,asap:d_};function AxiosError(u,Xe,Wt,In,fr){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=u,this.name="AxiosError",Xe&&(this.code=Xe),Wt&&(this.config=Wt),In&&(this.request=In),fr&&(this.response=fr,this.status=fr.status?fr.status:null)}h_.inherits(AxiosError,Error,{toJSON:function toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h_.toJSONObject(this.config),code:this.code,status:this.status}}});const p_=AxiosError.prototype,f_={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((u=>{f_[u]={value:u}})),Object.defineProperties(AxiosError,f_),Object.defineProperty(p_,"isAxiosError",{value:!0}),AxiosError.from=(u,Xe,Wt,In,fr,_r)=>{const wr=Object.create(p_);return h_.toFlatObject(u,wr,(function filter(u){return u!==Error.prototype}),(u=>"isAxiosError"!==u)),AxiosError.call(wr,u.message,Xe,Wt,In,fr),wr.cause=u,wr.name=u.name,_r&&Object.assign(wr,_r),wr};var m_=AxiosError;function isVisitable(u){return h_.isPlainObject(u)||h_.isArray(u)}function removeBrackets(u){return h_.endsWith(u,"[]")?u.slice(0,-2):u}function renderKey(u,Xe,Wt){return u?u.concat(Xe).map((function each(u,Xe){return u=removeBrackets(u),!Wt&&Xe?"["+u+"]":u})).join(Wt?".":""):Xe}const g_=h_.toFlatObject(h_,{},null,(function filter(u){return/^is[A-Z]/.test(u)}));var y_=function toFormData(u,Xe,Wt){if(!h_.isObject(u))throw new TypeError("target must be an object");Xe=Xe||new FormData;const In=(Wt=h_.toFlatObject(Wt,{metaTokens:!0,dots:!1,indexes:!1},!1,(function defined(u,Xe){return!h_.isUndefined(Xe[u])}))).metaTokens,fr=Wt.visitor||defaultVisitor,_r=Wt.dots,wr=Wt.indexes,Ar=(Wt.Blob||"undefined"!=typeof Blob&&Blob)&&h_.isSpecCompliantForm(Xe);if(!h_.isFunction(fr))throw new TypeError("visitor must be a function");function convertValue(u){if(null===u)return"";if(h_.isDate(u))return u.toISOString();if(!Ar&&h_.isBlob(u))throw new m_("Blob is not supported. Use a Buffer instead.");return h_.isArrayBuffer(u)||h_.isTypedArray(u)?Ar&&"function"==typeof Blob?new Blob([u]):Buffer.from(u):u}function defaultVisitor(u,Wt,fr){let Ar=u;if(u&&!fr&&"object"==typeof u)if(h_.endsWith(Wt,"{}"))Wt=In?Wt:Wt.slice(0,-2),u=JSON.stringify(u);else if(h_.isArray(u)&&function isFlatArray(u){return h_.isArray(u)&&!u.some(isVisitable)}(u)||(h_.isFileList(u)||h_.endsWith(Wt,"[]"))&&(Ar=h_.toArray(u)))return Wt=removeBrackets(Wt),Ar.forEach((function each(u,In){!h_.isUndefined(u)&&null!==u&&Xe.append(!0===wr?renderKey([Wt],In,_r):null===wr?Wt:Wt+"[]",convertValue(u))})),!1;return!!isVisitable(u)||(Xe.append(renderKey(fr,Wt,_r),convertValue(u)),!1)}const Kr=[],no=Object.assign(g_,{defaultVisitor,convertValue,isVisitable});if(!h_.isObject(u))throw new TypeError("data must be an object");return function build(u,Wt){if(!h_.isUndefined(u)){if(-1!==Kr.indexOf(u))throw Error("Circular reference detected in "+Wt.join("."));Kr.push(u),h_.forEach(u,(function each(u,In){!0===(!(h_.isUndefined(u)||null===u)&&fr.call(Xe,u,h_.isString(In)?In.trim():In,Wt,no))&&build(u,Wt?Wt.concat(In):[In])})),Kr.pop()}}(u),Xe};function encode(u){const Xe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(u).replace(/[!'()~]|%20|%00/g,(function replacer(u){return Xe[u]}))}function AxiosURLSearchParams(u,Xe){this._pairs=[],u&&y_(u,this,Xe)}const v_=AxiosURLSearchParams.prototype;v_.append=function append(u,Xe){this._pairs.push([u,Xe])},v_.toString=function toString(u){const Xe=u?function(Xe){return u.call(this,Xe,encode)}:encode;return this._pairs.map((function each(u){return Xe(u[0])+"="+Xe(u[1])}),"").join("&")};var b_=AxiosURLSearchParams;function buildURL_encode(u){return encodeURIComponent(u).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(u,Xe,Wt){if(!Xe)return u;const In=Wt&&Wt.encode||buildURL_encode,fr=Wt&&Wt.serialize;let _r;if(_r=fr?fr(Xe,Wt):h_.isURLSearchParams(Xe)?Xe.toString():new b_(Xe,Wt).toString(In),_r){const Xe=u.indexOf("#");-1!==Xe&&(u=u.slice(0,Xe)),u+=(-1===u.indexOf("?")?"?":"&")+_r}return u}var x_=class InterceptorManager{constructor(){this.handlers=[]}use(u,Xe,Wt){return this.handlers.push({fulfilled:u,rejected:Xe,synchronous:!!Wt&&Wt.synchronous,runWhen:Wt?Wt.runWhen:null}),this.handlers.length-1}eject(u){this.handlers[u]&&(this.handlers[u]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(u){h_.forEach(this.handlers,(function forEachHandler(Xe){null!==Xe&&u(Xe)}))}},w_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},S_={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:b_,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const k_="undefined"!=typeof window&&"undefined"!=typeof document,A_="object"==typeof navigator&&navigator||void 0,T_=k_&&(!A_||["ReactNative","NativeScript","NS"].indexOf(A_.product)<0),C_="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,E_=k_&&window.location.href||"http://localhost";var P_={...u,...S_};var I_=function formDataToJSON(u){function buildPath(u,Xe,Wt,In){let fr=u[In++];if("__proto__"===fr)return!0;const _r=Number.isFinite(+fr),wr=In>=u.length;if(fr=!fr&&h_.isArray(Wt)?Wt.length:fr,wr)return h_.hasOwnProp(Wt,fr)?Wt[fr]=[Wt[fr],Xe]:Wt[fr]=Xe,!_r;Wt[fr]&&h_.isObject(Wt[fr])||(Wt[fr]=[]);return buildPath(u,Xe,Wt[fr],In)&&h_.isArray(Wt[fr])&&(Wt[fr]=function arrayToObject(u){const Xe={},Wt=Object.keys(u);let In;const fr=Wt.length;let _r;for(In=0;In<fr;In++)_r=Wt[In],Xe[_r]=u[_r];return Xe}(Wt[fr])),!_r}if(h_.isFormData(u)&&h_.isFunction(u.entries)){const Xe={};return h_.forEachEntry(u,((u,Wt)=>{buildPath(function parsePropPath(u){return h_.matchAll(/\w+|\[(\w*)]/g,u).map((u=>"[]"===u[0]?"":u[1]||u[0]))}(u),Wt,Xe,0)})),Xe}return null};const M_={transitional:w_,adapter:["xhr","http","fetch"],transformRequest:[function transformRequest(u,Xe){const Wt=Xe.getContentType()||"",In=Wt.indexOf("application/json")>-1,fr=h_.isObject(u);fr&&h_.isHTMLForm(u)&&(u=new FormData(u));if(h_.isFormData(u))return In?JSON.stringify(I_(u)):u;if(h_.isArrayBuffer(u)||h_.isBuffer(u)||h_.isStream(u)||h_.isFile(u)||h_.isBlob(u)||h_.isReadableStream(u))return u;if(h_.isArrayBufferView(u))return u.buffer;if(h_.isURLSearchParams(u))return Xe.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),u.toString();let _r;if(fr){if(Wt.indexOf("application/x-www-form-urlencoded")>-1)return function toURLEncodedForm(u,Xe){return y_(u,new P_.classes.URLSearchParams,Object.assign({visitor:function(u,Xe,Wt,In){return P_.isNode&&h_.isBuffer(u)?(this.append(Xe,u.toString("base64")),!1):In.defaultVisitor.apply(this,arguments)}},Xe))}(u,this.formSerializer).toString();if((_r=h_.isFileList(u))||Wt.indexOf("multipart/form-data")>-1){const Xe=this.env&&this.env.FormData;return y_(_r?{"files[]":u}:u,Xe&&new Xe,this.formSerializer)}}return fr||In?(Xe.setContentType("application/json",!1),function stringifySafely(u,Xe,Wt){if(h_.isString(u))try{return(Xe||JSON.parse)(u),h_.trim(u)}catch(u){if("SyntaxError"!==u.name)throw u}return(Wt||JSON.stringify)(u)}(u)):u}],transformResponse:[function transformResponse(u){const Xe=this.transitional||M_.transitional,Wt=Xe&&Xe.forcedJSONParsing,In="json"===this.responseType;if(h_.isResponse(u)||h_.isReadableStream(u))return u;if(u&&h_.isString(u)&&(Wt&&!this.responseType||In)){const Wt=!(Xe&&Xe.silentJSONParsing)&&In;try{return JSON.parse(u)}catch(u){if(Wt){if("SyntaxError"===u.name)throw m_.from(u,m_.ERR_BAD_RESPONSE,this,null,this.response);throw u}}}return u}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:P_.classes.FormData,Blob:P_.classes.Blob},validateStatus:function validateStatus(u){return u>=200&&u<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h_.forEach(["delete","get","head","post","put","patch"],(u=>{M_.headers[u]={}}));var R_=M_;const z_=h_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const O_=Symbol("internals");function normalizeHeader(u){return u&&String(u).trim().toLowerCase()}function normalizeValue(u){return!1===u||null==u?u:h_.isArray(u)?u.map(normalizeValue):String(u)}function matchHeaderValue(u,Xe,Wt,In,fr){return h_.isFunction(In)?In.call(this,Xe,Wt):(fr&&(Xe=Wt),h_.isString(Xe)?h_.isString(In)?-1!==Xe.indexOf(In):h_.isRegExp(In)?In.test(Xe):void 0:void 0)}class AxiosHeaders{constructor(u){u&&this.set(u)}set(u,Xe,Wt){const In=this;function setHeader(u,Xe,Wt){const fr=normalizeHeader(Xe);if(!fr)throw new Error("header name must be a non-empty string");const _r=h_.findKey(In,fr);(!_r||void 0===In[_r]||!0===Wt||void 0===Wt&&!1!==In[_r])&&(In[_r||Xe]=normalizeValue(u))}const setHeaders=(u,Xe)=>h_.forEach(u,((u,Wt)=>setHeader(u,Wt,Xe)));if(h_.isPlainObject(u)||u instanceof this.constructor)setHeaders(u,Xe);else if(h_.isString(u)&&(u=u.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(u.trim()))setHeaders((u=>{const Xe={};let Wt,In,fr;return u&&u.split("\n").forEach((function parser(u){fr=u.indexOf(":"),Wt=u.substring(0,fr).trim().toLowerCase(),In=u.substring(fr+1).trim(),!Wt||Xe[Wt]&&z_[Wt]||("set-cookie"===Wt?Xe[Wt]?Xe[Wt].push(In):Xe[Wt]=[In]:Xe[Wt]=Xe[Wt]?Xe[Wt]+", "+In:In)})),Xe})(u),Xe);else if(h_.isHeaders(u))for(const[Xe,In]of u.entries())setHeader(In,Xe,Wt);else null!=u&&setHeader(Xe,u,Wt);return this}get(u,Xe){if(u=normalizeHeader(u)){const Wt=h_.findKey(this,u);if(Wt){const u=this[Wt];if(!Xe)return u;if(!0===Xe)return function parseTokens(u){const Xe=Object.create(null),Wt=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let In;for(;In=Wt.exec(u);)Xe[In[1]]=In[2];return Xe}(u);if(h_.isFunction(Xe))return Xe.call(this,u,Wt);if(h_.isRegExp(Xe))return Xe.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(u,Xe){if(u=normalizeHeader(u)){const Wt=h_.findKey(this,u);return!(!Wt||void 0===this[Wt]||Xe&&!matchHeaderValue(0,this[Wt],Wt,Xe))}return!1}delete(u,Xe){const Wt=this;let In=!1;function deleteHeader(u){if(u=normalizeHeader(u)){const fr=h_.findKey(Wt,u);!fr||Xe&&!matchHeaderValue(0,Wt[fr],fr,Xe)||(delete Wt[fr],In=!0)}}return h_.isArray(u)?u.forEach(deleteHeader):deleteHeader(u),In}clear(u){const Xe=Object.keys(this);let Wt=Xe.length,In=!1;for(;Wt--;){const fr=Xe[Wt];u&&!matchHeaderValue(0,this[fr],fr,u,!0)||(delete this[fr],In=!0)}return In}normalize(u){const Xe=this,Wt={};return h_.forEach(this,((In,fr)=>{const _r=h_.findKey(Wt,fr);if(_r)return Xe[_r]=normalizeValue(In),void delete Xe[fr];const wr=u?function formatHeader(u){return u.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((u,Xe,Wt)=>Xe.toUpperCase()+Wt))}(fr):String(fr).trim();wr!==fr&&delete Xe[fr],Xe[wr]=normalizeValue(In),Wt[wr]=!0})),this}concat(...u){return this.constructor.concat(this,...u)}toJSON(u){const Xe=Object.create(null);return h_.forEach(this,((Wt,In)=>{null!=Wt&&!1!==Wt&&(Xe[In]=u&&h_.isArray(Wt)?Wt.join(", "):Wt)})),Xe}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([u,Xe])=>u+": "+Xe)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(u){return u instanceof this?u:new this(u)}static concat(u,...Xe){const Wt=new this(u);return Xe.forEach((u=>Wt.set(u))),Wt}static accessor(u){const Xe=(this[O_]=this[O_]={accessors:{}}).accessors,Wt=this.prototype;function defineAccessor(u){const In=normalizeHeader(u);Xe[In]||(!function buildAccessors(u,Xe){const Wt=h_.toCamelCase(" "+Xe);["get","set","has"].forEach((In=>{Object.defineProperty(u,In+Wt,{value:function(u,Wt,fr){return this[In].call(this,Xe,u,Wt,fr)},configurable:!0})}))}(Wt,u),Xe[In]=!0)}return h_.isArray(u)?u.forEach(defineAccessor):defineAccessor(u),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h_.reduceDescriptors(AxiosHeaders.prototype,(({value:u},Xe)=>{let Wt=Xe[0].toUpperCase()+Xe.slice(1);return{get:()=>u,set(u){this[Wt]=u}}})),h_.freezeMethods(AxiosHeaders);var L_=AxiosHeaders;function transformData(u,Xe){const Wt=this||R_,In=Xe||Wt,fr=L_.from(In.headers);let _r=In.data;return h_.forEach(u,(function transform(u){_r=u.call(Wt,_r,fr.normalize(),Xe?Xe.status:void 0)})),fr.normalize(),_r}function isCancel(u){return!(!u||!u.__CANCEL__)}function CanceledError(u,Xe,Wt){m_.call(this,null==u?"canceled":u,m_.ERR_CANCELED,Xe,Wt),this.name="CanceledError"}h_.inherits(CanceledError,m_,{__CANCEL__:!0});var D_=CanceledError;function settle(u,Xe,Wt){const In=Wt.config.validateStatus;Wt.status&&In&&!In(Wt.status)?Xe(new m_("Request failed with status code "+Wt.status,[m_.ERR_BAD_REQUEST,m_.ERR_BAD_RESPONSE][Math.floor(Wt.status/100)-4],Wt.config,Wt.request,Wt)):u(Wt)}var F_=function speedometer(u,Xe){u=u||10;const Wt=new Array(u),In=new Array(u);let fr,_r=0,wr=0;return Xe=void 0!==Xe?Xe:1e3,function push(Ar){const Kr=Date.now(),no=In[wr];fr||(fr=Kr),Wt[_r]=Ar,In[_r]=Kr;let io=wr,oo=0;for(;io!==_r;)oo+=Wt[io++],io%=u;if(_r=(_r+1)%u,_r===wr&&(wr=(wr+1)%u),Kr-fr<Xe)return;const ao=no&&Kr-no;return ao?Math.round(1e3*oo/ao):void 0}};var B_=function throttle(u,Xe){let Wt,In,fr=0,_r=1e3/Xe;const invoke=(Xe,_r=Date.now())=>{fr=_r,Wt=null,In&&(clearTimeout(In),In=null),u.apply(null,Xe)};return[(...u)=>{const Xe=Date.now(),wr=Xe-fr;wr>=_r?invoke(u,Xe):(Wt=u,In||(In=setTimeout((()=>{In=null,invoke(Wt)}),_r-wr)))},()=>Wt&&invoke(Wt)]};const progressEventReducer=(u,Xe,Wt=3)=>{let In=0;const fr=F_(50,250);return B_((Wt=>{const _r=Wt.loaded,wr=Wt.lengthComputable?Wt.total:void 0,Ar=_r-In,Kr=fr(Ar);In=_r;u({loaded:_r,total:wr,progress:wr?_r/wr:void 0,bytes:Ar,rate:Kr||void 0,estimated:Kr&&wr&&_r<=wr?(wr-_r)/Kr:void 0,event:Wt,lengthComputable:null!=wr,[Xe?"download":"upload"]:!0})}),Wt)},progressEventDecorator=(u,Xe)=>{const Wt=null!=u;return[In=>Xe[0]({lengthComputable:Wt,total:u,loaded:In}),Xe[1]]},asyncDecorator=u=>(...Xe)=>h_.asap((()=>u(...Xe)));var j_=P_.hasStandardBrowserEnv?function standardBrowserEnv(){const u=P_.navigator&&/(msie|trident)/i.test(P_.navigator.userAgent),Xe=document.createElement("a");let Wt;function resolveURL(Wt){let In=Wt;return u&&(Xe.setAttribute("href",In),In=Xe.href),Xe.setAttribute("href",In),{href:Xe.href,protocol:Xe.protocol?Xe.protocol.replace(/:$/,""):"",host:Xe.host,search:Xe.search?Xe.search.replace(/^\?/,""):"",hash:Xe.hash?Xe.hash.replace(/^#/,""):"",hostname:Xe.hostname,port:Xe.port,pathname:"/"===Xe.pathname.charAt(0)?Xe.pathname:"/"+Xe.pathname}}return Wt=resolveURL(window.location.href),function isURLSameOrigin(u){const Xe=h_.isString(u)?resolveURL(u):u;return Xe.protocol===Wt.protocol&&Xe.host===Wt.host}}():function isURLSameOrigin(){return!0},N_=P_.hasStandardBrowserEnv?{write(u,Xe,Wt,In,fr,_r){const wr=[u+"="+encodeURIComponent(Xe)];h_.isNumber(Wt)&&wr.push("expires="+new Date(Wt).toGMTString()),h_.isString(In)&&wr.push("path="+In),h_.isString(fr)&&wr.push("domain="+fr),!0===_r&&wr.push("secure"),document.cookie=wr.join("; ")},read(u){const Xe=document.cookie.match(new RegExp("(^|;\\s*)("+u+")=([^;]*)"));return Xe?decodeURIComponent(Xe[3]):null},remove(u){this.write(u,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function buildFullPath(u,Xe){return u&&!function isAbsoluteURL(u){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(u)}(Xe)?function combineURLs(u,Xe){return Xe?u.replace(/\/?\/$/,"")+"/"+Xe.replace(/^\/+/,""):u}(u,Xe):Xe}const headersToObject=u=>u instanceof L_?{...u}:u;function mergeConfig(u,Xe){Xe=Xe||{};const Wt={};function getMergedValue(u,Xe,Wt){return h_.isPlainObject(u)&&h_.isPlainObject(Xe)?h_.merge.call({caseless:Wt},u,Xe):h_.isPlainObject(Xe)?h_.merge({},Xe):h_.isArray(Xe)?Xe.slice():Xe}function mergeDeepProperties(u,Xe,Wt){return h_.isUndefined(Xe)?h_.isUndefined(u)?void 0:getMergedValue(void 0,u,Wt):getMergedValue(u,Xe,Wt)}function valueFromConfig2(u,Xe){if(!h_.isUndefined(Xe))return getMergedValue(void 0,Xe)}function defaultToConfig2(u,Xe){return h_.isUndefined(Xe)?h_.isUndefined(u)?void 0:getMergedValue(void 0,u):getMergedValue(void 0,Xe)}function mergeDirectKeys(Wt,In,fr){return fr in Xe?getMergedValue(Wt,In):fr in u?getMergedValue(void 0,Wt):void 0}const In={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,withXSRFToken:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(u,Xe)=>mergeDeepProperties(headersToObject(u),headersToObject(Xe),!0)};return h_.forEach(Object.keys(Object.assign({},u,Xe)),(function computeConfigValue(fr){const _r=In[fr]||mergeDeepProperties,wr=_r(u[fr],Xe[fr],fr);h_.isUndefined(wr)&&_r!==mergeDirectKeys||(Wt[fr]=wr)})),Wt}var resolveConfig=u=>{const Xe=mergeConfig({},u);let Wt,{data:In,withXSRFToken:fr,xsrfHeaderName:_r,xsrfCookieName:wr,headers:Ar,auth:Kr}=Xe;if(Xe.headers=Ar=L_.from(Ar),Xe.url=buildURL(buildFullPath(Xe.baseURL,Xe.url),u.params,u.paramsSerializer),Kr&&Ar.set("Authorization","Basic "+btoa((Kr.username||"")+":"+(Kr.password?unescape(encodeURIComponent(Kr.password)):""))),h_.isFormData(In))if(P_.hasStandardBrowserEnv||P_.hasStandardBrowserWebWorkerEnv)Ar.setContentType(void 0);else if(!1!==(Wt=Ar.getContentType())){const[u,...Xe]=Wt?Wt.split(";").map((u=>u.trim())).filter(Boolean):[];Ar.setContentType([u||"multipart/form-data",...Xe].join("; "))}if(P_.hasStandardBrowserEnv&&(fr&&h_.isFunction(fr)&&(fr=fr(Xe)),fr||!1!==fr&&j_(Xe.url))){const u=_r&&wr&&N_.read(wr);u&&Ar.set(_r,u)}return Xe};var V_="undefined"!=typeof XMLHttpRequest&&function(u){return new Promise((function dispatchXhrRequest(Xe,Wt){const In=resolveConfig(u);let fr=In.data;const _r=L_.from(In.headers).normalize();let wr,Ar,Kr,no,io,{responseType:oo,onUploadProgress:ao,onDownloadProgress:so}=In;function done(){no&&no(),io&&io(),In.cancelToken&&In.cancelToken.unsubscribe(wr),In.signal&&In.signal.removeEventListener("abort",wr)}let co=new XMLHttpRequest;function onloadend(){if(!co)return;const In=L_.from("getAllResponseHeaders"in co&&co.getAllResponseHeaders());settle((function _resolve(u){Xe(u),done()}),(function _reject(u){Wt(u),done()}),{data:oo&&"text"!==oo&&"json"!==oo?co.response:co.responseText,status:co.status,statusText:co.statusText,headers:In,config:u,request:co}),co=null}co.open(In.method.toUpperCase(),In.url,!0),co.timeout=In.timeout,"onloadend"in co?co.onloadend=onloadend:co.onreadystatechange=function handleLoad(){co&&4===co.readyState&&(0!==co.status||co.responseURL&&0===co.responseURL.indexOf("file:"))&&setTimeout(onloadend)},co.onabort=function handleAbort(){co&&(Wt(new m_("Request aborted",m_.ECONNABORTED,u,co)),co=null)},co.onerror=function handleError(){Wt(new m_("Network Error",m_.ERR_NETWORK,u,co)),co=null},co.ontimeout=function handleTimeout(){let Xe=In.timeout?"timeout of "+In.timeout+"ms exceeded":"timeout exceeded";const fr=In.transitional||w_;In.timeoutErrorMessage&&(Xe=In.timeoutErrorMessage),Wt(new m_(Xe,fr.clarifyTimeoutError?m_.ETIMEDOUT:m_.ECONNABORTED,u,co)),co=null},void 0===fr&&_r.setContentType(null),"setRequestHeader"in co&&h_.forEach(_r.toJSON(),(function setRequestHeader(u,Xe){co.setRequestHeader(Xe,u)})),h_.isUndefined(In.withCredentials)||(co.withCredentials=!!In.withCredentials),oo&&"json"!==oo&&(co.responseType=In.responseType),so&&([Kr,io]=progressEventReducer(so,!0),co.addEventListener("progress",Kr)),ao&&co.upload&&([Ar,no]=progressEventReducer(ao),co.upload.addEventListener("progress",Ar),co.upload.addEventListener("loadend",no)),(In.cancelToken||In.signal)&&(wr=Xe=>{co&&(Wt(!Xe||Xe.type?new D_(null,u,co):Xe),co.abort(),co=null)},In.cancelToken&&In.cancelToken.subscribe(wr),In.signal&&(In.signal.aborted?wr():In.signal.addEventListener("abort",wr)));const ho=function parseProtocol(u){const Xe=/^([-+\w]{1,25})(:?\/\/|:)/.exec(u);return Xe&&Xe[1]||""}(In.url);ho&&-1===P_.protocols.indexOf(ho)?Wt(new m_("Unsupported protocol "+ho+":",m_.ERR_BAD_REQUEST,u)):co.send(fr||null)}))};var helpers_composeSignals=(u,Xe)=>{const{length:Wt}=u=u?u.filter(Boolean):[];if(Xe||Wt){let Wt,In=new AbortController;const onabort=function(u){if(!Wt){Wt=!0,unsubscribe();const Xe=u instanceof Error?u:this.reason;In.abort(Xe instanceof m_?Xe:new D_(Xe instanceof Error?Xe.message:Xe))}};let fr=Xe&&setTimeout((()=>{fr=null,onabort(new m_(`timeout ${Xe} of ms exceeded`,m_.ETIMEDOUT))}),Xe);const unsubscribe=()=>{u&&(fr&&clearTimeout(fr),fr=null,u.forEach((u=>{u.unsubscribe?u.unsubscribe(onabort):u.removeEventListener("abort",onabort)})),u=null)};u.forEach((u=>u.addEventListener("abort",onabort)));const{signal:_r}=In;return _r.unsubscribe=()=>h_.asap(unsubscribe),_r}};const streamChunk=function*(u,Xe){let Wt=u.byteLength;if(!Xe||Wt<Xe)return void(yield u);let In,fr=0;for(;fr<Wt;)In=fr+Xe,yield u.slice(fr,In),fr=In},readStream=async function*(u){if(u[Symbol.asyncIterator])return void(yield*u);const Xe=u.getReader();try{for(;;){const{done:u,value:Wt}=await Xe.read();if(u)break;yield Wt}}finally{await Xe.cancel()}},trackStream=(u,Xe,Wt,In)=>{const fr=async function*(u,Xe){for await(const Wt of readStream(u))yield*streamChunk(Wt,Xe)}(u,Xe);let _r,wr=0,_onFinish=u=>{_r||(_r=!0,In&&In(u))};return new ReadableStream({async pull(u){try{const{done:Xe,value:In}=await fr.next();if(Xe)return _onFinish(),void u.close();let _r=In.byteLength;if(Wt){let u=wr+=_r;Wt(u)}u.enqueue(new Uint8Array(In))}catch(u){throw _onFinish(u),u}},cancel:u=>(_onFinish(u),fr.return())},{highWaterMark:2})},U_="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,$_=U_&&"function"==typeof ReadableStream,W_=U_&&("function"==typeof TextEncoder?(q_=new TextEncoder,u=>q_.encode(u)):async u=>new Uint8Array(await new Response(u).arrayBuffer()));var q_;const test=(u,...Xe)=>{try{return!!u(...Xe)}catch(u){return!1}},Z_=$_&&test((()=>{let u=!1;const Xe=new Request(P_.origin,{body:new ReadableStream,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!Xe})),H_=$_&&test((()=>h_.isReadableStream(new Response("").body))),G_={stream:H_&&(u=>u.body)};var K_;U_&&(K_=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((u=>{!G_[u]&&(G_[u]=h_.isFunction(K_[u])?Xe=>Xe[u]():(Xe,Wt)=>{throw new m_(`Response type '${u}' is not supported`,m_.ERR_NOT_SUPPORT,Wt)})})));const resolveBodyLength=async(u,Xe)=>{const Wt=h_.toFiniteNumber(u.getContentLength());return null==Wt?(async u=>{if(null==u)return 0;if(h_.isBlob(u))return u.size;if(h_.isSpecCompliantForm(u)){const Xe=new Request(P_.origin,{method:"POST",body:u});return(await Xe.arrayBuffer()).byteLength}return h_.isArrayBufferView(u)||h_.isArrayBuffer(u)?u.byteLength:(h_.isURLSearchParams(u)&&(u+=""),h_.isString(u)?(await W_(u)).byteLength:void 0)})(Xe):Wt};var X_=U_&&(async u=>{let{url:Xe,method:Wt,data:In,signal:fr,cancelToken:_r,timeout:wr,onDownloadProgress:Ar,onUploadProgress:Kr,responseType:no,headers:io,withCredentials:oo="same-origin",fetchOptions:ao}=resolveConfig(u);no=no?(no+"").toLowerCase():"text";let so,co=helpers_composeSignals([fr,_r&&_r.toAbortSignal()],wr);const ho=co&&co.unsubscribe&&(()=>{co.unsubscribe()});let go;try{if(Kr&&Z_&&"get"!==Wt&&"head"!==Wt&&0!==(go=await resolveBodyLength(io,In))){let u,Wt=new Request(Xe,{method:"POST",body:In,duplex:"half"});if(h_.isFormData(In)&&(u=Wt.headers.get("content-type"))&&io.setContentType(u),Wt.body){const[u,Xe]=progressEventDecorator(go,progressEventReducer(asyncDecorator(Kr)));In=trackStream(Wt.body,65536,u,Xe)}}h_.isString(oo)||(oo=oo?"include":"omit");const fr="credentials"in Request.prototype;so=new Request(Xe,{...ao,signal:co,method:Wt.toUpperCase(),headers:io.normalize().toJSON(),body:In,duplex:"half",credentials:fr?oo:void 0});let _r=await fetch(so);const wr=H_&&("stream"===no||"response"===no);if(H_&&(Ar||wr&&ho)){const u={};["status","statusText","headers"].forEach((Xe=>{u[Xe]=_r[Xe]}));const Xe=h_.toFiniteNumber(_r.headers.get("content-length")),[Wt,In]=Ar&&progressEventDecorator(Xe,progressEventReducer(asyncDecorator(Ar),!0))||[];_r=new Response(trackStream(_r.body,65536,Wt,(()=>{In&&In(),ho&&ho()})),u)}no=no||"text";let xo=await G_[h_.findKey(G_,no)||"text"](_r,u);return!wr&&ho&&ho(),await new Promise(((Xe,Wt)=>{settle(Xe,Wt,{data:xo,headers:L_.from(_r.headers),status:_r.status,statusText:_r.statusText,config:u,request:so})}))}catch(Xe){if(ho&&ho(),Xe&&"TypeError"===Xe.name&&/fetch/i.test(Xe.message))throw Object.assign(new m_("Network Error",m_.ERR_NETWORK,u,so),{cause:Xe.cause||Xe});throw m_.from(Xe,Xe&&Xe.code,u,so)}});const Y_={http:null,xhr:V_,fetch:X_};h_.forEach(Y_,((u,Xe)=>{if(u){try{Object.defineProperty(u,"name",{value:Xe})}catch(u){}Object.defineProperty(u,"adapterName",{value:Xe})}}));const renderReason=u=>`- ${u}`,isResolvedHandle=u=>h_.isFunction(u)||null===u||!1===u;var adapters_getAdapter=u=>{u=h_.isArray(u)?u:[u];const{length:Xe}=u;let Wt,In;const fr={};for(let _r=0;_r<Xe;_r++){let Xe;if(Wt=u[_r],In=Wt,!isResolvedHandle(Wt)&&(In=Y_[(Xe=String(Wt)).toLowerCase()],void 0===In))throw new m_(`Unknown adapter '${Xe}'`);if(In)break;fr[Xe||"#"+_r]=In}if(!In){const u=Object.entries(fr).map((([u,Xe])=>`adapter ${u} `+(!1===Xe?"is not supported by the environment":"is not available in the build")));let Wt=Xe?u.length>1?"since :\n"+u.map(renderReason).join("\n"):" "+renderReason(u[0]):"as no adapter specified";throw new m_("There is no suitable adapter to dispatch the request "+Wt,"ERR_NOT_SUPPORT")}return In};function throwIfCancellationRequested(u){if(u.cancelToken&&u.cancelToken.throwIfRequested(),u.signal&&u.signal.aborted)throw new D_(null,u)}function dispatchRequest(u){throwIfCancellationRequested(u),u.headers=L_.from(u.headers),u.data=transformData.call(u,u.transformRequest),-1!==["post","put","patch"].indexOf(u.method)&&u.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters_getAdapter(u.adapter||R_.adapter)(u).then((function onAdapterResolution(Xe){return throwIfCancellationRequested(u),Xe.data=transformData.call(u,u.transformResponse,Xe),Xe.headers=L_.from(Xe.headers),Xe}),(function onAdapterRejection(Xe){return isCancel(Xe)||(throwIfCancellationRequested(u),Xe&&Xe.response&&(Xe.response.data=transformData.call(u,u.transformResponse,Xe.response),Xe.response.headers=L_.from(Xe.response.headers))),Promise.reject(Xe)}))}const J_="1.7.7",Q_={};["object","boolean","number","function","string","symbol"].forEach(((u,Xe)=>{Q_[u]=function validator(Wt){return typeof Wt===u||"a"+(Xe<1?"n ":" ")+u}}));const ev={};Q_.transitional=function transitional(u,Xe,Wt){function formatMessage(u,Xe){return"[Axios v1.7.7] Transitional option '"+u+"'"+Xe+(Wt?". "+Wt:"")}return(Wt,In,fr)=>{if(!1===u)throw new m_(formatMessage(In," has been removed"+(Xe?" in "+Xe:"")),m_.ERR_DEPRECATED);return Xe&&!ev[In]&&(ev[In]=!0,console.warn(formatMessage(In," has been deprecated since v"+Xe+" and will be removed in the near future"))),!u||u(Wt,In,fr)}};var tv={assertOptions:function assertOptions(u,Xe,Wt){if("object"!=typeof u)throw new m_("options must be an object",m_.ERR_BAD_OPTION_VALUE);const In=Object.keys(u);let fr=In.length;for(;fr-- >0;){const _r=In[fr],wr=Xe[_r];if(wr){const Xe=u[_r],Wt=void 0===Xe||wr(Xe,_r,u);if(!0!==Wt)throw new m_("option "+_r+" must be "+Wt,m_.ERR_BAD_OPTION_VALUE)}else if(!0!==Wt)throw new m_("Unknown option "+_r,m_.ERR_BAD_OPTION)}},validators:Q_};const nv=tv.validators;class Axios{constructor(u){this.defaults=u,this.interceptors={request:new x_,response:new x_}}async request(u,Xe){try{return await this._request(u,Xe)}catch(u){if(u instanceof Error){let Xe;Error.captureStackTrace?Error.captureStackTrace(Xe={}):Xe=new Error;const Wt=Xe.stack?Xe.stack.replace(/^.+\n/,""):"";try{u.stack?Wt&&!String(u.stack).endsWith(Wt.replace(/^.+\n.+\n/,""))&&(u.stack+="\n"+Wt):u.stack=Wt}catch(u){}}throw u}}_request(u,Xe){"string"==typeof u?(Xe=Xe||{}).url=u:Xe=u||{},Xe=mergeConfig(this.defaults,Xe);const{transitional:Wt,paramsSerializer:In,headers:fr}=Xe;void 0!==Wt&&tv.assertOptions(Wt,{silentJSONParsing:nv.transitional(nv.boolean),forcedJSONParsing:nv.transitional(nv.boolean),clarifyTimeoutError:nv.transitional(nv.boolean)},!1),null!=In&&(h_.isFunction(In)?Xe.paramsSerializer={serialize:In}:tv.assertOptions(In,{encode:nv.function,serialize:nv.function},!0)),Xe.method=(Xe.method||this.defaults.method||"get").toLowerCase();let _r=fr&&h_.merge(fr.common,fr[Xe.method]);fr&&h_.forEach(["delete","get","head","post","put","patch","common"],(u=>{delete fr[u]})),Xe.headers=L_.concat(_r,fr);const wr=[];let Ar=!0;this.interceptors.request.forEach((function unshiftRequestInterceptors(u){"function"==typeof u.runWhen&&!1===u.runWhen(Xe)||(Ar=Ar&&u.synchronous,wr.unshift(u.fulfilled,u.rejected))}));const Kr=[];let no;this.interceptors.response.forEach((function pushResponseInterceptors(u){Kr.push(u.fulfilled,u.rejected)}));let io,oo=0;if(!Ar){const u=[dispatchRequest.bind(this),void 0];for(u.unshift.apply(u,wr),u.push.apply(u,Kr),io=u.length,no=Promise.resolve(Xe);oo<io;)no=no.then(u[oo++],u[oo++]);return no}io=wr.length;let ao=Xe;for(oo=0;oo<io;){const u=wr[oo++],Xe=wr[oo++];try{ao=u(ao)}catch(u){Xe.call(this,u);break}}try{no=dispatchRequest.call(this,ao)}catch(u){return Promise.reject(u)}for(oo=0,io=Kr.length;oo<io;)no=no.then(Kr[oo++],Kr[oo++]);return no}getUri(u){return buildURL(buildFullPath((u=mergeConfig(this.defaults,u)).baseURL,u.url),u.params,u.paramsSerializer)}}h_.forEach(["delete","get","head","options"],(function forEachMethodNoData(u){Axios.prototype[u]=function(Xe,Wt){return this.request(mergeConfig(Wt||{},{method:u,url:Xe,data:(Wt||{}).data}))}})),h_.forEach(["post","put","patch"],(function forEachMethodWithData(u){function generateHTTPMethod(Xe){return function httpMethod(Wt,In,fr){return this.request(mergeConfig(fr||{},{method:u,headers:Xe?{"Content-Type":"multipart/form-data"}:{},url:Wt,data:In}))}}Axios.prototype[u]=generateHTTPMethod(),Axios.prototype[u+"Form"]=generateHTTPMethod(!0)}));var rv=Axios;class CancelToken{constructor(u){if("function"!=typeof u)throw new TypeError("executor must be a function.");let Xe;this.promise=new Promise((function promiseExecutor(u){Xe=u}));const Wt=this;this.promise.then((u=>{if(!Wt._listeners)return;let Xe=Wt._listeners.length;for(;Xe-- >0;)Wt._listeners[Xe](u);Wt._listeners=null})),this.promise.then=u=>{let Xe;const In=new Promise((u=>{Wt.subscribe(u),Xe=u})).then(u);return In.cancel=function reject(){Wt.unsubscribe(Xe)},In},u((function cancel(u,In,fr){Wt.reason||(Wt.reason=new D_(u,In,fr),Xe(Wt.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(u){this.reason?u(this.reason):this._listeners?this._listeners.push(u):this._listeners=[u]}unsubscribe(u){if(!this._listeners)return;const Xe=this._listeners.indexOf(u);-1!==Xe&&this._listeners.splice(Xe,1)}toAbortSignal(){const u=new AbortController,abort=Xe=>{u.abort(Xe)};return this.subscribe(abort),u.signal.unsubscribe=()=>this.unsubscribe(abort),u.signal}static source(){let u;const Xe=new CancelToken((function executor(Xe){u=Xe}));return{token:Xe,cancel:u}}}var iv=CancelToken;const ov={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ov).forEach((([u,Xe])=>{ov[Xe]=u}));var av=ov;const sv=function createInstance(u){const Xe=new rv(u),Wt=bind(rv.prototype.request,Xe);return h_.extend(Wt,rv.prototype,Xe,{allOwnKeys:!0}),h_.extend(Wt,Xe,null,{allOwnKeys:!0}),Wt.create=function create(Xe){return createInstance(mergeConfig(u,Xe))},Wt}(R_);sv.Axios=rv,sv.CanceledError=D_,sv.CancelToken=iv,sv.isCancel=isCancel,sv.VERSION=J_,sv.toFormData=y_,sv.AxiosError=m_,sv.Cancel=sv.CanceledError,sv.all=function all(u){return Promise.all(u)},sv.spread=function spread(u){return function wrap(Xe){return u.apply(null,Xe)}},sv.isAxiosError=function isAxiosError(u){return h_.isObject(u)&&!0===u.isAxiosError},sv.mergeConfig=mergeConfig,sv.AxiosHeaders=L_,sv.formToJSON=u=>I_(h_.isHTMLForm(u)?new FormData(u):u),sv.getAdapter=adapters_getAdapter,sv.HttpStatusCode=av,sv.default=sv;var lv=sv;const cv={isAuthenticated:function(){var u=this;return new Promise(function(Xe,In){var fr=this;_newArrowCheck(this,u),lv.get(`${Wt}/auth`,{withCredentials:!0}).then(function(u){_newArrowCheck(this,fr),Xe(200===u.status)}.bind(this)).catch(function(u){_newArrowCheck(this,fr),console.warn("User is not logged into Jakarto\n",u),Xe(!1)}.bind(this))}.bind(this))},login:function(u,Xe){var In=this;return new Promise(function(fr,_r){var wr=this;_newArrowCheck(this,In);const Ar=new FormData;Ar.append("email",u),Ar.append("password",Xe),fetch(`${Wt}/users/login`,{headers:{"content-type":"application/x-www-form-urlencoded"},body:Ar,method:"POST",mode:"cors",credentials:"include",redirect:"manual"}).then(function(){_newArrowCheck(this,wr),fr()}.bind(this)).catch(function(u){_newArrowCheck(this,wr),console.error(u),_r()}.bind(this))}.bind(this))}};var uv,dv;!function(u){u.assertEqual=u=>u,u.assertIs=function assertIs(u){},u.assertNever=function assertNever(u){throw new Error},u.arrayToEnum=u=>{const Xe={};for(const Wt of u)Xe[Wt]=Wt;return Xe},u.getValidEnumValues=Xe=>{const Wt=u.objectKeys(Xe).filter((u=>"number"!=typeof Xe[Xe[u]])),In={};for(const u of Wt)In[u]=Xe[u];return u.objectValues(In)},u.objectValues=Xe=>u.objectKeys(Xe).map((function(u){return Xe[u]})),u.objectKeys="function"==typeof Object.keys?u=>Object.keys(u):u=>{const Xe=[];for(const Wt in u)Object.prototype.hasOwnProperty.call(u,Wt)&&Xe.push(Wt);return Xe},u.find=(u,Xe)=>{for(const Wt of u)if(Xe(Wt))return Wt},u.isInteger="function"==typeof Number.isInteger?u=>Number.isInteger(u):u=>"number"==typeof u&&isFinite(u)&&Math.floor(u)===u,u.joinValues=function joinValues(u,Xe=" | "){return u.map((u=>"string"==typeof u?`'${u}'`:u)).join(Xe)},u.jsonStringifyReplacer=(u,Xe)=>"bigint"==typeof Xe?Xe.toString():Xe}(uv||(uv={})),function(u){u.mergeShapes=(u,Xe)=>({...u,...Xe})}(dv||(dv={}));const hv=uv.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=u=>{switch(typeof u){case"undefined":return hv.undefined;case"string":return hv.string;case"number":return isNaN(u)?hv.nan:hv.number;case"boolean":return hv.boolean;case"function":return hv.function;case"bigint":return hv.bigint;case"symbol":return hv.symbol;case"object":return Array.isArray(u)?hv.array:null===u?hv.null:u.then&&"function"==typeof u.then&&u.catch&&"function"==typeof u.catch?hv.promise:"undefined"!=typeof Map&&u instanceof Map?hv.map:"undefined"!=typeof Set&&u instanceof Set?hv.set:"undefined"!=typeof Date&&u instanceof Date?hv.date:hv.object;default:return hv.unknown}},pv=uv.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ZodError extends Error{constructor(u){super(),this.issues=[],this.addIssue=u=>{this.issues=[...this.issues,u]},this.addIssues=(u=[])=>{this.issues=[...this.issues,...u]};const Xe=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,Xe):this.__proto__=Xe,this.name="ZodError",this.issues=u}get errors(){return this.issues}format(u){const Xe=u||function(u){return u.message},Wt={_errors:[]},processError=u=>{for(const In of u.issues)if("invalid_union"===In.code)In.unionErrors.map(processError);else if("invalid_return_type"===In.code)processError(In.returnTypeError);else if("invalid_arguments"===In.code)processError(In.argumentsError);else if(0===In.path.length)Wt._errors.push(Xe(In));else{let u=Wt,fr=0;for(;fr<In.path.length;){const Wt=In.path[fr];fr===In.path.length-1?(u[Wt]=u[Wt]||{_errors:[]},u[Wt]._errors.push(Xe(In))):u[Wt]=u[Wt]||{_errors:[]},u=u[Wt],fr++}}};return processError(this),Wt}static assert(u){if(!(u instanceof ZodError))throw new Error(`Not a ZodError: ${u}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,uv.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(u=u=>u.message){const Xe={},Wt=[];for(const In of this.issues)In.path.length>0?(Xe[In.path[0]]=Xe[In.path[0]]||[],Xe[In.path[0]].push(u(In))):Wt.push(u(In));return{formErrors:Wt,fieldErrors:Xe}}get formErrors(){return this.flatten()}}ZodError.create=u=>new ZodError(u);const errorMap=(u,Xe)=>{let Wt;switch(u.code){case pv.invalid_type:Wt=u.received===hv.undefined?"Required":`Expected ${u.expected}, received ${u.received}`;break;case pv.invalid_literal:Wt=`Invalid literal value, expected ${JSON.stringify(u.expected,uv.jsonStringifyReplacer)}`;break;case pv.unrecognized_keys:Wt=`Unrecognized key(s) in object: ${uv.joinValues(u.keys,", ")}`;break;case pv.invalid_union:Wt="Invalid input";break;case pv.invalid_union_discriminator:Wt=`Invalid discriminator value. Expected ${uv.joinValues(u.options)}`;break;case pv.invalid_enum_value:Wt=`Invalid enum value. Expected ${uv.joinValues(u.options)}, received '${u.received}'`;break;case pv.invalid_arguments:Wt="Invalid function arguments";break;case pv.invalid_return_type:Wt="Invalid function return type";break;case pv.invalid_date:Wt="Invalid date";break;case pv.invalid_string:"object"==typeof u.validation?"includes"in u.validation?(Wt=`Invalid input: must include "${u.validation.includes}"`,"number"==typeof u.validation.position&&(Wt=`${Wt} at one or more positions greater than or equal to ${u.validation.position}`)):"startsWith"in u.validation?Wt=`Invalid input: must start with "${u.validation.startsWith}"`:"endsWith"in u.validation?Wt=`Invalid input: must end with "${u.validation.endsWith}"`:uv.assertNever(u.validation):Wt="regex"!==u.validation?`Invalid ${u.validation}`:"Invalid";break;case pv.too_small:Wt="array"===u.type?`Array must contain ${u.exact?"exactly":u.inclusive?"at least":"more than"} ${u.minimum} element(s)`:"string"===u.type?`String must contain ${u.exact?"exactly":u.inclusive?"at least":"over"} ${u.minimum} character(s)`:"number"===u.type?`Number must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${u.minimum}`:"date"===u.type?`Date must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(u.minimum))}`:"Invalid input";break;case pv.too_big:Wt="array"===u.type?`Array must contain ${u.exact?"exactly":u.inclusive?"at most":"less than"} ${u.maximum} element(s)`:"string"===u.type?`String must contain ${u.exact?"exactly":u.inclusive?"at most":"under"} ${u.maximum} character(s)`:"number"===u.type?`Number must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:"bigint"===u.type?`BigInt must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:"date"===u.type?`Date must be ${u.exact?"exactly":u.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(u.maximum))}`:"Invalid input";break;case pv.custom:Wt="Invalid input";break;case pv.invalid_intersection_types:Wt="Intersection results could not be merged";break;case pv.not_multiple_of:Wt=`Number must be a multiple of ${u.multipleOf}`;break;case pv.not_finite:Wt="Number must be finite";break;default:Wt=Xe.defaultError,uv.assertNever(u)}return{message:Wt}};let fv=errorMap;function getErrorMap(){return fv}const makeIssue=u=>{const{data:Xe,path:Wt,errorMaps:In,issueData:fr}=u,_r=[...Wt,...fr.path||[]],wr={...fr,path:_r};if(void 0!==fr.message)return{...fr,path:_r,message:fr.message};let Ar="";const Kr=In.filter((u=>!!u)).slice().reverse();for(const u of Kr)Ar=u(wr,{data:Xe,defaultError:Ar}).message;return{...fr,path:_r,message:Ar}};function addIssueToContext(u,Xe){const Wt=getErrorMap(),In=makeIssue({issueData:Xe,data:u.data,path:u.path,errorMaps:[u.common.contextualErrorMap,u.schemaErrorMap,Wt,Wt===errorMap?void 0:errorMap].filter((u=>!!u))});u.common.issues.push(In)}class ParseStatus{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(u,Xe){const Wt=[];for(const In of Xe){if("aborted"===In.status)return mv;"dirty"===In.status&&u.dirty(),Wt.push(In.value)}return{status:u.value,value:Wt}}static async mergeObjectAsync(u,Xe){const Wt=[];for(const u of Xe){const Xe=await u.key,In=await u.value;Wt.push({key:Xe,value:In})}return ParseStatus.mergeObjectSync(u,Wt)}static mergeObjectSync(u,Xe){const Wt={};for(const In of Xe){const{key:Xe,value:fr}=In;if("aborted"===Xe.status)return mv;if("aborted"===fr.status)return mv;"dirty"===Xe.status&&u.dirty(),"dirty"===fr.status&&u.dirty(),"__proto__"===Xe.value||void 0===fr.value&&!In.alwaysSet||(Wt[Xe.value]=fr.value)}return{status:u.value,value:Wt}}}const mv=Object.freeze({status:"aborted"}),DIRTY=u=>({status:"dirty",value:u}),OK=u=>({status:"valid",value:u}),isAborted=u=>"aborted"===u.status,isDirty=u=>"dirty"===u.status,isValid=u=>"valid"===u.status,isAsync=u=>"undefined"!=typeof Promise&&u instanceof Promise;function __classPrivateFieldGet(u,Xe,Wt,In){if("a"===Wt&&!In)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof Xe?u!==Xe||!In:!Xe.has(u))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===Wt?In:"a"===Wt?In.call(u):In?In.value:Xe.get(u)}function __classPrivateFieldSet(u,Xe,Wt,In,fr){if("m"===In)throw new TypeError("Private method is not writable");if("a"===In&&!fr)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof Xe?u!==Xe||!fr:!Xe.has(u))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===In?fr.call(u,Wt):fr?fr.value=Wt:Xe.set(u,Wt),Wt}var gv,yv,_v;"function"==typeof SuppressedError&&SuppressedError,function(u){u.errToObj=u=>"string"==typeof u?{message:u}:u||{},u.toString=u=>"string"==typeof u?u:null==u?void 0:u.message}(gv||(gv={}));class ParseInputLazyPath{constructor(u,Xe,Wt,In){this._cachedPath=[],this.parent=u,this.data=Xe,this._path=Wt,this._key=In}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(u,Xe)=>{if(isValid(Xe))return{success:!0,data:Xe.value};if(!u.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const Xe=new ZodError(u.common.issues);return this._error=Xe,this._error}}};function processCreateParams(u){if(!u)return{};const{errorMap:Xe,invalid_type_error:Wt,required_error:In,description:fr}=u;if(Xe&&(Wt||In))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(Xe)return{errorMap:Xe,description:fr};return{errorMap:(Xe,fr)=>{var _r,wr;const{message:Ar}=u;return"invalid_enum_value"===Xe.code?{message:null!=Ar?Ar:fr.defaultError}:void 0===fr.data?{message:null!==(_r=null!=Ar?Ar:In)&&void 0!==_r?_r:fr.defaultError}:"invalid_type"!==Xe.code?{message:fr.defaultError}:{message:null!==(wr=null!=Ar?Ar:Wt)&&void 0!==wr?wr:fr.defaultError}},description:fr}}class ZodType{constructor(u){this.spa=this.safeParseAsync,this._def=u,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(u){return getParsedType(u.data)}_getOrReturnCtx(u,Xe){return Xe||{common:u.parent.common,data:u.data,parsedType:getParsedType(u.data),schemaErrorMap:this._def.errorMap,path:u.path,parent:u.parent}}_processInputParams(u){return{status:new ParseStatus,ctx:{common:u.parent.common,data:u.data,parsedType:getParsedType(u.data),schemaErrorMap:this._def.errorMap,path:u.path,parent:u.parent}}}_parseSync(u){const Xe=this._parse(u);if(isAsync(Xe))throw new Error("Synchronous parse encountered promise.");return Xe}_parseAsync(u){const Xe=this._parse(u);return Promise.resolve(Xe)}parse(u,Xe){const Wt=this.safeParse(u,Xe);if(Wt.success)return Wt.data;throw Wt.error}safeParse(u,Xe){var Wt;const In={common:{issues:[],async:null!==(Wt=null==Xe?void 0:Xe.async)&&void 0!==Wt&&Wt,contextualErrorMap:null==Xe?void 0:Xe.errorMap},path:(null==Xe?void 0:Xe.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:u,parsedType:getParsedType(u)},fr=this._parseSync({data:u,path:In.path,parent:In});return handleResult(In,fr)}async parseAsync(u,Xe){const Wt=await this.safeParseAsync(u,Xe);if(Wt.success)return Wt.data;throw Wt.error}async safeParseAsync(u,Xe){const Wt={common:{issues:[],contextualErrorMap:null==Xe?void 0:Xe.errorMap,async:!0},path:(null==Xe?void 0:Xe.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:u,parsedType:getParsedType(u)},In=this._parse({data:u,path:Wt.path,parent:Wt}),fr=await(isAsync(In)?In:Promise.resolve(In));return handleResult(Wt,fr)}refine(u,Xe){const getIssueProperties=u=>"string"==typeof Xe||void 0===Xe?{message:Xe}:"function"==typeof Xe?Xe(u):Xe;return this._refinement(((Xe,Wt)=>{const In=u(Xe),setError=()=>Wt.addIssue({code:pv.custom,...getIssueProperties(Xe)});return"undefined"!=typeof Promise&&In instanceof Promise?In.then((u=>!!u||(setError(),!1))):!!In||(setError(),!1)}))}refinement(u,Xe){return this._refinement(((Wt,In)=>!!u(Wt)||(In.addIssue("function"==typeof Xe?Xe(Wt,In):Xe),!1)))}_refinement(u){return new ZodEffects({schema:this,typeName:Rv.ZodEffects,effect:{type:"refinement",refinement:u}})}superRefine(u){return this._refinement(u)}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this,this._def)}promise(){return ZodPromise.create(this,this._def)}or(u){return ZodUnion.create([this,u],this._def)}and(u){return ZodIntersection.create(this,u,this._def)}transform(u){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:Rv.ZodEffects,effect:{type:"transform",transform:u}})}default(u){const Xe="function"==typeof u?u:()=>u;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:Xe,typeName:Rv.ZodDefault})}brand(){return new ZodBranded({typeName:Rv.ZodBranded,type:this,...processCreateParams(this._def)})}catch(u){const Xe="function"==typeof u?u:()=>u;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:Xe,typeName:Rv.ZodCatch})}describe(u){return new(0,this.constructor)({...this._def,description:u})}pipe(u){return ZodPipeline.create(this,u)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const vv=/^c[^\s-]{8,}$/i,bv=/^[0-9a-z]+$/,xv=/^[0-9A-HJKMNP-TV-Z]{26}$/,wv=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Sv=/^[a-z0-9_-]{21}$/i,kv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Av=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Tv;const Cv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ev=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Pv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Iv="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Mv=new RegExp(`^${Iv}$`);function timeRegexSource(u){let Xe="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return u.precision?Xe=`${Xe}\\.\\d{${u.precision}}`:null==u.precision&&(Xe=`${Xe}(\\.\\d+)?`),Xe}function datetimeRegex(u){let Xe=`${Iv}T${timeRegexSource(u)}`;const Wt=[];return Wt.push(u.local?"Z?":"Z"),u.offset&&Wt.push("([+-]\\d{2}:?\\d{2})"),Xe=`${Xe}(${Wt.join("|")})`,new RegExp(`^${Xe}$`)}class ZodString extends ZodType{_parse(u){this._def.coerce&&(u.data=String(u.data));if(this._getType(u)!==hv.string){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.string,received:Xe.parsedType}),mv}const Xe=new ParseStatus;let Wt;for(const _r of this._def.checks)if("min"===_r.kind)u.data.length<_r.value&&(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.too_small,minimum:_r.value,type:"string",inclusive:!0,exact:!1,message:_r.message}),Xe.dirty());else if("max"===_r.kind)u.data.length>_r.value&&(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.too_big,maximum:_r.value,type:"string",inclusive:!0,exact:!1,message:_r.message}),Xe.dirty());else if("length"===_r.kind){const In=u.data.length>_r.value,fr=u.data.length<_r.value;(In||fr)&&(Wt=this._getOrReturnCtx(u,Wt),In?addIssueToContext(Wt,{code:pv.too_big,maximum:_r.value,type:"string",inclusive:!0,exact:!0,message:_r.message}):fr&&addIssueToContext(Wt,{code:pv.too_small,minimum:_r.value,type:"string",inclusive:!0,exact:!0,message:_r.message}),Xe.dirty())}else if("email"===_r.kind)Av.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"email",code:pv.invalid_string,message:_r.message}),Xe.dirty());else if("emoji"===_r.kind)Tv||(Tv=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Tv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"emoji",code:pv.invalid_string,message:_r.message}),Xe.dirty());else if("uuid"===_r.kind)wv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"uuid",code:pv.invalid_string,message:_r.message}),Xe.dirty());else if("nanoid"===_r.kind)Sv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"nanoid",code:pv.invalid_string,message:_r.message}),Xe.dirty());else if("cuid"===_r.kind)vv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"cuid",code:pv.invalid_string,message:_r.message}),Xe.dirty());else if("cuid2"===_r.kind)bv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"cuid2",code:pv.invalid_string,message:_r.message}),Xe.dirty());else if("ulid"===_r.kind)xv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"ulid",code:pv.invalid_string,message:_r.message}),Xe.dirty());else if("url"===_r.kind)try{new URL(u.data)}catch(In){Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"url",code:pv.invalid_string,message:_r.message}),Xe.dirty()}else if("regex"===_r.kind){_r.regex.lastIndex=0;_r.regex.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"regex",code:pv.invalid_string,message:_r.message}),Xe.dirty())}else if("trim"===_r.kind)u.data=u.data.trim();else if("includes"===_r.kind)u.data.includes(_r.value,_r.position)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:{includes:_r.value,position:_r.position},message:_r.message}),Xe.dirty());else if("toLowerCase"===_r.kind)u.data=u.data.toLowerCase();else if("toUpperCase"===_r.kind)u.data=u.data.toUpperCase();else if("startsWith"===_r.kind)u.data.startsWith(_r.value)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:{startsWith:_r.value},message:_r.message}),Xe.dirty());else if("endsWith"===_r.kind)u.data.endsWith(_r.value)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:{endsWith:_r.value},message:_r.message}),Xe.dirty());else if("datetime"===_r.kind){datetimeRegex(_r).test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:"datetime",message:_r.message}),Xe.dirty())}else if("date"===_r.kind){Mv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:"date",message:_r.message}),Xe.dirty())}else if("time"===_r.kind){new RegExp(`^${timeRegexSource(_r)}$`).test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:"time",message:_r.message}),Xe.dirty())}else"duration"===_r.kind?kv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"duration",code:pv.invalid_string,message:_r.message}),Xe.dirty()):"ip"===_r.kind?(In=u.data,("v4"!==(fr=_r.version)&&fr||!Cv.test(In))&&("v6"!==fr&&fr||!Ev.test(In))&&(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"ip",code:pv.invalid_string,message:_r.message}),Xe.dirty())):"base64"===_r.kind?Pv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"base64",code:pv.invalid_string,message:_r.message}),Xe.dirty()):uv.assertNever(_r);var In,fr;return{status:Xe.value,value:u.data}}_regex(u,Xe,Wt){return this.refinement((Xe=>u.test(Xe)),{validation:Xe,code:pv.invalid_string,...gv.errToObj(Wt)})}_addCheck(u){return new ZodString({...this._def,checks:[...this._def.checks,u]})}email(u){return this._addCheck({kind:"email",...gv.errToObj(u)})}url(u){return this._addCheck({kind:"url",...gv.errToObj(u)})}emoji(u){return this._addCheck({kind:"emoji",...gv.errToObj(u)})}uuid(u){return this._addCheck({kind:"uuid",...gv.errToObj(u)})}nanoid(u){return this._addCheck({kind:"nanoid",...gv.errToObj(u)})}cuid(u){return this._addCheck({kind:"cuid",...gv.errToObj(u)})}cuid2(u){return this._addCheck({kind:"cuid2",...gv.errToObj(u)})}ulid(u){return this._addCheck({kind:"ulid",...gv.errToObj(u)})}base64(u){return this._addCheck({kind:"base64",...gv.errToObj(u)})}ip(u){return this._addCheck({kind:"ip",...gv.errToObj(u)})}datetime(u){var Xe,Wt;return"string"==typeof u?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:u}):this._addCheck({kind:"datetime",precision:void 0===(null==u?void 0:u.precision)?null:null==u?void 0:u.precision,offset:null!==(Xe=null==u?void 0:u.offset)&&void 0!==Xe&&Xe,local:null!==(Wt=null==u?void 0:u.local)&&void 0!==Wt&&Wt,...gv.errToObj(null==u?void 0:u.message)})}date(u){return this._addCheck({kind:"date",message:u})}time(u){return"string"==typeof u?this._addCheck({kind:"time",precision:null,message:u}):this._addCheck({kind:"time",precision:void 0===(null==u?void 0:u.precision)?null:null==u?void 0:u.precision,...gv.errToObj(null==u?void 0:u.message)})}duration(u){return this._addCheck({kind:"duration",...gv.errToObj(u)})}regex(u,Xe){return this._addCheck({kind:"regex",regex:u,...gv.errToObj(Xe)})}includes(u,Xe){return this._addCheck({kind:"includes",value:u,position:null==Xe?void 0:Xe.position,...gv.errToObj(null==Xe?void 0:Xe.message)})}startsWith(u,Xe){return this._addCheck({kind:"startsWith",value:u,...gv.errToObj(Xe)})}endsWith(u,Xe){return this._addCheck({kind:"endsWith",value:u,...gv.errToObj(Xe)})}min(u,Xe){return this._addCheck({kind:"min",value:u,...gv.errToObj(Xe)})}max(u,Xe){return this._addCheck({kind:"max",value:u,...gv.errToObj(Xe)})}length(u,Xe){return this._addCheck({kind:"length",value:u,...gv.errToObj(Xe)})}nonempty(u){return this.min(1,gv.errToObj(u))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((u=>"datetime"===u.kind))}get isDate(){return!!this._def.checks.find((u=>"date"===u.kind))}get isTime(){return!!this._def.checks.find((u=>"time"===u.kind))}get isDuration(){return!!this._def.checks.find((u=>"duration"===u.kind))}get isEmail(){return!!this._def.checks.find((u=>"email"===u.kind))}get isURL(){return!!this._def.checks.find((u=>"url"===u.kind))}get isEmoji(){return!!this._def.checks.find((u=>"emoji"===u.kind))}get isUUID(){return!!this._def.checks.find((u=>"uuid"===u.kind))}get isNANOID(){return!!this._def.checks.find((u=>"nanoid"===u.kind))}get isCUID(){return!!this._def.checks.find((u=>"cuid"===u.kind))}get isCUID2(){return!!this._def.checks.find((u=>"cuid2"===u.kind))}get isULID(){return!!this._def.checks.find((u=>"ulid"===u.kind))}get isIP(){return!!this._def.checks.find((u=>"ip"===u.kind))}get isBase64(){return!!this._def.checks.find((u=>"base64"===u.kind))}get minLength(){let u=null;for(const Xe of this._def.checks)"min"===Xe.kind&&(null===u||Xe.value>u)&&(u=Xe.value);return u}get maxLength(){let u=null;for(const Xe of this._def.checks)"max"===Xe.kind&&(null===u||Xe.value<u)&&(u=Xe.value);return u}}function floatSafeRemainder(u,Xe){const Wt=(u.toString().split(".")[1]||"").length,In=(Xe.toString().split(".")[1]||"").length,fr=Wt>In?Wt:In;return parseInt(u.toFixed(fr).replace(".",""))%parseInt(Xe.toFixed(fr).replace(".",""))/Math.pow(10,fr)}ZodString.create=u=>{var Xe;return new ZodString({checks:[],typeName:Rv.ZodString,coerce:null!==(Xe=null==u?void 0:u.coerce)&&void 0!==Xe&&Xe,...processCreateParams(u)})};class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(u){this._def.coerce&&(u.data=Number(u.data));if(this._getType(u)!==hv.number){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.number,received:Xe.parsedType}),mv}let Xe;const Wt=new ParseStatus;for(const In of this._def.checks)if("int"===In.kind)uv.isInteger(u.data)||(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.invalid_type,expected:"integer",received:"float",message:In.message}),Wt.dirty());else if("min"===In.kind){(In.inclusive?u.data<In.value:u.data<=In.value)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.too_small,minimum:In.value,type:"number",inclusive:In.inclusive,exact:!1,message:In.message}),Wt.dirty())}else if("max"===In.kind){(In.inclusive?u.data>In.value:u.data>=In.value)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.too_big,maximum:In.value,type:"number",inclusive:In.inclusive,exact:!1,message:In.message}),Wt.dirty())}else"multipleOf"===In.kind?0!==floatSafeRemainder(u.data,In.value)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.not_multiple_of,multipleOf:In.value,message:In.message}),Wt.dirty()):"finite"===In.kind?Number.isFinite(u.data)||(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.not_finite,message:In.message}),Wt.dirty()):uv.assertNever(In);return{status:Wt.value,value:u.data}}gte(u,Xe){return this.setLimit("min",u,!0,gv.toString(Xe))}gt(u,Xe){return this.setLimit("min",u,!1,gv.toString(Xe))}lte(u,Xe){return this.setLimit("max",u,!0,gv.toString(Xe))}lt(u,Xe){return this.setLimit("max",u,!1,gv.toString(Xe))}setLimit(u,Xe,Wt,In){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:u,value:Xe,inclusive:Wt,message:gv.toString(In)}]})}_addCheck(u){return new ZodNumber({...this._def,checks:[...this._def.checks,u]})}int(u){return this._addCheck({kind:"int",message:gv.toString(u)})}positive(u){return this._addCheck({kind:"min",value:0,inclusive:!1,message:gv.toString(u)})}negative(u){return this._addCheck({kind:"max",value:0,inclusive:!1,message:gv.toString(u)})}nonpositive(u){return this._addCheck({kind:"max",value:0,inclusive:!0,message:gv.toString(u)})}nonnegative(u){return this._addCheck({kind:"min",value:0,inclusive:!0,message:gv.toString(u)})}multipleOf(u,Xe){return this._addCheck({kind:"multipleOf",value:u,message:gv.toString(Xe)})}finite(u){return this._addCheck({kind:"finite",message:gv.toString(u)})}safe(u){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:gv.toString(u)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:gv.toString(u)})}get minValue(){let u=null;for(const Xe of this._def.checks)"min"===Xe.kind&&(null===u||Xe.value>u)&&(u=Xe.value);return u}get maxValue(){let u=null;for(const Xe of this._def.checks)"max"===Xe.kind&&(null===u||Xe.value<u)&&(u=Xe.value);return u}get isInt(){return!!this._def.checks.find((u=>"int"===u.kind||"multipleOf"===u.kind&&uv.isInteger(u.value)))}get isFinite(){let u=null,Xe=null;for(const Wt of this._def.checks){if("finite"===Wt.kind||"int"===Wt.kind||"multipleOf"===Wt.kind)return!0;"min"===Wt.kind?(null===Xe||Wt.value>Xe)&&(Xe=Wt.value):"max"===Wt.kind&&(null===u||Wt.value<u)&&(u=Wt.value)}return Number.isFinite(Xe)&&Number.isFinite(u)}}ZodNumber.create=u=>new ZodNumber({checks:[],typeName:Rv.ZodNumber,coerce:(null==u?void 0:u.coerce)||!1,...processCreateParams(u)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(u){this._def.coerce&&(u.data=BigInt(u.data));if(this._getType(u)!==hv.bigint){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.bigint,received:Xe.parsedType}),mv}let Xe;const Wt=new ParseStatus;for(const In of this._def.checks)if("min"===In.kind){(In.inclusive?u.data<In.value:u.data<=In.value)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.too_small,type:"bigint",minimum:In.value,inclusive:In.inclusive,message:In.message}),Wt.dirty())}else if("max"===In.kind){(In.inclusive?u.data>In.value:u.data>=In.value)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.too_big,type:"bigint",maximum:In.value,inclusive:In.inclusive,message:In.message}),Wt.dirty())}else"multipleOf"===In.kind?u.data%In.value!==BigInt(0)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.not_multiple_of,multipleOf:In.value,message:In.message}),Wt.dirty()):uv.assertNever(In);return{status:Wt.value,value:u.data}}gte(u,Xe){return this.setLimit("min",u,!0,gv.toString(Xe))}gt(u,Xe){return this.setLimit("min",u,!1,gv.toString(Xe))}lte(u,Xe){return this.setLimit("max",u,!0,gv.toString(Xe))}lt(u,Xe){return this.setLimit("max",u,!1,gv.toString(Xe))}setLimit(u,Xe,Wt,In){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:u,value:Xe,inclusive:Wt,message:gv.toString(In)}]})}_addCheck(u){return new ZodBigInt({...this._def,checks:[...this._def.checks,u]})}positive(u){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:gv.toString(u)})}negative(u){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:gv.toString(u)})}nonpositive(u){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:gv.toString(u)})}nonnegative(u){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:gv.toString(u)})}multipleOf(u,Xe){return this._addCheck({kind:"multipleOf",value:u,message:gv.toString(Xe)})}get minValue(){let u=null;for(const Xe of this._def.checks)"min"===Xe.kind&&(null===u||Xe.value>u)&&(u=Xe.value);return u}get maxValue(){let u=null;for(const Xe of this._def.checks)"max"===Xe.kind&&(null===u||Xe.value<u)&&(u=Xe.value);return u}}ZodBigInt.create=u=>{var Xe;return new ZodBigInt({checks:[],typeName:Rv.ZodBigInt,coerce:null!==(Xe=null==u?void 0:u.coerce)&&void 0!==Xe&&Xe,...processCreateParams(u)})};class ZodBoolean extends ZodType{_parse(u){this._def.coerce&&(u.data=Boolean(u.data));if(this._getType(u)!==hv.boolean){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.boolean,received:Xe.parsedType}),mv}return OK(u.data)}}ZodBoolean.create=u=>new ZodBoolean({typeName:Rv.ZodBoolean,coerce:(null==u?void 0:u.coerce)||!1,...processCreateParams(u)});class ZodDate extends ZodType{_parse(u){this._def.coerce&&(u.data=new Date(u.data));if(this._getType(u)!==hv.date){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.date,received:Xe.parsedType}),mv}if(isNaN(u.data.getTime())){return addIssueToContext(this._getOrReturnCtx(u),{code:pv.invalid_date}),mv}const Xe=new ParseStatus;let Wt;for(const In of this._def.checks)"min"===In.kind?u.data.getTime()<In.value&&(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.too_small,message:In.message,inclusive:!0,exact:!1,minimum:In.value,type:"date"}),Xe.dirty()):"max"===In.kind?u.data.getTime()>In.value&&(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.too_big,message:In.message,inclusive:!0,exact:!1,maximum:In.value,type:"date"}),Xe.dirty()):uv.assertNever(In);return{status:Xe.value,value:new Date(u.data.getTime())}}_addCheck(u){return new ZodDate({...this._def,checks:[...this._def.checks,u]})}min(u,Xe){return this._addCheck({kind:"min",value:u.getTime(),message:gv.toString(Xe)})}max(u,Xe){return this._addCheck({kind:"max",value:u.getTime(),message:gv.toString(Xe)})}get minDate(){let u=null;for(const Xe of this._def.checks)"min"===Xe.kind&&(null===u||Xe.value>u)&&(u=Xe.value);return null!=u?new Date(u):null}get maxDate(){let u=null;for(const Xe of this._def.checks)"max"===Xe.kind&&(null===u||Xe.value<u)&&(u=Xe.value);return null!=u?new Date(u):null}}ZodDate.create=u=>new ZodDate({checks:[],coerce:(null==u?void 0:u.coerce)||!1,typeName:Rv.ZodDate,...processCreateParams(u)});class ZodSymbol extends ZodType{_parse(u){if(this._getType(u)!==hv.symbol){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.symbol,received:Xe.parsedType}),mv}return OK(u.data)}}ZodSymbol.create=u=>new ZodSymbol({typeName:Rv.ZodSymbol,...processCreateParams(u)});class ZodUndefined extends ZodType{_parse(u){if(this._getType(u)!==hv.undefined){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.undefined,received:Xe.parsedType}),mv}return OK(u.data)}}ZodUndefined.create=u=>new ZodUndefined({typeName:Rv.ZodUndefined,...processCreateParams(u)});class ZodNull extends ZodType{_parse(u){if(this._getType(u)!==hv.null){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.null,received:Xe.parsedType}),mv}return OK(u.data)}}ZodNull.create=u=>new ZodNull({typeName:Rv.ZodNull,...processCreateParams(u)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(u){return OK(u.data)}}ZodAny.create=u=>new ZodAny({typeName:Rv.ZodAny,...processCreateParams(u)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(u){return OK(u.data)}}ZodUnknown.create=u=>new ZodUnknown({typeName:Rv.ZodUnknown,...processCreateParams(u)});class ZodNever extends ZodType{_parse(u){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.never,received:Xe.parsedType}),mv}}ZodNever.create=u=>new ZodNever({typeName:Rv.ZodNever,...processCreateParams(u)});class ZodVoid extends ZodType{_parse(u){if(this._getType(u)!==hv.undefined){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.void,received:Xe.parsedType}),mv}return OK(u.data)}}ZodVoid.create=u=>new ZodVoid({typeName:Rv.ZodVoid,...processCreateParams(u)});class ZodArray extends ZodType{_parse(u){const{ctx:Xe,status:Wt}=this._processInputParams(u),In=this._def;if(Xe.parsedType!==hv.array)return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.array,received:Xe.parsedType}),mv;if(null!==In.exactLength){const u=Xe.data.length>In.exactLength.value,fr=Xe.data.length<In.exactLength.value;(u||fr)&&(addIssueToContext(Xe,{code:u?pv.too_big:pv.too_small,minimum:fr?In.exactLength.value:void 0,maximum:u?In.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:In.exactLength.message}),Wt.dirty())}if(null!==In.minLength&&Xe.data.length<In.minLength.value&&(addIssueToContext(Xe,{code:pv.too_small,minimum:In.minLength.value,type:"array",inclusive:!0,exact:!1,message:In.minLength.message}),Wt.dirty()),null!==In.maxLength&&Xe.data.length>In.maxLength.value&&(addIssueToContext(Xe,{code:pv.too_big,maximum:In.maxLength.value,type:"array",inclusive:!0,exact:!1,message:In.maxLength.message}),Wt.dirty()),Xe.common.async)return Promise.all([...Xe.data].map(((u,Wt)=>In.type._parseAsync(new ParseInputLazyPath(Xe,u,Xe.path,Wt))))).then((u=>ParseStatus.mergeArray(Wt,u)));const fr=[...Xe.data].map(((u,Wt)=>In.type._parseSync(new ParseInputLazyPath(Xe,u,Xe.path,Wt))));return ParseStatus.mergeArray(Wt,fr)}get element(){return this._def.type}min(u,Xe){return new ZodArray({...this._def,minLength:{value:u,message:gv.toString(Xe)}})}max(u,Xe){return new ZodArray({...this._def,maxLength:{value:u,message:gv.toString(Xe)}})}length(u,Xe){return new ZodArray({...this._def,exactLength:{value:u,message:gv.toString(Xe)}})}nonempty(u){return this.min(1,u)}}function deepPartialify(u){if(u instanceof ZodObject){const Xe={};for(const Wt in u.shape){const In=u.shape[Wt];Xe[Wt]=ZodOptional.create(deepPartialify(In))}return new ZodObject({...u._def,shape:()=>Xe})}return u instanceof ZodArray?new ZodArray({...u._def,type:deepPartialify(u.element)}):u instanceof ZodOptional?ZodOptional.create(deepPartialify(u.unwrap())):u instanceof ZodNullable?ZodNullable.create(deepPartialify(u.unwrap())):u instanceof ZodTuple?ZodTuple.create(u.items.map((u=>deepPartialify(u)))):u}ZodArray.create=(u,Xe)=>new ZodArray({type:u,minLength:null,maxLength:null,exactLength:null,typeName:Rv.ZodArray,...processCreateParams(Xe)});class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const u=this._def.shape(),Xe=uv.objectKeys(u);return this._cached={shape:u,keys:Xe}}_parse(u){if(this._getType(u)!==hv.object){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.object,received:Xe.parsedType}),mv}const{status:Xe,ctx:Wt}=this._processInputParams(u),{shape:In,keys:fr}=this._getCached(),_r=[];if(!(this._def.catchall instanceof ZodNever&&"strip"===this._def.unknownKeys))for(const u in Wt.data)fr.includes(u)||_r.push(u);const wr=[];for(const u of fr){const Xe=In[u],fr=Wt.data[u];wr.push({key:{status:"valid",value:u},value:Xe._parse(new ParseInputLazyPath(Wt,fr,Wt.path,u)),alwaysSet:u in Wt.data})}if(this._def.catchall instanceof ZodNever){const u=this._def.unknownKeys;if("passthrough"===u)for(const u of _r)wr.push({key:{status:"valid",value:u},value:{status:"valid",value:Wt.data[u]}});else if("strict"===u)_r.length>0&&(addIssueToContext(Wt,{code:pv.unrecognized_keys,keys:_r}),Xe.dirty());else if("strip"!==u)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const Xe of _r){const In=Wt.data[Xe];wr.push({key:{status:"valid",value:Xe},value:u._parse(new ParseInputLazyPath(Wt,In,Wt.path,Xe)),alwaysSet:Xe in Wt.data})}}return Wt.common.async?Promise.resolve().then((async()=>{const u=[];for(const Xe of wr){const Wt=await Xe.key,In=await Xe.value;u.push({key:Wt,value:In,alwaysSet:Xe.alwaysSet})}return u})).then((u=>ParseStatus.mergeObjectSync(Xe,u))):ParseStatus.mergeObjectSync(Xe,wr)}get shape(){return this._def.shape()}strict(u){return gv.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...void 0!==u?{errorMap:(Xe,Wt)=>{var In,fr,_r,wr;const Ar=null!==(_r=null===(fr=(In=this._def).errorMap)||void 0===fr?void 0:fr.call(In,Xe,Wt).message)&&void 0!==_r?_r:Wt.defaultError;return"unrecognized_keys"===Xe.code?{message:null!==(wr=gv.errToObj(u).message)&&void 0!==wr?wr:Ar}:{message:Ar}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(u){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...u})})}merge(u){return new ZodObject({unknownKeys:u._def.unknownKeys,catchall:u._def.catchall,shape:()=>({...this._def.shape(),...u._def.shape()}),typeName:Rv.ZodObject})}setKey(u,Xe){return this.augment({[u]:Xe})}catchall(u){return new ZodObject({...this._def,catchall:u})}pick(u){const Xe={};return uv.objectKeys(u).forEach((Wt=>{u[Wt]&&this.shape[Wt]&&(Xe[Wt]=this.shape[Wt])})),new ZodObject({...this._def,shape:()=>Xe})}omit(u){const Xe={};return uv.objectKeys(this.shape).forEach((Wt=>{u[Wt]||(Xe[Wt]=this.shape[Wt])})),new ZodObject({...this._def,shape:()=>Xe})}deepPartial(){return deepPartialify(this)}partial(u){const Xe={};return uv.objectKeys(this.shape).forEach((Wt=>{const In=this.shape[Wt];u&&!u[Wt]?Xe[Wt]=In:Xe[Wt]=In.optional()})),new ZodObject({...this._def,shape:()=>Xe})}required(u){const Xe={};return uv.objectKeys(this.shape).forEach((Wt=>{if(u&&!u[Wt])Xe[Wt]=this.shape[Wt];else{let u=this.shape[Wt];for(;u instanceof ZodOptional;)u=u._def.innerType;Xe[Wt]=u}})),new ZodObject({...this._def,shape:()=>Xe})}keyof(){return createZodEnum(uv.objectKeys(this.shape))}}ZodObject.create=(u,Xe)=>new ZodObject({shape:()=>u,unknownKeys:"strip",catchall:ZodNever.create(),typeName:Rv.ZodObject,...processCreateParams(Xe)}),ZodObject.strictCreate=(u,Xe)=>new ZodObject({shape:()=>u,unknownKeys:"strict",catchall:ZodNever.create(),typeName:Rv.ZodObject,...processCreateParams(Xe)}),ZodObject.lazycreate=(u,Xe)=>new ZodObject({shape:u,unknownKeys:"strip",catchall:ZodNever.create(),typeName:Rv.ZodObject,...processCreateParams(Xe)});class ZodUnion extends ZodType{_parse(u){const{ctx:Xe}=this._processInputParams(u),Wt=this._def.options;if(Xe.common.async)return Promise.all(Wt.map((async u=>{const Wt={...Xe,common:{...Xe.common,issues:[]},parent:null};return{result:await u._parseAsync({data:Xe.data,path:Xe.path,parent:Wt}),ctx:Wt}}))).then((function handleResults(u){for(const Xe of u)if("valid"===Xe.result.status)return Xe.result;for(const Wt of u)if("dirty"===Wt.result.status)return Xe.common.issues.push(...Wt.ctx.common.issues),Wt.result;const Wt=u.map((u=>new ZodError(u.ctx.common.issues)));return addIssueToContext(Xe,{code:pv.invalid_union,unionErrors:Wt}),mv}));{let u;const In=[];for(const fr of Wt){const Wt={...Xe,common:{...Xe.common,issues:[]},parent:null},_r=fr._parseSync({data:Xe.data,path:Xe.path,parent:Wt});if("valid"===_r.status)return _r;"dirty"!==_r.status||u||(u={result:_r,ctx:Wt}),Wt.common.issues.length&&In.push(Wt.common.issues)}if(u)return Xe.common.issues.push(...u.ctx.common.issues),u.result;const fr=In.map((u=>new ZodError(u)));return addIssueToContext(Xe,{code:pv.invalid_union,unionErrors:fr}),mv}}get options(){return this._def.options}}ZodUnion.create=(u,Xe)=>new ZodUnion({options:u,typeName:Rv.ZodUnion,...processCreateParams(Xe)});function mergeValues(u,Xe){const Wt=getParsedType(u),In=getParsedType(Xe);if(u===Xe)return{valid:!0,data:u};if(Wt===hv.object&&In===hv.object){const Wt=uv.objectKeys(Xe),In=uv.objectKeys(u).filter((u=>-1!==Wt.indexOf(u))),fr={...u,...Xe};for(const Wt of In){const In=mergeValues(u[Wt],Xe[Wt]);if(!In.valid)return{valid:!1};fr[Wt]=In.data}return{valid:!0,data:fr}}if(Wt===hv.array&&In===hv.array){if(u.length!==Xe.length)return{valid:!1};const Wt=[];for(let In=0;In<u.length;In++){const fr=mergeValues(u[In],Xe[In]);if(!fr.valid)return{valid:!1};Wt.push(fr.data)}return{valid:!0,data:Wt}}return Wt===hv.date&&In===hv.date&&+u==+Xe?{valid:!0,data:u}:{valid:!1}}class ZodIntersection extends ZodType{_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u),handleParsed=(u,In)=>{if(isAborted(u)||isAborted(In))return mv;const fr=mergeValues(u.value,In.value);return fr.valid?((isDirty(u)||isDirty(In))&&Xe.dirty(),{status:Xe.value,value:fr.data}):(addIssueToContext(Wt,{code:pv.invalid_intersection_types}),mv)};return Wt.common.async?Promise.all([this._def.left._parseAsync({data:Wt.data,path:Wt.path,parent:Wt}),this._def.right._parseAsync({data:Wt.data,path:Wt.path,parent:Wt})]).then((([u,Xe])=>handleParsed(u,Xe))):handleParsed(this._def.left._parseSync({data:Wt.data,path:Wt.path,parent:Wt}),this._def.right._parseSync({data:Wt.data,path:Wt.path,parent:Wt}))}}ZodIntersection.create=(u,Xe,Wt)=>new ZodIntersection({left:u,right:Xe,typeName:Rv.ZodIntersection,...processCreateParams(Wt)});class ZodTuple extends ZodType{_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u);if(Wt.parsedType!==hv.array)return addIssueToContext(Wt,{code:pv.invalid_type,expected:hv.array,received:Wt.parsedType}),mv;if(Wt.data.length<this._def.items.length)return addIssueToContext(Wt,{code:pv.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),mv;!this._def.rest&&Wt.data.length>this._def.items.length&&(addIssueToContext(Wt,{code:pv.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Xe.dirty());const In=[...Wt.data].map(((u,Xe)=>{const In=this._def.items[Xe]||this._def.rest;return In?In._parse(new ParseInputLazyPath(Wt,u,Wt.path,Xe)):null})).filter((u=>!!u));return Wt.common.async?Promise.all(In).then((u=>ParseStatus.mergeArray(Xe,u))):ParseStatus.mergeArray(Xe,In)}get items(){return this._def.items}rest(u){return new ZodTuple({...this._def,rest:u})}}ZodTuple.create=(u,Xe)=>{if(!Array.isArray(u))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:u,typeName:Rv.ZodTuple,rest:null,...processCreateParams(Xe)})};class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u);if(Wt.parsedType!==hv.map)return addIssueToContext(Wt,{code:pv.invalid_type,expected:hv.map,received:Wt.parsedType}),mv;const In=this._def.keyType,fr=this._def.valueType,_r=[...Wt.data.entries()].map((([u,Xe],_r)=>({key:In._parse(new ParseInputLazyPath(Wt,u,Wt.path,[_r,"key"])),value:fr._parse(new ParseInputLazyPath(Wt,Xe,Wt.path,[_r,"value"]))})));if(Wt.common.async){const u=new Map;return Promise.resolve().then((async()=>{for(const Wt of _r){const In=await Wt.key,fr=await Wt.value;if("aborted"===In.status||"aborted"===fr.status)return mv;"dirty"!==In.status&&"dirty"!==fr.status||Xe.dirty(),u.set(In.value,fr.value)}return{status:Xe.value,value:u}}))}{const u=new Map;for(const Wt of _r){const In=Wt.key,fr=Wt.value;if("aborted"===In.status||"aborted"===fr.status)return mv;"dirty"!==In.status&&"dirty"!==fr.status||Xe.dirty(),u.set(In.value,fr.value)}return{status:Xe.value,value:u}}}}ZodMap.create=(u,Xe,Wt)=>new ZodMap({valueType:Xe,keyType:u,typeName:Rv.ZodMap,...processCreateParams(Wt)});class ZodSet extends ZodType{_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u);if(Wt.parsedType!==hv.set)return addIssueToContext(Wt,{code:pv.invalid_type,expected:hv.set,received:Wt.parsedType}),mv;const In=this._def;null!==In.minSize&&Wt.data.size<In.minSize.value&&(addIssueToContext(Wt,{code:pv.too_small,minimum:In.minSize.value,type:"set",inclusive:!0,exact:!1,message:In.minSize.message}),Xe.dirty()),null!==In.maxSize&&Wt.data.size>In.maxSize.value&&(addIssueToContext(Wt,{code:pv.too_big,maximum:In.maxSize.value,type:"set",inclusive:!0,exact:!1,message:In.maxSize.message}),Xe.dirty());const fr=this._def.valueType;function finalizeSet(u){const Wt=new Set;for(const In of u){if("aborted"===In.status)return mv;"dirty"===In.status&&Xe.dirty(),Wt.add(In.value)}return{status:Xe.value,value:Wt}}const _r=[...Wt.data.values()].map(((u,Xe)=>fr._parse(new ParseInputLazyPath(Wt,u,Wt.path,Xe))));return Wt.common.async?Promise.all(_r).then((u=>finalizeSet(u))):finalizeSet(_r)}min(u,Xe){return new ZodSet({...this._def,minSize:{value:u,message:gv.toString(Xe)}})}max(u,Xe){return new ZodSet({...this._def,maxSize:{value:u,message:gv.toString(Xe)}})}size(u,Xe){return this.min(u,Xe).max(u,Xe)}nonempty(u){return this.min(1,u)}}ZodSet.create=(u,Xe)=>new ZodSet({valueType:u,minSize:null,maxSize:null,typeName:Rv.ZodSet,...processCreateParams(Xe)});class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(u){const{ctx:Xe}=this._processInputParams(u);return this._def.getter()._parse({data:Xe.data,path:Xe.path,parent:Xe})}}ZodLazy.create=(u,Xe)=>new ZodLazy({getter:u,typeName:Rv.ZodLazy,...processCreateParams(Xe)});class ZodLiteral extends ZodType{_parse(u){if(u.data!==this._def.value){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{received:Xe.data,code:pv.invalid_literal,expected:this._def.value}),mv}return{status:"valid",value:u.data}}get value(){return this._def.value}}function createZodEnum(u,Xe){return new ZodEnum({values:u,typeName:Rv.ZodEnum,...processCreateParams(Xe)})}ZodLiteral.create=(u,Xe)=>new ZodLiteral({value:u,typeName:Rv.ZodLiteral,...processCreateParams(Xe)});class ZodEnum extends ZodType{constructor(){super(...arguments),yv.set(this,void 0)}_parse(u){if("string"!=typeof u.data){const Xe=this._getOrReturnCtx(u),Wt=this._def.values;return addIssueToContext(Xe,{expected:uv.joinValues(Wt),received:Xe.parsedType,code:pv.invalid_type}),mv}if(__classPrivateFieldGet(this,yv,"f")||__classPrivateFieldSet(this,yv,new Set(this._def.values),"f"),!__classPrivateFieldGet(this,yv,"f").has(u.data)){const Xe=this._getOrReturnCtx(u),Wt=this._def.values;return addIssueToContext(Xe,{received:Xe.data,code:pv.invalid_enum_value,options:Wt}),mv}return OK(u.data)}get options(){return this._def.values}get enum(){const u={};for(const Xe of this._def.values)u[Xe]=Xe;return u}get Values(){const u={};for(const Xe of this._def.values)u[Xe]=Xe;return u}get Enum(){const u={};for(const Xe of this._def.values)u[Xe]=Xe;return u}extract(u,Xe=this._def){return ZodEnum.create(u,{...this._def,...Xe})}exclude(u,Xe=this._def){return ZodEnum.create(this.options.filter((Xe=>!u.includes(Xe))),{...this._def,...Xe})}}yv=new WeakMap,ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_v.set(this,void 0)}_parse(u){const Xe=uv.getValidEnumValues(this._def.values),Wt=this._getOrReturnCtx(u);if(Wt.parsedType!==hv.string&&Wt.parsedType!==hv.number){const u=uv.objectValues(Xe);return addIssueToContext(Wt,{expected:uv.joinValues(u),received:Wt.parsedType,code:pv.invalid_type}),mv}if(__classPrivateFieldGet(this,_v,"f")||__classPrivateFieldSet(this,_v,new Set(uv.getValidEnumValues(this._def.values)),"f"),!__classPrivateFieldGet(this,_v,"f").has(u.data)){const u=uv.objectValues(Xe);return addIssueToContext(Wt,{received:Wt.data,code:pv.invalid_enum_value,options:u}),mv}return OK(u.data)}get enum(){return this._def.values}}_v=new WeakMap,ZodNativeEnum.create=(u,Xe)=>new ZodNativeEnum({values:u,typeName:Rv.ZodNativeEnum,...processCreateParams(Xe)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(u){const{ctx:Xe}=this._processInputParams(u);if(Xe.parsedType!==hv.promise&&!1===Xe.common.async)return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.promise,received:Xe.parsedType}),mv;const Wt=Xe.parsedType===hv.promise?Xe.data:Promise.resolve(Xe.data);return OK(Wt.then((u=>this._def.type.parseAsync(u,{path:Xe.path,errorMap:Xe.common.contextualErrorMap}))))}}ZodPromise.create=(u,Xe)=>new ZodPromise({type:u,typeName:Rv.ZodPromise,...processCreateParams(Xe)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Rv.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u),In=this._def.effect||null,fr={addIssue:u=>{addIssueToContext(Wt,u),u.fatal?Xe.abort():Xe.dirty()},get path(){return Wt.path}};if(fr.addIssue=fr.addIssue.bind(fr),"preprocess"===In.type){const u=In.transform(Wt.data,fr);if(Wt.common.async)return Promise.resolve(u).then((async u=>{if("aborted"===Xe.value)return mv;const In=await this._def.schema._parseAsync({data:u,path:Wt.path,parent:Wt});return"aborted"===In.status?mv:"dirty"===In.status||"dirty"===Xe.value?DIRTY(In.value):In}));{if("aborted"===Xe.value)return mv;const In=this._def.schema._parseSync({data:u,path:Wt.path,parent:Wt});return"aborted"===In.status?mv:"dirty"===In.status||"dirty"===Xe.value?DIRTY(In.value):In}}if("refinement"===In.type){const executeRefinement=u=>{const Xe=In.refinement(u,fr);if(Wt.common.async)return Promise.resolve(Xe);if(Xe instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(!1===Wt.common.async){const u=this._def.schema._parseSync({data:Wt.data,path:Wt.path,parent:Wt});return"aborted"===u.status?mv:("dirty"===u.status&&Xe.dirty(),executeRefinement(u.value),{status:Xe.value,value:u.value})}return this._def.schema._parseAsync({data:Wt.data,path:Wt.path,parent:Wt}).then((u=>"aborted"===u.status?mv:("dirty"===u.status&&Xe.dirty(),executeRefinement(u.value).then((()=>({status:Xe.value,value:u.value}))))))}if("transform"===In.type){if(!1===Wt.common.async){const u=this._def.schema._parseSync({data:Wt.data,path:Wt.path,parent:Wt});if(!isValid(u))return u;const _r=In.transform(u.value,fr);if(_r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:Xe.value,value:_r}}return this._def.schema._parseAsync({data:Wt.data,path:Wt.path,parent:Wt}).then((u=>isValid(u)?Promise.resolve(In.transform(u.value,fr)).then((u=>({status:Xe.value,value:u}))):u))}uv.assertNever(In)}}ZodEffects.create=(u,Xe,Wt)=>new ZodEffects({schema:u,typeName:Rv.ZodEffects,effect:Xe,...processCreateParams(Wt)}),ZodEffects.createWithPreprocess=(u,Xe,Wt)=>new ZodEffects({schema:Xe,effect:{type:"preprocess",transform:u},typeName:Rv.ZodEffects,...processCreateParams(Wt)});class ZodOptional extends ZodType{_parse(u){return this._getType(u)===hv.undefined?OK(void 0):this._def.innerType._parse(u)}unwrap(){return this._def.innerType}}ZodOptional.create=(u,Xe)=>new ZodOptional({innerType:u,typeName:Rv.ZodOptional,...processCreateParams(Xe)});class ZodNullable extends ZodType{_parse(u){return this._getType(u)===hv.null?OK(null):this._def.innerType._parse(u)}unwrap(){return this._def.innerType}}ZodNullable.create=(u,Xe)=>new ZodNullable({innerType:u,typeName:Rv.ZodNullable,...processCreateParams(Xe)});class ZodDefault extends ZodType{_parse(u){const{ctx:Xe}=this._processInputParams(u);let Wt=Xe.data;return Xe.parsedType===hv.undefined&&(Wt=this._def.defaultValue()),this._def.innerType._parse({data:Wt,path:Xe.path,parent:Xe})}removeDefault(){return this._def.innerType}}ZodDefault.create=(u,Xe)=>new ZodDefault({innerType:u,typeName:Rv.ZodDefault,defaultValue:"function"==typeof Xe.default?Xe.default:()=>Xe.default,...processCreateParams(Xe)});class ZodCatch extends ZodType{_parse(u){const{ctx:Xe}=this._processInputParams(u),Wt={...Xe,common:{...Xe.common,issues:[]}},In=this._def.innerType._parse({data:Wt.data,path:Wt.path,parent:{...Wt}});return isAsync(In)?In.then((u=>({status:"valid",value:"valid"===u.status?u.value:this._def.catchValue({get error(){return new ZodError(Wt.common.issues)},input:Wt.data})}))):{status:"valid",value:"valid"===In.status?In.value:this._def.catchValue({get error(){return new ZodError(Wt.common.issues)},input:Wt.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(u,Xe)=>new ZodCatch({innerType:u,typeName:Rv.ZodCatch,catchValue:"function"==typeof Xe.catch?Xe.catch:()=>Xe.catch,...processCreateParams(Xe)});class ZodNaN extends ZodType{_parse(u){if(this._getType(u)!==hv.nan){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.nan,received:Xe.parsedType}),mv}return{status:"valid",value:u.data}}}ZodNaN.create=u=>new ZodNaN({typeName:Rv.ZodNaN,...processCreateParams(u)});Symbol("zod_brand");class ZodBranded extends ZodType{_parse(u){const{ctx:Xe}=this._processInputParams(u),Wt=Xe.data;return this._def.type._parse({data:Wt,path:Xe.path,parent:Xe})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u);if(Wt.common.async){return(async()=>{const u=await this._def.in._parseAsync({data:Wt.data,path:Wt.path,parent:Wt});return"aborted"===u.status?mv:"dirty"===u.status?(Xe.dirty(),DIRTY(u.value)):this._def.out._parseAsync({data:u.value,path:Wt.path,parent:Wt})})()}{const u=this._def.in._parseSync({data:Wt.data,path:Wt.path,parent:Wt});return"aborted"===u.status?mv:"dirty"===u.status?(Xe.dirty(),{status:"dirty",value:u.value}):this._def.out._parseSync({data:u.value,path:Wt.path,parent:Wt})}}static create(u,Xe){return new ZodPipeline({in:u,out:Xe,typeName:Rv.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(u){const Xe=this._def.innerType._parse(u),freeze=u=>(isValid(u)&&(u.value=Object.freeze(u.value)),u);return isAsync(Xe)?Xe.then((u=>freeze(u))):freeze(Xe)}unwrap(){return this._def.innerType}}ZodReadonly.create=(u,Xe)=>new ZodReadonly({innerType:u,typeName:Rv.ZodReadonly,...processCreateParams(Xe)});ZodObject.lazycreate;var Rv;!function(u){u.ZodString="ZodString",u.ZodNumber="ZodNumber",u.ZodNaN="ZodNaN",u.ZodBigInt="ZodBigInt",u.ZodBoolean="ZodBoolean",u.ZodDate="ZodDate",u.ZodSymbol="ZodSymbol",u.ZodUndefined="ZodUndefined",u.ZodNull="ZodNull",u.ZodAny="ZodAny",u.ZodUnknown="ZodUnknown",u.ZodNever="ZodNever",u.ZodVoid="ZodVoid",u.ZodArray="ZodArray",u.ZodObject="ZodObject",u.ZodUnion="ZodUnion",u.ZodDiscriminatedUnion="ZodDiscriminatedUnion",u.ZodIntersection="ZodIntersection",u.ZodTuple="ZodTuple",u.ZodRecord="ZodRecord",u.ZodMap="ZodMap",u.ZodSet="ZodSet",u.ZodFunction="ZodFunction",u.ZodLazy="ZodLazy",u.ZodLiteral="ZodLiteral",u.ZodEnum="ZodEnum",u.ZodEffects="ZodEffects",u.ZodNativeEnum="ZodNativeEnum",u.ZodOptional="ZodOptional",u.ZodNullable="ZodNullable",u.ZodDefault="ZodDefault",u.ZodCatch="ZodCatch",u.ZodPromise="ZodPromise",u.ZodBranded="ZodBranded",u.ZodPipeline="ZodPipeline",u.ZodReadonly="ZodReadonly"}(Rv||(Rv={}));const zv=ZodString.create,Ov=(ZodNumber.create,ZodNaN.create,ZodBigInt.create,ZodBoolean.create,ZodDate.create,ZodSymbol.create,ZodUndefined.create,ZodNull.create,ZodAny.create,ZodUnknown.create,ZodNever.create,ZodVoid.create,ZodArray.create,ZodObject.create);ZodObject.strictCreate,ZodUnion.create,ZodIntersection.create,ZodTuple.create,ZodMap.create,ZodSet.create,ZodLazy.create,ZodLiteral.create,ZodEnum.create,ZodNativeEnum.create,ZodPromise.create,ZodEffects.create,ZodOptional.create,ZodNullable.create,ZodEffects.createWithPreprocess,ZodPipeline.create;function getAdjustedLocation(u){let{x:Xe,y:Wt}=u;return Xe=0!==Xe?Xe:1e-10,Wt=0!==Wt?Wt:1e-10,{x:Xe,y:Wt}}const Lv=Ov({email:zv().min(1,"jakarto.login.email.min.error").email("jakarto.login.email.format.error"),password:zv().min(1,"jakarto.login.pass.min.error")});var Dv=__webpack_require__(8418),Fv=dp,Bv=Symbol.for("react-redux-context"),jv="undefined"!=typeof globalThis?globalThis:{};function getContext(){if(!Fv.createContext)return{};const u=jv[Bv]??(jv[Bv]=new Map);let Xe=u.get(Fv.createContext);return Xe||(Xe=Fv.createContext(null),u.set(Fv.createContext,Xe)),Xe}var Nv=getContext(),notInitialized=()=>{throw new Error("uSES not initialized!")};var Vv=Symbol.for("react.element"),Uv=Symbol.for("react.portal"),$v=Symbol.for("react.fragment"),Wv=Symbol.for("react.strict_mode"),qv=Symbol.for("react.profiler"),Zv=Symbol.for("react.provider"),Hv=Symbol.for("react.context"),Gv=Symbol.for("react.server_context"),Kv=Symbol.for("react.forward_ref"),Xv=Symbol.for("react.suspense"),Yv=Symbol.for("react.suspense_list"),Jv=Symbol.for("react.memo"),Qv=Symbol.for("react.lazy"),eb=(Symbol.for("react.offscreen"),Symbol.for("react.client.reference"),Kv),tb=Jv;function typeOf(u){if("object"==typeof u&&null!==u){const Xe=u.$$typeof;switch(Xe){case Vv:{const Wt=u.type;switch(Wt){case $v:case qv:case Wv:case Xv:case Yv:return Wt;default:{const u=Wt&&Wt.$$typeof;switch(u){case Gv:case Hv:case Kv:case Qv:case Jv:case Zv:return u;default:return Xe}}}}case Uv:return Xe}}}function pureFinalPropsSelectorFactory(u,Xe,Wt,In,{areStatesEqual:fr,areOwnPropsEqual:_r,areStatePropsEqual:wr}){let Ar,Kr,no,io,oo,ao=!1;function handleSubsequentCalls(ao,so){const co=!_r(so,Kr),ho=!fr(ao,Ar,so,Kr);return Ar=ao,Kr=so,co&&ho?function handleNewPropsAndNewState(){return no=u(Ar,Kr),Xe.dependsOnOwnProps&&(io=Xe(In,Kr)),oo=Wt(no,io,Kr),oo}():co?function handleNewProps(){return u.dependsOnOwnProps&&(no=u(Ar,Kr)),Xe.dependsOnOwnProps&&(io=Xe(In,Kr)),oo=Wt(no,io,Kr),oo}():ho?function handleNewState(){const Xe=u(Ar,Kr),In=!wr(Xe,no);return no=Xe,In&&(oo=Wt(no,io,Kr)),oo}():oo}return function pureFinalPropsSelector(fr,_r){return ao?handleSubsequentCalls(fr,_r):function handleFirstCall(fr,_r){return Ar=fr,Kr=_r,no=u(Ar,Kr),io=Xe(In,Kr),oo=Wt(no,io,Kr),ao=!0,oo}(fr,_r)}}function wrapMapToPropsConstant(u){return function initConstantSelector(Xe){const Wt=u(Xe);function constantSelector(){return Wt}return constantSelector.dependsOnOwnProps=!1,constantSelector}}function getDependsOnOwnProps(u){return u.dependsOnOwnProps?Boolean(u.dependsOnOwnProps):1!==u.length}function wrapMapToPropsFunc(u,Xe){return function initProxySelector(Xe,{displayName:Wt}){const In=function mapToPropsProxy(u,Xe){return In.dependsOnOwnProps?In.mapToProps(u,Xe):In.mapToProps(u,void 0)};return In.dependsOnOwnProps=!0,In.mapToProps=function detectFactoryAndVerify(Xe,Wt){In.mapToProps=u,In.dependsOnOwnProps=getDependsOnOwnProps(u);let fr=In(Xe,Wt);return"function"==typeof fr&&(In.mapToProps=fr,In.dependsOnOwnProps=getDependsOnOwnProps(fr),fr=In(Xe,Wt)),fr},In}}function createInvalidArgFactory(u,Xe){return(Wt,In)=>{throw new Error(`Invalid value of type ${typeof u} for ${Xe} argument when connecting component ${In.wrappedComponentName}.`)}}function defaultMergeProps(u,Xe,Wt){return{...Wt,...u,...Xe}}function defaultNoopBatch(u){u()}var nb={notify(){},get:()=>[]};function createSubscription(u,Xe){let Wt,In=nb,fr=0,_r=!1;function handleChangeWrapper(){wr.onStateChange&&wr.onStateChange()}function trySubscribe(){fr++,Wt||(Wt=Xe?Xe.addNestedSub(handleChangeWrapper):u.subscribe(handleChangeWrapper),In=function createListenerCollection(){let u=null,Xe=null;return{clear(){u=null,Xe=null},notify(){defaultNoopBatch((()=>{let Xe=u;for(;Xe;)Xe.callback(),Xe=Xe.next}))},get(){const Xe=[];let Wt=u;for(;Wt;)Xe.push(Wt),Wt=Wt.next;return Xe},subscribe(Wt){let In=!0;const fr=Xe={callback:Wt,next:null,prev:Xe};return fr.prev?fr.prev.next=fr:u=fr,function unsubscribe(){In&&null!==u&&(In=!1,fr.next?fr.next.prev=fr.prev:Xe=fr.prev,fr.prev?fr.prev.next=fr.next:u=fr.next)}}}}())}function tryUnsubscribe(){fr--,Wt&&0===fr&&(Wt(),Wt=void 0,In.clear(),In=nb)}const wr={addNestedSub:function addNestedSub(u){trySubscribe();const Xe=In.subscribe(u);let Wt=!1;return()=>{Wt||(Wt=!0,Xe(),tryUnsubscribe())}},notifyNestedSubs:function notifyNestedSubs(){In.notify()},handleChangeWrapper,isSubscribed:function isSubscribed(){return _r},trySubscribe:function trySubscribeSelf(){_r||(_r=!0,trySubscribe())},tryUnsubscribe:function tryUnsubscribeSelf(){_r&&(_r=!1,tryUnsubscribe())},getListeners:()=>In};return wr}var pb=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),mb="undefined"!=typeof navigator&&"ReactNative"===navigator.product,yb=pb||mb?Fv.useLayoutEffect:Fv.useEffect;function is(u,Xe){return u===Xe?0!==u||0!==Xe||1/u==1/Xe:u!=u&&Xe!=Xe}function shallowEqual(u,Xe){if(is(u,Xe))return!0;if("object"!=typeof u||null===u||"object"!=typeof Xe||null===Xe)return!1;const Wt=Object.keys(u),In=Object.keys(Xe);if(Wt.length!==In.length)return!1;for(let In=0;In<Wt.length;In++)if(!Object.prototype.hasOwnProperty.call(Xe,Wt[In])||!is(u[Wt[In]],Xe[Wt[In]]))return!1;return!0}var _b={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},wb={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Sb={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ab={[eb]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[tb]:Sb};function getStatics(u){return function isMemo(u){return typeOf(u)===Jv}(u)?Sb:Ab[u.$$typeof]||_b}var Pb=Object.defineProperty,Ib=Object.getOwnPropertyNames,Mb=Object.getOwnPropertySymbols,Rb=Object.getOwnPropertyDescriptor,zb=Object.getPrototypeOf,Ob=Object.prototype;function extension_hoistNonReactStatics(u,Xe){if("string"!=typeof Xe){if(Ob){const Wt=zb(Xe);Wt&&Wt!==Ob&&extension_hoistNonReactStatics(u,Wt)}let Wt=Ib(Xe);Mb&&(Wt=Wt.concat(Mb(Xe)));const In=getStatics(u),fr=getStatics(Xe);for(let _r=0;_r<Wt.length;++_r){const wr=Wt[_r];if(!(wb[wr]||fr&&fr[wr]||In&&In[wr])){const Wt=Rb(Xe,wr);try{Pb(u,wr,Wt)}catch(u){}}}}return u}var Lb=notInitialized,qb=[null,null];function captureWrapperProps(u,Xe,Wt,In,fr,_r){u.current=In,Wt.current=!1,fr.current&&(fr.current=null,_r())}function strictEqual(u,Xe){return u===Xe}var Qb=function connect(u,Xe,Wt,{pure:In,areStatesEqual:fr=strictEqual,areOwnPropsEqual:_r=shallowEqual,areStatePropsEqual:wr=shallowEqual,areMergedPropsEqual:Ar=shallowEqual,forwardRef:Kr=!1,context:no=Nv}={}){const io=no,oo=function mapStateToPropsFactory(u){return u?"function"==typeof u?wrapMapToPropsFunc(u):createInvalidArgFactory(u,"mapStateToProps"):wrapMapToPropsConstant((()=>({})))}(u),ao=function mapDispatchToPropsFactory(u){return u&&"object"==typeof u?wrapMapToPropsConstant((Xe=>function bindActionCreators(u,Xe){const Wt={};for(const In in u){const fr=u[In];"function"==typeof fr&&(Wt[In]=(...u)=>Xe(fr(...u)))}return Wt}(u,Xe))):u?"function"==typeof u?wrapMapToPropsFunc(u):createInvalidArgFactory(u,"mapDispatchToProps"):wrapMapToPropsConstant((u=>({dispatch:u})))}(Xe),so=function mergePropsFactory(u){return u?"function"==typeof u?function wrapMergePropsFunc(u){return function initMergePropsProxy(Xe,{displayName:Wt,areMergedPropsEqual:In}){let fr,_r=!1;return function mergePropsProxy(Xe,Wt,wr){const Ar=u(Xe,Wt,wr);return _r?In(Ar,fr)||(fr=Ar):(_r=!0,fr=Ar),fr}}}(u):createInvalidArgFactory(u,"mergeProps"):()=>defaultMergeProps}(Wt),co=Boolean(u);return u=>{const Xe=u.displayName||u.name||"Component",Wt=`Connect(${Xe})`,In={shouldHandleStateChanges:co,displayName:Wt,wrappedComponentName:Xe,WrappedComponent:u,initMapStateToProps:oo,initMapDispatchToProps:ao,initMergeProps:so,areStatesEqual:fr,areStatePropsEqual:wr,areOwnPropsEqual:_r,areMergedPropsEqual:Ar};function ConnectFunction(Xe){const[Wt,fr,_r]=Fv.useMemo((()=>{const{reactReduxForwardedRef:u,...Wt}=Xe;return[Xe.context,u,Wt]}),[Xe]),wr=Fv.useMemo((()=>io),[Wt,io]),Ar=Fv.useContext(wr),Kr=Boolean(Xe.store)&&Boolean(Xe.store.getState)&&Boolean(Xe.store.dispatch),no=Boolean(Ar)&&Boolean(Ar.store);const oo=Kr?Xe.store:Ar.store,ao=no?Ar.getServerState:oo.getState,so=Fv.useMemo((()=>function finalPropsSelectorFactory(u,{initMapStateToProps:Xe,initMapDispatchToProps:Wt,initMergeProps:In,...fr}){return pureFinalPropsSelectorFactory(Xe(u,fr),Wt(u,fr),In(u,fr),u,fr)}(oo.dispatch,In)),[oo]),[ho,go]=Fv.useMemo((()=>{if(!co)return qb;const u=createSubscription(oo,Kr?void 0:Ar.subscription),Xe=u.notifyNestedSubs.bind(u);return[u,Xe]}),[oo,Kr,Ar]),xo=Fv.useMemo((()=>Kr?Ar:{...Ar,subscription:ho}),[Kr,Ar,ho]),ko=Fv.useRef(void 0),Co=Fv.useRef(_r),Io=Fv.useRef(void 0),zo=Fv.useRef(!1),Bo=Fv.useRef(!1),ca=Fv.useRef(void 0);yb((()=>(Bo.current=!0,()=>{Bo.current=!1})),[]);const ua=Fv.useMemo((()=>()=>Io.current&&_r===Co.current?Io.current:so(oo.getState(),_r)),[oo,_r]),Da=Fv.useMemo((()=>u=>ho?function subscribeUpdates(u,Xe,Wt,In,fr,_r,wr,Ar,Kr,no,io){if(!u)return()=>{};let oo=!1,ao=null;const checkForUpdates=()=>{if(oo||!Ar.current)return;const u=Xe.getState();let Wt,so;try{Wt=In(u,fr.current)}catch(u){so=u,ao=u}so||(ao=null),Wt===_r.current?wr.current||no():(_r.current=Wt,Kr.current=Wt,wr.current=!0,io())};return Wt.onStateChange=checkForUpdates,Wt.trySubscribe(),checkForUpdates(),()=>{if(oo=!0,Wt.tryUnsubscribe(),Wt.onStateChange=null,ao)throw ao}}(co,oo,ho,so,Co,ko,zo,Bo,Io,go,u):()=>{}),[ho]);let ns;!function useIsomorphicLayoutEffectWithArgs(u,Xe,Wt){yb((()=>u(...Xe)),Wt)}(captureWrapperProps,[Co,ko,zo,_r,Io,go]);try{ns=Lb(Da,ua,ao?()=>so(ao(),_r):ua)}catch(u){throw ca.current&&(u.message+=`\nThe error may be correlated with this previous error:\n${ca.current.stack}\n\n`),u}yb((()=>{ca.current=void 0,Io.current=void 0,ko.current=ns}));const yl=Fv.useMemo((()=>Fv.createElement(u,{...ns,ref:fr})),[fr,u,ns]);return Fv.useMemo((()=>co?Fv.createElement(wr.Provider,{value:xo},yl):yl),[wr,yl,xo])}const no=Fv.memo(ConnectFunction);if(no.WrappedComponent=u,no.displayName=ConnectFunction.displayName=Wt,Kr){const Xe=Fv.forwardRef((function forwardConnectRef(u,Xe){return Fv.createElement(no,{...u,reactReduxForwardedRef:Xe})}));return Xe.displayName=Wt,Xe.WrappedComponent=u,extension_hoistNonReactStatics(Xe,u)}return extension_hoistNonReactStatics(no,u)}};var ex=function Provider({store:u,context:Xe,children:Wt,serverState:In,stabilityCheck:fr="once",identityFunctionCheck:_r="once"}){const wr=Fv.useMemo((()=>{const Xe=createSubscription(u);return{store:u,subscription:Xe,getServerState:In?()=>In:void 0,stabilityCheck:fr,identityFunctionCheck:_r}}),[u,In,fr,_r]),Ar=Fv.useMemo((()=>u.getState()),[u]);yb((()=>{const{subscription:Xe}=wr;return Xe.onStateChange=Xe.notifyNestedSubs,Xe.trySubscribe(),Ar!==u.getState()&&Xe.notifyNestedSubs(),()=>{Xe.tryUnsubscribe(),Xe.onStateChange=void 0}}),[wr,Ar]);const Kr=Xe||Nv;return Fv.createElement(Kr.Provider,{value:wr},Wt)};var tx;tx=Dv.useSyncExternalStoreWithSelector,(u=>{Lb=u})(dp.useSyncExternalStore);var nx=__webpack_require__(9781),rx=__webpack_require__(6434);var styles_getOverlayAlpha=u=>{let Xe;return Xe=u<1?5.11916*u**2:4.5*Math.log(u+1)+2,(Xe/100).toFixed(2)};function getPaperUtilityClass(u){return(0,bp.Ay)("MuiPaper",u)}(0,uf.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"]);const ix=["className","component","elevation","square","variant"],ox=(0,Up.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[Wt.variant],!Wt.square&&Xe.rounded,"elevation"===Wt.variant&&Xe[`elevation${Wt.elevation}`]]}})((({theme:u,ownerState:Xe})=>{var Wt;return(0,_p.A)({backgroundColor:(u.vars||u).palette.background.paper,color:(u.vars||u).palette.text.primary,transition:u.transitions.create("box-shadow")},!Xe.square&&{borderRadius:u.shape.borderRadius},"outlined"===Xe.variant&&{border:`1px solid ${(u.vars||u).palette.divider}`},"elevation"===Xe.variant&&(0,_p.A)({boxShadow:(u.vars||u).shadows[Xe.elevation]},!u.vars&&"dark"===u.palette.mode&&{backgroundImage:`linear-gradient(${(0,Zp.X4)("#fff",styles_getOverlayAlpha(Xe.elevation))}, ${(0,Zp.X4)("#fff",styles_getOverlayAlpha(Xe.elevation))})`},u.vars&&{backgroundImage:null==(Wt=u.vars.overlays)?void 0:Wt[Xe.elevation]}))}));var ax=dp.forwardRef((function Paper(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiPaper"}),{className:In,component:fr="div",elevation:_r=1,square:wr=!1,variant:Ar="elevation"}=Wt,Kr=(0,yp.A)(Wt,ix),no=(0,_p.A)({},Wt,{component:fr,elevation:_r,square:wr,variant:Ar}),io=(u=>{const{square:Xe,elevation:Wt,variant:In,classes:fr}=u,_r={root:["root",In,!Xe&&"rounded","elevation"===In&&`elevation${Wt}`]};return(0,xp.A)(_r,getPaperUtilityClass,fr)})(no);return(0,Fp.jsx)(ox,(0,_p.A)({as:fr,ownerState:no,className:(0,vp.A)(io.root,In),ref:Xe},Kr))}));function getCardUtilityClass(u){return(0,bp.Ay)("MuiCard",u)}(0,uf.A)("MuiCard",["root"]);const lx=["className","raised"],cx=(0,Up.Ay)(ax,{name:"MuiCard",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})((()=>({overflow:"hidden"})));var ux=dp.forwardRef((function Card(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCard"}),{className:In,raised:fr=!1}=Wt,_r=(0,yp.A)(Wt,lx),wr=(0,_p.A)({},Wt,{raised:fr}),Ar=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"]},getCardUtilityClass,Xe)})(wr);return(0,Fp.jsx)(cx,(0,_p.A)({className:(0,vp.A)(Ar.root,In),elevation:fr?8:void 0,ref:Xe,ownerState:wr},_r))})),dx=__webpack_require__(9599);function getTypographyUtilityClass(u){return(0,bp.Ay)("MuiTypography",u)}(0,uf.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const hx=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],px=(0,Up.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.variant&&Xe[Wt.variant],"inherit"!==Wt.align&&Xe[`align${(0,Vp.A)(Wt.align)}`],Wt.noWrap&&Xe.noWrap,Wt.gutterBottom&&Xe.gutterBottom,Wt.paragraph&&Xe.paragraph]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({margin:0},"inherit"===Xe.variant&&{font:"inherit"},"inherit"!==Xe.variant&&u.typography[Xe.variant],"inherit"!==Xe.align&&{textAlign:Xe.align},Xe.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Xe.gutterBottom&&{marginBottom:"0.35em"},Xe.paragraph&&{marginBottom:16}))),fx={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},mx={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var gx=dp.forwardRef((function Typography(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiTypography"}),In=(u=>mx[u]||u)(Wt.color),fr=(0,dx.A)((0,_p.A)({},Wt,{color:In})),{align:_r="inherit",className:wr,component:Ar,gutterBottom:Kr=!1,noWrap:no=!1,paragraph:io=!1,variant:oo="body1",variantMapping:ao=fx}=fr,so=(0,yp.A)(fr,hx),co=(0,_p.A)({},fr,{align:_r,color:In,className:wr,component:Ar,gutterBottom:Kr,noWrap:no,paragraph:io,variant:oo,variantMapping:ao}),ho=Ar||(io?"p":ao[oo]||fx[oo])||"span",go=(u=>{const{align:Xe,gutterBottom:Wt,noWrap:In,paragraph:fr,variant:_r,classes:wr}=u,Ar={root:["root",_r,"inherit"!==u.align&&`align${(0,Vp.A)(Xe)}`,Wt&&"gutterBottom",In&&"noWrap",fr&&"paragraph"]};return(0,xp.A)(Ar,getTypographyUtilityClass,wr)})(co);return(0,Fp.jsx)(px,(0,_p.A)({as:ho,ref:Xe,ownerState:co,className:(0,vp.A)(go.root,wr)},so))}));function getCardHeaderUtilityClass(u){return(0,bp.Ay)("MuiCardHeader",u)}var yx=(0,uf.A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]);const _x=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],vx=(0,Up.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(u,Xe)=>(0,_p.A)({[`& .${yx.title}`]:Xe.title,[`& .${yx.subheader}`]:Xe.subheader},Xe.root)})({display:"flex",alignItems:"center",padding:16}),bx=(0,Up.Ay)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(u,Xe)=>Xe.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),xx=(0,Up.Ay)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(u,Xe)=>Xe.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),wx=(0,Up.Ay)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(u,Xe)=>Xe.content})({flex:"1 1 auto"});var Sx=dp.forwardRef((function CardHeader(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCardHeader"}),{action:In,avatar:fr,className:_r,component:wr="div",disableTypography:Ar=!1,subheader:Kr,subheaderTypographyProps:no,title:io,titleTypographyProps:oo}=Wt,ao=(0,yp.A)(Wt,_x),so=(0,_p.A)({},Wt,{component:wr,disableTypography:Ar}),co=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},getCardHeaderUtilityClass,Xe)})(so);let ho=io;null==ho||ho.type===gx||Ar||(ho=(0,Fp.jsx)(gx,(0,_p.A)({variant:fr?"body2":"h5",className:co.title,component:"span",display:"block"},oo,{children:ho})));let go=Kr;return null==go||go.type===gx||Ar||(go=(0,Fp.jsx)(gx,(0,_p.A)({variant:fr?"body2":"body1",className:co.subheader,color:"text.secondary",component:"span",display:"block"},no,{children:go}))),(0,Fp.jsxs)(vx,(0,_p.A)({className:(0,vp.A)(co.root,_r),as:wr,ref:Xe,ownerState:so},ao,{children:[fr&&(0,Fp.jsx)(bx,{className:co.avatar,ownerState:so,children:fr}),(0,Fp.jsxs)(wx,{className:co.content,ownerState:so,children:[ho,go]}),In&&(0,Fp.jsx)(xx,{className:co.action,ownerState:so,children:In})]}))}));function getCardMediaUtilityClass(u){return(0,bp.Ay)("MuiCardMedia",u)}(0,uf.A)("MuiCardMedia",["root","media","img"]);const kx=["children","className","component","image","src","style"],Ax=(0,Up.Ay)("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u,{isMediaComponent:In,isImageComponent:fr}=Wt;return[Xe.root,In&&Xe.media,fr&&Xe.img]}})((({ownerState:u})=>(0,_p.A)({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},u.isMediaComponent&&{width:"100%"},u.isImageComponent&&{objectFit:"cover"}))),Tx=["video","audio","picture","iframe","img"],Cx=["picture","img"],Ex=dp.forwardRef((function CardMedia(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCardMedia"}),{children:In,className:fr,component:_r="div",image:wr,src:Ar,style:Kr}=Wt,no=(0,yp.A)(Wt,kx),io=-1!==Tx.indexOf(_r),oo=!io&&wr?(0,_p.A)({backgroundImage:`url("${wr}")`},Kr):Kr,ao=(0,_p.A)({},Wt,{component:_r,isMediaComponent:io,isImageComponent:-1!==Cx.indexOf(_r)}),so=(u=>{const{classes:Xe,isMediaComponent:Wt,isImageComponent:In}=u,fr={root:["root",Wt&&"media",In&&"img"]};return(0,xp.A)(fr,getCardMediaUtilityClass,Xe)})(ao);return(0,Fp.jsx)(Ax,(0,_p.A)({className:(0,vp.A)(so.root,fr),as:_r,role:!io&&wr?"img":void 0,ref:Xe,style:oo,ownerState:ao,src:io?wr||Ar:void 0},no,{children:In}))}));var Px=Ex,Ix=__webpack_require__(9452),Mx=__webpack_require__(8248);const Rx=["component","direction","spacing","divider","children","className","useFlexGap"],zx=(0,kp.A)(),Ox=Dp("div",{name:"MuiStack",slot:"Root",overridesResolver:(u,Xe)=>Xe.root});function createStack_useThemePropsDefault(u){return useThemeProps({props:u,name:"MuiStack",defaultTheme:zx})}function joinChildren(u,Xe){const Wt=dp.Children.toArray(u).filter(Boolean);return Wt.reduce(((u,In,fr)=>(u.push(In),fr<Wt.length-1&&u.push(dp.cloneElement(Xe,{key:`separator-${fr}`})),u)),[])}const style=({ownerState:u,theme:Xe})=>{let Wt=(0,_p.A)({display:"flex",flexDirection:"column"},(0,Ix.NI)({theme:Xe},(0,Ix.kW)({values:u.direction,breakpoints:Xe.breakpoints.values}),(u=>({flexDirection:u}))));if(u.spacing){const In=(0,Mx.LX)(Xe),fr=Object.keys(Xe.breakpoints.values).reduce(((Xe,Wt)=>(("object"==typeof u.spacing&&null!=u.spacing[Wt]||"object"==typeof u.direction&&null!=u.direction[Wt])&&(Xe[Wt]=!0),Xe)),{}),_r=(0,Ix.kW)({values:u.direction,base:fr}),wr=(0,Ix.kW)({values:u.spacing,base:fr});"object"==typeof _r&&Object.keys(_r).forEach(((u,Xe,Wt)=>{if(!_r[u]){const In=Xe>0?_r[Wt[Xe-1]]:"column";_r[u]=In}}));const styleFromPropValue=(Xe,Wt)=>{return u.useFlexGap?{gap:(0,Mx._W)(In,Xe)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${fr=Wt?_r[Wt]:u.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[fr]}`]:(0,Mx._W)(In,Xe)}};var fr};Wt=(0,Pp.A)(Wt,(0,Ix.NI)({theme:Xe},wr,styleFromPropValue))}return Wt=(0,Ix.iZ)(Xe.breakpoints,Wt),Wt};const Lx=function createStack(u={}){const{createStyledComponent:Xe=Ox,useThemeProps:Wt=createStack_useThemePropsDefault,componentName:In="MuiStack"}=u,fr=Xe(style),_r=dp.forwardRef((function Grid(u,Xe){const _r=Wt(u),wr=(0,dx.A)(_r),{component:Ar="div",direction:Kr="column",spacing:no=0,divider:io,children:oo,className:ao,useFlexGap:so=!1}=wr,co=(0,yp.A)(wr,Rx),ho={direction:Kr,spacing:no,useFlexGap:so},go=(0,xp.A)({root:["root"]},(u=>(0,bp.Ay)(In,u)),{});return(0,Fp.jsx)(fr,(0,_p.A)({as:Ar,ownerState:ho,ref:Xe,className:(0,vp.A)(go.root,ao)},co,{children:io?joinChildren(oo,io):oo}))}));return _r}({createStyledComponent:(0,Up.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(u,Xe)=>Xe.root}),useThemeProps:u=>(0,$p.b)({props:u,name:"MuiStack"})});var Dx=Lx;function getCardContentUtilityClass(u){return(0,bp.Ay)("MuiCardContent",u)}(0,uf.A)("MuiCardContent",["root"]);const Fx=["className","component"],Bx=(0,Up.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}})));var jx=dp.forwardRef((function CardContent(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCardContent"}),{className:In,component:fr="div"}=Wt,_r=(0,yp.A)(Wt,Fx),wr=(0,_p.A)({},Wt,{component:fr}),Ar=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"]},getCardContentUtilityClass,Xe)})(wr);return(0,Fp.jsx)(Bx,(0,_p.A)({as:fr,className:(0,vp.A)(Ar.root,In),ownerState:wr,ref:Xe},_r))}));const Nx=["className","component"];var Vx=__webpack_require__(9071),Ux=__webpack_require__(6544);var $x=(0,uf.A)("MuiBox",["root"]);const Wx=(0,Ux.A)(),qx=function createBox(u={}){const{themeId:Xe,defaultTheme:Wt,defaultClassName:In="MuiBox-root",generateClassName:fr}=u,_r=(0,Ep.default)("div",{shouldForwardProp:u=>"theme"!==u&&"sx"!==u&&"as"!==u})(Ip.A);return dp.forwardRef((function Box(u,wr){const Ar=Cp(Wt),Kr=(0,dx.A)(u),{className:no,component:io="div"}=Kr,oo=(0,yp.A)(Kr,Nx);return(0,Fp.jsx)(_r,(0,_p.A)({as:io,ref:wr,className:(0,vp.A)(no,fr?fr(In):In),theme:Xe&&Ar[Xe]||Ar},oo))}))}({themeId:cm.A,defaultTheme:Wx,defaultClassName:$x.root,generateClassName:Vx.A.generate});var Zx=qx,Hx=void 0;const Gx=function translate(u,Xe,Wt){return _newArrowCheck(this,Hx),JMap.Language.translate({bundleId:fr,key:u,params:Xe,locale:Wt})}.bind(void 0);(function getLocale(){return _newArrowCheck(this,Hx),JMap.Language.getLocale()}).bind(void 0);var Kx=__webpack_require__(5794),Xx=__webpack_require__.n(Kx),Yx=function(){var extendStatics=function(u,Xe){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,Xe){u.__proto__=Xe}||function(u,Xe){for(var Wt in Xe)Object.prototype.hasOwnProperty.call(Xe,Wt)&&(u[Wt]=Xe[Wt])},extendStatics(u,Xe)};return function(u,Xe){function __(){this.constructor=u}extendStatics(u,Xe),u.prototype=null===Xe?Object.create(Xe):(__.prototype=Xe.prototype,new __)}}(),__assign=function(){return __assign=Object.assign||function(u){for(var Xe,Wt=1,In=arguments.length;Wt<In;Wt++)for(var fr in Xe=arguments[Wt])Object.prototype.hasOwnProperty.call(Xe,fr)&&(u[fr]=Xe[fr]);return u},__assign.apply(this,arguments)},Jx={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Qx={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ew={width:"20px",height:"20px",position:"absolute"},tw={top:__assign(__assign({},Jx),{top:"-5px"}),right:__assign(__assign({},Qx),{left:void 0,right:"-5px"}),bottom:__assign(__assign({},Jx),{top:void 0,bottom:"-5px"}),left:__assign(__assign({},Qx),{left:"-5px"}),topRight:__assign(__assign({},ew),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:__assign(__assign({},ew),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:__assign(__assign({},ew),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:__assign(__assign({},ew),{left:"-10px",top:"-10px",cursor:"nw-resize"})},nw=function(u){function Resizer(){var Xe=null!==u&&u.apply(this,arguments)||this;return Xe.onMouseDown=function(u){Xe.props.onResizeStart(u,Xe.props.direction)},Xe.onTouchStart=function(u){Xe.props.onResizeStart(u,Xe.props.direction)},Xe}return Yx(Resizer,u),Resizer.prototype.render=function(){return dp.createElement("div",{className:this.props.className||"",style:__assign(__assign({position:"absolute",userSelect:"none"},tw[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},Resizer}(dp.PureComponent),rw=function(){var extendStatics=function(u,Xe){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,Xe){u.__proto__=Xe}||function(u,Xe){for(var Wt in Xe)Object.prototype.hasOwnProperty.call(Xe,Wt)&&(u[Wt]=Xe[Wt])},extendStatics(u,Xe)};return function(u,Xe){function __(){this.constructor=u}extendStatics(u,Xe),u.prototype=null===Xe?Object.create(Xe):(__.prototype=Xe.prototype,new __)}}(),lib_assign=function(){return lib_assign=Object.assign||function(u){for(var Xe,Wt=1,In=arguments.length;Wt<In;Wt++)for(var fr in Xe=arguments[Wt])Object.prototype.hasOwnProperty.call(Xe,fr)&&(u[fr]=Xe[fr]);return u},lib_assign.apply(this,arguments)},iw={width:"auto",height:"auto"},clamp=function(u,Xe,Wt){return Math.max(Math.min(u,Wt),Xe)},snap=function(u,Xe,Wt){var In=Math.round(u/Xe);return In*Xe+Wt*(In-1)},hasDirection=function(u,Xe){return new RegExp(u,"i").test(Xe)},isTouchEvent=function(u){return Boolean(u.touches&&u.touches.length)},findClosestSnap=function(u,Xe,Wt){void 0===Wt&&(Wt=0);var In=Xe.reduce((function(Wt,In,fr){return Math.abs(In-u)<Math.abs(Xe[Wt]-u)?fr:Wt}),0),fr=Math.abs(Xe[In]-u);return 0===Wt||fr<Wt?Xe[In]:u},getStringSize=function(u){return"auto"===(u=u.toString())||u.endsWith("px")||u.endsWith("%")||u.endsWith("vh")||u.endsWith("vw")||u.endsWith("vmax")||u.endsWith("vmin")?u:u+"px"},getPixelSize=function(u,Xe,Wt,In){if(u&&"string"==typeof u){if(u.endsWith("px"))return Number(u.replace("px",""));if(u.endsWith("%"))return Xe*(Number(u.replace("%",""))/100);if(u.endsWith("vw"))return Wt*(Number(u.replace("vw",""))/100);if(u.endsWith("vh"))return In*(Number(u.replace("vh",""))/100)}return u},ow=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],aw="__resizable_base__",sw=function(u){function Resizable(Xe){var Wt,In,fr,_r,wr=u.call(this,Xe)||this;return wr.ratio=1,wr.resizable=null,wr.parentLeft=0,wr.parentTop=0,wr.resizableLeft=0,wr.resizableRight=0,wr.resizableTop=0,wr.resizableBottom=0,wr.targetLeft=0,wr.targetTop=0,wr.appendBase=function(){if(!wr.resizable||!wr.window)return null;var u=wr.parentNode;if(!u)return null;var Xe=wr.window.document.createElement("div");return Xe.style.width="100%",Xe.style.height="100%",Xe.style.position="absolute",Xe.style.transform="scale(0, 0)",Xe.style.left="0",Xe.style.flex="0 0 100%",Xe.classList?Xe.classList.add(aw):Xe.className+=aw,u.appendChild(Xe),Xe},wr.removeBase=function(u){var Xe=wr.parentNode;Xe&&Xe.removeChild(u)},wr.state={isResizing:!1,width:null!==(In=null===(Wt=wr.propsSize)||void 0===Wt?void 0:Wt.width)&&void 0!==In?In:"auto",height:null!==(_r=null===(fr=wr.propsSize)||void 0===fr?void 0:fr.height)&&void 0!==_r?_r:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},wr.onResizeStart=wr.onResizeStart.bind(wr),wr.onMouseMove=wr.onMouseMove.bind(wr),wr.onMouseUp=wr.onMouseUp.bind(wr),wr}return rw(Resizable,u),Object.defineProperty(Resizable.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(Resizable.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(Resizable.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||iw},enumerable:!1,configurable:!0}),Object.defineProperty(Resizable.prototype,"size",{get:function(){var u=0,Xe=0;if(this.resizable&&this.window){var Wt=this.resizable.offsetWidth,In=this.resizable.offsetHeight,fr=this.resizable.style.position;"relative"!==fr&&(this.resizable.style.position="relative"),u="auto"!==this.resizable.style.width?this.resizable.offsetWidth:Wt,Xe="auto"!==this.resizable.style.height?this.resizable.offsetHeight:In,this.resizable.style.position=fr}return{width:u,height:Xe}},enumerable:!1,configurable:!0}),Object.defineProperty(Resizable.prototype,"sizeStyle",{get:function(){var u=this,Xe=this.props.size,getSize=function(Xe){var Wt;if(void 0===u.state[Xe]||"auto"===u.state[Xe])return"auto";if(u.propsSize&&u.propsSize[Xe]&&(null===(Wt=u.propsSize[Xe])||void 0===Wt?void 0:Wt.toString().endsWith("%"))){if(u.state[Xe].toString().endsWith("%"))return u.state[Xe].toString();var In=u.getParentSize();return Number(u.state[Xe].toString().replace("px",""))/In[Xe]*100+"%"}return getStringSize(u.state[Xe])};return{width:Xe&&void 0!==Xe.width&&!this.state.isResizing?getStringSize(Xe.width):getSize("width"),height:Xe&&void 0!==Xe.height&&!this.state.isResizing?getStringSize(Xe.height):getSize("height")}},enumerable:!1,configurable:!0}),Resizable.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var u=this.appendBase();if(!u)return{width:0,height:0};var Xe=!1,Wt=this.parentNode.style.flexWrap;"wrap"!==Wt&&(Xe=!0,this.parentNode.style.flexWrap="wrap"),u.style.position="relative",u.style.minWidth="100%",u.style.minHeight="100%";var In={width:u.offsetWidth,height:u.offsetHeight};return Xe&&(this.parentNode.style.flexWrap=Wt),this.removeBase(u),In},Resizable.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},Resizable.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},Resizable.prototype.componentDidMount=function(){if(this.resizable&&this.window){var u=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==u.flexBasis?u.flexBasis:void 0})}},Resizable.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},Resizable.prototype.createSizeForCssProperty=function(u,Xe){var Wt=this.propsSize&&this.propsSize[Xe];return"auto"!==this.state[Xe]||this.state.original[Xe]!==u||void 0!==Wt&&"auto"!==Wt?u:"auto"},Resizable.prototype.calculateNewMaxFromBoundary=function(u,Xe){var Wt,In,fr=this.props.boundsByDirection,_r=this.state.direction,wr=fr&&hasDirection("left",_r),Ar=fr&&hasDirection("top",_r);if("parent"===this.props.bounds){var Kr=this.parentNode;Kr&&(Wt=wr?this.resizableRight-this.parentLeft:Kr.offsetWidth+(this.parentLeft-this.resizableLeft),In=Ar?this.resizableBottom-this.parentTop:Kr.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(Wt=wr?this.resizableRight:this.window.innerWidth-this.resizableLeft,In=Ar?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(Wt=wr?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),In=Ar?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return Wt&&Number.isFinite(Wt)&&(u=u&&u<Wt?u:Wt),In&&Number.isFinite(In)&&(Xe=Xe&&Xe<In?Xe:In),{maxWidth:u,maxHeight:Xe}},Resizable.prototype.calculateNewSizeFromDirection=function(u,Xe){var Wt,In=this.props.scale||1,fr=(Wt=this.props.resizeRatio||1,Array.isArray(Wt)?Wt:[Wt,Wt]),_r=fr[0],wr=fr[1],Ar=this.state,Kr=Ar.direction,no=Ar.original,io=this.props,oo=io.lockAspectRatio,ao=io.lockAspectRatioExtraHeight,so=io.lockAspectRatioExtraWidth,co=no.width,ho=no.height,go=ao||0,xo=so||0;return hasDirection("right",Kr)&&(co=no.width+(u-no.x)*_r/In,oo&&(ho=(co-xo)/this.ratio+go)),hasDirection("left",Kr)&&(co=no.width-(u-no.x)*_r/In,oo&&(ho=(co-xo)/this.ratio+go)),hasDirection("bottom",Kr)&&(ho=no.height+(Xe-no.y)*wr/In,oo&&(co=(ho-go)*this.ratio+xo)),hasDirection("top",Kr)&&(ho=no.height-(Xe-no.y)*wr/In,oo&&(co=(ho-go)*this.ratio+xo)),{newWidth:co,newHeight:ho}},Resizable.prototype.calculateNewSizeFromAspectRatio=function(u,Xe,Wt,In){var fr=this.props,_r=fr.lockAspectRatio,wr=fr.lockAspectRatioExtraHeight,Ar=fr.lockAspectRatioExtraWidth,Kr=void 0===In.width?10:In.width,no=void 0===Wt.width||Wt.width<0?u:Wt.width,io=void 0===In.height?10:In.height,oo=void 0===Wt.height||Wt.height<0?Xe:Wt.height,ao=wr||0,so=Ar||0;if(_r){var co=(io-ao)*this.ratio+so,ho=(oo-ao)*this.ratio+so,go=(Kr-so)/this.ratio+ao,xo=(no-so)/this.ratio+ao,ko=Math.max(Kr,co),Co=Math.min(no,ho),Io=Math.max(io,go),zo=Math.min(oo,xo);u=clamp(u,ko,Co),Xe=clamp(Xe,Io,zo)}else u=clamp(u,Kr,no),Xe=clamp(Xe,io,oo);return{newWidth:u,newHeight:Xe}},Resizable.prototype.setBoundingClientRect=function(){var u=1/(this.props.scale||1);if("parent"===this.props.bounds){var Xe=this.parentNode;if(Xe){var Wt=Xe.getBoundingClientRect();this.parentLeft=Wt.left*u,this.parentTop=Wt.top*u}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var In=this.props.bounds.getBoundingClientRect();this.targetLeft=In.left*u,this.targetTop=In.top*u}if(this.resizable){var fr=this.resizable.getBoundingClientRect(),_r=fr.left,wr=fr.top,Ar=fr.right,Kr=fr.bottom;this.resizableLeft=_r*u,this.resizableRight=Ar*u,this.resizableTop=wr*u,this.resizableBottom=Kr*u}},Resizable.prototype.onResizeStart=function(u,Xe){if(this.resizable&&this.window){var Wt,In=0,fr=0;if(u.nativeEvent&&function(u){return Boolean((u.clientX||0===u.clientX)&&(u.clientY||0===u.clientY))}(u.nativeEvent)?(In=u.nativeEvent.clientX,fr=u.nativeEvent.clientY):u.nativeEvent&&isTouchEvent(u.nativeEvent)&&(In=u.nativeEvent.touches[0].clientX,fr=u.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(u,Xe,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var _r=this.window.getComputedStyle(this.resizable);if("auto"!==_r.flexBasis){var wr=this.parentNode;if(wr){var Ar=this.window.getComputedStyle(wr).flexDirection;this.flexDir=Ar.startsWith("row")?"row":"column",Wt=_r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var Kr={original:{x:In,y:fr,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:lib_assign(lib_assign({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(u.target).cursor||"auto"}),direction:Xe,flexBasis:Wt};this.setState(Kr)}},Resizable.prototype.onMouseMove=function(u){var Xe=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&isTouchEvent(u))try{u.preventDefault(),u.stopPropagation()}catch(u){}var Wt=this.props,In=Wt.maxWidth,fr=Wt.maxHeight,_r=Wt.minWidth,wr=Wt.minHeight,Ar=isTouchEvent(u)?u.touches[0].clientX:u.clientX,Kr=isTouchEvent(u)?u.touches[0].clientY:u.clientY,no=this.state,io=no.direction,oo=no.original,ao=no.width,so=no.height,co=this.getParentSize(),ho=function(u,Xe,Wt,In,fr,_r,wr){return In=getPixelSize(In,u.width,Xe,Wt),fr=getPixelSize(fr,u.height,Xe,Wt),_r=getPixelSize(_r,u.width,Xe,Wt),wr=getPixelSize(wr,u.height,Xe,Wt),{maxWidth:void 0===In?void 0:Number(In),maxHeight:void 0===fr?void 0:Number(fr),minWidth:void 0===_r?void 0:Number(_r),minHeight:void 0===wr?void 0:Number(wr)}}(co,this.window.innerWidth,this.window.innerHeight,In,fr,_r,wr);In=ho.maxWidth,fr=ho.maxHeight,_r=ho.minWidth,wr=ho.minHeight;var go=this.calculateNewSizeFromDirection(Ar,Kr),xo=go.newHeight,ko=go.newWidth,Co=this.calculateNewMaxFromBoundary(In,fr);this.props.snap&&this.props.snap.x&&(ko=findClosestSnap(ko,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(xo=findClosestSnap(xo,this.props.snap.y,this.props.snapGap));var Io=this.calculateNewSizeFromAspectRatio(ko,xo,{width:Co.maxWidth,height:Co.maxHeight},{width:_r,height:wr});if(ko=Io.newWidth,xo=Io.newHeight,this.props.grid){var zo=snap(ko,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),Bo=snap(xo,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),ca=this.props.snapGap||0;ko=0===ca||Math.abs(zo-ko)<=ca?zo:ko,xo=0===ca||Math.abs(Bo-xo)<=ca?Bo:xo}var ua={width:ko-oo.width,height:xo-oo.height};if(ao&&"string"==typeof ao)if(ao.endsWith("%"))ko=ko/co.width*100+"%";else if(ao.endsWith("vw")){ko=ko/this.window.innerWidth*100+"vw"}else if(ao.endsWith("vh")){ko=ko/this.window.innerHeight*100+"vh"}if(so&&"string"==typeof so)if(so.endsWith("%"))xo=xo/co.height*100+"%";else if(so.endsWith("vw")){xo=xo/this.window.innerWidth*100+"vw"}else if(so.endsWith("vh")){xo=xo/this.window.innerHeight*100+"vh"}var Da={width:this.createSizeForCssProperty(ko,"width"),height:this.createSizeForCssProperty(xo,"height")};"row"===this.flexDir?Da.flexBasis=Da.width:"column"===this.flexDir&&(Da.flexBasis=Da.height);var ns=this.state.width!==Da.width,yl=this.state.height!==Da.height,vl=this.state.flexBasis!==Da.flexBasis,kl=ns||yl||vl;kl&&(0,um.flushSync)((function(){Xe.setState(Da)})),this.props.onResize&&kl&&this.props.onResize(u,io,this.resizable,ua)}},Resizable.prototype.onMouseUp=function(u){var Xe,Wt,In=this.state,fr=In.isResizing,_r=In.direction,wr=In.original;if(fr&&this.resizable){var Ar={width:this.size.width-wr.width,height:this.size.height-wr.height};this.props.onResizeStop&&this.props.onResizeStop(u,_r,this.resizable,Ar),this.props.size&&this.setState({width:null!==(Xe=this.props.size.width)&&void 0!==Xe?Xe:"auto",height:null!==(Wt=this.props.size.height)&&void 0!==Wt?Wt:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:lib_assign(lib_assign({},this.state.backgroundStyle),{cursor:"auto"})})}},Resizable.prototype.updateSize=function(u){var Xe,Wt;this.setState({width:null!==(Xe=u.width)&&void 0!==Xe?Xe:"auto",height:null!==(Wt=u.height)&&void 0!==Wt?Wt:"auto"})},Resizable.prototype.renderResizer=function(u){var Xe=this,Wt=this.props,In=Wt.enable,fr=Wt.handleStyles,_r=Wt.handleClasses,wr=Wt.handleWrapperStyle,Ar=Wt.handleWrapperClass,Kr=Wt.handleComponent;if(!In)return null;var no=u.filter((function(u){return!1!==In[u]})).map((function(u){return!1!==In[u]?dp.createElement(nw,{key:u,direction:u,onResizeStart:Xe.onResizeStart,replaceStyles:fr&&fr[u],className:_r&&_r[u]},Kr&&Kr[u]?Kr[u]:null):null}));return dp.createElement("div",{className:Ar,style:wr},no)},Resizable.prototype.render=function(){var u=this,Xe=Object.keys(this.props).reduce((function(Xe,Wt){return-1!==ow.indexOf(Wt)||(Xe[Wt]=u.props[Wt]),Xe}),{}),Wt=lib_assign(lib_assign(lib_assign({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(Wt.flexBasis=this.state.flexBasis);var In=this.props.as||"div";return dp.createElement(In,lib_assign({style:Wt,className:this.props.className},Xe,{ref:function(Xe){Xe&&(u.resizable=Xe)}}),this.state.isResizing&&dp.createElement("div",{style:this.state.backgroundStyle}),this.renderResizer(["topLeft","top","topRight","left"]),this.props.children,this.renderResizer(["right","bottomLeft","bottom","bottomRight"]))},Resizable.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},Resizable}(dp.PureComponent),extendStatics=function(u,Xe){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,Xe){u.__proto__=Xe}||function(u,Xe){for(var Wt in Xe)Xe.hasOwnProperty(Wt)&&(u[Wt]=Xe[Wt])},extendStatics(u,Xe)};var react_rnd_lib_assign=function(){return react_rnd_lib_assign=Object.assign||function __assign(u){for(var Xe,Wt=1,In=arguments.length;Wt<In;Wt++)for(var fr in Xe=arguments[Wt])Object.prototype.hasOwnProperty.call(Xe,fr)&&(u[fr]=Xe[fr]);return u},react_rnd_lib_assign.apply(this,arguments)};var lw={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},cw=function(u){function Rnd(Xe){var Wt=u.call(this,Xe)||this;return Wt.resizingPosition={x:0,y:0},Wt.offsetFromParent={left:0,top:0},Wt.resizableElement={current:null},Wt.originalPosition={x:0,y:0},Wt.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:Xe.maxWidth,maxHeight:Xe.maxHeight},Wt.onResizeStart=Wt.onResizeStart.bind(Wt),Wt.onResize=Wt.onResize.bind(Wt),Wt.onResizeStop=Wt.onResizeStop.bind(Wt),Wt.onDragStart=Wt.onDragStart.bind(Wt),Wt.onDrag=Wt.onDrag.bind(Wt),Wt.onDragStop=Wt.onDragStop.bind(Wt),Wt.getMaxSizesFromProps=Wt.getMaxSizesFromProps.bind(Wt),Wt}return function react_rnd_lib_extends(u,Xe){function __(){this.constructor=u}extendStatics(u,Xe),u.prototype=null===Xe?Object.create(Xe):(__.prototype=Xe.prototype,new __)}(Rnd,u),Rnd.prototype.componentDidMount=function(){this.updateOffsetFromParent();var u=this.offsetFromParent,Xe=u.left,Wt=u.top,In=this.getDraggablePosition(),fr=In.x,_r=In.y;this.draggable.setState({x:fr-Xe,y:_r-Wt}),this.forceUpdate()},Rnd.prototype.getDraggablePosition=function(){var u=this.draggable.state;return{x:u.x,y:u.y}},Rnd.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},Rnd.prototype.getParentSize=function(){return this.resizable.getParentSize()},Rnd.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},Rnd.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},Rnd.prototype.getOffsetHeight=function(u){var Xe=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/Xe;case"body":return document.body.offsetHeight/Xe;default:return u.offsetHeight}},Rnd.prototype.getOffsetWidth=function(u){var Xe=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/Xe;case"body":return document.body.offsetWidth/Xe;default:return u.offsetWidth}},Rnd.prototype.onDragStart=function(u,Xe){this.props.onDragStart&&this.props.onDragStart(u,Xe);var Wt=this.getDraggablePosition();if(this.originalPosition=Wt,this.props.bounds){var In,fr=this.getParent(),_r=this.props.scale;if("parent"===this.props.bounds)In=fr;else{if("body"===this.props.bounds){var wr=fr.getBoundingClientRect(),Ar=wr.left,Kr=wr.top,no=document.body.getBoundingClientRect(),io=-(Ar-fr.offsetLeft*_r-no.left)/_r,oo=-(Kr-fr.offsetTop*_r-no.top)/_r,ao=(document.body.offsetWidth-this.resizable.size.width*_r)/_r+io,so=(document.body.offsetHeight-this.resizable.size.height*_r)/_r+oo;return this.setState({bounds:{top:oo,right:ao,bottom:so,left:io}})}if("window"===this.props.bounds){if(!this.resizable)return;var co=fr.getBoundingClientRect(),ho=co.left,go=co.top,xo=-(ho-fr.offsetLeft*_r)/_r,ko=-(go-fr.offsetTop*_r)/_r;ao=(window.innerWidth-this.resizable.size.width*_r)/_r+xo,so=(window.innerHeight-this.resizable.size.height*_r)/_r+ko;return this.setState({bounds:{top:ko,right:ao,bottom:so,left:xo}})}"string"==typeof this.props.bounds?In=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(In=this.props.bounds)}if(In instanceof HTMLElement&&fr instanceof HTMLElement){var Co=In.getBoundingClientRect(),Io=Co.left,zo=Co.top,Bo=fr.getBoundingClientRect(),ca=(Io-Bo.left)/_r,ua=zo-Bo.top;if(this.resizable){this.updateOffsetFromParent();var Da=this.offsetFromParent;this.setState({bounds:{top:ua-Da.top,right:ca+(In.offsetWidth-this.resizable.size.width)-Da.left/_r,bottom:ua+(In.offsetHeight-this.resizable.size.height)-Da.top,left:ca-Da.left/_r}})}}}},Rnd.prototype.onDrag=function(u,Xe){if(this.props.onDrag){var Wt=this.offsetFromParent,In=Wt.left,fr=Wt.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:Xe.x+In,y:this.originalPosition.y+fr,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:this.originalPosition.x+In,y:Xe.y+fr,deltaX:0})):void 0:this.props.onDrag(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:Xe.x+In,y:Xe.y+fr}))}},Rnd.prototype.onDragStop=function(u,Xe){if(this.props.onDragStop){var Wt=this.offsetFromParent,In=Wt.left,fr=Wt.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:Xe.x+In,y:this.originalPosition.y+fr,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:this.originalPosition.x+In,y:Xe.y+fr,deltaX:0})):void 0:this.props.onDragStop(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:Xe.x+In,y:Xe.y+fr}))}},Rnd.prototype.onResizeStart=function(u,Xe,Wt){u.stopPropagation(),this.setState({resizing:!0});var In=this.props.scale,fr=this.offsetFromParent,_r=this.getDraggablePosition();if(this.resizingPosition={x:_r.x+fr.left,y:_r.y+fr.top},this.originalPosition=_r,this.props.bounds){var wr=this.getParent(),Ar=void 0;"parent"===this.props.bounds?Ar=wr:"body"===this.props.bounds?Ar=document.body:"window"===this.props.bounds?Ar=window:"string"==typeof this.props.bounds?Ar=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(Ar=this.props.bounds);var Kr=this.getSelfElement();if(Kr instanceof Element&&(Ar instanceof HTMLElement||Ar===window)&&wr instanceof HTMLElement){var no=this.getMaxSizesFromProps(),io=no.maxWidth,oo=no.maxHeight,ao=this.getParentSize();if(io&&"string"==typeof io)if(io.endsWith("%")){var so=Number(io.replace("%",""))/100;io=ao.width*so}else io.endsWith("px")&&(io=Number(io.replace("px","")));if(oo&&"string"==typeof oo)if(oo.endsWith("%")){so=Number(oo.replace("%",""))/100;oo=ao.height*so}else oo.endsWith("px")&&(oo=Number(oo.replace("px","")));var co=Kr.getBoundingClientRect(),ho=co.left,go=co.top,xo="window"===this.props.bounds?{left:0,top:0}:Ar.getBoundingClientRect(),ko=xo.left,Co=xo.top,Io=this.getOffsetWidth(Ar),zo=this.getOffsetHeight(Ar),Bo=Xe.toLowerCase().endsWith("left"),ca=Xe.toLowerCase().endsWith("right"),ua=Xe.startsWith("top"),Da=Xe.startsWith("bottom");if((Bo||ua)&&this.resizable){var ns=(ho-ko)/In+this.resizable.size.width;this.setState({maxWidth:ns>Number(io)?io:ns})}if(ca||this.props.lockAspectRatio&&!Bo&&!ua){ns=Io+(ko-ho)/In;this.setState({maxWidth:ns>Number(io)?io:ns})}if((ua||Bo)&&this.resizable){ns=(go-Co)/In+this.resizable.size.height;this.setState({maxHeight:ns>Number(oo)?oo:ns})}if(Da||this.props.lockAspectRatio&&!ua&&!Bo){ns=zo+(Co-go)/In;this.setState({maxHeight:ns>Number(oo)?oo:ns})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(u,Xe,Wt)},Rnd.prototype.onResize=function(u,Xe,Wt,In){var fr=this,_r={x:this.originalPosition.x,y:this.originalPosition.y},wr=-In.width,Ar=-In.height;["top","left","topLeft","bottomLeft","topRight"].includes(Xe)&&("bottomLeft"===Xe?_r.x+=wr:("topRight"===Xe||(_r.x+=wr),_r.y+=Ar));var Kr=this.draggable.state;_r.x===Kr.x&&_r.y===Kr.y||(0,um.flushSync)((function(){fr.draggable.setState(_r)})),this.updateOffsetFromParent();var no=this.offsetFromParent,io=this.getDraggablePosition().x+no.left,oo=this.getDraggablePosition().y+no.top;this.resizingPosition={x:io,y:oo},this.props.onResize&&this.props.onResize(u,Xe,Wt,In,{x:io,y:oo})},Rnd.prototype.onResizeStop=function(u,Xe,Wt,In){this.setState({resizing:!1});var fr=this.getMaxSizesFromProps(),_r=fr.maxWidth,wr=fr.maxHeight;this.setState({maxWidth:_r,maxHeight:wr}),this.props.onResizeStop&&this.props.onResizeStop(u,Xe,Wt,In,this.resizingPosition)},Rnd.prototype.updateSize=function(u){this.resizable&&this.resizable.updateSize({width:u.width,height:u.height})},Rnd.prototype.updatePosition=function(u){this.draggable.setState(u)},Rnd.prototype.updateOffsetFromParent=function(){var u=this.props.scale,Xe=this.getParent(),Wt=this.getSelfElement();if(!Xe||null===Wt)return{top:0,left:0};var In=Xe.getBoundingClientRect(),fr=In.left,_r=In.top,wr=Wt.getBoundingClientRect(),Ar=this.getDraggablePosition(),Kr=Xe.scrollLeft,no=Xe.scrollTop;this.offsetFromParent={left:wr.left-fr+Kr-Ar.x*u,top:wr.top-_r+no-Ar.y*u}},Rnd.prototype.render=function(){var u=this,Xe=this.props,Wt=Xe.disableDragging,In=Xe.style,fr=Xe.dragHandleClassName,_r=Xe.position,wr=Xe.onMouseDown,Ar=Xe.onMouseUp,Kr=Xe.dragAxis,no=Xe.dragGrid,io=Xe.bounds,oo=Xe.enableUserSelectHack,ao=Xe.cancel,so=Xe.children,co=(Xe.onResizeStart,Xe.onResize,Xe.onResizeStop,Xe.onDragStart,Xe.onDrag,Xe.onDragStop,Xe.resizeHandleStyles),ho=Xe.resizeHandleClasses,go=Xe.resizeHandleComponent,xo=Xe.enableResizing,ko=Xe.resizeGrid,Co=Xe.resizeHandleWrapperClass,Io=Xe.resizeHandleWrapperStyle,zo=Xe.scale,Bo=Xe.allowAnyClick,ca=function __rest(u,Xe){var Wt={};for(var In in u)Object.prototype.hasOwnProperty.call(u,In)&&Xe.indexOf(In)<0&&(Wt[In]=u[In]);if(null!=u&&"function"==typeof Object.getOwnPropertySymbols){var fr=0;for(In=Object.getOwnPropertySymbols(u);fr<In.length;fr++)Xe.indexOf(In[fr])<0&&Object.prototype.propertyIsEnumerable.call(u,In[fr])&&(Wt[In[fr]]=u[In[fr]])}return Wt}(Xe,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick"]),ua=this.props.default?react_rnd_lib_assign({},this.props.default):void 0;delete ca.default;var Da,ns=Wt||fr?{cursor:"auto"}:{cursor:"move"},yl=react_rnd_lib_assign(react_rnd_lib_assign(react_rnd_lib_assign({},lw),ns),In),vl=this.offsetFromParent,kl=vl.left,Al=vl.top;_r&&(Da={x:_r.x-kl,y:_r.y-Al});var Ml,Rl=this.state.resizing?void 0:Da,Ol=this.state.resizing?"both":Kr;return(0,dp.createElement)(Xx(),{ref:function(Xe){Xe&&(u.draggable=Xe)},handle:fr?".".concat(fr):void 0,defaultPosition:ua,onMouseDown:wr,onMouseUp:Ar,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:Ol,disabled:Wt,grid:no,bounds:io?this.state.bounds:void 0,position:Rl,enableUserSelectHack:oo,cancel:ao,scale:zo,allowAnyClick:Bo,nodeRef:this.resizableElement},(0,dp.createElement)(sw,react_rnd_lib_assign({},ca,{ref:function(Xe){Xe&&(u.resizable=Xe,u.resizableElement.current=Xe.resizable)},defaultSize:ua,size:this.props.size,enable:"boolean"==typeof xo?(Ml=xo,{bottom:Ml,bottomLeft:Ml,bottomRight:Ml,left:Ml,right:Ml,top:Ml,topLeft:Ml,topRight:Ml}):xo,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:yl,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:ko,handleWrapperClass:Co,handleWrapperStyle:Io,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:co,handleClasses:ho,handleComponent:go,scale:this.props.scale}),so))},Rnd.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},Rnd}(dp.PureComponent);class ErrorBoundary extends dp.Component{constructor(u){super(u),this.state={hasError:!1}}componentDidCatch(u,Xe){this.setState({hasError:!0}),console.error(u,Xe)}render(){return this.state.hasError?dp.createElement(gx,{color:"error"},Gx("error.unexpected")):this.props.children}}var uw=__webpack_require__.p+"706ae30aa9b6377185e2.png";function getIconButtonUtilityClass(u){return(0,bp.Ay)("MuiIconButton",u)}var dw=(0,uf.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);const hw=["edge","children","className","color","disabled","disableFocusRipple","size"],pw=(0,Up.Ay)(jf,{name:"MuiIconButton",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,"default"!==Wt.color&&Xe[`color${(0,Vp.A)(Wt.color)}`],Wt.edge&&Xe[`edge${(0,Vp.A)(Wt.edge)}`],Xe[`size${(0,Vp.A)(Wt.size)}`]]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({textAlign:"center",flex:"0 0 auto",fontSize:u.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(u.vars||u).palette.action.active,transition:u.transitions.create("background-color",{duration:u.transitions.duration.shortest})},!Xe.disableRipple&&{"&:hover":{backgroundColor:u.vars?`rgba(${u.vars.palette.action.activeChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette.action.active,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===Xe.edge&&{marginLeft:"small"===Xe.size?-3:-12},"end"===Xe.edge&&{marginRight:"small"===Xe.size?-3:-12})),(({theme:u,ownerState:Xe})=>{var Wt;const In=null==(Wt=(u.vars||u).palette)?void 0:Wt[Xe.color];return(0,_p.A)({},"inherit"===Xe.color&&{color:"inherit"},"inherit"!==Xe.color&&"default"!==Xe.color&&(0,_p.A)({color:null==In?void 0:In.main},!Xe.disableRipple&&{"&:hover":(0,_p.A)({},In&&{backgroundColor:u.vars?`rgba(${In.mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(In.main,u.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===Xe.size&&{padding:5,fontSize:u.typography.pxToRem(18)},"large"===Xe.size&&{padding:12,fontSize:u.typography.pxToRem(28)},{[`&.${dw.disabled}`]:{backgroundColor:"transparent",color:(u.vars||u).palette.action.disabled}})})),fw=dp.forwardRef((function IconButton(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiIconButton"}),{edge:In=!1,children:fr,className:_r,color:wr="default",disabled:Ar=!1,disableFocusRipple:Kr=!1,size:no="medium"}=Wt,io=(0,yp.A)(Wt,hw),oo=(0,_p.A)({},Wt,{edge:In,color:wr,disabled:Ar,disableFocusRipple:Kr,size:no}),ao=(u=>{const{classes:Xe,disabled:Wt,color:In,edge:fr,size:_r}=u,wr={root:["root",Wt&&"disabled","default"!==In&&`color${(0,Vp.A)(In)}`,fr&&`edge${(0,Vp.A)(fr)}`,`size${(0,Vp.A)(_r)}`]};return(0,xp.A)(wr,getIconButtonUtilityClass,Xe)})(oo);return(0,Fp.jsx)(pw,(0,_p.A)({className:(0,vp.A)(ao.root,_r),centerRipple:!0,focusRipple:!Kr,disabled:Ar,ref:Xe},io,{ownerState:oo,children:fr}))}));var mw=fw;function ViewerButton(u){var Xe=this;const{isLoading:Wt,onClick:In,tooltipId:fr,tooltip:_r,icon:wr}=u;return dp.createElement(oy,{id:fr,title:_r,placement:"left",arrow:!0},dp.createElement("span",null,dp.createElement(mw,{size:"small",disabled:Wt,onClick:function onClick(){_newArrowCheck(this,Xe),Wt||In()}.bind(this)},wr)))}var gw=void 0;const yw=function JakartoViewerFn(u){var Xe=this;_newArrowCheck(this,gw);const{isVisible:Wt,isLoading:In,globalTheme:fr}=u,_r=JMap.Application.UI.SidePanel.getWidthOpenInPixel()-JMap.Application.UI.SidePanel.getWidthCloseInPixel(),wr=Math.floor(10*_r/16),[Ar,Kr]=(0,dp.useState)(!1),[no,io]=(0,dp.useState)(`${wr}px`),[oo,ao]=(0,dp.useState)(`${_r}px`),[so,co]=(0,dp.useState)({x:0,y:window.innerHeight/2});return dp.createElement(ErrorBoundary,null,dp.createElement(cw,{size:{width:oo,height:no},position:so,disableDragging:Ar,bounds:"window",minWidth:"225px",minHeight:"150px",style:{display:Wt?"inline-block":"none",backgroundColor:fr.palette.background.paper,borderTopLeftRadius:"0.1875rem",borderTopRightRadius:"0.1875rem"},onDragStop:function onDragStop(u,Wt){_newArrowCheck(this,Xe);const In={x:Wt.x,y:Wt.y};co(In)}.bind(this),onResizeStop:function onResizeStop(u,Wt,In,fr,_r){_newArrowCheck(this,Xe);const wr=document.getElementById(xy)?.getElementsByTagName("canvas")[0].getContext("webgl");!wr||wr.canvas.width===wr.canvas.clientWidth&&wr.canvas.height===wr.canvas.clientHeight||(wr.canvas.width=wr.canvas.clientWidth,wr.canvas.height=wr.canvas.clientHeight,wr.viewport(0,0,wr.drawingBufferWidth,wr.drawingBufferHeight),window.dispatchEvent(new Event("resize")))}.bind(this),onResize:function onResize(u,Wt,In,fr,_r){_newArrowCheck(this,Xe);const wr=document.getElementById(xy)?.getElementsByTagName("canvas");co(_r),wr&&wr.length>0&&(In.style.width!==oo&&(ao(In.style.width),wr[0].style.width=In.style.width),In.style.height!==no&&(io(In.style.height),wr[0].style.height=`calc(${In.style.height} - ${wy})`))}.bind(this)},dp.createElement(ux,null,dp.createElement(Sx,{sx:{backgroundColor:function backgroundColor(u){return _newArrowCheck(this,Xe),u.palette.primary.main}.bind(this)},avatar:dp.createElement(Px,{component:"img",src:uw,alt:"Jakarto Logo",sx:{marginLeft:"0.25rem",maxHeight:`calc(${wy} - 0.25rem)`,height:"auto",width:"auto",pointerEvents:"none",imageRendering:"crisp-edges"}}),action:dp.createElement(Dx,{direction:"row"},Wt?dp.createElement(ViewerButton,{isLoading:In,onClick:function onClick(){_newArrowCheck(this,Xe),Cw.openJakartoWindowAtViewerPosition()}.bind(this),tooltip:Gx("jakarto.viewer.button.external.tooltip"),tooltipId:"open-jakartowns-button",icon:dp.createElement(rx.A,{sx:{background:function background(u){return _newArrowCheck(this,Xe),u.palette.background.default}.bind(this),borderRadius:".3rem"}})}):null,Wt?dp.createElement(ViewerButton,{isLoading:In,onClick:function onClick(){_newArrowCheck(this,Xe),Cw.toggleIsVisible()}.bind(this),tooltip:Gx("jakarto.viewer.button.close.tooltip"),tooltipId:"hide-viewer-button",icon:dp.createElement(nx.A,{sx:{background:function background(u){return _newArrowCheck(this,Xe),u.palette.background.default}.bind(this),borderRadius:".3rem"}})}):null)}),dp.createElement(jx,{id:"jmap-jakarto-viewer-container",onMouseEnter:function onMouseEnter(){return _newArrowCheck(this,Xe),Kr(!0)}.bind(this),onMouseLeave:function onMouseLeave(){return _newArrowCheck(this,Xe),Kr(!1)}.bind(this),sx:{height:`calc(100% - ${wy})`,width:"100%",padding:0,"&:last-child":{paddingBottom:0}}},dp.createElement(Zx,{id:ky})))))}.bind(void 0),_w=Qb(function(u){return _newArrowCheck(this,gw),{isVisible:getExtensionState(u).viewer.isVisible,isLoading:getExtensionState(u).viewer.isLoading,globalTheme:getAppState(u).ui.theme}}.bind(void 0))(yw);var vw=void 0;const bw=function FloatingPanelFn(u){return _newArrowCheck(this,vw),dp.createElement(Xe.a,{theme:u.theme},dp.createElement(_w,null))}.bind(void 0),xw=Qb(function(u){return _newArrowCheck(this,vw),{theme:getAppState(u).ui.theme}}.bind(void 0))(bw),ww=function FloatingPanel(){return _newArrowCheck(this,vw),dp.createElement(ex,{store:store_getStore()},dp.createElement(xw,null))}.bind(void 0);var Sw=__webpack_require__(5338);let kw;function mountJakartownsApp(){var u=this;return new Promise(function(Xe,Wt){var In=this;_newArrowCheck(this,u),jakartowns&&jakartowns.app.create_jakartowns(`#${ky}`,{},function(u){var fr=this;_newArrowCheck(this,In),jakartowns&&(jakartowns.app.jakartowns_instance=u);const _r=document.getElementsByTagName("nav");0!==_r.length&&_r[0].remove();const wr=getExtensionState().viewer.parameters.location,Ar=0!==wr.x&&0!==wr.y?wr:JMap.Map.getCenter();if(jakartowns&&jakartowns.app.jakartowns_instance){const u=getAdjustedLocation(Ar);jakartowns.app.jakartowns_instance.setPosition({longitude:u.x,latitude:u.y}).then(function(u){_newArrowCheck(this,fr),Xe(u)}.bind(this)).catch(function(u){_newArrowCheck(this,fr),console.error(u),Wt(u)}.bind(this))}}.bind(this))}.bind(this))}let Aw=null,Tw="";const Cw={toggleIsVisible:function(){if(getExtensionState().viewer.isLoading)throw Error("Can't change Jakarto visibility while it is loading");store_getStore().dispatch(viewerActionCreator_setIsVisible(!getExtensionState().viewer.isVisible))},toggleIsInteractorActive:function(){store_getStore().dispatch(viewerActionCreator_setIsInteractorActive(!getExtensionState().viewer.isInteractorActive))},setParameters:function(u){!function checkParams(u){if(!u)throw new Error("Can't set empty parameters. To clear them, use clearParameters.");if(void 0!==u.fov&&(u.fov<10||u.fov>100))throw new Error("Invalid fov value. Values must be between 10 and 100.");JMap.Geometry.checkLocation(u.location)}(u);const Xe=getAdjustedLocation(u.location);store_getStore().dispatch(viewerActionCreator_setParameters({...u,location:Xe}))},isAuthenticated:function(){var u=this;return new Promise(function(Xe,Wt){var In=this;_newArrowCheck(this,u),cv.isAuthenticated().then(function(u){_newArrowCheck(this,In),Xe(u)}.bind(this)).catch(function(u){_newArrowCheck(this,In),console.error(u),Wt()}.bind(this))}.bind(this))},openJakartoWindowAtViewerPosition:function(){const u=function getJakartoWindowLocation(u){let Xe=`${In}/?lat=${u.location.y}&lng=${u.location.x}`;return void 0!==u.pan&&(Xe=Xe.concat(`&pan=${u.pan}`)),void 0!==u.tilt&&(Xe=Xe.concat(`&tilt=${u.tilt}`)),void 0!==u.fov&&(Xe=Xe.concat(`&fov=${u.fov}`)),Xe}(getExtensionState().viewer.parameters);null===Aw||Aw.closed?(Aw=window.open(u,"jakarto-panorama-external"),Tw=u):Tw!==u&&(Aw.location.replace(u),null!==Aw&&Aw.focus())}},Ew={getJSVersion:function(){return"2.1.1"},setExtensionEnableState:function(u,Xe){store_getStore().dispatch(actions_extensionActionCreator_enableStateExtension(u)),Xe?destroyJakartownsUI():u?function initializeJakartowns(){var u=this;(function createJakartownsUI(){var u=this;try{store_getStore().dispatch(viewerActionCreator_setIsLoading(!0)),function createFloatingPanelInBody(){let u=document.getElementById(Sy);const Xe=document.getElementsByClassName("jmapcloud-ng-layout")[0];!u&&Xe&&(u=document.createElement("div"),u.id=Sy,u.className=Sy,u.style.position="absolute",u.style.top="0",u.style.left="0",u.style.zIndex="1",Xe.appendChild(u)),kw=Sw.H(u),kw.render(dp.createElement(ww,null))}(),function createJakartownsInstance(){var u=this;return new Promise(function(Xe,Wt){var In=this;_newArrowCheck(this,u),window.hasOwnProperty("jakartowns")?mountJakartownsApp().then(function(u){return _newArrowCheck(this,In),Xe(u)}.bind(this)).catch(function(u){_newArrowCheck(this,In),console.error(u),Wt(u)}.bind(this)):JMap.Util.loadJSFile("https://maps.jakarto.com/api/v1.js").then(function(){var u=this;_newArrowCheck(this,In),mountJakartownsApp().then(function(Wt){return _newArrowCheck(this,u),Xe(Wt)}.bind(this)).catch(function(Xe){_newArrowCheck(this,u),console.error(Xe),Wt(Xe)}.bind(this))}.bind(this))}.bind(this))}().then(function(Xe){_newArrowCheck(this,u),function createViewerLocationMarker(){var u=this;const Xe=JMap.Map.getMap(),Wt="marker",In=new Image(65,65);Xe.loadImage(Py).then(function(fr){_newArrowCheck(this,u),Xe.hasImage(Wt)&&Xe.removeImage(Wt),Xe.addImage(Wt,fr.data),In.src=Py,Iy=new Ey.Marker({element:In,draggable:!0,rotationAlignment:"map",pitchAlignment:"map"}),setMarkerLngLat(getExtensionState().viewer.parameters.location),Iy.addTo(Xe),Iy.on("dragend",onDragEnd)}.bind(this)).catch(function(Xe){_newArrowCheck(this,u),console.error("An error occurred while loading the marker image",Xe)}.bind(this))}(),JMap.Application.Message.info(`Nearest panorama is ${Xe.distance.toFixed(3)} km away from initial position`),store_getStore().dispatch(viewerActionCreator_setIsLoading(!1))}.bind(this)).catch(function(Xe){_newArrowCheck(this,u),console.error(Xe),store_getStore().dispatch(viewerActionCreator_setIsLoading(!1))}.bind(this))}catch(u){console.error(u),store_getStore().dispatch(viewerActionCreator_setIsLoading(!1))}})(),function startViewerListeners(){window.addEventListener(Ay,handlePositionChange),window.addEventListener(Ty,handleRotationChange),window.addEventListener(Cy,handleTiltChange),window.addEventListener("fov",handleFovChange)}(),addCoverageLayers(),JMap.Event.Map.on.mapDestroy(_r.JAKARTO_MAP_DESTROY_UI,function(){_newArrowCheck(this,u),Ew.setExtensionEnableState(!1,!0)}.bind(this)),JMap.Event.Map.on.zoom(_r.JAKARTO_MAP_ZOOM_CHANGE,function(Xe){return _newArrowCheck(this,u),by.setZoomLevel(Xe.zoom)}.bind(this))}():function cleanupJakartowns(){destroyJakartownsUI(),function removeViewerListeners(){window.removeEventListener(Ay,handlePositionChange),window.removeEventListener(Ty,handleRotationChange),window.removeEventListener(Cy,handleTiltChange),window.removeEventListener("fov",handleFovChange)}(),function removeCoverageLayers(){var u=this;const Xe=JMap.Map.getMap();getAllWMTSYearVariables().forEach(function(Wt){_newArrowCheck(this,u),Xe.removeLayer(getWMTSLayerIdFromYear(Wt)),Xe.removeSource(getWMTSLayerSourceFromYear(Wt))}.bind(this)),Xe.removeLayer(wr),Xe.removeSource(Ar)}(),JMap.Event.Map.remove(_r.JAKARTO_MAP_DESTROY_UI),JMap.Event.Map.remove(_r.JAKARTO_MAP_ZOOM_CHANGE)}()}},Pw={...Ew,Viewer:Cw,Layer:by};function destroyJakartownsUI(){!function destroyFloatingPanelInBody(){kw&&(kw.unmount(),kw=void 0)}(),function destroyJakartownsInstance(){jakartowns&&jakartowns.app.jakartowns_instance&&(jakartowns.app.jakartowns_instance.unmount(),jakartowns.app.jakartowns_instance=void 0)}(),function destroyViewerLocationMarker(){Iy&&Iy.remove()}()}var Iw=__webpack_require__(838),Mw=__webpack_require__(1656),Rw=__webpack_require__(2048),zw=__webpack_require__(5003),Ow=(0,zw.A)((0,Fp.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"),Lw=(0,zw.A)((0,Fp.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"),Dw=(0,zw.A)((0,Fp.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");function getCheckboxUtilityClass(u){return(0,bp.Ay)("MuiCheckbox",u)}var Fw=(0,uf.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);const Bw=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],jw=(0,Up.Ay)(Gf,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiCheckbox",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.indeterminate&&Xe.indeterminate,Xe[`size${(0,Vp.A)(Wt.size)}`],"default"!==Wt.color&&Xe[`color${(0,Vp.A)(Wt.color)}`]]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({color:(u.vars||u).palette.text.secondary},!Xe.disableRipple&&{"&:hover":{backgroundColor:u.vars?`rgba(${"default"===Xe.color?u.vars.palette.action.activeChannel:u.vars.palette[Xe.color].mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)("default"===Xe.color?u.palette.action.active:u.palette[Xe.color].main,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==Xe.color&&{[`&.${Fw.checked}, &.${Fw.indeterminate}`]:{color:(u.vars||u).palette[Xe.color].main},[`&.${Fw.disabled}`]:{color:(u.vars||u).palette.action.disabled}}))),Nw=(0,Fp.jsx)(Lw,{}),Vw=(0,Fp.jsx)(Ow,{}),Uw=(0,Fp.jsx)(Dw,{}),$w=dp.forwardRef((function Checkbox(u,Xe){var Wt,In;const fr=(0,$p.b)({props:u,name:"MuiCheckbox"}),{checkedIcon:_r=Nw,color:wr="primary",icon:Ar=Vw,indeterminate:Kr=!1,indeterminateIcon:no=Uw,inputProps:io,size:oo="medium",className:ao}=fr,so=(0,yp.A)(fr,Bw),co=Kr?no:Ar,ho=Kr?no:_r,go=(0,_p.A)({},fr,{color:wr,indeterminate:Kr,size:oo}),xo=(u=>{const{classes:Xe,indeterminate:Wt,color:In,size:fr}=u,_r={root:["root",Wt&&"indeterminate",`color${(0,Vp.A)(In)}`,`size${(0,Vp.A)(fr)}`]},wr=(0,xp.A)(_r,getCheckboxUtilityClass,Xe);return(0,_p.A)({},Xe,wr)})(go);return(0,Fp.jsx)(jw,(0,_p.A)({type:"checkbox",inputProps:(0,_p.A)({"data-indeterminate":Kr},io),icon:dp.cloneElement(co,{fontSize:null!=(Wt=co.props.fontSize)?Wt:oo}),checkedIcon:dp.cloneElement(ho,{fontSize:null!=(In=ho.props.fontSize)?In:oo}),ownerState:go,ref:Xe,className:(0,vp.A)(xo.root,ao)},so,{classes:xo}))}));var Ww=$w,qw=__webpack_require__(7091);function getCollapseUtilityClass(u){return(0,bp.Ay)("MuiCollapse",u)}(0,uf.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Zw=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],Hw=(0,Up.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[Wt.orientation],"entered"===Wt.state&&Xe.entered,"exited"===Wt.state&&!Wt.in&&"0px"===Wt.collapsedSize&&Xe.hidden]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({height:0,overflow:"hidden",transition:u.transitions.create("height")},"horizontal"===Xe.orientation&&{height:"auto",width:0,transition:u.transitions.create("width")},"entered"===Xe.state&&(0,_p.A)({height:"auto",overflow:"visible"},"horizontal"===Xe.orientation&&{width:"auto"}),"exited"===Xe.state&&!Xe.in&&"0px"===Xe.collapsedSize&&{visibility:"hidden"}))),Gw=(0,Up.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(u,Xe)=>Xe.wrapper})((({ownerState:u})=>(0,_p.A)({display:"flex",width:"100%"},"horizontal"===u.orientation&&{width:"auto",height:"100%"}))),Kw=(0,Up.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(u,Xe)=>Xe.wrapperInner})((({ownerState:u})=>(0,_p.A)({width:"100%"},"horizontal"===u.orientation&&{width:"auto",height:"100%"}))),Xw=dp.forwardRef((function Collapse(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCollapse"}),{addEndListener:In,children:fr,className:_r,collapsedSize:wr="0px",component:Ar,easing:Kr,in:no,onEnter:io,onEntered:oo,onEntering:ao,onExit:so,onExited:co,onExiting:ho,orientation:go="vertical",style:xo,timeout:ko=qw.p0.standard,TransitionComponent:Co=_m}=Wt,Io=(0,yp.A)(Wt,Zw),zo=(0,_p.A)({},Wt,{orientation:go,collapsedSize:wr}),Bo=(u=>{const{orientation:Xe,classes:Wt}=u,In={root:["root",`${Xe}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${Xe}`],wrapperInner:["wrapperInner",`${Xe}`]};return(0,xp.A)(In,getCollapseUtilityClass,Wt)})(zo),ca=styles_useTheme_useTheme(),ua=(0,lf.A)(),Da=dp.useRef(null),ns=dp.useRef(),yl="number"==typeof wr?`${wr}px`:wr,vl="horizontal"===go,kl=vl?"width":"height",Al=dp.useRef(null),Ml=(0,Xp.A)(Xe,Al),normalizedTransitionCallback=u=>Xe=>{if(u){const Wt=Al.current;void 0===Xe?u(Wt):u(Wt,Xe)}},getWrapperSize=()=>Da.current?Da.current[vl?"clientWidth":"clientHeight"]:0,Rl=normalizedTransitionCallback(((u,Xe)=>{Da.current&&vl&&(Da.current.style.position="absolute"),u.style[kl]=yl,io&&io(u,Xe)})),Ol=normalizedTransitionCallback(((u,Xe)=>{const Wt=getWrapperSize();Da.current&&vl&&(Da.current.style.position="");const{duration:In,easing:fr}=getTransitionProps({style:xo,timeout:ko,easing:Kr},{mode:"enter"});if("auto"===ko){const Xe=ca.transitions.getAutoHeightDuration(Wt);u.style.transitionDuration=`${Xe}ms`,ns.current=Xe}else u.style.transitionDuration="string"==typeof In?In:`${In}ms`;u.style[kl]=`${Wt}px`,u.style.transitionTimingFunction=fr,ao&&ao(u,Xe)})),Ll=normalizedTransitionCallback(((u,Xe)=>{u.style[kl]="auto",oo&&oo(u,Xe)})),Dl=normalizedTransitionCallback((u=>{u.style[kl]=`${getWrapperSize()}px`,so&&so(u)})),Bl=normalizedTransitionCallback(co),Nl=normalizedTransitionCallback((u=>{const Xe=getWrapperSize(),{duration:Wt,easing:In}=getTransitionProps({style:xo,timeout:ko,easing:Kr},{mode:"exit"});if("auto"===ko){const Wt=ca.transitions.getAutoHeightDuration(Xe);u.style.transitionDuration=`${Wt}ms`,ns.current=Wt}else u.style.transitionDuration="string"==typeof Wt?Wt:`${Wt}ms`;u.style[kl]=yl,u.style.transitionTimingFunction=In,ho&&ho(u)}));return(0,Fp.jsx)(Co,(0,_p.A)({in:no,onEnter:Rl,onEntered:Ll,onEntering:Ol,onExit:Dl,onExited:Bl,onExiting:Nl,addEndListener:u=>{"auto"===ko&&ua.start(ns.current||0,u),In&&In(Al.current,u)},nodeRef:Al,timeout:"auto"===ko?null:ko},Io,{children:(u,Xe)=>(0,Fp.jsx)(Hw,(0,_p.A)({as:Ar,className:(0,vp.A)(Bo.root,_r,{entered:Bo.entered,exited:!no&&"0px"===yl&&Bo.hidden}[u]),style:(0,_p.A)({[vl?"minWidth":"minHeight"]:yl},xo),ref:Ml},Xe,{ownerState:(0,_p.A)({},zo,{state:u}),children:(0,Fp.jsx)(Gw,{ownerState:(0,_p.A)({},zo,{state:u}),className:Bo.wrapper,ref:Da,children:(0,Fp.jsx)(Kw,{ownerState:(0,_p.A)({},zo,{state:u}),className:Bo.wrapperInner,children:fr})})}))}))}));Xw.muiSupportAuto=!0;var Yw=Xw,Jw=__webpack_require__(5673),Qw=__webpack_require__(6768);function LayerItem(u){var Xe=this;const{isVisible:Wt,id:In}=u,fr={maxWidth:"1.25rem",width:"1.25rem"},_r=Wt?dp.createElement(Jw.A,{sx:fr}):dp.createElement(Qw.A,{sx:fr});return dp.createElement(Zx,{id:In,sx:{height:"2.25rem",minHeight:"2.25rem",maxHeight:"2.25rem",display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%",minWidth:"100%",paddingTop:function paddingTop(u){return _newArrowCheck(this,Xe),u.spacing(.5)}.bind(this),paddingBottom:function paddingBottom(u){return _newArrowCheck(this,Xe),u.spacing(.5)}.bind(this),borderBottom:function borderBottom(u){return _newArrowCheck(this,Xe),`0.0625rem solid ${u.palette.divider}`}.bind(this),"& > #jakarto-layer-visibility-button":{display:function display(Wt){return _newArrowCheck(this,Xe),u.isVisible?"none":"block"}.bind(this)},"&:hover > #jakarto-layer-visibility-button":{display:"block"}},fontWeight:"fontWeightMedium"},dp.createElement("img",{style:{maxWidth:"1rem",width:"1rem",marginLeft:"0.5rem",filter:u.isVisible?"":"grayscale(100%)"},src:u.src}),dp.createElement(gx,{variant:"body2",noWrap:!0,color:"textPrimary",sx:{paddingLeft:0,flexGrow:1,userSelect:"none",marginLeft:"0.5rem"}},u.layerName),dp.createElement(mw,{id:"jakarto-layer-visibility-button",color:"secondary",size:"small",onClick:u.onClick},_r))}function hasValue(u){return null!=u&&!(Array.isArray(u)&&0===u.length)}function isFilled(u,Xe=!1){return u&&(hasValue(u.value)&&""!==u.value||Xe&&hasValue(u.defaultValue)&&""!==u.defaultValue)}var eS=__webpack_require__(8593);function getFormControlUtilityClasses(u){return(0,bp.Ay)("MuiFormControl",u)}(0,uf.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const tS=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],nS=(0,Up.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:u},Xe)=>(0,_p.A)({},Xe.root,Xe[`margin${(0,Vp.A)(u.margin)}`],u.fullWidth&&Xe.fullWidth)})((({ownerState:u})=>(0,_p.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===u.margin&&{marginTop:16,marginBottom:8},"dense"===u.margin&&{marginTop:8,marginBottom:4},u.fullWidth&&{width:"100%"}))),rS=dp.forwardRef((function FormControl(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiFormControl"}),{children:In,className:fr,color:_r="primary",component:wr="div",disabled:Ar=!1,error:Kr=!1,focused:no,fullWidth:io=!1,hiddenLabel:oo=!1,margin:ao="none",required:so=!1,size:co="medium",variant:ho="outlined"}=Wt,go=(0,yp.A)(Wt,tS),xo=(0,_p.A)({},Wt,{color:_r,component:wr,disabled:Ar,error:Kr,fullWidth:io,hiddenLabel:oo,margin:ao,required:so,size:co,variant:ho}),ko=(u=>{const{classes:Xe,margin:Wt,fullWidth:In}=u,fr={root:["root","none"!==Wt&&`margin${(0,Vp.A)(Wt)}`,In&&"fullWidth"]};return(0,xp.A)(fr,getFormControlUtilityClasses,Xe)})(xo),[Co,Io]=dp.useState((()=>{let u=!1;return In&&dp.Children.forEach(In,(Xe=>{if(!(0,eS.A)(Xe,["Input","Select"]))return;const Wt=(0,eS.A)(Xe,["Select"])?Xe.props.input:Xe;Wt&&function isAdornedStart(u){return u.startAdornment}(Wt.props)&&(u=!0)})),u})),[zo,Bo]=dp.useState((()=>{let u=!1;return In&&dp.Children.forEach(In,(Xe=>{(0,eS.A)(Xe,["Input","Select"])&&(isFilled(Xe.props,!0)||isFilled(Xe.props.inputProps,!0))&&(u=!0)})),u})),[ca,ua]=dp.useState(!1);Ar&&ca&&ua(!1);const Da=void 0===no||Ar?ca:no;let ns;const yl=dp.useMemo((()=>({adornedStart:Co,setAdornedStart:Io,color:_r,disabled:Ar,error:Kr,filled:zo,focused:Da,fullWidth:io,hiddenLabel:oo,size:co,onBlur:()=>{ua(!1)},onEmpty:()=>{Bo(!1)},onFilled:()=>{Bo(!0)},onFocus:()=>{ua(!0)},registerEffect:ns,required:so,variant:ho})),[Co,_r,Ar,Kr,zo,Da,io,oo,ns,so,co,ho]);return(0,Fp.jsx)(Kp.Provider,{value:yl,children:(0,Fp.jsx)(nS,(0,_p.A)({as:wr,ownerState:xo,className:(0,vp.A)(ko.root,fr),ref:Xe},go,{children:In}))})}));var iS=rS;function formControlState({props:u,states:Xe,muiFormControl:Wt}){return Xe.reduce(((Xe,In)=>(Xe[In]=u[In],Wt&&void 0===u[In]&&(Xe[In]=Wt[In]),Xe)),{})}function getFormLabelUtilityClasses(u){return(0,bp.Ay)("MuiFormLabel",u)}var oS=(0,uf.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);const aS=["children","className","color","component","disabled","error","filled","focused","required"],sS=(0,Up.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:u},Xe)=>(0,_p.A)({},Xe.root,"secondary"===u.color&&Xe.colorSecondary,u.filled&&Xe.filled)})((({theme:u,ownerState:Xe})=>(0,_p.A)({color:(u.vars||u).palette.text.secondary},u.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${oS.focused}`]:{color:(u.vars||u).palette[Xe.color].main},[`&.${oS.disabled}`]:{color:(u.vars||u).palette.text.disabled},[`&.${oS.error}`]:{color:(u.vars||u).palette.error.main}}))),lS=(0,Up.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(u,Xe)=>Xe.asterisk})((({theme:u})=>({[`&.${oS.error}`]:{color:(u.vars||u).palette.error.main}}))),cS=dp.forwardRef((function FormLabel(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiFormLabel"}),{children:In,className:fr,component:_r="label"}=Wt,wr=(0,yp.A)(Wt,aS),Ar=formControlState({props:Wt,muiFormControl:useFormControl(),states:["color","required","focused","disabled","error","filled"]}),Kr=(0,_p.A)({},Wt,{color:Ar.color||"primary",component:_r,disabled:Ar.disabled,error:Ar.error,filled:Ar.filled,focused:Ar.focused,required:Ar.required}),no=(u=>{const{classes:Xe,color:Wt,focused:In,disabled:fr,error:_r,filled:wr,required:Ar}=u,Kr={root:["root",`color${(0,Vp.A)(Wt)}`,fr&&"disabled",_r&&"error",wr&&"filled",In&&"focused",Ar&&"required"],asterisk:["asterisk",_r&&"error"]};return(0,xp.A)(Kr,getFormLabelUtilityClasses,Xe)})(Kr);return(0,Fp.jsxs)(sS,(0,_p.A)({as:_r,ownerState:Kr,className:(0,vp.A)(no.root,fr),ref:Xe},wr,{children:[In,Ar.required&&(0,Fp.jsxs)(lS,{ownerState:Kr,"aria-hidden":!0,className:no.asterisk,children:[" ","*"]})]}))}));var uS=cS;function getFormGroupUtilityClass(u){return(0,bp.Ay)("MuiFormGroup",u)}(0,uf.A)("MuiFormGroup",["root","row","error"]);const dS=["className","row"],hS=(0,Up.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.row&&Xe.row]}})((({ownerState:u})=>(0,_p.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},u.row&&{flexDirection:"row"})));var pS=dp.forwardRef((function FormGroup(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiFormGroup"}),{className:In,row:fr=!1}=Wt,_r=(0,yp.A)(Wt,dS),wr=formControlState({props:Wt,muiFormControl:useFormControl(),states:["error"]}),Ar=(0,_p.A)({},Wt,{row:fr,error:wr.error}),Kr=(u=>{const{classes:Xe,row:Wt,error:In}=u,fr={root:["root",Wt&&"row",In&&"error"]};return(0,xp.A)(fr,getFormGroupUtilityClass,Xe)})(Ar);return(0,Fp.jsx)(hS,(0,_p.A)({className:(0,vp.A)(Kr.root,In),ownerState:Ar,ref:Xe},_r))}));function getRadioGroupUtilityClass(u){return(0,bp.Ay)("MuiRadioGroup",u)}(0,uf.A)("MuiRadioGroup",["root","row","error"]);var fS=dp.createContext(void 0);const mS=["actions","children","className","defaultValue","name","onChange","value"],gS=dp.forwardRef((function RadioGroup(u,Xe){const{actions:Wt,children:In,className:fr,defaultValue:_r,name:wr,onChange:Ar,value:Kr}=u,no=(0,yp.A)(u,mS),io=dp.useRef(null),oo=(u=>{const{classes:Xe,row:Wt,error:In}=u,fr={root:["root",Wt&&"row",In&&"error"]};return(0,xp.A)(fr,getRadioGroupUtilityClass,Xe)})(u),[ao,so]=(0,Gp.A)({controlled:Kr,default:_r,name:"RadioGroup"});dp.useImperativeHandle(Wt,(()=>({focus:()=>{let u=io.current.querySelector("input:not(:disabled):checked");u||(u=io.current.querySelector("input:not(:disabled)")),u&&u.focus()}})),[]);const co=(0,Xp.A)(Xe,io),ho=(0,qg.A)(wr),go=dp.useMemo((()=>({name:ho,onChange(u){so(u.target.value),Ar&&Ar(u,u.target.value)},value:ao})),[ho,Ar,so,ao]);return(0,Fp.jsx)(fS.Provider,{value:go,children:(0,Fp.jsx)(pS,(0,_p.A)({role:"radiogroup",ref:co,className:(0,vp.A)(oo.root,fr)},no,{children:In}))})}));var yS=gS;function getFormControlLabelUtilityClasses(u){return(0,bp.Ay)("MuiFormControlLabel",u)}var _S=(0,uf.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);const vS=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],bS=(0,Up.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[{[`& .${_S.label}`]:Xe.label},Xe.root,Xe[`labelPlacement${(0,Vp.A)(Wt.labelPlacement)}`]]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${_S.disabled}`]:{cursor:"default"}},"start"===Xe.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===Xe.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===Xe.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${_S.label}`]:{[`&.${_S.disabled}`]:{color:(u.vars||u).palette.text.disabled}}}))),xS=(0,Up.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(u,Xe)=>Xe.asterisk})((({theme:u})=>({[`&.${_S.error}`]:{color:(u.vars||u).palette.error.main}}))),wS=dp.forwardRef((function FormControlLabel(u,Xe){var Wt,In;const fr=(0,$p.b)({props:u,name:"MuiFormControlLabel"}),{className:_r,componentsProps:wr={},control:Ar,disabled:Kr,disableTypography:no,label:io,labelPlacement:oo="end",required:ao,slotProps:so={}}=fr,co=(0,yp.A)(fr,vS),ho=useFormControl(),go=null!=(Wt=null!=Kr?Kr:Ar.props.disabled)?Wt:null==ho?void 0:ho.disabled,xo=null!=ao?ao:Ar.props.required,ko={disabled:go,required:xo};["checked","name","onChange","value","inputRef"].forEach((u=>{void 0===Ar.props[u]&&void 0!==fr[u]&&(ko[u]=fr[u])}));const Co=formControlState({props:fr,muiFormControl:ho,states:["error"]}),Io=(0,_p.A)({},fr,{disabled:go,labelPlacement:oo,required:xo,error:Co.error}),zo=(u=>{const{classes:Xe,disabled:Wt,labelPlacement:In,error:fr,required:_r}=u,wr={root:["root",Wt&&"disabled",`labelPlacement${(0,Vp.A)(In)}`,fr&&"error",_r&&"required"],label:["label",Wt&&"disabled"],asterisk:["asterisk",fr&&"error"]};return(0,xp.A)(wr,getFormControlLabelUtilityClasses,Xe)})(Io),Bo=null!=(In=so.typography)?In:wr.typography;let ca=io;return null==ca||ca.type===gx||no||(ca=(0,Fp.jsx)(gx,(0,_p.A)({component:"span"},Bo,{className:(0,vp.A)(zo.label,null==Bo?void 0:Bo.className),children:ca}))),(0,Fp.jsxs)(bS,(0,_p.A)({className:(0,vp.A)(zo.root,_r),ownerState:Io,ref:Xe},co,{children:[dp.cloneElement(Ar,ko),xo?(0,Fp.jsxs)(Dx,{display:"block",children:[ca,(0,Fp.jsxs)(xS,{ownerState:Io,"aria-hidden":!0,className:zo.asterisk,children:[" ","*"]})]}):ca]}))}));var SS=wS,kS=(0,zw.A)((0,Fp.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"),AS=(0,zw.A)((0,Fp.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");const TS=(0,Up.Ay)("span",{shouldForwardProp:Hp.A})({position:"relative",display:"flex"}),CS=(0,Up.Ay)(kS)({transform:"scale(1)"}),ES=(0,Up.Ay)(AS)((({theme:u,ownerState:Xe})=>(0,_p.A)({left:0,position:"absolute",transform:"scale(0)",transition:u.transitions.create("transform",{easing:u.transitions.easing.easeIn,duration:u.transitions.duration.shortest})},Xe.checked&&{transform:"scale(1)",transition:u.transitions.create("transform",{easing:u.transitions.easing.easeOut,duration:u.transitions.duration.shortest})})));var PS=function RadioButtonIcon(u){const{checked:Xe=!1,classes:Wt={},fontSize:In}=u,fr=(0,_p.A)({},u,{checked:Xe});return(0,Fp.jsxs)(TS,{className:Wt.root,ownerState:fr,children:[(0,Fp.jsx)(CS,{fontSize:In,className:Wt.background,ownerState:fr}),(0,Fp.jsx)(ES,{fontSize:In,className:Wt.dot,ownerState:fr})]})},IS=__webpack_require__(862);function getRadioUtilityClass(u){return(0,bp.Ay)("MuiRadio",u)}var MS=(0,uf.A)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]);const RS=["checked","checkedIcon","color","icon","name","onChange","size","className"],zS=(0,Up.Ay)(Gf,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiRadio",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,"medium"!==Wt.size&&Xe[`size${(0,Vp.A)(Wt.size)}`],Xe[`color${(0,Vp.A)(Wt.color)}`]]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({color:(u.vars||u).palette.text.secondary},!Xe.disableRipple&&{"&:hover":{backgroundColor:u.vars?`rgba(${"default"===Xe.color?u.vars.palette.action.activeChannel:u.vars.palette[Xe.color].mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)("default"===Xe.color?u.palette.action.active:u.palette[Xe.color].main,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==Xe.color&&{[`&.${MS.checked}`]:{color:(u.vars||u).palette[Xe.color].main}},{[`&.${MS.disabled}`]:{color:(u.vars||u).palette.action.disabled}})));const OS=(0,Fp.jsx)(PS,{checked:!0}),LS=(0,Fp.jsx)(PS,{}),DS=dp.forwardRef((function Radio(u,Xe){var Wt,In;const fr=(0,$p.b)({props:u,name:"MuiRadio"}),{checked:_r,checkedIcon:wr=OS,color:Ar="primary",icon:Kr=LS,name:no,onChange:io,size:oo="medium",className:ao}=fr,so=(0,yp.A)(fr,RS),co=(0,_p.A)({},fr,{color:Ar,size:oo}),ho=(u=>{const{classes:Xe,color:Wt,size:In}=u,fr={root:["root",`color${(0,Vp.A)(Wt)}`,"medium"!==In&&`size${(0,Vp.A)(In)}`]};return(0,_p.A)({},Xe,(0,xp.A)(fr,getRadioUtilityClass,Xe))})(co),go=function useRadioGroup(){return dp.useContext(fS)}();let xo=_r;const ko=(0,IS.A)(io,go&&go.onChange);let Co=no;return go&&(void 0===xo&&(xo=function areEqualValues(u,Xe){return"object"==typeof Xe&&null!==Xe?u===Xe:String(u)===String(Xe)}(go.value,fr.value)),void 0===Co&&(Co=go.name)),(0,Fp.jsx)(zS,(0,_p.A)({type:"radio",icon:dp.cloneElement(Kr,{fontSize:null!=(Wt=LS.props.fontSize)?Wt:oo}),checkedIcon:dp.cloneElement(wr,{fontSize:null!=(In=OS.props.fontSize)?In:oo}),ownerState:co,classes:ho,name:Co,checked:xo,onChange:ko,ref:Xe,className:(0,vp.A)(ho.root,ao)},so))}));var FS=DS;function LayerItemStyleSelection(u){var Xe=this;const{year:Wt,onClick:In,treeElement:{isVisible:fr,isStyleExpanded:_r,selectedStyle:wr},zoomLevel:Ar}=u,Kr={color:function color(u){return _newArrowCheck(this,Xe),u.palette.text.primary}.bind(this),fontSize:function fontSize(u){return _newArrowCheck(this,Xe),u.typography.body2.fontSize}.bind(this),fontFamily:function fontFamily(u){return _newArrowCheck(this,Xe),u.typography.body2.fontFamily}.bind(this),fontWeight:function fontWeight(u){return _newArrowCheck(this,Xe),u.typography.body2.fontWeight}.bind(this),lineHeight:function lineHeight(u){return _newArrowCheck(this,Xe),u.typography.body2.lineHeight}.bind(this),margin:0},no={maxWidth:"1.25rem",width:"1.25rem"},io=fr?dp.createElement(Jw.A,{sx:no}):dp.createElement(Qw.A,{sx:no}),ao=getWMTSLayerIdFromYear(Wt),co=Wt===oo.ALL?Gx("jakarto.layer.raster.all.title"):Gx("jakarto.layer.raster.title",Wt);return dp.createElement(Zx,{id:ao,fontWeight:"fontWeightMedium"},dp.createElement(Zx,{sx:{display:"flex",justifyContent:"space-between",borderBottom:function borderBottom(u){return _newArrowCheck(this,Xe),`0.0625rem solid ${u.palette.divider}`}.bind(this),"& > #jakarto-layer-visibility-button":{display:function display(Wt){return _newArrowCheck(this,Xe),u.treeElement.isVisible?"none":"block"}.bind(this)},"&:hover > #jakarto-layer-visibility-button":{display:"block"}}},dp.createElement(Zx,{onClick:function onClick(){_newArrowCheck(this,Xe),by.toggleWMTSLayerStyleExpansion(Wt)}.bind(this),sx:{height:"2.25rem",minHeight:"2.25rem",maxHeight:"2.25rem",width:"100%",paddingTop:function paddingTop(u){return _newArrowCheck(this,Xe),u.spacing(.5)}.bind(this),paddingBottom:function paddingBottom(u){return _newArrowCheck(this,Xe),u.spacing(.5)}.bind(this),display:"flex",alignItems:"center",cursor:"pointer"}},dp.createElement("img",{style:{maxWidth:"1rem",width:"1rem",marginLeft:"0.5rem",filter:u.treeElement.isVisible?void 0:"grayscale(100%)"},src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAADIklEQVR42t2WW08TURSF+WfGxGhIDCkBBEGCSNOEq2ANlEIR6Ng0QEFhoFJKL460FNpCpdpSAYlcVAgpYGK8BE3UJ3kw/oJt1yZnrHYAfaXJyjkzk1nf3vvsc6Z5eWfml39DovOlbXShopNqOl108GGPDr/sU8Bxnfz2YnL0V5LHUUkvZjppLdrLo9CScvu3Au20OW8jTQDMAbls6KPJYIx+Hh7Qx3SSHvVXkHS3nBRXA78MCeMn7gYexbWA5gCEuciirmeCvn1+Qz++f6Jk2EbdUgmFlVbaivdzBhCihWCY8DbzvYjfwsFoAgQEI7JYXd/gLLbXFC7R+KiBNhcG2AiRO+0VJEvF1G0qpGajjtpMRWRp05HdlH88QOhStZV8swn6+naFTVEmn62Ix8hwFUVGqllRVx2Xbipg5gBwHVeM2gCYZkNuWZ30bneRX0B53O4jM2XqaEFFqR5n1iQas1FoxsIgzE/NAKXSGay0tZmkpZRMqfgAG8Acmp9uVzsHAYj7UDjS828AjP7ALO28DjFk6dkDjtDrb2KjVKhD7R4EgMhhjnY+FQCdKzOTNOTmRRYvoxwi0hF7nZpFcl7i5wsZ0LClIBeA+ou9kC1Dxyilt55SInmP1wASpUJn9d3RMwBr09V7hVtU7tLlAtCWAEAXq3rYHPNyo0y728tcIkSYDYHkgRo1i8CongKeFu0MAMiWgJU0DdHGyhxtPHdTIGRWOwVzAAHG5hMQ7A+P9B8AqKzeSk6XS+0kSMCg2JSZjVP+mxRz6mnaUXo8INsYpRJjY0emS8LyH60qhHs4Iha9jbwJ4y69NqCgdlBVNgwNAMBcROGSaAEgZIGdrgkobJQpWyVGF48ChEU3Sm5Kv4xy7bNLhH2BhedjJHN8YC00AUUtThWAuRCuC+rv8wm7/ypKq8sy9zv2BAC+hw0MDY7VMgCZ5ABghKhP0rV2LynBAHl8E9Q7OEYm+zgFQ5MUjk7S3s4CN0Eyc2zjCM8B/G12tdVD5SafJgjZiKYQGTuVeXqfTqjfCE0ATE/KQDznkqEZMiCM4vn6aoIPPnwjzs6fiV8ZsgyQLKAQ+wAAAABJRU5ErkJggg=="}),dp.createElement(oy,{placement:"bottom",title:co,enterTouchDelay:1e3,enterNextDelay:1e3,enterDelay:1e3},dp.createElement(gx,{variant:"body2",noWrap:!0,color:"textPrimary",sx:{paddingLeft:0,flexGrow:1,userSelect:"none",marginLeft:"0.5rem"}},co))),dp.createElement(mw,{id:"jakarto-layer-visibility-button",color:"secondary",size:"small",onClick:In},io)),dp.createElement(Yw,{sx:{width:"100%",minWidth:"100%"},in:_r},dp.createElement(iS,{component:"fieldset",sx:{marginLeft:"1rem"},focused:!1},dp.createElement(uS,{color:"secondary",sx:{...Kr,marginBottom:function marginBottom(u){return _newArrowCheck(this,Xe),u.spacing(1)}.bind(this),paddingTop:function paddingTop(u){return _newArrowCheck(this,Xe),u.spacing(1)}.bind(this)},component:"legend"},Gx("jakarto.layer.raster.legend.title")),dp.createElement(yS,{value:wr},getAllWMTSStyleVariables().map(function(u,In){var fr=this;return _newArrowCheck(this,Xe),dp.createElement(SS,{sx:Kr,value:u,key:In,control:dp.createElement(FS,{size:"small",color:"primary",sx:{padding:function padding(u){return _newArrowCheck(this,fr),u.spacing(.5)}.bind(this)}}),label:Gx(getTranslationKeyForStyle(u)),disabled:u===so.VERTICALITY&&Ar<21,onChange:function onChange(){_newArrowCheck(this,fr),wr!==u&&by.selectWMTSLayerStyleForYear(Wt,u)}.bind(this)})}.bind(this))))),_r&&dp.createElement(vy,null))}const BS=Qb(function(u){return _newArrowCheck(this,undefined),{isVectorCoverageVisible:getExtensionState().layer.isVectorLayerVisible,allWmtsByYear:getExtensionState().layer.allWMTSByYear,currentZoomLevel:getExtensionState().layer.zoomLevel,globalTheme:getAppState(u).ui.theme}}.bind(void 0))((function LayerCardFn(u){var Xe=this;const[Wt,In]=dp.useState(!1);return dp.createElement(ux,{sx:{marginTop:0}},dp.createElement(Sx,{title:Gx("jakarto.layer.content.header.title"),titleTypographyProps:{noWrap:!0,textTransform:"uppercase",cursor:"pointer"},onClick:function onClick(){_newArrowCheck(this,Xe),In(!Wt)}.bind(this),avatar:dp.createElement(mp,{icon:Iw.qI,style:{color:u.globalTheme.palette.primary.main,cursor:"cursor"}}),action:dp.createElement(Ww,{size:"small",checked:Wt,onClick:function onClick(){return _newArrowCheck(this,Xe),In(!Wt)}.bind(this),checkedIcon:dp.createElement(Mw.A,{color:"disabled"}),icon:dp.createElement(Rw.A,{color:"disabled"})})}),dp.createElement(Yw,{in:Wt},dp.createElement(jx,{sx:{height:"100%",minHeight:"100%",maxHeight:"100%",marginLeft:"0.5625rem",marginRight:"0.5625rem",paddingTop:0}},dp.createElement(LayerItem,{id:wr,layerName:Gx("jakarto.layer.vector.title"),isVisible:u.isVectorCoverageVisible,src:"data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABIElEQVR42mNgGAWjYHgAf/9JLitXnrp08uS9z8+evf/9+PG7D3fvvprw//9/DooNLy9fNQdo4L9Zsw78Dw2d9t/MrOl/bOys/6tWnfzz/v23Z0BLdMg2PCRkiv/Ll5/+BwdP+S8pWYCBc3MX//r5889dsn2yadP5lz0927EaDsOHDt24CbSgnCwLvnz58d/RsROvBenpC0A+2EyWBUCNeA0HYVPTJlA8PCbLgqdP3323tGwh5IPjQAuuk2XB7dsvD9bWrsNnwe87d16tAFrQTW4QKXz48P2brW0bVgtASRio5j4QC5CdVIGaw3/8+PW+o2PrM2hwvffxmXD8woVH84Fyz4HYgeLMBvIJEK8G4u//IeAyEE8HYpHRcm4U0B4AAKMuCd7q0lsIAAAAAElFTkSuQmCC",onClick:function onClick(){_newArrowCheck(this,Xe),by.toggleVectorLayerVisibility()}.bind(this)}),getAllWMTSYearVariables().map(function(Wt,In){var fr=this;return _newArrowCheck(this,Xe),dp.createElement(LayerItemStyleSelection,{key:In,year:Wt,treeElement:u.allWmtsByYear[Wt],zoomLevel:u.currentZoomLevel,onClick:function onClick(){_newArrowCheck(this,fr),by.toggleWMTSLayerVisibility(Wt)}.bind(this)})}.bind(this)))))}));var jS=__webpack_require__.p+"37d0e4cd5ff1173c86ce.png",NS=__webpack_require__.p+"d8ca01d5a711b142103f.png",VS=__webpack_require__.p+"8e1a93455ac3516582e8.png",US=__webpack_require__.p+"a814ae79e0ef3997b449.png";function getLinearProgressUtilityClass(u){return(0,bp.Ay)("MuiLinearProgress",u)}(0,uf.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const $S=["className","color","value","valueBuffer","variant"];let WS,qS,ZS,HS,GS,KS,LinearProgress_=u=>u;const XS=(0,af.i7)(WS||(WS=LinearProgress_`
75
+ 0% {
76
+ left: -35%;
77
+ right: 100%;
78
+ }
79
+
80
+ 60% {
81
+ left: 100%;
82
+ right: -90%;
83
+ }
84
+
85
+ 100% {
86
+ left: 100%;
87
+ right: -90%;
88
+ }
89
+ `)),YS=(0,af.i7)(qS||(qS=LinearProgress_`
90
+ 0% {
91
+ left: -200%;
92
+ right: 100%;
93
+ }
94
+
95
+ 60% {
96
+ left: 107%;
97
+ right: -8%;
98
+ }
99
+
100
+ 100% {
101
+ left: 107%;
102
+ right: -8%;
103
+ }
104
+ `)),JS=(0,af.i7)(ZS||(ZS=LinearProgress_`
105
+ 0% {
106
+ opacity: 1;
107
+ background-position: 0 -23px;
108
+ }
109
+
110
+ 60% {
111
+ opacity: 0;
112
+ background-position: 0 -23px;
113
+ }
114
+
115
+ 100% {
116
+ opacity: 1;
117
+ background-position: -200px -23px;
118
+ }
119
+ `)),getColorShade=(u,Xe)=>"inherit"===Xe?"currentColor":u.vars?u.vars.palette.LinearProgress[`${Xe}Bg`]:"light"===u.palette.mode?(0,Zp.a)(u.palette[Xe].main,.62):(0,Zp.e$)(u.palette[Xe].main,.5),QS=(0,Up.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[`color${(0,Vp.A)(Wt.color)}`],Xe[Wt.variant]]}})((({ownerState:u,theme:Xe})=>(0,_p.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:getColorShade(Xe,u.color)},"inherit"===u.color&&"buffer"!==u.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===u.variant&&{backgroundColor:"transparent"},"query"===u.variant&&{transform:"rotate(180deg)"}))),tk=(0,Up.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.dashed,Xe[`dashedColor${(0,Vp.A)(Wt.color)}`]]}})((({ownerState:u,theme:Xe})=>{const Wt=getColorShade(Xe,u.color);return(0,_p.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===u.color&&{opacity:.3},{backgroundImage:`radial-gradient(${Wt} 0%, ${Wt} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,af.AH)(HS||(HS=LinearProgress_`
120
+ animation: ${0} 3s infinite linear;
121
+ `),JS)),nk=(0,Up.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.bar,Xe[`barColor${(0,Vp.A)(Wt.color)}`],("indeterminate"===Wt.variant||"query"===Wt.variant)&&Xe.bar1Indeterminate,"determinate"===Wt.variant&&Xe.bar1Determinate,"buffer"===Wt.variant&&Xe.bar1Buffer]}})((({ownerState:u,theme:Xe})=>(0,_p.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===u.color?"currentColor":(Xe.vars||Xe).palette[u.color].main},"determinate"===u.variant&&{transition:"transform .4s linear"},"buffer"===u.variant&&{zIndex:1,transition:"transform .4s linear"})),(({ownerState:u})=>("indeterminate"===u.variant||"query"===u.variant)&&(0,af.AH)(GS||(GS=LinearProgress_`
122
+ width: auto;
123
+ animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
124
+ `),XS))),rk=(0,Up.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.bar,Xe[`barColor${(0,Vp.A)(Wt.color)}`],("indeterminate"===Wt.variant||"query"===Wt.variant)&&Xe.bar2Indeterminate,"buffer"===Wt.variant&&Xe.bar2Buffer]}})((({ownerState:u,theme:Xe})=>(0,_p.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==u.variant&&{backgroundColor:"inherit"===u.color?"currentColor":(Xe.vars||Xe).palette[u.color].main},"inherit"===u.color&&{opacity:.3},"buffer"===u.variant&&{backgroundColor:getColorShade(Xe,u.color),transition:"transform .4s linear"})),(({ownerState:u})=>("indeterminate"===u.variant||"query"===u.variant)&&(0,af.AH)(KS||(KS=LinearProgress_`
125
+ width: auto;
126
+ animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
127
+ `),YS)));var ok=dp.forwardRef((function LinearProgress(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiLinearProgress"}),{className:In,color:fr="primary",value:_r,valueBuffer:wr,variant:Ar="indeterminate"}=Wt,Kr=(0,yp.A)(Wt,$S),no=(0,_p.A)({},Wt,{color:fr,variant:Ar}),io=(u=>{const{classes:Xe,variant:Wt,color:In}=u,fr={root:["root",`color${(0,Vp.A)(In)}`,Wt],dashed:["dashed",`dashedColor${(0,Vp.A)(In)}`],bar1:["bar",`barColor${(0,Vp.A)(In)}`,("indeterminate"===Wt||"query"===Wt)&&"bar1Indeterminate","determinate"===Wt&&"bar1Determinate","buffer"===Wt&&"bar1Buffer"],bar2:["bar","buffer"!==Wt&&`barColor${(0,Vp.A)(In)}`,"buffer"===Wt&&`color${(0,Vp.A)(In)}`,("indeterminate"===Wt||"query"===Wt)&&"bar2Indeterminate","buffer"===Wt&&"bar2Buffer"]};return(0,xp.A)(fr,getLinearProgressUtilityClass,Xe)})(no),oo=useRtl(),ao={},so={bar1:{},bar2:{}};if("determinate"===Ar||"buffer"===Ar)if(void 0!==_r){ao["aria-valuenow"]=Math.round(_r),ao["aria-valuemin"]=0,ao["aria-valuemax"]=100;let u=_r-100;oo&&(u=-u),so.bar1.transform=`translateX(${u}%)`}else 0;if("buffer"===Ar)if(void 0!==wr){let u=(wr||0)-100;oo&&(u=-u),so.bar2.transform=`translateX(${u}%)`}else 0;return(0,Fp.jsxs)(QS,(0,_p.A)({className:(0,vp.A)(io.root,In),ownerState:no,role:"progressbar"},ao,{ref:Xe},Kr,{children:["buffer"===Ar?(0,Fp.jsx)(tk,{className:io.dashed,ownerState:no}):null,(0,Fp.jsx)(nk,{className:io.bar1,ownerState:no,style:so.bar1}),"determinate"===Ar?null:(0,Fp.jsx)(rk,{className:io.bar2,ownerState:no,style:so.bar2})]}))}));const sk=function LinearLoader(u){return _newArrowCheck(this,undefined),dp.createElement(Dx,{direction:"column",alignItems:"center",justifyContent:"center",width:"100%",sx:{margin:"1rem"}},dp.createElement(gx,{color:"primary"},u.text),dp.createElement(ok,{color:"secondary"}))}.bind(void 0);var lk=dp.createContext();function getGridUtilityClass(u){return(0,bp.Ay)("MuiGrid",u)}const uk=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],pk=(0,uf.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((u=>`spacing-xs-${u}`)),...["column-reverse","column","row-reverse","row"].map((u=>`direction-xs-${u}`)),...["nowrap","wrap-reverse","wrap"].map((u=>`wrap-xs-${u}`)),...uk.map((u=>`grid-xs-${u}`)),...uk.map((u=>`grid-sm-${u}`)),...uk.map((u=>`grid-md-${u}`)),...uk.map((u=>`grid-lg-${u}`)),...uk.map((u=>`grid-xl-${u}`))]);var fk=pk;const mk=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function getOffset(u){const Xe=parseFloat(u);return`${Xe}${String(u).replace(String(Xe),"")||"px"}`}function extractZeroValueBreakpointKeys({breakpoints:u,values:Xe}){let Wt="";Object.keys(Xe).forEach((u=>{""===Wt&&0!==Xe[u]&&(Wt=u)}));const In=Object.keys(u).sort(((Xe,Wt)=>u[Xe]-u[Wt]));return In.slice(0,In.indexOf(Wt))}const yk=(0,Up.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u,{container:In,direction:fr,item:_r,spacing:wr,wrap:Ar,zeroMinWidth:Kr,breakpoints:no}=Wt;let io=[];In&&(io=function resolveSpacingStyles(u,Xe,Wt={}){if(!u||u<=0)return[];if("string"==typeof u&&!Number.isNaN(Number(u))||"number"==typeof u)return[Wt[`spacing-xs-${String(u)}`]];const In=[];return Xe.forEach((Xe=>{const fr=u[Xe];Number(fr)>0&&In.push(Wt[`spacing-${Xe}-${String(fr)}`])})),In}(wr,no,Xe));const oo=[];return no.forEach((u=>{const In=Wt[u];In&&oo.push(Xe[`grid-${u}-${String(In)}`])})),[Xe.root,In&&Xe.container,_r&&Xe.item,Kr&&Xe.zeroMinWidth,...io,"row"!==fr&&Xe[`direction-xs-${String(fr)}`],"wrap"!==Ar&&Xe[`wrap-xs-${String(Ar)}`],...oo]}})((({ownerState:u})=>(0,_p.A)({boxSizing:"border-box"},u.container&&{display:"flex",flexWrap:"wrap",width:"100%"},u.item&&{margin:0},u.zeroMinWidth&&{minWidth:0},"wrap"!==u.wrap&&{flexWrap:u.wrap})),(function generateDirection({theme:u,ownerState:Xe}){const Wt=(0,Ix.kW)({values:Xe.direction,breakpoints:u.breakpoints.values});return(0,Ix.NI)({theme:u},Wt,(u=>{const Xe={flexDirection:u};return 0===u.indexOf("column")&&(Xe[`& > .${fk.item}`]={maxWidth:"none"}),Xe}))}),(function generateRowGap({theme:u,ownerState:Xe}){const{container:Wt,rowSpacing:In}=Xe;let fr={};if(Wt&&0!==In){const Xe=(0,Ix.kW)({values:In,breakpoints:u.breakpoints.values});let Wt;"object"==typeof Xe&&(Wt=extractZeroValueBreakpointKeys({breakpoints:u.breakpoints.values,values:Xe})),fr=(0,Ix.NI)({theme:u},Xe,((Xe,In)=>{var fr;const _r=u.spacing(Xe);return"0px"!==_r?{marginTop:`-${getOffset(_r)}`,[`& > .${fk.item}`]:{paddingTop:getOffset(_r)}}:null!=(fr=Wt)&&fr.includes(In)?{}:{marginTop:0,[`& > .${fk.item}`]:{paddingTop:0}}}))}return fr}),(function generateColumnGap({theme:u,ownerState:Xe}){const{container:Wt,columnSpacing:In}=Xe;let fr={};if(Wt&&0!==In){const Xe=(0,Ix.kW)({values:In,breakpoints:u.breakpoints.values});let Wt;"object"==typeof Xe&&(Wt=extractZeroValueBreakpointKeys({breakpoints:u.breakpoints.values,values:Xe})),fr=(0,Ix.NI)({theme:u},Xe,((Xe,In)=>{var fr;const _r=u.spacing(Xe);return"0px"!==_r?{width:`calc(100% + ${getOffset(_r)})`,marginLeft:`-${getOffset(_r)}`,[`& > .${fk.item}`]:{paddingLeft:getOffset(_r)}}:null!=(fr=Wt)&&fr.includes(In)?{}:{width:"100%",marginLeft:0,[`& > .${fk.item}`]:{paddingLeft:0}}}))}return fr}),(function generateGrid({theme:u,ownerState:Xe}){let Wt;return u.breakpoints.keys.reduce(((In,fr)=>{let _r={};if(Xe[fr]&&(Wt=Xe[fr]),!Wt)return In;if(!0===Wt)_r={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===Wt)_r={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const wr=(0,Ix.kW)({values:Xe.columns,breakpoints:u.breakpoints.values}),Ar="object"==typeof wr?wr[fr]:wr;if(null==Ar)return In;const Kr=Math.round(Wt/Ar*1e8)/1e6+"%";let no={};if(Xe.container&&Xe.item&&0!==Xe.columnSpacing){const Wt=u.spacing(Xe.columnSpacing);if("0px"!==Wt){const u=`calc(${Kr} + ${getOffset(Wt)})`;no={flexBasis:u,maxWidth:u}}}_r=(0,_p.A)({flexBasis:Kr,flexGrow:0,maxWidth:Kr},no)}return 0===u.breakpoints.values[fr]?Object.assign(In,_r):In[u.breakpoints.up(fr)]=_r,In}),{})}));const Grid_useUtilityClasses=u=>{const{classes:Xe,container:Wt,direction:In,item:fr,spacing:_r,wrap:wr,zeroMinWidth:Ar,breakpoints:Kr}=u;let no=[];Wt&&(no=function resolveSpacingClasses(u,Xe){if(!u||u<=0)return[];if("string"==typeof u&&!Number.isNaN(Number(u))||"number"==typeof u)return[`spacing-xs-${String(u)}`];const Wt=[];return Xe.forEach((Xe=>{const In=u[Xe];if(Number(In)>0){const u=`spacing-${Xe}-${String(In)}`;Wt.push(u)}})),Wt}(_r,Kr));const io=[];Kr.forEach((Xe=>{const Wt=u[Xe];Wt&&io.push(`grid-${Xe}-${String(Wt)}`)}));const oo={root:["root",Wt&&"container",fr&&"item",Ar&&"zeroMinWidth",...no,"row"!==In&&`direction-xs-${String(In)}`,"wrap"!==wr&&`wrap-xs-${String(wr)}`,...io]};return(0,xp.A)(oo,getGridUtilityClass,Xe)},_k=dp.forwardRef((function Grid(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiGrid"}),{breakpoints:In}=styles_useTheme_useTheme(),fr=(0,dx.A)(Wt),{className:_r,columns:wr,columnSpacing:Ar,component:Kr="div",container:no=!1,direction:io="row",item:oo=!1,rowSpacing:ao,spacing:so=0,wrap:co="wrap",zeroMinWidth:ho=!1}=fr,go=(0,yp.A)(fr,mk),xo=ao||so,ko=Ar||so,Co=dp.useContext(lk),Io=no?wr||12:Co,zo={},Bo=(0,_p.A)({},go);In.keys.forEach((u=>{null!=go[u]&&(zo[u]=go[u],delete Bo[u])}));const ca=(0,_p.A)({},fr,{columns:Io,container:no,direction:io,item:oo,rowSpacing:xo,columnSpacing:ko,wrap:co,zeroMinWidth:ho,spacing:so},zo,{breakpoints:In.keys}),ua=Grid_useUtilityClasses(ca);return(0,Fp.jsx)(lk.Provider,{value:Io,children:(0,Fp.jsx)(yk,(0,_p.A)({ownerState:ca,className:(0,vp.A)(ua.root,_r),as:Kr,ref:Xe},Bo))})}));var vk=_k;const xk=function JakartoInformation(u){_newArrowCheck(this,undefined);const{location:Xe,tilt:Wt,fov:In,pan:fr,date:_r}=u.parameters;return dp.createElement(vk,{container:!0},dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.longitude"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},Xe.x.toFixed(6))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.latitude"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},Xe.y.toFixed(6))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.tilt"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},Wt?Wt.toFixed(6):"0")),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.fov"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},In||"0")),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.rotation"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},fr?fr.toFixed(6):"0")),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.date"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},_r?JMap.Util.Date.format(_r,{displayTime:!0}):"")))}.bind(void 0);var isCheckBoxInput=u=>"checkbox"===u.type,isDateObject=u=>u instanceof Date,isNullOrUndefined=u=>null==u;const isObjectType=u=>"object"==typeof u;var index_esm_isObject=u=>!isNullOrUndefined(u)&&!Array.isArray(u)&&isObjectType(u)&&!isDateObject(u),getEventValue=u=>index_esm_isObject(u)&&u.target?isCheckBoxInput(u.target)?u.target.checked:u.target.value:u,isNameInFieldArray=(u,Xe)=>u.has((u=>u.substring(0,u.search(/\.\d+(\.|$)/))||u)(Xe)),wk="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function cloneObject(u){let Xe;const Wt=Array.isArray(u);if(u instanceof Date)Xe=new Date(u);else if(u instanceof Set)Xe=new Set(u);else{if(wk&&(u instanceof Blob||u instanceof FileList)||!Wt&&!index_esm_isObject(u))return u;if(Xe=Wt?[]:{},Wt||(u=>{const Xe=u.constructor&&u.constructor.prototype;return index_esm_isObject(Xe)&&Xe.hasOwnProperty("isPrototypeOf")})(u))for(const Wt in u)u.hasOwnProperty(Wt)&&(Xe[Wt]=cloneObject(u[Wt]));else Xe=u}return Xe}var compact=u=>Array.isArray(u)?u.filter(Boolean):[],index_esm_isUndefined=u=>void 0===u,get=(u,Xe,Wt)=>{if(!Xe||!index_esm_isObject(u))return Wt;const In=compact(Xe.split(/[,[\].]+?/)).reduce(((u,Xe)=>isNullOrUndefined(u)?u:u[Xe]),u);return index_esm_isUndefined(In)||In===u?index_esm_isUndefined(u[Xe])?Wt:u[Xe]:In},index_esm_isBoolean=u=>"boolean"==typeof u,isKey=u=>/^\w*$/.test(u),stringToPath=u=>compact(u.replace(/["|']|\]/g,"").split(/\.|\[/)),set=(u,Xe,Wt)=>{let In=-1;const fr=isKey(Xe)?[Xe]:stringToPath(Xe),_r=fr.length,wr=_r-1;for(;++In<_r;){const Xe=fr[In];let _r=Wt;if(In!==wr){const Wt=u[Xe];_r=index_esm_isObject(Wt)||Array.isArray(Wt)?Wt:isNaN(+fr[In+1])?{}:[]}if("__proto__"===Xe)return;u[Xe]=_r,u=u[Xe]}return u};const Ak="blur",zk="focusout",Bk="onBlur",Vk="onChange",qk="onSubmit",eA="onTouched",tA="all",nA="max",rA="min",iA="maxLength",oA="minLength",aA="pattern",sA="required",lA="validate";dp.createContext(null);var getProxyFormState=(u,Xe,Wt,In=!0)=>{const fr={defaultValues:Xe._defaultValues};for(const _r in u)Object.defineProperty(fr,_r,{get:()=>{const fr=_r;return Xe._proxyFormState[fr]!==tA&&(Xe._proxyFormState[fr]=!In||tA),Wt&&(Wt[fr]=!0),u[fr]}});return fr},isEmptyObject=u=>index_esm_isObject(u)&&!Object.keys(u).length,shouldRenderFormState=(u,Xe,Wt,In)=>{Wt(u);const{name:fr,..._r}=u;return isEmptyObject(_r)||Object.keys(_r).length>=Object.keys(Xe).length||Object.keys(_r).find((u=>Xe[u]===(!In||tA)))},convertToArrayPayload=u=>Array.isArray(u)?u:[u];function useSubscribe(u){const Xe=dp.useRef(u);Xe.current=u,dp.useEffect((()=>{const Wt=!u.disabled&&Xe.current.subject&&Xe.current.subject.subscribe({next:Xe.current.next});return()=>{Wt&&Wt.unsubscribe()}}),[u.disabled])}var index_esm_isString=u=>"string"==typeof u,generateWatchOutput=(u,Xe,Wt,In,fr)=>index_esm_isString(u)?(In&&Xe.watch.add(u),get(Wt,u,fr)):Array.isArray(u)?u.map((u=>(In&&Xe.watch.add(u),get(Wt,u)))):(In&&(Xe.watchAll=!0),Wt);var appendErrors=(u,Xe,Wt,In,fr)=>Xe?{...Wt[u],types:{...Wt[u]&&Wt[u].types?Wt[u].types:{},[In]:fr||!0}}:{},getValidationModes=u=>({isOnSubmit:!u||u===qk,isOnBlur:u===Bk,isOnChange:u===Vk,isOnAll:u===tA,isOnTouch:u===eA}),index_esm_isWatched=(u,Xe,Wt)=>!Wt&&(Xe.watchAll||Xe.watch.has(u)||[...Xe.watch].some((Xe=>u.startsWith(Xe)&&/^\.\w+/.test(u.slice(Xe.length)))));const iterateFieldsByAction=(u,Xe,Wt,In)=>{for(const fr of Wt||Object.keys(u)){const Wt=get(u,fr);if(Wt){const{_f:u,..._r}=Wt;if(u){if(u.refs&&u.refs[0]&&Xe(u.refs[0],fr)&&!In)return!0;if(u.ref&&Xe(u.ref,u.name)&&!In)return!0;if(iterateFieldsByAction(_r,Xe))break}else if(index_esm_isObject(_r)&&iterateFieldsByAction(_r,Xe))break}}};var updateFieldArrayRootError=(u,Xe,Wt)=>{const In=convertToArrayPayload(get(u,Wt));return set(In,"root",Xe[Wt]),set(u,Wt,In),u},isFileInput=u=>"file"===u.type,index_esm_isFunction=u=>"function"==typeof u,index_esm_isHTMLElement=u=>{if(!wk)return!1;const Xe=u?u.ownerDocument:0;return u instanceof(Xe&&Xe.defaultView?Xe.defaultView.HTMLElement:HTMLElement)},isMessage=u=>index_esm_isString(u),isRadioInput=u=>"radio"===u.type,isRegex=u=>u instanceof RegExp;const cA={value:!1,isValid:!1},uA={value:!0,isValid:!0};var getCheckboxValue=u=>{if(Array.isArray(u)){if(u.length>1){const Xe=u.filter((u=>u&&u.checked&&!u.disabled)).map((u=>u.value));return{value:Xe,isValid:!!Xe.length}}return u[0].checked&&!u[0].disabled?u[0].attributes&&!index_esm_isUndefined(u[0].attributes.value)?index_esm_isUndefined(u[0].value)||""===u[0].value?uA:{value:u[0].value,isValid:!0}:uA:cA}return cA};const dA={isValid:!1,value:null};var getRadioValue=u=>Array.isArray(u)?u.reduce(((u,Xe)=>Xe&&Xe.checked&&!Xe.disabled?{isValid:!0,value:Xe.value}:u),dA):dA;function getValidateError(u,Xe,Wt="validate"){if(isMessage(u)||Array.isArray(u)&&u.every(isMessage)||index_esm_isBoolean(u)&&!u)return{type:Wt,message:isMessage(u)?u:"",ref:Xe}}var getValueAndMessage=u=>index_esm_isObject(u)&&!isRegex(u)?u:{value:u,message:""},validateField=async(u,Xe,Wt,In,fr)=>{const{ref:_r,refs:wr,required:Ar,maxLength:Kr,minLength:no,min:io,max:oo,pattern:ao,validate:so,name:co,valueAsNumber:ho,mount:go,disabled:xo}=u._f,ko=get(Xe,co);if(!go||xo)return{};const Co=wr?wr[0]:_r,setCustomValidity=u=>{In&&Co.reportValidity&&(Co.setCustomValidity(index_esm_isBoolean(u)?"":u||""),Co.reportValidity())},Io={},zo=isRadioInput(_r),Bo=isCheckBoxInput(_r),ca=zo||Bo,ua=(ho||isFileInput(_r))&&index_esm_isUndefined(_r.value)&&index_esm_isUndefined(ko)||index_esm_isHTMLElement(_r)&&""===_r.value||""===ko||Array.isArray(ko)&&!ko.length,Da=appendErrors.bind(null,co,Wt,Io),getMinMaxMessage=(u,Xe,Wt,In=iA,fr=oA)=>{const wr=u?Xe:Wt;Io[co]={type:u?In:fr,message:wr,ref:_r,...Da(u?In:fr,wr)}};if(fr?!Array.isArray(ko)||!ko.length:Ar&&(!ca&&(ua||isNullOrUndefined(ko))||index_esm_isBoolean(ko)&&!ko||Bo&&!getCheckboxValue(wr).isValid||zo&&!getRadioValue(wr).isValid)){const{value:u,message:Xe}=isMessage(Ar)?{value:!!Ar,message:Ar}:getValueAndMessage(Ar);if(u&&(Io[co]={type:sA,message:Xe,ref:Co,...Da(sA,Xe)},!Wt))return setCustomValidity(Xe),Io}if(!(ua||isNullOrUndefined(io)&&isNullOrUndefined(oo))){let u,Xe;const In=getValueAndMessage(oo),fr=getValueAndMessage(io);if(isNullOrUndefined(ko)||isNaN(ko)){const Wt=_r.valueAsDate||new Date(ko),convertTimeToDate=u=>new Date((new Date).toDateString()+" "+u),wr="time"==_r.type,Ar="week"==_r.type;index_esm_isString(In.value)&&ko&&(u=wr?convertTimeToDate(ko)>convertTimeToDate(In.value):Ar?ko>In.value:Wt>new Date(In.value)),index_esm_isString(fr.value)&&ko&&(Xe=wr?convertTimeToDate(ko)<convertTimeToDate(fr.value):Ar?ko<fr.value:Wt<new Date(fr.value))}else{const Wt=_r.valueAsNumber||(ko?+ko:ko);isNullOrUndefined(In.value)||(u=Wt>In.value),isNullOrUndefined(fr.value)||(Xe=Wt<fr.value)}if((u||Xe)&&(getMinMaxMessage(!!u,In.message,fr.message,nA,rA),!Wt))return setCustomValidity(Io[co].message),Io}if((Kr||no)&&!ua&&(index_esm_isString(ko)||fr&&Array.isArray(ko))){const u=getValueAndMessage(Kr),Xe=getValueAndMessage(no),In=!isNullOrUndefined(u.value)&&ko.length>+u.value,fr=!isNullOrUndefined(Xe.value)&&ko.length<+Xe.value;if((In||fr)&&(getMinMaxMessage(In,u.message,Xe.message),!Wt))return setCustomValidity(Io[co].message),Io}if(ao&&!ua&&index_esm_isString(ko)){const{value:u,message:Xe}=getValueAndMessage(ao);if(isRegex(u)&&!ko.match(u)&&(Io[co]={type:aA,message:Xe,ref:_r,...Da(aA,Xe)},!Wt))return setCustomValidity(Xe),Io}if(so)if(index_esm_isFunction(so)){const u=getValidateError(await so(ko,Xe),Co);if(u&&(Io[co]={...u,...Da(lA,u.message)},!Wt))return setCustomValidity(u.message),Io}else if(index_esm_isObject(so)){let u={};for(const In in so){if(!isEmptyObject(u)&&!Wt)break;const fr=getValidateError(await so[In](ko,Xe),Co,In);fr&&(u={...fr,...Da(In,fr.message)},setCustomValidity(fr.message),Wt&&(Io[co]=u))}if(!isEmptyObject(u)&&(Io[co]={ref:Co,...u},!Wt))return Io}return setCustomValidity(!0),Io};function unset(u,Xe){const Wt=Array.isArray(Xe)?Xe:isKey(Xe)?[Xe]:stringToPath(Xe),In=1===Wt.length?u:function baseGet(u,Xe){const Wt=Xe.slice(0,-1).length;let In=0;for(;In<Wt;)u=index_esm_isUndefined(u)?In++:u[Xe[In++]];return u}(u,Wt),fr=Wt.length-1,_r=Wt[fr];return In&&delete In[_r],0!==fr&&(index_esm_isObject(In)&&isEmptyObject(In)||Array.isArray(In)&&function isEmptyArray(u){for(const Xe in u)if(u.hasOwnProperty(Xe)&&!index_esm_isUndefined(u[Xe]))return!1;return!0}(In))&&unset(u,Wt.slice(0,-1)),u}var createSubject=()=>{let u=[];return{get observers(){return u},next:Xe=>{for(const Wt of u)Wt.next&&Wt.next(Xe)},subscribe:Xe=>(u.push(Xe),{unsubscribe:()=>{u=u.filter((u=>u!==Xe))}}),unsubscribe:()=>{u=[]}}},isPrimitive=u=>isNullOrUndefined(u)||!isObjectType(u);function deepEqual(u,Xe){if(isPrimitive(u)||isPrimitive(Xe))return u===Xe;if(isDateObject(u)&&isDateObject(Xe))return u.getTime()===Xe.getTime();const Wt=Object.keys(u),In=Object.keys(Xe);if(Wt.length!==In.length)return!1;for(const fr of Wt){const Wt=u[fr];if(!In.includes(fr))return!1;if("ref"!==fr){const u=Xe[fr];if(isDateObject(Wt)&&isDateObject(u)||index_esm_isObject(Wt)&&index_esm_isObject(u)||Array.isArray(Wt)&&Array.isArray(u)?!deepEqual(Wt,u):Wt!==u)return!1}}return!0}var isMultipleSelect=u=>"select-multiple"===u.type,live=u=>index_esm_isHTMLElement(u)&&u.isConnected,objectHasFunction=u=>{for(const Xe in u)if(index_esm_isFunction(u[Xe]))return!0;return!1};function markFieldsDirty(u,Xe={}){const Wt=Array.isArray(u);if(index_esm_isObject(u)||Wt)for(const Wt in u)Array.isArray(u[Wt])||index_esm_isObject(u[Wt])&&!objectHasFunction(u[Wt])?(Xe[Wt]=Array.isArray(u[Wt])?[]:{},markFieldsDirty(u[Wt],Xe[Wt])):isNullOrUndefined(u[Wt])||(Xe[Wt]=!0);return Xe}function getDirtyFieldsFromDefaultValues(u,Xe,Wt){const In=Array.isArray(u);if(index_esm_isObject(u)||In)for(const In in u)Array.isArray(u[In])||index_esm_isObject(u[In])&&!objectHasFunction(u[In])?index_esm_isUndefined(Xe)||isPrimitive(Wt[In])?Wt[In]=Array.isArray(u[In])?markFieldsDirty(u[In],[]):{...markFieldsDirty(u[In])}:getDirtyFieldsFromDefaultValues(u[In],isNullOrUndefined(Xe)?{}:Xe[In],Wt[In]):Wt[In]=!deepEqual(u[In],Xe[In]);return Wt}var getDirtyFields=(u,Xe)=>getDirtyFieldsFromDefaultValues(u,Xe,markFieldsDirty(Xe)),getFieldValueAs=(u,{valueAsNumber:Xe,valueAsDate:Wt,setValueAs:In})=>index_esm_isUndefined(u)?u:Xe?""===u?NaN:u?+u:u:Wt&&index_esm_isString(u)?new Date(u):In?In(u):u;function getFieldValue(u){const Xe=u.ref;if(!(u.refs?u.refs.every((u=>u.disabled)):Xe.disabled))return isFileInput(Xe)?Xe.files:isRadioInput(Xe)?getRadioValue(u.refs).value:isMultipleSelect(Xe)?[...Xe.selectedOptions].map((({value:u})=>u)):isCheckBoxInput(Xe)?getCheckboxValue(u.refs).value:getFieldValueAs(index_esm_isUndefined(Xe.value)?u.ref.value:Xe.value,u)}var getRuleValue=u=>index_esm_isUndefined(u)?u:isRegex(u)?u.source:index_esm_isObject(u)?isRegex(u.value)?u.value.source:u.value:u;const hA="AsyncFunction";function schemaErrorLookup(u,Xe,Wt){const In=get(u,Wt);if(In||isKey(Wt))return{error:In,name:Wt};const fr=Wt.split(".");for(;fr.length;){const In=fr.join("."),_r=get(Xe,In),wr=get(u,In);if(_r&&!Array.isArray(_r)&&Wt!==In)return{name:Wt};if(wr&&wr.type)return{name:In,error:wr};fr.pop()}return{name:Wt}}const pA={mode:qk,reValidateMode:Vk,shouldFocusError:!0};function createFormControl(u={}){let Xe,Wt={...pA,...u},In={submitCount:0,isDirty:!1,isLoading:index_esm_isFunction(Wt.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:Wt.errors||{},disabled:Wt.disabled||!1},fr={},_r=(index_esm_isObject(Wt.defaultValues)||index_esm_isObject(Wt.values))&&cloneObject(Wt.defaultValues||Wt.values)||{},wr=Wt.shouldUnregister?{}:cloneObject(_r),Ar={action:!1,mount:!1,watch:!1},Kr={mount:new Set,unMount:new Set,array:new Set,watch:new Set},no=0;const io={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},oo={values:createSubject(),array:createSubject(),state:createSubject()},ao=getValidationModes(Wt.mode),so=getValidationModes(Wt.reValidateMode),co=Wt.criteriaMode===tA,_updateValid=async u=>{if(io.isValid||u){const u=Wt.resolver?isEmptyObject((await _executeSchema()).errors):await executeBuiltInValidation(fr,!0);u!==In.isValid&&oo.state.next({isValid:u})}},_updateIsValidating=(u,Xe)=>{(io.isValidating||io.validatingFields)&&((u||Array.from(Kr.mount)).forEach((u=>{u&&(Xe?set(In.validatingFields,u,Xe):unset(In.validatingFields,u))})),oo.state.next({validatingFields:In.validatingFields,isValidating:!isEmptyObject(In.validatingFields)}))},updateValidAndValue=(u,Xe,Wt,In)=>{const Kr=get(fr,u);if(Kr){const fr=get(wr,u,index_esm_isUndefined(Wt)?get(_r,u):Wt);index_esm_isUndefined(fr)||In&&In.defaultChecked||Xe?set(wr,u,Xe?fr:getFieldValue(Kr._f)):setFieldValue(u,fr),Ar.mount&&_updateValid()}},updateTouchAndDirty=(u,Xe,Wt,wr,Ar)=>{let Kr=!1,no=!1;const ao={name:u},so=!!(get(fr,u)&&get(fr,u)._f&&get(fr,u)._f.disabled);if(!Wt||wr){io.isDirty&&(no=In.isDirty,In.isDirty=ao.isDirty=_getDirty(),Kr=no!==ao.isDirty);const Wt=so||deepEqual(get(_r,u),Xe);no=!(so||!get(In.dirtyFields,u)),Wt||so?unset(In.dirtyFields,u):set(In.dirtyFields,u,!0),ao.dirtyFields=In.dirtyFields,Kr=Kr||io.dirtyFields&&no!==!Wt}if(Wt){const Xe=get(In.touchedFields,u);Xe||(set(In.touchedFields,u,Wt),ao.touchedFields=In.touchedFields,Kr=Kr||io.touchedFields&&Xe!==Wt)}return Kr&&Ar&&oo.state.next(ao),Kr?ao:{}},shouldRenderByError=(Wt,fr,_r,wr)=>{const Ar=get(In.errors,Wt),Kr=io.isValid&&index_esm_isBoolean(fr)&&In.isValid!==fr;var ao;if(u.delayError&&_r?(ao=()=>((u,Xe)=>{set(In.errors,u,Xe),oo.state.next({errors:In.errors})})(Wt,_r),Xe=u=>{clearTimeout(no),no=setTimeout(ao,u)},Xe(u.delayError)):(clearTimeout(no),Xe=null,_r?set(In.errors,Wt,_r):unset(In.errors,Wt)),(_r?!deepEqual(Ar,_r):Ar)||!isEmptyObject(wr)||Kr){const u={...wr,...Kr&&index_esm_isBoolean(fr)?{isValid:fr}:{},errors:In.errors,name:Wt};In={...In,...u},oo.state.next(u)}},_executeSchema=async u=>{_updateIsValidating(u,!0);const Xe=await Wt.resolver(wr,Wt.context,((u,Xe,Wt,In)=>{const fr={};for(const Wt of u){const u=get(Xe,Wt);u&&set(fr,Wt,u._f)}return{criteriaMode:Wt,names:[...u],fields:fr,shouldUseNativeValidation:In}})(u||Kr.mount,fr,Wt.criteriaMode,Wt.shouldUseNativeValidation));return _updateIsValidating(u),Xe},executeBuiltInValidation=async(u,Xe,fr={valid:!0})=>{for(const Ar in u){const no=u[Ar];if(no){const{_f:u,...oo}=no;if(u){const oo=Kr.array.has(u.name),ao=no._f&&!((_r=no._f)&&_r.validate||!(index_esm_isFunction(_r.validate)&&_r.validate.constructor.name===hA||index_esm_isObject(_r.validate)&&Object.values(_r.validate).find((u=>u.constructor.name===hA))));ao&&io.validatingFields&&_updateIsValidating([Ar],!0);const so=await validateField(no,wr,co,Wt.shouldUseNativeValidation&&!Xe,oo);if(ao&&io.validatingFields&&_updateIsValidating([Ar]),so[u.name]&&(fr.valid=!1,Xe))break;!Xe&&(get(so,u.name)?oo?updateFieldArrayRootError(In.errors,so,u.name):set(In.errors,u.name,so[u.name]):unset(In.errors,u.name))}!isEmptyObject(oo)&&await executeBuiltInValidation(oo,Xe,fr)}}var _r;return fr.valid},_getDirty=(u,Xe)=>(u&&Xe&&set(wr,u,Xe),!deepEqual(getValues(),_r)),_getWatch=(u,Xe,Wt)=>generateWatchOutput(u,Kr,{...Ar.mount?wr:index_esm_isUndefined(Xe)?_r:index_esm_isString(u)?{[u]:Xe}:Xe},Wt,Xe),setFieldValue=(u,Xe,Wt={})=>{const In=get(fr,u);let _r=Xe;if(In){const Wt=In._f;Wt&&(!Wt.disabled&&set(wr,u,getFieldValueAs(Xe,Wt)),_r=index_esm_isHTMLElement(Wt.ref)&&isNullOrUndefined(Xe)?"":Xe,isMultipleSelect(Wt.ref)?[...Wt.ref.options].forEach((u=>u.selected=_r.includes(u.value))):Wt.refs?isCheckBoxInput(Wt.ref)?Wt.refs.length>1?Wt.refs.forEach((u=>(!u.defaultChecked||!u.disabled)&&(u.checked=Array.isArray(_r)?!!_r.find((Xe=>Xe===u.value)):_r===u.value))):Wt.refs[0]&&(Wt.refs[0].checked=!!_r):Wt.refs.forEach((u=>u.checked=u.value===_r)):isFileInput(Wt.ref)?Wt.ref.value="":(Wt.ref.value=_r,Wt.ref.type||oo.values.next({name:u,values:{...wr}})))}(Wt.shouldDirty||Wt.shouldTouch)&&updateTouchAndDirty(u,_r,Wt.shouldTouch,Wt.shouldDirty,!0),Wt.shouldValidate&&trigger(u)},setValues=(u,Xe,Wt)=>{for(const In in Xe){const _r=Xe[In],wr=`${u}.${In}`,Ar=get(fr,wr);!Kr.array.has(u)&&isPrimitive(_r)&&(!Ar||Ar._f)||isDateObject(_r)?setFieldValue(wr,_r,Wt):setValues(wr,_r,Wt)}},setValue=(u,Xe,Wt={})=>{const no=get(fr,u),ao=Kr.array.has(u),so=cloneObject(Xe);set(wr,u,so),ao?(oo.array.next({name:u,values:{...wr}}),(io.isDirty||io.dirtyFields)&&Wt.shouldDirty&&oo.state.next({name:u,dirtyFields:getDirtyFields(_r,wr),isDirty:_getDirty(u,so)})):!no||no._f||isNullOrUndefined(so)?setFieldValue(u,so,Wt):setValues(u,so,Wt),index_esm_isWatched(u,Kr)&&oo.state.next({...In}),oo.values.next({name:Ar.mount?u:void 0,values:{...wr}})},onChange=async _r=>{Ar.mount=!0;const no=_r.target;let ho=no.name,go=!0;const xo=get(fr,ho),_updateIsFieldValueUpdated=u=>{go=Number.isNaN(u)||deepEqual(u,get(wr,ho,u))};if(xo){let Ar,Co;const Io=no.type?getFieldValue(xo._f):getEventValue(_r),zo=_r.type===Ak||_r.type===zk,Bo=!((ko=xo._f).mount&&(ko.required||ko.min||ko.max||ko.maxLength||ko.minLength||ko.pattern||ko.validate)||Wt.resolver||get(In.errors,ho)||xo._f.deps)||((u,Xe,Wt,In,fr)=>!fr.isOnAll&&(!Wt&&fr.isOnTouch?!(Xe||u):(Wt?In.isOnBlur:fr.isOnBlur)?!u:!(Wt?In.isOnChange:fr.isOnChange)||u))(zo,get(In.touchedFields,ho),In.isSubmitted,so,ao),ca=index_esm_isWatched(ho,Kr,zo);set(wr,ho,Io),zo?(xo._f.onBlur&&xo._f.onBlur(_r),Xe&&Xe(0)):xo._f.onChange&&xo._f.onChange(_r);const ua=updateTouchAndDirty(ho,Io,zo,!1),Da=!isEmptyObject(ua)||ca;if(!zo&&oo.values.next({name:ho,type:_r.type,values:{...wr}}),Bo)return io.isValid&&("onBlur"===u.mode?zo&&_updateValid():_updateValid()),Da&&oo.state.next({name:ho,...ca?{}:ua});if(!zo&&ca&&oo.state.next({...In}),Wt.resolver){const{errors:u}=await _executeSchema([ho]);if(_updateIsFieldValueUpdated(Io),go){const Xe=schemaErrorLookup(In.errors,fr,ho),Wt=schemaErrorLookup(u,fr,Xe.name||ho);Ar=Wt.error,ho=Wt.name,Co=isEmptyObject(u)}}else _updateIsValidating([ho],!0),Ar=(await validateField(xo,wr,co,Wt.shouldUseNativeValidation))[ho],_updateIsValidating([ho]),_updateIsFieldValueUpdated(Io),go&&(Ar?Co=!1:io.isValid&&(Co=await executeBuiltInValidation(fr,!0)));go&&(xo._f.deps&&trigger(xo._f.deps),shouldRenderByError(ho,Co,Ar,ua))}var ko},_focusInput=(u,Xe)=>{if(get(In.errors,Xe)&&u.focus)return u.focus(),1},trigger=async(u,Xe={})=>{let _r,wr;const Ar=convertToArrayPayload(u);if(Wt.resolver){const Xe=await(async u=>{const{errors:Xe}=await _executeSchema(u);if(u)for(const Wt of u){const u=get(Xe,Wt);u?set(In.errors,Wt,u):unset(In.errors,Wt)}else In.errors=Xe;return Xe})(index_esm_isUndefined(u)?u:Ar);_r=isEmptyObject(Xe),wr=u?!Ar.some((u=>get(Xe,u))):_r}else u?(wr=(await Promise.all(Ar.map((async u=>{const Xe=get(fr,u);return await executeBuiltInValidation(Xe&&Xe._f?{[u]:Xe}:Xe)})))).every(Boolean),(wr||In.isValid)&&_updateValid()):wr=_r=await executeBuiltInValidation(fr);return oo.state.next({...!index_esm_isString(u)||io.isValid&&_r!==In.isValid?{}:{name:u},...Wt.resolver||!u?{isValid:_r}:{},errors:In.errors}),Xe.shouldFocus&&!wr&&iterateFieldsByAction(fr,_focusInput,u?Ar:Kr.mount),wr},getValues=u=>{const Xe={...Ar.mount?wr:_r};return index_esm_isUndefined(u)?Xe:index_esm_isString(u)?get(Xe,u):u.map((u=>get(Xe,u)))},getFieldState=(u,Xe)=>({invalid:!!get((Xe||In).errors,u),isDirty:!!get((Xe||In).dirtyFields,u),error:get((Xe||In).errors,u),isValidating:!!get(In.validatingFields,u),isTouched:!!get((Xe||In).touchedFields,u)}),setError=(u,Xe,Wt)=>{const _r=(get(fr,u,{_f:{}})._f||{}).ref,wr=get(In.errors,u)||{},{ref:Ar,message:Kr,type:no,...io}=wr;set(In.errors,u,{...io,...Xe,ref:_r}),oo.state.next({name:u,errors:In.errors,isValid:!1}),Wt&&Wt.shouldFocus&&_r&&_r.focus&&_r.focus()},unregister=(u,Xe={})=>{for(const Ar of u?convertToArrayPayload(u):Kr.mount)Kr.mount.delete(Ar),Kr.array.delete(Ar),Xe.keepValue||(unset(fr,Ar),unset(wr,Ar)),!Xe.keepError&&unset(In.errors,Ar),!Xe.keepDirty&&unset(In.dirtyFields,Ar),!Xe.keepTouched&&unset(In.touchedFields,Ar),!Xe.keepIsValidating&&unset(In.validatingFields,Ar),!Wt.shouldUnregister&&!Xe.keepDefaultValue&&unset(_r,Ar);oo.values.next({values:{...wr}}),oo.state.next({...In,...Xe.keepDirty?{isDirty:_getDirty()}:{}}),!Xe.keepIsValid&&_updateValid()},_updateDisabledField=({disabled:u,name:Xe,field:Wt,fields:In,value:fr})=>{if(index_esm_isBoolean(u)&&Ar.mount||u){const _r=u?void 0:index_esm_isUndefined(fr)?getFieldValue(Wt?Wt._f:get(In,Xe)._f):fr;set(wr,Xe,_r),updateTouchAndDirty(Xe,_r,!1,!1,!0)}},register=(Xe,In={})=>{let wr=get(fr,Xe);const no=index_esm_isBoolean(In.disabled)||index_esm_isBoolean(u.disabled);return set(fr,Xe,{...wr||{},_f:{...wr&&wr._f?wr._f:{ref:{name:Xe}},name:Xe,mount:!0,...In}}),Kr.mount.add(Xe),wr?_updateDisabledField({field:wr,disabled:index_esm_isBoolean(In.disabled)?In.disabled:u.disabled,name:Xe,value:In.value}):updateValidAndValue(Xe,!0,In.value),{...no?{disabled:In.disabled||u.disabled}:{},...Wt.progressive?{required:!!In.required,min:getRuleValue(In.min),max:getRuleValue(In.max),minLength:getRuleValue(In.minLength),maxLength:getRuleValue(In.maxLength),pattern:getRuleValue(In.pattern)}:{},name:Xe,onChange,onBlur:onChange,ref:u=>{if(u){register(Xe,In),wr=get(fr,Xe);const Wt=index_esm_isUndefined(u.value)&&u.querySelectorAll&&u.querySelectorAll("input,select,textarea")[0]||u,Ar=(u=>isRadioInput(u)||isCheckBoxInput(u))(Wt),Kr=wr._f.refs||[];if(Ar?Kr.find((u=>u===Wt)):Wt===wr._f.ref)return;set(fr,Xe,{_f:{...wr._f,...Ar?{refs:[...Kr.filter(live),Wt,...Array.isArray(get(_r,Xe))?[{}]:[]],ref:{type:Wt.type,name:Xe}}:{ref:Wt}}}),updateValidAndValue(Xe,!1,void 0,Wt)}else wr=get(fr,Xe,{}),wr._f&&(wr._f.mount=!1),(Wt.shouldUnregister||In.shouldUnregister)&&(!isNameInFieldArray(Kr.array,Xe)||!Ar.action)&&Kr.unMount.add(Xe)}}},_focusError=()=>Wt.shouldFocusError&&iterateFieldsByAction(fr,_focusInput,Kr.mount),handleSubmit=(u,Xe)=>async _r=>{let Ar;_r&&(_r.preventDefault&&_r.preventDefault(),_r.persist&&_r.persist());let Kr=cloneObject(wr);if(oo.state.next({isSubmitting:!0}),Wt.resolver){const{errors:u,values:Xe}=await _executeSchema();In.errors=u,Kr=Xe}else await executeBuiltInValidation(fr);if(unset(In.errors,"root"),isEmptyObject(In.errors)){oo.state.next({errors:{}});try{await u(Kr,_r)}catch(u){Ar=u}}else Xe&&await Xe({...In.errors},_r),_focusError(),setTimeout(_focusError);if(oo.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject(In.errors)&&!Ar,submitCount:In.submitCount+1,errors:In.errors}),Ar)throw Ar},_reset=(Xe,Wt={})=>{const no=Xe?cloneObject(Xe):_r,ao=cloneObject(no),so=isEmptyObject(Xe),co=so?_r:ao;if(Wt.keepDefaultValues||(_r=no),!Wt.keepValues){if(Wt.keepDirtyValues)for(const u of Kr.mount)get(In.dirtyFields,u)?set(co,u,get(wr,u)):setValue(u,get(co,u));else{if(wk&&index_esm_isUndefined(Xe))for(const u of Kr.mount){const Xe=get(fr,u);if(Xe&&Xe._f){const u=Array.isArray(Xe._f.refs)?Xe._f.refs[0]:Xe._f.ref;if(index_esm_isHTMLElement(u)){const Xe=u.closest("form");if(Xe){Xe.reset();break}}}}fr={}}wr=u.shouldUnregister?Wt.keepDefaultValues?cloneObject(_r):{}:cloneObject(co),oo.array.next({values:{...co}}),oo.values.next({values:{...co}})}Kr={mount:Wt.keepDirtyValues?Kr.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},Ar.mount=!io.isValid||!!Wt.keepIsValid||!!Wt.keepDirtyValues,Ar.watch=!!u.shouldUnregister,oo.state.next({submitCount:Wt.keepSubmitCount?In.submitCount:0,isDirty:!so&&(Wt.keepDirty?In.isDirty:!(!Wt.keepDefaultValues||deepEqual(Xe,_r))),isSubmitted:!!Wt.keepIsSubmitted&&In.isSubmitted,dirtyFields:so?{}:Wt.keepDirtyValues?Wt.keepDefaultValues&&wr?getDirtyFields(_r,wr):In.dirtyFields:Wt.keepDefaultValues&&Xe?getDirtyFields(_r,Xe):Wt.keepDirty?In.dirtyFields:{},touchedFields:Wt.keepTouched?In.touchedFields:{},errors:Wt.keepErrors?In.errors:{},isSubmitSuccessful:!!Wt.keepIsSubmitSuccessful&&In.isSubmitSuccessful,isSubmitting:!1})},reset=(u,Xe)=>_reset(index_esm_isFunction(u)?u(wr):u,Xe);return{control:{register,unregister,getFieldState,handleSubmit,setError,_executeSchema,_getWatch,_getDirty,_updateValid,_removeUnmounted:()=>{for(const u of Kr.unMount){const Xe=get(fr,u);Xe&&(Xe._f.refs?Xe._f.refs.every((u=>!live(u))):!live(Xe._f.ref))&&unregister(u)}Kr.unMount=new Set},_updateFieldArray:(u,Xe=[],Wt,Kr,no=!0,ao=!0)=>{if(Kr&&Wt){if(Ar.action=!0,ao&&Array.isArray(get(fr,u))){const Xe=Wt(get(fr,u),Kr.argA,Kr.argB);no&&set(fr,u,Xe)}if(ao&&Array.isArray(get(In.errors,u))){const Xe=Wt(get(In.errors,u),Kr.argA,Kr.argB);no&&set(In.errors,u,Xe),((u,Xe)=>{!compact(get(u,Xe)).length&&unset(u,Xe)})(In.errors,u)}if(io.touchedFields&&ao&&Array.isArray(get(In.touchedFields,u))){const Xe=Wt(get(In.touchedFields,u),Kr.argA,Kr.argB);no&&set(In.touchedFields,u,Xe)}io.dirtyFields&&(In.dirtyFields=getDirtyFields(_r,wr)),oo.state.next({name:u,isDirty:_getDirty(u,Xe),dirtyFields:In.dirtyFields,errors:In.errors,isValid:In.isValid})}else set(wr,u,Xe)},_updateDisabledField,_getFieldArray:Xe=>compact(get(Ar.mount?wr:_r,Xe,u.shouldUnregister?get(_r,Xe,[]):[])),_reset,_resetDefaultValues:()=>index_esm_isFunction(Wt.defaultValues)&&Wt.defaultValues().then((u=>{reset(u,Wt.resetOptions),oo.state.next({isLoading:!1})})),_updateFormState:u=>{In={...In,...u}},_disableForm:u=>{index_esm_isBoolean(u)&&(oo.state.next({disabled:u}),iterateFieldsByAction(fr,((Xe,Wt)=>{const In=get(fr,Wt);In&&(Xe.disabled=In._f.disabled||u,Array.isArray(In._f.refs)&&In._f.refs.forEach((Xe=>{Xe.disabled=In._f.disabled||u})))}),0,!1))},_subjects:oo,_proxyFormState:io,_setErrors:u=>{In.errors=u,oo.state.next({errors:In.errors,isValid:!1})},get _fields(){return fr},get _formValues(){return wr},get _state(){return Ar},set _state(u){Ar=u},get _defaultValues(){return _r},get _names(){return Kr},set _names(u){Kr=u},get _formState(){return In},set _formState(u){In=u},get _options(){return Wt},set _options(u){Wt={...Wt,...u}}},trigger,register,handleSubmit,watch:(u,Xe)=>index_esm_isFunction(u)?oo.values.subscribe({next:Wt=>u(_getWatch(void 0,Xe),Wt)}):_getWatch(u,Xe,!0),setValue,getValues,reset,resetField:(u,Xe={})=>{get(fr,u)&&(index_esm_isUndefined(Xe.defaultValue)?setValue(u,cloneObject(get(_r,u))):(setValue(u,Xe.defaultValue),set(_r,u,cloneObject(Xe.defaultValue))),Xe.keepTouched||unset(In.touchedFields,u),Xe.keepDirty||(unset(In.dirtyFields,u),In.isDirty=Xe.defaultValue?_getDirty(u,cloneObject(get(_r,u))):_getDirty()),Xe.keepError||(unset(In.errors,u),io.isValid&&_updateValid()),oo.state.next({...In}))},clearErrors:u=>{u&&convertToArrayPayload(u).forEach((u=>unset(In.errors,u))),oo.state.next({errors:u?In.errors:{}})},unregister,setError,setFocus:(u,Xe={})=>{const Wt=get(fr,u),In=Wt&&Wt._f;if(In){const u=In.refs?In.refs[0]:In.ref;u.focus&&(u.focus(),Xe.shouldSelect&&u.select())}},getFieldState}}const s=(u,Xe,Wt)=>{if(u&&"reportValidity"in u){const In=get(Wt,Xe);u.setCustomValidity(In&&In.message||""),u.reportValidity()}},resolvers_o=(u,Xe)=>{for(const Wt in Xe.fields){const In=Xe.fields[Wt];In&&In.ref&&"reportValidity"in In.ref?s(In.ref,Wt,u):In.refs&&In.refs.forEach((Xe=>s(Xe,Wt,u)))}},resolvers_r=(u,Xe)=>{Xe.shouldUseNativeValidation&&resolvers_o(u,Xe);const Wt={};for(const In in u){const fr=get(Xe.fields,In),_r=Object.assign(u[In]||{},{ref:fr&&fr.ref});if(i(Xe.names||Object.keys(u),In)){const u=Object.assign({},get(Wt,In));set(u,"root",_r),set(Wt,In,u)}else set(Wt,In,_r)}return Wt},i=(u,Xe)=>u.some((u=>u.startsWith(Xe+".")));var n=function(u,Xe){for(var Wt={};u.length;){var In=u[0],fr=In.code,_r=In.message,wr=In.path.join(".");if(!Wt[wr])if("unionErrors"in In){var Ar=In.unionErrors[0].errors[0];Wt[wr]={message:Ar.message,type:Ar.code}}else Wt[wr]={message:_r,type:fr};if("unionErrors"in In&&In.unionErrors.forEach((function(Xe){return Xe.errors.forEach((function(Xe){return u.push(Xe)}))})),Xe){var Kr=Wt[wr].types,no=Kr&&Kr[In.code];Wt[wr]=appendErrors(wr,Xe,Wt,fr,no?[].concat(no,In.message):In.message)}u.shift()}return Wt},zod_t=function(u,Xe,Wt){return void 0===Wt&&(Wt={}),function(In,fr,_r){try{return Promise.resolve(function(fr,wr){try{var Ar=Promise.resolve(u["sync"===Wt.mode?"parse":"parseAsync"](In,Xe)).then((function(u){return _r.shouldUseNativeValidation&&resolvers_o({},_r),{errors:{},values:Wt.raw?In:u}}))}catch(u){return wr(u)}return Ar&&Ar.then?Ar.then(void 0,wr):Ar}(0,(function(u){if(function(u){return Array.isArray(null==u?void 0:u.errors)}(u))return{values:{},errors:resolvers_r(n(u.errors,!_r.shouldUseNativeValidation&&"all"===_r.criteriaMode),_r)};throw u})))}catch(u){return Promise.reject(u)}}},fA=__webpack_require__(4661),mA=__webpack_require__(9453),gA=__webpack_require__(4877),yA=__webpack_require__(4705);const _A=["onChange","maxRows","minRows","style","value"];function getStyleValue(u){return parseInt(u,10)||0}const vA={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const bA=dp.forwardRef((function TextareaAutosize(u,Xe){const{onChange:Wt,maxRows:In,minRows:fr=1,style:_r,value:wr}=u,Ar=(0,yp.A)(u,_A),{current:Kr}=dp.useRef(null!=wr),no=dp.useRef(null),io=(0,Am.A)(Xe,no),oo=dp.useRef(null),ao=dp.useRef(null),so=dp.useCallback((()=>{const Xe=no.current,Wt=(0,gA.A)(Xe).getComputedStyle(Xe);if("0px"===Wt.width)return{outerHeightStyle:0,overflowing:!1};const _r=ao.current;_r.style.width=Wt.width,_r.value=Xe.value||u.placeholder||"x","\n"===_r.value.slice(-1)&&(_r.value+=" ");const wr=Wt.boxSizing,Ar=getStyleValue(Wt.paddingBottom)+getStyleValue(Wt.paddingTop),Kr=getStyleValue(Wt.borderBottomWidth)+getStyleValue(Wt.borderTopWidth),io=_r.scrollHeight;_r.value="x";const oo=_r.scrollHeight;let so=io;fr&&(so=Math.max(Number(fr)*oo,so)),In&&(so=Math.min(Number(In)*oo,so)),so=Math.max(so,oo);return{outerHeightStyle:so+("border-box"===wr?Ar+Kr:0),overflowing:Math.abs(so-io)<=1}}),[In,fr,u.placeholder]),co=dp.useCallback((()=>{const u=so();if(function TextareaAutosize_isEmpty(u){return null==u||0===Object.keys(u).length||0===u.outerHeightStyle&&!u.overflowing}(u))return;const Xe=u.outerHeightStyle,Wt=no.current;oo.current!==Xe&&(oo.current=Xe,Wt.style.height=`${Xe}px`),Wt.style.overflow=u.overflowing?"hidden":""}),[so]);(0,Tm.A)((()=>{const handleResize=()=>{co()};let u;const Xe=(0,yA.A)(handleResize),Wt=no.current,In=(0,gA.A)(Wt);let fr;return In.addEventListener("resize",Xe),"undefined"!=typeof ResizeObserver&&(fr=new ResizeObserver(handleResize),fr.observe(Wt)),()=>{Xe.clear(),cancelAnimationFrame(u),In.removeEventListener("resize",Xe),fr&&fr.disconnect()}}),[so,co]),(0,Tm.A)((()=>{co()}));return(0,Fp.jsxs)(dp.Fragment,{children:[(0,Fp.jsx)("textarea",(0,_p.A)({value:wr,onChange:u=>{Kr||co(),Wt&&Wt(u)},ref:io,rows:fr,style:_r},Ar)),(0,Fp.jsx)("textarea",{"aria-hidden":!0,className:u.className,readOnly:!0,ref:ao,tabIndex:-1,style:(0,_p.A)({},vA,_r,{paddingTop:0,paddingBottom:0})})]})}));var xA=bA,wA=__webpack_require__(2778),SA=__webpack_require__(9940);var kA=function GlobalStyles_GlobalStyles({styles:u,themeId:Xe,defaultTheme:Wt={}}){const In=Cp(Wt),fr="function"==typeof u?u(Xe&&In[Xe]||In):u;return(0,Fp.jsx)(SA.A,{styles:fr})};var AA=function GlobalStyles_GlobalStyles_GlobalStyles(u){return(0,Fp.jsx)(kA,(0,_p.A)({},u,{defaultTheme:lm.A,themeId:cm.A}))};function getInputBaseUtilityClass(u){return(0,bp.Ay)("MuiInputBase",u)}var TA=(0,uf.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);const CA=["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"],rootOverridesResolver=(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.formControl&&Xe.formControl,Wt.startAdornment&&Xe.adornedStart,Wt.endAdornment&&Xe.adornedEnd,Wt.error&&Xe.error,"small"===Wt.size&&Xe.sizeSmall,Wt.multiline&&Xe.multiline,Wt.color&&Xe[`color${(0,Vp.A)(Wt.color)}`],Wt.fullWidth&&Xe.fullWidth,Wt.hiddenLabel&&Xe.hiddenLabel]},inputOverridesResolver=(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.input,"small"===Wt.size&&Xe.inputSizeSmall,Wt.multiline&&Xe.inputMultiline,"search"===Wt.type&&Xe.inputTypeSearch,Wt.startAdornment&&Xe.inputAdornedStart,Wt.endAdornment&&Xe.inputAdornedEnd,Wt.hiddenLabel&&Xe.inputHiddenLabel]},EA=(0,Up.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rootOverridesResolver})((({theme:u,ownerState:Xe})=>(0,_p.A)({},u.typography.body1,{color:(u.vars||u).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${TA.disabled}`]:{color:(u.vars||u).palette.text.disabled,cursor:"default"}},Xe.multiline&&(0,_p.A)({padding:"4px 0 5px"},"small"===Xe.size&&{paddingTop:1}),Xe.fullWidth&&{width:"100%"}))),PA=(0,Up.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:inputOverridesResolver})((({theme:u,ownerState:Xe})=>{const Wt="light"===u.palette.mode,In=(0,_p.A)({color:"currentColor"},u.vars?{opacity:u.vars.opacity.inputPlaceholder}:{opacity:Wt?.42:.5},{transition:u.transitions.create("opacity",{duration:u.transitions.duration.shorter})}),fr={opacity:"0 !important"},_r=u.vars?{opacity:u.vars.opacity.inputPlaceholder}:{opacity:Wt?.42:.5};return(0,_p.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":In,"&::-moz-placeholder":In,"&:-ms-input-placeholder":In,"&::-ms-input-placeholder":In,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${TA.formControl} &`]:{"&::-webkit-input-placeholder":fr,"&::-moz-placeholder":fr,"&:-ms-input-placeholder":fr,"&::-ms-input-placeholder":fr,"&:focus::-webkit-input-placeholder":_r,"&:focus::-moz-placeholder":_r,"&:focus:-ms-input-placeholder":_r,"&:focus::-ms-input-placeholder":_r},[`&.${TA.disabled}`]:{opacity:1,WebkitTextFillColor:(u.vars||u).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===Xe.size&&{paddingTop:1},Xe.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===Xe.type&&{MozAppearance:"textfield"})})),IA=(0,Fp.jsx)(AA,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),MA=dp.forwardRef((function InputBase(u,Xe){var Wt;const In=(0,$p.b)({props:u,name:"MuiInputBase"}),{"aria-describedby":fr,autoComplete:_r,autoFocus:wr,className:Ar,components:Kr={},componentsProps:no={},defaultValue:io,disabled:oo,disableInjectingGlobalStyles:ao,endAdornment:so,fullWidth:co=!1,id:ho,inputComponent:go="input",inputProps:xo={},inputRef:ko,maxRows:Co,minRows:Io,multiline:zo=!1,name:Bo,onBlur:ca,onChange:ua,onClick:Da,onFocus:ns,onKeyDown:yl,onKeyUp:vl,placeholder:kl,readOnly:Al,renderSuffix:Ml,rows:Rl,slotProps:Ol={},slots:Ll={},startAdornment:Dl,type:Bl="text",value:Nl}=In,Vl=(0,yp.A)(In,CA),Ul=null!=xo.value?xo.value:Nl,{current:$l}=dp.useRef(null!=Ul),Wl=dp.useRef(),Zl=dp.useCallback((u=>{0}),[]),Gl=(0,Xp.A)(Wl,ko,xo.ref,Zl),[Xl,Jl]=dp.useState(!1),Ql=useFormControl();const rc=formControlState({props:In,muiFormControl:Ql,states:["color","disabled","error","hiddenLabel","size","required","filled"]});rc.focused=Ql?Ql.focused:Xl,dp.useEffect((()=>{!Ql&&oo&&Xl&&(Jl(!1),ca&&ca())}),[Ql,oo,Xl,ca]);const ic=Ql&&Ql.onFilled,oc=Ql&&Ql.onEmpty,lc=dp.useCallback((u=>{isFilled(u)?ic&&ic():oc&&oc()}),[ic,oc]);(0,wA.A)((()=>{$l&&lc({value:Ul})}),[Ul,lc,$l]);dp.useEffect((()=>{lc(Wl.current)}),[]);let gc=go,bc=xo;zo&&"input"===gc&&(bc=Rl?(0,_p.A)({type:void 0,minRows:Rl,maxRows:Rl},bc):(0,_p.A)({type:void 0,maxRows:Co,minRows:Io},bc),gc=xA);dp.useEffect((()=>{Ql&&Ql.setAdornedStart(Boolean(Dl))}),[Ql,Dl]);const eu=(0,_p.A)({},In,{color:rc.color||"primary",disabled:rc.disabled,endAdornment:so,error:rc.error,focused:rc.focused,formControl:Ql,fullWidth:co,hiddenLabel:rc.hiddenLabel,multiline:zo,size:rc.size,startAdornment:Dl,type:Bl}),tu=(u=>{const{classes:Xe,color:Wt,disabled:In,error:fr,endAdornment:_r,focused:wr,formControl:Ar,fullWidth:Kr,hiddenLabel:no,multiline:io,readOnly:oo,size:ao,startAdornment:so,type:co}=u,ho={root:["root",`color${(0,Vp.A)(Wt)}`,In&&"disabled",fr&&"error",Kr&&"fullWidth",wr&&"focused",Ar&&"formControl",ao&&"medium"!==ao&&`size${(0,Vp.A)(ao)}`,io&&"multiline",so&&"adornedStart",_r&&"adornedEnd",no&&"hiddenLabel",oo&&"readOnly"],input:["input",In&&"disabled","search"===co&&"inputTypeSearch",io&&"inputMultiline","small"===ao&&"inputSizeSmall",no&&"inputHiddenLabel",so&&"inputAdornedStart",_r&&"inputAdornedEnd",oo&&"readOnly"]};return(0,xp.A)(ho,getInputBaseUtilityClass,Xe)})(eu),nu=Ll.root||Kr.Root||EA,iu=Ol.root||no.root||{},su=Ll.input||Kr.Input||PA;return bc=(0,_p.A)({},bc,null!=(Wt=Ol.input)?Wt:no.input),(0,Fp.jsxs)(dp.Fragment,{children:[!ao&&IA,(0,Fp.jsxs)(nu,(0,_p.A)({},iu,!am(nu)&&{ownerState:(0,_p.A)({},eu,iu.ownerState)},{ref:Xe,onClick:u=>{Wl.current&&u.currentTarget===u.target&&Wl.current.focus(),Da&&Da(u)}},Vl,{className:(0,vp.A)(tu.root,iu.className,Ar,Al&&"MuiInputBase-readOnly"),children:[Dl,(0,Fp.jsx)(Kp.Provider,{value:null,children:(0,Fp.jsx)(su,(0,_p.A)({ownerState:eu,"aria-invalid":rc.error,"aria-describedby":fr,autoComplete:_r,autoFocus:wr,defaultValue:io,disabled:rc.disabled,id:ho,onAnimationStart:u=>{lc("mui-auto-fill-cancel"===u.animationName?Wl.current:{value:"x"})},name:Bo,placeholder:kl,readOnly:Al,required:rc.required,rows:Rl,value:Ul,onKeyDown:yl,onKeyUp:vl,type:Bl},bc,!am(su)&&{as:gc,ownerState:(0,_p.A)({},eu,bc.ownerState)},{ref:Gl,className:(0,vp.A)(tu.input,bc.className,Al&&"MuiInputBase-readOnly"),onBlur:u=>{ca&&ca(u),xo.onBlur&&xo.onBlur(u),Ql&&Ql.onBlur?Ql.onBlur(u):Jl(!1)},onChange:(u,...Xe)=>{if(!$l){const Xe=u.target||Wl.current;if(null==Xe)throw new Error((0,mA.A)(1));lc({value:Xe.value})}xo.onChange&&xo.onChange(u,...Xe),ua&&ua(u,...Xe)},onFocus:u=>{rc.disabled?u.stopPropagation():(ns&&ns(u),xo.onFocus&&xo.onFocus(u),Ql&&Ql.onFocus?Ql.onFocus(u):Jl(!0))}}))}),so,Ml?Ml((0,_p.A)({},rc,{startAdornment:Dl})):null]}))]})}));var RA=MA;function getInputUtilityClass(u){return(0,bp.Ay)("MuiInput",u)}var zA=(0,_p.A)({},TA,(0,uf.A)("MuiInput",["root","underline","input"]));const OA=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],LA=(0,Up.Ay)(EA,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiInput",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[...rootOverridesResolver(u,Xe),!Wt.disableUnderline&&Xe.underline]}})((({theme:u,ownerState:Xe})=>{let Wt="light"===u.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return u.vars&&(Wt=`rgba(${u.vars.palette.common.onBackgroundChannel} / ${u.vars.opacity.inputUnderline})`),(0,_p.A)({position:"relative"},Xe.formControl&&{"label + &":{marginTop:16}},!Xe.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(u.vars||u).palette[Xe.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:u.transitions.create("transform",{duration:u.transitions.duration.shorter,easing:u.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${zA.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${zA.error}`]:{"&::before, &::after":{borderBottomColor:(u.vars||u).palette.error.main}},"&::before":{borderBottom:`1px solid ${Wt}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:u.transitions.create("border-bottom-color",{duration:u.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${zA.disabled}, .${zA.error}):before`]:{borderBottom:`2px solid ${(u.vars||u).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${Wt}`}},[`&.${zA.disabled}:before`]:{borderBottomStyle:"dotted"}})})),DA=(0,Up.Ay)(PA,{name:"MuiInput",slot:"Input",overridesResolver:inputOverridesResolver})({}),FA=dp.forwardRef((function Input(u,Xe){var Wt,In,fr,_r;const wr=(0,$p.b)({props:u,name:"MuiInput"}),{disableUnderline:Ar,components:Kr={},componentsProps:no,fullWidth:io=!1,inputComponent:oo="input",multiline:ao=!1,slotProps:so,slots:co={},type:ho="text"}=wr,go=(0,yp.A)(wr,OA),xo=(u=>{const{classes:Xe,disableUnderline:Wt}=u,In={root:["root",!Wt&&"underline"],input:["input"]},fr=(0,xp.A)(In,getInputUtilityClass,Xe);return(0,_p.A)({},Xe,fr)})(wr),ko={root:{ownerState:{disableUnderline:Ar}}},Co=(null!=so?so:no)?(0,Pp.A)(null!=so?so:no,ko):ko,Io=null!=(Wt=null!=(In=co.root)?In:Kr.Root)?Wt:LA,zo=null!=(fr=null!=(_r=co.input)?_r:Kr.Input)?fr:DA;return(0,Fp.jsx)(RA,(0,_p.A)({slots:{root:Io,input:zo},slotProps:Co,fullWidth:io,inputComponent:oo,multiline:ao,ref:Xe,type:ho},go,{classes:xo}))}));FA.muiName="Input";var BA=FA;function getFilledInputUtilityClass(u){return(0,bp.Ay)("MuiFilledInput",u)}var jA=(0,_p.A)({},TA,(0,uf.A)("MuiFilledInput",["root","underline","input"]));const NA=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],VA=(0,Up.Ay)(EA,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiFilledInput",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[...rootOverridesResolver(u,Xe),!Wt.disableUnderline&&Xe.underline]}})((({theme:u,ownerState:Xe})=>{var Wt;const In="light"===u.palette.mode,fr=In?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",_r=In?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",wr=In?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",Ar=In?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,_p.A)({position:"relative",backgroundColor:u.vars?u.vars.palette.FilledInput.bg:_r,borderTopLeftRadius:(u.vars||u).shape.borderRadius,borderTopRightRadius:(u.vars||u).shape.borderRadius,transition:u.transitions.create("background-color",{duration:u.transitions.duration.shorter,easing:u.transitions.easing.easeOut}),"&:hover":{backgroundColor:u.vars?u.vars.palette.FilledInput.hoverBg:wr,"@media (hover: none)":{backgroundColor:u.vars?u.vars.palette.FilledInput.bg:_r}},[`&.${jA.focused}`]:{backgroundColor:u.vars?u.vars.palette.FilledInput.bg:_r},[`&.${jA.disabled}`]:{backgroundColor:u.vars?u.vars.palette.FilledInput.disabledBg:Ar}},!Xe.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(Wt=(u.vars||u).palette[Xe.color||"primary"])?void 0:Wt.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:u.transitions.create("transform",{duration:u.transitions.duration.shorter,easing:u.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${jA.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${jA.error}`]:{"&::before, &::after":{borderBottomColor:(u.vars||u).palette.error.main}},"&::before":{borderBottom:`1px solid ${u.vars?`rgba(${u.vars.palette.common.onBackgroundChannel} / ${u.vars.opacity.inputUnderline})`:fr}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:u.transitions.create("border-bottom-color",{duration:u.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${jA.disabled}, .${jA.error}):before`]:{borderBottom:`1px solid ${(u.vars||u).palette.text.primary}`},[`&.${jA.disabled}:before`]:{borderBottomStyle:"dotted"}},Xe.startAdornment&&{paddingLeft:12},Xe.endAdornment&&{paddingRight:12},Xe.multiline&&(0,_p.A)({padding:"25px 12px 8px"},"small"===Xe.size&&{paddingTop:21,paddingBottom:4},Xe.hiddenLabel&&{paddingTop:16,paddingBottom:17},Xe.hiddenLabel&&"small"===Xe.size&&{paddingTop:8,paddingBottom:9}))})),UA=(0,Up.Ay)(PA,{name:"MuiFilledInput",slot:"Input",overridesResolver:inputOverridesResolver})((({theme:u,ownerState:Xe})=>(0,_p.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!u.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===u.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===u.palette.mode?null:"#fff",caretColor:"light"===u.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},u.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[u.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===Xe.size&&{paddingTop:21,paddingBottom:4},Xe.hiddenLabel&&{paddingTop:16,paddingBottom:17},Xe.startAdornment&&{paddingLeft:0},Xe.endAdornment&&{paddingRight:0},Xe.hiddenLabel&&"small"===Xe.size&&{paddingTop:8,paddingBottom:9},Xe.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}))),$A=dp.forwardRef((function FilledInput(u,Xe){var Wt,In,fr,_r;const wr=(0,$p.b)({props:u,name:"MuiFilledInput"}),{components:Ar={},componentsProps:Kr,fullWidth:no=!1,inputComponent:io="input",multiline:oo=!1,slotProps:ao,slots:so={},type:co="text"}=wr,ho=(0,yp.A)(wr,NA),go=(0,_p.A)({},wr,{fullWidth:no,inputComponent:io,multiline:oo,type:co}),xo=(u=>{const{classes:Xe,disableUnderline:Wt}=u,In={root:["root",!Wt&&"underline"],input:["input"]},fr=(0,xp.A)(In,getFilledInputUtilityClass,Xe);return(0,_p.A)({},Xe,fr)})(wr),ko={root:{ownerState:go},input:{ownerState:go}},Co=(null!=ao?ao:Kr)?(0,Pp.A)(ko,null!=ao?ao:Kr):ko,Io=null!=(Wt=null!=(In=so.root)?In:Ar.Root)?Wt:VA,zo=null!=(fr=null!=(_r=so.input)?_r:Ar.Input)?fr:UA;return(0,Fp.jsx)(RA,(0,_p.A)({slots:{root:Io,input:zo},componentsProps:Co,fullWidth:no,inputComponent:io,multiline:oo,ref:Xe,type:co},ho,{classes:xo}))}));$A.muiName="Input";var WA,qA=$A;const ZA=["children","classes","className","label","notched"],HA=(0,Up.Ay)("fieldset",{shouldForwardProp:Hp.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%"}),GA=(0,Up.Ay)("legend",{shouldForwardProp:Hp.A})((({ownerState:u,theme:Xe})=>(0,_p.A)({float:"unset",width:"auto",overflow:"hidden"},!u.withLabel&&{padding:0,lineHeight:"11px",transition:Xe.transitions.create("width",{duration:150,easing:Xe.transitions.easing.easeOut})},u.withLabel&&(0,_p.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:Xe.transitions.create("max-width",{duration:50,easing:Xe.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},u.notched&&{maxWidth:"100%",transition:Xe.transitions.create("max-width",{duration:100,easing:Xe.transitions.easing.easeOut,delay:50})}))));function getOutlinedInputUtilityClass(u){return(0,bp.Ay)("MuiOutlinedInput",u)}var KA=(0,_p.A)({},TA,(0,uf.A)("MuiOutlinedInput",["root","notchedOutline","input"]));const XA=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],YA=(0,Up.Ay)(EA,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})((({theme:u,ownerState:Xe})=>{const Wt="light"===u.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,_p.A)({position:"relative",borderRadius:(u.vars||u).shape.borderRadius,[`&:hover .${KA.notchedOutline}`]:{borderColor:(u.vars||u).palette.text.primary},"@media (hover: none)":{[`&:hover .${KA.notchedOutline}`]:{borderColor:u.vars?`rgba(${u.vars.palette.common.onBackgroundChannel} / 0.23)`:Wt}},[`&.${KA.focused} .${KA.notchedOutline}`]:{borderColor:(u.vars||u).palette[Xe.color].main,borderWidth:2},[`&.${KA.error} .${KA.notchedOutline}`]:{borderColor:(u.vars||u).palette.error.main},[`&.${KA.disabled} .${KA.notchedOutline}`]:{borderColor:(u.vars||u).palette.action.disabled}},Xe.startAdornment&&{paddingLeft:14},Xe.endAdornment&&{paddingRight:14},Xe.multiline&&(0,_p.A)({padding:"16.5px 14px"},"small"===Xe.size&&{padding:"8.5px 14px"}))})),JA=(0,Up.Ay)((function NotchedOutline(u){const{className:Xe,label:Wt,notched:In}=u,fr=(0,yp.A)(u,ZA),_r=null!=Wt&&""!==Wt,wr=(0,_p.A)({},u,{notched:In,withLabel:_r});return(0,Fp.jsx)(HA,(0,_p.A)({"aria-hidden":!0,className:Xe,ownerState:wr},fr,{children:(0,Fp.jsx)(GA,{ownerState:wr,children:_r?(0,Fp.jsx)("span",{children:Wt}):WA||(WA=(0,Fp.jsx)("span",{className:"notranslate",children:"​"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(u,Xe)=>Xe.notchedOutline})((({theme:u})=>{const Xe="light"===u.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:u.vars?`rgba(${u.vars.palette.common.onBackgroundChannel} / 0.23)`:Xe}})),QA=(0,Up.Ay)(PA,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})((({theme:u,ownerState:Xe})=>(0,_p.A)({padding:"16.5px 14px"},!u.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===u.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===u.palette.mode?null:"#fff",caretColor:"light"===u.palette.mode?null:"#fff",borderRadius:"inherit"}},u.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[u.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===Xe.size&&{padding:"8.5px 14px"},Xe.multiline&&{padding:0},Xe.startAdornment&&{paddingLeft:0},Xe.endAdornment&&{paddingRight:0}))),eT=dp.forwardRef((function OutlinedInput(u,Xe){var Wt,In,fr,_r,wr;const Ar=(0,$p.b)({props:u,name:"MuiOutlinedInput"}),{components:Kr={},fullWidth:no=!1,inputComponent:io="input",label:oo,multiline:ao=!1,notched:so,slots:co={},type:ho="text"}=Ar,go=(0,yp.A)(Ar,XA),xo=(u=>{const{classes:Xe}=u,Wt=(0,xp.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,Xe);return(0,_p.A)({},Xe,Wt)})(Ar),ko=useFormControl(),Co=formControlState({props:Ar,muiFormControl:ko,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),Io=(0,_p.A)({},Ar,{color:Co.color||"primary",disabled:Co.disabled,error:Co.error,focused:Co.focused,formControl:ko,fullWidth:no,hiddenLabel:Co.hiddenLabel,multiline:ao,size:Co.size,type:ho}),zo=null!=(Wt=null!=(In=co.root)?In:Kr.Root)?Wt:YA,Bo=null!=(fr=null!=(_r=co.input)?_r:Kr.Input)?fr:QA;return(0,Fp.jsx)(RA,(0,_p.A)({slots:{root:zo,input:Bo},renderSuffix:u=>(0,Fp.jsx)(JA,{ownerState:Io,className:xo.notchedOutline,label:null!=oo&&""!==oo&&Co.required?wr||(wr=(0,Fp.jsxs)(dp.Fragment,{children:[oo," ","*"]})):oo,notched:void 0!==so?so:Boolean(u.startAdornment||u.filled||u.focused)}),fullWidth:no,inputComponent:io,multiline:ao,ref:Xe,type:ho},go,{classes:(0,_p.A)({},xo,{notchedOutline:null})}))}));eT.muiName="Input";var tT=eT;function getInputLabelUtilityClasses(u){return(0,bp.Ay)("MuiInputLabel",u)}(0,uf.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const nT=["disableAnimation","margin","shrink","variant","className"],rT=(0,Up.Ay)(uS,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiInputLabel",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[{[`& .${oS.asterisk}`]:Xe.asterisk},Xe.root,Wt.formControl&&Xe.formControl,"small"===Wt.size&&Xe.sizeSmall,Wt.shrink&&Xe.shrink,!Wt.disableAnimation&&Xe.animated,Wt.focused&&Xe.focused,Xe[Wt.variant]]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},Xe.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===Xe.size&&{transform:"translate(0, 17px) scale(1)"},Xe.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!Xe.disableAnimation&&{transition:u.transitions.create(["color","transform","max-width"],{duration:u.transitions.duration.shorter,easing:u.transitions.easing.easeOut})},"filled"===Xe.variant&&(0,_p.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===Xe.size&&{transform:"translate(12px, 13px) scale(1)"},Xe.shrink&&(0,_p.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===Xe.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===Xe.variant&&(0,_p.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===Xe.size&&{transform:"translate(14px, 9px) scale(1)"},Xe.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))));var iT=dp.forwardRef((function InputLabel(u,Xe){const Wt=(0,$p.b)({name:"MuiInputLabel",props:u}),{disableAnimation:In=!1,shrink:fr,className:_r}=Wt,wr=(0,yp.A)(Wt,nT),Ar=useFormControl();let Kr=fr;void 0===Kr&&Ar&&(Kr=Ar.filled||Ar.focused||Ar.adornedStart);const no=formControlState({props:Wt,muiFormControl:Ar,states:["size","variant","required","focused"]}),io=(0,_p.A)({},Wt,{disableAnimation:In,formControl:Ar,shrink:Kr,size:no.size,variant:no.variant,required:no.required,focused:no.focused}),oo=(u=>{const{classes:Xe,formControl:Wt,size:In,shrink:fr,disableAnimation:_r,variant:wr,required:Ar}=u,Kr={root:["root",Wt&&"formControl",!_r&&"animated",fr&&"shrink",In&&"normal"!==In&&`size${(0,Vp.A)(In)}`,wr],asterisk:[Ar&&"asterisk"]},no=(0,xp.A)(Kr,getInputLabelUtilityClasses,Xe);return(0,_p.A)({},Xe,no)})(io);return(0,Fp.jsx)(rT,(0,_p.A)({"data-shrink":Kr,ownerState:io,ref:Xe,className:(0,vp.A)(oo.root,_r)},wr,{classes:oo}))}));function getFormHelperTextUtilityClasses(u){return(0,bp.Ay)("MuiFormHelperText",u)}var oT,aT=(0,uf.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);const sT=["children","className","component","disabled","error","filled","focused","margin","required","variant"],lT=(0,Up.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.size&&Xe[`size${(0,Vp.A)(Wt.size)}`],Wt.contained&&Xe.contained,Wt.filled&&Xe.filled]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({color:(u.vars||u).palette.text.secondary},u.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${aT.disabled}`]:{color:(u.vars||u).palette.text.disabled},[`&.${aT.error}`]:{color:(u.vars||u).palette.error.main}},"small"===Xe.size&&{marginTop:4},Xe.contained&&{marginLeft:14,marginRight:14}))),cT=dp.forwardRef((function FormHelperText(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiFormHelperText"}),{children:In,className:fr,component:_r="p"}=Wt,wr=(0,yp.A)(Wt,sT),Ar=formControlState({props:Wt,muiFormControl:useFormControl(),states:["variant","size","disabled","error","filled","focused","required"]}),Kr=(0,_p.A)({},Wt,{component:_r,contained:"filled"===Ar.variant||"outlined"===Ar.variant,variant:Ar.variant,size:Ar.size,disabled:Ar.disabled,error:Ar.error,filled:Ar.filled,focused:Ar.focused,required:Ar.required}),no=(u=>{const{classes:Xe,contained:Wt,size:In,disabled:fr,error:_r,filled:wr,focused:Ar,required:Kr}=u,no={root:["root",fr&&"disabled",_r&&"error",In&&`size${(0,Vp.A)(In)}`,Wt&&"contained",Ar&&"focused",wr&&"filled",Kr&&"required"]};return(0,xp.A)(no,getFormHelperTextUtilityClasses,Xe)})(Kr);return(0,Fp.jsx)(lT,(0,_p.A)({as:_r,ownerState:Kr,className:(0,vp.A)(no.root,fr),ref:Xe},wr,{children:" "===In?oT||(oT=(0,Fp.jsx)("span",{className:"notranslate",children:"​"})):In}))}));var uT=cT,dT=(__webpack_require__(4363),__webpack_require__(6248));var hT=dp.createContext({});function getListUtilityClass(u){return(0,bp.Ay)("MuiList",u)}(0,uf.A)("MuiList",["root","padding","dense","subheader"]);const pT=["children","className","component","dense","disablePadding","subheader"],fT=(0,Up.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,!Wt.disablePadding&&Xe.padding,Wt.dense&&Xe.dense,Wt.subheader&&Xe.subheader]}})((({ownerState:u})=>(0,_p.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!u.disablePadding&&{paddingTop:8,paddingBottom:8},u.subheader&&{paddingTop:0})));var mT=dp.forwardRef((function List(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiList"}),{children:In,className:fr,component:_r="ul",dense:wr=!1,disablePadding:Ar=!1,subheader:Kr}=Wt,no=(0,yp.A)(Wt,pT),io=dp.useMemo((()=>({dense:wr})),[wr]),oo=(0,_p.A)({},Wt,{component:_r,dense:wr,disablePadding:Ar}),ao=(u=>{const{classes:Xe,disablePadding:Wt,dense:In,subheader:fr}=u,_r={root:["root",!Wt&&"padding",In&&"dense",fr&&"subheader"]};return(0,xp.A)(_r,getListUtilityClass,Xe)})(oo);return(0,Fp.jsx)(hT.Provider,{value:io,children:(0,Fp.jsxs)(fT,(0,_p.A)({as:_r,className:(0,vp.A)(ao.root,fr),ref:Xe,ownerState:oo},no,{children:[Kr,In]}))})}));function getScrollbarSize(u){const Xe=u.documentElement.clientWidth;return Math.abs(window.innerWidth-Xe)}var gT=getScrollbarSize;const yT=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nextItem(u,Xe,Wt){return u===Xe?u.firstChild:Xe&&Xe.nextElementSibling?Xe.nextElementSibling:Wt?null:u.firstChild}function previousItem(u,Xe,Wt){return u===Xe?Wt?u.firstChild:u.lastChild:Xe&&Xe.previousElementSibling?Xe.previousElementSibling:Wt?null:u.lastChild}function textCriteriaMatches(u,Xe){if(void 0===Xe)return!0;let Wt=u.innerText;return void 0===Wt&&(Wt=u.textContent),Wt=Wt.trim().toLowerCase(),0!==Wt.length&&(Xe.repeating?Wt[0]===Xe.keys[0]:0===Wt.indexOf(Xe.keys.join("")))}function moveFocus(u,Xe,Wt,In,fr,_r){let wr=!1,Ar=fr(u,Xe,!!Xe&&Wt);for(;Ar;){if(Ar===u.firstChild){if(wr)return!1;wr=!0}const Xe=!In&&(Ar.disabled||"true"===Ar.getAttribute("aria-disabled"));if(Ar.hasAttribute("tabindex")&&textCriteriaMatches(Ar,_r)&&!Xe)return Ar.focus(),!0;Ar=fr(u,Ar,Wt)}return!1}var _T=dp.forwardRef((function MenuList(u,Xe){const{actions:Wt,autoFocus:In=!1,autoFocusItem:fr=!1,children:_r,className:wr,disabledItemsFocusable:Ar=!1,disableListWrap:Kr=!1,onKeyDown:no,variant:io="selectedMenu"}=u,oo=(0,yp.A)(u,yT),ao=dp.useRef(null),so=dp.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,wA.A)((()=>{In&&ao.current.focus()}),[In]),dp.useImperativeHandle(Wt,(()=>({adjustStyleForScrollbar:(u,{direction:Xe})=>{const Wt=!ao.current.style.width;if(u.clientHeight<ao.current.clientHeight&&Wt){const Wt=`${gT((0,dT.A)(u))}px`;ao.current.style["rtl"===Xe?"paddingLeft":"paddingRight"]=Wt,ao.current.style.width=`calc(100% + ${Wt})`}return ao.current}})),[]);const co=(0,Xp.A)(ao,Xe);let ho=-1;dp.Children.forEach(_r,((u,Xe)=>{dp.isValidElement(u)?(u.props.disabled||("selectedMenu"===io&&u.props.selected||-1===ho)&&(ho=Xe),ho===Xe&&(u.props.disabled||u.props.muiSkipListHighlight||u.type.muiSkipListHighlight)&&(ho+=1,ho>=_r.length&&(ho=-1))):ho===Xe&&(ho+=1,ho>=_r.length&&(ho=-1))}));const go=dp.Children.map(_r,((u,Xe)=>{if(Xe===ho){const Xe={};return fr&&(Xe.autoFocus=!0),void 0===u.props.tabIndex&&"selectedMenu"===io&&(Xe.tabIndex=0),dp.cloneElement(u,Xe)}return u}));return(0,Fp.jsx)(mT,(0,_p.A)({role:"menu",ref:co,className:wr,onKeyDown:u=>{const Xe=ao.current,Wt=u.key,In=(0,dT.A)(Xe).activeElement;if("ArrowDown"===Wt)u.preventDefault(),moveFocus(Xe,In,Kr,Ar,nextItem);else if("ArrowUp"===Wt)u.preventDefault(),moveFocus(Xe,In,Kr,Ar,previousItem);else if("Home"===Wt)u.preventDefault(),moveFocus(Xe,null,Kr,Ar,nextItem);else if("End"===Wt)u.preventDefault(),moveFocus(Xe,null,Kr,Ar,previousItem);else if(1===Wt.length){const fr=so.current,_r=Wt.toLowerCase(),wr=performance.now();fr.keys.length>0&&(wr-fr.lastTime>500?(fr.keys=[],fr.repeating=!0,fr.previousKeyMatched=!0):fr.repeating&&_r!==fr.keys[0]&&(fr.repeating=!1)),fr.lastTime=wr,fr.keys.push(_r);const Kr=In&&!fr.repeating&&textCriteriaMatches(In,fr);fr.previousKeyMatched&&(Kr||moveFocus(Xe,In,!1,Ar,nextItem,fr))?u.preventDefault():fr.previousKeyMatched=!1}no&&no(u)},tabIndex:In?0:-1},oo,{children:go}))})),vT=__webpack_require__(1935),bT=__webpack_require__(3749);const xT=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function defaultGetTabbable(u){const Xe=[],Wt=[];return Array.from(u.querySelectorAll(xT)).forEach(((u,In)=>{const fr=function getTabIndex(u){const Xe=parseInt(u.getAttribute("tabindex")||"",10);return Number.isNaN(Xe)?"true"===u.contentEditable||("AUDIO"===u.nodeName||"VIDEO"===u.nodeName||"DETAILS"===u.nodeName)&&null===u.getAttribute("tabindex")?0:u.tabIndex:Xe}(u);-1!==fr&&function isNodeMatchingSelectorFocusable(u){return!(u.disabled||"INPUT"===u.tagName&&"hidden"===u.type||function isNonTabbableRadio(u){if("INPUT"!==u.tagName||"radio"!==u.type)return!1;if(!u.name)return!1;const getRadio=Xe=>u.ownerDocument.querySelector(`input[type="radio"]${Xe}`);let Xe=getRadio(`[name="${u.name}"]:checked`);return Xe||(Xe=getRadio(`[name="${u.name}"]`)),Xe!==u}(u))}(u)&&(0===fr?Xe.push(u):Wt.push({documentOrder:In,tabIndex:fr,node:u}))})),Wt.sort(((u,Xe)=>u.tabIndex===Xe.tabIndex?u.documentOrder-Xe.documentOrder:u.tabIndex-Xe.tabIndex)).map((u=>u.node)).concat(Xe)}function defaultIsEnabled(){return!0}var wT=function FocusTrap(u){const{children:Xe,disableAutoFocus:Wt=!1,disableEnforceFocus:In=!1,disableRestoreFocus:fr=!1,getTabbable:_r=defaultGetTabbable,isEnabled:wr=defaultIsEnabled,open:Ar}=u,Kr=dp.useRef(!1),no=dp.useRef(null),io=dp.useRef(null),oo=dp.useRef(null),ao=dp.useRef(null),so=dp.useRef(!1),co=dp.useRef(null),ho=(0,Am.A)(Xe.ref,co),go=dp.useRef(null);dp.useEffect((()=>{Ar&&co.current&&(so.current=!Wt)}),[Wt,Ar]),dp.useEffect((()=>{if(!Ar||!co.current)return;const u=(0,Cm.A)(co.current);return co.current.contains(u.activeElement)||(co.current.hasAttribute("tabIndex")||co.current.setAttribute("tabIndex","-1"),so.current&&co.current.focus()),()=>{fr||(oo.current&&oo.current.focus&&(Kr.current=!0,oo.current.focus()),oo.current=null)}}),[Ar]),dp.useEffect((()=>{if(!Ar||!co.current)return;const u=(0,Cm.A)(co.current),loopFocus=Xe=>{go.current=Xe,!In&&wr()&&"Tab"===Xe.key&&u.activeElement===co.current&&Xe.shiftKey&&(Kr.current=!0,io.current&&io.current.focus())},contain=()=>{const Xe=co.current;if(null===Xe)return;if(!u.hasFocus()||!wr()||Kr.current)return void(Kr.current=!1);if(Xe.contains(u.activeElement))return;if(In&&u.activeElement!==no.current&&u.activeElement!==io.current)return;if(u.activeElement!==ao.current)ao.current=null;else if(null!==ao.current)return;if(!so.current)return;let Wt=[];if(u.activeElement!==no.current&&u.activeElement!==io.current||(Wt=_r(co.current)),Wt.length>0){var fr,Ar;const u=Boolean((null==(fr=go.current)?void 0:fr.shiftKey)&&"Tab"===(null==(Ar=go.current)?void 0:Ar.key)),Xe=Wt[0],In=Wt[Wt.length-1];"string"!=typeof Xe&&"string"!=typeof In&&(u?In.focus():Xe.focus())}else Xe.focus()};u.addEventListener("focusin",contain),u.addEventListener("keydown",loopFocus,!0);const Xe=setInterval((()=>{u.activeElement&&"BODY"===u.activeElement.tagName&&contain()}),50);return()=>{clearInterval(Xe),u.removeEventListener("focusin",contain),u.removeEventListener("keydown",loopFocus,!0)}}),[Wt,In,fr,wr,Ar,_r]);const handleFocusSentinel=u=>{null===oo.current&&(oo.current=u.relatedTarget),so.current=!0};return(0,Fp.jsxs)(dp.Fragment,{children:[(0,Fp.jsx)("div",{tabIndex:Ar?0:-1,onFocus:handleFocusSentinel,ref:no,"data-testid":"sentinelStart"}),dp.cloneElement(Xe,{ref:ho,onFocus:u=>{null===oo.current&&(oo.current=u.relatedTarget),so.current=!0,ao.current=u.target;const Wt=Xe.props.onFocus;Wt&&Wt(u)}}),(0,Fp.jsx)("div",{tabIndex:Ar?0:-1,onFocus:handleFocusSentinel,ref:io,"data-testid":"sentinelEnd"})]})};const ST=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],kT={entering:{opacity:1},entered:{opacity:1}},AT=dp.forwardRef((function Fade(u,Xe){const Wt=styles_useTheme_useTheme(),In={enter:Wt.transitions.duration.enteringScreen,exit:Wt.transitions.duration.leavingScreen},{addEndListener:fr,appear:_r=!0,children:wr,easing:Ar,in:Kr,onEnter:no,onEntered:io,onEntering:oo,onExit:ao,onExited:so,onExiting:co,style:ho,timeout:go=In,TransitionComponent:xo=_m}=u,ko=(0,yp.A)(u,ST),Co=dp.useRef(null),Io=(0,Xp.A)(Co,wr.ref,Xe),normalizedTransitionCallback=u=>Xe=>{if(u){const Wt=Co.current;void 0===Xe?u(Wt):u(Wt,Xe)}},zo=normalizedTransitionCallback(oo),Bo=normalizedTransitionCallback(((u,Xe)=>{reflow(u);const In=getTransitionProps({style:ho,timeout:go,easing:Ar},{mode:"enter"});u.style.webkitTransition=Wt.transitions.create("opacity",In),u.style.transition=Wt.transitions.create("opacity",In),no&&no(u,Xe)})),ca=normalizedTransitionCallback(io),ua=normalizedTransitionCallback(co),Da=normalizedTransitionCallback((u=>{const Xe=getTransitionProps({style:ho,timeout:go,easing:Ar},{mode:"exit"});u.style.webkitTransition=Wt.transitions.create("opacity",Xe),u.style.transition=Wt.transitions.create("opacity",Xe),ao&&ao(u)})),ns=normalizedTransitionCallback(so);return(0,Fp.jsx)(xo,(0,_p.A)({appear:_r,in:Kr,nodeRef:Co,onEnter:Bo,onEntered:ca,onEntering:zo,onExit:Da,onExited:ns,onExiting:ua,addEndListener:u=>{fr&&fr(Co.current,u)},timeout:go},ko,{children:(u,Xe)=>dp.cloneElement(wr,(0,_p.A)({style:(0,_p.A)({opacity:0,visibility:"exited"!==u||Kr?void 0:"hidden"},kT[u],ho,wr.props.style),ref:Io},Xe))}))}));var TT=AT;function getBackdropUtilityClass(u){return(0,bp.Ay)("MuiBackdrop",u)}(0,uf.A)("MuiBackdrop",["root","invisible"]);const CT=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],ET=(0,Up.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.invisible&&Xe.invisible]}})((({ownerState:u})=>(0,_p.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"},u.invisible&&{backgroundColor:"transparent"})));var PT=dp.forwardRef((function Backdrop(u,Xe){var Wt,In,fr;const _r=(0,$p.b)({props:u,name:"MuiBackdrop"}),{children:wr,className:Ar,component:Kr="div",components:no={},componentsProps:io={},invisible:oo=!1,open:ao,slotProps:so={},slots:co={},TransitionComponent:ho=TT,transitionDuration:go}=_r,xo=(0,yp.A)(_r,CT),ko=(0,_p.A)({},_r,{component:Kr,invisible:oo}),Co=(u=>{const{classes:Xe,invisible:Wt}=u,In={root:["root",Wt&&"invisible"]};return(0,xp.A)(In,getBackdropUtilityClass,Xe)})(ko),Io=null!=(Wt=so.root)?Wt:io.root;return(0,Fp.jsx)(ho,(0,_p.A)({in:ao,timeout:go},xo,{children:(0,Fp.jsx)(ET,(0,_p.A)({"aria-hidden":!0},Io,{as:null!=(In=null!=(fr=co.root)?fr:no.Root)?In:Kr,className:(0,vp.A)(Co.root,Ar,null==Io?void 0:Io.className),ownerState:(0,_p.A)({},ko,null==Io?void 0:Io.ownerState),classes:Co,ref:Xe,children:wr}))}))})),IT=__webpack_require__(1547),MT=__webpack_require__(6673);function ariaHidden(u,Xe){Xe?u.setAttribute("aria-hidden","true"):u.removeAttribute("aria-hidden")}function getPaddingRight(u){return parseInt((0,gA.A)(u).getComputedStyle(u).paddingRight,10)||0}function ariaHiddenSiblings(u,Xe,Wt,In,fr){const _r=[Xe,Wt,...In];[].forEach.call(u.children,(u=>{const Xe=-1===_r.indexOf(u),Wt=!function isAriaHiddenForbiddenOnElement(u){const Xe=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(u.tagName),Wt="INPUT"===u.tagName&&"hidden"===u.getAttribute("type");return Xe||Wt}(u);Xe&&Wt&&ariaHidden(u,fr)}))}function findIndexOf(u,Xe){let Wt=-1;return u.some(((u,In)=>!!Xe(u)&&(Wt=In,!0))),Wt}function handleContainer(u,Xe){const Wt=[],In=u.container;if(!Xe.disableScrollLock){if(function isOverflowing(u){const Xe=(0,Cm.A)(u);return Xe.body===u?(0,gA.A)(u).innerWidth>Xe.documentElement.clientWidth:u.scrollHeight>u.clientHeight}(In)){const u=getScrollbarSize((0,Cm.A)(In));Wt.push({value:In.style.paddingRight,property:"padding-right",el:In}),In.style.paddingRight=`${getPaddingRight(In)+u}px`;const Xe=(0,Cm.A)(In).querySelectorAll(".mui-fixed");[].forEach.call(Xe,(Xe=>{Wt.push({value:Xe.style.paddingRight,property:"padding-right",el:Xe}),Xe.style.paddingRight=`${getPaddingRight(Xe)+u}px`}))}let u;if(In.parentNode instanceof DocumentFragment)u=(0,Cm.A)(In).body;else{const Xe=In.parentElement,Wt=(0,gA.A)(In);u="HTML"===(null==Xe?void 0:Xe.nodeName)&&"scroll"===Wt.getComputedStyle(Xe).overflowY?Xe:In}Wt.push({value:u.style.overflow,property:"overflow",el:u},{value:u.style.overflowX,property:"overflow-x",el:u},{value:u.style.overflowY,property:"overflow-y",el:u}),u.style.overflow="hidden"}return()=>{Wt.forEach((({value:u,el:Xe,property:Wt})=>{u?Xe.style.setProperty(Wt,u):Xe.style.removeProperty(Wt)}))}}const RT=new class ModalManager{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(u,Xe){let Wt=this.modals.indexOf(u);if(-1!==Wt)return Wt;Wt=this.modals.length,this.modals.push(u),u.modalRef&&ariaHidden(u.modalRef,!1);const In=function getHiddenSiblings(u){const Xe=[];return[].forEach.call(u.children,(u=>{"true"===u.getAttribute("aria-hidden")&&Xe.push(u)})),Xe}(Xe);ariaHiddenSiblings(Xe,u.mount,u.modalRef,In,!0);const fr=findIndexOf(this.containers,(u=>u.container===Xe));return-1!==fr?(this.containers[fr].modals.push(u),Wt):(this.containers.push({modals:[u],container:Xe,restore:null,hiddenSiblings:In}),Wt)}mount(u,Xe){const Wt=findIndexOf(this.containers,(Xe=>-1!==Xe.modals.indexOf(u))),In=this.containers[Wt];In.restore||(In.restore=handleContainer(In,Xe))}remove(u,Xe=!0){const Wt=this.modals.indexOf(u);if(-1===Wt)return Wt;const In=findIndexOf(this.containers,(Xe=>-1!==Xe.modals.indexOf(u))),fr=this.containers[In];if(fr.modals.splice(fr.modals.indexOf(u),1),this.modals.splice(Wt,1),0===fr.modals.length)fr.restore&&fr.restore(),u.modalRef&&ariaHidden(u.modalRef,Xe),ariaHiddenSiblings(fr.container,u.mount,u.modalRef,fr.hiddenSiblings,!1),this.containers.splice(In,1);else{const u=fr.modals[fr.modals.length-1];u.modalRef&&ariaHidden(u.modalRef,!1)}return Wt}isTopModal(u){return this.modals.length>0&&this.modals[this.modals.length-1]===u}};var zT=function useModal(u){const{container:Xe,disableEscapeKeyDown:Wt=!1,disableScrollLock:In=!1,manager:fr=RT,closeAfterTransition:_r=!1,onTransitionEnter:wr,onTransitionExited:Ar,children:Kr,onClose:no,open:io,rootRef:oo}=u,ao=dp.useRef({}),so=dp.useRef(null),co=dp.useRef(null),ho=(0,Am.A)(co,oo),[go,xo]=dp.useState(!io),ko=function getHasTransition(u){return!!u&&u.props.hasOwnProperty("in")}(Kr);let Co=!0;"false"!==u["aria-hidden"]&&!1!==u["aria-hidden"]||(Co=!1);const getModal=()=>(ao.current.modalRef=co.current,ao.current.mount=so.current,ao.current),handleMounted=()=>{fr.mount(getModal(),{disableScrollLock:In}),co.current&&(co.current.scrollTop=0)},Io=(0,IT.A)((()=>{const u=function useModal_getContainer(u){return"function"==typeof u?u():u}(Xe)||(0,Cm.A)(so.current).body;fr.add(getModal(),u),co.current&&handleMounted()})),zo=dp.useCallback((()=>fr.isTopModal(getModal())),[fr]),Bo=(0,IT.A)((u=>{so.current=u,u&&(io&&zo()?handleMounted():co.current&&ariaHidden(co.current,Co))})),ca=dp.useCallback((()=>{fr.remove(getModal(),Co)}),[Co,fr]);dp.useEffect((()=>()=>{ca()}),[ca]),dp.useEffect((()=>{io?Io():ko&&_r||ca()}),[io,ca,ko,_r,Io]);const createHandleKeyDown=u=>Xe=>{var In;null==(In=u.onKeyDown)||In.call(u,Xe),"Escape"===Xe.key&&229!==Xe.which&&zo()&&(Wt||(Xe.stopPropagation(),no&&no(Xe,"escapeKeyDown")))},createHandleBackdropClick=u=>Xe=>{var Wt;null==(Wt=u.onClick)||Wt.call(u,Xe),Xe.target===Xe.currentTarget&&no&&no(Xe,"backdropClick")};return{getRootProps:(Xe={})=>{const Wt=ng(u);delete Wt.onTransitionEnter,delete Wt.onTransitionExited;const In=(0,_p.A)({},Wt,Xe);return(0,_p.A)({role:"presentation"},In,{onKeyDown:createHandleKeyDown(In),ref:ho})},getBackdropProps:(u={})=>{const Xe=u;return(0,_p.A)({"aria-hidden":!0},Xe,{onClick:createHandleBackdropClick(Xe),open:io})},getTransitionProps:()=>({onEnter:(0,MT.A)((()=>{xo(!1),wr&&wr()}),null==Kr?void 0:Kr.props.onEnter),onExited:(0,MT.A)((()=>{xo(!0),Ar&&Ar(),_r&&ca()}),null==Kr?void 0:Kr.props.onExited)}),rootRef:ho,portalRef:Bo,isTopModal:zo,exited:go,hasTransition:ko}};function getModalUtilityClass(u){return(0,bp.Ay)("MuiModal",u)}(0,uf.A)("MuiModal",["root","hidden","backdrop"]);const OT=["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"],LT=(0,Up.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,!Wt.open&&Wt.exited&&Xe.hidden]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({position:"fixed",zIndex:(u.vars||u).zIndex.modal,right:0,bottom:0,top:0,left:0},!Xe.open&&Xe.exited&&{visibility:"hidden"}))),DT=(0,Up.Ay)(PT,{name:"MuiModal",slot:"Backdrop",overridesResolver:(u,Xe)=>Xe.backdrop})({zIndex:-1}),FT=dp.forwardRef((function Modal(u,Xe){var Wt,In,fr,_r,wr,Ar;const Kr=(0,$p.b)({name:"MuiModal",props:u}),{BackdropComponent:no=DT,BackdropProps:io,className:oo,closeAfterTransition:ao=!1,children:so,container:co,component:ho,components:go={},componentsProps:xo={},disableAutoFocus:ko=!1,disableEnforceFocus:Co=!1,disableEscapeKeyDown:Io=!1,disablePortal:zo=!1,disableRestoreFocus:Bo=!1,disableScrollLock:ca=!1,hideBackdrop:ua=!1,keepMounted:Da=!1,onBackdropClick:ns,open:yl,slotProps:vl,slots:kl}=Kr,Al=(0,yp.A)(Kr,OT),Ml=(0,_p.A)({},Kr,{closeAfterTransition:ao,disableAutoFocus:ko,disableEnforceFocus:Co,disableEscapeKeyDown:Io,disablePortal:zo,disableRestoreFocus:Bo,disableScrollLock:ca,hideBackdrop:ua,keepMounted:Da}),{getRootProps:Rl,getBackdropProps:Ol,getTransitionProps:Ll,portalRef:Dl,isTopModal:Bl,exited:Nl,hasTransition:Vl}=zT((0,_p.A)({},Ml,{rootRef:Xe})),Ul=(0,_p.A)({},Ml,{exited:Nl}),$l=(u=>{const{open:Xe,exited:Wt,classes:In}=u,fr={root:["root",!Xe&&Wt&&"hidden"],backdrop:["backdrop"]};return(0,xp.A)(fr,getModalUtilityClass,In)})(Ul),Wl={};if(void 0===so.props.tabIndex&&(Wl.tabIndex="-1"),Vl){const{onEnter:u,onExited:Xe}=Ll();Wl.onEnter=u,Wl.onExited=Xe}const Zl=null!=(Wt=null!=(In=null==kl?void 0:kl.root)?In:go.Root)?Wt:LT,Gl=null!=(fr=null!=(_r=null==kl?void 0:kl.backdrop)?_r:go.Backdrop)?fr:no,Xl=null!=(wr=null==vl?void 0:vl.root)?wr:xo.root,Jl=null!=(Ar=null==vl?void 0:vl.backdrop)?Ar:xo.backdrop,Ql=pg({elementType:Zl,externalSlotProps:Xl,externalForwardedProps:Al,getSlotProps:Rl,additionalProps:{ref:Xe,as:ho},ownerState:Ul,className:(0,vp.A)(oo,null==Xl?void 0:Xl.className,null==$l?void 0:$l.root,!Ul.open&&Ul.exited&&(null==$l?void 0:$l.hidden))}),rc=pg({elementType:Gl,externalSlotProps:Jl,additionalProps:io,getSlotProps:u=>Ol((0,_p.A)({},u,{onClick:Xe=>{ns&&ns(Xe),null!=u&&u.onClick&&u.onClick(Xe)}})),className:(0,vp.A)(null==Jl?void 0:Jl.className,null==io?void 0:io.className,null==$l?void 0:$l.backdrop),ownerState:Ul});return Da||yl||Vl&&!Nl?(0,Fp.jsx)(mg,{ref:Dl,container:co,disablePortal:zo,children:(0,Fp.jsxs)(Zl,(0,_p.A)({},Ql,{children:[!ua&&no?(0,Fp.jsx)(Gl,(0,_p.A)({},rc)):null,(0,Fp.jsx)(wT,{disableEnforceFocus:Co,disableAutoFocus:ko,disableRestoreFocus:Bo,isEnabled:Bl,open:yl,children:dp.cloneElement(so,Wl)})]}))}):null}));var BT=FT;function getPopoverUtilityClass(u){return(0,bp.Ay)("MuiPopover",u)}(0,uf.A)("MuiPopover",["root","paper"]);const jT=["onEntering"],NT=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],VT=["slotProps"];function getOffsetTop(u,Xe){let Wt=0;return"number"==typeof Xe?Wt=Xe:"center"===Xe?Wt=u.height/2:"bottom"===Xe&&(Wt=u.height),Wt}function getOffsetLeft(u,Xe){let Wt=0;return"number"==typeof Xe?Wt=Xe:"center"===Xe?Wt=u.width/2:"right"===Xe&&(Wt=u.width),Wt}function getTransformOriginValue(u){return[u.horizontal,u.vertical].map((u=>"number"==typeof u?`${u}px`:u)).join(" ")}function Popover_resolveAnchorEl(u){return"function"==typeof u?u():u}const UT=(0,Up.Ay)(BT,{name:"MuiPopover",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})({}),$T=(0,Up.Ay)(ax,{name:"MuiPopover",slot:"Paper",overridesResolver:(u,Xe)=>Xe.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),WT=dp.forwardRef((function Popover(u,Xe){var Wt,In,fr;const _r=(0,$p.b)({props:u,name:"MuiPopover"}),{action:wr,anchorEl:Ar,anchorOrigin:Kr={vertical:"top",horizontal:"left"},anchorPosition:no,anchorReference:io="anchorEl",children:oo,className:ao,container:so,elevation:co=8,marginThreshold:ho=16,open:go,PaperProps:xo={},slots:ko,slotProps:Co,transformOrigin:Io={vertical:"top",horizontal:"left"},TransitionComponent:zo=Sm,transitionDuration:Bo="auto",TransitionProps:{onEntering:ca}={},disableScrollLock:ua=!1}=_r,Da=(0,yp.A)(_r.TransitionProps,jT),ns=(0,yp.A)(_r,NT),yl=null!=(Wt=null==Co?void 0:Co.paper)?Wt:xo,vl=dp.useRef(),kl=(0,Xp.A)(vl,yl.ref),Al=(0,_p.A)({},_r,{anchorOrigin:Kr,anchorReference:io,elevation:co,marginThreshold:ho,externalPaperSlotProps:yl,transformOrigin:Io,TransitionComponent:zo,transitionDuration:Bo,TransitionProps:Da}),Ml=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"],paper:["paper"]},getPopoverUtilityClass,Xe)})(Al),Rl=dp.useCallback((()=>{if("anchorPosition"===io)return no;const u=Popover_resolveAnchorEl(Ar),Xe=(u&&1===u.nodeType?u:(0,dT.A)(vl.current).body).getBoundingClientRect();return{top:Xe.top+getOffsetTop(Xe,Kr.vertical),left:Xe.left+getOffsetLeft(Xe,Kr.horizontal)}}),[Ar,Kr.horizontal,Kr.vertical,no,io]),Ol=dp.useCallback((u=>({vertical:getOffsetTop(u,Io.vertical),horizontal:getOffsetLeft(u,Io.horizontal)})),[Io.horizontal,Io.vertical]),Ll=dp.useCallback((u=>{const Xe={width:u.offsetWidth,height:u.offsetHeight},Wt=Ol(Xe);if("none"===io)return{top:null,left:null,transformOrigin:getTransformOriginValue(Wt)};const In=Rl();let fr=In.top-Wt.vertical,_r=In.left-Wt.horizontal;const wr=fr+Xe.height,Kr=_r+Xe.width,no=(0,bT.A)(Popover_resolveAnchorEl(Ar)),oo=no.innerHeight-ho,ao=no.innerWidth-ho;if(null!==ho&&fr<ho){const u=fr-ho;fr-=u,Wt.vertical+=u}else if(null!==ho&&wr>oo){const u=wr-oo;fr-=u,Wt.vertical+=u}if(null!==ho&&_r<ho){const u=_r-ho;_r-=u,Wt.horizontal+=u}else if(Kr>ao){const u=Kr-ao;_r-=u,Wt.horizontal+=u}return{top:`${Math.round(fr)}px`,left:`${Math.round(_r)}px`,transformOrigin:getTransformOriginValue(Wt)}}),[Ar,io,Rl,Ol,ho]),[Dl,Bl]=dp.useState(go),Nl=dp.useCallback((()=>{const u=vl.current;if(!u)return;const Xe=Ll(u);null!==Xe.top&&(u.style.top=Xe.top),null!==Xe.left&&(u.style.left=Xe.left),u.style.transformOrigin=Xe.transformOrigin,Bl(!0)}),[Ll]);dp.useEffect((()=>(ua&&window.addEventListener("scroll",Nl),()=>window.removeEventListener("scroll",Nl))),[Ar,ua,Nl]);dp.useEffect((()=>{go&&Nl()})),dp.useImperativeHandle(wr,(()=>go?{updatePosition:()=>{Nl()}}:null),[go,Nl]),dp.useEffect((()=>{if(!go)return;const u=(0,vT.A)((()=>{Nl()})),Xe=(0,bT.A)(Ar);return Xe.addEventListener("resize",u),()=>{u.clear(),Xe.removeEventListener("resize",u)}}),[Ar,go,Nl]);let Vl=Bo;"auto"!==Bo||zo.muiSupportAuto||(Vl=void 0);const Ul=so||(Ar?(0,dT.A)(Popover_resolveAnchorEl(Ar)).body:void 0),$l=null!=(In=null==ko?void 0:ko.root)?In:UT,Wl=null!=(fr=null==ko?void 0:ko.paper)?fr:$T,Zl=pg({elementType:Wl,externalSlotProps:(0,_p.A)({},yl,{style:Dl?yl.style:(0,_p.A)({},yl.style,{opacity:0})}),additionalProps:{elevation:co,ref:kl},ownerState:Al,className:(0,vp.A)(Ml.paper,null==yl?void 0:yl.className)}),Gl=pg({elementType:$l,externalSlotProps:(null==Co?void 0:Co.root)||{},externalForwardedProps:ns,additionalProps:{ref:Xe,slotProps:{backdrop:{invisible:!0}},container:Ul,open:go},ownerState:Al,className:(0,vp.A)(Ml.root,ao)}),{slotProps:Xl}=Gl,Jl=(0,yp.A)(Gl,VT);return(0,Fp.jsx)($l,(0,_p.A)({},Jl,!am($l)&&{slotProps:Xl,disableScrollLock:ua},{children:(0,Fp.jsx)(zo,(0,_p.A)({appear:!0,in:go,onEntering:(u,Xe)=>{ca&&ca(u,Xe),Nl()},onExited:()=>{Bl(!1)},timeout:Vl},Da,{children:(0,Fp.jsx)(Wl,(0,_p.A)({},Zl,{children:oo}))}))}))}));var qT=WT;function getMenuUtilityClass(u){return(0,bp.Ay)("MuiMenu",u)}(0,uf.A)("MuiMenu",["root","paper","list"]);const ZT=["onEntering"],HT=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],GT={vertical:"top",horizontal:"right"},KT={vertical:"top",horizontal:"left"},XT=(0,Up.Ay)(qT,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiMenu",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})({}),YT=(0,Up.Ay)($T,{name:"MuiMenu",slot:"Paper",overridesResolver:(u,Xe)=>Xe.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),JT=(0,Up.Ay)(_T,{name:"MuiMenu",slot:"List",overridesResolver:(u,Xe)=>Xe.list})({outline:0});var QT=dp.forwardRef((function Menu(u,Xe){var Wt,In;const fr=(0,$p.b)({props:u,name:"MuiMenu"}),{autoFocus:_r=!0,children:wr,className:Ar,disableAutoFocusItem:Kr=!1,MenuListProps:no={},onClose:io,open:oo,PaperProps:ao={},PopoverClasses:so,transitionDuration:co="auto",TransitionProps:{onEntering:ho}={},variant:go="selectedMenu",slots:xo={},slotProps:ko={}}=fr,Co=(0,yp.A)(fr.TransitionProps,ZT),Io=(0,yp.A)(fr,HT),zo=useRtl(),Bo=(0,_p.A)({},fr,{autoFocus:_r,disableAutoFocusItem:Kr,MenuListProps:no,onEntering:ho,PaperProps:ao,transitionDuration:co,TransitionProps:Co,variant:go}),ca=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,Xe)})(Bo),ua=_r&&!Kr&&oo,Da=dp.useRef(null);let ns=-1;dp.Children.map(wr,((u,Xe)=>{dp.isValidElement(u)&&(u.props.disabled||("selectedMenu"===go&&u.props.selected||-1===ns)&&(ns=Xe))}));const yl=null!=(Wt=xo.paper)?Wt:YT,vl=null!=(In=ko.paper)?In:ao,kl=pg({elementType:xo.root,externalSlotProps:ko.root,ownerState:Bo,className:[ca.root,Ar]}),Al=pg({elementType:yl,externalSlotProps:vl,ownerState:Bo,className:ca.paper});return(0,Fp.jsx)(XT,(0,_p.A)({onClose:io,anchorOrigin:{vertical:"bottom",horizontal:zo?"right":"left"},transformOrigin:zo?GT:KT,slots:{paper:yl,root:xo.root},slotProps:{root:kl,paper:Al},open:oo,ref:Xe,transitionDuration:co,TransitionProps:(0,_p.A)({onEntering:(u,Xe)=>{Da.current&&Da.current.adjustStyleForScrollbar(u,{direction:zo?"rtl":"ltr"}),ho&&ho(u,Xe)}},Co),ownerState:Bo},Io,{classes:so,children:(0,Fp.jsx)(JT,(0,_p.A)({onKeyDown:u=>{"Tab"===u.key&&(u.preventDefault(),io&&io(u,"tabKeyDown"))},actions:Da,autoFocus:_r&&(-1===ns||Kr),autoFocusItem:ua,variant:go},no,{className:(0,vp.A)(ca.list,no.className),children:wr}))}))}));function getNativeSelectUtilityClasses(u){return(0,bp.Ay)("MuiNativeSelect",u)}var eC=(0,uf.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);const tC=["className","disabled","error","IconComponent","inputRef","variant"],nativeSelectSelectStyles=({ownerState:u,theme:Xe})=>(0,_p.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,_p.A)({},Xe.vars?{backgroundColor:`rgba(${Xe.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===Xe.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${eC.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(Xe.vars||Xe).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===u.variant&&{"&&&":{paddingRight:32}},"outlined"===u.variant&&{borderRadius:(Xe.vars||Xe).shape.borderRadius,"&:focus":{borderRadius:(Xe.vars||Xe).shape.borderRadius},"&&&":{paddingRight:32}}),nC=(0,Up.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Hp.A,overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.select,Xe[Wt.variant],Wt.error&&Xe.error,{[`&.${eC.multiple}`]:Xe.multiple}]}})(nativeSelectSelectStyles),nativeSelectIconStyles=({ownerState:u,theme:Xe})=>(0,_p.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(Xe.vars||Xe).palette.action.active,[`&.${eC.disabled}`]:{color:(Xe.vars||Xe).palette.action.disabled}},u.open&&{transform:"rotate(180deg)"},"filled"===u.variant&&{right:7},"outlined"===u.variant&&{right:7}),rC=(0,Up.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.icon,Wt.variant&&Xe[`icon${(0,Vp.A)(Wt.variant)}`],Wt.open&&Xe.iconOpen]}})(nativeSelectIconStyles),iC=dp.forwardRef((function NativeSelectInput(u,Xe){const{className:Wt,disabled:In,error:fr,IconComponent:_r,inputRef:wr,variant:Ar="standard"}=u,Kr=(0,yp.A)(u,tC),no=(0,_p.A)({},u,{disabled:In,variant:Ar,error:fr}),io=(u=>{const{classes:Xe,variant:Wt,disabled:In,multiple:fr,open:_r,error:wr}=u,Ar={select:["select",Wt,In&&"disabled",fr&&"multiple",wr&&"error"],icon:["icon",`icon${(0,Vp.A)(Wt)}`,_r&&"iconOpen",In&&"disabled"]};return(0,xp.A)(Ar,getNativeSelectUtilityClasses,Xe)})(no);return(0,Fp.jsxs)(dp.Fragment,{children:[(0,Fp.jsx)(nC,(0,_p.A)({ownerState:no,className:(0,vp.A)(io.select,Wt),disabled:In,ref:wr||Xe},Kr)),u.multiple?null:(0,Fp.jsx)(rC,{as:_r,ownerState:no,className:io.icon})]})}));var oC=iC,aC=__webpack_require__(4438);function getSelectUtilityClasses(u){return(0,bp.Ay)("MuiSelect",u)}var sC,lC=(0,uf.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);const cC=["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"],uC=(0,Up.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[{[`&.${lC.select}`]:Xe.select},{[`&.${lC.select}`]:Xe[Wt.variant]},{[`&.${lC.error}`]:Xe.error},{[`&.${lC.multiple}`]:Xe.multiple}]}})(nativeSelectSelectStyles,{[`&.${lC.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),dC=(0,Up.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.icon,Wt.variant&&Xe[`icon${(0,Vp.A)(Wt.variant)}`],Wt.open&&Xe.iconOpen]}})(nativeSelectIconStyles),hC=(0,Up.Ay)("input",{shouldForwardProp:u=>(0,aC.A)(u)&&"classes"!==u,name:"MuiSelect",slot:"NativeInput",overridesResolver:(u,Xe)=>Xe.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function SelectInput_areEqualValues(u,Xe){return"object"==typeof Xe&&null!==Xe?u===Xe:String(u)===String(Xe)}function SelectInput_isEmpty(u){return null==u||"string"==typeof u&&!u.trim()}const pC=dp.forwardRef((function SelectInput(u,Xe){var Wt;const{"aria-describedby":In,"aria-label":fr,autoFocus:_r,autoWidth:wr,children:Ar,className:Kr,defaultOpen:no,defaultValue:io,disabled:oo,displayEmpty:ao,error:so=!1,IconComponent:co,inputRef:ho,labelId:go,MenuProps:xo={},multiple:ko,name:Co,onBlur:Io,onChange:zo,onClose:Bo,onFocus:ca,onOpen:ua,open:Da,readOnly:ns,renderValue:yl,SelectDisplayProps:vl={},tabIndex:kl,value:Al,variant:Ml="standard"}=u,Rl=(0,yp.A)(u,cC),[Ol,Ll]=(0,Gp.A)({controlled:Al,default:io,name:"Select"}),[Dl,Bl]=(0,Gp.A)({controlled:Da,default:no,name:"Select"}),Nl=dp.useRef(null),Vl=dp.useRef(null),[Ul,$l]=dp.useState(null),{current:Wl}=dp.useRef(null!=Da),[Zl,Gl]=dp.useState(),Xl=(0,Xp.A)(Xe,ho),Jl=dp.useCallback((u=>{Vl.current=u,u&&$l(u)}),[]),Ql=null==Ul?void 0:Ul.parentNode;dp.useImperativeHandle(Xl,(()=>({focus:()=>{Vl.current.focus()},node:Nl.current,value:Ol})),[Ol]),dp.useEffect((()=>{no&&Dl&&Ul&&!Wl&&(Gl(wr?null:Ql.clientWidth),Vl.current.focus())}),[Ul,wr]),dp.useEffect((()=>{_r&&Vl.current.focus()}),[_r]),dp.useEffect((()=>{if(!go)return;const u=(0,dT.A)(Vl.current).getElementById(go);if(u){const handler=()=>{getSelection().isCollapsed&&Vl.current.focus()};return u.addEventListener("click",handler),()=>{u.removeEventListener("click",handler)}}}),[go]);const update=(u,Xe)=>{u?ua&&ua(Xe):Bo&&Bo(Xe),Wl||(Gl(wr?null:Ql.clientWidth),Bl(u))},rc=dp.Children.toArray(Ar),handleItemClick=u=>Xe=>{let Wt;if(Xe.currentTarget.hasAttribute("tabindex")){if(ko){Wt=Array.isArray(Ol)?Ol.slice():[];const Xe=Ol.indexOf(u.props.value);-1===Xe?Wt.push(u.props.value):Wt.splice(Xe,1)}else Wt=u.props.value;if(u.props.onClick&&u.props.onClick(Xe),Ol!==Wt&&(Ll(Wt),zo)){const In=Xe.nativeEvent||Xe,fr=new In.constructor(In.type,In);Object.defineProperty(fr,"target",{writable:!0,value:{value:Wt,name:Co}}),zo(fr,u)}ko||update(!1,Xe)}},ic=null!==Ul&&Dl;let oc,lc;delete Rl["aria-invalid"];const gc=[];let bc=!1,eu=!1;(isFilled({value:Ol})||ao)&&(yl?oc=yl(Ol):bc=!0);const tu=rc.map((u=>{if(!dp.isValidElement(u))return null;let Xe;if(ko){if(!Array.isArray(Ol))throw new Error((0,mA.A)(2));Xe=Ol.some((Xe=>SelectInput_areEqualValues(Xe,u.props.value))),Xe&&bc&&gc.push(u.props.children)}else Xe=SelectInput_areEqualValues(Ol,u.props.value),Xe&&bc&&(lc=u.props.children);return Xe&&(eu=!0),dp.cloneElement(u,{"aria-selected":Xe?"true":"false",onClick:handleItemClick(u),onKeyUp:Xe=>{" "===Xe.key&&Xe.preventDefault(),u.props.onKeyUp&&u.props.onKeyUp(Xe)},role:"option",selected:Xe,value:void 0,"data-value":u.props.value})}));bc&&(oc=ko?0===gc.length?null:gc.reduce(((u,Xe,Wt)=>(u.push(Xe),Wt<gc.length-1&&u.push(", "),u)),[]):lc);let nu,iu=Zl;!wr&&Wl&&Ul&&(iu=Ql.clientWidth),nu=void 0!==kl?kl:oo?null:0;const su=vl.id||(Co?`mui-component-select-${Co}`:void 0),cu=(0,_p.A)({},u,{variant:Ml,value:Ol,open:ic,error:so}),uu=(u=>{const{classes:Xe,variant:Wt,disabled:In,multiple:fr,open:_r,error:wr}=u,Ar={select:["select",Wt,In&&"disabled",fr&&"multiple",wr&&"error"],icon:["icon",`icon${(0,Vp.A)(Wt)}`,_r&&"iconOpen",In&&"disabled"],nativeInput:["nativeInput"]};return(0,xp.A)(Ar,getSelectUtilityClasses,Xe)})(cu),hu=(0,_p.A)({},xo.PaperProps,null==(Wt=xo.slotProps)?void 0:Wt.paper),Iu=(0,fA.A)();return(0,Fp.jsxs)(dp.Fragment,{children:[(0,Fp.jsx)(uC,(0,_p.A)({ref:Jl,tabIndex:nu,role:"combobox","aria-controls":Iu,"aria-disabled":oo?"true":void 0,"aria-expanded":ic?"true":"false","aria-haspopup":"listbox","aria-label":fr,"aria-labelledby":[go,su].filter(Boolean).join(" ")||void 0,"aria-describedby":In,onKeyDown:u=>{if(!ns){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(u.key)&&(u.preventDefault(),update(!0,u))}},onMouseDown:oo||ns?null:u=>{0===u.button&&(u.preventDefault(),Vl.current.focus(),update(!0,u))},onBlur:u=>{!ic&&Io&&(Object.defineProperty(u,"target",{writable:!0,value:{value:Ol,name:Co}}),Io(u))},onFocus:ca},vl,{ownerState:cu,className:(0,vp.A)(vl.className,uu.select,Kr),id:su,children:SelectInput_isEmpty(oc)?sC||(sC=(0,Fp.jsx)("span",{className:"notranslate",children:"​"})):oc})),(0,Fp.jsx)(hC,(0,_p.A)({"aria-invalid":so,value:Array.isArray(Ol)?Ol.join(","):Ol,name:Co,ref:Nl,"aria-hidden":!0,onChange:u=>{const Xe=rc.find((Xe=>Xe.props.value===u.target.value));void 0!==Xe&&(Ll(Xe.props.value),zo&&zo(u,Xe))},tabIndex:-1,disabled:oo,className:uu.nativeInput,autoFocus:_r,ownerState:cu},Rl)),(0,Fp.jsx)(dC,{as:co,className:uu.icon,ownerState:cu}),(0,Fp.jsx)(QT,(0,_p.A)({id:`menu-${Co||""}`,anchorEl:Ql,open:ic,onClose:u=>{update(!1,u)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},xo,{MenuListProps:(0,_p.A)({"aria-labelledby":go,role:"listbox","aria-multiselectable":ko?"true":void 0,disableListWrap:!0,id:Iu},xo.MenuListProps),slotProps:(0,_p.A)({},xo.slotProps,{paper:(0,_p.A)({},hu,{style:(0,_p.A)({minWidth:iu},null!=hu?hu.style:null)})}),children:tu}))]})}));var fC=pC,mC=(0,zw.A)((0,Fp.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const gC=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],yC=["root"],_C={name:"MuiSelect",overridesResolver:(u,Xe)=>Xe.root,shouldForwardProp:u=>(0,Hp.A)(u)&&"variant"!==u,slot:"Root"},vC=(0,Up.Ay)(BA,_C)(""),bC=(0,Up.Ay)(tT,_C)(""),xC=(0,Up.Ay)(qA,_C)(""),wC=dp.forwardRef((function Select(u,Xe){const Wt=(0,$p.b)({name:"MuiSelect",props:u}),{autoWidth:In=!1,children:fr,classes:_r={},className:wr,defaultOpen:Ar=!1,displayEmpty:Kr=!1,IconComponent:no=mC,id:io,input:oo,inputProps:ao,label:so,labelId:co,MenuProps:ho,multiple:go=!1,native:xo=!1,onClose:ko,onOpen:Co,open:Io,renderValue:zo,SelectDisplayProps:Bo,variant:ca="outlined"}=Wt,ua=(0,yp.A)(Wt,gC),Da=xo?oC:fC,ns=formControlState({props:Wt,muiFormControl:useFormControl(),states:["variant","error"]}),yl=ns.variant||ca,vl=(0,_p.A)({},Wt,{variant:yl,classes:_r}),kl=(u=>{const{classes:Xe}=u;return Xe})(vl),Al=(0,yp.A)(kl,yC),Ml=oo||{standard:(0,Fp.jsx)(vC,{ownerState:vl}),outlined:(0,Fp.jsx)(bC,{label:so,ownerState:vl}),filled:(0,Fp.jsx)(xC,{ownerState:vl})}[yl],Rl=(0,Xp.A)(Xe,Ml.ref);return(0,Fp.jsx)(dp.Fragment,{children:dp.cloneElement(Ml,(0,_p.A)({inputComponent:Da,inputProps:(0,_p.A)({children:fr,error:ns.error,IconComponent:no,variant:yl,type:void 0,multiple:go},xo?{id:io}:{autoWidth:In,defaultOpen:Ar,displayEmpty:Kr,labelId:co,MenuProps:ho,onClose:ko,onOpen:Co,open:Io,renderValue:zo,SelectDisplayProps:(0,_p.A)({id:io},Bo)},ao,{classes:ao?(0,Pp.A)(Al,ao.classes):Al},oo?oo.props.inputProps:{})},(go&&xo||Kr)&&"outlined"===yl?{notched:!0}:{},{ref:Rl,className:(0,vp.A)(Ml.props.className,wr,kl.root)},!oo&&{variant:yl},ua))})}));wC.muiName="Select";var SC=wC;function getTextFieldUtilityClass(u){return(0,bp.Ay)("MuiTextField",u)}(0,uf.A)("MuiTextField",["root"]);const kC=["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"],AC={standard:BA,filled:qA,outlined:tT},TC=(0,Up.Ay)(iS,{name:"MuiTextField",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})({}),CC=dp.forwardRef((function TextField(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiTextField"}),{autoComplete:In,autoFocus:fr=!1,children:_r,className:wr,color:Ar="primary",defaultValue:Kr,disabled:no=!1,error:io=!1,FormHelperTextProps:oo,fullWidth:ao=!1,helperText:so,id:co,InputLabelProps:ho,inputProps:go,InputProps:xo,inputRef:ko,label:Co,maxRows:Io,minRows:zo,multiline:Bo=!1,name:ca,onBlur:ua,onChange:Da,onFocus:ns,placeholder:yl,required:vl=!1,rows:kl,select:Al=!1,SelectProps:Ml,type:Rl,value:Ol,variant:Ll="outlined"}=Wt,Dl=(0,yp.A)(Wt,kC),Bl=(0,_p.A)({},Wt,{autoFocus:fr,color:Ar,disabled:no,error:io,fullWidth:ao,multiline:Bo,required:vl,select:Al,variant:Ll}),Nl=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"]},getTextFieldUtilityClass,Xe)})(Bl);const Vl={};"outlined"===Ll&&(ho&&void 0!==ho.shrink&&(Vl.notched=ho.shrink),Vl.label=Co),Al&&(Ml&&Ml.native||(Vl.id=void 0),Vl["aria-describedby"]=void 0);const Ul=(0,fA.A)(co),$l=so&&Ul?`${Ul}-helper-text`:void 0,Wl=Co&&Ul?`${Ul}-label`:void 0,Zl=AC[Ll],Gl=(0,Fp.jsx)(Zl,(0,_p.A)({"aria-describedby":$l,autoComplete:In,autoFocus:fr,defaultValue:Kr,fullWidth:ao,multiline:Bo,name:ca,rows:kl,maxRows:Io,minRows:zo,type:Rl,value:Ol,id:Ul,inputRef:ko,onBlur:ua,onChange:Da,onFocus:ns,placeholder:yl,inputProps:go},Vl,xo));return(0,Fp.jsxs)(TC,(0,_p.A)({className:(0,vp.A)(Nl.root,wr),disabled:no,error:io,fullWidth:ao,ref:Xe,required:vl,color:Ar,variant:Ll,ownerState:Bl},Dl,{children:[null!=Co&&""!==Co&&(0,Fp.jsx)(iT,(0,_p.A)({htmlFor:Ul,id:Wl},ho,{children:Co})),Al?(0,Fp.jsx)(SC,(0,_p.A)({"aria-describedby":$l,id:Ul,labelId:Wl,value:Ol,input:Gl},Ml,{children:_r})):Gl,so&&(0,Fp.jsx)(uT,(0,_p.A)({id:$l},oo,{children:so}))]}))}));var EC=CC;function getCircularProgressUtilityClass(u){return(0,bp.Ay)("MuiCircularProgress",u)}(0,uf.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const PC=["className","color","disableShrink","size","style","thickness","value","variant"];let IC,MC,RC,zC,CircularProgress_=u=>u;const OC=44,LC=(0,af.i7)(IC||(IC=CircularProgress_`
128
+ 0% {
129
+ transform: rotate(0deg);
130
+ }
131
+
132
+ 100% {
133
+ transform: rotate(360deg);
134
+ }
135
+ `)),DC=(0,af.i7)(MC||(MC=CircularProgress_`
136
+ 0% {
137
+ stroke-dasharray: 1px, 200px;
138
+ stroke-dashoffset: 0;
139
+ }
140
+
141
+ 50% {
142
+ stroke-dasharray: 100px, 200px;
143
+ stroke-dashoffset: -15px;
144
+ }
145
+
146
+ 100% {
147
+ stroke-dasharray: 100px, 200px;
148
+ stroke-dashoffset: -125px;
149
+ }
150
+ `)),FC=(0,Up.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[Wt.variant],Xe[`color${(0,Vp.A)(Wt.color)}`]]}})((({ownerState:u,theme:Xe})=>(0,_p.A)({display:"inline-block"},"determinate"===u.variant&&{transition:Xe.transitions.create("transform")},"inherit"!==u.color&&{color:(Xe.vars||Xe).palette[u.color].main})),(({ownerState:u})=>"indeterminate"===u.variant&&(0,af.AH)(RC||(RC=CircularProgress_`
151
+ animation: ${0} 1.4s linear infinite;
152
+ `),LC))),BC=(0,Up.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(u,Xe)=>Xe.svg})({display:"block"}),jC=(0,Up.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.circle,Xe[`circle${(0,Vp.A)(Wt.variant)}`],Wt.disableShrink&&Xe.circleDisableShrink]}})((({ownerState:u,theme:Xe})=>(0,_p.A)({stroke:"currentColor"},"determinate"===u.variant&&{transition:Xe.transitions.create("stroke-dashoffset")},"indeterminate"===u.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})),(({ownerState:u})=>"indeterminate"===u.variant&&!u.disableShrink&&(0,af.AH)(zC||(zC=CircularProgress_`
153
+ animation: ${0} 1.4s ease-in-out infinite;
154
+ `),DC))),NC=dp.forwardRef((function CircularProgress(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCircularProgress"}),{className:In,color:fr="primary",disableShrink:_r=!1,size:wr=40,style:Ar,thickness:Kr=3.6,value:no=0,variant:io="indeterminate"}=Wt,oo=(0,yp.A)(Wt,PC),ao=(0,_p.A)({},Wt,{color:fr,disableShrink:_r,size:wr,thickness:Kr,value:no,variant:io}),so=(u=>{const{classes:Xe,variant:Wt,color:In,disableShrink:fr}=u,_r={root:["root",Wt,`color${(0,Vp.A)(In)}`],svg:["svg"],circle:["circle",`circle${(0,Vp.A)(Wt)}`,fr&&"circleDisableShrink"]};return(0,xp.A)(_r,getCircularProgressUtilityClass,Xe)})(ao),co={},ho={},go={};if("determinate"===io){const u=2*Math.PI*((OC-Kr)/2);co.strokeDasharray=u.toFixed(3),go["aria-valuenow"]=Math.round(no),co.strokeDashoffset=`${((100-no)/100*u).toFixed(3)}px`,ho.transform="rotate(-90deg)"}return(0,Fp.jsx)(FC,(0,_p.A)({className:(0,vp.A)(so.root,In),style:(0,_p.A)({width:wr,height:wr},ho,Ar),ownerState:ao,ref:Xe,role:"progressbar"},go,oo,{children:(0,Fp.jsx)(BC,{className:so.svg,ownerState:ao,viewBox:"22 22 44 44",children:(0,Fp.jsx)(jC,{className:so.circle,style:co,ownerState:ao,cx:OC,cy:OC,r:(OC-Kr)/2,fill:"none",strokeWidth:Kr})})}))}));var VC=NC;const UC=function JakartoLoginForm(){var u=this;_newArrowCheck(this,undefined);const[Xe,Wt]=(0,dp.useState)(!1),[In,fr]=(0,dp.useState)(""),_r=function useIsMounted(){var u=this;const Xe=(0,dp.useRef)(!1);return(0,dp.useEffect)(function(){var Wt=this;return _newArrowCheck(this,u),Xe.current=!0,function(){_newArrowCheck(this,Wt),Xe.current=!1}.bind(this)}.bind(this)),Xe}(),{register:wr,formState:{errors:Ar},handleSubmit:Kr}=function useForm(u={}){const Xe=dp.useRef(),Wt=dp.useRef(),[In,fr]=dp.useState({isDirty:!1,isValidating:!1,isLoading:index_esm_isFunction(u.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:u.errors||{},disabled:u.disabled||!1,defaultValues:index_esm_isFunction(u.defaultValues)?void 0:u.defaultValues});Xe.current||(Xe.current={...createFormControl(u),formState:In});const _r=Xe.current.control;return _r._options=u,useSubscribe({subject:_r._subjects.state,next:u=>{shouldRenderFormState(u,_r._proxyFormState,_r._updateFormState,!0)&&fr({..._r._formState})}}),dp.useEffect((()=>_r._disableForm(u.disabled)),[_r,u.disabled]),dp.useEffect((()=>{if(_r._proxyFormState.isDirty){const u=_r._getDirty();u!==In.isDirty&&_r._subjects.state.next({isDirty:u})}}),[_r,In.isDirty]),dp.useEffect((()=>{u.values&&!deepEqual(u.values,Wt.current)?(_r._reset(u.values,_r._options.resetOptions),Wt.current=u.values,fr((u=>({...u})))):_r._resetDefaultValues()}),[u.values,_r]),dp.useEffect((()=>{u.errors&&_r._setErrors(u.errors)}),[u.errors,_r]),dp.useEffect((()=>{_r._state.mount||(_r._updateValid(),_r._state.mount=!0),_r._state.watch&&(_r._state.watch=!1,_r._subjects.state.next({..._r._formState})),_r._removeUnmounted()})),dp.useEffect((()=>{u.shouldUnregister&&_r._subjects.values.next({values:_r._getWatch()})}),[u.shouldUnregister,_r]),Xe.current.formState=getProxyFormState(In,_r),Xe.current}({resolver:zod_t(Lv),mode:"onTouched"}),no=function onSubmitHandler(Xe){var In=this;_newArrowCheck(this,u),_r.current&&(Wt(!0),fr("")),cv.login(Xe.email,Xe.password).then(function(){var u=this;_newArrowCheck(this,In),Cw.isAuthenticated().then(function(Xe){_newArrowCheck(this,u),store_getStore().dispatch(viewerActionCreator_setIsAuthenticated(Xe)),_r.current&&(fr(Xe?"":Gx("jakarto.panel.login.error")),Wt(!1))}.bind(this)).catch(function(Xe){_newArrowCheck(this,u),console.error(Xe),_r.current&&(fr(Gx("jakarto.panel.login.error")),Wt(!1))}.bind(this))}.bind(this))}.bind(this);return dp.createElement(Dx,{component:"form",sx:{margin:"1rem"},direction:"column",spacing:2,onSubmit:Kr(no)},dp.createElement(gx,{color:"secondary"},Gx("jakarto.panel.login.title")),dp.createElement(EC,{label:Gx("jakarto.panel.login.user"),variant:"outlined",fullWidth:!0,error:!!Ar.email,helperText:Ar.email&&Ar.email.message?Gx(Ar.email.message):"",...wr("email")}),dp.createElement(EC,{label:Gx("jakarto.panel.login.pass"),variant:"outlined",type:"password",fullWidth:!0,error:!!Ar.password,helperText:Ar.password&&Ar.password.message?Gx(Ar.password.message):"",...wr("password")}),dp.createElement(fy,{color:"primary",variant:"contained",fullWidth:!0,type:"submit",disabled:Xe},Xe&&dp.createElement(VC,{sx:{marginRight:"1rem"},size:25}),Gx("jakarto.panel.login.confirm")),""!==In&&dp.createElement(uT,{error:!0},In))}.bind(void 0);var $C=void 0;const WC=function JakartoPanelFn(u){var Xe=this;_newArrowCheck(this,$C);const{isViewerVisible:Wt,isLoading:In,isAuthenticated:fr,isExtensionEnabled:_r}=u,wr=Wt?"active":"inactive",Ar=Wt?go.pS:xo.k6,Kr=function handleSwitchChange(u){_newArrowCheck(this,Xe),Ew.setExtensionEnableState(u.target.checked)}.bind(this);return In?dp.createElement(sk,{text:Gx("jakarto.panel.loading.message")}):fr?dp.createElement(dp.Fragment,null,dp.createElement(qp,{sx:{marginTop:"1rem",marginBottom:"1rem",display:"flex",justifyContent:"space-between",alignItems:"center"}},dp.createElement("img",{src:"en"===JMap.Language.getLocale()?JMap.Application.UI.Theme.isDark()?jS:NS:JMap.Application.UI.Theme.isDark()?VS:US,width:"60%",height:"60%"}),dp.createElement(im,{onChange:Kr,checked:_r})),_r?dp.createElement(dp.Fragment,null,dp.createElement(qp,{sx:{paddingLeft:0,paddingRight:0,display:"flex",flexShrink:1,justifyContent:"flex-end"}},dp.createElement(oy,{title:Gx(`jakarto.panel.display.tooltip.${wr}`)},dp.createElement("span",null,dp.createElement(fy,{id:"jakarto-viewer-display-button",sx:{cursor:"pointer",height:"1.875rem",marginRight:"1rem",marginBottom:"1rem",whiteSpace:"nowrap","& > span":{fontSize:"0.75rem"},"& svg":{height:"0.8175rem"}},color:Wt?"primary":"secondary",variant:"contained",onClick:function onClick(){_newArrowCheck(this,Xe),In||Cw.toggleIsVisible()}.bind(this),startIcon:dp.createElement(mp,{size:"1x",icon:Ar})},Gx(`jakarto.panel.display.button.${wr}`))))),dp.createElement(qp,{sx:{paddingLeft:"1rem",paddingRight:"1rem",display:"flex",flexDirection:"column",justifyContent:"flex-start","& > p":{fontSize:"1rem",fontWeight:function fontWeight(u){return _newArrowCheck(this,Xe),u.typography.fontWeightRegular}.bind(this),lineHeight:1.5,color:function color(u){return _newArrowCheck(this,Xe),u.palette.text.primary}.bind(this)}}},dp.createElement(BS,null),dp.createElement(vy,{sx:{marginTop:"0.875rem",marginBottom:"1rem"}}),dp.createElement(xk,{parameters:u.parameters}),dp.createElement(vy,{sx:{marginTop:"0.875rem",marginBottom:"1rem"}}))):null):dp.createElement(UC,null)}.bind(void 0),qC=Qb(function(u){return _newArrowCheck(this,$C),{parameters:getExtensionState(u).viewer.parameters,isViewerVisible:getExtensionState(u).viewer.isVisible,isLoading:getExtensionState(u).viewer.isLoading,isAuthenticated:getExtensionState(u).viewer.isAuthenticated,isExtensionEnabled:getExtensionState(u).main.isExtensionEnabled}}.bind(void 0))(WC);var ZC=void 0;const HC=function ExtensionFn(u){return _newArrowCheck(this,ZC),dp.createElement(Xe.a,{theme:u.theme},dp.createElement(qC,null))}.bind(void 0),GC=Qb(function(u){return _newArrowCheck(this,ZC),{theme:getAppState().ui.theme}}.bind(void 0))(HC),KC=function Extension(){return _newArrowCheck(this,ZC),dp.createElement(ex,{store:store_getStore()},dp.createElement(GC,null))}.bind(void 0);const XC=function layerReducer(u,Xe){switch(_newArrowCheck(this,undefined),u||(u=getDefaultLayerState()),Xe.type){case ho.JAKARTO_LAYER_SET_IS_VECTOR_LAYER_VISIBLE:{const{isVectorLayerVisible:Wt}=Xe;return{...u,isVectorLayerVisible:Wt}}case ho.JAKARTO_LAYER_SET_WMTS_LAYER_VISIBILITY:{const{year:Wt,isVisible:In}=Xe,fr=u.allWMTSByYear[Wt];return{...u,allWMTSByYear:{...u.allWMTSByYear,[Wt]:{...fr,isVisible:In}}}}case ho.JAKARTO_LAYER_SET_WMTS_LAYER_EXPANSION:{const{year:Wt,isStyleExpanded:In}=Xe,fr=u.allWMTSByYear[Wt];return{...u,allWMTSByYear:{...u.allWMTSByYear,[Wt]:{...fr,isStyleExpanded:In}}}}case ho.JAKARTO_LAYER_SELECT_WMTS_LAYER_STYLE:{const{year:Wt,selectedStyle:In}=Xe,fr=u.allWMTSByYear[Wt];return{...u,allWMTSByYear:{...u.allWMTSByYear,[Wt]:{...fr,selectedStyle:In}}}}case ho.JAKARTO_LAYER_SET_ZOOM_LEVEL:{const{zoomLevel:Wt}=Xe;return{...u,zoomLevel:Wt}}default:return u}}.bind(void 0);const YC=function viewerReducer(u,Xe){switch(_newArrowCheck(this,undefined),u||(u=getDefaultViewerState()),Xe.type){case ho.JAKARTO_VIEWER_SET_IS_INTERACTOR_ACTIVE:{const{isInteractorActive:Wt}=Xe;return{...u,isInteractorActive:Wt}}case ho.JAKARTO_VIEWER_SET_IS_VISIBLE:{const{isVisible:Wt}=Xe;return{...u,isVisible:Wt}}case ho.JAKARTO_VIEWER_SET_PARAMETERS:{const{parameters:Wt}=Xe;return{...u,parameters:Wt}}case ho.JAKARTO_VIEWER_SET_IS_LOADING:{const{isLoading:Wt}=Xe;return{...u,isLoading:Wt}}case ho.JAKARTO_VIEWER_SET_IS_AUTH:{const{isAuthenticated:Wt}=Xe;return{...u,isAuthenticated:Wt}}default:return u}}.bind(void 0);const JC=function extensionReducer(u,Xe){switch(_newArrowCheck(this,undefined),u||(u=getDefaultExtensionState()),Xe.type){case ho.JAKARTO_RESET_STATE:return getDefaultExtensionState();case ho.JAKARTO_ENABLE_STATE_EXTENSION:{const{isExtensionEnabled:Wt}=Xe;return{...u,main:{...u.main,isExtensionEnabled:Wt}}}default:{const Wt={...u};return Wt.viewer=YC(u.viewer,Xe),Wt.layer=XC(u.layer,Xe),Wt}}}.bind(void 0);var QC=JSON.parse('{"jakarto.title":"Jakartowns","jakarto.icon.tooltip":"Jakartowns","jakarto.activate.tooltip":"Show Jakartowns viewer","jakarto.deactivate.tooltip":"Hide Jakartowns viewer","jakarto.panel.info.longitude":"Longitude","jakarto.panel.info.latitude":"Latitude","jakarto.panel.info.tilt":"Tilt","jakarto.panel.info.fov":"Field of View","jakarto.panel.info.rotation":"Rotation","jakarto.panel.display.tooltip.inactive":"Show Jakarto viewer","jakarto.panel.display.tooltip.active":"Hide Jakarto viewer","jakarto.panel.display.button.inactive":"Show","jakarto.panel.display.button.active":"Hide","jakarto.panel.loading.message":"Loading Jakartowns data","jakarto.panel.login.title":"Login to Jakartowns","jakarto.panel.login.user":"Email","jakarto.panel.login.pass":"Password","jakarto.panel.login.confirm":"Login","jakarto.panel.login.error":"Can\'t login to Jakartowns","jakarto.login.email.min.error":"Email is required","jakarto.login.email.format.error":"Invalid email","jakarto.login.pass.min.error":"Password is required","jakarto.layer.content.header.title":"Jakartowns Layers","jakarto.layer.vector.title":"Coverage","jakarto.layer.raster.title":"Photo ({0})","jakarto.layer.raster.legend.title":"Styles","jakarto.layer.raster.style.default":"Base Style","jakarto.layer.raster.style.intensite.max":"Maximum Intensity","jakarto.layer.raster.style.intensite.max.pts.bas":"Lowest Points\' Maximum Intensity","jakarto.layer.raster.style.pts.bas":"Lowest Points","jakarto.layer.raster.style.verticality":"Verticality","jakarto.layer.raster.all.title":"Photo (most recent)","jakarto.panel.info.date":"Date","jakarto.viewer.button.external.tooltip":"Display current panorama in Jakartowns","jakarto.viewer.button.close.tooltip":"Hide viewer"}'),eE=__webpack_require__.t(QC,2),tE=JSON.parse('{"jakarto.title":"Jakartowns","jakarto.icon.tooltip":"Jakartowns","jakarto.activate.tooltip":"Afficher le visualiseur Jakartowns","jakarto.deactivate.tooltip":"Cacher le visualiseur Jakartowns","jakarto.panel.info.longitude":"Longitude","jakarto.panel.info.latitude":"Latitude","jakarto.panel.info.tilt":"Inclinaison","jakarto.panel.info.fov":"Champ de vision","jakarto.panel.info.rotation":"Rotation","jakarto.panel.display.tooltip.inactive":"Afficher l\'outil Jakarto","jakarto.panel.display.tooltip.active":"Cacher l\'outil Jakarto","jakarto.panel.display.button.inactive":"Afficher","jakarto.panel.display.button.active":"Cacher","jakarto.panel.loading.message":"Chargement des données Jakartowns","jakarto.panel.login.title":"Connexion à Jakartowns","jakarto.panel.login.user":"Courriel","jakarto.panel.login.pass":"Mot de passe","jakarto.panel.login.confirm":"Connexion","jakarto.panel.login.error":"Impossible d\'effectuer la connexion à Jakartowns","jakarto.login.email.min.error":"Courriel requis","jakarto.login.email.format.error":"Courriel invalide","jakarto.login.pass.min.error":"Mot de passe requis","jakarto.layer.content.header.title":"Couches Jakartowns","jakarto.layer.vector.title":"Couverture","jakarto.layer.raster.title":"Photo ({0})","jakarto.layer.raster.legend.title":"Styles","jakarto.layer.raster.style.default":"Style de base","jakarto.layer.raster.style.intensite.max":"Intensité maximale","jakarto.layer.raster.style.intensite.max.pts.bas":"Intensité maximale des points bas","jakarto.layer.raster.style.verticality":"Verticalité","jakarto.layer.raster.style.pts.bas":"Points les plus bas","jakarto.layer.raster.all.title":"Photo (plus récentes)","jakarto.panel.info.date":"Date","jakarto.viewer.button.external.tooltip":"Ouvrir cet emplacement dans Jakartowns","jakarto.viewer.button.close.tooltip":"Cacher le visualiseur"}'),nE=__webpack_require__.t(tE,2);let rE;const iE=function getAppExtension(){var u=this;return{id:fr,serviceToExpose:Pw,startBeforeMapIsReady:!0,isProjectExtension:!0,jmapCloudExtensionUrn:"bf36161f-bd11-4d31-ab7e-38f7d0368d61",storeReducer:JC,translationBundle:{id:fr,translationsByLocale:{en:eE,fr:nE}},panelIcon:'\n <svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="192.000000pt" height="192.000000pt" viewBox="0 0 192.000000 192.000000" preserveAspectRatio="xMidYMid meet">\n <metadata>\n Logo of Jakarto\n </metadata>\n <g transform="translate(0.000000,192.000000) scale(0.100000,-0.100000)"\n stroke="none">\n <path d="M 960 20\n A 940 940 0 1 0 960 1900\n A 940 940 0 1 0 960 20\n Z\n M 960 380\n A 580 580 0 1 1 960 1540\n A 580 580 0 1 1 960 380\n Z" />\n <circle cx="960" cy="960" r="260" />\n </g>\n </svg>',panelTooltip:{bundleId:fr,key:"jakarto.icon.tooltip"},initFn:function initFn(Xe){var Wt=this;_newArrowCheck(this,u),store_getStore().dispatch(viewerActionCreator_setIsLoading(!0)),Cw.isAuthenticated().then(function(u){_newArrowCheck(this,Wt),store_getStore().dispatch(viewerActionCreator_setIsAuthenticated(u)),store_getStore().dispatch(viewerActionCreator_setIsLoading(!1))}.bind(this)).catch(function(u){return _newArrowCheck(this,Wt),console.error(u)}.bind(this))}.bind(this),destroyFn:function destroyFn(){_newArrowCheck(this,u),Ew.setExtensionEnableState(!1,!0)}.bind(this),onPanelCreation:function onPanelCreation(Xe){_newArrowCheck(this,u);const Wt=document.getElementById(Xe);Wt&&(rE=Sw.H(Wt),rE.render(dp.createElement(KC,null)))}.bind(this),onPanelDestroy:function onPanelDestroy(Xe){_newArrowCheck(this,u),rE&&(rE.unmount(),rE=void 0)}.bind(this),injectMapRequestParameters:function injectMapRequestParameters(Xe,Wt){return _newArrowCheck(this,u),Xe.indexOf(In)>-1||Xe.indexOf(io)>-1?{url:Xe,credentials:"include"}:{url:Xe}}.bind(this)}}(),oE=function register(){var u=this;_newArrowCheck(this,undefined),"object"==typeof JMap&&"object"==typeof JMap.Application?JMap.Application.Extension.isRegistered(iE.id)||JMap.Application.Extension.register(iE):setTimeout(function(){return _newArrowCheck(this,u),oE()}.bind(this),500)}.bind(void 0);oE()}()}();