diff --git a/packages/site/public/back-home-route-weather/946.e4f8b448.async.js b/packages/site/public/back-home-route-weather/946.e4f8b448.async.js deleted file mode 100644 index 4834773342..0000000000 --- a/packages/site/public/back-home-route-weather/946.e4f8b448.async.js +++ /dev/null @@ -1,8564 +0,0 @@ -var Jj=Object.defineProperty,eV=Object.defineProperties;var tV=Object.getOwnPropertyDescriptors;var z2=Object.getOwnPropertySymbols;var k5=Object.prototype.hasOwnProperty,F5=Object.prototype.propertyIsEnumerable;var vm=Math.pow,D5=(Ke,ye,_)=>ye in Ke?Jj(Ke,ye,{enumerable:!0,configurable:!0,writable:!0,value:_}):Ke[ye]=_,Od=(Ke,ye)=>{for(var _ in ye||(ye={}))k5.call(ye,_)&&D5(Ke,_,ye[_]);if(z2)for(var _ of z2(ye))F5.call(ye,_)&&D5(Ke,_,ye[_]);return Ke},gm=(Ke,ye)=>eV(Ke,tV(ye));var B5=(Ke,ye)=>{var _={};for(var M in Ke)k5.call(Ke,M)&&ye.indexOf(M)<0&&(_[M]=Ke[M]);if(Ke!=null&&z2)for(var M of z2(Ke))ye.indexOf(M)<0&&F5.call(Ke,M)&&(_[M]=Ke[M]);return _};var eE=(Ke,ye,_)=>{if(!ye.has(Ke))throw TypeError("Cannot "+_)};var yo=(Ke,ye,_)=>(eE(Ke,ye,"read from private field"),_?_.call(Ke):ye.get(Ke)),Lh=(Ke,ye,_)=>{if(ye.has(Ke))throw TypeError("Cannot add the same private member more than once");ye instanceof WeakSet?ye.add(Ke):ye.set(Ke,_)},$f=(Ke,ye,_,M)=>(eE(Ke,ye,"write to private field"),M?M.call(Ke,_):ye.set(Ke,_),_),Z2=(Ke,ye,_,M)=>({set _(V){$f(Ke,ye,V,_)},get _(){return yo(Ke,ye,M)}}),Sp=(Ke,ye,_)=>(eE(Ke,ye,"access private method"),_);var v_=(Ke,ye,_)=>new Promise((M,V)=>{var y=X=>{try{$(_.next(X))}catch(oe){V(oe)}},d=X=>{try{$(_.throw(X))}catch(oe){V(oe)}},$=X=>X.done?M(X.value):Promise.resolve(X.value).then(y,d);$((_=_.apply(Ke,ye)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[946],{95906:function(Ke){"use strict";(function(ye,_){Ke.exports=_()})(this,function(){function ye(re){var le=[];return re.AMapUI&&le.push(_(re.AMapUI)),re.Loca&&le.push(M(re.Loca)),Promise.all(le)}function _(re){return new Promise(function(le,ce){var Ie=[];if(re.plugins)for(var we=0;we=60&&Math.round(Je.h)<=240?et=pt?Math.round(Je.h)-y*Ce:Math.round(Je.h)+y*Ce:et=pt?Math.round(Je.h)+y*Ce:Math.round(Je.h)-y*Ce,et<0?et+=360:et>=360&&(et-=360),et}function Xe(Je,Ce,pt){if(Je.h===0&&Je.s===0)return Je.s;var et;return pt?et=Je.s-d*Ce:Ce===le?et=Je.s+d:et=Je.s+$*Ce,et>1&&(et=1),pt&&Ce===re&&et>.1&&(et=.1),et<.06&&(et=.06),Number(et.toFixed(2))}function ft(Je,Ce,pt){var et;return pt?et=Je.v+X*Ce:et=Je.v-oe*Ce,et>1&&(et=1),Number(et.toFixed(2))}function Ge(Je){for(var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pt=[],et=(0,V.uA)(Je),br=re;br>0;br-=1){var Jt=Ie(et),Vr=we((0,V.uA)({h:qe(Jt,br,!0),s:Xe(Jt,br,!0),v:ft(Jt,br,!0)}));pt.push(Vr)}pt.push(we(et));for(var gn=1;gn<=le;gn+=1){var yn=Ie(et),_i=we((0,V.uA)({h:qe(yn,gn),s:Xe(yn,gn),v:ft(yn,gn)}));pt.push(_i)}return Ce.theme==="dark"?ce.map(function(Hn){var Ln=Hn.index,Ia=Hn.opacity,Zi=we(Ee((0,V.uA)(Ce.backgroundColor||"#141414"),(0,V.uA)(pt[Ln]),Ia*100));return Zi}):pt}var lt={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Ye={},It={};Object.keys(lt).forEach(function(Je){Ye[Je]=Ge(lt[Je]),Ye[Je].primary=Ye[Je][5],It[Je]=Ge(lt[Je],{theme:"dark",backgroundColor:"#141414"}),It[Je].primary=It[Je][5]});var At=Ye.red,Ue=Ye.volcano,rt=Ye.gold,Ze=Ye.orange,Ct=Ye.yellow,st=Ye.lime,Et=Ye.green,at=Ye.cyan,mt=Ye.blue,Mt=Ye.geekblue,Me=Ye.purple,Ht=Ye.magenta,Rt=Ye.grey,vt=Ye.grey},78600:function(Ke,ye,_){"use strict";_.d(ye,{E4:function(){return au},jG:function(){return Je},t2:function(){return rr},ks:function(){return yi},bf:function(){return mo},CI:function(){return qu},fp:function(){return mr},xy:function(){return Pu}});var M=_(16514),V=_(35372),y=_(49397),d=_(54131);function $(Nn){for(var Pn=0,xi,qi=0,Xa=Nn.length;Xa>=4;++qi,Xa-=4)xi=Nn.charCodeAt(qi)&255|(Nn.charCodeAt(++qi)&255)<<8|(Nn.charCodeAt(++qi)&255)<<16|(Nn.charCodeAt(++qi)&255)<<24,xi=(xi&65535)*1540483477+((xi>>>16)*59797<<16),xi^=xi>>>24,Pn=(xi&65535)*1540483477+((xi>>>16)*59797<<16)^(Pn&65535)*1540483477+((Pn>>>16)*59797<<16);switch(Xa){case 3:Pn^=(Nn.charCodeAt(qi+2)&255)<<16;case 2:Pn^=(Nn.charCodeAt(qi+1)&255)<<8;case 1:Pn^=Nn.charCodeAt(qi)&255,Pn=(Pn&65535)*1540483477+((Pn>>>16)*59797<<16)}return Pn^=Pn>>>13,Pn=(Pn&65535)*1540483477+((Pn>>>16)*59797<<16),((Pn^Pn>>>15)>>>0).toString(36)}var X=$,oe=_(75966),re=_(77617),le=_.t(re,2),ce=_(4065),Ie=_(70780),we=_(61577),Ee=_(22946),qe="%";function Xe(Nn){return Nn.join(qe)}var ft=function(){function Nn(Pn){(0,we.Z)(this,Nn),(0,M.Z)(this,"instanceId",void 0),(0,M.Z)(this,"cache",new Map),this.instanceId=Pn}return(0,Ee.Z)(Nn,[{key:"get",value:function(xi){return this.opGet(Xe(xi))}},{key:"opGet",value:function(xi){return this.cache.get(xi)||null}},{key:"update",value:function(xi,qi){return this.opUpdate(Xe(xi),qi)}},{key:"opUpdate",value:function(xi,qi){var Xa=this.cache.get(xi),To=qi(Xa);To===null?this.cache.delete(xi):this.cache.set(xi,To)}}]),Nn}(),Ge=ft,lt=null,Ye="data-token-hash",It="data-css-hash",At="data-cache-path",Ue="__cssinjs_instance__";function rt(){var Nn=Math.random().toString(12).slice(2);if(typeof document!="undefined"&&document.head&&document.body){var Pn=document.body.querySelectorAll("style[".concat(It,"]"))||[],xi=document.head.firstChild;Array.from(Pn).forEach(function(Xa){Xa[Ue]=Xa[Ue]||Nn,Xa[Ue]===Nn&&document.head.insertBefore(Xa,xi)});var qi={};Array.from(document.querySelectorAll("style[".concat(It,"]"))).forEach(function(Xa){var To=Xa.getAttribute(It);if(qi[To]){if(Xa[Ue]===Nn){var Gs;(Gs=Xa.parentNode)===null||Gs===void 0||Gs.removeChild(Xa)}}else qi[To]=!0})}return new Ge(Nn)}var Ze=re.createContext({hashPriority:"low",cache:rt(),defaultCache:!0}),Ct=function(Pn){var xi=Pn.children,qi=_objectWithoutProperties(Pn,lt),Xa=React.useContext(Ze),To=useMemo(function(){var Gs=_objectSpread({},Xa);Object.keys(qi).forEach(function(Jo){var ou=qi[Jo];qi[Jo]!==void 0&&(Gs[Jo]=ou)});var xs=qi.cache;return Gs.cache=Gs.cache||rt(),Gs.defaultCache=!xs&&Xa.defaultCache,Gs},[Xa,qi],function(Gs,xs){return!isEqual(Gs[0],xs[0],!0)||!isEqual(Gs[1],xs[1],!0)});return React.createElement(Ze.Provider,{value:To},xi)},st=Ze,Et=_(13255),at=_(42871);function mt(Nn,Pn){if(Nn.length!==Pn.length)return!1;for(var xi=0;xi1&&arguments[1]!==void 0?arguments[1]:!1,Gs={map:this.cache};return xi.forEach(function(xs){if(!Gs)Gs=void 0;else{var Jo;Gs=(Jo=Gs)===null||Jo===void 0||(Jo=Jo.map)===null||Jo===void 0?void 0:Jo.get(xs)}}),(qi=Gs)!==null&&qi!==void 0&&qi.value&&To&&(Gs.value[1]=this.cacheCallTimes++),(Xa=Gs)===null||Xa===void 0?void 0:Xa.value}},{key:"get",value:function(xi){var qi;return(qi=this.internalGet(xi,!0))===null||qi===void 0?void 0:qi[0]}},{key:"has",value:function(xi){return!!this.internalGet(xi)}},{key:"set",value:function(xi,qi){var Xa=this;if(!this.has(xi)){if(this.size()+1>Nn.MAX_CACHE_SIZE+Nn.MAX_CACHE_OFFSET){var To=this.keys.reduce(function(ou,Iu){var ll=(0,V.Z)(ou,2),Uu=ll[1];return Xa.internalGet(Iu)[1]0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Ht+=1}return(0,Ee.Z)(Nn,[{key:"getDerivativeToken",value:function(xi){return this.derivatives.reduce(function(qi,Xa){return Xa(xi,qi)},void 0)}}]),Nn}(),vt=new Mt;function Je(Nn){var Pn=Array.isArray(Nn)?Nn:[Nn];return vt.has(Pn)||vt.set(Pn,new Rt(Pn)),vt.get(Pn)}var Ce=new WeakMap,pt={};function et(Nn,Pn){for(var xi=Ce,qi=0;qi3&&arguments[3]!==void 0?arguments[3]:{},To=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(To)return Nn;var Gs=(0,d.Z)((0,d.Z)({},Xa),{},(qi={},(0,M.Z)(qi,Ye,Pn),(0,M.Z)(qi,It,xi),qi)),xs=Object.keys(Gs).map(function(Jo){var ou=Gs[Jo];return ou?"".concat(Jo,'="').concat(ou,'"'):null}).filter(function(Jo){return Jo}).join(" ");return"")}var yi=function(Pn){var xi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(xi?"".concat(xi,"-"):"").concat(Pn).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},Zn=function(Pn,xi,qi){return Object.keys(Pn).length?".".concat(xi).concat(qi!=null&&qi.scope?".".concat(qi.scope):"","{").concat(Object.entries(Pn).map(function(Xa){var To=(0,V.Z)(Xa,2),Gs=To[0],xs=To[1];return"".concat(Gs,":").concat(xs,";")}).join(""),"}"):""},gr=function(Pn,xi,qi){var Xa={},To={};return Object.entries(Pn).forEach(function(Gs){var xs,Jo,ou=(0,V.Z)(Gs,2),Iu=ou[0],ll=ou[1];if(qi!=null&&(xs=qi.preserve)!==null&&xs!==void 0&&xs[Iu])To[Iu]=ll;else if((typeof ll=="string"||typeof ll=="number")&&!(qi!=null&&(Jo=qi.ignore)!==null&&Jo!==void 0&&Jo[Iu])){var Uu,Oc=yi(Iu,qi==null?void 0:qi.prefix);Xa[Oc]=typeof ll=="number"&&!(qi!=null&&(Uu=qi.unitless)!==null&&Uu!==void 0&&Uu[Iu])?"".concat(ll,"px"):String(ll),To[Iu]="var(".concat(Oc,")")}}),[To,Zn(Xa,xi,{scope:qi==null?void 0:qi.scope})]},Ea=_(70658),co=(0,d.Z)({},le),Qa=co.useInsertionEffect,oa=function(Pn,xi,qi){re.useMemo(Pn,qi),(0,Ea.Z)(function(){return xi(!0)},qi)},ji=Qa?function(Nn,Pn,xi){return Qa(function(){return Nn(),Pn()},xi)}:oa,so=ji,ei=(0,d.Z)({},le),Kn=ei.useInsertionEffect,Jn=function(Pn){var xi=[],qi=!1;function Xa(To){qi||xi.push(To)}return re.useEffect(function(){return qi=!1,function(){qi=!0,xi.length&&xi.forEach(function(To){return To()})}},Pn),Xa},da=function(){return function(Pn){Pn()}},pa=typeof Kn!="undefined"?Jn:da,uo=pa;function Ir(){return!1}var bt=!1;function Yt(){return bt}var Pt=Ir;if(!1)var xr,Tr;function hn(Nn,Pn,xi,qi,Xa){var To=re.useContext(st),Gs=To.cache,xs=[Nn].concat((0,y.Z)(Pn)),Jo=Xe(xs),ou=uo([Jo]),Iu=Pt(),ll=function(Lu){Gs.opUpdate(Jo,function(su){var Ys=su||[void 0,void 0],_s=(0,V.Z)(Ys,2),Fs=_s[0],Qu=Fs===void 0?0:Fs,Sl=_s[1],nc=Sl,dl=nc||xi(),Ml=[Qu,dl];return Lu?Lu(Ml):Ml})};re.useMemo(function(){ll()},[Jo]);var Uu=Gs.opGet(Jo),Oc=Uu[1];return so(function(){Xa==null||Xa(Oc)},function(fc){return ll(function(Lu){var su=(0,V.Z)(Lu,2),Ys=su[0],_s=su[1];return fc&&Ys===0&&(Xa==null||Xa(Oc)),[Ys+1,_s]}),function(){Gs.opUpdate(Jo,function(Lu){var su=Lu||[],Ys=(0,V.Z)(su,2),_s=Ys[0],Fs=_s===void 0?0:_s,Qu=Ys[1],Sl=Fs-1;return Sl===0?(ou(function(){(fc||!Gs.opGet(Jo))&&(qi==null||qi(Qu,!1))}),null):[Fs-1,Qu]})}},[Jo]),Oc}var Cn={},tr="css",jt=new Map;function He(Nn){jt.set(Nn,(jt.get(Nn)||0)+1)}function We(Nn,Pn){if(typeof document!="undefined"){var xi=document.querySelectorAll("style[".concat(Ye,'="').concat(Nn,'"]'));xi.forEach(function(qi){if(qi[Ue]===Pn){var Xa;(Xa=qi.parentNode)===null||Xa===void 0||Xa.removeChild(qi)}})}}var _t=0;function Zt(Nn,Pn){jt.set(Nn,(jt.get(Nn)||0)-1);var xi=Array.from(jt.keys()),qi=xi.filter(function(Xa){var To=jt.get(Xa)||0;return To<=0});xi.length-qi.length>_t&&qi.forEach(function(Xa){We(Xa,Pn),jt.delete(Xa)})}var rr=function(Pn,xi,qi,Xa){var To=qi.getDerivativeToken(Pn),Gs=(0,d.Z)((0,d.Z)({},To),xi);return Xa&&(Gs=Xa(Gs)),Gs},fr="token";function mr(Nn,Pn){var xi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},qi=(0,re.useContext)(st),Xa=qi.cache.instanceId,To=qi.container,Gs=xi.salt,xs=Gs===void 0?"":Gs,Jo=xi.override,ou=Jo===void 0?Cn:Jo,Iu=xi.formatToken,ll=xi.getComputedToken,Uu=xi.cssVar,Oc=et(function(){return Object.assign.apply(Object,[{}].concat((0,y.Z)(Pn)))},Pn),fc=Jt(Oc),Lu=Jt(ou),su=Uu?Jt(Uu):"",Ys=hn(fr,[xs,Nn.id,fc,Lu,su],function(){var _s,Fs=ll?ll(Oc,ou,Nn):rr(Oc,ou,Nn,Iu),Qu=(0,d.Z)({},Fs),Sl="";if(Uu){var nc=gr(Fs,Uu.key,{prefix:Uu.prefix,ignore:Uu.ignore,unitless:Uu.unitless,preserve:Uu.preserve}),dl=(0,V.Z)(nc,2);Fs=dl[0],Sl=dl[1]}var Ml=Vr(Fs,xs);Fs._tokenKey=Ml,Qu._tokenKey=Vr(Qu,xs);var Vc=(_s=Uu==null?void 0:Uu.key)!==null&&_s!==void 0?_s:Ml;Fs._themeKey=Vc,He(Vc);var kl="".concat(tr,"-").concat(X(Ml));return Fs._hashId=kl,[Fs,kl,Qu,Sl,(Uu==null?void 0:Uu.key)||""]},function(_s){Zt(_s[0]._themeKey,Xa)},function(_s){var Fs=(0,V.Z)(_s,4),Qu=Fs[0],Sl=Fs[3];if(Uu&&Sl){var nc=(0,oe.hq)(Sl,X("css-variables-".concat(Qu._themeKey)),{mark:It,prepend:"queue",attachTo:To,priority:-999});nc[Ue]=Xa,nc.setAttribute(Ye,Qu._themeKey)}});return Ys}var Qe=function(Pn,xi,qi){var Xa=(0,V.Z)(Pn,5),To=Xa[2],Gs=Xa[3],xs=Xa[4],Jo=qi||{},ou=Jo.plain;if(!Gs)return null;var Iu=To._tokenKey,ll=-999,Uu={"data-rc-order":"prependQueue","data-rc-priority":"".concat(ll)},Oc=_n(Gs,xs,Iu,Uu,ou);return[ll,Iu,Oc]},er=_(79384),jr={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},on=jr,ri="-ms-",nn="-moz-",ln="-webkit-",Yn="comm",Wn="rule",Tn="decl",ai="@page",Ii="@media",ki="@import",Fa="@charset",sa="@viewport",vo="@supports",Ro="@document",Za="@namespace",Os="@keyframes",ro="@font-face",Tu="@counter-style",Do="@font-feature-values",qa="@layer",ss=Math.abs,ca=String.fromCharCode,Mn=Object.assign;function wi(Nn,Pn){return Qs(Nn,0)^45?(((Pn<<2^Qs(Nn,0))<<2^Qs(Nn,1))<<2^Qs(Nn,2))<<2^Qs(Nn,3):0}function Fu(Nn){return Nn.trim()}function Hs(Nn,Pn){return(Nn=Pn.exec(Nn))?Nn[0]:Nn}function us(Nn,Pn,xi){return Nn.replace(Pn,xi)}function Ts(Nn,Pn,xi){return Nn.indexOf(Pn,xi)}function Qs(Nn,Pn){return Nn.charCodeAt(Pn)|0}function ko(Nn,Pn,xi){return Nn.slice(Pn,xi)}function _o(Nn){return Nn.length}function Js(Nn){return Nn.length}function fo(Nn,Pn){return Pn.push(Nn),Nn}function El(Nn,Pn){return Nn.map(Pn).join("")}function ju(Nn,Pn){return Nn.filter(function(xi){return!Hs(xi,Pn)})}function _l(Nn,Pn){for(var xi="",qi=0;qi0?Qs(tn,--Au):0,Vl--,On===10&&(Vl=1,yc--),On}function vn(){return On=Au2||xn(On)>3?"":" "}function Yr(Nn){for(;vn();)switch(xn(On)){case 0:append(ti(Au-1),Nn);break;case 2:append(Nt(On),Nn);break;default:append(from(On),Nn)}return Nn}function un(Nn,Pn){for(;--Pn&&vn()&&!(On<48||On>102||On>57&&On<65||On>70&&On<97););return Bo(Nn,ya()+(Pn<6&&Xi()==32&&vn()==32))}function Sn(Nn){for(;vn();)switch(On){case Nn:return Au;case 34:case 39:Nn!==34&&Nn!==39&&Sn(On);break;case 40:Nn===41&&Sn(Nn);break;case 92:vn();break}return Au}function qn(Nn,Pn){for(;vn()&&Nn+On!==47+10;)if(Nn+On===42+42&&Xi()===47)break;return"/*"+Bo(Pn,Au-1)+"*"+ca(Nn===47?Nn:vn())}function ti(Nn){for(;!xn(Xi());)vn();return Bo(Nn,Au)}function Ui(Nn){return xt(ra("",null,null,null,[""],Nn=zr(Nn),0,[0],Nn))}function ra(Nn,Pn,xi,qi,Xa,To,Gs,xs,Jo){for(var ou=0,Iu=0,ll=Gs,Uu=0,Oc=0,fc=0,Lu=1,su=1,Ys=1,_s=0,Fs="",Qu=Xa,Sl=To,nc=qi,dl=Fs;su;)switch(fc=_s,_s=vn()){case 40:if(fc!=108&&Qs(dl,ll-1)==58){Ts(dl+=us(Nt(_s),"&","&\f"),"&\f",ss(ou?xs[ou-1]:0))!=-1&&(Ys=-1);break}case 34:case 39:case 91:dl+=Nt(_s);break;case 9:case 10:case 13:case 32:dl+=$r(fc);break;case 92:dl+=un(ya()-1,7);continue;case 47:switch(Xi()){case 42:case 47:fo(vi(qn(vn(),ya()),Pn,xi,Jo),Jo);break;default:dl+="/"}break;case 123*Lu:xs[ou++]=_o(dl)*Ys;case 125*Lu:case 59:case 0:switch(_s){case 0:case 125:su=0;case 59+Iu:Ys==-1&&(dl=us(dl,/\f/g,"")),Oc>0&&_o(dl)-ll&&fo(Oc>32?gi(dl+";",qi,xi,ll-1,Jo):gi(us(dl," ","")+";",qi,xi,ll-2,Jo),Jo);break;case 59:dl+=";";default:if(fo(nc=ia(dl,Pn,xi,ou,Iu,Xa,xs,Fs,Qu=[],Sl=[],ll,To),To),_s===123)if(Iu===0)ra(dl,Pn,nc,nc,Qu,To,ll,xs,Sl);else switch(Uu===99&&Qs(dl,3)===110?100:Uu){case 100:case 108:case 109:case 115:ra(Nn,nc,nc,qi&&fo(ia(Nn,nc,nc,0,0,Xa,xs,Fs,Xa,Qu=[],ll,Sl),Sl),Xa,Sl,ll,xs,qi?Qu:Sl);break;default:ra(dl,nc,nc,nc,[""],Sl,0,xs,Sl)}}ou=Iu=Oc=0,Lu=Ys=1,Fs=dl="",ll=Gs;break;case 58:ll=1+_o(dl),Oc=fc;default:if(Lu<1){if(_s==123)--Lu;else if(_s==125&&Lu++==0&&bn()==125)continue}switch(dl+=ca(_s),_s*Lu){case 38:Ys=Iu>0?1:(dl+="\f",-1);break;case 44:xs[ou++]=(_o(dl)-1)*Ys,Ys=1;break;case 64:Xi()===45&&(dl+=Nt(vn())),Uu=Xi(),Iu=ll=_o(Fs=dl+=ti(ya())),_s++;break;case 45:fc===45&&_o(dl)==2&&(Lu=0)}}return To}function ia(Nn,Pn,xi,qi,Xa,To,Gs,xs,Jo,ou,Iu,ll){for(var Uu=Xa-1,Oc=Xa===0?To:[""],fc=Js(Oc),Lu=0,su=0,Ys=0;Lu0?Oc[_s]+" "+Fs:us(Fs,/&\f/g,Oc[_s])))&&(Jo[Ys++]=Qu);return Pi(Nn,Pn,xi,Xa===0?Wn:xs,Jo,ou,Iu,ll)}function vi(Nn,Pn,xi,qi){return Pi(Nn,Pn,xi,Yn,ca(wr()),ko(Nn,2,-2),0,qi)}function gi(Nn,Pn,xi,qi,Xa){return Pi(Nn,Pn,xi,Tn,ko(Nn,0,qi),ko(Nn,qi+1,-1),qi,Xa)}function ma(Nn,Pn){var xi=Pn.path,qi=Pn.parentSelectors;devWarning(!1,"[Ant Design CSS-in-JS] ".concat(xi?"Error in ".concat(xi,": "):"").concat(Nn).concat(qi.length?" Selector: ".concat(qi.join(" | ")):""))}var Yi=function(Pn,xi,qi){if(Pn==="content"){var Xa=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,To=["normal","none","initial","inherit","unset"];(typeof xi!="string"||To.indexOf(xi)===-1&&!Xa.test(xi)&&(xi.charAt(0)!==xi.charAt(xi.length-1)||xi.charAt(0)!=='"'&&xi.charAt(0)!=="'"))&&lintWarning("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(xi,"\"'`."),qi)}},ua=null,La=function(Pn,xi,qi){Pn==="animation"&&qi.hashId&&xi!=="none"&&lintWarning("You seem to be using hashed animation '".concat(xi,"', in which case 'animationName' with Keyframe as value is recommended."),qi)},aa=null;function ho(Nn){var Pn,xi=((Pn=Nn.match(/:not\(([^)]*)\)/))===null||Pn===void 0?void 0:Pn[1])||"",qi=xi.split(/(\[[^[]*])|(?=[.#])/).filter(function(Xa){return Xa});return qi.length>1}function Po(Nn){return Nn.parentSelectors.reduce(function(Pn,xi){return Pn?xi.includes("&")?xi.replace(/&/g,Pn):"".concat(Pn," ").concat(xi):xi},"")}var Ms=function(Pn,xi,qi){var Xa=Po(qi),To=Xa.match(/:not\([^)]*\)/g)||[];To.length>0&&To.some(ho)&&lintWarning("Concat ':not' selector not support in legacy browsers.",qi)},Mu=null,vs=function(Pn,xi,qi){switch(Pn){case"marginLeft":case"marginRight":case"paddingLeft":case"paddingRight":case"left":case"right":case"borderLeft":case"borderLeftWidth":case"borderLeftStyle":case"borderLeftColor":case"borderRight":case"borderRightWidth":case"borderRightStyle":case"borderRightColor":case"borderTopLeftRadius":case"borderTopRightRadius":case"borderBottomLeftRadius":case"borderBottomRightRadius":lintWarning("You seem to be using non-logical property '".concat(Pn,"' which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."),qi);return;case"margin":case"padding":case"borderWidth":case"borderStyle":if(typeof xi=="string"){var Xa=xi.split(" ").map(function(xs){return xs.trim()});Xa.length===4&&Xa[1]!==Xa[3]&&lintWarning("You seem to be using '".concat(Pn,"' property with different left ").concat(Pn," and right ").concat(Pn,", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."),qi)}return;case"clear":case"textAlign":(xi==="left"||xi==="right")&&lintWarning("You seem to be using non-logical value '".concat(xi,"' of ").concat(Pn,", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."),qi);return;case"borderRadius":if(typeof xi=="string"){var To=xi.split("/").map(function(xs){return xs.trim()}),Gs=To.reduce(function(xs,Jo){if(xs)return xs;var ou=Jo.split(" ").map(function(Iu){return Iu.trim()});return ou.length>=2&&ou[0]!==ou[1]||ou.length===3&&ou[1]!==ou[2]||ou.length===4&&ou[2]!==ou[3]?!0:xs},!1);Gs&&lintWarning("You seem to be using non-logical value '".concat(xi,"' of ").concat(Pn,", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties."),qi)}return;default:}},Xs=null,iu=function(Pn,xi,qi){(typeof xi=="string"&&/NaN/g.test(xi)||Number.isNaN(xi))&&lintWarning("Unexpected 'NaN' in property '".concat(Pn,": ").concat(xi,"'."),qi)},js=null,Vs=function(Pn,xi,qi){qi.parentSelectors.some(function(Xa){var To=Xa.split(",");return To.some(function(Gs){return Gs.split("&").length>2})})&&lintWarning("Should not use more than one `&` in a selector.",qi)},sl=null,al="data-ant-cssinjs-cache-path",ul="_FILE_STYLE__";function _c(Nn){return Object.keys(Nn).map(function(Pn){var xi=Nn[Pn];return"".concat(Pn,":").concat(xi)}).join(";")}var Yo,No=!0;function Ku(Nn){var Pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Yo=Nn,No=Pn}function Rc(){if(!Yo&&(Yo={},(0,at.Z)())){var Nn=document.createElement("div");Nn.className=al,Nn.style.position="fixed",Nn.style.visibility="hidden",Nn.style.top="-9999px",document.body.appendChild(Nn);var Pn=getComputedStyle(Nn).content||"";Pn=Pn.replace(/^"/,"").replace(/"$/,""),Pn.split(";").forEach(function(Xa){var To=Xa.split(":"),Gs=(0,V.Z)(To,2),xs=Gs[0],Jo=Gs[1];Yo[xs]=Jo});var xi=document.querySelector("style[".concat(al,"]"));if(xi){var qi;No=!1,(qi=xi.parentNode)===null||qi===void 0||qi.removeChild(xi)}document.body.removeChild(Nn)}}function Wa(Nn){return Rc(),!!Yo[Nn]}function mf(Nn){var Pn=Yo[Nn],xi=null;if(Pn&&(0,at.Z)())if(No)xi=ul;else{var qi=document.querySelector("style[".concat(It,'="').concat(Yo[Nn],'"]'));qi?xi=qi.innerHTML:delete Yo[Nn]}return[xi,Pn]}var yf="_skip_check_",yl="_multi_value_";function Ec(Nn){var Pn=_l(Ui(Nn),Es);return Pn.replace(/\{%%%\:[^;];}/g,";")}function Zf(Nn){return(0,Et.Z)(Nn)==="object"&&Nn&&(yf in Nn||yl in Nn)}function Vu(Nn,Pn,xi){if(!Pn)return Nn;var qi=".".concat(Pn),Xa=xi==="low"?":where(".concat(qi,")"):qi,To=Nn.split(",").map(function(Gs){var xs,Jo=Gs.trim().split(/\s+/),ou=Jo[0]||"",Iu=((xs=ou.match(/^\w+/))===null||xs===void 0?void 0:xs[0])||"";return ou="".concat(Iu).concat(Xa).concat(ou.slice(Iu.length)),[ou].concat((0,y.Z)(Jo.slice(1))).join(" ")});return To.join(",")}var lc=function Nn(Pn){var xi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},qi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},Xa=qi.root,To=qi.injectHash,Gs=qi.parentSelectors,xs=xi.hashId,Jo=xi.layer,ou=xi.path,Iu=xi.hashPriority,ll=xi.transformers,Uu=ll===void 0?[]:ll,Oc=xi.linters,fc=Oc===void 0?[]:Oc,Lu="",su={};function Ys(nc){var dl=nc.getName(xs);if(!su[dl]){var Ml=Nn(nc.style,xi,{root:!1,parentSelectors:Gs}),Vc=(0,V.Z)(Ml,1),kl=Vc[0];su[dl]="@keyframes ".concat(nc.getName(xs)).concat(kl)}}function _s(nc){var dl=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return nc.forEach(function(Ml){Array.isArray(Ml)?_s(Ml,dl):Ml&&dl.push(Ml)}),dl}var Fs=_s(Array.isArray(Pn)?Pn:[Pn]);if(Fs.forEach(function(nc){var dl=typeof nc=="string"&&!Xa?{}:nc;if(typeof dl=="string")Lu+="".concat(dl,` -`);else if(dl._keyframe)Ys(dl);else{var Ml=Uu.reduce(function(Vc,kl){var Qf;return(kl==null||(Qf=kl.visit)===null||Qf===void 0?void 0:Qf.call(kl,Vc))||Vc},dl);Object.keys(Ml).forEach(function(Vc){var kl=Ml[Vc];if((0,Et.Z)(kl)==="object"&&kl&&(Vc!=="animationName"||!kl._keyframe)&&!Zf(kl)){var Qf=!1,ds=Vc.trim(),Eu=!1;(Xa||To)&&xs?ds.startsWith("@")?Qf=!0:ds=Vu(Vc,xs,Iu):Xa&&!xs&&(ds==="&"||ds==="")&&(ds="",Eu=!0);var Rl=Nn(kl,xi,{root:Eu,injectHash:Qf,parentSelectors:[].concat((0,y.Z)(Gs),[ds])}),Fc=(0,V.Z)(Rl,2),Yc=Fc[0],xh=Fc[1];su=(0,d.Z)((0,d.Z)({},su),xh),Lu+="".concat(ds).concat(Yc)}else{let wd=function(_h,Df){var af=_h.replace(/[A-Z]/g,function(Uf){return"-".concat(Uf.toLowerCase())}),cd=Df;!on[_h]&&typeof cd=="number"&&cd!==0&&(cd="".concat(cd,"px")),_h==="animationName"&&Df!==null&&Df!==void 0&&Df._keyframe&&(Ys(Df),cd=Df.getName(xs)),Lu+="".concat(af,":").concat(cd,";")};var Lf,If=(Lf=kl==null?void 0:kl.value)!==null&&Lf!==void 0?Lf:kl;(0,Et.Z)(kl)==="object"&&kl!==null&&kl!==void 0&&kl[yl]&&Array.isArray(If)?If.forEach(function(_h){wd(Vc,_h)}):wd(Vc,If)}})}}),!Xa)Lu="{".concat(Lu,"}");else if(Jo&&Ln()){var Qu=Jo.split(","),Sl=Qu[Qu.length-1].trim();Lu="@layer ".concat(Sl," {").concat(Lu,"}"),Qu.length>1&&(Lu="@layer ".concat(Jo,"{%%%:%}").concat(Lu))}return[Lu,su]};function fl(Nn,Pn){return X("".concat(Nn.join("%")).concat(Pn))}function lf(){return null}var gu="style";function Pu(Nn,Pn){var xi=Nn.token,qi=Nn.path,Xa=Nn.hashId,To=Nn.layer,Gs=Nn.nonce,xs=Nn.clientOnly,Jo=Nn.order,ou=Jo===void 0?0:Jo,Iu=re.useContext(st),ll=Iu.autoClear,Uu=Iu.mock,Oc=Iu.defaultCache,fc=Iu.hashPriority,Lu=Iu.container,su=Iu.ssrInline,Ys=Iu.transformers,_s=Iu.linters,Fs=Iu.cache,Qu=xi._tokenKey,Sl=[Qu].concat((0,y.Z)(qi)),nc=ka,dl=hn(gu,Sl,function(){var ds=Sl.join("|");if(Wa(ds)){var Eu=mf(ds),Rl=(0,V.Z)(Eu,2),Fc=Rl[0],Yc=Rl[1];if(Fc)return[Fc,Qu,Yc,{},xs,ou]}var xh=Pn(),Lf=lc(xh,{hashId:Xa,hashPriority:fc,layer:To,path:qi.join("-"),transformers:Ys,linters:_s}),If=(0,V.Z)(Lf,2),wd=If[0],_h=If[1],Df=Ec(wd),af=fl(Sl,Df);return[Df,Qu,af,_h,xs,ou]},function(ds,Eu){var Rl=(0,V.Z)(ds,3),Fc=Rl[2];(Eu||ll)&&ka&&(0,oe.jL)(Fc,{mark:It})},function(ds){var Eu=(0,V.Z)(ds,4),Rl=Eu[0],Fc=Eu[1],Yc=Eu[2],xh=Eu[3];if(nc&&Rl!==ul){var Lf={mark:It,prepend:"queue",attachTo:Lu,priority:ou},If=typeof Gs=="function"?Gs():Gs;If&&(Lf.csp={nonce:If});var wd=(0,oe.hq)(Rl,Yc,Lf);wd[Ue]=Fs.instanceId,wd.setAttribute(Ye,Qu),Object.keys(xh).forEach(function(_h){(0,oe.hq)(Ec(xh[_h]),"_effect-".concat(_h),Lf)})}}),Ml=(0,V.Z)(dl,3),Vc=Ml[0],kl=Ml[1],Qf=Ml[2];return function(ds){var Eu;if(!su||nc||!Oc)Eu=re.createElement(lf,null);else{var Rl;Eu=re.createElement("style",(0,er.Z)({},(Rl={},(0,M.Z)(Rl,Ye,kl),(0,M.Z)(Rl,It,Qf),Rl),{dangerouslySetInnerHTML:{__html:Vc}}))}return re.createElement(re.Fragment,null,Eu,ds)}}var Co=function(Pn,xi,qi){var Xa=(0,V.Z)(Pn,6),To=Xa[0],Gs=Xa[1],xs=Xa[2],Jo=Xa[3],ou=Xa[4],Iu=Xa[5],ll=qi||{},Uu=ll.plain;if(ou)return null;var Oc=To,fc={"data-rc-order":"prependQueue","data-rc-priority":"".concat(Iu)};return Oc=_n(To,Gs,xs,fc,Uu),Jo&&Object.keys(Jo).forEach(function(Lu){if(!xi[Lu]){xi[Lu]=!0;var su=Ec(Jo[Lu]);Oc+=_n(su,Gs,"_effect-".concat(Lu),fc,Uu)}}),[Iu,xs,Oc]},zu="cssVar",Zu=function(Pn,xi){var qi=Pn.key,Xa=Pn.prefix,To=Pn.unitless,Gs=Pn.ignore,xs=Pn.token,Jo=Pn.scope,ou=Jo===void 0?"":Jo,Iu=(0,re.useContext)(st),ll=Iu.cache.instanceId,Uu=Iu.container,Oc=xs._tokenKey,fc=[].concat((0,y.Z)(Pn.path),[qi,ou,Oc]),Lu=hn(zu,fc,function(){var su=xi(),Ys=gr(su,qi,{prefix:Xa,unitless:To,ignore:Gs,scope:ou}),_s=(0,V.Z)(Ys,2),Fs=_s[0],Qu=_s[1],Sl=fl(fc,Qu);return[Fs,Qu,Sl,qi]},function(su){var Ys=(0,V.Z)(su,3),_s=Ys[2];ka&&(0,oe.jL)(_s,{mark:It})},function(su){var Ys=(0,V.Z)(su,3),_s=Ys[1],Fs=Ys[2];if(_s){var Qu=(0,oe.hq)(_s,Fs,{mark:It,prepend:"queue",attachTo:Uu,priority:-999});Qu[Ue]=ll,Qu.setAttribute(Ye,qi)}});return Lu},St=function(Pn,xi,qi){var Xa=(0,V.Z)(Pn,4),To=Xa[1],Gs=Xa[2],xs=Xa[3],Jo=qi||{},ou=Jo.plain;if(!To)return null;var Iu=-999,ll={"data-rc-order":"prependQueue","data-rc-priority":"".concat(Iu)},Uu=_n(To,xs,Gs,ll,ou);return[Iu,Gs,Uu]},qu=Zu,hl,rc=(hl={},(0,M.Z)(hl,gu,Co),(0,M.Z)(hl,fr,Qe),(0,M.Z)(hl,zu,St),hl);function bs(Nn){return Nn!==null}function Il(Nn,Pn){var xi=typeof Pn=="boolean"?{plain:Pn}:Pn||{},qi=xi.plain,Xa=qi===void 0?!1:qi,To=xi.types,Gs=To===void 0?["style","token","cssVar"]:To,xs=new RegExp("^(".concat((typeof Gs=="string"?[Gs]:Gs).join("|"),")%")),Jo=Array.from(Nn.cache.keys()).filter(function(Uu){return xs.test(Uu)}),ou={},Iu={},ll="";return Jo.map(function(Uu){var Oc=Uu.replace(xs,"").replace(/%/g,"|"),fc=Uu.split("%"),Lu=_slicedToArray(fc,1),su=Lu[0],Ys=rc[su],_s=Ys(Nn.cache.get(Uu)[1],ou,{plain:Xa});if(!_s)return null;var Fs=_slicedToArray(_s,3),Qu=Fs[0],Sl=Fs[1],nc=Fs[2];return Uu.startsWith("style")&&(Iu[Oc]=Sl),[Qu,nc]}).filter(bs).sort(function(Uu,Oc){var fc=_slicedToArray(Uu,1),Lu=fc[0],su=_slicedToArray(Oc,1),Ys=su[0];return Lu-Ys}).forEach(function(Uu){var Oc=_slicedToArray(Uu,2),fc=Oc[1];ll+=fc}),ll+=toStyleStr(".".concat(ATTR_CACHE_MAP,'{content:"').concat(serializeCacheMap(Iu),'";}'),void 0,void 0,_defineProperty({},ATTR_CACHE_MAP,ATTR_CACHE_MAP),Xa),ll}var ks=function(){function Nn(Pn,xi){(0,we.Z)(this,Nn),(0,M.Z)(this,"name",void 0),(0,M.Z)(this,"style",void 0),(0,M.Z)(this,"_keyframe",!0),this.name=Pn,this.style=xi}return(0,Ee.Z)(Nn,[{key:"getName",value:function(){var xi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return xi?"".concat(xi,"-").concat(this.name):this.name}}]),Nn}(),au=ks;function Al(Nn){if(typeof Nn=="number")return[[Nn],!1];var Pn=String(Nn).trim(),xi=Pn.match(/(.*)(!important)/),qi=(xi?xi[1]:Pn).trim().split(/\s+/),Xa="",To=0;return[qi.reduce(function(Gs,xs){if(xs.includes("(")||xs.includes(")")){var Jo=xs.split("(").length-1,ou=xs.split(")").length-1;To+=Jo-ou}return To===0?(Gs.push(Xa+xs),Xa=""):To>0&&(Xa+=xs),Gs},[]),!!xi]}function cc(Nn){return Nn.notSplit=!0,Nn}var Gl={inset:["top","right","bottom","left"],insetBlock:["top","bottom"],insetBlockStart:["top"],insetBlockEnd:["bottom"],insetInline:["left","right"],insetInlineStart:["left"],insetInlineEnd:["right"],marginBlock:["marginTop","marginBottom"],marginBlockStart:["marginTop"],marginBlockEnd:["marginBottom"],marginInline:["marginLeft","marginRight"],marginInlineStart:["marginLeft"],marginInlineEnd:["marginRight"],paddingBlock:["paddingTop","paddingBottom"],paddingBlockStart:["paddingTop"],paddingBlockEnd:["paddingBottom"],paddingInline:["paddingLeft","paddingRight"],paddingInlineStart:["paddingLeft"],paddingInlineEnd:["paddingRight"],borderBlock:cc(["borderTop","borderBottom"]),borderBlockStart:cc(["borderTop"]),borderBlockEnd:cc(["borderBottom"]),borderInline:cc(["borderLeft","borderRight"]),borderInlineStart:cc(["borderLeft"]),borderInlineEnd:cc(["borderRight"]),borderBlockWidth:["borderTopWidth","borderBottomWidth"],borderBlockStartWidth:["borderTopWidth"],borderBlockEndWidth:["borderBottomWidth"],borderInlineWidth:["borderLeftWidth","borderRightWidth"],borderInlineStartWidth:["borderLeftWidth"],borderInlineEndWidth:["borderRightWidth"],borderBlockStyle:["borderTopStyle","borderBottomStyle"],borderBlockStartStyle:["borderTopStyle"],borderBlockEndStyle:["borderBottomStyle"],borderInlineStyle:["borderLeftStyle","borderRightStyle"],borderInlineStartStyle:["borderLeftStyle"],borderInlineEndStyle:["borderRightStyle"],borderBlockColor:["borderTopColor","borderBottomColor"],borderBlockStartColor:["borderTopColor"],borderBlockEndColor:["borderBottomColor"],borderInlineColor:["borderLeftColor","borderRightColor"],borderInlineStartColor:["borderLeftColor"],borderInlineEndColor:["borderRightColor"],borderStartStartRadius:["borderTopLeftRadius"],borderStartEndRadius:["borderTopRightRadius"],borderEndStartRadius:["borderBottomLeftRadius"],borderEndEndRadius:["borderBottomRightRadius"]};function yh(Nn,Pn){var xi=Nn;return Pn&&(xi="".concat(xi," !important")),{_skip_check_:!0,value:xi}}var ah={visit:function(Pn){var xi={};return Object.keys(Pn).forEach(function(qi){var Xa=Pn[qi],To=Gl[qi];if(To&&(typeof Xa=="number"||typeof Xa=="string")){var Gs=Al(Xa),xs=(0,V.Z)(Gs,2),Jo=xs[0],ou=xs[1];To.length&&To.notSplit?To.forEach(function(Iu){xi[Iu]=yh(Xa,ou)}):To.length===1?xi[To[0]]=yh(Xa,ou):To.length===2?To.forEach(function(Iu,ll){var Uu;xi[Iu]=yh((Uu=Jo[ll])!==null&&Uu!==void 0?Uu:Jo[0],ou)}):To.length===4?To.forEach(function(Iu,ll){var Uu,Oc;xi[Iu]=yh((Uu=(Oc=Jo[ll])!==null&&Oc!==void 0?Oc:Jo[ll-2])!==null&&Uu!==void 0?Uu:Jo[0],ou)}):xi[qi]=Xa}else xi[qi]=Xa}),xi}},qf=null,Ac=/url\([^)]+\)|var\([^)]+\)|(\d*\.?\d+)px/g;function Xf(Nn,Pn){var xi=Math.pow(10,Pn+1),qi=Math.floor(Nn*xi);return Math.round(qi/10)*10/xi}var _f=function(){var Pn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},xi=Pn.rootValue,qi=xi===void 0?16:xi,Xa=Pn.precision,To=Xa===void 0?5:Xa,Gs=Pn.mediaQuery,xs=Gs===void 0?!1:Gs,Jo=function(ll,Uu){if(!Uu)return ll;var Oc=parseFloat(Uu);if(Oc<=1)return ll;var fc=Xf(Oc/qi,To);return"".concat(fc,"rem")},ou=function(ll){var Uu=_objectSpread({},ll);return Object.entries(ll).forEach(function(Oc){var fc=_slicedToArray(Oc,2),Lu=fc[0],su=fc[1];if(typeof su=="string"&&su.includes("px")){var Ys=su.replace(Ac,Jo);Uu[Lu]=Ys}!unitless[Lu]&&typeof su=="number"&&su!==0&&(Uu[Lu]="".concat(su,"px").replace(Ac,Jo));var _s=Lu.trim();if(_s.startsWith("@")&&_s.includes("px")&&xs){var Fs=Lu.replace(Ac,Jo);Uu[Fs]=Uu[Lu],delete Uu[Lu]}}),Uu};return{visit:ou}},zc=null,bh={supportModernCSS:function(){return Zi()&&fa()}}},12213:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Ue}});var M=_(79384),V=_(35372),y=_(16514),d=_(56348),$=_(77617),X=_(92310),oe=_.n(X),re=_(10129),le=_(48081),ce=_(54131),Ie=_(43963),we=["icon","className","onClick","style","primaryColor","secondaryColor"],Ee={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function qe(rt){var Ze=rt.primaryColor,Ct=rt.secondaryColor;Ee.primaryColor=Ze,Ee.secondaryColor=Ct||(0,Ie.pw)(Ze),Ee.calculated=!!Ct}function Xe(){return(0,ce.Z)({},Ee)}var ft=function(Ze){var Ct=Ze.icon,st=Ze.className,Et=Ze.onClick,at=Ze.style,mt=Ze.primaryColor,Mt=Ze.secondaryColor,Me=(0,d.Z)(Ze,we),Ht=$.useRef(),Rt=Ee;if(mt&&(Rt={primaryColor:mt,secondaryColor:Mt||(0,Ie.pw)(mt)}),(0,Ie.C3)(Ht),(0,Ie.Kp)((0,Ie.r)(Ct),"icon should be icon definiton, but got ".concat(Ct)),!(0,Ie.r)(Ct))return null;var vt=Ct;return vt&&typeof vt.icon=="function"&&(vt=(0,ce.Z)((0,ce.Z)({},vt),{},{icon:vt.icon(Rt.primaryColor,Rt.secondaryColor)})),(0,Ie.R_)(vt.icon,"svg-".concat(vt.name),(0,ce.Z)((0,ce.Z)({className:st,onClick:Et,style:at,"data-icon":vt.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},Me),{},{ref:Ht}))};ft.displayName="IconReact",ft.getTwoToneColors=Xe,ft.setTwoToneColors=qe;var Ge=ft;function lt(rt){var Ze=(0,Ie.H9)(rt),Ct=(0,V.Z)(Ze,2),st=Ct[0],Et=Ct[1];return Ge.setTwoToneColors({primaryColor:st,secondaryColor:Et})}function Ye(){var rt=Ge.getTwoToneColors();return rt.calculated?[rt.primaryColor,rt.secondaryColor]:rt.primaryColor}var It=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];lt(re.iN.primary);var At=$.forwardRef(function(rt,Ze){var Ct=rt.className,st=rt.icon,Et=rt.spin,at=rt.rotate,mt=rt.tabIndex,Mt=rt.onClick,Me=rt.twoToneColor,Ht=(0,d.Z)(rt,It),Rt=$.useContext(le.Z),vt=Rt.prefixCls,Je=vt===void 0?"anticon":vt,Ce=Rt.rootClassName,pt=oe()(Ce,Je,(0,y.Z)((0,y.Z)({},"".concat(Je,"-").concat(st.name),!!st.name),"".concat(Je,"-spin"),!!Et||st.name==="loading"),Ct),et=mt;et===void 0&&Mt&&(et=-1);var br=at?{msTransform:"rotate(".concat(at,"deg)"),transform:"rotate(".concat(at,"deg)")}:void 0,Jt=(0,Ie.H9)(Me),Vr=(0,V.Z)(Jt,2),gn=Vr[0],yn=Vr[1];return $.createElement("span",(0,M.Z)({role:"img","aria-label":st.name},Ht,{ref:Ze,tabIndex:et,onClick:Mt,className:pt}),$.createElement(Ge,{icon:st,primaryColor:gn,secondaryColor:yn,style:br}))});At.displayName="AntdIcon",At.getTwoToneColor=Ye,At.setTwoToneColor=lt;var Ue=At},48081:function(Ke,ye,_){"use strict";var M=_(77617),V=(0,M.createContext)({});ye.Z=V},50555:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return oe}});var M=_(79384),V=_(77617),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},d=y,$=_(12213),X=function(le,ce){return V.createElement($.Z,(0,M.Z)({},le,{ref:ce,icon:d}))},oe=V.forwardRef(X)},43418:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return oe}});var M=_(79384),V=_(77617),y={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},d=y,$=_(12213),X=function(le,ce){return V.createElement($.Z,(0,M.Z)({},le,{ref:ce,icon:d}))},oe=V.forwardRef(X)},39694:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return oe}});var M=_(79384),V=_(77617),y={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},d=y,$=_(12213),X=function(le,ce){return V.createElement($.Z,(0,M.Z)({},le,{ref:ce,icon:d}))},oe=V.forwardRef(X)},81664:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return oe}});var M=_(79384),V=_(77617),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},d=y,$=_(12213),X=function(le,ce){return V.createElement($.Z,(0,M.Z)({},le,{ref:ce,icon:d}))},oe=V.forwardRef(X)},20906:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return oe}});var M=_(79384),V=_(77617),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},d=y,$=_(12213),X=function(le,ce){return V.createElement($.Z,(0,M.Z)({},le,{ref:ce,icon:d}))},oe=V.forwardRef(X)},20555:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return oe}});var M=_(79384),V=_(77617),y={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},d=y,$=_(12213),X=function(le,ce){return V.createElement($.Z,(0,M.Z)({},le,{ref:ce,icon:d}))},oe=V.forwardRef(X)},86289:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return oe}});var M=_(79384),V=_(77617),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},d=y,$=_(12213),X=function(le,ce){return V.createElement($.Z,(0,M.Z)({},le,{ref:ce,icon:d}))},oe=V.forwardRef(X)},43963:function(Ke,ye,_){"use strict";_.d(ye,{C3:function(){return lt},H9:function(){return Xe},Kp:function(){return ce},R_:function(){return Ee},pw:function(){return qe},r:function(){return Ie},vD:function(){return ft}});var M=_(54131),V=_(13255),y=_(10129),d=_(75966),$=_(39057),X=_(36014),oe=_(77617),re=_(48081);function le(Ye){return Ye.replace(/-(.)/g,function(It,At){return At.toUpperCase()})}function ce(Ye,It){(0,X.ZP)(Ye,"[@ant-design/icons] ".concat(It))}function Ie(Ye){return(0,V.Z)(Ye)==="object"&&typeof Ye.name=="string"&&typeof Ye.theme=="string"&&((0,V.Z)(Ye.icon)==="object"||typeof Ye.icon=="function")}function we(){var Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(Ye).reduce(function(It,At){var Ue=Ye[At];switch(At){case"class":It.className=Ue,delete It.class;break;default:delete It[At],It[le(At)]=Ue}return It},{})}function Ee(Ye,It,At){return At?oe.createElement(Ye.tag,(0,M.Z)((0,M.Z)({key:It},we(Ye.attrs)),At),(Ye.children||[]).map(function(Ue,rt){return Ee(Ue,"".concat(It,"-").concat(Ye.tag,"-").concat(rt))})):oe.createElement(Ye.tag,(0,M.Z)({key:It},we(Ye.attrs)),(Ye.children||[]).map(function(Ue,rt){return Ee(Ue,"".concat(It,"-").concat(Ye.tag,"-").concat(rt))}))}function qe(Ye){return(0,y.R_)(Ye)[0]}function Xe(Ye){return Ye?Array.isArray(Ye)?Ye:[Ye]:[]}var ft={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},Ge=` -.anticon { - display: inline-block; - color: inherit; - font-style: normal; - line-height: 0; - text-align: center; - text-transform: none; - vertical-align: -0.125em; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.anticon > * { - line-height: 1; -} - -.anticon svg { - display: inline-block; -} - -.anticon::before { - display: none; -} - -.anticon .anticon-icon { - display: block; -} - -.anticon[tabindex] { - cursor: pointer; -} - -.anticon-spin::before, -.anticon-spin { - display: inline-block; - -webkit-animation: loadingCircle 1s infinite linear; - animation: loadingCircle 1s infinite linear; -} - -@-webkit-keyframes loadingCircle { - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@keyframes loadingCircle { - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -`,lt=function(It){var At=(0,oe.useContext)(re.Z),Ue=At.csp,rt=At.prefixCls,Ze=Ge;rt&&(Ze=Ze.replace(/anticon/g,rt)),(0,oe.useEffect)(function(){var Ct=It.current,st=(0,$.A)(Ct);(0,d.hq)(Ze,"@ant-design-icons",{prepend:!0,csp:Ue,attachTo:st})},[])}},49336:function(Ke,ye){"use strict";var _="*",M=function(){function V(){this._events={}}return V.prototype.on=function(y,d,$){return this._events[y]||(this._events[y]=[]),this._events[y].push({callback:d,once:!!$}),this},V.prototype.once=function(y,d){return this.on(y,d,!0)},V.prototype.emit=function(y){for(var d=this,$=[],X=1;X',function(Ke){try{let le=function(){$||($=!0,y())},ce=function(){try{d.documentElement.doScroll("left")}catch(Ie){return void setTimeout(ce,50)}le()};var oe=le,re=ce,_=(_=document.getElementsByTagName("script"))[_.length-1],ye=_.getAttribute("data-injectcss"),_=_.getAttribute("data-disable-injectsvg");if(!_){var M,V,y,d,$,X=function(we,Ee){Ee.parentNode.insertBefore(we,Ee)};if(ye&&!Ke.__iconfont__svg__cssinject__){Ke.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(Ie){console&&console.log(Ie)}}M=function(){var we,Ee=document.createElement("div");Ee.innerHTML=Ke._iconfont_svg_string_3580659,(Ee=Ee.getElementsByTagName("svg")[0])&&(Ee.setAttribute("aria-hidden","true"),Ee.style.position="absolute",Ee.style.width=0,Ee.style.height=0,Ee.style.overflow="hidden",Ee=Ee,(we=document.body).firstChild?X(Ee,we.firstChild):we.appendChild(Ee))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(M,0):(V=function(){document.removeEventListener("DOMContentLoaded",V,!1),M()},document.addEventListener("DOMContentLoaded",V,!1)):document.attachEvent&&(y=M,d=Ke.document,$=!1,ce(),d.onreadystatechange=function(){d.readyState=="complete"&&(d.onreadystatechange=null,le())})}}catch(le){}}(window)},29075:function(Ke,ye,_){(function(M,V){V(ye,_(60965))})(this,function(M,V){"use strict";var y={draw:"crosshair",pointHover:"pointer",pointDrag:"move",lineHover:"pointer",lineDrag:"move",polygonHover:"pointer",polygonDrag:"move"},d={point:[],line:[],polygon:[],midPoint:[],dashLine:[],text:[]},$="top",X="bottom",oe="right",re="left",le="auto",ce=[$,X,oe,re],Ie="start",we="end",Ee="clippingParents",qe="viewport",Xe="popper",ft="reference",Ge=ce.reduce(function(se,a){return se.concat([a+"-"+Ie,a+"-"+we])},[]),lt=[].concat(ce,[le]).reduce(function(se,a){return se.concat([a,a+"-"+Ie,a+"-"+we])},[]),Ye=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function It(se){return se?(se.nodeName||"").toLowerCase():null}function At(se){if(se==null)return window;if(""+se!="[object Window]"){var a=se.ownerDocument;return a&&a.defaultView||window}return se}function Ue(se){return se instanceof At(se).Element||se instanceof Element}function rt(se){return se instanceof At(se).HTMLElement||se instanceof HTMLElement}function Ze(se){return typeof ShadowRoot!="undefined"&&(se instanceof At(se).ShadowRoot||se instanceof ShadowRoot)}var Ct={name:"applyStyles",enabled:!0,phase:"write",fn:function(se){var a=se.state;Object.keys(a.elements).forEach(function(s){var l=a.styles[s]||{},g=a.attributes[s]||{},P=a.elements[s];rt(P)&&It(P)&&(Object.assign(P.style,l),Object.keys(g).forEach(function(j){var ne=g[j];ne===!1?P.removeAttribute(j):P.setAttribute(j,ne===!0?"":ne)}))})},effect:function(se){var a=se.state,s={popper:{position:a.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(a.elements.popper.style,s.popper),a.styles=s,a.elements.arrow&&Object.assign(a.elements.arrow.style,s.arrow),function(){Object.keys(a.elements).forEach(function(l){var g=a.elements[l],P=a.attributes[l]||{},j=Object.keys(a.styles.hasOwnProperty(l)?a.styles[l]:s[l]).reduce(function(ne,ge){return ne[ge]="",ne},{});rt(g)&&It(g)&&(Object.assign(g.style,j),Object.keys(P).forEach(function(ne){g.removeAttribute(ne)}))})}},requires:["computeStyles"]};function st(se){return se.split("-")[0]}var Et=Math.max,at=Math.min,mt=Math.round;function Mt(){var se=navigator.userAgentData;return se!=null&&se.brands&&Array.isArray(se.brands)?se.brands.map(function(a){return a.brand+"/"+a.version}).join(" "):navigator.userAgent}function Me(){return!/^((?!chrome|android).)*safari/i.test(Mt())}function Ht(se,a,s){a===void 0&&(a=!1),s===void 0&&(s=!1);var l=se.getBoundingClientRect(),g=1,P=1;a&&rt(se)&&(g=se.offsetWidth>0&&mt(l.width)/se.offsetWidth||1,P=se.offsetHeight>0&&mt(l.height)/se.offsetHeight||1);var j=(Ue(se)?At(se):window).visualViewport,ne=!Me()&&s,ge=(l.left+(ne&&j?j.offsetLeft:0))/g,ze=(l.top+(ne&&j?j.offsetTop:0))/P,ht=l.width/g,zt=l.height/P;return{width:ht,height:zt,top:ze,right:ge+ht,bottom:ze+zt,left:ge,x:ge,y:ze}}function Rt(se){var a=Ht(se),s=se.offsetWidth,l=se.offsetHeight;return Math.abs(a.width-s)>1||(s=a.width),Math.abs(a.height-l)>1||(l=a.height),{x:se.offsetLeft,y:se.offsetTop,width:s,height:l}}function vt(se,a){var s=a.getRootNode&&a.getRootNode();if(se.contains(a))return!0;if(s&&Ze(s)){var l=a;do{if(l&&se.isSameNode(l))return!0;l=l.parentNode||l.host}while(l)}return!1}function Je(se){return At(se).getComputedStyle(se)}function Ce(se){return["table","td","th"].indexOf(It(se))>=0}function pt(se){return((Ue(se)?se.ownerDocument:se.document)||window.document).documentElement}function et(se){return It(se)==="html"?se:se.assignedSlot||se.parentNode||(Ze(se)?se.host:null)||pt(se)}function br(se){return rt(se)&&Je(se).position!=="fixed"?se.offsetParent:null}function Jt(se){for(var a=At(se),s=br(se);s&&Ce(s)&&Je(s).position==="static";)s=br(s);return s&&(It(s)==="html"||It(s)==="body"&&Je(s).position==="static")?a:s||function(l){var g=/firefox/i.test(Mt());if(/Trident/i.test(Mt())&&rt(l)&&Je(l).position==="fixed")return null;var P=et(l);for(Ze(P)&&(P=P.host);rt(P)&&0>["html","body"].indexOf(It(P));){var j=Je(P);if(j.transform!=="none"||j.perspective!=="none"||j.contain==="paint"||["transform","perspective"].indexOf(j.willChange)!==-1||g&&j.willChange==="filter"||g&&j.filter&&j.filter!=="none")return P;P=P.parentNode}return null}(se)||a}function Vr(se){return 0>["top","bottom"].indexOf(se)?"y":"x"}function gn(se,a,s){return Et(se,at(a,s))}function yn(se){return Object.assign({},{top:0,right:0,bottom:0,left:0},se)}function _i(se,a){return a.reduce(function(s,l){return s[l]=se,s},{})}var Hn={name:"arrow",enabled:!0,phase:"main",fn:function(se){var a,s=se.state,l=se.name,g=se.options,P=s.elements.arrow,j=s.modifiersData.popperOffsets,ne=st(s.placement),ge=Vr(ne),ze=[re,oe].indexOf(ne)>=0?"height":"width";if(P&&j){var ht=function(Fn,ni){return yn(typeof(Fn=typeof Fn=="function"?Fn(Object.assign({},ni.rects,{placement:ni.placement})):Fn)!="number"?Fn:_i(Fn,ce))}(g.padding,s),zt=Rt(P),qt=ge==="y"?$:re,_r=ge==="y"?X:oe,Rr=s.rects.reference[ze]+s.rects.reference[ge]-j[ge]-s.rects.popper[ze],Kr=j[ge]-s.rects.reference[ge],qr=Jt(P),an=qr?ge==="y"?qr.clientHeight||0:qr.clientWidth||0:0,en=an/2-zt[ze]/2+(Rr/2-Kr/2),Hr=gn(ht[qt],en,an-zt[ze]-ht[_r]);s.modifiersData[l]=((a={})[ge]=Hr,a.centerOffset=Hr-en,a)}},effect:function(se){var a=se.state,s=se.options.element,l=s===void 0?"[data-popper-arrow]":s;l!=null&&(typeof l!="string"||(l=a.elements.popper.querySelector(l)))&&vt(a.elements.popper,l)&&(a.elements.arrow=l)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ln(se){return se.split("-")[1]}var Ia={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Zi(se){var a,s=se.popper,l=se.popperRect,g=se.placement,P=se.variation,j=se.offsets,ne=se.position,ge=se.gpuAcceleration,ze=se.adaptive,ht=se.roundOffsets,zt=se.isFixed,qt=j.x,_r=qt===void 0?0:qt,Rr=j.y,Kr=Rr===void 0?0:Rr,qr=typeof ht=="function"?ht({x:_r,y:Kr}):{x:_r,y:Kr};_r=qr.x,Kr=qr.y;var an=j.hasOwnProperty("x"),en=j.hasOwnProperty("y"),Hr=re,Fn=$,ni=window;if(ze){var Mi=Jt(s),wa="clientHeight",za="clientWidth";Mi===At(s)&&Je(Mi=pt(s)).position!=="static"&&ne==="absolute"&&(wa="scrollHeight",za="scrollWidth"),(g===$||(g===re||g===oe)&&P===we)&&(Fn=X,Kr-=(zt&&Mi===ni&&ni.visualViewport?ni.visualViewport.height:Mi[wa])-l.height,Kr*=ge?1:-1),(g===re||(g===$||g===X)&&P===we)&&(Hr=oe,_r-=(zt&&Mi===ni&&ni.visualViewport?ni.visualViewport.width:Mi[za])-l.width,_r*=ge?1:-1)}var oo,Ds=Object.assign({position:ne},ze&&Ia),lo=ht===!0?function(cs,as){var $s=cs.y,ps=as.devicePixelRatio||1;return{x:mt(cs.x*ps)/ps||0,y:mt($s*ps)/ps||0}}({x:_r,y:Kr},At(s)):{x:_r,y:Kr};return _r=lo.x,Kr=lo.y,Object.assign({},Ds,ge?((oo={})[Fn]=en?"0":"",oo[Hr]=an?"0":"",oo.transform=(ni.devicePixelRatio||1)>1?"translate3d("+_r+"px, "+Kr+"px, 0)":"translate("+_r+"px, "+Kr+"px)",oo):((a={})[Fn]=en?Kr+"px":"",a[Hr]=an?_r+"px":"",a.transform="",a))}var Ua={passive:!0},fa={left:"right",right:"left",bottom:"top",top:"bottom"};function ka(se){return se.replace(/left|right|bottom|top/g,function(a){return fa[a]})}var mo={start:"end",end:"start"};function _n(se){return se.replace(/start|end/g,function(a){return mo[a]})}function yi(se){var a=At(se);return{scrollLeft:a.pageXOffset,scrollTop:a.pageYOffset}}function Zn(se){return Ht(pt(se)).left+yi(se).scrollLeft}function gr(se){var a=Je(se);return/auto|scroll|overlay|hidden/.test(a.overflow+a.overflowY+a.overflowX)}function Ea(se){return 0>["html","body","#document"].indexOf(It(se))?rt(se)&&gr(se)?se:Ea(et(se)):se.ownerDocument.body}function co(se,a){var s;a===void 0&&(a=[]);var l=Ea(se),g=l===((s=se.ownerDocument)==null?void 0:s.body),P=At(l),j=g?[P].concat(P.visualViewport||[],gr(l)?l:[]):l,ne=a.concat(j);return g?ne:ne.concat(co(et(j)))}function Qa(se){return Object.assign({},se,{left:se.x,top:se.y,right:se.x+se.width,bottom:se.y+se.height})}function oa(se,a,s){return a===qe?Qa(function(l,g){var P=At(l),j=pt(l),ne=P.visualViewport,ge=j.clientWidth,ze=j.clientHeight,ht=0,zt=0;if(ne){ge=ne.width,ze=ne.height;var qt=Me();(qt||!qt&&g==="fixed")&&(ht=ne.offsetLeft,zt=ne.offsetTop)}return{width:ge,height:ze,x:ht+Zn(l),y:zt}}(se,s)):Ue(a)?function(l,g){var P=Ht(l,!1,g==="fixed");return P.top=P.top+l.clientTop,P.left=P.left+l.clientLeft,P.bottom=P.top+l.clientHeight,P.right=P.left+l.clientWidth,P.width=l.clientWidth,P.height=l.clientHeight,P.x=P.left,P.y=P.top,P}(a,s):Qa(function(l){var g,P=pt(l),j=yi(l),ne=(g=l.ownerDocument)==null?void 0:g.body,ge=Et(P.scrollWidth,P.clientWidth,ne?ne.scrollWidth:0,ne?ne.clientWidth:0),ze=Et(P.scrollHeight,P.clientHeight,ne?ne.scrollHeight:0,ne?ne.clientHeight:0),ht=-j.scrollLeft+Zn(l),zt=-j.scrollTop;return Je(ne||P).direction==="rtl"&&(ht+=Et(P.clientWidth,ne?ne.clientWidth:0)-ge),{width:ge,height:ze,x:ht,y:zt}}(pt(se)))}function ji(se,a,s,l){var g=a==="clippingParents"?function(ne){var ge=co(et(ne)),ze=["absolute","fixed"].indexOf(Je(ne).position)>=0&&rt(ne)?Jt(ne):ne;return Ue(ze)?ge.filter(function(ht){return Ue(ht)&&vt(ht,ze)&&It(ht)!=="body"}):[]}(se):[].concat(a),P=[].concat(g,[s]),j=P.reduce(function(ne,ge){var ze=oa(se,ge,l);return ne.top=Et(ze.top,ne.top),ne.right=at(ze.right,ne.right),ne.bottom=at(ze.bottom,ne.bottom),ne.left=Et(ze.left,ne.left),ne},oa(se,P[0],l));return j.width=j.right-j.left,j.height=j.bottom-j.top,j.x=j.left,j.y=j.top,j}function so(se){var a,s=se.reference,l=se.element,g=se.placement,P=g?st(g):null,j=g?Ln(g):null,ne=s.x+s.width/2-l.width/2,ge=s.y+s.height/2-l.height/2;switch(P){case $:a={x:ne,y:s.y-l.height};break;case X:a={x:ne,y:s.y+s.height};break;case oe:a={x:s.x+s.width,y:ge};break;case re:a={x:s.x-l.width,y:ge};break;default:a={x:s.x,y:s.y}}var ze=P?Vr(P):null;if(ze!=null){var ht=ze==="y"?"height":"width";switch(j){case Ie:a[ze]=a[ze]-(s[ht]/2-l[ht]/2);break;case we:a[ze]=a[ze]+(s[ht]/2-l[ht]/2)}}return a}function ei(se,a){a===void 0&&(a={});var s=a.placement,l=s===void 0?se.placement:s,g=a.strategy,P=g===void 0?se.strategy:g,j=a.boundary,ne=j===void 0?Ee:j,ge=a.rootBoundary,ze=ge===void 0?qe:ge,ht=a.elementContext,zt=ht===void 0?Xe:ht,qt=a.altBoundary,_r=qt!==void 0&&qt,Rr=a.padding,Kr=Rr===void 0?0:Rr,qr=yn(typeof Kr!="number"?Kr:_i(Kr,ce)),an=se.rects.popper,en=se.elements[_r?zt===Xe?ft:Xe:zt],Hr=ji(Ue(en)?en:en.contextElement||pt(se.elements.popper),ne,ze,P),Fn=Ht(se.elements.reference),ni=so({reference:Fn,element:an,strategy:"absolute",placement:l}),Mi=Qa(Object.assign({},an,ni)),wa=zt===Xe?Mi:Fn,za={top:Hr.top-wa.top+qr.top,bottom:wa.bottom-Hr.bottom+qr.bottom,left:Hr.left-wa.left+qr.left,right:wa.right-Hr.right+qr.right},oo=se.modifiersData.offset;if(zt===Xe&&oo){var Ds=oo[l];Object.keys(za).forEach(function(lo){var cs=0>[oe,X].indexOf(lo)?-1:1;za[lo]+=Ds[0>[$,X].indexOf(lo)?"x":"y"]*cs})}return za}function Kn(se,a){a===void 0&&(a={});var s=a.boundary,l=a.rootBoundary,g=a.padding,P=a.flipVariations,j=a.allowedAutoPlacements,ne=j===void 0?lt:j,ge=Ln(a.placement),ze=ge?P?Ge:Ge.filter(function(qt){return Ln(qt)===ge}):ce,ht=ze.filter(function(qt){return ne.indexOf(qt)>=0});ht.length===0&&(ht=ze);var zt=ht.reduce(function(qt,_r){return qt[_r]=ei(se,{placement:_r,boundary:s,rootBoundary:l,padding:g})[st(_r)],qt},{});return Object.keys(zt).sort(function(qt,_r){return zt[qt]-zt[_r]})}var Jn={name:"flip",enabled:!0,phase:"main",fn:function(se){var a=se.state,s=se.options,l=se.name;if(!a.modifiersData[l]._skip){for(var g=s.mainAxis,P=g===void 0||g,j=s.altAxis,ne=j===void 0||j,ge=s.fallbackPlacements,ze=s.padding,ht=s.boundary,zt=s.rootBoundary,qt=s.altBoundary,_r=s.flipVariations,Rr=_r===void 0||_r,Kr=s.allowedAutoPlacements,qr=a.options.placement,an=st(qr),en=ge||(an===qr||!Rr?[ka(qr)]:function(Zs){if(st(Zs)===le)return[];var Cl=ka(Zs);return[_n(Zs),Cl,_n(Cl)]}(qr)),Hr=[qr].concat(en).reduce(function(Zs,Cl){return Zs.concat(st(Cl)===le?Kn(a,{placement:Cl,boundary:ht,rootBoundary:zt,padding:ze,flipVariations:Rr,allowedAutoPlacements:Kr}):Cl)},[]),Fn=a.rects.reference,ni=a.rects.popper,Mi=new Map,wa=!0,za=Hr[0],oo=0;Hr.length>oo;oo++){var Ds=Hr[oo],lo=st(Ds),cs=Ln(Ds)===Ie,as=[$,X].indexOf(lo)>=0,$s=as?"width":"height",ps=ei(a,{placement:Ds,boundary:ht,rootBoundary:zt,altBoundary:qt,padding:ze}),fs=as?cs?oe:re:cs?X:$;Fn[$s]>ni[$s]&&(fs=ka(fs));var Ks=ka(fs),Ou=[];if(P&&Ou.push(0>=ps[lo]),ne&&Ou.push(0>=ps[fs],0>=ps[Ks]),Ou.every(function(Zs){return Zs})){za=Ds,wa=!1;break}Mi.set(Ds,Ou)}if(wa)for(var wl=function(Zs){var Cl=Hr.find(function(Gf){var ec=Mi.get(Gf);if(ec)return ec.slice(0,Zs).every(function(gc){return gc})});if(Cl)return za=Cl,"break"},wo=Rr?3:1;wo>0&&wl(wo)!=="break";wo--);a.placement!==za&&(a.modifiersData[l]._skip=!0,a.placement=za,a.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function da(se,a,s){return s===void 0&&(s={x:0,y:0}),{top:se.top-a.height-s.y,right:se.right-a.width+s.x,bottom:se.bottom-a.height+s.y,left:se.left-a.width-s.x}}function pa(se){return[$,oe,X,re].some(function(a){return se[a]>=0})}var uo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(se){var a=se.state,s=se.name,l=se.options.offset,g=l===void 0?[0,0]:l,P=lt.reduce(function(ge,ze){return ge[ze]=function(ht,zt,qt){var _r=st(ht),Rr=0>[re,$].indexOf(_r)?1:-1,Kr=typeof qt=="function"?qt(Object.assign({},zt,{placement:ht})):qt,qr=Kr[0],an=Kr[1];return qr=qr||0,an=(an||0)*Rr,0>[re,oe].indexOf(_r)?{x:qr,y:an}:{x:an,y:qr}}(ze,a.rects,g),ge},{}),j=P[a.placement],ne=j.y;a.modifiersData.popperOffsets!=null&&(a.modifiersData.popperOffsets.x+=j.x,a.modifiersData.popperOffsets.y+=ne),a.modifiersData[s]=P}},Ir={name:"preventOverflow",enabled:!0,phase:"main",fn:function(se){var a=se.state,s=se.options,l=se.name,g=s.mainAxis,P=g===void 0||g,j=s.altAxis,ne=j!==void 0&&j,ge=s.tether,ze=ge===void 0||ge,ht=s.tetherOffset,zt=ht===void 0?0:ht,qt=ei(a,{boundary:s.boundary,rootBoundary:s.rootBoundary,padding:s.padding,altBoundary:s.altBoundary}),_r=st(a.placement),Rr=Ln(a.placement),Kr=!Rr,qr=Vr(_r),an=qr==="x"?"y":"x",en=a.modifiersData.popperOffsets,Hr=a.rects.reference,Fn=a.rects.popper,ni=typeof zt=="function"?zt(Object.assign({},a.rects,{placement:a.placement})):zt,Mi=typeof ni=="number"?{mainAxis:ni,altAxis:ni}:Object.assign({mainAxis:0,altAxis:0},ni),wa=a.modifiersData.offset?a.modifiersData.offset[a.placement]:null,za={x:0,y:0};if(en){if(P){var oo,Ds=qr==="y"?$:re,lo=qr==="y"?X:oe,cs=qr==="y"?"height":"width",as=en[qr],$s=as+qt[Ds],ps=as-qt[lo],fs=ze?-Fn[cs]/2:0,Ks=Rr===Ie?Hr[cs]:Fn[cs],Ou=Rr===Ie?-Fn[cs]:-Hr[cs],wl=a.elements.arrow,wo=ze&&wl?Rt(wl):{width:0,height:0},Zs=a.modifiersData["arrow#persistent"]?a.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Cl=Zs[Ds],Gf=Zs[lo],ec=gn(0,Hr[cs],wo[cs]),gc=Kr?Hr[cs]/2-fs-ec-Cl-Mi.mainAxis:Ks-ec-Cl-Mi.mainAxis,$c=Kr?-Hr[cs]/2+fs+ec+Gf+Mi.mainAxis:Ou+ec+Gf+Mi.mainAxis,Lc=a.elements.arrow&&Jt(a.elements.arrow),oh=(oo=wa==null?void 0:wa[qr])!=null?oo:0,Rh=as+$c-oh,ph=gn(ze?at($s,as+gc-oh-(Lc?qr==="y"?Lc.clientTop||0:Lc.clientLeft||0:0)):$s,as,ze?Et(ps,Rh):ps);en[qr]=ph,za[qr]=ph-as}if(ne){var mh,rh=en[an],xf=an==="y"?"height":"width",pc=rh+qt[qr==="x"?$:re],sf=rh-qt[qr==="x"?X:oe],Kl=[$,re].indexOf(_r)!==-1,Hc=(mh=wa==null?void 0:wa[an])!=null?mh:0,Vh=Kl?pc:rh-Hr[xf]-Fn[xf]-Hc+Mi.altAxis,Ad=Kl?rh+Hr[xf]+Fn[xf]-Hc-Mi.altAxis:sf,Oo=ze&&Kl?function(Pc,Nc,mc){var sh=gn(Pc,Nc,mc);return sh>mc?mc:sh}(Vh,rh,Ad):gn(ze?Vh:pc,rh,ze?Ad:sf);en[an]=Oo,za[an]=Oo-rh}a.modifiersData[l]=za}},requiresIfExists:["offset"]};function bt(se,a,s){s===void 0&&(s=!1);var l,g,P=rt(a),j=rt(a)&&function(zt){var qt=zt.getBoundingClientRect(),_r=mt(qt.width)/zt.offsetWidth||1,Rr=mt(qt.height)/zt.offsetHeight||1;return _r!==1||Rr!==1}(a),ne=pt(a),ge=Ht(se,j,s),ze={scrollLeft:0,scrollTop:0},ht={x:0,y:0};return(P||!P&&!s)&&((It(a)!=="body"||gr(ne))&&(ze=(l=a)!==At(l)&&rt(l)?{scrollLeft:(g=l).scrollLeft,scrollTop:g.scrollTop}:yi(l)),rt(a)?((ht=Ht(a,!0)).x+=a.clientLeft,ht.y+=a.clientTop):ne&&(ht.x=Zn(ne))),{x:ge.left+ze.scrollLeft-ht.x,y:ge.top+ze.scrollTop-ht.y,width:ge.width,height:ge.height}}function Yt(se){var a=new Map,s=new Set,l=[];function g(P){s.add(P.name),[].concat(P.requires||[],P.requiresIfExists||[]).forEach(function(j){if(!s.has(j)){var ne=a.get(j);ne&&g(ne)}}),l.push(P)}return se.forEach(function(P){a.set(P.name,P)}),se.forEach(function(P){s.has(P.name)||g(P)}),l}var Pt={placement:"bottom",modifiers:[],strategy:"absolute"};function xr(){for(var se=arguments.length,a=Array(se),s=0;se>s;s++)a[s]=arguments[s];return!a.some(function(l){return!(l&&typeof l.getBoundingClientRect=="function")})}function Tr(se){se===void 0&&(se={});var a=se.defaultModifiers,s=a===void 0?[]:a,l=se.defaultOptions,g=l===void 0?Pt:l;return function(P,j,ne){ne===void 0&&(ne=g);var ge,ze,ht={placement:"bottom",orderedModifiers:[],options:Object.assign({},Pt,g),modifiersData:{},elements:{reference:P,popper:j},attributes:{},styles:{}},zt=[],qt=!1,_r={state:ht,setOptions:function(Kr){var qr=typeof Kr=="function"?Kr(ht.options):Kr;Rr(),ht.options=Object.assign({},g,ht.options,qr),ht.scrollParents={reference:Ue(P)?co(P):P.contextElement?co(P.contextElement):[],popper:co(j)};var an,en,Hr=function(Fn){var ni=Yt(Fn);return Ye.reduce(function(Mi,wa){return Mi.concat(ni.filter(function(za){return za.phase===wa}))},[])}((an=[].concat(s,ht.options.modifiers),en=an.reduce(function(Fn,ni){var Mi=Fn[ni.name];return Fn[ni.name]=Mi?Object.assign({},Mi,ni,{options:Object.assign({},Mi.options,ni.options),data:Object.assign({},Mi.data,ni.data)}):ni,Fn},{}),Object.keys(en).map(function(Fn){return en[Fn]})));return ht.orderedModifiers=Hr.filter(function(Fn){return Fn.enabled}),ht.orderedModifiers.forEach(function(Fn){var ni=Fn.options,Mi=Fn.effect;if(typeof Mi=="function"){var wa=Mi({state:ht,name:Fn.name,instance:_r,options:ni===void 0?{}:ni});zt.push(wa||function(){})}}),_r.update()},forceUpdate:function(){if(!qt){var Kr=ht.elements,qr=Kr.reference,an=Kr.popper;if(xr(qr,an)){ht.rects={reference:bt(qr,Jt(an),ht.options.strategy==="fixed"),popper:Rt(an)},ht.reset=!1,ht.placement=ht.options.placement,ht.orderedModifiers.forEach(function(Mi){return ht.modifiersData[Mi.name]=Object.assign({},Mi.data)});for(var en=0;ht.orderedModifiers.length>en;en++)if(ht.reset!==!0){var Hr=ht.orderedModifiers[en],Fn=Hr.fn,ni=Hr.options;typeof Fn=="function"&&(ht=Fn({state:ht,options:ni===void 0?{}:ni,name:Hr.name,instance:_r})||ht)}else ht.reset=!1,en=-1}}},update:(ge=function(){return new Promise(function(Kr){_r.forceUpdate(),Kr(ht)})},function(){return ze||(ze=new Promise(function(Kr){Promise.resolve().then(function(){ze=void 0,Kr(ge())})})),ze}),destroy:function(){Rr(),qt=!0}};if(!xr(P,j))return _r;function Rr(){zt.forEach(function(Kr){return Kr()}),zt=[]}return _r.setOptions(ne).then(function(Kr){!qt&&ne.onFirstUpdate&&ne.onFirstUpdate(Kr)}),_r}}var hn=Tr({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(se){var a=se.state,s=se.instance,l=se.options,g=l.scroll,P=g===void 0||g,j=l.resize,ne=j===void 0||j,ge=At(a.elements.popper),ze=[].concat(a.scrollParents.reference,a.scrollParents.popper);return P&&ze.forEach(function(ht){ht.addEventListener("scroll",s.update,Ua)}),ne&&ge.addEventListener("resize",s.update,Ua),function(){P&&ze.forEach(function(ht){ht.removeEventListener("scroll",s.update,Ua)}),ne&&ge.removeEventListener("resize",s.update,Ua)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(se){var a=se.state;a.modifiersData[se.name]=so({reference:a.rects.reference,element:a.rects.popper,strategy:"absolute",placement:a.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(se){var a=se.state,s=se.options,l=s.gpuAcceleration,g=l===void 0||l,P=s.adaptive,j=P===void 0||P,ne=s.roundOffsets,ge=ne===void 0||ne,ze={placement:st(a.placement),variation:Ln(a.placement),popper:a.elements.popper,popperRect:a.rects.popper,gpuAcceleration:g,isFixed:a.options.strategy==="fixed"};a.modifiersData.popperOffsets!=null&&(a.styles.popper=Object.assign({},a.styles.popper,Zi(Object.assign({},ze,{offsets:a.modifiersData.popperOffsets,position:a.options.strategy,adaptive:j,roundOffsets:ge})))),a.modifiersData.arrow!=null&&(a.styles.arrow=Object.assign({},a.styles.arrow,Zi(Object.assign({},ze,{offsets:a.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ge})))),a.attributes.popper=Object.assign({},a.attributes.popper,{"data-popper-placement":a.placement})},data:{}},Ct,uo,Jn,Ir,Hn,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(se){var a=se.state,s=se.name,l=a.rects.reference,g=a.rects.popper,P=a.modifiersData.preventOverflow,j=ei(a,{elementContext:"reference"}),ne=ei(a,{altBoundary:!0}),ge=da(j,l),ze=da(ne,g,P),ht=pa(ge),zt=pa(ze);a.modifiersData[s]={referenceClippingOffsets:ge,popperEscapeOffsets:ze,isReferenceHidden:ht,hasPopperEscaped:zt},a.attributes.popper=Object.assign({},a.attributes.popper,{"data-popper-reference-hidden":ht,"data-popper-escaped":zt})}}]}),Cn="tippy-content",tr="tippy-backdrop",jt="tippy-arrow",He="tippy-svg-arrow",We={passive:!0,capture:!0},_t=function(){return document.body};function Zt(se,a,s){if(Array.isArray(se)){var l=se[a];return l==null?Array.isArray(s)?s[a]:s:l}return se}function rr(se,a){var s={}.toString.call(se);return s.indexOf("[object")===0&&s.indexOf(a+"]")>-1}function fr(se,a){return typeof se=="function"?se.apply(void 0,a):se}function mr(se,a){return a===0?se:function(l){clearTimeout(s),s=setTimeout(function(){se(l)},a)};var s}function Qe(se){return[].concat(se)}function er(se,a){se.indexOf(a)===-1&&se.push(a)}function jr(se){return[].slice.call(se)}function on(se){return Object.keys(se).reduce(function(a,s){return se[s]!==void 0&&(a[s]=se[s]),a},{})}function ri(){return document.createElement("div")}function nn(se){return["Element","Fragment"].some(function(a){return rr(se,a)})}function ln(se){return rr(se,"MouseEvent")}function Yn(se){return nn(se)?[se]:function(a){return rr(a,"NodeList")}(se)?jr(se):Array.isArray(se)?se:jr(document.querySelectorAll(se))}function Wn(se,a){se.forEach(function(s){s&&(s.style.transitionDuration=a+"ms")})}function Tn(se,a){se.forEach(function(s){s&&s.setAttribute("data-state",a)})}function ai(se){var a,s=Qe(se)[0];return s!=null&&(a=s.ownerDocument)!=null&&a.body?s.ownerDocument:document}function Ii(se,a,s){var l=a+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(g){se[l](g,s)})}function ki(se,a){for(var s=a;s;){var l;if(se.contains(s))return!0;s=s.getRootNode==null||(l=s.getRootNode())==null?void 0:l.host}return!1}var Fa={isTouch:!1},sa=0;function vo(){Fa.isTouch||(Fa.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ro))}function Ro(){var se=performance.now();20>se-sa&&(Fa.isTouch=!1,document.removeEventListener("mousemove",Ro)),sa=se}function Za(){var se,a=document.activeElement;(se=a)&&se._tippy&&se._tippy.reference===se&&a.blur&&!a._tippy.state.isVisible&&a.blur()}var Os=typeof window!="undefined"&&typeof document!="undefined"&&!!window.msCrypto,ro=Object.assign({appendTo:_t,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Tu=Object.keys(ro);function Do(se){var a=(se.plugins||[]).reduce(function(s,l){var g,P=l.name;return P&&(s[P]=se[P]!==void 0?se[P]:(g=ro[P])!=null?g:l.defaultValue),s},{});return Object.assign({},se,a)}function qa(se,a){var s=Object.assign({},a,{content:fr(a.content,[se])},a.ignoreAttributes?{}:function(l,g){return(g?Object.keys(Do(Object.assign({},ro,{plugins:g}))):Tu).reduce(function(P,j){var ne=(l.getAttribute("data-tippy-"+j)||"").trim();if(!ne)return P;if(j==="content")P[j]=ne;else try{P[j]=JSON.parse(ne)}catch(ge){P[j]=ne}return P},{})}(se,a.plugins));return s.aria=Object.assign({},ro.aria,s.aria),s.aria={expanded:s.aria.expanded==="auto"?a.interactive:s.aria.expanded,content:s.aria.content==="auto"?a.interactive?null:"describedby":s.aria.content},s}var ss=function(){return"innerHTML"};function ca(se,a){se[ss()]=a}function Mn(se){var a=ri();return se===!0?a.className=jt:(a.className=He,nn(se)?a.appendChild(se):ca(a,se)),a}function wi(se,a){nn(a.content)?(ca(se,""),se.appendChild(a.content)):typeof a.content!="function"&&(a.allowHTML?ca(se,a.content):se.textContent=a.content)}function Fu(se){var a=se.firstElementChild,s=jr(a.children);return{box:a,content:s.find(function(l){return l.classList.contains(Cn)}),arrow:s.find(function(l){return l.classList.contains(jt)||l.classList.contains(He)}),backdrop:s.find(function(l){return l.classList.contains(tr)})}}function Hs(se){var a=ri(),s=ri();s.className="tippy-box",s.setAttribute("data-state","hidden"),s.setAttribute("tabindex","-1");var l=ri();function g(P,j){var ne=Fu(a),ge=ne.box,ze=ne.content,ht=ne.arrow;j.theme?ge.setAttribute("data-theme",j.theme):ge.removeAttribute("data-theme"),typeof j.animation=="string"?ge.setAttribute("data-animation",j.animation):ge.removeAttribute("data-animation"),j.inertia?ge.setAttribute("data-inertia",""):ge.removeAttribute("data-inertia"),ge.style.maxWidth=typeof j.maxWidth=="number"?j.maxWidth+"px":j.maxWidth,j.role?ge.setAttribute("role",j.role):ge.removeAttribute("role"),P.content===j.content&&P.allowHTML===j.allowHTML||wi(ze,se.props),j.arrow?ht?P.arrow!==j.arrow&&(ge.removeChild(ht),ge.appendChild(Mn(j.arrow))):ge.appendChild(Mn(j.arrow)):ht&&ge.removeChild(ht)}return l.className=Cn,l.setAttribute("data-state","hidden"),wi(l,se.props),a.appendChild(s),s.appendChild(l),g(se.props,se.props),{popper:a,onUpdate:g}}Hs.$$tippy=!0;var us=1,Ts=[],Qs=[];function ko(se,a){var s,l,g,P,j,ne,ge,ze,ht=qa(se,Object.assign({},ro,Do(on(a)))),zt=!1,qt=!1,_r=!1,Rr=!1,Kr=[],qr=mr(mh,ht.interactiveDebounce),an=us++,en=(ze=ht.plugins).filter(function(Oo,Pc){return ze.indexOf(Oo)===Pc}),Hr={id:an,reference:se,popper:ri(),popperInstance:null,props:ht,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:en,clearDelayTimeouts:function(){clearTimeout(s),clearTimeout(l),cancelAnimationFrame(g)},setProps:function(Oo){if(!Hr.state.isDestroyed){Ks("onBeforeUpdate",[Hr,Oo]),Rh();var Pc=Hr.props,Nc=qa(se,Object.assign({},Pc,on(Oo),{ignoreAttributes:!0}));Hr.props=Nc,oh(),Pc.interactiveDebounce!==Nc.interactiveDebounce&&(wo(),qr=mr(mh,Nc.interactiveDebounce)),Pc.triggerTarget&&!Nc.triggerTarget?Qe(Pc.triggerTarget).forEach(function(mc){mc.removeAttribute("aria-expanded")}):Nc.triggerTarget&&se.removeAttribute("aria-expanded"),wl(),fs(),Mi&&Mi(Pc,Nc),Hr.popperInstance&&(sf(),Hc().forEach(function(mc){requestAnimationFrame(mc._tippy.popperInstance.forceUpdate)})),Ks("onAfterUpdate",[Hr,Oo])}},setContent:function(Oo){Hr.setProps({content:Oo})},show:function(){var Oo=Hr.state.isVisible,Pc=Hr.state.isDestroyed,Nc=!Hr.state.isEnabled,mc=Fa.isTouch&&!Hr.props.touch,sh=Zt(Hr.props.duration,0,ro.duration);if(!(Oo||Pc||Nc||mc)&&!cs().hasAttribute("disabled")&&(Ks("onShow",[Hr],!1),Hr.props.onShow(Hr)!==!1)){if(Hr.state.isVisible=!0,lo()&&(ni.style.visibility="visible"),fs(),ec(),Hr.state.isMounted||(ni.style.transition="none"),lo()){var A=$s();Wn([A.box,A.content],0)}ne=function(){var p;if(Hr.state.isVisible&&!Rr){if(Rr=!0,ni.style.transition=Hr.props.moveTransition,lo()&&Hr.props.animation){var C=$s(),W=C.box,pe=C.content;Wn([W,pe],sh),Tn([W,pe],"visible")}Ou(),wl(),er(Qs,Hr),(p=Hr.popperInstance)==null||p.forceUpdate(),Ks("onMount",[Hr]),Hr.props.animation&&lo()&&function(Te,De){$c(Te,De)}(sh,function(){Hr.state.isShown=!0,Ks("onShown",[Hr])})}},function(){var p,C=Hr.props.appendTo,W=cs();p=Hr.props.interactive&&C===_t||C==="parent"?W.parentNode:fr(C,[W]),p.contains(ni)||p.appendChild(ni),Hr.state.isMounted=!0,sf()}()}},hide:function(){var Oo=!Hr.state.isVisible,Pc=Hr.state.isDestroyed,Nc=!Hr.state.isEnabled,mc=Zt(Hr.props.duration,1,ro.duration);if(!(Oo||Pc||Nc)&&(Ks("onHide",[Hr],!1),Hr.props.onHide(Hr)!==!1)){if(Hr.state.isVisible=!1,Hr.state.isShown=!1,Rr=!1,zt=!1,lo()&&(ni.style.visibility="hidden"),wo(),gc(),fs(!0),lo()){var sh=$s(),A=sh.box,p=sh.content;Hr.props.animation&&(Wn([A,p],mc),Tn([A,p],"hidden"))}Ou(),wl(),Hr.props.animation?lo()&&function(C,W){$c(C,function(){!Hr.state.isVisible&&ni.parentNode&&ni.parentNode.contains(ni)&&W()})}(mc,Hr.unmount):Hr.unmount()}},hideWithInteractivity:function(Oo){as().addEventListener("mousemove",qr),er(Ts,qr),qr(Oo)},enable:function(){Hr.state.isEnabled=!0},disable:function(){Hr.hide(),Hr.state.isEnabled=!1},unmount:function(){Hr.state.isVisible&&Hr.hide(),Hr.state.isMounted&&(Kl(),Hc().forEach(function(Oo){Oo._tippy.unmount()}),ni.parentNode&&ni.parentNode.removeChild(ni),Qs=Qs.filter(function(Oo){return Oo!==Hr}),Hr.state.isMounted=!1,Ks("onHidden",[Hr]))},destroy:function(){Hr.state.isDestroyed||(Hr.clearDelayTimeouts(),Hr.unmount(),Rh(),delete se._tippy,Hr.state.isDestroyed=!0,Ks("onDestroy",[Hr]))}};if(!ht.render)return Hr;var Fn=ht.render(Hr),ni=Fn.popper,Mi=Fn.onUpdate;ni.setAttribute("data-tippy-root",""),ni.id="tippy-"+Hr.id,Hr.popper=ni,se._tippy=Hr,ni._tippy=Hr;var wa=en.map(function(Oo){return Oo.fn(Hr)}),za=se.hasAttribute("aria-expanded");return oh(),wl(),fs(),Ks("onCreate",[Hr]),ht.showOnCreate&&Vh(),ni.addEventListener("mouseenter",function(){Hr.props.interactive&&Hr.state.isVisible&&Hr.clearDelayTimeouts()}),ni.addEventListener("mouseleave",function(){Hr.props.interactive&&Hr.props.trigger.indexOf("mouseenter")>=0&&as().addEventListener("mousemove",qr)}),Hr;function oo(){var Oo=Hr.props.touch;return Array.isArray(Oo)?Oo:[Oo,0]}function Ds(){return oo()[0]==="hold"}function lo(){var Oo;return!((Oo=Hr.props.render)==null||!Oo.$$tippy)}function cs(){return ge||se}function as(){var Oo=cs().parentNode;return Oo?ai(Oo):document}function $s(){return Fu(ni)}function ps(Oo){return Hr.state.isMounted&&!Hr.state.isVisible||Fa.isTouch||P&&P.type==="focus"?0:Zt(Hr.props.delay,Oo?0:1,ro.delay)}function fs(Oo){Oo===void 0&&(Oo=!1),ni.style.pointerEvents=Hr.props.interactive&&!Oo?"":"none",ni.style.zIndex=""+Hr.props.zIndex}function Ks(Oo,Pc,Nc){var mc;Nc===void 0&&(Nc=!0),wa.forEach(function(sh){sh[Oo]&&sh[Oo].apply(sh,Pc)}),Nc&&(mc=Hr.props)[Oo].apply(mc,Pc)}function Ou(){var Oo=Hr.props.aria;if(Oo.content){var Pc="aria-"+Oo.content,Nc=ni.id;Qe(Hr.props.triggerTarget||se).forEach(function(mc){var sh=mc.getAttribute(Pc);if(Hr.state.isVisible)mc.setAttribute(Pc,sh?sh+" "+Nc:Nc);else{var A=sh&&sh.replace(Nc,"").trim();A?mc.setAttribute(Pc,A):mc.removeAttribute(Pc)}})}}function wl(){!za&&Hr.props.aria.expanded&&Qe(Hr.props.triggerTarget||se).forEach(function(Oo){Hr.props.interactive?Oo.setAttribute("aria-expanded",Hr.state.isVisible&&Oo===cs()?"true":"false"):Oo.removeAttribute("aria-expanded")})}function wo(){as().removeEventListener("mousemove",qr),Ts=Ts.filter(function(Oo){return Oo!==qr})}function Zs(Oo){if(!Fa.isTouch||!_r&&Oo.type!=="mousedown"){var Pc=Oo.composedPath&&Oo.composedPath()[0]||Oo.target;if(!Hr.props.interactive||!ki(ni,Pc)){if(Qe(Hr.props.triggerTarget||se).some(function(Nc){return ki(Nc,Pc)})){if(Fa.isTouch||Hr.state.isVisible&&Hr.props.trigger.indexOf("click")>=0)return}else Ks("onClickOutside",[Hr,Oo]);Hr.props.hideOnClick===!0&&(Hr.clearDelayTimeouts(),Hr.hide(),qt=!0,setTimeout(function(){qt=!1}),Hr.state.isMounted||gc())}}}function Cl(){_r=!0}function Gf(){_r=!1}function ec(){var Oo=as();Oo.addEventListener("mousedown",Zs,!0),Oo.addEventListener("touchend",Zs,We),Oo.addEventListener("touchstart",Gf,We),Oo.addEventListener("touchmove",Cl,We)}function gc(){var Oo=as();Oo.removeEventListener("mousedown",Zs,!0),Oo.removeEventListener("touchend",Zs,We),Oo.removeEventListener("touchstart",Gf,We),Oo.removeEventListener("touchmove",Cl,We)}function $c(Oo,Pc){var Nc=$s().box;function mc(sh){sh.target===Nc&&(Ii(Nc,"remove",mc),Pc())}if(Oo===0)return Pc();Ii(Nc,"remove",j),Ii(Nc,"add",mc),j=mc}function Lc(Oo,Pc,Nc){Nc===void 0&&(Nc=!1),Qe(Hr.props.triggerTarget||se).forEach(function(mc){mc.addEventListener(Oo,Pc,Nc),Kr.push({node:mc,eventType:Oo,handler:Pc,options:Nc})})}function oh(){var Oo;Ds()&&(Lc("touchstart",ph,{passive:!0}),Lc("touchend",rh,{passive:!0})),(Oo=Hr.props.trigger,Oo.split(/\s+/).filter(Boolean)).forEach(function(Pc){if(Pc!=="manual")switch(Lc(Pc,ph),Pc){case"mouseenter":Lc("mouseleave",rh);break;case"focus":Lc(Os?"focusout":"blur",xf);break;case"focusin":Lc("focusout",xf)}})}function Rh(){Kr.forEach(function(Oo){Oo.node.removeEventListener(Oo.eventType,Oo.handler,Oo.options)}),Kr=[]}function ph(Oo){var Pc,Nc=!1;if(Hr.state.isEnabled&&!pc(Oo)&&!qt){var mc=((Pc=P)==null?void 0:Pc.type)==="focus";P=Oo,ge=Oo.currentTarget,wl(),!Hr.state.isVisible&&ln(Oo)&&Ts.forEach(function(sh){return sh(Oo)}),Oo.type==="click"&&(0>Hr.props.trigger.indexOf("mouseenter")||zt)&&Hr.props.hideOnClick!==!1&&Hr.state.isVisible?Nc=!0:Vh(Oo),Oo.type==="click"&&(zt=!Nc),Nc&&!mc&&Ad(Oo)}}function mh(Oo){var Pc=Oo.target,Nc=cs().contains(Pc)||ni.contains(Pc);if(Oo.type!=="mousemove"||!Nc){var mc=Hc().concat(ni).map(function(sh){var A,p=(A=sh._tippy.popperInstance)==null?void 0:A.state;return p?{popperRect:sh.getBoundingClientRect(),popperState:p,props:ht}:null}).filter(Boolean);(function(sh,A){var p=A.clientX,C=A.clientY;return sh.every(function(W){var pe=W.popperRect,Te=W.popperState,De=W.props.interactiveBorder,dt=Te.placement.split("-")[0],Ot=Te.modifiersData.offset;return!Ot||pe.top-C+(dt==="bottom"?Ot.top.y:0)>De||C-pe.bottom-(dt==="top"?Ot.bottom.y:0)>De||pe.left-p+(dt==="right"?Ot.left.x:0)>De||p-pe.right-(dt==="left"?Ot.right.x:0)>De})})(mc,Oo)&&(wo(),Ad(Oo))}}function rh(Oo){pc(Oo)||Hr.props.trigger.indexOf("click")>=0&&zt||(Hr.props.interactive?Hr.hideWithInteractivity(Oo):Ad(Oo))}function xf(Oo){0>Hr.props.trigger.indexOf("focusin")&&Oo.target!==cs()||Hr.props.interactive&&Oo.relatedTarget&&ni.contains(Oo.relatedTarget)||Ad(Oo)}function pc(Oo){return!!Fa.isTouch&&Ds()!==Oo.type.indexOf("touch")>=0}function sf(){Kl();var Oo=Hr.props,Pc=Oo.popperOptions,Nc=Oo.placement,mc=Oo.offset,sh=Oo.getReferenceClientRect,A=Oo.moveTransition,p=lo()?Fu(ni).arrow:null,C=sh?{getBoundingClientRect:sh,contextElement:sh.contextElement||cs()}:se,W={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Te){var De=Te.state;if(lo()){var dt=$s().box;["placement","reference-hidden","escaped"].forEach(function(Ot){Ot==="placement"?dt.setAttribute("data-placement",De.placement):De.attributes.popper["data-popper-"+Ot]?dt.setAttribute("data-"+Ot,""):dt.removeAttribute("data-"+Ot)}),De.attributes.popper={}}}},pe=[{name:"offset",options:{offset:mc}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!A}},W];lo()&&p&&pe.push({name:"arrow",options:{element:p,padding:3}}),pe.push.apply(pe,(Pc==null?void 0:Pc.modifiers)||[]),Hr.popperInstance=hn(C,ni,Object.assign({},Pc,{placement:Nc,onFirstUpdate:ne,modifiers:pe}))}function Kl(){Hr.popperInstance&&(Hr.popperInstance.destroy(),Hr.popperInstance=null)}function Hc(){return jr(ni.querySelectorAll("[data-tippy-root]"))}function Vh(Oo){Hr.clearDelayTimeouts(),Oo&&Ks("onTrigger",[Hr,Oo]),ec();var Pc=ps(!0),Nc=oo(),mc=Nc[1];Fa.isTouch&&Nc[0]==="hold"&&mc&&(Pc=mc),Pc?s=setTimeout(function(){Hr.show()},Pc):Hr.show()}function Ad(Oo){if(Hr.clearDelayTimeouts(),Ks("onUntrigger",[Hr,Oo]),Hr.state.isVisible){if(0>Hr.props.trigger.indexOf("mouseenter")||0>Hr.props.trigger.indexOf("click")||0>["mouseleave","mousemove"].indexOf(Oo.type)||!zt){var Pc=ps(!1);Pc?l=setTimeout(function(){Hr.state.isVisible&&Hr.hide()},Pc):g=requestAnimationFrame(function(){Hr.hide()})}}else gc()}}function _o(se,a){a===void 0&&(a={});var s=ro.plugins.concat(a.plugins||[]);document.addEventListener("touchstart",vo,We),window.addEventListener("blur",Za);var l=Object.assign({},a,{plugins:s}),g=Yn(se).reduce(function(P,j){var ne=j&&ko(j,l);return ne&&P.push(ne),P},[]);return nn(se)?g[0]:g}_o.defaultProps=ro,_o.setDefaultProps=function(se){Object.keys(se).forEach(function(a){ro[a]=se[a]})},_o.currentInput=Fa,Object.assign({},Ct,{effect:function(se){var a=se.state,s={popper:{position:a.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(a.elements.popper.style,s.popper),a.styles=s,a.elements.arrow&&Object.assign(a.elements.arrow.style,s.arrow)}});var Js={clientX:0,clientY:0},fo=[];function El(se){Js={clientX:se.clientX,clientY:se.clientY}}var ju={name:"followCursor",defaultValue:!1,fn:function(se){var a=se.reference,s=ai(se.props.triggerTarget||a),l=!1,g=!1,P=!0,j=se.props;function ne(){return se.props.followCursor==="initial"&&se.state.isVisible}function ge(){s.addEventListener("mousemove",zt)}function ze(){s.removeEventListener("mousemove",zt)}function ht(){l=!0,se.setProps({getReferenceClientRect:null}),l=!1}function zt(Rr){var Kr=!Rr.target||a.contains(Rr.target),qr=se.props.followCursor,an=Rr.clientX,en=Rr.clientY,Hr=a.getBoundingClientRect(),Fn=an-Hr.left,ni=en-Hr.top;!Kr&&se.props.interactive||se.setProps({getReferenceClientRect:function(){var Mi=a.getBoundingClientRect(),wa=an,za=en;qr==="initial"&&(wa=Mi.left+Fn,za=Mi.top+ni);var oo=qr==="horizontal"?Mi.top:za,Ds=qr==="vertical"?Mi.right:wa,lo=qr==="horizontal"?Mi.bottom:za,cs=qr==="vertical"?Mi.left:wa;return{width:Ds-cs,height:lo-oo,top:oo,right:Ds,bottom:lo,left:cs}}})}function qt(){se.props.followCursor&&(fo.push({instance:se,doc:s}),function(Rr){Rr.addEventListener("mousemove",El)}(s))}function _r(){(fo=fo.filter(function(Rr){return Rr.instance!==se})).filter(function(Rr){return Rr.doc===s}).length===0&&function(Rr){Rr.removeEventListener("mousemove",El)}(s)}return{onCreate:qt,onDestroy:_r,onBeforeUpdate:function(){j=se.props},onAfterUpdate:function(Rr,Kr){var qr=Kr.followCursor;l||qr!==void 0&&j.followCursor!==qr&&(_r(),qr?(qt(),!se.state.isMounted||g||ne()||ge()):(ze(),ht()))},onMount:function(){se.props.followCursor&&!g&&(P&&(zt(Js),P=!1),ne()||ge())},onTrigger:function(Rr,Kr){ln(Kr)&&(Js={clientX:Kr.clientX,clientY:Kr.clientY}),g=Kr.type==="focus"},onHidden:function(){se.props.followCursor&&(ht(),ze(),P=!0)}}}};_o.setDefaultProps({render:Hs});var _l,Es,yc,Vl,tc,Au,On={showTotalDistance:!1,showDashDistance:!0,showWhen:["normal","active"],format:function(se){return 1e3>se?+se.toFixed(2)+"m":+(se/1e3).toFixed(2)+"km"}},tn={showWhen:["normal","active"],format:function(se){return se>1e6?"".concat(+(se/1e6).toFixed(2),"km\xB2"):"".concat(+se.toFixed(2),"m\xB2")}},Pi={maxSize:100},ut={remove:["del","backspace"],revert:["command+z","ctrl+z"],redo:["command+shift+z","ctrl+shift+z"]},Wt={allowHTML:!0,followCursor:!0,placement:"bottom-start",offset:[-10,20],plugins:[ju],trigger:"manual",hideOnClick:!1,theme:"light"},wr={data:"drawData",pointAdsorbPixel:12,lineAdsorbPixel:10};function bn(se,a){var s=Object.keys(se);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(se);a&&(l=l.filter(function(g){return Object.getOwnPropertyDescriptor(se,g).enumerable})),s.push.apply(s,l)}return s}function vn(se){for(var a=1;arguments.length>a;a++){var s=arguments[a]!=null?arguments[a]:{};a%2?bn(Object(s),!0).forEach(function(l){zr(se,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(se,Object.getOwnPropertyDescriptors(s)):bn(Object(s)).forEach(function(l){Object.defineProperty(se,l,Object.getOwnPropertyDescriptor(s,l))})}return se}function Xi(se){return Xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Xi(se)}function ya(se,a){if(!(se instanceof a))throw new TypeError("Cannot call a class as a function")}function Bo(se,a){for(var s=0;a.length>s;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(se,ra(l.key),l)}}function xn(se,a,s){return a&&Bo(se.prototype,a),s&&Bo(se,s),Object.defineProperty(se,"prototype",{writable:!1}),se}function zr(se,a,s){return(a=ra(a))in se?Object.defineProperty(se,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):se[a]=s,se}function xt(se,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");se.prototype=Object.create(a&&a.prototype,{constructor:{value:se,writable:!0,configurable:!0}}),Object.defineProperty(se,"prototype",{writable:!1}),a&&lr(se,a)}function Nt(se){return Nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Nt(se)}function lr(se,a){return lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s},lr(se,a)}function $r(se){if(se===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return se}function Yr(se){var a=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}();return function(){var s,l=Nt(se);if(a){var g=Nt(this).constructor;s=Reflect.construct(l,arguments,g)}else s=l.apply(this,arguments);return function(P,j){if(j&&(typeof j=="object"||typeof j=="function"))return j;if(j!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $r(P)}(this,s)}}function un(){return un=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(se,a,s){var l=function(P,j){for(;!Object.prototype.hasOwnProperty.call(P,j)&&(P=Nt(P))!==null;);return P}(se,a);if(l){var g=Object.getOwnPropertyDescriptor(l,a);return g.get?g.get.call(3>arguments.length?se:s):g.value}},un.apply(this,arguments)}function Sn(se,a){return function(s){if(Array.isArray(s))return s}(se)||function(s,l){var g=s==null?null:typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(g!=null){var P,j,ne,ge,ze=[],ht=!0,zt=!1;try{if(ne=(g=g.call(s)).next,l===0){if(Object(g)!==g)return;ht=!1}else for(;!(ht=(P=ne.call(g)).done)&&(ze.push(P.value),ze.length!==l);ht=!0);}catch(qt){zt=!0,j=qt}finally{try{if(!ht&&g.return!=null&&(ge=g.return(),Object(ge)!==ge))return}finally{if(zt)throw j}}return ze}}(se,a)||ti(se,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function qn(se){return function(a){if(Array.isArray(a))return Ui(a)}(se)||function(a){if(typeof Symbol!="undefined"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}(se)||ti(se)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ti(se,a){if(se){if(typeof se=="string")return Ui(se,a);var s=Object.prototype.toString.call(se).slice(8,-1);return s==="Object"&&se.constructor&&(s=se.constructor.name),s==="Map"||s==="Set"?Array.from(se):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?Ui(se,a):void 0}}function Ui(se,a){(a==null||a>se.length)&&(a=se.length);for(var s=0,l=Array(a);a>s;s++)l[s]=se[s];return l}function ra(se){var a=function(s,l){if(typeof s!="object"||s===null)return s;var g=s[Symbol.toPrimitive];if(g!==void 0){var P=g.call(s,l||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(s)}(se,"string");return typeof a=="symbol"?a:a+""}(_l=M.DrawEvent||(M.DrawEvent={})).Init="init",_l.Destroy="destroy",_l.Enable="enable",_l.Disable="disable",_l.Add="add",_l.Edit="edit",_l.Remove="remove",_l.Clear="clear",_l.Change="change",_l.DragStart="dragStart",_l.Dragging="dragging",_l.DragEnd="dragEnd",_l.Select="select",_l.AddNode="addNode",_l.RemoveNode="removeNode",(Es=M.SourceEvent||(M.SourceEvent={})).Change="change",Es.Update="update",(yc=M.RenderEvent||(M.RenderEvent={})).Click="click",yc.UnClick="unclick",yc.Dragstart="dragstart",yc.Mousemove="mousemove",yc.Mouseout="mouseout",yc.Dragging="dragging",yc.Dragend="dragend",yc.DblClick="dblClick",yc.Contextmenu="contextmenu",(Vl=M.LayerEvent||(M.LayerEvent={})).Mousedown="mousedown",Vl.Mouseup="mouseup",Vl.Click="click",Vl.UnClick="unclick",Vl.Dblclick="dblclick",Vl.Mousemove="mousemove",Vl.Mouseover="mouseover",Vl.Mouseenter="mouseenter",Vl.Mouseleave="mouseleave",Vl.Mouseout="mouseout",Vl.Contextmenu="contextmenu",(tc=M.SceneEvent||(M.SceneEvent={})).Loaded="loaded",tc.MapMove="mapmove",tc.MoveStart="movestart",tc.MoveEnd="moveend",tc.ZoomChange="zoomchange",tc.ZoomStart="zoomstart",tc.ZoomEnd="zoomend",tc.Click="click",tc.Dblclick="dblclick",tc.Mousemove="mousemove",tc.Mousewheel="mousewheel",tc.Mouseover="mouseover",tc.Mouseout="mouseout",tc.Mouseup="mouseup",tc.Mousedown="mousedown",tc.Contextmenu="contextmenu",tc.Dragstart="dragstart",tc.Dragging="dragging",tc.Dragend="dragend",(Au=M.ControlEvent||(M.ControlEvent={})).DrawChange="drawchange",Au.DataChange="datachange",Au.DrawSelect="drawselect",Au.DrawClear="drawclear";var ia=63710088e-1,vi={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260511392e-6,inches:39.37*ia,kilometers:6371.0088,kilometres:6371.0088,meters:ia,metres:ia,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:ia/1852,radians:1,yards:6967335223679999e-9},gi={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function ma(se,a,s){s===void 0&&(s={});var l={type:"Feature"};return(s.id===0||s.id)&&(l.id=s.id),s.bbox&&(l.bbox=s.bbox),l.properties=a||{},l.geometry=se,l}function Yi(se,a,s){if(s===void 0&&(s={}),!se)throw Error("coordinates is required");if(!Array.isArray(se))throw Error("coordinates must be an Array");if(2>se.length)throw Error("coordinates must be at least 2 numbers long");if(!js(se[0])||!js(se[1]))throw Error("coordinates must contain numbers");return ma({type:"Point",coordinates:se},a,s)}function ua(se,a,s){s===void 0&&(s={});for(var l=0,g=se;g.length>l;l++){var P=g[l];if(4>P.length)throw Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var j=0;P[P.length-1].length>j;j++)if(P[P.length-1][j]!==P[0][j])throw Error("First and last Position are not equivalent.")}return ma({type:"Polygon",coordinates:se},a,s)}function La(se,a,s){if(s===void 0&&(s={}),2>se.length)throw Error("coordinates must be an array of two or more positions");return ma({type:"LineString",coordinates:se},a,s)}function aa(se,a){a===void 0&&(a={});var s={type:"FeatureCollection"};return a.id&&(s.id=a.id),a.bbox&&(s.bbox=a.bbox),s.features=se,s}function ho(se,a,s){return s===void 0&&(s={}),ma({type:"MultiLineString",coordinates:se},a,s)}function Po(se,a,s){return s===void 0&&(s={}),ma({type:"MultiPoint",coordinates:se},a,s)}function Ms(se,a,s){return s===void 0&&(s={}),ma({type:"MultiPolygon",coordinates:se},a,s)}function Mu(se,a){a===void 0&&(a="kilometers");var s=vi[a];if(!s)throw Error(a+" units is invalid");return se*s}function vs(se,a){a===void 0&&(a="kilometers");var s=vi[a];if(!s)throw Error(a+" units is invalid");return se/s}function Xs(se){return 180*(se%(2*Math.PI))/Math.PI}function iu(se){return se%360*Math.PI/180}function js(se){return!isNaN(se)&&se!==null&&!Array.isArray(se)}function Vs(se){return!!se&&se.constructor===Object}var sl=Object.freeze({__proto__:null,earthRadius:ia,factors:vi,unitsFactors:{centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/ia,yards:1.0936133},areaFactors:gi,feature:ma,geometry:function(se,a,s){switch(se){case"Point":return Yi(a).geometry;case"LineString":return La(a).geometry;case"Polygon":return ua(a).geometry;case"MultiPoint":return Po(a).geometry;case"MultiLineString":return ho(a).geometry;case"MultiPolygon":return Ms(a).geometry;default:throw Error(se+" is invalid")}},point:Yi,points:function(se,a,s){return s===void 0&&(s={}),aa(se.map(function(l){return Yi(l,a)}),s)},polygon:ua,polygons:function(se,a,s){return s===void 0&&(s={}),aa(se.map(function(l){return ua(l,a)}),s)},lineString:La,lineStrings:function(se,a,s){return s===void 0&&(s={}),aa(se.map(function(l){return La(l,a)}),s)},featureCollection:aa,multiLineString:ho,multiPoint:Po,multiPolygon:Ms,geometryCollection:function(se,a,s){return s===void 0&&(s={}),ma({type:"GeometryCollection",geometries:se},a,s)},round:function(se,a){if(a===void 0&&(a=0),a&&a<0)throw Error("precision must be a positive number");var s=Math.pow(10,a||0);return Math.round(se*s)/s},radiansToLength:Mu,lengthToRadians:vs,lengthToDegrees:function(se,a){return Xs(vs(se,a))},bearingToAzimuth:function(se){var a=se%360;return 0>a&&(a+=360),a},radiansToDegrees:Xs,degreesToRadians:iu,convertLength:function(se,a,s){if(a===void 0&&(a="kilometers"),s===void 0&&(s="kilometers"),se<0)throw Error("length must be a positive number");return Mu(vs(se,a),s)},convertArea:function(se,a,s){if(a===void 0&&(a="meters"),s===void 0&&(s="kilometers"),se<0)throw Error("area must be a positive number");var l=gi[a];if(!l)throw Error("invalid original units");var g=gi[s];if(!g)throw Error("invalid final units");return se/l*g},isNumber:js,isObject:Vs,validateBBox:function(se){if(!se)throw Error("bbox is required");if(!Array.isArray(se))throw Error("bbox must be an Array");if(se.length!==4&&se.length!==6)throw Error("bbox must be an Array of 4 or 6 numbers");se.forEach(function(a){if(!js(a))throw Error("bbox must only contain numbers")})},validateId:function(se){if(!se)throw Error("id is required");if(["string","number"].indexOf(typeof se)===-1)throw Error("id must be a number or a string")}});function al(se,a,s){if(se!==null)for(var l,g,P,j,ne,ge,ze,ht,zt=0,qt=0,_r=se.type,Rr=_r==="FeatureCollection",Kr=_r==="Feature",qr=Rr?se.features.length:1,an=0;qr>an;an++){ne=(ht=!!(ze=Rr?se.features[an].geometry:Kr?se.geometry:se)&&ze.type==="GeometryCollection")?ze.geometries.length:1;for(var en=0;ne>en;en++){var Hr=0,Fn=0;if((j=ht?ze.geometries[en]:ze)!==null){ge=j.coordinates;var ni=j.type;switch(zt=!s||ni!=="Polygon"&&ni!=="MultiPolygon"?0:1,ni){case null:break;case"Point":if(a(ge,qt,an,Hr,Fn)===!1)return!1;qt++,Hr++;break;case"LineString":case"MultiPoint":for(l=0;ge.length>l;l++){if(a(ge[l],qt,an,Hr,Fn)===!1)return!1;qt++,ni==="MultiPoint"&&Hr++}ni==="LineString"&&Hr++;break;case"Polygon":case"MultiLineString":for(l=0;ge.length>l;l++){for(g=0;ge[l].length-zt>g;g++){if(a(ge[l][g],qt,an,Hr,Fn)===!1)return!1;qt++}ni==="MultiLineString"&&Hr++,ni==="Polygon"&&Fn++}ni==="Polygon"&&Hr++;break;case"MultiPolygon":for(l=0;ge.length>l;l++){for(Fn=0,g=0;ge[l].length>g;g++){for(P=0;ge[l][g].length-zt>P;P++){if(a(ge[l][g][P],qt,an,Hr,Fn)===!1)return!1;qt++}Fn++}Hr++}break;case"GeometryCollection":for(l=0;j.geometries.length>l;l++)if(al(j.geometries[l],a,s)===!1)return!1;break;default:throw Error("Unknown Geometry Type")}}}}}function ul(se,a){var s;switch(se.type){case"FeatureCollection":for(s=0;se.features.length>s&&a(se.features[s].properties,s)!==!1;s++);break;case"Feature":a(se.properties,0)}}function _c(se,a){if(se.type==="Feature")a(se,0);else if(se.type==="FeatureCollection")for(var s=0;se.features.length>s&&a(se.features[s],s)!==!1;s++);}function Yo(se){var a=[];return al(se,function(s){a.push(s)}),a}function No(se,a){var s,l,g,P,j,ne,ge,ze,ht,zt,qt=0,_r=se.type==="FeatureCollection",Rr=se.type==="Feature",Kr=_r?se.features.length:1;for(s=0;Kr>s;s++){for(ze=_r?se.features[s].properties:Rr?se.properties:{},ht=_r?se.features[s].bbox:Rr?se.bbox:void 0,zt=_r?se.features[s].id:Rr?se.id:void 0,j=(ge=!!(ne=_r?se.features[s].geometry:Rr?se.geometry:se)&&ne.type==="GeometryCollection")?ne.geometries.length:1,g=0;j>g;g++)if((P=ge?ne.geometries[g]:ne)!==null)switch(P.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(a(P,qt,ze,ht,zt)===!1)return!1;break;case"GeometryCollection":for(l=0;P.geometries.length>l;l++)if(a(P.geometries[l],qt,ze,ht,zt)===!1)return!1;break;default:throw Error("Unknown Geometry Type")}else if(a(null,qt,ze,ht,zt)===!1)return!1;qt++}}function Ku(se,a,s){var l=s;return No(se,function(g,P,j,ne,ge){l=P===0&&s===void 0?g:a(l,g,P,j,ne,ge)}),l}function Rc(se,a){No(se,function(s,l,g,P,j){var ne,ge=s===null?null:s.type;switch(ge){case null:case"Point":case"LineString":case"Polygon":return a(ma(s,g,{bbox:P,id:j}),l,0)!==!1&&void 0}switch(ge){case"MultiPoint":ne="Point";break;case"MultiLineString":ne="LineString";break;case"MultiPolygon":ne="Polygon"}for(var ze=0;s.coordinates.length>ze;ze++)if(a(ma({type:ne,coordinates:s.coordinates[ze]},g),l,ze)===!1)return!1})}function Wa(se,a){Rc(se,function(s,l,g){var P=0;if(s.geometry){var j=s.geometry.type;if(j!=="Point"&&j!=="MultiPoint"){var ne,ge=0,ze=0,ht=0;return al(s,function(zt,qt,_r,Rr,Kr){if(ne===void 0||l>ge||Rr>ze||Kr>ht)return ne=zt,ge=l,ze=Rr,ht=Kr,void(P=0);var qr=La([ne,zt],s.properties);if(a(qr,l,g,Kr,P)===!1)return!1;P++,ne=zt})!==!1&&void 0}}})}function mf(se,a,s){var l=s,g=!1;return Wa(se,function(P,j,ne,ge,ze){l=g===!1&&s===void 0?P:a(l,P,j,ne,ge,ze),g=!0}),l}function yf(se,a){if(!se)throw Error("geojson is required");Rc(se,function(s,l,g){if(s.geometry!==null){var P=s.geometry.coordinates;switch(s.geometry.type){case"LineString":if(a(s,l,g,0,0)===!1)return!1;break;case"Polygon":for(var j=0;P.length>j;j++)if(a(La(P[j],s.properties),l,g,j)===!1)return!1}}})}var yl=Object.freeze({__proto__:null,coordAll:Yo,coordEach:al,coordReduce:function(se,a,s,l){var g=s;return al(se,function(P,j,ne,ge,ze){g=j===0&&s===void 0?P:a(g,P,j,ne,ge,ze)},l),g},featureEach:_c,featureReduce:function(se,a,s){var l=s;return _c(se,function(g,P){l=P===0&&s===void 0?g:a(l,g,P)}),l},findPoint:function(se,a){if(!Vs(a=a||{}))throw Error("options is invalid");var s,l=a.featureIndex||0,g=a.multiFeatureIndex||0,P=a.geometryIndex||0,j=a.coordIndex||0,ne=a.properties;switch(se.type){case"FeatureCollection":0>l&&(l=se.features.length+l),ne=ne||se.features[l].properties,s=se.features[l].geometry;break;case"Feature":ne=ne||se.properties,s=se.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":s=se;break;default:throw Error("geojson is invalid")}if(s===null)return null;var ge=s.coordinates;switch(s.type){case"Point":return Yi(ge,ne,a);case"MultiPoint":return 0>g&&(g=ge.length+g),Yi(ge[g],ne,a);case"LineString":return 0>j&&(j=ge.length+j),Yi(ge[j],ne,a);case"Polygon":return 0>P&&(P=ge.length+P),0>j&&(j=ge[P].length+j),Yi(ge[P][j],ne,a);case"MultiLineString":return 0>g&&(g=ge.length+g),0>j&&(j=ge[g].length+j),Yi(ge[g][j],ne,a);case"MultiPolygon":return 0>g&&(g=ge.length+g),0>P&&(P=ge[g].length+P),0>j&&(j=ge[g][P].length-j),Yi(ge[g][P][j],ne,a)}throw Error("geojson is invalid")},findSegment:function(se,a){if(!Vs(a=a||{}))throw Error("options is invalid");var s,l=a.featureIndex||0,g=a.multiFeatureIndex||0,P=a.geometryIndex||0,j=a.segmentIndex||0,ne=a.properties;switch(se.type){case"FeatureCollection":0>l&&(l=se.features.length+l),ne=ne||se.features[l].properties,s=se.features[l].geometry;break;case"Feature":ne=ne||se.properties,s=se.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":s=se;break;default:throw Error("geojson is invalid")}if(s===null)return null;var ge=s.coordinates;switch(s.type){case"Point":case"MultiPoint":return null;case"LineString":return 0>j&&(j=ge.length+j-1),La([ge[j],ge[j+1]],ne,a);case"Polygon":return 0>P&&(P=ge.length+P),0>j&&(j=ge[P].length+j-1),La([ge[P][j],ge[P][j+1]],ne,a);case"MultiLineString":return 0>g&&(g=ge.length+g),0>j&&(j=ge[g].length+j-1),La([ge[g][j],ge[g][j+1]],ne,a);case"MultiPolygon":return 0>g&&(g=ge.length+g),0>P&&(P=ge[g].length+P),0>j&&(j=ge[g][P].length-j-1),La([ge[g][P][j],ge[g][P][j+1]],ne,a)}throw Error("geojson is invalid")},flattenEach:Rc,flattenReduce:function(se,a,s){var l=s;return Rc(se,function(g,P,j){l=P===0&&j===0&&s===void 0?g:a(l,g,P,j)}),l},geomEach:No,geomReduce:Ku,lineEach:yf,lineReduce:function(se,a,s){var l=s;return yf(se,function(g,P,j,ne){l=P===0&&s===void 0?g:a(l,g,P,j,ne)}),l},propEach:ul,propReduce:function(se,a,s){var l=s;return ul(se,function(g,P){l=P===0&&s===void 0?g:a(l,g,P)}),l},segmentEach:Wa,segmentReduce:mf});function Ec(se){var a=[1/0,1/0,-1/0,-1/0];return al(se,function(s){a[0]>s[0]&&(a[0]=s[0]),a[1]>s[1]&&(a[1]=s[1]),s[0]>a[2]&&(a[2]=s[0]),s[1]>a[3]&&(a[3]=s[1])}),a}Ec.default=Ec;var Zf=Object.freeze({__proto__:null,default:Ec});function Vu(se){if(!se)throw Error("coord is required");if(!Array.isArray(se)){if(se.type==="Feature"&&se.geometry!==null&&se.geometry.type==="Point")return se.geometry.coordinates;if(se.type==="Point")return se.coordinates}if(Array.isArray(se)&&se.length>=2&&!Array.isArray(se[0])&&!Array.isArray(se[1]))return se;throw Error("coord must be GeoJSON Point or an Array of numbers")}function lc(se){if(Array.isArray(se))return se;if(se.type==="Feature"){if(se.geometry!==null)return se.geometry.coordinates}else if(se.coordinates)return se.coordinates;throw Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function fl(se){return se.type==="Feature"?se.geometry:se}function lf(se,a){return se.type==="FeatureCollection"?"FeatureCollection":se.type==="GeometryCollection"?"GeometryCollection":se.type==="Feature"&&se.geometry!==null?se.geometry.type:se.type}function gu(se,a,s,l,g){Pu(se,a,s||0,l||se.length-1,g||zu)}function Pu(se,a,s,l,g){for(;l>s;){if(l-s>600){var P=l-s+1,j=a-s+1,ne=Math.log(P),ge=.5*Math.exp(2*ne/3),ze=.5*Math.sqrt(ne*ge*(P-ge)/P)*(0>j-P/2?-1:1);Pu(se,a,Math.max(s,Math.floor(a-j*ge/P+ze)),Math.min(l,Math.floor(a+(P-j)*ge/P+ze)),g)}var ht=se[a],zt=s,qt=l;for(Co(se,s,a),g(se[l],ht)>0&&Co(se,s,l);qt>zt;){for(Co(se,zt,qt),zt++,qt--;0>g(se[zt],ht);)zt++;for(;g(se[qt],ht)>0;)qt--}g(se[s],ht)===0?Co(se,s,qt):Co(se,++qt,l),qt>a||(s=qt+1),a>qt||(l=qt-1)}}function Co(se,a,s){var l=se[a];se[a]=se[s],se[s]=l}function zu(se,a){return a>se?-1:se>a?1:0}function Zu(se,a,s){if(!s)return a.indexOf(se);for(let l=0;a.length>l;l++)if(s(se,a[l]))return l;return-1}function St(se,a){qu(se,0,se.children.length,a,se)}function qu(se,a,s,l,g){g||(g=Gl(null)),g.minX=1/0,g.minY=1/0,g.maxX=-1/0,g.maxY=-1/0;for(let P=a;s>P;P++){const j=se.children[P];hl(g,se.leaf?l(j):j)}return g}function hl(se,a){return se.minX=Math.min(se.minX,a.minX),se.minY=Math.min(se.minY,a.minY),se.maxX=Math.max(se.maxX,a.maxX),se.maxY=Math.max(se.maxY,a.maxY),se}function rc(se,a){return se.minX-a.minX}function bs(se,a){return se.minY-a.minY}function Il(se){return(se.maxX-se.minX)*(se.maxY-se.minY)}function ks(se){return se.maxX-se.minX+(se.maxY-se.minY)}function au(se,a){const s=Math.max(se.minX,a.minX),l=Math.max(se.minY,a.minY),g=Math.min(se.maxX,a.maxX),P=Math.min(se.maxY,a.maxY);return Math.max(0,g-s)*Math.max(0,P-l)}function Al(se,a){return!(se.minX>a.minX||se.minY>a.minY||a.maxX>se.maxX||a.maxY>se.maxY)}function cc(se,a){return!(a.minX>se.maxX||a.minY>se.maxY||se.minX>a.maxX||se.minY>a.maxY)}function Gl(se){return{children:se,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function yh(se,a,s,l,g){const P=[a,s];for(;P.length;){if(l>=(s=P.pop())-(a=P.pop()))continue;const j=a+Math.ceil((s-a)/l/2)*l;gu(se,j,a,s,g),P.push(a,j,j,s)}}var ah=Object.freeze({__proto__:null,default:class{constructor(se=9){this._maxEntries=Math.max(4,se),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(se){let a=this.data;const s=[];if(!cc(se,a))return s;const l=this.toBBox,g=[];for(;a;){for(let P=0;a.children.length>P;P++){const j=a.children[P],ne=a.leaf?l(j):j;cc(se,ne)&&(a.leaf?s.push(j):Al(se,ne)?this._all(j,s):g.push(j))}a=g.pop()}return s}collides(se){let a=this.data;if(!cc(se,a))return!1;const s=[];for(;a;){for(let l=0;a.children.length>l;l++){const g=a.children[l],P=a.leaf?this.toBBox(g):g;if(cc(se,P)){if(a.leaf||Al(se,P))return!0;s.push(g)}}a=s.pop()}return!1}load(se){if(!se||!se.length)return this;if(this._minEntries>se.length){for(let s=0;se.length>s;s++)this.insert(se[s]);return this}let a=this._build(se.slice(),0,se.length-1,0);if(this.data.children.length)if(this.data.height===a.height)this._splitRoot(this.data,a);else{if(a.height>this.data.height){const s=this.data;this.data=a,a=s}this._insert(a,this.data.height-a.height-1,!0)}else this.data=a;return this}insert(se){return se&&this._insert(se,this.data.height-1),this}clear(){return this.data=Gl([]),this}remove(se,a){if(!se)return this;let s=this.data;const l=this.toBBox(se),g=[],P=[];let j,ne,ge;for(;s||g.length;){if(s||(s=g.pop(),ne=g[g.length-1],j=P.pop(),ge=!0),s.leaf){const ze=Zu(se,s.children,a);if(ze!==-1)return s.children.splice(ze,1),g.push(s),this._condense(g),this}ge||s.leaf||!Al(s,l)?ne?(j++,s=ne.children[j],ge=!1):s=null:(g.push(s),P.push(j),j=0,ne=s,s=s.children[0])}return this}toBBox(se){return se}compareMinX(se,a){return se.minX-a.minX}compareMinY(se,a){return se.minY-a.minY}toJSON(){return this.data}fromJSON(se){return this.data=se,this}_all(se,a){const s=[];for(;se;)se.leaf?a.push(...se.children):s.push(...se.children),se=s.pop();return a}_build(se,a,s,l){const g=s-a+1;let P,j=this._maxEntries;if(j>=g)return P=Gl(se.slice(a,s+1)),St(P,this.toBBox),P;l||(j=Math.ceil(g/Math.pow(j,(l=Math.ceil(Math.log(g)/Math.log(j)))-1))),P=Gl([]),P.leaf=!1,P.height=l;const ne=Math.ceil(g/j),ge=ne*Math.ceil(Math.sqrt(j));yh(se,a,s,ge,this.compareMinX);for(let ze=a;s>=ze;ze+=ge){const ht=Math.min(ze+ge-1,s);yh(se,ze,ht,ne,this.compareMinY);for(let zt=ze;ht>=zt;zt+=ne)P.children.push(this._build(se,zt,Math.min(zt+ne-1,ht),l-1))}return St(P,this.toBBox),P}_chooseSubtree(se,a,s,l){for(;l.push(a),!a.leaf&&l.length-1!==s;){let j,ne=1/0,ge=1/0;for(let ze=0;a.children.length>ze;ze++){const ht=a.children[ze],zt=Il(ht),qt=(Math.max((P=ht).maxX,(g=se).maxX)-Math.min(P.minX,g.minX))*(Math.max(P.maxY,g.maxY)-Math.min(P.minY,g.minY))-zt;ge>qt?(ge=qt,ne=ne>zt?zt:ne,j=ht):qt===ge&&ne>zt&&(ne=zt,j=ht)}a=j||a.children[0]}var g,P;return a}_insert(se,a,s){const l=s?se:this.toBBox(se),g=[],P=this._chooseSubtree(l,this.data,a,g);for(P.children.push(se),hl(P,l);a>=0&&g[a].children.length>this._maxEntries;)this._split(g,a),a--;this._adjustParentBBoxes(l,g,a)}_split(se,a){const s=se[a],l=s.children.length,g=this._minEntries;this._chooseSplitAxis(s,g,l);const P=this._chooseSplitIndex(s,g,l),j=Gl(s.children.splice(P,s.children.length-P));j.height=s.height,j.leaf=s.leaf,St(s,this.toBBox),St(j,this.toBBox),a?se[a-1].children.push(j):this._splitRoot(s,j)}_splitRoot(se,a){this.data=Gl([se,a]),this.data.height=se.height+1,this.data.leaf=!1,St(this.data,this.toBBox)}_chooseSplitIndex(se,a,s){let l,g=1/0,P=1/0;for(let j=a;s-a>=j;j++){const ne=qu(se,0,j,this.toBBox),ge=qu(se,j,s,this.toBBox),ze=au(ne,ge),ht=Il(ne)+Il(ge);g>ze?(g=ze,l=j,P=P>ht?ht:P):ze===g&&P>ht&&(P=ht,l=j)}return l||s-a}_chooseSplitAxis(se,a,s){const l=se.leaf?this.compareMinX:rc,g=se.leaf?this.compareMinY:bs,P=this._allDistMargin(se,a,s,l);this._allDistMargin(se,a,s,g)>P&&se.children.sort(l)}_allDistMargin(se,a,s,l){se.children.sort(l);const g=this.toBBox,P=qu(se,0,a,g),j=qu(se,s-a,s,g);let ne=ks(P)+ks(j);for(let ge=a;s-a>ge;ge++){const ze=se.children[ge];hl(P,se.leaf?g(ze):ze),ne+=ks(P)}for(let ge=s-a-1;ge>=a;ge--){const ze=se.children[ge];hl(j,se.leaf?g(ze):ze),ne+=ks(j)}return ne}_adjustParentBBoxes(se,a,s){for(let l=s;l>=0;l--)hl(a[l],se)}_condense(se){for(let a,s=se.length-1;s>=0;s--)se[s].children.length===0?s>0?(a=se[s-1].children,a.splice(a.indexOf(se[s]),1)):this.clear():St(se[s],this.toBBox)}}});function qf(se,a){return a>se?-1:se>a?1:0}var Ac=Object.freeze({__proto__:null,default:class{constructor(se=[],a=qf){if(this.data=se,this.length=this.data.length,this.compare=a,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(se){this.data.push(se),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const se=this.data[0],a=this.data.pop();return this.length--,this.length>0&&(this.data[0]=a,this._down(0)),se}peek(){return this.data[0]}_up(se){const{data:a,compare:s}=this,l=a[se];for(;se>0;){const g=se-1>>1,P=a[g];if(s(l,P)>=0)break;a[se]=P,se=g}a[se]=l}_down(se){const{data:a,compare:s}=this,l=this.length>>1,g=a[se];for(;l>se;){let P=1+(se<<1),j=a[P];const ne=P+1;if(this.length>ne&&0>s(a[ne],j)&&(P=ne,j=a[ne]),s(j,g)>=0)break;a[se]=j,se=P}a[se]=g}}}),Xf=function(se,a,s,l){var g=se[0],P=se[1],j=!1;s===void 0&&(s=0),l===void 0&&(l=a.length);for(var ne=(l-s)/2,ge=0,ze=ne-1;ne>ge;ze=ge++){var ht=a[s+2*ge+0],zt=a[s+2*ge+1],qt=a[s+2*ze+1];zt>P!=qt>P&&(a[s+2*ze+0]-ht)*(P-zt)/(qt-zt)+ht>g&&(j=!j)}return j},_f=function(se,a,s,l){var g=se[0],P=se[1],j=!1;s===void 0&&(s=0),l===void 0&&(l=a.length);for(var ne=l-s,ge=0,ze=ne-1;ne>ge;ze=ge++){var ht=a[ge+s][0],zt=a[ge+s][1],qt=a[ze+s][1];zt>P!=qt>P&&(a[ze+s][0]-ht)*(P-zt)/(qt-zt)+ht>g&&(j=!j)}return j},zc=function(se,a,s,l){return a.length>0&&Array.isArray(a[0])?_f(se,a,s,l):Xf(se,a,s,l)},bh=Xf;zc.nested=_f,zc.flat=bh;var Nn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof _.g!="undefined"?_.g:typeof self!="undefined"?self:{};function Pn(se,a,s){return se(s={path:a,exports:{},require:function(l,g){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},s.exports),s.exports}function xi(se){if(se.__esModule)return se;var a=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(se).forEach(function(s){var l=Object.getOwnPropertyDescriptor(se,s);Object.defineProperty(a,s,l.get?l:{enumerable:!0,get:function(){return se[s]}})}),a}var qi=Pn(function(se,a){(function(s){const g=33306690738754706e-32;function P(Kr,qr,an,en,Hr){let Fn,ni,Mi,wa,za=qr[0],oo=en[0],Ds=0,lo=0;oo>za==oo>-za?(Fn=za,za=qr[++Ds]):(Fn=oo,oo=en[++lo]);let cs=0;if(Kr>Ds&&an>lo)for(oo>za==oo>-za?(Mi=Fn-((ni=za+Fn)-za),za=qr[++Ds]):(Mi=Fn-((ni=oo+Fn)-oo),oo=en[++lo]),Fn=ni,Mi!==0&&(Hr[cs++]=Mi);Kr>Ds&&an>lo;)oo>za==oo>-za?(Mi=Fn-((ni=Fn+za)-(wa=ni-Fn))+(za-wa),za=qr[++Ds]):(Mi=Fn-((ni=Fn+oo)-(wa=ni-Fn))+(oo-wa),oo=en[++lo]),Fn=ni,Mi!==0&&(Hr[cs++]=Mi);for(;Kr>Ds;)Mi=Fn-((ni=Fn+za)-(wa=ni-Fn))+(za-wa),za=qr[++Ds],Fn=ni,Mi!==0&&(Hr[cs++]=Mi);for(;an>lo;)Mi=Fn-((ni=Fn+oo)-(wa=ni-Fn))+(oo-wa),oo=en[++lo],Fn=ni,Mi!==0&&(Hr[cs++]=Mi);return Fn===0&&cs!==0||(Hr[cs++]=Fn),cs}function j(Kr){return new Float64Array(Kr)}const ne=33306690738754716e-32,ge=22204460492503146e-32,ze=11093356479670487e-47,ht=j(4),zt=j(8),qt=j(12),_r=j(16),Rr=j(4);s.orient2d=function(Kr,qr,an,en,Hr,Fn){const ni=(qr-Fn)*(an-Hr),Mi=(Kr-Hr)*(en-Fn),wa=ni-Mi;if(ni===0||Mi===0||ni>0!=Mi>0)return wa;const za=Math.abs(ni+Mi);return ne*za>Math.abs(wa)?-function(oo,Ds,lo,cs,as,$s,ps){let fs,Ks,Ou,wl,wo,Zs,Cl,Gf,ec,gc,$c,Lc,oh,Rh,ph,mh,rh,xf;const pc=oo-as,sf=lo-as,Kl=Ds-$s,Hc=cs-$s;wo=(ph=(Gf=pc-(Cl=(Zs=134217729*pc)-(Zs-pc)))*(gc=Hc-(ec=(Zs=134217729*Hc)-(Zs-Hc)))-((Rh=pc*Hc)-Cl*ec-Gf*ec-Cl*gc))-($c=ph-(rh=(Gf=Kl-(Cl=(Zs=134217729*Kl)-(Zs-Kl)))*(gc=sf-(ec=(Zs=134217729*sf)-(Zs-sf)))-((mh=Kl*sf)-Cl*ec-Gf*ec-Cl*gc))),ht[0]=ph-($c+wo)+(wo-rh),wo=(oh=Rh-((Lc=Rh+$c)-(wo=Lc-Rh))+($c-wo))-($c=oh-mh),ht[1]=oh-($c+wo)+(wo-mh),wo=(xf=Lc+$c)-Lc,ht[2]=Lc-(xf-wo)+($c-wo),ht[3]=xf;let Vh=function(mc,sh){let A=sh[0];for(let p=1;mc>p;p++)A+=sh[p];return A}(4,ht),Ad=ge*ps;if(Vh>=Ad||-Vh>=Ad||(fs=oo-(pc+(wo=oo-pc))+(wo-as),Ou=lo-(sf+(wo=lo-sf))+(wo-as),Ks=Ds-(Kl+(wo=Ds-Kl))+(wo-$s),wl=cs-(Hc+(wo=cs-Hc))+(wo-$s),fs===0&&Ks===0&&Ou===0&&wl===0)||(Ad=ze*ps+g*Math.abs(Vh),(Vh+=pc*wl+Hc*fs-(Kl*Ou+sf*Ks))>=Ad||-Vh>=Ad))return Vh;wo=(ph=(Gf=fs-(Cl=(Zs=134217729*fs)-(Zs-fs)))*(gc=Hc-(ec=(Zs=134217729*Hc)-(Zs-Hc)))-((Rh=fs*Hc)-Cl*ec-Gf*ec-Cl*gc))-($c=ph-(rh=(Gf=Ks-(Cl=(Zs=134217729*Ks)-(Zs-Ks)))*(gc=sf-(ec=(Zs=134217729*sf)-(Zs-sf)))-((mh=Ks*sf)-Cl*ec-Gf*ec-Cl*gc))),Rr[0]=ph-($c+wo)+(wo-rh),wo=(oh=Rh-((Lc=Rh+$c)-(wo=Lc-Rh))+($c-wo))-($c=oh-mh),Rr[1]=oh-($c+wo)+(wo-mh),wo=(xf=Lc+$c)-Lc,Rr[2]=Lc-(xf-wo)+($c-wo),Rr[3]=xf;const Oo=P(4,ht,4,Rr,zt);wo=(ph=(Gf=pc-(Cl=(Zs=134217729*pc)-(Zs-pc)))*(gc=wl-(ec=(Zs=134217729*wl)-(Zs-wl)))-((Rh=pc*wl)-Cl*ec-Gf*ec-Cl*gc))-($c=ph-(rh=(Gf=Kl-(Cl=(Zs=134217729*Kl)-(Zs-Kl)))*(gc=Ou-(ec=(Zs=134217729*Ou)-(Zs-Ou)))-((mh=Kl*Ou)-Cl*ec-Gf*ec-Cl*gc))),Rr[0]=ph-($c+wo)+(wo-rh),wo=(oh=Rh-((Lc=Rh+$c)-(wo=Lc-Rh))+($c-wo))-($c=oh-mh),Rr[1]=oh-($c+wo)+(wo-mh),wo=(xf=Lc+$c)-Lc,Rr[2]=Lc-(xf-wo)+($c-wo),Rr[3]=xf;const Pc=P(Oo,zt,4,Rr,qt);wo=(ph=(Gf=fs-(Cl=(Zs=134217729*fs)-(Zs-fs)))*(gc=wl-(ec=(Zs=134217729*wl)-(Zs-wl)))-((Rh=fs*wl)-Cl*ec-Gf*ec-Cl*gc))-($c=ph-(rh=(Gf=Ks-(Cl=(Zs=134217729*Ks)-(Zs-Ks)))*(gc=Ou-(ec=(Zs=134217729*Ou)-(Zs-Ou)))-((mh=Ks*Ou)-Cl*ec-Gf*ec-Cl*gc))),Rr[0]=ph-($c+wo)+(wo-rh),wo=(oh=Rh-((Lc=Rh+$c)-(wo=Lc-Rh))+($c-wo))-($c=oh-mh),Rr[1]=oh-($c+wo)+(wo-mh),wo=(xf=Lc+$c)-Lc,Rr[2]=Lc-(xf-wo)+($c-wo),Rr[3]=xf;const Nc=P(Pc,qt,4,Rr,_r);return _r[Nc-1]}(Kr,qr,an,en,Hr,Fn,za):wa},s.orient2dfast=function(Kr,qr,an,en,Hr,Fn){return(qr-Fn)*(an-Hr)-(Kr-Hr)*(en-Fn)},Object.defineProperty(s,"__esModule",{value:!0})})(a)}),Xa=xi(ah),To=xi(Ac),Gs=qi.orient2d;To.default&&(To=To.default);var xs=Jo;function Jo(se,a,s){a=Math.max(0,a===void 0?2:a),s=s||0;var l=function(en){for(var Hr=en[0],Fn=en[0],ni=en[0],Mi=en[0],wa=0;en.length>wa;wa++){var za=en[wa];Hr[0]>za[0]&&(Hr=za),za[0]>ni[0]&&(ni=za),Fn[1]>za[1]&&(Fn=za),za[1]>Mi[1]&&(Mi=za)}var oo=[Hr,Fn,ni,Mi],Ds=oo.slice();for(wa=0;en.length>wa;wa++)zc(en[wa],oo)||Ds.push(en[wa]);return function(lo){lo.sort(Qu);for(var cs=[],as=0;lo.length>as;as++){for(;cs.length>=2&&0>=fc(cs[cs.length-2],cs[cs.length-1],lo[as]);)cs.pop();cs.push(lo[as])}for(var $s=[],ps=lo.length-1;ps>=0;ps--){for(;$s.length>=2&&0>=fc($s[$s.length-2],$s[$s.length-1],lo[ps]);)$s.pop();$s.push(lo[ps])}return $s.pop(),cs.pop(),cs.concat($s)}(Ds)}(se),g=new Xa(16);g.toBBox=function(en){return{minX:en[0],minY:en[1],maxX:en[0],maxY:en[1]}},g.compareMinX=function(en,Hr){return en[0]-Hr[0]},g.compareMinY=function(en,Hr){return en[1]-Hr[1]},g.load(se);for(var P,j=[],ne=0;l.length>ne;ne++){var ge=l[ne];g.remove(ge),P=su(ge,P),j.push(P)}var ze=new Xa(16);for(ne=0;j.length>ne;ne++)ze.insert(Lu(j[ne]));for(var ht=a*a,zt=s*s;j.length;){var qt=j.shift(),_r=qt.p,Rr=qt.next.p,Kr=Ys(_r,Rr);if(Kr>=zt){var qr=Kr/ht;(ge=ou(g,qt.prev.p,_r,Rr,qt.next.next.p,qr,ze))&&Math.min(Ys(ge,_r),Ys(ge,Rr))<=qr&&(j.push(qt),j.push(su(ge,qt)),g.remove(ge),ze.remove(qt),ze.insert(Lu(qt)),ze.insert(Lu(qt.next)))}}qt=P;var an=[];do an.push(qt.p),qt=qt.next;while(qt!==P);return an.push(qt.p),an}function ou(se,a,s,l,g,P,j){for(var ne=new To([],Iu),ge=se.data;ge;){for(var ze=0;ge.children.length>ze;ze++){var ht=ge.children[ze],zt=ge.leaf?_s(ht,s,l):ll(s,l,ht);Pqt.dist&&Kr>qt.dist&&Oc(s,_r,j)&&Oc(l,_r,j))return _r}(ge=ne.pop())&&(ge=ge.node)}return null}function Iu(se,a){return se.dist-a.dist}function ll(se,a,s){if(Uu(se,s)||Uu(a,s))return 0;var l=Fs(se[0],se[1],a[0],a[1],s.minX,s.minY,s.maxX,s.minY);if(l===0)return 0;var g=Fs(se[0],se[1],a[0],a[1],s.minX,s.minY,s.minX,s.maxY);if(g===0)return 0;var P=Fs(se[0],se[1],a[0],a[1],s.maxX,s.minY,s.maxX,s.maxY);if(P===0)return 0;var j=Fs(se[0],se[1],a[0],a[1],s.minX,s.maxY,s.maxX,s.maxY);return j===0?0:Math.min(l,g,P,j)}function Uu(se,a){return!(a.minX>se[0]||se[0]>a.maxX||a.minY>se[1]||se[1]>a.maxY)}function Oc(se,a,s){for(var l,g,P,j,ne=s.search({minX:Math.min(se[0],a[0]),minY:Math.min(se[1],a[1]),maxX:Math.max(se[0],a[0]),maxY:Math.max(se[1],a[1])}),ge=0;ne.length>ge;ge++)if(g=ne[ge].next.p,P=se,(l=ne[ge].p)!==(j=a)&&g!==P&&fc(l,g,P)>0!=fc(l,g,j)>0&&fc(P,j,l)>0!=fc(P,j,g)>0)return!1;return!0}function fc(se,a,s){return Gs(se[0],se[1],a[0],a[1],s[0],s[1])}function Lu(se){var a=se.p,s=se.next.p;return se.minX=Math.min(a[0],s[0]),se.minY=Math.min(a[1],s[1]),se.maxX=Math.max(a[0],s[0]),se.maxY=Math.max(a[1],s[1]),se}function su(se,a){var s={p:se,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return a?(s.next=a.next,s.prev=a,a.next.prev=s,a.next=s):(s.prev=s,s.next=s),s}function Ys(se,a){var s=se[0]-a[0],l=se[1]-a[1];return s*s+l*l}function _s(se,a,s){var l=a[0],g=a[1],P=s[0]-l,j=s[1]-g;if(P!==0||j!==0){var ne=((se[0]-l)*P+(se[1]-g)*j)/(P*P+j*j);ne>1?(l=s[0],g=s[1]):ne>0&&(l+=P*ne,g+=j*ne)}return(P=se[0]-l)*P+(j=se[1]-g)*j}function Fs(se,a,s,l,g,P,j,ne){var ge,ze,ht,zt,qt=s-se,_r=l-a,Rr=j-g,Kr=ne-P,qr=se-g,an=a-P,en=qt*qt+_r*_r,Hr=qt*Rr+_r*Kr,Fn=Rr*Rr+Kr*Kr,ni=qt*qr+_r*an,Mi=Rr*qr+Kr*an,wa=en*Fn-Hr*Hr,za=wa,oo=wa;wa===0?(ze=0,za=1,zt=Mi,oo=Fn):(zt=en*Mi-Hr*ni,0>(ze=Hr*Mi-Fn*ni)?(ze=0,zt=Mi,oo=Fn):ze>za&&(ze=za,zt=Mi+Hr,oo=Fn)),0>zt?(zt=0,0>-ni?ze=0:-ni>en?ze=za:(ze=-ni,za=en)):zt>oo&&(zt=oo,0>-ni+Hr?ze=0:-ni+Hr>en?ze=za:(ze=-ni+Hr,za=en));var Ds=(1-(ht=zt===0?0:zt/oo))*g+ht*j-((1-(ge=ze===0?0:ze/za))*se+ge*s),lo=(1-ht)*P+ht*ne-((1-ge)*a+ge*l);return Ds*Ds+lo*lo}function Qu(se,a){return se[0]===a[0]?se[1]-a[1]:se[0]-a[0]}function Sl(se,a,s){s===void 0&&(s={});var l=Vu(se),g=Vu(a),P=iu(g[1]-l[1]),j=iu(g[0]-l[0]),ne=iu(l[1]),ge=iu(g[1]),ze=Math.pow(Math.sin(P/2),2)+Math.pow(Math.sin(j/2),2)*Math.cos(ne)*Math.cos(ge);return Mu(2*Math.atan2(Math.sqrt(ze),Math.sqrt(1-ze)),s.units)}function nc(se){return function(a,s){s===void 0&&(s={});var l=Number(a[0]),g=Number(a[1]),P=Number(a[2]),j=Number(a[3]);if(a.length===6)throw Error("@turf/bbox-polygon does not support BBox with 6 positions");var ne=[l,g];return ua([[ne,[P,g],[P,j],[l,j],ne]],s.properties,{bbox:a,id:s.id})}(Ec(se))}function dl(se,a,s,l){l===void 0&&(l={});var g=Vu(se),P=iu(g[0]),j=iu(g[1]),ne=iu(s),ge=vs(a,l.units),ze=Math.asin(Math.sin(j)*Math.cos(ge)+Math.cos(j)*Math.sin(ge)*Math.cos(ne));return Yi([Xs(P+Math.atan2(Math.sin(ne)*Math.sin(ge)*Math.cos(j),Math.cos(ge)-Math.sin(j)*Math.sin(ze))),Xs(ze)],l.properties)}function Ml(se,a,s){if(s===void 0&&(s={}),s.final===!0)return function(ze,ht){var zt=Ml(ht,ze);return zt=(zt+180)%360}(se,a);var l=Vu(se),g=Vu(a),P=iu(l[0]),j=iu(g[0]),ne=iu(l[1]),ge=iu(g[1]);return Xs(Math.atan2(Math.sin(j-P)*Math.cos(ge),Math.cos(ne)*Math.sin(ge)-Math.sin(ne)*Math.cos(ge)*Math.cos(j-P)))}function Vc(se,a){a===void 0&&(a={});var s=Ec(se);return Yi([(s[0]+s[2])/2,(s[1]+s[3])/2],a.properties,a)}function kl(se,a){a===void 0&&(a={});var s=0,l=0,g=0;return al(se,function(P){s+=P[0],l+=P[1],g++},!0),Yi([s/g,l/g],a.properties)}function Qf(se,a){switch(a===void 0&&(a={}),lf(se)){case"Point":return Yi(Vu(se),a.properties);case"Polygon":var s=[];al(se,function(Hr){s.push(Hr)});var l,g,P,j,ne,ge,ze,ht,zt=kl(se,{properties:a.properties}),qt=zt.geometry.coordinates,_r=0,Rr=0,Kr=0,qr=s.map(function(Hr){return[Hr[0]-qt[0],Hr[1]-qt[1]]});for(l=0;s.length-1>l;l++)Kr+=ht=(j=(g=qr[l])[0])*(ze=(P=qr[l+1])[1])-(ne=P[0])*(ge=g[1]),_r+=(j+ne)*ht,Rr+=(ge+ze)*ht;if(Kr===0)return zt;var an=1/(6*(.5*Kr));return Yi([qt[0]+an*_r,qt[1]+an*Rr],a.properties);default:var en=function(Hr,Fn){Fn===void 0&&(Fn={}),Fn.concavity=Fn.concavity||1/0;var ni=[];if(al(Hr,function(wa){ni.push([wa[0],wa[1]])}),!ni.length)return null;var Mi=xs(ni,Fn.concavity);return Mi.length>3?ua([Mi]):null}(se);return en?Qf(en,{properties:a.properties}):kl(se,{properties:a.properties})}}function ds(se){if(!se)throw Error("geojson is required");var a=[];return Rc(se,function(s){(function(l,g){var P=[],j=l.geometry;if(j!==null){switch(j.type){case"Polygon":P=lc(j);break;case"LineString":P=[lc(j)]}P.forEach(function(ne){var ge=function(ze,ht){var zt=[];return ze.reduce(function(qt,_r){var Rr,Kr,qr,an,en,Hr,Fn=La([qt,_r],ht);return Fn.bbox=[(en=(Kr=_r)[0])>(qr=(Rr=qt)[0])?qr:en,(Hr=Kr[1])>(an=Rr[1])?an:Hr,qr>en?qr:en,an>Hr?an:Hr],zt.push(Fn),_r}),zt}(ne,l.properties);ge.forEach(function(ze){ze.id=g.length,g.push(ze)})})}})(s,a)}),aa(a)}xs.default=Jo;function Eu(se,a,s){if(!s)return a.indexOf(se);for(let l=0;a.length>l;l++)if(s(se,a[l]))return l;return-1}function Rl(se,a){Fc(se,0,se.children.length,a,se)}function Fc(se,a,s,l,g){g||(g=cd(null)),g.minX=1/0,g.minY=1/0,g.maxX=-1/0,g.maxY=-1/0;for(let P=a;s>P;P++){const j=se.children[P];Yc(g,se.leaf?l(j):j)}return g}function Yc(se,a){return se.minX=Math.min(se.minX,a.minX),se.minY=Math.min(se.minY,a.minY),se.maxX=Math.max(se.maxX,a.maxX),se.maxY=Math.max(se.maxY,a.maxY),se}function xh(se,a){return se.minX-a.minX}function Lf(se,a){return se.minY-a.minY}function If(se){return(se.maxX-se.minX)*(se.maxY-se.minY)}function wd(se){return se.maxX-se.minX+(se.maxY-se.minY)}function _h(se,a){const s=Math.max(se.minX,a.minX),l=Math.max(se.minY,a.minY),g=Math.min(se.maxX,a.maxX),P=Math.min(se.maxY,a.maxY);return Math.max(0,g-s)*Math.max(0,P-l)}function Df(se,a){return!(se.minX>a.minX||se.minY>a.minY||a.maxX>se.maxX||a.maxY>se.maxY)}function af(se,a){return!(a.minX>se.maxX||a.minY>se.maxY||se.minX>a.maxX||se.minY>a.maxY)}function cd(se){return{children:se,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Uf(se,a,s,l,g){const P=[a,s];for(;P.length;){if(l>=(s=P.pop())-(a=P.pop()))continue;const j=a+Math.ceil((s-a)/l/2)*l;gu(se,j,a,s,g),P.push(a,j,j,s)}}var _u=Object.freeze({__proto__:null,default:class{constructor(se=9){this._maxEntries=Math.max(4,se),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(se){let a=this.data;const s=[];if(!af(se,a))return s;const l=this.toBBox,g=[];for(;a;){for(let P=0;a.children.length>P;P++){const j=a.children[P],ne=a.leaf?l(j):j;af(se,ne)&&(a.leaf?s.push(j):Df(se,ne)?this._all(j,s):g.push(j))}a=g.pop()}return s}collides(se){let a=this.data;if(!af(se,a))return!1;const s=[];for(;a;){for(let l=0;a.children.length>l;l++){const g=a.children[l],P=a.leaf?this.toBBox(g):g;if(af(se,P)){if(a.leaf||Df(se,P))return!0;s.push(g)}}a=s.pop()}return!1}load(se){if(!se||!se.length)return this;if(this._minEntries>se.length){for(let s=0;se.length>s;s++)this.insert(se[s]);return this}let a=this._build(se.slice(),0,se.length-1,0);if(this.data.children.length)if(this.data.height===a.height)this._splitRoot(this.data,a);else{if(a.height>this.data.height){const s=this.data;this.data=a,a=s}this._insert(a,this.data.height-a.height-1,!0)}else this.data=a;return this}insert(se){return se&&this._insert(se,this.data.height-1),this}clear(){return this.data=cd([]),this}remove(se,a){if(!se)return this;let s=this.data;const l=this.toBBox(se),g=[],P=[];let j,ne,ge;for(;s||g.length;){if(s||(s=g.pop(),ne=g[g.length-1],j=P.pop(),ge=!0),s.leaf){const ze=Eu(se,s.children,a);if(ze!==-1)return s.children.splice(ze,1),g.push(s),this._condense(g),this}ge||s.leaf||!Df(s,l)?ne?(j++,s=ne.children[j],ge=!1):s=null:(g.push(s),P.push(j),j=0,ne=s,s=s.children[0])}return this}toBBox(se){return se}compareMinX(se,a){return se.minX-a.minX}compareMinY(se,a){return se.minY-a.minY}toJSON(){return this.data}fromJSON(se){return this.data=se,this}_all(se,a){const s=[];for(;se;)se.leaf?a.push(...se.children):s.push(...se.children),se=s.pop();return a}_build(se,a,s,l){const g=s-a+1;let P,j=this._maxEntries;if(j>=g)return P=cd(se.slice(a,s+1)),Rl(P,this.toBBox),P;l||(j=Math.ceil(g/Math.pow(j,(l=Math.ceil(Math.log(g)/Math.log(j)))-1))),P=cd([]),P.leaf=!1,P.height=l;const ne=Math.ceil(g/j),ge=ne*Math.ceil(Math.sqrt(j));Uf(se,a,s,ge,this.compareMinX);for(let ze=a;s>=ze;ze+=ge){const ht=Math.min(ze+ge-1,s);Uf(se,ze,ht,ne,this.compareMinY);for(let zt=ze;ht>=zt;zt+=ne)P.children.push(this._build(se,zt,Math.min(zt+ne-1,ht),l-1))}return Rl(P,this.toBBox),P}_chooseSubtree(se,a,s,l){for(;l.push(a),!a.leaf&&l.length-1!==s;){let j,ne=1/0,ge=1/0;for(let ze=0;a.children.length>ze;ze++){const ht=a.children[ze],zt=If(ht),qt=(Math.max((P=ht).maxX,(g=se).maxX)-Math.min(P.minX,g.minX))*(Math.max(P.maxY,g.maxY)-Math.min(P.minY,g.minY))-zt;ge>qt?(ge=qt,ne=ne>zt?zt:ne,j=ht):qt===ge&&ne>zt&&(ne=zt,j=ht)}a=j||a.children[0]}var g,P;return a}_insert(se,a,s){const l=s?se:this.toBBox(se),g=[],P=this._chooseSubtree(l,this.data,a,g);for(P.children.push(se),Yc(P,l);a>=0&&g[a].children.length>this._maxEntries;)this._split(g,a),a--;this._adjustParentBBoxes(l,g,a)}_split(se,a){const s=se[a],l=s.children.length,g=this._minEntries;this._chooseSplitAxis(s,g,l);const P=this._chooseSplitIndex(s,g,l),j=cd(s.children.splice(P,s.children.length-P));j.height=s.height,j.leaf=s.leaf,Rl(s,this.toBBox),Rl(j,this.toBBox),a?se[a-1].children.push(j):this._splitRoot(s,j)}_splitRoot(se,a){this.data=cd([se,a]),this.data.height=se.height+1,this.data.leaf=!1,Rl(this.data,this.toBBox)}_chooseSplitIndex(se,a,s){let l,g=1/0,P=1/0;for(let j=a;s-a>=j;j++){const ne=Fc(se,0,j,this.toBBox),ge=Fc(se,j,s,this.toBBox),ze=_h(ne,ge),ht=If(ne)+If(ge);g>ze?(g=ze,l=j,P=P>ht?ht:P):ze===g&&P>ht&&(P=ht,l=j)}return l||s-a}_chooseSplitAxis(se,a,s){const l=se.leaf?this.compareMinX:xh,g=se.leaf?this.compareMinY:Lf,P=this._allDistMargin(se,a,s,l);this._allDistMargin(se,a,s,g)>P&&se.children.sort(l)}_allDistMargin(se,a,s,l){se.children.sort(l);const g=this.toBBox,P=Fc(se,0,a,g),j=Fc(se,s-a,s,g);let ne=wd(P)+wd(j);for(let ge=a;s-a>ge;ge++){const ze=se.children[ge];Yc(P,se.leaf?g(ze):ze),ne+=wd(P)}for(let ge=s-a-1;ge>=a;ge--){const ze=se.children[ge];Yc(j,se.leaf?g(ze):ze),ne+=wd(j)}return ne}_adjustParentBBoxes(se,a,s){for(let l=s;l>=0;l--)Yc(a[l],se)}_condense(se){for(let a,s=se.length-1;s>=0;s--)se[s].children.length===0?s>0?(a=se[s-1].children,a.splice(a.indexOf(se[s]),1)):this.clear():Rl(se[s],this.toBBox)}}}),Ls=xi(_u),Af=xi(sl),fd=xi(yl),Qi=xi(Zf).default,Gr=fd.featureEach,of=Af.featureCollection;function Qr(se){var a=new Ls(se);return a.insert=function(s){if(s.type!=="Feature")throw Error("invalid feature");return s.bbox=s.bbox?s.bbox:Qi(s),Ls.prototype.insert.call(this,s)},a.load=function(s){var l=[];return Array.isArray(s)?s.forEach(function(g){if(g.type!=="Feature")throw Error("invalid features");g.bbox=g.bbox?g.bbox:Qi(g),l.push(g)}):Gr(s,function(g){if(g.type!=="Feature")throw Error("invalid features");g.bbox=g.bbox?g.bbox:Qi(g),l.push(g)}),Ls.prototype.load.call(this,l)},a.remove=function(s,l){if(s.type!=="Feature")throw Error("invalid feature");return s.bbox=s.bbox?s.bbox:Qi(s),Ls.prototype.remove.call(this,s,l)},a.clear=function(){return Ls.prototype.clear.call(this)},a.search=function(s){var l=Ls.prototype.search.call(this,this.toBBox(s));return of(l)},a.collides=function(s){return Ls.prototype.collides.call(this,this.toBBox(s))},a.all=function(){var s=Ls.prototype.all.call(this);return of(s)},a.toJSON=function(){return Ls.prototype.toJSON.call(this)},a.fromJSON=function(s){return Ls.prototype.fromJSON.call(this,s)},a.toBBox=function(s){var l;if(s.bbox)l=s.bbox;else if(Array.isArray(s)&&s.length===4)l=s;else if(Array.isArray(s)&&s.length===6)l=[s[0],s[1],s[3],s[4]];else if(s.type==="Feature")l=Qi(s);else{if(s.type!=="FeatureCollection")throw Error("invalid geojson");l=Qi(s)}return{minX:l[0],minY:l[1],maxX:l[2],maxY:l[3]}},a}var is=Qr;function cf(se,a){var s={},l=[];if(se.type==="LineString"&&(se=ma(se)),a.type==="LineString"&&(a=ma(a)),se.type==="Feature"&&a.type==="Feature"&&se.geometry!==null&&a.geometry!==null&&se.geometry.type==="LineString"&&a.geometry.type==="LineString"&&se.geometry.coordinates.length===2&&a.geometry.coordinates.length===2){var g=nf(se,a);return g&&l.push(g),aa(l)}var P=is();return P.load(ds(a)),_c(ds(se),function(j){_c(P.search(j),function(ne){var ge=nf(j,ne);if(ge){var ze=lc(ge).join(",");s[ze]||(s[ze]=!0,l.push(ge))}})}),aa(l)}function nf(se,a){var s=lc(se),l=lc(a);if(s.length!==2)throw Error(" line1 must only contain 2 coordinates");if(l.length!==2)throw Error(" line2 must only contain 2 coordinates");var g=s[0][0],P=s[0][1],j=s[1][0],ne=s[1][1],ge=l[0][0],ze=l[0][1],ht=l[1][0],zt=l[1][1],qt=(zt-ze)*(j-g)-(ht-ge)*(ne-P),_r=(ht-ge)*(P-ze)-(zt-ze)*(g-ge),Rr=(j-g)*(P-ze)-(ne-P)*(g-ge);if(qt===0)return null;var Kr=_r/qt,qr=Rr/qt;return 0>Kr||Kr>1||0>qr||qr>1?null:Yi([g+Kr*(j-g),P+Kr*(ne-P)])}is.default=Qr;var ic=6378137;function Ws(se){return Ku(se,function(a,s){return a+function(l){var g,P=0;switch(l.type){case"Polygon":return $u(l.coordinates);case"MultiPolygon":for(g=0;l.coordinates.length>g;g++)P+=$u(l.coordinates[g]);return P;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(s)},0)}function $u(se){var a=0;if(se&&se.length>0){a+=Math.abs(ac(se[0]));for(var s=1;se.length>s;s++)a-=Math.abs(ac(se[s]))}return a}function ac(se){var a,s,l,g,P,j,ne=0,ge=se.length;if(ge>2){for(j=0;ge>j;j++)j===ge-2?(l=ge-2,g=ge-1,P=0):j===ge-1?(l=ge-1,g=0,P=1):(l=j,g=j+1,P=j+2),a=se[l],s=se[g],ne+=($l(se[P][0])-$l(a[0]))*Math.sin($l(s[1]));ne=ne*ic*ic/2}return ne}function $l(se){return se*Math.PI/180}function Fl(se,a){return a===void 0&&(a={}),mf(se,function(s,l){var g=l.geometry.coordinates;return s+Sl(g[0],g[1],a)},0)}function Oe(se,a){a===void 0&&(a={});var s=fl(se);switch(a.properties||se.type!=="Feature"||(a.properties=se.properties),s.type){case"Polygon":return function(l,g){g===void 0&&(g={});var P=fl(l),j=P.coordinates,ne=g.properties?g.properties:l.type==="Feature"?l.properties:{};return Ft(j,ne)}(s,a);case"MultiPolygon":return function(l,g){g===void 0&&(g={});var P=fl(l),j=P.coordinates,ne=g.properties?g.properties:l.type==="Feature"?l.properties:{},ge=[];return j.forEach(function(ze){ge.push(Ft(ze,ne))}),aa(ge)}(s,a);default:throw Error("invalid poly")}}function Ft(se,a){return se.length>1?ho(se,a):La(se[0],a)}function dr(se){for(var a,s,l=lc(se),g=0,P=1;l.length>P;)a=s||l[0],g+=((s=l[P])[0]-a[0])*(s[1]+a[1]),P++;return g>0}var Wr=Pn(function(se){var a=Object.prototype.hasOwnProperty,s="~";function l(){}function g(ge,ze,ht){this.fn=ge,this.context=ze,this.once=ht||!1}function P(ge,ze,ht,zt,qt){if(typeof ht!="function")throw new TypeError("The listener must be a function");var _r=new g(ht,zt||ge,qt),Rr=s?s+ze:ze;return ge._events[Rr]?ge._events[Rr].fn?ge._events[Rr]=[ge._events[Rr],_r]:ge._events[Rr].push(_r):(ge._events[Rr]=_r,ge._eventsCount++),ge}function j(ge,ze){--ge._eventsCount==0?ge._events=new l:delete ge._events[ze]}function ne(){this._events=new l,this._eventsCount=0}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(s=!1)),ne.prototype.eventNames=function(){var ge,ze,ht=[];if(this._eventsCount===0)return ht;for(ze in ge=this._events)a.call(ge,ze)&&ht.push(s?ze.slice(1):ze);return Object.getOwnPropertySymbols?ht.concat(Object.getOwnPropertySymbols(ge)):ht},ne.prototype.listeners=function(ge){var ze=this._events[s?s+ge:ge];if(!ze)return[];if(ze.fn)return[ze.fn];for(var ht=0,zt=ze.length,qt=Array(zt);zt>ht;ht++)qt[ht]=ze[ht].fn;return qt},ne.prototype.listenerCount=function(ge){var ze=this._events[s?s+ge:ge];return ze?ze.fn?1:ze.length:0},ne.prototype.emit=function(ge,ze,ht,zt,qt,_r){var Rr=s?s+ge:ge;if(!this._events[Rr])return!1;var Kr,qr,an=this._events[Rr],en=arguments.length;if(an.fn){switch(an.once&&this.removeListener(ge,an.fn,void 0,!0),en){case 1:return an.fn.call(an.context),!0;case 2:return an.fn.call(an.context,ze),!0;case 3:return an.fn.call(an.context,ze,ht),!0;case 4:return an.fn.call(an.context,ze,ht,zt),!0;case 5:return an.fn.call(an.context,ze,ht,zt,qt),!0;case 6:return an.fn.call(an.context,ze,ht,zt,qt,_r),!0}for(qr=1,Kr=Array(en-1);en>qr;qr++)Kr[qr-1]=arguments[qr];an.fn.apply(an.context,Kr)}else{var Hr,Fn=an.length;for(qr=0;Fn>qr;qr++)switch(an[qr].once&&this.removeListener(ge,an[qr].fn,void 0,!0),en){case 1:an[qr].fn.call(an[qr].context);break;case 2:an[qr].fn.call(an[qr].context,ze);break;case 3:an[qr].fn.call(an[qr].context,ze,ht);break;case 4:an[qr].fn.call(an[qr].context,ze,ht,zt);break;default:if(!Kr)for(Hr=1,Kr=Array(en-1);en>Hr;Hr++)Kr[Hr-1]=arguments[Hr];an[qr].fn.apply(an[qr].context,Kr)}}return!0},ne.prototype.on=function(ge,ze,ht){return P(this,ge,ze,ht,!1)},ne.prototype.once=function(ge,ze,ht){return P(this,ge,ze,ht,!0)},ne.prototype.removeListener=function(ge,ze,ht,zt){var qt=s?s+ge:ge;if(!this._events[qt])return this;if(!ze)return j(this,qt),this;var _r=this._events[qt];if(_r.fn)_r.fn!==ze||zt&&!_r.once||ht&&_r.context!==ht||j(this,qt);else{for(var Rr=0,Kr=[],qr=_r.length;qr>Rr;Rr++)(_r[Rr].fn!==ze||zt&&!_r[Rr].once||ht&&_r[Rr].context!==ht)&&Kr.push(_r[Rr]);Kr.length?this._events[qt]=Kr.length===1?Kr[0]:Kr:j(this,qt)}return this},ne.prototype.removeAllListeners=function(ge){var ze;return ge?this._events[ze=s?s+ge:ge]&&j(this,ze):(this._events=new l,this._eventsCount=0),this},ne.prototype.off=ne.prototype.removeListener,ne.prototype.addListener=ne.prototype.on,ne.prefixed=s,ne.EventEmitter=ne,se.exports=ne}),Jr=function(se){xt(s,se);var a=Yr(s);function s(l,g){var P,j=g.style;return ya(this,s),(P=a.call(this)).scene=void 0,P.style=void 0,P.layers=void 0,P.data=[],P.scene=l,P.style=j,P.layers=P.initLayers(),P.layers.forEach(function(ne){l.addLayer(ne)}),j.callback instanceof Function&&j.callback(P.layers),P}return xn(s,[{key:"getLayers",value:function(){return this.layers}},{key:"show",value:function(){this.layers.forEach(function(l){l.show()})}},{key:"hide",value:function(){this.layers.forEach(function(l){l.hide()})}},{key:"setData",value:function(l){var g=qn(l).sort(function(P,j){return+P.properties.isActive-+j.properties.isActive});this.data=g,this.layers.forEach(function(P){P.setData(aa(g))})}},{key:"destroy",value:function(){var l=this;this.layers.forEach(function(g){l.scene.removeLayer(g)})}}]),s}(Wr.EventEmitter),Gn=function(se){xt(s,se);var a=Yr(s);function s(){return ya(this,s),a.apply(this,arguments)}return xn(s,[{key:"initLayers",value:function(){var l=this.style,g=l.normal,P=l.style,j=l.options;return[new V.LineLayer(j!=null?j:{}).source(aa([])).size(g.size).color(g.color).shape("line").style(P)]}}]),s}(Jr),mi=function(se){var a=typeof se;return se!=null&&(a=="object"||a=="function")},Vn=typeof Nn=="object"&&Nn&&Nn.Object===Object&&Nn,Gi=typeof self=="object"&&self&&self.Object===Object&&self,Li=Vn||Gi||Function("return this")(),Xn=function(){return Li.Date.now()},Ca=/\s/,$a=function(se){for(var a=se.length;a--&&Ca.test(se.charAt(a)););return a},Ba=/^\s+/,ha=function(se){return se&&se.slice(0,$a(se)+1).replace(Ba,"")},ba=Li.Symbol,Ti=Object.prototype,Bi=Ti.hasOwnProperty,na=Ti.toString,Sa=ba?ba.toStringTag:void 0,Ko=function(se){var a=Bi.call(se,Sa),s=se[Sa];try{se[Sa]=void 0;var l=!0}catch(P){}var g=na.call(se);return l&&(a?se[Sa]=s:delete se[Sa]),g},qo=Object.prototype.toString,gs=function(se){return qo.call(se)},Da=ba?ba.toStringTag:void 0,Hu=function(se){return se==null?se===void 0?"[object Undefined]":"[object Null]":Da&&Da in Object(se)?Ko(se):gs(se)},Mo=function(se){return se!=null&&typeof se=="object"},Ps=function(se){return typeof se=="symbol"||Mo(se)&&Hu(se)=="[object Symbol]"},eu=/^[-+]0x[0-9a-f]+$/i,Bs=/^0b[01]+$/i,cu=/^0o[0-7]+$/i,yu=parseInt,fu=function(se){if(typeof se=="number")return se;if(Ps(se))return NaN;if(mi(se)){var a=typeof se.valueOf=="function"?se.valueOf():se;se=mi(a)?a+"":a}if(typeof se!="string")return se===0?se:+se;se=ha(se);var s=Bs.test(se);return s||cu.test(se)?yu(se.slice(2),s?2:8):eu.test(se)?NaN:+se},Gu=Math.max,h=Math.min,m=function(se,a,s){var l,g,P,j,ne,ge,ze=0,ht=!1,zt=!1,qt=!0;if(typeof se!="function")throw new TypeError("Expected a function");function _r(en){var Hr=l,Fn=g;return l=g=void 0,ze=en,j=se.apply(Fn,Hr)}function Rr(en){var Hr=en-ge;return ge===void 0||Hr>=a||0>Hr||zt&&en-ze>=P}function Kr(){var en=Xn();if(Rr(en))return qr(en);ne=setTimeout(Kr,function(Hr){var Fn=a-(Hr-ge);return zt?h(Fn,P-(Hr-ze)):Fn}(en))}function qr(en){return ne=void 0,qt&&l?_r(en):(l=g=void 0,j)}function an(){var en=Xn(),Hr=Rr(en);if(l=arguments,g=this,ge=en,Hr){if(ne===void 0)return function(Fn){return ze=Fn,ne=setTimeout(Kr,a),ht?_r(Fn):j}(ge);if(zt)return clearTimeout(ne),ne=setTimeout(Kr,a),_r(ge)}return ne===void 0&&(ne=setTimeout(Kr,a)),j}return a=fu(a)||0,mi(s)&&(ht=!!s.leading,P=(zt="maxWait"in s)?Gu(fu(s.maxWait)||0,a):P,qt="trailing"in s?!!s.trailing:qt),an.cancel=function(){ne!==void 0&&clearTimeout(ne),ze=0,l=ge=g=ne=void 0},an.flush=function(){return ne===void 0?j:qr(Xn())},an},F=function(se){xt(s,se);var a=Yr(s);function s(){var l;ya(this,s);for(var g=arguments.length,P=Array(g),j=0;g>j;j++)P[j]=arguments[j];return(l=a.call.apply(a,[this].concat(P))).onMouseMove=function(ne){l.emit(M.RenderEvent.Mousemove,ne)},l.onMouseOut=function(ne){l.emit(M.RenderEvent.Mouseout,ne)},l.onMouseDown=function(ne){l.emit(M.RenderEvent.Dragstart,ne)},l.onDragging=function(ne){l.emit(M.RenderEvent.Dragging,ne)},l.onDragEnd=m(function(ne){l.emit(M.RenderEvent.Dragend,ne)},0),l.onUnClick=function(ne){l.emit(M.RenderEvent.UnClick,ne)},l.enableHover=function(){var ne,ge;l.disableHover(),(ne=l.layers[0])===null||ne===void 0||ne.on(M.LayerEvent.Mousemove,l.onMouseMove),(ge=l.layers[0])===null||ge===void 0||ge.on(M.LayerEvent.Mouseout,l.onMouseOut)},l.disableHover=function(){var ne,ge;(ne=l.layers[0])===null||ne===void 0||ne.off(M.LayerEvent.Mousemove,l.onMouseMove),(ge=l.layers[0])===null||ge===void 0||ge.off(M.LayerEvent.Mouseout,l.onMouseOut)},l}return xn(s,[{key:"initLayers",value:function(){var l=this.style,g=l.normal,P=l.hover,j=l.active,ne=l.style,ge=l.options;return[new V.LineLayer(ge!=null?ge:{}).source(aa([])).size("isHover*isActive",function(ze,ht){return ht?j.size:ze?P.size:g.size}).color("isHover*isActive",function(ze,ht){return ht?j.color:ze?P.color:g.color}).shape("line").style(ne)]}},{key:"enableDrag",value:function(){this.disableDrag(),this.layers[0].on(M.LayerEvent.Mousedown,this.onMouseDown),this.scene.on(M.SceneEvent.Dragging,this.onDragging),this.scene.on(M.SceneEvent.Mouseup,this.onDragEnd),this.scene.on(M.SceneEvent.Dragend,this.onDragEnd)}},{key:"disableDrag",value:function(){this.layers[0].off(M.LayerEvent.Mousedown,this.onMouseDown),this.scene.off(M.SceneEvent.Dragging,this.onDragging),this.scene.off(M.SceneEvent.Mouseup,this.onDragEnd),this.scene.off(M.SceneEvent.Dragend,this.onDragEnd)}},{key:"enableUnClick",value:function(){this.disableUnClick(),this.layers[0].on(M.LayerEvent.UnClick,this.onUnClick)}},{key:"disableUnClick",value:function(){this.layers[0].off(M.LayerEvent.UnClick,this.onUnClick)}}]),s}(Jr),H=function(se){xt(s,se);var a=Yr(s);function s(){var l;ya(this,s);for(var g=arguments.length,P=Array(g),j=0;g>j;j++)P[j]=arguments[j];return(l=a.call.apply(a,[this].concat(P))).onMouseMove=function(ne){l.emit(M.RenderEvent.Mousemove,ne)},l.onMouseOut=function(ne){l.emit(M.RenderEvent.Mouseout,ne)},l.onMouseDown=function(ne){l.emit(M.RenderEvent.Click,ne)},l}return xn(s,[{key:"initLayers",value:function(){var l=this.style,g=l.normal,P=l.style,j=P===void 0?{}:P,ne=l.options,ge=g.shape,ze=g.size,ht=g.color;return[new V.PointLayer(ne!=null?ne:{}).source(aa([])).size(ze).color(ht).shape(ge).style(j)]}},{key:"enableClick",value:function(){this.disableClick(),this.layers[0].on(M.LayerEvent.Mousedown,this.onMouseDown)}},{key:"disableClick",value:function(){this.layers[0].off(M.LayerEvent.Mousedown,this.onMouseDown)}},{key:"enableHover",value:function(){var l,g;this.disableHover(),(l=this.layers[0])===null||l===void 0||l.on(M.LayerEvent.Mousemove,this.onMouseMove),(g=this.layers[0])===null||g===void 0||g.on(M.LayerEvent.Mouseout,this.onMouseOut)}},{key:"disableHover",value:function(){var l,g;(l=this.layers[0])===null||l===void 0||l.off(M.LayerEvent.Mousemove,this.onMouseMove),(g=this.layers[0])===null||g===void 0||g.off(M.LayerEvent.Mouseout,this.onMouseOut)}}]),s}(Jr),ve=function(se){xt(s,se);var a=Yr(s);function s(){var l;ya(this,s);for(var g=arguments.length,P=Array(g),j=0;g>j;j++)P[j]=arguments[j];return(l=a.call.apply(a,[this].concat(P))).onCreate=function(ne){l.emit(M.RenderEvent.UnClick,ne)},l.onMouseMove=function(ne){l.emit(M.RenderEvent.Mousemove,ne)},l.onMouseOut=function(ne){l.emit(M.RenderEvent.Mouseout,ne)},l.onMouseDown=function(ne){l.emit(M.RenderEvent.Dragstart,ne)},l.onDragging=function(ne){l.emit(M.RenderEvent.Dragging,ne)},l.onDragEnd=m(function(ne){l.emit(M.RenderEvent.Dragend,ne)},0),l.onClick=function(ne){l.emit(M.RenderEvent.Click,ne)},l.onContextmenu=function(ne){l.emit(M.RenderEvent.Contextmenu,ne)},l}return xn(s,[{key:"initLayers",value:function(){var l=this.style,g=l.normal,P=l.hover,j=l.active,ne=l.style,ge=ne===void 0?{}:ne,ze=l.options;return[new V.PointLayer(ze!=null?ze:{}).source(aa([])).size("isHover*isActive",function(ht,zt){return zt?j.size:ht?P.size:g.size}).color("isHover*isActive",function(ht,zt){return zt?j.color:ht?P.color:g.color}).shape("isHover*isActive",function(ht,zt){return zt?j.shape:ht?P.shape:g.shape}).style(ge)]}},{key:"enableCreate",value:function(){this.disableCreate(),this.layers[0].on(M.LayerEvent.UnClick,this.onCreate)}},{key:"disableCreate",value:function(){this.layers[0].off(M.LayerEvent.UnClick,this.onCreate)}},{key:"enableHover",value:function(){var l,g;this.disableHover(),(l=this.layers[0])===null||l===void 0||l.on(M.LayerEvent.Mousemove,this.onMouseMove),(g=this.layers[0])===null||g===void 0||g.on(M.LayerEvent.Mouseout,this.onMouseOut)}},{key:"disableHover",value:function(){var l,g;(l=this.layers[0])===null||l===void 0||l.off(M.LayerEvent.Mousemove,this.onMouseMove),(g=this.layers[0])===null||g===void 0||g.off(M.LayerEvent.Mouseout,this.onMouseOut)}},{key:"enableDrag",value:function(){this.disableDrag(),this.layers[0].on(M.LayerEvent.Mousedown,this.onMouseDown),this.scene.on(M.SceneEvent.Dragging,this.onDragging),this.scene.on(M.SceneEvent.Mouseup,this.onDragEnd),this.scene.on(M.SceneEvent.Dragend,this.onDragEnd)}},{key:"disableDrag",value:function(){this.layers[0].off(M.LayerEvent.Mousedown,this.onMouseDown),this.scene.off(M.SceneEvent.Dragging,this.onDragging),this.scene.off(M.SceneEvent.Mouseup,this.onDragEnd),this.scene.off(M.SceneEvent.Dragend,this.onDragEnd)}},{key:"enableClick",value:function(){this.disableClick(),this.layers[0].on(M.LayerEvent.Click,this.onClick)}},{key:"disableClick",value:function(){this.layers[0].off(M.LayerEvent.Click,this.onClick)}},{key:"enableContextMenu",value:function(){this.disableContextMenu(),this.layers[0].on(M.LayerEvent.Contextmenu,this.onContextmenu)}},{key:"disableContextMenu",value:function(){this.layers[0].off(M.LayerEvent.Contextmenu,this.onContextmenu)}}]),s}(Jr),ot=function(se){xt(s,se);var a=Yr(s);function s(){var l;ya(this,s);for(var g=arguments.length,P=Array(g),j=0;g>j;j++)P[j]=arguments[j];return(l=a.call.apply(a,[this].concat(P))).onMouseMove=function(ne){l.emit(M.RenderEvent.Mousemove,ne)},l.onMouseOut=function(ne){l.emit(M.RenderEvent.Mouseout,ne)},l.onMouseDown=function(ne){l.emit(M.RenderEvent.Dragstart,ne)},l.onDragging=function(ne){l.emit(M.RenderEvent.Dragging,ne)},l.onDragEnd=m(function(ne){l.emit(M.RenderEvent.Dragend,ne)},0),l.onUnClick=function(ne){l.emit(M.RenderEvent.UnClick,ne)},l.enableHover=function(){var ne,ge;l.disableHover(),(ne=l.layers[0])===null||ne===void 0||ne.on(M.LayerEvent.Mousemove,l.onMouseMove),(ge=l.layers[0])===null||ge===void 0||ge.on(M.LayerEvent.Mouseout,l.onMouseOut)},l.disableHover=function(){var ne,ge;(ne=l.layers[0])===null||ne===void 0||ne.off(M.LayerEvent.Mousemove,l.onMouseMove),(ge=l.layers[0])===null||ge===void 0||ge.off(M.LayerEvent.Mouseout,l.onMouseOut)},l}return xn(s,[{key:"initLayers",value:function(){var l=this.style,g=l.normal,P=l.hover,j=l.active,ne=l.style,ge=l.options,ze=new V.PolygonLayer(ge!=null?ge:{});return ze.source(aa([])).color("isHover*isActive",function(ht,zt){return zt?j.color:ht?P.color:g.color}).style(ne),[ze]}},{key:"enableDrag",value:function(){this.disableDrag(),this.layers[0].on(M.LayerEvent.Mousedown,this.onMouseDown),this.scene.on(M.SceneEvent.Dragging,this.onDragging),this.scene.on(M.SceneEvent.Mouseup,this.onDragEnd),this.scene.on(M.SceneEvent.Dragend,this.onDragEnd)}},{key:"disableDrag",value:function(){this.layers[0].off(M.LayerEvent.Mousedown,this.onMouseDown),this.scene.off(M.SceneEvent.Dragging,this.onDragging),this.scene.off(M.SceneEvent.Mouseup,this.onDragEnd),this.scene.off(M.SceneEvent.Dragend,this.onDragEnd)}},{key:"enableUnClick",value:function(){this.disableUnClick(),this.layers[0].on(M.LayerEvent.UnClick,this.onUnClick)}},{key:"disableUnClick",value:function(){this.layers[0].off(M.LayerEvent.UnClick,this.onUnClick)}}]),s}(Jr),kt=function(se){xt(s,se);var a=Yr(s);function s(l){var g;return ya(this,s),(g=a.call(this)).scene=void 0,g.previousClick=void 0,g.onDblClick=function(P){var j,ne,ge=(j=(ne=P.pixel)!==null&&ne!==void 0?ne:P.point)!==null&&j!==void 0?j:{},ze=ge.x,ht=ze===void 0?0:ze,zt=ge.y,qt=zt===void 0?0:zt,_r=Date.now();if(g.previousClick){var Rr=g.previousClick,Kr=Rr.y;300>_r-Rr.time&&5>Math.abs(ht-Rr.x)&&5>Math.abs(qt-Kr)&&g.emit(M.RenderEvent.DblClick,P)}g.previousClick={x:ht,y:qt,time:_r}},g.onMouseMove=function(P){g.emit(M.RenderEvent.Mousemove,P)},g.onMouseDown=function(P){g.emit(M.RenderEvent.Dragstart,P)},g.onDragging=function(P){g.emit(M.RenderEvent.Dragging,P)},g.onDragEnd=m(function(P){g.emit(M.RenderEvent.Dragend,P)},0),g.scene=l,g}return xn(s,[{key:"enableDrag",value:function(){this.disableDrag(),this.scene.on(M.SceneEvent.Mousedown,this.onMouseDown),this.scene.on(M.SceneEvent.Dragging,this.onDragging),this.scene.on(M.SceneEvent.Mouseup,this.onDragEnd),this.scene.on(M.SceneEvent.Dragend,this.onDragEnd)}},{key:"disableDrag",value:function(){this.scene.off(M.SceneEvent.Mousedown,this.onMouseDown),this.scene.off(M.SceneEvent.Dragging,this.onDragging),this.scene.off(M.SceneEvent.Mouseup,this.onDragEnd),this.scene.off(M.SceneEvent.Dragend,this.onDragEnd)}},{key:"enableMouseMove",value:function(){this.disableMouseMove(),this.scene.on(M.SceneEvent.Mousemove,this.onMouseMove)}},{key:"disableMouseMove",value:function(){this.scene.off(M.SceneEvent.Mousemove,this.onMouseMove)}},{key:"enableDblClick",value:function(){this.disableDblClick(),this.scene.on(M.SceneEvent.Mousedown,this.onDblClick)}},{key:"disableDblClick",value:function(){this.scene.off(M.SceneEvent.Mousedown,this.onDblClick)}}]),s}(Wr),J=function(se){xt(s,se);var a=Yr(s);function s(){return ya(this,s),a.apply(this,arguments)}return xn(s,[{key:"initLayers",value:function(){var l=this.style,g=l.normal,P=l.active,j=l.style,ne=j===void 0?{}:j,ge=l.options;return[new V.PointLayer(ge!=null?ge:{}).source(aa([])).size("isActive",function(ze){return ze?P.size:g.size}).color("isActive",function(ze){return ze?P.color:g.color}).shape("text","text").style(ne)]}}]),s}(Jr),f={point:ve,line:F,dashLine:Gn,midPoint:H,text:J,polygon:ot},O="#1990FF",K="#ED9D48",q={blend:"normal",pickingBuffer:5},me={color:O,shape:"circle",size:6},je={color:K,shape:"circle",size:6},tt={shape:"circle",size:6,color:K},w={options:q,normal:me,hover:vn(vn({},me),{},{size:8}),active:vn(vn({},me),{},{size:8,color:K}),style:{stroke:"#ffffff",strokeWidth:2}},Gt={options:q,normal:je,hover:vn(vn({},je),{},{size:8}),active:vn(vn({},je),{},{size:8}),style:{stroke:"#ffffff",strokeWidth:2}},b={color:O,size:12},x={point:Gt,line:{options:q,normal:{color:O,size:2},hover:{color:O,size:2},active:{color:K,size:2},style:{}},polygon:{options:q,normal:{color:O},hover:{color:O},active:{color:K},style:{opacity:.15}},midPoint:{options:q,normal:tt},dashLine:{options:q,normal:{color:K,size:2},style:{lineType:"dash",dashArray:[6,6]}},text:{options:q,normal:b,active:vn(vn({},b),{},{color:K}),style:{fontWeight:"800",textOffset:[0,b.size+6],textAllowOverlap:!0,stroke:"#ffffff",strokeWidth:2}}},S=function(se,a){return se===a||se!=se&&a!=a},Z=function(se,a){for(var s=se.length;s--;)if(S(se[s][0],a))return s;return-1},he=Array.prototype.splice,Se=function(se){var a=this.__data__,s=Z(a,se);return s>=0&&(s==a.length-1?a.pop():he.call(a,s,1),--this.size,!0)},Pe=function(se){var a=this.__data__,s=Z(a,se);return 0>s?void 0:a[s][1]},ct=function(se){return Z(this.__data__,se)>-1},Ut=function(se,a){var s=this.__data__,l=Z(s,se);return 0>l?(++this.size,s.push([se,a])):s[l][1]=a,this};function wt(se){var a=-1,s=se==null?0:se.length;for(this.clear();++al.length)return l.push([se,a]),this.size=++s.size,this;s=this.__data__=new jf(l)}return s.set(se,a),this.size=s.size,this};function Ah(se){var a=this.__data__=new Kt(se);this.size=a.size}Ah.prototype.clear=cr,Ah.prototype.delete=hr,Ah.prototype.get=Fr,Ah.prototype.has=Br,Ah.prototype.set=Yf;var vf=Ah,Ph=function(se,a){for(var s=-1,l=se==null?0:se.length;++s-1&&se%1==0&&a>se},hd=function(se){return typeof se=="number"&&se>-1&&se%1==0&&9007199254740991>=se},Gh={};Gh["[object Float32Array]"]=Gh["[object Float64Array]"]=Gh["[object Int8Array]"]=Gh["[object Int16Array]"]=Gh["[object Int32Array]"]=Gh["[object Uint8Array]"]=Gh["[object Uint8ClampedArray]"]=Gh["[object Uint16Array]"]=Gh["[object Uint32Array]"]=!0,Gh["[object Arguments]"]=Gh["[object Array]"]=Gh["[object ArrayBuffer]"]=Gh["[object Boolean]"]=Gh["[object DataView]"]=Gh["[object Date]"]=Gh["[object Error]"]=Gh["[object Function]"]=Gh["[object Map]"]=Gh["[object Number]"]=Gh["[object Object]"]=Gh["[object RegExp]"]=Gh["[object Set]"]=Gh["[object String]"]=Gh["[object WeakMap]"]=!1;var Jp=function(se){return Mo(se)&&hd(se.length)&&!!Gh[Hu(se)]},i0=function(se){return function(a){return se(a)}},Cp=Pn(function(se,a){var s=a&&!a.nodeType&&a,l=s&&se&&!se.nodeType&&se,g=l&&l.exports===s&&Vn.process,P=function(){try{var j=l&&l.require&&l.require("util").types;return j||g&&g.binding&&g.binding("util")}catch(ne){}}();se.exports=P}),Tp=Cp&&Cp.isTypedArray,sp=Tp?i0(Tp):Jp,y0=Object.prototype.hasOwnProperty,a0=function(se,a){var s=Qc(se),l=!s&&Jh(se),g=!s&&!l&&vc(se),P=!s&&!l&&!g&&sp(se),j=s||l||g||P,ne=j?qh(se.length,String):[],ge=ne.length;for(var ze in se)!a&&!y0.call(se,ze)||j&&(ze=="length"||g&&(ze=="offset"||ze=="parent")||P&&(ze=="buffer"||ze=="byteLength"||ze=="byteOffset")||Ih(ze,ge))||ne.push(ze);return ne},Lp=Object.prototype,Wd=function(se){var a=se&&se.constructor;return se===(typeof a=="function"&&a.prototype||Lp)},d0=function(se,a){return function(s){return se(a(s))}},hf=d0(Object.keys,Object),Jc=Object.prototype.hasOwnProperty,td=function(se){if(!Wd(se))return hf(se);var a=[];for(var s in Object(se))Jc.call(se,s)&&s!="constructor"&&a.push(s);return a},Ud=function(se){return se!=null&&hd(se.length)&&!Xr(se)},P0=function(se){return Ud(se)?a0(se):td(se)},Dp=function(se,a){return se&&Hf(a,P0(a),se)},kh=function(se){var a=[];if(se!=null)for(var s in Object(se))a.push(s);return a},Zc=Object.prototype.hasOwnProperty,dh=function(se){if(!mi(se))return kh(se);var a=Wd(se),s=[];for(var l in se)(l!="constructor"||!a&&Zc.call(se,l))&&s.push(l);return s},rd=function(se){return Ud(se)?a0(se,!0):dh(se)},$p=function(se,a){return se&&Hf(a,rd(a),se)},k0=Pn(function(se,a){var s=a&&!a.nodeType&&a,l=s&&se&&!se.nodeType&&se,g=l&&l.exports===s?Li.Buffer:void 0,P=g?g.allocUnsafe:void 0;se.exports=function(j,ne){if(ne)return j.slice();var ge=j.length,ze=P?P(ge):new j.constructor(ge);return j.copy(ze),ze}}),H0=function(se,a){var s=-1,l=se.length;for(a||(a=Array(l));++sne))return!1;var ze=P.get(se),ht=P.get(a);if(ze&&ht)return ze==a&&ht==se;var zt=-1,qt=!0,_r=2&s?new X0:void 0;for(P.set(se,a),P.set(a,se);++zt0){if(++a>=800)return arguments[0]}else a=0;return se.apply(void 0,arguments)}},wc=hc(Ld?function(se,a){return Ld(se,"toString",{configurable:!0,enumerable:!1,value:zs(a),writable:!0})}:rl),cl=function(se,a){return wc(Wu(se,a,rl),se+"")},Jl=function(se,a,s){if(!mi(s))return!1;var l=typeof a;return!!(l=="number"?Ud(s)&&Ih(a,s.length):l=="string"&&a in s)&&S(s[a],se)},Uc=function(se){return cl(function(a,s){var l=-1,g=s.length,P=g>1?s[g-1]:void 0,j=g>2?s[2]:void 0;for(P=se.length>3&&typeof P=="function"?(g--,P):void 0,j&&Jl(s[0],s[1],j)&&(P=3>g?void 0:P,g=1),a=Object(a);++l":".","?":"/","|":"\\"},ge={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},ze=1;20>ze;++ze)P[111+ze]="f"+ze;for(ze=0;9>=ze;++ze)P[ze+96]=""+ze;qr.prototype.bind=function(an,en,Hr){var Fn=this;return Fn._bindMultiple.call(Fn,an=an instanceof Array?an:[an],en,Hr),Fn},qr.prototype.unbind=function(an,en){return this.bind.call(this,an,function(){},en)},qr.prototype.trigger=function(an,en){var Hr=this;return Hr._directMap[an+":"+en]&&Hr._directMap[an+":"+en]({},an),Hr},qr.prototype.reset=function(){var an=this;return an._callbacks={},an._directMap={},an},qr.prototype.stopCallback=function(an,en){if((" "+en.className+" ").indexOf(" mousetrap ")>-1||Kr(en,this.target))return!1;if("composedPath"in an&&typeof an.composedPath=="function"){var Hr=an.composedPath()[0];Hr!==an.target&&(en=Hr)}return en.tagName=="INPUT"||en.tagName=="SELECT"||en.tagName=="TEXTAREA"||en.isContentEditable},qr.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)},qr.addKeycodes=function(an){for(var en in an)an.hasOwnProperty(en)&&(P[en]=an[en]);g=null},qr.init=function(){var an=qr(s);for(var en in an)en.charAt(0)!=="_"&&(qr[en]=function(Hr){return function(){return an[Hr].apply(an,arguments)}}(en))},qr.init(),a.Mousetrap=qr,se.exports&&(se.exports=qr)}function ht(an,en,Hr){an.addEventListener?an.addEventListener(en,Hr,!1):an.attachEvent("on"+en,Hr)}function zt(an){if(an.type=="keypress"){var en=String.fromCharCode(an.which);return an.shiftKey||(en=en.toLowerCase()),en}return P[an.which]?P[an.which]:j[an.which]?j[an.which]:String.fromCharCode(an.which).toLowerCase()}function qt(an){return an=="shift"||an=="ctrl"||an=="alt"||an=="meta"}function _r(an,en,Hr){return Hr||(Hr=function(){if(!g)for(var Fn in g={},P)Fn>95&&112>Fn||P.hasOwnProperty(Fn)&&(g[P[Fn]]=Fn);return g}()[an]?"keydown":"keypress"),Hr=="keypress"&&en.length&&(Hr="keydown"),Hr}function Rr(an,en){var Hr,Fn,ni,Mi=[];for(Hr=function(wa){return wa==="+"?["+"]:(wa=wa.replace(/\+{2}/g,"+plus")).split("+")}(an),ni=0;Hr.length>ni;++ni)ge[Fn=Hr[ni]]&&(Fn=ge[Fn]),en&&en!="keypress"&&ne[Fn]&&(Fn=ne[Fn],Mi.push("shift")),qt(Fn)&&Mi.push(Fn);return{key:Fn,modifiers:Mi,action:en=_r(Fn,Mi,en)}}function Kr(an,en){return an!==null&&an!==s&&(an===en||Kr(an.parentNode,en))}function qr(an){var en=this;if(an=an||s,!(en instanceof qr))return new qr(an);en.target=an,en._callbacks={},en._directMap={};var Hr,Fn={},ni=!1,Mi=!1,wa=!1;function za($s){$s=$s||{};var ps,fs=!1;for(ps in Fn)$s[ps]?fs=!0:Fn[ps]=0;fs||(wa=!1)}function oo($s,ps,fs,Ks,Ou,wl){var wo,Zs,Cl,Gf=[],ec=fs.type;if(!en._callbacks[$s])return[];for(ec=="keyup"&&qt($s)&&(ps=[$s]),wo=0;en._callbacks[$s].length>wo;++wo)Zs=en._callbacks[$s][wo],(Ks||!Zs.seq||Fn[Zs.seq]==Zs.level)&&ec==Zs.action&&(ec=="keypress"&&!fs.metaKey&&!fs.ctrlKey||(Cl=Zs.modifiers,ps.sort().join(",")===Cl.sort().join(",")))&&((!Ks&&Zs.combo==Ou||Ks&&Zs.seq==Ks&&Zs.level==wl)&&en._callbacks[$s].splice(wo,1),Gf.push(Zs));return Gf}function Ds($s,ps,fs,Ks){en.stopCallback(ps,ps.target||ps.srcElement,fs,Ks)||$s(ps,fs)===!1&&(function(Ou){Ou.preventDefault?Ou.preventDefault():Ou.returnValue=!1}(ps),function(Ou){Ou.stopPropagation?Ou.stopPropagation():Ou.cancelBubble=!0}(ps))}function lo($s){typeof $s.which!="number"&&($s.which=$s.keyCode);var ps=zt($s);ps&&($s.type!="keyup"||ni!==ps?en.handleKey(ps,function(fs){var Ks=[];return fs.shiftKey&&Ks.push("shift"),fs.altKey&&Ks.push("alt"),fs.ctrlKey&&Ks.push("ctrl"),fs.metaKey&&Ks.push("meta"),Ks}($s),$s):ni=!1)}function cs($s,ps,fs,Ks){function Ou(Cl){return function(){wa=Cl,++Fn[$s],clearTimeout(Hr),Hr=setTimeout(za,1e3)}}function wl(Cl){Ds(fs,Cl,$s),Ks!=="keyup"&&(ni=zt(Cl)),setTimeout(za,10)}Fn[$s]=0;for(var wo=0;ps.length>wo;++wo){var Zs=wo+1===ps.length?wl:Ou(Ks||Rr(ps[wo+1]).action);as(ps[wo],Zs,Ks,$s,wo)}}function as($s,ps,fs,Ks,Ou){en._directMap[$s+":"+fs]=ps;var wl,wo=($s=$s.replace(/\s+/g," ")).split(" ");wo.length>1?cs($s,wo,ps,fs):(wl=Rr($s,fs),en._callbacks[wl.key]=en._callbacks[wl.key]||[],oo(wl.key,wl.modifiers,{type:wl.action},Ks,$s,Ou),en._callbacks[wl.key][Ks?"unshift":"push"]({callback:ps,modifiers:wl.modifiers,action:wl.action,seq:Ks,level:Ou,combo:$s}))}en._handleKey=function($s,ps,fs){var Ks,Ou=oo($s,ps,fs),wl={},wo=0,Zs=!1;for(Ks=0;Ou.length>Ks;++Ks)Ou[Ks].seq&&(wo=Math.max(wo,Ou[Ks].level));for(Ks=0;Ou.length>Ks;++Ks)if(Ou[Ks].seq){if(Ou[Ks].level!=wo)continue;Zs=!0,wl[Ou[Ks].seq]=1,Ds(Ou[Ks].callback,fs,Ou[Ks].combo,Ou[Ks].seq)}else Zs||Ds(Ou[Ks].callback,fs,Ou[Ks].combo);var Cl=fs.type=="keypress"&&Mi;fs.type!=wa||qt($s)||Cl||za(wl),Mi=Zs&&fs.type=="keydown"},en._bindMultiple=function($s,ps,fs){for(var Ks=0;$s.length>Ks;++Ks)as($s[Ks],ps,fs)},ht(an,"keypress",lo),ht(an,"keydown",lo),ht(an,"keyup",lo)}})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)}),Fh,Bf=function(se){return se&&se.length?se[0]:void 0},md=(Fh=1,function(se){return"".concat(se,"-").concat(Fh++)}),Vf=function(se,a){var s,l;return!(!se||!a||((s=se.properties)===null||s===void 0?void 0:s.id)!==((l=a.properties)===null||l===void 0?void 0:l.id))},id=function(se){var a=se.target,s=se.targetHandler,l=se.otherHandler;return se.data.map(function(g,P){var j,ne=Vf(g,a)?s:l;return(j=ne==null?void 0:ne(g,P))!==null&&j!==void 0?j:g})},df=function(){return{id:md("point"),isHover:!1,isActive:!1,isDrag:!1,createTime:Date.now()}},$d=function(){return{id:md("line"),isHover:!1,isActive:!1,isDrag:!1,isDraw:!1,createTime:Date.now()}},ef=function(){return{id:md("polygon"),isHover:!1,isActive:!1,isDrag:!1,isDraw:!1,createTime:Date.now()}},th=function(se){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Yi(se,vn(vn({},df()),a))},Xu=function(se){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{type:"Feature",properties:vn(vn({},$d()),{},{nodes:se},a),geometry:{type:"LineString",coordinates:Yo(aa(se))}}},Pl=function(se){return La(se,{id:md("dashLine")})},mu=function(se){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{type:"Feature",properties:vn(vn({},ef()),{},{nodes:se},a),geometry:{type:"Polygon",coordinates:[Yo(aa([].concat(qn(se),[Bf(se)])))]}}},pf=function(se){return function(a,s,l){l===void 0&&(l={});for(var g=fl(a).coordinates,P=0,j=0;g.length>j&&(P>s||j!==g.length-1);j++){if(P>=s){var ne=s-P;if(ne){var ge=Ml(g[j],g[j-1])-180;return dl(g[j],ne,ge,l)}return Yi(g[j])}P+=Sl(g[j],g[j+1],l)}return Yi(g[g.length-1])}(se,Fl(se,{units:"meters"})/2,{units:"meters"})},jh=function(se,a){var s=a.format,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=[];if(a.showTotalDistance){var P=pf(se),j=Fl(se,{units:"meters"}),ne=Yo(se).map(function(Rr){return Yi(Rr)});P.properties=vn({id:md("text"),isActive:!1,meters:j,text:s(j,ne),type:"totalDistance"},l),g.push(P)}else for(var ge=se.geometry.coordinates,ze=0;ge.length-1>ze;ze++){var ht=Yi(ge[ze]),zt=Yi(ge[ze+1]),qt=Sl(ht,zt,{units:"meters"}),_r=Vc(aa([ht,zt]));_r.properties=vn({id:md("text"),isActive:!1,meters:qt,text:s(qt,[ht,zt]),type:"distance"},l),g.push(_r)}return g},qp=function(se,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=a.format,g=Ws(se);return Qf(se,{properties:vn({meters:g,text:l(g,se),type:"area",isActive:!1},s)})},fi=function(se){var a,s,l,g,P,j,ne=se.getContainer();return(a=(s=(l=(g=(P=(j=ne==null?void 0:ne.querySelector(".l7-marker-container"))!==null&&j!==void 0?j:ne==null?void 0:ne.querySelector(".BMap_mask"))!==null&&P!==void 0?P:se.getMapCanvasContainer())!==null&&g!==void 0?g:ne==null?void 0:ne.querySelector(".l7-scene"))!==null&&l!==void 0?l:ne==null?void 0:ne.querySelector(".l7-control-container"))!==null&&s!==void 0?s:ne==null?void 0:ne.querySelector(".l7-marker-container2"))!==null&&a!==void 0?a:null},Ja=function(se){return se.lngLat||se.lnglat},ga=function(se){var a=Ja(se);return[a.lng,a.lat]},Yu=function(se){return[se.lng,se.lat]},tf=function(se){for(var a=Number.MAX_SAFE_INTEGER,s=0,l=se.length,g=0;l>g;g++)a>se[g]&&(a=se[g],s=g);return s},bo=function(se,a){var s=[],l=[];return se.forEach(function(g){nu(g,a)?l.length&&(s.push(l),l=[]):l.push(g)}),l.length&&s.push(l),s},Nr=function(se,a,s){var l=[],g=[],P=[];return l=se==="allDrawData"?D.instances.map(function(j){return j.getData()}).flat():se==="drawData"?a.getData():se instanceof Function?se(s):se,l.length&&(g=l.map(function(j){var ne,ge=(ne=j.properties)!==null&&ne!==void 0?ne:{},ze=ge.nodes,ht=ze===void 0?[]:ze,zt=ge.isActive;return zt!==void 0&&zt?ht.filter(function(qt){return!nu(qt.geometry.coordinates,s)}):ht}).flat().filter(function(j){return j}),g.length||(g=Yo(aa(l)).map(function(j){return Yi(j)})),P=l.map(function(j){var ne,ge,ze=(ne=j.properties)===null||ne===void 0?void 0:ne.line;return!((ge=j.properties)===null||ge===void 0)&&ge.isActive&&ze?bo(ze.properties.nodes.map(function(ht){return ht.geometry.coordinates}),s).filter(function(ht){return ht.length>1}).map(function(ht){return La(ht)}):[ze]}).flat().filter(function(j){return j}),P.length||l.forEach(function(j){var ne=lf(j);if(/linestring/i.test(ne)&&P.push(j),/polygon/i.test(ne)){var ge,ze,ht=Oe(j);return(ge=P).push.apply(ge,qn((ze=ht==null?void 0:ht.features)!==null&&ze!==void 0?ze:[ht]))}})),{points:g,lines:P}},vr=function(se,a,s,l){var g=s.pointAdsorbPixel,P=Sn(se,2),j=l.lngLatToPixel([P[0],P[1]]),ne=j.x,ge=j.y,ze=a.map(function(zt){var qt=Sn(zt.geometry.coordinates,2),_r=l.lngLatToPixel([qt[0],qt[1]]),Rr=_r.y;return Math.pow(ne-_r.x,2)+Math.pow(ge-Rr,2)}),ht=tf(ze);return Math.pow(ze[ht],.5)>g?null:a[ht].geometry.coordinates},hi=function(se,a,s,l){var g=s.lineAdsorbPixel,P=Sn(se,2),j=l.lngLatToPixel([P[0],P[1]]),ne=j.x,ge=j.y,ze=a.filter(function(qt){return Yo(qt).length>1}).map(function(qt){return function(_r,Rr,Kr){Kr===void 0&&(Kr={});var qr=Yi([1/0,1/0],{dist:1/0}),an=0;return Rc(_r,function(en){for(var Hr=lc(en),Fn=0;Hr.length-1>Fn;Fn++){var ni=Yi(Hr[Fn]);ni.properties.dist=Sl(Rr,ni,Kr);var Mi=Yi(Hr[Fn+1]);Mi.properties.dist=Sl(Rr,Mi,Kr);var wa=Sl(ni,Mi,Kr),za=Math.max(ni.properties.dist,Mi.properties.dist),oo=Ml(ni,Mi),Ds=dl(Rr,za,oo+90,Kr),lo=dl(Rr,za,oo-90,Kr),cs=cf(La([Ds.geometry.coordinates,lo.geometry.coordinates]),La([ni.geometry.coordinates,Mi.geometry.coordinates])),as=null;cs.features.length>0&&((as=cs.features[0]).properties.dist=Sl(Rr,as,Kr),as.properties.location=an+Sl(ni,as,Kr)),qr.properties.dist>ni.properties.dist&&((qr=ni).properties.index=Fn,qr.properties.location=an),qr.properties.dist>Mi.properties.dist&&((qr=Mi).properties.index=Fn+1,qr.properties.location=an+wa),as&&qr.properties.dist>as.properties.dist&&((qr=as).properties.index=Fn),an+=wa}}),qr}(qt,se)});if(!ze.length)return null;var ht=ze.map(function(qt){var _r=Sn(qt.geometry.coordinates,2),Rr=l.lngLatToPixel([_r[0],_r[1]]),Kr=Rr.y;return Math.pow(ne-Rr.x,2)+Math.pow(ge-Kr,2)}),zt=tf(ht);return Math.pow(ht[zt],.5)>g?null:ze[zt].geometry.coordinates},Ma=function(se,a){var s=Sn(a,2),l=s[0],g=s[1];se.lngLat&&(se.lngLat={lng:l,lat:g}),se.lnglat&&(se.lnglat={lng:l,lat:g})},Ra=function(){function se(a,s){ya(this,se),this.container=void 0,this.cursor=null,this.options=void 0,this.container=fi(a),this.options=s}return xn(se,[{key:"setCursor",value:function(a){a!==this.cursor&&this.container&&(this.container.style.cursor=a?this.options[a]:"",this.cursor=a)}},{key:"destroy",value:function(){this.setCursor(null)}}]),se}();function Ni(se,a){a===void 0&&(a={});var s=a.insertAt;if(se&&typeof document!="undefined"){var l=document.head||document.getElementsByTagName("head")[0],g=document.createElement("style");g.type="text/css",s==="top"&&l.firstChild?l.insertBefore(g,l.firstChild):l.appendChild(g),g.styleSheet?g.styleSheet.cssText=se:g.appendChild(document.createTextNode(se))}}Ni('.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}'),Ni(".tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px rgba(154,161,177,.15),0 4px 80px -8px rgba(36,40,47,.25),0 4px 4px -2px rgba(91,94,105,.15);background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}");var ea=function(){function se(a,s){var l=this;ya(this,se),this.content="",this.tippy=void 0,this.scene=void 0,this.isMouseInner=!1,this.onMouseMove=function(){l.isMouseInner=!0,l.checkTippyShow()},this.onMouseOut=function(){l.isMouseInner=!1,l.checkTippyShow()},this.setContent=m(function(P){var j;l.content=P!=null?P:"",(j=l.tippy)===null||j===void 0||j.setContent(P!=null?P:""),l.checkTippyShow()},16,{maxWait:16});var g=fi(a);this.scene=a,g&&(this.tippy=_o(fi(a),vn(vn({},Wt),s)),this.tippy.hide(),a.on(M.SceneEvent.Mousemove,this.onMouseMove),a.on(M.SceneEvent.Mouseout,this.onMouseOut))}return xn(se,[{key:"getContent",value:function(){return this.content}},{key:"checkTippyShow",value:function(){var a,s;this.content&&this.isMouseInner?(a=this.tippy)===null||a===void 0||a.show():(s=this.tippy)===null||s===void 0||s.hide()}},{key:"destroy",value:function(){var a;this.scene.off(M.SceneEvent.Mousemove,this.onMouseMove),this.scene.off(M.SceneEvent.Mouseout,this.onMouseOut),(a=this.tippy)===null||a===void 0||a.destroy()}}]),se}(),Vi=function(){function se(a){var s=a.config;ya(this,se),this.historyList=[],this.historyIndex=0,this.config=void 0,this.config=s}return xn(se,[{key:"save",value:function(a){if(this.config){var s=this.config.maxSize;this.historyIndex&&(this.historyList=this.historyList.slice(this.historyIndex),this.historyIndex=0),s>this.historyList.length||this.historyList.pop();var l=nd(a);return this.historyList.unshift(l),l}}},{key:"revert",value:function(){if(this.historyList.length&&this.historyList.length-1>this.historyIndex){var a=this.historyList[++this.historyIndex];return a?nd(a):void 0}}},{key:"redo",value:function(){if(this.historyList.length&&this.historyIndex>0){var a=this.historyList[--this.historyIndex];return a?nd(a):void 0}}}]),se}(),Qn=function(se){xt(s,se);var a=Yr(s);function s(l){var g,P=l.data,j=l.render,ne=l.history,ge=l.scene;return ya(this,s),(g=a.call(this)).scene=void 0,g.render=void 0,g.data=nd(d),g.timeout=null,g.diffData={},g.history=void 0,g.scene=ge,g.render=j,ne&&(g.history=new Vi({config:ne})),P&&g.setData(P),g}return xn(s,[{key:"saveHistory",value:function(){var l;return(l=this.history)===null||l===void 0?void 0:l.save(this.data)}},{key:"revertHistory",value:function(){var l,g=(l=this.history)===null||l===void 0?void 0:l.revert();if(g)return this.setData(g),g}},{key:"redoHistory",value:function(){var l,g=(l=this.history)===null||l===void 0?void 0:l.redo();if(g)return this.setData(g),g}},{key:"setData",value:function(l){var g=this;return Object.keys(l).length&&(this.data=vn(vn({},this.data),l),this.diffData=vn(vn({},this.diffData),l),this.timeout||(this.timeout=requestAnimationFrame(function(){return g.updateDiffData()})),this.emit(M.SourceEvent.Change,{data:this.data})),this.data}},{key:"getData",value:function(){return this.data}},{key:"getRenderData",value:function(l){return this.data[l]}},{key:"setRenderData",value:function(l,g){var P=typeof g=="function"?g(this.getRenderData(l)):g;return this.setData(zr({},l,P)),this.emit(M.SourceEvent.Change,this.data),P}},{key:"updateDiffData",value:function(){var l=this,g=Object.entries(this.diffData);g.length&&(g.forEach(function(P){var j,ne=Sn(P,2),ge=ne[0],ze=ne[1];Array.isArray(ze)&&((j=l.getRender(ge))===null||j===void 0||j.setData(ze))}),this.emit(M.SourceEvent.Update,this.data,this.diffData),this.diffData={},this.timeout=null,requestAnimationFrame(function(){l.scene.render()}))}},{key:"getRender",value:function(l){return this.render[l]}},{key:"clear",value:function(){this.setData(j0(Object.keys(this.render).map(function(l){return[l,[]]})))}}]),s}(Wr),D=function(se){xt(s,se);var a=Yr(s);function s(l,g){var P;ya(this,s),(P=a.call(this)).scene=void 0,P.source=void 0,P.render=void 0,P.cursor=void 0,P.options=void 0,P.enabled=!1,P.allowCreate=!1,P.sceneRender=void 0,P.mouseLngLat={lng:0,lat:0},P.popup=void 0,P.addCount=0,P.saveMouseLngLat=m(function(ze){P.mouseLngLat=Ja(ze)},100,{maxWait:100}),P.saveHistory=m(function(){P.options.history&&P.source.saveHistory()},100),P.bindThis(),P.scene=l,P.sceneRender=new kt(l),P.options=dc({},P.getDefaultOptions(g),g),P.render=P.initRender(),P.source=new Qn({render:P.render,history:P.options.history||void 0,scene:l}),P.cursor=new Ra(l,P.options.cursor);var j=P.options,ne=j.initialData,ge=j.popup;return ne&&P.setData(ne),ge&&(P.popup=new ea(l,ge instanceof Object?ge:{})),P.saveHistory(),P.bindCommonEvent(),P.emit(M.DrawEvent.Init,$r(P)),P.bindEnableEvent(),s.instances.push($r(P)),P}return xn(s,[{key:"addable",get:function(){var l=this.getData(),g=this.options,P=g.multiple,j=g.maxCount,ne=l.find(function(ge){return ge.properties.isDraw});return!(!this.enabled||!this.allowCreate)&&(!!(P&&0>=j||ne)||!(!P&&this.addCount>=1)&&(0>=j||j>l.length))}},{key:"getOptions",value:function(){return this.options}},{key:"getEditItem",value:function(){return this.editItem}},{key:"getDragItem",value:function(){return this.dragItem}},{key:"setHelper",value:function(l){var g,P,j=this.options.helper;if(j){var ne=(g=l in j?j[l]:l)!==null&&g!==void 0?g:null;(P=this.popup)===null||P===void 0||P.setContent(ne)}}},{key:"isEnable",value:function(){return this.enabled}},{key:"bindThis",value:function(){this.initRender=this.initRender.bind(this),this.getData=this.getData.bind(this),this.setData=this.setData.bind(this),this.emitChangeEvent=this.emitChangeEvent.bind(this),this.saveHistory=this.saveHistory.bind(this),this.onSceneMouseMove=this.onSceneMouseMove.bind(this),this.revertHistory=this.revertHistory.bind(this),this.redoHistory=this.redoHistory.bind(this),this.removeActiveFeature=this.removeActiveFeature.bind(this),this.bindCommonEvent=this.bindCommonEvent.bind(this),this.bindEnableEvent=this.bindEnableEvent.bind(this),this.unbindEnableEvent=this.unbindEnableEvent.bind(this),this.setActiveFeature=this.setActiveFeature.bind(this)}},{key:"bindCommonEvent",value:function(){var l=this;this.on(M.DrawEvent.Add,this.emitChangeEvent),this.on(M.DrawEvent.Add,function(){l.addCount++}),this.on(M.DrawEvent.Edit,this.emitChangeEvent),this.on(M.DrawEvent.Remove,this.emitChangeEvent),this.on(M.DrawEvent.Clear,this.emitChangeEvent),this.on(M.DrawEvent.AddNode,this.saveHistory),this.on(M.DrawEvent.RemoveNode,this.emitChangeEvent),this.bindEmitSelectEvent(!0)}},{key:"bindEmitSelectEvent",value:function(){var l=this,g=arguments.length>0&&arguments[0]!==void 0&&arguments[0],P=null,j=function(){var ne,ge,ze,ht=l.getData().find(function(zt){var qt;return(qt=zt.properties)===null||qt===void 0?void 0:qt.isActive})||null;((ne=P)===null||ne===void 0||(ge=ne.properties)===null||ge===void 0?void 0:ge.id)!==(ht==null||(ze=ht.properties)===null||ze===void 0?void 0:ze.id)&&(P=ht,l.emit(M.DrawEvent.Select,ht))};this.source.on(M.SourceEvent.Change,j),g&&j()}},{key:"bindEnableEvent",value:function(){this.unbindKeyboardEvent(),this.scene.setMapStatus({doubleClickZoom:!1}),this.scene.on(M.SceneEvent.Mousemove,this.saveMouseLngLat),this.bindKeyboardEvent()}},{key:"unbindEnableEvent",value:function(){this.scene.setMapStatus({doubleClickZoom:!0}),this.scene.off(M.SceneEvent.Mousemove,this.saveMouseLngLat),this.unbindKeyboardEvent()}},{key:"bindKeyboardEvent",value:function(){var l=this,g=this.options.keyboard||{},P=g.revert,j=g.redo,ne=g.remove;ne&&Md.bind(ne,function(){l.removeActiveFeature()}),this.options.history&&(P&&Md.bind(P,this.revertHistory),j&&Md.bind(j,this.redoHistory))}},{key:"unbindKeyboardEvent",value:function(){var l=this.options.keyboard||{},g=l.revert,P=l.redo,j=l.remove;j&&Md.unbind(j),this.options.history&&(g&&Md.unbind(g),P&&Md.unbind(P))}},{key:"emitChangeEvent",value:function(){this.emit(M.DrawEvent.Change,this.getData()),this.saveHistory()}},{key:"revertHistory",value:function(){this.enabled&&this.options.history&&this.source.revertHistory()&&(this.correctDrawItem(),this.emit(M.DrawEvent.Change,this.getData()))}},{key:"redoHistory",value:function(){this.enabled&&this.options.history&&this.source.redoHistory()&&(this.correctDrawItem(),this.emit(M.DrawEvent.Change,this.getData()))}},{key:"getRenderLayers",value:function(){return j0(Ff(this.render).map(function(l){var g=Sn(l,2);return[g[0],g[1].getLayers()]}))}},{key:"getTargetFeature",value:function(l){var g,P,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getData(),ne=null;return l&&(ne=(g=j.find(function(ge){var ze;return ge.properties.id===(typeof l=="string"?l:(ze=l.properties)===null||ze===void 0?void 0:ze.id)}))!==null&&g!==void 0?g:null,!ne&&l instanceof Object&&(ne=(P=j.find(function(ge){return nu(l.geometry,ge.geometry)}))!==null&&P!==void 0?P:null)),ne}},{key:"removeActiveFeature",value:function(){var l=this.getData().find(function(g){var P=g.properties;return P.isActive||P.isDraw});return l&&this.removeFeature(l),l}},{key:"removeFeature",value:function(l){var g=this.getData(),P=this.getTargetFeature(l);P&&(this.setData(g.filter(function(j){return!Vf(P,j)})),this.emit(M.DrawEvent.Remove,l,this.getData()))}},{key:"correctDrawItem",value:function(){this.getData().find(function(l){return l.properties.isDraw})&&this.onSceneMouseMove({type:"mousemove",lnglat:this.mouseLngLat,lngLat:this.mouseLngLat})}},{key:"initRender",value:function(){var l,g={},P=function(ne,ge){var ze=typeof Symbol!="undefined"&&ne[Symbol.iterator]||ne["@@iterator"];if(!ze){if(Array.isArray(ne)||(ze=ti(ne))||ge&&ne&&typeof ne.length=="number"){ze&&(ne=ze);var ht=0,zt=function(){};return{s:zt,n:function(){return ne.length>ht?{done:!1,value:ne[ht++]}:{done:!0}},e:function(Kr){throw Kr},f:zt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var qt,_r=!0,Rr=!1;return{s:function(){ze=ze.call(ne)},n:function(){var Kr=ze.next();return _r=Kr.done,Kr},e:function(Kr){Rr=!0,qt=Kr},f:function(){try{_r||ze.return==null||ze.return()}finally{if(Rr)throw qt}}}}(this.getRenderTypes());try{for(P.s();!(l=P.n()).done;){var j=l.value;g[j]=new f[j](this.scene,{style:this.options.style[j]})}}catch(ne){P.e(ne)}finally{P.f()}return g}},{key:"getCommonOptions",value:function(l){return{initialData:[],autoActive:!0,cursor:nd(y),editable:!0,style:nd(x),multiple:!0,history:nd(Pi),keyboard:nd(ut),popup:!0,helper:{},maxCount:-1}}},{key:"setCursor",value:function(l){this.cursor.setCursor(l)}},{key:"resetCursor",value:function(){this.setCursor(this.addable?"draw":null)}},{key:"enable",value:function(){var l=this;this.allowCreate=0>=arguments.length||arguments[0]===void 0||arguments[0],this.addCount=0,this.enabled=!0,this.bindEnableEvent(),this.resetCursor(),this.setHelper(this.addable?"draw":null),setTimeout(function(){l.emit(M.DrawEvent.Enable,l)},0)}},{key:"disable",value:function(){var l=this;this.resetFeatures(),this.enabled=!1,this.setCursor(null),this.unbindEnableEvent(),this.addCount=0,this.setHelper(null),setTimeout(function(){l.emit(M.DrawEvent.Disable,l)},0)}},{key:"clear",value:function(){var l=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this.source.clear(),this.emit(M.DrawEvent.Clear,this),l&&this.disable()}},{key:"show",value:function(){return Object.values(this.render).forEach(function(l){l.show()})}},{key:"hide",value:function(){return Object.values(this.render).forEach(function(l){l.hide()})}},{key:"destroy",value:function(){var l,g=this;Object.values(this.render).forEach(function(j){j.destroy()}),Object.values(M.RenderEvent).forEach(function(j){Object.values(g.render).forEach(function(ne){ne.removeAllListeners(j)}),g.sceneRender.removeAllListeners(j)}),setTimeout(function(){Object.values(M.DrawEvent).forEach(function(j){g.removeAllListeners(j)})},0),(l=this.popup)===null||l===void 0||l.destroy(),this.cursor.destroy(),this.emit(M.DrawEvent.Destroy,this);var P=s.instances.indexOf(this);P>-1&&s.instances.splice(P,1)}}]),s}(Wr);D.instances=[];var I=function(se){var a=se==null?0:se.length;return a?se[a-1]:void 0},B=function(se){xt(s,se);var a=Yr(s);function s(){return ya(this,s),a.apply(this,arguments)}return xn(s,[{key:"pointRender",get:function(){return this.render.point}},{key:"dragPoint",get:function(){return this.getPointData().find(function(l){return l.properties.isDrag})}},{key:"editPoint",get:function(){return this.getPointData().find(function(l){return l.properties.isActive})}},{key:"hoverPoint",get:function(){return this.getPointData().find(function(l){return l.properties.isHover})}},{key:"getDragPoint",value:function(){return this.dragPoint}},{key:"getEditPoint",value:function(){return this.editPoint}},{key:"getPointData",value:function(){return this.source.getRenderData("point")}},{key:"setPointData",value:function(l){return this.source.setRenderData("point",l)}},{key:"bindPointRenderEvent",value:function(){var l,g,P,j,ne,ge;(l=this.pointRender)===null||l===void 0||l.on(M.RenderEvent.UnClick,this.onPointCreate.bind(this)),(g=this.pointRender)===null||g===void 0||g.on(M.RenderEvent.Mousemove,this.onPointMouseMove.bind(this)),(P=this.pointRender)===null||P===void 0||P.on(M.RenderEvent.Mouseout,this.onPointMouseOut.bind(this)),(j=this.pointRender)===null||j===void 0||j.on(M.RenderEvent.Dragstart,this.onPointDragStart.bind(this)),(ne=this.pointRender)===null||ne===void 0||ne.on(M.RenderEvent.Dragging,this.onPointDragging.bind(this)),(ge=this.pointRender)===null||ge===void 0||ge.on(M.RenderEvent.Dragend,this.onPointDragEnd.bind(this))}},{key:"handleCreatePoint",value:function(l){var g=this.options,P=g.autoActive,j=g.editable,ne=th(l);return this.setPointData(function(ge){return id({target:ne,data:[].concat(qn(ge),[ne]),targetHandler:function(ze){ze.properties=vn(vn({},ze.properties),{},{isHover:j,isActive:P&&j})},otherHandler:function(ze){ze.properties=vn(vn({},ze.properties),{},{isHover:!1,isActive:!1,isDrag:!1})}})}),ne}},{key:"handlePointHover",value:function(l){return this.setCursor("pointHover"),Vf(l,this.hoverPoint)||this.setPointData(function(g){return id({target:l,data:g,targetHandler:function(P){P.properties.isHover=!0},otherHandler:function(P){P.properties.isHover=!1}})}),l}},{key:"handlePointUnHover",value:function(l){return this.resetCursor(),this.setPointData(function(g){return g.map(function(P){return P.properties.isHover=!1,P})}),l}},{key:"handlePointDragStart",value:function(l){return this.setPointData(function(g){return id({target:l,data:g,targetHandler:function(P){P.properties=vn(vn({},P.properties),{},{isDrag:!0,isActive:!0})},otherHandler:function(P){P.properties=vn(vn({},P.properties),{},{isDrag:!1,isActive:!1})}})}),this.scene.setMapStatus({dragEnable:!1}),this.setCursor("pointDrag"),l}},{key:"handlePointDragging",value:function(l,g){return this.setPointData(function(P){return id({target:l,data:P,targetHandler:function(j){j.geometry.coordinates=Yu(g)}})}),this.scene.setMapStatus({dragEnable:!1}),this.setCursor("pointDrag"),l}},{key:"handlePointDragEnd",value:function(l){return this.setPointData(function(g){return id({target:l,data:g,targetHandler:function(P){P.properties.isDrag=!1}})}),this.scene.setMapStatus({dragEnable:!0}),this.setCursor("pointHover"),l}},{key:"onPointCreate",value:function(l){return this.handleCreatePoint(Yu(Ja(l)))}},{key:"onPointMouseMove",value:function(l){return this.handlePointHover(l.feature)}},{key:"onPointMouseOut",value:function(l){return this.handlePointUnHover(l.feature)}},{key:"onPointDragStart",value:function(l){if(this.options.editable)return this.handlePointDragStart(l.feature)}},{key:"onPointDragging",value:function(l){var g=this.dragPoint;if(this.options.editable&&g)return this.handlePointDragging(g,Ja(l))}},{key:"onPointDragEnd",value:function(l){var g=this.dragPoint;if(this.options.editable&&g)return this.handlePointDragEnd(g)}},{key:"enablePointRenderAction",value:function(){var l,g,P,j,ne=this.options.editable;this.enabled&&((g=this.pointRender)===null||g===void 0||g.enableCreate()),(l=this.pointRender)===null||l===void 0||l.enableClick(),ne&&((P=this.pointRender)===null||P===void 0||P.enableHover(),(j=this.pointRender)===null||j===void 0||j.enableDrag())}},{key:"disablePointRenderAction",value:function(){var l,g,P,j;(l=this.pointRender)===null||l===void 0||l.disableCreate(),(g=this.pointRender)===null||g===void 0||g.disableHover(),(P=this.pointRender)===null||P===void 0||P.disableDrag(),(j=this.pointRender)===null||j===void 0||j.disableClick()}}]),s}(D),ee=function(se){xt(s,se);var a=Yr(s);function s(){return ya(this,s),a.apply(this,arguments)}return xn(s,[{key:"midPointRender",get:function(){return this.render.midPoint}},{key:"getCommonOptions",value:function(l){return vn(vn({},un(Nt(s.prototype),"getCommonOptions",this).call(this,l)),{},{showMidPoint:!0})}},{key:"bindMidPointRenderEvent",value:function(){var l,g,P;(l=this.midPointRender)===null||l===void 0||l.on(M.RenderEvent.Click,this.onMidPointClick.bind(this)),(g=this.midPointRender)===null||g===void 0||g.on(M.RenderEvent.Mousemove,this.onMidPointHover.bind(this)),(P=this.midPointRender)===null||P===void 0||P.on(M.RenderEvent.Mouseout,this.onMidPointUnHover.bind(this))}},{key:"getMidPointData",value:function(){return this.source.getRenderData("midPoint")}},{key:"setMidPointData",value:function(l){return this.source.setRenderData("midPoint",l)}},{key:"getMidPointsByLine",value:function(l){var g=l.properties.nodes;if(!this.options.showMidPoint||2>g.length)return[];for(var P=[],j=0;g.length-1>j;j++){var ne,ge,ze,ht,zt=Vc(aa([g[j],g[j+1]]),{properties:{id:md("midPoint"),startId:(ne=(ge=g[j].properties)===null||ge===void 0?void 0:ge.id)!==null&&ne!==void 0?ne:"",endId:(ze=(ht=g[j+1].properties)===null||ht===void 0?void 0:ht.id)!==null&&ze!==void 0?ze:""}});P.push(zt)}return P}},{key:"onMidPointHover",value:function(l){this.setCursor("pointHover")}},{key:"onMidPointUnHover",value:function(l){this.resetCursor()}},{key:"enableMidPointRenderAction",value:function(){var l,g;(l=this.midPointRender)===null||l===void 0||l.enableClick(),(g=this.midPointRender)===null||g===void 0||g.enableHover()}},{key:"disableMidPointRenderAction",value:function(){var l,g;(l=this.midPointRender)===null||l===void 0||l.disableClick(),(g=this.midPointRender)===null||g===void 0||g.disableHover()}}]),s}(B),fe={draw:"\u5355\u51FB\u7ED8\u5236\u70B9",pointHover:"\u53EF\u62D6\u62FD\u8C03\u6574\u70B9\u4F4D\u7F6E",pointDrag:null},Ae={draw:"\u5355\u51FB\u7ED8\u5236\u9996\u4E2A\u8282\u70B9",pointHover:"\u53EF\u62D6\u62FD\u8C03\u6574\u8282\u70B9\u4F4D\u7F6E",pointDrag:null,lineHover:"\u53EF\u62D6\u62FD\u8C03\u6574\u7EBF\u4F4D\u7F6E",lineDrag:null,midPointHover:"\u5355\u51FB\u5728\u8BE5\u4F4D\u7F6E\u65B0\u589E\u8282\u70B9",drawFinish:"\u5355\u51FB\u7EE7\u7EED\u7ED8\u5236\uFF0C\u53CC\u51FB\u7ED3\u675F\u7ED8\u5236"},Le={draw:"\u5355\u51FB\u7ED8\u5236\u9996\u4E2A\u8282\u70B9",drawContinue:"\u5355\u51FB\u7EE7\u7EED\u7ED8\u5236",drawFinish:"\u5355\u51FB\u7EE7\u7EED\u7ED8\u5236\uFF0C\u53CC\u51FB\u7ED3\u675F\u7ED8\u5236",midPointHover:"\u5355\u51FB\u5728\u8BE5\u4F4D\u7F6E\u65B0\u589E\u8282\u70B9",pointHover:"\u53EF\u62D6\u62FD\u8C03\u6574\u8282\u70B9\u4F4D\u7F6E",pointDrag:null,lineHover:"\u53EF\u62D6\u62FD\u8C03\u6574\u9762\u4F4D\u7F6E",lineDrag:null,polygonHover:"\u53EF\u62D6\u62FD\u8C03\u6574\u9762\u4F4D\u7F6E",polygonDrag:null},Ve=vn(vn({},Le),{},{draw:"\u5355\u51FB\u7ED8\u5236\u9996\u4E2A\u8282\u70B9",drawFinish:"\u5355\u51FB\u7ED3\u675F\u7ED8\u5236"}),Bt={draw:"\u62D6\u62FD\u5F00\u59CB\u7ED8\u5236",drawFinish:"\u677E\u5F00\u9F20\u6807\u7ED3\u675F\u7ED8\u5236"},sr={lineHover:"\u53EF\u62D6\u62FD\u8C03\u6574\u77E9\u5F62\u4F4D\u7F6E",polygonHover:"\u53EF\u62D6\u62FD\u8C03\u6574\u77E9\u5F62\u4F4D\u7F6E"},Er={lineHover:"\u53EF\u62D6\u62FD\u8C03\u6574\u5706\u4F4D\u7F6E",polygonHover:"\u53EF\u62D6\u62FD\u8C03\u6574\u5706\u4F4D\u7F6E"},An=function(se){xt(s,se);var a=Yr(s);function s(){var l;ya(this,s);for(var g=arguments.length,P=Array(g),j=0;g>j;j++)P[j]=arguments[j];return(l=a.call.apply(a,[this].concat(P))).previousPosition=[0,0],l}return xn(s,[{key:"lineRender",get:function(){return this.render.line}},{key:"dragLine",get:function(){return this.getLineData().find(function(l){return l.properties.isDrag})}},{key:"drawLine",get:function(){return this.getLineData().find(function(l){return l.properties.isDraw})}},{key:"editLine",get:function(){return this.getLineData().find(function(l){var g=l.properties;return!g.isDraw&&g.isActive})}},{key:"hoverLine",get:function(){return this.getLineData().find(function(l){return l.properties.isHover})}},{key:"getDragLine",value:function(){return this.dragLine}},{key:"getDrawLine",value:function(){return this.drawLine}},{key:"getEditLine",value:function(){return this.editLine}},{key:"getDefaultOptions",value:function(l){var g=vn(vn({},this.getCommonOptions(l)),{},{showMidPoint:!0,distanceOptions:!1,helper:nd(Ae)});return l.distanceOptions&&(g.distanceOptions=vn(vn({},On),g.distanceOptions)),l.adsorbOptions&&(g.adsorbOptions=vn(vn({},wr),g.adsorbOptions)),g}},{key:"getAdsorbPosition",value:function(l){var g=this.options.adsorbOptions;if(typeof g=="boolean")return l;var P=this.scene,j=g.pointAdsorbPixel,ne=g.lineAdsorbPixel,ge=null,ze=Nr(g.data,this,l),ht=ze.points,zt=ze.lines;return ht.length&&j>0&&(ge=vr(l,ht,g,P)),!ge&&zt.length&&ne>0&&(ge=hi(l,zt,g,P)),ge}},{key:"bindSceneEvent",value:function(){this.sceneRender.on(M.RenderEvent.Mousemove,this.onSceneMouseMove.bind(this))}},{key:"bindPointRenderEvent",value:function(){var l;un(Nt(s.prototype),"bindPointRenderEvent",this).call(this),(l=this.pointRender)===null||l===void 0||l.on(M.RenderEvent.Click,this.onPointClick.bind(this))}},{key:"bindLineRenderEvent",value:function(){var l,g,P,j,ne,ge;(l=this.lineRender)===null||l===void 0||l.on(M.RenderEvent.UnClick,this.onLineUnClick.bind(this)),(g=this.lineRender)===null||g===void 0||g.on(M.RenderEvent.Mousemove,this.onLineMouseMove.bind(this)),(P=this.lineRender)===null||P===void 0||P.on(M.RenderEvent.Mouseout,this.onLineMouseOut.bind(this)),(j=this.lineRender)===null||j===void 0||j.on(M.RenderEvent.Dragstart,this.onLineDragStart.bind(this)),(ne=this.lineRender)===null||ne===void 0||ne.on(M.RenderEvent.Dragging,this.onLineDragging.bind(this)),(ge=this.lineRender)===null||ge===void 0||ge.on(M.RenderEvent.Dragend,this.onLineDragEnd.bind(this))}},{key:"getDashLineDistanceTexts",value:function(l,g){var P=g.showTotalDistance,j=g.format;return g.showDashDistance?l.map(function(ne){return jh(ne,{showTotalDistance:P,format:j},{isActive:!0,type:"dash"})}).flat():[]}},{key:"getLineDistanceTexts",value:function(l,g){var P=g.showTotalDistance,j=g.format,ne=g.showWhen,ge=[];if(ne.includes("active")){var ze=l.filter(function(zt){return zt.properties.isActive&&zt.properties.nodes.length>1});ge.push.apply(ge,qn(ze.map(function(zt){return jh(zt,{showTotalDistance:P,format:j},{isActive:!0})}).flat()))}if(ne.includes("normal")){var ht=l.filter(function(zt){return!zt.properties.isActive&&zt.properties.nodes.length>1});ge.push.apply(ge,qn(ht.map(function(zt){return jh(zt,{showTotalDistance:P,format:j})}).flat()))}return ge}},{key:"getDistanceTexts",value:function(){var l=this.options.distanceOptions;if(!l)return[];var g=[],P=l.showWhen,j=l.showDashDistance,ne=l.format,ge=l.showTotalDistance;return g.push.apply(g,qn(this.getDashLineDistanceTexts(this.getDashLineData(),{showTotalDistance:!1,format:ne,showDashDistance:j})).concat(qn(this.getLineDistanceTexts(this.getLineData(),{showTotalDistance:ge,format:ne,showWhen:P})))),g}},{key:"getAllTexts",value:function(){return this.getDistanceTexts()}},{key:"handleCreateLine",value:function(l){var g=Xu([l],{isActive:!0,isDraw:!0});return this.setLineData(function(P){return id({target:g,data:[].concat(qn(P),[g]),otherHandler:function(j){j.properties.isActive=!1}})}),this.setPointData([l]),this.setTextData(this.getAllTexts()),g}},{key:"syncLineNodes",value:function(l,g){return l.properties.nodes=g,l.geometry.coordinates=Yo(aa(g)),this.setLineData(function(P){return P.map(function(j){return Vf(j,l)?l:j})}),Vf(this.editLine,l)&&this.setMidPointData(this.getMidPointsByLine(l)),this.setPointData(l.properties.nodes),this.setTextData(this.getAllTexts()),l}},{key:"setActiveLine",value:function(l){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.setLineData(function(P){return id({target:l,data:P,targetHandler:function(j){j.properties=vn(vn({},j.properties),{},{isDraw:!1,isActive:!0,isDrag:!1,isHover:!1},g)},otherHandler:function(j){j.properties=vn(vn({},j.properties),{},{isDraw:!1,isActive:!1,isDrag:!1})}})}),this.setPointData(l.properties.nodes.map(function(P){return P.properties=vn(vn({},P.properties),{},{isHover:!1,isActive:!1}),P})),this.setMidPointData(this.getMidPointsByLine(l)),this.setDashLineData([]),this.setTextData(this.getAllTexts()),l}},{key:"clearActiveLine",value:function(){this.source.setData({point:[],line:this.getLineData().map(function(l){return l.properties=vn(vn({},l.properties),{},{isDrag:!1,isActive:!1,isHover:!1}),l}),midPoint:[],text:this.getAllTexts()})}},{key:"handleLineUnClick",value:function(l){return this.clearActiveLine(),l}},{key:"handleLineHover",value:function(l){if(!this.drawLine)return this.setCursor("lineHover"),Vf(l,this.hoverLine)||this.setLineData(function(g){return id({target:l,data:g,targetHandler:function(P){P.properties.isHover=!0},otherHandler:function(P){P.properties.isHover=!1}})}),l}},{key:"handleLineUnHover",value:function(l){if(!this.drawLine)return this.resetCursor(),this.setLineData(function(g){return g.map(function(P){return P.properties.isHover=!1,P})}),l}},{key:"handleLineDragStart",value:function(l){return this.setActiveLine(l,{isDrag:!0,isActive:!0}),this.scene.setMapStatus({dragEnable:!1}),this.setCursor("lineDrag"),l}},{key:"handleLineDragging",value:function(l,g){var P=g.lng,j=g.lat,ne=l.properties.nodes,ge=Sn(this.previousPosition,2),ze=ge[0],ht=ge[1];return ne.forEach(function(zt){var qt=zt.geometry.coordinates;zt.geometry.coordinates=[qt[0]+P-ze,qt[1]+j-ht]}),this.syncLineNodes(l,ne),this.setActiveLine(l,{isDrag:!0}),this.setCursor("lineDrag"),this.previousPosition=[P,j],l}},{key:"handleLineDragEnd",value:function(l){return l.properties.isDrag=!1,this.setLineData(function(g){return g}),this.scene.setMapStatus({dragEnable:!0}),l}},{key:"resetAdsorbLngLat",value:function(l){if(this.options.adsorbOptions){var g=this.getAdsorbPosition(Yu(Ja(l)));return g&&Ma(l,g),g}}},{key:"onPointCreate",value:function(l){if(!this.editLine){this.resetAdsorbLngLat(l);var g=un(Nt(s.prototype),"onPointCreate",this).call(this,l),P=this.drawLine;if(g)return P?(this.syncLineNodes(P,[].concat(qn(P.properties.nodes),[g])),this.setDashLineData([])):this.handleCreateLine(g),g}}},{key:"onPointDragStart",value:function(l){if(this.editLine)return this.setHelper("pointDrag"),un(Nt(s.prototype),"onPointDragStart",this).call(this,l)}},{key:"onPointDragging",value:function(l){var g=un(Nt(s.prototype),"onPointDragging",this).call(this,l);if(g){var P=this.resetAdsorbLngLat(l);P&&(g.geometry.coordinates=nd(P))}var j=this.editLine;return j&&g&&(this.syncLineNodes(j,j.properties.nodes.map(function(ne){return Vf(g,ne)?g:ne})),this.setActiveLine(j)),g}},{key:"onPointDragEnd",value:function(l){if(this.editLine){var g=un(Nt(s.prototype),"onPointDragEnd",this).call(this,l);return this.setPointData(function(P){return P.map(function(j){return j.properties.isActive=!1,j})}),this.setHelper("pointHover"),g}}},{key:"onLineUnClick",value:function(l){var g=this.editLine;if(g)return this.handleLineUnClick(g)}},{key:"onLineMouseMove",value:function(l){if(!this.drawLine)return this.dragLine||this.drawLine||!this.options.editable||this.setHelper("lineHover"),this.handleLineHover(l.feature)}},{key:"onLineMouseOut",value:function(l){if(!this.drawLine)return this.dragLine||this.drawLine||this.setHelper(this.addable?"draw":null),this.handleLineUnHover(l.feature)}},{key:"onLineDragStart",value:function(l){if(this.options.editable&&!this.drawLine)return this.previousPosition=ga(l),this.setHelper("lineDrag"),this.handleLineDragStart(l.feature)}},{key:"onLineDragging",value:function(l){var g=this.dragLine;if(g)return this.handleLineDragging(g,Ja(l))}},{key:"onLineDragEnd",value:function(l){var g=this.dragLine;if(g)return this.setHelper("lineHover"),this.handleLineDragEnd(g)}},{key:"onPointMouseMove",value:function(l){var g=un(Nt(s.prototype),"onPointMouseMove",this).call(this,l);return this.dragLine||this.drawLine||this.dragPoint||this.setHelper("pointHover"),g}},{key:"onPointMouseOut",value:function(l){var g=un(Nt(s.prototype),"onPointMouseOut",this).call(this,l);return this.dragLine||this.drawLine||this.dragPoint||this.setHelper(this.addable?"draw":null),g}},{key:"onMidPointHover",value:function(l){un(Nt(s.prototype),"onMidPointHover",this).call(this,l),this.setHelper("midPointHover")}},{key:"onMidPointUnHover",value:function(l){un(Nt(s.prototype),"onMidPointUnHover",this).call(this,l),this.setHelper(null)}},{key:"onPointClick",value:function(l){}},{key:"getLineData",value:function(){return this.source.getRenderData("line")}},{key:"setLineData",value:function(l){return this.source.setRenderData("line",l)}},{key:"getTextData",value:function(){return this.source.getRenderData("text")}},{key:"setTextData",value:function(l){return this.source.setRenderData("text",l)}},{key:"getDashLineData",value:function(){return this.source.getRenderData("dashLine")}},{key:"setDashLineData",value:function(l){return this.source.setRenderData("dashLine",l)}},{key:"onMidPointClick",value:function(l){var g=this.editLine,P=l.feature;if(g&&P&&!this.dragPoint){var j=g.properties.nodes,ne=P.properties,ge=ne.startId,ze=ne.endId,ht=j.findIndex(function(_r){return _r.properties.id===ge}),zt=j.findIndex(function(_r){return _r.properties.id===ze});if(ht>-1&&zt>-1){var qt=th(P.geometry.coordinates,{isDrag:!0,isHover:!0});return this.setHelper("pointDrag"),j.splice(zt,0,qt),g.geometry.coordinates=Yo(aa(j)),this.syncLineNodes(g,j),this.setActiveLine(g),qt}}}},{key:"enableSceneRenderAction",value:function(){this.sceneRender.enableDrag(),this.sceneRender.enableMouseMove(),this.sceneRender.enableDblClick()}},{key:"disableSceneRenderAction",value:function(){this.sceneRender.disableDrag(),this.sceneRender.disableMouseMove(),this.sceneRender.disableDblClick()}},{key:"enableLineRenderAction",value:function(){var l,g,P,j=this.options.editable;(l=this.lineRender)===null||l===void 0||l.enableUnClick(),j&&((g=this.lineRender)===null||g===void 0||g.enableHover(),(P=this.lineRender)===null||P===void 0||P.enableDrag())}},{key:"disableLineRenderAction",value:function(){var l,g,P;(l=this.lineRender)===null||l===void 0||l.disableUnClick(),(g=this.lineRender)===null||g===void 0||g.disableHover(),(P=this.lineRender)===null||P===void 0||P.disableDrag()}}]),s}(ee),ci=function(se){xt(s,se);var a=Yr(s);function s(){return ya(this,s),a.apply(this,arguments)}return xn(s,[{key:"dragItem",get:function(){return this.dragPolygon}},{key:"editItem",get:function(){return this.editPolygon}},{key:"polygonRender",get:function(){return this.render.polygon}},{key:"dragPolygon",get:function(){return this.getPolygonData().find(function(l){return l.properties.isDrag})}},{key:"drawPolygon",get:function(){return this.getPolygonData().find(function(l){return l.properties.isDraw})}},{key:"editPolygon",get:function(){return this.getPolygonData().find(function(l){var g=l.properties;return!g.isDraw&&g.isActive})}},{key:"hoverPolygon",get:function(){return this.getPolygonData().find(function(l){return l.properties.isHover})}},{key:"getDragPolygon",value:function(){return this.dragPolygon}},{key:"getDrawPolygon",value:function(){return this.drawPolygon}},{key:"getEditPolygon",value:function(){return this.editPolygon}},{key:"getRenderTypes",value:function(){return["polygon","line","dashLine","midPoint","point","text"]}},{key:"getData",value:function(){return this.getPolygonData()}},{key:"getMainLayer",value:function(){var l,g;return(l=(g=this.render.polygon)===null||g===void 0?void 0:g.getLayers())!==null&&l!==void 0?l:[]}},{key:"getDefaultOptions",value:function(l){var g=vn(vn({},un(Nt(s.prototype),"getDefaultOptions",this).call(this,l)),{},{areaOptions:!1,helper:nd(Le)});return l.areaOptions&&(g.areaOptions=vn(vn({},tn),l.areaOptions)),g}},{key:"getAreaTexts",value:function(l){var g=this.options.areaOptions;if(!g)return[];var P=g.format,j=g.showWhen,ne=[],ge=l.filter(function(ze){return ze.geometry.coordinates[0].length>=4});return j.includes("active")&&ge.filter(function(ze){return ze.properties.isActive}).forEach(function(ze){ne.push(qp(ze,{format:P},{isActive:!0}))}),j.includes("normal")&&ge.filter(function(ze){return!ze.properties.isActive}).forEach(function(ze){ne.push(qp(ze,{format:P},{isActive:!1}))}),ne}},{key:"getAllTexts",value:function(){return[].concat(qn(un(Nt(s.prototype),"getAllTexts",this).call(this)),qn(this.getAreaTexts(this.getPolygonData())))}},{key:"getPolygonData",value:function(){return this.source.getRenderData("polygon")}},{key:"setPolygonData",value:function(l){return this.source.setRenderData("polygon",l)}},{key:"handleCreatePolygon",value:function(l,g){var P=mu(l,{nodes:l,line:g,isActive:!0,isDraw:!0});return this.setPolygonData(function(j){return id({target:P,data:[].concat(qn(j),[P]),otherHandler:function(ne){ne.properties.isActive=!1}})}),P}},{key:"handlePolygonUnClick",value:function(l){return this.clearActivePolygon(),l}},{key:"handlePolygonHover",value:function(l){return this.setCursor("polygonHover"),Vf(l,this.hoverPolygon)||this.setPolygonData(function(g){return id({target:l,data:g,targetHandler:function(P){P.properties.isHover=!0},otherHandler:function(P){P.properties.isHover=!1}})}),l}},{key:"handlePolygonUnHover",value:function(){this.resetCursor(),this.setPolygonData(function(l){return l.map(function(g){return g.properties.isHover=!1,g})})}},{key:"handlePolygonDragStart",value:function(l){return this.setActivePolygon(l,{isDrag:!0}),this.scene.setMapStatus({dragEnable:!1}),this.setCursor("polygonDrag"),l}},{key:"bindPolygonRenderEvent",value:function(){var l,g,P,j;(l=this.polygonRender)===null||l===void 0||l.on(M.RenderEvent.UnClick,this.onPolygonUnClick.bind(this)),(g=this.polygonRender)===null||g===void 0||g.on(M.RenderEvent.Mousemove,this.onPolygonHover.bind(this)),(P=this.polygonRender)===null||P===void 0||P.on(M.RenderEvent.Mouseout,this.onPolygonUnHover.bind(this)),(j=this.polygonRender)===null||j===void 0||j.on(M.RenderEvent.Dragstart,this.onPolygonDragStart.bind(this))}},{key:"syncPolygonNodes",value:function(l,g){var P=Yo(aa([].concat(qn(g),[Bf(g)]))),j=l.properties,ne=j.line;if(l.properties.nodes=g,l.geometry.coordinates=[dr(La(P))?P:P.reverse()],this.setPolygonData(function(qt){return qt.map(function(_r){return Vf(_r,l)?l:_r})}),!Vf(this.drawPolygon,l)){var ge=ne.properties.nodes,ze=qn(g),ht=Bf(ze);ze.push(ge.length===g.length?th(ht.geometry.coordinates):I(ge));var zt=I(ze);nu(ht.geometry.coordinates,zt.geometry.coordinates)||(zt.geometry.coordinates=nd(ht.geometry.coordinates)),this.syncLineNodes(ne,ze)}return l}},{key:"setActivePolygon",value:function(l){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.setActiveLine(l.properties.line,g),this.setPolygonData(function(P){return id({target:l,data:P,targetHandler:function(j){j.properties=vn(vn({},j.properties),{},{isDraw:!1,isActive:!0,isDrag:!1,isHover:!1},g)},otherHandler:function(j){j.properties=vn(vn({},j.properties),{},{isDraw:!1,isActive:!1,isDrag:!1})}})}),this.setTextData(this.getAllTexts()),l}},{key:"clearActivePolygon",value:function(){this.setPolygonData(function(l){return l.map(function(g){return g.properties=vn(vn({},g.properties),{},{isDrag:!1,isActive:!1,isHover:!1}),g})}),this.clearActiveLine()}},{key:"onLineDragStart",value:function(l){var g=un(Nt(s.prototype),"onLineDragStart",this).call(this,l),P=this.getPolygonData().find(function(j){return Vf(j.properties.line,g)});return P&&(this.setActivePolygon(P,{isDrag:!0}),this.emit(M.DrawEvent.DragStart,P,this.getPolygonData())),g}},{key:"onLineUnClick",value:function(l){return this.editLine}},{key:"onLineDragEnd",value:function(l){var g=un(Nt(s.prototype),"onLineDragEnd",this).call(this,l),P=this.dragPolygon;return g&&P&&(P.properties.isDrag=!1,this.emit(M.DrawEvent.DragEnd,P,this.getPolygonData()),this.emit(M.DrawEvent.Edit,P,this.getPolygonData())),g}},{key:"onPolygonUnClick",value:function(l){var g=this.editPolygon;if(g)return this.handlePolygonUnClick(g)}},{key:"onPolygonHover",value:function(l){if(!this.drawPolygon)return this.dragPolygon||this.setHelper("polygonHover"),this.handlePolygonHover(l.feature)}},{key:"onPolygonUnHover",value:function(l){if(!this.drawPolygon)return this.setHelper(this.addable?"draw":null),this.handlePolygonUnHover()}},{key:"onPolygonDragStart",value:function(l){if(this.options.editable&&!this.drawPolygon){var g=l.feature;return this.previousPosition=ga(l),this.setHelper("polygonDrag"),this.emit(M.DrawEvent.DragStart,g,this.getPolygonData()),this.handlePolygonDragStart(g)}}},{key:"onMidPointClick",value:function(l){var g=this.editPolygon,P=un(Nt(s.prototype),"onMidPointClick",this).call(this,l);if(P&&g){var j=g.properties.line.properties.nodes;this.syncPolygonNodes(g,j.slice(0,j.length-1)),this.setActivePolygon(g)}return P}},{key:"onPointDragEnd",value:function(l){var g=this.editPolygon,P=un(Nt(s.prototype),"onPointDragEnd",this).call(this,l);return P&&g&&this.emit(M.DrawEvent.Edit,g,this.getPolygonData()),P}},{key:"enablePolygonRenderAction",value:function(){var l,g,P,j=this.options.editable;(l=this.polygonRender)===null||l===void 0||l.enableUnClick(),j&&((g=this.polygonRender)===null||g===void 0||g.enableHover(),(P=this.polygonRender)===null||P===void 0||P.enableDrag())}},{key:"disablePolygonRenderAction",value:function(){var l,g,P;(l=this.polygonRender)===null||l===void 0||l.disableUnClick(),(g=this.polygonRender)===null||g===void 0||g.disableHover(),(P=this.polygonRender)===null||P===void 0||P.disableDrag()}},{key:"bindEnableEvent",value:function(){un(Nt(s.prototype),"bindEnableEvent",this).call(this),this.enableSceneRenderAction(),this.enablePointRenderAction(),this.enableLineRenderAction(),this.enableMidPointRenderAction(),this.enablePolygonRenderAction()}},{key:"unbindEnableEvent",value:function(){un(Nt(s.prototype),"unbindEnableEvent",this).call(this),this.disableSceneRenderAction(),this.disablePointRenderAction(),this.disableLineRenderAction(),this.disableMidPointRenderAction(),this.disablePolygonRenderAction()}},{key:"bindThis",value:function(){un(Nt(s.prototype),"bindThis",this).call(this),this.bindPointRenderEvent=this.bindPointRenderEvent.bind(this),this.bindSceneEvent=this.bindSceneEvent.bind(this),this.bindLineRenderEvent=this.bindLineRenderEvent.bind(this),this.bindMidPointRenderEvent=this.bindMidPointRenderEvent.bind(this),this.bindPolygonRenderEvent=this.bindPolygonRenderEvent.bind(this)}},{key:"setActiveFeature",value:function(l){var g=this.getTargetFeature(l);g?this.setActivePolygon(g):this.clearActivePolygon()}},{key:"resetFeatures",value:function(){var l=this.getPolygonData();this.drawPolygon&&(l=l.filter(function(g){return!g.properties.isDraw}),this.source.setData({point:[],dashLine:[],midPoint:[]}),this.setLineData(function(g){return g.filter(function(P){return!P.properties.isDraw})}),this.setTextData(function(g){return g.filter(function(P){return!P.properties.isActive})})),this.editPolygon&&this.handlePolygonUnClick(this.editPolygon),this.setPolygonData(l.map(function(g){return g.properties=vn(vn({},g.properties),{},{isDrag:!1,isActive:!1,isHover:!1}),g}))}}]),s}(An),bi=function(se){xt(s,se);var a=Yr(s);function s(l,g){var P;return ya(this,s),(P=a.call(this,l,g)).onSceneDragStart=P.onSceneDragStart.bind($r(P)),P.onSceneDragEnd=P.onSceneDragEnd.bind($r(P)),P}return xn(s,[{key:"drawLine",get:function(){var l;return(l=this.drawPolygon)===null||l===void 0?void 0:l.properties.line}},{key:"isDragTrigger",get:function(){return this.options.trigger==="drag"}},{key:"isClickTrigger",get:function(){return this.options.trigger==="click"}},{key:"getDefaultOptions",value:function(l){var g=vn(vn({},un(Nt(s.prototype),"getDefaultOptions",this).call(this,l)),{},{showMidPoint:!1,trigger:"click",autoActive:!1,helper:nd(Ve)});return l.trigger==="drag"&&(g.helper=vn(vn({},g.helper),Bt)),g}},{key:"getMidPointsByLine",value:function(l){return[]}},{key:"handleCreatePolygon",value:function(l,g){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},j=g.properties.nodes;return mu(j.slice(0,j.length-1),vn({nodes:l,line:g},P))}},{key:"handleFirstNodeCreate",value:function(l){var g=th(l.geometry.coordinates),P=this.handleCreatePolygonLine(l,g,{isDraw:!0,isActive:!0}),j=this.handleCreatePolygon([l,g],P,{isDraw:!0,isActive:!0});return this.setPolygonData(function(ne){return id({target:j,data:[].concat(qn(ne),[j]),targetHandler:function(ge){ge.properties=vn(vn({},ge.properties),{},{isDraw:!0,isActive:!0})}})}),this.emit(M.DrawEvent.AddNode,l,this.drawPolygon,this.getPolygonData()),this.setHelper("drawFinish"),l}},{key:"handleLastNodeCreate",value:function(l){var g=this.options,P=g.autoActive,j=g.editable,ne=this.drawPolygon;return ne&&(this.setLineData(function(ge){return[].concat(qn(ge),[ne.properties.line])}),this.setActivePolygon(ne),P&&j||this.handlePolygonUnClick(ne),this.emit(M.DrawEvent.Add,ne,this.getPolygonData()),this.emit(M.DrawEvent.AddNode,ne.properties.nodes[1],this.drawPolygon,this.getPolygonData()),this.setHelper(j?P?"pointHover":"polygonHover":this.addable?"draw":null)),l}},{key:"onPointCreate",value:function(l){var g=this;if(this.addable&&!this.dragPoint&&!this.editLine&&this.isClickTrigger){var P=this.drawPolygon,j=ga(l),ne=this.handleCreatePoint(j);return P?requestAnimationFrame(function(){g.handleLastNodeCreate(ne)}):this.handleFirstNodeCreate(ne),ne}}},{key:"setActivePolygon",value:function(l){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.setActiveLine(l.properties.line,g),this.setPolygonData(function(j){return id({target:l,data:j,targetHandler:function(ne){ne.properties=vn(vn({},ne.properties),{},{isDraw:!1,isActive:!0,isDrag:!1,isHover:!1},g)},otherHandler:function(ne){ne.properties=vn(vn({},ne.properties),{},{isDraw:!1,isActive:!1,isDrag:!1})}})}),this.setPointData(l.properties.nodes),this.setDashLineData([]);var P=this.getAllTexts();return this.setTextData(P),l}},{key:"onPointDragging",value:function(l){var g=this.dragPoint;if(g){var P=this.handlePointDragging(g,Ja(l)),j=this.editPolygon;return P&&j&&(this.syncPolygonNodes(j,j.properties.nodes.map(function(ne){return Vf(ne,P)?P:ne})),this.setActivePolygon(j)),P}}},{key:"onSceneDragStart",value:function(l){this.isDragTrigger&&this.addable&&!this.dragPoint&&!this.editLine&&(this.scene.setMapStatus({dragEnable:!1}),this.handleFirstNodeCreate(this.handleCreatePoint(ga(l))))}},{key:"onSceneDragEnd",value:function(l){this.isDragTrigger&&this.addable&&!this.dragPoint&&!this.editLine&&this.drawPolygon&&(this.scene.setMapStatus({dragEnable:!1}),this.handleLastNodeCreate(this.handleCreatePoint(ga(l))))}},{key:"onSceneMouseMove",value:function(l){var g=this.drawPolygon;if(g){var P=g.properties.nodes,j=Bf(P),ne=I(P);ne.geometry.coordinates=ga(l),this.syncPolygonNodes(g,[j,ne]),this.setDashLineData([g.properties.line]),this.setTextData(this.getAllTexts()),this.resetCursor()}}},{key:"bindSceneDragEvent",value:function(){this.unbindSceneDragEvent(),this.sceneRender.on(M.RenderEvent.Dragstart,this.onSceneDragStart),this.sceneRender.on(M.RenderEvent.Dragend,this.onSceneDragEnd),this.scene.setMapStatus({dragEnable:!1})}},{key:"unbindSceneDragEvent",value:function(){this.sceneRender.off(M.RenderEvent.Dragstart,this.onSceneDragStart),this.sceneRender.off(M.RenderEvent.Dragend,this.onSceneDragEnd),this.scene.setMapStatus({dragEnable:!0})}},{key:"bindEnableEvent",value:function(){un(Nt(s.prototype),"bindEnableEvent",this).call(this),this.isDragTrigger&&this.bindSceneDragEvent()}},{key:"unbindEnableEvent",value:function(){un(Nt(s.prototype),"unbindEnableEvent",this).call(this),this.isDragTrigger&&this.unbindSceneDragEvent()}},{key:"bindThis",value:function(){un(Nt(s.prototype),"bindThis",this).call(this),this.onSceneDragStart=this.onSceneDragStart.bind(this),this.onSceneDragEnd=this.onSceneDragEnd.bind(this)}}]),s}(ci),Ei=function(se){xt(s,se);var a=Yr(s);function s(l,g){var P;return ya(this,s),(P=a.call(this,l,g)).bindPointRenderEvent(),P.bindSceneEvent(),P.bindMidPointRenderEvent(),P.bindLineRenderEvent(),P.bindPolygonRenderEvent(),P}return xn(s,[{key:"getDefaultOptions",value:function(l){var g=vn(vn({},un(Nt(s.prototype),"getDefaultOptions",this).call(this,l)),{},{showMidPoint:!1,circleSteps:60});return g.distanceOptions&&(g.distanceOptions.showTotalDistance=!0,g.distanceOptions.showOnRadius===void 0&&(g.distanceOptions.showOnRadius=!0)),g.helper&&(g.helper=vn(vn({},g.helper),Er)),g}},{key:"getDistanceTexts",value:function(){var l=this.options.distanceOptions;if(!l)return[];var g=[],P=l.showWhen,j=l.showDashDistance,ne=l.format,ge=l.showTotalDistance;return g.push.apply(g,qn(this.getDashLineDistanceTexts(this.getDashLineData(),{showTotalDistance:!0,format:ne,showDashDistance:j})).concat(qn(this.getLineDistanceTexts(this.getLineData(),{showTotalDistance:ge,format:ne,showWhen:P})))),g}},{key:"setData",value:function(l){var g=this,P=l.map(function(j){var ne,ge,ze;j.properties=vn(vn({},ef()),j.properties);var ht=(ne=j.properties)===null||ne===void 0?void 0:ne.nodes;if(((ge=ht)===null||ge===void 0?void 0:ge.length)!==2){var zt=Sn(Vc(j).geometry.coordinates,2),qt=zt[0],_r=zt[1],Rr=Ec(j),Kr=Rr[2],qr=(Rr[1]+Rr[3])/2;ht=[th([qt,_r]),th([Kr,qr])],j.properties.nodes=ht}var an=ht[0],en=ht[1],Hr=!!(!((ze=j.properties)===null||ze===void 0)&&ze.isActive),Fn=j.properties.line;return Fn||(Fn=g.handleCreatePolygonLine(an,en,{isActive:Hr}),j.properties.line=Fn),g.handleCreatePolygon([an,en],Fn,vn(vn({},j.properties),{},{isActive:Hr}))});this.source.setData({point:[],midPoint:[],dashLine:[],polygon:P,line:P.map(function(j){return j.properties.line})}),this.setTextData(this.getAllTexts()),this.editPolygon&&this.setActivePolygon(this.editPolygon)}},{key:"handleCreatePolygonLine",value:function(l,g){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},j=this.getBoundaryPositions(l,g).map(function(ne){return th(ne)});return Xu(j,P)}},{key:"syncPolygonNodes",value:function(l,g){var P=l.properties.line,j=this.getBoundaryPositions(g[0],g[1]);return l.properties.nodes=g,l.geometry.coordinates=[j],this.setPolygonData(function(ne){return ne.map(function(ge){return Vf(ge,l)?l:ge})}),this.setPointData(l.properties.isDraw?[g[0]]:g),P.properties.nodes.forEach(function(ne,ge){ne.geometry.coordinates=j[ge]}),P.geometry.coordinates=j,l}},{key:"onLineDragging",value:function(l){var g=this.dragPolygon,P=Sn(this.previousPosition,2),j=P[0],ne=P[1],ge=un(Nt(s.prototype),"onLineDragging",this).call(this,l);if(g){var ze=Sn(ga(l),2),ht=ze[0],zt=ze[1];g.properties.nodes.forEach(function(qt){var _r=Sn(qt.geometry.coordinates,2);qt.geometry.coordinates=[_r[0]+ht-j,_r[1]+zt-ne]}),this.syncPolygonNodes(g,g.properties.nodes),this.setActivePolygon(g,{isDrag:!0}),this.emit(M.DrawEvent.Dragging,g,this.getPolygonData())}return ge}},{key:"getBoundaryPositions",value:function(l,g){for(var P=this.options.circleSteps,j=Sl(l,g,{units:"meters"}),ne=[],ge=0;P>ge;ge++)ne.push(dl(l,j,-360*ge/P,{units:"meters"}).geometry.coordinates);return ne.push(ne[0]),ne}}]),s}(bi),va=function(se){xt(s,se);var a=Yr(s);function s(l,g){var P;return ya(this,s),(P=a.call(this,l,g)).drawLineFinish=function(){var j,ne=P.drawLine,ge=(j=ne==null?void 0:ne.properties.nodes)!==null&&j!==void 0?j:[];if(ne&&(ge==null?void 0:ge.length)>1){P.setActiveLine(ne);var ze=P.options,ht=ze.autoActive,zt=ze.editable;ht&&zt||P.handleLineUnClick(ne),P.setHelper(zt&&ht?"pointHover":P.addable?"draw":null),P.emit(M.DrawEvent.Add,ne,P.getLineData())}},P.sceneRender.on(M.RenderEvent.DblClick,P.drawLineFinish),P.bindPointRenderEvent(),P.bindSceneEvent(),P.bindMidPointRenderEvent(),P.bindLineRenderEvent(),P}return xn(s,[{key:"dragItem",get:function(){return this.dragLine}},{key:"editItem",get:function(){return this.editLine}},{key:"getMainLayer",value:function(){var l,g;return(l=(g=this.render.line)===null||g===void 0?void 0:g.getLayers())!==null&&l!==void 0?l:[]}},{key:"setData",value:function(l){var g=l.map(function(P){var j,ne;return P.properties=vn(vn({},$d()),(j=P.properties)!==null&&j!==void 0?j:{}),!((ne=P.properties.nodes)===null||ne===void 0)&&ne.length||(P.properties.nodes=Yo(P).map(function(ge){return th(ge)})),P});this.source.setData({point:[],midPoint:[],dashLine:[],line:g}),this.setTextData(this.getAllTexts()),this.editLine&&this.setActiveLine(this.editLine)}},{key:"getData",value:function(){return this.getLineData()}},{key:"getRenderTypes",value:function(){return["line","dashLine","midPoint","point","text"]}},{key:"bindPointRenderEvent",value:function(){var l;un(Nt(s.prototype),"bindPointRenderEvent",this).call(this),(l=this.pointRender)===null||l===void 0||l.on(M.RenderEvent.Contextmenu,this.onPointContextMenu.bind(this))}},{key:"onPointClick",value:function(l){var g,P=this,j=this.drawLine,ne=(g=j==null?void 0:j.properties.nodes)!==null&&g!==void 0?g:[],ge=l.feature;if(Vf(ge,I(ne)))requestAnimationFrame(function(){P.drawLineFinish()});else{var ze=Sn(ge.geometry.coordinates,2);l.lngLat={lng:ze[0],lat:ze[1]},this.onPointCreate(l)}}},{key:"removeNode",value:function(l,g){var P,j=this.getTargetFeature(g),ne=this.getTargetFeature(l,(P=j==null?void 0:j.properties.nodes)!==null&&P!==void 0?P:[]);if(j&&ne){var ge,ze=(ge=j==null?void 0:j.properties.nodes)!==null&&ge!==void 0?ge:[];if(3>ze.length)return;this.syncLineNodes(j,ze.filter(function(ht){return!Vf(ne,ht)})),this.emit(M.DrawEvent.RemoveNode,ne,j,this.getLineData()),this.emit(M.DrawEvent.Edit,j,this.getLineData())}}},{key:"onPointContextMenu",value:function(l){var g,P=this.editLine,j=l.feature,ne=(g=P==null?void 0:P.properties.nodes)!==null&&g!==void 0?g:[];if(P&&ne.length>=3)return this.removeNode(j,P),this.scene.setMapStatus({dragEnable:!0}),j}},{key:"onPointCreate",value:function(l){if(this.addable){var g=un(Nt(s.prototype),"onPointCreate",this).call(this,l);return g&&(this.setHelper("drawFinish"),this.emit(M.DrawEvent.AddNode,g,this.drawLine,this.getLineData())),g}}},{key:"onPointDragEnd",value:function(l){var g=this.editLine,P=un(Nt(s.prototype),"onPointDragEnd",this).call(this,l);return g&&P&&this.emit(M.DrawEvent.Edit,g,this.getLineData()),P}},{key:"onLineDragStart",value:function(l){var g=un(Nt(s.prototype),"onLineDragStart",this).call(this,l);return g&&this.emit(M.DrawEvent.DragStart,g,this.getLineData()),g}},{key:"onLineDragging",value:function(l){var g=un(Nt(s.prototype),"onLineDragging",this).call(this,l);return g&&this.emit(M.DrawEvent.Dragging,g,this.getLineData()),g}},{key:"onLineDragEnd",value:function(l){var g=un(Nt(s.prototype),"onLineDragEnd",this).call(this,l);return g&&(this.emit(M.DrawEvent.DragEnd,g,this.getLineData()),this.emit(M.DrawEvent.Edit,g,this.getLineData())),g}},{key:"onMidPointClick",value:function(l){var g=this.editLine,P=un(Nt(s.prototype),"onMidPointClick",this).call(this,l);return g&&P&&(this.emit(M.DrawEvent.Edit,g,this.getLineData()),this.emit(M.DrawEvent.AddNode,P,g,this.getLineData())),P}},{key:"onSceneMouseMove",value:function(l){var g=this.drawLine;if(g){var P,j=I(g.properties.nodes),ne=ga(l);this.options.adsorbOptions&&(ne=(P=this.getAdsorbPosition(ne))!==null&&P!==void 0?P:ne),this.setDashLineData([Pl([ne,j.geometry.coordinates])]),this.setTextData(this.getAllTexts())}}},{key:"setActiveFeature",value:function(l){var g=this.getTargetFeature(l);g?this.setActiveLine(g):this.clearActiveLine()}},{key:"resetFeatures",value:function(){var l=this.getLineData();this.drawLine&&(l=l.filter(function(g){return!g.properties.isDraw}),this.source.setData({point:[],dashLine:[],midPoint:[]}),this.setTextData(function(g){return g.filter(function(P){return!P.properties.isActive})})),this.editLine&&this.handleLineUnClick(this.editLine),this.setLineData(l.map(function(g){return g.properties=vn(vn({},g.properties),{},{isDrag:!1,isActive:!1,isHover:!1}),g}))}},{key:"enablePointRenderAction",value:function(){var l;un(Nt(s.prototype),"enablePointRenderAction",this).call(this),this.options.editable&&((l=this.pointRender)===null||l===void 0||l.enableContextMenu())}},{key:"disablePointRenderAction",value:function(){var l;un(Nt(s.prototype),"disablePointRenderAction",this).call(this),(l=this.pointRender)===null||l===void 0||l.disableContextMenu()}},{key:"bindEnableEvent",value:function(){un(Nt(s.prototype),"bindEnableEvent",this).call(this),this.enableSceneRenderAction(),this.enablePointRenderAction(),this.enableLineRenderAction(),this.enableMidPointRenderAction(),this.sceneRender.enableDblClick()}},{key:"unbindEnableEvent",value:function(){un(Nt(s.prototype),"unbindEnableEvent",this).call(this),this.disableSceneRenderAction(),this.disablePointRenderAction(),this.disableLineRenderAction(),this.disableMidPointRenderAction(),this.sceneRender.disableDblClick()}},{key:"bindThis",value:function(){un(Nt(s.prototype),"bindThis",this).call(this),this.bindPointRenderEvent=this.bindPointRenderEvent.bind(this),this.bindSceneEvent=this.bindSceneEvent.bind(this),this.bindLineRenderEvent=this.bindLineRenderEvent.bind(this),this.bindMidPointRenderEvent=this.bindMidPointRenderEvent.bind(this)}}]),s}(An),es=function(se){xt(s,se);var a=Yr(s);function s(l,g){var P;return ya(this,s),(P=a.call(this,l,g)).bindPointRenderEvent(),P}return xn(s,[{key:"dragItem",get:function(){return this.dragPoint}},{key:"editItem",get:function(){return this.editPoint}},{key:"getDefaultOptions",value:function(l){var g=vn(vn({},this.getCommonOptions(l)),{},{helper:nd(fe),initialData:l.initialData});return g.style.point=w,g}},{key:"bindEnableEvent",value:function(){un(Nt(s.prototype),"bindEnableEvent",this).call(this),this.enablePointRenderAction()}},{key:"unbindEnableEvent",value:function(){un(Nt(s.prototype),"unbindEnableEvent",this).call(this),this.disablePointRenderAction()}},{key:"getRenderTypes",value:function(){return["point"]}},{key:"getMainLayer",value:function(){var l,g;return(l=(g=this.render.point)===null||g===void 0?void 0:g.getLayers())!==null&&l!==void 0?l:[]}},{key:"setData",value:function(l){this.setPointData(l.map(function(g){var P;return g.properties=vn(vn({},df()),(P=g.properties)!==null&&P!==void 0?P:{}),g}))}},{key:"getData",value:function(){return this.getPointData()}},{key:"onPointCreate",value:function(l){if(this.addable){var g=un(Nt(s.prototype),"onPointCreate",this).call(this,l);if(g)return this.options.editable&&this.setHelper("pointHover"),this.emit(M.DrawEvent.Add,g,this.getData()),g}else this.setPointData(function(P){return P.map(function(j){return j.properties=vn(vn({},j.properties),{},{isHover:!1,isActive:!1}),j})})}},{key:"onPointMouseMove",value:function(l){var g=un(Nt(s.prototype),"onPointMouseMove",this).call(this,l);return this.options.editable&&!this.dragPoint&&this.setHelper("pointHover"),g}},{key:"onPointMouseOut",value:function(l){var g=un(Nt(s.prototype),"onPointMouseOut",this).call(this,l);return this.setHelper(this.addable?"draw":null),g}},{key:"onPointDragStart",value:function(l){var g=un(Nt(s.prototype),"onPointDragStart",this).call(this,l);return this.setHelper("pointDrag"),this.emit(M.DrawEvent.DragStart,g,this.getData()),g}},{key:"onPointDragging",value:function(l){var g=un(Nt(s.prototype),"onPointDragging",this).call(this,l);return g&&this.options.editable&&this.emit(M.DrawEvent.Dragging,g,this.getData()),g}},{key:"onPointDragEnd",value:function(l){var g=un(Nt(s.prototype),"onPointDragEnd",this).call(this,l);return g&&this.options.editable&&(this.setHelper("pointHover"),this.emit(M.DrawEvent.DragEnd,g,this.getData()),this.emit(M.DrawEvent.Edit,g,this.getData())),g}},{key:"bindThis",value:function(){un(Nt(s.prototype),"bindThis",this).call(this),this.bindPointRenderEvent=this.bindPointRenderEvent.bind(this)}},{key:"onSceneMouseMove",value:function(l){}},{key:"setActiveFeature",value:function(l){var g=this.getTargetFeature(l);this.setPointData(function(P){return P.map(function(j){return j.properties.isActive=Vf(g,j),j})})}},{key:"resetFeatures",value:function(){this.setPointData(function(l){return l.map(function(g){return g.properties=vn(vn({},g.properties),{},{isDrag:!1,isActive:!1,isHover:!1}),g})})}}]),s}(B),Io=function(se){xt(s,se);var a=Yr(s);function s(l,g){var P;return ya(this,s),(P=a.call(this,l,g)).drawPolygonFinish=function(){var j,ne=P.drawPolygon,ge=(j=ne==null?void 0:ne.properties.nodes)!==null&&j!==void 0?j:[];if(ne&&ge.length>=3){ne.properties.isDraw=!1,P.syncPolygonNodes(ne,ge),P.setActivePolygon(ne);var ze=P.options,ht=ze.autoActive,zt=ze.editable;ht&&zt||P.handlePolygonUnClick(ne),P.setHelper(zt?ht?"pointHover":"polygonHover":P.addable?"draw":null),P.emit(M.DrawEvent.Add,ne,P.getPolygonData())}},P.sceneRender.on(M.RenderEvent.DblClick,P.drawPolygonFinish),P.bindPointRenderEvent(),P.bindSceneEvent(),P.bindMidPointRenderEvent(),P.bindLineRenderEvent(),P.bindPolygonRenderEvent(),P}return xn(s,[{key:"getDefaultOptions",value:function(l){return vn(vn({},un(Nt(s.prototype),"getDefaultOptions",this).call(this,l)),{},{liveUpdate:!1})}},{key:"setData",value:function(l){var g=l.map(function(P){var j,ne;if(P.properties=vn(vn({},ef()),(j=P.properties)!==null&&j!==void 0?j:{}),!(!((ne=P.properties.nodes)===null||ne===void 0)&&ne.length)){var ge=Yo(P);ge=ge.slice(0,ge.length-1),P.properties.nodes=ge.map(function(ht){return th(ht)})}if(!P.properties.line){var ze=P.properties.nodes;P.properties.line=Xu([].concat(qn(ze),[th(Bf(ze).geometry.coordinates)]))}return P});this.source.setData({point:[],midPoint:[],dashLine:[],polygon:g,line:g.map(function(P){return P.properties.line})}),this.setTextData(this.getAllTexts()),this.editPolygon&&this.setActivePolygon(this.editPolygon)}},{key:"onPointCreate",value:function(l){if(this.addable&&!this.dragPoint){var g=un(Nt(s.prototype),"onPointCreate",this).call(this,l),P=this.drawPolygon,j=this.drawLine;return g&&(P?(this.syncPolygonNodes(P,[].concat(qn(P.properties.nodes),[g])),this.setDashLineData([Pl([ga(l),P.properties.nodes[0].geometry.coordinates])]),P.properties.nodes.length>1&&this.setHelper("drawFinish")):j&&(this.handleCreatePolygon([g],j),this.setHelper("drawContinue")),this.emit(M.DrawEvent.AddNode,g,P,this.getPolygonData())),g}}},{key:"onPointClick",value:function(l){var g=this,P=this.drawPolygon,j=l.feature;if(P){var ne=P.properties.nodes;if(ne.length<3||!Vf(Bf(ne),j)&&!Vf(I(ne),j)){var ge=Sn(j.geometry.coordinates,2);l.lngLat={lng:ge[0],lat:ge[1]},this.onPointCreate(l)}else requestAnimationFrame(function(){g.drawPolygonFinish()})}}},{key:"onPointDragging",value:function(l){var g=this.dragPoint,P=this.editPolygon;if(g&&P){var j=P.properties.line;j.properties.nodes=j.properties.nodes.map(function(_r){return Vf(_r,g)?g:_r});var ne=j.properties.nodes,ge=ne.slice(0,ne.length-1),ze=Bf(ne),ht=I(ne),zt=Vf(ze,g)||Vf(ht,g);if(zt&&(ze.geometry.coordinates=ht.geometry.coordinates=ga(l)),this.options.adsorbOptions&&zt){var qt=this.resetAdsorbLngLat(l);qt&&(ze.geometry.coordinates=ht.geometry.coordinates=qt)}un(Nt(s.prototype),"onPointDragging",this).call(this,l),this.syncPolygonNodes(P,ge),this.setActivePolygon(P)}return g}},{key:"onLineDragging",value:function(l){var g=this.dragPolygon,P=un(Nt(s.prototype),"onLineDragging",this).call(this,l);if(P&&g){var j=P.properties.nodes;this.syncPolygonNodes(g,j.slice(0,j.length-1)),this.emit(M.DrawEvent.Dragging,g,this.getPolygonData())}return P}},{key:"onMidPointClick",value:function(l){var g=un(Nt(s.prototype),"onMidPointClick",this).call(this,l),P=this.editPolygon;return g&&P&&(this.emit(M.DrawEvent.Edit,P,this.getPolygonData()),this.emit(M.DrawEvent.AddNode,g,P,this.getPolygonData())),g}},{key:"onSceneMouseMove",value:function(l){var g,P=this.drawPolygon,j=(g=P==null?void 0:P.properties.nodes)!==null&&g!==void 0?g:[];if(P&&j.length){this.options.adsorbOptions&&this.resetAdsorbLngLat(l);var ne=ga(l),ge=[];if(ge.push(Pl([ne,Bf(j).geometry.coordinates])),j.length>1&&ge.push(Pl([ne,I(j).geometry.coordinates])),this.options.liveUpdate&&j.length>=2){var ze=Yo(aa(j));P.geometry.coordinates=[[].concat(qn(ze),[ne,ze[0]])],this.setPolygonData(this.getPolygonData())}this.setDashLineData(ge),this.setTextData(this.getAllTexts())}}},{key:"removeNode",value:function(l,g){var P,j=this.getTargetFeature(g),ne=this.getTargetFeature(l,(P=j==null?void 0:j.properties.nodes)!==null&&P!==void 0?P:[]);if(j&&ne){var ge,ze=(ge=j==null?void 0:j.properties.nodes)!==null&&ge!==void 0?ge:[];if(4>ze.length)return;this.syncPolygonNodes(j,ze.filter(function(ht){return!Vf(ne,ht)})),this.emit(M.DrawEvent.RemoveNode,ne,j,this.getLineData()),this.emit(M.DrawEvent.Edit,j,this.getPolygonData())}}},{key:"onPointContextMenu",value:function(l){var g,P=this.editPolygon,j=l.feature,ne=(g=P==null?void 0:P.properties.nodes)!==null&&g!==void 0?g:[];if(P&&ne.length>=4)return ne.find(function(ge){return Vf(ge,j)})||(j=ne[0]),this.removeNode(j,P),j}},{key:"bindPointRenderEvent",value:function(){var l;un(Nt(s.prototype),"bindPointRenderEvent",this).call(this),(l=this.pointRender)===null||l===void 0||l.on(M.RenderEvent.Contextmenu,this.onPointContextMenu.bind(this))}},{key:"enablePointRenderAction",value:function(){var l;un(Nt(s.prototype),"enablePointRenderAction",this).call(this),this.options.editable&&((l=this.pointRender)===null||l===void 0||l.enableContextMenu())}},{key:"disablePointRenderAction",value:function(){var l;un(Nt(s.prototype),"disablePointRenderAction",this).call(this),(l=this.pointRender)===null||l===void 0||l.disableContextMenu()}}]),s}(ci),io=function(se){xt(s,se);var a=Yr(s);function s(l,g){var P;return ya(this,s),(P=a.call(this,l,g)).bindPointRenderEvent(),P.bindSceneEvent(),P.bindMidPointRenderEvent(),P.bindLineRenderEvent(),P.bindPolygonRenderEvent(),P}return xn(s,[{key:"getDefaultOptions",value:function(l){var g=un(Nt(s.prototype),"getDefaultOptions",this).call(this,l);return g.helper&&(g.helper=vn(vn({},g.helper),sr)),g}},{key:"setData",value:function(l){var g=this,P=l.map(function(j){var ne,ge,ze;j.properties=vn(vn({},ef()),(ne=j.properties)!==null&&ne!==void 0?ne:{});var ht=j.properties.nodes;if(((ge=ht)===null||ge===void 0?void 0:ge.length)!==2){var zt=Sn(Ec(j),4),qt=zt[2],_r=zt[3];ht=[th([zt[0],zt[1]]),th([qt,_r])],j.properties.nodes=ht}var Rr=Sn(ht,2),Kr=Rr[0],qr=Rr[1],an=!!(!((ze=j.properties)===null||ze===void 0)&&ze.isActive),en=j.properties.line;return en||(en=g.handleCreatePolygonLine(Kr,qr,{isActive:an}),j.properties.line=en),g.handleCreatePolygon([Kr,qr],en,vn(vn({},j.properties),{},{isActive:an}))});this.source.setData({point:[],midPoint:[],dashLine:[],polygon:P,line:P.map(function(j){return j.properties.line})}),this.setTextData(this.getAllTexts()),this.editPolygon&&this.setActivePolygon(this.editPolygon)}},{key:"handleCreatePolygonLine",value:function(l,g){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},j=Yo(nc(aa([l,g]))).map(function(ne,ge){return ge===0?l:ge===2?g:th(ne)});return Xu(j,P)}},{key:"syncPolygonNodes",value:function(l,g){var P=l.properties.line,j=Yo(nc(aa(g)));l.properties.nodes=g,l.geometry.coordinates=[j],this.setPolygonData(function(ze){return ze.map(function(ht){return Vf(ht,l)?l:ht})}),this.setPointData(l.properties.isDraw?[g[0]]:g);var ne=P.properties.nodes,ge=j.filter(function(ze){return!nu(ze,g[0].geometry.coordinates)&&!nu(ze,g[1].geometry.coordinates)});return ne.forEach(function(ze,ht){var zt=[0,0];switch(ht){case 0:zt=g[0].geometry.coordinates;break;case 1:zt=ge[0];break;case 2:zt=g[1].geometry.coordinates;break;case 3:zt=ge[1];break;case 4:zt=nd(g[0].geometry.coordinates)}ze.geometry.coordinates=zt}),P.geometry.coordinates=j,l}},{key:"onLineDragging",value:function(l){var g=un(Nt(s.prototype),"onLineDragging",this).call(this,l),P=this.dragPolygon;if(g&&P){var j=P.properties.line.properties.nodes;this.syncPolygonNodes(P,[j[0],j[2]]),this.setActivePolygon(P,{isDrag:!0}),this.emit(M.DrawEvent.Dragging,P,this.getPolygonData())}return g}}]),s}(bi),ao=function(se,a){for(var s=se;s&&!Array.from(s.classList).includes(a);)s=s.parentElement;return s},Va=["point","line","polygon","rect","circle","clear"],zl={point:"#l7draw-point",line:"#l7draw-line",polygon:"#l7draw-polygon",rect:"#l7draw-rect",circle:"#l7draw-circle",clear:"#l7draw-qingkong"},Ll={point:es,line:va,polygon:Io,rect:io,circle:Ei},Ru="data-draw-type",xl="l7-draw-control",Th="".concat(xl,"__btn"),Bh="".concat(Th,"--active");(function(se){var a,s,l,g,P,j='',ne=(ne=document.getElementsByTagName("script"))[ne.length-1].getAttribute("data-injectcss");if(ne&&!se.__iconfont__svg__cssinject__){se.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(ze){console&&console.log(ze)}}function ge(){P||(P=!0,l())}a=function(){var ze,ht=document.createElement("div");ht.innerHTML=j,j=null,(ht=ht.getElementsByTagName("svg")[0])&&(ht.setAttribute("aria-hidden","true"),ht.style.position="absolute",ht.style.width=0,ht.style.height=0,ht.style.overflow="hidden",(ze=document.body).firstChild?function(zt,qt){qt.parentNode.insertBefore(zt,qt)}(ht,ze.firstChild):ze.appendChild(ht))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(s=function(){document.removeEventListener("DOMContentLoaded",s,!1),a()},document.addEventListener("DOMContentLoaded",s,!1)):document.attachEvent&&(l=a,g=se.document,P=!1,function ze(){try{g.documentElement.doScroll("left")}catch(ht){return void setTimeout(ze,50)}ge()}(),g.onreadystatechange=function(){g.readyState=="complete"&&(g.onreadystatechange=null,ge())})})(window),Ni(".l7-draw-control{display:flex;overflow:hidden;background:#fff;border-radius:2px;box-shadow:0 0 20px rgba(0,0,0,.14901960784313725)}.l7-draw-control__btn{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;text-align:center;background:transparent;border-width:0;border-right:1px solid #e0e0e0;outline:0;cursor:pointer}.l7-draw-control__btn:hover{background-color:#e5e5e5}.l7-draw-control__btn:last-child{border-right:0;border-bottom:0}.l7-draw-control__btn .l7-draw-icon{width:26px;height:26px;overflow:hidden;fill:currentColor}.l7-draw-control__btn--active svg{color:#0370fe}");var wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jf=/^\w*$/,Yl=function(se,a){if(Qc(se))return!1;var s=typeof se;return!(s!="number"&&s!="symbol"&&s!="boolean"&&se!=null&&!Ps(se))||Jf.test(se)||!wh.test(se)||a!=null&&se in Object(a)};function Mc(se,a){if(typeof se!="function"||a!=null&&typeof a!="function")throw new TypeError("Expected a function");var s=function(){var l=arguments,g=a?a.apply(this,l):l[0],P=s.cache;if(P.has(g))return P.get(g);var j=se.apply(this,l);return s.cache=P.set(g,j)||P,j};return s.cache=new(Mc.Cache||jf),s}Mc.Cache=jf;var ad=Mc,Tf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wh=/\\(\\)?/g,Nf=function(se){var a=ad(se,function(l){return s.size===500&&s.clear(),l}),s=a.cache;return a}(function(se){var a=[];return se.charCodeAt(0)===46&&a.push(""),se.replace(Tf,function(s,l,g,P){a.push(g?P.replace(Wh,"$1"):l||s)}),a}),hm=ba?ba.prototype:void 0,bm=hm?hm.toString:void 0,xm=function se(a){if(typeof a=="string")return a;if(Qc(a))return Ch(a,se)+"";if(Ps(a))return bm?bm.call(a):"";var s=a+"";return s=="0"&&1/a==-1/0?"-0":s},jp=function(se){return se==null?"":xm(se)},Rm=function(se,a){return Qc(se)?se:Yl(se,a)?[se]:Nf(jp(se))},up=function(se){if(typeof se=="string"||Ps(se))return se;var a=se+"";return a=="0"&&1/se==-1/0?"-0":a},V0=function(se,a){for(var s=0,l=(a=Rm(a,se)).length;se!=null&&l>s;)se=se[up(a[s++])];return s&&s==l?se:void 0},xd=function(se,a,s){var l=-1,g=se.length;0>a&&(a=-a>g?0:g+a),0>(s=s>g?g:s)&&(s+=g),g=a>s?0:s-a>>>0,a>>>=0;for(var P=Array(g);++la.length?se:V0(se,xd(a,0,-1))},od=function(se,a){return a=Rm(a,se),(se=n0(se,a))==null||delete se[up(I(a))]},Fd=function(se){return As(se)?void 0:se},zd=ba?ba.isConcatSpreadable:void 0,nm=function(se){return Qc(se)||Jh(se)||!!(zd&&se&&se[zd])},Yd=function se(a,s,l,g,P){var j=-1,ne=a.length;for(l||(l=nm),P||(P=[]);++j0&&l(ge)?s>1?se(ge,s-1,l,g,P):e0(P,ge):g||(P[P.length]=ge)}return P},lp=function(se){return se!=null&&se.length?Yd(se,1):[]},cp=function(se){return wc(Wu(se,void 0,lp),se+"")}(function(se,a){var s={};if(se==null)return s;var l=!1;a=Ch(a,function(P){return P=Rm(P,se),l||(l=P.length>1),P}),Hf(se,Hp(se),s),l&&(s=fm(s,7,Fd));for(var g=a.length;g--;)od(s,a[g]);return s}),Bd=cp,Pp=function(se){xt(s,se);var a=Yr(s);function s(l){var g,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ya(this,s),(g=a.call(this,P)).controlOption=void 0,g.sceneInstance=void 0,g.drawMap={},g.btnMap={},g.activeType=null,g.emitDataChange=m(function(){g.emit(M.ControlEvent.DataChange,g.getDrawData())},16),g.emitDrawSelect=function(j,ne){g.emit(M.ControlEvent.DrawSelect,j,ne)},g.sceneInstance=l,g.controlOption=vn(vn({},g.getDefault()),P||{}),g.onBtnClick=g.onBtnClick.bind($r(g)),g}return xn(s,[{key:"getActiveType",value:function(){return this.activeType}},{key:"getDefault",value:function(){return vn(vn({},un(Nt(s.prototype),"getDefault",this).call(this)),{},{className:"",buttonClassName:"",activeButtonClassName:"",style:"",position:"topleft",commonDrawOptions:{},drawConfig:{point:!0,line:!0,polygon:!0,rect:!0,circle:!0,clear:!0}})}},{key:"addTo",value:function(l){return un(Nt(s.prototype),"addTo",this).call(this,l),this.init(),this}},{key:"onAdd",value:function(){var l=this.controlOption,g=l.className,P=l.style,j=V.DOM.create("div","".concat(xl," ").concat(g));return P&&j.setAttribute("style",P),j}},{key:"onRemove",value:function(){Object.values(this.drawMap).forEach(function(l){l.clear(!0)})}},{key:"init",value:function(){var l,g=this,P=[];Object.entries(this.controlOption.drawConfig).filter(function(j){var ne=Sn(j,2);return ne[1]}).sort(function(j,ne){var ge=Sn(j,2)[1],ze=Sn(ne,2)[1],ht=Number.MAX_SAFE_INTEGER;return(typeof ge=="boolean"?ht:ge.order)-(typeof ze=="boolean"?ht:ze.order)}).map(function(j){var ne=Sn(j,2),ge=ne[1];return[ne[0],Xi(ge)==="object"?Bd(ge,"order"):ge]}).forEach(function(j){var ne=Sn(j,2),ge=ne[0],ze=ne[1];if(Xi(ze)==="object"&&ze.button){var ht=ze.button;ht.classList.contains("l7-draw-control__btn")||ht.classList.add("l7-draw-control__btn"),g.btnMap[ge]=ht,P.push(ht)}else if(ze&&Va.includes(ge)){var zt=g.initBtn(ge);zt.addEventListener("click",g.onBtnClick),P.push(zt),g.btnMap[ge]=zt;var qt=Ll[ge];if(qt&&g.sceneInstance){var _r=new qt(g.sceneInstance,vn(vn({},g.controlOption.commonDrawOptions),typeof ze=="boolean"?{}:ze));_r.on(M.DrawEvent.Change,g.emitDataChange),_r.on(M.DrawEvent.Select,function(Rr){g.emitDrawSelect(ge,Rr)}),g.drawMap[ge]=_r}}}),(l=this.container).append.apply(l,P),this.controlOption.defaultActiveType&&this.onDrawClick(this.controlOption.defaultActiveType)}},{key:"getDrawData",value:function(){return j0(Ff(this.drawMap).map(function(l){var g=Sn(l,2);return[g[0],g[1].getData()]}))}},{key:"getTypeDraw",value:function(l){var g;return(g=this.drawMap[l])!==null&&g!==void 0?g:null}},{key:"onBtnClick",value:function(l){var g=ao(l.target,Th);if(g){var P=g.getAttribute(Ru);P==="clear"?this.clearDrawData():this.onDrawClick(P)}}},{key:"setActiveType",value:function(l){var g=null,P=this.activeType;if(P){var j,ne=this.btnMap[P];if(ne){V.DOM.removeClass(ne,Bh);var ge=this.controlOption.activeButtonClassName;ge&&V.DOM.removeClass(ne,ge)}(j=this.drawMap[P])===null||j===void 0||j.disable(),g=null}if(P!==l&&l){var ze;(ze=this.drawMap[l])===null||ze===void 0||ze.enable();var ht=this.btnMap[l];ht&&V.DOM.addClass(ht,"".concat(Bh," ").concat(this.controlOption.activeButtonClassName)),g=l}this.activeType=g,this.emit(M.ControlEvent.DrawChange,g)}},{key:"onDrawClick",value:function(l){this.setActiveType(l)}},{key:"clearDrawData",value:function(){Object.values(this.drawMap).forEach(function(l){l==null||l.clear()}),this.emit(M.ControlEvent.DrawClear)}},{key:"initBtn",value:function(l){var g=V.DOM.create("button","".concat(Th," ").concat(this.controlOption.buttonClassName));return g.innerHTML=``),g.setAttribute(Ru,l),g}}]),s}(V.Control);M.ACTIVE_COLOR=K,M.BaseMode=D,M.CircleDrawer=Ei,M.DEFAULT_ADSORB_CONFIG=wr,M.DEFAULT_AREA_OPTIONS=tn,M.DEFAULT_COMMON_OPTIONS=q,M.DEFAULT_CURSOR_MAP=y,M.DEFAULT_DISTANCE_OPTIONS=On,M.DEFAULT_HISTORY_CONFIG=Pi,M.DEFAULT_KEYBOARD_CONFIG=ut,M.DEFAULT_MID_POINT_STYLE=tt,M.DEFAULT_NODE_NORMAL_STYLE=je,M.DEFAULT_NODE_STYLE=Gt,M.DEFAULT_POINT_NORMAL_STYLE=me,M.DEFAULT_POINT_STYLE=w,M.DEFAULT_POPUP_CONFIG=Wt,M.DEFAULT_SOURCE_DATA=d,M.DEFAULT_STYLE=x,M.DEFAULT_TEXT_NORMAL_STYLE=b,M.DashLineRender=Gn,M.DragPolygonMode=bi,M.DrawCircle=Ei,M.DrawControl=Pp,M.DrawLine=va,M.DrawPoint=es,M.DrawPolygon=Io,M.DrawRect=io,M.LayerRender=Jr,M.LineDrawer=va,M.LineMode=An,M.LineRender=F,M.MidPointMode=ee,M.MidPointRender=H,M.NORMAL_COLOR=O,M.PointDrawer=es,M.PointMode=B,M.PointRender=ve,M.PolygonDrawer=Io,M.PolygonMode=ci,M.PolygonRender=ot,M.RENDER_MAP=f,M.RectDrawer=io,M.SceneRender=kt,M.Source=Qn,M.TextRender=J,M.calcAreaText=qp,M.calcDistanceTextsByLine=jh,M.createDashLine=Pl,M.createLineFeature=Xu,M.createPointFeature=th,M.createPolygonFeature=mu,M.findMinIndex=tf,M.getAdsorbFeature=Nr,M.getAdsorbLine=hi,M.getAdsorbPoint=vr,M.getDefaultLineProperties=$d,M.getDefaultPointProperties=df,M.getDefaultPolygonProperties=ef,M.getLineCenterPoint=pf,M.getLngLat=Ja,M.getMapDom=fi,M.getParentByClassName=ao,M.getPosition=ga,M.getSingleColorStyle=function(se){return{point:{normal:{color:se},hover:{color:se},active:{color:se}},line:{normal:{color:se},hover:{color:se},active:{color:se}},polygon:{normal:{color:se},hover:{color:se},active:{color:se},style:{opacity:.2}},text:{normal:{color:se},active:{color:se}},midPoint:{normal:{color:se}},dashLine:{normal:{color:se}}}},M.getUuid=md,M.isDev=!1,M.isSameFeature=Vf,M.resetEventLngLat=Ma,M.splitByPosition=bo,M.transLngLat2Position=Yu,M.updateTargetFeature=id,Object.defineProperty(M,"__esModule",{value:!0})})},60965:function(Ke,ye,_){"use strict";_.r(ye),_.d(ye,{AJAXError:function(){return Zi},AttributeType:function(){return pl},BKDRHash:function(){return Ys},BaiduMap:function(){return DB},BaseLayer:function(){return pv},BaseMapService:function(){return Dg},BaseMapWrapper:function(){return Uv},BaseModel:function(){return op},BasePostProcessingPass:function(){return Ov},BlendType:function(){return xf},ButtonControl:function(){return P_},CameraUniform:function(){return M0},CanvasLayer:function(){return UP},CanvasUpdateType:function(){return O1},CityBuildingLayer:function(){return jI},Control:function(){return fy},CoordinateSystem:function(){return ae},CoordinateUniform:function(){return ue},DOM:function(){return M},Earth:function(){return V9},EarthLayer:function(){return ED},ExportImage:function(){return Y4},FrequencyController:function(){return hl},Fullscreen:function(){return eP},GaodeMap:function(){return IT},GaodeMapV1:function(){return dB},GaodeMapV2:function(){return IT},GeoLocate:function(){return nP},GeometryLayer:function(){return uR},GoogleMap:function(){return qz},HeatmapLayer:function(){return NR},IDebugLog:function(){return ud},ILayerStage:function(){return Kl},ImageLayer:function(){return mS},InteractionEvent:function(){return nl},LRUCache:function(){return _h},LayerPopup:function(){return LF},LayerSwitch:function(){return oP},LineLayer:function(){return Wx},LineTriangulation:function(){return o0},LinearDir:function(){return kx},LoadTileDataStatus:function(){return Ws},Logo:function(){return PE},Map:function(){return K9},MapLibre:function(){return gz},MapServiceEvent:function(){return pm},MapTheme:function(){return dP},MapType:function(){return Qu},Mapbox:function(){return sz},Marker:function(){return xE},MarkerLayer:function(){return k4},MaskLayer:function(){return Yx},MaskOperation:function(){return sf},MouseLocation:function(){return vP},PassType:function(){return Cg},PointFillTriangulation:function(){return Gp},PointLayer:function(){return Ab},PolygonLayer:function(){return bb},PopperControl:function(){return EE},Popup:function(){return q3},PositionType:function(){return wl},RasterLayer:function(){return xb},RasterTileType:function(){return Q0},Satistics:function(){return V},Scale:function(){return _P},ScaleTypes:function(){return Mf},Scene:function(){return qj},SceneConifg:function(){return _i},SceneEventList:function(){return wv},SelectControl:function(){return Px},SizeUnitType:function(){return db},Source:function(){return Mx},SourceTile:function(){return na},StencilType:function(){return pc},StyleScaleType:function(){return q0},Swipe:function(){return EF},TMap:function(){return zz},TYPES:function(){return vr},TencentMap:function(){return Iz},TextureBlend:function(){return VE},TextureUsage:function(){return Oh},TileDebugLayer:function(){return rD},TilesetManager:function(){return Bs},UpdateTileStrategy:function(){return ic},Viewport:function(){return _y},WindLayer:function(){return QD},WorkerSourceMap:function(){return Fp},Zoom:function(){return TF},aProjectFlat:function(){return zc},amap2Project:function(){return Nn},amap2UnProject:function(){return Pn},anchorTranslate:function(){return ei},anchorType:function(){return so},applyAnchorClass:function(){return Kn},bBoxToBounds:function(){return Gs},bindAll:function(){return qu},boundsContains:function(){return To},calAngle:function(){return ll},calDistance:function(){return Jo},calculateCentroid:function(){return fc},calculatePointsCenterAndRadius:function(){return Lu},container:function(){return T0},createLayerContainer:function(){return av},createSceneContainer:function(){return Jm},decodePickingColor:function(){return sa},defaultValue:function(){return jd},djb2hash:function(){return _s},encodePickingColor:function(){return vo},executeWorkerTask:function(){return cm},expandUrl:function(){return yu},extent:function(){return Al},flow:function(){return Oc},formatImage:function(){return ji},generateCatRamp:function(){return Os},generateColorRamp:function(){return Ro},generateCustomRamp:function(){return Tu},generateLinearRamp:function(){return Za},generateQuantizeRamp:function(){return ro},getAngle:function(){return Uu},getArrayBuffer:function(){return _n},getBBoxFromPoints:function(){return su},getCullFace:function(){return ca},getData:function(){return Zn},getDefaultDomain:function(){return qa},getImage:function(){return oa},getJSON:function(){return mo},getProtocolAction:function(){return Ia},getReferrer:function(){return gu},getTileIndices:function(){return ha},getTileWarpXY:function(){return ba},getURLFromTemplate:function(){return fu},getWMTSURLFromTemplate:function(){return Gu},gl:function(){return Or},guid:function(){return Fs},isAndroid:function(){return zu},isColor:function(){return ki},isImageBitmap:function(){return fl},isPC:function(){return Zu},isURLTemplate:function(){return cu},isWorker:function(){return lf},isiOS:function(){return Co},latitude:function(){return Xf},lazyInject:function(){return iv},lazyMultiInject:function(){return Mg},lineAtOffset:function(){return Lf},lineAtOffsetAsyc:function(){return If},lineStyleType:function(){return LP},lngLatInExtent:function(){return au},lngLatToMeters:function(){return ah},lnglatDistance:function(){return xi},lodashUtil:function(){return vi},longitude:function(){return Ac},makeXMLHttpRequestPromise:function(){return fa},metersToLngLat:function(){return qf},normalize:function(){return xs},osmLonLat2TileXY:function(){return Ca},osmTileXY2LonLat:function(){return $a},packCircleVertex:function(){return ub},padBounds:function(){return Xa},polygonFillTriangulation:function(){return N0},postData:function(){return yi},project:function(){return qi},removeDuplicateUniforms:function(){return jy},rgb2arr:function(){return Fa},sameOrigin:function(){return gr},setL7WorkerSource:function(){return s0},tileToBounds:function(){return Ba},tranfrormCoord:function(){return Gl},unProjectFlat:function(){return bh},validateLngLat:function(){return _f},version:function(){return Qj}});var M={};_.r(M),_.d(M,{DPR:function(){return Yo},addClass:function(){return Po},addStyle:function(){return No},appendElementType:function(){return Zf},clearChildren:function(){return yl},create:function(){return aa},css2Style:function(){return Wa},empty:function(){return js},findParentElement:function(){return Vu},getClass:function(){return iu},getContainer:function(){return ma},getDiffRect:function(){return mf},getStyleList:function(){return Ku},getViewPortScale:function(){return _c},hasClass:function(){return Mu},printCanvas:function(){return ul},remove:function(){return ho},removeClass:function(){return Ms},removeStyle:function(){return Rc},setChecked:function(){return yf},setClass:function(){return vs},setTransform:function(){return sl},setUnDraggable:function(){return Ec},splitWords:function(){return ua},toggleClass:function(){return Xs},triggerResize:function(){return al},trim:function(){return Yi}});var V={};_.r(V),_.d(V,{getColumn:function(){return Af},getSatByColumn:function(){return fd},max:function(){return Df},mean:function(){return Uf},min:function(){return af},mode:function(){return _u},statMap:function(){return Ls},sum:function(){return cd}});var y={};_.r(y),_.d(y,{add:function(){return za},adjoint:function(){return xd},clone:function(){return hm},copy:function(){return bm},create:function(){return Nf},determinant:function(){return n0},equals:function(){return as},exactEquals:function(){return cs},frob:function(){return wa},fromQuat:function(){return zt},fromQuat2:function(){return P},fromRotation:function(){return se},fromRotationTranslation:function(){return g},fromRotationTranslationScale:function(){return ze},fromRotationTranslationScaleOrigin:function(){return ht},fromScaling:function(){return Pp},fromTranslation:function(){return Bd},fromValues:function(){return xm},fromXRotation:function(){return a},fromYRotation:function(){return s},fromZRotation:function(){return l},frustum:function(){return qt},getRotation:function(){return ge},getScaling:function(){return ne},getTranslation:function(){return j},identity:function(){return Rm},invert:function(){return V0},lookAt:function(){return Fn},mul:function(){return $s},multiply:function(){return od},multiplyScalar:function(){return Ds},multiplyScalarAndAdd:function(){return lo},ortho:function(){return en},orthoNO:function(){return an},orthoZO:function(){return Hr},perspective:function(){return Rr},perspectiveFromFieldOfView:function(){return qr},perspectiveNO:function(){return _r},perspectiveZO:function(){return Kr},rotate:function(){return nm},rotateX:function(){return Yd},rotateY:function(){return lp},rotateZ:function(){return cp},scale:function(){return zd},set:function(){return jp},str:function(){return Mi},sub:function(){return ps},subtract:function(){return oo},targetTo:function(){return ni},translate:function(){return Fd},transpose:function(){return up}});var d={};_.r(d),_.d(d,{add:function(){return HP},angle:function(){return Nx},bezier:function(){return tI},ceil:function(){return GP},clone:function(){return jP},copy:function(){return VP},create:function(){return dy},cross:function(){return pb},dist:function(){return pI},distance:function(){return WE},div:function(){return dI},divide:function(){return GE},dot:function(){return qE},equals:function(){return fI},exactEquals:function(){return cI},floor:function(){return WP},forEach:function(){return yI},fromValues:function(){return qd},hermite:function(){return eI},inverse:function(){return QP},len:function(){return vI},length:function(){return $E},lerp:function(){return JP},max:function(){return YP},min:function(){return XP},mul:function(){return hI},multiply:function(){return Fx},negate:function(){return KE},normalize:function(){return py},random:function(){return rI},rotateX:function(){return aI},rotateY:function(){return oI},rotateZ:function(){return sI},round:function(){return KP},scale:function(){return Bx},scaleAndAdd:function(){return qP},set:function(){return $P},sqrDist:function(){return mI},sqrLen:function(){return gI},squaredDistance:function(){return XE},squaredLength:function(){return YE},str:function(){return lI},sub:function(){return zx},subtract:function(){return HE},transformMat3:function(){return nI},transformMat4:function(){return qy},transformQuat:function(){return iI},zero:function(){return uI}});var $={},X={},oe=function(i){return X[i]},re=function(i,r){X[i]=r},le=function(i){return $[i]},ce=function(i,r){$[i]=r},Ie={},we={},Ee=34,qe=10,Xe=13;function ft(e){return new Function("d","return {"+e.map(function(i,r){return JSON.stringify(i)+": d["+r+'] || ""'}).join(",")+"}")}function Ge(e,i){var r=ft(e);return function(n,t){return i(r(n),t,e)}}function lt(e){var i=Object.create(null),r=[];return e.forEach(function(n){for(var t in n)t in i||r.push(i[t]=t)}),r}function Ye(e,i){var r=e+"",n=r.length;return n9999?"+"+Ye(e,6):Ye(e,4)}function At(e){var i=e.getUTCHours(),r=e.getUTCMinutes(),n=e.getUTCSeconds(),t=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":It(e.getUTCFullYear(),4)+"-"+Ye(e.getUTCMonth()+1,2)+"-"+Ye(e.getUTCDate(),2)+(t?"T"+Ye(i,2)+":"+Ye(r,2)+":"+Ye(n,2)+"."+Ye(t,3)+"Z":n?"T"+Ye(i,2)+":"+Ye(r,2)+":"+Ye(n,2)+"Z":r||i?"T"+Ye(i,2)+":"+Ye(r,2)+"Z":"")}function Ue(e){var i=new RegExp('["'+e+` -\r]`),r=e.charCodeAt(0);function n(ie,xe){var Fe,it,gt=t(ie,function(Dt,ar){if(Fe)return Fe(Dt,ar-1);it=Dt,Fe=xe?Ge(Dt,xe):ft(Dt)});return gt.columns=it||[],gt}function t(ie,xe){var Fe=[],it=ie.length,gt=0,Dt=0,ar,Mr=it<=0,Zr=!1;ie.charCodeAt(it-1)===qe&&--it,ie.charCodeAt(it-1)===Xe&&--it;function mn(){if(Mr)return we;if(Zr)return Zr=!1,Ie;var Rn,kn=gt,ui;if(ie.charCodeAt(kn)===Ee){for(;gt++=it?Mr=!0:(ui=ie.charCodeAt(gt++))===qe?Zr=!0:ui===Xe&&(Zr=!0,ie.charCodeAt(gt)===qe&&++gt),ie.slice(kn+1,Rn-1).replace(/""/g,'"')}for(;gt=200&&r.status<300||r.status===0)&&r.response!==null){var o=r.response;if(e.type==="json")try{o=JSON.parse(r.response)}catch(c){return i(c)}i(null,o,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"),r)}else{var u=new Blob([r.response],{type:r.getResponseHeader("Content-Type")});i(new Zi(r.status,r.statusText,n.toString(),u))}},r.cancel=r.abort,r.send(e.body),r}function fa(e){return new Promise(function(i,r){Ua(e,function(n,t,o,u,c){n?r({err:n,data:null,xhr:c}):i({err:null,data:t,cacheControl:o,expires:u,xhr:c})})})}function ka(e,i){return Ua(e,i)}var mo=function(i,r){var n=Ia(i.url)||ka;return n((0,Me.Z)((0,Me.Z)({},i),{},{type:"json"}),r)},_n=function(i,r){var n=Ia(i.url)||ka;return n((0,Me.Z)((0,Me.Z)({},i),{},{type:"arrayBuffer"}),r)},yi=function(i,r){return ka((0,Me.Z)((0,Me.Z)({},i),{},{method:"POST"}),r)},Zn=function(i,r){return ka((0,Me.Z)((0,Me.Z)({},i),{},{method:"GET"}),r)};function gr(e){var i=window.document.createElement("a");return i.href=e,i.protocol===window.document.location.protocol&&i.host===window.document.location.host}var Ea="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function co(e,i){var r=new window.Image,n=window.URL||window.webkitURL;r.crossOrigin="anonymous",r.onload=function(){i(null,r),n.revokeObjectURL(r.src),r.onload=null,window.requestAnimationFrame(function(){r.src=Ea})},r.onerror=function(){return i(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."))};var t=new Blob([new Uint8Array(e)],{type:"image/png"});r.src=e.byteLength?n.createObjectURL(t):Ea}function Qa(e,i){var r=new Blob([new Uint8Array(e)],{type:"image/png"});createImageBitmap(r).then(function(n){i(null,n)}).catch(function(n){i(new Error("Could not load image because of ".concat(n.message,". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")))})}var oa=function(i,r,n){var t=function(u,c){if(u)r(u);else if(c){var v=typeof createImageBitmap=="function",E=n?n(c):c;v?Qa(E,r):co(E,r)}};return i.type==="json"?mo(i,t):_n(i,t)},ji=function(i,r){var n=typeof createImageBitmap=="function";n?Qa(i,r):co(i,r)},so=function(e){return e.CENTER="center",e.TOP="top",e["TOP-LEFT"]="top-left",e["TOP-RIGHT"]="top-right",e.BOTTOM="bottom",e["BOTTOM-LEFT"]="bottom-left",e["BOTTOM-RIGHT"]="bottom-right",e.LEFT="left",e.RIGHT="right",e}({}),ei={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 Kn(e,i,r){var n=e.classList;for(var t in ei)ei.hasOwnProperty(t)&&n.remove("l7-".concat(r,"-anchor-").concat(t));n.add("l7-".concat(r,"-anchor-").concat(i))}function Jn(e,i,r){e.prototype=i.prototype=r,r.constructor=e}function da(e,i){var r=Object.create(e.prototype);for(var n in i)r[n]=i[n];return r}function pa(){}var uo=.7,Ir=1/uo,bt="\\s*([+-]?\\d+)\\s*",Yt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xr=/^#([0-9a-f]{3,8})$/,Tr=new RegExp("^rgb\\("+[bt,bt,bt]+"\\)$"),hn=new RegExp("^rgb\\("+[Pt,Pt,Pt]+"\\)$"),Cn=new RegExp("^rgba\\("+[bt,bt,bt,Yt]+"\\)$"),tr=new RegExp("^rgba\\("+[Pt,Pt,Pt,Yt]+"\\)$"),jt=new RegExp("^hsl\\("+[Yt,Pt,Pt]+"\\)$"),He=new RegExp("^hsla\\("+[Yt,Pt,Pt,Yt]+"\\)$"),We={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Jn(pa,fr,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:_t,formatHex:_t,formatHsl:Zt,formatRgb:rr,toString:rr});function _t(){return this.rgb().formatHex()}function Zt(){return Wn(this).formatHsl()}function rr(){return this.rgb().formatRgb()}function fr(e){var i,r;return e=(e+"").trim().toLowerCase(),(i=xr.exec(e))?(r=i[1].length,i=parseInt(i[1],16),r===6?mr(i):r===3?new on(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):r===8?Qe(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):r===4?Qe(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=Tr.exec(e))?new on(i[1],i[2],i[3],1):(i=hn.exec(e))?new on(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=Cn.exec(e))?Qe(i[1],i[2],i[3],i[4]):(i=tr.exec(e))?Qe(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=jt.exec(e))?Yn(i[1],i[2]/100,i[3]/100,1):(i=He.exec(e))?Yn(i[1],i[2]/100,i[3]/100,i[4]):We.hasOwnProperty(e)?mr(We[e]):e==="transparent"?new on(NaN,NaN,NaN,0):null}function mr(e){return new on(e>>16&255,e>>8&255,e&255,1)}function Qe(e,i,r,n){return n<=0&&(e=i=r=NaN),new on(e,i,r,n)}function er(e){return e instanceof pa||(e=fr(e)),e?(e=e.rgb(),new on(e.r,e.g,e.b,e.opacity)):new on}function jr(e,i,r,n){return arguments.length===1?er(e):new on(e,i,r,n==null?1:n)}function on(e,i,r,n){this.r=+e,this.g=+i,this.b=+r,this.opacity=+n}Jn(on,jr,da(pa,{brighter:function(e){return e=e==null?Ir:Math.pow(Ir,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?uo:Math.pow(uo,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ri,formatHex:ri,formatRgb:nn,toString:nn}));function ri(){return"#"+ln(this.r)+ln(this.g)+ln(this.b)}function nn(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function ln(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function Yn(e,i,r,n){return n<=0?e=i=r=NaN:r<=0||r>=1?e=i=NaN:i<=0&&(e=NaN),new ai(e,i,r,n)}function Wn(e){if(e instanceof ai)return new ai(e.h,e.s,e.l,e.opacity);if(e instanceof pa||(e=fr(e)),!e)return new ai;if(e instanceof ai)return e;e=e.rgb();var i=e.r/255,r=e.g/255,n=e.b/255,t=Math.min(i,r,n),o=Math.max(i,r,n),u=NaN,c=o-t,v=(o+t)/2;return c?(i===o?u=(r-n)/c+(r0&&v<1?0:u,new ai(u,c,v,e.opacity)}function Tn(e,i,r,n){return arguments.length===1?Wn(e):new ai(e,i,r,n==null?1:n)}function ai(e,i,r,n){this.h=+e,this.s=+i,this.l=+r,this.opacity=+n}Jn(ai,Tn,da(pa,{brighter:function(e){return e=e==null?Ir:Math.pow(Ir,e),new ai(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?uo:Math.pow(uo,e),new ai(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,i=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*i,t=2*r-n;return new on(Ii(e>=240?e-240:e+120,t,n),Ii(e,t,n),Ii(e<120?e+240:e-120,t,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function Ii(e,i,r){return(e<60?i+(r-i)*e/60:e<180?r:e<240?i+(r-i)*(240-e)/60:i)*255}function ki(e){return typeof e=="string"?!!fr(e):!1}function Fa(e){var i=fr(e),r=[0,0,0,0];return i!=null&&(r[0]=i.r/255,r[1]=i.g/255,r[2]=i.b/255,r[3]=i.opacity),r}function sa(e){var i=e&&e[0],r=e&&e[1],n=e&&e[2],t=i+r*256+n*65536-1;return t}function vo(e){return[e+1&255,e+1>>8&255,e+1>>8>>8&255]}function Ro(e){var i=window.document.createElement("canvas"),r=i.getContext("2d");i.width=256,i.height=1;for(var n=null,t=r.createLinearGradient(0,0,256,1),o=e.positions[0],u=e.positions[e.positions.length-1],c=0;c0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(r)}function vs(e,i){e instanceof HTMLElement?e.className=i:e.className.baseVal=i}function Xs(e,i,r){r===void 0?Mu(e,i)?Ms(e,i):Po(e,i):r?Po(e,i):Ms(e,i)}function iu(e){return e instanceof SVGElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}function js(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}var Vs=La(["transform","WebkitTransform"]);function sl(e,i){e.style[Vs]=i}function al(){if(typeof Event=="function")window.dispatchEvent(new Event("resize"));else{var e=window.document.createEvent("UIEvents");e.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(e)}}function ul(e){var i=["padding: "+(e.height/2-8)+"px "+e.width/2+"px;","line-height: "+e.height+"px;","background-image: url("+e.toDataURL()+");"];console.log(`%c -`,i.join(""))}function _c(){var e,i=window.document.querySelector('meta[name="viewport"]');if(!i)return 1;var r=(e=i.content)===null||e===void 0?void 0:e.split(","),n=r.find(function(t){var o=t.split("="),u=(0,wi.Z)(o,1),c=u[0];return c==="initial-scale"});return n?n.split("=")[1]*1:1}var Yo=_c()<1?1:window.devicePixelRatio;function No(e,i){e.setAttribute("style","".concat(e.style.cssText).concat(i))}function Ku(e){return e.split(";").map(function(i){return i.trim()}).filter(function(i){return i})}function Rc(e,i){var r,n=Ku((r=e.getAttribute("style"))!==null&&r!==void 0?r:""),t=Ku(i),o=gi.apply(void 0,[n].concat((0,Mn.Z)(t)));e.setAttribute("style",o.join(";"))}function Wa(e){return Object.entries(e).map(function(i){var r=(0,wi.Z)(i,2),n=r[0],t=r[1];return"".concat(n,": ").concat(t)}).join(";")}function mf(e,i){return{left:e.left-i.left,top:e.top-i.top,right:i.left+i.width-e.left-e.width,bottom:i.top+i.height-e.top-e.height}}function yf(e,i){e.checked=i,i?e.setAttribute("checked","true"):e.removeAttribute("checked")}function yl(e){e.innerHTML=""}function Ec(e){e.setAttribute("draggable","false")}function Zf(e,i){if(typeof i=="string"){var r=document.createElement("div");for(r.innerHTML=i;r.firstChild;)e.append(r.firstChild)}else Array.isArray(i)?e.append.apply(e,(0,Mn.Z)(i)):e.append(i)}function Vu(e,i){for(var r=Array.isArray(i)?i:[i],n=e;n instanceof Element&&n!==window.document.body;){var t,o;if(r.find(function(u){var c;return(c=n)===null||c===void 0?void 0:c.matches(u)}))return n;n=(t=(o=n)===null||o===void 0?void 0:o.parentElement)!==null&&t!==void 0?t:null}}var lc;function fl(e){return typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap}function lf(){return typeof importScripts=="function"}var gu=lf()?function(){return self.worker&&self.worker.referrer}:function(){return(window.location.protocol==="blob:"?window.parent:window).location.href},Pu=(lc=navigator)===null||lc===void 0?void 0:lc.userAgent,Co=!!Pu.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),zu=Pu.indexOf("Android")>-1||Pu.indexOf("Adr")>-1;function Zu(){for(var e=Pu,i=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],r=!0,n=0,t=i;n0){r=!1;break}}return r}var St=_(16514);function qu(e,i){e.forEach(function(r){i[r]&&(i[r]=i[r].bind(i))})}var hl=function(){function e(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:16;(0,Je.Z)(this,e),(0,St.Z)(this,"duration",16),(0,St.Z)(this,"timestamp",new Date().getTime()),this.duration=i}return(0,vt.Z)(e,[{key:"run",value:function(r){var n=new Date().getTime(),t=n-this.timestamp;this.timestamp=n,t>=this.duration&&r()}}]),e}(),rc=_(86461),bs=_(8822);function Il(e){return typeof e=="number"}var ks=2*Math.PI*6378137/2;function au(e,i){var r=(0,wi.Z)(i,4),n=r[0],t=r[1],o=r[2],u=r[3];return e.lng>n&&e.lng<=o&&e.lat>t&&e.lat<=u}function Al(e){var i=[1/0,1/0,-1/0,-1/0];return e.forEach(function(r){var n=r.coordinates;cc(i,n)}),i}function cc(e,i){return Array.isArray(i[0])?i.forEach(function(r){cc(e,r)}):(e[0]>i[0]&&(e[0]=i[0]),e[1]>i[1]&&(e[1]=i[1]),e[2]1&&arguments[1]!==void 0?arguments[1]:!0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{enable:!0,decimal:1};e=_f(e,i);var n=e[0],t=e[1],o=n*ks/180,u=Math.log(Math.tan((90+t)*Math.PI/360))/(Math.PI/180);return u=u*ks/180,r.enable&&(o=Number(o.toFixed(r.decimal)),u=Number(u.toFixed(r.decimal))),e.length===3?[o,u,e[2]]:[o,u]}function qf(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,r=e[0],n=e[1],t=r/ks*180,o=n/ks*180;return o=180/Math.PI*(2*Math.atan(Math.exp(o*Math.PI/180))-Math.PI/2),i!=null&&(t=Number(t.toFixed(i)),o=Number(o.toFixed(i))),e.length===3?[t,o,e[2]]:[t,o]}function Ac(e){if(e==null)throw new Error("lng is required");return(e>180||e<-180)&&(e=e%360,e>180&&(e=-360+e),e<-180&&(e=360+e),e===0&&(e=0)),e}function Xf(e){if(e==null)throw new Error("lat is required");return(e>90||e<-90)&&(e=e%180,e>90&&(e=-180+e),e<-90&&(e=180+e),e===0&&(e=0)),e}function _f(e,i){if(i===!1)return e;var r=Ac(e[0]),n=Xf(e[1]);return n>85&&(n=85),n<-85&&(n=-85),e.length===3?[r,n,e[2]]:[r,n]}function zc(e){var i=85.0511287798,r=Math.max(Math.min(i,e[1]),-i),n=256<<20,t=Math.PI/180,o=e[0]*t,u=r*t;u=Math.log(Math.tan(Math.PI/4+u/2));var c=.5/Math.PI,v=.5,E=-.5/Math.PI;return t=.5,o=n*(c*o+v),u=n*(E*u+t),[Math.floor(o),Math.floor(u)]}function bh(e){var i=.5/Math.PI,r=.5,n=-.5/Math.PI,t=.5,o=256<<20,u=(0,wi.Z)(e,2),c=u[0],v=u[1];c=(c/o-r)/i,v=(v/o-t)/n,v=(Math.atan(Math.pow(Math.E,v))-Math.PI/4)*2,t=Math.PI/180;var E=v/t,G=c/t;return[G,E]}function Nn(e,i){var r=85.0511287798,n=Math.PI/180,t=6378137;return i=Math.max(Math.min(r,i),-r),e*=n,i*=n,i=Math.log(Math.tan(Math.PI/4+i/2)),[e*t,i*t]}function Pn(e,i){var r=Math.PI/180,n=6378137,t=e/n/r,o=2*(Math.atan(Math.exp(i/n))-Math.PI/4)/r;return[t,o]}function xi(e,i,r){var n=(0,bs.Ht)(i[1]-e[1]),t=(0,bs.Ht)(i[0]-e[0]),o=(0,bs.Ht)(e[1]),u=(0,bs.Ht)(i[1]),c=Math.pow(Math.sin(n/2),2)+Math.pow(Math.sin(t/2),2)*Math.cos(o)*Math.cos(u);return(0,bs.DL)(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),r="meters")}function qi(e){var i=Math.PI/180,r=85.0511287798,n=6378137,t=Math.max(Math.min(r,e[1]),-r),o=Math.sin(t*i),u=n*e[0]*i,c=n*Math.log((1+o)/(1-o))/2;return[u,c]}function Xa(e,i){var r=Math.abs(e[1][1]-e[0][1])*i,n=Math.abs(e[1][0]-e[0][0])*i;return[[e[0][0]-n,e[0][1]-r],[e[1][0]+n,e[1][1]+r]]}function To(e,i){return e[0][0]<=i[0][0]&&e[0][1]<=i[0][1]&&e[1][0]>=i[1][0]&&e[1][1]>=i[1][1]}function Gs(e){return[[e[0],e[1]],[e[2],e[3]]]}function xs(e){var i=Jo(e,[0,0]);return[e[0]/i,e[1]/i]}function Jo(e,i){return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}function ou(e,i){return e[0]*i[0]+e[1]*i[1]}function Iu(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ll(e,i){return Math.acos(ou(e,i)/(Iu(e)*Iu(i)))*180/Math.PI}function Uu(e,i){return i[0]>0?i[1]>0?90-Math.atan(i[1]/i[0])*180/Math.PI:90+Math.atan(-i[1]/i[0])*180/Math.PI:i[1]<0?180+(90-Math.atan(i[1]/i[0])*180/Math.PI):270+Math.atan(i[1]/-i[0])*180/Math.PI}function Oc(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;if(!(!e||e.length<2)){for(var r=[0,1],n=0,t=[],o=0;o0){var ie=t[o-1].rotation;ie-G>360-ie+G&&(G=G+360)}t.push({start:u,end:c,dis:v,rotation:G,duration:0})}return t.map(function(xe){xe.duration=i*(xe.dis/n)}),t}}function fc(e){if(Il(e[0]))return e;if(Il(e[0][0]))throw new Error("\u5F53\u524D\u6570\u636E\u4E0D\u652F\u6301\u6807\u6CE8");if(Il(e[0][0][0])){var i=e,r=0,n=0,t=0;return i.forEach(function(o){o.forEach(function(u){r+=u[0],n+=u[1],t++})}),[r/t,n/t,0]}else throw new Error("\u5F53\u524D\u6570\u636E\u4E0D\u652F\u6301\u6807\u6CE8")}function Lu(e){for(var i=e[0],r=e[1],n=e[0],t=e[1],o=0,u=0,c=0,v=0;vt&&(n=Math.floor(n/r)),n=n*i+e.charCodeAt(o);return n}function _s(e){e=e.toString();for(var i=5381,r=e.length;r;)i=i*33^e.charCodeAt(--r);return i>>>0}function Fs(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var i=Math.random()*16|0,r=e==="x"?i:i&3|8;return r.toString(16)})}var Qu=function(e){return e["GAODE1.x"]="GAODE1.x",e["GAODE2.x"]="GAODE2.x",e.MAPBOX="MAPBOX",e.DEFAULT="DEFAUlTMAP",e.SIMPLE="SIMPLE",e.GLOBEL="GLOBEL",e}({});function Sl(e,i,r,n,t){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:30,u=arguments.length>6?arguments[6]:void 0,c=r;return u&&(c=Math.round(r*(o-1))/(o-1)),n?Vc(e,i,c,n,t):Vc(e,i,c,.314,t)}function nc(e,i){var r=1-i;return(e[0]*r+e[1]*i)*r+(e[1]*r+e[2]*i)*i}function dl(e,i){return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}function Ml(e,i,r){var n=[i[0]-e[0],i[1]-e[1]],t=dl(n,[0,0]),o=Math.atan2(n[1],n[0]),u=t/2/Math.cos(r),c=o+r,v=[u*Math.cos(c)+e[0],u*Math.sin(c)+e[1]];return v}function Vc(e,i,r,n,t){if(t===Qu["GAODE2.x"]){var o=Nn(e[0],e[1]),u=Nn(i[0],i[1]),c=Ml(o,u,n),v=[o[0],c[0],u[0]],E=[o[1],c[1],u[1]];return[].concat((0,Mn.Z)(Pn(nc(v,r),nc(E,r))),[0])}else{var G=Ml(e,i,n),ie=[e[0],G[0],i[0]],xe=[e[1],G[1],i[1]];return[nc(ie,r),nc(xe,r),0]}}function kl(e,i,r,n,t){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:30,u=arguments.length>6?arguments[6]:void 0,c=r;return u&&(c=Math.round(r*29)/29),Rl(e,i,c,t)}function Qf(e,i){var r=[i[0]-e[0],i[1]-e[1]],n=Jo(r,[0,0]),t=Math.atan2(r[1],r[0]),o=.314,u=n/2/Math.cos(o),c=t+o,v=[u*Math.cos(c)+e[0],u*Math.sin(c)+e[1]];return v}function ds(e,i){var r=1-i;return(e[0]*r+e[1]*i)*r+(e[1]*r+e[2]*i)*i}function Eu(e,i){var r=[e[0]-i[0],e[1]-i[1]],n=[Math.sin(r[0]/2),Math.sin(r[1]/2)],t=n[1]*n[1]+Math.cos(e[1])*Math.cos(i[1])*n[0]*n[0];return 2*Math.atan2(Math.sqrt(t),Math.sqrt(1-t))}function Rl(e,i,r,n){var t=[(0,bs.Ht)(e[0]),(0,bs.Ht)(e[1])],o=[(0,bs.Ht)(i[0]),(0,bs.Ht)(i[1])];if(n==="GAODE2.x"){var u=Qf(t,o),c=[t[0],u[0],o[0]],v=[t[1],u[1],o[1]];return[ds(c,r),ds(v,r),0]}else{var E=Eu(t,o);if(Math.abs(E-Math.PI)<.001)return[(1-r)*t[0]+r*o[0],(1-r)*t[1]+r*o[1]];var G=Math.sin((1-r)*E)/Math.sin(E),ie=Math.sin(r*E)/Math.sin(E),xe=[Math.sin(t[0]),Math.sin(t[1])],Fe=[Math.cos(t[0]),Math.cos(t[1])],it=[Math.sin(o[0]),Math.sin(o[1])],gt=[Math.cos(o[0]),Math.cos(o[1])],Dt=G*Fe[1]*Fe[0]+ie*gt[1]*gt[0],ar=G*Fe[1]*xe[0]+ie*gt[1]*it[0],Mr=G*xe[1]+ie*it[1];return[(0,bs.vi)(Math.atan2(ar,Dt)),(0,bs.vi)(Math.atan2(Mr,Math.sqrt(Dt*Dt+ar*ar)))]}}function Fc(e,i){for(var r=0,n=[],t=0;tE){var Dt=it.p1,ar=it.p2,Mr=(E-it.lastTotalDistance)/it.distance,Zr=Yc(ar,Dt,Mr);G=Zr[0],ie=Zr[1];break}}return{lng:G,lat:ie,height:0}}function Yc(e,i,r){return[e[0]*r+i[0]*(1-r),e[1]*r+i[1]*(1-r)]}function xh(e,i){return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}function Lf(e,i){var r=i.featureId,n=e.data.dataArray;return typeof r=="number"&&(n=n.filter(function(t){var o=t.id;return o===r})),n.map(function(t){var o=wd(t,i);return(0,Me.Z)((0,Me.Z)({},t),o)})}function If(e,i){return new Promise(function(r){e.inited?r(Lf(e,i)):e.once("update",function(){r(Lf(e,i))})})}function wd(e,i){var r=i.offset,n=i.shape,t=i.thetaOffset,o=i.mapVersion,u=i.segmentNumber,c=u===void 0?30:u,v=i.autoFit,E=v===void 0?!0:v,G=e.coordinates;if(n==="line")return Fc(G,r);var ie=G[0],xe=G[1],Fe=typeof t=="string"?e[t]||0:t,it;switch(n){case"arc":it=Sl;break;case"greatcircle":it=kl;break;default:it=Sl}var gt=it(ie,xe,r,Fe,o,c,E),Dt=(0,wi.Z)(gt,3),ar=Dt[0],Mr=Dt[1],Zr=Dt[2];return{lng:ar,lat:Mr,height:Zr}}var _h=function(){function e(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:50,r=arguments.length>1?arguments[1]:void 0;(0,Je.Z)(this,e),this.limit=i,this.destroy=r||this.defaultDestroy,this.order=[],this.clear()}return(0,vt.Z)(e,[{key:"clear",value:function(){var r=this;this.order.forEach(function(n){r.delete(n)}),this.cache={},this.order=[]}},{key:"get",value:function(r){var n=this.cache[r];return n&&(this.deleteOrder(r),this.appendOrder(r)),n}},{key:"set",value:function(r,n){this.cache[r]?(this.delete(r),this.cache[r]=n,this.appendOrder(r)):(Object.keys(this.cache).length===this.limit&&this.delete(this.order[0]),this.cache[r]=n,this.appendOrder(r))}},{key:"delete",value:function(r){var n=this.cache[r];n&&(this.deleteCache(r),this.deleteOrder(r),this.destroy(n,r))}},{key:"deleteCache",value:function(r){delete this.cache[r]}},{key:"deleteOrder",value:function(r){var n=this.order.findIndex(function(t){return t===r});n>=0&&this.order.splice(n,1)}},{key:"appendOrder",value:function(r){this.order.push(r)}},{key:"defaultDestroy",value:function(r,n){return null}}]),e}();function Df(e){if(e.length===0)throw new Error("max requires at least one data point");for(var i=e[0],r=1;ri&&(i=e[r]);return i*1}function af(e){if(e.length===0)throw new Error("min requires at least one data point");for(var i=e[0],r=1;rn&&(n=t,r=i),t=1,i=e[o]):t++;return r*1}var Ls={min:af,max:Df,mean:Uf,sum:cd,mode:_u};function Af(e,i){return e.map(function(r){return r[i]})}function fd(e,i){return Ls[e](i)}var Qi=_(90304),Gr=_(7963),of=_(57168),Qr=_.n(of),is=_(39511),cf=_(40666),nf=_.n(cf),ic=function(e){return e.Realtime="realtime",e.Overlap="overlap",e.Replace="replace",e}({}),Ws=function(e){return e.Loading="Loading",e.Loaded="Loaded",e.Failure="Failure",e.Cancelled="Cancelled",e}({}),$u=0,ac=1,$l=2;function Fl(e){e.forEach(function(i){i.isCurrent&&(i.isVisible=i.isLoaded)})}function Oe(e){e.forEach(function(i){i.properties.state=$u}),e.forEach(function(i){i.isCurrent&&!dr(i)&&Wr(i)}),e.forEach(function(i){i.isVisible=!!(i.properties.state&$l)})}function Ft(e){e.forEach(function(r){r.properties.state=$u}),e.forEach(function(r){r.isCurrent&&dr(r)});var i=e.slice().sort(function(r,n){return r.z-n.z});i.forEach(function(r){r.isVisible=!!(r.properties.state&$l),r.children.length&&(r.isVisible||r.properties.state&ac)?r.children.forEach(function(n){n.properties.state=ac}):r.isCurrent&&Wr(r)})}function dr(e){for(;e;){if(e.isLoaded)return e.properties.state|=$l,!0;e=e.parent}return!1}function Wr(e){e.children.forEach(function(i){i.isLoaded?i.properties.state|=$l:Wr(i)})}var Jr,Gn=256,mi=[-1/0,-1/0,1/0,1/0],Vn=.2,Gi=5,Li=(Jr={},(0,St.Z)(Jr,ic.Realtime,Fl),(0,St.Z)(Jr,ic.Overlap,Oe),(0,St.Z)(Jr,ic.Replace,Ft),Jr),Xn=function(){};function Ca(e,i,r){var n=Math.floor((e+180)/360*Math.pow(2,r)),t=Math.floor((1-Math.log(Math.tan(i*Math.PI/180)+1/Math.cos(i*Math.PI/180))/Math.PI)/2*Math.pow(2,r));return[n,t]}function $a(e,i,r){var n=e/Math.pow(2,r)*360-180,t=Math.PI-2*Math.PI*i/Math.pow(2,r),o=180/Math.PI*Math.atan(.5*(Math.exp(t)-Math.exp(-t)));return[n,o]}var Ba=function(i,r,n){var t=$a(i,r,n),o=(0,wi.Z)(t,2),u=o[0],c=o[1],v=$a(i+1,r+1,n),E=(0,wi.Z)(v,2),G=E[0],ie=E[1];return[u,ie,G,c]};function ha(e){var i=e.zoom,r=e.latLonBounds,n=e.maxZoom,t=n===void 0?1/0:n,o=e.minZoom,u=o===void 0?0:o,c=e.zoomOffset,v=c===void 0?0:c,E=e.extent,G=E===void 0?mi:E,ie=Math.ceil(i)+v;if(Number.isFinite(u)&&iet&&(ie=t);for(var xe=(0,wi.Z)(r,4),Fe=xe[0],it=xe[1],gt=xe[2],Dt=xe[3],ar=[Math.max(Fe,G[0]),Math.max(it,G[1]),Math.min(gt,G[2]),Math.min(Dt,G[3])],Mr=[],Zr=Ca(ar[0],ar[1],ie),mn=(0,wi.Z)(Zr,2),zn=mn[0],Rn=mn[1],kn=Ca(ar[2],ar[3],ie),ui=(0,wi.Z)(kn,2),Di=ui[0],Aa=ui[1],Pa=zn;Pa<=Di;Pa++)for(var Lo=Aa;Lo<=Rn;Lo++)Mr.push({x:Pa,y:Lo,z:ie});var ns=(Di+zn)/2,ws=(Rn+Aa)/2,Pf=function(ld,Vp){return Math.abs(ld-ns)+Math.abs(Vp-ws)};return Mr.sort(function(ih,ld){return Pf(ih.x,ih.y)-Pf(ld.x,ld.y)}),Mr}var ba=function(i,r,n){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=Math.pow(2,n),u=o-1,c=o,v=i,E=r;return t&&(v<0?v=v+c:v>u&&(v=v%c)),{warpX:v,warpY:E}};function Ti(e){var i=Bi();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Bi(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var na=function(e){(0,Ce.Z)(r,e);var i=Ti(r);function r(n){var t;(0,Je.Z)(this,r),t=i.call(this),(0,St.Z)((0,Gr.Z)(t),"tileSize",256),(0,St.Z)((0,Gr.Z)(t),"isVisible",!1),(0,St.Z)((0,Gr.Z)(t),"isCurrent",!1),(0,St.Z)((0,Gr.Z)(t),"isVisibleChange",!1),(0,St.Z)((0,Gr.Z)(t),"loadedLayers",0),(0,St.Z)((0,Gr.Z)(t),"isLayerLoaded",!1),(0,St.Z)((0,Gr.Z)(t),"isLoad",!1),(0,St.Z)((0,Gr.Z)(t),"isChildLoad",!1),(0,St.Z)((0,Gr.Z)(t),"parent",null),(0,St.Z)((0,Gr.Z)(t),"children",[]),(0,St.Z)((0,Gr.Z)(t),"data",null),(0,St.Z)((0,Gr.Z)(t),"properties",{}),(0,St.Z)((0,Gr.Z)(t),"loadDataId",0);var o=n.x,u=n.y,c=n.z,v=n.tileSize,E=n.warp,G=E===void 0?!0:E;return t.x=o,t.y=u,t.z=c,t.warp=G||!0,t.tileSize=v,t}return(0,vt.Z)(r,[{key:"isLoading",get:function(){return this.loadStatus===Ws.Loading}},{key:"isLoaded",get:function(){return this.loadStatus===Ws.Loaded}},{key:"isFailure",get:function(){return this.loadStatus===Ws.Failure}},{key:"setTileLayerLoaded",value:function(){this.isLayerLoaded=!0}},{key:"isCancelled",get:function(){return this.loadStatus===Ws.Cancelled}},{key:"isDone",get:function(){return[Ws.Loaded,Ws.Cancelled,Ws.Failure].includes(this.loadStatus)}},{key:"bounds",get:function(){return Ba(this.x,this.y,this.z)}},{key:"bboxPolygon",get:function(){var t=(0,wi.Z)(this.bounds,4),o=t[0],u=t[1],c=t[2],v=t[3],E=[(c-o)/2,(v-u)/2],G=(0,is.Z)(this.bounds,{properties:{key:this.key,id:this.key,bbox:this.bounds,center:E,meta:` - `.concat(this.key,` - `)}});return G}},{key:"key",get:function(){var t="".concat(this.x,"_").concat(this.y,"_").concat(this.z);return t}},{key:"layerLoad",value:function(){this.loadedLayers++,this.emit("layerLoaded")}},{key:"loadData",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(u){var c,v,E,G,ie,xe,Fe,it,gt,Dt,ar,Mr,Zr,mn,zn,Rn,kn;return Qr().wrap(function(Di){for(;;)switch(Di.prev=Di.next){case 0:return c=u.getData,v=u.onLoad,E=u.onError,this.loadDataId++,G=this.loadDataId,this.isLoading&&this.abortLoad(),this.abortController=new AbortController,this.loadStatus=Ws.Loading,ie=null,Di.prev=7,Fe=this.x,it=this.y,gt=this.z,Dt=this.bounds,ar=this.tileSize,Mr=this.warp,Zr=ba(Fe,it,gt,Mr),mn=Zr.warpX,zn=Zr.warpY,Rn=this.abortController.signal,kn={x:mn,y:zn,z:gt,bounds:Dt,tileSize:ar,signal:Rn,warp:Mr},Di.next=14,c(kn,this);case 14:ie=Di.sent,Di.next=20;break;case 17:Di.prev=17,Di.t0=Di.catch(7),xe=Di.t0;case 20:if(G===this.loadDataId){Di.next=22;break}return Di.abrupt("return");case 22:if(!(this.isCancelled&&!ie)){Di.next=24;break}return Di.abrupt("return");case 24:if(!(xe||!ie)){Di.next=28;break}return this.loadStatus=Ws.Failure,E(xe,this),Di.abrupt("return");case 28:this.loadStatus=Ws.Loaded,this.data=ie,v(this);case 31:case"end":return Di.stop()}},o,this,[[7,17]])}));function t(o){return n.apply(this,arguments)}return t}()},{key:"reloadData",value:function(t){this.isLoading&&this.abortLoad(),this.loadData(t)}},{key:"abortLoad",value:function(){this.isLoaded||this.isCancelled||(this.loadStatus=Ws.Cancelled,this.abortController.abort(),this.xhrCancel&&this.xhrCancel())}}]),r}(cf.EventEmitter),Sa=function(i,r){var n=Gs(i),t=Xa(n,r),o=360*3-180,u=85.0511287798065,c=[Math.max(t[0][0],-o),Math.max(t[0][1],-u),Math.min(t[1][0],o),Math.min(t[1][1],u)];return c},Ko=function(i,r){var n=Gs(i),t=Gs(r),o=To(n,t);return o};function qo(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=gs(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function gs(e,i){if(e){if(typeof e=="string")return Da(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Da(e,i)}}function Da(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r=0&&ie.x0;){var v=t.shift();v.abortLoad()}}},{key:"getTileByLngLat",value:function(t,o,u){var c=this.options.zoomOffset,v=Math.ceil(u)+c,E=Ca(t,o,v),G=this.tiles.filter(function(ie){return ie.key==="".concat(E[0],"_").concat(E[1],"_").concat(v)});return G[0]}},{key:"getTileExtent",value:function(t,o){return this.getTileIndices(o,t)}},{key:"getTileByZXY",value:function(t,o,u){var c=this.tiles.filter(function(v){return v.key==="".concat(o,"_").concat(u,"_").concat(t)});return c[0]}},{key:"clear",value:function(){var t=qo(this.cacheTiles.values()),o;try{for(t.s();!(o=t.n()).done;){var u=o.value;u.isLoading?u.abortLoad():this.onTileUnload(u)}}catch(c){t.e(c)}finally{t.f()}this.lastViewStates=void 0,this.cacheTiles.clear(),this.currentTiles=[]}},{key:"destroy",value:function(){this.clear(),this.removeAllListeners()}},{key:"updateTileVisible",value:function(){var t=this.options.updateStrategy,o=new Map,u=qo(this.cacheTiles.values()),c;try{for(u.s();!(c=u.n()).done;){var v=c.value;o.set(v.key,v.isVisible),v.isCurrent=!1,v.isVisible=!1}}catch(it){u.e(it)}finally{u.f()}var E=qo(this.currentTiles),G;try{for(E.s();!(G=E.n()).done;){var ie=G.value;ie.isCurrent=!0,ie.isVisible=!0}}catch(it){E.e(it)}finally{E.f()}var xe=Array.from(this.cacheTiles.values());typeof t=="function"?t(xe):Li[t](xe);var Fe=!1;Array.from(this.cacheTiles.values()).forEach(function(it){it.isVisible!==o.get(it.key)?(it.isVisibleChange=!0,Fe=!0):it.isVisibleChange=!1}),Fe&&this.emit(eu.TileUpdate)}},{key:"getTileIndices",value:function(t,o){var u=this.options,c=u.tileSize,v=u.extent,E=u.zoomOffset,G=Math.floor(this.options.maxZoom),ie=Math.ceil(this.options.minZoom),xe=ha({maxZoom:G,minZoom:ie,zoomOffset:E,tileSize:c,zoom:t,latLonBounds:o,extent:v});return xe}},{key:"getTileId",value:function(t,o,u){var c="".concat(t,",").concat(o,",").concat(u);return c}},{key:"loadFinished",value:function(){var t=!this.currentTiles.some(function(o){return!o.isDone});return t&&this.emit(eu.TilesLoadFinished),t}},{key:"getTile",value:function(t,o,u){var c=this.getTileId(t,o,u),v=this.cacheTiles.get(c);return v}},{key:"createTile",value:function(t,o,u){var c=this.getTileId(t,o,u),v=new na({x:t,y:o,z:u,tileSize:this.options.tileSize,warp:this.options.warp});return this.cacheTiles.set(c,v),v.loadData({getData:this.options.getTileData,onLoad:this.onTileLoad,onError:this.onTileError}),v}},{key:"resizeCacheTiles",value:function(){var t=Gi*this.currentTiles.length,o=this.cacheTiles.size>t;if(o){var u=qo(this.cacheTiles),c;try{for(u.s();!(c=u.n()).done;){var v=(0,wi.Z)(c.value,2),E=v[0],G=v[1];if(!G.isVisible&&!this.currentTiles.includes(G)&&(this.cacheTiles.delete(E),this.onTileUnload(G)),this.cacheTiles.size<=t)break}}catch(ie){u.e(ie)}finally{u.f()}}this.rebuildTileTree()}},{key:"rebuildTileTree",value:function(){var t=qo(this.cacheTiles.values()),o;try{for(t.s();!(o=t.n()).done;){var u=o.value;u.parent=null,u.children.length=0}}catch(ie){t.e(ie)}finally{t.f()}var c=qo(this.cacheTiles.values()),v;try{for(c.s();!(v=c.n()).done;){var E=v.value,G=this.getNearestAncestor(E.x,E.y,E.z);E.parent=G,G!=null&&G.children&&G.children.push(E)}}catch(ie){c.e(ie)}finally{c.f()}}},{key:"getNearestAncestor",value:function(t,o,u){for(;u>this.options.minZoom;){t=Math.floor(t/2),o=Math.floor(o/2),u=u-1;var c=this.getTile(t,o,u);if(c)return c}return null}}]),r}(nf());function cu(e){return/(?=.*{box})(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(e)}function yu(e){var i=[],r=/\{([a-z])-([a-z])\}/.exec(e);if(r){var n=r[1].charCodeAt(0),t=r[2].charCodeAt(0),o;for(o=n;o<=t;++o)i.push(e.replace(r[0],String.fromCharCode(o)));return i}if(r=/\{(\d+)-(\d+)\}/.exec(e),r){for(var u=parseInt(r[2],10),c=parseInt(r[1],10);c<=u;c++)i.push(e.replace(r[0],c.toString()));return i}return i.push(e),i}function fu(e,i){if(!e||!e.length)throw new Error("url is not allowed to be empty");var r=i.x,n=i.y,t=i.z,o=yu(e),u=Math.abs(r+n)%o.length,c=Ia(o[u])?"".concat(o[u],"/{z}/{x}/{y}"):o[u];return c.replace(/\{x\}/g,r.toString()).replace(/\{y\}/g,n.toString()).replace(/\{z\}/g,t.toString()).replace(/\{bbox\}/g,Ba(r,n,t).join(",")).replace(/\{-y\}/g,(Math.pow(2,t)-n-1).toString())}function Gu(e,i){var r=i.x,n=i.y,t=i.z,o=i.layer,u=i.version,c=u===void 0?"1.0.0":u,v=i.style,E=v===void 0?"default":v,G=i.format,ie=i.service,xe=ie===void 0?"WMTS":ie,Fe=i.tileMatrixset,it=yu(e),gt=Math.abs(r+n)%it.length,Dt="".concat(it[gt],"&SERVICE=").concat(xe,"&REQUEST=GetTile&VERSION=").concat(c,"&LAYER=").concat(o,"&STYLE=").concat(E,"&TILEMATRIXSET=").concat(Fe,"&FORMAT=").concat(G,"&TILECOL=").concat(r,"&TILEROW=").concat(n,"&TILEMATRIX=").concat(t);return Dt}function h(e,i){if(!e)throw new Error(i||"web worker helper assertion failed.")}var m={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,document:typeof document!="undefined"&&document},F=m.self||m.window||{},H=m.window||m.self||{},ve=m.self||m.window||{},ot=m.document||{},kt=typeof importScripts=="function",J=typeof window!="undefined"&&typeof window.orientation!="undefined",f=function(){function e(i,r){var n=this;this.name=i,this.workerThread=r,this.isRunning=!0,this.resolve=function(){},this.reject=function(){},this.result=new Promise(function(t,o){n.resolve=t,n.reject=o})}return e.prototype.postMessage=function(i,r){this.workerThread.postMessage({source:"Main thread",type:i,payload:r})},e.prototype.done=function(i){h(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.resolve(i)},e.prototype.error=function(i){h(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.reject(i)},e}(),O=f,K=new Map;function q(e){h(e.source&&!e.url||!e.source&&e.url);var i=K.get(e.source||e.url);return i||(e.url&&(i=me(e.url),K.set(e.url,i)),e.source&&(i=je(e.source),K.set(e.source,i))),h(i),i}function me(e){if(!e.startsWith("http"))return e;var i=tt(e);return je(i)}function je(e){var i=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(i)}function tt(e){return`try { - importScripts('`+e+`'); -} catch (error) { - console.error(error); - throw error; -}`}function w(e,i,r){i===void 0&&(i=!0);var n=r||new Set;if(e){if(Gt(e))n.add(e);else if(Gt(e.buffer))n.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(i&&typeof e=="object")for(var t in e)w(e[t],i,n)}}return r===void 0?Array.from(n):[]}function Gt(e){return e?e instanceof ArrayBuffer||typeof MessagePort!="undefined"&&e instanceof MessagePort||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas:!1}var b=function(){},x=function(){function e(i){this.terminated=!1,this.loadableURL="";var r=i.name,n=i.source,t=i.url;h(n||t),this.name=r,this.source=n,this.url=t,this.onMessage=b,this.onError=function(o){return console.log(o)},this.worker=this.createBrowserWorker()}return e.isSupported=function(){return typeof Worker!="undefined"},e.prototype.destroy=function(){this.onMessage=b,this.onError=b,this.worker.terminate(),this.terminated=!0},Object.defineProperty(e.prototype,"isRunning",{get:function(){return!!this.onMessage},enumerable:!1,configurable:!0}),e.prototype.postMessage=function(i,r){r=r||w(i),this.worker.postMessage(i,r)},e.prototype.getErrorFromErrorEvent=function(i){var r="Failed to load ";return r+="worker "+this.name+" from "+this.url+". ",i.message&&(r+=i.message+" in "),i.lineno&&(r+=":"+i.lineno+":"+i.colno),new Error(r)},e.prototype.createBrowserWorker=function(){var i=this;this.loadableURL=q({source:this.source,url:this.url});var r=new Worker(this.loadableURL,{name:this.name});return r.onmessage=function(n){n.data?i.onMessage(n.data):i.onError(new Error("No data received"))},r.onerror=function(n){i.onError(i.getErrorFromErrorEvent(n)),i.terminated=!0},r.onmessageerror=function(n){return console.error("worker "+i.name+", message error: "+n)},r},e}(),S=x,Z=function(){return Z=Object.assign||function(e){for(var i,r=1,n=arguments.length;r0&&o[o.length-1])&&(E[0]===6||E[0]===2)){r=0;continue}if(E[0]===3&&(!o||E[1]>o[0]&&E[1]this.getMaxConcurrency();r?(i.destroy(),this.count--):this.idleQueue.push(i),this.isDestroyed||this.startQueuedJob()},e.prototype.getAvailableWorker=function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},Kt={maxConcurrency:3,maxMobileConcurrency:1,onDebug:function(){},reuseWorkers:!0},cr=function(){function e(i){this.workerPools=new Map,this.props=Ut({},Kt),this.setProps(i),this.workerPools=new Map}return e.isSupported=function(){return S.isSupported()},e.getWorkerFarm=function(i){return i===void 0&&(i={}),e.workerFarm=e.workerFarm||new e({}),e.workerFarm.setProps(i),e.workerFarm},e.prototype.destroy=function(){var i,r;try{for(var n=wt(this.workerPools.values()),t=n.next();!t.done;t=n.next()){var o=t.value;o.destroy()}}catch(u){i={error:u}}finally{try{t&&!t.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}},e.prototype.setProps=function(i){var r,n;this.props=Ut(Ut({},this.props),i);try{for(var t=wt(this.workerPools.values()),o=t.next();!o.done;o=t.next()){var u=o.value;u.setProps(this.getWorkerPoolProps())}}catch(c){r={error:c}}finally{try{o&&!o.done&&(n=t.return)&&n.call(t)}finally{if(r)throw r.error}}},e.prototype.getWorkerPool=function(i){var r=i.name,n=i.source,t=i.url,o=this.workerPools.get(r);return o||(o=new ct({name:r,source:n,url:t}),o.setProps(this.getWorkerPoolProps()),this.workerPools.set(r,o)),o},e.prototype.getWorkerPoolProps=function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}},e}(),hr=cr,Fr=new Map,Br=function(){function e(){}return Object.defineProperty(e,"onmessage",{set:function(i){self.onmessage=function(r){if(Xr(r)){var n=r.data,t=n.type,o=n.payload;i(t,o)}}},enumerable:!1,configurable:!0}),e.addEventListener=function(i){var r=Fr.get(i);r||(r=function(n){if(Xr(n)){var t=n.data,o=t.type,u=t.payload;i(o,u)}}),self.addEventListener("message",r)},e.removeEventListener=function(i){var r=Fr.get(i);Fr.delete(i),self.removeEventListener("message",r)},e.postMessage=function(i,r){if(self){var n={source:"Worker thread",type:i,payload:r},t=w(r);self.postMessage(n,t)}},e}(),rn=null;function Xr(e){var i=e.type,r=e.data;return i==="message"&&r&&typeof r.source=="string"&&r.source==="Main thread"}function dn(e){return JSON.parse(Qt(e))}function Qt(e){var i=new Set;return JSON.stringify(e,function(r,n){if(typeof n=="object"&&n!==null){if(i.has(n))try{return JSON.parse(JSON.stringify(n))}catch(t){return}i.add(n)}return n})}function li(e){return""+e.name}function oi(e,i){i===void 0&&(i={});var r=i[e.id]||{},n=e.name+".worker.js",t=r.workerUrl;return i._workerType==="test"&&(t=e.module+"/dist/"+n),t||(t="https://unpkg.com/"+e.module+"/dist/"+n),assert(t),t}var pr=function(e,i,r,n){function t(o){return o instanceof r?o:new r(function(u){u(o)})}return new(r||(r=Promise))(function(o,u){function c(G){try{E(n.next(G))}catch(ie){u(ie)}}function v(G){try{E(n.throw(G))}catch(ie){u(ie)}}function E(G){G.done?o(G.value):t(G.value).then(c,v)}E((n=n.apply(e,i||[])).next())})},di=function(e,i){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,t,o,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(E){return function(G){return v([E,G])}}function v(E){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,t&&(o=E[0]&2?t.return:E[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,E[1])).done)return o;switch(t=0,o&&(E=[E[0]&2,o.value]),E[0]){case 0:case 1:o=E;break;case 4:return r.label++,{value:E[1],done:!1};case 5:r.label++,t=E[1],E=[0];continue;case 7:E=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(E[0]===6||E[0]===2)){r=0;continue}if(E[0]===3&&(!o||E[1]>o[0]&&E[1]0){if(this._values.length>0)throw new Error("Illegal internal state");var r=this._settlers.shift();i instanceof Error?r.reject(i):r.resolve({value:i})}else this._values.push(i)},e.prototype.close=function(){for(;this._settlers.length>0;){var i=this._settlers.shift();i.resolve({done:!0})}this._closed=!0},e.prototype.next=function(){var i=this;if(this._values.length>0){var r=this._values.shift();return r instanceof Error?Promise.reject(r):Promise.resolve({done:!1,value:r})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise(function(n,t){i._settlers.push({resolve:n,reject:t})})},e}(),tu=null,sn=function(e,i,r,n){function t(o){return o instanceof r?o:new r(function(u){u(o)})}return new(r||(r=Promise))(function(o,u){function c(G){try{E(n.next(G))}catch(ie){u(ie)}}function v(G){try{E(n.throw(G))}catch(ie){u(ie)}}function E(G){G.done?o(G.value):t(G.value).then(c,v)}E((n=n.apply(e,i||[])).next())})},bu=function(e,i){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,t,o,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(E){return function(G){return v([E,G])}}function v(E){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,t&&(o=E[0]&2?t.return:E[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,E[1])).done)return o;switch(t=0,o&&(E=[E[0]&2,o.value]),E[0]){case 0:case 1:o=E;break;case 4:return r.label++,{value:E[1],done:!1};case 5:r.label++,t=E[1],E=[0];continue;case 7:E=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(E[0]===6||E[0]===2)){r=0;continue}if(E[0]===3&&(!o||E[1]>o[0]&&E[1]0&&o[o.length-1])&&(E[0]===6||E[0]===2)){r=0;continue}if(E[0]===3&&(!o||E[1]>o[0]&&E[1]0&&(t=1/Math.sqrt(t)),e[0]=i[0]*t,e[1]=i[1]*t,e}function Ud(e,i){return e[0]*i[0]+e[1]*i[1]}function P0(e,i,r){var n=i[0]*r[1]-i[1]*r[0];return e[0]=e[1]=0,e[2]=n,e}function Dp(e,i,r,n){var t=i[0],o=i[1];return e[0]=t+n*(r[0]-t),e[1]=o+n*(r[1]-o),e}function kh(e,i){i=i||1;var r=glMatrix.RANDOM()*2*Math.PI;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e}function Zc(e,i,r){var n=i[0],t=i[1];return e[0]=r[0]*n+r[2]*t,e[1]=r[1]*n+r[3]*t,e}function dh(e,i,r){var n=i[0],t=i[1];return e[0]=r[0]*n+r[2]*t+r[4],e[1]=r[1]*n+r[3]*t+r[5],e}function rd(e,i,r){var n=i[0],t=i[1];return e[0]=r[0]*n+r[3]*t+r[6],e[1]=r[1]*n+r[4]*t+r[7],e}function $p(e,i,r){var n=i[0],t=i[1];return e[0]=r[0]*n+r[4]*t+r[12],e[1]=r[1]*n+r[5]*t+r[13],e}function k0(e,i,r,n){var t=i[0]-r[0],o=i[1]-r[1],u=Math.sin(n),c=Math.cos(n);return e[0]=t*c-o*u+r[0],e[1]=t*u+o*c+r[1],e}function H0(e,i){var r=e[0],n=e[1],t=i[0],o=i[1],u=Math.sqrt(r*r+n*n)*Math.sqrt(t*t+o*o),c=u&&(r*t+n*o)/u;return Math.acos(Math.min(Math.max(c,-1),1))}function _0(e){return e[0]=0,e[1]=0,e}function tm(e){return"vec2("+e[0]+", "+e[1]+")"}function Dc(e,i){return e[0]===i[0]&&e[1]===i[1]}function F0(e,i){var r=e[0],n=e[1],t=i[0],o=i[1];return Math.abs(r-t)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(t))&&Math.abs(n-o)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))}var I0=null,_d=kf,e0=null,R0=null,O0=null,Td=null,pp=null,B0=function(){var e=Wl();return function(i,r,n,t,o,u){var c,v;for(r||(r=2),n||(n=0),t?v=Math.min(t*r+n,i.length):v=i.length,c=n;c0&&arguments[0]!==void 0?arguments[0]:{};(0,Je.Z)(this,e),(0,St.Z)(this,"lastFlip",-1),(0,St.Z)(this,"miter",Jh(0,0)),(0,St.Z)(this,"started",!1),(0,St.Z)(this,"dash",!1),(0,St.Z)(this,"totalDistance",0),(0,St.Z)(this,"currentIndex",0),this.join=i.join||"miter",this.cap=i.cap||"butt",this.miterLimit=i.miterLimit||10,this.thickness=i.thickness||1,this.dash=i.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return(0,vt.Z)(e,[{key:"extrude_gaode2",value:function(r,n){var t=this.complex;if(r.length<=1)return t;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var o=r.length,u=t.startIndex,c=1;cthis.miterLimit&&(Lo=!0)}Lo?(Fe.push(this.normal[0],this.normal[1],0),Fe.push(Aa[0],Aa[1],0),xe.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Pa,o[2]|0),this.complex.indexes.push(this.currentIndex),xe.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness*Pa,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,ie.push.apply(ie,(0,Mn.Z)(this.lastFlip!==-Pa?[n,n+2,n+3]:[n+2,n+1,n+3])),ie.push(n+2,n+3,n+4),mp(Hp,t0),Qc(this.normal,Hp),Fe.push(this.normal[0],this.normal[1],0),xe.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Pa,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,G+=3):(this.extrusions(xe,Fe,o,Aa,Di,this.totalDistance),ie.push.apply(ie,(0,Mn.Z)(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),Pa=-1,Qc(this.normal,Aa),G+=2),this.lastFlip=Pa}else{if(mp(this.normal,Ed),it){var zn=Wl(),Rn=Wl();_d(Rn,Ed,this.normal),vc(zn,Ed,this.normal),Fe.push(Rn[0],Rn[1],0),Fe.push(zn[0],zn[1],0),xe.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),xe.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(xe,Fe,o,this.normal,this.thickness,this.totalDistance);ie.push.apply(ie,(0,Mn.Z)(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),G+=2}return G}},{key:"simpleSegment",value:function(r,n,t,o,u){var c=0,v=r.indices,E=r.positions,G=r.normals,ie=zc([o[0],o[1]]),xe=zc([t[0],t[1]]);bp(Ed,ie,xe);var Fe=0;if(this.dash&&(Fe=this.lineSegmentDistance(ie,xe),this.totalDistance+=Fe),this.normal||(this.normal=Wl(),mp(this.normal,Ed)),this.started||(this.started=!0,this.extrusions(E,G,t,this.normal,this.thickness,this.totalDistance-Fe)),v.push(n+0,n+1,n+2),!u)mp(this.normal,Ed),this.extrusions(E,G,o,this.normal,this.thickness,this.totalDistance),v.push.apply(v,(0,Mn.Z)(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),c+=2;else{var it=zc([u[0],u[1]]);W0(ie,it)&&vc(it,ie,td(it,kf(it,ie,xe))),bp(t0,it,ie);var gt=kp(zp,Wl(),Ed,t0,this.thickness),Dt=(0,wi.Z)(gt,2),ar=Dt[0],Mr=Dt[1],Zr=Ud(zp,this.normal)<0?-1:1;this.extrusions(E,G,o,Mr,ar,this.totalDistance),v.push.apply(v,(0,Mn.Z)(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),Zr=-1,Qc(this.normal,Mr),c+=2,this.lastFlip=Zr}return c}},{key:"segment",value:function(r,n,t,o,u){var c=0,v=r.indices,E=r.positions,G=r.normals,ie=this.cap==="square",xe=this.join==="bevel",Fe=zc([o[0],o[1]]),it=zc([t[0],t[1]]);bp(Ed,Fe,it);var gt=0;if(this.dash&&(gt=this.lineSegmentDistance(Fe,it),this.totalDistance+=gt),this.normal||(this.normal=Wl(),mp(this.normal,Ed)),!this.started)if(this.started=!0,ie){var Dt=Wl(),ar=Wl();vc(Dt,this.normal,Ed),vc(ar,this.normal,Ed),G.push(ar[0],ar[1],0),G.push(Dt[0],Dt[1],0),E.push(t[0],t[1],t[2]|0,this.totalDistance-gt,-this.thickness,t[2]|0),this.complex.indexes.push(this.currentIndex),E.push(t[0],t[1],t[2]|0,this.totalDistance-gt,this.thickness,t[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(E,G,t,this.normal,this.thickness,this.totalDistance-gt);if(v.push(n+0,n+1,n+2),u){var mn=zc([u[0],u[1]]);W0(Fe,mn)&&vc(mn,Fe,td(mn,kf(mn,Fe,it))),bp(t0,mn,Fe);var zn=kp(zp,Wl(),Ed,t0,this.thickness),Rn=(0,wi.Z)(zn,2),kn=Rn[0],ui=Rn[1],Di=Ud(zp,this.normal)<0?-1:1,Aa=xe;if(!Aa&&this.join==="miter"){var Pa=kn;Pa>this.miterLimit&&(Aa=!0)}Aa?(G.push(this.normal[0],this.normal[1],0),G.push(ui[0],ui[1],0),E.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Di,o[2]|0),this.complex.indexes.push(this.currentIndex),E.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness*Di,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,v.push.apply(v,(0,Mn.Z)(this.lastFlip!==-Di?[n,n+2,n+3]:[n+2,n+1,n+3])),v.push(n+2,n+3,n+4),mp(Hp,t0),Qc(this.normal,Hp),G.push(this.normal[0],this.normal[1],0),E.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Di,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,c+=3):(this.extrusions(E,G,o,ui,kn,this.totalDistance),v.push.apply(v,(0,Mn.Z)(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),Di=-1,Qc(this.normal,ui),c+=2),this.lastFlip=Di}else{if(mp(this.normal,Ed),ie){var Mr=Wl(),Zr=Wl();_d(Zr,Ed,this.normal),vc(Mr,Ed,this.normal),G.push(Zr[0],Zr[1],0),G.push(Mr[0],Mr[1],0),E.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),E.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(E,G,o,this.normal,this.thickness,this.totalDistance);v.push.apply(v,(0,Mn.Z)(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),c+=2}return c}},{key:"extrusions",value:function(r,n,t,o,u,c){n.push(o[0],o[1],0),n.push(o[0],o[1],0),r.push(t[0],t[1],t[2]|0,c,-u,t[2]|0),this.complex.indexes.push(this.currentIndex),r.push(t[0],t[1],t[2]|0,c,u,t[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(r,n){var t=n[0]-r[0],o=n[1]-r[1];return Math.sqrt(t*t+o*o)}}]),e}();function o0(e){var i=e.coordinates,r=e.originCoordinates,n=e.version,t=new E0({dash:!0,join:"bevel"});if(n==="GAODE2.x"){var o=i;Array.isArray(o[0][0])||(o=[i]);var u=r;Array.isArray(u[0][0])||(u=[r]);for(var c=0;c0}).forEach(function(ar,Mr){var Zr=Kp(ar[c]);(0,Rt.nG)(Zr,function(mn){var zn=(0,Ht.r7)(mn),Rn=(0,Me.Z)((0,Me.Z)({},ar),{},{_id:Mr,coordinates:zn});v.push(Rn)})}),{dataArray:v};for(var E=0;E>>0}function nd(e,i){return i===void 0?null:(0,bf.Z)(e.properties[i])*1==="number"?e.properties[i]*1:e.properties&&e.properties[i]?fm(e.properties[i]+"")%1000019:null}function j0(e,i){var r=[],n={};return e.features?(e.features=e.features.filter(function(t){var o=t.geometry;return t!=null&&o&&o.type&&o.coordinates&&o.coordinates.length>0}),e=Kp(e),e.features.length===0?{dataArray:[],featureKeys:n}:((0,Rt.nG)(e,function(t,o){var u=nd(t,i==null?void 0:i.featureId);u===null&&(u=o);var c=u,v=(0,Ht.r7)(t),E=(0,Me.Z)((0,Me.Z)({},t.properties),{},{coordinates:v,_id:c});r.push(E)}),{dataArray:r,featureKeys:n})):(e.features=[],{dataArray:[]})}function xp(e,i,r,n){for(var t=n,o=r-i>>1,u=r-i,c,v=e[i],E=e[i+1],G=e[r],ie=e[r+1],xe=i+3;xet)c=xe,t=Fe;else if(Fe===t){var it=Math.abs(xe-o);itn&&(c-i>3&&xp(e,i,c,n),e[c+2]=t,r-c>3&&xp(e,c,r,n))}function rm(e,i,r,n,t,o){var u=t-r,c=o-n;if(u!==0||c!==0){var v=((e-r)*u+(i-n)*c)/(u*u+c*c);v>1?(r=t,n=o):v>0&&(r+=u*v,n+=c*v)}return u=e-r,c=i-n,u*u+c*c}function X0(e,i,r,n){var t={id:typeof e=="undefined"?null:e,type:i,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Y0(t),t}function Y0(e){var i=e.geometry,r=e.type;if(r==="Point"||r==="MultiPoint"||r==="LineString")Nd(e,i);else if(r==="Polygon"||r==="MultiLineString")for(var n=0;n0&&(n?u+=(t*E-v*o)/2:u+=Math.sqrt(Math.pow(v-t,2)+Math.pow(E-o,2))),t=v,o=E}var G=i.length-3;i[2]=1,xp(i,0,G,r),i[G+2]=1,i.size=Math.abs(u),i.start=0,i.end=i.size}function Dn(e,i,r,n){for(var t=0;t1?1:r}function zo(e,i,r,n,t,o,u,c){if(r/=i,n/=i,o>=r&&u=n)return null;for(var v=[],E=0;E=r&&it=n)continue;var gt=[];if(xe==="Point"||xe==="MultiPoint")to(ie,gt,r,n,t);else if(xe==="LineString")Ha(ie,gt,r,n,t,!1,c.lineMetrics);else if(xe==="MultiLineString")ls(ie,gt,r,n,t,!1);else if(xe==="Polygon")ls(ie,gt,r,n,t,!0);else if(xe==="MultiPolygon")for(var Dt=0;Dt=r&&u<=n&&(i.push(e[o]),i.push(e[o+1]),i.push(e[o+2]))}}function Ha(e,i,r,n,t,o,u){for(var c=Cs(e),v=t===0?ru:nu,E=e.start,G,ie,xe=0;xer&&(ie=v(c,Fe,it,Dt,ar,r),u&&(c.start=E+G*ie)):Mr>n?Zr=r&&(ie=v(c,Fe,it,Dt,ar,r),mn=!0),Zr>n&&Mr<=n&&(ie=v(c,Fe,it,Dt,ar,n),mn=!0),!o&&mn&&(u&&(c.end=E+G*ie),i.push(c),c=Cs(e)),u&&(E+=G)}var zn=e.length-3;Fe=e[zn],it=e[zn+1],gt=e[zn+2],Mr=t===0?Fe:it,Mr>=r&&Mr<=n&&Su(c,Fe,it,gt),zn=c.length-3,o&&zn>=3&&(c[zn]!==c[0]||c[zn+1]!==c[1])&&Su(c,c[0],c[1],c[2]),c.length&&i.push(c)}function Cs(e){var i=[];return i.size=e.size,i.start=e.start,i.end=e.end,i}function ls(e,i,r,n,t,o){for(var u=0;uu.maxX&&(u.maxX=G),ie>u.maxY&&(u.maxY=ie)}return u}function el(e,i,r,n){var t=i.geometry,o=i.type,u=[];if(o==="Point"||o==="MultiPoint")for(var c=0;c0&&i.size<(t?u:n)){r.numPoints+=i.length/3;return}for(var c=[],v=0;vu)&&(r.numSimplified++,c.push(i[v]),c.push(i[v+1])),r.numPoints++;t&&bl(c,o),e.push(c)}function bl(e,i){for(var r=0,n=0,t=e.length,o=t-2;n0===i)for(n=0,t=e.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(i.promoteId&&i.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=u0(e,i);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",i.indexMaxZoom,i.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),n=xu(n,i),n.length&&this.splitTile(n,0,0,0),r&&(n.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)))}tl.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},tl.prototype.splitTile=function(e,i,r,n,t,o,u){for(var c=[e,i,r,n],v=this.options,E=v.debug;c.length;){n=c.pop(),r=c.pop(),i=c.pop(),e=c.pop();var G=1<1&&console.time("creation"),xe=this.tiles[ie]=lu(e,i,r,n,v),this.tileCoords.push({z:i,x:r,y:n}),E)){E>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",i,r,n,xe.numFeatures,xe.numPoints,xe.numSimplified),console.timeEnd("creation"));var Fe="z"+i;this.stats[Fe]=(this.stats[Fe]||0)+1,this.total++}if(xe.source=e,t){if(i===v.maxZoom||i===t)continue;var it=1<1&&console.time("clipping");var gt=.5*v.buffer/v.extent,Dt=.5-gt,ar=.5+gt,Mr=1+gt,Zr,mn,zn,Rn,kn,ui;Zr=mn=zn=Rn=null,kn=zo(e,G,r-gt,r+ar,0,xe.minX,xe.maxX,v),ui=zo(e,G,r+Dt,r+Mr,0,xe.minX,xe.maxX,v),e=null,kn&&(Zr=zo(kn,G,n-gt,n+ar,1,xe.minY,xe.maxY,v),mn=zo(kn,G,n+Dt,n+Mr,1,xe.minY,xe.maxY,v),kn=null),ui&&(zn=zo(ui,G,n-gt,n+ar,1,xe.minY,xe.maxY,v),Rn=zo(ui,G,n+Dt,n+Mr,1,xe.minY,xe.maxY,v),ui=null),E>1&&console.timeEnd("clipping"),c.push(Zr||[],i+1,r*2,n*2),c.push(mn||[],i+1,r*2,n*2+1),c.push(zn||[],i+1,r*2+1,n*2),c.push(Rn||[],i+1,r*2+1,n*2+1)}}},tl.prototype.getTile=function(e,i,r){var n=this.options,t=n.extent,o=n.debug;if(e<0||e>24)return null;var u=1<1&&console.log("drilling down to z%d-%d-%d",e,i,r);for(var v=e,E=i,G=r,ie;!ie&&v>0;)v--,E=Math.floor(E/2),G=Math.floor(G/2),ie=this.tiles[Ho(v,E,G)];return!ie||!ie.source?null:(o>1&&console.log("found parent tile z%d-%d-%d",v,E,G),o>1&&console.time("drilling down"),this.splitTile(ie.source,v,E,G,e,i,r),o>1&&console.timeEnd("drilling down"),this.tiles[c]?_a(this.tiles[c],t):null)};function Ho(e,i,r){return((1<0)switch(n[0]){case"band":try{e[t]=i[n[1]][r]}catch(o){console.warn("Raster Data err!"),e[t]=0}break;default:$d(n,i,r)}})}function ef(e){var i=(0,wi.Z)(e,3),r=i[0],n=i[1],t=n===void 0?-1:n,o=i[2],u=o===void 0?-1:o;if(r===void 0)return console.warn("Express err!"),["+",0,0];var c=r.replace(/\s+/g,"");return[c,t,u]}function th(e){var i=ef(e),r=i[0],n=i[1],t=i[2];return Array.isArray(n)&&(n=th(e[1])),Array.isArray(t)&&(t=th(e[2])),id(r,n,t)}var Xu={nd:{type:"operation",expression:["/",["-",["band",1],["band",0]],["+",["band",1],["band",0]]]},rgb:{type:"function",method:Pl}};function Pl(e,i){for(var r=e[0].rasterData,n=e[1].rasterData,t=e[2].rasterData,o=[],u=(i==null?void 0:i.countCut)||[2,98],c=(0,wi.Z)(u,2),v=c[0],E=c[1],G=(i==null?void 0:i.RMinMax)||mu(r,v,E),ie=(i==null?void 0:i.GMinMax)||mu(n,v,E),xe=(i==null?void 0:i.BMinMax)||mu(t,v,E),Fe=0;Fe"),IRendererService:Symbol.for("IRendererService"),IShaderModuleService:Symbol.for("IShaderModuleService"),IIconService:Symbol.for("IIconService"),IFontService:Symbol.for("IFontService"),IInteractionService:Symbol.for("IInteractionService"),IPickingService:Symbol.for("IPickingService"),IControlService:Symbol.for("IControlService"),IStyleAttributeService:Symbol.for("IStyleAttributeService"),ILayer:Symbol.for("ILayer"),ILayerPlugin:Symbol.for("ILayerPlugin"),INormalPass:Symbol.for("INormalPass"),IPostProcessor:Symbol.for("IPostProcessor"),IPostProcessingPass:Symbol.for("IPostProcessingPass"),IFactoryPostProcessingPass:Symbol.for("Factory"),IFactoryNormalPass:Symbol.for("Factory"),IMultiPassRenderer:Symbol.for("IMultiPassRenderer"),SceneID:Symbol.for("SceneID"),MapConfig:Symbol.for("MapConfig")},hi=_(52155),Ma=_.n(hi);function Ra(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ni(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function Ni(e,i){if(e){if(typeof e=="string")return ea(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ea(e,i)}}function ea(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);ro&&(Fe=0,xe++),c[gt]={x:Fe,y:ie+xe*Vi,width:Vi,height:Vi,advance:ar},Fe+=Vi}});var it=n+t*2;return{mapping:c,xOffset:Fe,yOffset:ie+xe*it,canvasHeight:B(ie+(xe+1)*it)}}function D(e,i,r){var n=0,t=0,o=0,u=[],c={},v=Ra(e),E;try{for(v.s();!(E=v.n()).done;){var G=E.value;if(!c[G.id]){var ie=G.size;n+ie+i>r&&(I(c,u,t),n=0,t=o+t+i,o=0,u=[]),u.push({icon:G,xOffset:n}),n=n+ie+i,o=Math.max(o,ie)}}}catch(Fe){v.e(Fe)}finally{v.f()}u.length>0&&I(c,u,t);var xe=B(o+t+i);return{mapping:c,canvasHeight:xe}}function I(e,i,r){var n=Ra(i),t;try{for(n.s();!(t=n.n()).done;){var o=t.value,u=o.icon,c=o.xOffset;e[u.id]=(0,Me.Z)((0,Me.Z)({},u),{},{x:c,y:r,image:u.image,width:u.width,height:u.height})}}catch(v){n.e(v)}finally{n.f()}}function B(e){return Math.pow(2,Math.ceil(Math.log2(e)))}var ee,fe;function Ae(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Le(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function Le(e,i){if(e){if(typeof e=="string")return Ve(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ve(e,i)}}function Ve(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r0?(r[0]=(c*u+G*n+v*o-E*t)*2/ie,r[1]=(v*u+G*t+E*n-c*o)*2/ie,r[2]=(E*u+G*o+c*t-v*n)*2/ie):(r[0]=(c*u+G*n+v*o-E*t)*2,r[1]=(v*u+G*t+E*n-c*o)*2,r[2]=(E*u+G*o+c*t-v*n)*2),g(e,i,r),e}function j(e,i){return e[0]=i[12],e[1]=i[13],e[2]=i[14],e}function ne(e,i){var r=i[0],n=i[1],t=i[2],o=i[4],u=i[5],c=i[6],v=i[8],E=i[9],G=i[10];return e[0]=Math.hypot(r,n,t),e[1]=Math.hypot(o,u,c),e[2]=Math.hypot(v,E,G),e}function ge(e,i){var r=new eh(3);ne(r,i);var n=1/r[0],t=1/r[1],o=1/r[2],u=i[0]*n,c=i[1]*t,v=i[2]*o,E=i[4]*n,G=i[5]*t,ie=i[6]*o,xe=i[8]*n,Fe=i[9]*t,it=i[10]*o,gt=u+G+it,Dt=0;return gt>0?(Dt=Math.sqrt(gt+1)*2,e[3]=.25*Dt,e[0]=(ie-Fe)/Dt,e[1]=(xe-v)/Dt,e[2]=(c-E)/Dt):u>G&&u>it?(Dt=Math.sqrt(1+u-G-it)*2,e[3]=(ie-Fe)/Dt,e[0]=.25*Dt,e[1]=(c+E)/Dt,e[2]=(xe+v)/Dt):G>it?(Dt=Math.sqrt(1+G-u-it)*2,e[3]=(xe-v)/Dt,e[0]=(c+E)/Dt,e[1]=.25*Dt,e[2]=(ie+Fe)/Dt):(Dt=Math.sqrt(1+it-u-G)*2,e[3]=(c-E)/Dt,e[0]=(xe+v)/Dt,e[1]=(ie+Fe)/Dt,e[2]=.25*Dt),e}function ze(e,i,r,n){var t=i[0],o=i[1],u=i[2],c=i[3],v=t+t,E=o+o,G=u+u,ie=t*v,xe=t*E,Fe=t*G,it=o*E,gt=o*G,Dt=u*G,ar=c*v,Mr=c*E,Zr=c*G,mn=n[0],zn=n[1],Rn=n[2];return e[0]=(1-(it+Dt))*mn,e[1]=(xe+Zr)*mn,e[2]=(Fe-Mr)*mn,e[3]=0,e[4]=(xe-Zr)*zn,e[5]=(1-(ie+Dt))*zn,e[6]=(gt+ar)*zn,e[7]=0,e[8]=(Fe+Mr)*Rn,e[9]=(gt-ar)*Rn,e[10]=(1-(ie+it))*Rn,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function ht(e,i,r,n,t){var o=i[0],u=i[1],c=i[2],v=i[3],E=o+o,G=u+u,ie=c+c,xe=o*E,Fe=o*G,it=o*ie,gt=u*G,Dt=u*ie,ar=c*ie,Mr=v*E,Zr=v*G,mn=v*ie,zn=n[0],Rn=n[1],kn=n[2],ui=t[0],Di=t[1],Aa=t[2],Pa=(1-(gt+ar))*zn,Lo=(Fe+mn)*zn,ns=(it-Zr)*zn,ws=(Fe-mn)*Rn,Pf=(1-(xe+ar))*Rn,ih=(Dt+Mr)*Rn,ld=(it+Zr)*kn,Vp=(Dt-Mr)*kn,Cd=(1-(xe+gt))*kn;return e[0]=Pa,e[1]=Lo,e[2]=ns,e[3]=0,e[4]=ws,e[5]=Pf,e[6]=ih,e[7]=0,e[8]=ld,e[9]=Vp,e[10]=Cd,e[11]=0,e[12]=r[0]+ui-(Pa*ui+ws*Di+ld*Aa),e[13]=r[1]+Di-(Lo*ui+Pf*Di+Vp*Aa),e[14]=r[2]+Aa-(ns*ui+ih*Di+Cd*Aa),e[15]=1,e}function zt(e,i){var r=i[0],n=i[1],t=i[2],o=i[3],u=r+r,c=n+n,v=t+t,E=r*u,G=n*u,ie=n*c,xe=t*u,Fe=t*c,it=t*v,gt=o*u,Dt=o*c,ar=o*v;return e[0]=1-ie-it,e[1]=G+ar,e[2]=xe-Dt,e[3]=0,e[4]=G-ar,e[5]=1-E-it,e[6]=Fe+gt,e[7]=0,e[8]=xe+Dt,e[9]=Fe-gt,e[10]=1-E-ie,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function qt(e,i,r,n,t,o,u){var c=1/(r-i),v=1/(t-n),E=1/(o-u);return e[0]=o*2*c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o*2*v,e[6]=0,e[7]=0,e[8]=(r+i)*c,e[9]=(t+n)*v,e[10]=(u+o)*E,e[11]=-1,e[12]=0,e[13]=0,e[14]=u*o*2*E,e[15]=0,e}function _r(e,i,r,n,t){var o=1/Math.tan(i/2),u;return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,t!=null&&t!==1/0?(u=1/(n-t),e[10]=(t+n)*u,e[14]=2*t*n*u):(e[10]=-1,e[14]=-2*n),e}var Rr=_r;function Kr(e,i,r,n,t){var o=1/Math.tan(i/2),u;return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,t!=null&&t!==1/0?(u=1/(n-t),e[10]=t*u,e[14]=t*n*u):(e[10]=-1,e[14]=-n),e}function qr(e,i,r,n){var t=Math.tan(i.upDegrees*Math.PI/180),o=Math.tan(i.downDegrees*Math.PI/180),u=Math.tan(i.leftDegrees*Math.PI/180),c=Math.tan(i.rightDegrees*Math.PI/180),v=2/(u+c),E=2/(t+o);return e[0]=v,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=E,e[6]=0,e[7]=0,e[8]=-((u-c)*v*.5),e[9]=(t-o)*E*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}function an(e,i,r,n,t,o,u){var c=1/(i-r),v=1/(n-t),E=1/(o-u);return e[0]=-2*c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*v,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*E,e[11]=0,e[12]=(i+r)*c,e[13]=(t+n)*v,e[14]=(u+o)*E,e[15]=1,e}var en=an;function Hr(e,i,r,n,t,o,u){var c=1/(i-r),v=1/(n-t),E=1/(o-u);return e[0]=-2*c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*v,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=E,e[11]=0,e[12]=(i+r)*c,e[13]=(t+n)*v,e[14]=o*E,e[15]=1,e}function Fn(e,i,r,n){var t,o,u,c,v,E,G,ie,xe,Fe,it=i[0],gt=i[1],Dt=i[2],ar=n[0],Mr=n[1],Zr=n[2],mn=r[0],zn=r[1],Rn=r[2];return Math.abs(it-mn)0&&(Fe=1/Math.sqrt(Fe),G*=Fe,ie*=Fe,xe*=Fe);var it=v*xe-E*ie,gt=E*G-c*xe,Dt=c*ie-v*G;return Fe=it*it+gt*gt+Dt*Dt,Fe>0&&(Fe=1/Math.sqrt(Fe),it*=Fe,gt*=Fe,Dt*=Fe),e[0]=it,e[1]=gt,e[2]=Dt,e[3]=0,e[4]=ie*Dt-xe*gt,e[5]=xe*it-G*Dt,e[6]=G*gt-ie*it,e[7]=0,e[8]=G,e[9]=ie,e[10]=xe,e[11]=0,e[12]=t,e[13]=o,e[14]=u,e[15]=1,e}function Mi(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function wa(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function za(e,i,r){return e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e[3]=i[3]+r[3],e[4]=i[4]+r[4],e[5]=i[5]+r[5],e[6]=i[6]+r[6],e[7]=i[7]+r[7],e[8]=i[8]+r[8],e[9]=i[9]+r[9],e[10]=i[10]+r[10],e[11]=i[11]+r[11],e[12]=i[12]+r[12],e[13]=i[13]+r[13],e[14]=i[14]+r[14],e[15]=i[15]+r[15],e}function oo(e,i,r){return e[0]=i[0]-r[0],e[1]=i[1]-r[1],e[2]=i[2]-r[2],e[3]=i[3]-r[3],e[4]=i[4]-r[4],e[5]=i[5]-r[5],e[6]=i[6]-r[6],e[7]=i[7]-r[7],e[8]=i[8]-r[8],e[9]=i[9]-r[9],e[10]=i[10]-r[10],e[11]=i[11]-r[11],e[12]=i[12]-r[12],e[13]=i[13]-r[13],e[14]=i[14]-r[14],e[15]=i[15]-r[15],e}function Ds(e,i,r){return e[0]=i[0]*r,e[1]=i[1]*r,e[2]=i[2]*r,e[3]=i[3]*r,e[4]=i[4]*r,e[5]=i[5]*r,e[6]=i[6]*r,e[7]=i[7]*r,e[8]=i[8]*r,e[9]=i[9]*r,e[10]=i[10]*r,e[11]=i[11]*r,e[12]=i[12]*r,e[13]=i[13]*r,e[14]=i[14]*r,e[15]=i[15]*r,e}function lo(e,i,r,n){return e[0]=i[0]+r[0]*n,e[1]=i[1]+r[1]*n,e[2]=i[2]+r[2]*n,e[3]=i[3]+r[3]*n,e[4]=i[4]+r[4]*n,e[5]=i[5]+r[5]*n,e[6]=i[6]+r[6]*n,e[7]=i[7]+r[7]*n,e[8]=i[8]+r[8]*n,e[9]=i[9]+r[9]*n,e[10]=i[10]+r[10]*n,e[11]=i[11]+r[11]*n,e[12]=i[12]+r[12]*n,e[13]=i[13]+r[13]*n,e[14]=i[14]+r[14]*n,e[15]=i[15]+r[15]*n,e}function cs(e,i){return e[0]===i[0]&&e[1]===i[1]&&e[2]===i[2]&&e[3]===i[3]&&e[4]===i[4]&&e[5]===i[5]&&e[6]===i[6]&&e[7]===i[7]&&e[8]===i[8]&&e[9]===i[9]&&e[10]===i[10]&&e[11]===i[11]&&e[12]===i[12]&&e[13]===i[13]&&e[14]===i[14]&&e[15]===i[15]}function as(e,i){var r=e[0],n=e[1],t=e[2],o=e[3],u=e[4],c=e[5],v=e[6],E=e[7],G=e[8],ie=e[9],xe=e[10],Fe=e[11],it=e[12],gt=e[13],Dt=e[14],ar=e[15],Mr=i[0],Zr=i[1],mn=i[2],zn=i[3],Rn=i[4],kn=i[5],ui=i[6],Di=i[7],Aa=i[8],Pa=i[9],Lo=i[10],ns=i[11],ws=i[12],Pf=i[13],ih=i[14],ld=i[15];return Math.abs(r-Mr)<=Dh*Math.max(1,Math.abs(r),Math.abs(Mr))&&Math.abs(n-Zr)<=Dh*Math.max(1,Math.abs(n),Math.abs(Zr))&&Math.abs(t-mn)<=Dh*Math.max(1,Math.abs(t),Math.abs(mn))&&Math.abs(o-zn)<=Dh*Math.max(1,Math.abs(o),Math.abs(zn))&&Math.abs(u-Rn)<=Dh*Math.max(1,Math.abs(u),Math.abs(Rn))&&Math.abs(c-kn)<=Dh*Math.max(1,Math.abs(c),Math.abs(kn))&&Math.abs(v-ui)<=Dh*Math.max(1,Math.abs(v),Math.abs(ui))&&Math.abs(E-Di)<=Dh*Math.max(1,Math.abs(E),Math.abs(Di))&&Math.abs(G-Aa)<=Dh*Math.max(1,Math.abs(G),Math.abs(Aa))&&Math.abs(ie-Pa)<=Dh*Math.max(1,Math.abs(ie),Math.abs(Pa))&&Math.abs(xe-Lo)<=Dh*Math.max(1,Math.abs(xe),Math.abs(Lo))&&Math.abs(Fe-ns)<=Dh*Math.max(1,Math.abs(Fe),Math.abs(ns))&&Math.abs(it-ws)<=Dh*Math.max(1,Math.abs(it),Math.abs(ws))&&Math.abs(gt-Pf)<=Dh*Math.max(1,Math.abs(gt),Math.abs(Pf))&&Math.abs(Dt-ih)<=Dh*Math.max(1,Math.abs(Dt),Math.abs(ih))&&Math.abs(ar-ld)<=Dh*Math.max(1,Math.abs(ar),Math.abs(ld))}var $s=od,ps=oo,fs,Ks,Ou=(fs=(0,bo.b2)(),fs(Ks=function(){function e(){(0,Je.Z)(this,e),(0,St.Z)(this,"viewport",void 0),(0,St.Z)(this,"overridedViewProjectionMatrix",void 0),(0,St.Z)(this,"jitteredViewProjectionMatrix",void 0),(0,St.Z)(this,"jitteredProjectionMatrix",void 0),(0,St.Z)(this,"viewMatrixInverse",void 0),(0,St.Z)(this,"cameraPosition",void 0)}return(0,vt.Z)(e,[{key:"init",value:function(){}},{key:"update",value:function(r){this.viewport=r,this.viewMatrixInverse=Nf(),V0(this.viewMatrixInverse,r.getViewMatrix()),this.cameraPosition=[this.viewMatrixInverse[12],this.viewMatrixInverse[13],this.viewMatrixInverse[14]]}},{key:"getProjectionMatrix",value:function(){return this.jitteredProjectionMatrix||this.viewport.getProjectionMatrix()}},{key:"getModelMatrix",value:function(){return this.viewport.getModelMatrix()}},{key:"getViewMatrix",value:function(){return this.viewport.getViewMatrix()}},{key:"getViewMatrixUncentered",value:function(){return this.viewport.getViewMatrixUncentered()}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewport.getViewProjectionMatrixUncentered()}},{key:"getViewProjectionMatrix",value:function(){return this.overridedViewProjectionMatrix||this.jitteredViewProjectionMatrix||this.viewport.getViewProjectionMatrix()}},{key:"getZoom",value:function(){return this.viewport.getZoom()}},{key:"getZoomScale",value:function(){return this.viewport.getZoomScale()}},{key:"getCenter",value:function(){var r=this.viewport.getCenter(),n=(0,wi.Z)(r,2),t=n[0],o=n[1];return[t,o]}},{key:"getFocalDistance",value:function(){return this.viewport.getFocalDistance()}},{key:"getCameraPosition",value:function(){return this.cameraPosition}},{key:"projectFlat",value:function(r,n){return this.viewport.projectFlat(r,n)}},{key:"setViewProjectionMatrix",value:function(r){this.overridedViewProjectionMatrix=r}},{key:"jitterProjectionMatrix",value:function(r,n){var t=Bd(Nf(),[r,n,0]);this.jitteredProjectionMatrix=od(Nf(),t,this.viewport.getProjectionMatrix()),this.jitteredViewProjectionMatrix=od(Nf(),this.jitteredProjectionMatrix,this.viewport.getViewMatrix())}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0,this.jitteredViewProjectionMatrix=void 0}}]),e}())||Ks),wl=function(e){return e.TOPRIGHT="topright",e.TOPLEFT="topleft",e.BOTTOMRIGHT="bottomright",e.BOTTOMLEFT="bottomleft",e.TOPCENTER="topcenter",e.BOTTOMCENTER="bottomcenter",e.LEFTCENTER="leftcenter",e.RIGHTCENTER="rightcenter",e.LEFTTOP="lefttop",e.RIGHTTOP="righttop",e.LEFTBOTTOM="leftbottom",e.RIGHTBOTTOM="rightbottom",e}({}),wo,Zs;function Cl(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Gf(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function Gf(e,i){if(e){if(typeof e=="string")return ec(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ec(e,i)}}function ec(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r-1&&this.controls.splice(n,1),r.remove(),this}},{key:"addControls",value:function(){var r=this;this.unAddControls.forEach(function(n){n.addTo(r.scene),r.controls.push(n)}),this.unAddControls=[]}},{key:"destroy",value:function(){var r=Cl(this.controls),n;try{for(r.s();!(n=r.n()).done;){var t=n.value;t.remove()}}catch(o){r.e(o)}finally{r.f()}this.controls=[],this.clearControlPos()}},{key:"initControlPos",value:function(){var r=this.controlCorners={},n="l7-",t=this.controlContainer=aa("div",n+"control-container",this.container);function o(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=c.map(function(E){return n+E}).join(" ");r[c.filter(function(E){return!["row","column"].includes(E)}).join("")]=aa("div",v,t)}function u(c){var v=c.replace(/^(top|bottom|left|right|center)/,"$1-").split("-");return[].concat((0,Mn.Z)(v),[gc[c]])}Object.values(wl).forEach(function(c){o(u(c))}),this.checkCornerOverlap()}},{key:"clearControlPos",value:function(){for(var r in this.controlCorners)this.controlCorners[r]&&ho(this.controlCorners[r]);this.controlContainer&&ho(this.controlContainer)}},{key:"checkCornerOverlap",value:function(){var r=this,n=window.MutationObserver;if(n)for(var t=function(){var v=u[o],E=v.match(/^(top|bottom)(left|right)$/);if(E){var G=(0,wi.Z)(E,3),ie=G[1],xe=G[2],Fe=r.controlCorners["".concat(ie).concat(xe)],it=new n(function(gt){var Dt=(0,wi.Z)(gt,1),ar=Dt[0].target;Fe&&(Fe.style[ie]=ar.clientHeight+"px")});it.observe(r.controlCorners["".concat(xe).concat(ie)],{childList:!0,attributes:!0})}},o=0,u=Object.keys(this.controlCorners);o-1&&this.markerLayers.splice(n,1)}},{key:"addMarker",value:function(r){this.mapsService.map&&this.mapsService.getMarkerContainer()?(this.markers.push(r),r.addTo(this.scene)):this.unAddMarkers.push(r)}},{key:"addMarkers",value:function(){var r=this;this.unAddMarkers.forEach(function(n){n.addTo(r.scene),r.markers.push(n)}),this.unAddMarkers=[]}},{key:"addMarkerLayers",value:function(){var r=this;this.unAddMarkerLayers.forEach(function(n){r.markerLayers.push(n),n.addTo(r.scene)}),this.unAddMarkers=[]}},{key:"removeMarker",value:function(r){r.remove(),this.markers.indexOf(r);var n=this.markers.indexOf(r);n>-1&&this.markers.splice(n,1)}},{key:"removeAllMarkers",value:function(){this.destroy()}},{key:"init",value:function(r){this.scene=r,this.mapsService=r.get(vr.IMapService)}},{key:"destroy",value:function(){this.markers.forEach(function(r){r.remove()}),this.markers=[],this.markerLayers.forEach(function(r){r.destroy()}),this.markerLayers=[]}},{key:"removeMakerLayerMarker",value:function(r){r.destroy()}}]),e}())||oh),ph,mh,rh=(ph=(0,bo.b2)(),ph(mh=function(){function e(){(0,Je.Z)(this,e),(0,St.Z)(this,"scene",void 0),(0,St.Z)(this,"mapsService",void 0),(0,St.Z)(this,"popups",[]),(0,St.Z)(this,"unAddPopups",[])}return(0,vt.Z)(e,[{key:"isMarkerReady",get:function(){return this.mapsService.map&&this.mapsService.getMarkerContainer()}},{key:"removePopup",value:function(r){r!=null&&r.isOpen()&&r.remove();var n=this.popups.indexOf(r);n>-1&&this.popups.splice(n,1);var t=this.unAddPopups.indexOf(r);t>-1&&this.unAddPopups.splice(t,1)}},{key:"destroy",value:function(){this.popups.forEach(function(r){return r.remove()})}},{key:"addPopup",value:function(r){var n=this;r&&r.getOptions().autoClose&&[].concat((0,Mn.Z)(this.popups),(0,Mn.Z)(this.unAddPopups)).forEach(function(t){t.getOptions().autoClose&&n.removePopup(t)}),this.isMarkerReady?(r.addTo(this.scene),this.popups.push(r)):this.unAddPopups.push(r),r.on("close",function(){n.removePopup(r)})}},{key:"initPopup",value:function(){var r=this;this.unAddPopups.length&&this.unAddPopups.forEach(function(n){r.addPopup(n),r.unAddPopups=[]})}},{key:"init",value:function(r){this.scene=r,this.mapsService=r.get(vr.IMapService)}}]),e}())||mh),xf=function(e){return e.normal="normal",e.additive="additive",e.subtractive="subtractive",e.min="min",e.max="max",e.none="none",e}({}),pc=function(e){return e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e}({}),sf=function(e){return e.AND="and",e.OR="or",e}({}),Kl=function(e){return e.INIT="init",e.UPDATE="update",e}({}),Hc={MapToken:"\u60A8\u6B63\u5728\u4F7F\u7528 Demo \u6D4B\u8BD5 Token, \u751F\u4EA7\u73AF\u5883\u52A1\u5FC5\u81EA\u884C\u6CE8\u518C Token \u786E\u4FDD\u670D\u52A1\u7A33\u5B9A \u9AD8\u5FB7\u5730\u56FE\u7533\u8BF7\u5730\u5740 https://lbs.amap.com/api/javascript-api/guide/abc/prepare Mapbox\u5730\u56FE\u7533\u8BF7\u5730\u5740 https://docs.mapbox.com/help/glossary/access-token/",SDK:"\u8BF7\u786E\u8BA4\u5F15\u5165\u4E86mapbox-gl api\u4E14\u5728L7\u4E4B\u524D\u5F15\u5165"},Vh=Hc,Ad,Oo,Pc=vi.merge,Nc={id:"map",logoPosition:"bottomleft",logoVisible:!0,antialias:!0,stencil:!0,preserveDrawingBuffer:!1,pickBufferScale:1,fitBoundsOptions:{animate:!1}},mc={colors:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(247,247,247)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)","rgb(5,48,97)"],size:10,shape:"circle",scales:{},shape2d:["circle","triangle","square","pentagon","hexagon","octogon","hexagram","rhombus","vesica"],shape3d:["cylinder","triangleColumn","hexagonColumn","squareColumn"],minZoom:-1,maxZoom:24,visible:!0,autoFit:!1,pickingBuffer:0,enablePropagation:!1,zIndex:0,blend:"normal",maskLayers:[],enableMask:!0,maskOperation:sf.AND,pickedFeatureID:-1,enableMultiPassRenderer:!1,enablePicking:!0,active:!1,activeColor:"#2f54eb",enableHighlight:!1,enableSelect:!1,highlightColor:"#2f54eb",activeMix:0,selectColor:"blue",selectMix:0,enableTAA:!1,jitterScale:1,enableLighting:!1,animateOption:{enable:!1,interval:.2,duration:4,trailLength:.15},forward:!0},sh=(Ad=(0,bo.b2)(),Ad(Oo=function(){function e(){(0,Je.Z)(this,e),(0,St.Z)(this,"sceneConfigCache",{}),(0,St.Z)(this,"layerConfigCache",{}),(0,St.Z)(this,"layerAttributeConfigCache",{})}return(0,vt.Z)(e,[{key:"getSceneConfig",value:function(r){return this.sceneConfigCache[r]}},{key:"getSceneWarninfo",value:function(r){return Vh[r]}},{key:"setSceneConfig",value:function(r,n){this.sceneConfigCache[r]=(0,Me.Z)((0,Me.Z)({},Nc),n)}},{key:"getLayerConfig",value:function(r){return this.layerConfigCache[r]}},{key:"setLayerConfig",value:function(r,n,t){this.layerConfigCache[n]=(0,Me.Z)({},Pc({},this.sceneConfigCache[r],mc,t))}},{key:"getAttributeConfig",value:function(r){return this.layerAttributeConfigCache[r]}},{key:"setAttributeConfig",value:function(r,n){this.layerAttributeConfigCache[r]=(0,Me.Z)((0,Me.Z)({},this.layerAttributeConfigCache[r]),n)}},{key:"clean",value:function(){this.sceneConfigCache={},this.layerConfigCache={}}}]),e}())||Oo);function A(e,i,r,n){r&&Object.defineProperty(e,i,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function p(e,i,r,n,t){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,c){return c(e,i,u)||u},o),t&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(t):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,i,o),o=null),o}function C(){var e=new eh(4);return eh!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function W(e){var i=new glMatrix.ARRAY_TYPE(4);return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i}function pe(e,i,r,n){var t=new eh(4);return t[0]=e,t[1]=i,t[2]=r,t[3]=n,t}function Te(e,i){return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e}function De(e,i,r,n,t){return e[0]=i,e[1]=r,e[2]=n,e[3]=t,e}function dt(e,i,r){return e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e[3]=i[3]+r[3],e}function Ot(e,i,r){return e[0]=i[0]-r[0],e[1]=i[1]-r[1],e[2]=i[2]-r[2],e[3]=i[3]-r[3],e}function nr(e,i,r){return e[0]=i[0]*r[0],e[1]=i[1]*r[1],e[2]=i[2]*r[2],e[3]=i[3]*r[3],e}function Pr(e,i,r){return e[0]=i[0]/r[0],e[1]=i[1]/r[1],e[2]=i[2]/r[2],e[3]=i[3]/r[3],e}function kr(e,i){return e[0]=Math.ceil(i[0]),e[1]=Math.ceil(i[1]),e[2]=Math.ceil(i[2]),e[3]=Math.ceil(i[3]),e}function U(e,i){return e[0]=Math.floor(i[0]),e[1]=Math.floor(i[1]),e[2]=Math.floor(i[2]),e[3]=Math.floor(i[3]),e}function z(e,i,r){return e[0]=Math.min(i[0],r[0]),e[1]=Math.min(i[1],r[1]),e[2]=Math.min(i[2],r[2]),e[3]=Math.min(i[3],r[3]),e}function te(e,i,r){return e[0]=Math.max(i[0],r[0]),e[1]=Math.max(i[1],r[1]),e[2]=Math.max(i[2],r[2]),e[3]=Math.max(i[3],r[3]),e}function Re(e,i){return e[0]=Math.round(i[0]),e[1]=Math.round(i[1]),e[2]=Math.round(i[2]),e[3]=Math.round(i[3]),e}function Lt(e,i,r){return e[0]=i[0]*r,e[1]=i[1]*r,e[2]=i[2]*r,e[3]=i[3]*r,e}function or(e,i,r,n){return e[0]=i[0]+r[0]*n,e[1]=i[1]+r[1]*n,e[2]=i[2]+r[2]*n,e[3]=i[3]+r[3]*n,e}function Lr(e,i){var r=i[0]-e[0],n=i[1]-e[1],t=i[2]-e[2],o=i[3]-e[3];return Math.hypot(r,n,t,o)}function Ur(e,i){var r=i[0]-e[0],n=i[1]-e[1],t=i[2]-e[2],o=i[3]-e[3];return r*r+n*n+t*t+o*o}function cn(e){var i=e[0],r=e[1],n=e[2],t=e[3];return Math.hypot(i,r,n,t)}function $n(e){var i=e[0],r=e[1],n=e[2],t=e[3];return i*i+r*r+n*n+t*t}function Ai(e,i){return e[0]=-i[0],e[1]=-i[1],e[2]=-i[2],e[3]=-i[3],e}function Qo(e,i){return e[0]=1/i[0],e[1]=1/i[1],e[2]=1/i[2],e[3]=1/i[3],e}function Go(e,i){var r=i[0],n=i[1],t=i[2],o=i[3],u=r*r+n*n+t*t+o*o;return u>0&&(u=1/Math.sqrt(u)),e[0]=r*u,e[1]=n*u,e[2]=t*u,e[3]=o*u,e}function xo(e,i){return e[0]*i[0]+e[1]*i[1]+e[2]*i[2]+e[3]*i[3]}function Wo(e,i,r,n){var t=r[0]*n[1]-r[1]*n[0],o=r[0]*n[2]-r[2]*n[0],u=r[0]*n[3]-r[3]*n[0],c=r[1]*n[2]-r[2]*n[1],v=r[1]*n[3]-r[3]*n[1],E=r[2]*n[3]-r[3]*n[2],G=i[0],ie=i[1],xe=i[2],Fe=i[3];return e[0]=ie*E-xe*v+Fe*c,e[1]=-(G*E)+xe*u-Fe*o,e[2]=G*v-ie*u+Fe*t,e[3]=-(G*c)+ie*o-xe*t,e}function hs(e,i,r,n){var t=i[0],o=i[1],u=i[2],c=i[3];return e[0]=t+n*(r[0]-t),e[1]=o+n*(r[1]-o),e[2]=u+n*(r[2]-u),e[3]=c+n*(r[3]-c),e}function ms(e,i){i=i||1;var r,n,t,o,u,c;do r=glMatrix.RANDOM()*2-1,n=glMatrix.RANDOM()*2-1,u=r*r+n*n;while(u>=1);do t=glMatrix.RANDOM()*2-1,o=glMatrix.RANDOM()*2-1,c=t*t+o*o;while(c>=1);var v=Math.sqrt((1-u)/c);return e[0]=i*r,e[1]=i*n,e[2]=i*t*v,e[3]=i*o*v,e}function Xo(e,i,r){var n=i[0],t=i[1],o=i[2],u=i[3];return e[0]=r[0]*n+r[4]*t+r[8]*o+r[12]*u,e[1]=r[1]*n+r[5]*t+r[9]*o+r[13]*u,e[2]=r[2]*n+r[6]*t+r[10]*o+r[14]*u,e[3]=r[3]*n+r[7]*t+r[11]*o+r[15]*u,e}function ys(e,i,r){var n=i[0],t=i[1],o=i[2],u=r[0],c=r[1],v=r[2],E=r[3],G=E*n+c*o-v*t,ie=E*t+v*n-u*o,xe=E*o+u*t-c*n,Fe=-u*n-c*t-v*o;return e[0]=G*E+Fe*-u+ie*-v-xe*-c,e[1]=ie*E+Fe*-c+xe*-u-G*-v,e[2]=xe*E+Fe*-v+G*-c-ie*-u,e[3]=i[3],e}function gl(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function Bu(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function Gc(e,i){return e[0]===i[0]&&e[1]===i[1]&&e[2]===i[2]&&e[3]===i[3]}function uh(e,i){var r=e[0],n=e[1],t=e[2],o=e[3],u=i[0],c=i[1],v=i[2],E=i[3];return Math.abs(r-u)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-c)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(t-v)<=glMatrix.EPSILON*Math.max(1,Math.abs(t),Math.abs(v))&&Math.abs(o-E)<=glMatrix.EPSILON*Math.max(1,Math.abs(o),Math.abs(E))}var Ef=null,lh=null,gp=null,Hd=null,fp=null,yp=null,Ip=null,l0=function(){var e=C();return function(i,r,n,t,o,u){var c,v;for(r||(r=4),n||(n=0),t?v=Math.min(t*r+n,i.length):v=i.length,c=n;c0){var v=c.changedTouches[0];n.onHover({clientX:v.clientX,clientY:v.clientY,type:"touchend"})}}),(0,St.Z)((0,Gr.Z)(n),"onTouchMove",function(c){var v=c.changedTouches[0];n.onHover({clientX:v.clientX,clientY:v.clientY,type:"touchmove"})}),(0,St.Z)((0,Gr.Z)(n),"onHover",function(c){var v=c.clientX,E=c.clientY,G=v,ie=E,xe=c.type,Fe=n.mapService.getMapContainer();if(Fe){var it=Fe.getBoundingClientRect(),gt=it.top,Dt=it.left;G=G-Dt-Fe.clientLeft,ie=ie-gt-Fe.clientTop}var ar=n.mapService.containerToLngLat([G,ie]);if(xe==="click"){n.isDoubleTap(G,ie,ar);return}if(xe==="touch"){n.isDoubleTap(G,ie,ar);return}xe!=="click"&&xe!=="dblclick"&&n.emit(nl.Hover,{x:G,y:ie,lngLat:ar,type:xe,target:c})}),n}return(0,vt.Z)(r,[{key:"init",value:function(){this.addEventListenerOnMap(),this.$containter=this.mapService.getMapContainer()}},{key:"destroy",value:function(){this.hammertime&&this.hammertime.destroy(),this.removeEventListenerOnMap(),this.off(nl.Hover)}},{key:"triggerHover",value:function(t){var o=t.x,u=t.y;this.emit(nl.Hover,{x:o,y:u})}},{key:"triggerSelect",value:function(t){this.emit(nl.Select,{featureId:t})}},{key:"triggerActive",value:function(t){this.emit(nl.Active,{featureId:t})}},{key:"addEventListenerOnMap",value:function(){var t=this.mapService.getMapContainer();if(t){var o=new(du()).Manager(t);o.add(new(du()).Tap({event:"dblclick",taps:2})),o.add(new(du()).Tap({event:"click"})),o.add(new(du()).Pan({threshold:0,pointers:0})),o.add(new(du()).Press({})),o.on("dblclick click",this.onHammer),o.on("panstart panmove panend pancancel",this.onDrag),t.addEventListener("touchstart",this.onTouch),t.addEventListener("touchend",this.onTouchEnd),t.addEventListener("touchmove",this.onTouchMove),t.addEventListener("mousedown",this.onHover,!0),t.addEventListener("mouseup",this.onHover),t.addEventListener("contextmenu",this.onHover),this.hammertime=o}}},{key:"removeEventListenerOnMap",value:function(){var t=this.mapService.getMapContainer();t&&(t.removeEventListener("mousemove",this.onHover),this.hammertime.off("dblclick click",this.onHammer),this.hammertime.off("panstart panmove panend pancancel",this.onDrag),t.removeEventListener("touchstart",this.onTouch),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("mousedown",this.onHover),t.removeEventListener("mouseup",this.onHover),t.removeEventListener("contextmenu",this.onHover))}},{key:"interactionEvent",value:function(t){var o=t.type,u=t.pointerType,c,v;u==="touch"?(v=Math.floor(t.pointers[0].clientY),c=Math.floor(t.pointers[0].clientX)):(v=Math.floor(t.srcEvent.y),c=Math.floor(t.srcEvent.x));var E=this.mapService.getMapContainer();if(E){var G=E.getBoundingClientRect(),ie=G.top,xe=G.left;c-=xe,v-=ie}var Fe=this.mapService.containerToLngLat([c,v]);return{x:c,y:v,lngLat:Fe,type:o,target:t.srcEvent}}},{key:"isDoubleTap",value:function(t,o,u){var c=this,v=new Date().getTime(),E="click";v-this.lastClickTime<400&&Math.abs(this.lastClickXY[0]-t)<10&&Math.abs(this.lastClickXY[1]-o)<10?(this.lastClickTime=0,this.lastClickXY=[-1,-1],this.clickTimer&&clearTimeout(this.clickTimer),E="dblclick",this.emit(nl.Hover,{x:t,y:o,lngLat:u,type:E})):(this.lastClickTime=v,this.lastClickXY=[t,o],this.clickTimer=setTimeout(function(){E="click",c.emit(nl.Hover,{x:t,y:o,lngLat:u,type:E})},400))}}]),r}(nf()),gf=p(Wf.prototype,"mapService",[sc],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Wf))||Sf),wf=0;function $h(e){var i=e;if(typeof e=="string"&&(i=document.getElementById(e)),i){var r=document.createElement("div");return r.style.cssText+=` - position: absolute; - z-index:2; - height: 100%; - width: 100%; - pointer-events: none; - `,r.id="l7-scene-".concat(wf++),r.classList.add("l7-scene"),i.appendChild(r),r}return null}function fh(e){var i,r=!0;if((e==null||(i=e.target)===null||i===void 0?void 0:i.target)instanceof HTMLElement)for(var n,t=e==null||(n=e.target)===null||n===void 0?void 0:n.target;t;){var o,u=Array.from(t.classList);if(u.includes("l7-marker")||u.includes("l7-popup")){r=!1;break}t=(o=t)===null||o===void 0?void 0:o.parentElement}return r}var Oh=function(e){return e[e.SAMPLED=0]="SAMPLED",e[e.RENDER_TARGET=1]="RENDER_TARGET",e}({}),ed,la,si,Fi,So,os,jo,uc,Xc,zf,ep,dd,ip;function wm(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Iy(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function Iy(e,i){if(e){if(typeof e=="string")return Yv(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yv(e,i)}}function Yv(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);rDt-1*Yo||zn<0||Rn>ar-1*Yo||Rn<0)){ws.next=11;break}return ws.abrupt("return",!1);case 11:return ws.next=13,Fe({x:Math.floor(zn/i.pickBufferScale),y:Math.floor((ar-(c+1)*Yo)/i.pickBufferScale),width:1,height:1,data:new Uint8Array(4),framebuffer:i.pickingFBO});case 13:return kn=ws.sent,i.pickedColors=kn,kn[0]!==0||kn[1]!==0||kn[2]!==0?(ui=sa(kn),Di=t.layerPickService.getFeatureById(ui),ui!==t.getCurrentPickId()&&E==="mousemove"&&(E="mouseenter"),Aa={x:u,y:c,type:E,lngLat:v,featureId:ui,feature:Di,target:G},Di&&(ie=!0,t.setCurrentPickId(ui),i.triggerHoverOnLayer(t,Aa))):(Pa={x:u,y:c,lngLat:v,type:t.getCurrentPickId()!==null&&E==="mousemove"?"mouseout":"un"+E,featureId:null,target:G,feature:null},i.triggerHoverOnLayer(t,(0,Me.Z)((0,Me.Z)({},Pa),{},{type:"unpick"})),i.triggerHoverOnLayer(t,Pa),t.setCurrentPickId(null)),Zr&&t.layerPickService.highlightPickedFeature(kn),mn&&E==="click"&&(kn==null?void 0:kn.toString())!==[0,0,0,0].toString()&&(Lo=sa(kn),t.getCurrentSelectedId()===null||Lo!==t.getCurrentSelectedId()?(t.layerPickService.selectFeature(kn),t.setCurrentSelectedId(Lo)):(t.layerPickService.selectFeature(new Uint8Array([0,0,0,0])),t.setCurrentSelectedId(null))),ws.abrupt("return",ie);case 19:case"end":return ws.stop()}},n)}));return function(n,t){return r.apply(this,arguments)}}())}return(0,vt.Z)(e,[{key:"init",value:function(r){var n=this.rendererService,t=n.createTexture2D,o=n.createFramebuffer,u=n.getContainer,c=this.getContainerSize(u()),v=c.width,E=c.height;v*=Yo,E*=Yo,this.pickBufferScale=this.configService.getSceneConfig(r).pickBufferScale||1,v=Math.round(v/this.pickBufferScale),E=Math.round(E/this.pickBufferScale);var G=t({width:v,height:E,usage:Oh.RENDER_TARGET,label:"Picking Texture"});this.pickingFBO=o({color:G,depth:!0,width:v,height:E}),this.interactionService.on(nl.Hover,this.pickingAllLayer.bind(this))}},{key:"boxPickLayer",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t,o,u){var c=this,v,E,G,ie;return Qr().wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return v=this.rendererService,E=v.useFramebufferAsync,G=v.clear,this.resizePickingFBO(),t.hooks.beforePickingEncode.call(),Fe.next=5,E(this.pickingFBO,(0,Qi.Z)(Qr().mark(function it(){return Qr().wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:G({framebuffer:c.pickingFBO,color:[0,0,0,0],stencil:0,depth:1}),t.renderModels({ispick:!0});case 2:case"end":return Dt.stop()}},it)})));case 5:return t.hooks.afterPickingEncode.call(),Fe.next=8,this.pickBox(t,o);case 8:ie=Fe.sent,u(ie);case 10:case"end":return Fe.stop()}},n,this)}));function r(n,t,o){return i.apply(this,arguments)}return r}()},{key:"pickBox",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t,o){var u=this,c,v,E,G,ie,xe,Fe,it,gt,Dt,ar,Mr,Zr,mn,zn,Rn,kn,ui,Di,Aa,Pa;return Qr().wrap(function(ns){for(;;)switch(ns.prev=ns.next){case 0:if(c=o.map(function(ws){var Pf=ws<0?0:ws;return Math.floor(Pf*Yo/u.pickBufferScale)}),v=(0,wi.Z)(c,4),E=v[0],G=v[1],ie=v[2],xe=v[3],Fe=this.rendererService,it=Fe.readPixelsAsync,gt=Fe.getContainer,Dt=this.getContainerSize(gt()),ar=Dt.width,Mr=Dt.height,ar*=Yo,Mr*=Yo,!(E>(ar-1)*Yo/this.pickBufferScale||ie<0||G>(Mr-1)*Yo/this.pickBufferScale||xe<0)){ns.next=7;break}return ns.abrupt("return",[]);case 7:return Zr=Math.min(ar/this.pickBufferScale,ie)-E,mn=Math.min(Mr/this.pickBufferScale,xe)-G,ns.next=11,it({x:E,y:Math.floor(Mr/this.pickBufferScale-(xe+1)),width:Zr,height:mn,data:new Uint8Array(Zr*mn*4),framebuffer:this.pickingFBO});case 11:for(zn=ns.sent,Rn=[],kn={},ui=0;ui0&&arguments[0]!==void 0?arguments[0]:!0;(0,Je.Z)(this,e),(0,St.Z)(this,"autoStart",void 0),(0,St.Z)(this,"startTime",0),(0,St.Z)(this,"oldTime",0),(0,St.Z)(this,"running",!1),(0,St.Z)(this,"elapsedTime",0),this.autoStart=i}return(0,vt.Z)(e,[{key:"start",value:function(){this.startTime=(typeof performance=="undefined"?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}},{key:"stop",value:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}},{key:"getElapsedTime",value:function(){return this.getDelta(),this.elapsedTime}},{key:"getDelta",value:function(){var r=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var n=(typeof performance=="undefined"?Date:performance).now();r=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=r}return r}}]),e}(),Xg,Ry,mg,Yg,Oy,zv,Kg,vg,qm;function lv(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d1(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function d1(e,i){if(e){if(typeof e=="string")return Zv(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zv(e,i)}}function Zv(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r-1&&c.layerChildren.splice(v,1)):(E=this.layers.indexOf(u),E>-1&&this.layers.splice(E,1)),u.destroy(),this.reRender(),this.emit("layerChange",this.layers);case 4:case"end":return ie.stop()}},o,this)}));function t(o,u){return n.apply(this,arguments)}return t}()},{key:"removeAllLayers",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:this.destroy(),this.reRender();case 2:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"setEnableRender",value:function(t){this.enableRender=t}},{key:"renderLayers",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G,ie,xe,Fe,it;return Qr().wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(!(this.alreadyInRendering||!this.enableRender)){Dt.next=2;break}return Dt.abrupt("return");case 2:this.updateLayerRenderList(),u=this.debugService.generateRenderUid(),this.debugService.renderStart(u),this.alreadyInRendering=!0,this.clear(),c=lv(this.layerList);try{for(c.s();!(v=c.n()).done;)E=v.value,E.prerender()}catch(ar){c.e(ar)}finally{c.f()}this.renderService.beginFrame(),G=lv(this.layerList),Dt.prev=11,G.s();case 13:if((ie=G.n()).done){Dt.next=25;break}if(xe=ie.value,Fe=xe.getLayerConfig(),it=Fe.enableMask,xe.masks.filter(function(ar){return ar.inited}).length>0&&it&&this.renderMask(xe.masks),!xe.getLayerConfig().enableMultiPassRenderer){Dt.next=22;break}return Dt.next=20,xe.renderMultiPass();case 20:Dt.next=23;break;case 22:xe.render();case 23:Dt.next=13;break;case 25:Dt.next=30;break;case 27:Dt.prev=27,Dt.t0=Dt.catch(11),G.e(Dt.t0);case 30:return Dt.prev=30,G.f(),Dt.finish(30);case 33:this.renderService.endFrame(),this.debugService.renderEnd(u),this.alreadyInRendering=!1;case 36:case"end":return Dt.stop()}},o,this,[[11,27,30,33]])}));function t(){return n.apply(this,arguments)}return t}()},{key:"renderMask",value:function(t){var o=0;this.renderService.clear({stencil:0,depth:1,framebuffer:null});var u=t.length>1?pc.MULTIPLE:pc.SINGLE,c=lv(t),v;try{for(c.s();!(v=c.n()).done;){var E=v.value;E.render({isStencil:!0,stencilType:u,stencilIndex:o++})}}catch(G){c.e(G)}finally{c.f()}}},{key:"beforeRenderData",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(u){var c;return Qr().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,u.hooks.beforeRenderData.promise();case 2:c=E.sent,c&&this.renderLayers();case 4:case"end":return E.stop()}},o,this)}));function t(o){return n.apply(this,arguments)}return t}()},{key:"renderTileLayerMask",value:function(t){var o=0,u=t.getLayerConfig(),c=u.enableMask,v=c===void 0?!0:c,E=t.tileMask?1:0,G=t.masks.filter(function(gt){return gt.inited});E=E+(v?G.length:1);var ie=E>1?pc.MULTIPLE:pc.SINGLE;if((t.tileMask||G.length&&v)&&this.renderService.clear({stencil:0,depth:1,framebuffer:null}),G.length&&v){var xe=lv(G),Fe;try{for(xe.s();!(Fe=xe.n()).done;){var it=Fe.value;it.render({isStencil:!0,stencilType:ie,stencilIndex:o++})}}catch(gt){xe.e(gt)}finally{xe.f()}}t.tileMask&&t.tileMask.render({isStencil:!0,stencilType:ie,stencilIndex:o++,stencilOperation:sf.OR})}},{key:"renderTileLayer",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(u){return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(this.renderTileLayerMask(u),!u.getLayerConfig().enableMultiPassRenderer){v.next=6;break}return v.next=4,u.renderMultiPass();case 4:v.next=8;break;case 6:return v.next=8,u.render();case 8:case"end":return v.stop()}},o,this)}));function t(o){return n.apply(this,arguments)}return t}()},{key:"updateLayerRenderList",value:function(){var t=this;this.layerList=[],this.layers.filter(function(o){return o.inited}).filter(function(o){return o.isVisible()}).sort(function(o,u){return o.zIndex-u.zIndex}).forEach(function(o){t.layerList.push(o)})}},{key:"destroy",value:function(){this.layers.forEach(function(t){t.destroy()}),this.layers=[],this.layerList=[],this.emit("layerChange",this.layers)}},{key:"startAnimate",value:function(){this.animateInstanceCount++===0&&(this.clock.start(),this.runRender())}},{key:"stopAnimate",value:function(){--this.animateInstanceCount===0&&(this.stopRender(),this.clock.stop())}},{key:"getOESTextureFloat",value:function(){return this.renderService.extensionObject.OES_texture_float}},{key:"enableShaderPick",value:function(){this.shaderPicking=!0}},{key:"disableShaderPick",value:function(){this.shaderPicking=!1}},{key:"getShaderPickStat",value:function(){return this.shaderPicking}},{key:"clear",value:function(){var t=Fa(this.mapService.bgColor);this.renderService.clear({color:t,depth:1,stencil:0,framebuffer:null})}},{key:"runRender",value:function(){this.renderLayers(),this.layerRenderID=window.requestAnimationFrame(this.runRender.bind(this))}},{key:"stopRender",value:function(){window.cancelAnimationFrame(this.layerRenderID)}}]),r}(cf.EventEmitter),Kg=p(zv.prototype,"renderService",[Ry],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),vg=p(zv.prototype,"mapService",[mg],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qm=p(zv.prototype,"debugService",[Yg],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),zv))||Oy),K0=_(56348),Or=function(e){return e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT",e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.FUNC_ADD=32774]="FUNC_ADD",e[e.BLEND_EQUATION=32777]="BLEND_EQUATION",e[e.BLEND_EQUATION_RGB=32777]="BLEND_EQUATION_RGB",e[e.BLEND_EQUATION_ALPHA=34877]="BLEND_EQUATION_ALPHA",e[e.FUNC_SUBTRACT=32778]="FUNC_SUBTRACT",e[e.FUNC_REVERSE_SUBTRACT=32779]="FUNC_REVERSE_SUBTRACT",e[e.MAX_EXT=32776]="MAX_EXT",e[e.MIN_EXT=32775]="MIN_EXT",e[e.BLEND_DST_RGB=32968]="BLEND_DST_RGB",e[e.BLEND_SRC_RGB=32969]="BLEND_SRC_RGB",e[e.BLEND_DST_ALPHA=32970]="BLEND_DST_ALPHA",e[e.BLEND_SRC_ALPHA=32971]="BLEND_SRC_ALPHA",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA",e[e.BLEND_COLOR=32773]="BLEND_COLOR",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER_BINDING=34964]="ARRAY_BUFFER_BINDING",e[e.ELEMENT_ARRAY_BUFFER_BINDING=34965]="ELEMENT_ARRAY_BUFFER_BINDING",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.BUFFER_SIZE=34660]="BUFFER_SIZE",e[e.BUFFER_USAGE=34661]="BUFFER_USAGE",e[e.CURRENT_VERTEX_ATTRIB=34342]="CURRENT_VERTEX_ATTRIB",e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK",e[e.CULL_FACE=2884]="CULL_FACE",e[e.BLEND=3042]="BLEND",e[e.DITHER=3024]="DITHER",e[e.STENCIL_TEST=2960]="STENCIL_TEST",e[e.DEPTH_TEST=2929]="DEPTH_TEST",e[e.SCISSOR_TEST=3089]="SCISSOR_TEST",e[e.POLYGON_OFFSET_FILL=32823]="POLYGON_OFFSET_FILL",e[e.SAMPLE_ALPHA_TO_COVERAGE=32926]="SAMPLE_ALPHA_TO_COVERAGE",e[e.SAMPLE_COVERAGE=32928]="SAMPLE_COVERAGE",e[e.NO_ERROR=0]="NO_ERROR",e[e.INVALID_ENUM=1280]="INVALID_ENUM",e[e.INVALID_VALUE=1281]="INVALID_VALUE",e[e.INVALID_OPERATION=1282]="INVALID_OPERATION",e[e.OUT_OF_MEMORY=1285]="OUT_OF_MEMORY",e[e.CW=2304]="CW",e[e.CCW=2305]="CCW",e[e.LINE_WIDTH=2849]="LINE_WIDTH",e[e.ALIASED_POINT_SIZE_RANGE=33901]="ALIASED_POINT_SIZE_RANGE",e[e.ALIASED_LINE_WIDTH_RANGE=33902]="ALIASED_LINE_WIDTH_RANGE",e[e.CULL_FACE_MODE=2885]="CULL_FACE_MODE",e[e.FRONT_FACE=2886]="FRONT_FACE",e[e.DEPTH_RANGE=2928]="DEPTH_RANGE",e[e.DEPTH_WRITEMASK=2930]="DEPTH_WRITEMASK",e[e.DEPTH_CLEAR_VALUE=2931]="DEPTH_CLEAR_VALUE",e[e.DEPTH_FUNC=2932]="DEPTH_FUNC",e[e.STENCIL_CLEAR_VALUE=2961]="STENCIL_CLEAR_VALUE",e[e.STENCIL_FUNC=2962]="STENCIL_FUNC",e[e.STENCIL_FAIL=2964]="STENCIL_FAIL",e[e.STENCIL_PASS_DEPTH_FAIL=2965]="STENCIL_PASS_DEPTH_FAIL",e[e.STENCIL_PASS_DEPTH_PASS=2966]="STENCIL_PASS_DEPTH_PASS",e[e.STENCIL_REF=2967]="STENCIL_REF",e[e.STENCIL_VALUE_MASK=2963]="STENCIL_VALUE_MASK",e[e.STENCIL_WRITEMASK=2968]="STENCIL_WRITEMASK",e[e.STENCIL_BACK_FUNC=34816]="STENCIL_BACK_FUNC",e[e.STENCIL_BACK_FAIL=34817]="STENCIL_BACK_FAIL",e[e.STENCIL_BACK_PASS_DEPTH_FAIL=34818]="STENCIL_BACK_PASS_DEPTH_FAIL",e[e.STENCIL_BACK_PASS_DEPTH_PASS=34819]="STENCIL_BACK_PASS_DEPTH_PASS",e[e.STENCIL_BACK_REF=36003]="STENCIL_BACK_REF",e[e.STENCIL_BACK_VALUE_MASK=36004]="STENCIL_BACK_VALUE_MASK",e[e.STENCIL_BACK_WRITEMASK=36005]="STENCIL_BACK_WRITEMASK",e[e.VIEWPORT=2978]="VIEWPORT",e[e.SCISSOR_BOX=3088]="SCISSOR_BOX",e[e.COLOR_CLEAR_VALUE=3106]="COLOR_CLEAR_VALUE",e[e.COLOR_WRITEMASK=3107]="COLOR_WRITEMASK",e[e.UNPACK_ALIGNMENT=3317]="UNPACK_ALIGNMENT",e[e.PACK_ALIGNMENT=3333]="PACK_ALIGNMENT",e[e.MAX_TEXTURE_SIZE=3379]="MAX_TEXTURE_SIZE",e[e.MAX_VIEWPORT_DIMS=3386]="MAX_VIEWPORT_DIMS",e[e.SUBPIXEL_BITS=3408]="SUBPIXEL_BITS",e[e.RED_BITS=3410]="RED_BITS",e[e.GREEN_BITS=3411]="GREEN_BITS",e[e.BLUE_BITS=3412]="BLUE_BITS",e[e.ALPHA_BITS=3413]="ALPHA_BITS",e[e.DEPTH_BITS=3414]="DEPTH_BITS",e[e.STENCIL_BITS=3415]="STENCIL_BITS",e[e.POLYGON_OFFSET_UNITS=10752]="POLYGON_OFFSET_UNITS",e[e.POLYGON_OFFSET_FACTOR=32824]="POLYGON_OFFSET_FACTOR",e[e.TEXTURE_BINDING_2D=32873]="TEXTURE_BINDING_2D",e[e.SAMPLE_BUFFERS=32936]="SAMPLE_BUFFERS",e[e.SAMPLES=32937]="SAMPLES",e[e.SAMPLE_COVERAGE_VALUE=32938]="SAMPLE_COVERAGE_VALUE",e[e.SAMPLE_COVERAGE_INVERT=32939]="SAMPLE_COVERAGE_INVERT",e[e.COMPRESSED_TEXTURE_FORMATS=34467]="COMPRESSED_TEXTURE_FORMATS",e[e.DONT_CARE=4352]="DONT_CARE",e[e.FASTEST=4353]="FASTEST",e[e.NICEST=4354]="NICEST",e[e.GENERATE_MIPMAP_HINT=33170]="GENERATE_MIPMAP_HINT",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER",e[e.MAX_VERTEX_ATTRIBS=34921]="MAX_VERTEX_ATTRIBS",e[e.MAX_VERTEX_UNIFORM_VECTORS=36347]="MAX_VERTEX_UNIFORM_VECTORS",e[e.MAX_VARYING_VECTORS=36348]="MAX_VARYING_VECTORS",e[e.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661]="MAX_COMBINED_TEXTURE_IMAGE_UNITS",e[e.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660]="MAX_VERTEX_TEXTURE_IMAGE_UNITS",e[e.MAX_TEXTURE_IMAGE_UNITS=34930]="MAX_TEXTURE_IMAGE_UNITS",e[e.MAX_FRAGMENT_UNIFORM_VECTORS=36349]="MAX_FRAGMENT_UNIFORM_VECTORS",e[e.SHADER_TYPE=35663]="SHADER_TYPE",e[e.DELETE_STATUS=35712]="DELETE_STATUS",e[e.LINK_STATUS=35714]="LINK_STATUS",e[e.VALIDATE_STATUS=35715]="VALIDATE_STATUS",e[e.ATTACHED_SHADERS=35717]="ATTACHED_SHADERS",e[e.ACTIVE_UNIFORMS=35718]="ACTIVE_UNIFORMS",e[e.ACTIVE_ATTRIBUTES=35721]="ACTIVE_ATTRIBUTES",e[e.SHADING_LANGUAGE_VERSION=35724]="SHADING_LANGUAGE_VERSION",e[e.CURRENT_PROGRAM=35725]="CURRENT_PROGRAM",e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP",e[e.VENDOR=7936]="VENDOR",e[e.RENDERER=7937]="RENDERER",e[e.VERSION=7938]="VERSION",e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR",e[e.TEXTURE_MAG_FILTER=10240]="TEXTURE_MAG_FILTER",e[e.TEXTURE_MIN_FILTER=10241]="TEXTURE_MIN_FILTER",e[e.TEXTURE_WRAP_S=10242]="TEXTURE_WRAP_S",e[e.TEXTURE_WRAP_T=10243]="TEXTURE_WRAP_T",e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE=5890]="TEXTURE",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_BINDING_CUBE_MAP=34068]="TEXTURE_BINDING_CUBE_MAP",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.MAX_CUBE_MAP_TEXTURE_SIZE=34076]="MAX_CUBE_MAP_TEXTURE_SIZE",e[e.TEXTURE0=33984]="TEXTURE0",e[e.TEXTURE1=33985]="TEXTURE1",e[e.TEXTURE2=33986]="TEXTURE2",e[e.TEXTURE3=33987]="TEXTURE3",e[e.TEXTURE4=33988]="TEXTURE4",e[e.TEXTURE5=33989]="TEXTURE5",e[e.TEXTURE6=33990]="TEXTURE6",e[e.TEXTURE7=33991]="TEXTURE7",e[e.TEXTURE8=33992]="TEXTURE8",e[e.TEXTURE9=33993]="TEXTURE9",e[e.TEXTURE10=33994]="TEXTURE10",e[e.TEXTURE11=33995]="TEXTURE11",e[e.TEXTURE12=33996]="TEXTURE12",e[e.TEXTURE13=33997]="TEXTURE13",e[e.TEXTURE14=33998]="TEXTURE14",e[e.TEXTURE15=33999]="TEXTURE15",e[e.TEXTURE16=34e3]="TEXTURE16",e[e.TEXTURE17=34001]="TEXTURE17",e[e.TEXTURE18=34002]="TEXTURE18",e[e.TEXTURE19=34003]="TEXTURE19",e[e.TEXTURE20=34004]="TEXTURE20",e[e.TEXTURE21=34005]="TEXTURE21",e[e.TEXTURE22=34006]="TEXTURE22",e[e.TEXTURE23=34007]="TEXTURE23",e[e.TEXTURE24=34008]="TEXTURE24",e[e.TEXTURE25=34009]="TEXTURE25",e[e.TEXTURE26=34010]="TEXTURE26",e[e.TEXTURE27=34011]="TEXTURE27",e[e.TEXTURE28=34012]="TEXTURE28",e[e.TEXTURE29=34013]="TEXTURE29",e[e.TEXTURE30=34014]="TEXTURE30",e[e.TEXTURE31=34015]="TEXTURE31",e[e.ACTIVE_TEXTURE=34016]="ACTIVE_TEXTURE",e[e.REPEAT=10497]="REPEAT",e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.VERTEX_ATTRIB_ARRAY_ENABLED=34338]="VERTEX_ATTRIB_ARRAY_ENABLED",e[e.VERTEX_ATTRIB_ARRAY_SIZE=34339]="VERTEX_ATTRIB_ARRAY_SIZE",e[e.VERTEX_ATTRIB_ARRAY_STRIDE=34340]="VERTEX_ATTRIB_ARRAY_STRIDE",e[e.VERTEX_ATTRIB_ARRAY_TYPE=34341]="VERTEX_ATTRIB_ARRAY_TYPE",e[e.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922]="VERTEX_ATTRIB_ARRAY_NORMALIZED",e[e.VERTEX_ATTRIB_ARRAY_POINTER=34373]="VERTEX_ATTRIB_ARRAY_POINTER",e[e.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975]="VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",e[e.COMPILE_STATUS=35713]="COMPILE_STATUS",e[e.LOW_FLOAT=36336]="LOW_FLOAT",e[e.MEDIUM_FLOAT=36337]="MEDIUM_FLOAT",e[e.HIGH_FLOAT=36338]="HIGH_FLOAT",e[e.LOW_INT=36339]="LOW_INT",e[e.MEDIUM_INT=36340]="MEDIUM_INT",e[e.HIGH_INT=36341]="HIGH_INT",e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.RENDERBUFFER=36161]="RENDERBUFFER",e[e.RGBA4=32854]="RGBA4",e[e.RGB5_A1=32855]="RGB5_A1",e[e.RGB565=36194]="RGB565",e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX=6401]="STENCIL_INDEX",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.RENDERBUFFER_WIDTH=36162]="RENDERBUFFER_WIDTH",e[e.RENDERBUFFER_HEIGHT=36163]="RENDERBUFFER_HEIGHT",e[e.RENDERBUFFER_INTERNAL_FORMAT=36164]="RENDERBUFFER_INTERNAL_FORMAT",e[e.RENDERBUFFER_RED_SIZE=36176]="RENDERBUFFER_RED_SIZE",e[e.RENDERBUFFER_GREEN_SIZE=36177]="RENDERBUFFER_GREEN_SIZE",e[e.RENDERBUFFER_BLUE_SIZE=36178]="RENDERBUFFER_BLUE_SIZE",e[e.RENDERBUFFER_ALPHA_SIZE=36179]="RENDERBUFFER_ALPHA_SIZE",e[e.RENDERBUFFER_DEPTH_SIZE=36180]="RENDERBUFFER_DEPTH_SIZE",e[e.RENDERBUFFER_STENCIL_SIZE=36181]="RENDERBUFFER_STENCIL_SIZE",e[e.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048]="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",e[e.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049]="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",e[e.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",e[e.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051]="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.DEPTH_ATTACHMENT=36096]="DEPTH_ATTACHMENT",e[e.STENCIL_ATTACHMENT=36128]="STENCIL_ATTACHMENT",e[e.DEPTH_STENCIL_ATTACHMENT=33306]="DEPTH_STENCIL_ATTACHMENT",e[e.NONE=0]="NONE",e[e.FRAMEBUFFER_COMPLETE=36053]="FRAMEBUFFER_COMPLETE",e[e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054]="FRAMEBUFFER_INCOMPLETE_ATTACHMENT",e[e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055]="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",e[e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057]="FRAMEBUFFER_INCOMPLETE_DIMENSIONS",e[e.FRAMEBUFFER_UNSUPPORTED=36061]="FRAMEBUFFER_UNSUPPORTED",e[e.FRAMEBUFFER_BINDING=36006]="FRAMEBUFFER_BINDING",e[e.RENDERBUFFER_BINDING=36007]="RENDERBUFFER_BINDING",e[e.MAX_RENDERBUFFER_SIZE=34024]="MAX_RENDERBUFFER_SIZE",e[e.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",e[e.UNPACK_FLIP_Y_WEBGL=37440]="UNPACK_FLIP_Y_WEBGL",e[e.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441]="UNPACK_PREMULTIPLY_ALPHA_WEBGL",e[e.CONTEXT_LOST_WEBGL=37442]="CONTEXT_LOST_WEBGL",e[e.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443]="UNPACK_COLORSPACE_CONVERSION_WEBGL",e[e.BROWSER_DEFAULT_WEBGL=37444]="BROWSER_DEFAULT_WEBGL",e}({}),yg=vi.isNil,Ly=function(){function e(i){var r=this;(0,Je.Z)(this,e),(0,St.Z)(this,"name",void 0),(0,St.Z)(this,"type",void 0),(0,St.Z)(this,"scale",void 0),(0,St.Z)(this,"descriptor",void 0),(0,St.Z)(this,"featureBufferLayout",[]),(0,St.Z)(this,"needRescale",!1),(0,St.Z)(this,"needRemapping",!1),(0,St.Z)(this,"needRegenerateVertices",!1),(0,St.Z)(this,"featureRange",{startIndex:0,endIndex:1/0}),(0,St.Z)(this,"vertexAttribute",void 0),(0,St.Z)(this,"defaultCallback",function(n){if(n.length===0){var t;return((t=r.scale)===null||t===void 0?void 0:t.defaultValues)||[]}return n.map(function(o,u){var c,v=(c=r.scale)===null||c===void 0?void 0:c.scalers[u].func,E=v(o);return E})}),this.setProps(i)}return(0,vt.Z)(e,[{key:"setProps",value:function(r){Object.assign(this,r)}},{key:"mapping",value:function(r){var n;if((n=this.scale)!==null&&n!==void 0&&n.callback){var t,o=(t=this.scale)===null||t===void 0?void 0:t.callback.apply(t,(0,Mn.Z)(r));if(!yg(o))return[o]}return this.defaultCallback(r)}},{key:"resetDescriptor",value:function(){this.descriptor&&(this.descriptor.buffer.data=[])}}]),e}(),vA=["buffer","update","name"],v1=["buffer","update","name"],_g,qg,y_,g1,Kv,y1,gA=(_g={},(0,St.Z)(_g,Or.FLOAT,4),(0,St.Z)(_g,Or.UNSIGNED_BYTE,1),(0,St.Z)(_g,Or.UNSIGNED_SHORT,2),_g),Dy=(qg=(0,bo.b2)(),y_=(0,bo.f3)(vr.IRendererService),qg(g1=(Kv=function(){function e(){(0,Je.Z)(this,e),(0,St.Z)(this,"attributesAndIndices",void 0),A(this,"rendererService",y1,this),(0,St.Z)(this,"attributes",[]),(0,St.Z)(this,"triangulation",void 0),(0,St.Z)(this,"featureLayout",{sizePerElement:0,elements:[]})}return(0,vt.Z)(e,[{key:"registerStyleAttribute",value:function(r){var n=this.getLayerStyleAttribute(r.name||"");return n?n.setProps(r):(n=new Ly(r),this.attributes.push(n)),n}},{key:"unRegisterStyleAttribute",value:function(r){var n=this.attributes.findIndex(function(t){return t.name===r});n>-1&&this.attributes.splice(n,1)}},{key:"updateScaleAttribute",value:function(r){this.attributes.forEach(function(n){var t,o=n.name,u=(t=n.scale)===null||t===void 0?void 0:t.field;(r[o]||u&&r[u])&&(n.needRescale=!0,n.needRemapping=!0,n.needRegenerateVertices=!0)})}},{key:"updateStyleAttribute",value:function(r,n,t){var o=this.getLayerStyleAttribute(r);o||(o=this.registerStyleAttribute((0,Me.Z)((0,Me.Z)({},n),{},{name:r})));var u=n.scale;u&&o&&(o.scale=u,o.needRescale=!0,o.needRemapping=!0,o.needRegenerateVertices=!0,t&&t.featureRange&&(o.featureRange=t.featureRange))}},{key:"getLayerStyleAttributes",value:function(){return this.attributes}},{key:"getLayerStyleAttribute",value:function(r){return this.attributes.find(function(n){return n.name===r})}},{key:"getLayerAttributeScale",value:function(r){var n,t=this.getLayerStyleAttribute(r),o=t==null||(n=t.scale)===null||n===void 0?void 0:n.scalers;return o&&o[0]?o[0].func:null}},{key:"updateAttributeByFeatureRange",value:function(r,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3?arguments[3]:void 0,u=arguments.length>4?arguments[4]:void 0,c=this.attributes.find(function(zn){return zn.name===r});if(c&&c.descriptor){var v=c.descriptor,E=v.update,G=v.buffer,ie=v.size,xe=ie===void 0?0:ie,Fe=gA[G.type||Or.FLOAT];if(E){var it=this.featureLayout,gt=it.elements,Dt=it.sizePerElement,ar=gt.slice(t,o);if(!ar.length)return;var Mr=ar[0].offset,Zr=Mr*xe*Fe,mn=ar.map(function(zn,Rn){for(var kn=zn.featureIdx,ui=zn.vertices,Di=zn.normals,Aa=ui.length/Dt,Pa=[],Lo=0;Lo0&&o[o.length-1])&&(E[0]===6||E[0]===2)){r=0;continue}if(E[0]===3&&(!o||E[1]>o[0]&&E[1]0)&&!(t=n.next()).done;)o.push(t.value)}catch(c){u={error:c}}finally{try{t&&!t.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return o}function ky(e,i,r){if(r||arguments.length===2)for(var n=0,t=i.length,o;n=0&&n.length%1===0}e.exports=i.default})(Jg,Jg.exports);var Bm={},Fy={exports:{}},xg={exports:{}};(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(r){return function(){for(var n=[],t=arguments.length;t--;)n[t]=arguments[t];var o=n.pop();return r.call(this,n,o)}},e.exports=i.default})(xg,xg.exports);var Rv={};Object.defineProperty(Rv,"__esModule",{value:!0}),Rv.fallback=wg,Rv.wrap=By;var x1=Rv.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,yA=Rv.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,_A=Rv.hasNextTick=typeof _1=="object"&&typeof _1.nextTick=="function";function wg(e){setTimeout(e,0)}function By(e){return function(i){for(var r=[],n=arguments.length-1;n-- >0;)r[n]=arguments[n+1];return e(function(){return i.apply(void 0,r)})}}var Qv;x1?Qv=queueMicrotask:yA?Qv=setImmediate:_A?Qv=_1.nextTick:Qv=wg,Rv.default=By(Qv),function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=v;var r=xg.exports,n=c(r),t=Rv,o=c(t),u=Bm;function c(ie){return ie&&ie.__esModule?ie:{default:ie}}function v(ie){return(0,u.isAsync)(ie)?function(){for(var xe=[],Fe=arguments.length;Fe--;)xe[Fe]=arguments[Fe];var it=xe.pop(),gt=ie.apply(this,xe);return E(gt,it)}:(0,n.default)(function(xe,Fe){var it;try{it=ie.apply(this,xe)}catch(gt){return Fe(gt)}if(it&&typeof it.then=="function")return E(it,Fe);Fe(null,it)})}function E(ie,xe){return ie.then(function(Fe){G(xe,null,Fe)},function(Fe){G(xe,Fe&&Fe.message?Fe:new Error(Fe))})}function G(ie,xe,Fe){try{ie(xe,Fe)}catch(it){(0,o.default)(function(gt){throw gt},it)}}e.exports=i.default}(Fy,Fy.exports),Object.defineProperty(Bm,"__esModule",{value:!0}),Bm.isAsyncIterable=Bm.isAsyncGenerator=Bm.isAsync=void 0;var w1=Fy.exports,__=AA(w1);function AA(e){return e&&e.__esModule?e:{default:e}}function ey(e){return e[Symbol.toStringTag]==="AsyncFunction"}function bA(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function A_(e){return typeof e[Symbol.asyncIterator]=="function"}function xA(e){if(typeof e!="function")throw new Error("expected a function");return ey(e)?(0,__.default)(e):e}Bm.default=xA,Bm.isAsync=ey,Bm.isAsyncGenerator=bA,Bm.isAsyncIterable=A_;var Jv={exports:{}};(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;function r(n,t){if(t===void 0&&(t=n.length),!t)throw new Error("arity is undefined");function o(){for(var u=this,c=[],v=arguments.length;v--;)c[v]=arguments[v];return typeof c[t-1]=="function"?n.apply(this,c):new Promise(function(E,G){c[t-1]=function(ie){for(var xe=[],Fe=arguments.length-1;Fe-- >0;)xe[Fe]=arguments[Fe+1];if(ie)return G(ie);E(xe.length>1?xe:xe[0])},n.apply(u,c)})}return o}e.exports=i.default})(Jv,Jv.exports),function(e,i){Object.defineProperty(i,"__esModule",{value:!0});var r=Jg.exports,n=v(r),t=Bm,o=v(t),u=Jv.exports,c=v(u);function v(E){return E&&E.__esModule?E:{default:E}}i.default=(0,c.default)(function(E,G,ie){var xe=(0,n.default)(G)?[]:{};E(G,function(Fe,it,gt){(0,o.default)(Fe)(function(Dt){for(var ar,Mr=[],Zr=arguments.length-1;Zr-- >0;)Mr[Zr]=arguments[Zr+1];Mr.length<2&&(ar=Mr,Mr=ar[0]),xe[it]=Mr,gt(Dt)})},function(Fe){return ie(Fe,xe)})},3),e.exports=i.default}(bg,bg.exports);var bv={exports:{}},eg={exports:{}},ty={exports:{}},xv={exports:{}};(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;function r(n){function t(){for(var o=[],u=arguments.length;u--;)o[u]=arguments[u];if(n!==null){var c=n;n=null,c.apply(this,o)}}return Object.assign(t,n),t}e.exports=i.default})(xv,xv.exports);var Ny={exports:{}},ry={exports:{}};(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(r){return r[Symbol.iterator]&&r[Symbol.iterator]()},e.exports=i.default})(ry,ry.exports),function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=G;var r=Jg.exports,n=u(r),t=ry.exports,o=u(t);function u(ie){return ie&&ie.__esModule?ie:{default:ie}}function c(ie){var xe=-1,Fe=ie.length;return function(){return++xe=c||xe||G||(xe=!0,u.next().then(function(Mr){var Zr=Mr.value,mn=Mr.done;if(!(ie||G)){if(xe=!1,mn){G=!0,Fe<=0&&E(null);return}Fe++,v(Zr,it,Dt),it++,gt()}}).catch(ar))}function Dt(Mr,Zr){if(Fe-=1,!ie){if(Mr)return ar(Mr);if(Mr===!1){G=!0,ie=!0;return}if(Zr===n.default||G&&Fe<=0)return G=!0,E(null);gt()}}function ar(Mr){ie||(xe=!1,G=!0,E(Mr))}gt()}e.exports=i.default}(E1,E1.exports),function(e,i){Object.defineProperty(i,"__esModule",{value:!0});var r=xv.exports,n=Fe(r),t=Ny.exports,o=Fe(t),u=Eg.exports,c=Fe(u),v=Bm,E=E1.exports,G=Fe(E),ie=ny.exports,xe=Fe(ie);function Fe(it){return it&&it.__esModule?it:{default:it}}i.default=function(it){return function(gt,Dt,ar){if(ar=(0,n.default)(ar),it<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!gt)return ar(null);if((0,v.isAsyncGenerator)(gt))return(0,G.default)(gt,it,Dt,ar);if((0,v.isAsyncIterable)(gt))return(0,G.default)(gt[Symbol.asyncIterator](),it,Dt,ar);var Mr=(0,o.default)(gt),Zr=!1,mn=!1,zn=0,Rn=!1;function kn(Di,Aa){if(!mn)if(zn-=1,Di)Zr=!0,ar(Di);else if(Di===!1)Zr=!0,mn=!0;else{if(Aa===xe.default||Zr&&zn<=0)return Zr=!0,ar(null);Rn||ui()}}function ui(){for(Rn=!0;zn0;)Mr[Zr]=arguments[Zr+1];if(ar!==!1){if(ar||it===xe.length)return Fe.apply(void 0,[ar].concat(Mr));gt(Mr)}}gt([])}i.default=(0,E.default)(ie),e.exports=i.default})(R,R.exports);var k=qv(R.exports),Y=function(){function e(){this.tasks=[]}return e.prototype.call=function(){return k(this.tasks)},e.prototype.tap=function(i,r){this.tasks.length===0?this.tasks.push(function(n){var t=r();n(t?null:!1,t)}):this.tasks.push(function(n,t){var o=r.apply(void 0,ky([],Ag(n),!1));t(o?null:!1,i)})},e}(),de=function(){function e(){this.tasks=[]}return e.prototype.call=function(){return zy(this.tasks)},e.prototype.tap=function(i,r){this.tasks.push(function(n){var t=r();n(t,i)})},e}(),be=function(){function e(){this.args=[],this.tasks=[]}return e.prototype.promise=function(){for(var i=arguments,r=[],n=0;n1&&arguments[1]!==void 0?arguments[1]:!1,r={};return e=e.replace(Zy,function(n,t,o){var u=o.split(":"),c=u[0].trim(),v="";switch(u.length>1&&(v=u[1].trim()),t){case"bool":v=v==="true";break;case"float":case"int":v=Number(v);break;case"vec2":case"vec3":case"vec4":case"ivec2":case"ivec3":case"ivec4":case"mat2":case"mat3":case"mat4":v?v=v.replace("[","").replace("]","").split(",").reduce(function(E,G){return E.push(Number(G.trim())),E},[]):v=new Array(oy(t)).fill(0);break;default:}return r[c]=v,"".concat(i?"uniform ":"").concat(t," ").concat(c,`; -`)}),{content:e,uniforms:r}}function Uy(e){var i=T1(e,!0),r=i.content,n=i.uniforms;return r=r.replace(/(\s*uniform\s*.*\s*){((?:\s*.*\s*)*?)};/g,function(t,o,u){u=u.trim().replace(/^.*$/gm,function(G){return"uniform ".concat(G)});var c=T1(u),v=c.content,E=c.uniforms;return Object.assign(n,E),"".concat(o,`{ -`).concat(v,` -};`)}),{content:r,uniforms:n}}function jy(e){var i={};return e.replace(Zy,function(r,n,t){var o=t.trim();return i[o]?"":(i[o]=!0,"uniform ".concat(n," ").concat(o,`; -`))})}var EA,SA,V2=vi.uniq,$2="#define PI 3.14159265359",CA=`#define SHIFT_RIGHT17 1.0 / 131072.0 -#define SHIFT_RIGHT18 1.0 / 262144.0 -#define SHIFT_RIGHT19 1.0 / 524288.0 -#define SHIFT_RIGHT20 1.0 / 1048576.0 -#define SHIFT_RIGHT21 1.0 / 2097152.0 -#define SHIFT_RIGHT22 1.0 / 4194304.0 -#define SHIFT_RIGHT23 1.0 / 8388608.0 -#define SHIFT_RIGHT24 1.0 / 16777216.0 - -#define SHIFT_LEFT17 131072.0 -#define SHIFT_LEFT18 262144.0 -#define SHIFT_LEFT19 524288.0 -#define SHIFT_LEFT20 1048576.0 -#define SHIFT_LEFT21 2097152.0 -#define SHIFT_LEFT22 4194304.0 -#define SHIFT_LEFT23 8388608.0 -#define SHIFT_LEFT24 16777216.0 - -vec2 unpack_float(float packedValue) { - int packedIntValue = int(packedValue); - int v0 = packedIntValue / 256; - return vec2(v0, packedIntValue - v0 * 256); -} - -vec4 decode_color(vec2 encodedColor) { - return vec4( - unpack_float(encodedColor[0]) / 255.0, - unpack_float(encodedColor[1]) / 255.0 - ); -} -`,Vy=`layout(std140) uniform SceneUniforms { - mat4 u_ViewMatrix; - mat4 u_ProjectionMatrix; - mat4 u_ViewProjectionMatrix; - mat4 u_ModelMatrix; - vec4 u_ViewportCenterProjection; - vec3 u_PixelsPerDegree; - float u_Zoom; - vec3 u_PixelsPerDegree2; - float u_ZoomScale; - vec3 u_PixelsPerMeter; - float u_CoordinateSystem; - vec3 u_CameraPosition; - float u_DevicePixelRatio; - vec2 u_ViewportCenter; - vec2 u_ViewportSize; - float u_FocalDistance; -}; - -layout(std140) uniform LayerUniforms { - mat4 u_Mvp; - vec2 u_sceneCenterMercator; -}; -`,TA=`layout(std140) uniform PickingUniforms { - vec4 u_HighlightColor; - vec4 u_SelectColor; - vec3 u_PickingColor; - float u_PickingStage; - vec3 u_CurrentSelectedId; - float u_PickingThreshold; - float u_PickingBuffer; - float u_shaderPick; - float u_EnableSelect; - float u_activeMix; -};`,H2=`#define ambientRatio 0.5 -#define diffuseRatio 0.3 -#define specularRatio 0.2 - - -float calc_lighting(vec4 pos) { - - vec3 worldPos = vec3(pos * u_ModelMatrix); - - vec3 worldNormal = a_Normal; - // //cal light weight - vec3 viewDir = normalize(u_CameraPosition - worldPos); - - vec3 lightDir = normalize(vec3(1, -10.5, 12)); - - vec3 halfDir = normalize(viewDir+lightDir); - // //lambert - float lambert = dot(worldNormal, lightDir); - //specular - float specular = pow(max(0.0, dot(worldNormal, halfDir)), 32.0); - //sum to light weight - float lightWeight = ambientRatio + diffuseRatio * lambert + specularRatio * specular; - - return lightWeight; -} -`,G2=`// Blinn-Phong model -// apply lighting in vertex shader instead of fragment shader -// @see https://learnopengl.com/Advanced-Lighting/Advanced-Lighting -uniform float u_Ambient : 1.0; -uniform float u_Diffuse : 1.0; -uniform float u_Specular : 1.0; -uniform int u_NumOfDirectionalLights : 1; -uniform int u_NumOfSpotLights : 0; - -#define SHININESS 32.0 -#define MAX_NUM_OF_DIRECTIONAL_LIGHTS 3 -#define MAX_NUM_OF_SPOT_LIGHTS 3 - -struct DirectionalLight { - vec3 direction; - vec3 ambient; - vec3 diffuse; - vec3 specular; -}; - -struct SpotLight { - vec3 position; - vec3 direction; - vec3 ambient; - vec3 diffuse; - vec3 specular; - float constant; - float linear; - float quadratic; - float angle; - float blur; - float exponent; -}; - -uniform DirectionalLight u_DirectionalLights[MAX_NUM_OF_DIRECTIONAL_LIGHTS]; -uniform SpotLight u_SpotLights[MAX_NUM_OF_SPOT_LIGHTS]; - -vec3 calc_directional_light(DirectionalLight light, vec3 normal, vec3 viewDir) { - vec3 lightDir = normalize(light.direction); - // diffuse shading - float diff = max(dot(normal, lightDir), 0.0); - // Blinn-Phong specular shading - vec3 halfwayDir = normalize(lightDir + viewDir); - float spec = pow(max(dot(normal, halfwayDir), 0.0), SHININESS); - - vec3 ambient = light.ambient * u_Ambient; - vec3 diffuse = light.diffuse * diff * u_Diffuse; - vec3 specular = light.specular * spec * u_Specular; - - return ambient + diffuse + specular; -} - - -vec3 calc_lighting(vec3 position, vec3 normal, vec3 viewDir) { - vec3 weight = vec3(0.0); - for (int i = 0; i < MAX_NUM_OF_DIRECTIONAL_LIGHTS; i++) { - if (i >= u_NumOfDirectionalLights) { - break; - } - weight += calc_directional_light(u_DirectionalLights[i], normal, viewDir); - } - return weight; -} -`,MA=` -in vec4 v_PickingResult; - -#pragma include "picking_uniforms" - -#define PICKING_NONE 0.0 -#define PICKING_ENCODE 1.0 -#define PICKING_HIGHLIGHT 2.0 -#define COLOR_SCALE 1. / 255. - -#define HIGHLIGHT 1.0 -#define SELECT 2.0 - -/* - * Returns highlight color if this item is selected. - */ -vec4 filterHighlightColor(vec4 color, float weight) { - // float selected = v_PickingResult.a; - bool selected = bool(v_PickingResult.a); - - // if (selected == SELECT) { - if (selected) { - // // \u70B9\u51FB\u9009\u4E2D\u72B6\u6001 - // vec4 selectColor = u_SelectColor * COLOR_SCALE; - // return selectColor; - // } else if (selected == HIGHLIGHT) { - // // hover \u9AD8\u4EAE\u72B6\u6001 - vec4 highLightColor = u_HighlightColor * COLOR_SCALE; - - float highLightAlpha = highLightColor.a; - float highLightRatio = highLightAlpha / (highLightAlpha + color.a * (1.0 - highLightAlpha)); - - vec3 resultRGB = mix(color.rgb, highLightColor.rgb, highLightRatio); - return vec4(mix(resultRGB * weight, color.rgb, u_activeMix), color.a); - } else { - return color; - } -} - -/* - * Returns picking color if picking enabled else unmodified argument. - */ -vec4 filterPickingColor(vec4 color) { - vec3 pickingColor = v_PickingResult.rgb; - if (u_PickingStage == PICKING_ENCODE && length(pickingColor) < 0.001) { - discard; - } - return u_PickingStage == PICKING_ENCODE ? vec4(pickingColor, step(0.001,color.a)): color; -} - -/* - * Returns picking color if picking is enabled if not - * highlight color if this item is selected, otherwise unmodified argument. - */ -vec4 filterColor(vec4 color) { - // \u8FC7\u6EE4\u591A\u4F59\u7684 shader \u8BA1\u7B97 - // return color; - if(u_shaderPick < 0.5) { - return color; // \u6682\u65F6\u53BB\u9664 \u76F4\u63A5\u53D6\u6D88\u8BA1\u7B97\u5728\u9009\u4E2D\u65F6\u62D6\u62FD\u5730\u56FE\u4F1A\u6709\u95EE\u9898 - } else { - return filterPickingColor(filterHighlightColor(color, 1.0)); - } - -} - -vec4 filterColorAlpha(vec4 color, float alpha) { - // \u8FC7\u6EE4\u591A\u4F59\u7684 shader \u8BA1\u7B97 - // return color; - if(u_shaderPick < 0.5) { - return color; // \u6682\u65F6\u53BB\u9664 \u76F4\u63A5\u53D6\u6D88\u8BA1\u7B97\u5728\u9009\u4E2D\u65F6\u62D6\u62FD\u5730\u56FE\u4F1A\u6709\u95EE\u9898 - } else { - return filterPickingColor(filterHighlightColor(color, alpha)); - } -} - -`,W2=`layout(location = 3) in vec3 a_PickingColor; -out vec4 v_PickingResult; - -#pragma include "picking_uniforms" - -#define PICKING_NONE 0.0 -#define PICKING_ENCODE 1.0 -#define PICKING_HIGHLIGHT 2.0 -#define COLOR_SCALE 1. / 255. - -#define NORMAL 0.0 -#define HIGHLIGHT 1.0 -#define SELECT 2.0 - -bool isVertexPicked(vec3 vertexColor) { - return distance(vertexColor,u_PickingColor.rgb) < 0.01; -} - -// \u5224\u65AD\u5F53\u524D\u70B9\u662F\u5426\u5DF2\u7ECF\u88AB select \u9009\u4E2D -bool isVertexSelected(vec3 vertexColor) { - return distance(vertexColor,u_CurrentSelectedId.rgb) < 0.01; -} - -void setPickingColor(vec3 pickingColor) { - if(u_shaderPick < 0.5) { - return; - } - // compares only in highlight stage - - v_PickingResult.a = float((u_PickingStage == PICKING_HIGHLIGHT) && isVertexPicked(pickingColor)); - - // Stores the picking color so that the fragment shader can render it during picking - v_PickingResult.rgb = pickingColor * COLOR_SCALE; -} - -float setPickingSize(float x) { - return u_PickingStage == PICKING_ENCODE ? x + u_PickingBuffer : x; -} - -float setPickingOrder(float z) { - bool selected = bool(v_PickingResult.a); - return selected ? z + 1. : 0.; -} -`,X2=` -#define E 2.718281828459045 -vec2 ProjectFlat(vec2 lnglat){ - float maxs=85.0511287798; - float lat=max(min(maxs,lnglat.y),-maxs); - float scale= 268435456.; - float d=PI/180.; - float x=lnglat.x*d; - float y=lat*d; - y=log(tan((PI/4.)+(y/2.))); - - float a=.5/PI, - b=.5, - c=-.5/PI; - d=.5; - x=scale*(a*x+b); - y=scale*(c*y+d); - return vec2(x,y); -} - -vec2 unProjectFlat(vec2 px){ - float a=.5/PI; - float b=.5; - float c=-.5/PI; - float d=.5; - float scale = 268435456.; - float x=(px.x/scale-b)/a; - float y=(px.y/scale-d)/c; - y=(atan(pow(E,y))-(PI/4.))*2.; - d=PI/180.; - float lat=y/d; - float lng=x/d; - return vec2(lng,lat); -} - -float pixelDistance(vec2 from, vec2 to) { - vec2 a1 = ProjectFlat(from); - vec2 b1 = ProjectFlat(to); - return distance(a1, b1); -} - -// gaode2.0 -vec2 customProject(vec2 lnglat) { // \u7ECF\u7EAC\u5EA6 => \u5E73\u9762\u5750\u6807 - float t = lnglat.x; - float e = lnglat.y; - float Sm = 180.0 / PI; - float Tm = 6378137.0; - float Rm = PI / 180.0; - float r = 85.0511287798; - e = max(min(r, e), -r); - t *= Rm; - e *= Rm; - e = log(tan(PI / 4.0 + e / 2.0)); - return vec2(t * Tm, e * Tm); -} - -vec2 unProjCustomCoord(vec2 point) { // \u5E73\u9762\u5750\u6807 => \u7ECF\u7EAC\u5EA6 - float Sm = 57.29577951308232; //180 / Math.PI - float Tm = 6378137.0; - float t = point.x; - float e = point.y; - return vec2(t / Tm * Sm, (2.0 * atan(exp(e / Tm)) - PI / 2.0) * Sm); -} - - -float customPixelDistance(vec2 from, vec2 to) { - vec2 a1 = ProjectFlat(from); - vec2 b1 = ProjectFlat(to); - return distance(a1, b1); -}`,PA=`#define TILE_SIZE 512.0 -#define PI 3.1415926536 -#define WORLD_SCALE TILE_SIZE / (PI * 2.0) -#define EARTH_CIRCUMFERENCE 40.03e6 - -#define COORDINATE_SYSTEM_LNGLAT 1.0 // mapbox -#define COORDINATE_SYSTEM_LNGLAT_OFFSET 2.0 // mapbox offset -#define COORDINATE_SYSTEM_VECTOR_TILE 3.0 -#define COORDINATE_SYSTEM_IDENTITY 4.0 -#define COORDINATE_SYSTEM_P20 5.0 // amap -#define COORDINATE_SYSTEM_P20_OFFSET 6.0 // amap offset -#define COORDINATE_SYSTEM_METER_OFFSET 7.0 - -#define COORDINATE_SYSTEM_P20_2 8.0 // amap2.0 -#pragma include "scene_uniforms" - - -// web mercator coords -> world coords -vec2 project_mercator(vec2 lnglat) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.0 - return lnglat; - } - float x = lnglat.x; - return vec2( - radians(x) + PI, - PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5)) - ); -} - -float project_scale(float meters) { - return meters * u_PixelsPerMeter.z; -} - - -// offset coords -> world coords -vec4 project_offset(vec4 offset) { - float dy = offset.y; - dy = clamp(dy, -1., 1.); - vec3 pixels_per_unit = u_PixelsPerDegree + u_PixelsPerDegree2 * dy; - return vec4(offset.xyz * pixels_per_unit, offset.w); -} - -vec3 project_normal(vec3 normal) { - vec4 normal_modelspace = u_ModelMatrix * vec4(normal, 0.0); - return normalize(normal_modelspace.xyz * u_PixelsPerMeter); -} - -vec3 project_offset_normal(vec3 vector) { - if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01 - || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - // normals generated by the polygon tesselator are in lnglat offsets instead of meters - return normalize(vector * u_PixelsPerDegree); - } - return project_normal(vector); -} -// || u_CoordinateSystem < COORDINATE_SYSTEM_P20_OFFSET + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_P20_OFFSET - 0.01 -// reverse Y -vec3 reverse_offset_normal(vec3 vector) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 ||u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET ) { - return vector * vec3(1.0, -1.0, 1.0); - } - - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.0 - return vector; - } - return vector; -} - -vec4 project_mvt_offset_position(vec4 position) { - float a = COORDINATE_SYSTEM_LNGLAT_OFFSET; - float b = COORDINATE_SYSTEM_P20_OFFSET; - float c = COORDINATE_SYSTEM_LNGLAT; - if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { - return project_offset(vec4(0.0, 0.0, position.z, position.w)); - } - if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01) { - return vec4( - project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale, - project_scale(position.z), - position.w - ); - } - return position; -} - -vec4 project_position(vec4 position) { - float a = COORDINATE_SYSTEM_LNGLAT_OFFSET; - float b = COORDINATE_SYSTEM_P20_OFFSET; - float c = COORDINATE_SYSTEM_LNGLAT; - if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET - || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { - float X = position.x - u_ViewportCenter.x; - float Y = position.y - u_ViewportCenter.y; - return project_offset(vec4(X, Y, position.z, position.w)); - } - if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01) { - return vec4( - project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale, - project_scale(position.z), - position.w - ); - } - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) { - return vec4( - (project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale - vec2(215440491., 106744817.)) * vec2(1., -1.), - project_scale(position.z), - position.w - ); - } - - // if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { - - - // return vec4( - // position.xy, - // project_scale(position.z), - // position.w); - // } - return position; - - // TODO: \u74E6\u7247\u5750\u6807\u7CFB & \u5E38\u89C4\u4E16\u754C\u5750\u6807\u7CFB -} -vec2 project_pixel_size_to_clipspace(vec2 pixels) { - vec2 offset = pixels / u_ViewportSize * u_DevicePixelRatio * 2.0; - return offset * u_FocalDistance; -} - - - -float project_pixel_allmap(float pixel) { - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT) { - return pixel * pow(2.0, u_Zoom); - } - return pixel * u_FocalDistance ; -} - -// \u9002\u914D\u7EB9\u7406\u8D34\u56FE\u7684\u7B49\u50CF\u7D20\u5927\u5C0F -float project_pixel_texture(float pixel) { - // mapbox zoom > 12 - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - return pixel * pow(0.5, u_Zoom) * u_FocalDistance ; - } - - // amap2 zoom > 12 - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { - return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))* u_FocalDistance ; - } - - // amap zoom > 12 - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { - return pixel * pow(0.5, u_Zoom)* u_FocalDistance ; - } - - // amap zoom < 12 - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) { - return pixel * pow(2.0, (20.0 - u_Zoom))* u_FocalDistance ; - } - return pixel * 2.0 * u_FocalDistance;; -} - -// \u5728\u4E0D\u8BBA\u4EC0\u4E48\u5E95\u56FE\u4E0B\u9700\u8981\u7EDF\u4E00\u5904\u7406\u7684\u65F6\u5019\u4F7F\u7528 -float project_float_pixel(float pixel) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - // mapbox P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1 - return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ; - } - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { - // amap P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1 - return pixel * pow(2.0, (19.0 - u_Zoom)); - } - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { - // amap2 P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3 - return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))* u_FocalDistance ; - } - return pixel * u_FocalDistance; -} - -// Project meter into the unit of pixel which used in the camera world space -float project_float_meter(float meter) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - // Since the zoom level uniform is updated by mapservice and it's alread been subtracted by 1 - // Not sure if we are supposed to do that again - return meter; - } else { - return project_float_pixel(meter); - } - - // TODO: change the following code to make adaptations for amap - // return u_FocalDistance * TILE_SIZE * pow(2.0, u_Zoom) * meter / EARTH_CIRCUMFERENCE; -} - -float project_pixel(float pixel) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { - // amap P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1 - return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ; - } - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { - // amap2 P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3 - return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ; - } - return pixel * u_FocalDistance; -} -vec2 project_pixel(vec2 pixel) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { - // P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1 - return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ; - } - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { - // P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3 - return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ; - } - return pixel * -1. * u_FocalDistance; -} -vec3 project_pixel(vec3 pixel) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { - // P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1 - return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ; - } - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { - // P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3 - return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ; - } - return pixel * -1. * u_FocalDistance; -} - -vec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET || - u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - // Needs to be divided with project_uCommonUnitsPerMeter - position.w *= u_PixelsPerMeter.z; - } - - return viewProjectionMatrix * position + center; -} - -// Projects from common space coordinates to clip space -vec4 project_common_position_to_clipspace(vec4 position) { - return project_common_position_to_clipspace( - position, - u_ViewProjectionMatrix, - u_ViewportCenterProjection - ); -} - -vec4 unproject_clipspace_to_position(vec4 clipspacePos, mat4 u_InverseViewProjectionMatrix) { - vec4 pos = u_InverseViewProjectionMatrix * (clipspacePos - u_ViewportCenterProjection); - - if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET || - u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - // Needs to be divided with project_uCommonUnitsPerMeter - pos.w = pos.w / u_PixelsPerMeter.z; - } - return pos; -} - - -bool isEqual( float a, float b) { - return a< b + 0.001 && a > b - 0.001; -} - -// \u652F\u6301 GaodeV2\u3001Mapbox -vec4 project_common_position_to_clipspace_v2(vec4 position) { - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - return u_Mvp * position; - } else { - return project_common_position_to_clipspace(position); - } -} -`,uE=`vec2 rotate_matrix(vec2 v, float a) { - float b = a / 180.0 * 3.1415926535897932384626433832795; - float s = sin(b); - float c = cos(b); - mat2 m = mat2(c, s, -s, c); - return m * v; -}`,Y2=`/** - * 2D signed distance field functions - * @see http://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm - */ - -float ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; } - -float sdCircle(vec2 p, float r) { - return length(p) - r; -} - -float sdEquilateralTriangle(vec2 p) { - float k = sqrt(3.0); - p.x = abs(p.x) - 1.0; - p.y = p.y + 1.0/k; - if( p.x + k*p.y > 0.0 ) p = vec2(p.x-k*p.y,-k*p.x-p.y)/2.0; - p.x -= clamp( p.x, -2.0, 0.0 ); - return -length(p)*sign(p.y); -} - -float sdBox(vec2 p, vec2 b) { - vec2 d = abs(p)-b; - return length(max(d,vec2(0))) + min(max(d.x,d.y),0.0); -} - -float sdPentagon(vec2 p, float r) { - vec3 k = vec3(0.809016994,0.587785252,0.726542528); - p.x = abs(p.x); - p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y); - p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y); - p -= vec2(clamp(p.x,-r*k.z,r*k.z),r); - return length(p)*sign(p.y); -} - -float sdHexagon(vec2 p, float r) { - vec3 k = vec3(-0.866025404,0.5,0.577350269); - p = abs(p); - p -= 2.0*min(dot(k.xy,p),0.0)*k.xy; - p -= vec2(clamp(p.x, -k.z*r, k.z*r), r); - return length(p)*sign(p.y); -} - -float sdOctogon(vec2 p, float r) { - vec3 k = vec3(-0.9238795325, 0.3826834323, 0.4142135623 ); - p = abs(p); - p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y); - p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y); - p -= vec2(clamp(p.x, -k.z*r, k.z*r), r); - return length(p)*sign(p.y); -} - -float sdHexagram(vec2 p, float r) { - vec4 k=vec4(-0.5,0.8660254038,0.5773502692,1.7320508076); - p = abs(p); - p -= 2.0*min(dot(k.xy,p),0.0)*k.xy; - p -= 2.0*min(dot(k.yx,p),0.0)*k.yx; - p -= vec2(clamp(p.x,r*k.z,r*k.w),r); - return length(p)*sign(p.y); -} - -float sdRhombus(vec2 p, vec2 b) { - vec2 q = abs(p); - float h = clamp((-2.0*ndot(q,b)+ndot(b,b))/dot(b,b),-1.0,1.0); - float d = length( q - 0.5*b*vec2(1.0-h,1.0+h) ); - return d * sign( q.x*b.y + q.y*b.x - b.x*b.y ); -} - -float sdVesica(vec2 p, float r, float d) { - p = abs(p); - float b = sqrt(r*r-d*d); // can delay this sqrt - return ((p.y-b)*d>p.x*b) - ? length(p-vec2(0.0,b)) - : length(p-vec2(-d,0.0))-r; -} -`,IA=/precision\s+(high|low|medium)p\s+float/,RA=`#ifdef GL_FRAGMENT_PRECISION_HIGH - precision highp float; - #else - precision mediump float; -#endif -`,OA=/#pragma include (["^+"]?["[a-zA-Z_0-9](.*)"]*?)/g,K2=/void\s+main\s*\([^)]*\)\s*\{\n?/,q2=/}\n?[^{}]*$/,LA=(EA=(0,bo.b2)(),EA(SA=function(){function e(){(0,Je.Z)(this,e),(0,St.Z)(this,"moduleCache",{}),(0,St.Z)(this,"rawContentCache",{})}return(0,vt.Z)(e,[{key:"registerBuiltinModules",value:function(){this.destroy(),this.registerModule("common",{vs:$2,fs:$2}),this.registerModule("decode",{vs:CA,fs:""}),this.registerModule("scene_uniforms",{vs:Vy,fs:Vy}),this.registerModule("picking_uniforms",{vs:TA,fs:TA}),this.registerModule("projection",{vs:PA,fs:PA}),this.registerModule("project",{vs:X2,fs:""}),this.registerModule("sdf_2d",{vs:"",fs:Y2}),this.registerModule("lighting",{vs:G2,fs:""}),this.registerModule("light",{vs:H2,fs:""}),this.registerModule("picking",{vs:W2,fs:MA}),this.registerModule("rotation_2d",{vs:uE,fs:""})}},{key:"registerModule",value:function(r,n){n.vs=n.vs.replace(/\r\n/g,` -`),n.fs=n.fs.replace(/\r\n/g,` -`);var t=n.vs,o=n.fs,u=n.uniforms,c=n.inject,v=Uy(t),E=v.content,G=v.uniforms,ie=Uy(o),xe=ie.content,Fe=ie.uniforms;this.rawContentCache[r]={fs:xe,inject:c,uniforms:(0,Me.Z)((0,Me.Z)((0,Me.Z)({},G),Fe),u),vs:E}}},{key:"destroy",value:function(){this.moduleCache={},this.rawContentCache={}}},{key:"getModule",value:function(r){var n=this,t=this.rawContentCache[r].vs,o=this.rawContentCache[r].fs,u=this.rawContentCache[r].inject,c={};u!=null&&u["vs:#decl"]&&(t=(u==null?void 0:u["vs:#decl"])+t,c=Uy(u==null?void 0:u["vs:#decl"]).uniforms),u!=null&&u["vs:#main-start"]&&(t=t.replace(K2,function(ar){return ar+(u==null?void 0:u["vs:#main-start"])})),u!=null&&u["fs:#decl"]&&(o=(u==null?void 0:u["fs:#decl"])+o);var v=this.processModule(t,[],"vs"),E=v.content,G=v.includeList,ie=this.processModule(o,[],"fs"),xe=ie.content,Fe=ie.includeList,it="",gt=V2(G.concat(Fe).concat(r)).reduce(function(ar,Mr){return(0,Me.Z)((0,Me.Z)({},ar),n.rawContentCache[Mr].uniforms)},(0,Me.Z)({},c));IA.test(xe)||(it=it+RA),it=it+xe;var Dt="";return IA.test(E)||(Dt=Dt+RA),Dt=Dt+E,this.moduleCache[r]={fs:it.trim(),uniforms:gt,vs:Dt.trim()},this.moduleCache[r]}},{key:"processModule",value:function(r,n,t){var o=this,u=r.replace(OA,function(c,v){var E=v.split(" "),G=E[0].replace(/"/g,"");if(n.indexOf(G)>-1)return"";var ie=o.rawContentCache[G][t];n.push(G);var xe=o.processModule(ie,n,t),Fe=xe.content;return Fe});return{content:u,includeList:n}}},{key:"injectDefines",value:function(r){var n=Object.keys(r).reduce(function(t,o){return t+"#define ".concat(o.toUpperCase()," ").concat(r[o],`; -`)},` -`);return n}}]),e}())||SA);function DA(e,i){for(;!Object.prototype.hasOwnProperty.call(e,i)&&(e=(0,et.Z)(e),e!==null););return e}function Pd(){return typeof Reflect!="undefined"&&Reflect.get?Pd=Reflect.get.bind():Pd=function(i,r,n){var t=DA(i,r);if(t){var o=Object.getOwnPropertyDescriptor(t,r);return o.get?o.get.call(arguments.length<3?i:n):o.value}},Pd.apply(this,arguments)}var Cg=function(e){return e.Normal="normal",e.PostProcessing="post-processing",e}({}),kA,sy,M1=(kA=(0,bo.b2)(),kA(sy=function(){function e(){(0,Je.Z)(this,e),(0,St.Z)(this,"shaderModuleService",void 0),(0,St.Z)(this,"rendererService",void 0),(0,St.Z)(this,"cameraService",void 0),(0,St.Z)(this,"mapService",void 0),(0,St.Z)(this,"interactionService",void 0),(0,St.Z)(this,"layerService",void 0),(0,St.Z)(this,"config",void 0)}return(0,vt.Z)(e,[{key:"getName",value:function(){return""}},{key:"getType",value:function(){return Cg.Normal}},{key:"init",value:function(r,n){this.config=n,this.rendererService=r.getContainer().get(vr.IRendererService),this.cameraService=r.getContainer().get(vr.ICameraService),this.mapService=r.getContainer().get(vr.IMapService),this.interactionService=r.getContainer().get(vr.IInteractionService),this.layerService=r.getContainer().get(vr.ILayerService),this.shaderModuleService=r.getContainer().get(vr.IShaderModuleService)}},{key:"render",value:function(r){}}]),e}())||sy),b_,$y;function Q2(e){var i=J2();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function J2(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var FA=(b_=(0,bo.b2)(),b_($y=function(e){(0,Ce.Z)(r,e);var i=Q2(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getName",value:function(){return"clear"}},{key:"init",value:function(t,o){Pd((0,et.Z)(r.prototype),"init",this).call(this,t,o)}},{key:"render",value:function(){this.rendererService.clear({color:[0,0,0,0],depth:1,framebuffer:null})}}]),r}(M1))||$y),BA,NA,zA,x_,ZA;function ex(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=UA(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function UA(e,i){if(e){if(typeof e=="string")return w_(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w_(e,i)}}function w_(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);rar||Rn<0||kn>Mr||kn<0)){var ui;gt(n.pickingFBO,(0,Qi.Z)(Qr().mark(function Di(){var Aa,Pa,Lo,ns,ws;return Qr().wrap(function(ih){for(;;)switch(ih.prev=ih.next){case 0:return ih.next=2,it({x:Math.round(Rn),y:Math.round(Mr-(E+1)*Yo),width:1,height:1,data:new Uint8Array(1*1*4),framebuffer:n.pickingFBO});case 2:ui=ih.sent,ui[0]!==0||ui[1]!==0||ui[2]!==0?(Pa=sa(ui),Lo=n.layer.getSource().getFeatureById(Pa),ns={x:v,y:E,type:ie,lngLat:G,featureId:Pa,feature:Lo},Lo&&(n.layer.setCurrentPickId(Pa),n.triggerHoverOnLayer(ns))):(ws={x:v,y:E,lngLat:G,type:n.layer.getCurrentPickId()===null?"un"+ie:"mouseout",featureId:null,feature:null},n.triggerHoverOnLayer((0,Me.Z)((0,Me.Z)({},ws),{},{type:"unpick"})),n.triggerHoverOnLayer(ws),n.layer.setCurrentPickId(null)),mn&&n.highlightPickedFeature(ui),zn&&ie==="click"&&((Aa=ui)===null||Aa===void 0?void 0:Aa.toString())!==[0,0,0,0].toString()&&n.selectFeature(ui);case 6:case"end":return ih.stop()}},Di)})))}}}),n}return(0,vt.Z)(r,[{key:"getType",value:function(){return Cg.Normal}},{key:"getName",value:function(){return"pixelPicking"}},{key:"init",value:function(t,o){Pd((0,et.Z)(r.prototype),"init",this).call(this,t,o),this.layer=t;var u=this.rendererService,c=u.createTexture2D,v=u.createFramebuffer,E=u.getViewportSize,G=E(),ie=G.width,xe=G.height,Fe=c({width:ie,height:xe,wrapS:Or.CLAMP_TO_EDGE,wrapT:Or.CLAMP_TO_EDGE,label:"Picking Texture"});this.pickingFBO=v({color:Fe}),this.interactionService.on(nl.Hover,this.pickFromPickingFBO),this.interactionService.on(nl.Select,this.selectFeatureHandle.bind(this)),this.interactionService.on(nl.Active,this.highlightFeatureHandle.bind(this))}},{key:"render",value:function(t){var o=this;if(!this.alreadyInRendering){var u=this.rendererService,c=u.getViewportSize,v=u.useFramebuffer,E=u.clear,G=c(),ie=G.width,xe=G.height;this.alreadyInRendering=!0,(this.width!==ie||this.height!==xe)&&(this.pickingFBO.resize({width:ie,height:xe}),this.width=ie,this.height=xe),v(this.pickingFBO,function(){E({framebuffer:o.pickingFBO,color:[0,0,0,0],stencil:0,depth:1});var Fe=o.layer.multiPassRenderer.getRenderFlag();o.layer.multiPassRenderer.setRenderFlag(!1),t.hooks.beforePickingEncode.call(),t.render(),t.hooks.afterPickingEncode.call(),o.layer.multiPassRenderer.setRenderFlag(Fe),o.alreadyInRendering=!1})}}},{key:"triggerHoverOnLayer",value:function(t){this.layer.emit(t.type,t)}},{key:"highlightPickedFeature",value:function(t){var o=(0,wi.Z)(t,3),u=o[0],c=o[1],v=o[2];this.layer.hooks.beforeHighlight.call([u,c,v]),this.layerService.renderLayers()}},{key:"selectFeature",value:function(t){var o=(0,wi.Z)(t,3),u=o[0],c=o[1],v=o[2];this.layer.hooks.beforeSelect.call([u,c,v]),this.layerService.renderLayers()}},{key:"selectFeatureHandle",value:function(t){var o=t.featureId,u=vo(o);this.selectFeature(new Uint8Array(u))}},{key:"highlightFeatureHandle",value:function(t){var o=t.featureId,u=vo(o);this.highlightPickedFeature(new Uint8Array(u))}}]),r}(M1))||S_),HA,GA,WA,Hy,tg,tx=vi.camelCase,rx=vi.isNil,Gy=vi.upperFirst,nx=`attribute vec2 a_Position; - -varying vec2 v_UV; - -void main() { - v_UV = 0.5 * (a_Position + 1.0); - gl_Position = vec4(a_Position, 0., 1.); -}`,Ov=(HA=(0,bo.b2)(),GA=(0,bo.f3)(vr.IShaderModuleService),HA(WA=(Hy=function(){function e(){(0,Je.Z)(this,e),A(this,"shaderModuleService",tg,this),(0,St.Z)(this,"rendererService",void 0),(0,St.Z)(this,"config",void 0),(0,St.Z)(this,"quad",nx),(0,St.Z)(this,"enabled",!0),(0,St.Z)(this,"renderToScreen",!1),(0,St.Z)(this,"model",void 0),(0,St.Z)(this,"name",void 0),(0,St.Z)(this,"optionsToUpdate",{})}return(0,vt.Z)(e,[{key:"getName",value:function(){return this.name}},{key:"setName",value:function(r){this.name=r}},{key:"getType",value:function(){return Cg.PostProcessing}},{key:"init",value:function(r,n){this.config=n,this.rendererService=r.getContainer().get(vr.IRendererService),this.shaderModuleService=r.getContainer().get(vr.IShaderModuleService);var t=this.rendererService,o=t.createAttribute,u=t.createBuffer,c=t.createModel,v=this.setupShaders(),E=v.vs,G=v.fs,ie=v.uniforms;this.model=c({vs:E,fs:G,attributes:{a_Position:o({buffer:u({data:[-4,-4,4,-4,0,4],type:Or.FLOAT}),size:2})},uniforms:(0,Me.Z)((0,Me.Z)({u_Texture:null},ie),this.config&&this.convertOptionsToUniforms(this.config)),depth:{enable:!1},count:3,blend:{enable:this.getName()==="copy"}})}},{key:"render",value:function(r,n){var t=this,o=r.multiPassRenderer.getPostProcessor(),u=this.rendererService,c=u.useFramebuffer,v=u.getViewportSize,E=u.clear,G=v(),ie=G.width,xe=G.height;c(this.renderToScreen?null:o.getWriteFBO(),function(){E({framebuffer:o.getWriteFBO(),color:[0,0,0,0],depth:1,stencil:0});var Fe=(0,Me.Z)({u_BloomFinal:0,u_Texture:o.getReadFBO(),u_ViewportSize:[ie,xe]},t.convertOptionsToUniforms(t.optionsToUpdate));n&&(Fe.u_BloomFinal=1,Fe.u_Texture2=n),t.model.draw({uniforms:Fe})})}},{key:"isEnabled",value:function(){return this.enabled}},{key:"setEnabled",value:function(r){this.enabled=r}},{key:"setRenderToScreen",value:function(r){this.renderToScreen=r}},{key:"updateOptions",value:function(r){this.optionsToUpdate=(0,Me.Z)((0,Me.Z)({},this.optionsToUpdate),r)}},{key:"setupShaders",value:function(){throw new Error("Method not implemented.")}},{key:"convertOptionsToUniforms",value:function(r){var n={};return Object.keys(r).forEach(function(t){rx(r[t])||(n["u_".concat(Gy(tx(t)))]=r[t])}),n}}]),e}(),tg=p(Hy.prototype,"shaderModuleService",[GA],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Hy))||WA),XA,YA;function ix(e){var i=KA();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function KA(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var ax=`varying vec2 v_UV; - -uniform float u_BloomFinal: 0.0; -uniform sampler2D u_Texture; -uniform sampler2D u_Texture2; - -uniform vec2 u_ViewportSize: [1.0, 1.0]; -uniform float u_radius: 5.0; -uniform float u_intensity: 0.3; -uniform float u_baseRadio: 0.5; - -// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl -vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) { - vec4 color = vec4(0.0); - vec2 off1 = vec2(1.3846153846) * direction; - vec2 off2 = vec2(3.2307692308) * direction; - color += texture2D(image, uv) * 0.2270270270; - color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162; - color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162; - color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703; - color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703; - return color; -} - -float luminance(vec4 color) { - return 0.2125 * color.r + 0.7154 * color.g + 0.0721 * color.b; -} - -void main() { - // vec4 baseColor = texture2D(u_Texture, v_UV); - - float r = sqrt(u_radius); - - vec4 c1 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(u_radius, 0.0)); - // c1 *= luminance(c1); - vec4 c2 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(0.0, u_radius)); - // c2 *= luminance(c2); - vec4 c3 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(r, r)); - // c3 *= luminance(c3); - vec4 c4 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(r, -r)); - // c4 *= luminance(c4); - vec4 inbloomColor = (c1 + c2 + c3 + c4) * 0.25; - - // float lum = luminance(inbloomColor); - // inbloomColor.rgb *= lum; - - if(u_BloomFinal > 0.0) { - vec4 baseColor = texture2D(u_Texture2, v_UV); - float baselum = luminance(baseColor); - gl_FragColor = mix(inbloomColor, baseColor, u_baseRadio); - if(baselum <= 0.2) { - gl_FragColor = inbloomColor * u_intensity; - } - } else { - gl_FragColor = inbloomColor; - } -}`,ox=`attribute vec2 a_Position; - -varying vec2 v_UV; - -void main() { - v_UV = 0.5 * (a_Position + 1.0); - gl_Position = vec4(a_Position, 0., 1.); -}`,P1=vi.isNil,Wy=(XA=(0,bo.b2)(),XA(YA=function(e){(0,Ce.Z)(r,e);var i=ix(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:ox,fs:ax});var t=this.shaderModuleService.getModule("blur-pass"),o=t.vs,u=t.fs,c=t.uniforms,v=this.rendererService.getViewportSize(),E=v.width,G=v.height;return{vs:o,fs:u,uniforms:(0,Me.Z)((0,Me.Z)({},c),{},{u_ViewportSize:[E,G]})}}},{key:"convertOptionsToUniforms",value:function(t){var o={};return P1(t.bloomRadius)||(o.u_radius=t.bloomRadius),P1(t.bloomIntensity)||(o.u_intensity=t.bloomIntensity),P1(t.bloomBaseRadio)||(o.u_baseRadio=t.bloomBaseRadio),o}}]),r}(Ov))||YA),C_,qA;function sx(e){var i=QA();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function QA(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var ux=`varying vec2 v_UV; - -uniform sampler2D u_Texture; - -uniform vec2 u_ViewportSize: [1.0, 1.0]; -uniform vec2 u_BlurDir: [1.0, 0.0]; - -// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl -vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) { - vec4 color = vec4(0.0); - vec2 off1 = vec2(1.3846153846) * direction; - vec2 off2 = vec2(3.2307692308) * direction; - color += texture2D(image, uv) * 0.2270270270; - color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162; - color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162; - color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703; - color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703; - return color; -} - -void main() { - gl_FragColor = blur9(u_Texture, v_UV, u_ViewportSize, u_BlurDir); -}`,lx=`attribute vec2 a_Position; - -varying vec2 v_UV; - -void main() { - v_UV = 0.5 * (a_Position + 1.0); - gl_Position = vec4(a_Position, 0., 1.); -}`,cx=vi.isNil,fx=(C_=(0,bo.b2)(),C_(qA=function(e){(0,Ce.Z)(r,e);var i=sx(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:lx,fs:ux});var t=this.shaderModuleService.getModule("blur-pass"),o=t.vs,u=t.fs,c=t.uniforms,v=this.rendererService.getViewportSize(),E=v.width,G=v.height;return{vs:o,fs:u,uniforms:(0,Me.Z)((0,Me.Z)({},c),{},{u_ViewportSize:[E,G]})}}},{key:"convertOptionsToUniforms",value:function(t){var o={};return cx(t.blurRadius)||(o.u_BlurDir=[t.blurRadius,0]),o}}]),r}(Ov))||qA),JA,eb;function hx(e){var i=dx();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function dx(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var px=`varying vec2 v_UV; - -uniform sampler2D u_Texture; - -uniform vec2 u_ViewportSize: [1.0, 1.0]; -uniform vec2 u_BlurDir: [1.0, 0.0]; - -// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl -vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) { - vec4 color = vec4(0.0); - vec2 off1 = vec2(1.3846153846) * direction; - vec2 off2 = vec2(3.2307692308) * direction; - color += texture2D(image, uv) * 0.2270270270; - color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162; - color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162; - color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703; - color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703; - return color; -} - -void main() { - gl_FragColor = blur9(u_Texture, v_UV, u_ViewportSize, u_BlurDir); -}`,mx=`attribute vec2 a_Position; - -varying vec2 v_UV; - -void main() { - v_UV = 0.5 * (a_Position + 1.0); - gl_Position = vec4(a_Position, 0., 1.); -}`,vx=vi.isNil,gx=(JA=(0,bo.b2)(),JA(eb=function(e){(0,Ce.Z)(r,e);var i=hx(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:mx,fs:px});var t=this.shaderModuleService.getModule("blur-pass"),o=t.vs,u=t.fs,c=t.uniforms,v=this.rendererService.getViewportSize(),E=v.width,G=v.height;return{vs:o,fs:u,uniforms:(0,Me.Z)((0,Me.Z)({},c),{},{u_ViewportSize:[E,G]})}}},{key:"convertOptionsToUniforms",value:function(t){var o={};return vx(t.blurRadius)||(o.u_BlurDir=[0,t.blurRadius]),o}}]),r}(Ov))||eb),tb,rb;function yx(e){var i=_x();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function _x(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var L=`varying vec2 v_UV; - -uniform sampler2D u_Texture; -uniform vec2 u_ViewportSize: [1.0, 1.0]; -uniform vec2 u_Center : [0.5, 0.5]; -uniform float u_Angle : 0; -uniform float u_Size : 8; - -#pragma include "common" - -float scale = PI / u_Size; - -float pattern(float u_Angle, vec2 texSize, vec2 texCoord) { - float s = sin(u_Angle), c = cos(u_Angle); - vec2 tex = texCoord * texSize - u_Center * texSize; - vec2 point = vec2( - c * tex.x - s * tex.y, - s * tex.x + c * tex.y - ) * scale; - return (sin(point.x) * sin(point.y)) * 4.0; -} - -// https://github.com/evanw/glfx.js/blob/master/src/filters/fun/colorhalftone.js -vec4 colorHalftone_filterColor(vec4 color, vec2 texSize, vec2 texCoord) { - vec3 cmy = 1.0 - color.rgb; - float k = min(cmy.x, min(cmy.y, cmy.z)); - cmy = (cmy - k) / (1.0 - k); - cmy = clamp( - cmy * 10.0 - 3.0 + vec3( - pattern(u_Angle + 0.26179, texSize, texCoord), - pattern(u_Angle + 1.30899, texSize, texCoord), - pattern(u_Angle, texSize, texCoord) - ), - 0.0, - 1.0 - ); - k = clamp(k * 10.0 - 5.0 + pattern(u_Angle + 0.78539, texSize, texCoord), 0.0, 1.0); - return vec4(1.0 - cmy - k, color.a); -} - -void main() { - gl_FragColor = vec4(texture2D(u_Texture, v_UV)); - gl_FragColor = colorHalftone_filterColor(gl_FragColor, u_ViewportSize, v_UV); -}`,N=`attribute vec2 a_Position; - -varying vec2 v_UV; - -void main() { - v_UV = 0.5 * (a_Position + 1.0); - gl_Position = vec4(a_Position, 0., 1.); -}`,_e=(tb=(0,bo.b2)(),tb(rb=function(e){(0,Ce.Z)(r,e);var i=yx(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("colorhalftone-pass",{vs:N,fs:L});var t=this.shaderModuleService.getModule("colorhalftone-pass"),o=t.vs,u=t.fs,c=t.uniforms,v=this.rendererService.getViewportSize(),E=v.width,G=v.height;return{vs:o,fs:u,uniforms:(0,Me.Z)((0,Me.Z)({},c),{},{u_ViewportSize:[E,G]})}}}]),r}(Ov))||rb),Ne,ir;function Ar(e){var i=pn();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function pn(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var En=`varying vec2 v_UV; - -uniform sampler2D u_Texture; - -void main() { - gl_FragColor = vec4(texture2D(u_Texture, v_UV)); -}`,In=`attribute vec2 a_Position; - -varying vec2 v_UV; - -void main() { - v_UV = 0.5 * (a_Position + 1.0); - gl_Position = vec4(a_Position, 0., 1.); -}`,wn=(Ne=(0,bo.b2)(),Ne(ir=function(e){(0,Ce.Z)(r,e);var i=Ar(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("copy-pass",{vs:In,fs:En}),this.shaderModuleService.getModule("copy-pass")}}]),r}(Ov))||ir),$i,Hi;function Ya(e){var i=Wi();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Wi(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Ka=`varying vec2 v_UV; - -uniform sampler2D u_Texture; -uniform vec2 u_ViewportSize: [1.0, 1.0]; -uniform vec2 u_Center : [0.5, 0.5]; -uniform float u_Scale : 10; - -// https://github.com/evanw/glfx.js/blob/master/src/filters/fun/hexagonalpixelate.js -vec4 hexagonalPixelate_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) { - vec2 tex = (texCoord * texSize - u_Center * texSize) / u_Scale; - tex.y /= 0.866025404; - tex.x -= tex.y * 0.5; - vec2 a; - if (tex.x + tex.y - floor(tex.x) - floor(tex.y) < 1.0) { - a = vec2(floor(tex.x), floor(tex.y)); - } - else a = vec2(ceil(tex.x), ceil(tex.y)); - vec2 b = vec2(ceil(tex.x), floor(tex.y)); - vec2 c = vec2(floor(tex.x), ceil(tex.y)); - vec3 TEX = vec3(tex.x, tex.y, 1.0 - tex.x - tex.y); - vec3 A = vec3(a.x, a.y, 1.0 - a.x - a.y); - vec3 B = vec3(b.x, b.y, 1.0 - b.x - b.y); - vec3 C = vec3(c.x, c.y, 1.0 - c.x - c.y); - float alen = length(TEX - A); - float blen = length(TEX - B); - float clen = length(TEX - C); - vec2 choice; - if (alen < blen) { - if (alen < clen) choice = a; - else choice = c; - } else { - if (blen < clen) choice = b; - else choice = c; - } - choice.x += choice.y * 0.5; - choice.y *= 0.866025404; - choice *= u_Scale / texSize; - return texture2D(texture, choice + u_Center); -} - -void main() { - gl_FragColor = vec4(texture2D(u_Texture, v_UV)); - gl_FragColor = hexagonalPixelate_sampleColor(u_Texture, u_ViewportSize, v_UV); -}`,po=`attribute vec2 a_Position; - -varying vec2 v_UV; - -void main() { - v_UV = 0.5 * (a_Position + 1.0); - gl_Position = vec4(a_Position, 0., 1.); -}`,Zo=($i=(0,bo.b2)(),$i(Hi=function(e){(0,Ce.Z)(r,e);var i=Ya(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("hexagonalpixelate-pass",{vs:po,fs:Ka});var t=this.shaderModuleService.getModule("hexagonalpixelate-pass"),o=t.vs,u=t.fs,c=t.uniforms,v=this.rendererService.getViewportSize(),E=v.width,G=v.height;return{vs:o,fs:u,uniforms:(0,Me.Z)((0,Me.Z)({},c),{},{u_ViewportSize:[E,G]})}}}]),r}(Ov))||Hi),Uo,Oa;function rs(e){var i=Du();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Du(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Us=`varying vec2 v_UV; - -uniform sampler2D u_Texture; -uniform vec2 u_ViewportSize: [1.0, 1.0]; -uniform float u_Strength : 0.6; - -vec4 ink_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) { - vec2 dx = vec2(1.0 / texSize.x, 0.0); - vec2 dy = vec2(0.0, 1.0 / texSize.y); - vec4 color = texture2D(texture, texCoord); - float bigTotal = 0.0; - float smallTotal = 0.0; - vec3 bigAverage = vec3(0.0); - vec3 smallAverage = vec3(0.0); - for (float x = -2.0; x <= 2.0; x += 1.0) { - for (float y = -2.0; y <= 2.0; y += 1.0) { - vec3 sample = texture2D(texture, texCoord + dx * x + dy * y).rgb; - bigAverage += sample; - bigTotal += 1.0; - if (abs(x) + abs(y) < 2.0) { - smallAverage += sample; - smallTotal += 1.0; - } - } - } - vec3 edge = max(vec3(0.0), bigAverage / bigTotal - smallAverage / smallTotal); - float power = u_Strength * u_Strength * u_Strength * u_Strength * u_Strength; - return vec4(color.rgb - dot(edge, edge) * power * 100000.0, color.a); -} - -void main() { - gl_FragColor = vec4(texture2D(u_Texture, v_UV)); - gl_FragColor = ink_sampleColor(u_Texture, u_ViewportSize, v_UV); -}`,vl=`attribute vec2 a_Position; - -varying vec2 v_UV; - -void main() { - v_UV = 0.5 * (a_Position + 1.0); - gl_Position = vec4(a_Position, 0., 1.); -}`,Tl=(Uo=(0,bo.b2)(),Uo(Oa=function(e){(0,Ce.Z)(r,e);var i=rs(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("ink-pass",{vs:vl,fs:Us});var t=this.shaderModuleService.getModule("ink-pass"),o=t.vs,u=t.fs,c=t.uniforms,v=this.rendererService.getViewportSize(),E=v.width,G=v.height;return{vs:o,fs:u,uniforms:(0,Me.Z)((0,Me.Z)({},c),{},{u_ViewportSize:[E,G]})}}}]),r}(Ov))||Oa),Ul,ku;function Hl(e){var i=jl();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function jl(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Mh=`varying vec2 v_UV; - -uniform sampler2D u_Texture; -uniform float u_Amount : 0.5; - -float rand(vec2 co) { - return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); -} - -// https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js -vec4 noise_filterColor(vec4 color, vec2 texCoord) { - float diff = (rand(texCoord) - 0.5) * u_Amount; - color.r += diff; - color.g += diff; - color.b += diff; - return color; -} - -void main() { - gl_FragColor = vec4(texture2D(u_Texture, v_UV)); - gl_FragColor = noise_filterColor(gl_FragColor, v_UV); -}`,Xh=`attribute vec2 a_Position; - -varying vec2 v_UV; - -void main() { - v_UV = 0.5 * (a_Position + 1.0); - gl_Position = vec4(a_Position, 0., 1.); -}`,Yh=(Ul=(0,bo.b2)(),Ul(ku=function(e){(0,Ce.Z)(r,e);var i=Hl(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("noise-pass",{vs:Xh,fs:Mh}),this.shaderModuleService.getModule("noise-pass")}}]),r}(Ov))||ku),sd,Nu;function ts(e){var i=Rs();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Rs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var il=`attribute vec2 a_Position; - -varying vec2 v_UV; - -void main() { - v_UV = 0.5 * (a_Position + 1.0); - gl_Position = vec4(a_Position, 0., 1.); -}`,Ic=`varying vec2 v_UV; - -uniform sampler2D u_Texture; - -uniform float u_Amount : 0.5; - -// https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/sepia.js -vec4 sepia_filterColor(vec4 color) { - float r = color.r; - float g = color.g; - float b = color.b; - color.r = - min(1.0, (r * (1.0 - (0.607 * u_Amount))) + (g * (0.769 * u_Amount)) + (b * (0.189 * u_Amount))); - color.g = min(1.0, (r * 0.349 * u_Amount) + (g * (1.0 - (0.314 * u_Amount))) + (b * 0.168 * u_Amount)); - color.b = min(1.0, (r * 0.272 * u_Amount) + (g * 0.534 * u_Amount) + (b * (1.0 - (0.869 * u_Amount)))); - return color; -} - -void main() { - gl_FragColor = vec4(texture2D(u_Texture, v_UV)); - gl_FragColor = sepia_filterColor(gl_FragColor); -}`,Kc=(sd=(0,bo.b2)(),sd(Nu=function(e){(0,Ce.Z)(r,e);var i=ts(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("sepia-pass",{vs:il,fs:Ic}),this.shaderModuleService.getModule("sepia-pass")}}]),r}(Ov))||Nu),Zh,Kh,hp,Id,pd,bd,dp=(Zh=(0,bo.b2)(),Kh=(0,bo.f3)(vr.IRendererService),hp=(0,bo.zY)(),Zh(Id=(pd=function(){function e(){(0,Je.Z)(this,e),A(this,"rendererService",bd,this),(0,St.Z)(this,"passes",[]),(0,St.Z)(this,"readFBO",void 0),(0,St.Z)(this,"writeFBO",void 0)}return(0,vt.Z)(e,[{key:"getReadFBO",value:function(){return this.readFBO}},{key:"getWriteFBO",value:function(){return this.writeFBO}},{key:"getCurrentFBOTex",value:function(){var r=this.rendererService,n=r.getViewportSize,t=r.createTexture2D,o=n(),u=o.width,c=o.height;return t({x:0,y:0,width:u,height:c,copy:!0})}},{key:"getReadFBOTex",value:function(){var r=this,n=this.rendererService.useFramebuffer;return new Promise(function(t){n(r.readFBO,(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:t(r.getCurrentFBOTex());case 1:case"end":return c.stop()}},o)})))})}},{key:"renderBloomPass",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t,o){var u,c;return Qr().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,this.getReadFBOTex();case 2:u=E.sent,c=0;case 4:if(!(c<4)){E.next=11;break}return E.next=7,o.render(t,u);case 7:this.swap(),c++,E.next=4;break;case 11:case"end":return E.stop()}},n,this)}));function r(n,t){return i.apply(this,arguments)}return r}()},{key:"render",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t){var o,u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:o=0;case 1:if(!(o0;)r=r+n*(t%i),t=Math.floor(t/i),n=n/i;return r}var fv=1,uy=(dm=(0,bo.b2)(),am=(0,bo.f3)(vr.IShaderModuleService),dm(Um=(w0=function(e){(0,Ce.Z)(r,e);var i=Nm(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u=1&&(E(this.copyRenderTarget,function(){o.outputModel.draw({uniforms:{u_Texture:o.outputRenderTarget}})}),E(t.multiPassRenderer.getPostProcessor().getReadFBO(),function(){o.copyModel.draw({uniforms:{u_Texture:o.copyRenderTarget}})}),t.multiPassRenderer.getPostProcessor().render(t));var Mr=this.prevRenderTarget;this.prevRenderTarget=this.outputRenderTarget,this.outputRenderTarget=Mr,this.frame++,this.cameraService.clearJitterProjectionMatrix()}},{key:"isFinished",value:function(){return this.frame>=this.haltonSequence.length}},{key:"resetFrame",value:function(){this.frame=0}},{key:"stopAccumulating",value:function(){this.accumulatingId=0,window.clearTimeout(this.timer)}},{key:"createTriangleModel",value:function(t,o,u){this.shaderModuleService.registerModule(t,{vs:Sm,fs:o});var c=this.shaderModuleService.getModule(t),v=c.vs,E=c.fs,G=c.uniforms,ie=this.rendererService,xe=ie.createAttribute,Fe=ie.createBuffer,it=ie.createModel;return it((0,Me.Z)({vs:v,fs:E,attributes:{a_Position:xe({buffer:Fe({data:[-4,-4,4,-4,0,4],type:Or.FLOAT}),size:2})},uniforms:(0,Me.Z)({},G),depth:{enable:!1},count:3},u))}}]),r}(M1),Om=p(w0.prototype,"shaderModuleService",[am],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),w0))||Um),hv=new bo.W2;hv.bind(vr.IGlobalConfigService).to(sh).inSingletonScope(),(0,bo.GW)((0,bo.b2)(),cf.EventEmitter),hv.bind(vr.IEventEmitter).to(cf.EventEmitter);var dv=(0,Nr.Z)(hv,!1),iv=function(i){var r=dv.lazyInject(i);return function(n,t,o){r.call(this,n,t),o&&(o.initializer=function(){return n[t]})}},Mg=function(i){var r=dv.lazyMultiInject(i);return function(n,t,o){r.call(this,n,t),o&&(o.initializer=function(){return n[t]})}},T0=hv,Pg=0;function Jm(){var e=new bo.W2;return e.parent=hv,e.bind(vr.SceneID).toConstantValue("".concat(Pg++)),e.bind(vr.IShaderModuleService).to(LA).inSingletonScope(),e.bind(vr.ILayerService).to(m1).inSingletonScope(),e.bind(vr.IDebugService).to(Dl).inSingletonScope(),e.bind(vr.ISceneService).to(ay).inSingletonScope(),e.bind(vr.ICameraService).to(Ou).inSingletonScope(),e.bind(vr.ICoordinateSystemService).to(Un).inSingletonScope(),e.bind(vr.IInteractionService).to(rf).inSingletonScope(),e.bind(vr.IPickingService).to(rv).inSingletonScope(),e.bind(vr.IControlService).to($c).inSingletonScope(),e.bind(vr.IMarkerService).to(Rh).inSingletonScope(),e.bind(vr.IIconService).to(Wh).inSingletonScope(),e.bind(vr.IFontService).to(Th).inSingletonScope(),e.bind(vr.IPopupService).to(rh).inSingletonScope(),e.bind(vr.INormalPass).to(FA).whenTargetNamed("clear"),e.bind(vr.INormalPass).to(Tg).whenTargetNamed("pixelPicking"),e.bind(vr.INormalPass).to(wp).whenTargetNamed("render"),e.bind(vr.INormalPass).to(uy).whenTargetNamed("taa"),e.bind(vr.IFactoryNormalPass).toFactory(function(i){return function(r){return i.container.getNamed(vr.INormalPass,r)}}),e.bind(vr.IPostProcessingPass).to(wn).whenTargetNamed("copy"),e.bind(vr.IPostProcessingPass).to(Wy).whenTargetNamed("bloom"),e.bind(vr.IPostProcessingPass).to(fx).whenTargetNamed("blurH"),e.bind(vr.IPostProcessingPass).to(gx).whenTargetNamed("blurV"),e.bind(vr.IPostProcessingPass).to(Yh).whenTargetNamed("noise"),e.bind(vr.IPostProcessingPass).to(Kc).whenTargetNamed("sepia"),e.bind(vr.IPostProcessingPass).to(_e).whenTargetNamed("colorHalftone"),e.bind(vr.IPostProcessingPass).to(Zo).whenTargetNamed("hexagonalPixelate"),e.bind(vr.IPostProcessingPass).to(Tl).whenTargetNamed("ink"),e.bind(vr.IFactoryPostProcessingPass).toFactory(function(i){return function(r){var n=i.container.getNamed(vr.IPostProcessingPass,r);return n.setName(r),n}}),e}function av(e){var i=new bo.W2;return i.parent=e,i.bind(vr.IStyleAttributeService).to(Dy).inSingletonScope(),i.bind(vr.IMultiPassRenderer).to(jA).inSingletonScope(),i.bind(vr.IPostProcessor).to(dp).inSingletonScope(),i}var rg=["circle","triangle","square","pentagon","hexagon","octogon","hexagram","rhombus","vesica"];function ly(e){return rg.indexOf(e)}var Vm=vi.clamp,ym=2,T_=4,nb=64,lE=128,M_=256,ib=512,Ax=8192,cE=16384,fE=32768,ab=null,I1=131072,bx=262144,xx=524288,hE=1048576,ob=2097152,Ex=4194304,cy=8388608,Sx=16777216,sb=null;function Xy(e,i){return e=Vm(Math.floor(e),0,255),i=Vm(Math.floor(i),0,255),256*e+i}function ub(e){var i=e.color,r=e.radius,n=e.tileX,t=e.tileY,o=e.shape,u=e.opacity,c=e.stroke,v=e.strokeWidth,E=e.strokeOpacity,G=[],ie=[],xe=[],Fe=[Xy(i[0],i[1]),Xy(i[2],i[3])],it=[Xy(c[0],c[1]),Xy(c[2],c[3])];return[[-1,-1],[1,-1],[1,1],[-1,1]].forEach(function(gt){var Dt=(0,wi.Z)(gt,2),ar=Dt[0],Mr=Dt[1];G.push([].concat(Fe,[(ar+1)*cy+(Mr+1)*ob+ly(o)*I1+r,(n+512)*xx+(t+512)*nb])),ie.push([].concat(it,[v,E])),xe.push([u,0,0,0])}),{packedBuffer:G,packedBuffer2:ie,packedBuffer3:xe}}function dE(e,i){if(e===0&&!i)return 0;if(e===1&&i)return 4294967295;var r=i?1:0,n=Math.floor(e*127);return n*sb+r*Sx+n*I1+r*ab+n*ib+r*M_+n*ym+r}var M0={ProjectionMatrix:"u_ProjectionMatrix",ViewMatrix:"u_ViewMatrix",ViewProjectionMatrix:"u_ViewProjectionMatrix",Zoom:"u_Zoom",ZoomScale:"u_ZoomScale",FocalDistance:"u_FocalDistance",CameraPosition:"u_CameraPosition"},ud={MapInitStart:"mapInitStart",LayerInitStart:"layerInitStart",LayerInitEnd:"layerInitEnd",SourceInitStart:"sourceInitStart",SourceInitEnd:"sourceInitEnd",ScaleInitStart:"scaleInitStart",ScaleInitEnd:"scaleInitEnd",MappingStart:"mappingStart",MappingEnd:"mappingEnd",BuildModelStart:"buildModelStart",BuildModelEnd:"buildModelEnd"},Mf=function(e){return e.LINEAR="linear",e.SEQUENTIAL="sequential",e.POWER="power",e.LOG="log",e.IDENTITY="identity",e.TIME="time",e.QUANTILE="quantile",e.QUANTIZE="quantize",e.THRESHOLD="threshold",e.CAT="cat",e.DIVERGING="diverging",e}({}),q0=function(e){return e.CONSTANT="constant",e.VARIABLE="variable",e}({}),pl=function(e){return e[e.Attribute=0]="Attribute",e[e.InstancedAttribute=1]="InstancedAttribute",e[e.Uniform=2]="Uniform",e}({}),pm=["mapload","mapchange","mapAfterFrameChange"],wv=["loaded","fontloaded","maploaded","resize","destroy","dragstart","dragging","dragend","dragcancel"],Q0=function(e){return e.IMAGE="image",e.CUSTOMIMAGE="customImage",e.ARRAYBUFFER="arraybuffer",e.RGB="rgb",e.TERRAINRGB="terrainRGB",e.CUSTOMRGB="customRGB",e.CUSTOMARRAYBUFFER="customArrayBuffer",e.CUSTOMTERRAINRGB="customTerrainRGB",e}({}),ng=function(){var e=(0,Qi.Z)(Qr().mark(function i(r,n,t,o){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",new Promise(function(v,E){n({x:r.x,y:r.y,z:r.z},function(G,ie){if(G||ie.length===0){E(G);return}ie&&Ja([{data:ie,bands:[0]}],t,o,function(xe,Fe){xe?E(xe):Fe&&v(Fe)})})}));case 1:case"end":return c.stop()}},i)}));return function(r,n,t,o){return e.apply(this,arguments)}}(),lb=function(){var e=(0,Qi.Z)(Qr().mark(function i(r,n){return Qr().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",new Promise(function(u,c){n({x:r.x,y:r.y,z:r.z},function(v,E){if(v||!E){c(v);return}E instanceof ArrayBuffer?ji(E,function(G,ie){G&&c(G),u(ie)}):E instanceof HTMLImageElement?u(E):c(v)})}));case 1:case"end":return o.stop()}},i)}));return function(r,n){return e.apply(this,arguments)}}();function cb(e,i){return Array.isArray(e)?typeof e[0]=="string"?e.map(function(r){return fu(r,i)}):e.map(function(r){return{url:fu(r.url,i),bands:r.bands||[0]}}):fu(e,i)}function Yy(e){return typeof e=="string"?[{url:e,bands:[0]}]:typeof e[0]=="string"?e.map(function(i){return{url:i,bands:[0]}}):e}function fb(e,i){e.xhrCancel=function(){i.map(function(r){r.abort()})}}var Z5=function(){var e=(0,Qi.Z)(Qr().mark(function i(r,n,t,o,u){var c,v,E,G,ie,xe;return Qr().wrap(function(it){for(;;)switch(it.prev=it.next){case 0:if(c=Yy(n.url),!(c.length>1)){it.next=15;break}return it.next=4,U5(c,n);case 4:if(v=it.sent,E=v.rasterFiles,G=v.xhrList,ie=v.errList,fb(r,G),!(ie.length>0)){it.next=12;break}return t(ie,null),it.abrupt("return");case 12:Ja(E,o,u,t),it.next=17;break;case 15:xe=_n(n,function(gt,Dt){if(gt)t(gt);else if(Dt){var ar=[{data:Dt,bands:c[0].bands}];Ja(ar,o,u,t)}}),fb(r,[xe]);case 17:case"end":return it.stop()}},i)}));return function(r,n,t,o,u){return e.apply(this,arguments)}}();function U5(e,i){return Cx.apply(this,arguments)}function Cx(){return Cx=(0,Qi.Z)(Qr().mark(function e(i,r){var n,t,o,u,c,v,E,G,ie,xe,Fe;return Qr().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:n=[],t=[],o=[],u=0;case 4:if(!(u1&&arguments[1]!==void 0?arguments[1]:{};if($5(e))throw new Error("tile server url is error");var r=(i==null?void 0:i.dataType)||Q0.IMAGE;r===Q0.RGB&&(r=Q0.ARRAYBUFFER);var n=function(u,c){switch(r){case Q0.IMAGE:return pE(e,u,c,i);case Q0.CUSTOMIMAGE:case Q0.CUSTOMTERRAINRGB:return lb(c,i==null?void 0:i.getCustomData);case Q0.ARRAYBUFFER:return j5(e,u,c,(i==null?void 0:i.format)||mE,i==null?void 0:i.operation);case Q0.CUSTOMARRAYBUFFER:case Q0.CUSTOMRGB:return ng(c,i==null?void 0:i.getCustomData,(i==null?void 0:i.format)||mE,i==null?void 0:i.operation);default:return pE(e,u,c,i)}},t=(0,Me.Z)((0,Me.Z)((0,Me.Z)({},V5),i),{},{getTileData:n});return{data:e,dataArray:[],tilesetOptions:t,isTile:!0}}var G5=["extent","min","max","width","height","format","operation"];function W5(e,i){var r=i.extent,n=i.min,t=i.max,o=i.width,u=i.height,c=i.format,v=i.operation,E=(0,K0.Z)(i,G5),G;if(c===void 0||Z0(e))G=Array.from(e);else{var ie=Array.isArray(e)?e:[e];G=pf(ie,c,v)}var xe={_id:1,dataArray:[(0,Me.Z)((0,Me.Z)({_id:1,data:G,width:o,height:u},E),{},{min:n,max:t,coordinates:[[r[0],r[1]],[r[2],r[3]]]})]};return xe}var X5={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0},Y5=function(){var e=(0,Qi.Z)(Qr().mark(function i(r){return Qr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(o){var u=(0,wi.Z)(r.bounds,4),c=u[0],v=u[1],E=u[2],G=u[3],ie={layers:{testTile:{features:[{type:"Feature",properties:{key:r.x+"/"+r.y+"/"+r.z,x:(c+E)/2,y:(v+G)/2},geometry:{type:"LineString",coordinates:[[E,G],[E,v],[c,v],[c,v]]}}]}}};o(ie)}));case 1:case"end":return t.stop()}},i)}));return function(r){return e.apply(this,arguments)}}();function K5(e,i){var r=function(o){return Y5(o)},n=(0,Me.Z)((0,Me.Z)((0,Me.Z)({},X5),i),{},{getTileData:r});return{data:e,dataArray:[],tilesetOptions:n,isTile:!0}}var q5=["extent","width","height"];function Q5(e,i){var r=i.extent,n=i.width,t=i.height,o=(0,K0.Z)(i,q5);e.length<3&&console.warn("RGB\u89E3\u6790\u9700\u8981\u4E09\u4E2A\u6CE2\u6BB5\u7684\u6570\u636E");for(var u=o.bands||[0,1,2],c=(0,wi.Z)(u,3),v=c[0],E=c[1],G=c[2],ie=[e[v],e[E],e[G]],xe=[],Fe=(o==null?void 0:o.countCut)||[2,98],it=(0,wi.Z)(Fe,2),gt=it[0],Dt=it[1],ar=(o==null?void 0:o.RMinMax)||mu(ie[0],gt,Dt),Mr=(o==null?void 0:o.GMinMax)||mu(ie[1],gt,Dt),Zr=(o==null?void 0:o.BMinMax)||mu(ie[2],gt,Dt),mn=0;mni&&(i=e[r]);return i}function i4(e){if(e.length===0)throw new Error("min requires at least one data point");for(var i=e[0],r=1;r=Math.abs(e[t])?r+=i-n+e[t]:r+=e[t]-n+i,i=n;return i+r*1}function a4(e){if(e.length===0)throw new Error("mean requires at least one data point");return yE(e)/e.length}var o4={min:i4,max:n4,mean:a4,sum:yE};function s4(e){var i=u4();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function u4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var l4=vi.cloneDeep,_E=vi.isFunction,c4=vi.isString,f4=vi.mergeWith;function h4(e,i){if(Array.isArray(i))return i}var d4=function(e){(0,Ce.Z)(r,e);var i=s4(r);function r(n,t){var o;return(0,Je.Z)(this,r),o=i.call(this),(0,St.Z)((0,Gr.Z)(o),"type","source"),(0,St.Z)((0,Gr.Z)(o),"isTile",!1),(0,St.Z)((0,Gr.Z)(o),"inited",!1),(0,St.Z)((0,Gr.Z)(o),"hooks",{init:new cv}),(0,St.Z)((0,Gr.Z)(o),"parser",{type:"geojson"}),(0,St.Z)((0,Gr.Z)(o),"transforms",[]),(0,St.Z)((0,Gr.Z)(o),"cluster",!1),(0,St.Z)((0,Gr.Z)(o),"clusterOptions",{enable:!1,radius:40,maxZoom:20,zoom:-99,method:"count"}),(0,St.Z)((0,Gr.Z)(o),"invalidExtent",!1),(0,St.Z)((0,Gr.Z)(o),"dataArrayChanged",!1),(0,St.Z)((0,Gr.Z)(o),"cfg",{autoRender:!0}),o.originData=n,o.initCfg(t),o.init().then(function(){o.inited=!0,o.emit("update",{type:"inited"})}),o}return(0,vt.Z)(r,[{key:"getSourceCfg",value:function(){return this.cfg}},{key:"getClusters",value:function(t){return this.clusterIndex.getClusters(this.caculClusterExtent(2),t)}},{key:"getClustersLeaves",value:function(t){return this.clusterIndex.getLeaves(t,1/0)}},{key:"getParserType",value:function(){return this.parser.type}},{key:"updateClusterData",value:function(t){var o=this,u=this.clusterOptions,c=u.method,v=c===void 0?"sum":c,E=u.field,G=this.clusterIndex.getClusters(this.caculClusterExtent(2),Math.floor(t));this.clusterOptions.zoom=t,G.forEach(function(ie){ie.id||(ie.properties.point_count=1)}),(E||_E(v))&&(G=G.map(function(ie){var xe=ie.id;if(xe){var Fe=o.clusterIndex.getLeaves(xe,1/0),it=Fe.map(function(ar){return ar.properties}),gt;if(c4(v)&&E){var Dt=Yp(it,E);gt=o4[v](Dt)}_E(v)&&(gt=v(it)),ie.properties.stat=gt}else ie.properties.point_count=1;return ie})),this.data=oe("geojson")({type:"FeatureCollection",features:G}),this.executeTrans()}},{key:"getFeatureById",value:function(t){var o=this.parser,u=o.type,c=u===void 0?"geojson":u,v=o.geometry;if(c==="geojson"&&!this.cluster){var E=t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function m4(e,i){if(e){if(typeof e=="string")return bE(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bE(e,i)}}function bE(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);rn?t:n)}}catch(Zr){o.e(Zr)}finally{o.f()}var v=(r+n)/2,E=y4(i,v);if(E.xOffset<=0||E.yOffset<=0)return{gridHash:{},gridOffset:E};var G={},ie=AE(e),xe;try{for(ie.s();!(xe=ie.n()).done;){var Fe=xe.value,it=Fe.coordinates[1],gt=Fe.coordinates[0];if(Number.isFinite(it)&&Number.isFinite(gt)){var Dt=Math.floor((it+90)/E.yOffset),ar=Math.floor((gt+180)/E.xOffset),Mr="".concat(Dt,"-").concat(ar);G[Mr]=G[Mr]||{count:0,points:[]},G[Mr].count+=1,G[Mr].points.push(Fe)}}}catch(Zr){ie.e(Zr)}finally{ie.f()}return{gridHash:G,gridOffset:E}}function y4(e,i){var r=_4(e),n=A4(i,e);return{yOffset:r,xOffset:n}}function _4(e){return e/Tx*(180/Math.PI)}function A4(e,i){return i/Tx*(180/Math.PI)/Math.cos(e*Math.PI/180)}function b4(e,i,r){return Object.keys(e).reduce(function(n,t,o){var u=t.split("-"),c=parseInt(u[0],10),v=parseInt(u[1],10),E={};if(r.field&&r.method){var G=Af(e[t].points,r.field);E[r.method]=Ls[r.method](G)}return Object.assign(E,{_id:o,coordinates:zc([-180+i.xOffset*(v+.5),-90+i.yOffset*(c+.5)]),rawData:e[t].points,count:e[t].count}),n.push(E),n},[])}var R1=Math.PI/3,x4=[0,R1,2*R1,3*R1,4*R1,5*R1];function w4(e){return e[0]}function E4(e){return e[1]}function S4(){var e=0,i=0,r=1,n=1,t=w4,o=E4,u,c,v;function E(ie){var xe={},Fe=[],it,gt=ie.length;for(it=0;it1){var Rn=ar-mn,kn=mn+(arDi*Di+Aa*Aa&&(mn=kn+(Zr&1?1:-1)/2,Zr=ui)}var Pa=mn+"-"+Zr,Lo=xe[Pa];Lo?Lo.push(Dt):(Fe.push(Lo=xe[Pa]=[Dt]),Lo.x=(mn+(Zr&1)/2)*c,Lo.y=Zr*v)}return Fe}function G(ie){var xe=0,Fe=0;return x4.map(function(it){var gt=Math.sin(it)*ie,Dt=-Math.cos(it)*ie,ar=gt-xe,Mr=Dt-Fe;return xe=gt,Fe=Dt,[ar,Mr]})}return E.hexagon=function(ie){return"m"+G(ie==null?u:+ie).join("l")+"z"},E.centers=function(){for(var ie=[],xe=Math.round(i/v),Fe=Math.round(e/c),it=xe*v;it180||Math.abs(it[1][0])>180){if(G.x>Fe){var gt=this.mapsService.lngLatToContainer([v-360,E]);G.x=gt.x}if(G.x<0){var Dt=this.mapsService.lngLatToContainer([v+360,E]);G.x=Dt.x}}(G.x>Fe||G.x<0||G.y>xe||G.y<0)&&(o.style.display="none"),o.style.left=G.x+u[0]+"px",o.style.top=G.y-u[1]+"px"}}}},{key:"init",value:function(){var t=this,o=this.markerOption.element,u=this.markerOption,c=u.color,v=u.anchor;if(!o){this.defaultMarker=!0,o=aa("div"),this.markerOption.element=o;var E=document.createElementNS("http://www.w3.org/2000/svg","svg");E.setAttributeNS(null,"display","block"),E.setAttributeNS(null,"height","48px"),E.setAttributeNS(null,"width","48px"),E.setAttributeNS(null,"viewBox","0 0 1024 1024");var G=document.createElementNS("http://www.w3.org/2000/svg","path");G.setAttributeNS(null,"d","M512 490.666667C453.12 490.666667 405.333333 442.88 405.333333 384 405.333333 325.12 453.12 277.333333 512 277.333333 570.88 277.333333 618.666667 325.12 618.666667 384 618.666667 442.88 570.88 490.666667 512 490.666667M512 85.333333C346.88 85.333333 213.333333 218.88 213.333333 384 213.333333 608 512 938.666667 512 938.666667 512 938.666667 810.666667 608 810.666667 384 810.666667 218.88 677.12 85.333333 512 85.333333Z"),G.setAttributeNS(null,"fill",c),E.appendChild(G),o.appendChild(E)}Po(o,"l7-marker"),Object.keys(this.markerOption.style||{}).forEach(function(ie){var xe,Fe,it=((xe=t.markerOption)===null||xe===void 0?void 0:xe.style)&&((Fe=t.markerOption)===null||Fe===void 0?void 0:Fe.style[ie]);o&&(o.style[ie]=it)}),Kn(o,v,"marker")}},{key:"registerMarkerEvent",value:function(t){t.addEventListener("click",this.onMapClick),t.addEventListener("mousemove",this.eventHandle),t.addEventListener("click",this.eventHandle),t.addEventListener("mousedown",this.eventHandle),t.addEventListener("mouseup",this.eventHandle),t.addEventListener("dblclick",this.eventHandle),t.addEventListener("contextmenu",this.eventHandle),t.addEventListener("mouseover",this.eventHandle),t.addEventListener("mouseout",this.eventHandle),t.addEventListener("touchstart",this.eventHandle),t.addEventListener("touchend",this.eventHandle)}},{key:"unRegisterMarkerEvent",value:function(){var t=this.getElement();t.removeEventListener("click",this.onMapClick),t.removeEventListener("mousemove",this.eventHandle),t.removeEventListener("click",this.eventHandle),t.removeEventListener("mousedown",this.eventHandle),t.removeEventListener("mouseup",this.eventHandle),t.removeEventListener("dblclick",this.eventHandle),t.removeEventListener("contextmenu",this.eventHandle),t.removeEventListener("mouseover",this.eventHandle),t.removeEventListener("mouseout",this.eventHandle),t.removeEventListener("touchstart",this.eventHandle),t.removeEventListener("touchend",this.eventHandle)}},{key:"polyfillEvent",value:function(t){!this.mapsService||this.mapsService.version!=="GAODE2.x"||Zu()||(t.type==="touchstart"&&(this.touchStartTime=Date.now()),t.type==="touchend"&&Date.now()-this.touchStartTime<300&&this.emit("click",{target:t,data:this.markerOption.extData,lngLat:this.lngLat}))}},{key:"addDragHandler",value:function(t){return null}},{key:"onUp",value:function(t){throw new Error("Method not implemented.")}}]),r}(cf.EventEmitter);function O4(e){var i=L4();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function L4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var D4=vi.merge,k4=function(e){(0,Ce.Z)(r,e);var i=O4(r);function r(n){var t,o;return(0,Je.Z)(this,r),o=i.call(this),(0,St.Z)((0,Gr.Z)(o),"markers",[]),(0,St.Z)((0,Gr.Z)(o),"points",[]),(0,St.Z)((0,Gr.Z)(o),"clusterMarkers",[]),o.markerLayerOption=D4(o.getDefault(),n),qu(["update"],(0,Gr.Z)(o)),o.zoom=((t=o.markerLayerOption.clusterOption)===null||t===void 0?void 0:t.zoom)||-99,o}return(0,vt.Z)(r,[{key:"getDefault",value:function(){return{cluster:!1,clusterOption:{radius:80,maxZoom:20,minZoom:0,zoom:-99,style:{},className:""}}}},{key:"addTo",value:function(t){return this.scene=t,this.mapsService=t.get(vr.IMapService),this.markerLayerOption.cluster&&(this.initCluster(),this.update(),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update)),this.mapsService.on("camerachange",this.setContainerSize.bind(this)),this.mapsService.on("viewchange",this.setContainerSize.bind(this)),this.addMarkers(),this.inited=!0,this}},{key:"setContainerSize",value:function(){if(this.mapsService){var t=this.mapsService.getContainer();this.containerSize={containerWidth:(t==null?void 0:t.scrollWidth)||0,containerHeight:(t==null?void 0:t.scrollHeight)||0,bounds:this.mapsService.getBounds()}}}},{key:"getContainerSize",value:function(){return this.containerSize}},{key:"addMarker",value:function(t){var o=this.markerLayerOption.cluster;if(t.getMarkerLayerContainerSize=this.getContainerSize.bind(this),o&&(this.addPoint(t,this.markers.length),this.mapsService)){var u=this.mapsService.getZoom(),c=this.mapsService.getBounds();this.bbox=Xa(c,.5),this.zoom=Math.floor(u),this.getClusterMarker(this.bbox,this.zoom)}this.markers.push(t)}},{key:"removeMarker",value:function(t){this.markers.indexOf(t);var o=this.markers.indexOf(t);o>-1&&(this.markers.splice(o,1),this.markerLayerOption.cluster&&(this.removePoint(o),this.mapsService&&this.getClusterMarker(this.bbox,this.zoom)))}},{key:"hide",value:function(){this.markers.map(function(t){t.getElement().style.opacity="0"}),this.clusterMarkers.map(function(t){t.getElement().style.opacity="0"})}},{key:"show",value:function(){this.markers.map(function(t){t.getElement().style.opacity="1"}),this.clusterMarkers.map(function(t){t.getElement().style.opacity="1"})}},{key:"getMarkers",value:function(){var t=this.markerLayerOption.cluster;return t?this.clusterMarkers:this.markers}},{key:"getOriginMarkers",value:function(){return this.markers}},{key:"addMarkers",value:function(){var t=this;this.getMarkers().forEach(function(o){o.addTo(t.scene)})}},{key:"clear",value:function(){this.markers.forEach(function(t){t.remove()}),this.clusterMarkers.forEach(function(t){t.remove()}),this.markers=[],this.points=[],this.clusterMarkers=[]}},{key:"destroy",value:function(){this.clear(),this.removeAllListeners(),this.mapsService.off("camerachange",this.update),this.mapsService.off("viewchange",this.update),this.mapsService.off("camerachange",this.setContainerSize.bind(this)),this.mapsService.off("viewchange",this.setContainerSize.bind(this))}},{key:"addPoint",value:function(t,o){var u=t.getLnglat(),c=u.lng,v=u.lat,E={geometry:{type:"Point",coordinates:[c,v]},properties:(0,Me.Z)((0,Me.Z)({},t.getExtData()),{},{marker_id:o})};this.points.push(E),this.clusterIndex&&this.clusterIndex.load(this.points)}},{key:"removePoint",value:function(t){var o=this.points.findIndex(function(u){return u.properties.marker_id===t});o>-1&&this.points.splice(o,1),this.clusterIndex&&this.clusterIndex.load(this.points)}},{key:"initCluster",value:function(){if(this.markerLayerOption.cluster){var t=this.markerLayerOption.clusterOption,o=t.radius,u=t.minZoom,c=u===void 0?0:u,v=t.maxZoom;this.clusterIndex=new(vE())({radius:o,minZoom:c,maxZoom:v}),this.clusterIndex.load(this.points)}}},{key:"getClusterMarker",value:function(t,o){var u=this,c=t[0].concat(t[1]),v=this.clusterIndex.getClusters(c,o);this.clusterMarkers.forEach(function(E){E.remove()}),this.clusterMarkers=[],v.forEach(function(E){var G,ie=u.markerLayerOption.clusterOption,xe=ie.field,Fe=ie.method;if((G=E.properties)!==null&&G!==void 0&&G.cluster_id){var it,gt=u.getLeaves((it=E.properties)===null||it===void 0?void 0:it.cluster_id);if(E.properties.clusterData=gt,xe&&Fe){var Dt=gt==null?void 0:gt.map(function(zn){var Rn=(0,St.Z)({},xe,zn.properties[xe]);return Rn}),ar=Af(Dt,xe),Mr=fd(Fe,ar),Zr="point_"+Fe;E.properties[Zr]=Mr.toFixed(2)}}var mn=u.clusterMarker(E);u.clusterMarkers.push(mn),mn.addTo(u.scene)})}},{key:"getLeaves",value:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return t?this.clusterIndex.getLeaves(t,o,u):null}},{key:"clusterMarker",value:function(t){var o=this.markerLayerOption.clusterOption,u=o,c=u.element,v=c===void 0?this.generateElement.bind(this):c,E=new xE({element:v(t)}).setLnglat({lng:t.geometry.coordinates[0],lat:t.geometry.coordinates[1]});return E}},{key:"normalMarker",value:function(t){var o=t.properties.marker_id;return this.markers[o]}},{key:"update",value:function(){if(this.mapsService&&this.markers.length!==0){var t=this.mapsService.getZoom(),o=this.mapsService.getBounds();(!this.bbox||Math.abs(t-this.zoom)>=1||!To(this.bbox,o))&&(this.bbox=Xa(o,.5),this.zoom=Math.floor(t),this.getClusterMarker(this.bbox,this.zoom))}}},{key:"generateElement",value:function(t){var o=aa("div","l7-marker-cluster"),u=aa("div","",o),c=aa("span","",u),v=this.markerLayerOption.clusterOption,E=v.field,G=v.method;t.properties.point_count=t.properties.point_count||1;var ie=E&&G?t.properties["point_"+G]||t.properties[E]:t.properties.point_count;return c.textContent=ie,o}}]),r}(cf.EventEmitter),nV=_(14243);function F4(e){var i=B4();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function B4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var fy=function(e){(0,Ce.Z)(r,e);var i=F4(r);function r(n){var t;return(0,Je.Z)(this,r),t=i.call(this),r.controlCount++,t.controlOption=(0,Me.Z)((0,Me.Z)({},t.getDefault(n)),n||{}),t}return(0,vt.Z)(r,[{key:"getOptions",value:function(){return this.controlOption}},{key:"setOptions",value:function(t){var o=this.getDefault(t);Object.entries(t).forEach(function(u){var c=(0,wi.Z)(u,2),v=c[0],E=c[1];E===void 0&&(t[v]=o[v])}),"position"in t&&this.setPosition(t.position),"className"in t&&this.setClassName(t.className),"style"in t&&this.setStyle(t.style),this.controlOption=(0,Me.Z)((0,Me.Z)({},this.controlOption),t)}},{key:"addTo",value:function(t){this.mapsService=t.get(vr.IMapService),this.renderService=t.get(vr.IRendererService),this.layerService=t.get(vr.ILayerService),this.controlService=t.get(vr.IControlService),this.configService=t.get(vr.IGlobalConfigService),this.scene=t.get(vr.ISceneService),this.sceneContainer=t,this.isShow=!0,this.container=this.onAdd(),Po(this.container,"l7-control");var o=this.controlOption,u=o.className,c=o.style;return u&&this.setClassName(u),c&&this.setStyle(c),this.insertContainer(),this.emit("add",this),this}},{key:"remove",value:function(){if(!this.mapsService)return this;ho(this.container),this.onRemove(),this.emit("remove",this)}},{key:"onAdd",value:function(){return aa("div")}},{key:"onRemove",value:function(){}},{key:"show",value:function(){var t=this.container;Ms(t,"l7-control--hide"),this.isShow=!0,this.emit("show",this)}},{key:"hide",value:function(){var t=this.container;Po(t,"l7-control--hide"),this.isShow=!1,this.emit("hide",this)}},{key:"getDefault",value:function(t){return{position:wl.TOPRIGHT,name:"".concat(r.controlCount)}}},{key:"getContainer",value:function(){return this.container}},{key:"getIsShow",value:function(){return this.isShow}},{key:"_refocusOnMap",value:function(t){if(this.mapsService&&t&&t.screenX>0&&t.screenY>0){var o=this.mapsService.getContainer();o!==null&&o.focus()}}},{key:"setPosition",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wl.TOPLEFT,o=this.controlService;return o&&o.removeControl(this),this.controlOption.position=t,o&&o.addControl(this,this.sceneContainer),this}},{key:"setClassName",value:function(t){var o=this.container,u=this.controlOption.className;u&&Ms(o,u),t&&Po(o,t)}},{key:"setStyle",value:function(t){var o=this.container;t?o.setAttribute("style",t):o.removeAttribute("style")}},{key:"insertContainer",value:function(){var t=this.controlOption.position,o=this.container;if(t instanceof Element)t.appendChild(o);else{var u=this.controlService.controlCorners[t];["bottomleft","bottomright","righttop","rightbottom"].includes(t)?u.insertBefore(o,u.firstChild):u.appendChild(o)}}},{key:"checkUpdateOption",value:function(t,o){return o.some(function(u){return u in t})}}]),r}(nf());(0,St.Z)(fy,"controlCount",0);function N4(e){var i=z4();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function z4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var P_=function(e){(0,Ce.Z)(r,e);var i=N4(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u0&&arguments[0]!==void 0?arguments[0]:"";return aa("button","l7-button-control ".concat(t))}},{key:"onAdd",value:function(){this.button=this.createButton(),this.isDisable=!1;var t=this.controlOption,o=t.title,u=t.btnText,c=t.btnIcon;return this.setBtnTitle(o),this.setBtnText(u),this.setBtnIcon(c),this.button}},{key:"onRemove",value:function(){this.button=this.buttonIcon=this.buttonText=void 0,this.isDisable=!1}},{key:"setOptions",value:function(t){var o=t.title,u=t.btnText,c=t.btnIcon;this.checkUpdateOption(t,["title"])&&this.setBtnTitle(o),this.checkUpdateOption(t,["btnIcon"])&&this.setBtnIcon(c),this.checkUpdateOption(t,["btnText"])&&this.setBtnText(u),Pd((0,et.Z)(r.prototype),"setOptions",this).call(this,t)}},{key:"setBtnTitle",value:function(t){var o;(o=this.button)===null||o===void 0||o.setAttribute("title",t!=null?t:"")}},{key:"setBtnIcon",value:function(t){if(this.buttonIcon&&ho(this.buttonIcon),t){var o,u=(o=this.button)===null||o===void 0?void 0:o.firstChild;if(u){var c;(c=this.button)===null||c===void 0||c.insertBefore(t,u)}else{var v;(v=this.button)===null||v===void 0||v.appendChild(t)}this.buttonIcon=t}}},{key:"setBtnText",value:function(t){if(this.button)if(Ms(this.button,"l7-button-control--row"),Ms(this.button,"l7-button-control--column"),t){var o=this.buttonText;if(!o){var u;o=aa("div","l7-button-control__text"),(u=this.button)===null||u===void 0||u.appendChild(o),this.buttonText=o}o.innerText=t,Po(this.button,this.controlOption.vertical?"l7-button-control--column":"l7-button-control--row")}else!t&&this.buttonText&&(ho(this.buttonText),this.buttonText=void 0)}}]),r}(fy);function Z4(e){var i=U4();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function U4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var wE=function(e){(0,Ce.Z)(r,e);var i=Z4(r);function r(n,t){var o;return(0,Je.Z)(this,r),o=i.call(this),(0,St.Z)((0,Gr.Z)(o),"isShow",!1),(0,St.Z)((0,Gr.Z)(o),"timeout",null),(0,St.Z)((0,Gr.Z)(o),"show",function(){return o.isShow||!o.contentDOM.innerHTML||(o.resetPopperPosition(),Ms(o.popperDOM,"l7-popper-hide"),o.isShow=!0,o.option.unique&&r.conflictPopperList.forEach(function(u){u!==(0,Gr.Z)(o)&&u.isShow&&u.hide()}),o.emit("show"),window.addEventListener("pointerdown",o.onPopperUnClick)),(0,Gr.Z)(o)}),(0,St.Z)((0,Gr.Z)(o),"hide",function(){return o.isShow&&(Po(o.popperDOM,"l7-popper-hide"),o.isShow=!1,o.emit("hide"),window.removeEventListener("pointerdown",o.onPopperUnClick)),(0,Gr.Z)(o)}),(0,St.Z)((0,Gr.Z)(o),"setHideTimeout",function(){o.timeout||(o.timeout=window.setTimeout(function(){o.isShow&&(o.hide(),o.timeout=null)},300))}),(0,St.Z)((0,Gr.Z)(o),"clearHideTimeout",function(){o.timeout&&(window.clearTimeout(o.timeout),o.timeout=null)}),(0,St.Z)((0,Gr.Z)(o),"onBtnClick",function(){o.isShow?o.hide():o.show()}),(0,St.Z)((0,Gr.Z)(o),"onPopperUnClick",function(u){Vu(u.target,[".l7-button-control",".l7-popper-content"])||o.hide()}),(0,St.Z)((0,Gr.Z)(o),"onBtnMouseLeave",function(){o.setHideTimeout()}),(0,St.Z)((0,Gr.Z)(o),"onBtnMouseMove",function(){o.clearHideTimeout(),!o.isShow&&o.show()}),o.button=n,o.option=t,o.init(),t.unique&&r.conflictPopperList.push((0,Gr.Z)(o)),o}return(0,vt.Z)(r,[{key:"buttonRect",get:function(){return this.button.getBoundingClientRect()}},{key:"getPopperDOM",value:function(){return this.popperDOM}},{key:"getIsShow",value:function(){return this.isShow}},{key:"getContent",value:function(){return this.content}},{key:"setContent",value:function(t){typeof t=="string"?this.contentDOM.innerHTML=t:t instanceof HTMLElement&&(yl(this.contentDOM),this.contentDOM.appendChild(t)),this.content=t}},{key:"init",value:function(){var t=this.option.trigger;this.popperDOM=this.createPopper(),t==="click"?this.button.addEventListener("click",this.onBtnClick):(this.button.addEventListener("mousemove",this.onBtnMouseMove),this.button.addEventListener("mouseleave",this.onBtnMouseLeave),this.popperDOM.addEventListener("mousemove",this.onBtnMouseMove),this.popperDOM.addEventListener("mouseleave",this.onBtnMouseLeave))}},{key:"destroy",value:function(){this.button.removeEventListener("click",this.onBtnClick),this.button.removeEventListener("mousemove",this.onBtnMouseMove),this.button.removeEventListener("mousemove",this.onBtnMouseLeave),this.popperDOM.removeEventListener("mousemove",this.onBtnMouseMove),this.popperDOM.removeEventListener("mouseleave",this.onBtnMouseLeave),ho(this.popperDOM)}},{key:"resetPopperPosition",value:function(){var t={},o=this.option,u=o.container,c=o.offset,v=c===void 0?[0,0]:c,E=o.placement,G=(0,wi.Z)(v,2),ie=G[0],xe=G[1],Fe=this.button.getBoundingClientRect(),it=u.getBoundingClientRect(),gt=mf(Fe,it),Dt=gt.left,ar=gt.right,Mr=gt.top,Zr=gt.bottom,mn=!1,zn=!1;/^(left|right)/.test(E)?(E.includes("left")?t.right="".concat(Fe.width+ar,"px"):E.includes("right")&&(t.left="".concat(Fe.width+Dt,"px")),E.includes("start")?t.top="".concat(Mr,"px"):E.includes("end")?t.bottom="".concat(Zr,"px"):(t.top="".concat(Mr+Fe.height/2,"px"),zn=!0,t.transform="translate(".concat(ie,"px, calc(").concat(xe,"px - 50%))"))):/^(top|bottom)/.test(E)&&(E.includes("top")?t.bottom="".concat(Fe.height+Zr,"px"):E.includes("bottom")&&(t.top="".concat(Fe.height+Mr,"px")),E.includes("start")?t.left="".concat(Dt,"px"):E.includes("end")?t.right="".concat(ar,"px"):(t.left="".concat(Dt+Fe.width/2,"px"),mn=!0,t.transform="translate(calc(".concat(ie,"px - 50%), ").concat(xe,"px)"))),t.transform="translate(calc(".concat(ie,"px - ").concat(mn?"50%":"0%","), calc(").concat(xe,"px - ").concat(zn?"50%":"0%",")");var Rn=E.split("-");Rn.length&&Po(this.popperDOM,Rn.map(function(kn){return"l7-popper-".concat(kn)}).join(" ")),No(this.popperDOM,Wa(t))}},{key:"createPopper",value:function(){var t=this.option,o=t.container,u=t.className,c=u===void 0?"":u,v=t.content,E=aa("div","l7-popper l7-popper-hide ".concat(c)),G=aa("div","l7-popper-content"),ie=aa("div","l7-popper-arrow");return E.appendChild(G),E.appendChild(ie),o.appendChild(E),this.popperDOM=E,this.contentDOM=G,v&&this.setContent(v),E}}]),r}(cf.EventEmitter);(0,St.Z)(wE,"conflictPopperList",[]);function j4(e){var i=V4();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function V4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var $4={topleft:"right-start",topcenter:"bottom",topright:"left-start",bottomleft:"right-end",bottomcenter:"top",bottomright:"left-end",lefttop:"bottom-start",leftcenter:"right",leftbottom:"top-start",righttop:"bottom-end",rightcenter:"left",rightbottom:"top-end"},EE=function(e){(0,Ce.Z)(r,e);var i=j4(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getPopper",value:function(){return this.popper}},{key:"hide",value:function(){this.popper.hide(),Pd((0,et.Z)(r.prototype),"hide",this).call(this)}},{key:"getDefault",value:function(t){var o,u=Pd((0,et.Z)(r.prototype),"getDefault",this).call(this,t),c=(o=t==null?void 0:t.position)!==null&&o!==void 0?o:u.position;return(0,Me.Z)((0,Me.Z)({},Pd((0,et.Z)(r.prototype),"getDefault",this).call(this,t)),{},{popperPlacement:c instanceof Element?"bottom":$4[c],popperTrigger:"click"})}},{key:"onAdd",value:function(){var t=Pd((0,et.Z)(r.prototype),"onAdd",this).call(this);return this.initPopper(),t}},{key:"onRemove",value:function(){this.popper.destroy()}},{key:"initPopper",value:function(){var t=this,o=this.controlOption,u=o.popperClassName,c=o.popperPlacement,v=o.popperTrigger,E=this.mapsService.getMapContainer();return this.popper=new wE(this.button,{className:u,placement:c,trigger:v,container:E,unique:!0}),this.popper.on("show",function(){t.emit("popperShow",t)}).on("hide",function(){t.emit("popperHide",t)}),this.popper}},{key:"setOptions",value:function(t){if(Pd((0,et.Z)(r.prototype),"setOptions",this).call(this,t),this.checkUpdateOption(t,["popperPlacement","popperTrigger","popperClassName"])){var o=this.popper.getContent();this.popper.destroy(),this.initPopper(),this.popper.setContent(o)}}}]),r}(P_);function H4(e){var i=G4();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function G4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Ky=function(e){return e.ActiveOptionClassName="l7-select-control-item-active",e.OptionValueAttrKey="data-option-value",e.OptionIndexAttrKey="data-option-index",e}(Ky||{}),Px=function(e){(0,Ce.Z)(r,e);var i=H4(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u-1?n.selectValue.splice(v,1):n.selectValue=[].concat((0,Mn.Z)(n.selectValue),[c.value])}else n.selectValue=[c.value];n.setSelectValue(n.selectValue)}),n}return(0,vt.Z)(r,[{key:"setOptions",value:function(t){Pd((0,et.Z)(r.prototype),"setOptions",this).call(this,t);var o=t.options;o&&this.popper.setContent(this.getPopperContent(o))}},{key:"onAdd",value:function(){var t=Pd((0,et.Z)(r.prototype),"onAdd",this).call(this),o=this.controlOption.defaultValue;return o&&(this.selectValue=this.transSelectValue(o)),this.popper.setContent(this.getPopperContent(this.controlOption.options)),t}},{key:"getSelectValue",value:function(){return this.getIsMultiple()?this.selectValue:this.selectValue[0]}},{key:"setSelectValue",value:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,u=this.transSelectValue(t);this.optionDOMList.forEach(function(c){var v=c.getAttribute(Ky.OptionValueAttrKey),E=c.querySelector("input[type=checkbox]"),G=c.querySelector("input[type=radio]"),ie=u.includes(v),xe=function(it,gt){Xs(c,Ky.ActiveOptionClassName,gt),it&&yf(it,gt)};xe(E,ie),xe(G,ie)}),this.selectValue=u,o&&this.emit("selectChange",this.getIsMultiple()?u:u[0])}},{key:"getIsMultiple",value:function(){return!1}},{key:"getPopperContent",value:function(t){var o=this,u=this.isImageOptions(),c=aa("div",u?"l7-select-control--image":"l7-select-control--normal");this.getIsMultiple()&&Po(c,"l7-select-control--multiple");var v=t.map(function(E,G){var ie=u?o.createImageOption(E):o.createNormalOption(E);return ie.setAttribute(Ky.OptionValueAttrKey,E.value),ie.setAttribute(Ky.OptionIndexAttrKey,window.String(G)),ie.addEventListener("click",o.onItemClick.bind(o,E)),ie});return c.append.apply(c,(0,Mn.Z)(v)),this.optionDOMList=v,c}},{key:"createImageOption",value:function(t){var o=this.selectValue.includes(t.value),u=aa("div","l7-select-control-item ".concat(o?Ky.ActiveOptionClassName:"")),c=aa("img");c.setAttribute("src",t.img),Ec(c),u.appendChild(c);var v=aa("div","l7-select-control-item-row");this.getIsMultiple()&&u.appendChild(this.createCheckbox(o));var E=aa("span");return E.innerText=t.text,v.appendChild(E),u.appendChild(v),u}},{key:"createCheckbox",value:function(t){var o=aa("input");return o.setAttribute("type","checkbox"),t&&yf(o,!0),o}},{key:"createRadio",value:function(t){var o=aa("input");return o.setAttribute("type","radio"),t&&yf(o,!0),o}},{key:"isImageOptions",value:function(){return!!this.controlOption.options.find(function(t){return t.img})}},{key:"transSelectValue",value:function(t){return Array.isArray(t)?t:[t]}}]),r}(EE),Ig=function(i){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("l7-iconfont"),r.setAttribute("aria-hidden","true");var n=document.createElementNS("http://www.w3.org/2000/svg","use");return n.setAttributeNS("http://www.w3.org/1999/xlink","href","#".concat(i)),r.appendChild(n),r};function W4(e){var i=X4();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function X4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Y4=function(e){(0,Ce.Z)(r,e);var i=W4(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function q4(e,i){if(e){if(typeof e=="string")return SE(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SE(e,i)}}function SE(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r0&&arguments[0]!==void 0?arguments[0]:document.documentElement,r=arguments.length>1?arguments[1]:void 0;return new Promise(function(n,t){var o=function c(){Ev.off("change",c),n()};Ev.on("change",o);var u=i[Rg.requestFullscreen](r);u instanceof Promise&&u.then(o).catch(t)})},exit:function(){return new Promise(function(i,r){if(!Ev.isFullscreen){i();return}var n=function o(){Ev.off("change",o),i()};Ev.on("change",n);var t=document[Rg.exitFullscreen]();t instanceof Promise&&t.then(n).catch(r)})},toggle:function(i,r){return Ev.isFullscreen?Ev.exit():Ev.request(i,r)},onchange:function(i){Ev.on("change",i)},onerror:function(i){Ev.on("error",i)},on:function(i,r){var n=TE[i];n&&document.addEventListener(n,r,!1)},off:function(i,r){var n=TE[i];n&&document.removeEventListener(n,r,!1)},raw:Rg};Object.defineProperties(Ev,{isFullscreen:{get:function(){return!!document[Rg.fullscreenElement]}},element:{enumerable:!0,get:function(){var i;return(i=document[Rg.fullscreenElement])!==null&&i!==void 0?i:void 0}},isEnabled:{enumerable:!0,get:function(){return!!document[Rg.fullscreenEnabled]}}}),Rg||(Ev={isEnabled:!1});var Ix=Ev;function Q4(e){var i=J4();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function J4(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var eP=function(e){(0,Ce.Z)(r,e);var i=Q4(r);function r(n){var t;return(0,Je.Z)(this,r),t=i.call(this,n),(0,St.Z)((0,Gr.Z)(t),"isFullscreen",!1),(0,St.Z)((0,Gr.Z)(t),"toggleFullscreen",(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!Ix.isEnabled){c.next=3;break}return c.next=3,Ix.toggle(t.mapContainer);case 3:case"end":return c.stop()}},o)}))),(0,St.Z)((0,Gr.Z)(t),"onClick",function(){t.toggleFullscreen()}),(0,St.Z)((0,Gr.Z)(t),"onFullscreenChange",function(){t.isFullscreen=!!document.fullscreenElement;var o=t.controlOption,u=o.btnText,c=o.btnIcon,v=o.title,E=o.exitBtnText,G=o.exitBtnIcon,ie=o.exitTitle;t.isFullscreen?(t.setBtnTitle(ie),t.setBtnText(E),t.setBtnIcon(G)):(t.setBtnTitle(v),t.setBtnText(u),t.setBtnIcon(c)),t.emit("fullscreenChange",t.isFullscreen)}),Ix.isEnabled||console.warn("\u5F53\u524D\u6D4F\u89C8\u5668\u73AF\u5883\u4E0D\u652F\u6301\u5BF9\u5730\u56FE\u5168\u5C4F\u5316"),t}return(0,vt.Z)(r,[{key:"setOptions",value:function(t){var o=t.exitBtnText,u=t.exitBtnIcon,c=t.exitTitle;this.isFullscreen&&(this.checkUpdateOption(t,["exitBtnIcon"])&&this.setBtnIcon(u),this.checkUpdateOption(t,["exitBtnText"])&&this.setBtnText(o),this.checkUpdateOption(t,["exitTitle"])&&this.setBtnTitle(c)),Pd((0,et.Z)(r.prototype),"setOptions",this).call(this,t)}},{key:"onAdd",value:function(){var t=Pd((0,et.Z)(r.prototype),"onAdd",this).call(this);return t.addEventListener("click",this.onClick),this.mapContainer=ma(this.scene.getSceneConfig().id),this.mapContainer.addEventListener("fullscreenchange",this.onFullscreenChange),t}},{key:"onRemove",value:function(){Pd((0,et.Z)(r.prototype),"onRemove",this).call(this),this.mapContainer.removeEventListener("fullscreenchange",this.onFullscreenChange)}},{key:"getDefault",value:function(t){return(0,Me.Z)((0,Me.Z)({},Pd((0,et.Z)(r.prototype),"getDefault",this).call(this,t)),{},{title:"\u5168\u5C4F",btnIcon:Ig("l7-icon-fullscreen"),exitTitle:"\u9000\u51FA\u5168\u5C4F",exitBtnIcon:Ig("l7-icon-exit-fullscreen")})}}]),r}(P_);function tP(e){var i=rP();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function rP(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var nP=function(e){(0,Ce.Z)(r,e);var i=tP(r);function r(n){var t;return(0,Je.Z)(this,r),t=i.call(this,n),(0,St.Z)((0,Gr.Z)(t),"getGeoLocation",function(){return new Promise(function(o,u){window.navigator.geolocation.getCurrentPosition(function(c){var v=c.coords,E=v!=null?v:{},G=E.longitude,ie=E.latitude;!isNaN(G)&&!isNaN(ie)?o([G,ie]):u()},function(c){u(c)})})}),(0,St.Z)((0,Gr.Z)(t),"onClick",(0,Qi.Z)(Qr().mark(function o(){var u,c,v;return Qr().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(window.navigator.geolocation){G.next=2;break}return G.abrupt("return");case 2:return u=t.controlOption.transform,G.next=5,t.getGeoLocation();case 5:if(c=G.sent,v=t.mapsService.getZoom(),G.t0=t.mapsService,G.t1=v>15?v:15,!u){G.next=15;break}return G.next=12,u(c);case 12:G.t2=G.sent,G.next=16;break;case 15:G.t2=c;case 16:G.t3=G.t2,G.t0.setZoomAndCenter.call(G.t0,G.t1,G.t3);case 18:case"end":return G.stop()}},o)}))),window.navigator.geolocation||console.warn("\u5F53\u524D\u6D4F\u89C8\u5668\u73AF\u5883\u4E0D\u652F\u6301\u83B7\u53D6\u5730\u7406\u5B9A\u4F4D"),t}return(0,vt.Z)(r,[{key:"getDefault",value:function(t){return(0,Me.Z)((0,Me.Z)({},Pd((0,et.Z)(r.prototype),"getDefault",this).call(this,t)),{},{title:"\u5B9A\u4F4D",btnIcon:Ig("l7-icon-reposition")})}},{key:"onAdd",value:function(){var t=Pd((0,et.Z)(r.prototype),"onAdd",this).call(this);return t.addEventListener("click",this.onClick),t}}]),r}(P_);function iP(e){var i=aP();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function aP(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function ME(e){return Object.keys(e!=null?e:{}).every(function(i){return["layer","name","img"].includes(i)})}var oP=function(e){(0,Ce.Z)(r,e);var i=iP(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u=10?10:u>=5?5:u>=3?3:u>=2?2:1,o*u}},{key:"updateMetric",value:function(t){var o=this.getRoundNum(t),u=o<1e3?o+" m":o/1e3+" km";this.updateScale(this.mScale,u,o/t)}},{key:"updateImperial",value:function(t){var o=t*3.2808399,u,c,v;o>5280?(u=o/5280,c=this.getRoundNum(u),this.updateScale(this.iScale,c+" mi",c/u)):(v=this.getRoundNum(o),this.updateScale(this.iScale,v+" ft",v/o))}}]),r}(fy),hy,IE=(hy={},(0,St.Z)(hy,xf.additive,{enable:!0,func:{srcRGB:Or.ONE,dstRGB:Or.ONE,srcAlpha:1,dstAlpha:1}}),(0,St.Z)(hy,xf.none,{enable:!1}),(0,St.Z)(hy,xf.normal,{enable:!0,func:{srcRGB:Or.SRC_ALPHA,dstRGB:Or.ONE_MINUS_SRC_ALPHA,srcAlpha:1,dstAlpha:1}}),(0,St.Z)(hy,xf.subtractive,{enable:!0,func:{srcRGB:Or.ONE,dstRGB:Or.ONE,srcAlpha:Or.ZERO,dstAlpha:Or.ONE_MINUS_SRC_COLOR},equation:{rgb:Or.FUNC_SUBTRACT,alpha:Or.FUNC_SUBTRACT}}),(0,St.Z)(hy,xf.max,{enable:!0,func:{srcRGB:Or.ONE,dstRGB:Or.ONE},equation:{rgb:Or.MAX_EXT}}),(0,St.Z)(hy,xf.min,{enable:!0,func:{srcRGB:Or.ONE,dstRGB:Or.ONE},equation:{rgb:Or.MIN_EXT}}),hy);function RE(e){return e.map(function(i){return typeof i=="string"&&(i=[i,{}]),i})}function OE(e,i,r,n){var t=e.multiPassRenderer,o=e.getLayerConfig(),u=o.enableTAA;return u?t.add(n("taa")):t.add(n("render")),RE(i).forEach(function(c){var v=(0,wi.Z)(c,2),E=v[0],G=v[1];t.add(r(E),G)}),t.add(r("copy")),t}var AP=function(){function e(i){(0,Je.Z)(this,e),this.layer=i}return(0,vt.Z)(e,[{key:"pickRender",value:function(r){var n=this.layer.getContainer(),t=n.get(vr.ILayerService),o=this.layer;if(o.tileLayer)return o.tileLayer.pickRender(r);t.renderTileLayerMask(o),o.renderModels({ispick:!0})}},{key:"pick",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t,o){var u,c;return Qr().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(u=this.layer.getContainer(),c=u.get(vr.IPickingService),t.type!=="RasterLayer"){E.next=4;break}return E.abrupt("return",this.pickRasterLayer(t,o));case 4:return this.pickRender(o),E.abrupt("return",c.pickFromPickingFBO(t,o));case 6:case"end":return E.stop()}},n,this)}));function r(n,t){return i.apply(this,arguments)}return r}()},{key:"pickRasterLayer",value:function(r,n,t){var o=this.layer.getContainer(),u=o.get(vr.IPickingService),c=o.get(vr.IMapService),v=this.layer.getSource().extent,E=au(n.lngLat,v),G={x:n.x,y:n.y,type:n.type,lngLat:n.lngLat,target:n,rasterValue:null},ie=t||r;if(E){var xe=this.readRasterValue(r,v,c,n.x,n.y);return G.rasterValue=xe,u.triggerHoverOnLayer(ie,G),!0}else return G.type=n.type==="mousemove"?"mouseout":"un"+n.type,u.triggerHoverOnLayer(ie,(0,Me.Z)((0,Me.Z)({},G),{},{type:"unpick"})),u.triggerHoverOnLayer(ie,G),!1}},{key:"readRasterValue",value:function(r,n,t,o,u){var c=r.getSource().data.dataArray[0],v=(0,wi.Z)(n,4),E=v[0],G=E===void 0?0:E,ie=v[1],xe=ie===void 0?0:ie,Fe=v[2],it=Fe===void 0?10:Fe,gt=v[3],Dt=gt===void 0?-10:gt,ar=t.lngLatToContainer([G,xe]),Mr=t.lngLatToContainer([it,Dt]),Zr=Mr.x-ar.x,mn=ar.y-Mr.y,zn=[(o-ar.x)/Zr,(u-Mr.y)/mn],Rn=c.width||1,kn=c.height||1,ui=Math.floor(zn[0]*Rn),Di=Math.floor(zn[1]*kn),Aa=Math.max(0,Di-1)*Rn+ui,Pa=c.data[Aa];return Pa}},{key:"selectFeature",value:function(r){var n=this.layer,t=(0,wi.Z)(r,3),o=t[0],u=t[1],c=t[2];n.hooks.beforeSelect.call([o,u,c])}},{key:"highlightPickedFeature",value:function(r){var n=(0,wi.Z)(r,3),t=n[0],o=n[1],u=n[2];this.layer.hooks.beforeHighlight.call([t,o,u])}},{key:"getFeatureById",value:function(r){return this.layer.getSource().getFeatureById(r)}}]),e}(),bP=function(){function e(i){(0,Je.Z)(this,e),this.layer=i;var r=this.layer.getContainer();this.rendererService=r.get(vr.IRendererService)}return(0,vt.Z)(e,[{key:"getColorTexture",value:function(r,n){var t=this.getTextureKey(r,n);return this.key===t?this.colorTexture:(this.createColorTexture(r,n),this.key=t,this.colorTexture)}},{key:"createColorTexture",value:function(r,n){var t=this.rendererService.createTexture2D,o=this.getColorRampBar(r,n),u=t({data:new Uint8Array(o.data),width:o.width,height:o.height,flipY:!1,unorm:!0});return this.colorTexture=u,u}},{key:"setColorTexture",value:function(r,n,t){this.key=this.getTextureKey(n,t),this.colorTexture=r}},{key:"destroy",value:function(){var r;(r=this.colorTexture)===null||r===void 0||r.destroy()}},{key:"getColorRampBar",value:function(r,n){switch(r.type){case"cat":return Os(r);case"quantize":return ro(r);case"custom":return Tu(r,n);case"linear":return Za(r,n);default:return Ro(r)}}},{key:"getTextureKey",value:function(r,n){var t;return"".concat(r.colors.join("_"),"_").concat(r==null||(t=r.positions)===null||t===void 0?void 0:t.join("_"),"_").concat(r.type,"_").concat(n==null?void 0:n.join("_"))}}]),e}(),xP=["passes"],wP=["moduleName","vertexShader","fragmentShader","inject","triangulation","styleOption","pickingEnabled"],LE,Rx,DE;function EP(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=SP(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function SP(e,i){if(e){if(typeof e=="string")return kE(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kE(e,i)}}function kE(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r0&&arguments[0]!==void 0?arguments[0]:{};return(0,Je.Z)(this,r),n=i.call(this),(0,St.Z)((0,Gr.Z)(n),"id","".concat(NE++)),(0,St.Z)((0,Gr.Z)(n),"name","".concat(NE)),(0,St.Z)((0,Gr.Z)(n),"visible",!0),(0,St.Z)((0,Gr.Z)(n),"zIndex",0),(0,St.Z)((0,Gr.Z)(n),"inited",!1),(0,St.Z)((0,Gr.Z)(n),"layerModelNeedUpdate",!1),(0,St.Z)((0,Gr.Z)(n),"pickedFeatureID",null),(0,St.Z)((0,Gr.Z)(n),"selectedFeatureID",null),(0,St.Z)((0,Gr.Z)(n),"styleNeedUpdate",!1),(0,St.Z)((0,Gr.Z)(n),"forceRender",!1),(0,St.Z)((0,Gr.Z)(n),"clusterZoom",0),(0,St.Z)((0,Gr.Z)(n),"defaultSourceConfig",{data:[],options:{parser:{type:"json"}}}),(0,St.Z)((0,Gr.Z)(n),"dataState",{dataSourceNeedUpdate:!1,dataMappingNeedUpdate:!1,filterNeedUpdate:!1,featureScaleNeedUpdate:!1,StyleAttrNeedUpdate:!1}),(0,St.Z)((0,Gr.Z)(n),"hooks",{init:new ke,afterInit:new de,beforeRender:new de,beforeRenderData:new Be,afterRender:new cv,beforePickingEncode:new cv,afterPickingEncode:new cv,beforeHighlight:new cv(["pickedColor"]),afterHighlight:new cv,beforeSelect:new cv(["pickedColor"]),afterSelect:new cv,beforeDestroy:new cv,afterDestroy:new cv}),(0,St.Z)((0,Gr.Z)(n),"models",[]),(0,St.Z)((0,Gr.Z)(n),"startInit",!1),(0,St.Z)((0,Gr.Z)(n),"layerChildren",[]),(0,St.Z)((0,Gr.Z)(n),"masks",[]),A((0,Gr.Z)(n),"configService",DE,(0,Gr.Z)(n)),(0,St.Z)((0,Gr.Z)(n),"animateOptions",{enable:!1}),(0,St.Z)((0,Gr.Z)(n),"currentPickId",null),(0,St.Z)((0,Gr.Z)(n),"encodeStyleAttribute",{}),(0,St.Z)((0,Gr.Z)(n),"enableShaderEncodeStyles",[]),(0,St.Z)((0,Gr.Z)(n),"enableDataEncodeStyles",[]),(0,St.Z)((0,Gr.Z)(n),"pendingStyleAttributes",[]),(0,St.Z)((0,Gr.Z)(n),"scaleOptions",{}),(0,St.Z)((0,Gr.Z)(n),"animateStatus",!1),(0,St.Z)((0,Gr.Z)(n),"isDestroyed",!1),(0,St.Z)((0,Gr.Z)(n),"uniformBuffers",[]),(0,St.Z)((0,Gr.Z)(n),"encodeDataLength",0),(0,St.Z)((0,Gr.Z)(n),"sourceEvent",function(){n.dataState.dataSourceNeedUpdate=!0;var o=n.getLayerConfig();o&&o.autoFit&&n.fitBounds(o.fitBoundsOptions);var u=n.layerSource.getSourceCfg().autoRender;u&&setTimeout(function(){n.reRender()},10)}),n.name=t.name||n.id,n.zIndex=t.zIndex||0,n.rawConfig=t,n}return(0,vt.Z)(r,[{key:"addMask",value:function(t){this.masks.push(t),this.updateLayerConfig({maskLayers:this.masks}),this.enableMask()}},{key:"removeMask",value:function(t){var o=this.masks.indexOf(t);o>-1&&this.masks.splice(o,1),this.updateLayerConfig({maskLayers:this.masks})}},{key:"disableMask",value:function(){this.updateLayerConfig({enableMask:!1})}},{key:"enableMask",value:function(){this.updateLayerConfig({enableMask:!0})}},{key:"addMaskLayer",value:function(t){this.masks.push(t)}},{key:"removeMaskLayer",value:function(t){var o=this.masks.indexOf(t);o>-1&&this.masks.splice(o,1),t.destroy()}},{key:"getAttribute",value:function(t){return this.styleAttributeService.getLayerStyleAttribute(t)}},{key:"getLayerConfig",value:function(){return this.configService.getLayerConfig(this.id)}},{key:"updateLayerConfig",value:function(t){var o=this;if(Object.keys(t).map(function(c){c in o.rawConfig&&(o.rawConfig[c]=t[c])}),!this.startInit)this.needUpdateConfig=(0,Me.Z)((0,Me.Z)({},this.needUpdateConfig),t);else{var u=this.container.get(vr.SceneID);this.configService.setLayerConfig(u,this.id,(0,Me.Z)((0,Me.Z)((0,Me.Z)({},this.configService.getLayerConfig(this.id)),this.needUpdateConfig),t)),this.needUpdateConfig={}}}},{key:"setContainer",value:function(t,o){this.container=t,this.sceneContainer=o}},{key:"getContainer",value:function(){return this.container}},{key:"addPlugin",value:function(t){return this.plugins.push(t),this}},{key:"init",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u=this,c,v,E,G,ie,xe,Fe;return Qr().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:c=this.container.get(vr.SceneID),this.startInit=!0,this.configService.setLayerConfig(c,this.id,this.rawConfig),this.layerType=this.rawConfig.layerType,this.iconService=this.container.get(vr.IIconService),this.fontService=this.container.get(vr.IFontService),this.rendererService=this.container.get(vr.IRendererService),this.layerService=this.container.get(vr.ILayerService),this.debugService=this.container.get(vr.IDebugService),this.interactionService=this.container.get(vr.IInteractionService),this.pickingService=this.container.get(vr.IPickingService),this.mapService=this.container.get(vr.IMapService),v=this.getLayerConfig(),E=v.enableMultiPassRenderer,G=v.passes,E&&G!==null&&G!==void 0&&G.length&&G.length>0&&this.mapService.on("mapAfterFrameChange",function(){u.renderLayers()}),this.cameraService=this.container.get(vr.ICameraService),this.coordinateService=this.container.get(vr.ICoordinateSystemService),this.shaderModuleService=this.container.get(vr.IShaderModuleService),this.postProcessingPassFactory=this.container.get(vr.IFactoryPostProcessingPass),this.normalPassFactory=this.container.get(vr.IFactoryNormalPass),this.styleAttributeService=this.container.get(vr.IStyleAttributeService),E&&(this.multiPassRenderer=this.container.get(vr.IMultiPassRenderer),this.multiPassRenderer.setLayer(this)),this.pendingStyleAttributes.forEach(function(Dt){var ar=Dt.attributeName,Mr=Dt.attributeField,Zr=Dt.attributeValues,mn=Dt.updateOptions;u.styleAttributeService.updateStyleAttribute(ar,{scale:(0,Me.Z)({field:Mr},u.splitValuesAndCallbackInAttribute(Zr,Mr?void 0:u.getLayerConfig()[ar]))},mn)}),this.pendingStyleAttributes=[],this.plugins=this.container.getAll(vr.ILayerPlugin),ie=EP(this.plugins);try{for(ie.s();!(xe=ie.n()).done;)Fe=xe.value,Fe.apply(this,{rendererService:this.rendererService,mapService:this.mapService,styleAttributeService:this.styleAttributeService,normalPassFactory:this.normalPassFactory,postProcessingPassFactory:this.postProcessingPassFactory})}catch(Dt){ie.e(Dt)}finally{ie.f()}return this.layerPickService=new AP(this),this.textureService=new bP(this),this.log(ud.LayerInitStart),gt.next=31,this.hooks.init.promise();case 31:this.log(ud.LayerInitEnd),this.inited=!0,this.emit("inited",{target:this,type:"inited"}),this.emit("add",{target:this,type:"add"}),this.hooks.afterInit.call();case 36:case"end":return gt.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"log",value:function(t){var o,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"init";if(!(this.tileLayer||this.isTileLayer)){var c="".concat(this.id,".").concat(u,".").concat(t),v={id:this.id,type:this.type};(o=this.debugService)===null||o===void 0||o.log(c,v)}}},{key:"updateModelData",value:function(t){t.attributes&&t.elements?this.models.map(function(o){o.updateAttributesAndElements(t.attributes,t.elements)}):console.warn("data error")}},{key:"setLayerPickService",value:function(t){this.layerPickService=t}},{key:"prepareBuildModel",value:function(){Object.keys(this.needUpdateConfig||{}).length!==0&&this.updateLayerConfig({});var t=this.getLayerConfig(),o=t.animateOption;o!=null&&o.enable&&(this.layerService.startAnimate(),this.animateStatus=!0)}},{key:"color",value:function(t,o,u){return this.updateStyleAttribute("color",t,o,u),this}},{key:"texture",value:function(t,o,u){return this.updateStyleAttribute("texture",t,o,u),this}},{key:"rotate",value:function(t,o,u){return this.updateStyleAttribute("rotate",t,o,u),this}},{key:"size",value:function(t,o,u){return this.updateStyleAttribute("size",t,o,u),this}},{key:"filter",value:function(t,o,u){var c=this.updateStyleAttribute("filter",t,o,u);return this.dataState.dataSourceNeedUpdate=c&&this.inited,this}},{key:"shape",value:function(t,o,u){this.shapeOption={field:t,values:o};var c=this.updateStyleAttribute("shape",t,o,u);return this.dataState.dataSourceNeedUpdate=c&&this.inited,this}},{key:"label",value:function(t,o,u){return this.pendingStyleAttributes.push({attributeName:"label",attributeField:t,attributeValues:o,updateOptions:u}),this}},{key:"animate",value:function(t){var o={};return Hm(t)?(o.enable=!0,o=(0,Me.Z)((0,Me.Z)({},o),t)):o.enable=t,this.updateLayerConfig({animateOption:o}),this}},{key:"source",value:function(t,o){return(t==null?void 0:t.type)==="source"?(this.setSource(t),this):(this.sourceOption={data:t,options:o},this.clusterZoom=0,this)}},{key:"setData",value:function(t,o){var u=this;return this.inited?(this.log(ud.SourceInitStart,Kl.UPDATE),this.layerSource.setData(t,o),this.log(ud.SourceInitEnd,Kl.UPDATE)):this.on("inited",function(){u.log(ud.SourceInitStart,Kl.UPDATE);var c=u.getSource();c?u.layerSource.setData(t,o):u.source(new Mx(t,o)),u.layerSource.once("update",function(){u.log(ud.SourceInitEnd,Kl.UPDATE)})}),this}},{key:"style",value:function(t){var o=this,u=t.passes,c=(0,K0.Z)(t,xP);u&&RE(u).forEach(function(E){var G=o.multiPassRenderer.getPostProcessor().getPostProcessingPassByName(E[0]);G&&G.updateOptions(E[1])}),c.borderColor&&(c.stroke=c.borderColor),c.borderWidth&&(c.strokeWidth=c.borderWidth);var v=c;return Object.keys(c).forEach(function(E){var G=c[E];Array.isArray(G)&&G.length===2&&!BE(G[0])&&!BE(G[1])&&(v[E]={field:G[0],value:G[1]})}),this.encodeStyle(v),this.updateLayerConfig(v),this}},{key:"encodeStyle",value:function(t){var o=this;Object.keys(t).forEach(function(u){[].concat((0,Mn.Z)(o.enableShaderEncodeStyles),(0,Mn.Z)(o.enableDataEncodeStyles)).includes(u)&&MP(t[u])&&(t[u].field||t[u].value)&&!Ox(o.encodeStyleAttribute[u],t[u])?(o.encodeStyleAttribute[u]=t[u],o.updateStyleAttribute(u,t[u].field,t[u].value),o.inited&&(o.dataState.dataMappingNeedUpdate=!0)):o.encodeStyleAttribute[u]&&(delete o.encodeStyleAttribute[u],o.dataState.dataSourceNeedUpdate=!0)})}},{key:"scale",value:function(t,o){var u=(0,Me.Z)({},this.scaleOptions);if(Hm(t)?this.scaleOptions=(0,Me.Z)((0,Me.Z)({},this.scaleOptions),t):this.scaleOptions[t]=o,this.styleAttributeService&&!Ox(u,this.scaleOptions)){var c=Hm(t)?t:(0,St.Z)({},t,o);this.styleAttributeService.updateScaleAttribute(c)}return this}},{key:"renderLayers",value:function(){this.rendering=!0,this.layerService.reRender(),this.rendering=!1}},{key:"prerender",value:function(){}},{key:"render",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.tileLayer?(this.tileLayer.render(),this):(this.layerService.beforeRenderData(this),this.encodeDataLength<=0&&!this.forceRender?this:(this.renderModels(t),this))}},{key:"renderMultiPass",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!(this.encodeDataLength<=0&&!this.forceRender)){c.next=2;break}return c.abrupt("return");case 2:if(!(this.multiPassRenderer&&this.multiPassRenderer.getRenderFlag())){c.next=7;break}return c.next=5,this.multiPassRenderer.render();case 5:c.next=8;break;case 7:this.multiPassRenderer?this.renderModels():this.renderModels();case 8:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"active",value:function(t){var o={};return o.enableHighlight=Hm(t)?!0:t,Hm(t)?(o.enableHighlight=!0,t.color&&(o.highlightColor=t.color),t.mix&&(o.activeMix=t.mix)):o.enableHighlight=!!t,this.updateLayerConfig(o),this}},{key:"setActive",value:function(t,o){var u=this;if(Hm(t)){var c=t.x,v=c===void 0?0:c,E=t.y,G=E===void 0?0:E;this.updateLayerConfig({highlightColor:Hm(o)?o.color:this.getLayerConfig().highlightColor,activeMix:Hm(o)?o.mix:this.getLayerConfig().activeMix}),this.pick({x:v,y:G})}else this.updateLayerConfig({pickedFeatureID:t,highlightColor:Hm(o)?o.color:this.getLayerConfig().highlightColor,activeMix:Hm(o)?o.mix:this.getLayerConfig().activeMix}),this.hooks.beforeHighlight.call(vo(t)).then(function(){setTimeout(function(){u.reRender()},1)})}},{key:"select",value:function(t){var o={};return o.enableSelect=Hm(t)?!0:t,Hm(t)?(o.enableSelect=!0,t.color&&(o.selectColor=t.color),t.mix&&(o.selectMix=t.mix)):o.enableSelect=!!t,this.updateLayerConfig(o),this}},{key:"setSelect",value:function(t,o){var u=this;if(Hm(t)){var c=t.x,v=c===void 0?0:c,E=t.y,G=E===void 0?0:E;this.updateLayerConfig({selectColor:Hm(o)?o.color:this.getLayerConfig().selectColor,selectMix:Hm(o)?o.mix:this.getLayerConfig().selectMix}),this.pick({x:v,y:G})}else this.updateLayerConfig({pickedFeatureID:t,selectColor:Hm(o)?o.color:this.getLayerConfig().selectColor,selectMix:Hm(o)?o.mix:this.getLayerConfig().selectMix}),this.hooks.beforeSelect.call(vo(t)).then(function(){setTimeout(function(){u.reRender()},1)})}},{key:"setBlend",value:function(t){return this.updateLayerConfig({blend:t}),this.reRender(),this}},{key:"show",value:function(){return this.updateLayerConfig({visible:!0}),this.reRender(),this.emit("show"),this}},{key:"hide",value:function(){return this.updateLayerConfig({visible:!1}),this.reRender(),this.emit("hide"),this}},{key:"setIndex",value:function(t){return this.zIndex=t,this.layerService.updateLayerRenderList(),this.layerService.renderLayers(),this}},{key:"setCurrentPickId",value:function(t){this.currentPickId=t}},{key:"getCurrentPickId",value:function(){return this.currentPickId}},{key:"setCurrentSelectedId",value:function(t){this.selectedFeatureID=t}},{key:"getCurrentSelectedId",value:function(){return this.selectedFeatureID}},{key:"isVisible",value:function(){var t=this.mapService.getZoom(),o=this.getLayerConfig(),u=o.visible,c=o.minZoom,v=c===void 0?-1/0:c,E=o.maxZoom,G=E===void 0?1/0:E;return!!u&&t>=v&&t0&&arguments[0]!==void 0?arguments[0]:!0;if(!this.isDestroyed){(t=this.layerModel)===null||t===void 0||t.uniformBuffers.forEach(function(xe){xe.destroy()}),this.layerChildren.map(function(xe){return xe.destroy(!1)}),this.layerChildren=[];var G=this.getLayerConfig(),ie=G.maskfence;ie&&(this.masks.map(function(xe){return xe.destroy(!1)}),this.masks=[]),this.hooks.beforeDestroy.call(),this.layerSource.off("update",this.sourceEvent),(o=this.multiPassRenderer)===null||o===void 0||o.destroy(),this.textureService.destroy(),this.styleAttributeService.clearAllAttributes(),this.hooks.afterDestroy.call(),(u=this.layerModel)===null||u===void 0||u.clearModels(E),(c=this.tileLayer)===null||c===void 0||c.destroy(),this.models=[],(v=this.debugService)===null||v===void 0||v.removeLog(this.id),this.emit("remove",{target:this,type:"remove"}),this.emit("destroy",{target:this,type:"destroy"}),this.removeAllListeners(),this.isDestroyed=!0}}},{key:"clear",value:function(){this.styleAttributeService.clearAllAttributes()}},{key:"clearModels",value:function(){var t;this.models.forEach(function(o){return o.destroy()}),(t=this.layerModel)===null||t===void 0||t.clearModels(),this.models=[]}},{key:"isDirty",value:function(){return!!(this.styleAttributeService.getLayerStyleAttributes()||[]).filter(function(t){return t.needRescale||t.needRemapping||t.needRegenerateVertices}).length}},{key:"setSource",value:function(t){var o=this;if(this.layerSource&&this.layerSource.off("update",this.sourceEvent),this.layerSource=t,this.clusterZoom=0,this.inited&&this.layerSource.cluster){var u=this.mapService.getZoom();this.layerSource.updateClusterData(u)}this.layerSource.inited&&this.sourceEvent(),this.layerSource.on("update",function(c){var v=c.type;if(o.coordCenter===void 0){var E,G=o.layerSource.center;o.coordCenter=G,(E=o.mapService)!==null&&E!==void 0&&E.setCoordCenter&&o.mapService.setCoordCenter(G)}if(v==="update"){if(o.tileLayer){o.tileLayer.reload();return}o.sourceEvent()}})}},{key:"getSource",value:function(){return this.layerSource}},{key:"getScaleOptions",value:function(){return this.scaleOptions}},{key:"setEncodedData",value:function(t){this.encodedData=t,this.encodeDataLength=t.length}},{key:"getEncodedData",value:function(){return this.encodedData}},{key:"getScale",value:function(t){return this.styleAttributeService.getLayerAttributeScale(t)}},{key:"getLegend",value:function(t){var o,u,c,v=this.styleAttributeService.getLayerStyleAttribute(t),E=(v==null||(o=v.scale)===null||o===void 0?void 0:o.scalers)||[];return{type:(u=E[0].option)===null||u===void 0?void 0:u.type,field:v==null||(c=v.scale)===null||c===void 0?void 0:c.field,items:this.getLegendItems(t)}}},{key:"getLegendItems",value:function(t){var o=this.styleAttributeService.getLayerAttributeScale(t);if(!o)return[];if(o.invertExtent){var u=o.range().map(function(E){return(0,St.Z)({value:o.invertExtent(E)},t,E)});return u}else if(o.ticks){var c=o.ticks().map(function(E){return(0,St.Z)({value:E},t,o(E))});return c}else if(o!=null&&o.domain){var v=o.domain().filter(function(E){return!PP(E)}).map(function(E){return(0,St.Z)({value:E},t,o(E))});return v}return[]}},{key:"pick",value:function(t){var o=t.x,u=t.y;this.interactionService.triggerHover({x:o,y:u})}},{key:"boxSelect",value:function(t,o){this.pickingService.boxPickLayer(this,t,o)}},{key:"buildLayerModel",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(u){var c=this,v,E,G,ie,xe,Fe,it,gt,Dt,ar,Mr,Zr,mn,zn;return Qr().wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:return v=u.moduleName,E=u.vertexShader,G=u.fragmentShader,ie=u.inject,xe=u.triangulation,Fe=u.styleOption,it=u.pickingEnabled,gt=it===void 0?!0:it,Dt=(0,K0.Z)(u,wP),this.shaderModuleService.registerModule(v,{vs:E,fs:G,inject:ie}),ar=this.shaderModuleService.getModule(v),Mr=ar.vs,Zr=ar.fs,mn=ar.uniforms,zn=this.rendererService.createModel,kn.abrupt("return",new Promise(function(ui){var Di=c.styleAttributeService.createAttributesAndIndices(c.encodedData,xe,Fe),Aa=Di.attributes,Pa=Di.elements,Lo=Di.count,ns=[].concat((0,Mn.Z)(c.layerModel.uniformBuffers),(0,Mn.Z)(c.rendererService.uniformBuffers),[c.getLayerUniformBuffer()]);gt&&ns.push(c.getPickingUniformBuffer());var ws=(0,Me.Z)({attributes:Aa,uniforms:mn,fs:Zr,vs:Mr,elements:Pa,blend:IE[xf.normal],uniformBuffers:ns,textures:c.layerModel.textures},Dt);Lo&&(ws.count=Lo);var Pf=zn(ws);ui(Pf)}));case 5:case"end":return kn.stop()}},o,this)}));function t(o){return n.apply(this,arguments)}return t}()},{key:"createAttributes",value:function(t){var o=t.triangulation,u=this.styleAttributeService.createAttributes(this.encodedData,o),c=u.attributes;return c}},{key:"getTime",value:function(){return this.layerService.clock.getDelta()}},{key:"setAnimateStartTime",value:function(){this.animateStartTime=this.layerService.clock.getElapsedTime()}},{key:"stopAnimate",value:function(){this.animateStatus&&(this.layerService.stopAnimate(),this.animateStatus=!1,this.updateLayerConfig({animateOption:{enable:!1}}))}},{key:"getLayerAnimateTime",value:function(){return this.layerService.clock.getElapsedTime()-this.animateStartTime}},{key:"needPick",value:function(t){var o=this.getLayerConfig(),u=o.enableHighlight,c=u===void 0?!0:u,v=o.enableSelect,E=v===void 0?!0:v,G=this.eventNames().indexOf(t)!==-1||this.eventNames().indexOf("un"+t)!==-1;return(t==="click"||t==="dblclick")&&E&&(G=!0),t==="mousemove"&&(c||this.eventNames().indexOf("mouseenter")!==-1||this.eventNames().indexOf("unmousemove")!==-1||this.eventNames().indexOf("mouseout")!==-1)&&(G=!0),this.isVisible()&&G}},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return c.stop()}},o)}));function t(){return n.apply(this,arguments)}return t}()},{key:"rebuildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.buildModels();case 2:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"renderMulPass",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(u){return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,u.render();case 2:case"end":return v.stop()}},o)}));function t(o){return n.apply(this,arguments)}return t}()},{key:"renderModels",value:function(){var t=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.encodeDataLength<=0&&!this.forceRender?(this.clearModels(),this):(this.hooks.beforeRender.call(),this.models.forEach(function(u){u.draw({uniforms:t.layerModel.getUninforms(),blend:t.layerModel.getBlend(),stencil:t.layerModel.getStencil(o),textures:t.layerModel.textures},(o==null?void 0:o.ispick)||!1)}),this.hooks.afterRender.call(),this)}},{key:"updateStyleAttribute",value:function(t,o,u,c){var v=this.configService.getAttributeConfig(this.id)||{};return Ox(v[t],{field:o,values:u})?!1:(["color","size","texture","rotate","filter","label","shape"].indexOf(t)!==-1&&this.configService.setAttributeConfig(this.id,(0,St.Z)({},t,{field:o,values:u})),this.startInit?this.styleAttributeService.updateStyleAttribute(t,{scale:(0,Me.Z)({field:o},this.splitValuesAndCallbackInAttribute(u,this.getLayerConfig()[o]))},c):this.pendingStyleAttributes.push({attributeName:t,attributeField:o,attributeValues:u,updateOptions:c}),!0)}},{key:"getLayerAttributeConfig",value:function(){return this.configService.getAttributeConfig(this.id)}},{key:"getShaderPickStat",value:function(){return this.layerService.getShaderPickStat()}},{key:"setEarthTime",value:function(t){console.warn("empty fn")}},{key:"processData",value:function(t){return t}},{key:"getModelType",value:function(){throw new Error("Method not implemented.")}},{key:"getDefaultConfig",value:function(){return{}}},{key:"initLayerModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c;return Qr().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return this.models.forEach(function(G){return G.destroy()}),this.models=[],this.uniformBuffers.forEach(function(G){G.destroy()}),this.uniformBuffers=[],u=this.rendererService.createBuffer({data:new Float32Array(20).fill(0),isUBO:!0}),this.uniformBuffers.push(u),c=this.rendererService.createBuffer({data:new Float32Array(20).fill(0),isUBO:!0}),this.uniformBuffers.push(c),E.next=10,this.layerModel.initModels();case 10:this.models=E.sent;case 11:case"end":return E.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getLayerUniformBuffer",value:function(){return this.uniformBuffers[0]}},{key:"getPickingUniformBuffer",value:function(){return this.uniformBuffers[1]}},{key:"reRender",value:function(){this.inited&&this.layerService.reRender()}},{key:"splitValuesAndCallbackInAttribute",value:function(t){return{values:FE(t)?void 0:t,callback:FE(t)?t:void 0}}}]),r}(cf.EventEmitter),DE=p(Rx.prototype,"configService",[LE],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Rx);function IP(e,i){return{enable:e,mask:255,func:{cmp:Or.EQUAL,ref:i?1:0,mask:1}}}function zE(e){return e.maskOperation===sf.OR?{enable:!0,mask:255,func:{cmp:Or.ALWAYS,ref:1,mask:255},opFront:{fail:Or.KEEP,zfail:Or.REPLACE,zpass:Or.REPLACE}}:{enable:!0,mask:255,func:{cmp:e.stencilType===pc.SINGLE||e.stencilIndex===0?Or.ALWAYS:Or.LESS,ref:e.stencilType===pc.SINGLE?1:e.stencilIndex===0?2:1,mask:255},opFront:{fail:Or.KEEP,zfail:Or.REPLACE,zpass:Or.REPLACE}}}var qc=function(e){return e[e.POSITION=0]="POSITION",e[e.COLOR=1]="COLOR",e[e.VERTEX_ID=2]="VERTEX_ID",e[e.PICKING_COLOR=3]="PICKING_COLOR",e[e.STROKE=4]="STROKE",e[e.OPACITY=5]="OPACITY",e[e.OFFSETS=6]="OFFSETS",e[e.ROTATION=7]="ROTATION",e[e.EXTRUSION_BASE=8]="EXTRUSION_BASE",e[e.SIZE=9]="SIZE",e[e.SHAPE=10]="SHAPE",e[e.EXTRUDE=11]="EXTRUDE",e[e.MAX=12]="MAX",e[e.NORMAL=13]="NORMAL",e[e.UV=14]="UV",e[e.LINEAR=15]="LINEAR",e}({});function RP(e){switch(e){case"rotation":return{name:"Rotation",type:pl.Attribute,descriptor:{name:"a_Rotation",shaderLocation:qc.ROTATION,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(r){var n=r.rotation,t=n===void 0?0:n;return Array.isArray(t)?[t[0]]:[t]}}};case"stroke":return{name:"stroke",type:pl.Attribute,descriptor:{name:"a_Stroke",shaderLocation:qc.STROKE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:4,update:function(r){var n=r.stroke,t=n===void 0?[1,1,1,1]:n;return t}}};case"opacity":return{name:"opacity",type:pl.Attribute,descriptor:{name:"a_Opacity",shaderLocation:qc.OPACITY,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(r){var n=r.opacity,t=n===void 0?1:n;return[t]}}};case"extrusionBase":return{name:"extrusionBase",type:pl.Attribute,descriptor:{name:"a_ExtrusionBase",shaderLocation:qc.EXTRUSION_BASE,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(r){var n=r.extrusionBase,t=n===void 0?0:n;return[t]}}};case"offsets":return{name:"offsets",type:pl.Attribute,descriptor:{name:"a_Offsets",shaderLocation:qc.OFFSETS,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(r){var n=r.offsets;return n}}};case"thetaOffset":return{name:"thetaOffset",type:pl.Attribute,descriptor:{name:"a_ThetaOffset",shaderLocation:15,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(r){var n=r.thetaOffset,t=n===void 0?1:n;return[t]}}};default:return}}var OP={opacity:1,stroke:[1,0,0,1],offsets:[0,0],rotation:0,extrusionBase:0,strokeOpacity:1,thetaOffset:.314},hb={opacity:"float",stroke:"vec4",offsets:"vec2",textOffset:"vec2",rotation:"float",extrusionBase:"float",strokeOpacity:"float",thetaOffset:"float"};function iV(e){var i="";return Object.keys(e).forEach(function(r){var n=e[r];Array.isArray(n)?i+="vec".concat(n.length," ").concat(r,`; -`):i+="flot ".concat(r,`; -`)}),i}function ZE(e){return Math.max(Math.ceil(e/4)*4,4)}var UE,Lx,jE,Dx={opacity:qc.OPACITY,stroke:qc.STROKE,offsets:qc.OFFSETS,rotation:qc.ROTATION,extrusionBase:qc.EXTRUSION_BASE,thetaOffset:15},op=(UE=iv(vr.IGlobalConfigService),Lx=function(){function e(i){(0,Je.Z)(this,e),(0,St.Z)(this,"uniformBuffers",[]),(0,St.Z)(this,"textures",[]),(0,St.Z)(this,"preStyleAttribute",{}),(0,St.Z)(this,"encodeStyleAttribute",{}),A(this,"configService",jE,this),this.layer=i,this.rendererService=i.getContainer().get(vr.IRendererService),this.pickingService=i.getContainer().get(vr.IPickingService),this.shaderModuleService=i.getContainer().get(vr.IShaderModuleService),this.styleAttributeService=i.getContainer().get(vr.IStyleAttributeService),this.mapService=i.getContainer().get(vr.IMapService),this.iconService=i.getContainer().get(vr.IIconService),this.fontService=i.getContainer().get(vr.IFontService),this.cameraService=i.getContainer().get(vr.ICameraService),this.layerService=i.getContainer().get(vr.ILayerService),this.registerStyleAttribute(),this.registerBuiltinAttributes(),this.startModelAnimate();var r=this.rendererService.createTexture2D;this.createTexture2D=r}return(0,vt.Z)(e,[{key:"getBlend",value:function(){var r=this.layer.getLayerConfig(),n=r.blend,t=n===void 0?"normal":n;return IE[xf[t]]}},{key:"getStencil",value:function(r){var n=this.layer.getLayerConfig(),t=n.mask,o=t===void 0?!1:t,u=n.maskInside,c=u===void 0?!0:u,v=n.enableMask,E=n.maskOperation,G=E===void 0?sf.AND:E;if(this.layer.type==="MaskLayer")return zE({isStencil:!0,stencilType:pc.SINGLE});if(r.isStencil)return zE((0,Me.Z)((0,Me.Z)({},r),{},{maskOperation:G}));var ie=o||v&&this.layer.masks.length!==0||this.layer.tileMask!==void 0;return IP(ie,c)}},{key:"getDefaultStyle",value:function(){return{}}},{key:"getUninforms",value:function(){var r=this.getCommonUniformsInfo(),n=this.getUniformsBufferInfo(this.getStyleAttribute());this.updateStyleUnifoms();var t=(0,Me.Z)((0,Me.Z)({},n.uniformsOption),r.uniformsOption);return!this.rendererService.hasOwnProperty("device")&&this.textures&&this.textures.length===1&&(t.u_texture=this.textures[0]),t}},{key:"getAnimateUniforms",value:function(){return{}}},{key:"needUpdate",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(){return Qr().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",!1);case 1:case"end":return o.stop()}},n)}));function r(){return i.apply(this,arguments)}return r}()},{key:"buildModels",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(){return Qr().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return o.stop()}},n)}));function r(){return i.apply(this,arguments)}return r}()},{key:"initModels",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(){return Qr().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return o.stop()}},n)}));function r(){return i.apply(this,arguments)}return r}()},{key:"clearModels",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0}},{key:"getAttribute",value:function(){throw new Error("Method not implemented.")}},{key:"prerender",value:function(){}},{key:"render",value:function(r){throw new Error("Method not implemented.")}},{key:"registerBuiltinAttributes",value:function(){throw new Error("Method not implemented.")}},{key:"animateOption2Array",value:function(r){return[r.enable?0:1,r.duration||4,r.interval||.2,r.trailLength||.1]}},{key:"startModelAnimate",value:function(){var r=this.layer.getLayerConfig(),n=r.animateOption;n.enable&&this.layer.setAnimateStartTime()}},{key:"getInject",value:function(){var r=this.layer.encodeStyleAttribute,n="",t=[];this.layer.enableShaderEncodeStyles.forEach(function(c){r[c]?n+="#define USE_ATTRIBUTE_".concat(c.toUpperCase(),` 0.0; - -`):t.push(" ".concat(hb[c]," u_").concat(c,";"));var v=Dx[c];!v&&c==="THETA_OFFSET"&&(v=15),n+=` - #ifdef USE_ATTRIBUTE_`.concat(c.toUpperCase(),` - layout(location = `).concat(Dx[c],") in ").concat(hb[c]," a_").concat(c.charAt(0).toUpperCase()+c.slice(1),`; - #endif - - `)});var o=t.length?` -layout(std140) uniform AttributeUniforms { -`.concat(t.join(` -`),` -}; - `):"";n+=o;var u="";return this.layer.enableShaderEncodeStyles.forEach(function(c){u+=` - - #ifdef USE_ATTRIBUTE_`.concat(c.toUpperCase(),` - `).concat(hb[c]," ").concat(c," = a_").concat(c.charAt(0).toUpperCase()+c.slice(1),`; - #else - `).concat(hb[c]," ").concat(c," = u_").concat(c,`; - #endif - - `)}),{"vs:#decl":n,"fs:#decl":o,"vs:#main-start":u}}},{key:"getStyleAttribute",value:function(){var r=this,n={};return this.layer.enableShaderEncodeStyles.forEach(function(t){if(!r.layer.encodeStyleAttribute[t]){var o=r.layer.getLayerConfig()[t],u=typeof o=="undefined"?OP[t]:o;t==="stroke"&&(u=Fa(u)),n["u_"+t]=u}}),n}},{key:"registerStyleAttribute",value:function(){var r=this;Object.keys(this.layer.encodeStyleAttribute).forEach(function(n){var t=RP(n);t&&(r.styleAttributeService.registerStyleAttribute(t),t.descriptor&&(t.descriptor.shaderLocation=Dx[n]))})}},{key:"updateEncodeAttribute",value:function(r,n){this.encodeStyleAttribute[r]=n}},{key:"initUniformsBuffer",value:function(){var r=this.getUniformsBufferInfo(this.getStyleAttribute()),n=this.getCommonUniformsInfo();r.uniformsLength!==0&&(this.attributeUnifoms=this.rendererService.createBuffer({data:new Float32Array(ZE(r.uniformsLength)).fill(0),isUBO:!0}),this.uniformBuffers.push(this.attributeUnifoms)),n.uniformsLength!==0&&(this.commonUnifoms=this.rendererService.createBuffer({data:new Float32Array(ZE(n.uniformsLength)).fill(0),isUBO:!0}),this.uniformBuffers.push(this.commonUnifoms))}},{key:"getUniformsBufferInfo",value:function(r){var n=0,t=[];return Object.values(r).forEach(function(o){Array.isArray(o)?(t.push.apply(t,(0,Mn.Z)(o)),n+=o.length):typeof o=="number"?(t.push(o),n+=1):typeof o=="boolean"&&(t.push(Number(o)),n+=1)}),{uniformsOption:r,uniformsLength:n,uniformsArray:t}}},{key:"getCommonUniformsInfo",value:function(){return{uniformsLength:0,uniformsArray:[],uniformsOption:{}}}},{key:"updateStyleUnifoms",value:function(){var r,n,t=this.getUniformsBufferInfo(this.getStyleAttribute()),o=t.uniformsArray,u=this.getCommonUniformsInfo(),c=u.uniformsArray;(r=this.attributeUnifoms)===null||r===void 0||r.subData({offset:0,data:new Uint8Array(new Float32Array(o).buffer)}),(n=this.commonUnifoms)===null||n===void 0||n.subData({offset:0,data:new Uint8Array(new Float32Array(c).buffer)})}}]),e}(),jE=p(Lx.prototype,"configService",[UE],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Lx),LP=function(e){return e[e.solid=0]="solid",e[e.dash=1]="dash",e}({}),kx=function(e){return e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e}({}),VE=function(e){return e.NORMAL="normal",e.REPLACE="replace",e}({}),db=function(e){return e[e.pixel=0]="pixel",e[e.meter=1]="meter",e}({}),O1=function(e){return e.ALWAYS="always",e.DRAGEND="dragend",e}({});function DP(e){var i=kP();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function kP(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var FP=function(e){(0,Ce.Z)(r,e);var i=DP(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u0&&(o=1/Math.sqrt(o)),e[0]=i[0]*o,e[1]=i[1]*o,e[2]=i[2]*o,e}function qE(e,i){return e[0]*i[0]+e[1]*i[1]+e[2]*i[2]}function pb(e,i,r){var n=i[0],t=i[1],o=i[2],u=r[0],c=r[1],v=r[2];return e[0]=t*v-o*c,e[1]=o*u-n*v,e[2]=n*c-t*u,e}function JP(e,i,r,n){var t=i[0],o=i[1],u=i[2];return e[0]=t+n*(r[0]-t),e[1]=o+n*(r[1]-o),e[2]=u+n*(r[2]-u),e}function eI(e,i,r,n,t,o){var u=o*o,c=u*(2*o-3)+1,v=u*(o-2)+o,E=u*(o-1),G=u*(3-2*o);return e[0]=i[0]*c+r[0]*v+n[0]*E+t[0]*G,e[1]=i[1]*c+r[1]*v+n[1]*E+t[1]*G,e[2]=i[2]*c+r[2]*v+n[2]*E+t[2]*G,e}function tI(e,i,r,n,t,o){var u=1-o,c=u*u,v=o*o,E=c*u,G=3*o*c,ie=3*v*u,xe=v*o;return e[0]=i[0]*E+r[0]*G+n[0]*ie+t[0]*xe,e[1]=i[1]*E+r[1]*G+n[1]*ie+t[1]*xe,e[2]=i[2]*E+r[2]*G+n[2]*ie+t[2]*xe,e}function rI(e,i){i=i||1;var r=Hf()*2*Math.PI,n=Hf()*2-1,t=Math.sqrt(1-n*n)*i;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e[2]=n*i,e}function qy(e,i,r){var n=i[0],t=i[1],o=i[2],u=r[3]*n+r[7]*t+r[11]*o+r[15];return u=u||1,e[0]=(r[0]*n+r[4]*t+r[8]*o+r[12])/u,e[1]=(r[1]*n+r[5]*t+r[9]*o+r[13])/u,e[2]=(r[2]*n+r[6]*t+r[10]*o+r[14])/u,e}function nI(e,i,r){var n=i[0],t=i[1],o=i[2];return e[0]=n*r[0]+t*r[3]+o*r[6],e[1]=n*r[1]+t*r[4]+o*r[7],e[2]=n*r[2]+t*r[5]+o*r[8],e}function iI(e,i,r){var n=r[0],t=r[1],o=r[2],u=r[3],c=i[0],v=i[1],E=i[2],G=t*E-o*v,ie=o*c-n*E,xe=n*v-t*c,Fe=t*xe-o*ie,it=o*G-n*xe,gt=n*ie-t*G,Dt=u*2;return G*=Dt,ie*=Dt,xe*=Dt,Fe*=2,it*=2,gt*=2,e[0]=c+G+Fe,e[1]=v+ie+it,e[2]=E+xe+gt,e}function aI(e,i,r,n){var t=[],o=[];return t[0]=i[0]-r[0],t[1]=i[1]-r[1],t[2]=i[2]-r[2],o[0]=t[0],o[1]=t[1]*Math.cos(n)-t[2]*Math.sin(n),o[2]=t[1]*Math.sin(n)+t[2]*Math.cos(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e}function oI(e,i,r,n){var t=[],o=[];return t[0]=i[0]-r[0],t[1]=i[1]-r[1],t[2]=i[2]-r[2],o[0]=t[2]*Math.sin(n)+t[0]*Math.cos(n),o[1]=t[1],o[2]=t[2]*Math.cos(n)-t[0]*Math.sin(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e}function sI(e,i,r,n){var t=[],o=[];return t[0]=i[0]-r[0],t[1]=i[1]-r[1],t[2]=i[2]-r[2],o[0]=t[0]*Math.cos(n)-t[1]*Math.sin(n),o[1]=t[0]*Math.sin(n)+t[1]*Math.cos(n),o[2]=t[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e}function Nx(e,i){var r=e[0],n=e[1],t=e[2],o=i[0],u=i[1],c=i[2],v=Math.sqrt(r*r+n*n+t*t),E=Math.sqrt(o*o+u*u+c*c),G=v*E,ie=G&&qE(e,i)/G;return Math.acos(Math.min(Math.max(ie,-1),1))}function uI(e){return e[0]=0,e[1]=0,e[2]=0,e}function lI(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function cI(e,i){return e[0]===i[0]&&e[1]===i[1]&&e[2]===i[2]}function fI(e,i){var r=e[0],n=e[1],t=e[2],o=i[0],u=i[1],c=i[2];return Math.abs(r-o)<=Dh*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-u)<=Dh*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(t-c)<=Dh*Math.max(1,Math.abs(t),Math.abs(c))}var zx=HE,hI=Fx,dI=GE,pI=WE,mI=XE,vI=$E,gI=YE,yI=function(){var e=dy();return function(i,r,n,t,o,u){var c,v;for(r||(r=3),n||(n=0),t?v=Math.min(t*r+n,i.length):v=i.length,c=n;c0)for(var zn=ie.length,Rn=zn-2*(v+1);Rn+v+20&&arguments[0]!==void 0?arguments[0]:{};(0,Je.Z)(this,e),(0,St.Z)(this,"lastFlip",-1),(0,St.Z)(this,"miter",Jh(0,0)),(0,St.Z)(this,"started",!1),(0,St.Z)(this,"dash",!1),(0,St.Z)(this,"totalDistance",0),(0,St.Z)(this,"currentIndex",0),this.join=i.join||"miter",this.cap=i.cap||"butt",this.miterLimit=i.miterLimit||10,this.thickness=i.thickness||1,this.dash=i.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return(0,vt.Z)(e,[{key:"simpleExtrude",value:function(r){var n=this.complex;if(r.length<=1)return n;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var t=r.length,o=n.startIndex,u=1;uthis.miterLimit&&(Lo=!0)}Lo?(Fe.push(this.normal[0],this.normal[1],0),Fe.push(Aa[0],Aa[1],0),xe.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Pa,o[2]|0),this.complex.indexes.push(this.currentIndex),xe.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness*Pa,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,ie.push.apply(ie,(0,Mn.Z)(this.lastFlip!==-Pa?[n,n+2,n+3]:[n+2,n+1,n+3])),ie.push(n+2,n+3,n+4),gy(vb,vy),Qc(this.normal,vb),Fe.push(this.normal[0],this.normal[1],0),xe.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Pa,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,G+=3):(this.extrusions(xe,Fe,o,Aa,Di,this.totalDistance),ie.push.apply(ie,(0,Mn.Z)(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),Pa=-1,Qc(this.normal,Aa),G+=2),this.lastFlip=Pa}else{if(gy(this.normal,Dm),it){var zn=Wl(),Rn=Wl();_d(Rn,Dm,this.normal),vc(zn,Dm,this.normal),Fe.push(Rn[0],Rn[1],0),Fe.push(zn[0],zn[1],0),xe.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),xe.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(xe,Fe,o,this.normal,this.thickness,this.totalDistance);ie.push.apply(ie,(0,Mn.Z)(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),G+=2}return G}},{key:"segment",value:function(r,n,t,o,u){var c=0,v=r.indices,E=r.positions,G=r.normals,ie=this.cap==="square",xe=this.join==="bevel",Fe=zc([o[0],o[1]]),it=zc([t[0],t[1]]);D1(Dm,Fe,it);var gt=0;if(this.dash&&(gt=this.lineSegmentDistance(Fe,it),this.totalDistance+=gt),this.normal||(this.normal=Wl(),gy(this.normal,Dm)),!this.started)if(this.started=!0,ie){var Dt=Wl(),ar=Wl();vc(Dt,this.normal,Dm),vc(ar,this.normal,Dm),G.push(ar[0],ar[1],0),G.push(Dt[0],Dt[1],0),E.push(t[0],t[1],t[2]|0,this.totalDistance-gt,-this.thickness,t[2]|0),this.complex.indexes.push(this.currentIndex),E.push(t[0],t[1],t[2]|0,this.totalDistance-gt,this.thickness,t[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(E,G,t,this.normal,this.thickness,this.totalDistance-gt);if(v.push(n+0,n+1,n+2),u){var mn=zc([u[0],u[1]]);Ux(Fe,mn)&&vc(mn,Fe,td(mn,kf(mn,Fe,it))),D1(vy,mn,Fe);var zn=Zx(L1,Wl(),Dm,vy,this.thickness),Rn=(0,wi.Z)(zn,2),kn=Rn[0],ui=Rn[1],Di=Ud(L1,this.normal)<0?-1:1,Aa=xe;if(!Aa&&this.join==="miter"){var Pa=kn;Pa>this.miterLimit&&(Aa=!0)}Aa?(G.push(this.normal[0],this.normal[1],0),G.push(ui[0],ui[1],0),E.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Di,o[2]|0),this.complex.indexes.push(this.currentIndex),E.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness*Di,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,v.push.apply(v,(0,Mn.Z)(this.lastFlip!==-Di?[n,n+2,n+3]:[n+2,n+1,n+3])),v.push(n+2,n+3,n+4),gy(vb,vy),Qc(this.normal,vb),G.push(this.normal[0],this.normal[1],0),E.push(o[0],o[1],o[2]|0,this.totalDistance,-this.thickness*Di,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++,c+=3):(this.extrusions(E,G,o,ui,kn,this.totalDistance),v.push.apply(v,(0,Mn.Z)(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),Di=-1,Qc(this.normal,ui),c+=2),this.lastFlip=Di}else{if(gy(this.normal,Dm),ie){var Mr=Wl(),Zr=Wl();_d(Zr,Dm,this.normal),vc(Mr,Dm,this.normal),G.push(Zr[0],Zr[1],0),G.push(Mr[0],Mr[1],0),E.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),E.push(o[0],o[1],o[2]|0,this.totalDistance,this.thickness,o[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(E,G,o,this.normal,this.thickness,this.totalDistance);v.push.apply(v,(0,Mn.Z)(this.lastFlip===1?[n,n+2,n+3]:[n+2,n+1,n+3])),c+=2}return c}},{key:"extrusions",value:function(r,n,t,o,u,c){n.push(o[0],o[1],0),n.push(o[0],o[1],0),r.push(t[0],t[1],t[2]|0,c,-u,t[2]|0),this.complex.indexes.push(this.currentIndex),r.push(t[0],t[1],t[2]|0,c,u,t[2]|0),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(r,n){var t=n[0]-r[0],o=n[1]-r[1];return Math.sqrt(t*t+o*o)}}]),e}();function bI(e){var i=e[0][0],r=e[0][e[0].length-1];i[0]===r[0]&&i[1]===r[1]&&(e[0]=e[0].slice(0,e[0].length-1));for(var n=e[0].length,t=Hh().flatten(e),o=t.vertices,u=t.dimensions,c=[],v=[],E=0;E1&&arguments[1]!==void 0?arguments[1]:!1,r=e[0][0],n=e[0][e[0].length-1];r[0]===n[0]&&r[1]===n[1]&&(e[0]=e[0].slice(0,e[0].length-1));for(var t=e[0].length,o=Hh().flatten(e),u=o.vertices,c=o.dimensions,v=[],E=[],G=[],ie=0;ie3&&arguments[3]!==void 0?arguments[3]:!1,t=dy(),o=dy(),u=dy();n&&(e=ah(e),i=ah(i),r=ah(r));var c=qd.apply(d,(0,Mn.Z)(e)),v=qd.apply(d,(0,Mn.Z)(i)),E=qd.apply(d,(0,Mn.Z)(r));zx(t,E,v),zx(o,c,v),pb(u,t,o);var G=dy();return py(G,u),G}var Lv,I_=function(e){return e.CYLINDER="cylinder",e.SQUARECOLUMN="squareColumn",e.TRIANGLECOLUMN="triangleColumn",e.HEXAGONCOLUMN="hexagonColumn",e.PENTAGONCOLUMN="pentagonColumn",e}({}),R_=function(e){return e.CIRCLE="circle",e.SQUARE="square",e.TRIANGLE="triangle",e.HEXAGON="hexagon",e.PENTAGON="pentagon",e}({});function O_(e){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=Math.PI*2/e,n=[],t=0;t1&&arguments[1]!==void 0?arguments[1]:!1;if(gb&&gb[e])return gb[e];var r=k1[e]?k1[e]():k1.cylinder(),n=rS([r],i);return gb[e]=n,n}function lV(e,i){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:3,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,t=new Float32Array(e.length/r*3),o,u,c,v=vec3.create(),E=vec3.create(),G=vec3.create(),ie=0,xe=i.length;ie 0.0 && v_worldDis < u_cityMinSize) { - float r = fract(((v_worldDis/u_cityMinSize) - u_time * u_circleSweepSpeed) * 2.0); - outputColor.rgb += r * r * u_circleSweepColor.rgb; - } - - outputColor.a *= u_opacity; - outputColor = filterColor(outputColor); -} -`,NI=`precision highp float; - -#define ambientRatio 0.5 -#define diffuseRatio 0.3 -#define specularRatio 0.2 - -layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 13) in vec3 a_Normal; -layout(location = 14) in vec2 a_Uv; - -out vec2 v_texCoord; -out vec4 v_Color; -out float v_worldDis; - -layout(std140) uniform commonUniforms { - vec4 u_baseColor : [ 1.0, 0, 0, 1.0 ]; - vec4 u_brightColor : [ 1.0, 0, 0, 1.0 ]; - vec4 u_windowColor : [ 1.0, 0, 0, 1.0 ]; - vec4 u_circleSweepColor; - vec2 u_cityCenter; - float u_circleSweep; - float u_cityMinSize; - float u_circleSweepSpeed; - float u_opacity: 1.0; - float u_near : 0; - float u_far : 1; - float u_time; -}; -#pragma include "projection" -#pragma include "light" -#pragma include "picking" - - -void main() { - vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0); - vec4 project_pos = project_position(pos); - - v_texCoord = a_Uv; - - if(u_circleSweep > 0.0) { - vec2 lnglatscale = vec2(0.0); - if(u_CoordinateSystem != COORDINATE_SYSTEM_P20_2) { - lnglatscale = (a_Position.xy - u_cityCenter) * vec2(0.0, 0.135); - } - v_worldDis = length(a_Position.xy + lnglatscale - u_cityCenter); - } - - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0)); - } else { - gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0)); - } - - float lightWeight = calc_lighting(pos); - // v_Color = a_Color; - v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w); - - setPickingColor(a_PickingColor); -} -`,zI=function(e){(0,Ce.Z)(r,e);var i=kI(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.opacity,u=o===void 0?1:o,c=t.baseColor,v=c===void 0?"rgb(16,16,16)":c,E=t.brightColor,G=E===void 0?"rgb(255,176,38)":E,ie=t.windowColor,xe=ie===void 0?"rgb(30,60,89)":ie,Fe=t.time,it=Fe===void 0?0:Fe,gt=t.sweep,Dt=gt===void 0?{enable:!1,sweepRadius:1,sweepColor:"rgb(255, 255, 255)",sweepSpeed:.4,sweepCenter:this.cityCenter}:gt,ar={u_baseColor:Fa(v),u_brightColor:Fa(G),u_windowColor:Fa(xe),u_circleSweepColor:[].concat((0,Mn.Z)(Fa(Dt.sweepColor).slice(0,3)),[1]),u_cityCenter:Dt.sweepCenter||this.cityCenter,u_circleSweep:Dt.enable?1:0,u_cityMinSize:this.cityMinSize*Dt.sweepRadius,u_circleSweepSpeed:Dt.sweepSpeed,u_opacity:u,u_near:0,u_far:1,u_time:this.layer.getLayerAnimateTime()||it},Mr=this.getUniformsBufferInfo(ar);return Mr}},{key:"calCityGeo",value:function(){var t=(0,wi.Z)(this.layer.getSource().extent,4),o=t[0],u=t[1],c=t[2],v=t[3];if(this.mapService.version==="GAODE2.x"){this.cityCenter=this.mapService.lngLatToCoord([(c+o)/2,(v+u)/2]);var E=this.mapService.lngLatToCoord([c,v]),G=this.mapService.lngLatToCoord([o,u]);this.cityMinSize=Math.sqrt(Math.pow(E[0]-G[0],2)+Math.pow(E[1]-G[1],2))/4}else{var ie=c-o,xe=v-u;this.cityCenter=[(c+o)/2,(v+u)/2],this.cityMinSize=Math.sqrt(Math.pow(ie,2)+Math.pow(xe,2))/4}}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.calCityGeo(),this.initUniformsBuffer(),this.startModelAnimate(),c.abrupt("return",this.buildModels());case 4:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,this.layer.buildLayerModel({moduleName:"cityBuilding",vertexShader:NI,fragmentShader:BI,triangulation:Hx,depth:{enable:!0},inject:this.getInject(),cull:{enable:!0,face:Or.BACK}});case 2:return u=v.sent,v.abrupt("return",[u]);case 4:case"end":return v.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"normal",type:pl.Attribute,descriptor:{name:"a_Normal",shaderLocation:qc.NORMAL,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o,u,c,v,E){return E}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(o){var u=o.size,c=u===void 0?10:u;return Array.isArray(c)?[c[0]]:[c]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:pl.Attribute,descriptor:{name:"a_Uv",shaderLocation:qc.UV,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(o,u,c){return[c[3],c[4]]}}})}}]),r}(op);function ZI(e){var i=UI();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function UI(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var jI=function(e){(0,Ce.Z)(r,e);var i=ZI(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u 0.0) { - outputColor = texture(SAMPLER_2D(u_texture), vec2(v_uv.x, 1.0 - v_uv.y)); - outputColor.a *= u_opacity; - } else { - // gl_FragColor = vec4(v_uv, 0.0, u_opacity); - outputColor = vec4(v_Color, u_opacity); - } - outputColor.a *= v_clip; - outputColor = filterColor(outputColor); -} -`,qI=` -layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec3 a_Color; -layout(location = 14) in vec2 a_Uv; - -layout(std140) uniform commonUniforms { - float u_opacity; - float u_mapFlag; - float u_terrainClipHeight; -}; - -out vec3 v_Color; -out vec2 v_uv; -out float v_clip; - -#pragma include "projection" -#pragma include "picking" -void main() { - v_Color = a_Color; - v_uv = a_Uv; - - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - - v_clip = 1.0; - if(a_Position.z < u_terrainClipHeight) { - v_clip = 0.0; - } - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy, a_Position.z, 1.0)); - - setPickingColor(a_PickingColor); -} -`,QI=function(e){(0,Ce.Z)(r,e);var i=XI(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u0&&arguments[0]!==void 0?arguments[0]:1,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:120,E=arguments.length>5&&arguments[5]!==void 0?arguments[5]:30,G=t/2,ie=o/2,xe=Math.floor(u),Fe=Math.floor(c),it=xe+1,gt=Fe+1,Dt=t/xe,ar=o/Fe,Mr=[],Zr=[],mn=0;mn 0.0) { - outputColor = texture(SAMPLER_2D(u_texture), gl_PointCoord); - outputColor.a *= u_opacity; - } else { - outputColor = vec4(v_Color, u_opacity); - } -} -`,rR=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec3 a_Color; - -layout(std140) uniform commonUniforms { - float u_opacity; - float u_mapFlag; - float u_Scale; -}; - -out vec3 v_Color; -out float v_d; - -#pragma include "projection" -void main() { - v_Color = a_Color.xyz; - - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - - v_d = a_Position.z; - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy, a_Position.z, 1.0)); -gl_PointSize = pow((u_Zoom - 1.0), 2.0) * u_Scale; -} -`,B1=function(e){return e.UP="up",e.DOWN="down",e}(B1||{}),nR=function(e){(0,Ce.Z)(r,e);var i=JI(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;uxe&&(n.positions[Fe+2]=ie)):(n.positions[Fe+2]-=G,n.positions[Fe+2]0&&arguments[0]!==void 0?arguments[0]:10,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:120,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:30,v=[],E=[],G=this.mapService,ie=this.spriteAnimate===B1.UP?-this.spriteTop:this.spriteTop,xe=0;xe 1 \u7684 uv \u8F6C\u6362\u4E3A -1 -> 1 \u7684\u6807\u51C6\u5750\u6807\u7A7A\u95F4\uFF08NDC\uFF09 - - vec4 p1 = vec4(pos, 0.0, 1.0); // x/y \u5E73\u9762\u4E0A\u7684\u70B9\uFF08z == 0\uFF09\u53EF\u4EE5\u8BA4\u4E3A\u662F\u4E09\u7EF4\u4E0A\u7684\u70B9\u88AB\u6295\u5F71\u5230\u5E73\u9762\u540E\u7684\u70B9 - vec4 p2 = vec4(pos, 1.0, 1.0); // \u5E73\u884C\u4E8Ex/y\u5E73\u9762\u3001z==1 \u7684\u5E73\u9762\u4E0A\u7684\u70B9 - - vec4 inverseP1 = u_InverseViewProjectionMatrix * p1; // \u6839\u636E\u89C6\u56FE\u6295\u5F71\u77E9\u9635\u7684\u9006\u77E9\u9635\u5E73\u9762\u4E0A\u7684\u53CD\u7B97\u51FA\u4E09\u7EF4\u7A7A\u95F4\u4E2D\u7684\u70B9\uFF08p1\u5E73\u9762\u4E0A\u7684\u70B9\uFF09 - vec4 inverseP2 = u_InverseViewProjectionMatrix * p2; - - inverseP1 = inverseP1 / inverseP1.w; // \u5F52\u4E00\u5316\u64CD\u4F5C\uFF08\u5F52\u4E00\u5316\u540E\u4E3A\u4E16\u754C\u5750\u6807\uFF09 - inverseP2 = inverseP2 / inverseP2.w; - - float zPos = (0.0 - inverseP1.z) / (inverseP2.z - inverseP1.z); // ?? - vec4 position = inverseP1 + zPos * (inverseP2 - inverseP1); - - vec4 b= vec4(0.5000, 0.0, 1.0, 0.5000); - float fh; - - v_intensity = texture(SAMPLER_2D(u_texture), v_texCoord).r; - fh = toBezier(v_intensity, b).y; - gl_Position = u_ViewProjectionMatrixUncentered * vec4(position.xy, fh * project_pixel(50.), 1.0); - -} -`,ER=`uniform sampler2D u_texture; // \u70ED\u529B\u5F3A\u5EA6\u56FE -uniform sampler2D u_colorTexture; // \u6839\u636E\u5F3A\u5EA6\u5206\u5E03\u7684\u8272\u5E26 - -layout(std140) uniform commonUniforms { - float u_opacity; - float u_common_uniforms_padding1; - float u_common_uniforms_padding2; - float u_common_uniforms_padding3; -}; -in vec2 v_texCoord; -out vec4 outputColor; - -#pragma include "scene_uniforms" - -float getBlurIndusty() { - float vW = 2.0/ u_ViewportSize.x; - float vH = 2.0/ u_ViewportSize.y; - vec2 vUv = v_texCoord; - float i11 = texture(SAMPLER_2D(u_texture), vec2( vUv.x - 1.0 * vW, vUv.y + 1.0 * vH) ).r; - float i12 = texture(SAMPLER_2D(u_texture), vec2( vUv.x - 0.0 * vW, vUv.y + 1.0 * vH) ).r; - float i13 = texture(SAMPLER_2D(u_texture), vec2( vUv.x + 1.0 * vW, vUv.y + 1.0 * vH) ).r; - - float i21 = texture(SAMPLER_2D(u_texture), vec2( vUv.x - 1.0 * vW, vUv.y) ).r; - float i22 = texture(SAMPLER_2D(u_texture), vec2( vUv.x , vUv.y) ).r; - float i23 = texture(SAMPLER_2D(u_texture), vec2( vUv.x + 1.0 * vW, vUv.y) ).r; - - float i31 = texture(SAMPLER_2D(u_texture), vec2( vUv.x - 1.0 * vW, vUv.y-1.0*vH) ).r; - float i32 = texture(SAMPLER_2D(u_texture), vec2( vUv.x - 0.0 * vW, vUv.y-1.0*vH) ).r; - float i33 = texture(SAMPLER_2D(u_texture), vec2( vUv.x + 1.0 * vW, vUv.y-1.0*vH) ).r; - - return( - i11 + - i12 + - i13 + - i21 + - i21 + - i22 + - i23 + - i31 + - i32 + - i33 - )/9.0; -} - - -void main(){ - // float intensity = texture(u_texture, v_texCoord).r; - float intensity = getBlurIndusty(); - vec4 color = texture(SAMPLER_2D(u_colorTexture), vec2(intensity, 0.0)); - outputColor = color; - outputColor.a = color.a * smoothstep(0.,0.1,intensity) * u_opacity; -} -`,SR=` -layout(location = 0) in vec3 a_Position; -layout(location = 14) in vec2 a_Uv; - -layout(std140) uniform commonUniforms { - float u_opacity; - float u_common_uniforms_padding1; - float u_common_uniforms_padding2; - float u_common_uniforms_padding3; -}; - -#pragma include "scene_uniforms" - -out vec2 v_texCoord; -void main() { - v_texCoord = a_Uv; - #ifdef VIEWPORT_ORIGIN_TL - v_texCoord.y = 1.0 - v_texCoord.y; - #endif - - gl_Position = vec4(a_Position.xy, 0, 1.); -} -`,CR=`layout(std140) uniform commonUniforms { - float u_radius; - float u_intensity; - float u_common_uniforms_padding1; - float u_common_uniforms_padding2; -}; - -in vec2 v_extrude; -in float v_weight; -out vec4 outputColor; -#define GAUSS_COEF 0.3989422804014327 - -void main(){ - float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude); - float val = v_weight * u_intensity * GAUSS_COEF * exp(d); - outputColor = vec4(val, 1., 1., 1.); -} -`,TR=`layout(location = 0) in vec3 a_Position; -layout(location = 9) in float a_Size; -layout(location = 10) in vec2 a_Dir; - - -layout(std140) uniform commonUniforms { - float u_radius; - float u_intensity; - float u_common_uniforms_padding1; - float u_common_uniforms_padding2; -}; - -out vec2 v_extrude; -out float v_weight; - -#define GAUSS_COEF 0.3989422804014327 - -#pragma include "projection" -#pragma include "picking" - -void main(){ - vec3 picking_color_placeholder = u_PickingColor; - - v_weight = a_Size; - float ZERO = 1.0 / 255.0 / 16.0; - float extrude_x = a_Dir.x * 2.0 -1.0; - float extrude_y = a_Dir.y * 2.0 -1.0; - vec2 extrude_dir = normalize(vec2(extrude_x,extrude_y)); - float S = sqrt(-2.0 * log(ZERO / a_Size / u_intensity / GAUSS_COEF)) / 2.5; - v_extrude = extrude_dir * S; - - vec2 offset = project_pixel(v_extrude * u_radius); - vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0)); - - // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0)); - - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - gl_Position = u_Mvp * (vec4(project_pos.xy + offset, 0.0, 1.0)); - } else { - gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0)); - } -} -`,MR=vi.isEqual,pS=(hS=(0,bo.b2)(),hS(dS=function(e){(0,Ce.Z)(r,e);var i=AR(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u0&&arguments[0]!==void 0?arguments[0]:{},u=this.getModelType();return u==="heatmap"?(this.layerModel&&this.layerModel.render(o),this):this.encodeDataLength<=0&&!this.forceRender?this:(this.hooks.beforeRender.call(),this.models.forEach(function(c){return c.draw({uniforms:t.layerModel.getUninforms(),blend:t.layerModel.getBlend(),stencil:t.layerModel.getStencil(o)})}),this.hooks.afterRender.call(),this)}},{key:"updateModelData",value:function(t){t.attributes&&t.elements?this.models[0].updateAttributesAndElements(t.attributes,t.elements):console.warn("data error")}},{key:"getModelType",value:function(){var t,o=this.styleAttributeService.getLayerStyleAttribute("shape"),u=this.getLayerConfig(),c=u.shape3d,v=this.getSource(),E=v.data.type,G=(o==null||(t=o.scale)===null||t===void 0?void 0:t.field)||"heatmap";return G==="heatmap"||G==="heatmap3d"?"heatmap":E==="hexagon"?(c==null?void 0:c.indexOf(G))===-1?"hexagon":"grid3d":E==="grid"?(c==null?void 0:c.indexOf(G))===-1?"grid":"grid3d":"heatmap"}}]),r}(pv);function zR(e){var i=ZR();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function ZR(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var UR=`uniform sampler2D u_texture; -layout(std140) uniform commonUniforms { - float u_opacity:1.0; - float u_brightness:1.0; - float u_contrast:1.0; - float u_saturation:1.0; - float u_gamma:1.0; -}; - -in vec2 v_texCoord; -out vec4 outputColor; -vec3 setContrast(vec3 rgb, float contrast) { - vec3 color = mix(vec3(0.5), rgb, contrast); - color = clamp(color, 0.0, 1.0); - return color; -} -vec3 setSaturation(vec3 rgb, float adjustment) { - const vec3 grayVector = vec3(0.2125, 0.7154, 0.0721); - vec3 intensity = vec3(dot(rgb, grayVector)); - vec3 color = mix(intensity, rgb, adjustment); - color = clamp(color, 0.0, 1.0); - return color; -} -void main() { - vec4 color = texture(SAMPLER_2D(u_texture),vec2(v_texCoord.x,v_texCoord.y)); - //brightness - color.rgb = mix(vec3(0.0, 0.0, 0.0), color.rgb, u_brightness); - //contrast - color.rgb = setContrast(color.rgb, u_contrast); - // saturation - color.rgb = setSaturation(color.rgb, u_saturation); - // gamma - color.rgb = pow(color.rgb, vec3(u_gamma)); - outputColor = color; - outputColor.a *= u_opacity; - if(outputColor.a < 0.01) - discard; -} -`,jR=`layout(location = 0) in vec3 a_Position; -layout(location = 14) in vec2 a_Uv; - -layout(std140) uniform commonUniforms { - float u_opacity:1.0; - float u_brightness:1.0; - float u_contrast:1.0; - float u_saturation:1.0; - float u_gamma:1.0; -}; - -out vec2 v_texCoord; -#pragma include "projection" -void main() { - v_texCoord = a_Uv; - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy,0., 1.0)); - -} -`,VR=function(e){(0,Ce.Z)(r,e);var i=zR(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.opacity,u=t.brightness,c=t.contrast,v=t.saturation,E=t.gamma,G={u_opacity:jd(o,1),u_brightness:jd(u,1),u_contrast:jd(c,1),u_saturation:jd(v,1),u_gamma:jd(E,1)};this.textures=[this.texture];var ie=this.getUniformsBufferInfo(G);return ie}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.loadTexture();case 2:return c.abrupt("return",this.buildModels());case 3:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"clearModels",value:function(){var t;(t=this.texture)===null||t===void 0||t.destroy()}},{key:"loadTexture",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v;return Qr().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return u=this.rendererService.createTexture2D,this.texture=u({height:1,width:1}),c=this.layer.getSource(),G.next=5,c.data.images;case 5:v=G.sent,this.texture=u({data:v[0],width:v[0].width,height:v[0].height,mag:Or.LINEAR,min:Or.LINEAR});case 7:case"end":return G.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return this.initUniformsBuffer(),v.next=3,this.layer.buildLayerModel({moduleName:"rasterImage",vertexShader:jR,fragmentShader:UR,triangulation:L_,primitive:Or.TRIANGLES,blend:{enable:!0},depth:{enable:!1},pickingEnabled:!1});case 3:return u=v.sent,v.abrupt("return",[u]);case 5:case"end":return v.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:pl.Attribute,descriptor:{name:"a_Uv",shaderLocation:qc.UV,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(o,u,c){return[c[3],c[4]]}}})}}]),r}(op),$R={image:VR},HR=$R;function GR(e){var i=WR();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function WR(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var mS=function(e){(0,Ce.Z)(r,e);var i=GR(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z))) { - discard; - }; - } - float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6 - outputColor = v_color; - if(u_animate.x == Animate && u_line_texture != LineTexture) { - animateSpeed = u_time / u_animate.y; - float alpha =1.0 - fract( mod(1.0- v_lineData.b, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y); - alpha = (alpha + u_animate.w -1.0) / u_animate.w; - // alpha = smoothstep(0., 1., alpha); - alpha = clamp(alpha, 0.0, 1.0); - outputColor.a *= alpha; - } - - // \u5F53\u5B58\u5728\u8D34\u56FE\u65F6\u5728\u5E95\u8272\u4E0A\u8D34\u4E0A\u8D34\u56FE - if(u_line_texture == LineTexture) { // while load texture - float arcRadio = smoothstep( 0.0, 1.0, (v_lineData.r / segmentNumber)); - // float arcRadio = smoothstep( 0.0, 1.0, d_distance_ratio); - - float count = v_lineData.g; // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF - - float time = 0.0; - if(u_animate.x == Animate) { - time = u_time / u_animate.y; - } - float redioCount = arcRadio * count; - - float u = fract(redioCount - time); - float v = v_lineData.a; // \u6A2A\u5411 v - vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.; - - vec4 pattern = texture(SAMPLER_2D(u_texture), uv); - - if(u_animate.x == Animate) { - float currentPlane = floor(redioCount - time); - float textureStep = floor(count * u_animate.z); - float a = mod(currentPlane, textureStep); - if(a < textureStep - 1.0) { - pattern = vec4(0.0); - } - } - - if(u_textureBlend == 0.0) { // normal - pattern.a = 0.0; - outputColor = filterColor(outputColor + pattern); - } else { // replace - pattern.a *= v_color.a; - if(outputColor.a <= 0.0) { - pattern.a = 0.0; - } - outputColor = filterColor(pattern); - } - - } else { - outputColor = filterColor(outputColor); - } -}`,qR=`#define Animate 0.0 -#define LineTexture 1.0 -layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 12) in vec4 a_Instance; -layout(location = 14) in vec2 a_iconMapUV; - -layout(std140) uniform commonUniorm { - vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; - vec4 u_dash_array; - vec4 u_sourceColor; - vec4 u_targetColor; - vec2 u_textSize; - float segmentNumber; - float u_lineDir: 1.0; - float u_icon_step: 100; - float u_line_texture: 0.0; - float u_textureBlend; - float u_blur : 0.9; - float u_line_type: 0.0; - float u_time; - float u_linearColor: 0.0; -}; -out vec4 v_color; -out vec2 v_iconMapUV; -out vec4 v_lineData; -//dash -out vec4 v_dash_array; -out float v_distance_ratio; - - -#pragma include "projection" -#pragma include "project" -#pragma include "picking" - -float bezier3(vec3 arr, float t) { - float ut = 1. - t; - return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t; -} -vec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) { - vec2 center = target - source; - float r = length(center); - float theta = atan(center.y, center.x); - float thetaOffset = arcThetaOffset; - float r2 = r / 2.0 / cos(thetaOffset); - float theta2 = theta + thetaOffset; - vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y); - if(u_lineDir == 1.0) { // \u6B63\u5411 - return mid; - } else { // \u9006\u5411 - // (mid + vmin)/2 = (s + t)/2 - vec2 vmid = source + target - mid; - return vmid; - } - // return mid; -} -float getSegmentRatio(float index) { - // dash: index / (segmentNumber - 1.); - // normal: smoothstep(0.0, 1.0, index / (segmentNumber - 1.)); - return smoothstep(0.0, 1.0, index / (segmentNumber - 1.)); - // return index / (segmentNumber - 1.); -} -vec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) { - // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation - vec2 mid = midPoint(source, target, arcThetaOffset); - vec3 x = vec3(source.x, mid.x, target.x); - vec3 y = vec3(source.y, mid.y, target.y); - return vec2(bezier3(x ,t), bezier3(y,t)); -} -vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) { - // normalized direction of the line - vec2 dir_screenspace = normalize(line_clipspace); - // rotate by 90 degrees - dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); - vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0; - return offset; -} -vec2 getNormal(vec2 line_clipspace, float offset_direction) { - // normalized direction of the line - vec2 dir_screenspace = normalize(line_clipspace); - // rotate by 90 degrees - dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); - return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction); -} - -void main() { - //vs\u4E2D\u8BA1\u7B97\u6E10\u53D8\u8272 - if(u_linearColor==1.0){ - float d_segmentIndex = a_Position.x + 1.0; // \u5F53\u524D\u9876\u70B9\u5728\u5F27\u7EBF\u4E2D\u6240\u5904\u7684\u5206\u6BB5\u4F4D\u7F6E - v_color = mix(u_sourceColor, u_targetColor, d_segmentIndex/segmentNumber); - } - else{ - v_color = a_Color; - } - v_color.a = v_color.a * opacity; - - vec2 source = a_Instance.rg; // \u8D77\u59CB\u70B9 - vec2 target = a_Instance.ba; // \u7EC8\u70B9 - - - - float segmentIndex = a_Position.x; - float segmentRatio = getSegmentRatio(segmentIndex); - - //\u8BA1\u7B97dashArray\u548CdistanceRatio \u8F93\u51FA\u5230\u7247\u5143 - vec2 s = source; - vec2 t = target; - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - s = unProjCustomCoord(source); - t = unProjCustomCoord(target); - } - float total_Distance = pixelDistance(s, t) / 2.0 * PI; - v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / total_Distance; - v_distance_ratio = segmentIndex / segmentNumber; - - float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0)); - float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir); - float d_distance_ratio; - - if(u_animate.x == Animate) { - d_distance_ratio = segmentIndex / segmentNumber; - if(u_lineDir != 1.0) { - d_distance_ratio = 1.0 - d_distance_ratio; - } - } - - v_lineData.b = d_distance_ratio; - - vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, thetaOffset), 0.0, 1.0)); - vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, thetaOffset), 0.0, 1.0)); - - - vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y)); - - - float d_segmentIndex = a_Position.x + 1.0; // \u5F53\u524D\u9876\u70B9\u5728\u5F27\u7EBF\u4E2D\u6240\u5904\u7684\u5206\u6BB5\u4F4D\u7F6E - v_lineData.r = d_segmentIndex; - - if(LineTexture == u_line_texture) { // \u5F00\u542F\u8D34\u56FE\u6A21\u5F0F - - float arcDistrance = length(source - target); // \u8D77\u59CB\u70B9\u548C\u7EC8\u70B9\u7684\u8DDD\u79BB - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20) { // amap - arcDistrance *= 1000000.0; - } - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox - // arcDistrance *= 8.0; - arcDistrance = project_pixel_allmap(arcDistrance); - } - v_iconMapUV = a_iconMapUV; - - float pixelLen = project_pixel_texture(u_icon_step); // \u8D34\u56FE\u6CBF\u5F27\u7EBF\u65B9\u5411\u7684\u957F\u5EA6 - \u968F\u5730\u56FE\u7F29\u653E\u6539\u53D8 - float texCount = floor(arcDistrance/pixelLen); // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF - v_lineData.g = texCount; - - float lineOffsetWidth = length(offset + offset * sign(a_Position.y)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB - float linePixelSize = project_pixel(a_Size); // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB - v_lineData.a = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C - } - - gl_Position = project_common_position_to_clipspace_v2(vec4(curr.xy + offset, 0, 1.0)); - - setPickingColor(a_PickingColor); -} -`,QR={solid:0,dash:1},hV=vi.isNumber,JR=function(e){(0,Ce.Z)(r,e);var i=XR(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) { - flag = 1.; - } - outputColor.a *=flag; - } - - if(u_animate.x == Animate && u_line_texture != LineTexture) { - animateSpeed = u_time / u_animate.y; - float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y); - - alpha = (alpha + u_animate.w -1.0) / u_animate.w; - // alpha = smoothstep(0., 1., alpha); - alpha = clamp(alpha, 0.0, 1.0); - outputColor.a *= alpha; - - // u_animate - // x enable - // y duration - // z interval - // w trailLength - } - - if(u_line_texture == LineTexture && u_line_type != LineTypeDash) { // while load texture - // float arcRadio = smoothstep( 0.0, 1.0, (v_segmentIndex / segmentNumber)); - float arcRadio = v_segmentIndex / (segmentNumber - 1.0); - float count = v_line_data.b; // // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF - - float time = 0.0; - if(u_animate.x == Animate) { - time = u_time / u_animate.y; - } - float redioCount = arcRadio * count; - - float u = fract(redioCount - time); - - float v = v_line_data.a; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C - vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.; - vec4 pattern = texture(SAMPLER_2D(u_texture), uv); - - if(u_animate.x == Animate) { - float currentPlane = floor(redioCount - time); - float textureStep = floor(count * u_animate.z); - float a = mod(currentPlane, textureStep); - if(a < textureStep - 1.0) { - pattern = vec4(0.0); - } - } - - if(u_textureBlend == 0.0) { // normal - pattern.a = 0.0; - outputColor = filterColor(outputColor + pattern); - } else { // replace - pattern.a *= v_color.a; - if(outputColor.a <= 0.0) { - pattern.a = 0.0; - discard; - } else { - outputColor = filterColor(pattern); - } - } - - } else { - outputColor = filterColor(outputColor); - } -} -`,n6=`#define LineTypeSolid 0.0 -#define LineTypeDash 1.0 -#define Animate 0.0 -#define LineTexture 1.0 -layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 12) in vec4 a_Instance; -layout(location = 14) in vec2 a_iconMapUV; - - -layout(std140) uniform commonUniorm { - vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; - vec4 u_dash_array: [10.0, 5., 0, 0]; - vec4 u_sourceColor; - vec4 u_targetColor; - vec2 u_textSize; - float u_globel; - float u_globel_radius; - float u_global_height: 10; - float segmentNumber; - float u_line_type: 0.0; - float u_icon_step: 100; - float u_line_texture: 0.0; - float u_textureBlend; - float u_time; - float u_linearColor: 0.0; -}; -out vec4 v_color; -out vec4 v_dash_array; -out float v_segmentIndex; -out vec2 v_iconMapUV; -out vec4 v_line_data; - -#pragma include "projection" -#pragma include "project" -#pragma include "picking" - -float maps (float value, float start1, float stop1, float start2, float stop2) { - return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1)); -} - -float getSegmentRatio(float index) { - return smoothstep(0.0, 1.0, index / (segmentNumber - 1.0)); -} - -float paraboloid(vec2 source, vec2 target, float ratio) { - vec2 x = mix(source, target, ratio); - vec2 center = mix(source, target, 0.5); - float dSourceCenter = distance(source, center); - float dXCenter = distance(x, center); - return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter); -} - -vec3 getPos(vec2 source, vec2 target, float segmentRatio) { - float vertex_height = paraboloid(source, target, segmentRatio); - - return vec3( - mix(source, target, segmentRatio), - sqrt(max(0.0, vertex_height)) - ); -} -vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) { - // normalized direction of the line - vec2 dir_screenspace = normalize(line_clipspace); - // rotate by 90 degrees - dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); - - vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0; - - return offset; -} -vec2 getNormal(vec2 line_clipspace, float offset_direction) { - // normalized direction of the line - vec2 dir_screenspace = normalize(line_clipspace); - // rotate by 90 degrees - dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); - return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction); -} - -float torad(float deg) { - return (deg / 180.0) * acos(-1.0); -} - -vec3 lglt2xyz(vec2 lnglat) { - float pi = 3.1415926; - // + Math.PI/2 \u662F\u4E3A\u4E86\u5BF9\u9F50\u5750\u6807 - float lng = torad(lnglat.x) + pi / 2.0; - float lat = torad(lnglat.y); - - // \u624B\u52A8\u589E\u52A0\u4E00\u4E9B\u504F\u79FB\uFF0C\u51CF\u8F7B\u9762\u7684\u51B2\u7A81 - float radius = u_globel_radius; - - float z = radius * cos(lat) * cos(lng); - float x = radius * cos(lat) * sin(lng); - float y = radius * sin(lat); - return vec3(x, y, z); -} - -void main() { - //vs\u4E2D\u8BA1\u7B97\u6E10\u53D8\u8272 - if(u_linearColor==1.0){ - float d_segmentIndex = a_Position.x + 1.0; // \u5F53\u524D\u9876\u70B9\u5728\u5F27\u7EBF\u4E2D\u6240\u5904\u7684\u5206\u6BB5\u4F4D\u7F6E - v_color = mix(u_sourceColor, u_targetColor, d_segmentIndex/segmentNumber); - } - else{ - v_color = a_Color; - } - v_color.a = v_color.a * opacity; - vec2 source = project_position(vec4(a_Instance.rg, 0, 0)).xy; - vec2 target = project_position(vec4(a_Instance.ba, 0, 0)).xy; - float segmentIndex = a_Position.x; - float segmentRatio = getSegmentRatio(segmentIndex); - float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0)); - - float d_distance_ratio; - if(u_line_type == LineTypeDash) { - d_distance_ratio = segmentIndex / segmentNumber; - vec2 s = source; - vec2 t = target; - - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - s = unProjCustomCoord(source); - t = unProjCustomCoord(target); - } - float total_Distance = pixelDistance(s, t) / 2.0 * PI; - v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex); - } - if(u_animate.x == Animate) { - d_distance_ratio = segmentIndex / segmentNumber; - } - v_line_data.g = d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B - - float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir); - vec3 curr = getPos(source, target, segmentRatio); - vec3 next = getPos(source, target, nextSegmentRatio); - vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y); - // v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y); - - - v_segmentIndex = a_Position.x; - if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { // \u5F00\u542F\u8D34\u56FE\u6A21\u5F0F - - float arcDistrance = length(source - target); - float pixelLen = project_pixel_texture(u_icon_step); - v_line_data.b = floor(arcDistrance/pixelLen); // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF - - vec2 projectOffset = project_pixel(offset); - float lineOffsetWidth = length(projectOffset + projectOffset * sign(a_Position.y)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB - float linePixelSize = project_pixel(a_Size); // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB - v_line_data.a = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C - - v_iconMapUV = a_iconMapUV; - } - - - gl_Position = project_common_position_to_clipspace_v2(vec4(curr.xy + project_pixel(offset), curr.z * thetaOffset, 1.0)); - - // \u5730\u7403\u6A21\u5F0F - if(u_globel > 0.0) { - vec3 startLngLat = lglt2xyz(a_Instance.rg); - vec3 endLngLat = lglt2xyz(a_Instance.ba); - float globalRadius = length(startLngLat); - - vec3 lineDir = normalize(endLngLat - startLngLat); - vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0); - - // \u7EBF\u7684\u504F\u79FB - vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y; - // \u8BA1\u7B97\u8D77\u59CB\u70B9\u548C\u7EC8\u6B62\u70B9\u7684\u8DDD\u79BB - float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0; - // \u8BA1\u7B97\u98DE\u7EBF\u5404\u4E2A\u8282\u70B9\u76F8\u5E94\u7684\u9AD8\u5EA6 - float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength; - // \u5730\u7403\u70B9\u4F4D - vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size; - - gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0); - } - - - setPickingColor(a_PickingColor); -} -`,i6={solid:0,dash:1},vS=function(e){(0,Ce.Z)(r,e);var i=e6(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,n=(0,bf.Z)(r.source)==="object"?r.source.type:r.source,t=(0,bf.Z)(r.target)==="object"?r.target.type:r.target,o=(0,bf.Z)(r.source)==="object"?r.source:{},u=o.width,c=u===void 0?n?gS[n]:0:u,v=o.height,E=v===void 0?2:v,G=(0,bf.Z)(r.target)==="object"?r.target:{},ie=G.width,xe=ie===void 0?t?gS[t]:0:ie,Fe=G.height,it=Fe===void 0?2:Fe;return{vertices:[0,mv,1*c].concat((0,Mn.Z)(e),[1,mv,-1*xe],(0,Mn.Z)(e),[1,-mv,-1*xe],(0,Mn.Z)(e),[0,-mv,1*c],(0,Mn.Z)(e),[0,mv,1*c],(0,Mn.Z)(e),[1,mv,-1*xe],(0,Mn.Z)(e),[1,-mv,-1*xe],(0,Mn.Z)(e),[0,-mv,1*c],(0,Mn.Z)(e)),outLineIndices:[0,1,2,0,2,3].map(function(gt){return gt+i}),indices:[4,5,6,4,6,7].map(function(gt){return gt+i}),normals:[1,-1,1,1,1,1,-1,0,1,-1,0,1,0,0,0,0,0,0,0,0,0,0,0,0],dimensions:2}}function yS(e,i){var r=(0,bf.Z)(e)==="object"?e.type:e,n=i==="source"?1:-1,t=(0,bf.Z)(e)==="object"?e:{};switch(r){case"circle":return c6(n,t);case"triangle":return o6(n,t);case"diamond":return u6(n,t);case"rect":return s6(n,t);case"classic":return l6(n,t);case"halfTriangle":return a6(n,t);default:return{vertices:[],indices:[],normals:[],dimensions:2,outLineIndices:[],outLineNormals:[]}}}function h6(e){var i=e.coordinates.flat(),r=1,n=1;return{vertices:[1,0,0].concat((0,Mn.Z)(i),[1,2,-3],(0,Mn.Z)(i),[1,1,-3],(0,Mn.Z)(i),[0,1,0],(0,Mn.Z)(i),[0,0,0],(0,Mn.Z)(i),[1,0,0],(0,Mn.Z)(i),[1,2,-3],(0,Mn.Z)(i),[1,1,-3],(0,Mn.Z)(i),[0,1,0],(0,Mn.Z)(i),[0,0,0],(0,Mn.Z)(i)),normals:[-r,2*n,1,2*n,-n,1,n,-n,1,n,-n,1,-r,-n,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],indices:[0,1,2,0,2,3,0,3,4,5,6,7,5,7,8,5,8,9],size:7}}function d6(e,i){return i?p6(e,i):h6(e)}function p6(e,i){var r=e.coordinates.flat(),n=i,t=n.target,o=t===void 0?"classic":t,u=n.source,c=u===void 0?"circle":u,v=_S(yS(c,"source"),r,0,0),E=f6(r,v.vertices.length/7,i),G=_S(yS(o,"target"),r,1,v.vertices.length/7+E.vertices.length/7),ie={vertices:[].concat((0,Mn.Z)(v.vertices),(0,Mn.Z)(E.vertices),(0,Mn.Z)(G.vertices)),indices:[].concat((0,Mn.Z)(v.outLineIndices),(0,Mn.Z)(E.outLineIndices),(0,Mn.Z)(G.outLineIndices),(0,Mn.Z)(v.indices),(0,Mn.Z)(E.indices),(0,Mn.Z)(G.indices)),normals:[].concat((0,Mn.Z)(v.normals),(0,Mn.Z)(E.normals),(0,Mn.Z)(G.normals)),size:7};return ie}function _S(e,i){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,t=[],o=e.vertices,u=e.indices,c=e.dimensions,v=e.outLineIndices,E=0;E (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) { - // \u5B9E\u7EBF\u90E8\u5206 - } else { - // \u865A\u7EBF\u90E8\u5206 - discard; - }; - } - - // \u8BBE\u7F6E\u5F27\u7EBF\u7684\u52A8\u753B\u6A21\u5F0F - if(u_animate.x == Animate) { - animateSpeed = u_time / u_animate.y; - float alpha =1.0 - fract( mod(1.0- v_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y); - alpha = (alpha + u_animate.w -1.0) / u_animate.w; - alpha = smoothstep(0., 1., alpha); - outputColor.a *= alpha; - } - - // \u8BBE\u7F6E\u5F27\u7EBF\u7684\u8D34\u56FE - if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { - float arcRadio = smoothstep( 0.0, 1.0, (d_segmentIndex / (segmentNumber - 1.0))); - // float arcRadio = d_segmentIndex / (segmentNumber - 1.0); - float count = v_line_data.b; // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF - float u = fract(arcRadio * count - animateSpeed * count); - // float u = fract(arcRadio * count - animateSpeed); - if(u_animate.x == Animate) { - u = outputColor.a/v_color.a; - } - - float v = v_line_data.a; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C - - vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.; - vec4 pattern = texture(SAMPLER_2D(u_texture), uv); - - // \u8BBE\u7F6E\u8D34\u56FE\u548C\u5E95\u8272\u7684\u53E0\u52A0\u6A21\u5F0F - if(u_textureBlend == 0.0) { // normal - pattern.a = 0.0; - outputColor = filterColor(outputColor + pattern); - } else { // replace - pattern.a *= v_color.a; - if(outputColor.a <= 0.0) { - pattern.a = 0.0; - } - outputColor = filterColor(pattern); - } - } else { - outputColor = filterColor(outputColor); - } - - // gl_FragColor = filterColor(gl_FragColor); -}`,w6=`#define LineTypeSolid 0.0 -#define LineTypeDash 1.0 -#define Animate 0.0 -#define LineTexture 1.0 - -layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 12) in vec4 a_Instance; -layout(location = 14) in vec2 a_iconMapUV; - -layout(std140) uniform commonUniorm { - vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; - vec4 u_dash_array: [10.0, 5., 0, 0]; - vec4 u_sourceColor; - vec4 u_targetColor; - vec2 u_textSize; - float segmentNumber; - float u_line_type: 0.0; - float u_icon_step: 100; - float u_line_texture: 0.0; - float u_textureBlend; - float u_time; - float u_linearColor: 0; -}; - -out vec4 v_dash_array; -out vec4 v_color; -out vec2 v_iconMapUV; -out vec4 v_line_data; -out float v_distance_ratio; - -#pragma include "projection" -#pragma include "project" -#pragma include "picking" - -float maps (float value, float start1, float stop1, float start2, float stop2) { - return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1)); -} - -float getSegmentRatio(float index) { - return index / (segmentNumber - 1.); -} - -float paraboloid(vec2 source, vec2 target, float ratio) { - vec2 x = mix(source, target, ratio); - vec2 center = mix(source, target, 0.5); - float dSourceCenter = distance(source, center); - float dXCenter = distance(x, center); - return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter); -} - -vec3 getPos(vec2 source, vec2 target, float segmentRatio) { - float vertex_height = paraboloid(source, target, segmentRatio); - - return vec3( - mix(source, target, segmentRatio), - sqrt(max(0.0, vertex_height)) - ); -} -vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) { - // normalized direction of the line - vec2 dir_screenspace = normalize(line_clipspace); - // rotate by 90 degrees - dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); - vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size)/ 2.0; - return offset; -} -vec2 getNormal(vec2 line_clipspace, float offset_direction) { - // normalized direction of the line - vec2 dir_screenspace = normalize(line_clipspace); - // rotate by 90 degrees - dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x); - return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction); -} -float getAngularDist (vec2 source, vec2 target) { - vec2 delta = source - target; - vec2 sin_half_delta = sin(delta / 2.0); - float a = - sin_half_delta.y * sin_half_delta.y + - cos(source.y) * cos(target.y) * - sin_half_delta.x * sin_half_delta.x; - return 2.0 * atan(sqrt(a), sqrt(1.0 - a)); -} - -vec2 midPoint(vec2 source, vec2 target) { - vec2 center = target - source; - float r = length(center); - float theta = atan(center.y, center.x); - float thetaOffset = 0.314; - float r2 = r / 2.0 / cos(thetaOffset); - float theta2 = theta + thetaOffset; - vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y); - return mid; -} -float bezier3(vec3 arr, float t) { - float ut = 1. - t; - return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t; -} - -vec2 interpolate (vec2 source, vec2 target, float angularDist, float t) { - // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - vec2 mid = midPoint(source, target); - vec3 x = vec3(source.x, mid.x, target.x); - vec3 y = vec3(source.y, mid.y, target.y); - return vec2(bezier3(x ,t), bezier3(y,t)); - } - else { - if(abs(angularDist - PI) < 0.001) { - return (1.0 - t) * source + t * target; - } - float a = sin((1.0 - t) * angularDist) / sin(angularDist); - float b = sin(t * angularDist) / sin(angularDist); - vec2 sin_source = sin(source); - vec2 cos_source = cos(source); - vec2 sin_target = sin(target); - vec2 cos_target = cos(target); - float x = a * cos_source.y * cos_source.x + b * cos_target.y * cos_target.x; - float y = a * cos_source.y * sin_source.x + b * cos_target.y * sin_target.x; - float z = a * sin_source.y + b * sin_target.y; - return vec2(atan(y, x), atan(z, sqrt(x * x + y * y))); - } -} - -void main() { - v_color = a_Color; - v_color.a = v_color.a * opacity; - vec2 source = radians(a_Instance.rg); - vec2 target = radians(a_Instance.ba); - float angularDist = getAngularDist(source, target); - float segmentIndex = a_Position.x; - float segmentRatio = getSegmentRatio(segmentIndex); - float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0)); - - if(u_line_type == LineTypeDash) { - v_distance_ratio = segmentIndex / segmentNumber; - vec2 s = source; - vec2 t = target; - - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - s = unProjCustomCoord(source); - t = unProjCustomCoord(target); - } - float total_Distance = pixelDistance(s, t) / 2.0 * PI; - total_Distance = total_Distance*16.0; // total_Distance*16.0 \u8C03\u6574\u9ED8\u8BA4\u7684\u6548\u679C - v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / total_Distance; - } - - if(u_animate.x == Animate) { - v_distance_ratio = segmentIndex / segmentNumber; - } - - float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir); - v_distance_ratio = segmentIndex / segmentNumber; - vec4 curr = project_position(vec4(degrees(interpolate(source, target, angularDist, segmentRatio)), 0.0, 1.0)); - vec4 next = project_position(vec4(degrees(interpolate(source, target, angularDist, nextSegmentRatio)), 0.0, 1.0)); - // v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y); - vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y)); - // vec4 project_pos = project_position(vec4(curr.xy, 0, 1.0)); - // gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, curr.z, 1.0)); - - v_line_data.g = a_Position.x; // \u8BE5\u9876\u70B9\u5728\u5F27\u7EBF\u4E0A\u7684\u5206\u6BB5\u6392\u5E8F - if(LineTexture == u_line_texture) { // \u5F00\u542F\u8D34\u56FE\u6A21\u5F0F - // float mapZoomScale = u_CoordinateSystem !== COORDINATE_SYSTEM_P20_2?10000000.0:1.0; - float d_arcDistrance = length(source - target); - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20) { // amap - d_arcDistrance = d_arcDistrance * 1000000.0; - } - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox - d_arcDistrance = project_pixel_allmap(d_arcDistrance); - } - float d_pixelLen = project_pixel(u_icon_step)/8.0; - v_line_data.b = floor(d_arcDistrance/d_pixelLen); // \u8D34\u56FE\u5728\u5F27\u7EBF\u4E0A\u91CD\u590D\u7684\u6570\u91CF - - float lineOffsetWidth = length(offset + offset * sign(a_Position.y)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB - float linePixelSize = project_pixel(a_Size); // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB - v_line_data.a = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C - - v_iconMapUV = a_iconMapUV; - } - - gl_Position = project_common_position_to_clipspace_v2(vec4(curr.xy + offset, 0, 1.0)); - setPickingColor(a_PickingColor); -} - -`,E6={solid:0,dash:1},S6=function(e){(0,Ce.Z)(r,e);var i=A6(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z))) { - // \u865A\u7EBF\u90E8\u5206 - discard; - }; - } - float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6 - float d_distance_ratio = v_texture_data.r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B - if(u_linearDir < 1.0) { - d_distance_ratio = v_texture_data.a; - } - if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272 - outputColor = mix(u_sourceColor, u_targetColor, d_distance_ratio); - outputColor.a *= v_color.a; - } else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272 - outputColor = v_color; - } - // anti-alias - // float blur = 1.0 - smoothstep(u_blur, 1., length(v_normal.xy)); - if(u_animate.x == Animate) { - animateSpeed = u_time / u_animate.y; - float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + animateSpeed); - alpha = (alpha + u_animate.w -1.0) / u_animate.w; - alpha = smoothstep(0., 1., alpha); - outputColor.a *= alpha; - } - - if(u_line_texture == LineTexture) { // while load texture - float aDistance = v_texture_data.g; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB - float d_texPixelLen = v_texture_data.b; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E - float u = fract(mod(aDistance, d_texPixelLen)/d_texPixelLen - animateSpeed); - float v = v_texture_data.a; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C - - // v = max(smoothstep(0.95, 1.0, v), v); - vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.; - vec4 pattern = texture(SAMPLER_2D(u_texture), uv); - - if(u_textureBlend == 0.0) { // normal - pattern.a = 0.0; - outputColor += pattern; - } else { // replace - pattern.a *= v_color.a; - if(outputColor.a <= 0.0) { - pattern.a = 0.0; - } - outputColor = pattern; - } - } - - float v = v_texture_data.a; - float strokeWidth = min(0.5, u_strokeWidth); - // \u7ED8\u5236 border - if(strokeWidth > 0.01) { - float borderOuterWidth = strokeWidth / 2.0; - - - if(v >= 1.0 - strokeWidth || v <= strokeWidth) { - if(v > strokeWidth) { // \u5916\u4FA7 - float linear = smoothstep(0.0, 1.0, (v - (1.0 - strokeWidth))/strokeWidth); - // float linear = step(0.0, (v - (1.0 - borderWidth))/borderWidth); - outputColor.rgb = mix(outputColor.rgb, v_stroke.rgb, linear); - } else if(v <= strokeWidth) { - float linear = smoothstep(0.0, 1.0, v/strokeWidth); - outputColor.rgb = mix(v_stroke.rgb, outputColor.rgb, linear); - } - } - - if(v < borderOuterWidth) { - outputColor.a = mix(0.0, outputColor.a, v/borderOuterWidth); - } else if(v > 1.0 - borderOuterWidth) { - outputColor.a = mix(outputColor.a, 0.0, (v - (1.0 - borderOuterWidth))/borderOuterWidth); - } - } - - // blur - float blurV = v_texture_data.a; - if(blurV < 0.5) { - outputColor.a *= mix(u_blur.r, u_blur.g, blurV/0.5); - } else { - outputColor.a *= mix(u_blur.g, u_blur.b, (blurV - 0.5)/0.5); - } - - outputColor = filterColor(outputColor); -} -`,P6=` -#define Animate 0.0 - -layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in vec2 a_Size; -layout(location = 10) in vec3 a_DistanceAndIndexAndMiter; -layout(location = 13) in vec4 a_Normal_Total_Distance; -layout(location = 14) in vec2 a_iconMapUV; - -layout(std140) uniform commonUniorm { - vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; - vec4 u_dash_array; - vec4 u_blur; - vec4 u_sourceColor; - vec4 u_targetColor; - vec2 u_textSize; - float u_icon_step: 100; - float u_heightfixed: 0.0; - float u_vertexScale: 1.0; - float u_raisingHeight: 0.0; - float u_strokeWidth: 0.0; - float u_textureBlend; - float u_line_texture; - float u_linearDir: 1.0; - float u_linearColor: 0; - float u_time; -}; - - -out vec4 v_color; -out vec4 v_stroke; -//dash -out vec4 v_dash_array; -out float v_d_distance_ratio; -// texV \u7EBF\u56FE\u5C42 - \u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\uFF08\u7EBF\u7684\u5BBD\u5EA6\u65B9\u5411\uFF09 -out vec2 v_iconMapUV; -out vec4 v_texture_data; - -#pragma include "projection" -#pragma include "picking" - -void main() { - vec2 a_DistanceAndIndex = a_DistanceAndIndexAndMiter.xy; - float a_Miter = a_DistanceAndIndexAndMiter.z; - vec3 a_Normal = a_Normal_Total_Distance.xyz; - float a_Total_Distance = a_Normal_Total_Distance.w; - //dash\u8F93\u51FA - v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / a_Total_Distance; - v_d_distance_ratio = a_DistanceAndIndex.x / a_Total_Distance; - - // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97 - float d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E - v_iconMapUV = a_iconMapUV; - d_texPixelLen = project_float_pixel(u_icon_step); - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { - d_texPixelLen *= 10.0; - } - - v_color = a_Color; - v_color.a *= opacity; - v_stroke = stroke; - - vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal); - - vec2 offset = project_pixel(size.xy); - - float lineDistance = a_DistanceAndIndex.x; - float currentLinePointRatio = lineDistance / a_Total_Distance; - - - float lineOffsetWidth = length(offset + offset * sign(a_Miter)); // \u7EBF\u6A2A\u5411\u504F\u79FB\u7684\u8DDD\u79BB\uFF08\u5411\u4E24\u4FA7\u504F\u79FB\u7684\u548C\uFF09 - float linePixelSize = project_pixel(a_Size.x) * 2.0; // \u5B9A\u70B9\u4F4D\u7F6E\u504F\u79FB\uFF0C\u6309\u5730\u56FE\u7B49\u7EA7\u7F29\u653E\u540E\u7684\u8DDD\u79BB \u5355\u4FA7 * 2 - float texV = lineOffsetWidth/linePixelSize; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C - - v_texture_data = vec4(currentLinePointRatio, lineDistance, d_texPixelLen, texV); - // \u8BBE\u7F6E\u6570\u636E\u96C6\u7684\u53C2\u6570 - - vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0)); - - // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0)); - - float h = float(a_Position.z) * u_vertexScale; // \u7EBF\u9876\u70B9\u7684\u9AD8\u5EA6 - \u517C\u5BB9\u4E0D\u5B58\u5728\u7B2C\u4E09\u4E2A\u6570\u503C\u7684\u60C5\u51B5 vertex height - float lineHeight = a_Size.y; // size \u7B2C\u4E8C\u4E2A\u53C2\u6570\u4EE3\u8868\u7684\u9AD8\u5EA6 [linewidth, lineheight] - - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - lineHeight *= 0.2; // \u4FDD\u6301\u548C amap/mapbox \u4E00\u81F4\u7684\u6548\u679C - h *= 0.2; - if(u_heightfixed < 1.0) { - lineHeight = project_pixel(a_Size.y); - } - gl_Position = u_Mvp * (vec4(project_pos.xy + offset, lineHeight + h + u_raisingHeight, 1.0)); - } else { - // mapbox - amap - - // \u517C\u5BB9 mapbox \u5728\u7EBF\u9AD8\u5EA6\u4E0A\u7684\u6548\u679C\u8868\u73B0\u57FA\u672C\u4E00\u81F4 - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - // mapbox - // \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8 - float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); - h *= mapboxZoomScale; - h += u_raisingHeight * mapboxZoomScale; - if(u_heightfixed > 0.0) { - lineHeight *= mapboxZoomScale; - } - - } else { - // amap - h += u_raisingHeight; - // lineHeight \u9876\u70B9\u504F\u79FB\u9AD8\u5EA6 - if(u_heightfixed < 1.0) { - lineHeight *= pow(2.0, 20.0 - u_Zoom); - } - } - - gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight + h, 1.0)); - } - - setPickingColor(a_PickingColor); -} -`,dV={solid:0,dash:1},AS=function(e){(0,Ce.Z)(r,e);var i=C6(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z))) { - // \u865A\u7EBF\u90E8\u5206 - discard; - }; - } - if(u_linearColor==1.0){ - outputColor = mix(u_sourceColor, u_targetColor, v_distanceScale); - outputColor.a *= v_color.a; // \u5168\u5C40\u900F\u660E\u5EA6 - } - else{ - outputColor = v_color; - } -} -`,L6=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in vec4 a_SizeDistanceAndTotalDistance; - -layout(std140) uniform commonUniorm { - vec4 u_sourceColor; - vec4 u_targetColor; - vec4 u_dash_array; - float u_vertexScale: 1.0; - float u_linearColor: 0; -}; - -#pragma include "projection" -#pragma include "picking" - -out vec4 v_color; -out float v_distanceScale; -out vec4 v_dash_array; - -void main() { - //dash\u8F93\u51FA - v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / a_SizeDistanceAndTotalDistance.a; - - v_color = a_Color; - v_distanceScale = a_SizeDistanceAndTotalDistance.b / a_SizeDistanceAndTotalDistance.a; - v_color.a = v_color.a * opacity; - vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0)); - - float h = float(a_Position.z) * u_vertexScale; // \u7EBF\u9876\u70B9\u7684\u9AD8\u5EA6 - \u517C\u5BB9\u4E0D\u5B58\u5728\u7B2C\u4E09\u4E2A\u6570\u503C\u7684\u60C5\u51B5 - - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - gl_Position = u_Mvp * (vec4(project_pos.xy, project_pixel(a_SizeDistanceAndTotalDistance.y) + h * 0.2, 1.0)); - } else { - float lineHeight = a_SizeDistanceAndTotalDistance.y; - // \u517C\u5BB9 mapbox \u5728\u7EBF\u9AD8\u5EA6\u4E0A\u7684\u6548\u679C\u8868\u73B0\u57FA\u672C\u4E00\u81F4 - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - // \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8 - h *= 2.0/pow(2.0, 20.0 - u_Zoom); - } - - // amap1.x - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { - // \u4FDD\u6301\u9AD8\u5EA6\u76F8\u5BF9\u4E0D\u53D8 - lineHeight *= pow(2.0, 20.0 - u_Zoom); - } - - gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, lineHeight + h, 1.0)); - gl_PointSize = 10.0; - } -} -`,pV=vi.isNumber,D6=function(e){(0,Ce.Z)(r,e);var i=I6(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.sourceColor,u=t.targetColor,c=t.lineType,v=c===void 0?"solid":c,E=t.dashArray,G=E===void 0?[10,5,0,0]:E,ie=t.vertexHeightScale,xe=ie===void 0?20:ie,Fe=G;v!=="dash"&&(Fe=[0,0,0,0]),Fe.length===2&&Fe.push(0,0);var it=0,gt=[0,0,0,0],Dt=[0,0,0,0];o&&u&&(gt=Fa(o),Dt=Fa(u),it=1);var ar={u_sourceColor:gt,u_targetColor:Dt,u_dash_array:Fe,u_vertexScale:xe,u_linearColor:it},Mr=this.getUniformsBufferInfo(ar);return Mr}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.buildModels());case 1:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getShaders",value:function(){return{frag:O6,vert:L6,type:"lineSimpleNormal"}}},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G;return Qr().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return this.initUniformsBuffer(),u=this.getShaders(),c=u.frag,v=u.vert,E=u.type,xe.next=4,this.layer.buildLayerModel({moduleName:E,vertexShader:v,fragmentShader:c,triangulation:CI,inject:this.getInject(),primitive:Or.LINES,depth:{enable:!1},pick:!1});case 4:return G=xe.sent,xe.abrupt("return",[G]);case 6:case"end":return xe.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"sizeDistanceAndTotalDistance",type:pl.Attribute,descriptor:{name:"a_SizeDistanceAndTotalDistance",shaderLocation:qc.SIZE,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:4,update:function(o,u,c){var v=o.size,E=v===void 0?1:v,G=Array.isArray(E)?[E[0],E[1]]:[E,0];return[G[0],G[1],c[3],c[5]]}}})}}]),r}(op);function k6(e){var i=F6();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function F6(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var B6=`#define Animate 0.0 -#define LineTexture 1.0 - -// line texture - -uniform sampler2D u_texture; -layout(std140) uniform commonUniorm { - vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; - vec4 u_sourceColor; - vec4 u_targetColor; - vec2 u_textSize; - float u_icon_step: 100; - float u_heightfixed; - float u_linearColor: 0; - float u_line_texture; - float u_textureBlend; - float u_iconStepCount; - float u_time; -}; -in vec2 v_iconMapUV; -in float v_blur; -in float v_radio; -in vec4 v_color; -in vec4 v_dataset; - -out vec4 outputColor; -#pragma include "picking" - -void main() { - float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6 - float d_distance_ratio = v_dataset.r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B - float v = v_dataset.a; - - if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272 - outputColor = mix(u_sourceColor, u_targetColor, v); - } else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272 - outputColor = v_color; - } - - outputColor.a *= v_color.a; // \u5168\u5C40\u900F\u660E\u5EA6 - if(u_animate.x == Animate) { - animateSpeed = u_time / u_animate.y; - float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + animateSpeed); - alpha = (alpha + u_animate.w -1.0) / u_animate.w; - alpha = smoothstep(0., 1., alpha); - outputColor.a *= alpha; - } - - if(u_line_texture == LineTexture) { // while load texture - float aDistance = v_dataset.g; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB - float d_texPixelLen = v_dataset.b; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E - float u = fract(mod(aDistance, d_texPixelLen)/d_texPixelLen - animateSpeed); - float v = v_dataset.a; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C - - // \u8BA1\u7B97\u7EB9\u7406\u95F4\u9694 start - float flag = 0.0; - if(u > 1.0/u_iconStepCount) { - flag = 1.0; - } - u = fract(u*u_iconStepCount); - // \u8BA1\u7B97\u7EB9\u7406\u95F4\u9694 end - - vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.; - vec4 pattern = texture(SAMPLER_2D(u_texture), uv); - - // Tip: \u5224\u65AD\u7EB9\u7406\u95F4\u9694 - if(flag > 0.0) { - pattern = vec4(0.0); - } - - if(u_textureBlend == 0.0) { // normal - pattern.a = 0.0; - outputColor = filterColor(outputColor + pattern); - } else { // replace - pattern.a *= v_color.a; - if(outputColor.a <= 0.0) { - pattern.a = 0.0; - } - outputColor = filterColor(pattern); - } - } - - - // blur - AA - if(v < v_blur) { - outputColor.a = mix(0.0, outputColor.a, v/v_blur); - } else if(v > 1.0 - v_blur) { - outputColor.a = mix(outputColor.a, 0.0, (v - (1.0 - v_blur))/v_blur); - } - - outputColor = filterColor(outputColor); -} -`,N6=`#define Animate 0.0 -layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in vec2 a_Size; -layout(location = 10) in float a_Miter; -layout(location = 11) in float a_Total_Distance; -layout(location = 12) in vec4 a_Instance; -layout(location = 13) in vec3 a_Normal; -layout(location = 14) in vec2 a_iconMapUV; -layout(location = 15) in float a_Distance; - - -layout(std140) uniform commonUniorm { - vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; - vec4 u_sourceColor; - vec4 u_targetColor; - vec2 u_textSize; - float u_icon_step: 100; - float u_heightfixed; - float u_linearColor: 0; - float u_line_texture; - float u_textureBlend; - float u_iconStepCount; - float u_time; -}; -#pragma include "projection" -#pragma include "light" -#pragma include "picking" - -// texV \u7EBF\u56FE\u5C42 - \u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\uFF08\u7EBF\u7684\u5BBD\u5EA6\u65B9\u5411\uFF09 -out vec2 v_iconMapUV; -out vec4 v_color; -out float v_blur; -out float v_radio; -out vec4 v_dataset; - -void main() { - - - float d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B - float d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E - - v_iconMapUV = a_iconMapUV; - if(u_heightfixed < 1.0) { // \u9AD8\u5EA6\u968F zoom \u8C03\u6574 - d_texPixelLen = project_pixel(u_icon_step); - } else { - d_texPixelLen = u_icon_step; - } - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { - d_texPixelLen *= 10.0; - } - - if(u_animate.x == Animate || u_linearColor == 1.0) { - d_distance_ratio = a_Distance / a_Total_Distance; - } - - float miter = (a_Miter + 1.0)/2.0; - // \u8BBE\u7F6E\u6570\u636E\u96C6\u7684\u53C2\u6570 - v_dataset[0] = d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B - v_dataset[1] = a_Distance; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB - v_dataset[2] = d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E - v_dataset[3] = miter; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C 0 - 1 - - vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0)); - - float originSize = a_Size.x; // \u56FA\u5B9A\u9AD8\u5EA6 - if(u_heightfixed < 1.0) { - originSize = project_float_meter(a_Size.x); // \u9AD8\u5EA6\u968F zoom \u8C03\u6574 - } - - - float wallHeight = originSize * miter; - float lightWeight = calc_lighting(vec4(project_pos.xy, wallHeight, 1.0)); - - v_blur = min(project_float_pixel(2.0) / originSize, 0.05); - v_color = vec4(a_Color.rgb * lightWeight, a_Color.w * opacity); - - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - gl_Position = u_Mvp * (vec4(project_pos.xy, wallHeight, 1.0)); - } else { - gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, wallHeight, 1.0)); - } - - setPickingColor(a_PickingColor); -} -`,z6=function(e){(0,Ce.Z)(r,e);var i=k6(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u 0.01 - float blurWidth = (1.0 - v_blur)/2.0; - vec4 stroke = vec4(u_stroke_color.rgb, u_stroke_opacity); - if(fragmengTocenter > v_innerRadius + blurWidth) { - outputColor = stroke; - } else if(fragmengTocenter > v_innerRadius - blurWidth){ - float mixR = (fragmengTocenter - (v_innerRadius - blurWidth)) / (blurWidth * 2.0); - outputColor = mix(v_color, stroke, mixR); - } else { - outputColor = v_color; - } - } else { - // \u5F53\u4E0D\u5B58\u5728 stroke \u6216 stroke <= 0.01 - outputColor = v_color; - } - - outputColor = filterColor(outputColor); - - if(u_additive > 0.0) { - outputColor *= circleClipOpacity; - } else { - outputColor.a *= circleClipOpacity; - } - -} -`,W6=` -layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; - -layout(std140) uniform commonUniorm { - vec4 u_stroke_color; - float u_additive; - float u_stroke_opacity; - float u_stroke_width; -}; - -out vec4 v_color; -out float v_blur; -out float v_innerRadius; - -#pragma include "projection" -#pragma include "picking" -#pragma include "project" -void main() { - v_color = vec4(a_Color.xyz, a_Color.w * opacity); - v_blur = 1.0 - max(2.0/a_Size, 0.05); - v_innerRadius = max((a_Size - u_stroke_width) / a_Size, 0.0); - - vec2 offset = project_pixel(u_offsets); - - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x - gl_Position = u_Mvp * vec4(a_Position.xy + offset, a_Position.z, 1.0); - } else { // else - vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.); - gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy+offset),project_pos.z,project_pos.w)); - } - - gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio; - setPickingColor(a_PickingColor); -} -`;function bS(e){var i=e.coordinates;return{vertices:(0,Mn.Z)(i),indices:[0],size:i.length}}var X6=function(e){(0,Ce.Z)(r,e);var i=$6(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getDefaultStyle",value:function(){return{blend:"additive"}}},{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.blend,u=t.strokeOpacity,c=u===void 0?1:u,v=t.strokeWidth,E=v===void 0?0:v,G=t.stroke,ie=G===void 0?"#fff":G,xe={u_stroke_color:Fa(ie),u_additive:o==="additive"?1:0,u_stroke_opacity:c,u_stroke_width:E},Fe=this.getUniformsBufferInfo(xe);return Fe}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.buildModels());case 1:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return this.layer.triangulation=bS,this.initUniformsBuffer(),v.next=4,this.layer.buildLayerModel({moduleName:"pointSimple",vertexShader:W6,fragmentShader:G6,inject:this.getInject(),triangulation:bS,depth:{enable:!1},primitive:Or.POINTS});case 4:return u=v.sent,v.abrupt("return",[u]);case 6:case"end":return v.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(o){var u=o.size,c=u===void 0?1:u;return Array.isArray(c)?[c[0]]:[c]}}})}}]),r}(op);function Y6(e){var i=K6();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function K6(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var q6=`precision highp float; -in vec4 v_color; - -#pragma include "picking" - -layout(std140) uniform commonUniform { - vec4 u_sourceColor; - vec4 u_targetColor; - float u_linearColor: 0; - float u_heightfixed: 0.0; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A - float u_globel; - float u_r; - float u_pickLight: 0.0; - float u_opacitylinear: 0.0; - float u_opacitylinear_dir: 1.0; - float u_lightEnable: 1.0; -}; -in float v_lightWeight; -in float v_barLinearZ; -out vec4 outputColor; -void main() { - - outputColor = v_color; - - // \u5F00\u542F\u900F\u660E\u5EA6\u6E10\u53D8 - if(u_opacitylinear > 0.0) { - outputColor.a *= u_opacitylinear_dir > 0.0 ? (1.0 - v_barLinearZ): v_barLinearZ; - } - - // picking - if(u_pickLight > 0.0) { - outputColor = filterColorAlpha(outputColor, v_lightWeight); - } else { - outputColor = filterColor(outputColor); - } -} -`,Q6=`precision highp float; - -#define pi 3.1415926535 -#define ambientRatio 0.5 -#define diffuseRatio 0.3 -#define specularRatio 0.2 - - -layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in vec3 a_Size; -layout(location = 11) in vec3 a_Pos; -layout(location = 13) in vec3 a_Normal; - - -layout(std140) uniform commonUniform { - vec4 u_sourceColor; - vec4 u_targetColor; - float u_linearColor: 0; - float u_heightfixed: 0.0; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A - float u_globel; - float u_r; - float u_pickLight: 0.0; - float u_opacitylinear: 0.0; - float u_opacitylinear_dir: 1.0; - float u_lightEnable: 1.0; -}; - -out vec4 v_color; -out float v_lightWeight; -out float v_barLinearZ; -// \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143 - - -#pragma include "projection" -#pragma include "light" -#pragma include "picking" - -float getYRadian(float x, float z) { - if(x > 0.0 && z > 0.0) { - return atan(x/z); - } else if(x > 0.0 && z <= 0.0){ - return atan(-z/x) + pi/2.0; - } else if(x <= 0.0 && z <= 0.0) { - return pi + atan(x/z); //atan(x/z) + - } else { - return atan(z/-x) + pi*3.0/2.0; - } -} - -float getXRadian(float y, float r) { - return atan(y/r); -} - -void main() { - - // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97 - vec3 size = a_Size * a_Position; - - // a_Position.z \u662F\u5728\u6784\u5EFA\u7F51\u683C\u7684\u65F6\u5019\u4F20\u5165\u7684\u6807\u51C6\u503C 0 - 1\uFF0C\u5728\u63D2\u503C\u5668\u63D2\u503C\u53EF\u4EE5\u83B7\u53D6 0\uFF5E1 \u7EBF\u6027\u6E10\u53D8\u7684\u503C - v_barLinearZ = a_Position.z; - - vec3 offset = size; // \u63A7\u5236\u5706\u67F1\u4F53\u7684\u5927\u5C0F - \u4ECE\u6807\u51C6\u5355\u4F4D\u5706\u67F1\u4F53\u8FDB\u884C\u504F\u79FB - if(u_heightfixed < 1.0) { // \u5706\u67F1\u4F53\u4E0D\u56FA\u5B9A\u9AD8\u5EA6 - - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { - // P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1 - offset = offset * pow(2.0, (19.0 - u_Zoom)); - } - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { - // P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3 - offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom)); - } - } else {// \u5706\u67F1\u4F53\u56FA\u5B9A\u9AD8\u5EA6 \uFF08 \u5904\u7406 mapbox \uFF09 - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - offset *= 4.0/pow(2.0, 21.0 - u_Zoom); - } - } - - - vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0)); - - // u_r \u63A7\u5236\u5706\u67F1\u7684\u751F\u957F - vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0); - - // \u5706\u67F1\u5149\u7167\u6548\u679C - float lightWeight = 1.0; - if(u_lightEnable > 0.0) { // \u53D6\u6D88\u4E09\u5143\u8868\u8FBE\u5F0F\uFF0C\u589E\u5F3A\u5065\u58EE\u6027 - lightWeight = calc_lighting(pos); - } - v_lightWeight = lightWeight; - // \u8BBE\u7F6E\u5706\u67F1\u7684\u5E95\u8272 - if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272 - v_color = mix(u_sourceColor, u_targetColor, v_barLinearZ); - v_color.rgb *= lightWeight; - } else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272 - v_color = a_Color; - } - v_color.a *= u_opacity; - - - // \u5728\u5730\u7403\u6A21\u5F0F\u4E0B\uFF0C\u5C06\u539F\u672C\u5782\u76F4\u4E8E xy \u5E73\u9762\u7684\u5706\u67F1\u8C03\u6574\u59FF\u6001\u5230\u9002\u5E94\u5706\u7684\u89D2\u5EA6 - //\u65CB\u8F6C\u77E9\u9635mx\uFF0C\u521B\u5EFA\u7ED5x\u8F74\u65CB\u8F6C\u77E9\u9635 - float r = sqrt(a_Pos.z*a_Pos.z + a_Pos.x*a_Pos.x); - float xRadian = getXRadian(a_Pos.y, r); - float xcos = cos(xRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u4F59\u5F26\u503C - float xsin = sin(xRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u6B63\u5F26\u503C - mat4 mx = mat4( - 1,0,0,0, - 0,xcos,-xsin,0, - 0,xsin,xcos,0, - 0,0,0,1); - - //\u65CB\u8F6C\u77E9\u9635my\uFF0C\u521B\u5EFA\u7ED5y\u8F74\u65CB\u8F6C\u77E9\u9635 - float yRadian = getYRadian(a_Pos.x, a_Pos.z); - float ycos = cos(yRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u4F59\u5F26\u503C - float ysin = sin(yRadian);//\u6C42\u89E3\u65CB\u8F6C\u89D2\u5EA6\u6B63\u5F26\u503C - mat4 my = mat4( - ycos,0,-ysin,0, - 0,1,0,0, - ysin,0,ycos,0, - 0,0,0,1); - - gl_Position = u_ViewProjectionMatrix * vec4(( my * mx * vec4(a_Position * a_Size, 1.0)).xyz + a_Pos, 1.0); - - - setPickingColor(a_PickingColor); -} -`,J6=vi.isNumber,eO=function(e){(0,Ce.Z)(r,e);var i=Y6(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u0&&u.enable){var Rn=u.speed,kn=Rn===void 0?.01:Rn;this.raiseCount+=kn,this.raiseCount>=1&&(this.raiseRepeat>1?(this.raiseCount=0,this.raiseRepeat--):this.raiseCount=1)}var ui={u_sourceColor:mn,u_targetColor:zn,u_linearColor:Zr,u_pickLight:Number(xe),u_heightfixed:Number(it),u_r:u.enable&&this.raiseRepeat>0?this.raiseCount:1,u_opacity:J6(v)?v:1,u_opacitylinear:Number(Dt.enable),u_opacitylinear_dir:Dt.dir==="up"?1:0,u_lightEnable:Number(Mr)},Di=this.getUniformsBufferInfo(ui);return Di}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.initUniformsBuffer(),c.abrupt("return",this.buildModels());case 2:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E;return Qr().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return u=this.layer.getLayerConfig(),c=u.animateOption.repeat,v=c===void 0?1:c,this.raiseRepeat=v,ie.next=4,this.layer.buildLayerModel({moduleName:"pointEarthExtrude",vertexShader:Q6,fragmentShader:q6,triangulation:Vx,depth:{enable:!0},inject:this.getInject(),cull:{enable:!0,face:ca(this.mapService.version)},blend:this.getBlend()});case 4:return E=ie.sent,ie.abrupt("return",[E]);case 6:case"end":return ie.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o){var u=o.size;if(u){var c=[];return Array.isArray(u)&&(c=u.length===2?[u[0],u[0],u[1]]:u),Array.isArray(u)||(c=[u,u,u]),c}else return[2,2,2]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:pl.Attribute,descriptor:{name:"a_Normal",shaderLocation:qc.NORMAL,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o,u,c,v,E){return E}}}),this.styleAttributeService.registerStyleAttribute({name:"pos",type:pl.Attribute,descriptor:{name:"a_Pos",shaderLocation:15,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o){var u=fc(o.coordinates);return eS([u[0],u[1]])}}})}}]),r}(op);function tO(e){var i=rO();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function rO(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var nO=`in vec4 v_data; -in vec4 v_color; -in float v_radius; - -layout(std140) uniform commonUniform { - float u_additive; - float u_stroke_opacity : 1; - float u_stroke_width : 2; - float u_blur : 0.0; -}; -#pragma include "sdf_2d" -#pragma include "picking" - -out vec4 outputColor; - -void main() { - int shape = int(floor(v_data.w + 0.5)); - - vec4 strokeColor = u_stroke == vec4(0.0) ? v_color : u_stroke; - - lowp float antialiasblur = v_data.z; - float r = v_radius / (v_radius + u_stroke_width); - - float outer_df; - float inner_df; - // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica' - if (shape == 0) { - outer_df = sdCircle(v_data.xy, 1.0); - inner_df = sdCircle(v_data.xy, r); - } else if (shape == 1) { - outer_df = sdEquilateralTriangle(1.1 * v_data.xy); - inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy); - } else if (shape == 2) { - outer_df = sdBox(v_data.xy, vec2(1.)); - inner_df = sdBox(v_data.xy, vec2(r)); - } else if (shape == 3) { - outer_df = sdPentagon(v_data.xy, 0.8); - inner_df = sdPentagon(v_data.xy, r * 0.8); - } else if (shape == 4) { - outer_df = sdHexagon(v_data.xy, 0.8); - inner_df = sdHexagon(v_data.xy, r * 0.8); - } else if (shape == 5) { - outer_df = sdOctogon(v_data.xy, 1.0); - inner_df = sdOctogon(v_data.xy, r); - } else if (shape == 6) { - outer_df = sdHexagram(v_data.xy, 0.52); - inner_df = sdHexagram(v_data.xy, r * 0.52); - } else if (shape == 7) { - outer_df = sdRhombus(v_data.xy, vec2(1.0)); - inner_df = sdRhombus(v_data.xy, vec2(r)); - } else if (shape == 8) { - outer_df = sdVesica(v_data.xy, 1.1, 0.8); - inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8); - } - - if(outer_df > antialiasblur + 0.018) discard; - - float opacity_t = smoothstep(0.0, antialiasblur, outer_df); - - float color_t = u_stroke_width < 0.01 ? 0.0 : smoothstep( - antialiasblur, - 0.0, - inner_df - ); - - if(u_stroke_width < 0.01) { - outputColor = vec4(v_color.rgb, v_color.a * u_opacity); - } else { - outputColor = mix(vec4(v_color.rgb, v_color.a * u_opacity), strokeColor * u_stroke_opacity, color_t); - } - - if(u_additive > 0.0) { - outputColor *= opacity_t; - outputColor = filterColorAlpha(outputColor, outputColor.a); - } else { - outputColor.a *= opacity_t; - outputColor = filterColor(outputColor); - } -} -`,iO=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 10) in float a_Shape; -layout(location = 11) in vec3 a_Extrude; - -layout(std140) uniform commonUniform { - float u_additive; - float u_stroke_opacity : 1; - float u_stroke_width : 2; - float u_blur : 0.0; -}; -out vec4 v_data; -out vec4 v_color; -out float v_radius; - -#pragma include "projection" -#pragma include "picking" - - -void main() { - vec3 extrude = a_Extrude; - float shape_type = a_Shape; - /* - * setPickingSize \u8BBE\u7F6E\u62FE\u53D6\u5927\u5C0F - */ - float newSize = setPickingSize(a_Size); - // float newSize = setPickingSize(a_Size) * 0.00001038445708445579; - - // unpack color(vec2) - v_color = a_Color; - - // radius(16-bit) - v_radius = newSize; - - // anti-alias - // float antialiased_blur = -max(u_blur, antialiasblur); - float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur); - - // TODP: /abs(extrude.x) \u662F\u4E3A\u4E86\u517C\u5BB9\u5730\u7403\u6A21\u5F0F - v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type); - - gl_Position = u_ViewProjectionMatrix * vec4(a_Position + extrude * newSize * 0.1 + vec3(u_offsets,0.0), 1.0); - - setPickingColor(a_PickingColor); -}`,aO=function(e){(0,Ce.Z)(r,e);var i=tO(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.strokeOpacity,u=o===void 0?1:o,c=t.strokeWidth,v=c===void 0?0:c,E=t.blend,G=t.blur,ie=G===void 0?0:G;this.layer.getLayerConfig();var xe={u_additive:E==="additive"?1:0,u_stroke_opacity:u,u_stroke_width:v,u_blur:ie},Fe=this.getUniformsBufferInfo(xe);return Fe}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.initUniformsBuffer(),c.abrupt("return",this.buildModels());case 2:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return this.layer.triangulation=sS,v.next=3,this.layer.buildLayerModel({moduleName:"pointEarthFill",vertexShader:iO,fragmentShader:nO,triangulation:sS,inject:this.getInject(),depth:{enable:!0},blend:this.getBlend()});case 3:return u=v.sent,v.abrupt("return",[u]);case 5:case"end":return v.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"animateOption2Array",value:function(t){return[t.enable?0:1,t.speed||1,t.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){var t=this;this.styleAttributeService.registerStyleAttribute({name:"extrude",type:pl.Attribute,descriptor:{name:"a_Extrude",shaderLocation:qc.EXTRUDE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(u,c,v,E){var G=(0,wi.Z)(v,3),ie=G[0],xe=G[1],Fe=G[2],it=qd(0,0,1),gt=qd(ie,0,Fe),Dt=ie>=0?Nx(it,gt):Math.PI*2-Nx(it,gt),ar=Math.PI*2-Math.asin(xe/100),Mr=Nf();lp(Mr,Mr,Dt),Yd(Mr,Mr,ar);var Zr=qd(1,1,0);qy(Zr,Zr,Mr),py(Zr,Zr);var mn=qd(-1,1,0);qy(mn,mn,Mr),py(mn,mn);var zn=qd(-1,-1,0);qy(zn,zn,Mr),py(zn,zn);var Rn=qd(1,-1,0);qy(Rn,Rn,Mr),py(Rn,Rn);var kn=[].concat((0,Mn.Z)(Zr),(0,Mn.Z)(mn),(0,Mn.Z)(zn),(0,Mn.Z)(Rn)),ui=E%4*3;return[kn[ui],kn[ui+1],kn[ui+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(u){var c=u.size,v=c===void 0?5:c;return Array.isArray(v)?[v[0]]:[v]}}}),this.styleAttributeService.registerStyleAttribute({name:"shape",type:pl.Attribute,descriptor:{name:"a_Shape",shaderLocation:qc.SHAPE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(u){var c=u.shape,v=c===void 0?2:c,E=t.layer.getLayerConfig().shape2d,G=E.indexOf(v);return[G]}}})}}]),r}(op);function oO(e){var i=sO();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function sO(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var uO=` -in vec4 v_color; -in float v_lightWeight; -out vec4 outputColor; - -layout(std140) uniform commonUniforms { - float u_pickLight; - float u_heightfixed; - float u_r; - float u_linearColor; - vec4 u_sourceColor; - vec4 u_targetColor; - float u_opacitylinear; - float u_opacitylinear_dir; - float u_lightEnable; -}; - -#pragma include "scene_uniforms" -#pragma include "picking" - -void main() { - - outputColor = v_color; - // \u5F00\u542F\u900F\u660E\u5EA6\u6E10\u53D8 - // picking - if(u_pickLight > 0.0) { - outputColor = filterColorAlpha(outputColor, v_lightWeight); - } else { - outputColor = filterColor(outputColor); - } -} -`,lO=`#define pi 3.1415926535 - -layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in vec3 a_Size; -layout(location = 11) in vec3 a_Extrude; -layout(location = 13) in vec3 a_Normal; - -layout(std140) uniform commonUniforms { - float u_pickLight; - float u_heightfixed; - float u_r; - float u_linearColor; - vec4 u_sourceColor; - vec4 u_targetColor; - float u_opacitylinear; - float u_opacitylinear_dir; - float u_lightEnable; -}; -out vec4 v_color; -out float v_lightWeight; - -#pragma include "projection" -#pragma include "light" -#pragma include "picking" - -float getYRadian(float x, float z) { - if(x > 0.0 && z > 0.0) { - return atan(x/z); - } else if(x > 0.0 && z <= 0.0){ - return atan(-z/x) + pi/2.0; - } else if(x <= 0.0 && z <= 0.0) { - return pi + atan(x/z); //atan(x/z) + - } else { - return atan(z/-x) + pi*3.0/2.0; - } -} - -float getXRadian(float y, float r) { - return atan(y/r); -} - -void main() { - - - vec3 size = a_Size * a_Position; - - vec3 offset = size; // \u63A7\u5236\u5706\u67F1\u4F53\u7684\u5927\u5C0F - \u4ECE\u6807\u51C6\u5355\u4F4D\u5706\u67F1\u4F53\u8FDB\u884C\u504F\u79FB - - if(u_heightfixed < 1.0) { // \u5706\u67F1\u4F53\u4E0D\u56FA\u5B9A\u9AD8\u5EA6 - - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { - // P20 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF1 - offset = offset * pow(2.0, (19.0 - u_Zoom)); - } - if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { - // P20_2 \u5750\u6807\u7CFB\u4E0B\uFF0C\u4E3A\u4E86\u548C Web \u58A8\u5361\u6258\u5750\u6807\u7CFB\u7EDF\u4E00\uFF0Czoom \u9ED8\u8BA4\u51CF3 - offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom)); - } - } else {// \u5706\u67F1\u4F53\u56FA\u5B9A\u9AD8\u5EA6 \uFF08 \u5904\u7406 mapbox \uFF09 - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - offset *= 4.0/pow(2.0, 21.0 - u_Zoom); - } - } - - - vec4 project_pos = project_position(vec4(a_Extrude.xy, 0., 1.0)); - - // u_r \u63A7\u5236\u5706\u67F1\u7684\u751F\u957F - vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0); - - // // \u5706\u67F1\u5149\u7167\u6548\u679C - float lightWeight = 1.0; - - if(u_lightEnable > 0.0) { // \u53D6\u6D88\u4E09\u5143\u8868\u8FBE\u5F0F\uFF0C\u589E\u5F3A\u5065\u58EE\u6027 - lightWeight = calc_lighting(pos); - } - - v_lightWeight = lightWeight; - - v_color = a_Color; - - // \u8BBE\u7F6E\u5706\u67F1\u7684\u5E95\u8272 - if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272 - v_color = mix(u_sourceColor, u_targetColor, a_Position.z); - v_color.a = v_color.a * opacity; - } else { - v_color = vec4(a_Color.rgb * lightWeight, a_Color.w * opacity); - } - - if(u_opacitylinear > 0.0) { - v_color.a *= u_opacitylinear_dir > 0.0 ? (1.0 - a_Position.z): a_Position.z; - } - - - gl_Position = project_common_position_to_clipspace_v2(pos); - - setPickingColor(a_PickingColor); -} -`,xS=function(e){(0,Ce.Z)(r,e);var i=oO(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u0&&u.enable){var mn=u.speed,zn=mn===void 0?.01:mn;this.raiseCount+=zn,this.raiseCount>=1&&(this.raiseRepeat>1?(this.raiseCount=0,this.raiseRepeat--):this.raiseCount=1)}var Rn={u_pickLight:Number(G),u_heightfixed:Number(xe),u_r:u.enable&&this.raiseRepeat>0?this.raiseCount:1,u_linearColor:ar,u_sourceColor:Mr,u_targetColor:Zr,u_opacitylinear:Number(it.enable),u_opacitylinear_dir:it.dir==="up"?1:0,u_lightEnable:Number(Dt)},kn=this.getUniformsBufferInfo(Rn);return kn}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.buildModels());case 1:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G,ie;return Qr().wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return u=this.layer.getLayerConfig(),c=u.depth,v=c===void 0?!0:c,E=u.animateOption.repeat,G=E===void 0?1:E,this.raiseRepeat=G,this.initUniformsBuffer(),Fe.next=5,this.layer.buildLayerModel({moduleName:"pointExtrude",vertexShader:lO,fragmentShader:uO,triangulation:Vx,inject:this.getInject(),cull:{enable:!0,face:ca(this.mapService.version)},depth:{enable:v}});case 5:return ie=Fe.sent,Fe.abrupt("return",[ie]);case 7:case"end":return Fe.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o){var u=o.size;if(u){var c=[];return Array.isArray(u)&&(c=u.length===2?[u[0],u[0],u[1]]:u),Array.isArray(u)||(c=[u,u,u]),c}else return[2,2,2]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:pl.Attribute,descriptor:{name:"a_Normal",shaderLocation:qc.NORMAL,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o,u,c,v,E){return E}}}),this.styleAttributeService.registerStyleAttribute({name:"extrude",type:pl.Attribute,descriptor:{name:"a_Extrude",shaderLocation:qc.EXTRUDE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o){var u=fc(o.coordinates);return[u[0],u[1],0]}}})}}]),r}(op);function cO(e){var i=fO();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function fO(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var hO=` -layout(std140) uniform commonUniforms { - vec3 u_blur_height_fixed; - float u_stroke_width; - float u_additive; - float u_stroke_opacity; - float u_size_unit; - float u_time; - vec4 u_animate; -}; - -in vec4 v_color; -in vec4 v_stroke; -in vec4 v_data; -in float v_radius; - -#pragma include "scene_uniforms" -#pragma include "sdf_2d" -#pragma include "picking" - -out vec4 outputColor; - -void main() { - int shape = int(floor(v_data.w + 0.5)); - lowp float antialiasblur = v_data.z; - float r = v_radius / (v_radius + u_stroke_width); - - float outer_df; - float inner_df; - // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica' - if (shape == 0) { - outer_df = sdCircle(v_data.xy, 1.0); - inner_df = sdCircle(v_data.xy, r); - } else if (shape == 1) { - outer_df = sdEquilateralTriangle(1.1 * v_data.xy); - inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy); - } else if (shape == 2) { - outer_df = sdBox(v_data.xy, vec2(1.)); - inner_df = sdBox(v_data.xy, vec2(r)); - } else if (shape == 3) { - outer_df = sdPentagon(v_data.xy, 0.8); - inner_df = sdPentagon(v_data.xy, r * 0.8); - } else if (shape == 4) { - outer_df = sdHexagon(v_data.xy, 0.8); - inner_df = sdHexagon(v_data.xy, r * 0.8); - } else if (shape == 5) { - outer_df = sdOctogon(v_data.xy, 1.0); - inner_df = sdOctogon(v_data.xy, r); - } else if (shape == 6) { - outer_df = sdHexagram(v_data.xy, 0.52); - inner_df = sdHexagram(v_data.xy, r * 0.52); - } else if (shape == 7) { - outer_df = sdRhombus(v_data.xy, vec2(1.0)); - inner_df = sdRhombus(v_data.xy, vec2(r)); - } else if (shape == 8) { - outer_df = sdVesica(v_data.xy, 1.1, 0.8); - inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8); - } - - float opacity_t = smoothstep(0.0, antialiasblur, outer_df); - - float color_t = u_stroke_width < 0.01 ? 0.0 : smoothstep( - antialiasblur, - 0.0, - inner_df - ); - - float PI = 3.14159; - float N_RINGS = 3.0; - float FREQ = 1.0; - - if(u_stroke_width < 0.01) { - outputColor = v_color; - } else { - outputColor = mix(v_color, v_stroke * u_stroke_opacity, color_t); - } - float intensity = 1.0; - if(u_time!=-1.0){ - //wave\u76F8\u5173\u903B\u8F91 - float d = length(v_data.xy); - if(d > 0.5) { - discard; - } - intensity = clamp(cos(d * PI), 0.0, 1.0) * clamp(cos(2.0 * PI * (d * 2.0 * u_animate.z - u_animate.y * u_time)), 0.0, 1.0); - } - - if(u_additive > 0.0) { - outputColor *= opacity_t; - outputColor *= intensity;//wave - outputColor = filterColorAlpha(outputColor, outputColor.a); - } else { - outputColor.a *= opacity_t; - outputColor.a *= intensity;//wave - outputColor = filterColor(outputColor); - } - // \u4F5C\u4E3A mask \u6A21\u677F\u65F6\u9700\u8981\u4E22\u5F03\u900F\u660E\u7684\u50CF\u7D20 - if(outputColor.a < 0.01) { - discard; - } -} -`,dO=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 10) in float a_Shape; -layout(location = 11) in vec3 a_Extrude; - -layout(std140) uniform commonUniforms { - vec3 u_blur_height_fixed; - float u_stroke_width; - float u_additive; - float u_stroke_opacity; - float u_size_unit; - float u_time; - vec4 u_animate; -}; - -out vec4 v_color; -out vec4 v_stroke; -out vec4 v_data; -out float v_radius; - -#pragma include "projection" -#pragma include "picking" -#pragma include "rotation_2d" - -void main() { - // \u900F\u660E\u5EA6\u8BA1\u7B97 - v_stroke = stroke; - vec3 extrude = a_Extrude; - float shape_type = a_Shape; - /* - * setPickingSize \u8BBE\u7F6E\u62FE\u53D6\u5927\u5C0F - * u_meter2coord \u5728\u7B49\u9762\u79EF\u5927\u5C0F\u7684\u65F6\u5019\u8BBE\u7F6E\u5355\u4F4D - */ - float newSize = setPickingSize(a_Size); - // float newSize = setPickingSize(a_Size) * 0.00001038445708445579; - - - - // unpack color(vec2) - v_color = vec4(a_Color.xyz, a_Color.w * opacity); - - if(u_size_unit == 1.0) { - newSize = newSize * u_PixelsPerMeter.z; - } - - v_radius = newSize; - - // anti-alias - // float antialiased_blur = -max(u_blur, antialiasblur); - float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur_height_fixed.x); - - vec2 offset = (extrude.xy * (newSize + u_stroke_width) + u_offsets); - vec3 aPosition = a_Position; - - offset = project_pixel(offset); - offset = rotate_matrix(offset,rotation); - - // TODP: /abs(extrude.x) \u662F\u4E3A\u4E86\u517C\u5BB9\u5730\u7403\u6A21\u5F0F - v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type); - - - // vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0)); - vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0)); - // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0)); - - float raisingHeight = u_blur_height_fixed.y; - - if(u_blur_height_fixed.z < 1.0) { // false - raisingHeight = project_pixel(u_blur_height_fixed.y); - } else { - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); - raisingHeight = u_blur_height_fixed.y * mapboxZoomScale; - } - } - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy + offset, raisingHeight, 1.0)); - - setPickingColor(a_PickingColor); -} -`,wS=function(e){(0,Ce.Z)(r,e);var i=cO(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.strokeOpacity,u=o===void 0?1:o,c=t.strokeWidth,v=c===void 0?0:c,E=t.blend,G=t.blur,ie=G===void 0?0:G,xe=t.raisingHeight,Fe=xe===void 0?0:xe,it=t.heightfixed,gt=it===void 0?!1:it,Dt=t.unit,ar=Dt===void 0?"pixel":Dt,Mr=this.getAnimateUniforms().u_time;isNaN(Mr)&&(Mr=-1);var Zr={u_blur_height_fixed:[ie,Number(Fe),Number(gt)],u_stroke_width:v,u_additive:E==="additive"?1:0,u_stroke_opacity:u,u_size_unit:db[ar],u_time:Mr,u_animate:this.getAnimateUniforms().u_animate},mn=this.getUniformsBufferInfo(Zr);return mn}},{key:"getAnimateUniforms",value:function(){var t=this.layer.getLayerConfig(),o=t.animateOption,u=o===void 0?{enable:!1}:o;return{u_animate:this.animateOption2Array(u),u_time:this.layer.getLayerAnimateTime()}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),Gp)}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.buildModels());case 1:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G,ie,xe,Fe;return Qr().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return u=this.layer.getLayerConfig(),c=u.animateOption,v=c===void 0?{enable:!1}:c,E=this.getShaders(v),G=E.frag,ie=E.vert,xe=E.type,this.layer.triangulation=Gp,this.initUniformsBuffer(),gt.next=6,this.layer.buildLayerModel({moduleName:xe,vertexShader:ie,fragmentShader:G,inject:this.getInject(),triangulation:Gp,depth:{enable:!1}});case 6:return Fe=gt.sent,gt.abrupt("return",[Fe]);case 8:case"end":return gt.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getShaders",value:function(t){return{frag:hO,vert:dO,type:"pointFill"}}},{key:"animateOption2Array",value:function(t){return[t.enable?0:1,t.speed||1,t.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){var t=this.layer.getLayerConfig().shape2d;this.styleAttributeService.registerStyleAttribute({name:"extrude",type:pl.Attribute,descriptor:{name:"a_Extrude",shaderLocation:qc.EXTRUDE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(u,c,v,E){var G=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],ie=E%4*3;return[G[ie],G[ie+1],G[ie+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(u){var c=u.size,v=c===void 0?5:c;return Array.isArray(v)?[v[0]]:[v]}}}),this.styleAttributeService.registerStyleAttribute({name:"shape",type:pl.Attribute,descriptor:{name:"a_Shape",shaderLocation:qc.SHAPE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(u){var c=u.shape,v=c===void 0?2:c,E=t.indexOf(v);return[E]}}})}}]),r}(op);function pO(e){var i=mO();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function mO(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var vO=`in vec2 v_uv;// \u672C\u8EAB\u7684 uv \u5750\u6807 -in vec2 v_Iconuv; -in float v_opacity; -out vec4 outputColor; - -uniform sampler2D u_texture; -layout(std140) uniform commonUniform { - vec2 u_textSize; - float u_heightfixed: 0.0; - float u_raisingHeight: 0.0; - float u_size_unit; -}; - -#pragma include "scene_uniforms" -#pragma include "sdf_2d" -#pragma include "picking" - -void main() { - vec2 pos = v_Iconuv / u_textSize + v_uv / u_textSize * 64.; - outputColor = texture(SAMPLER_2D(u_texture), pos); - outputColor.a *= v_opacity; - outputColor = filterColor(outputColor); -} -`,gO=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 11) in vec3 a_Extrude; -layout(location = 14) in vec2 a_Uv; - -layout(std140) uniform commonUniform { - vec2 u_textSize; - float u_heightfixed: 0.0; - float u_raisingHeight: 0.0; - float u_size_unit; -}; - -out vec2 v_uv; -out vec2 v_Iconuv; -out float v_opacity; - - -#pragma include "projection" -#pragma include "picking" -#pragma include "rotation_2d" - -void main() { - vec3 extrude = a_Extrude; - v_uv = (a_Extrude.xy + 1.0)/2.0; - v_uv.y = 1.0 - v_uv.y; - v_Iconuv = a_Uv; - v_opacity = opacity; - float newSize = a_Size; - if(u_size_unit == 1.0) { - newSize = newSize * u_PixelsPerMeter.z; - } - - // vec2 offset = (u_RotateMatrix * extrude.xy * (a_Size) + textrueOffsets); - vec2 offset = (extrude.xy * (newSize) + offsets); - - offset = rotate_matrix(offset,rotation); - - vec3 aPosition = a_Position; - - offset = project_pixel(offset); - - vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0)); - float raisingHeight = u_raisingHeight; - if(u_heightfixed < 1.0) { // height fixed - raisingHeight = project_pixel(u_raisingHeight); - } else { - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); - raisingHeight = u_raisingHeight * mapboxZoomScale; - } - } - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy + offset, 0.0, 1.0)); - - setPickingColor(a_PickingColor); -} -`,yO=function(e){(0,Ce.Z)(r,e);var i=pO(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u= 0.5) { - float luma = 0.299 * textureColor.r + 0.587 * textureColor.g + 0.114 * textureColor.b; - textureColor.a *= luma; - } - - if(all(lessThan(v_color, vec4(1.0+0.00001))) && all(greaterThan(v_color, vec4(1.0-0.00001))) || v_color==vec4(1.0)){ - outputColor= textureColor; - }else { - outputColor= step(0.01, textureColor.z) * v_color; - } - outputColor.a *= v_opacity; - if (outputColor.a < 0.01) { - discard; - } - outputColor = filterColor(outputColor); -} -`,xO=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 14) in vec2 a_Uv; - -layout(std140) uniform commonUniforms { - vec2 u_textSize; - float u_raisingHeight; - float u_heightfixed; -}; - -out vec4 v_color; -out vec2 v_uv; -out float v_opacity; - -#pragma include "projection" -#pragma include "picking" - -void main() { - - // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97 - v_color = a_Color; - v_opacity = opacity; - v_uv = a_Uv; - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - - vec2 offset = project_pixel(offsets); - - float raisingHeight = u_raisingHeight; - if(u_heightfixed < 1.0) { // false - raisingHeight = project_pixel(u_raisingHeight); - } else { - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); - raisingHeight = u_raisingHeight * mapboxZoomScale; - } - } - - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy + offset, raisingHeight, 1.0)); - - gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio; - setPickingColor(a_PickingColor); -} -`,ES=function(e){(0,Ce.Z)(r,e);var i=_O(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u 0.0) { - outputColor *= opacity_t; - } else { - outputColor.a *= opacity_t; - } - - if(outputColor.a > 0.0) { - outputColor = filterColor(outputColor); - } - - vec2 extrude = v_extrude; - vec2 dir = normalize(extrude); - vec2 baseDir = vec2(1.0, 0.0); - float pi = 3.14159265359; - float flag = sign(dir.y); - float rades = dot(dir, baseDir); - float radar_v = (flag - 1.0) * -0.5 * acos(rades)/pi; - // simple AA - if(radar_v > 0.99) { - radar_v = 1.0 - (radar_v - 0.99)/0.01; - } - - outputColor.a *= radar_v; -} -`,IO=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 11) in vec3 a_Extrude; - -layout(std140) uniform commonUniorm { - float u_additive; - float u_size_unit; - float u_speed: 1.0; - float u_time; -}; - -out vec4 v_data; -out vec4 v_color; -out float v_radius; -out vec2 v_extrude; - -#pragma include "projection" -#pragma include "picking" - -void main() { - float newSize = setPickingSize(a_Size); - - float time = u_time * u_speed; - mat2 rotateMatrix = mat2( - cos(time), sin(time), - -sin(time), cos(time) - ); - v_extrude = rotateMatrix * a_Extrude.xy; - - v_color = a_Color; - v_color.a *= opacity; - - float blur = 0.0; - float antialiasblur = -max(2.0 / u_DevicePixelRatio / a_Size, blur); - - if(u_size_unit == 1.) { - newSize = newSize * u_PixelsPerMeter.z; - } - v_radius = newSize; - - vec2 offset = (a_Extrude.xy * (newSize)); - vec3 aPosition = a_Position; - - offset = project_pixel(offset); - - v_data = vec4(a_Extrude.x, a_Extrude.y, antialiasblur, -1.0); - - vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0)); - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0)); - - setPickingColor(a_PickingColor); -} -`,RO=function(e){(0,Ce.Z)(r,e);var i=TO(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.blend,u=t.speed,c=u===void 0?1:u,v=t.unit,E=v===void 0?"pixel":v,G={u_additive:o==="additive"?1:0,u_size_unit:db[E],u_speed:c,u_time:this.layer.getLayerAnimateTime()},ie=this.getUniformsBufferInfo(G);return ie}},{key:"getAnimateUniforms",value:function(){return{}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),yb)}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.buildModels());case 1:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return this.initUniformsBuffer(),v.next=3,this.layer.buildLayerModel({moduleName:"pointRadar",vertexShader:IO,fragmentShader:PO,triangulation:yb,inject:this.getInject(),depth:{enable:!1}});case 3:return u=v.sent,v.abrupt("return",[u]);case 5:case"end":return v.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"animateOption2Array",value:function(t){return[t.enable?0:1,t.speed||1,t.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"extrude",type:pl.Attribute,descriptor:{name:"a_Extrude",shaderLocation:qc.EXTRUDE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o,u,c,v){var E=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],G=v%4*3;return[E[G],E[G+1],E[G+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{shaderLocation:qc.SIZE,name:"a_Size",buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(o){var u=o.size,c=u===void 0?5:u;return Array.isArray(c)?[c[0]]:[c]}}})}}]),r}(op);function OO(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=LO(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function LO(e,i){if(e){if(typeof e=="string")return TS(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return TS(e,i)}}function TS(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);rthis.width||o<0||n>this.height)return u?!1:[];var v=[];if(r<=0&&n<=0&&this.width<=t&&this.height<=o){if(u)return!0;for(var E=0;E0:v}},{key:"queryCell",value:function(r,n,t,o,u,c,v,E){var G=v.seenUids,ie=this.boxCells[u];if(ie!==null){var xe=this.bboxes,Fe=OO(ie),it;try{for(Fe.s();!(it=Fe.n()).done;){var gt=it.value;if(!G.box[gt]){G.box[gt]=!0;var Dt=gt*4;if(r<=xe[Dt+2]&&n<=xe[Dt+3]&&t>=xe[Dt+0]&&o>=xe[Dt+1]&&(!E||E(this.boxKeys[gt]))){if(v.hitTest)return c.push(!0),!0;c.push({key:this.boxKeys[gt],x1:xe[Dt],y1:xe[Dt+1],x2:xe[Dt+2],y2:xe[Dt+3]})}}}}catch(ar){Fe.e(ar)}finally{Fe.f()}}return!1}},{key:"forEachCell",value:function(r,n,t,o,u,c,v,E){for(var G=this.convertToXCellCoord(r),ie=this.convertToYCellCoord(n),xe=this.convertToXCellCoord(t),Fe=this.convertToYCellCoord(o),it=G;it<=xe;it++)for(var gt=ie;gt<=Fe;gt++){var Dt=this.xCellCount*gt+it;if(u.call(this,r,n,t,o,Dt,c,v,E))return}}},{key:"convertToXCellCoord",value:function(r){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(r*this.xScale)))}},{key:"convertToYCellCoord",value:function(r){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(r*this.yScale)))}}]),e}(),kO=DO,FO=function(){function e(i,r){(0,Je.Z)(this,e),(0,St.Z)(this,"viewportPadding",100),this.width=i,this.height=r,this.viewportPadding=Math.max(i,r),this.grid=new kO(i+this.viewportPadding,r+this.viewportPadding,25),this.screenRightBoundary=i+this.viewportPadding,this.screenBottomBoundary=r+this.viewportPadding,this.gridRightBoundary=i+2*this.viewportPadding,this.gridBottomBoundary=r+2*this.viewportPadding}return(0,vt.Z)(e,[{key:"placeCollisionBox",value:function(r){var n=r.x1+r.anchorPointX+this.viewportPadding,t=r.y1+r.anchorPointY+this.viewportPadding,o=r.x2+r.anchorPointX+this.viewportPadding,u=r.y2+r.anchorPointY+this.viewportPadding;return!this.isInsideGrid(n,t,o,u)||this.grid.hitTest(n,t,o,u)?{box:[]}:{box:[n,t,o,u]}}},{key:"insertCollisionBox",value:function(r,n){var t={featureIndex:n};this.grid.insert(t,r[0],r[1],r[2],r[3])}},{key:"project",value:function(r,n,t){var o=pe(n,t,0,1),u=C(),c=xm.apply(y,(0,Mn.Z)(r));return Xo(u,o,c),{x:(u[0]/u[3]+1)/2*this.width+this.viewportPadding,y:(-u[1]/u[3]+1)/2*this.height+this.viewportPadding}}},{key:"isInsideGrid",value:function(r,n,t,o){return t>=0&&r=0&&n=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function BO(e,i){if(e){if(typeof e=="string")return IS(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IS(e,i)}}function IS(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r6&&arguments[6]!==void 0?arguments[6]:[0,0],c=arguments.length>7?arguments[7]:void 0,v=e.split(` -`),E=[],G={positionedGlyphs:E,top:u[1],bottom:u[1],left:u[0],right:u[0],lineCount:v.length,text:e};return c?zO(G,i,v,r,n,t,o):NO(G,i,v,r,n,t,o),E.length?G:!1}function UO(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0],r=arguments.length>2?arguments[2]:void 0,n=e.positionedGlyphs,t=n===void 0?[]:n,o=[],u=PS(t),c;try{for(u.s();!(c=u.n()).done;){var v=c.value,E=v.metrics,G=4,ie=E.advance*v.scale/2,xe=r?[v.x+ie,v.y]:[0,0],Fe=r?[0,0]:[v.x+ie+i[0],v.y+i[1]],it=(0-G)*v.scale-ie+Fe[0],gt=(0-G)*v.scale+Fe[1],Dt=it+E.width*v.scale,ar=gt+E.height*v.scale,Mr={x:it,y:gt},Zr={x:Dt,y:gt},mn={x:it,y:ar},zn={x:Dt,y:ar};o.push({tl:Mr,tr:Zr,bl:mn,br:zn,tex:E,glyphOffset:xe})}}catch(Rn){u.e(Rn)}finally{u.f()}return o}function jO(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=VO(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function VO(e,i){if(e){if(typeof e=="string")return DS(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return DS(e,i)}}function DS(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r.5||!ar||v!==this.preTextStyle.textAllowOverlap)){Zr.next=14;break}return Zr.next=13,this.reBuildModel();case 13:return Zr.abrupt("return",!0);case 14:return Zr.abrupt("return",!1);case 15:case"end":return Zr.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"clearModels",value:function(){var t;(t=this.texture)===null||t===void 0||t.destroy(),this.layer.off("remapping",this.mapping)}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"textOffsets",type:pl.Attribute,descriptor:{shaderLocation:10,name:"a_textOffsets",buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(o,u,c){return[c[5],c[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"textUv",type:pl.Attribute,descriptor:{name:"a_tex",shaderLocation:qc.UV,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(o,u,c){return[c[3],c[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(o){var u=o.size,c=u===void 0?12:u;return Array.isArray(c)?[c[0]]:[c]}}})}},{key:"bindEvent",value:function(){this.layer.isTileLayer||this.layer.on("remapping",this.mapping)}},{key:"textExtent",value:function(){var t=this.mapService.getBounds();return Xa(t,.5)}},{key:"initTextFont",value:function(){var t=this.getTextStyle(),o=t.fontWeight,u=t.fontFamily,c=this.rawEncodeData,v=[];c.forEach(function(E){var G=E.shape,ie=G===void 0?"":G;ie=ie.toString();var xe=jO(ie),Fe;try{for(xe.s();!(Fe=xe.n()).done;){var it=Fe.value;v.indexOf(it)===-1&&v.push(it)}}catch(gt){xe.e(gt)}finally{xe.f()}}),this.fontService.setFontOptions({characterSet:v,fontWeight:o,fontFamily:u,iconfont:!1})}},{key:"initIconFontTex",value:function(){var t=this.getTextStyle(),o=t.fontWeight,u=t.fontFamily,c=this.rawEncodeData,v=[];c.forEach(function(E){var G=E.shape,ie=G===void 0?"":G;ie="".concat(ie),v.indexOf(ie)===-1&&v.push(ie)}),this.fontService.setFontOptions({characterSet:v,fontWeight:o,fontFamily:u,iconfont:!0})}},{key:"getTextStyle",value:function(){var t=this.layer.getLayerConfig(),o=t.fontWeight,u=o===void 0?"400":o,c=t.fontFamily,v=c===void 0?"sans-serif":c,E=t.textAllowOverlap,G=E===void 0?!1:E,ie=t.padding,xe=ie===void 0?[0,0]:ie,Fe=t.textAnchor,it=Fe===void 0?"center":Fe,gt=t.textOffset,Dt=gt===void 0?[0,0]:gt,ar=t.opacity,Mr=ar===void 0?1:ar,Zr=t.strokeOpacity,mn=Zr===void 0?1:Zr,zn=t.strokeWidth,Rn=zn===void 0?0:zn,kn=t.stroke,ui=kn===void 0?"#000":kn;return{fontWeight:u,fontFamily:v,textAllowOverlap:G,padding:xe,textAnchor:it,textOffset:Dt,opacity:Mr,strokeOpacity:mn,strokeWidth:Rn,stroke:ui}}},{key:"generateGlyphLayout",value:function(t){var o=this,u=this.getFontServiceMapping(),c=this.layer.getLayerConfig(),v=c.spacing,E=v===void 0?2:v,G=c.textAnchor,ie=G===void 0?"center":G,xe=c.textOffset,Fe=this.rawEncodeData;this.glyphInfo=Fe.map(function(it){var gt=it.shape,Dt=gt===void 0?"":gt,ar=it.id,Mr=it.size,Zr=Mr===void 0?1:Mr,mn=it.textOffset?it.textOffset:xe||[0,0],zn=it.textAnchor?it.textAnchor:ie||"center",Rn=ZO(Dt.toString(),u,Zr,zn,"left",E,mn,t),kn=UO(Rn,mn,!1);return it.shaping=Rn,it.glyphQuads=kn,it.centroid=fc(it.coordinates),it.originCentroid=it.version==="GAODE2.x"?fc(it.originCoordinates):it.originCentroid=it.centroid,o.glyphInfoMap[ar]={shaping:Rn,glyphQuads:kn,centroid:fc(it.coordinates)},it})}},{key:"getFontServiceMapping",value:function(){var t=this.layer.getLayerConfig(),o=t.fontWeight,u=o===void 0?"400":o,c=t.fontFamily,v=c===void 0?"sans-serif":c;return this.fontService.getMappingByKey("".concat(v,"_").concat(u))}},{key:"getFontServiceCanvas",value:function(){var t=this.layer.getLayerConfig(),o=t.fontWeight,u=o===void 0?"400":o,c=t.fontFamily,v=c===void 0?"sans-serif":c;return this.fontService.getCanvasByKey("".concat(v,"_").concat(u))}},{key:"filterGlyphs",value:function(){var t=this,o=this.layer.getLayerConfig(),u=o.padding,c=u===void 0?[0,0]:u,v=o.textAllowOverlap,E=v===void 0?!1:v;if(!E){this.glyphInfoMap={},this.currentZoom=this.mapService.getZoom(),this.extent=this.textExtent();var G=this.rendererService.getViewportSize(),ie=G.width,xe=G.height,Fe=new FO(ie,xe),it=this.glyphInfo.filter(function(gt){var Dt=gt.shaping,ar=gt.id,Mr=ar===void 0?0:ar,Zr=gt.version==="GAODE2.x"?gt.originCentroid:gt.centroid,mn=gt.size,zn=mn/16,Rn=t.mapService.lngLatToContainer(Zr),kn=Fe.placeCollisionBox({x1:Dt.left*zn-c[0],x2:Dt.right*zn+c[0],y1:Dt.top*zn-c[1],y2:Dt.bottom*zn+c[1],anchorPointX:Rn.x,anchorPointY:Rn.y}),ui=kn.box;return ui&&ui.length?(Fe.insertCollisionBox(ui,Mr),!0):!1});it.forEach(function(gt){t.glyphInfoMap[gt.id]=gt})}}},{key:"initGlyph",value:function(){var t=this.layer.getLayerConfig(),o=t.iconfont,u=o===void 0?!1:o;u?this.initIconFontTex():this.initTextFont(),this.generateGlyphLayout(u)}},{key:"updateTexture",value:function(){var t=this.rendererService.createTexture2D,o=this.getFontServiceCanvas();this.textureHeight=o.height,this.texture&&this.texture.destroy(),this.texture=t({data:o,mag:Or.LINEAR,min:Or.LINEAR,width:o.width,height:o.height}),this.textures=[this.texture]}},{key:"reBuildModel",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return this.filterGlyphs(),v.next=3,this.layer.buildLayerModel({moduleName:"pointText",vertexShader:FS,fragmentShader:kS,triangulation:BS.bind(this),inject:this.getInject(),depth:{enable:!1}});case 3:u=v.sent,this.layer.models=[u];case 5:case"end":return v.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()}]),r}(op),GO={fillImage:yO,fill:wS,radar:RO,image:ES,normal:CS,simplePoint:X6,extrude:xS,text:NS,earthFill:aO,earthExtrude:eO},WO=GO;function XO(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=YO(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function YO(e,i){if(e){if(typeof e=="string")return zS(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zS(e,i)}}function zS(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r 0.0) { // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6 - project_pos.z = a_Position.z * a_Size; - project_pos.z += u_raisingHeight; - - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); - project_pos.z *= mapboxZoomScale; - project_pos.z += u_raisingHeight * mapboxZoomScale; - } - } - - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); - - // Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9 - if(isSide < 0.999) { - // side face - // if(u_sidesurface < 1.0) { - // discard; - // } - - if(u_linearColor == 1.0) { - vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey); - linearColor.rgb *= lightWeight; - v_Color = linearColor; - } else { - v_Color = a_Color; - } - - } else { - v_Color = a_Color; - } - - v_Color = vec4(v_Color.rgb * lightWeight, v_Color.w * opacity); - - - setPickingColor(a_PickingColor); -} -`,nL=`uniform sampler2D u_texture; - -layout(std140) uniform commonUniforms { - vec4 u_sourceColor; - vec4 u_targetColor; - float u_linearColor; - float u_topsurface; - float u_sidesurface; - float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A - float u_raisingHeight; -}; - -in vec4 v_Color; -in vec3 v_uvs; -in vec2 v_texture_data; - -#pragma include "scene_uniforms" -#pragma include "picking" - -out vec4 outputColor; - -void main() { - float opacity = u_opacity; - float isSide = v_texture_data.x; - float lightWeight = v_texture_data.y; - float topU = v_uvs[0]; - float topV = 1.0 - v_uvs[1]; - float sidey = v_uvs[2]; - - outputColor = texture(SAMPLER_2D(u_texture), vec2(topU, topV)); - // Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9 - if (isSide < 0.999) {// \u662F\u5426\u662F\u8FB9\u7F18 - // side face - if (u_sidesurface < 1.0) { - discard; - } - - if (u_linearColor == 1.0) { - vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey); - linearColor.rgb *= lightWeight; - outputColor = linearColor; - } else { - outputColor = v_Color; - } - } else { - // top face - if (u_topsurface < 1.0) { - discard; - } - } - - outputColor.a *= opacity; - outputColor = filterColor(outputColor); -} -`,iL=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 13) in vec3 a_Normal; -layout(location = 14) in vec3 a_uvs; - - -layout(std140) uniform commonUniforms { - vec4 u_sourceColor; - vec4 u_targetColor; - float u_linearColor; - float u_topsurface; - float u_sidesurface; - float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A - float u_raisingHeight; -}; - -out vec4 v_Color; -out vec3 v_uvs; -out vec2 v_texture_data; - -#pragma include "projection" -#pragma include "light" -#pragma include "picking" - -void main() { - - vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0); - float lightWeight = calc_lighting(pos); - vec4 project_pos = project_position(pos); - v_uvs = a_uvs; - v_Color = a_Color; - v_Color.a *= opacity; - - v_texture_data = vec2(a_Position.z, lightWeight); - - if(u_heightfixed > 0.0) { // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6 - project_pos.z = a_Position.z * a_Size; - project_pos.z += u_raisingHeight; - - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); - project_pos.z *= mapboxZoomScale; - project_pos.z += u_raisingHeight * mapboxZoomScale; - } - } - - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); - - - - setPickingColor(a_PickingColor); -} -`,aL=` -layout(std140) uniform commonUniforms { - vec4 u_sourceColor; - vec4 u_targetColor; - float u_linearColor; - float u_topsurface; - float u_sidesurface; - float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A - float u_raisingHeight; -}; - -in vec4 v_Color; -in vec3 v_uvs; -in vec2 v_texture_data; -out vec4 outputColor; - -#pragma include "scene_uniforms" -#pragma include "picking" - -void main() { - float isSide = v_texture_data.x; - float sidey = v_uvs[2]; - float lightWeight = v_texture_data.y; - - // Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9 - if(isSide < 0.999) { - // side face - if(u_sidesurface < 1.0) { - discard; - } - - if( u_linearColor == 1.0) { - // side use linear - vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey); - linearColor.rgb *= lightWeight; - outputColor = linearColor; - } else { - // side notuse linear - outputColor = v_Color; - } - } else { - // top face - if(u_topsurface < 1.0) { - discard; - } - outputColor = v_Color; - } - - outputColor = filterColorAlpha(outputColor, lightWeight); -} -`,oL=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 13) in vec3 a_Normal; -layout(location = 14) in vec3 a_uvs; - - -layout(std140) uniform commonUniforms { - vec4 u_sourceColor; - vec4 u_targetColor; - float u_linearColor; - float u_topsurface; - float u_sidesurface; - float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A - float u_raisingHeight; -}; - -out vec4 v_Color; -out vec3 v_uvs; -out vec2 v_texture_data; - -#pragma include "projection" -#pragma include "light" -#pragma include "picking" - -void main() { - - - v_uvs = a_uvs; - // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97 - vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0); - vec4 project_pos = project_position(pos); - - if(u_heightfixed > 0.0) { // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6 - project_pos.z = a_Position.z * a_Size; - project_pos.z += u_raisingHeight; - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); - project_pos.z *= mapboxZoomScale; - project_pos.z += u_raisingHeight * mapboxZoomScale; - } - } - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); - float lightWeight = calc_lighting(pos); - v_texture_data = vec2(a_Position.z,lightWeight); - - v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w * opacity); - - setPickingColor(a_PickingColor); -} -`,sL=function(e){(0,Ce.Z)(r,e);var i=JO(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getUninforms",value:function(){var t=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),(0,Me.Z)((0,Me.Z)({},t.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.mapTexture,u=t.heightfixed,c=u===void 0?!1:u,v=t.raisingHeight,E=v===void 0?0:v,G=t.topsurface,ie=G===void 0?!0:G,xe=t.sidesurface,Fe=xe===void 0?!0:xe,it=t.sourceColor,gt=t.targetColor,Dt=0,ar=[1,1,1,1],Mr=[1,1,1,1];it&>&&(ar=Fa(it),Mr=Fa(gt),Dt=1);var Zr={u_sourceColor:ar,u_targetColor:Mr,u_linearColor:Dt,u_topsurface:Number(ie),u_sidesurface:Number(Fe),u_heightfixed:Number(c),u_raisingHeight:Number(E)};o&&this.texture&&(Zr.u_texture=this.texture,this.textures=[this.texture]);var mn=this.getUniformsBufferInfo(Zr);return mn}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.loadTexture();case 2:return c.abrupt("return",this.buildModels());case 3:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G;return Qr().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return u=this.getShaders(),c=u.frag,v=u.vert,E=u.type,this.initUniformsBuffer(),xe.next=4,this.layer.buildLayerModel({moduleName:E,vertexShader:v,fragmentShader:c,depth:{enable:!0},inject:this.getInject(),triangulation:Hx});case 4:return G=xe.sent,xe.abrupt("return",[G]);case 6:case"end":return xe.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getShaders",value:function(){var t=this.layer.getLayerConfig(),o=t.pickLight,u=t.mapTexture;return u?{frag:nL,vert:iL,type:"polygonExtrudeTexture"}:o?{frag:aL,vert:oL,type:"polygonExtrudePickLight"}:{frag:tL,vert:rL,type:"polygonExtrude"}}},{key:"clearModels",value:function(){var t;(t=this.texture)===null||t===void 0||t.destroy(),this.textures=[]}},{key:"registerBuiltinAttributes",value:function(){var t=this.layer.getSource().extent,o=t,u=this.layer.coordCenter||this.layer.getSource().center,c=o[2]-o[0],v=o[3]-o[1];if(this.mapService.version==="GAODE2.x"){var E=this.mapService.coordToAMap2RelativeCoordinates([t[0],t[1]],u),G=(0,wi.Z)(E,2),ie=G[0],xe=G[1],Fe=this.mapService.coordToAMap2RelativeCoordinates([t[2],t[3]],u),it=(0,wi.Z)(Fe,2),gt=it[0],Dt=it[1];c=gt-ie,v=Dt-xe,o=[ie,xe,gt,Dt]}this.styleAttributeService.registerStyleAttribute({name:"uvs",type:pl.Attribute,descriptor:{name:"a_uvs",shaderLocation:qc.UV,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(Mr,Zr,mn){var zn=mn[0],Rn=mn[1];return[(zn-o[0])/c,(Rn-o[1])/v,mn[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:pl.Attribute,descriptor:{name:"a_Normal",shaderLocation:qc.NORMAL,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(Mr,Zr,mn,zn,Rn){return Rn}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(Mr){var Zr=Mr.size,mn=Zr===void 0?10:Zr;return Array.isArray(mn)?[mn[0]]:[mn]}}})}},{key:"loadTexture",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E;return Qr().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(u=this.layer.getLayerConfig(),c=u.mapTexture,v=this.rendererService.createTexture2D,this.texture=v({height:1,width:1}),!c){ie.next=8;break}return ie.next=6,QO(c);case 6:E=ie.sent,this.texture=v({data:E,width:E.width,height:E.height,wrapS:Or.CLAMP_TO_EDGE,wrapT:Or.CLAMP_TO_EDGE,min:Or.LINEAR,mag:Or.LINEAR});case 8:case"end":return ie.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()}]),r}(op);function uL(e){var i=lL();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function lL(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var cL=` -in vec4 v_Color; -#pragma include "scene_uniforms" -#pragma include "picking" -out vec4 outputColor; -void main() { - - outputColor = v_Color; - outputColor = filterColor(outputColor); -} -`,fL=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 9) in float a_Size; -layout(location = 13) in vec3 a_Normal; - -out vec4 v_Color; - -#pragma include "projection" -#pragma include "light" -#pragma include "picking" - -void main() { - - vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size + (1.0 - a_Position.z) * extrusionBase, 1.0); - - vec4 project_pos = project_position(pos); - float lightWeight = calc_lighting(project_pos); - v_Color = a_Color; - v_Color = vec4(v_Color.rgb * lightWeight, v_Color.w * opacity); - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); - - setPickingColor(a_PickingColor); -} -`,hL=function(e){(0,Ce.Z)(r,e);var i=uL(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getUninforms",value:function(){var t=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),(0,Me.Z)((0,Me.Z)({},t.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var t={},o=this.getUniformsBufferInfo(t);return o}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.buildModels());case 1:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G;return Qr().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return u=this.getShaders(),c=u.frag,v=u.vert,E=u.type,this.initUniformsBuffer(),xe.next=4,this.layer.buildLayerModel({moduleName:E,vertexShader:v,fragmentShader:c,inject:this.getInject(),triangulation:Hx,depth:{enable:!0}});case 4:return G=xe.sent,xe.abrupt("return",[G]);case 6:case"end":return xe.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getShaders",value:function(){return{frag:cL,vert:fL,type:"polygonExtrude"}}},{key:"clearModels",value:function(){var t;(t=this.texture)===null||t===void 0||t.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"normal",type:pl.Attribute,descriptor:{name:"a_Normal",shaderLocation:qc.NORMAL,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o,u,c,v,E){return E}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(o){var u=o.size,c=u===void 0?10:u;return Array.isArray(c)?[c[0]]:[c]}}})}}]),r}(op);function dL(e){var i=pL();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function pL(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var mL=`in vec4 v_color; -#pragma include "scene_uniforms" -#pragma include "picking" -out vec4 outputColor; -void main() { - outputColor = v_color; - outputColor = filterColor(outputColor); -} -`,vL=` -layout(std140) uniform commonUniforms { - float u_raisingHeight; - float u_opacitylinear; - float u_dir; -}; - -in vec4 v_color; -in vec3 v_linear; -in vec2 v_pos; -out vec4 outputColor; -#pragma include "scene_uniforms" -#pragma include "picking" - -void main() { - outputColor = v_color; - if (u_opacitylinear > 0.0) { - outputColor.a *= u_dir == 1.0 ? 1.0 - length(v_pos - v_linear.xy)/v_linear.z : length(v_pos - v_linear.xy)/v_linear.z; - } - outputColor = filterColor(outputColor); -} -`,gL=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 15) in vec3 a_linear; - -layout(std140) uniform commonUniforms { - float u_raisingHeight; - float u_opacitylinear; - float u_dir; -}; - -out vec4 v_color; -out vec3 v_linear; -out vec2 v_pos; - -#pragma include "projection" -#pragma include "picking" - -void main() { - if (u_opacitylinear > 0.0) { - v_linear = a_linear; - v_pos = a_Position.xy; - } - v_color = vec4(a_Color.xyz, a_Color.w * opacity); - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - project_pos.z += u_raisingHeight; - - if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); - project_pos.z *= mapboxZoomScale; - project_pos.z += u_raisingHeight * mapboxZoomScale; - } - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); - setPickingColor(a_PickingColor); -}`,yL=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; - -layout(std140) uniform commonUniforms { - float u_raisingHeight; -}; - - -out vec4 v_color; - - -#pragma include "projection" -#pragma include "picking" - -void main() { - // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97 - - // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97 - - v_color = vec4(a_Color.xyz, a_Color.w * opacity); - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0)); - - project_pos.z += u_raisingHeight; - - if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { - float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom); - project_pos.z *= mapboxZoomScale; - project_pos.z += u_raisingHeight * mapboxZoomScale; - } - - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); - - setPickingColor(a_PickingColor); -} - -`,_L=function(e){(0,Ce.Z)(r,e);var i=dL(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getUninforms",value:function(){var t=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),(0,Me.Z)((0,Me.Z)({},t.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.raisingHeight,u=o===void 0?0:o,c=t.opacityLinear,v=c===void 0?{enable:!1,dir:"in"}:c,E={u_raisingHeight:Number(u),u_opacitylinear:Number(v.enable),u_dir:v.dir==="in"?1:0},G=this.getUniformsBufferInfo(E);return G}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.buildModels());case 1:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G,ie;return Qr().wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return u=this.getModelParams(),c=u.frag,v=u.vert,E=u.triangulation,G=u.type,this.initUniformsBuffer(),this.layer.triangulation=E,Fe.next=5,this.layer.buildLayerModel({moduleName:G,vertexShader:v,fragmentShader:c,inject:this.getInject(),triangulation:E,primitive:Or.TRIANGLES,depth:{enable:!1}});case 5:return ie=Fe.sent,Fe.abrupt("return",[ie]);case 7:case"end":return Fe.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"registerBuiltinAttributes",value:function(){var t=this.layer.getLayerConfig(),o=t.opacityLinear,u=o===void 0?{enable:!1,dir:"in"}:o;u.enable&&this.styleAttributeService.registerStyleAttribute({name:"linear",type:pl.Attribute,descriptor:{name:"a_linear",shaderLocation:qc.LINEAR,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(v,E,G){return[G[3],G[4],G[5]]}}})}},{key:"getModelParams",value:function(){var t=this.layer.getLayerConfig(),o=t.opacityLinear,u=o===void 0?{enable:!1}:o;return u.enable?{frag:vL,vert:gL,type:"polygonLinear",triangulation:PI}:{frag:mL,vert:yL,type:"polygonFill",triangulation:N0}}}]),r}(op);function AL(e){var i=bL();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function bL(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var xL=` -layout(std140) uniform commonUniforms { - vec4 u_watercolor; - vec4 u_watercolor2; - float u_time; -}; - -in vec2 v_uv; -in float v_opacity; -out vec4 outputColor; - -float coast2water_fadedepth = 0.10; -float large_waveheight = .750; // change to adjust the "heavy" waves -float large_wavesize = 3.4; // factor to adjust the large wave size -float small_waveheight = 0.6; // change to adjust the small random waves -float small_wavesize = 0.5; // factor to ajust the small wave size -float water_softlight_fact = 15.; // range [1..200] (should be << smaller than glossy-fact) -float water_glossylight_fact= 120.; // range [1..200] -float particle_amount = 70.; - -vec3 water_specularcolor = vec3(1.3, 1.3, 0.9); // specular Color (RGB) of the water-highlights -#define light vec3(-0., sin(u_time*0.5)*.5 + .35, 2.8) // position of the sun - -uniform sampler2D u_texture1; -uniform sampler2D u_texture2; -uniform sampler2D u_texture3; - - - -float hash( float n ) { - return fract(sin(n)*43758.5453123); -} - -// 2d noise function -float noise1( in vec2 x ) { - vec2 p = floor(x); - vec2 f = smoothstep(0.0, 1.0, fract(x)); - float n = p.x + p.y*57.0; - return mix(mix( hash(n+ 0.0), hash(n+ 1.0),f.x), - mix( hash(n+ 57.0), hash(n+ 58.0),f.x),f.y); -} - -float noise(vec2 p) { - return texture(SAMPLER_2D(u_texture2),p*vec2(1./256.)).x; -} - -vec4 highness(vec2 p) { - vec4 t = texture(SAMPLER_2D(u_texture1),fract(p)); - float clipped = -2.0-smoothstep(3.,10.,t.a)*6.9-smoothstep(10.,100.,t.a)*89.9-smoothstep(0.,10000.,t.a)*10000.0; - return clamp(t, 0.0,3.0)+clamp(t/3.0-1.0, 0.0,1.0)+clamp(t/16.0-1.0, 0.0,1.0); -} - -float height_map( vec2 p ) { - vec4 height=highness(p); - /* - height = -0.5+ - 0.5*smoothstep(-100.,0.,-height)+ - 2.75*smoothstep(0.,2.,height)+ - 1.75*smoothstep(2.,4.,height)+ - 2.75*smoothstep(4.,16.,height)+ - 1.5*smoothstep(16.,1000.,height); - */ - - mat2 m = mat2( 0.9563*1.4, -0.2924*1.4, 0.2924*1.4, 0.9563*1.4 ); - //p = p*6.; - float f = 0.6000*noise1( p ); p = m*p*1.1*6.; - f += 0.2500*noise( p ); p = m*p*1.32; - f += 0.1666*noise( p ); p = m*p*1.11; - f += 0.0834*noise( p ); p = m*p*1.12; - f += 0.0634*noise( p ); p = m*p*1.13; - f += 0.0444*noise( p ); p = m*p*1.14; - f += 0.0274*noise( p ); p = m*p*1.15; - f += 0.0134*noise( p ); p = m*p*1.16; - f += 0.0104*noise( p ); p = m*p*1.17; - f += 0.0084*noise( p ); - f = .25*f+dot(height,vec4(-.03125,-.125,.25,.25))*.5; - const float FLAT_LEVEL = 0.92525; - //f = f*0.25+height*0.75; - if (f level) - { - col = CalcTerrain(uv, height); - } - if (height <= level) - { - vec2 dif = vec2(.0, .01); - vec2 pos = uv*15. + vec2(u_time*.01); - float h1 = water_map(pos-dif,waveheight); - float h2 = water_map(pos+dif,waveheight); - float h3 = water_map(pos-dif.yx,waveheight); - float h4 = water_map(pos+dif.yx,waveheight); - vec3 normwater = normalize(vec3(h3-h4, h1-h2, .125)); // norm-vector of the 'bumpy' water-plane - uv += normwater.xy*.002*(level-height); - - col = CalcTerrain(uv, height); - - float coastfade = clamp((level-height)/coast2water_fadedepth, 0., 1.); - float coastfade2= clamp((level-height)/deepwater_fadedepth, 0., 1.); - float intensity = col.r*.2126+col.g*.7152+col.b*.0722; - watercolor = mix(watercolor*intensity, watercolor2, smoothstep(0., 1., coastfade2)); - - vec3 r0 = vec3(uv, WATER_LEVEL); - vec3 rd = normalize( light - r0 ); // ray-direction to the light from water-position - float grad = dot(normwater, rd); // dot-product of norm-vector and light-direction - float specular = pow(grad, water_softlight_fact); // used for soft highlights - float specular2= pow(grad, water_glossylight_fact); // used for glossy highlights - float gradpos = dot(vec3(0., 0., 1.), rd); - float specular1= smoothstep(0., 1., pow(gradpos, 5.)); // used for diffusity (some darker corona around light's specular reflections...) - float watershade = test_shadow( uv, level ); - watercolor *= 2.2+watershade; - watercolor += (.2+.8*watershade) * ((grad-1.0)*.5+specular) * .25; - watercolor /= (1.+specular1*1.25); - watercolor += watershade*specular2*water_specularcolor; - watercolor += watershade*coastfade*(1.-coastfade2)*(vec3(.5, .6, .7)*nautic(uv)+vec3(1., 1., 1.)*particles(uv)); - - col = mix(col, watercolor, coastfade); - } - - outputColor = vec4(col, v_opacity); -} -`,wL=`layout(location = 0) in vec3 a_Position; -layout(location = 14) in vec2 a_uv; - -layout(std140) uniform commonUniforms { - vec4 u_watercolor; - vec4 u_watercolor2; - float u_time; -}; - - -out vec2 v_uv; -out float v_opacity; - -#pragma include "projection" - -void main() { - v_uv = a_uv; - v_opacity = opacity; - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); -} - -`,mV=vi.isNumber,EL=function(e){(0,Ce.Z)(r,e);var i=AL(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getUninforms",value:function(){var t=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),(0,Me.Z)((0,Me.Z)({},t.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.watercolor,u=o===void 0?"#6D99A8":o,c=t.watercolor2,v=c===void 0?"#0F121C":c,E={u_watercolor:Fa(u),u_watercolor2:Fa(v),u_time:this.layer.getLayerAnimateTime(),u_texture1:this.texture1,u_texture2:this.texture2,u_texture3:this.texture3};this.textures=[this.texture1,this.texture2,this.texture3];var G=this.getUniformsBufferInfo(E);return G}},{key:"getAnimateUniforms",value:function(){return{u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.loadTexture(),c.abrupt("return",this.buildModels());case 2:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return this.initUniformsBuffer(),v.next=3,this.layer.buildLayerModel({moduleName:"polygonOcean",vertexShader:wL,fragmentShader:xL,inject:this.getInject(),triangulation:$x,primitive:Or.TRIANGLES,depth:{enable:!1}});case 3:return u=v.sent,v.abrupt("return",[u]);case 5:case"end":return v.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"clearModels",value:function(){var t,o,u;(t=this.texture1)===null||t===void 0||t.destroy(),(o=this.texture2)===null||o===void 0||o.destroy(),(u=this.texture3)===null||u===void 0||u.destroy()}},{key:"registerBuiltinAttributes",value:function(){var t=this.layer.getSource().extent,o=(0,wi.Z)(t,4),u=o[0],c=o[1],v=o[2],E=o[3],G=v-u,ie=E-c;this.styleAttributeService.registerStyleAttribute({name:"oceanUv",type:pl.Attribute,descriptor:{name:"a_uv",shaderLocation:qc.UV,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(Fe,it,gt,Dt){var ar=Fe.version==="GAODE2.x"?Fe.originCoordinates[0][Dt]:gt,Mr=(0,wi.Z)(ar,2),Zr=Mr[0],mn=Mr[1];return[(Zr-u)/G,(mn-c)/ie]}}})}},{key:"loadTexture",value:function(){var t=this,o=this.rendererService.createTexture2D,u={height:0,width:0};this.texture1=o(u),this.texture2=o(u),this.texture3=o(u),c(function(E){t.texture1=v(E[0]),t.texture2=v(E[1]),t.texture3=v(E[2]),t.layerService.reRender()});function c(E){var G=0,ie=[],xe=["https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*MJ22QbpuCzIAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*-z2HSIVDsHIAAAAAAAAAAAAAARQnAQ"];xe.map(function(Fe){var it=new Image;it.crossOrigin="",it.src=Fe,ie.push(it),it.onload=function(){G++,G===3&&E(ie)}})}function v(E){return o({data:E,width:E.width,height:E.height,wrapS:Or.MIRRORED_REPEAT,wrapT:Or.MIRRORED_REPEAT,min:Or.LINEAR,mag:Or.LINEAR})}}}]),r}(op);function SL(e){var i=CL();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function CL(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var TL=`uniform sampler2D u_texture; -layout(std140) uniform commonUniforms { - float u_speed; - float u_time; -}; - -out vec4 outputColor; - - -in vec4 v_Color; -in vec2 v_uv; - -float rand(vec2 n) { return 0.5 + 0.5 * fract(sin(dot(n.xy, vec2(12.9898, 78.233)))* 43758.5453); } - -float water(vec3 p) { - float t = u_time * u_speed; - p.z += t * 2.; p.x += t * 2.; - vec3 c1 = texture(SAMPLER_2D(u_texture), p.xz / 30.).xyz; - p.z += t * 3.; p.x += t * 0.52; - vec3 c2 = texture(SAMPLER_2D(u_texture), p.xz / 30.).xyz; - p.z += t * 4.; p.x += t * 0.8; - vec3 c3 = texture(SAMPLER_2D(u_texture), p.xz / 30.).xyz; - c1 += c2 - c3; - float z = (c1.x + c1.y + c1.z) / 3.; - return p.y + z / 4.; -} - -float map(vec3 p) { - float d = 100.0; - d = water(p); - return d; -} - -float intersect(vec3 ro, vec3 rd) { - float d = 0.0; - for (int i = 0; i <= 100; i++) { - float h = map(ro + rd * d); - if (h < 0.1) return d; - d += h; - } - return 0.0; -} - -vec3 norm(vec3 p) { - float eps = .1; - return normalize(vec3( - map(p + vec3(eps, 0, 0)) - map(p + vec3(-eps, 0, 0)), - map(p + vec3(0, eps, 0)) - map(p + vec3(0, -eps, 0)), - map(p + vec3(0, 0, eps)) - map(p + vec3(0, 0, -eps)) - )); -} - -float calSpc() { - vec3 l1 = normalize(vec3(1, 1, 1)); - vec3 ro = vec3(-3, 20, -8); - vec3 rc = vec3(0, 0, 0); - vec3 ww = normalize(rc - ro); - vec3 uu = normalize(cross(vec3(0,1,0), ww)); - vec3 vv = normalize(cross(rc - ro, uu)); - vec3 rd = normalize(uu * v_uv.x + vv * v_uv.y + ww); - float d = intersect(ro, rd); - vec3 p = ro + rd * d; - vec3 n = norm(p); - float spc = pow(max(0.0, dot(reflect(l1, n), rd)), 30.0); - return spc; -} - -void main() { - - outputColor = v_Color; - float spc = calSpc(); - outputColor += spc * 0.4; -} -`,ML=`layout(location = 0) in vec3 a_Position; -layout(location = 1) in vec4 a_Color; -layout(location = 14) in vec2 a_uv; -layout(std140) uniform commonUniforms { - float u_speed; - float u_time; -}; -out vec4 v_Color; -out vec2 v_uv; - - -#pragma include "projection" - -void main() { - v_uv = a_uv; - v_Color = a_Color; - v_Color.a *= opacity; - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0)); -} - -`,vV=vi.isNumber,PL=function(e){(0,Ce.Z)(r,e);var i=SL(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getUninforms",value:function(){var t=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),(0,Me.Z)((0,Me.Z)({},t.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.speed,u=o===void 0?.5:o,c={u_speed:u,u_time:this.layer.getLayerAnimateTime(),u_texture:this.texture};this.textures=[this.texture];var v=this.getUniformsBufferInfo(c);return v}},{key:"getAnimateUniforms",value:function(){return{u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.loadTexture(),c.abrupt("return",this.buildModels());case 2:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return this.initUniformsBuffer(),v.next=3,this.layer.buildLayerModel({moduleName:"polygonWater",vertexShader:ML,fragmentShader:TL,triangulation:$x,inject:this.getInject(),primitive:Or.TRIANGLES,depth:{enable:!1},pickingEnabled:!1,diagnosticDerivativeUniformityEnabled:!1});case 3:return u=v.sent,v.abrupt("return",[u]);case 5:case"end":return v.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"clearModels",value:function(){var t;(t=this.texture)===null||t===void 0||t.destroy()}},{key:"registerBuiltinAttributes",value:function(){var t=this.layer.getSource().extent,o=(0,wi.Z)(t,4),u=o[0],c=o[1],v=o[2],E=o[3],G=v-u,ie=E-c;this.styleAttributeService.registerStyleAttribute({name:"waterUv",type:pl.Attribute,descriptor:{name:"a_uv",shaderLocation:qc.UV,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(Fe,it,gt,Dt){var ar=Fe.version==="GAODE2.x"?Fe.originCoordinates[0][Dt]:gt,Mr=(0,wi.Z)(ar,2),Zr=Mr[0],mn=Mr[1];return[(Zr-u)/G,(mn-c)/ie]}}})}},{key:"loadTexture",value:function(){var t=this,o=this.layer.getLayerConfig(),u=o.waterTexture,c=this.rendererService.createTexture2D;this.texture=c({height:1,width:1});var v=new Image;v.crossOrigin="",u?(console.warn("L7 recommend\uFF1Ahttps://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ"),v.src=u):v.src="https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ",v.onload=function(){t.texture=c({data:v,width:v.width,height:v.height,wrapS:Or.MIRRORED_REPEAT,wrapT:Or.MIRRORED_REPEAT,min:Or.LINEAR,mag:Or.LINEAR}),t.layerService.reRender()}}}]),r}(op),IL={fill:_L,line:AS,extrude:sL,text:NS,point_fill:wS,point_image:ES,point_normal:CS,point_extrude:xS,water:PL,ocean:EL,extrusion:hL},RL=IL;function OL(e){var i=LL();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function LL(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var bb=function(e){(0,Ce.Z)(r,e);var i=OL(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u 0.0 || x < 0.0) ? x != x : x != 0.0; } - -out vec4 outputColor; - -void main() { - // Can use any component here since u_rasterTexture is under luminance format. - float value = texture(SAMPLER_2D(u_rasterTexture), vec2(v_texCoord.x, v_texCoord.y)).r; - if (value == u_noDataValue || isnan_emu(value)) { - discard; - } else if ((u_clampLow < 0.5 && value < u_domain[0]) || (u_clampHigh < 0.5 && value > u_domain[1])) { - discard; - } else { - float normalisedValue =(value - u_domain[0]) / (u_domain[1] - u_domain[0]); - vec4 color = texture(SAMPLER_2D(u_colorTexture), vec2(normalisedValue, 0)); - - outputColor = color; - outputColor.a = outputColor.a * u_opacity ; - if (outputColor.a < 0.01) - discard; - } -} -`,BL=` -layout(location = 0) in vec3 a_Position; -layout(location = 14) in vec2 a_Uv; - -layout(std140) uniform commonUniforms { - vec2 u_domain; - float u_opacity; - float u_noDataValue; - float u_clampLow; - float u_clampHigh; -}; - -out vec2 v_texCoord; - -#pragma include "projection" - -void main() { - v_texCoord = a_Uv; - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy,0., 1.0)); -} -`,ZS=function(e){(0,Ce.Z)(r,e);var i=DL(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getUninforms",value:function(){var t=this.getCommonUniformsInfo(),o=this.getUniformsBufferInfo(this.getStyleAttribute());return this.updateStyleUnifoms(),(0,Me.Z)((0,Me.Z)({},t.uniformsOption),o.uniformsOption)}},{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.opacity,u=o===void 0?1:o,c=t.clampLow,v=c===void 0?!0:c,E=t.clampHigh,G=E===void 0?!0:E,ie=t.noDataValue,xe=ie===void 0?-9999999:ie,Fe=t.domain,it=t.rampColors,gt=Fe||qa(it);this.colorTexture=this.layer.textureService.getColorTexture(it,gt);var Dt={u_domain:gt,u_opacity:u||1,u_noDataValue:xe,u_clampLow:v?1:0,u_clampHigh:(typeof G!="undefined"?G:v)?1:0,u_rasterTexture:this.texture,u_colorTexture:this.colorTexture};this.textures=[this.texture,this.colorTexture];var ar=this.getUniformsBufferInfo(Dt);return ar}},{key:"getRasterData",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(u){var c,v,E,G;return Qr().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(!Array.isArray(u.data)){xe.next=4;break}return xe.abrupt("return",{data:u.data,width:u.width,height:u.height});case 4:return xe.next=6,u.data;case 6:return c=xe.sent,v=c.rasterData,E=c.width,G=c.height,xe.abrupt("return",{data:Array.from(v),width:E,height:G});case 11:case"end":return xe.stop()}},o)}));function t(o){return n.apply(this,arguments)}return t}()},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.buildModels());case 1:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G,ie,xe,Fe,it,gt;return Qr().wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return this.initUniformsBuffer(),u=this.layer.getSource(),c=this.rendererService,v=c.createTexture2D,E=c.queryVerdorInfo,G=u.data.dataArray[0],ar.next=6,this.getRasterData(G);case 6:return ie=ar.sent,xe=ie.data,Fe=ie.width,it=ie.height,this.texture=v({data:new Float32Array(xe),width:Fe,height:it,format:E()==="WebGL1"?Or.LUMINANCE:Or.RED,type:Or.FLOAT,alignment:1}),ar.next=13,this.layer.buildLayerModel({moduleName:"rasterImageData",vertexShader:BL,fragmentShader:FL,triangulation:L_,primitive:Or.TRIANGLES,depth:{enable:!1},pickingEnabled:!1});case 13:return gt=ar.sent,ar.abrupt("return",[gt]);case 15:case"end":return ar.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"clearModels",value:function(){var t,o;(t=this.texture)===null||t===void 0||t.destroy(),(o=this.colorTexture)===null||o===void 0||o.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:pl.Attribute,descriptor:{shaderLocation:qc.UV,name:"a_Uv",buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(o,u,c){return[c[3],c[4]]}}})}}]),r}(op),NL=["data"],zL=["rasterData"];function ZL(e){var i=UL();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function UL(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var jL=`uniform sampler2D u_texture; -layout(std140) uniform commonUniforms { - vec2 u_rminmax; - vec2 u_gminmax; - vec2 u_bminmax; - float u_opacity; - float u_noDataValue; -}; - -in vec2 v_texCoord; - -out vec4 outputColor; - -void main() { - - vec3 rgb = texture(SAMPLER_2D(u_texture),vec2(v_texCoord.x,v_texCoord.y)).rgb; - - if(rgb == vec3(u_noDataValue)) { - outputColor = vec4(0.0, 0, 0, 0.0); - } else { - outputColor = vec4(rgb.r / (u_rminmax.y -u_rminmax.x), rgb.g /(u_gminmax.y -u_gminmax.x), rgb.b/ (u_bminmax.y - u_bminmax.x), u_opacity); - } - - if(outputColor.a < 0.01) - discard; - -}`,VL=` -layout(location = 0) in vec3 a_Position; -layout(location = 14) in vec2 a_Uv; - -layout(std140) uniform commonUniforms { - vec2 u_rminmax; - vec2 u_gminmax; - vec2 u_bminmax; - float u_opacity; - float u_noDataValue; -}; - -out vec2 v_texCoord; - -#pragma include "projection" - -void main() { - v_texCoord = a_Uv; - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy,0., 1.0)); -} -`,$L=function(e){(0,Ce.Z)(r,e);var i=ZL(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u u_domain[1])) { - outputColor = vec4(0.0, 0, 0, 0.0); - } else { - - outputColor = getColor(value); - outputColor.a = outputColor.a * u_opacity ; - if(outputColor.a < 0.01) - discard; - } -} -`,XL=`layout(location = 0) in vec3 a_Position; -layout(location = 14) in vec2 a_Uv; - -layout(std140) uniform commonUniforms { - vec4 u_unpack; - vec2 u_domain; - float u_opacity; - float u_noDataValue; - float u_clampLow; - float u_clampHigh; -}; -out vec2 v_texCoord; -#pragma include "projection" - -void main() { - v_texCoord = a_Uv; - vec4 project_pos = project_position(vec4(a_Position, 1.0)); - gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xy,0., 1.0)); -} -`,YL=function(e){(0,Ce.Z)(r,e);var i=HL(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.opacity,u=t.clampLow,c=u===void 0?!0:u,v=t.clampHigh,E=v===void 0?!0:v,G=t.noDataValue,ie=G===void 0?-9999999:G,xe=t.domain,Fe=t.rampColors,it=t.colorTexture,gt=t.rScaler,Dt=gt===void 0?6553.6:gt,ar=t.gScaler,Mr=ar===void 0?25.6:ar,Zr=t.bScaler,mn=Zr===void 0?.1:Zr,zn=t.offset,Rn=zn===void 0?1e4:zn,kn=xe||qa(Fe),ui=it;it?this.layer.textureService.setColorTexture(it,Fe,kn):ui=this.layer.textureService.getColorTexture(Fe,kn);var Di={u_unpack:[Dt,Mr,mn,Rn],u_domain:kn,u_opacity:o||1,u_noDataValue:ie,u_clampLow:c,u_clampHigh:typeof E!="undefined"?E:c,u_texture:this.texture,u_colorTexture:ui};this.textures=[this.texture,ui];var Aa=this.getUniformsBufferInfo(Di);return Aa}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E;return Qr().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return this.initUniformsBuffer(),u=this.layer.getSource(),c=this.rendererService.createTexture2D,ie.next=5,u.data.images;case 5:return v=ie.sent,this.texture=c({data:v[0],width:v[0].width,height:v[0].height,min:Or.LINEAR,mag:Or.LINEAR}),ie.next=9,this.layer.buildLayerModel({moduleName:"RasterTileDataImage",vertexShader:XL,fragmentShader:WL,triangulation:L_,primitive:Or.TRIANGLES,depth:{enable:!1}});case 9:return E=ie.sent,ie.abrupt("return",[E]);case 11:case"end":return ie.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"clearModels",value:function(){var t;(t=this.texture)===null||t===void 0||t.destroy()}},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this.initModels());case 1:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:pl.Attribute,descriptor:{name:"a_Uv",shaderLocation:qc.UV,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(o,u,c){return[c[3],c[4]]}}})}}]),r}(op),KL={raster:ZS,rasterRgb:$L,raster3d:ZS,rasterTerrainRgb:YL},qL=KL;function QL(e){var i=JL();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function JL(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var xb=function(e){(0,Ce.Z)(r,e);var i=QL(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u 1.0) intensity = 0.0; - - outputColor = vec4(v_Color.rgb, v_Color.a * intensity * u_opacity); -} -`,oD=`layout(location = 0) in vec3 a_Position; -layout(location = 1) vec4 a_Color; -layout(location = 13) in vec3 a_Normal; -layout(location = 14) in vec2 a_Uv; -layout(std140) uniform commonUniforms { - float u_opacity; -}; -#pragma include "scene_uniforms" -out vec3 vVertexNormal; -out vec4 v_Color; -out float v_offset; - -void main() { - float EARTH_RADIUS = 100.0; - - v_Color = a_Color; - - v_offset = min(((length(u_CameraPosition) - EARTH_RADIUS)/600.0) * 0.5 + 0.4, 1.0); - vVertexNormal = a_Normal; - - gl_Position = u_ViewProjectionMatrix * u_ModelMatrix * vec4(a_Position, 1.0); -} -`,sD=vi.isNumber,uD=function(e){(0,Ce.Z)(r,e);var i=nD(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.opacity,u=o===void 0?1:o,c={u_opacity:sD(u)?u:1},v=this.getUniformsBufferInfo(c);return v}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.initUniformsBuffer(),c.abrupt("return",this.buildModels());case 2:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"clearModels",value:function(){return""}},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return this.layer.zIndex=-997,v.next=3,this.layer.buildLayerModel({moduleName:"earthAtmoSphere",vertexShader:oD,fragmentShader:aD,triangulation:fS,depth:{enable:!1},blend:this.getBlend()});case 3:return u=v.sent,v.abrupt("return",[u]);case 5:case"end":return v.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(o){var u=o.size,c=u===void 0?1:u;return Array.isArray(c)?[c[0]]:[c]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:pl.Attribute,descriptor:{name:"a_Normal",shaderLocation:qc.NORMAL,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o,u,c,v,E){return E}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:pl.Attribute,descriptor:{name:"a_Uv",shaderLocation:qc.UV,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(o,u,c){return[c[3],c[4]]}}})}}]),r}(op);function lD(e){var i=cD();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function cD(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var fD=`uniform sampler2D u_texture; - -in vec2 v_texCoord; -in float v_lightWeight; -out vec4 outputColor; - -void main() { - vec4 color = texture(SAMPLER_2D(u_texture),vec2(v_texCoord.x,v_texCoord.y)); - color.xyz = color.xyz * v_lightWeight; - outputColor = color; -} -`,hD=`// attribute vec4 a_Color; -layout(location = 0) in vec3 a_Position; -layout(location = 13) in vec3 a_Normal; -layout(location = 14) in vec2 a_Uv; - -// attribute vec2 a_Extrude; -// attribute float a_Size; -// attribute float a_Shape; - -layout(std140) uniform commonUniforms { - vec4 u_sunLight: [1.0, -10.5, 12.0,0.0]; - float u_ambientRatio : 0.5; - float u_diffuseRatio : 0.3; - float u_specularRatio : 0.2; -}; - -#pragma include "scene_uniforms" - -out vec2 v_texCoord; -out float v_lightWeight; - -float calc_lighting(vec4 pos) { - - vec3 worldPos = vec3(pos * u_ModelMatrix); - - vec3 worldNormal = a_Normal; - - // cal light weight - vec3 viewDir = normalize(u_CameraPosition - worldPos); - - vec3 lightDir = normalize(u_sunLight.xyz); - - vec3 halfDir = normalize(viewDir+lightDir); - // lambert - float lambert = dot(worldNormal, lightDir); - // specular - float specular = pow(max(0.0, dot(worldNormal, halfDir)), 32.0); - //sum to light weight - float lightWeight = u_ambientRatio + u_diffuseRatio * lambert + u_specularRatio * specular; - - return lightWeight; -} - -void main() { - - v_texCoord = a_Uv; - - float lightWeight = calc_lighting(vec4(a_Position, 1.0)); - v_lightWeight = lightWeight; - - gl_Position = u_ViewProjectionMatrix * u_ModelMatrix * vec4(a_Position, 1.0); -} -`,dD=function(e){(0,Ce.Z)(r,e);var i=lD(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u 1.0) intensity = 0.0; - - outputColor = vec4(v_Color.rgb, v_Color.a * intensity * u_opacity); -} -`,gD=`layout(location = 0) in vec3 a_Position; -layout(location = 1) vec4 a_Color; -layout(location = 13) in vec3 a_Normal; -layout(location = 14) in vec2 a_Uv; -layout(std140) uniform commonUniforms { - float u_opacity; -}; -#pragma include "scene_uniforms" - -out vec3 vVertexNormal; -out vec4 v_Color; - -void main() { - v_Color = a_Color; - - vVertexNormal = a_Normal; - - gl_Position = u_ViewProjectionMatrix * u_ModelMatrix * vec4(a_Position, 1.0); -} -`,yD=vi.isNumber,_D=function(e){(0,Ce.Z)(r,e);var i=pD(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getCommonUniformsInfo",value:function(){var t=this.layer.getLayerConfig(),o=t.opacity,u=o===void 0?1:o,c={u_opacity:yD(u)?u:1},v=this.getUniformsBufferInfo(c);return v}},{key:"initModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return this.initUniformsBuffer(),c.abrupt("return",this.buildModels());case 2:case"end":return c.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"clearModels",value:function(){return""}},{key:"buildModels",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return this.layer.zIndex=-999,v.next=3,this.layer.buildLayerModel({moduleName:"earthBloom",vertexShader:gD,fragmentShader:vD,triangulation:DI,depth:{enable:!1},blend:this.getBlend()});case 3:return u=v.sent,v.abrupt("return",[u]);case 5:case"end":return v.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:pl.Attribute,descriptor:{name:"a_Size",shaderLocation:qc.SIZE,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:1,update:function(o){var u=o.size,c=u===void 0?1:u;return Array.isArray(c)?[c[0]]:[c]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:pl.Attribute,descriptor:{name:"a_Normal",shaderLocation:qc.NORMAL,buffer:{usage:Or.STATIC_DRAW,data:[],type:Or.FLOAT},size:3,update:function(o,u,c,v,E){return E}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:pl.Attribute,descriptor:{name:"a_Uv",shaderLocation:qc.UV,buffer:{usage:Or.DYNAMIC_DRAW,data:[],type:Or.FLOAT},size:2,update:function(o,u,c){return[c[3],c[4]]}}})}}]),r}(op);function AD(e){var i=bD();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function bD(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var xD={base:dD,atomSphere:uD,bloomSphere:_D},wD=["base","atomSphere","bloomSphere"],ED=function(e){(0,Ce.Z)(r,e);var i=AD(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u0&&arguments[0]!==void 0?arguments[0]:!0;t&&this.layerService.clear()}},{key:"registerBuiltinAttributes",value:function(){return""}}]),r}(op),ID={fill:PD},RD=ID;function OD(e){var i=LD();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function LD(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Yx=function(e){(0,Ce.Z)(r,e);var i=OD(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u0&&arguments[0]!==void 0?arguments[0]:{},u=this.layer.getLayerConfig(),c=u.opacity;this.layerService.beforeRenderData(this.layer),this.layer.hooks.beforeRender.call(),this.layerService.renderMask(this.layer.masks),(t=this.colorModel)===null||t===void 0||t.draw({uniforms:{u_opacity:c||1,u_texture:this.texture},blend:this.getBlend(),stencil:this.getStencil(o)}),this.layer.hooks.afterRender.call()}}]),r}(op),XD={wind:WD},YD=XD;function KD(e){var i=qD();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function qD(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var QD=function(e){(0,Ce.Z)(r,e);var i=KD(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u0&&arguments[0]!==void 0?arguments[0]:{};return this.layerModel&&this.layerModel.render(t),this}},{key:"getDefaultConfig",value:function(){var t=this.getModelType(),o={wind:{}};return o[t]}},{key:"getModelType",value:function(){return"wind"}}]),r}(pv),HS,GS,WS,XS,Sb,YS,KS,JD=vi.cloneDeep,e8=(HS=(0,bo.b2)(),GS=(0,bo.f3)(vr.IMapService),WS=(0,bo.f3)(vr.IFontService),HS(XS=(Sb=function(){function e(){(0,Je.Z)(this,e),A(this,"mapService",YS,this),A(this,"fontService",KS,this)}return(0,vt.Z)(e,[{key:"apply",value:function(r,n){var t=this,o=n.styleAttributeService;r.hooks.init.tapPromise("DataMappingPlugin",(0,Qi.Z)(Qr().mark(function u(){return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:r.log(ud.MappingStart,Kl.INIT),t.generateMaping(r,{styleAttributeService:o}),r.log(ud.MappingEnd,Kl.INIT);case 3:case"end":return v.stop()}},u)}))),r.hooks.beforeRenderData.tapPromise("DataMappingPlugin",function(){var u=(0,Qi.Z)(Qr().mark(function c(v){var E;return Qr().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(v){ie.next=2;break}return ie.abrupt("return",v);case 2:return r.dataState.dataMappingNeedUpdate=!1,r.log(ud.MappingStart,Kl.UPDATE),E=t.generateMaping(r,{styleAttributeService:o}),r.log(ud.MappingEnd,Kl.UPDATE),ie.abrupt("return",E);case 7:case"end":return ie.stop()}},c)}));return function(c){return u.apply(this,arguments)}}()),r.hooks.beforeRender.tap("DataMappingPlugin",function(){var u=r.getSource();if(!(r.layerModelNeedUpdate||!u||!u.inited)){var c=o.getLayerStyleAttributes()||[],v=o.getLayerStyleAttribute("filter"),E=u.data.dataArray;if(!(Array.isArray(E)&&E.length===0)){var G=c.filter(function(Fe){return Fe.needRemapping}),ie=E;if(v!=null&&v.needRemapping&&v!==null&&v!==void 0&&v.scale&&(ie=E.filter(function(Fe){return t.applyAttributeMapping(v,Fe)[0]})),G.length){var xe=t.mapping(r,G,ie,r.getEncodedData());r.setEncodedData(xe)}}}})}},{key:"generateMaping",value:function(r,n){var t=this,o=n.styleAttributeService,u=o.getLayerStyleAttributes()||[],c=o.getLayerStyleAttribute("filter"),v=r.getSource().data.dataArray,E=v;c!=null&&c.scale&&(E=v.filter(function(ie){return t.applyAttributeMapping(c,ie)[0]})),E=r.processData(E);var G=this.mapping(r,u,E,void 0);return r.setEncodedData(G),r.emit("dataUpdate",null),!0}},{key:"mapping",value:function(r,n,t,o){var u=this,c=n.filter(function(E){return E.scale!==void 0}).filter(function(E){return E.name!=="filter"}),v=t.map(function(E,G){var ie=o?o[G]:{},xe=(0,Me.Z)({id:E._id,coordinates:E.coordinates},ie);return c.forEach(function(Fe){var it=u.applyAttributeMapping(Fe,E);(Fe.name==="color"||Fe.name==="stroke")&&(it=it.map(function(gt){return Fa(gt)})),xe[Fe.name]=Array.isArray(it)&&it.length===1?it[0]:it,Fe.name==="shape"&&(xe.shape=u.fontService.getIconFontKey(xe[Fe.name]))}),xe});return n.forEach(function(E){E.needRemapping=!1}),this.adjustData2Amap2Coordinates(v,r),this.adjustData2SimpleCoordinates(v),v}},{key:"adjustData2Amap2Coordinates",value:function(r,n){var t=this;if(r.length>0&&this.mapService.version==="GAODE2.x"){var o=n.coordCenter||n.getSource().center;r.filter(function(u){return!u.originCoordinates}).map(function(u){u.version="GAODE2.x",u.originCoordinates=JD(u.coordinates),u.coordinates=t.mapService.coordToAMap2RelativeCoordinates(u.coordinates,o)})}}},{key:"adjustData2SimpleCoordinates",value:function(r){var n=this;r.length>0&&this.mapService.version==="SIMPLE"&&r.map(function(t){t.simpleCoordinate||(t.coordinates=n.unProjectCoordinates(t.coordinates),t.simpleCoordinate=!0)})}},{key:"unProjectCoordinates",value:function(r){var n=this;if(typeof r[0]=="number")return this.mapService.simpleMapCoord.unproject(r);if(r[0]&&r[0][0]instanceof Array){var t=[];return r.map(function(u){var c=[];u.map(function(v){c.push(n.mapService.simpleMapCoord.unproject(v))}),t.push(c)}),t}else{var o=[];return r.map(function(u){o.push(n.mapService.simpleMapCoord.unproject(u))}),o}}},{key:"applyAttributeMapping",value:function(r,n){var t;if(!r.scale)return[];var o=(r==null||(t=r.scale)===null||t===void 0?void 0:t.scalers)||[],u=[];o.forEach(function(v){var E,G=v.field;(n.hasOwnProperty(G)||((E=r.scale)===null||E===void 0?void 0:E.type)==="variable")&&u.push(n[G])});var c=r.mapping?r.mapping(u):[];return c}},{key:"getArrowPoints",value:function(r,n){var t=[n[0]-r[0],n[1]-r[1]],o=xs(t),u=[r[0]+o[0]*1e-4,r[1]+o[1]*1e-4];return u}}]),e}(),YS=p(Sb.prototype,"mapService",[GS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),KS=p(Sb.prototype,"fontService",[WS],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Sb))||XS),qS,QS,t8=(qS=(0,bo.b2)(),qS(QS=function(){function e(){(0,Je.Z)(this,e)}return(0,vt.Z)(e,[{key:"apply",value:function(r){var n=this;this.mapService=r.getContainer().get(vr.IMapService),r.hooks.init.tapPromise("DataSourcePlugin",(0,Qi.Z)(Qr().mark(function t(){var o,u,c,v;return Qr().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(r.log(ud.SourceInitStart,Kl.INIT),o=r.getSource(),o||(u=r.sourceOption||r.defaultSourceConfig,c=u.data,v=u.options,o=new Mx(c,v),r.setSource(o)),!o.inited){G.next=8;break}n.updateClusterData(r),r.log(ud.SourceInitEnd,Kl.INIT),G.next=10;break;case 8:return G.next=10,new Promise(function(ie){o.on("update",function(xe){xe.type==="inited"&&(n.updateClusterData(r),r.log(ud.SourceInitEnd,Kl.INIT)),ie(null)})});case 10:case"end":return G.stop()}},t)}))),r.hooks.beforeRenderData.tapPromise("DataSourcePlugin",(0,Qi.Z)(Qr().mark(function t(){var o,u,c;return Qr().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return o=n.updateClusterData(r),u=r.dataState.dataSourceNeedUpdate,r.dataState.dataSourceNeedUpdate=!1,c=o||u,E.abrupt("return",c);case 5:case"end":return E.stop()}},t)})))}},{key:"updateClusterData",value:function(r){if(r.isTileLayer||r.tileLayer||!r.getSource())return!1;var n=r.getSource(),t=n.cluster,o=n.clusterOptions.zoom,u=o===void 0?0:o,c=this.mapService.getZoom()-1,v=r.dataState.dataSourceNeedUpdate;return t&&v&&n.updateClusterData(Math.floor(c)),t&&Math.abs(r.clusterZoom-c)>=1?(u!==Math.floor(c)&&n.updateClusterData(Math.floor(c)),r.clusterZoom=c,!0):!1}}]),e}())||QS),Gm=_(57965);function JS(e,i,r,n,t){var o=e*e,u=o*e;return((1-3*e+3*o-u)*i+(4-6*o+3*u)*r+(1+3*e+3*o-3*u)*n+u*t)/6}function r8(e){var i=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,i-1):Math.floor(r*i),t=e[n],o=e[n+1],u=n>0?e[n-1]:2*t-o,c=n180||r<-180?r-360*Math.round(r/360):r):constant(isNaN(e)?i:e)}function a8(e){return(e=+e)==1?tC:function(i,r){return r-i?i8(i,r,e):Qx(isNaN(i)?r:i)}}function tC(e,i){var r=i-e;return r?eC(e,r):Qx(isNaN(e)?i:e)}var rC=function e(i){var r=a8(i);function n(t,o){var u=r((t=jr(t)).r,(o=jr(o)).r),c=r(t.g,o.g),v=r(t.b,o.b),E=tC(t.opacity,o.opacity);return function(G){return t.r=u(G),t.g=c(G),t.b=v(G),t.opacity=E(G),t+""}}return n.gamma=e,n}(1);function nC(e){return function(i){var r=i.length,n=new Array(r),t=new Array(r),o=new Array(r),u,c;for(u=0;u=e.length)return r!=null&&c.sort(r),n!=null?n(c):c;for(var ie=-1,xe=c.length,Fe=e[v++],it,gt,Dt=map(),ar,Mr=E();++iee.length)return c;var E,G=i[v-1];return n!=null&&v>=e.length?E=c.entries():(E=[],c.each(function(ie,xe){E.push({key:xe,values:u(ie,v)})})),G!=null?E.sort(function(ie,xe){return G(ie.key,xe.key)}):E}return t={object:function(c){return o(c,0,s8,u8)},map:function(c){return o(c,0,aC,oC)},entries:function(c){return u(o(c,0,aC,oC),0)},key:function(c){return e.push(c),t},sortKeys:function(c){return i[e.length-1]=c,t},sortValues:function(c){return r=c,t},rollup:function(c){return n=c,t}}}function s8(){return{}}function u8(e,i,r){e[i]=r}function aC(){return map()}function oC(e,i,r){e.set(i,r)}function Tb(){}var Qy=Jx.prototype;Tb.prototype=l8.prototype={constructor:Tb,has:Qy.has,add:function(e){return e+="",this[Dv+e]=e,this},remove:Qy.remove,clear:Qy.clear,values:Qy.keys,size:Qy.size,empty:Qy.empty,each:Qy.each};function l8(e,i){var r=new Tb;if(e instanceof Tb)e.each(function(o){r.add(o)});else if(e){var n=-1,t=e.length;if(i==null)for(;++nr&&(o=i.slice(r,o),c[u]?c[u]+=o:c[++u]=o),(n=n[0])===(t=t[0])?c[u]?c[u]+=t:c[++u]=t:(c[++u]=null,v.push({i:u,x:Pb(n,t)})),r=tw.lastIndex;return rr&&(n=i,i=r,r=n),function(t){return Math.max(i,Math.min(r,t))}}function A8(e,i,r){var n=e[0],t=e[1],o=i[0],u=i[1];return t2?b8:A8,v=E=null,ie}function ie(xe){return isNaN(xe=+xe)?o:(v||(v=c(e.map(n),i,r)))(n(u(xe)))}return ie.invert=function(xe){return u(t((E||(E=c(i,e.map(n),Pb)))(xe)))},ie.domain=function(xe){return arguments.length?(e=uC.call(xe,_8),u===ev||(u=mC(e)),G()):e.slice()},ie.range=function(xe){return arguments.length?(i=Jy.call(xe),G()):i.slice()},ie.rangeRound=function(xe){return i=Jy.call(xe),r=g8,G()},ie.clamp=function(xe){return arguments.length?(u=xe?mC(e):ev,ie):u!==ev},ie.interpolate=function(xe){return arguments.length?(r=xe,G()):r},ie.unknown=function(xe){return arguments.length?(o=xe,ie):o},function(xe,Fe){return n=xe,t=Fe,G()}}function vC(e,i){return iw()(e,i)}var x8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rb(e){if(!(i=x8.exec(e)))throw new Error("invalid format: "+e);var i;return new aw({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10]})}Rb.prototype=aw.prototype;function aw(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}aw.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function w8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ob(e,i){if((r=(e=i?e.toExponential(i-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function N1(e){return e=Ob(Math.abs(e)),e?e[1]:NaN}function E8(e,i){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(N1(i)/3)))*3-N1(Math.abs(e)))}function S8(e,i){return function(r,n){for(var t=r.length,o=[],u=0,c=e[0],v=0;t>0&&c>0&&(v+c+1>n&&(c=Math.max(1,n-v)),o.push(r.substring(t-=c,t+c)),!((v+=c+1)>n));)c=e[u=(u+1)%e.length];return o.reverse().join(i)}}function C8(e){return function(i){return i.replace(/[0-9]/g,function(r){return e[+r]})}}function T8(e){e:for(var i=e.length,r=1,n=-1,t;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(t+1):e}var gC;function M8(e,i){var r=Ob(e,i);if(!r)return e+"";var n=r[0],t=r[1],o=t-(gC=Math.max(-8,Math.min(8,Math.floor(t/3)))*3)+1,u=n.length;return o===u?n:o>u?n+new Array(o-u+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Ob(e,Math.max(0,i+o-1))[0]}function yC(e,i){var r=Ob(e,i);if(!r)return e+"";var n=r[0],t=r[1];return t<0?"0."+new Array(-t).join("0")+n:n.length>t+1?n.slice(0,t+1)+"."+n.slice(t+1):n+new Array(t-n.length+2).join("0")}var _C={"%":function(e,i){return(e*100).toFixed(i)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:w8,e:function(e,i){return e.toExponential(i)},f:function(e,i){return e.toFixed(i)},g:function(e,i){return e.toPrecision(i)},o:function(e){return Math.round(e).toString(8)},p:function(e,i){return yC(e*100,i)},r:yC,s:M8,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function AC(e){return e}var bC=Array.prototype.map,xC=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function P8(e){var i=e.grouping===void 0||e.thousands===void 0?AC:S8(bC.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",t=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?AC:C8(bC.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"-":e.minus+"",v=e.nan===void 0?"NaN":e.nan+"";function E(ie){ie=Rb(ie);var xe=ie.fill,Fe=ie.align,it=ie.sign,gt=ie.symbol,Dt=ie.zero,ar=ie.width,Mr=ie.comma,Zr=ie.precision,mn=ie.trim,zn=ie.type;zn==="n"?(Mr=!0,zn="g"):_C[zn]||(Zr===void 0&&(Zr=12),mn=!0,zn="g"),(Dt||xe==="0"&&Fe==="=")&&(Dt=!0,xe="0",Fe="=");var Rn=gt==="$"?r:gt==="#"&&/[boxX]/.test(zn)?"0"+zn.toLowerCase():"",kn=gt==="$"?n:/[%p]/.test(zn)?u:"",ui=_C[zn],Di=/[defgprs%]/.test(zn);Zr=Zr===void 0?6:/[gprs]/.test(zn)?Math.max(1,Math.min(21,Zr)):Math.max(0,Math.min(20,Zr));function Aa(Pa){var Lo=Rn,ns=kn,ws,Pf,ih;if(zn==="c")ns=ui(Pa)+ns,Pa="";else{Pa=+Pa;var ld=Pa<0||1/Pa<0;if(Pa=isNaN(Pa)?v:ui(Math.abs(Pa),Zr),mn&&(Pa=T8(Pa)),ld&&+Pa==0&&it!=="+"&&(ld=!1),Lo=(ld?it==="("?it:c:it==="-"||it==="("?"":it)+Lo,ns=(zn==="s"?xC[8+gC/3]:"")+ns+(ld&&it==="("?")":""),Di){for(ws=-1,Pf=Pa.length;++wsih||ih>57){ns=(ih===46?t+Pa.slice(ws+1):Pa.slice(ws))+ns,Pa=Pa.slice(0,ws);break}}}Mr&&!Dt&&(Pa=i(Pa,1/0));var Vp=Lo.length+Pa.length+ns.length,Cd=Vp>1)+Lo+Pa+ns+Cd.slice(Vp);break;default:Pa=Cd+Lo+Pa+ns;break}return o(Pa)}return Aa.toString=function(){return ie+""},Aa}function G(ie,xe){var Fe=E((ie=Rb(ie),ie.type="f",ie)),it=Math.max(-8,Math.min(8,Math.floor(N1(xe)/3)))*3,gt=Math.pow(10,-it),Dt=xC[8+it/3];return function(ar){return Fe(gt*ar)+Dt}}return{format:E,formatPrefix:G}}var Lb,ow,wC;I8({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function I8(e){return Lb=P8(e),ow=Lb.format,wC=Lb.formatPrefix,Lb}function R8(e,i){return e=Math.abs(e),i=Math.abs(i)-e,Math.max(0,N1(i)-N1(e))+1}function O8(e){return Math.max(0,-N1(Math.abs(e)))}function L8(e,i,r,n){var t=(0,Gm.ly)(e,i,r),o;switch(n=Rb(n==null?",f":n),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(i));return n.precision==null&&!isNaN(o=E8(t,u))&&(n.precision=o),wC(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=R8(t,Math.max(Math.abs(e),Math.abs(i))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=O8(t))&&(n.precision=o-(n.type==="%")*2);break}}return ow(n)}function k_(e){var i=e.domain;return e.ticks=function(r){var n=i();return(0,Gm.sd)(n[0],n[n.length-1],r==null?10:r)},e.tickFormat=function(r,n){var t=i();return L8(t[0],t[t.length-1],r==null?10:r,n)},e.nice=function(r){r==null&&(r=10);var n=i(),t=0,o=n.length-1,u=n[t],c=n[o],v;return c0?(u=Math.floor(u/v)*v,c=Math.ceil(c/v)*v,v=(0,Gm.G9)(u,c,r)):v<0&&(u=Math.ceil(u*v)/v,c=Math.floor(c*v)/v,v=(0,Gm.G9)(u,c,r)),v>0?(n[t]=Math.floor(u/v)*v,n[o]=Math.ceil(c/v)*v,i(n)):v<0&&(n[t]=Math.ceil(u*v)/v,n[o]=Math.floor(c*v)/v,i(n)),e},e}function EC(){var e=vC(ev,ev);return e.copy=function(){return Ib(e,EC())},yy.apply(e,arguments),k_(e)}function D8(e){var i;function r(n){return isNaN(n=+n)?i:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=map.call(n,number),r):e.slice()},r.unknown=function(n){return arguments.length?(i=n,r):i},r.copy=function(){return D8(e).unknown(i)},e=arguments.length?map.call(e,number):[0,1],linearish(r)}function SC(e,i){e=e.slice();var r=0,n=e.length-1,t=e[r],o=e[n],u;return o0){for(;xeG)break;Mr.push(Dt)}}else for(;xe=1;--gt)if(Dt=it*gt,!(DtG)break;Mr.push(Dt)}}else Mr=(0,Gm.sd)(xe,Fe,Math.min(Fe-xe,ar)).map(o);return ie?Mr.reverse():Mr},i.tickFormat=function(c,v){if(v==null&&(v=n===10?".0e":","),typeof v!="function"&&(v=ow(v)),c===1/0)return v;c==null&&(c=10);var E=Math.max(1,n*c/i.ticks().length);return function(G){var ie=G/o(Math.round(t(G)));return ie*n0?r[c-1]:e[0],c=r?[n[r-1],i]:[n[E-1],n[E]]},u.unknown=function(v){return arguments.length&&(o=v),u},u.thresholds=function(){return n.slice()},u.copy=function(){return DC().domain([e,i]).range(t).unknown(o)},yy.apply(k_(u),arguments)}function kC(){var e=[.5],i=[0,1],r,n=1;function t(o){return o<=o?i[(0,Gm.b4)(e,o,0,n)]:r}return t.domain=function(o){return arguments.length?(e=Jy.call(o),n=Math.min(e.length,i.length-1),t):e.slice()},t.range=function(o){return arguments.length?(i=Jy.call(o),n=Math.min(e.length,i.length-1),t):i.slice()},t.invertExtent=function(o){var u=i.indexOf(o);return[e[u-1],e[u]]},t.unknown=function(o){return arguments.length?(r=o,t):r},t.copy=function(){return kC().domain(e).range(i).unknown(r)},yy.apply(t,arguments)}var uw=new Date,lw=new Date;function ov(e,i,r,n){function t(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return t.floor=function(o){return e(o=new Date(+o)),o},t.ceil=function(o){return e(o=new Date(o-1)),i(o,1),e(o),o},t.round=function(o){var u=t(o),c=t.ceil(o);return o-u0))return v;do v.push(E=new Date(+o)),i(o,c),e(o);while(E=u)for(;e(u),!o(u);)u.setTime(u-1)},function(u,c){if(u>=u)if(c<0)for(;++c<=0;)for(;i(u,-1),!o(u););else for(;--c>=0;)for(;i(u,1),!o(u););})},r&&(t.count=function(o,u){return uw.setTime(+o),lw.setTime(+u),e(uw),e(lw),Math.floor(r(uw,lw))},t.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?t.filter(n?function(u){return n(u)%o===0}:function(u){return t.count(0,u)%o===0}):t}),t}var cw=ov(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,i){e.setFullYear(e.getFullYear()+i)},function(e,i){return i.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});cw.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:ov(function(i){i.setFullYear(Math.floor(i.getFullYear()/e)*e),i.setMonth(0,1),i.setHours(0,0,0,0)},function(i,r){i.setFullYear(i.getFullYear()+r*e)})};var z1=cw,MV=cw.range,FC=ov(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,i){e.setMonth(e.getMonth()+i)},function(e,i){return i.getMonth()-e.getMonth()+(i.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),G8=FC,PV=FC.range,Db=1e3,F_=6e4,BC=36e5,NC=864e5,zC=6048e5;function e1(e){return ov(function(i){i.setDate(i.getDate()-(i.getDay()+7-e)%7),i.setHours(0,0,0,0)},function(i,r){i.setDate(i.getDate()+r*7)},function(i,r){return(r-i-(r.getTimezoneOffset()-i.getTimezoneOffset())*F_)/zC})}var fw=e1(0),kb=e1(1),W8=e1(2),X8=e1(3),Z1=e1(4),Y8=e1(5),K8=e1(6),IV=fw.range,RV=kb.range,OV=W8.range,LV=X8.range,DV=Z1.range,kV=Y8.range,FV=K8.range,ZC=ov(function(e){e.setHours(0,0,0,0)},function(e,i){e.setDate(e.getDate()+i)},function(e,i){return(i-e-(i.getTimezoneOffset()-e.getTimezoneOffset())*F_)/NC},function(e){return e.getDate()-1}),hw=ZC,BV=ZC.range,UC=ov(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Db-e.getMinutes()*F_)},function(e,i){e.setTime(+e+i*BC)},function(e,i){return(i-e)/BC},function(e){return e.getHours()}),q8=UC,NV=UC.range,jC=ov(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Db)},function(e,i){e.setTime(+e+i*F_)},function(e,i){return(i-e)/F_},function(e){return e.getMinutes()}),Q8=jC,zV=jC.range,VC=ov(function(e){e.setTime(e-e.getMilliseconds())},function(e,i){e.setTime(+e+i*Db)},function(e,i){return(i-e)/Db},function(e){return e.getUTCSeconds()}),J8=VC,ZV=VC.range,Fb=ov(function(){},function(e,i){e.setTime(+e+i)},function(e,i){return i-e});Fb.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ov(function(i){i.setTime(Math.floor(i/e)*e)},function(i,r){i.setTime(+i+r*e)},function(i,r){return(r-i)/e}):Fb};var ek=Fb,UV=Fb.range;function t1(e){return ov(function(i){i.setUTCDate(i.getUTCDate()-(i.getUTCDay()+7-e)%7),i.setUTCHours(0,0,0,0)},function(i,r){i.setUTCDate(i.getUTCDate()+r*7)},function(i,r){return(r-i)/zC})}var $C=t1(0),Bb=t1(1),tk=t1(2),rk=t1(3),U1=t1(4),nk=t1(5),ik=t1(6),jV=$C.range,VV=Bb.range,$V=tk.range,HV=rk.range,GV=U1.range,WV=nk.range,XV=ik.range,HC=ov(function(e){e.setUTCHours(0,0,0,0)},function(e,i){e.setUTCDate(e.getUTCDate()+i)},function(e,i){return(i-e)/NC},function(e){return e.getUTCDate()-1}),GC=HC,YV=HC.range,dw=ov(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,i){e.setUTCFullYear(e.getUTCFullYear()+i)},function(e,i){return i.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});dw.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:ov(function(i){i.setUTCFullYear(Math.floor(i.getUTCFullYear()/e)*e),i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},function(i,r){i.setUTCFullYear(i.getUTCFullYear()+r*e)})};var B_=dw,KV=dw.range;function pw(e){if(0<=e.y&&e.y<100){var i=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return i.setFullYear(e.y),i}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function mw(e){if(0<=e.y&&e.y<100){var i=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return i.setUTCFullYear(e.y),i}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function N_(e,i,r){return{y:e,m:i,d:r,H:0,M:0,S:0,L:0}}function ak(e){var i=e.dateTime,r=e.date,n=e.time,t=e.periods,o=e.days,u=e.shortDays,c=e.months,v=e.shortMonths,E=z_(t),G=Z_(t),ie=z_(o),xe=Z_(o),Fe=z_(u),it=Z_(u),gt=z_(c),Dt=Z_(c),ar=z_(v),Mr=Z_(v),Zr={a:ld,A:Vp,b:Cd,B:Pm,c:null,d:QC,e:QC,f:Mk,g:Nk,G:Zk,H:Sk,I:Ck,j:Tk,L:JC,m:Pk,M:Ik,p:My,q:Gg,Q:a3,s:o3,S:Rk,u:Ok,U:Lk,V:Dk,w:kk,W:Fk,x:null,X:null,y:Bk,Y:zk,Z:Uk,"%":i3},mn={a:p_,A:m_,b:J0,B:_v,c:null,d:t3,e:t3,f:Hk,g:t7,G:n7,H:jk,I:Vk,j:$k,L:r3,m:Gk,M:Wk,p:B2,q:N2,Q:a3,s:o3,S:Xk,u:Yk,U:Kk,V:qk,w:Qk,W:Jk,x:null,X:null,y:e7,Y:r7,Z:i7,"%":i3},zn={a:Aa,A:Pa,b:Lo,B:ns,c:ws,d:KC,e:KC,f:bk,g:YC,G:XC,H:qC,I:qC,j:gk,L:Ak,m:vk,M:yk,p:Di,q:mk,Q:wk,s:Ek,S:_k,u:ck,U:fk,V:hk,w:lk,W:dk,x:Pf,X:ih,y:YC,Y:XC,Z:pk,"%":xk};Zr.x=Rn(r,Zr),Zr.X=Rn(n,Zr),Zr.c=Rn(i,Zr),mn.x=Rn(r,mn),mn.X=Rn(n,mn),mn.c=Rn(i,mn);function Rn(gh,Np){return function(h0){var Tc=[],Av=-1,em=0,Mv=gh.length,Pv,h1,L5;for(h0 instanceof Date||(h0=new Date(+h0));++Av53)return null;"w"in Tc||(Tc.w=1),"Z"in Tc?(em=mw(N_(Tc.y,0,1)),Mv=em.getUTCDay(),em=Mv>4||Mv===0?Bb.ceil(em):Bb(em),em=GC.offset(em,(Tc.V-1)*7),Tc.y=em.getUTCFullYear(),Tc.m=em.getUTCMonth(),Tc.d=em.getUTCDate()+(Tc.w+6)%7):(em=pw(N_(Tc.y,0,1)),Mv=em.getDay(),em=Mv>4||Mv===0?kb.ceil(em):kb(em),em=hw.offset(em,(Tc.V-1)*7),Tc.y=em.getFullYear(),Tc.m=em.getMonth(),Tc.d=em.getDate()+(Tc.w+6)%7)}else("W"in Tc||"U"in Tc)&&("w"in Tc||(Tc.w="u"in Tc?Tc.u%7:"W"in Tc?1:0),Mv="Z"in Tc?mw(N_(Tc.y,0,1)).getUTCDay():pw(N_(Tc.y,0,1)).getDay(),Tc.m=0,Tc.d="W"in Tc?(Tc.w+6)%7+Tc.W*7-(Mv+5)%7:Tc.w+Tc.U*7-(Mv+6)%7);return"Z"in Tc?(Tc.H+=Tc.Z/100|0,Tc.M+=Tc.Z%100,mw(Tc)):pw(Tc)}}function ui(gh,Np,h0,Tc){for(var Av=0,em=Np.length,Mv=h0.length,Pv,h1;Av=Mv)return-1;if(Pv=Np.charCodeAt(Av++),Pv===37){if(Pv=Np.charAt(Av++),h1=zn[Pv in WC?Np.charAt(Av++):Pv],!h1||(Tc=h1(gh,h0,Tc))<0)return-1}else if(Pv!=h0.charCodeAt(Tc++))return-1}return Tc}function Di(gh,Np,h0){var Tc=E.exec(Np.slice(h0));return Tc?(gh.p=G[Tc[0].toLowerCase()],h0+Tc[0].length):-1}function Aa(gh,Np,h0){var Tc=Fe.exec(Np.slice(h0));return Tc?(gh.w=it[Tc[0].toLowerCase()],h0+Tc[0].length):-1}function Pa(gh,Np,h0){var Tc=ie.exec(Np.slice(h0));return Tc?(gh.w=xe[Tc[0].toLowerCase()],h0+Tc[0].length):-1}function Lo(gh,Np,h0){var Tc=ar.exec(Np.slice(h0));return Tc?(gh.m=Mr[Tc[0].toLowerCase()],h0+Tc[0].length):-1}function ns(gh,Np,h0){var Tc=gt.exec(Np.slice(h0));return Tc?(gh.m=Dt[Tc[0].toLowerCase()],h0+Tc[0].length):-1}function ws(gh,Np,h0){return ui(gh,i,Np,h0)}function Pf(gh,Np,h0){return ui(gh,r,Np,h0)}function ih(gh,Np,h0){return ui(gh,n,Np,h0)}function ld(gh){return u[gh.getDay()]}function Vp(gh){return o[gh.getDay()]}function Cd(gh){return v[gh.getMonth()]}function Pm(gh){return c[gh.getMonth()]}function My(gh){return t[+(gh.getHours()>=12)]}function Gg(gh){return 1+~~(gh.getMonth()/3)}function p_(gh){return u[gh.getUTCDay()]}function m_(gh){return o[gh.getUTCDay()]}function J0(gh){return v[gh.getUTCMonth()]}function _v(gh){return c[gh.getUTCMonth()]}function B2(gh){return t[+(gh.getUTCHours()>=12)]}function N2(gh){return 1+~~(gh.getUTCMonth()/3)}return{format:function(gh){var Np=Rn(gh+="",Zr);return Np.toString=function(){return gh},Np},parse:function(gh){var Np=kn(gh+="",!1);return Np.toString=function(){return gh},Np},utcFormat:function(gh){var Np=Rn(gh+="",mn);return Np.toString=function(){return gh},Np},utcParse:function(gh){var Np=kn(gh+="",!0);return Np.toString=function(){return gh},Np}}}var WC={"-":"",_:" ",0:"0"},$m=/^\s*\d+/,ok=/^%/,sk=/[\\^$*+?|[\]().{}]/g;function c0(e,i,r){var n=e<0?"-":"",t=(n?-e:e)+"",o=t.length;return n+(o68?1900:2e3),r+n[0].length):-1}function pk(e,i,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(i.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function mk(e,i,r){var n=$m.exec(i.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function vk(e,i,r){var n=$m.exec(i.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function KC(e,i,r){var n=$m.exec(i.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function gk(e,i,r){var n=$m.exec(i.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function qC(e,i,r){var n=$m.exec(i.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function yk(e,i,r){var n=$m.exec(i.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function _k(e,i,r){var n=$m.exec(i.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Ak(e,i,r){var n=$m.exec(i.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function bk(e,i,r){var n=$m.exec(i.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function xk(e,i,r){var n=ok.exec(i.slice(r,r+1));return n?r+n[0].length:-1}function wk(e,i,r){var n=$m.exec(i.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Ek(e,i,r){var n=$m.exec(i.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function QC(e,i){return c0(e.getDate(),i,2)}function Sk(e,i){return c0(e.getHours(),i,2)}function Ck(e,i){return c0(e.getHours()%12||12,i,2)}function Tk(e,i){return c0(1+hw.count(z1(e),e),i,3)}function JC(e,i){return c0(e.getMilliseconds(),i,3)}function Mk(e,i){return JC(e,i)+"000"}function Pk(e,i){return c0(e.getMonth()+1,i,2)}function Ik(e,i){return c0(e.getMinutes(),i,2)}function Rk(e,i){return c0(e.getSeconds(),i,2)}function Ok(e){var i=e.getDay();return i===0?7:i}function Lk(e,i){return c0(fw.count(z1(e)-1,e),i,2)}function e3(e){var i=e.getDay();return i>=4||i===0?Z1(e):Z1.ceil(e)}function Dk(e,i){return e=e3(e),c0(Z1.count(z1(e),e)+(z1(e).getDay()===4),i,2)}function kk(e){return e.getDay()}function Fk(e,i){return c0(kb.count(z1(e)-1,e),i,2)}function Bk(e,i){return c0(e.getFullYear()%100,i,2)}function Nk(e,i){return e=e3(e),c0(e.getFullYear()%100,i,2)}function zk(e,i){return c0(e.getFullYear()%1e4,i,4)}function Zk(e,i){var r=e.getDay();return e=r>=4||r===0?Z1(e):Z1.ceil(e),c0(e.getFullYear()%1e4,i,4)}function Uk(e){var i=e.getTimezoneOffset();return(i>0?"-":(i*=-1,"+"))+c0(i/60|0,"0",2)+c0(i%60,"0",2)}function t3(e,i){return c0(e.getUTCDate(),i,2)}function jk(e,i){return c0(e.getUTCHours(),i,2)}function Vk(e,i){return c0(e.getUTCHours()%12||12,i,2)}function $k(e,i){return c0(1+GC.count(B_(e),e),i,3)}function r3(e,i){return c0(e.getUTCMilliseconds(),i,3)}function Hk(e,i){return r3(e,i)+"000"}function Gk(e,i){return c0(e.getUTCMonth()+1,i,2)}function Wk(e,i){return c0(e.getUTCMinutes(),i,2)}function Xk(e,i){return c0(e.getUTCSeconds(),i,2)}function Yk(e){var i=e.getUTCDay();return i===0?7:i}function Kk(e,i){return c0($C.count(B_(e)-1,e),i,2)}function n3(e){var i=e.getUTCDay();return i>=4||i===0?U1(e):U1.ceil(e)}function qk(e,i){return e=n3(e),c0(U1.count(B_(e),e)+(B_(e).getUTCDay()===4),i,2)}function Qk(e){return e.getUTCDay()}function Jk(e,i){return c0(Bb.count(B_(e)-1,e),i,2)}function e7(e,i){return c0(e.getUTCFullYear()%100,i,2)}function t7(e,i){return e=n3(e),c0(e.getUTCFullYear()%100,i,2)}function r7(e,i){return c0(e.getUTCFullYear()%1e4,i,4)}function n7(e,i){var r=e.getUTCDay();return e=r>=4||r===0?U1(e):U1.ceil(e),c0(e.getUTCFullYear()%1e4,i,4)}function i7(){return"+0000"}function i3(){return"%"}function a3(e){return+e}function o3(e){return Math.floor(+e/1e3)}var j1,s3,a7,o7,s7;u7({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function u7(e){return j1=ak(e),s3=j1.format,a7=j1.parse,o7=j1.utcFormat,s7=j1.utcParse,j1}var U_=1e3,j_=U_*60,V_=j_*60,$_=V_*24,l7=$_*7,u3=$_*30,vw=$_*365;function c7(e){return new Date(e)}function f7(e){return e instanceof Date?+e:+new Date(+e)}function l3(e,i,r,n,t,o,u,c,v){var E=vC(ev,ev),G=E.invert,ie=E.domain,xe=v(".%L"),Fe=v(":%S"),it=v("%I:%M"),gt=v("%I %p"),Dt=v("%a %d"),ar=v("%b %d"),Mr=v("%B"),Zr=v("%Y"),mn=[[u,1,U_],[u,5,5*U_],[u,15,15*U_],[u,30,30*U_],[o,1,j_],[o,5,5*j_],[o,15,15*j_],[o,30,30*j_],[t,1,V_],[t,3,3*V_],[t,6,6*V_],[t,12,12*V_],[n,1,$_],[n,2,2*$_],[r,1,l7],[i,1,u3],[i,3,3*u3],[e,1,vw]];function zn(kn){return(u(kn)2){var ie=E.scale.ticks(u.values.length);E.scale.domain(ie)}u.values?E.scale.range(u.values):E.scale.range(E.option.domain);break;case Mf.QUANTILE:case Mf.QUANTIZE:case Mf.THRESHOLD:E.scale.range(u.values);break;case Mf.IDENTITY:break;case Mf.CAT:u.values?E.scale.range(u.values):E.scale.range(E.option.domain);break;case Mf.DIVERGING:case Mf.SEQUENTIAL:E.scale.interpolator(o8(u.values));break}}if(u.values==="text"){var xe;E.scale.range((xe=E.option)===null||xe===void 0?void 0:xe.domain)}})):(u.type=q0.CONSTANT,u.defaultValues=v.map(function(E,G){return E.scale(u.names[G])})),u.scalers=v.map(function(E){return{field:E.field,func:E.scale,option:E.option}}),o.needRescale=!1}})}},{key:"parseFields",value:function(r){return Array.isArray(r)?r:y7(r)?r.split("*"):[r]}},{key:"createScale",value:function(r,n,t,o){var u,c,v=this.scaleOptions[n]&&((u=this.scaleOptions[n])===null||u===void 0?void 0:u.field)===r?this.scaleOptions[n]:this.scaleOptions[r],E={field:r,scale:void 0,type:q0.VARIABLE,option:v};if(!o||!o.length)return v&&v.type?E.scale=this.createDefaultScale(v):(E.scale=Mb([r]),E.type=q0.CONSTANT),E;var G=(c=o.find(function(Fe){return!gw(Fe[r])}))===null||c===void 0?void 0:c[r];if(this.isNumber(r)||gw(G)&&!v)E.scale=Mb([r]),E.type=q0.CONSTANT;else{var ie=v&&v.type||this.getDefaultType(G);t==="text"&&(ie=Mf.CAT),t===void 0&&(ie=Mf.IDENTITY);var xe=this.createScaleConfig(ie,r,v,o);E.scale=this.createDefaultScale(xe),E.option=xe}return E}},{key:"getDefaultType",value:function(r){var n=Mf.LINEAR;return typeof r=="string"&&(n=A7.test(r)?Mf.TIME:Mf.CAT),n}},{key:"createScaleConfig",value:function(r,n,t,o){var u={type:r},c=[];if(r===Mf.QUANTILE){var v=new Map;o==null||o.forEach(function(ie){v.set(ie._id,ie[n])}),c=Array.from(v.values())}else c=(o==null?void 0:o.map(function(ie){return ie[n]}))||[];if(t!=null&&t.domain)u.domain=t==null?void 0:t.domain;else if(r===Mf.CAT||r===Mf.IDENTITY)u.domain=_7(c);else if(r===Mf.QUANTILE)u.domain=c;else if(r===Mf.DIVERGING){var E=(0,Gm.We)(c),G=(t==null?void 0:t.neutral)!==void 0?t==null?void 0:t.neutral:(E[0]+E[1])/2;u.domain=[E[0],G,E[1]]}else u.domain=(0,Gm.We)(c);return(0,Me.Z)((0,Me.Z)({},u),t)}},{key:"createDefaultScale",value:function(r){var n=r.type,t=r.domain,o=r.unknown,u=r.clamp,c=r.nice,v=b7[n]();return t&&v.domain&&v.domain(t),o&&v.unknown(o),u!==void 0&&v.clamp&&v.clamp(u),c!==void 0&&v.nice&&v.nice(c),v}}]),e}())||v3),g3,y3,w7=(g3=(0,bo.b2)(),g3(y3=function(){function e(){(0,Je.Z)(this,e)}return(0,vt.Z)(e,[{key:"apply",value:function(r){r.hooks.beforeRender.tap("LayerAnimateStylePlugin",function(){var n=r.animateStatus;n&&r.models.forEach(function(t){t.addUniforms((0,Me.Z)({},r.layerModel.getAnimateUniforms()))})})}}]),e}())||y3),_3,A3,E7=(_3=(0,bo.b2)(),_3(A3=function(){function e(){(0,Je.Z)(this,e)}return(0,vt.Z)(e,[{key:"apply",value:function(r){r.hooks.afterInit.tap("LayerMaskPlugin",function(){var n=r.getLayerConfig(),t=n.maskLayers,o=n.enableMask;if(!r.tileLayer&&t&&t.length>0){var u;(u=r.masks).push.apply(u,(0,Mn.Z)(t)),r.updateLayerConfig({mask:o})}})}}]),e}())||A3),S7=function(){function e(i){var r=i.rendererService,n=i.layerService,t=i.parent;(0,Je.Z)(this,e),(0,St.Z)(this,"tileResource",new Map),(0,St.Z)(this,"layerTiles",[]),this.rendererService=r,this.layerService=n,this.parent=t}return(0,vt.Z)(e,[{key:"tiles",get:function(){return this.layerTiles}},{key:"hasTile",value:function(r){return this.layerTiles.some(function(n){return n.key===r})}},{key:"addTile",value:function(r){this.layerTiles.push(r)}},{key:"getTile",value:function(r){return this.layerTiles.find(function(n){return n.key===r})}},{key:"getVisibleTileBylngLat",value:function(r){return this.layerTiles.find(function(n){return n.isLoaded&&n.visible&&n.lnglatInBounds(r)})}},{key:"removeTile",value:function(r){var n=this.layerTiles.findIndex(function(o){return o.key===r}),t=this.layerTiles.splice(n,1);t[0]&&t[0].destroy()}},{key:"updateTileVisible",value:function(r){var n=this.getTile(r.key);if(r.isVisible)if(r.parent){var t=this.isChildrenLoaded(r.parent);n==null||n.updateVisible(t)}else n==null||n.updateVisible(!0);else if(r.parent){var o=this.isChildrenLoaded(r.parent);n==null||n.updateVisible(!o)}else n==null||n.updateVisible(!1)}},{key:"isParentLoaded",value:function(r){var n=r.parent;if(!n)return!0;var t=this.getTile(n==null?void 0:n.key);return!!(t!=null&&t.isLoaded)}},{key:"isChildrenLoaded",value:function(r){var n=this,t=r==null?void 0:r.children;return t.length===0?!0:t.every(function(o){var u=n.getTile(o==null?void 0:o.key);return u?(u==null?void 0:u.isLoaded)===!0:!0})}},{key:"render",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(){var t=this,o,u;return Qr().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return o=this.getRenderLayers(),u=o.map(function(){var E=(0,Qi.Z)(Qr().mark(function G(ie){return Qr().wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return Fe.next=2,t.layerService.renderTileLayer(ie);case 2:case"end":return Fe.stop()}},G)}));return function(G){return E.apply(this,arguments)}}()),v.next=4,Promise.all(u);case 4:case"end":return v.stop()}},n,this)}));function r(){return i.apply(this,arguments)}return r}()},{key:"getRenderLayers",value:function(){var r=this.layerTiles.filter(function(t){return t.visible&&t.isLoaded}),n=[];return r.map(function(t){return n.push.apply(n,(0,Mn.Z)(t.getLayers()))}),n}},{key:"getLayers",value:function(){var r=this.layerTiles.filter(function(t){return t.isLoaded}),n=[];return r.map(function(t){return n.push.apply(n,(0,Mn.Z)(t.getLayers()))}),n}},{key:"getTiles",value:function(){return this.layerTiles}},{key:"destroy",value:function(){this.layerTiles.forEach(function(r){return r.destroy()}),this.tileResource.clear()}}]),e}(),C7=_(35486),T7=function(){function e(){(0,Je.Z)(this,e)}return(0,vt.Z)(e,[{key:"getCombineFeature",value:function(r){var n=null,t=r[0];return r.map(function(o){var u=bs.yu(o.coordinates);n===null?n=u:n=(0,C7.Z)(n,u)}),t&&(n.properties=(0,Me.Z)({},t)),n}}]),e}(),G_="select",W_="active",M7=function(){function e(i){var r=i.layerService,n=i.tileLayerService,t=i.parent;(0,Je.Z)(this,e),(0,St.Z)(this,"tilePickID",new Map),this.layerService=r,this.tileLayerService=n,this.parent=t,this.tileSourceService=new T7}return(0,vt.Z)(e,[{key:"pickRender",value:function(r){var n=this.tileLayerService.getVisibleTileBylngLat(r.lngLat);if(n){var t=n.getMainLayer();t==null||t.layerPickService.pickRender(r)}}},{key:"pick",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t,o){var u,c,v,E;return Qr().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(u=this.parent.getContainer(),c=u.get(vr.IPickingService),t.type!=="RasterLayer"){ie.next=8;break}if(v=this.tileLayerService.getVisibleTileBylngLat(o.lngLat),!(v&&v.getMainLayer()!==void 0)){ie.next=7;break}return E=v.getMainLayer(),ie.abrupt("return",E.layerPickService.pickRasterLayer(E,o,this.parent));case 7:return ie.abrupt("return",!1);case 8:return this.pickRender(o),ie.abrupt("return",c.pickFromPickingFBO(t,o));case 10:case"end":return ie.stop()}},n,this)}));function r(n,t){return i.apply(this,arguments)}return r}()},{key:"selectFeature",value:function(r){var n=(0,wi.Z)(r,3),t=n[0],o=n[1],u=n[2],c=this.color2PickId(t,o,u);this.tilePickID.set(G_,c),this.updateHighLight(t,o,u,G_)}},{key:"highlightPickedFeature",value:function(r){var n=(0,wi.Z)(r,3),t=n[0],o=n[1],u=n[2],c=this.color2PickId(t,o,u);this.tilePickID.set(W_,c),this.updateHighLight(t,o,u,W_)}},{key:"updateHighLight",value:function(r,n,t,o){this.tileLayerService.tiles.map(function(u){var c=u.getMainLayer();switch(o){case G_:c==null||c.hooks.beforeSelect.call([r,n,t]);break;case W_:c==null||c.hooks.beforeHighlight.call([r,n,t]);break}})}},{key:"setPickState",value:function(){var r=this.tilePickID.get(G_),n=this.tilePickID.get(W_);if(r){var t=this.pickId2Color(r),o=(0,wi.Z)(t,3),u=o[0],c=o[1],v=o[2];this.updateHighLight(u,c,v,G_);return}if(n){var E=this.pickId2Color(n),G=(0,wi.Z)(E,3),ie=G[0],xe=G[1],Fe=G[2];this.updateHighLight(ie,xe,Fe,W_);return}}},{key:"color2PickId",value:function(r,n,t){return sa(new Uint8Array([r,n,t]))}},{key:"pickId2Color",value:function(r){return vo(r)}},{key:"getFeatureById",value:function(r){var n=this.tileLayerService.getTiles().filter(function(o){return o.visible}),t=[];return n.forEach(function(o){t.push.apply(t,(0,Mn.Z)(o.getFeatureById(r)))}),t}},{key:"pickRasterLayer",value:function(r,n,t){return!1}}]),e}();function P7(e){return e==="PolygonLayer"?bb:e==="LineLayer"?Wx:Ab}function I7(e){return["PolygonLayer","LineLayer"].indexOf(e)!==-1}function R7(e){var i=O7();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function O7(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var r1=function(e){(0,Ce.Z)(r,e);var i=R7(r);function r(n,t){var o;return(0,Je.Z)(this,r),o=i.call(this),(0,St.Z)((0,Gr.Z)(o),"visible",!0),(0,St.Z)((0,Gr.Z)(o),"layers",[]),(0,St.Z)((0,Gr.Z)(o),"isLoaded",!1),(0,St.Z)((0,Gr.Z)(o),"tileMaskLayers",[]),o.parent=t,o.sourceTile=n,o.x=n.x,o.y=n.y,o.z=n.z,o.key="".concat(o.x,"_").concat(o.y,"_").concat(o.z),o}return(0,vt.Z)(r,[{key:"getLayers",value:function(){return this.layers}},{key:"styleUpdate",value:function(){}},{key:"lnglatInBounds",value:function(t){var o=(0,wi.Z)(this.sourceTile.bounds,4),u=o[0],c=o[1],v=o[2],E=o[3],G=t.lng,ie=t.lat;return G>=u&&G<=v&&ie>=c&&ie<=E}},{key:"getLayerOptions",value:function(){var t,o=this.parent.getLayerConfig();return(0,Me.Z)((0,Me.Z)({},o),{},{textAllowOverlap:!0,autoFit:!1,maskLayers:this.getMaskLayer(),tileMask:I7(this.parent.type),mask:o.mask||((t=o.maskLayers)===null||t===void 0?void 0:t.length)!==0&&o.enableMask})}},{key:"getMaskLayer",value:function(){var t=this,o=this.parent.getLayerConfig(),u=o.maskLayers,c=[];return u==null||u.forEach(function(v){if(!v.tileLayer)return c.push(v),v;var E=v.tileLayer,G=E.getTile(t.sourceTile.key),ie=G==null?void 0:G.getLayers()[0];ie&&c.push(ie)}),c}},{key:"addTileMask",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v;return Qr().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return u=new bb({name:"mask",visible:!0,enablePicking:!1}).source({type:"FeatureCollection",features:[this.sourceTile.bboxPolygon]},{parser:{type:"geojson",featureId:"id"}}).shape("fill").color("#0f0").style({opacity:.5}),c=av(this.parent.sceneContainer),u.setContainer(c,this.parent.sceneContainer),G.next=5,u.init();case 5:return this.tileMask=u,v=this.getMainLayer(),v!==void 0&&(v.tileMask=u),G.abrupt("return",u);case 9:case"end":return G.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"addMask",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(u,c){var v;return Qr().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return v=av(this.parent.sceneContainer),c.setContainer(v,this.parent.sceneContainer),G.next=4,c.init();case 4:u.addMask(c),this.tileMaskLayers.push(c);case 6:case"end":return G.stop()}},o,this)}));function t(o,u){return n.apply(this,arguments)}return t}()},{key:"addLayer",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(u){var c;return Qr().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return u.isTileLayer=!0,c=av(this.parent.sceneContainer),u.setContainer(c,this.parent.sceneContainer),this.layers.push(u),E.next=6,u.init();case 6:case"end":return E.stop()}},o,this)}));function t(o){return n.apply(this,arguments)}return t}()},{key:"updateVisible",value:function(t){this.visible=t,this.updateOptions("visible",t)}},{key:"updateOptions",value:function(t,o){this.layers.forEach(function(u){u.updateLayerConfig((0,St.Z)({},t,o))})}},{key:"getMainLayer",value:function(){return this.layers[0]}},{key:"getFeatures",value:function(t){return[]}},{key:"getFeatureById",value:function(t){return[]}},{key:"destroy",value:function(){var t;(t=this.tileMask)===null||t===void 0||t.destroy(),this.layers.forEach(function(o){return o.destroy()})}}]),r}(cf.EventEmitter);function L7(e){var i=D7();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function D7(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var k7=function(e){(0,Ce.Z)(r,e);var i=L7(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"initTileLayer",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E;return Qr().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return u=this.getSourceOption(),c=u.data.features[0].properties,v=new Wx().source(u.data,u.options).size(1).shape("line").color("red"),E=new Ab({minZoom:this.z-1,maxZoom:this.z+1,textAllowOverlap:!0}).source([c],{parser:{type:"json",x:"x",y:"y"}}).size(20).color("red").shape(this.key).style({stroke:"#fff",strokeWidth:2}),ie.next=6,this.addLayer(v);case 6:return ie.next=8,this.addLayer(E);case 8:this.isLoaded=!0;case 9:case"end":return ie.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getSourceOption",value:function(){var t=this.parent.getSource(),o=this.sourceTile.data.layers.testTile.features;return{data:{type:"FeatureCollection",features:o},options:{parser:{type:"geojson"},transforms:t.transforms}}}}]),r}(r1);function F7(e){var i=B7();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function B7(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var N7=function(e){(0,Ce.Z)(r,e);var i=F7(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"initTileLayer",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E;return Qr().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return u=this.parent.getLayerAttributeConfig(),c=this.getLayerOptions(),v=this.getSourceOption(),E=new mS((0,Me.Z)({},c)).source(v.data,v.options),u&&Object.keys(u).forEach(function(xe){var Fe,it,gt=xe;E[gt]((Fe=u[gt])===null||Fe===void 0?void 0:Fe.field,(it=u[gt])===null||it===void 0?void 0:it.values)}),ie.next=7,this.addLayer(E);case 7:this.isLoaded=!0;case 8:case"end":return ie.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getSourceOption",value:function(){var t=this.parent.getSource();return{data:this.sourceTile.data,options:{parser:{type:"image",extent:this.sourceTile.bounds},transforms:t.transforms}}}}]),r}(r1);function z7(e){var i=Z7();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Z7(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var U7=function(e){(0,Ce.Z)(r,e);var i=z7(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"initTileLayer",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E;return Qr().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return u=this.parent.getLayerAttributeConfig(),c=this.getLayerOptions(),v=this.getSourceOption(),E=new Yx((0,Me.Z)({},c)).source(v.data,v.options),u&&Object.keys(u).forEach(function(xe){var Fe,it,gt=xe;E[gt]((Fe=u[gt])===null||Fe===void 0?void 0:Fe.field,(it=u[gt])===null||it===void 0?void 0:it.values)}),ie.next=7,this.addLayer(E);case 7:this.isLoaded=!0;case 8:case"end":return ie.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getFeatures",value:function(t){if(!t)return[];var o=this.sourceTile.data;return o.getTileData(t)}},{key:"getSourceOption",value:function(){var t=this.parent.getSource(),o=this.parent.getLayerConfig(),u=o.sourceLayer,c=o.featureId,v=this.getFeatures(u);return{data:{type:"FeatureCollection",features:v},options:{parser:{type:"geojson",featureId:c},transforms:t.transforms}}}}]),r}(r1),j7=["rasterData"];function V7(e){var i=$7();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function $7(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var H7=function(e){(0,Ce.Z)(r,e);var i=V7(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"initTileLayer",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E;return Qr().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return u=this.parent.getLayerAttributeConfig(),c=this.getLayerOptions(),v=this.getSourceOption(),E=new xb((0,Me.Z)({},c)).source(v.data,v.options),u&&Object.keys(u).forEach(function(xe){var Fe,it,gt=xe;E[gt]((Fe=u[gt])===null||Fe===void 0?void 0:Fe.field,(it=u[gt])===null||it===void 0?void 0:it.values)}),ie.next=7,this.addLayer(E);case 7:this.isLoaded=!0;case 8:case"end":return ie.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getSourceOption",value:function(){var t=this.parent.getSource(),o=this.sourceTile.data.data,u=o.rasterData,c=(0,K0.Z)(o,j7);return{data:u,options:{parser:(0,Me.Z)({type:"rasterRgb",extent:this.sourceTile.bounds},c),transforms:t.transforms}}}}]),r}(r1);function G7(e){var i=W7();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function W7(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var X7=function(e){(0,Ce.Z)(r,e);var i=G7(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"initTileLayer",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E;return Qr().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return u=this.parent.getLayerAttributeConfig(),c=this.getLayerOptions(),v=this.getSourceOption(),E=new xb((0,Me.Z)({},c)).source(v.data,v.options),u&&Object.keys(u).forEach(function(xe){var Fe,it,gt=xe;E[gt]((Fe=u[gt])===null||Fe===void 0?void 0:Fe.field,(it=u[gt])===null||it===void 0?void 0:it.values)}),ie.next=7,this.addLayer(E);case 7:this.isLoaded=!0;case 8:case"end":return ie.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getSourceOption",value:function(){var t=this.parent.getSource();return{data:this.sourceTile.data,options:{parser:{type:"image",extent:this.sourceTile.bounds},transforms:t.transforms}}}}]),r}(r1),Y7=["rasterData"];function K7(e){var i=q7();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function q7(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Q7={positions:[0,1],colors:["#000","#fff"]},J7=function(e){(0,Ce.Z)(r,e);var i=K7(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"initTileLayer",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G,ie,xe;return Qr().wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return u=this.parent.getLayerAttributeConfig(),c=this.getLayerOptions(),v=this.getSourceOption(),E=this.getLayerOptions(),G=E.rampColors,ie=E.domain,this.colorTexture=this.parent.textureService.getColorTexture(G,ie),xe=new xb((0,Me.Z)((0,Me.Z)({},c),{},{colorTexture:this.colorTexture})).source(v.data,v.options),u&&Object.keys(u).forEach(function(gt){var Dt,ar,Mr=gt;xe[Mr]((Dt=u[Mr])===null||Dt===void 0?void 0:Dt.field,(ar=u[Mr])===null||ar===void 0?void 0:ar.values)}),it.next=9,this.addLayer(xe);case 9:this.isLoaded=!0;case 10:case"end":return it.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getSourceOption",value:function(){var t=this.parent.getSource(),o=this.sourceTile.data.data,u=o.rasterData,c=(0,K0.Z)(o,Y7);return{data:u,options:{parser:(0,Me.Z)({type:"raster",extent:this.sourceTile.bounds},c),transforms:t.transforms}}}},{key:"styleUpdate",value:function(){for(var t=this,o=arguments.length,u=new Array(o),c=0;c=2&&!E&&(r.parent.updateLayerConfig({visible:!0}),r.layerService.reRender())}r.lastViewStates&&r.lastViewStates.zoom===c&&r.lastViewStates.latLonBounds.toString()===u.toString()||(r.lastViewStates={zoom:c,latLonBounds:u},(t=r.tilesetManager)===null||t===void 0||t.throttleUpdate(c,u))}}),(0,St.Z)(this,"viewchange",iF(this.mapchange,24)),this.parent=i;var n=this.parent.getContainer();this.rendererService=n.get(vr.IRendererService),this.layerService=n.get(vr.ILayerService),this.mapService=n.get(vr.IMapService),this.pickingService=n.get(vr.IPickingService),this.tileLayerService=new S7({rendererService:this.rendererService,layerService:this.layerService,parent:i}),this.tilePickService=new M7({tileLayerService:this.tileLayerService,layerService:this.layerService,parent:i}),this.parent.setLayerPickService(this.tilePickService),this.proxy(i),this.initTileSetManager()}return(0,vt.Z)(e,[{key:"initTileSetManager",value:function(){var r,n=this.parent.getSource();if(this.tilesetManager=n.tileset,this.initedTileset||(this.bindTilesetEvent(),this.initedTileset=!0),this.parent.isVisible()!==!1){var t=this.getCurrentView(),o=t.latLonBounds,u=t.zoom;(r=this.tilesetManager)===null||r===void 0||r.update(u,o)}}},{key:"getCurrentView",value:function(){var r=this.mapService.getBounds(),n=[r[0][0],r[0][1],r[1][0],r[1][1]],t=this.mapService.getZoom();return{latLonBounds:n,zoom:t}}},{key:"bindTilesetEvent",value:function(){var r=this;this.tilesetManager.on("tile-loaded",function(n){}),this.tilesetManager.on("tile-unload",function(n){r.tileUnLoad(n)}),this.tilesetManager.on("tile-error",function(n,t){r.tileError(n)}),this.tilesetManager.on("tile-update",function(){r.tileUpdate()}),this.mapService.on("zoomend",this.mapchange),this.mapService.on("moveend",this.viewchange)}},{key:"render",value:function(){this.tileLayerService.render()}},{key:"getLayers",value:function(){return this.tileLayerService.getLayers()}},{key:"getTiles",value:function(){return this.tileLayerService.getTiles()}},{key:"getTile",value:function(r){return this.tileLayerService.getTile(r)}},{key:"tileLoaded",value:function(r){}},{key:"tileError",value:function(r){console.warn("error:",r)}},{key:"destroy",value:function(){var r;this.mapService.off("zoomend",this.mapchange),this.mapService.off("moveend",this.viewchange),(r=this.tilesetManager)===null||r===void 0||r.destroy(),this.tileLayerService.destroy()}},{key:"reload",value:function(){var r;this.tilesetManager.clear();var n=this.getCurrentView(),t=n.latLonBounds,o=n.zoom;(r=this.tilesetManager)===null||r===void 0||r.update(o,t)}},{key:"tileUnLoad",value:function(r){this.tileLayerService.removeTile(r.key)}},{key:"tileUpdate",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(){var t=this,o,u,c;return Qr().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(this.tilesetManager){E.next=2;break}return E.abrupt("return");case 2:return o=this.parent.getMinZoom(),u=this.parent.getMaxZoom(),c=this.tilesetManager.tiles.filter(function(G){return G.isLoaded}).filter(function(G){return G.isVisibleChange}).filter(function(G){return G.data}).filter(function(G){return G.z>=o&&G.z0&&arguments[0]!==void 0?arguments[0]:"vertical",o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.5;this.container.classList.remove("horizontal","vertical"),this.container.classList.add(t),t==="horizontal"?(this.container.style.top=o*100+"%",this.container.style.left=""):(this.container.style.left=o*100+"%",this.container.style.top="")}},{key:"setLayers",value:function(t,o){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=t.filter(function(E){return o.includes(E)===!1}),v=o.filter(function(E){return t.includes(E)===!1});this.addMaskToLayers(c,u),this.removeMaskFromLayers(v)}},{key:"addMaskToLayers",value:function(t,o){var u=this;t.forEach(function(c){c.updateLayerConfig({maskInside:!o}),c.addMask(u.maskLayer)})}},{key:"removeMaskFromLayers",value:function(t){var o=this;t.forEach(function(u){u.updateLayerConfig({maskInside:!0}),u.removeMask(o.maskLayer)})}},{key:"getMaskGeoData",value:function(){var t=this.controlOption,o=t.ratio,u=o===void 0?.5:o,c=t.orientation,v=c===void 0?"vertical":c,E=v==="vertical",G=this.getBounds(),ie=(0,wi.Z)(G,2),xe=ie[0],Fe=ie[1],it=(0,wi.Z)(xe,2),gt=it[0],Dt=it[1],ar=(0,wi.Z)(Fe,2),Mr=ar[0],Zr=ar[1],mn;if(E){var zn=gt+(Mr-gt)*u;mn=[[gt,Zr],[zn,Zr],[zn,Dt],xe,[gt,Zr]]}else{var Rn=this.getContainerSize(),kn=this.mapsService.containerToLngLat([Rn[0],Rn[1]*u]),ui=kn.lat;mn=[[gt,Zr],Fe,[Mr,ui],[gt,ui],[gt,Zr]]}var Di={type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[mn]}}]};return Di}},{key:"getContainerDOMRect",value:function(){var t,o=(t=this.mapsService.getContainer())===null||t===void 0?void 0:t.getBoundingClientRect();return o}},{key:"getContainerSize",value:function(){var t=this.mapsService.getSize();return t}},{key:"getBounds",value:function(){var t=this.mapsService.getBounds();return t}},{key:"addLayer",value:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u=Array.isArray(t)?t:[t];if(o){var c,v=(c=this.controlOption.rightLayers).concat.apply(c,(0,Mn.Z)(u));this.setOptions({rightLayers:v})}else{var E,G=(E=this.controlOption.layers).concat.apply(E,(0,Mn.Z)(u));this.setOptions({layers:G})}}},{key:"removeLayer",value:function(t){var o=Array.isArray(t)?t:[t],u=this.controlOption.layers.filter(function(v){return o.includes(v)}),c=this.controlOption.rightLayers.filter(function(v){return o.includes(v)});this.setOptions({layers:u,rightLayers:c})}},{key:"removeLayers",value:function(){this.setOptions({layers:[],rightLayers:[]})}}]),r}(fy);function SF(e){var i=CF();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function CF(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var TF=function(e){(0,Ce.Z)(r,e);var i=SF(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;un.mapsService.getMinZoom()&&n.mapsService.zoomOut()}),(0,St.Z)((0,Gr.Z)(n),"updateDisabled",function(){var c=n.mapsService;n.zoomInButton.removeAttribute("disabled"),n.zoomOutButton.removeAttribute("disabled"),(n.disabled||c.getZoom()<=c.getMinZoom())&&n.zoomOutButton.setAttribute("disabled","true"),n.controlOption.showZoom&&n.zoomNumDiv&&(n.zoomNumDiv.innerText=String(Math.floor(c.getZoom()))),(n.disabled||c.getZoom()>=c.getMaxZoom())&&n.zoomInButton.setAttribute("disabled","true")}),n}return(0,vt.Z)(r,[{key:"getDefault",value:function(t){return(0,Me.Z)((0,Me.Z)({},Pd((0,et.Z)(r.prototype),"getDefault",this).call(this,t)),{},{position:wl.BOTTOMRIGHT,name:"zoom",zoomInText:Ig("l7-icon-enlarge"),zoomInTitle:"Zoom in",zoomOutText:Ig("l7-icon-narrow"),zoomOutTitle:"Zoom out",showZoom:!1})}},{key:"setOptions",value:function(t){Pd((0,et.Z)(r.prototype),"setOptions",this).call(this,t),this.checkUpdateOption(t,["zoomInText","zoomInTitle","zoomOutText","zoomOutTitle","showZoom"])&&this.resetButtonGroup(this.container)}},{key:"onAdd",value:function(){var t=aa("div","l7-control-zoom");return this.resetButtonGroup(t),this.mapsService.on("zoomend",this.updateDisabled),this.mapsService.on("zoomchange",this.updateDisabled),t}},{key:"onRemove",value:function(){this.mapsService.off("zoomend",this.updateDisabled),this.mapsService.off("zoomchange",this.updateDisabled)}},{key:"disable",value:function(){return this.disabled=!0,this.updateDisabled(),this}},{key:"enable",value:function(){return this.disabled=!1,this.updateDisabled(),this}},{key:"resetButtonGroup",value:function(t){yl(t),this.zoomInButton=this.createButton(this.controlOption.zoomInText,this.controlOption.zoomInTitle,"l7-button-control",t,this.zoomIn),this.controlOption.showZoom&&(this.zoomNumDiv=this.createButton("0","","l7-button-control l7-control-zoom__number",t)),this.zoomOutButton=this.createButton(this.controlOption.zoomOutText,this.controlOption.zoomOutTitle,"l7-button-control",t,this.zoomOut),this.updateDisabled()}},{key:"createButton",value:function(t,o,u,c,v){var E=aa("button",u,c);return typeof t=="string"?E.innerHTML=t:E.append(t),E.title=o,v&&E.addEventListener("click",v),E}}]),r}(fy);function MF(e){var i=PF();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function PF(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var q3=function(e){(0,Ce.Z)(r,e);var i=MF(r);function r(n){var t;(0,Je.Z)(this,r),t=i.call(this),(0,St.Z)((0,Gr.Z)(t),"isShow",!0),(0,St.Z)((0,Gr.Z)(t),"onMouseMove",function(u){var c,v=t.mapsService.getMapContainer(),E=(c=v==null?void 0:v.getBoundingClientRect())!==null&&c!==void 0?c:{},G=E.left,ie=G===void 0?0:G,xe=E.top,Fe=xe===void 0?0:xe;t.setPopupPosition(u.clientX-ie,u.clientY-Fe)}),(0,St.Z)((0,Gr.Z)(t),"updateLngLatPosition",function(){if(!(!t.mapsService||t.popupOption.followCursor)){var u=t.lngLat,c=u.lng,v=u.lat,E=t.mapsService.lngLatToContainer([c,v]),G=E.x,ie=E.y;t.setPopupPosition(G,ie)}}),(0,St.Z)((0,Gr.Z)(t),"onKeyDown",function(u){u.keyCode===27&&t.remove()}),(0,St.Z)((0,Gr.Z)(t),"onCloseButtonClick",function(u){u.stopPropagation&&u.stopPropagation(),t.hide()}),(0,St.Z)((0,Gr.Z)(t),"update",function(){var u=!!t.lngLat,c=t.popupOption,v=c.className,E=c.style,G=c.maxWidth,ie=c.anchor,xe=c.stopPropagation;if(!(!t.mapsService||!u||!t.content)){var Fe=t.mapsService.getMarkerContainer();if(!t.container&&Fe&&(t.container=aa("div","l7-popup ".concat(v!=null?v:""," ").concat(t.isShow?"":"l7-popup-hide"),Fe),E&&t.container.setAttribute("style",E),t.tip=aa("div","l7-popup-tip",t.container),t.container.appendChild(t.content),xe&&["mousemove","mousedown","mouseup","click","dblclick"].forEach(function(Dt){t.container.addEventListener(Dt,function(ar){ar.stopPropagation()})}),t.container.style.whiteSpace="nowrap"),t.updateLngLatPosition(),sl(t.container,"".concat(ei[ie])),Kn(t.container,ie,"popup"),G){var it=t.container.getBoundingClientRect(),gt=it.width;gt>parseFloat(G)&&(t.container.style.width=G)}else t.container.style.removeProperty("width")}}),t.popupOption=(0,Me.Z)((0,Me.Z)({},t.getDefault(n!=null?n:{})),n);var o=t.popupOption.lngLat;return o&&(t.lngLat=o),t}return(0,vt.Z)(r,[{key:"lngLat",get:function(){var t;return(t=this.popupOption.lngLat)!==null&&t!==void 0?t:{lng:0,lat:0}},set:function(t){this.popupOption.lngLat=t}},{key:"getIsShow",value:function(){return this.isShow}},{key:"addTo",value:function(t){this.mapsService=t.get(vr.IMapService),this.sceneService=t.get(vr.ISceneService),this.layerService=t.get(vr.ILayerService),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update),this.scene=t,this.update(),this.updateCloseOnClick(),this.updateCloseOnEsc(),this.updateFollowCursor();var o=this.popupOption,u=o.html,c=o.text,v=o.title;return u?this.setHTML(u):c&&this.setText(c),v&&this.setTitle(v),this.emit("open"),this}},{key:"remove",value:function(){if(this!==null&&this!==void 0&&this.isOpen())return this.content&&ho(this.content),this.container&&(ho(this.container),delete this.container),this.mapsService&&(this.mapsService.off("camerachange",this.update),this.mapsService.off("viewchange",this.update),this.updateCloseOnClick(!0),this.updateCloseOnEsc(!0),this.updateFollowCursor(!0),delete this.mapsService),this.emit("close"),this}},{key:"getOptions",value:function(){return this.popupOption}},{key:"setOptions",value:function(t){return this.show(),this.popupOption=(0,Me.Z)((0,Me.Z)({},this.popupOption),t),this.checkUpdateOption(t,["html","text","title","closeButton","closeButtonOffsets","maxWidth","anchor","stopPropagation","className","style","lngLat","offsets"])&&(this.container&&(ho(this.container),this.container=void 0),this.popupOption.html?this.setHTML(this.popupOption.html):this.popupOption.text&&this.setText(this.popupOption.text),this.popupOption.title&&this.setTitle(this.popupOption.title)),this.checkUpdateOption(t,["closeOnEsc"])&&this.updateCloseOnEsc(),this.checkUpdateOption(t,["closeOnClick"])&&this.updateCloseOnClick(),this.checkUpdateOption(t,["followCursor"])&&this.updateFollowCursor(),this.checkUpdateOption(t,["html"])&&t.html?this.setHTML(t.html):this.checkUpdateOption(t,["text"])&&t.text&&this.setText(t.text),this.checkUpdateOption(t,["lngLat"])&&t.lngLat&&this.setLnglat(t.lngLat),this}},{key:"open",value:function(){return this.addTo(this.scene),this}},{key:"close",value:function(){return this.remove(),this}},{key:"show",value:function(){if(!this.isShow)return this.container&&Ms(this.container,"l7-popup-hide"),this.isShow=!0,this.emit("show"),this}},{key:"hide",value:function(){if(this.isShow)return this.container&&Po(this.container,"l7-popup-hide"),this.isShow=!1,this.emit("hide"),this}},{key:"setHTML",value:function(t){return this.popupOption.html=t,this.setDOMContent(t)}},{key:"setText",value:function(t){return this.popupOption.text=t,this.setDOMContent(window.document.createTextNode(t))}},{key:"setTitle",value:function(t){this.show(),this.popupOption.title=t,t?(this.contentTitle||(this.contentTitle=aa("div","l7-popup-content__title"),this.content.firstChild?this.content.insertBefore(this.contentTitle,this.content.firstChild):this.content.append(this.contentTitle)),yl(this.contentTitle),Zf(this.contentTitle,t)):this.contentTitle&&(ho(this.contentTitle),this.contentTitle=void 0)}},{key:"panToPopup",value:function(){var t=this.lngLat,o=t.lng,u=t.lat;return this.popupOption.autoPan&&this.mapsService.panTo([o,u]),this}},{key:"setLngLat",value:function(t){return this.setLnglat(t)}},{key:"setLnglat",value:function(t){var o=this;return this.show(),this.lngLat=t,Array.isArray(t)&&(this.lngLat={lng:t[0],lat:t[1]}),this.mapsService&&(this.mapsService.off("camerachange",this.update),this.mapsService.off("viewchange",this.update),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update)),this.update(),this.popupOption.autoPan&&setTimeout(function(){o.panToPopup()},0),this}},{key:"getLnglat",value:function(){return this.lngLat}},{key:"setMaxWidth",value:function(t){return this.popupOption.maxWidth=t,this.update(),this}},{key:"isOpen",value:function(){return!!this.mapsService}},{key:"getDefault",value:function(t){return{closeButton:!0,closeOnClick:!1,maxWidth:"240px",offsets:[0,0],anchor:so.BOTTOM,stopPropagation:!0,autoPan:!1,autoClose:!0,closeOnEsc:!1,followCursor:!1}}},{key:"setDOMContent",value:function(t){return this.show(),this.createContent(),Zf(this.contentPanel,t),this.update(),this}},{key:"updateCloseOnClick",value:function(t){var o=this,u=this.mapsService;u&&(u==null||u.off("click",this.onCloseButtonClick),this.popupOption.closeOnClick&&!t&&requestAnimationFrame(function(){u==null||u.on("click",o.onCloseButtonClick)}))}},{key:"updateCloseOnEsc",value:function(t){window.removeEventListener("keydown",this.onKeyDown),this.popupOption.closeOnEsc&&!t&&window.addEventListener("keydown",this.onKeyDown)}},{key:"updateFollowCursor",value:function(t){var o,u=(o=this.mapsService)===null||o===void 0?void 0:o.getContainer();u&&(u==null||u.removeEventListener("mousemove",this.onMouseMove),this.popupOption.followCursor&&!t&&(u==null||u.addEventListener("mousemove",this.onMouseMove)))}},{key:"createContent",value:function(){var t=this;if(this.content&&ho(this.content),this.contentTitle=void 0,this.content=aa("div","l7-popup-content",this.container),this.setTitle(this.popupOption.title),this.popupOption.closeButton){var o=Ig("l7-icon-guanbi");Po(o,"l7-popup-close-button"),this.content.appendChild(o),this.popupOption.closeButtonOffsets&&(o.style.right=this.popupOption.closeButtonOffsets[0]+"px",o.style.top=this.popupOption.closeButtonOffsets[1]+"px"),o.setAttribute("aria-label","Close popup"),o.addEventListener("click",function(){t.hide()}),o.addEventListener("pointerup",function(u){u.stopPropagation()}),o.addEventListener("pointerdown",function(u){u.stopPropagation()}),this.closeButton=o}else this.closeButton=void 0;this.contentPanel=aa("div","l7-popup-content__panel",this.content)}},{key:"setPopupPosition",value:function(t,o){if(this.container){var u=this.popupOption.offsets;this.container.style.left=t+u[0]+"px",this.container.style.top=o-u[1]+"px"}}},{key:"checkUpdateOption",value:function(t,o){return o.some(function(u){return u in t})}}]),r}(cf.EventEmitter);function IF(e){var i=RF();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function RF(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var OF=vi.get,LF=function(e){(0,Ce.Z)(r,e);var i=IF(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u * + * { - margin-left: 6px; -} -.l7-select-control--normal .l7-select-control-item input[type='checkbox'] { - width: 14px; - height: 14px; -} -.l7-select-control--normal .l7-select-control-item:hover { - background-color: #f3f3f3; -} -.l7-select-control--image { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -webkit-box-align: start; - -ms-flex-align: start; - align-items: flex-start; - -webkit-box-sizing: content-box; - box-sizing: content-box; - max-width: 460px; - max-height: 400px; - margin: 12px 0 0 12px; - overflow-x: hidden; - overflow-y: auto; -} -.l7-select-control--image .l7-select-control-item { - position: relative; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-flex: 0; - -ms-flex: 0 0 calc((100% - (12px + 9px) * 2) / 3); - flex: 0 0 calc((100% - (12px + 9px) * 2) / 3); - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-sizing: content-box; - box-sizing: content-box; - margin-right: 12px; - margin-bottom: 12px; - overflow: hidden; - font-size: 12px; - border: 1px solid #fff; - border-radius: 2px; -} -.l7-select-control--image .l7-select-control-item img { - width: 100%; - height: 80px; -} -.l7-select-control--image .l7-select-control-item input[type='checkbox'] { - position: absolute; - top: 0; - right: 0; -} -.l7-select-control--image .l7-select-control-item input[type='radio'] { - position: absolute; - top: 0; - right: 0; -} -.l7-select-control--image .l7-select-control-item .l7-select-control-item-row { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - line-height: 26px; -} -.l7-select-control--image .l7-select-control-item .l7-select-control-item-row > * + * { - margin-left: 8px; -} -.l7-select-control--image .l7-select-control-item.l7-select-control-item-active { - border-color: #0370fe; -} -.l7-select-control-item { - cursor: pointer; -} -.l7-select-control-item input[type='checkbox'] { - margin: 0; - cursor: pointer; -} -.l7-select-control--multiple .l7-select-control-item:hover { - background-color: transparent; -} -.l7-control-logo { - width: 89px; - height: 16px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.l7-control-logo img { - height: 100%; - width: 100%; -} -.l7-control-logo .l7-control-logo-link { - display: block; - cursor: pointer; -} -.l7-control-logo .l7-control-logo-link img { - cursor: pointer; -} -.l7-control-mouse-location { - background-color: #fff; - border-radius: 2px; - -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15); - box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15); - padding: 2px 4px; - min-width: 130px; -} -.l7-control-zoom { - overflow: hidden; - border-radius: 2px; - -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15); - box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15); -} -.l7-control-zoom .l7-button-control { - font-size: 16px; - border-bottom: 1px solid #f0f0f0; - border-radius: 0; - -webkit-box-shadow: 0 0 0; - box-shadow: 0 0 0; -} -.l7-control-zoom .l7-button-control .l7-iconfont { - width: 14px; - height: 14px; -} -.l7-control-zoom .l7-button-control:last-child { - border-bottom: 0; -} -.l7-control-zoom .l7-control-zoom__number { - color: #595959; - padding: 0; -} -.l7-control-zoom .l7-control-zoom__number:hover { - background-color: #fff; -} -.l7-control-scale { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; -} -.l7-control-scale .l7-control-scale-line { - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 2px 5px 1px; - overflow: hidden; - color: #595959; - font-size: 10px; - line-height: 1.1; - white-space: nowrap; - background: #fff; - border: 2px solid #000; - border-top: 0; - -webkit-transition: width 0.1s; - transition: width 0.1s; -} -.l7-control-scale .l7-control-scale-line + .l7-control-scale .l7-control-scale-line { - margin-top: -2px; - border-top: 2px solid #777; - border-bottom: none; -} -.l7-right .l7-control-scale { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: end; - -ms-flex-align: end; - align-items: flex-end; -} -.l7-right .l7-control-scale .l7-control-scale-line { - text-align: right; -} -.l7-popup { - position: absolute; - top: 0; - left: 0; - z-index: 5; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - will-change: transform; - pointer-events: none; -} -.l7-popup.l7-popup-hide { - display: none; -} -.l7-popup .l7-popup-content { - position: relative; - padding: 16px; - font-size: 14px; - background: #fff; - border-radius: 3px; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); -} -.l7-popup .l7-popup-content .l7-popup-content__title { - margin-bottom: 8px; - font-weight: bold; -} -.l7-popup .l7-popup-content .l7-popup-close-button, -.l7-popup .l7-popup-content .l7-popup-content__title, -.l7-popup .l7-popup-content .l7-popup-content__panel { - white-space: normal; - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; - pointer-events: initial; -} -.l7-popup .l7-popup-content .l7-popup-close-button { - position: absolute; - top: 0; - right: 0; - width: 18px; - height: 18px; - padding: 0; - font-size: 14px; - line-height: 18px; - text-align: center; - background-color: transparent; - border: 0; - border-radius: 0 3px 0 0; - cursor: pointer; -} -.l7-popup .l7-popup-tip { - position: relative; - z-index: 1; - width: 0; - height: 0; - border: 10px solid transparent; -} -.l7-popup.l7-popup-anchor-bottom, -.l7-popup.l7-popup-anchor-bottom-left, -.l7-popup.l7-popup-anchor-bottom-right { - -webkit-box-orient: vertical; - -webkit-box-direction: reverse; - -ms-flex-direction: column-reverse; - flex-direction: column-reverse; -} -.l7-popup.l7-popup-anchor-bottom .l7-popup-tip, -.l7-popup.l7-popup-anchor-bottom-left .l7-popup-tip, -.l7-popup.l7-popup-anchor-bottom-right .l7-popup-tip { - bottom: 1px; -} -.l7-popup.l7-popup-anchor-top, -.l7-popup.l7-popup-anchor-top-left, -.l7-popup.l7-popup-anchor-top-right { - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; -} -.l7-popup.l7-popup-anchor-top .l7-popup-tip, -.l7-popup.l7-popup-anchor-top-left .l7-popup-tip, -.l7-popup.l7-popup-anchor-top-right .l7-popup-tip { - top: 1px; -} -.l7-popup.l7-popup-anchor-left { - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; -} -.l7-popup.l7-popup-anchor-right { - -webkit-box-orient: horizontal; - -webkit-box-direction: reverse; - -ms-flex-direction: row-reverse; - flex-direction: row-reverse; -} -.l7-popup-anchor-top .l7-popup-tip { - position: relative; - -webkit-align-self: center; - -ms-flex-item-align: center; - align-self: center; - border-top: none; - border-bottom-color: #fff; -} -.l7-popup-anchor-top-left .l7-popup-tip { - -webkit-align-self: flex-start; - -ms-flex-item-align: start; - align-self: flex-start; - border-top: none; - border-bottom-color: #fff; - border-left: none; -} -.l7-popup-anchor-top-right .l7-popup-tip { - -webkit-align-self: flex-end; - -ms-flex-item-align: end; - align-self: flex-end; - border-top: none; - border-right: none; - border-bottom-color: #fff; -} -.l7-popup-anchor-bottom .l7-popup-tip { - -webkit-align-self: center; - -ms-flex-item-align: center; - align-self: center; - border-top-color: #fff; - border-bottom: none; -} -.l7-popup-anchor-bottom-left .l7-popup-tip { - -webkit-align-self: flex-start; - -ms-flex-item-align: start; - align-self: flex-start; - border-top-color: #fff; - border-bottom: none; - border-left: none; -} -.l7-popup-anchor-bottom-right .l7-popup-tip { - -webkit-align-self: flex-end; - -ms-flex-item-align: end; - align-self: flex-end; - border-top-color: #fff; - border-right: none; - border-bottom: none; -} -.l7-popup-anchor-left .l7-popup-tip { - -webkit-align-self: center; - -ms-flex-item-align: center; - align-self: center; - border-right-color: #fff; - border-left: none; -} -.l7-popup-anchor-right .l7-popup-tip { - right: 1px; - -webkit-align-self: center; - -ms-flex-item-align: center; - align-self: center; - border-right: none; - border-left-color: #fff; -} -.l7-popup-anchor-top-left .l7-popup-content { - border-top-left-radius: 0; -} -.l7-popup-anchor-top-right .l7-popup-content { - border-top-right-radius: 0; -} -.l7-popup-anchor-bottom-left .l7-popup-content { - border-bottom-left-radius: 0; -} -.l7-popup-anchor-bottom-right .l7-popup-content { - border-bottom-right-radius: 0; -} -.l7-popup-track-pointer { - display: none; -} -.l7-popup-track-pointer * { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - pointer-events: none; -} -.l7-map:hover .l7-popup-track-pointer { - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} -.l7-map:active .l7-popup-track-pointer { - display: none; -} -.l7-layer-popup__row { - font-size: 12px; -} -.l7-layer-popup__row + .l7-layer-popup__row { - margin-top: 4px; -} -.l7-control-swipe { - position: absolute; - top: 50%; - left: 50%; - z-index: 6; - -webkit-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - -ms-touch-action: none; - touch-action: none; -} -.l7-control-swipe_hide { - display: none; -} -.l7-control-swipe:before { - position: absolute; - top: -5000px; - bottom: -5000px; - left: 50%; - z-index: -1; - width: 4px; - background: #fff; - -webkit-transform: translate(-2px, 0); - transform: translate(-2px, 0); - content: ''; -} -.l7-control-swipe.horizontal:before { - top: 50%; - right: -5000px; - bottom: auto; - left: -5000px; - width: auto; - height: 4px; -} -.l7-control-swipe__button { - display: block; - width: 28px; - height: 28px; - margin: 0; - padding: 0; - color: #595959; - font-weight: bold; - font-size: inherit; - text-align: center; - text-decoration: none; - background-color: #fff; - border: none; - border-radius: 2px; - outline: none; -} -.l7-control-swipe, -.l7-control-swipe__button { - cursor: ew-resize; -} -.l7-control-swipe.horizontal, -.l7-control-swipe.horizontal button { - cursor: ns-resize; -} -.l7-control-swipe:after, -.l7-control-swipe__button:before, -.l7-control-swipe__button:after { - position: absolute; - top: 25%; - bottom: 25%; - left: 50%; - width: 2px; - background: currentColor; - -webkit-transform: translate(-1px, 0); - transform: translate(-1px, 0); - content: ''; -} -.l7-control-swipe__button:after { - -webkit-transform: translateX(4px); - transform: translateX(4px); -} -.l7-control-swipe__button:before { - -webkit-transform: translateX(-6px); - transform: translateX(-6px); -} -`);var Q3,yw,J3,Uv=(Q3=iv(vr.IGlobalConfigService),yw=function(){function e(i){(0,Je.Z)(this,e),A(this,"configService",J3,this),this.config=i}return(0,vt.Z)(e,[{key:"setContainer",value:function(r,n,t){r.bind(vr.MapConfig).toConstantValue((0,Me.Z)((0,Me.Z)({},this.config),{},{id:n,canvas:t})),r.bind(vr.IMapService).to(this.getServiceConstructor()).inSingletonScope()}},{key:"getServiceConstructor",value:function(){throw new Error("Method not implemented.")}}]),e}(),J3=p(yw.prototype,"configService",[Q3],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yw),kF=_(95906),eT=_.n(kF);function X_(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Ub(e,i){var r=Xo([],i,e);return Lt(r,r,1/r[3]),r}function t$(e,i){var r=e%i;return r<0?i+r:r}function r$(e,i,r){return r*i+(1-r)*e}function i1(e,i){if(!e)throw new Error(i||"viewport-mercator-project: assertion failed.")}var jv=Math.PI,tT=jv/4,Og=jv/180,rT=180/jv,_w=512,Aw=4003e4,FF=1.5;function nT(e){return Math.pow(2,e)}function BF(e){return Math.log2(e)}function jb(e,i){var r=(0,wi.Z)(e,2),n=r[0],t=r[1];i1(Number.isFinite(n)&&Number.isFinite(i)),i1(Number.isFinite(t)&&t>=-90&&t<=90,"invalid latitude"),i*=_w;var o=n*Og,u=t*Og,c=i*(o+jv)/(2*jv),v=i*(jv-Math.log(Math.tan(tT+u*.5)))/(2*jv);return[c,v]}function bw(e,i){var r=(0,wi.Z)(e,2),n=r[0],t=r[1];i*=_w;var o=n/i*(2*jv)-jv,u=2*(Math.atan(Math.exp(jv-t/i*(2*jv)))-tT);return[o*rT,u*rT]}function n$(e){var i=e.latitude;assert(Number.isFinite(i));var r=Math.cos(i*Og);return BF(Aw*r)-9}function iT(e){var i=e.latitude,r=e.longitude,n=e.zoom,t=e.scale,o=e.highPrecision,u=o===void 0?!1:o;t=t!==void 0?t:nT(n),i1(Number.isFinite(i)&&Number.isFinite(r)&&Number.isFinite(t));var c={},v=_w*t,E=Math.cos(i*Og),G=v/360,ie=G/E,xe=v/Aw/E;if(c.pixelsPerMeter=[xe,-xe,xe],c.metersPerPixel=[1/xe,-1/xe,1/xe],c.pixelsPerDegree=[G,-ie,xe],c.degreesPerPixel=[1/G,-1/ie,1/xe],u){var Fe=Og*Math.tan(i*Og)/E,it=G*Fe/2,gt=v/Aw*Fe,Dt=gt/ie*xe;c.pixelsPerDegree2=[0,-it,gt],c.pixelsPerMeter2=[Dt,0,Dt]}return c}function i$(e,i){var r=_slicedToArray(e,3),n=r[0],t=r[1],o=r[2],u=_slicedToArray(i,3),c=u[0],v=u[1],E=u[2],G=1,ie=iT({longitude:n,latitude:t,scale:G,highPrecision:!0}),xe=ie.pixelsPerMeter,Fe=ie.pixelsPerMeter2,it=jb(e,G);it[0]+=c*(xe[0]+Fe[0]*v),it[1]+=v*(xe[1]+Fe[1]*v);var gt=bw(it,G),Dt=(o||0)+(E||0);return Number.isFinite(o)||Number.isFinite(E)?[gt[0],gt[1],Dt]:gt}function NF(e){var i=e.height,r=e.pitch,n=e.bearing,t=e.altitude,o=e.center,u=o===void 0?null:o,c=e.flipY,v=c===void 0?!1:c,E=X_();return Fd(E,E,[0,0,-t]),zd(E,E,[1,1,1/i]),Yd(E,E,-r*Og),cp(E,E,n*Og),v&&zd(E,E,[1,-1,1]),u&&Fd(E,E,KE([],u)),E}function zF(e){var i=e.width,r=e.height,n=e.altitude,t=n===void 0?FF:n,o=e.pitch,u=o===void 0?0:o,c=e.nearZMultiplier,v=c===void 0?1:c,E=e.farZMultiplier,G=E===void 0?1:E,ie=u*Og,xe=Math.atan(.5/t),Fe=Math.sin(xe)*t/Math.sin(Math.PI/2-ie-xe),it=Math.cos(Math.PI/2-ie)*Fe+t;return{fov:2*Math.atan(r/2/t),aspect:i/r,focalDistance:t,near:v,far:it*G}}function ZF(e){var i=e.width,r=e.height,n=e.pitch,t=e.altitude,o=e.nearZMultiplier,u=e.farZMultiplier,c=zF({width:i,height:r,altitude:t,pitch:n,nearZMultiplier:o,farZMultiplier:u}),v=c.fov,E=c.aspect,G=c.near,ie=c.far,xe=Rr([],v,E,G,ie);return xe}function UF(e,i){var r=(0,wi.Z)(e,3),n=r[0],t=r[1],o=r[2],u=o===void 0?0:o;return i1(Number.isFinite(n)&&Number.isFinite(t)&&Number.isFinite(u)),Ub(i,[n,t,u,1])}function aT(e,i){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=(0,wi.Z)(e,3),t=n[0],o=n[1],u=n[2];if(i1(Number.isFinite(t)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(u)){var c=Ub(i,[t,o,u,1]);return c}var v=Ub(i,[t,o,0,1]),E=Ub(i,[t,o,1,1]),G=v[2],ie=E[2],xe=G===ie?0:((r||0)-G)/(ie-G);return Dp([],v,E,xe)}var oT=X_(),jF=function(){function e(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=i.width,n=i.height,t=i.viewMatrix,o=t===void 0?oT:t,u=i.projectionMatrix,c=u===void 0?oT:u;(0,Je.Z)(this,e),this.width=r||1,this.height=n||1,this.scale=1,this.pixelsPerMeter=1,this.viewMatrix=o,this.projectionMatrix=c;var v=X_();od(v,v,this.projectionMatrix),od(v,v,this.viewMatrix),this.viewProjectionMatrix=v;var E=X_();zd(E,E,[this.width/2,-this.height/2,1]),Fd(E,E,[1,-1,0]),od(E,E,this.viewProjectionMatrix);var G=V0(X_(),E);if(!G)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=E,this.pixelUnprojectionMatrix=G,this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return(0,vt.Z)(e,[{key:"equals",value:function(r){return r instanceof e?r.width===this.width&&r.height===this.height&&as(r.projectionMatrix,this.projectionMatrix)&&as(r.viewMatrix,this.viewMatrix):!1}},{key:"project",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=n.topLeft,o=t===void 0?!0:t,u=this.projectPosition(r),c=UF(u,this.pixelProjectionMatrix),v=(0,wi.Z)(c,2),E=v[0],G=v[1],ie=o?G:this.height-G;return r.length===2?[E,ie]:[E,ie,c[2]]}},{key:"unproject",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=n.topLeft,o=t===void 0?!0:t,u=n.targetZ,c=(0,wi.Z)(r,3),v=c[0],E=c[1],G=c[2],ie=o?E:this.height-E,xe=u&&u*this.pixelsPerMeter,Fe=aT([v,ie,G],this.pixelUnprojectionMatrix,xe),it=this.unprojectPosition(Fe),gt=(0,wi.Z)(it,3),Dt=gt[0],ar=gt[1],Mr=gt[2];return Number.isFinite(G)?[Dt,ar,Mr]:Number.isFinite(u)?[Dt,ar,u]:[Dt,ar]}},{key:"projectPosition",value:function(r){var n=this.projectFlat(r),t=(0,wi.Z)(n,2),o=t[0],u=t[1],c=(r[2]||0)*this.pixelsPerMeter;return[o,u,c]}},{key:"unprojectPosition",value:function(r){var n=this.unprojectFlat(r),t=(0,wi.Z)(n,2),o=t[0],u=t[1],c=(r[2]||0)/this.pixelsPerMeter;return[o,u,c]}},{key:"projectFlat",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale;return r}},{key:"unprojectFlat",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale;return r}}]),e}();function VF(e){var i=e.width,r=e.height,n=e.bounds,t=e.minExtent,o=t===void 0?0:t,u=e.maxZoom,c=u===void 0?24:u,v=e.padding,E=v===void 0?0:v,G=e.offset,ie=G===void 0?[0,0]:G,xe=(0,wi.Z)(n,2),Fe=(0,wi.Z)(xe[0],2),it=Fe[0],gt=Fe[1],Dt=(0,wi.Z)(xe[1],2),ar=Dt[0],Mr=Dt[1];if(Number.isFinite(E)){var Zr=E;E={top:Zr,bottom:Zr,left:Zr,right:Zr}}else i1(Number.isFinite(E.top)&&Number.isFinite(E.bottom)&&Number.isFinite(E.left)&&Number.isFinite(E.right));var mn=new xw({width:i,height:r,longitude:0,latitude:0,zoom:0}),zn=mn.project([it,Mr]),Rn=mn.project([ar,gt]),kn=[Math.max(Math.abs(Rn[0]-zn[0]),o),Math.max(Math.abs(Rn[1]-zn[1]),o)],ui=[i-E.left-E.right-Math.abs(ie[0])*2,r-E.top-E.bottom-Math.abs(ie[1])*2];i1(ui[0]>0&&ui[1]>0);var Di=ui[0]/kn[0],Aa=ui[1]/kn[1],Pa=(E.right-E.left)/2/Di,Lo=(E.bottom-E.top)/2/Aa,ns=[(Rn[0]+zn[0])/2+Pa,(Rn[1]+zn[1])/2+Lo],ws=mn.unproject(ns),Pf=mn.zoom+Math.log2(Math.abs(Math.min(Di,Aa)));return{longitude:ws[0],latitude:ws[1],zoom:Math.min(Pf,c)}}var xw=function(e){(0,Ce.Z)(i,e);function i(){var r,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.width,o=n.height,u=n.latitude,c=u===void 0?0:u,v=n.longitude,E=v===void 0?0:v,G=n.zoom,ie=G===void 0?0:G,xe=n.pitch,Fe=xe===void 0?0:xe,it=n.bearing,gt=it===void 0?0:it,Dt=n.altitude,ar=Dt===void 0?1.5:Dt,Mr=n.nearZMultiplier,Zr=n.farZMultiplier;(0,Je.Z)(this,i),t=t||1,o=o||1;var mn=nT(ie);ar=Math.max(.75,ar);var zn=jb([E,c],mn);zn[2]=0;var Rn=ZF({width:t,height:o,pitch:Fe,bearing:gt,altitude:ar,nearZMultiplier:Mr||1/o,farZMultiplier:Zr||1.01}),kn=NF({height:o,center:zn,pitch:Fe,bearing:gt,altitude:ar,flipY:!0});return r=(0,pt.Z)(this,(0,et.Z)(i).call(this,{width:t,height:o,viewMatrix:kn,projectionMatrix:Rn})),r.latitude=c,r.longitude=E,r.zoom=ie,r.pitch=Fe,r.bearing=gt,r.altitude=ar,r.scale=mn,r.center=zn,r.pixelsPerMeter=iT((0,Gr.Z)((0,Gr.Z)(r))).pixelsPerMeter[2],Object.freeze((0,Gr.Z)((0,Gr.Z)(r))),r}return(0,vt.Z)(i,[{key:"projectFlat",value:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale;return jb(n,t)}},{key:"unprojectFlat",value:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.scale;return bw(n,t)}},{key:"getMapCenterByLngLatPosition",value:function(n){var t=n.lngLat,o=n.pos,u=aT(o,this.pixelUnprojectionMatrix),c=jb(t,this.scale),v=vc([],c,hf([],u)),E=vc([],this.center,v);return bw(E,this.scale)}},{key:"getLocationAtPoint",value:function(n){var t=n.lngLat,o=n.pos;return this.getMapCenterByLngLatPosition({lngLat:t,pos:o})}},{key:"fitBounds",value:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.width,u=this.height,c=VF(Object.assign({width:o,height:u,bounds:n},t)),v=c.longitude,E=c.latitude,G=c.zoom;return new i({width:o,height:u,longitude:v,latitude:E,zoom:G})}}]),i}(jF),_y=function(){function e(){(0,Je.Z)(this,e)}return(0,vt.Z)(e,[{key:"syncWithMapCamera",value:function(r){var n=r.center,t=r.zoom,o=r.pitch,u=r.bearing,c=r.viewportHeight,v=r.viewportWidth,E=this.viewport?{width:this.viewport.width,height:this.viewport.height,longitude:this.viewport.center[0],latitude:this.viewport.center[1],zoom:this.viewport.zoom,pitch:this.viewport.pitch,bearing:this.viewport.bearing}:{};this.viewport=new xw((0,Me.Z)((0,Me.Z)({},E),{},{width:v,height:c,longitude:n&&n[0],latitude:n&&n[1],zoom:t,pitch:o,bearing:u}))}},{key:"getZoom",value:function(){return this.viewport.zoom}},{key:"getZoomScale",value:function(){return Math.pow(2,this.getZoom())}},{key:"getCenter",value:function(){return[this.viewport.longitude,this.viewport.latitude]}},{key:"getProjectionMatrix",value:function(){return this.viewport.projectionMatrix}},{key:"getModelMatrix",value:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}},{key:"getViewMatrix",value:function(){return this.viewport.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewport.viewMatrixUncentered}},{key:"getViewProjectionMatrix",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getFocalDistance",value:function(){return 1}},{key:"projectFlat",value:function(r,n){return this.viewport.projectFlat(r,n)}}]),e}(),sT=function(){function e(i){(0,Je.Z)(this,e),(0,St.Z)(this,"size",1e4),this.size=i||1e4}return(0,vt.Z)(e,[{key:"setSize",value:function(r){this.size=r}},{key:"getSize",value:function(){return[this.size,this.size]}},{key:"mercatorXfromLng",value:function(r){return(180+r)/360*this.size}},{key:"mercatorYfromLat",value:function(r){return(1-(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360)*this.size}},{key:"lngFromMercatorX",value:function(r){return r/this.size*360-180}},{key:"latFromMercatorY",value:function(r){var n=180-(1-r/this.size)*360;return 360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90}},{key:"project",value:function(r){var n=this.mercatorXfromLng(r[0]),t=this.mercatorYfromLat(r[1]);return[n,t]}},{key:"unproject",value:function(r){var n=this.lngFromMercatorX(r[0]),t=this.latFromMercatorY(r[1]);return[n,t]}}]),e}();function Vb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={top:0,right:0,bottom:0,left:0};if(typeof e=="number")return{top:e,right:e,bottom:e,left:e};if(Array.isArray(e)){if(e.length===4)return{top:e[0],right:e[1],bottom:e[2],left:e[3]};if(e.length===2)return{top:e[0],right:e[1],bottom:e[0],left:e[1]}}return(0,Me.Z)((0,Me.Z)({},i),e)}var $F={normal:"amap://styles/normal",light:"amap://styles/c422f5c0cfced5be9fe3a83f05f28a68?isPublic=true",dark:"amap://styles/c9f1d10cae34f8ab05e425462c5a58d7?isPublic=true",blank:"amap://styles/07c17002b38775b32a7a76c66cf90e99?isPublic=true",fresh:"amap://styles/fresh",grey:"amap://styles/grey",graffiti:"amap://styles/graffiti",macaron:"amap://styles/macaron",darkblue:"amap://styles/darkblue",wine:"amap://styles/wine"},HF=["id","style","minZoom","maxZoom","token","mapInstance","plugin"],uT,lT,cT,fT,hT,dT,$1,pT,mT,vT,gT;function GF(e,i){var r=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,n=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(r||n)&&(i||(i=document),!!i)){var t=i.head||i.getElementsByTagName("head")[0];if(!t){t=i.createElement("head");var o=i.body||i.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(t,o):i.documentElement.appendChild(t)}var u=i.createElement("style");return u.type="text/css",u.styleSheet?u.styleSheet.cssText=e:u.appendChild(i.createTextNode(e)),t.appendChild(u),u}}GF(`.amap-logo{ - display: none !important; -} -.amap-copyright { - display: none !important; -} -`);var WF={contextmenu:"rightclick"},XF={contextmenu:"rightclick",camerachange:"viewchange"},yT={"GAODE1.x":WF,"GAODE2.x":XF},YF=0;window.forceWebGL=!0;var _T="15cd8a57710d40c9b7c0e3cc120f1200",KF="1.4.15",qF="amap-script",ww=!1,$b=[],QF=12,AT=(uT=(0,bo.b2)(),lT=(0,bo.f3)(vr.IGlobalConfigService),cT=(0,bo.f3)(vr.MapConfig),fT=(0,bo.f3)(vr.ICoordinateSystemService),hT=(0,bo.f3)(vr.IEventEmitter),uT(dT=($1=function(){function e(){var i=this;(0,Je.Z)(this,e),(0,St.Z)(this,"version",Qu["GAODE1.x"]),(0,St.Z)(this,"simpleMapCoord",new sT),(0,St.Z)(this,"bgColor","rgba(0, 0, 0, 0)"),A(this,"configService",pT,this),A(this,"config",mT,this),A(this,"coordinateSystemService",vT,this),A(this,"eventEmitter",gT,this),(0,St.Z)(this,"handleCameraChanged",function(r){var n=r.camera,t=n.fov,o=n.near,u=n.far,c=n.height,v=n.pitch,E=n.rotation,G=n.aspect,ie=n.position,xe=i.getCenter(),Fe=xe.lng,it=xe.lat;if(i.emit("mapchange"),i.cameraChangedCallback){i.viewport.syncWithMapCamera({aspect:G,bearing:360-E,far:u,fov:t,cameraHeight:c,near:o,pitch:v,zoom:i.map.getZoom()-1,center:[Fe,it],offsetOrigin:[ie.x,ie.y]});var gt=i.config.offsetZoom,Dt=gt===void 0?QF:gt;i.viewport.getZoom()>Dt?i.coordinateSystemService.setCoordinateSystem(ae.P20_OFFSET):i.coordinateSystemService.setCoordinateSystem(ae.P20),i.cameraChangedCallback(i.viewport)}})}return(0,vt.Z)(e,[{key:"setBgColor",value:function(r){this.bgColor=r}},{key:"addMarkerContainer",value:function(){var r=this.map.getContainer();if(r!==null){var n=r.getElementsByClassName("amap-maps")[0];this.markerContainer=aa("div","l7-marker-container",n)}}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"on",value:function(r,n){pm.indexOf(r)!==-1?this.eventEmitter.on(r,n):this.map.on(yT[this.version][r]||r,n)}},{key:"off",value:function(r,n){pm.indexOf(r)!==-1?this.eventEmitter.off(r,n):this.map.off(yT[this.version][r]||r,n)}},{key:"getContainer",value:function(){return this.map.getContainer()}},{key:"getMapCanvasContainer",value:function(){var r;return(r=this.map.getContainer())===null||r===void 0?void 0:r.getElementsByClassName("amap-maps")[0]}},{key:"getSize",value:function(){var r=this.map.getSize();return[r.getWidth(),r.getHeight()]}},{key:"getType",value:function(){return"amap"}},{key:"getZoom",value:function(){return this.map.getZoom()-1}},{key:"setZoom",value:function(r){return this.map.setZoom(r+1)}},{key:"getCenter",value:function(r){if(r!=null&&r.padding){var n=this.getCenter(),t=Vb(r.padding),o=this.lngLatToPixel([n.lng,n.lat]),u=[(t.right-t.left)/2,(t.bottom-t.top)/2],c=this.pixelToLngLat([o.x-u[0],o.y-u[1]]);return c}var v=this.map.getCenter();return{lng:v.getLng(),lat:v.getLat()}}},{key:"setCenter",value:function(r,n){if(n!=null&&n.padding){var t=Vb(n.padding),o=this.lngLatToPixel(r),u=[(t.right-t.left)/2,(t.bottom-t.top)/2],c=this.pixelToLngLat([o.x+u[0],o.y+u[1]]);this.map.setCenter([c.lng,c.lat])}else this.map.setCenter(r)}},{key:"getPitch",value:function(){return this.map.getPitch()}},{key:"getRotation",value:function(){return 360-this.map.getRotation()}},{key:"getBounds",value:function(){var r=this.map.getBounds().toBounds(),n=r.getNorthEast(),t=r.getSouthWest(),o=this.getCenter(),u=o.lng>n.getLng()||o.lng0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.map.panBy(r,n)}},{key:"fitBounds",value:function(r){this.map.setBounds(new AMap.Bounds([r[0][0],r[0][1],r[1][0],r[1][1]]))}},{key:"setZoomAndCenter",value:function(r,n){this.map.setZoomAndCenter(r+1,n)}},{key:"setMapStyle",value:function(r){this.map.setMapStyle(this.getMapStyleValue(r))}},{key:"setMapStatus",value:function(r){this.map.setStatus(r)}},{key:"getMapStyleConfig",value:function(){return $F}},{key:"getMapStyleValue",value:function(r){return this.getMapStyleConfig()[r]||r}},{key:"getMapStyle",value:function(){return this.map.getMapStyle()}},{key:"pixelToLngLat",value:function(r){var n=this.map.pixelToLngLat(new AMap.Pixel(r[0],r[1]));return{lng:n.getLng(),lat:n.getLat()}}},{key:"lngLatToPixel",value:function(r){var n=this.map.lnglatToPixel(new AMap.LngLat(r[0],r[1]));return{x:n.getX(),y:n.getY()}}},{key:"containerToLngLat",value:function(r){var n=new AMap.Pixel(r[0],r[1]),t=this.map.containerToLngLat(n);return{lng:t==null?void 0:t.getLng(),lat:t==null?void 0:t.getLat()}}},{key:"lngLatToContainer",value:function(r){var n=new AMap.LngLat(r[0],r[1]),t=this.map.lngLatToContainer(n);return{x:t.getX(),y:t.getY()}}},{key:"lngLatToCoord",value:function(r){var n=this.map.lngLatToGeodeticCoord(r),t=n.x,o=n.y;return[t,-o]}},{key:"lngLatToMercator",value:function(r,n){return{x:0,y:0,z:0}}},{key:"getModelMatrix",value:function(r,n,t){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[1,1,1],u=this.viewport.projectFlat(r),c=Nf();return Fd(c,c,qd(u[0],u[1],n)),zd(c,c,qd(o[0],o[1],o[2])),Yd(c,c,t[0]),lp(c,c,t[1]),cp(c,c,t[2]),c}},{key:"init",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(){var t=this,o,u,c,v,E,G,ie,xe,Fe,it,gt,Dt,ar,Mr;return Qr().wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:return o=this.config,u=o.id,c=o.style,v=c===void 0?"light":c,E=o.minZoom,G=E===void 0?0:E,ie=o.maxZoom,xe=ie===void 0?18:ie,Fe=o.token,it=Fe===void 0?_T:Fe,gt=o.mapInstance,Dt=o.plugin,ar=Dt===void 0?[]:Dt,Mr=(0,K0.Z)(o,HF),mn.next=3,new Promise(function(zn){var Rn=function(){if(gt)t.map=gt,t.$mapContainer=t.map.getContainer(),setTimeout(function(){t.map.on("camerachange",t.handleCameraChanged),zn()},30);else{t.$mapContainer=t.creatMapContainer(u);var ui=(0,Me.Z)({mapStyle:t.getMapStyleValue(v),zooms:[G,xe],viewMode:"3D"},Mr);ui.zoom&&(ui.zoom+=1);var Di=new AMap.Map(t.$mapContainer,ui);Di.on("camerachange",t.handleCameraChanged),Di.on("camerachange",function(){setTimeout(function(){return t.handleAfterMapChange()})}),t.map=Di,setTimeout(function(){zn()},10)}};!ww&&!gt?(it===_T&&console.warn("%c".concat(t.configService.getSceneWarninfo("MapToken"),"!"),"color: #873bf4;font-weigh:900;font-size: 16px;"),ww=!0,ar.push("Map3D"),eT().load({key:it,version:KF,plugins:ar}).then(function(){Rn(),$b.length&&($b.forEach(function(kn){return kn()}),$b=[])}).catch(function(kn){throw new Error(kn)})):ww&&window.AMap||gt?Rn():$b.push(Rn)});case 3:this.viewport=new _y;case 4:case"end":return mn.stop()}},n,this)}));function r(){return i.apply(this,arguments)}return r}()},{key:"meterToCoord",value:function(r,n){var t=AMap.GeometryUtil.distance(gn(AMap.LngLat,(0,Mn.Z)(r)),gn(AMap.LngLat,(0,Mn.Z)(n))),o=this.lngLatToCoord(r),u=(0,wi.Z)(o,2),c=u[0],v=u[1],E=this.lngLatToCoord(n),G=(0,wi.Z)(E,2),ie=G[0],xe=G[1],Fe=Math.sqrt(Math.pow(c-ie,2)+Math.pow(v-xe,2));return Fe/t}},{key:"updateView",value:function(r){}},{key:"getOverlayContainer",value:function(){}},{key:"exportMap",value:function(r){var n,t=(n=this.getContainer())===null||n===void 0?void 0:n.getElementsByClassName("amap-layer")[0],o=r==="jpg"?t==null?void 0:t.toDataURL("image/jpeg"):t==null?void 0:t.toDataURL("image/png");return o}},{key:"emit",value:function(r){for(var n,t=arguments.length,o=new Array(t>1?t-1:0),u=1;u1?t-1:0),u=1;uzn?n.coordinateSystemService.setCoordinateSystem(ae.P20_OFFSET):n.coordinateSystemService.setCoordinateSystem(ae.P20),n.cameraChangedCallback(n.viewport)}}),n}return(0,vt.Z)(r,[{key:"getModelMatrix",value:function(t,o,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[1,1,1],v=this.viewport.projectFlat(t),E=Nf();return Fd(E,E,qd(v[0],v[1],o)),zd(E,E,qd(c[0],c[1],c[2])),Yd(E,E,u[0]),lp(E,E,u[1]),cp(E,E,u[2]),E}},{key:"init",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u=this,c,v,E,G,ie,xe,Fe,it,gt,Dt,ar,Mr,Zr,mn;return Qr().wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:return c=this.config,v=c.id,E=c.style,G=E===void 0?"light":E,ie=c.minZoom,xe=ie===void 0?0:ie,Fe=c.maxZoom,it=Fe===void 0?18:Fe,gt=c.token,Dt=gt===void 0?ET:gt,ar=c.mapInstance,Mr=c.plugin,Zr=Mr===void 0?[]:Mr,mn=(0,K0.Z)(c,aB),Rn.next=3,new Promise(function(kn){var ui=function(){if(ar)u.map=ar,u.$mapContainer=u.map.getContainer(),setTimeout(function(){u.map.on("camerachange",u.handleCameraChanged),kn()},30);else{u.$mapContainer=u.creatMapContainer(v);var Aa=(0,Me.Z)({mapStyle:u.getMapStyleValue(G),zooms:[xe,it],viewMode:"3D"},mn);Aa.zoom&&(Aa.zoom+=1);var Pa=new AMap.Map(u.$mapContainer,Aa);Pa.on("camerachange",u.handleCameraChanged),Pa.on("camerachange",function(){setTimeout(function(){return u.handleAfterMapChange()})}),u.map=Pa,setTimeout(function(){kn()},10)}};!Ew&&!ar?(Dt===ET&&console.warn(u.configService.getSceneWarninfo("MapToken")),Ew=!0,Zr.push("Map3D"),nB.load({key:Dt,version:uB,plugins:Zr}).then(function(Di){ui(),Hb.length&&(Hb.forEach(function(Aa){return Aa()}),Hb=[])}).catch(function(Di){throw new Error(Di)})):Ew&&window.AMap||ar?ui():Hb.push(ui)});case 3:this.viewport=new iB;case 4:case"end":return Rn.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"meterToCoord",value:function(t,o){var u=AMap.GeometryUtil.distance(gn(AMap.LngLat,(0,Mn.Z)(t)),gn(AMap.LngLat,(0,Mn.Z)(o))),c=this.lngLatToCoord(t),v=(0,wi.Z)(c,2),E=v[0],G=v[1],ie=this.lngLatToCoord(o),xe=(0,wi.Z)(ie,2),Fe=xe[0],it=xe[1],gt=Math.sqrt(Math.pow(E-Fe,2)+Math.pow(G-it,2));return gt/u}},{key:"updateView",value:function(t){}},{key:"getOverlayContainer",value:function(){}},{key:"exportMap",value:function(t){var o,u=(o=this.getContainer())===null||o===void 0?void 0:o.getElementsByClassName("amap-layer")[0],c=t==="jpg"?u==null?void 0:u.toDataURL("image/jpeg"):u==null?void 0:u.toDataURL("image/png");return c}},{key:"onCameraChanged",value:function(t){this.cameraChangedCallback=t}}]),r}(AT))||wT);function fB(e){var i=hB();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function hB(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var dB=function(e){(0,Ce.Z)(r,e);var i=fB(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getServiceConstructor",value:function(){return cB}}]),r}(Uv),pB=function(){function e(){(0,Je.Z)(this,e),(0,St.Z)(this,"projectionMatrix",Nf()),(0,St.Z)(this,"viewMatrix",Nf()),(0,St.Z)(this,"viewProjectionMatrix",Nf()),(0,St.Z)(this,"ViewProjectionMatrixUncentered",Nf()),(0,St.Z)(this,"viewUncenteredMatrix",Nf())}return(0,vt.Z)(e,[{key:"syncWithMapCamera",value:function(r){var n=r.zoom,t=n===void 0?1:n,o=r.center,u=o===void 0?[0,0]:o,c=r.offsetOrigin,v=c===void 0?[0,0]:c,E=r.cameraPosition,G=E===void 0?[0,0,0]:E,ie=r.up,xe=ie===void 0?[0,1,0]:ie,Fe=r.lookAt,it=Fe===void 0?[0,0,0]:Fe,gt=r.aspect,Dt=gt===void 0?1:gt,ar=r.near,Mr=ar===void 0?.1:ar,Zr=r.far,mn=Zr===void 0?1e3:Zr,zn=r.fov,Rn=zn===void 0?45:zn;this.zoom=t,this.center=u,Rr(this.projectionMatrix,Rn/180*Math.PI,Dt,Mr,mn);var kn=qd.apply(d,(0,Mn.Z)(G)),ui=qd.apply(d,(0,Mn.Z)(it)),Di=qd.apply(d,(0,Mn.Z)(xe));Fn(this.viewMatrix,kn,ui,Di),this.viewUncenteredMatrix=hm(this.viewMatrix),Fd(this.viewMatrix,this.viewMatrix,qd(-v[0],v[1],0)),od(this.viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),od(this.ViewProjectionMatrixUncentered,this.projectionMatrix,this.viewMatrix)}},{key:"getZoom",value:function(){return this.zoom}},{key:"getZoomScale",value:function(){return 1048576}},{key:"getCenter",value:function(){var r=(0,wi.Z)(this.center,2),n=r[0],t=r[1];return[n,t]}},{key:"getProjectionMatrix",value:function(){return this.projectionMatrix}},{key:"getModelMatrix",value:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}},{key:"getViewMatrix",value:function(){return this.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewUncenteredMatrix}},{key:"getViewProjectionMatrix",value:function(){return this.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.ViewProjectionMatrixUncentered}},{key:"getFocalDistance",value:function(){return 1.2}},{key:"projectFlat",value:function(r){var n=85.0511287798,t=Math.max(Math.min(n,r[1]),-n),o=256<<20,u=Math.PI/180,c=r[0]*u,v=t*u;v=Math.log(Math.tan(Math.PI/4+v/2));var E=.5/Math.PI,G=.5,ie=-.5/Math.PI;return u=.5,c=o*(E*c+G)-215440491,v=-(o*(ie*v+u)-106744817),[c,v]}}]),e}(),mB=["id","style","minZoom","maxZoom","token","mapInstance","plugin","version"],ST,CT;function vB(e){var i=gB();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function gB(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function yB(e,i){var r=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,n=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(r||n)&&(i||(i=document),!!i)){var t=i.head||i.getElementsByTagName("head")[0];if(!t){t=i.createElement("head");var o=i.body||i.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(t,o):i.documentElement.appendChild(t)}var u=i.createElement("style");return u.type="text/css",u.styleSheet?u.styleSheet.cssText=e:u.appendChild(i.createTextNode(e)),t.appendChild(u),u}}yB(`.amap-logo{ - display: none !important; -} -.amap-copyright { - display: none !important; -} -`);var TT=[108.92361,34.54083];window.forceWebGL=!0;var MT="f59bcf249433f8b05caaee19f349b3d7",PT="2.0",a$=!1,o$=null,_B=(ST=(0,bo.b2)(),ST(CT=function(e){(0,Ce.Z)(r,e);var i=vB(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;uo.getLng()||c.lng3&&arguments[3]!==void 0?arguments[3]:[1,1,1],v=this.map.customCoords.lngLatToCoord(t),E=Nf();return Fd(E,E,qd(v[0],v[1],o)),zd(E,E,qd(c[0],c[1],c[2])),Yd(E,E,u[0]),lp(E,E,u[1]),cp(E,E,u[2]),E}},{key:"init",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G,ie,xe,Fe,it,gt,Dt,ar,Mr,Zr,mn,zn,Rn,kn,ui,Di,Aa,Pa;return Qr().wrap(function(ns){for(;;)switch(ns.prev=ns.next){case 0:if(u=this.config,c=u.id,v=u.style,E=v===void 0?"light":v,G=u.minZoom,ie=G===void 0?0:G,xe=u.maxZoom,Fe=xe===void 0?24:xe,it=u.token,gt=it===void 0?MT:it,Dt=u.mapInstance,ar=u.plugin,Mr=ar===void 0?[]:ar,Zr=u.version,mn=Zr===void 0?PT:Zr,zn=(0,K0.Z)(u,mB),this.viewport=new pB,window.AMap||Dt){ns.next=6;break}return Mr.push("Map3D"),ns.next=6,eT().load({key:gt,version:PT,plugins:Mr});case 6:Dt?(this.map=Dt,this.$mapContainer=this.map.getContainer(),kn=this.map.getCenter(),(Rn=this.map.customCoords)===null||Rn===void 0||Rn.setCenter([kn.lng,kn.lat]),this.setCustomCoordCenter([kn.lng,kn.lat]),this.map.on("viewchange",this.handleViewChanged)):(this.$mapContainer=this.creatMapContainer(c),Di=(0,Me.Z)({mapStyle:this.getMapStyleValue(E),zooms:[ie,Fe],viewMode:"3D"},zn),Di.zoom&&(Di.zoom+=1),gt===MT&&(window._AMapSecurityConfig={securityJsCode:"2653011adeb04230b3a26cc9a780a800"},console.warn("%c".concat(this.configService.getSceneWarninfo("MapToken"),"!"),"color: #873bf4;font-weigh:900;font-size: 16px;")),Aa=new AMap.Map(this.$mapContainer,Di),this.map=Aa,Pa=Aa.getCenter(),(ui=this.map.customCoords)===null||ui===void 0||ui.setCenter([Pa.lng,Pa.lat]),this.setCustomCoordCenter([Pa.lng,Pa.lat]),Aa.on("viewchange",this.handleViewChanged)),this.initViewPort();case 8:case"end":return ns.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"getMapContainer",value:function(){return this.$mapContainer}},{key:"onCameraChanged",value:function(t){this.cameraChangedCallback=t}},{key:"initViewPort",value:function(){var t,o=((t=this.map.customCoords)===null||t===void 0?void 0:t.getCameraParams())||{},u=o.fov,c=o.near,v=o.far,E=o.aspect,G=o.position,ie=o.lookAt,xe=o.up;this.emit("mapchange");var Fe=this.map.customCoords.getCenter(),it=this.map.getZoom();this.cameraChangedCallback&&(this.viewport.syncWithMapCamera({aspect:E,far:v,fov:u,cameraPosition:G,lookAt:ie,near:c,up:xe,zoom:it-1,center:Fe,offsetOrigin:[G[0],G[1]]}),this.coordinateSystemService.setCoordinateSystem(ae.P20_2),this.cameraChangedCallback(this.viewport))}},{key:"_sub",value:function(t,o){var u=[0,0];return u[0]=t[0]-o[0],u[1]=t[1]-o[1],u}}]),r}(AT))||CT);function AB(e){var i=bB();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function bB(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var IT=function(e){(0,Ce.Z)(r,e);var i=AB(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getServiceConstructor",value:function(){return _B}}]),r}(Uv),xB={light:"mapbox://styles/zcxduo/ck2ypyb1r3q9o1co1766dex29",dark:"mapbox://styles/zcxduo/ck241p6413s0b1cpayzldv7x7",normal:"mapbox://styles/mapbox/streets-v11",blank:{version:8,sources:{},layers:[{id:"background",type:"background",layout:{visibility:"none"}}]}},RT,OT,LT,DT,kT,FT,H1,BT,NT,zT,ZT,UT={mapmove:"move",camerachange:"move",zoomchange:"zoom",dragging:"drag"},wB=12,Dg=(RT=(0,bo.b2)(),OT=(0,bo.f3)(vr.MapConfig),LT=(0,bo.f3)(vr.IGlobalConfigService),DT=(0,bo.f3)(vr.ICoordinateSystemService),kT=(0,bo.f3)(vr.IEventEmitter),RT(FT=(H1=function(){function e(){var i=this;(0,Je.Z)(this,e),(0,St.Z)(this,"version","DEFAUlTMAP"),(0,St.Z)(this,"simpleMapCoord",new sT),(0,St.Z)(this,"bgColor","rgba(0.0, 0.0, 0.0, 0.0)"),A(this,"config",BT,this),A(this,"configService",NT,this),A(this,"coordinateSystemService",zT,this),A(this,"eventEmitter",ZT,this),(0,St.Z)(this,"handleCameraChanged",function(r){var n=i.map.getCenter(),t=n.lat,o=n.lng;i.emit("mapchange"),i.viewport.syncWithMapCamera({bearing:i.map.getBearing(),center:[o,t],viewportHeight:i.map.transform.height,pitch:i.map.getPitch(),viewportWidth:i.map.transform.width,zoom:i.map.getZoom(),cameraHeight:0}),i.updateCoordinateSystemService(),i.cameraChangedCallback(i.viewport)})}return(0,vt.Z)(e,[{key:"setBgColor",value:function(r){this.bgColor=r}},{key:"addMarkerContainer",value:function(){var r=this.map.getCanvasContainer();this.markerContainer=aa("div","l7-marker-container",r),this.markerContainer.setAttribute("tabindex","-1")}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"getOverlayContainer",value:function(){}},{key:"on",value:function(r,n){pm.indexOf(r)!==-1?this.eventEmitter.on(r,n):this.map.on(UT[r]||r,n)}},{key:"off",value:function(r,n){this.map.off(UT[r]||r,n),this.eventEmitter.off(r,n)}},{key:"getContainer",value:function(){return this.map.getContainer()}},{key:"getMapCanvasContainer",value:function(){return this.map.getCanvasContainer()}},{key:"getSize",value:function(){if(this.version==="SIMPLE")return this.simpleMapCoord.getSize();var r=this.map.transform;return[r.width,r.height]}},{key:"getType",value:function(){return"default"}},{key:"getZoom",value:function(){return this.map.getZoom()}},{key:"setZoom",value:function(r){return this.map.setZoom(r)}},{key:"getCenter",value:function(){return this.map.getCenter()}},{key:"setCenter",value:function(r){this.map.setCenter(r)}},{key:"getPitch",value:function(){return this.map.getPitch()}},{key:"getRotation",value:function(){return this.map.getBearing()}},{key:"getBounds",value:function(){return this.map.getBounds().toArray()}},{key:"getMinZoom",value:function(){return this.map.getMinZoom()}},{key:"getMaxZoom",value:function(){return this.map.getMaxZoom()}},{key:"setRotation",value:function(r){this.map.setBearing(r)}},{key:"zoomIn",value:function(r,n){this.map.zoomIn(r,n)}},{key:"zoomOut",value:function(r,n){this.map.zoomOut(r,n)}},{key:"setPitch",value:function(r){return this.map.setPitch(r)}},{key:"panTo",value:function(r){this.map.panTo(r)}},{key:"panBy",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.map.panBy([r,n])}},{key:"fitBounds",value:function(r,n){this.map.fitBounds(r,n)}},{key:"setMaxZoom",value:function(r){this.map.setMaxZoom(r)}},{key:"setMinZoom",value:function(r){this.map.setMinZoom(r)}},{key:"setMapStatus",value:function(r){r.doubleClickZoom===!0&&this.map.doubleClickZoom.enable(),r.doubleClickZoom===!1&&this.map.doubleClickZoom.disable(),r.dragEnable===!1&&this.map.dragPan.disable(),r.dragEnable===!0&&this.map.dragPan.enable(),r.rotateEnable===!1&&this.map.dragRotate.disable(),r.dragEnable===!0&&this.map.dragRotate.enable(),r.keyboardEnable===!1&&this.map.keyboard.disable(),r.keyboardEnable===!0&&this.map.keyboard.enable(),r.zoomEnable===!1&&this.map.scrollZoom.disable(),r.zoomEnable===!0&&this.map.scrollZoom.enable()}},{key:"setZoomAndCenter",value:function(r,n){this.map.flyTo({zoom:r,center:n})}},{key:"setMapStyle",value:function(r){this.map.setStyle(this.getMapStyleValue(r))}},{key:"meterToCoord",value:function(r,n){return 1}},{key:"pixelToLngLat",value:function(r){return this.map.unproject(r)}},{key:"lngLatToPixel",value:function(r){return this.map.project(r)}},{key:"containerToLngLat",value:function(r){return this.map.unproject(r)}},{key:"lngLatToContainer",value:function(r){return this.map.project(r)}},{key:"getMapStyle",value:function(){try{var r,n=(r=this.map.getStyle().sprite)!==null&&r!==void 0?r:"";return/^mapbox:\/\/sprites\/zcxduo\/\w+\/\w+$/.test(n)?n==null?void 0:n.replace(/\/\w+$/,"").replace(/sprites/,"styles"):n}catch(t){return""}}},{key:"getMapStyleConfig",value:function(){return xB}},{key:"getMapStyleValue",value:function(r){var n;return(n=this.getMapStyleConfig()[r])!==null&&n!==void 0?n:r}},{key:"destroy",value:function(){this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(r){for(var n,t=arguments.length,o=new Array(t>1?t-1:0),u=1;u1?t-1:0),u=1;uwB&&n?this.coordinateSystemService.setCoordinateSystem(ae.LNGLAT_OFFSET):this.coordinateSystemService.setCoordinateSystem(ae.LNGLAT)}}]),e}(),BT=p(H1.prototype,"config",[OT],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),NT=p(H1.prototype,"configService",[LT],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),zT=p(H1.prototype,"coordinateSystemService",[DT],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ZT=p(H1.prototype,"eventEmitter",[kT],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),H1))||FT);if(!window)throw Error("BMapGL JSAPI can only be used in Browser.");var $v=function(e){return e.notload="notload",e.loading="loading",e.loaded="loaded",e.failed="failed",e}($v||{}),ag={key:"",BMapGL:{version:"1.0"}},kg={BMapGL:$v.notload},Sw=[],jT=function(i){if(typeof i=="function"){if(kg.BMapGL===$v.loaded){i(window.BMapGL);return}Sw.push(i)}},EB=function(i){return new Promise(function(r,n){if(kg.BMapGL===$v.failed)n("");else if(kg.BMapGL===$v.notload){var t=i.key,o=i.version;if(!t){n("\u8BF7\u586B\u5199key");return}ag.key=t,ag.BMapGL.version=o||ag.BMapGL.version,kg.BMapGL=$v.loading;var u=document.body||document.head;window.___onBMapGLAPILoaded=function(v){if(delete window.___onBMapGLAPILoaded,v)kg.BMapGL=$v.failed,n(v);else for(kg.BMapGL=$v.loaded;Sw.length;)Sw.splice(0,1)[0](window.BMapGL)};var c=document.createElement("script");c.type="text/javascript",c.src="https://api.map.baidu.com/api?type=webgl&v=".concat(ag.BMapGL.version,"&ak=").concat(ag.key,"&callback=___onBMapGLAPILoaded"),c.onerror=function(v){kg.BMapGL=$v.failed,n(v)},u.appendChild(c),jT(r)}else if(kg.BMapGL===$v.loaded){if(i.key&&i.key!==ag.key){n("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");return}if(i.version&&i.version!==ag.BMapGL.version){n("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C JSAPI \u6DF7\u7528");return}r(window.BMapGL)}else{if(i.key&&i.key!==ag.key){n("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");return}if(i.version&&i.version!==ag.BMapGL.version){n("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C JSAPI \u6DF7\u7528");return}jT(r)}})},SB=function(){delete window.BMapGL,ag={key:"",BMapGL:{version:"1.0"}},kg={BMapGL:$v.notload}},CB={load:EB,reset:SB},TB=["id","center","zoom","token","mapInstance","version","mapSize","minZoom","maxZoom"];function MB(e){var i=PB();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function PB(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function IB(e,i){var r=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,n=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(r||n)&&(i||(i=document),!!i)){var t=i.head||i.getElementsByTagName("head")[0];if(!t){t=i.createElement("head");var o=i.body||i.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(t,o):i.documentElement.appendChild(t)}var u=i.createElement("style");return u.type="text/css",u.styleSheet?u.styleSheet.cssText=e:u.appendChild(i.createTextNode(e)),t.appendChild(u),u}}IB(`.BMap_cpyCtrl .anchorBL { - display: none !important; -} - -.anchorBL { - display: none !important; -} -`);var VT={mapmove:"moving",contextmenu:"rightclick",camerachange:"update",zoomchange:"zoomend"},$T="zLhopYPPERGtpGOgimcdKcCimGRyyIsh",HT="1.0",RB=function(e){(0,Ce.Z)(r,e);var i=MB(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u3&&arguments[3]!==void 0?arguments[3]:[1,1,1],v=this.viewport.projectFlat(t),E=Nf();return Fd(E,E,qd(v[0],v[1],o)),zd(E,E,qd(c[0],c[1],c[2])),Yd(E,E,u[0]),lp(E,E,u[1]),cp(E,E,u[2]),E}},{key:"getCustomCoordCenter",value:function(){throw new Error("Method not implemented.")}},{key:"exportMap",value:function(t){var o=this.getMap()._webglPainter._canvas,u=t==="jpg"?o==null?void 0:o.toDataURL("image/jpeg"):o==null?void 0:o.toDataURL("image/png");return u}},{key:"hideLogo",value:function(){var t=this.map.getContainer();t&&Po(t,"bmap-contianer--hide-logo")}},{key:"initMapByConfig",value:function(t){var o=t.style,u=t.pitch,c=u===void 0?0:u,v=t.rotation,E=v===void 0?0:v,G=t.logoVisible,ie=G===void 0?!0:G;o&&this.setMapStyle(o),c&&this.setPitch(c),E&&this.setRotation(E),ie===!1&&this.hideLogo()}}]),r}(Dg);function OB(e){var i=LB();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function LB(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var DB=function(e){(0,Ce.Z)(r,e);var i=OB(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getServiceConstructor",value:function(){return RB}}]),r}(Uv),kB=_(58240),FB=_.n(kB);function BB(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=NB(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function NB(e,i){if(e){if(typeof e=="string")return GT(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GT(e,i)}}function GT(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r1?i-1:0),n=1;n90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}return(0,vt.Z)(e,[{key:"wrap",value:function(){return new e(Tw(this.lng,-180,180),this.lat)}},{key:"toArray",value:function(){return[this.lng,this.lat]}},{key:"toString",value:function(){return"LngLat(".concat(this.lng,", ").concat(this.lat,")")}},{key:"distanceTo",value:function(r){var n=Math.PI/180,t=this.lat*n,o=r.lat*n,u=Math.sin(t)*Math.sin(o)+Math.cos(t)*Math.cos(o)*Math.cos((r.lng-this.lng)*n),c=XT*Math.acos(Math.min(u,1));return c}}],[{key:"convert",value:function(r){if(r instanceof e)return r;if(Array.isArray(r)&&(r.length===2||r.length===3))return new e(Number(r[0]),Number(r[1]));if(!Array.isArray(r)&&(0,bf.Z)(r)==="object"&&r!==null){var n="lng"in r?r.lng:r.lon;return new e(Number(n),Number(r.lat))}throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}]),e}(),Y_=function(){function e(i,r){(0,Je.Z)(this,e),i&&(r?this.setSouthWest(i).setNorthEast(r):i.length===4?this.setSouthWest([i[0],i[1]]).setNorthEast([i[2],i[3]]):this.setSouthWest(i[0]).setNorthEast(i[1]))}return(0,vt.Z)(e,[{key:"setNorthEast",value:function(r){return this.ne=r instanceof $0?new $0(r.lng,r.lat):$0.convert(r),this}},{key:"setSouthWest",value:function(r){return this.sw=r instanceof $0?new $0(r.lng,r.lat):$0.convert(r),this}},{key:"extend",value:function(r){var n=this.sw,t=this.ne,o,u;if(r instanceof $0)o=r,u=r;else if(r instanceof e){if(o=r.sw,u=r.ne,!o||!u)return this}else{if(Array.isArray(r))if(r.length===4||r.every(Array.isArray)){var c=r;return this.extend(e.convert(c))}else{var v=r;return this.extend($0.convert(v))}return this}return!n&&!t?(this.sw=new $0(o.lng,o.lat),this.ne=new $0(u.lng,u.lat)):(n.lng=Math.min(o.lng,n.lng),n.lat=Math.min(o.lat,n.lat),t.lng=Math.max(u.lng,t.lng),t.lat=Math.max(u.lat,t.lat)),this}},{key:"getCenter",value:function(){return new $0((this.sw.lng+this.ne.lng)/2,(this.sw.lat+this.ne.lat)/2)}},{key:"getSouthWest",value:function(){return this.sw}},{key:"getNorthEast",value:function(){return this.ne}},{key:"getNorthWest",value:function(){return new $0(this.getWest(),this.getNorth())}},{key:"getSouthEast",value:function(){return new $0(this.getEast(),this.getSouth())}},{key:"getWest",value:function(){return this.sw.lng}},{key:"getSouth",value:function(){return this.sw.lat}},{key:"getEast",value:function(){return this.ne.lng}},{key:"getNorth",value:function(){return this.ne.lat}},{key:"toArray",value:function(){return[this.sw.toArray(),this.ne.toArray()]}},{key:"toString",value:function(){return"LngLatBounds(".concat(this.sw.toString(),", ").concat(this.ne.toString(),")")}},{key:"isEmpty",value:function(){return!(this.sw&&this.ne)}},{key:"contains",value:function(r){var n=$0.convert(r),t=n.lng,o=n.lat,u=this.sw.lat<=o&&o<=this.ne.lat,c=this.sw.lng<=t&&t<=this.ne.lng;return this.sw.lng>this.ne.lng&&(c=this.sw.lng>=t&&t>=this.ne.lng),u&&c}}],[{key:"convert",value:function(r){return r instanceof e?r:new e(r)}}]),e}(),Op=function(){function e(i,r){(0,Je.Z)(this,e),this.x=i,this.y=r}return(0,vt.Z)(e,[{key:"clone",value:function(){return new e(this.x,this.y)}},{key:"_add",value:function(r){return this.x+=r.x,this.y+=r.y,this}},{key:"add",value:function(r){return this.clone()._add(r)}},{key:"_sub",value:function(r){return this.x-=r.x,this.y-=r.y,this}},{key:"sub",value:function(r){return this.clone()._sub(r)}},{key:"_multByPoint",value:function(r){return this.x*=r.x,this.y*=r.y,this}},{key:"multByPoint",value:function(r){return this.clone()._multByPoint(r)}},{key:"_divByPoint",value:function(r){return this.x/=r.x,this.y/=r.y,this}},{key:"divByPoint",value:function(r){return this.clone()._divByPoint(r)}},{key:"_mult",value:function(r){return this.x*=r,this.y*=r,this}},{key:"mult",value:function(r){return this.clone()._mult(r)}},{key:"_div",value:function(r){return this.x/=r,this.y/=r,this}},{key:"div",value:function(r){return this.clone()._div(r)}},{key:"_rotate",value:function(r){var n=Math.cos(r),t=Math.sin(r),o=n*this.x-t*this.y,u=t*this.x+n*this.y;return this.x=o,this.y=u,this}},{key:"rotate",value:function(r){return this.clone()._rotate(r)}},{key:"_rotateAround",value:function(r,n){var t=Math.cos(r),o=Math.sin(r),u=n.x+t*(this.x-n.x)-o*(this.y-n.y),c=n.y+o*(this.x-n.x)+t*(this.y-n.y);return this.x=u,this.y=c,this}},{key:"roateAround",value:function(r,n){return this.clone()._rotateAround(r,n)}},{key:"_matMult",value:function(r){var n=r[0]*this.x+r[1]*this.y,t=r[2]*this.x+r[3]*this.y;return this.x=n,this.y=t,this}},{key:"matMult",value:function(r){return this.clone()._matMult(r)}},{key:"_unit",value:function(){return this.div(this.mag()),this}},{key:"unit",value:function(){return this.clone()._unit()}},{key:"_perp",value:function(){var r=this.y;return this.y=this.x,this.x=-r,this}},{key:"perp",value:function(){return this.clone()._perp()}},{key:"_round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},{key:"round",value:function(){return this.clone()._round()}},{key:"mag",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y)}},{key:"equals",value:function(r){return this.x===r.x&&this.y===r.y}},{key:"dist",value:function(r){return Math.sqrt(this.distSqr(r))}},{key:"distSqr",value:function(r){var n=r.x-this.x,t=r.y-this.y;return n*n+t*t}},{key:"angle",value:function(){return Math.atan2(this.y,this.x)}},{key:"angleTo",value:function(r){return Math.atan2(this.y-r.y,this.x-r.x)}},{key:"angleWith",value:function(r){return this.angleWithSep(r.x,r.y)}},{key:"angleWithSep",value:function(r,n){return Math.atan2(this.x*n-this.y*r,this.x*r+this.y*n)}}],[{key:"convert",value:function(r){return r instanceof e?r:Array.isArray(r)?new e(r[0],r[1]):r}}]),e}();function VB(){var e=new eh(4);return eh!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function s$(e){var i=new glMatrix.ARRAY_TYPE(4);return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i}function u$(e,i){return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e}function l$(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function c$(e,i,r,n){var t=new glMatrix.ARRAY_TYPE(4);return t[0]=e,t[1]=i,t[2]=r,t[3]=n,t}function f$(e,i,r,n,t){return e[0]=i,e[1]=r,e[2]=n,e[3]=t,e}function h$(e,i){if(e===i){var r=i[1];e[1]=i[2],e[2]=r}else e[0]=i[0],e[1]=i[2],e[2]=i[1],e[3]=i[3];return e}function d$(e,i){var r=i[0],n=i[1],t=i[2],o=i[3],u=r*o-t*n;return u?(u=1/u,e[0]=o*u,e[1]=-n*u,e[2]=-t*u,e[3]=r*u,e):null}function p$(e,i){var r=i[0];return e[0]=i[3],e[1]=-i[1],e[2]=-i[2],e[3]=r,e}function m$(e){return e[0]*e[3]-e[2]*e[1]}function v$(e,i,r){var n=i[0],t=i[1],o=i[2],u=i[3],c=r[0],v=r[1],E=r[2],G=r[3];return e[0]=n*c+o*v,e[1]=t*c+u*v,e[2]=n*E+o*G,e[3]=t*E+u*G,e}function $B(e,i,r){var n=i[0],t=i[1],o=i[2],u=i[3],c=Math.sin(r),v=Math.cos(r);return e[0]=n*v+o*c,e[1]=t*v+u*c,e[2]=n*-c+o*v,e[3]=t*-c+u*v,e}function g$(e,i,r){var n=i[0],t=i[1],o=i[2],u=i[3],c=r[0],v=r[1];return e[0]=n*c,e[1]=t*c,e[2]=o*v,e[3]=u*v,e}function y$(e,i){var r=Math.sin(i),n=Math.cos(i);return e[0]=n,e[1]=r,e[2]=-r,e[3]=n,e}function _$(e,i){return e[0]=i[0],e[1]=0,e[2]=0,e[3]=i[1],e}function A$(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function b$(e){return Math.hypot(e[0],e[1],e[2],e[3])}function x$(e,i,r,n){return e[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-e[2]*r[1],[e,i,r]}function w$(e,i,r){return e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e[3]=i[3]+r[3],e}function E$(e,i,r){return e[0]=i[0]-r[0],e[1]=i[1]-r[1],e[2]=i[2]-r[2],e[3]=i[3]-r[3],e}function S$(e,i){return e[0]===i[0]&&e[1]===i[1]&&e[2]===i[2]&&e[3]===i[3]}function C$(e,i){var r=e[0],n=e[1],t=e[2],o=e[3],u=i[0],c=i[1],v=i[2],E=i[3];return Math.abs(r-u)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-c)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(t-v)<=glMatrix.EPSILON*Math.max(1,Math.abs(t),Math.abs(v))&&Math.abs(o-E)<=glMatrix.EPSILON*Math.max(1,Math.abs(o),Math.abs(E))}function T$(e,i,r){return e[0]=i[0]*r,e[1]=i[1]*r,e[2]=i[2]*r,e[3]=i[3]*r,e}function M$(e,i,r,n){return e[0]=i[0]+r[0]*n,e[1]=i[1]+r[1]*n,e[2]=i[2]+r[2]*n,e[3]=i[3]+r[3]*n,e}var P$=null,I$=null,HB=function(){function e(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if((0,Je.Z)(this,e),isNaN(i)||i<0||isNaN(r)||r<0||isNaN(n)||n<0||isNaN(t)||t<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=i,this.bottom=r,this.left=n,this.right=t}return(0,vt.Z)(e,[{key:"interpolate",value:function(r,n,t){return n.top!=null&&r.top!=null&&(this.top=kv(r.top,n.top,t)),n.bottom!=null&&r.bottom!=null&&(this.bottom=kv(r.bottom,n.bottom,t)),n.left!=null&&r.left!=null&&(this.left=kv(r.left,n.left,t)),n.right!=null&&r.right!=null&&(this.right=kv(r.right,n.right,t)),this}},{key:"getCenter",value:function(r,n){var t=Fg((this.left+r-this.right)/2,0,r),o=Fg((this.top+n-this.bottom)/2,0,n);return new Op(t,o)}},{key:"equals",value:function(r){return this.top===r.top&&this.bottom===r.bottom&&this.left===r.left&&this.right===r.right}},{key:"clone",value:function(){return new e(this.top,this.bottom,this.left,this.right)}},{key:"toJSON",value:function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}]),e}(),YT=2*Math.PI*XT;function KT(e){return YT*Math.cos(e*Math.PI/180)}function Wb(e){return(180+e)/360}function Xb(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function qT(e,i){return e/KT(i)}function GB(e){return e*360-180}function Iw(e){var i=180-e*360;return 360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90}function WB(e,i){return e*KT(Iw(i))}function XB(e){return 1/Math.cos(e*Math.PI/180)}var Bg=function(){function e(i,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;(0,Je.Z)(this,e),this.x=+i,this.y=+r,this.z=+n}return(0,vt.Z)(e,[{key:"toLngLat",value:function(){return new $0(GB(this.x),Iw(this.y))}},{key:"toAltitude",value:function(){return WB(this.z,this.y)}},{key:"meterInMercatorCoordinateUnits",value:function(){return 1/YT*XB(Iw(this.y))}}],[{key:"fromLngLat",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=$0.convert(r);return new e(Wb(t.lng),Xb(t.lat),qT(n,t.lat))}}]),e}();function YB(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=KB(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function KB(e,i){if(e){if(typeof e=="string")return QT(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return QT(e,i)}}function QT(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);rn&&(E=n-ar)}if(this.lngRange){var Mr=it.x,Zr=G.x/2;Mr-Zro&&(v=o-Zr)}(v!==void 0||E!==void 0)&&(this.center=this.unproject(new Op(v!==void 0?v:it.x,E!==void 0?E:it.y))),this.unmodified=ie,this.constraining=!1}}},{key:"calcMatrices",value:function(){if(this.height){var r=this._fov/2,n=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(r)*this.height;var t=Math.PI/2+this._pitch,o=this._fov*(.5+n.y/this.height),u=Math.sin(o)*this.cameraToCenterDistance/Math.sin(Fg(Math.PI-t-o,.01,Math.PI-.01)),c=this.point,v=c.x,E=c.y,G=Math.cos(Math.PI/2-this._pitch)*u+this.cameraToCenterDistance,ie=G*1.01,xe=this.height/50,Fe=new Float64Array(16);Rr(Fe,this._fov,this.width/this.height,xe,ie),Fe[8]=-n.x*2/this.width,Fe[9]=n.y*2/this.height,zd(Fe,Fe,[1,-1,1]),Fd(Fe,Fe,[0,0,-this.cameraToCenterDistance]),Yd(Fe,Fe,this._pitch),cp(Fe,Fe,this.angle),Fd(Fe,Fe,[-v,-E,0]),this.mercatorMatrix=zd([],Fe,[this.worldSize,this.worldSize,this.worldSize]),zd(Fe,Fe,[1,1,qT(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Fe,this.invProjMatrix=V0([],this.projMatrix);var it=this.width%2/2,gt=this.height%2/2,Dt=Math.cos(this.angle),ar=Math.sin(this.angle),Mr=v-Math.round(v)+Dt*it+ar*gt,Zr=E-Math.round(E)+Dt*gt+ar*it,mn=new Float64Array(Fe);if(Fd(mn,mn,[Mr>.5?Mr-1:Mr,Zr>.5?Zr-1:Zr,0]),this.alignedProjMatrix=mn,Fe=Nf(),zd(Fe,Fe,[this.width/2,-this.height/2,1]),Fd(Fe,Fe,[1,-1,0]),this.labelPlaneMatrix=Fe,Fe=Nf(),zd(Fe,Fe,[1,-1,1]),Fd(Fe,Fe,[-1,-1,0]),zd(Fe,Fe,[2/this.width,2/this.height,1]),this.glCoordMatrix=Fe,this.pixelMatrix=od(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Fe=V0(new Float64Array(16),this.pixelMatrix),!Fe)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Fe,this.posMatrixCache={},this.alignedPosMatrixCache={}}}}]),e}(),QB=vi.merge,f0=(0,vt.Z)(function e(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,Je.Z)(this,e),QB(this,r),this.type=i});function JB(e){var i=eN();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function eN(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var og=vi.merge,JT=function(e){(0,Ce.Z)(r,e);var i=JB(r);function r(n){var t;(0,Je.Z)(this,r),t=i.call(this),(0,St.Z)((0,Gr.Z)(t),"renderFrameCallback",function(){var G=Math.min((Ay()-t.easeStart)/t.easeOptions.duration,1);t.onEaseFrame(t.easeOptions.easing(G)),G<1?t.easeFrameId=t.requestRenderFrame(t.renderFrameCallback):t.stop()}),t.options=n;var o=n.minZoom,u=n.maxZoom,c=n.minPitch,v=n.maxPitch,E=n.renderWorldCopies;return t.moving=!1,t.zooming=!1,t.bearingSnap=n.bearingSnap,t.pitchEnabled=n.pitchEnabled,t.rotateEnabled=n.rotateEnabled,t.transform=new qB(o,u,c,v,E),t}return(0,vt.Z)(r,[{key:"requestRenderFrame",value:function(t){return 0}},{key:"cancelRenderFrame",value:function(t){}},{key:"getCenter",value:function(){var t=this.transform.center,o=t.lng,u=t.lat;return new $0(o,u)}},{key:"getZoom",value:function(){return this.transform.zoom}},{key:"getPitch",value:function(){return this.transform.pitch}},{key:"setCenter",value:function(t,o){return this.jumpTo({center:t},o)}},{key:"setPitch",value:function(t,o){return this.jumpTo({pitch:t},o),this}},{key:"getBearing",value:function(){return this.transform.bearing}},{key:"panTo",value:function(t,o,u){return this.easeTo(og({center:t},o),u)}},{key:"panBy",value:function(t,o,u){return t=Op.convert(t).mult(-1),this.panTo(this.transform.center,jB({offset:t},o||{}),u)}},{key:"zoomOut",value:function(t,o){return this.zoomTo(this.getZoom()-1,t,o),this}},{key:"setBearing",value:function(t,o){return this.jumpTo({bearing:t},o),this}},{key:"setZoom",value:function(t,o){return this.jumpTo({zoom:t},o),this}},{key:"zoomIn",value:function(t,o){return this.zoomTo(this.getZoom()+1,t,o),this}},{key:"zoomTo",value:function(t,o,u){return this.easeTo(og({zoom:t},o),u)}},{key:"getPadding",value:function(){return this.transform.padding}},{key:"setPadding",value:function(t,o){return this.jumpTo({padding:t},o),this}},{key:"rotateTo",value:function(t,o,u){return this.easeTo(og({bearing:t},o),u)}},{key:"resetNorth",value:function(t,o){return this.rotateTo(0,og({duration:1e3},t),o),this}},{key:"resetNorthPitch",value:function(t,o){return this.easeTo(og({bearing:0,pitch:0,duration:1e3},t),o),this}},{key:"fitBounds",value:function(t,o,u){return this.fitInternal(this.cameraForBounds(t,o),o,u)}},{key:"cameraForBounds",value:function(t,o){return t=Y_.convert(t),this.cameraForBoxAndBearing(t.getNorthWest(),t.getSouthEast(),0,o)}},{key:"snapToNorth",value:function(t,o){return Math.abs(this.getBearing())0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;this.stop();var u=this.transform,c=!1,v=!1,E=!1;return t.zoom!==void 0&&u.zoom!==+t.zoom&&(c=!0,u.zoom=+t.zoom),t.center!==void 0&&(u.center=$0.convert(t.center)),t.bearing!==void 0&&u.bearing!==+t.bearing&&(v=!0,u.bearing=+t.bearing),t.pitch!==void 0&&u.pitch!==+t.pitch&&(E=!0,u.pitch=+t.pitch),t.padding!==void 0&&!u.isPaddingEqual(t.padding)&&(u.padding=t.padding),this.emit("movestart",new f0("movestart",o)),this.emit("move",new f0("move",o)),c&&(this.emit("zoomstart",new f0("zoomstart",o)),this.emit("zoom",new f0("zoom",o)),this.emit("zoomend",new f0("zoomend",o))),v&&(this.emit("rotatestart",new f0("rotatestart",o)),this.emit("rotate",new f0("rotate",o)),this.emit("rotateend",new f0("rotateend",o))),E&&(this.emit("pitchstart",new f0("pitchstart",o)),this.emit("pitch",new f0("pitch",o)),this.emit("pitchend",new f0("pitchend",o))),this.emit("moveend",new f0("moveend",o))}},{key:"easeTo",value:function(){var t=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1?arguments[1]:void 0;o=og({offset:[0,0],duration:500,easing:Pw},o),(o.animate===!1||!o.essential&&WT())&&(o.duration=0);var c=this.transform,v=this.getZoom(),E=this.getBearing(),G=this.getPitch(),ie=this.getPadding(),xe=o.zoom?+o.zoom:v,Fe=o.bearing?this.normalizeBearing(o.bearing,E):E,it=o.pitch?+o.pitch:G,gt=o.padding?o.padding:c.padding,Dt=Op.convert(o.offset),ar=c.centerPoint.add(Dt),Mr=c.pointLocation(ar),Zr=$0.convert(o.center||Mr);this.normalizeCenter(Zr);var mn=c.project(Mr),zn=c.project(Zr).sub(mn),Rn=c.zoomScale(xe-v),kn,ui;o.around&&(kn=$0.convert(o.around),ui=c.locationPoint(kn));var Di={moving:this.moving,zooming:this.zooming,rotating:this.rotating,pitching:this.pitching};return this.zooming=this.zooming||xe!==v,this.rotating=this.rotating||E!==Fe,this.pitching=this.pitching||it!==G,this.padding=!c.isPaddingEqual(gt),this.easeId=o.easeId,this.prepareEase(u,o.noMoveStart,Di),clearTimeout(this.easeEndTimeoutID),this.ease(function(Aa){if(t.zooming&&(c.zoom=kv(v,xe,Aa)),t.rotating&&t.rotateEnabled&&(c.bearing=kv(E,Fe,Aa)),t.pitching&&t.pitchEnabled&&(c.pitch=kv(G,it,Aa)),t.padding&&(c.interpolatePadding(ie,gt,Aa),ar=c.centerPoint.add(Dt)),kn)c.setLocationAtPoint(kn,ui);else{var Pa=c.zoomScale(c.zoom-v),Lo=xe>v?Math.min(2,Rn):Math.max(.5,Rn),ns=Math.pow(Lo,1-Aa),ws=c.unproject(mn.add(zn.mult(Aa*ns)).mult(Pa));c.setLocationAtPoint(c.renderWorldCopies?ws.wrap():ws,ar)}t.fireMoveEvents(u)},function(Aa){t.afterEase(u,Aa)},o),this}},{key:"flyTo",value:function(){var t=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1?arguments[1]:void 0;if(!o.essential&&WT()){var c=zB(o,["center","zoom","bearing","pitch","around"]);return this.jumpTo(c,u)}this.stop(),o=og({offset:[0,0],speed:1.2,curve:1.42,easing:Pw},o);var v=this.transform,E=this.getZoom(),G=this.getBearing(),ie=this.getPitch(),xe=this.getPadding(),Fe=o.zoom?Fg(+o.zoom,v.minZoom,v.maxZoom):E,it=o.bearing?this.normalizeBearing(o.bearing,G):G,gt=o.pitch?+o.pitch:ie,Dt="padding"in o?o.padding:v.padding,ar=v.zoomScale(Fe-E),Mr=Op.convert(o.offset),Zr=v.centerPoint.add(Mr),mn=v.pointLocation(Zr),zn=$0.convert(o.center||mn);this.normalizeCenter(zn);var Rn=v.project(mn),kn=v.project(zn).sub(Rn),ui=o.curve,Di=Math.max(v.width,v.height),Aa=Di/ar,Pa=kn.mag();if("minZoom"in o){var Lo=Fg(Math.min(o.minZoom,E,Fe),v.minZoom,v.maxZoom),ns=Di/v.zoomScale(Lo-E);ui=Math.sqrt(ns/Pa*2)}var ws=ui*ui;function Pf(J0){var _v=(Aa*Aa-Di*Di+(J0?-1:1)*ws*ws*Pa*Pa)/(2*(J0?Aa:Di)*ws*Pa);return Math.log(Math.sqrt(_v*_v+1)-_v)}function ih(J0){return(Math.exp(J0)-Math.exp(-J0))/2}function ld(J0){return(Math.exp(J0)+Math.exp(-J0))/2}function Vp(J0){return ih(J0)/ld(J0)}var Cd=Pf(0),Pm=function(_v){return ld(Cd)/ld(Cd+ui*_v)},My=function(_v){return Di*((ld(Cd)*Vp(Cd+ui*_v)-ih(Cd))/ws)/Pa},Gg=(Pf(1)-Cd)/ui;if(Math.abs(Pa)<1e-6||!isFinite(Gg)){if(Math.abs(Di-Aa)<1e-6)return this.easeTo(o,u);var p_=Aao.maxDuration&&(o.duration=0),this.zooming=!0,this.rotating=G!==it,this.pitching=gt!==ie,this.padding=!v.isPaddingEqual(Dt),this.prepareEase(u,!1),this.ease(function(J0){var _v=J0*Gg,B2=1/Pm(_v);v.zoom=J0===1?Fe:E+v.scaleZoom(B2),t.rotating&&(v.bearing=kv(G,it,J0)),t.pitching&&(v.pitch=kv(ie,gt,J0)),t.padding&&(v.interpolatePadding(xe,Dt,J0),Zr=v.centerPoint.add(Mr));var N2=J0===1?zn:v.unproject(Rn.add(kn.mult(My(_v))).mult(B2));v.setLocationAtPoint(v.renderWorldCopies?N2.wrap():N2,Zr),t.fireMoveEvents(u)},function(){return t.afterEase(u)},o),this}},{key:"fitScreenCoordinates",value:function(t,o,u,c,v){return this.fitInternal(this.cameraForBoxAndBearing(this.transform.pointLocation(Op.convert(t)),this.transform.pointLocation(Op.convert(o)),u,c),c,v)}},{key:"stop",value:function(t,o){if(this.easeFrameId&&(this.cancelRenderFrame(this.easeFrameId),delete this.easeFrameId,delete this.onEaseFrame),this.onEaseEnd){var u=this.onEaseEnd;delete this.onEaseEnd,u.call(this,o)}return this}},{key:"normalizeBearing",value:function(t,o){t=Tw(t,-180,180);var u=Math.abs(t-o);return Math.abs(t-360-o)180?-360:u<-180?360:0}}},{key:"fireMoveEvents",value:function(t){this.emit("move",new f0("move",t)),this.zooming&&this.emit("zoom",new f0("zoom",t)),this.rotating&&this.emit("rotate",new f0("rotate",t)),this.pitching&&this.emit("rotate",new f0("pitch",t))}},{key:"prepareEase",value:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.moving=!0,!o&&!u.moving&&this.emit("movestart",new f0("movestart",t)),this.zooming&&!u.zooming&&this.emit("zoomstart",new f0("zoomstart",t)),this.rotating&&!u.rotating&&this.emit("rotatestart",new f0("rotatestart",t)),this.pitching&&!u.pitching&&this.emit("pitchstart",new f0("pitchstart",t))}},{key:"afterEase",value:function(t,o){if(!(this.easeId&&o&&this.easeId===o)){delete this.easeId;var u=this.zooming,c=this.rotating,v=this.pitching;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,this.padding=!1,u&&this.emit("zoomend",new f0("zoomend",t)),c&&this.emit("rotateend",new f0("rotateend",t)),v&&this.emit("pitchend",new f0("pitchend",t)),this.emit("moveend",new f0("moveend",t))}}},{key:"ease",value:function(t,o,u){u.animate===!1||u.duration===0?(t(1),o()):(this.easeStart=Ay(),this.easeOptions=u,this.onEaseFrame=t,this.onEaseEnd=o,this.easeFrameId=this.requestRenderFrame(this.renderFrameCallback))}},{key:"cameraForBoxAndBearing",value:function(t,o,u,c){var v={top:0,bottom:0,right:0,left:0};if(c=og({padding:v,offset:[0,0],maxZoom:this.transform.maxZoom},c),typeof c.padding=="number"){var E=c.padding;c.padding={top:E,bottom:E,right:E,left:E}}c.padding=og(v,c.padding);var G=this.transform,ie=G.padding,xe=G.project($0.convert(t)),Fe=G.project($0.convert(o)),it=xe.rotate(-u*Math.PI/180),gt=Fe.rotate(-u*Math.PI/180),Dt=new Op(Math.max(it.x,gt.x),Math.max(it.y,gt.y)),ar=new Op(Math.min(it.x,gt.x),Math.min(it.y,gt.y)),Mr=Dt.sub(ar),Zr=(G.width-(ie.left+ie.right+c.padding.left+c.padding.right))/Mr.x,mn=(G.height-(ie.top+ie.bottom+c.padding.top+c.padding.bottom))/Mr.y;if(!(mn<0||Zr<0)){var zn=Math.min(G.scaleZoom(G.scale*Math.min(Zr,mn)),c.maxZoom),Rn=Op.convert(c.offset),kn=(c.padding.left-c.padding.right)/2,ui=(c.padding.top-c.padding.bottom)/2,Di=new Op(Rn.x+kn,Rn.y+ui),Aa=Di.mult(G.scale/G.zoomScale(zn)),Pa=G.unproject(xe.add(Fe).div(2).sub(Aa));return{center:Pa,zoom:zn,bearing:u}}}},{key:"fitInternal",value:function(t,o,u){return t?(o=og(t,o),delete o.padding,o.linear?this.easeTo(o,u):this.flyTo(o,u)):this}}]),r}(cf.EventEmitter);function eM(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=tN(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function tN(e,i){if(e){if(typeof e=="string")return tM(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tM(e,i)}}function tM(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r3&&arguments[3]!==void 0?arguments[3]:{};"passive"in n&&Yb?e.addEventListener(i,r,n):e.addEventListener(i,r,n.capture)},Cv.removeEventListener=function(e,i,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};"passive"in n&&Yb?e.removeEventListener(i,r,n):e.removeEventListener(i,r,n.capture)};var iM=function e(i){i.preventDefault(),i.stopPropagation(),window.removeEventListener("click",e,!0)};Cv.suppressClick=function(){window.addEventListener("click",iM,!0),setTimeout(function(){window.removeEventListener("click",iM,!0)},0)},Cv.mousePos=function(e,i){var r=e.getBoundingClientRect();return new Op(i.clientX-r.left-e.clientLeft,i.clientY-r.top-e.clientTop)},Cv.touchPos=function(e,i){var r=e.getBoundingClientRect(),n=[],t=eM(i),o;try{for(t.s();!(o=t.n()).done;){var u=o.value;n.push(new Op(u.clientX-r.left-e.clientLeft,u.clientY-r.top-e.clientTop))}}catch(c){t.e(c)}finally{t.f()}return n},Cv.mouseButton=function(e){return e.button},Cv.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};function nN(e){var i=iN();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function iN(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var aN=vi.merge,Ng=function(e){(0,Ce.Z)(r,e);var i=nN(r);function r(n,t,o){var u,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};(0,Je.Z)(this,r);var v=Wm.mousePos(t.getCanvasContainer(),o),E=t.unproject(v);return u=i.call(this,n,aN({point:v,lngLat:E,originalEvent:o},c)),u.defaultPrevented=!1,u.target=t,u}return(0,vt.Z)(r,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),r}(f0);function oN(e){var i=sN();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function sN(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var qb=function(e){(0,Ce.Z)(r,e);var i=oN(r);function r(n,t,o){var u;(0,Je.Z)(this,r);var c=n==="touchend"?o.changedTouches:o.touches,v=Wm.touchPos(t.getCanvasContainer(),c),E=v.map(function(xe){return t.unproject(xe)}),G=v.reduce(function(xe,Fe,it,gt){return xe.add(Fe.div(gt.length))},new Op(0,0)),ie=t.unproject(G);return u=i.call(this,n,{points:v,point:G,lngLats:E,lngLat:ie,originalEvent:o}),u.defaultPrevented=!1,u}return(0,vt.Z)(r,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),r}(f0);function uN(e){var i=lN();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function lN(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var cN=function(e){(0,Ce.Z)(r,e);var i=uN(r);function r(n,t,o){var u;return(0,Je.Z)(this,r),u=i.call(this,n,{originalEvent:o}),u.defaultPrevented=!1,u}return(0,vt.Z)(r,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),r}(f0),fN=function(){function e(i){(0,Je.Z)(this,e),this.map=i}return(0,vt.Z)(e,[{key:"reset",value:function(){this.delayContextMenu=!1,delete this.contextMenuEvent}},{key:"mousemove",value:function(r){this.map.emit(r.type,new Ng(r.type,this.map,r))}},{key:"mousedown",value:function(){this.delayContextMenu=!0}},{key:"mouseup",value:function(){this.delayContextMenu=!1,this.contextMenuEvent&&(this.map.emit("contextmenu",new Ng("contextmenu",this.map,this.contextMenuEvent)),delete this.contextMenuEvent)}},{key:"contextmenu",value:function(r){this.delayContextMenu?this.contextMenuEvent=r:this.map.emit(r.type,new Ng(r.type,this.map,r)),this.map.listeners("contextmenu")&&r.preventDefault()}},{key:"isEnabled",value:function(){return!0}},{key:"isActive",value:function(){return!1}},{key:"enable",value:function(){return!0}},{key:"disable",value:function(){return!1}}]),e}(),hN=function(){function e(i,r){(0,Je.Z)(this,e),this.map=i,this.el=i.getCanvasContainer(),this.container=i.getContainer(),this.clickTolerance=r.clickTolerance||1}return(0,vt.Z)(e,[{key:"isEnabled",value:function(){return!!this.enabled}},{key:"isActive",value:function(){return!!this.active}},{key:"enable",value:function(){this.isEnabled()||(this.enabled=!0)}},{key:"disable",value:function(){this.isEnabled()&&(this.enabled=!1)}},{key:"mousedown",value:function(r,n){this.isEnabled()&&r.shiftKey&&r.button===0&&(Wm.disableDrag(),this.startPos=this.lastPos=n,this.active=!0)}},{key:"mousemoveWindow",value:function(r,n){if(this.active){var t=n;if(!(this.lastPos.equals(t)||!this.box&&t.dist(this.startPos)=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function _N(e,i){if(e){if(typeof e=="string")return aM(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aM(e,i)}}function aM(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r0&&n-r[0].time>t;)r.shift()}},{key:"onMoveEnd",value:function(r){if(this.drainInertiaBuffer(),!(this.inertiaBuffer.length<2)){var n={zoom:0,bearing:0,pitch:0,pan:new Op(0,0),pinchAround:void 0,around:void 0},t=yN(this.inertiaBuffer),o;try{for(t.s();!(o=t.n()).done;){var u=o.value.settings;n.zoom+=u.zoomDelta||0,n.bearing+=u.bearingDelta||0,n.pitch+=u.pitchDelta||0,u.panDelta&&n.pan._add(u.panDelta),u.around&&(n.around=u.around),u.pinchAround&&(n.pinchAround=u.pinchAround)}}catch(gt){t.e(gt)}finally{t.f()}var c=this.inertiaBuffer[this.inertiaBuffer.length-1],v=c.time-this.inertiaBuffer[0].time,E={};if(n.pan.mag()){var G=e2(n.pan.mag(),v,G1({},AN,r||{}));E.offset=n.pan.mult(G.amount/n.pan.mag()),E.center=this.map.transform.center,Jb(E,G)}if(n.zoom){var ie=e2(n.zoom,v,bN);E.zoom=this.map.transform.zoom+ie.amount,Jb(E,ie)}if(n.bearing){var xe=e2(n.bearing,v,xN);E.bearing=this.map.transform.bearing+Fg(xe.amount,-179,179),Jb(E,xe)}if(n.pitch){var Fe=e2(n.pitch,v,wN);E.pitch=this.map.transform.pitch+Fe.amount,Jb(E,Fe)}if(E.zoom||E.bearing){var it=n.pinchAround===void 0?n.around:n.pinchAround;E.around=it?this.map.unproject(it):this.map.getCenter()}return this.clear(),G1(E,{noMoveStart:!0})}}}]),e}();function Jb(e,i){(!e.duration||e.duration=this.clickTolerance||this.map.emit(r.type,new Ng(r.type,this.map,r))}},{key:"dblclick",value:function(r){return this.firePreventable(new Ng(r.type,this.map,r))}},{key:"mouseover",value:function(r){this.map.emit(r.type,new Ng(r.type,this.map,r))}},{key:"mouseout",value:function(r){this.map.emit(r.type,new Ng(r.type,this.map,r))}},{key:"touchstart",value:function(r){return this.firePreventable(new qb(r.type,this.map,r))}},{key:"touchmove",value:function(r){this.map.emit(r.type,new qb(r.type,this.map,r))}},{key:"touchend",value:function(r){this.map.emit(r.type,new qb(r.type,this.map,r))}},{key:"touchcancel",value:function(r){this.map.emit(r.type,new qb(r.type,this.map,r))}},{key:"firePreventable",value:function(r){if(this.map.emit(r.type,r),r.defaultPrevented)return{}}},{key:"isEnabled",value:function(){return!0}},{key:"isActive",value:function(){return!1}},{key:"enable",value:function(){return!1}},{key:"disable",value:function(){return!1}}]),e}(),t2,r2=0,Rw=2,IN=(t2={},(0,St.Z)(t2,r2,1),(0,St.Z)(t2,Rw,2),t2);function RN(e,i){var r=IN[i];return e.buttons===void 0||(e.buttons&r)!==r}var Ow=function(){function e(i){(0,Je.Z)(this,e),this.reset(),this.clickTolerance=i.clickTolerance||1}return(0,vt.Z)(e,[{key:"reset",value:function(){this.active=!1,this.moved=!1,delete this.lastPoint,delete this.eventButton}},{key:"mousedown",value:function(r,n){if(!this.lastPoint){var t=Wm.mouseButton(r);this.correctButton(r,t)&&(this.lastPoint=n,this.eventButton=t)}}},{key:"mousemoveWindow",value:function(r,n){var t=this.lastPoint;if(t){if(r.preventDefault(),RN(r,this.eventButton)){this.reset();return}if(!(!this.moved&&n.dist(t)oM?n.wheelZoomRate:n.defaultZoomRate,u=VN/(1+Math.exp(-Math.abs(n.delta*o)));n.delta<0&&u!==0&&(u=1/u);var c=typeof n.targetZoom=="number"?t.zoomScale(n.targetZoom):t.scale;n.targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(c*u))),n.type==="wheel"&&(n.startZoom=t.zoom,n.easing=n.smoothOutEasing(200)),n.delta=0}var v=typeof n.targetZoom=="number"?n.targetZoom:t.zoom,E=n.startZoom,G=n.easing,ie=!1,xe;if(n.type==="wheel"&&E&&G){var Fe=Math.min((Ay()-n.lastWheelEventTime)/200,1),it=G(Fe);xe=kv(E,v,it),Fe<1?n.frameId||(n.frameId=!0):ie=!0}else xe=v,ie=!0;return n.active=!0,ie&&(n.active=!1,n.finishTimeout=setTimeout(function(){n.zooming=!1,n.handler.triggerRenderFrame(),delete n.targetZoom,delete n.finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ie,zoomDelta:xe-t.zoom,around:n.aroundPoint,originalEvent:n.lastWheelEvent}}}),this.map=i,this.el=i.getCanvasContainer(),this.handler=r,this.delta=0,this.defaultZoomRate=UN,this.wheelZoomRate=jN}return(0,vt.Z)(e,[{key:"setZoomRate",value:function(r){this.defaultZoomRate=r}},{key:"setWheelZoomRate",value:function(r){this.wheelZoomRate=r}},{key:"isEnabled",value:function(){return!!this.enabled}},{key:"isActive",value:function(){return!!this.active||this.finishTimeout!==void 0}},{key:"isZooming",value:function(){return!!this.zooming}},{key:"enable",value:function(r){this.isEnabled()||(this.enabled=!0,this.aroundCenter=r&&r.around==="center")}},{key:"disable",value:function(){this.isEnabled()&&(this.enabled=!1)}},{key:"wheel",value:function(r){if(this.isEnabled()){var n=r.deltaMode===window.WheelEvent.DOM_DELTA_LINE?r.deltaY*40:r.deltaY,t=Ay(),o=t-(this.lastWheelEventTime||0);this.lastWheelEventTime=t,n!==0&&n%oM===0?this.type="wheel":n!==0&&Math.abs(n)<4?this.type="trackpad":o>400?(this.type=null,this.lastValue=n,this.timeout=setTimeout(this.onTimeout,40,r)):this.type||(this.type=Math.abs(o*n)<200?"trackpad":"wheel",this.timeout&&(clearTimeout(this.timeout),this.timeout=null,n+=this.lastValue)),r.shiftKey&&n&&(n=n/4),this.type&&(this.lastWheelEvent=r,this.delta-=n,this.active||this.start(r)),r.preventDefault()}}},{key:"renderFrame",value:function(){return this.onScrollFrame()}},{key:"reset",value:function(){this.active=!1}},{key:"onTimeout",value:function(r){this.type="wheel",this.delta-=this.lastValue,!this.active&&this.start&&this.start(r)}},{key:"start",value:function(r){if(this.delta){this.frameId&&(this.frameId=null),this.active=!0,this.isZooming()||(this.zooming=!0),this.finishTimeout&&(clearTimeout(this.finishTimeout),delete this.finishTimeout);var n=Wm.mousePos(this.el,r);this.around=$0.convert(this.aroundCenter?this.map.getCenter():this.map.unproject(n)),this.aroundPoint=this.map.transform.locationPoint(this.around),this.frameId||(this.frameId=!0,this.handler.triggerRenderFrame())}}},{key:"smoothOutEasing",value:function(r){var n=Pw;if(this.prevEase){var t=this.prevEase,o=(Ay()-t.start)/t.duration,u=t.easing(o+.01)-t.easing(o),c=.27/Math.sqrt(u*u+1e-4)*.01,v=Math.sqrt(.27*.27-c*c);n=Mw(c,v,.25,1)}return this.prevEase={start:Ay(),duration:r,easing:n},n}}]),e}(),HN=$N,GN=function(){function e(i,r){(0,Je.Z)(this,e),this.clickZoom=i,this.tapZoom=r}return(0,vt.Z)(e,[{key:"enable",value:function(){this.clickZoom.enable(),this.tapZoom.enable()}},{key:"disable",value:function(){this.clickZoom.disable(),this.tapZoom.disable()}},{key:"isEnabled",value:function(){return this.clickZoom.isEnabled()&&this.tapZoom.isEnabled()}},{key:"isActive",value:function(){return this.clickZoom.isActive()||this.tapZoom.isActive()}}]),e}(),WN=function(){function e(i,r,n){(0,Je.Z)(this,e),this.el=i,this.mousePan=r,this.touchPan=n}return(0,vt.Z)(e,[{key:"enable",value:function(r){this.inertiaOptions=r||{},this.mousePan.enable(),this.touchPan.enable(),this.el.classList.add("l7-touch-drag-pan")}},{key:"disable",value:function(){this.mousePan.disable(),this.touchPan.disable(),this.el.classList.remove("l7-touch-drag-pan")}},{key:"isEnabled",value:function(){return this.mousePan.isEnabled()&&this.touchPan.isEnabled()}},{key:"isActive",value:function(){return this.mousePan.isActive()||this.touchPan.isActive()}}]),e}(),XN=function(){function e(i,r,n){(0,Je.Z)(this,e),this.pitchWithRotate=i.pitchWithRotate,this.mouseRotate=r,this.mousePitch=n}return(0,vt.Z)(e,[{key:"enable",value:function(){this.mouseRotate.enable(),this.pitchWithRotate&&this.mousePitch.enable()}},{key:"disable",value:function(){this.mouseRotate.disable(),this.mousePitch.disable()}},{key:"isEnabled",value:function(){return this.mouseRotate.isEnabled()&&(!this.pitchWithRotate||this.mousePitch.isEnabled())}},{key:"isActive",value:function(){return this.mouseRotate.isActive()||this.mousePitch.isActive()}}]),e}(),YN=function(){function e(i,r,n,t){(0,Je.Z)(this,e),this.el=i,this.touchZoom=r,this.touchRotate=n,this.tapDragZoom=t,this.rotationDisabled=!1,this.enabled=!0}return(0,vt.Z)(e,[{key:"enable",value:function(r){this.touchZoom.enable(r),this.rotationDisabled||this.touchRotate.enable(r),this.tapDragZoom.enable(),this.el.classList.add("l7-touch-zoom-rotate")}},{key:"disable",value:function(){this.touchZoom.disable(),this.touchRotate.disable(),this.tapDragZoom.disable(),this.el.classList.remove("l7-touch-zoom-rotate")}},{key:"isEnabled",value:function(){return this.touchZoom.isEnabled()&&(this.rotationDisabled||this.touchRotate.isEnabled())&&this.tapDragZoom.isEnabled()}},{key:"isActive",value:function(){return this.touchZoom.isActive()||this.touchRotate.isActive()||this.tapDragZoom.isActive()}},{key:"disableRotation",value:function(){this.rotationDisabled=!0,this.touchRotate.disable()}},{key:"enableRotation",value:function(){this.rotationDisabled=!1,this.touchZoom.isEnabled()&&this.touchRotate.enable()}}]),e}();function Lw(e,i){for(var r={},n=0;n=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function qN(e,i){if(e){if(typeof e=="string")return sM(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sM(e,i)}}function sM(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);rthis.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=r.timeStamp),t.length===this.numTouches&&(this.centroid=QN(n),this.touches=Lw(t,n)))}},{key:"touchmove",value:function(r,n,t){if(!(this.aborted||!this.centroid)){var o=Lw(t,n);for(var u in this.touches)if(this.touches[u]){var c=this.touches[u],v=o[u];(!v||v.dist(c)>lM)&&(this.aborted=!0)}}}},{key:"touchend",value:function(r,n,t){if((!this.centroid||r.timeStamp-this.startTime>JN)&&(this.aborted=!0),t.length===0){var o=!this.aborted&&this.centroid;if(this.reset(),o)return o}}}]),e}(),Dw=function(){function e(i){(0,Je.Z)(this,e),this.singleTap=new e9(i),this.numTaps=i.numTaps,this.reset()}return(0,vt.Z)(e,[{key:"reset",value:function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}},{key:"touchstart",value:function(r,n,t){this.singleTap.touchstart(r,n,t)}},{key:"touchmove",value:function(r,n,t){this.singleTap.touchmove(r,n,t)}},{key:"touchend",value:function(r,n,t){var o=this.singleTap.touchend(r,n,t);if(o){var u=r.timeStamp-this.lastTimeuM&&this.reset(),this.tapTime?t.length>0&&(this.swipePoint=n[0],this.swipeTouch=t[0].identifier):this.tap.touchstart(r,n,t))}},{key:"touchmove",value:function(r,n,t){if(!this.tapTime)this.tap.touchmove(r,n,t);else if(this.swipePoint){if(t[0].identifier!==this.swipeTouch)return;var o=n[0],u=o.y-this.swipePoint.y;return this.swipePoint=o,r.preventDefault(),this.active=!0,{zoomDelta:u/128}}}},{key:"touchend",value:function(r,n,t){if(this.tapTime)this.swipePoint&&t.length===0&&this.reset();else{var o=this.tap.touchend(r,n,t);o&&(this.tapTime=r.timeStamp)}}},{key:"touchcancel",value:function(){this.reset()}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1,this.reset()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"isActive",value:function(){return this.active}}]),e}(),r9=function(){function e(){(0,Je.Z)(this,e),this.zoomIn=new Dw({numTouches:1,numTaps:2}),this.zoomOut=new Dw({numTouches:2,numTaps:1}),this.reset()}return(0,vt.Z)(e,[{key:"reset",value:function(){this.active=!1,this.zoomIn.reset(),this.zoomOut.reset()}},{key:"touchstart",value:function(r,n,t){this.zoomIn.touchstart(r,n,t),this.zoomOut.touchstart(r,n,t)}},{key:"touchmove",value:function(r,n,t){this.zoomIn.touchmove(r,n,t),this.zoomOut.touchmove(r,n,t)}},{key:"touchend",value:function(r,n,t){var o=this,u=this.zoomIn.touchend(r,n,t),c=this.zoomOut.touchend(r,n,t);if(u)return this.active=!0,r.preventDefault(),setTimeout(function(){return o.reset()},0),{cameraAnimation:function(E){return E.easeTo({duration:300,zoom:E.getZoom()+1,around:E.unproject(u)},{originalEvent:r})}};if(c)return this.active=!0,r.preventDefault(),setTimeout(function(){return o.reset()},0),{cameraAnimation:function(E){return E.easeTo({duration:300,zoom:E.getZoom()-1,around:E.unproject(c)},{originalEvent:r})}}}},{key:"touchcancel",value:function(){this.reset()}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1,this.reset()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"isActive",value:function(){return this.active}}]),e}(),n9=function(){function e(i){(0,Je.Z)(this,e),this.minTouches=1,this.clickTolerance=i.clickTolerance||1,this.reset()}return(0,vt.Z)(e,[{key:"reset",value:function(){this.active=!1,this.touches={},this.sum=new Op(0,0)}},{key:"touchstart",value:function(r,n,t){return this.calculateTransform(r,n,t)}},{key:"touchmove",value:function(r,n,t){if(this.active)return r.preventDefault(),this.calculateTransform(r,n,t)}},{key:"touchend",value:function(r,n,t){this.calculateTransform(r,n,t),this.active&&t.length0&&(this.active=!0);var o=Lw(t,n),u=new Op(0,0),c=new Op(0,0),v=0;for(var E in o)if(o[E]){var G=o[E],ie=this.touches[E];ie&&(u._add(G),c._add(G.sub(ie)),v++,o[E]=G)}if(this.touches=o,!(vMath.abs(e.x)}var o9=100,s9=function(e){(0,Ce.Z)(r,e);var i=i9(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"reset",value:function(){Pd((0,et.Z)(r.prototype),"reset",this).call(this),this.valid=void 0,delete this.firstMove,delete this.lastPoints}},{key:"start",value:function(t){this.lastPoints=t,Fw(t[0].sub(t[1]))&&(this.valid=!1)}},{key:"move",value:function(t,o,u){var c=t[0].sub(this.lastPoints[0]),v=t[1].sub(this.lastPoints[1]);if(this.valid=this.gestureBeginsVertically(c,v,u.timeStamp),!!this.valid){this.lastPoints=t,this.active=!0;var E=(c.y+v.y)/2,G=-.5;return{pitchDelta:E*G}}}},{key:"gestureBeginsVertically",value:function(t,o,u){if(this.valid!==void 0)return this.valid;var c=2,v=t.mag()>=c,E=o.mag()>=c;if(!(!v&&!E)){if(!v||!E)return this.firstMove===void 0&&(this.firstMove=u),u-this.firstMove0==o.y>0;return Fw(t)&&Fw(o)&&G}}}]),r}(kw);function u9(e){var i=l9();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function l9(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var c9=25;function cM(e,i){return e.angleWith(i)*180/Math.PI}var f9=function(e){(0,Ce.Z)(r,e);var i=u9(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"reset",value:function(){Pd((0,et.Z)(r.prototype),"reset",this).call(this),delete this.minDiameter,delete this.startVector,delete this.vector}},{key:"start",value:function(t){this.startVector=this.vector=t[0].sub(t[1]),this.minDiameter=t[0].dist(t[1])}},{key:"move",value:function(t,o){var u=this.vector;if(this.vector=t[0].sub(t[1]),!(!this.active&&this.isBelowThreshold(this.vector)))return this.active=!0,{bearingDelta:cM(this.vector,u),pinchAround:o}}},{key:"isBelowThreshold",value:function(t){this.minDiameter=Math.min(this.minDiameter,t.mag());var o=Math.PI*this.minDiameter,u=c9/o*360,c=cM(t,this.startVector);return Math.abs(c)=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function v9(e,i){if(e){if(typeof e=="string")return hM(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hM(e,i)}}function hM(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);rzw}).reduce(function(v,E){return v+(E-zw)/zw},0),c=u/(n+u)*100;return{loadTime:i,fullLoadTime:r,fps:o,percentDroppedFrames:c}}};function pM(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_9(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function _9(e,i){if(e){if(typeof e=="string")return mM(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mM(e,i)}}function mM(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r0&&arguments[0]!==void 0?arguments[0]:0,n=this.currentlyRunning=this.queue;this.queue=[];var t=pM(n),o;try{for(t.s();!(o=t.n()).done;){var u=o.value;if(!u.cancelled&&(u.callback(r),this.cleared))break}}catch(c){t.e(c)}finally{t.f()}this.cleared=!1,this.currentlyRunning=!1}},{key:"clear",value:function(){this.currentlyRunning&&(this.cleared=!0),this.queue=[]}}]),e}(),vM=A9;function b9(e){var i=x9();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function x9(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function w9(e,i){var r=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,n=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(r||n)&&(i||(i=document),!!i)){var t=i.head||i.getElementsByTagName("head")[0];if(!t){t=i.createElement("head");var o=i.body||i.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(t,o):i.documentElement.appendChild(t)}var u=i.createElement("style");return u.type="text/css",u.styleSheet?u.styleSheet.cssText=e:u.appendChild(i.createTextNode(e)),t.appendChild(u),u}}w9(`.l7-map { - font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif; - overflow: hidden; - position: relative; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} - -.l7-canvas { - position: absolute; - left: 0; - top: 0; -} - -.l7-map:-webkit-full-screen { - width: 100%; - height: 100%; -} - -.l7-canary { - background-color: salmon; -} - -.l7-canvas-container.l7-interactive, -.l7-ctrl-group button.l7-ctrl-compass { - cursor: -webkit-grab; - cursor: grab; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.l7-canvas-container.l7-interactive.l7-track-pointer { - cursor: pointer; -} - -.l7-canvas-container.l7-interactive:active, -.l7-ctrl-group button.l7-ctrl-compass:active { - cursor: -webkit-grabbing; - cursor: grabbing; -} - -.l7-canvas-container.l7-touch-zoom-rotate, -.l7-canvas-container.l7-touch-zoom-rotate .l7-canvas { - -ms-touch-action: pan-x pan-y; - touch-action: pan-x pan-y; -} - -.l7-canvas-container.l7-touch-drag-pan, -.l7-canvas-container.l7-touch-drag-pan .l7-canvas { - -ms-touch-action: pinch-zoom; - touch-action: pinch-zoom; -} - -.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan, -.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan .l7-canvas { - -ms-touch-action: none; - touch-action: none; -} - -.l7-ctrl-top-left, -.l7-ctrl-top-right, -.l7-ctrl-bottom-left, -.l7-ctrl-bottom-right { position: absolute; pointer-events: none; z-index: 2; } -.l7-ctrl-top-left { top: 0; left: 0; } -.l7-ctrl-top-right { top: 0; right: 0; } -.l7-ctrl-bottom-left { bottom: 0; left: 0; } -.l7-ctrl-bottom-right { right: 0; bottom: 0; } - -.l7-ctrl { - clear: both; - pointer-events: auto; - - /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */ - -webkit-transform: translate(0, 0); - transform: translate(0, 0); -} -.l7-ctrl-top-left .l7-ctrl { margin: 10px 0 0 10px; float: left; } -.l7-ctrl-top-right .l7-ctrl { margin: 10px 10px 0 0; float: right; } -.l7-ctrl-bottom-left .l7-ctrl { margin: 0 0 10px 10px; float: left; } -.l7-ctrl-bottom-right .l7-ctrl { margin: 0 10px 10px 0; float: right; } - - -.l7-crosshair, -.l7-crosshair .l7-interactive, -.l7-crosshair .l7-interactive:active { - cursor: crosshair; -} - -.l7-boxzoom { - position: absolute; - top: 0; - left: 0; - width: 0; - height: 0; - background: #fff; - border: 2px dotted #202020; - opacity: 0.5; - z-index: 10; -} -`);var s2=-2,gM=22,E9=vi.merge,Y1=0,u2=60,S9={hash:!1,zoom:-1,center:[112,32],pitch:0,bearing:0,interactive:!0,minZoom:s2,maxZoom:gM,minPitch:Y1,maxPitch:u2,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,trackResize:!0,renderWorldCopies:!0,pitchEnabled:!0,rotateEnabled:!0},C9=function(e){(0,Ce.Z)(r,e);var i=b9(r);function r(n){var t;return(0,Je.Z)(this,r),t=i.call(this,E9({},S9,n)),(0,St.Z)((0,Gr.Z)(t),"renderTaskQueue",new vM),(0,St.Z)((0,Gr.Z)(t),"trackResize",!0),(0,St.Z)((0,Gr.Z)(t),"onWindowOnline",function(){t.update()}),(0,St.Z)((0,Gr.Z)(t),"onWindowResize",function(o){t.trackResize&&t.resize({originalEvent:o}).update()}),t.initContainer(),t.resize(),t.handlers=new dM((0,Gr.Z)(t),t.options),typeof window!="undefined"&&(window.addEventListener("online",t.onWindowOnline,!1),window.addEventListener("resize",t.onWindowResize,!1),window.addEventListener("orientationchange",t.onWindowResize,!1)),t}return(0,vt.Z)(r,[{key:"resize",value:function(t){var o=this.containerDimensions(),u=o[0],c=o[1];this.transform.resize(u,c);var v=!this.moving;return v&&(this.stop(),this.emit("movestart",new Event("movestart",t)),this.emit("move",new Event("move",t))),this.emit("resize",new Event("resize",t)),v&&this.emit("moveend",new Event("moveend",t)),this}},{key:"getContainer",value:function(){return this.container}},{key:"getCanvas",value:function(){return this.canvas}},{key:"getCanvasContainer",value:function(){return this.canvasContainer}},{key:"project",value:function(t){return this.transform.locationPoint($0.convert(t))}},{key:"unproject",value:function(t){return this.transform.pointLocation(Op.convert(t))}},{key:"getBounds",value:function(){return this.transform.getBounds()}},{key:"getMaxBounds",value:function(){return this.transform.getMaxBounds()}},{key:"setMaxBounds",value:function(t){this.transform.setMaxBounds(Y_.convert(t))}},{key:"setStyle",value:function(t){}},{key:"setMinZoom",value:function(t){if(t=t==null?s2:t,t>=s2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")}},{key:"getMaxZoom",value:function(){return this.transform.maxZoom}},{key:"setMinPitch",value:function(t){if(t=t==null?Y1:t,t=Y1&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this.getPitch()u2)throw new Error("maxPitch must be less than or equal to ".concat(u2));if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")}},{key:"getMaxPitch",value:function(){return this.transform.maxPitch}},{key:"getRenderWorldCopies",value:function(){return this.transform.renderWorldCopies}},{key:"setRenderWorldCopies",value:function(t){this.transform.renderWorldCopies=!!t}},{key:"remove",value:function(){this.frame&&(this.frame.cancel(),this.frame=null),this.renderTaskQueue.clear(),this.handlers.destroy(),typeof window!="undefined"&&(window.removeEventListener("online",this.onWindowOnline,!1),window.removeEventListener("resize",this.onWindowResize,!1),window.removeEventListener("orientationchange",this.onWindowResize,!1))}},{key:"requestRenderFrame",value:function(t){return this.update(),this.renderTaskQueue.add(t)}},{key:"cancelRenderFrame",value:function(t){return this.renderTaskQueue.remove(t)}},{key:"triggerRepaint",value:function(){var t=this;this.frame||(this.frame=Gb(function(o){o2.frame(o),t.frame=null,t.update(o)}))}},{key:"update",value:function(t){var o=this;this.frame||(this.frame=Gb(function(u){o2.frame(u),o.frame=null,o.renderTaskQueue.run(t)}))}},{key:"initContainer",value:function(){if(typeof this.options.container=="string"){if(this.container=window.document.getElementById(this.options.container),!this.container)throw new Error("Container '".concat(this.options.container,"' not found."))}else if(this.options.container instanceof HTMLElement)this.container=this.options.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");var t=this.container;t.classList.add("l7-map");var o=this.canvasContainer=aa("div","l7-canvas-container",t);this.options.interactive&&o.classList.add("l7-interactive")}},{key:"containerDimensions",value:function(){var t=0,o=0;return this.container&&(t=this.container.clientWidth||400,o=this.container.clientHeight||300),[t,o]}},{key:"resizeCanvas",value:function(t,o){var u=Yo||1;this.canvas.width=u*t,this.canvas.height=u*o,this.canvas.style.width="".concat(t,"px"),this.canvas.style.height="".concat(o,"px")}}]),r}(JT),T9=vi.throttle,M9=function(){function e(i){var r=this;(0,Je.Z)(this,e),(0,St.Z)(this,"onHashChange",function(){var n=r.getCurrentHash();if(n.length>=3&&!n.some(function(o){return isNaN(+o)})){var t=r.map.dragRotate.isEnabled()&&r.map.touchZoomRotate.isEnabled()?+(n[3]||0):r.map.getBearing();return r.map.jumpTo({center:[+n[2],+n[1]],zoom:+n[0],bearing:t,pitch:+(n[4]||0)}),!0}return!1}),(0,St.Z)(this,"getCurrentHash",function(){var n=window.location.hash.replace("#","");if(r.hashName){var t;return n.split("&").map(function(o){return o.split("=")}).forEach(function(o){o[0]===r.hashName&&(t=o)}),(t&&t[1]||"").split("/")}return n.split("/")}),(0,St.Z)(this,"updateHashUnthrottled",function(){var n=r.getHashString();try{window.history.replaceState(window.history.state,"",n)}catch(t){}}),this.hashName=i&&encodeURIComponent(i),this.updateHash=T9(this.updateHashUnthrottled,30*1e3/100)}return(0,vt.Z)(e,[{key:"addTo",value:function(r){return this.map=r,window.addEventListener("hashchange",this.onHashChange,!1),this.map.on("moveend",this.updateHash),this}},{key:"remove",value:function(){return window.removeEventListener("hashchange",this.onHashChange,!1),this.map.off("moveend",this.updateHash),delete this.map,this}},{key:"getHashString",value:function(r){var n=this.map.getCenter(),t=Math.round(this.map.getZoom()*100)/100,o=Math.ceil((t*Math.LN2+Math.log(512/360/.5))/Math.LN10),u=Math.pow(10,o),c=Math.round(n.lng*u)/u,v=Math.round(n.lat*u)/u,E=this.map.getBearing(),G=this.map.getPitch(),ie="";if(r?ie+="/".concat(c,"/").concat(v,"/").concat(t):ie+="".concat(t,"/").concat(v,"/").concat(c),(E||G)&&(ie+="/".concat(Math.round(E*10)/10)),G&&(ie+="/".concat(Math.round(G))),this.hashName){var xe=this.hashName,Fe=!1,it=window.location.hash.slice(1).split("&").map(function(gt){var Dt=gt.split("=")[0];return Dt===xe?(Fe=!0,"".concat(Dt,"=").concat(ie)):gt}).filter(function(gt){return gt});return Fe||it.push("".concat(xe,"=").concat(ie)),"#".concat(it.join("&"))}return"#".concat(ie)}}]),e}(),P9=M9;function I9(e){var i=R9();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function R9(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function O9(e,i){var r=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,n=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(r||n)&&(i||(i=document),!!i)){var t=i.head||i.getElementsByTagName("head")[0];if(!t){t=i.createElement("head");var o=i.body||i.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(t,o):i.documentElement.appendChild(t)}var u=i.createElement("style");return u.type="text/css",u.styleSheet?u.styleSheet.cssText=e:u.appendChild(i.createTextNode(e)),t.appendChild(u),u}}O9(`.l7-map { - font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif; - overflow: hidden; - position: relative; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} - -.l7-canvas { - position: absolute; - left: 0; - top: 0; -} - -.l7-map:-webkit-full-screen { - width: 100%; - height: 100%; -} - -.l7-canary { - background-color: salmon; -} - -.l7-canvas-container.l7-interactive, -.l7-ctrl-group button.l7-ctrl-compass { - cursor: -webkit-grab; - cursor: grab; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.l7-canvas-container.l7-interactive.l7-track-pointer { - cursor: pointer; -} - -.l7-canvas-container.l7-interactive:active, -.l7-ctrl-group button.l7-ctrl-compass:active { - cursor: -webkit-grabbing; - cursor: grabbing; -} - -.l7-canvas-container.l7-touch-zoom-rotate, -.l7-canvas-container.l7-touch-zoom-rotate .l7-canvas { - -ms-touch-action: pan-x pan-y; - touch-action: pan-x pan-y; -} - -.l7-canvas-container.l7-touch-drag-pan, -.l7-canvas-container.l7-touch-drag-pan .l7-canvas { - -ms-touch-action: pinch-zoom; - touch-action: pinch-zoom; -} - -.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan, -.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan .l7-canvas { - -ms-touch-action: none; - touch-action: none; -} - -.l7-ctrl-top-left, -.l7-ctrl-top-right, -.l7-ctrl-bottom-left, -.l7-ctrl-bottom-right { position: absolute; pointer-events: none; z-index: 2; } -.l7-ctrl-top-left { top: 0; left: 0; } -.l7-ctrl-top-right { top: 0; right: 0; } -.l7-ctrl-bottom-left { bottom: 0; left: 0; } -.l7-ctrl-bottom-right { right: 0; bottom: 0; } - -.l7-ctrl { - clear: both; - pointer-events: auto; - - /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */ - -webkit-transform: translate(0, 0); - transform: translate(0, 0); -} -.l7-ctrl-top-left .l7-ctrl { margin: 10px 0 0 10px; float: left; } -.l7-ctrl-top-right .l7-ctrl { margin: 10px 10px 0 0; float: right; } -.l7-ctrl-bottom-left .l7-ctrl { margin: 0 0 10px 10px; float: left; } -.l7-ctrl-bottom-right .l7-ctrl { margin: 0 10px 10px 0; float: right; } - - -.l7-crosshair, -.l7-crosshair .l7-interactive, -.l7-crosshair .l7-interactive:active { - cursor: crosshair; -} - -.l7-boxzoom { - position: absolute; - top: 0; - left: 0; - width: 0; - height: 0; - background: #fff; - border: 2px dotted #202020; - opacity: 0.5; - z-index: 10; -} -`),function(){if(typeof window.CustomEvent=="function")return!1;function e(i,r){r=r||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(i,r.bubbles,r.cancelable,r.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}();var l2=-2,yM=22,_M=vi.merge,K1=0,c2=60,L9={hash:!1,zoom:-1,center:[112,32],pitch:0,bearing:0,interactive:!0,minZoom:l2,maxZoom:yM,minPitch:K1,maxPitch:c2,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,trackResize:!0,renderWorldCopies:!0,pitchEnabled:!0,rotateEnabled:!0},D9=function(e){(0,Ce.Z)(r,e);var i=I9(r);function r(n){var t;(0,Je.Z)(this,r),t=i.call(this,_M({},L9,n)),(0,St.Z)((0,Gr.Z)(t),"renderTaskQueue",new vM),(0,St.Z)((0,Gr.Z)(t),"trackResize",!0),(0,St.Z)((0,Gr.Z)(t),"onWindowOnline",function(){t.update()}),(0,St.Z)((0,Gr.Z)(t),"onWindowResize",function(u){t.trackResize&&t.resize({originalEvent:u}).update()}),t.initContainer(),t.resize(),t.handlers=new dM((0,Gr.Z)(t),t.options),typeof window!="undefined"&&(window.addEventListener("online",t.onWindowOnline,!1),window.addEventListener("resize",t.onWindowResize,!1),window.addEventListener("orientationchange",t.onWindowResize,!1));var o=typeof n.hash=="string"&&n.hash||void 0;return n.hash&&(t.hash=new P9(o).addTo((0,Gr.Z)(t))),(!t.hash||!t.hash.onHashChange())&&(t.jumpTo({center:n.center,zoom:n.zoom,bearing:n.bearing,pitch:n.pitch}),n.bounds&&(t.resize(),t.fitBounds(n.bounds,_M({},n.fitBoundsOptions,{duration:0})))),t}return(0,vt.Z)(r,[{key:"resize",value:function(t){var o=this.containerDimensions(),u=(0,wi.Z)(o,2),c=u[0],v=u[1];this.transform.resize(c,v);var E=!this.moving;return E&&(this.stop(),this.emit("movestart",new window.CustomEvent("movestart",t)),this.emit("move",new window.CustomEvent("move",t))),this.emit("resize",new window.CustomEvent("resize",t)),E&&this.emit("moveend",new window.CustomEvent("moveend",t)),this}},{key:"getContainer",value:function(){return this.container}},{key:"getCanvas",value:function(){return this.canvas}},{key:"getCanvasContainer",value:function(){return this.canvasContainer}},{key:"project",value:function(t){return this.transform.locationPoint($0.convert(t))}},{key:"unproject",value:function(t){return this.transform.pointLocation(Op.convert(t))}},{key:"getBounds",value:function(){return this.transform.getBounds()}},{key:"getMaxBounds",value:function(){return this.transform.getMaxBounds()}},{key:"setMaxBounds",value:function(t){this.transform.setMaxBounds(Y_.convert(t))}},{key:"setStyle",value:function(t){}},{key:"setMinZoom",value:function(t){if(t=t==null?l2:t,t>=l2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")}},{key:"getMaxZoom",value:function(){return this.transform.maxZoom}},{key:"setMinPitch",value:function(t){if(t=t==null?K1:t,t=K1&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this.getPitch()c2)throw new Error("maxPitch must be less than or equal to ".concat(c2));if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")}},{key:"getMaxPitch",value:function(){return this.transform.maxPitch}},{key:"getRenderWorldCopies",value:function(){return this.transform.renderWorldCopies}},{key:"setRenderWorldCopies",value:function(t){this.transform.renderWorldCopies=!!t}},{key:"remove",value:function(){this.container.removeChild(this.canvasContainer),this.canvasContainer=null,this.frame&&(this.frame.cancel(),this.frame=null),this.renderTaskQueue.clear(),this.handlers.destroy(),typeof window!="undefined"&&(window.removeEventListener("online",this.onWindowOnline,!1),window.removeEventListener("resize",this.onWindowResize,!1),window.removeEventListener("orientationchange",this.onWindowResize,!1))}},{key:"requestRenderFrame",value:function(t){return this.update(),this.renderTaskQueue.add(t)}},{key:"cancelRenderFrame",value:function(t){return this.renderTaskQueue.remove(t)}},{key:"triggerRepaint",value:function(){var t=this;this.frame||(this.frame=Gb(function(o){o2.frame(o),t.frame=null,t.update(o)}))}},{key:"update",value:function(t){var o=this;this.frame||(this.frame=Gb(function(u){o2.frame(u),o.frame=null,o.renderTaskQueue.run(t)}))}},{key:"initContainer",value:function(){if(typeof this.options.container=="string"){if(this.container=window.document.getElementById(this.options.container),!this.container)throw new Error("Container '".concat(this.options.container,"' not found."))}else if(this.options.container instanceof HTMLElement)this.container=this.options.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");var t=this.container;t.classList.add("l7-map");var o=this.canvasContainer=aa("div","l7-canvas-container",t);this.options.interactive&&o.classList.add("l7-interactive")}},{key:"initMiniContainer",value:function(){this.container=this.options.canvas,this.canvasContainer=this.container}},{key:"containerDimensions",value:function(){var t=0,o=0;return this.container&&(t=this.container.clientWidth,o=this.container.clientHeight,t=t===0?400:t,o=o===0?300:o),[t,o]}}]),r}(JT),k9=function(){function e(){(0,Je.Z)(this,e),(0,St.Z)(this,"xzReg",-Math.PI*.6),(0,St.Z)(this,"yReg",Math.PI*.2),(0,St.Z)(this,"earthCameraRadius",200),(0,St.Z)(this,"earthCameraZoom",1),(0,St.Z)(this,"cameraPosition",dy()),(0,St.Z)(this,"projectionMatrix",Nf()),(0,St.Z)(this,"modelMatrix",Nf()),(0,St.Z)(this,"viewMatrix",Nf()),(0,St.Z)(this,"viewProjectionMatrix",Nf()),(0,St.Z)(this,"ViewProjectionMatrixUncentered",Nf()),(0,St.Z)(this,"viewUncenteredMatrix",Nf())}return(0,vt.Z)(e,[{key:"syncWithMapCamera",value:function(r){var n=r.viewportHeight,t=n===void 0?1:n,o=r.viewportWidth,u=o===void 0?1:o,c=u/t,v=.1,E=1e4,G=20;Rr(this.projectionMatrix,G,c,v,E);var ie=this.earthCameraRadius*Math.cos(this.xzReg),xe=this.earthCameraRadius*Math.sin(this.xzReg),Fe=this.earthCameraRadius*Math.sin(this.yReg);this.cameraPosition=qd(ie,Fe,xe),py(this.cameraPosition,this.cameraPosition),Fx(this.cameraPosition,this.cameraPosition,qd(this.earthCameraRadius,this.earthCameraRadius,this.earthCameraRadius)),Bx(this.cameraPosition,this.cameraPosition,this.earthCameraZoom);var it=dy();pb(it,this.cameraPosition,qd(0,1,0));var gt=qd(0,1,0);pb(gt,it,this.cameraPosition);var Dt=qd(0,0,0);Fn(this.viewMatrix,this.cameraPosition,Dt,gt),this.viewUncenteredMatrix=hm(this.viewMatrix),od(this.viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),od(this.ViewProjectionMatrixUncentered,this.projectionMatrix,this.viewMatrix)}},{key:"rotateY",value:function(r){this.xzReg+=r*Math.min(this.earthCameraZoom*this.earthCameraZoom,1)}},{key:"rotateX",value:function(r){this.yReg+=r*Math.min(this.earthCameraZoom*this.earthCameraZoom,1)}},{key:"scaleZoom",value:function(r){this.earthCameraZoom+=r,this.earthCameraZoom=Math.max(this.earthCameraZoom,.6)}},{key:"getZoom",value:function(){return 4}},{key:"getZoomScale",value:function(){return Math.pow(2,this.getZoom())}},{key:"getCenter",value:function(){return[0,0]}},{key:"getProjectionMatrix",value:function(){return this.projectionMatrix}},{key:"getModelMatrix",value:function(){return this.modelMatrix}},{key:"getViewMatrix",value:function(){return this.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewMatrix}},{key:"getViewProjectionMatrix",value:function(){return this.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewProjectionMatrix}},{key:"getFocalDistance",value:function(){return 1}},{key:"projectFlat",value:function(r,n){return this.viewport.projectFlat(r,n)}}]),e}(),F9=["id","style","rotation"],AM,bM;function B9(e){var i=N9();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function N9(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var xM={mapmove:"move",camerachange:"move",zoomchange:"zoom",dragging:"drag"},z9=12,Z9=(AM=(0,bo.b2)(),AM(bM=function(e){(0,Ce.Z)(r,e);var i=B9(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;uMath.abs(c.originalEvent.movementY)?c.originalEvent.movementX>0?n.viewport.rotateY(E):c.originalEvent.movementX<0&&n.viewport.rotateY(-E):c.originalEvent.movementY>0?n.viewport.rotateX(E):c.originalEvent.movementY<0&&n.viewport.rotateX(-E));var G=n.config.offsetCoordinate,ie=G===void 0?!0:G;n.viewport.syncWithMapCamera({viewportHeight:n.map.transform.height,viewportWidth:n.map.transform.width}),n.viewport.getZoom()>z9&&ie?n.coordinateSystemService.setCoordinateSystem(ae.LNGLAT_OFFSET):n.coordinateSystemService.setCoordinateSystem(ae.LNGLAT),n.cameraChangedCallback(n.viewport)}),n}return(0,vt.Z)(r,[{key:"lngLatToMercator",value:function(t,o){throw new Error("Method not implemented.")}},{key:"getModelMatrix",value:function(t,o,u,c,v){throw new Error("Method not implemented.")}},{key:"on",value:function(t,o){pm.indexOf(t)!==-1?this.eventEmitter.on(t,o):this.map.on(xM[t]||t,o)}},{key:"off",value:function(t,o){this.map.off(xM[t]||t,o),this.eventEmitter.off(t,o)}},{key:"getMapCanvasContainer",value:function(){return this.map.getCanvasContainer()}},{key:"getSize",value:function(){var t=this.map.transform;return[t.width,t.height]}},{key:"getType",value:function(){return"earth"}},{key:"init",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u,c,v,E,G,ie,xe,Fe;return Qr().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:u=this.config,c=u.id,v=c===void 0?"map":c,E=u.style,G=E===void 0?"light":E,ie=u.rotation,xe=ie===void 0?0:ie,Fe=(0,K0.Z)(u,F9),this.viewport=new k9,this.$mapContainer=this.creatMapContainer(v),this.map=new C9((0,Me.Z)({container:this.$mapContainer,style:this.getMapStyleValue(G),bearing:xe},Fe)),this.map.on("load",this.handleCameraChanged),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged({});case 7:case"end":return gt.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"destroy",value:function(){var t;(t=this.$mapContainer)===null||t===void 0||(t=t.parentNode)===null||t===void 0||t.removeChild(this.$mapContainer),this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(t){for(var o,u=arguments.length,c=new Array(u>1?u-1:0),v=1;v1?u-1:0),v=1;v1&&arguments[1]!==void 0?arguments[1]:{x:0,y:0,z:0},u=this.lngLatToMercator(t,0),c=u.x,v=u.y;return[c-o.x,v-o.y]}},{key:"lngLatToMercator",value:function(t,o){var u=Bg.fromLngLat(t,o),c=u.x,v=c===void 0?0:c,E=u.y,G=E===void 0?0:E,ie=u.z,xe=ie===void 0?0:ie;return{x:v,y:G,z:xe}}},{key:"getModelMatrix",value:function(t,o,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[1,1,1],v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{x:0,y:0,z:0},E=Bg.fromLngLat(t,o),G=E.meterInMercatorCoordinateUnits(),ie=Nf();return Fd(ie,ie,qd(E.x-v.x,E.y-v.y,E.z||0-v.z)),zd(ie,ie,qd(G*c[0],-G*c[1],G*c[2])),Yd(ie,ie,u[0]),lp(ie,ie,u[1]),cp(ie,ie,u[2]),ie}},{key:"init",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u=this,c,v,E,G,ie,xe,Fe,it,gt,Dt,ar,Mr,Zr,mn,zn;return Qr().wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:c=this.config,v=c.id,E=v===void 0?"map":v,G=c.style,ie=G===void 0?"light":G,xe=c.rotation,Fe=xe===void 0?0:xe,it=c.mapInstance,gt=c.version,Dt=gt===void 0?"DEFAULTMAP":gt,ar=c.mapSize,Mr=ar===void 0?1e4:ar,Zr=c.interactive,mn=Zr===void 0?!0:Zr,zn=(0,K0.Z)(c,$9),this.viewport=new _y,this.version=Dt,this.simpleMapCoord.setSize(Mr),Dt==="SIMPLE"&&zn.center&&(zn.center=this.simpleMapCoord.unproject(zn.center)),it?(this.map=it,this.$mapContainer=this.map.getContainer()):(this.$mapContainer=this.creatMapContainer(E),this.map=new D9((0,Me.Z)({container:this.$mapContainer,style:this.getMapStyleValue(ie),bearing:Fe},zn))),this.map.on("load",function(){u.handleCameraChanged()}),mn&&this.map.on("move",this.handleCameraChanged),setTimeout(function(){u.handleCameraChanged()},100),this.handleCameraChanged();case 10:case"end":return kn.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"exportMap",value:function(t){var o=this.map.getCanvas(),u=t==="jpg"?o==null?void 0:o.toDataURL("image/jpeg"):o==null?void 0:o.toDataURL("image/png");return u}}]),r}(Dg))||EM);function X9(e){var i=Y9();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Y9(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var K9=function(e){(0,Ce.Z)(r,e);var i=X9(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getServiceConstructor",value:function(){return W9}}]),r}(Uv),q9=_(17369),Q_=_.n(q9),SM=function(){function e(){(0,Je.Z)(this,e)}return(0,vt.Z)(e,[{key:"syncWithMapCamera",value:function(r){var n=r.center,t=r.zoom,o=r.pitch,u=r.bearing,c=r.viewportHeight,v=r.viewportWidth;this.viewport=new xw({width:v,height:c,longitude:n&&n[0],latitude:n&&n[1],zoom:t,pitch:o,bearing:u})}},{key:"getZoom",value:function(){return this.viewport.zoom}},{key:"getZoomScale",value:function(){return Math.pow(2,this.getZoom())}},{key:"getCenter",value:function(){return[this.viewport.longitude,this.viewport.latitude]}},{key:"getProjectionMatrix",value:function(){return this.viewport.projectionMatrix}},{key:"getModelMatrix",value:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}},{key:"getViewMatrix",value:function(){return this.viewport.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewport.viewMatrixUncentered}},{key:"getViewProjectionMatrix",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getFocalDistance",value:function(){return 1}},{key:"projectFlat",value:function(r,n){return this.viewport.projectFlat(r,n)}}]),e}(),Q9=["id","attributionControl","style","token","rotation","mapInstance"],CM,TM;function J9(e){var i=ez();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function ez(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function tz(e,i){var r=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,n=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(r||n)&&(i||(i=document),!!i)){var t=i.head||i.getElementsByTagName("head")[0];if(!t){t=i.createElement("head");var o=i.body||i.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(t,o):i.documentElement.appendChild(t)}var u=i.createElement("style");return u.type="text/css",u.styleSheet?u.styleSheet.cssText=e:u.appendChild(i.createTextNode(e)),t.appendChild(u),u}}tz(`.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapboxgl-canvas{position:absolute;left:0;top:0}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:-webkit-grab;cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:-webkit-grabbing;cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{-ms-touch-action:pinch-zoom;touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{-ms-touch-action:none;touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;left:0}.mapboxgl-ctrl-top-right{top:0;right:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{right:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;-webkit-transform:translate(0);transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-group{border-radius:4px;background:#fff}.mapboxgl-ctrl-group:not(:empty){-webkit-box-shadow:0 0 2px rgba(0,0,0,.1);box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){-webkit-box-shadow:0 0 0 2px ButtonText;box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{-webkit-box-shadow:0 0 2px 2px #0096ff;box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-group button:focus:focus-visible{-webkit-box-shadow:0 0 2px 2px #0096ff;box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}.mapboxgl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:focus:only-child{border-radius:inherit}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23999'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{-webkit-animation:mapboxgl-spin 2s linear infinite;animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23999'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23666'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E")}}@-webkit-keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg opacity='.3' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg opacity='.9' fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23fff' stroke-width='3' fill='%23fff'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/svg%3E")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 8px 2px 28px;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner,.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' fill='%23fff'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E")}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;-webkit-box-sizing:border-box;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.mapboxgl-popup-anchor-left{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.mapboxgl-popup-anchor-right{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:-webkit-box;display:-ms-flexbox;display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{position:absolute;top:0;left:0;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:"";position:absolute;-webkit-animation:mapboxgl-user-location-dot-pulse 2s infinite;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 0 3px rgba(0,0,0,.35);box-shadow:0 0 3px rgba(0,0,0,.35)}@-webkit-keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);opacity:0}to{-webkit-transform:scale(1);opacity:0}}@keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);transform:scale(3);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:rgba(29,161,242,.2);width:1px;height:1px;border-radius:100%}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}}`),window.mapboxgl=Q_();var rz=0,MM="101MlGsZ2AmmA&access_token=pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg",nz=(CM=(0,bo.b2)(),CM(TM=function(e){(0,Ce.Z)(r,e);var i=J9(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u1&&arguments[1]!==void 0?arguments[1]:{x:0,y:0,z:0},u=this.lngLatToMercator(t,0),c=u.x,v=u.y;return[c-o.x,v-o.y]}},{key:"lngLatToMercator",value:function(t,o){var u=window.mapboxgl.MercatorCoordinate.fromLngLat(t,o),c=u.x,v=c===void 0?0:c,E=u.y,G=E===void 0?0:E,ie=u.z,xe=ie===void 0?0:ie;return{x:v,y:G,z:xe}}},{key:"getModelMatrix",value:function(t,o,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[1,1,1],v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{x:0,y:0,z:0},E=window.mapboxgl.MercatorCoordinate.fromLngLat(t,o),G=E.meterInMercatorCoordinateUnits(),ie=Nf();return Fd(ie,ie,qd(E.x-v.x,E.y-v.y,E.z||0-v.z)),zd(ie,ie,qd(G*c[0],-G*c[1],G*c[2])),Yd(ie,ie,u[0]),lp(ie,ie,u[1]),cp(ie,ie,u[2]),ie}},{key:"init",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u=this,c,v,E,G,ie,xe,Fe,it,gt,Dt,ar,Mr,Zr;return Qr().wrap(function(zn){for(;;)switch(zn.prev=zn.next){case 0:c=this.config,v=c.id,E=v===void 0?"map":v,G=c.attributionControl,ie=G===void 0?!1:G,xe=c.style,Fe=xe===void 0?"light":xe,it=c.token,gt=it===void 0?MM:it,Dt=c.rotation,ar=Dt===void 0?0:Dt,Mr=c.mapInstance,Zr=(0,K0.Z)(c,Q9),this.viewport=new SM,!Mr&&!window.mapboxgl&&console.error(this.configService.getSceneWarninfo("SDK")),gt===MM&&Fe!=="blank"&&!window.mapboxgl.accessToken&&!Mr&&console.warn(this.configService.getSceneWarninfo("MapToken")),!Mr&&!window.mapboxgl.accessToken&&(window.mapboxgl.accessToken=gt),Mr?(this.map=Mr,this.$mapContainer=this.map.getContainer()):(this.$mapContainer=this.creatMapContainer(E),this.map=new window.mapboxgl.Map((0,Me.Z)({container:this.$mapContainer,style:this.getMapStyleValue(Fe),attributionControl:ie,bearing:ar},Zr))),this.map.on("load",function(){u.handleCameraChanged()}),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged();case 9:case"end":return zn.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"destroy",value:function(){var t;(t=this.$mapContainer)===null||t===void 0||(t=t.parentNode)===null||t===void 0||t.removeChild(this.$mapContainer),this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(t){for(var o,u=arguments.length,c=new Array(u>1?u-1:0),v=1;v1?u-1:0),v=1;v.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;-webkit-box-sizing:border-box;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:-webkit-box;display:-ms-flexbox;display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.maplibregl-popup-anchor-left{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.maplibregl-popup-anchor-right{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{-ms-flex-item-align:center;align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{-ms-flex-item-align:start;align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{-ms-flex-item-align:end;align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{-ms-flex-item-align:center;align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{-ms-flex-item-align:start;align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{-ms-flex-item-align:end;align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{-ms-flex-item-align:center;align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{-ms-flex-item-align:center;align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:-webkit-box;display:-ms-flexbox;display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{-webkit-animation:maplibregl-user-location-dot-pulse 2s infinite;animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;-webkit-box-shadow:0 0 3px rgba(0,0,0,.35);box-shadow:0 0 3px rgba(0,0,0,.35);-webkit-box-sizing:border-box;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@-webkit-keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}70%{opacity:0;-webkit-transform:scale(3);transform:scale(3)}to{opacity:0;-webkit-transform:scale(1);transform:scale(1)}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}70%{opacity:0;-webkit-transform:scale(3);transform:scale(3)}to{opacity:0;-webkit-transform:scale(1);transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(0,0,0,.4);color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:1.4em;inset:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;-webkit-transition:opacity 1s ease 1s;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;-webkit-transition:opacity .05s;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`),window.maplibregl=J_();var dz=0,pz=(PM=(0,bo.b2)(),PM(IM=function(e){(0,Ce.Z)(r,e);var i=cz(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u1&&arguments[1]!==void 0?arguments[1]:{x:0,y:0,z:0},u=this.lngLatToMercator(t,0),c=u.x,v=u.y;return[c-o.x,v-o.y]}},{key:"lngLatToMercator",value:function(t,o){var u=window.maplibregl.MercatorCoordinate.fromLngLat(t,o),c=u.x,v=c===void 0?0:c,E=u.y,G=E===void 0?0:E,ie=u.z,xe=ie===void 0?0:ie;return{x:v,y:G,z:xe}}},{key:"getModelMatrix",value:function(t,o,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[1,1,1],v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{x:0,y:0,z:0},E=window.maplibregl.MercatorCoordinate.fromLngLat(t,o),G=E.meterInMercatorCoordinateUnits(),ie=Nf();return Fd(ie,ie,qd(E.x-v.x,E.y-v.y,E.z||0-v.z)),zd(ie,ie,qd(G*c[0],-G*c[1],G*c[2])),Yd(ie,ie,u[0]),lp(ie,ie,u[1]),cp(ie,ie,u[2]),ie}},{key:"init",value:function(){var n=(0,Qi.Z)(Qr().mark(function o(){var u=this,c,v,E,G,ie,xe,Fe,it,gt,Dt,ar;return Qr().wrap(function(Zr){for(;;)switch(Zr.prev=Zr.next){case 0:c=this.config,v=c.id,E=v===void 0?"map":v,G=c.attributionControl,ie=G===void 0?!1:G,xe=c.style,Fe=xe===void 0?"light":xe,it=c.rotation,gt=it===void 0?0:it,Dt=c.mapInstance,ar=(0,K0.Z)(c,lz),this.viewport=new SM,!Dt&&!window.maplibregl&&console.error(this.configService.getSceneWarninfo("SDK")),Dt?(this.map=Dt,this.$mapContainer=this.map.getContainer()):(this.$mapContainer=this.creatMapContainer(E),this.map=new window.maplibregl.Map((0,Me.Z)({container:this.$mapContainer,style:this.getMapStyleValue(Fe),attributionControl:ie,bearing:gt},ar))),this.map.on("load",function(){u.handleCameraChanged()}),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged();case 7:case"end":return Zr.stop()}},o,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"destroy",value:function(){var t;(t=this.$mapContainer)===null||t===void 0||(t=t.parentNode)===null||t===void 0||t.removeChild(this.$mapContainer),this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(t){for(var o,u=arguments.length,c=new Array(u>1?u-1:0),v=1;v1?u-1:0),v=1;v3&&arguments[3]!==void 0?arguments[3]:[1,1,1],v=this.viewport.projectFlat(t),E=Nf();return Fd(E,E,qd(v[0],v[1],o)),zd(E,E,qd(c[0],c[1],c[2])),Yd(E,E,u[0]),lp(E,E,u[1]),cp(E,E,u[2]),E}},{key:"getCustomCoordCenter",value:function(){throw new Error("Method not implemented.")}},{key:"exportMap",value:function(t){var o=this.getMapCanvasContainer(),u=t==="jpg"?o==null?void 0:o.toDataURL("image/jpeg"):o==null?void 0:o.toDataURL("image/png");return u}},{key:"rotateY",value:function(){throw new Error("Method not implemented.")}},{key:"hideLogo",value:function(){var t=this.map.getContainer();t&&Po(t,"tmap-contianer--hide-logo")}}]),r}(Dg);function Mz(e){var i=Pz();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Pz(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var Iz=function(e){(0,Ce.Z)(r,e);var i=Mz(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getServiceConstructor",value:function(){return Tz}}]),r}(Uv),Rz=function(i){var r=i.tk;return new Promise(function(n,t){var o=document.createElement("script");o.type="text/javascript",o.src="https://api.tianditu.gov.cn/api?v=4.0&tk=".concat(r),o.onload=function(){console.log("TianDiTu API script loaded."),n(!0)},o.onerror=function(){console.error("Failed to load TianDiTu API script."),n(!1)},document.head.appendChild(o)})},O$=function(){},Oz=["id","mapInstance","center","token","version","minZoom","maxZoom","logoVisible","zoom"];function Lz(e){var i=Dz();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Dz(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var kz=0,Q1={camerachange:["move"]},Fz=function(e){(0,Ce.Z)(r,e);var i=Lz(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u0&&arguments[0]!==void 0?arguments[0]:0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.map.panBy([t,o])}},{key:"fitBounds",value:function(t,o){var u=(0,wi.Z)(t,2),c=u[0],v=u[1];this.map.setViewport([new window.T.LngLat(c[0],c[1]),new window.T.LngLat(v[0],v[1])])}},{key:"setMaxZoom",value:function(t){this.map.setMaxZoom(t)}},{key:"setMinZoom",value:function(t){this.map.setMinZoom(t)}},{key:"setMapStatus",value:function(t){t.doubleClickZoom===!0&&this.map.enableDoubleClickZoom(),t.doubleClickZoom===!1&&this.map.disableDoubleClickZoom(),t.dragEnable===!1&&this.map.disableDrag(),t.dragEnable===!0&&this.map.enableDrag(),t.keyboardEnable===!1&&this.map.disableKeyboard(),t.keyboardEnable===!0&&this.map.enableKeyboard(),t.zoomEnable===!1&&this.map.disableScrollWheelZoom(),t.zoomEnable===!0&&this.map.enableScrollWheelZoom()}},{key:"getModelMatrix",value:function(t,o,u,c,v){throw new Error("Method not implemented.")}},{key:"pixelToLngLat",value:function(t){var o=(0,wi.Z)(t,2),u=o[0],c=o[1],v=this.map.layerPointToLngLat({x:u,y:c});return{lng:v.lng,lat:v.lat}}},{key:"lngLatToPixel",value:function(t){var o=(0,wi.Z)(t,2),u=o[0],c=o[1],v=this.map.lngLatToLayerPoint({lng:u,lat:c});return{x:v.x,y:v.y}}},{key:"containerToLngLat",value:function(t){var o=(0,wi.Z)(t,2),u=o[0],c=o[1],v=this.map.containerPointToLngLat({x:u,y:c});return{lng:v.lng,lat:v.lat}}},{key:"lngLatToContainer",value:function(t){var o=(0,wi.Z)(t,2),u=o[0],c=o[1],v=this.map.lngLatToContainerPoint({lat:c,lng:u});return{x:v.x,y:v.y}}},{key:"lngLatToCoord",value:function(t){var o=(0,wi.Z)(t,2),u=o[0],c=o[1],v=this.lngLatToPixel([u,c]);return[v.x,v.y]}},{key:"lngLatToCoords",value:function(t){var o=this;return t.map(function(u){return Array.isArray(u[0])?o.lngLatToCoords(u):o.lngLatToCoord(u)})}},{key:"getBounds",value:function(){var t=this.map.getBounds(),o=t.getSouthWest(),u=t.getNorthEast();return[[o.lng,o.lat],[u.lng,u.lat]]}},{key:"lngLatToMercator",value:function(t,o){var u=Bg.fromLngLat(t,o),c=u.x,v=c===void 0?0:c,E=u.y,G=E===void 0?0:E,ie=u.z,xe=ie===void 0?0:ie;return{x:v,y:G,z:xe}}},{key:"getCustomCoordCenter",value:function(){throw new Error("Method not implemented.")}},{key:"creatMapContainer",value:function(t){var o=t;typeof t=="string"&&(o=document.getElementById(t));var u=document.createElement("div");return u.style.cssText+=` - position: absolute; - top: 0; - height: 100%; - width: 100%; - `,u.id="l7_tdt_div"+kz++,o.appendChild(u),u}}]),r}(Dg);function Bz(e){var i=Nz();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Nz(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var zz=function(e){(0,Ce.Z)(r,e);var i=Bz(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getServiceConstructor",value:function(){return Fz}}]),r}(Uv);if(!window)throw Error("Google Map JSAPI can only be used in Browser.");var Gv=function(e){return e.notload="notload",e.loading="loading",e.loaded="loaded",e.failed="failed",e}(Gv||{}),Uw={key:""},Ug={GMap:Gv.notload},jw=[],OM=function(i){if(typeof i=="function"){if(Ug.GMap===Gv.loaded){i(window.google.maps.Map);return}jw.push(i)}},Zz=function(i){return new Promise(function(r,n){if(Ug.GMap===Gv.failed)n("");else if(Ug.GMap===Gv.notload){var t=i.key;if(!t){n("\u8BF7\u586B\u5199key");return}Uw.key=t,Ug.GMap=Gv.loading,window.initMap=function(c){if(delete window.initMap,c)Ug.GMap=Gv.failed,n(c);else for(Ug.GMap=Gv.loaded;jw.length;)jw.splice(0,1)[0](window.google.maps.Map)};var o=document.createElement("script");o.type="text/javascript",o.async=!1,o.src="https://maps.googleapis.com/maps/api/js?key=".concat(Uw.key,"&callback=initMap"),o.onerror=function(c){Ug.GMap=Gv.failed,n(c)};var u=document.body||document.head;u.appendChild(o),OM(r)}else if(Ug.GMap===Gv.loaded){if(i.key&&i.key!==Uw.key){n("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");return}OM(r)}})},Uz=function(){delete window.google,Ug={GMap:Gv.notload}},jz={load:Zz,reset:Uz},Vz=["id","mapInstance","center","token","minZoom","maxZoom","rotation","pitch","mapSize","logoVisible"];function $z(e){var i=Hz();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Hz(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Gz(e,i){var r=typeof my!="undefined"&&!!my&&typeof my.showToast=="function"&&my.isFRM!==!0,n=typeof wx!="undefined"&&wx!==null&&(typeof wx.request!="undefined"||typeof wx.miniProgram!="undefined");if(!(r||n)&&(i||(i=document),!!i)){var t=i.head||i.getElementsByTagName("head")[0];if(!t){t=i.createElement("head");var o=i.body||i.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(t,o):i.documentElement.appendChild(t)}var u=i.createElement("style");return u.type="text/css",u.styleSheet?u.styleSheet.cssText=e:u.appendChild(i.createTextNode(e)),t.appendChild(u),u}}Gz(`img[src*='//mapapi.qq.com/web/jsapi/logo/logo_def.png'],.logo-text { - display: none !important; -} -`);var Wz="AIzaSyDBDCfl4pvuDtaazdCog3LmhA7CQLhmcRE",J1={mapmove:"center_changed",camerachange:["drag","pan","rotate","tilt","zoom_changed"],zoomchange:"zoom_changed",dragging:"drag"},Xz=function(e){(0,Ce.Z)(r,e);var i=$z(r);function r(){var n;(0,Je.Z)(this,r);for(var t=arguments.length,o=new Array(t),u=0;u3&&arguments[3]!==void 0?arguments[3]:[1,1,1],v=this.viewport.projectFlat(t),E=Nf();return Fd(E,E,qd(v[0],v[1],o)),zd(E,E,qd(c[0],c[1],c[2])),Yd(E,E,u[0]),lp(E,E,u[1]),cp(E,E,u[2]),E}},{key:"getCustomCoordCenter",value:function(){throw new Error("Method not implemented.")}},{key:"exportMap",value:function(t){var o=this.getMapCanvasContainer(),u=t==="jpg"?o==null?void 0:o.toDataURL("image/jpeg"):o==null?void 0:o.toDataURL("image/png");return u}},{key:"rotateY",value:function(){throw new Error("Method not implemented.")}},{key:"hideLogo",value:function(){var t=this.map.getDiv();t&&Po(t,"tmap-contianer--hide-logo")}}]),r}(Dg);function Yz(e){var i=Kz();return function(){var n=(0,et.Z)(e),t;if(i){var o=(0,et.Z)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,pt.Z)(this,t)}}function Kz(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var qz=function(e){(0,Ce.Z)(r,e);var i=Yz(r);function r(){return(0,Je.Z)(this,r),i.apply(this,arguments)}return(0,vt.Z)(r,[{key:"getServiceConstructor",value:function(){return Xz}}]),r}(Uv),Qz=_(45409),Jz=_.n(Qz),eZ=function(){function e(i,r){(0,Je.Z)(this,e);var n=r.buffer,t=r.offset,o=r.stride,u=r.normalized,c=r.size,v=r.divisor;this.buffer=n,this.attribute={buffer:n.get(),offset:t||0,stride:o||0,normalized:u||!1,divisor:v||0},c&&(this.attribute.size=c)}return(0,vt.Z)(e,[{key:"get",value:function(){return this.attribute}},{key:"updateBuffer",value:function(r){this.buffer.subData(r)}},{key:"destroy",value:function(){this.buffer.destroy()}}]),e}(),jg,eA,by,Fv,tA,xy,rA,f2,sg,s1,Xm,ug,lg,h2,tZ=(jg={},(0,St.Z)(jg,Or.POINTS,"points"),(0,St.Z)(jg,Or.LINES,"lines"),(0,St.Z)(jg,Or.LINE_LOOP,"line loop"),(0,St.Z)(jg,Or.LINE_STRIP,"line strip"),(0,St.Z)(jg,Or.TRIANGLES,"triangles"),(0,St.Z)(jg,Or.TRIANGLE_FAN,"triangle fan"),(0,St.Z)(jg,Or.TRIANGLE_STRIP,"triangle strip"),jg),LM=(eA={},(0,St.Z)(eA,Or.STATIC_DRAW,"static"),(0,St.Z)(eA,Or.DYNAMIC_DRAW,"dynamic"),(0,St.Z)(eA,Or.STREAM_DRAW,"stream"),eA),Vw=(by={},(0,St.Z)(by,Or.BYTE,"int8"),(0,St.Z)(by,Or.INT,"int32"),(0,St.Z)(by,Or.UNSIGNED_BYTE,"uint8"),(0,St.Z)(by,Or.UNSIGNED_SHORT,"uint16"),(0,St.Z)(by,Or.UNSIGNED_INT,"uint32"),(0,St.Z)(by,Or.FLOAT,"float"),by),rZ=(Fv={},(0,St.Z)(Fv,Or.ALPHA,"alpha"),(0,St.Z)(Fv,Or.LUMINANCE,"luminance"),(0,St.Z)(Fv,Or.LUMINANCE_ALPHA,"luminance alpha"),(0,St.Z)(Fv,Or.RGB,"rgb"),(0,St.Z)(Fv,Or.RGBA,"rgba"),(0,St.Z)(Fv,Or.RGBA4,"rgba4"),(0,St.Z)(Fv,Or.RGB5_A1,"rgb5 a1"),(0,St.Z)(Fv,Or.RGB565,"rgb565"),(0,St.Z)(Fv,Or.DEPTH_COMPONENT,"depth"),(0,St.Z)(Fv,Or.DEPTH_STENCIL,"depth stencil"),Fv),nZ=(tA={},(0,St.Z)(tA,Or.DONT_CARE,"dont care"),(0,St.Z)(tA,Or.NICEST,"nice"),(0,St.Z)(tA,Or.FASTEST,"fast"),tA),DM=(xy={},(0,St.Z)(xy,Or.NEAREST,"nearest"),(0,St.Z)(xy,Or.LINEAR,"linear"),(0,St.Z)(xy,Or.LINEAR_MIPMAP_LINEAR,"mipmap"),(0,St.Z)(xy,Or.NEAREST_MIPMAP_LINEAR,"nearest mipmap linear"),(0,St.Z)(xy,Or.LINEAR_MIPMAP_NEAREST,"linear mipmap nearest"),(0,St.Z)(xy,Or.NEAREST_MIPMAP_NEAREST,"nearest mipmap nearest"),xy),kM=(rA={},(0,St.Z)(rA,Or.REPEAT,"repeat"),(0,St.Z)(rA,Or.CLAMP_TO_EDGE,"clamp"),(0,St.Z)(rA,Or.MIRRORED_REPEAT,"mirror"),rA),iZ=(f2={},(0,St.Z)(f2,Or.NONE,"none"),(0,St.Z)(f2,Or.BROWSER_DEFAULT_WEBGL,"browser"),f2),aZ=(sg={},(0,St.Z)(sg,Or.NEVER,"never"),(0,St.Z)(sg,Or.ALWAYS,"always"),(0,St.Z)(sg,Or.LESS,"less"),(0,St.Z)(sg,Or.LEQUAL,"lequal"),(0,St.Z)(sg,Or.GREATER,"greater"),(0,St.Z)(sg,Or.GEQUAL,"gequal"),(0,St.Z)(sg,Or.EQUAL,"equal"),(0,St.Z)(sg,Or.NOTEQUAL,"notequal"),sg),FM=(s1={},(0,St.Z)(s1,Or.FUNC_ADD,"add"),(0,St.Z)(s1,Or.MIN_EXT,"min"),(0,St.Z)(s1,Or.MAX_EXT,"max"),(0,St.Z)(s1,Or.FUNC_SUBTRACT,"subtract"),(0,St.Z)(s1,Or.FUNC_REVERSE_SUBTRACT,"reverse subtract"),s1),d2=(Xm={},(0,St.Z)(Xm,Or.ZERO,"zero"),(0,St.Z)(Xm,Or.ONE,"one"),(0,St.Z)(Xm,Or.SRC_COLOR,"src color"),(0,St.Z)(Xm,Or.ONE_MINUS_SRC_COLOR,"one minus src color"),(0,St.Z)(Xm,Or.SRC_ALPHA,"src alpha"),(0,St.Z)(Xm,Or.ONE_MINUS_SRC_ALPHA,"one minus src alpha"),(0,St.Z)(Xm,Or.DST_COLOR,"dst color"),(0,St.Z)(Xm,Or.ONE_MINUS_DST_COLOR,"one minus dst color"),(0,St.Z)(Xm,Or.DST_ALPHA,"dst alpha"),(0,St.Z)(Xm,Or.ONE_MINUS_DST_ALPHA,"one minus dst alpha"),(0,St.Z)(Xm,Or.CONSTANT_COLOR,"constant color"),(0,St.Z)(Xm,Or.ONE_MINUS_CONSTANT_COLOR,"one minus constant color"),(0,St.Z)(Xm,Or.CONSTANT_ALPHA,"constant alpha"),(0,St.Z)(Xm,Or.ONE_MINUS_CONSTANT_ALPHA,"one minus constant alpha"),(0,St.Z)(Xm,Or.SRC_ALPHA_SATURATE,"src alpha saturate"),Xm),oZ=(ug={},(0,St.Z)(ug,Or.NEVER,"never"),(0,St.Z)(ug,Or.ALWAYS,"always"),(0,St.Z)(ug,Or.LESS,"less"),(0,St.Z)(ug,Or.LEQUAL,"lequal"),(0,St.Z)(ug,Or.GREATER,"greater"),(0,St.Z)(ug,Or.GEQUAL,"gequal"),(0,St.Z)(ug,Or.EQUAL,"equal"),(0,St.Z)(ug,Or.NOTEQUAL,"notequal"),ug),e_=(lg={},(0,St.Z)(lg,Or.ZERO,"zero"),(0,St.Z)(lg,Or.KEEP,"keep"),(0,St.Z)(lg,Or.REPLACE,"replace"),(0,St.Z)(lg,Or.INVERT,"invert"),(0,St.Z)(lg,Or.INCR,"increment"),(0,St.Z)(lg,Or.DECR,"decrement"),(0,St.Z)(lg,Or.INCR_WRAP,"increment wrap"),(0,St.Z)(lg,Or.DECR_WRAP,"decrement wrap"),lg),sZ=(h2={},(0,St.Z)(h2,Or.FRONT,"front"),(0,St.Z)(h2,Or.BACK,"back"),h2),uZ=function(){function e(i,r){(0,Je.Z)(this,e),(0,St.Z)(this,"isDestroyed",!1);var n=r.data,t=r.usage,o=r.type;this.buffer=i.buffer({data:n,usage:LM[t||Or.STATIC_DRAW],type:Vw[o||Or.UNSIGNED_BYTE]})}return(0,vt.Z)(e,[{key:"get",value:function(){return this.buffer}},{key:"destroy",value:function(){this.isDestroyed||this.buffer.destroy(),this.isDestroyed=!0}},{key:"subData",value:function(r){var n=r.data,t=r.offset;this.buffer.subdata(n,t)}}]),e}(),lZ=function(){function e(i,r){(0,Je.Z)(this,e);var n=r.data,t=r.usage,o=r.type,u=r.count;this.elements=i.elements({data:n,usage:LM[t||Or.STATIC_DRAW],type:Vw[o||Or.UNSIGNED_BYTE],count:u})}return(0,vt.Z)(e,[{key:"get",value:function(){return this.elements}},{key:"subData",value:function(r){var n=r.data;this.elements.subdata(n)}},{key:"destroy",value:function(){}}]),e}(),cZ=function(){function e(i,r){(0,Je.Z)(this,e);var n=r.width,t=r.height,o=r.color,u=r.colors,c={width:n,height:t};Array.isArray(u)&&(c.colors=u.map(function(v){return v.get()})),o&&typeof o!="boolean"&&(c.color=o.get()),this.framebuffer=i.framebuffer(c)}return(0,vt.Z)(e,[{key:"get",value:function(){return this.framebuffer}},{key:"destroy",value:function(){this.framebuffer.destroy()}},{key:"resize",value:function(r){var n=r.width,t=r.height;this.framebuffer.resize(n,t)}}]),e}(),fZ=function(e){return e==null},Bv=fZ,hZ={}.toString,dZ=function(e,i){return hZ.call(e)==="[object "+i+"]"},pZ=dZ,mZ=function(e){return pZ(e,"Number")},t_=mZ,vZ=function(e,i,r){return er?r:e},gZ=vZ,jc=_(32290),yZ=_(37271),BM=yZ,zi;(function(e){e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT",e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA",e[e.FUNC_ADD=32774]="FUNC_ADD",e[e.FUNC_SUBTRACT=32778]="FUNC_SUBTRACT",e[e.FUNC_REVERSE_SUBTRACT=32779]="FUNC_REVERSE_SUBTRACT",e[e.BLEND_EQUATION=32777]="BLEND_EQUATION",e[e.BLEND_EQUATION_RGB=32777]="BLEND_EQUATION_RGB",e[e.BLEND_EQUATION_ALPHA=34877]="BLEND_EQUATION_ALPHA",e[e.BLEND_DST_RGB=32968]="BLEND_DST_RGB",e[e.BLEND_SRC_RGB=32969]="BLEND_SRC_RGB",e[e.BLEND_DST_ALPHA=32970]="BLEND_DST_ALPHA",e[e.BLEND_SRC_ALPHA=32971]="BLEND_SRC_ALPHA",e[e.BLEND_COLOR=32773]="BLEND_COLOR",e[e.ARRAY_BUFFER_BINDING=34964]="ARRAY_BUFFER_BINDING",e[e.ELEMENT_ARRAY_BUFFER_BINDING=34965]="ELEMENT_ARRAY_BUFFER_BINDING",e[e.LINE_WIDTH=2849]="LINE_WIDTH",e[e.ALIASED_POINT_SIZE_RANGE=33901]="ALIASED_POINT_SIZE_RANGE",e[e.ALIASED_LINE_WIDTH_RANGE=33902]="ALIASED_LINE_WIDTH_RANGE",e[e.CULL_FACE_MODE=2885]="CULL_FACE_MODE",e[e.FRONT_FACE=2886]="FRONT_FACE",e[e.DEPTH_RANGE=2928]="DEPTH_RANGE",e[e.DEPTH_WRITEMASK=2930]="DEPTH_WRITEMASK",e[e.DEPTH_CLEAR_VALUE=2931]="DEPTH_CLEAR_VALUE",e[e.DEPTH_FUNC=2932]="DEPTH_FUNC",e[e.STENCIL_CLEAR_VALUE=2961]="STENCIL_CLEAR_VALUE",e[e.STENCIL_FUNC=2962]="STENCIL_FUNC",e[e.STENCIL_FAIL=2964]="STENCIL_FAIL",e[e.STENCIL_PASS_DEPTH_FAIL=2965]="STENCIL_PASS_DEPTH_FAIL",e[e.STENCIL_PASS_DEPTH_PASS=2966]="STENCIL_PASS_DEPTH_PASS",e[e.STENCIL_REF=2967]="STENCIL_REF",e[e.STENCIL_VALUE_MASK=2963]="STENCIL_VALUE_MASK",e[e.STENCIL_WRITEMASK=2968]="STENCIL_WRITEMASK",e[e.STENCIL_BACK_FUNC=34816]="STENCIL_BACK_FUNC",e[e.STENCIL_BACK_FAIL=34817]="STENCIL_BACK_FAIL",e[e.STENCIL_BACK_PASS_DEPTH_FAIL=34818]="STENCIL_BACK_PASS_DEPTH_FAIL",e[e.STENCIL_BACK_PASS_DEPTH_PASS=34819]="STENCIL_BACK_PASS_DEPTH_PASS",e[e.STENCIL_BACK_REF=36003]="STENCIL_BACK_REF",e[e.STENCIL_BACK_VALUE_MASK=36004]="STENCIL_BACK_VALUE_MASK",e[e.STENCIL_BACK_WRITEMASK=36005]="STENCIL_BACK_WRITEMASK",e[e.VIEWPORT=2978]="VIEWPORT",e[e.SCISSOR_BOX=3088]="SCISSOR_BOX",e[e.COLOR_CLEAR_VALUE=3106]="COLOR_CLEAR_VALUE",e[e.COLOR_WRITEMASK=3107]="COLOR_WRITEMASK",e[e.UNPACK_ALIGNMENT=3317]="UNPACK_ALIGNMENT",e[e.PACK_ALIGNMENT=3333]="PACK_ALIGNMENT",e[e.MAX_TEXTURE_SIZE=3379]="MAX_TEXTURE_SIZE",e[e.MAX_VIEWPORT_DIMS=3386]="MAX_VIEWPORT_DIMS",e[e.SUBPIXEL_BITS=3408]="SUBPIXEL_BITS",e[e.RED_BITS=3410]="RED_BITS",e[e.GREEN_BITS=3411]="GREEN_BITS",e[e.BLUE_BITS=3412]="BLUE_BITS",e[e.ALPHA_BITS=3413]="ALPHA_BITS",e[e.DEPTH_BITS=3414]="DEPTH_BITS",e[e.STENCIL_BITS=3415]="STENCIL_BITS",e[e.POLYGON_OFFSET_UNITS=10752]="POLYGON_OFFSET_UNITS",e[e.POLYGON_OFFSET_FACTOR=32824]="POLYGON_OFFSET_FACTOR",e[e.TEXTURE_BINDING_2D=32873]="TEXTURE_BINDING_2D",e[e.SAMPLE_BUFFERS=32936]="SAMPLE_BUFFERS",e[e.SAMPLES=32937]="SAMPLES",e[e.SAMPLE_COVERAGE_VALUE=32938]="SAMPLE_COVERAGE_VALUE",e[e.SAMPLE_COVERAGE_INVERT=32939]="SAMPLE_COVERAGE_INVERT",e[e.COMPRESSED_TEXTURE_FORMATS=34467]="COMPRESSED_TEXTURE_FORMATS",e[e.VENDOR=7936]="VENDOR",e[e.RENDERER=7937]="RENDERER",e[e.VERSION=7938]="VERSION",e[e.IMPLEMENTATION_COLOR_READ_TYPE=35738]="IMPLEMENTATION_COLOR_READ_TYPE",e[e.IMPLEMENTATION_COLOR_READ_FORMAT=35739]="IMPLEMENTATION_COLOR_READ_FORMAT",e[e.BROWSER_DEFAULT_WEBGL=37444]="BROWSER_DEFAULT_WEBGL",e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.BUFFER_SIZE=34660]="BUFFER_SIZE",e[e.BUFFER_USAGE=34661]="BUFFER_USAGE",e[e.CURRENT_VERTEX_ATTRIB=34342]="CURRENT_VERTEX_ATTRIB",e[e.VERTEX_ATTRIB_ARRAY_ENABLED=34338]="VERTEX_ATTRIB_ARRAY_ENABLED",e[e.VERTEX_ATTRIB_ARRAY_SIZE=34339]="VERTEX_ATTRIB_ARRAY_SIZE",e[e.VERTEX_ATTRIB_ARRAY_STRIDE=34340]="VERTEX_ATTRIB_ARRAY_STRIDE",e[e.VERTEX_ATTRIB_ARRAY_TYPE=34341]="VERTEX_ATTRIB_ARRAY_TYPE",e[e.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922]="VERTEX_ATTRIB_ARRAY_NORMALIZED",e[e.VERTEX_ATTRIB_ARRAY_POINTER=34373]="VERTEX_ATTRIB_ARRAY_POINTER",e[e.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975]="VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",e[e.CULL_FACE=2884]="CULL_FACE",e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK",e[e.BLEND=3042]="BLEND",e[e.DEPTH_TEST=2929]="DEPTH_TEST",e[e.DITHER=3024]="DITHER",e[e.POLYGON_OFFSET_FILL=32823]="POLYGON_OFFSET_FILL",e[e.SAMPLE_ALPHA_TO_COVERAGE=32926]="SAMPLE_ALPHA_TO_COVERAGE",e[e.SAMPLE_COVERAGE=32928]="SAMPLE_COVERAGE",e[e.SCISSOR_TEST=3089]="SCISSOR_TEST",e[e.STENCIL_TEST=2960]="STENCIL_TEST",e[e.NO_ERROR=0]="NO_ERROR",e[e.INVALID_ENUM=1280]="INVALID_ENUM",e[e.INVALID_VALUE=1281]="INVALID_VALUE",e[e.INVALID_OPERATION=1282]="INVALID_OPERATION",e[e.OUT_OF_MEMORY=1285]="OUT_OF_MEMORY",e[e.CONTEXT_LOST_WEBGL=37442]="CONTEXT_LOST_WEBGL",e[e.CW=2304]="CW",e[e.CCW=2305]="CCW",e[e.DONT_CARE=4352]="DONT_CARE",e[e.FASTEST=4353]="FASTEST",e[e.NICEST=4354]="NICEST",e[e.GENERATE_MIPMAP_HINT=33170]="GENERATE_MIPMAP_HINT",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT",e[e.DOUBLE=5130]="DOUBLE",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER",e[e.COMPILE_STATUS=35713]="COMPILE_STATUS",e[e.DELETE_STATUS=35712]="DELETE_STATUS",e[e.LINK_STATUS=35714]="LINK_STATUS",e[e.VALIDATE_STATUS=35715]="VALIDATE_STATUS",e[e.ATTACHED_SHADERS=35717]="ATTACHED_SHADERS",e[e.ACTIVE_ATTRIBUTES=35721]="ACTIVE_ATTRIBUTES",e[e.ACTIVE_UNIFORMS=35718]="ACTIVE_UNIFORMS",e[e.MAX_VERTEX_ATTRIBS=34921]="MAX_VERTEX_ATTRIBS",e[e.MAX_VERTEX_UNIFORM_VECTORS=36347]="MAX_VERTEX_UNIFORM_VECTORS",e[e.MAX_VARYING_VECTORS=36348]="MAX_VARYING_VECTORS",e[e.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661]="MAX_COMBINED_TEXTURE_IMAGE_UNITS",e[e.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660]="MAX_VERTEX_TEXTURE_IMAGE_UNITS",e[e.MAX_TEXTURE_IMAGE_UNITS=34930]="MAX_TEXTURE_IMAGE_UNITS",e[e.MAX_FRAGMENT_UNIFORM_VECTORS=36349]="MAX_FRAGMENT_UNIFORM_VECTORS",e[e.SHADER_TYPE=35663]="SHADER_TYPE",e[e.SHADING_LANGUAGE_VERSION=35724]="SHADING_LANGUAGE_VERSION",e[e.CURRENT_PROGRAM=35725]="CURRENT_PROGRAM",e[e.NEVER=512]="NEVER",e[e.ALWAYS=519]="ALWAYS",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.GEQUAL=518]="GEQUAL",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP",e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR",e[e.TEXTURE_MAG_FILTER=10240]="TEXTURE_MAG_FILTER",e[e.TEXTURE_MIN_FILTER=10241]="TEXTURE_MIN_FILTER",e[e.TEXTURE_WRAP_S=10242]="TEXTURE_WRAP_S",e[e.TEXTURE_WRAP_T=10243]="TEXTURE_WRAP_T",e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE=5890]="TEXTURE",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_BINDING_CUBE_MAP=34068]="TEXTURE_BINDING_CUBE_MAP",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.MAX_CUBE_MAP_TEXTURE_SIZE=34076]="MAX_CUBE_MAP_TEXTURE_SIZE",e[e.TEXTURE0=33984]="TEXTURE0",e[e.ACTIVE_TEXTURE=34016]="ACTIVE_TEXTURE",e[e.REPEAT=10497]="REPEAT",e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e[e.TEXTURE_WIDTH=4096]="TEXTURE_WIDTH",e[e.TEXTURE_HEIGHT=4097]="TEXTURE_HEIGHT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.LOW_FLOAT=36336]="LOW_FLOAT",e[e.MEDIUM_FLOAT=36337]="MEDIUM_FLOAT",e[e.HIGH_FLOAT=36338]="HIGH_FLOAT",e[e.LOW_INT=36339]="LOW_INT",e[e.MEDIUM_INT=36340]="MEDIUM_INT",e[e.HIGH_INT=36341]="HIGH_INT",e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.RENDERBUFFER=36161]="RENDERBUFFER",e[e.RGBA4=32854]="RGBA4",e[e.RGB5_A1=32855]="RGB5_A1",e[e.RGB565=36194]="RGB565",e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX=6401]="STENCIL_INDEX",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.RENDERBUFFER_WIDTH=36162]="RENDERBUFFER_WIDTH",e[e.RENDERBUFFER_HEIGHT=36163]="RENDERBUFFER_HEIGHT",e[e.RENDERBUFFER_INTERNAL_FORMAT=36164]="RENDERBUFFER_INTERNAL_FORMAT",e[e.RENDERBUFFER_RED_SIZE=36176]="RENDERBUFFER_RED_SIZE",e[e.RENDERBUFFER_GREEN_SIZE=36177]="RENDERBUFFER_GREEN_SIZE",e[e.RENDERBUFFER_BLUE_SIZE=36178]="RENDERBUFFER_BLUE_SIZE",e[e.RENDERBUFFER_ALPHA_SIZE=36179]="RENDERBUFFER_ALPHA_SIZE",e[e.RENDERBUFFER_DEPTH_SIZE=36180]="RENDERBUFFER_DEPTH_SIZE",e[e.RENDERBUFFER_STENCIL_SIZE=36181]="RENDERBUFFER_STENCIL_SIZE",e[e.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048]="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",e[e.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049]="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",e[e.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",e[e.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051]="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.DEPTH_ATTACHMENT=36096]="DEPTH_ATTACHMENT",e[e.STENCIL_ATTACHMENT=36128]="STENCIL_ATTACHMENT",e[e.DEPTH_STENCIL_ATTACHMENT=33306]="DEPTH_STENCIL_ATTACHMENT",e[e.NONE=0]="NONE",e[e.FRAMEBUFFER_COMPLETE=36053]="FRAMEBUFFER_COMPLETE",e[e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054]="FRAMEBUFFER_INCOMPLETE_ATTACHMENT",e[e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055]="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",e[e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057]="FRAMEBUFFER_INCOMPLETE_DIMENSIONS",e[e.FRAMEBUFFER_UNSUPPORTED=36061]="FRAMEBUFFER_UNSUPPORTED",e[e.FRAMEBUFFER_BINDING=36006]="FRAMEBUFFER_BINDING",e[e.RENDERBUFFER_BINDING=36007]="RENDERBUFFER_BINDING",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER",e[e.MAX_RENDERBUFFER_SIZE=34024]="MAX_RENDERBUFFER_SIZE",e[e.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",e[e.UNPACK_FLIP_Y_WEBGL=37440]="UNPACK_FLIP_Y_WEBGL",e[e.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441]="UNPACK_PREMULTIPLY_ALPHA_WEBGL",e[e.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443]="UNPACK_COLORSPACE_CONVERSION_WEBGL",e[e.READ_BUFFER=3074]="READ_BUFFER",e[e.UNPACK_ROW_LENGTH=3314]="UNPACK_ROW_LENGTH",e[e.UNPACK_SKIP_ROWS=3315]="UNPACK_SKIP_ROWS",e[e.UNPACK_SKIP_PIXELS=3316]="UNPACK_SKIP_PIXELS",e[e.PACK_ROW_LENGTH=3330]="PACK_ROW_LENGTH",e[e.PACK_SKIP_ROWS=3331]="PACK_SKIP_ROWS",e[e.PACK_SKIP_PIXELS=3332]="PACK_SKIP_PIXELS",e[e.TEXTURE_BINDING_3D=32874]="TEXTURE_BINDING_3D",e[e.UNPACK_SKIP_IMAGES=32877]="UNPACK_SKIP_IMAGES",e[e.UNPACK_IMAGE_HEIGHT=32878]="UNPACK_IMAGE_HEIGHT",e[e.MAX_3D_TEXTURE_SIZE=32883]="MAX_3D_TEXTURE_SIZE",e[e.MAX_ELEMENTS_VERTICES=33e3]="MAX_ELEMENTS_VERTICES",e[e.MAX_ELEMENTS_INDICES=33001]="MAX_ELEMENTS_INDICES",e[e.MAX_TEXTURE_LOD_BIAS=34045]="MAX_TEXTURE_LOD_BIAS",e[e.MAX_FRAGMENT_UNIFORM_COMPONENTS=35657]="MAX_FRAGMENT_UNIFORM_COMPONENTS",e[e.MAX_VERTEX_UNIFORM_COMPONENTS=35658]="MAX_VERTEX_UNIFORM_COMPONENTS",e[e.MAX_ARRAY_TEXTURE_LAYERS=35071]="MAX_ARRAY_TEXTURE_LAYERS",e[e.MIN_PROGRAM_TEXEL_OFFSET=35076]="MIN_PROGRAM_TEXEL_OFFSET",e[e.MAX_PROGRAM_TEXEL_OFFSET=35077]="MAX_PROGRAM_TEXEL_OFFSET",e[e.MAX_VARYING_COMPONENTS=35659]="MAX_VARYING_COMPONENTS",e[e.FRAGMENT_SHADER_DERIVATIVE_HINT=35723]="FRAGMENT_SHADER_DERIVATIVE_HINT",e[e.RASTERIZER_DISCARD=35977]="RASTERIZER_DISCARD",e[e.VERTEX_ARRAY_BINDING=34229]="VERTEX_ARRAY_BINDING",e[e.MAX_VERTEX_OUTPUT_COMPONENTS=37154]="MAX_VERTEX_OUTPUT_COMPONENTS",e[e.MAX_FRAGMENT_INPUT_COMPONENTS=37157]="MAX_FRAGMENT_INPUT_COMPONENTS",e[e.MAX_SERVER_WAIT_TIMEOUT=37137]="MAX_SERVER_WAIT_TIMEOUT",e[e.MAX_ELEMENT_INDEX=36203]="MAX_ELEMENT_INDEX",e[e.RED=6403]="RED",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB10_A2=32857]="RGB10_A2",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_WRAP_R=32882]="TEXTURE_WRAP_R",e[e.TEXTURE_MIN_LOD=33082]="TEXTURE_MIN_LOD",e[e.TEXTURE_MAX_LOD=33083]="TEXTURE_MAX_LOD",e[e.TEXTURE_BASE_LEVEL=33084]="TEXTURE_BASE_LEVEL",e[e.TEXTURE_MAX_LEVEL=33085]="TEXTURE_MAX_LEVEL",e[e.TEXTURE_COMPARE_MODE=34892]="TEXTURE_COMPARE_MODE",e[e.TEXTURE_COMPARE_FUNC=34893]="TEXTURE_COMPARE_FUNC",e[e.SRGB=35904]="SRGB",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.COMPARE_REF_TO_TEXTURE=34894]="COMPARE_REF_TO_TEXTURE",e[e.RGBA32F=34836]="RGBA32F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.RGB16F=34843]="RGB16F",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_BINDING_2D_ARRAY=35869]="TEXTURE_BINDING_2D_ARRAY",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R16F=33325]="R16F",e[e.R32F=33326]="R32F",e[e.RG16F=33327]="RG16F",e[e.RG32F=33328]="RG32F",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2UI=36975]="RGB10_A2UI",e[e.TEXTURE_IMMUTABLE_FORMAT=37167]="TEXTURE_IMMUTABLE_FORMAT",e[e.TEXTURE_IMMUTABLE_LEVELS=33503]="TEXTURE_IMMUTABLE_LEVELS",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.RG=33319]="RG",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.INT_2_10_10_10_REV=36255]="INT_2_10_10_10_REV",e[e.CURRENT_QUERY=34917]="CURRENT_QUERY",e[e.QUERY_RESULT=34918]="QUERY_RESULT",e[e.QUERY_RESULT_AVAILABLE=34919]="QUERY_RESULT_AVAILABLE",e[e.ANY_SAMPLES_PASSED=35887]="ANY_SAMPLES_PASSED",e[e.ANY_SAMPLES_PASSED_CONSERVATIVE=36202]="ANY_SAMPLES_PASSED_CONSERVATIVE",e[e.MAX_DRAW_BUFFERS=34852]="MAX_DRAW_BUFFERS",e[e.DRAW_BUFFER0=34853]="DRAW_BUFFER0",e[e.DRAW_BUFFER1=34854]="DRAW_BUFFER1",e[e.DRAW_BUFFER2=34855]="DRAW_BUFFER2",e[e.DRAW_BUFFER3=34856]="DRAW_BUFFER3",e[e.DRAW_BUFFER4=34857]="DRAW_BUFFER4",e[e.DRAW_BUFFER5=34858]="DRAW_BUFFER5",e[e.DRAW_BUFFER6=34859]="DRAW_BUFFER6",e[e.DRAW_BUFFER7=34860]="DRAW_BUFFER7",e[e.DRAW_BUFFER8=34861]="DRAW_BUFFER8",e[e.DRAW_BUFFER9=34862]="DRAW_BUFFER9",e[e.DRAW_BUFFER10=34863]="DRAW_BUFFER10",e[e.DRAW_BUFFER11=34864]="DRAW_BUFFER11",e[e.DRAW_BUFFER12=34865]="DRAW_BUFFER12",e[e.DRAW_BUFFER13=34866]="DRAW_BUFFER13",e[e.DRAW_BUFFER14=34867]="DRAW_BUFFER14",e[e.DRAW_BUFFER15=34868]="DRAW_BUFFER15",e[e.MAX_COLOR_ATTACHMENTS=36063]="MAX_COLOR_ATTACHMENTS",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY",e[e.MAX_SAMPLES=36183]="MAX_SAMPLES",e[e.SAMPLER_BINDING=35097]="SAMPLER_BINDING",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.PIXEL_PACK_BUFFER_BINDING=35053]="PIXEL_PACK_BUFFER_BINDING",e[e.PIXEL_UNPACK_BUFFER_BINDING=35055]="PIXEL_UNPACK_BUFFER_BINDING",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",e[e.COPY_READ_BUFFER_BINDING=36662]="COPY_READ_BUFFER_BINDING",e[e.COPY_WRITE_BUFFER_BINDING=36663]="COPY_WRITE_BUFFER_BINDING",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.UNSIGNED_NORMALIZED=35863]="UNSIGNED_NORMALIZED",e[e.SIGNED_NORMALIZED=36764]="SIGNED_NORMALIZED",e[e.VERTEX_ATTRIB_ARRAY_INTEGER=35069]="VERTEX_ATTRIB_ARRAY_INTEGER",e[e.VERTEX_ATTRIB_ARRAY_DIVISOR=35070]="VERTEX_ATTRIB_ARRAY_DIVISOR",e[e.TRANSFORM_FEEDBACK_BUFFER_MODE=35967]="TRANSFORM_FEEDBACK_BUFFER_MODE",e[e.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS=35968]="MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",e[e.TRANSFORM_FEEDBACK_VARYINGS=35971]="TRANSFORM_FEEDBACK_VARYINGS",e[e.TRANSFORM_FEEDBACK_BUFFER_START=35972]="TRANSFORM_FEEDBACK_BUFFER_START",e[e.TRANSFORM_FEEDBACK_BUFFER_SIZE=35973]="TRANSFORM_FEEDBACK_BUFFER_SIZE",e[e.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN=35976]="TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",e[e.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS=35978]="MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",e[e.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS=35979]="MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",e[e.INTERLEAVED_ATTRIBS=35980]="INTERLEAVED_ATTRIBS",e[e.SEPARATE_ATTRIBS=35981]="SEPARATE_ATTRIBS",e[e.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER",e[e.TRANSFORM_FEEDBACK_BUFFER_BINDING=35983]="TRANSFORM_FEEDBACK_BUFFER_BINDING",e[e.TRANSFORM_FEEDBACK=36386]="TRANSFORM_FEEDBACK",e[e.TRANSFORM_FEEDBACK_PAUSED=36387]="TRANSFORM_FEEDBACK_PAUSED",e[e.TRANSFORM_FEEDBACK_ACTIVE=36388]="TRANSFORM_FEEDBACK_ACTIVE",e[e.TRANSFORM_FEEDBACK_BINDING=36389]="TRANSFORM_FEEDBACK_BINDING",e[e.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING=33296]="FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",e[e.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE=33297]="FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",e[e.FRAMEBUFFER_ATTACHMENT_RED_SIZE=33298]="FRAMEBUFFER_ATTACHMENT_RED_SIZE",e[e.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE=33299]="FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",e[e.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE=33300]="FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",e[e.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE=33301]="FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",e[e.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE=33302]="FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",e[e.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE=33303]="FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",e[e.FRAMEBUFFER_DEFAULT=33304]="FRAMEBUFFER_DEFAULT",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DRAW_FRAMEBUFFER_BINDING=36006]="DRAW_FRAMEBUFFER_BINDING",e[e.READ_FRAMEBUFFER_BINDING=36010]="READ_FRAMEBUFFER_BINDING",e[e.RENDERBUFFER_SAMPLES=36011]="RENDERBUFFER_SAMPLES",e[e.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER=36052]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",e[e.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE=36182]="FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.UNIFORM_BUFFER_BINDING=35368]="UNIFORM_BUFFER_BINDING",e[e.UNIFORM_BUFFER_START=35369]="UNIFORM_BUFFER_START",e[e.UNIFORM_BUFFER_SIZE=35370]="UNIFORM_BUFFER_SIZE",e[e.MAX_VERTEX_UNIFORM_BLOCKS=35371]="MAX_VERTEX_UNIFORM_BLOCKS",e[e.MAX_FRAGMENT_UNIFORM_BLOCKS=35373]="MAX_FRAGMENT_UNIFORM_BLOCKS",e[e.MAX_COMBINED_UNIFORM_BLOCKS=35374]="MAX_COMBINED_UNIFORM_BLOCKS",e[e.MAX_UNIFORM_BUFFER_BINDINGS=35375]="MAX_UNIFORM_BUFFER_BINDINGS",e[e.MAX_UNIFORM_BLOCK_SIZE=35376]="MAX_UNIFORM_BLOCK_SIZE",e[e.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS=35377]="MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",e[e.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS=35379]="MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",e[e.UNIFORM_BUFFER_OFFSET_ALIGNMENT=35380]="UNIFORM_BUFFER_OFFSET_ALIGNMENT",e[e.ACTIVE_UNIFORM_BLOCKS=35382]="ACTIVE_UNIFORM_BLOCKS",e[e.UNIFORM_TYPE=35383]="UNIFORM_TYPE",e[e.UNIFORM_SIZE=35384]="UNIFORM_SIZE",e[e.UNIFORM_BLOCK_INDEX=35386]="UNIFORM_BLOCK_INDEX",e[e.UNIFORM_OFFSET=35387]="UNIFORM_OFFSET",e[e.UNIFORM_ARRAY_STRIDE=35388]="UNIFORM_ARRAY_STRIDE",e[e.UNIFORM_MATRIX_STRIDE=35389]="UNIFORM_MATRIX_STRIDE",e[e.UNIFORM_IS_ROW_MAJOR=35390]="UNIFORM_IS_ROW_MAJOR",e[e.UNIFORM_BLOCK_BINDING=35391]="UNIFORM_BLOCK_BINDING",e[e.UNIFORM_BLOCK_DATA_SIZE=35392]="UNIFORM_BLOCK_DATA_SIZE",e[e.UNIFORM_BLOCK_ACTIVE_UNIFORMS=35394]="UNIFORM_BLOCK_ACTIVE_UNIFORMS",e[e.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES=35395]="UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",e[e.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER=35396]="UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",e[e.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER=35398]="UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS",e[e.SYNC_FENCE=37142]="SYNC_FENCE",e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE",e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED",e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED",e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT",e[e.COLOR=6144]="COLOR",e[e.DEPTH=6145]="DEPTH",e[e.STENCIL=6146]="STENCIL",e[e.MIN=32775]="MIN",e[e.MAX=32776]="MAX",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STREAM_COPY=35042]="STREAM_COPY",e[e.STATIC_READ=35045]="STATIC_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8",e[e.INVALID_INDEX=4294967295]="INVALID_INDEX",e[e.TIMEOUT_IGNORED=-1]="TIMEOUT_IGNORED",e[e.MAX_CLIENT_WAIT_TIMEOUT_WEBGL=37447]="MAX_CLIENT_WAIT_TIMEOUT_WEBGL",e[e.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE=35070]="VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE",e[e.UNMASKED_VENDOR_WEBGL=37445]="UNMASKED_VENDOR_WEBGL",e[e.UNMASKED_RENDERER_WEBGL=37446]="UNMASKED_RENDERER_WEBGL",e[e.MAX_TEXTURE_MAX_ANISOTROPY_EXT=34047]="MAX_TEXTURE_MAX_ANISOTROPY_EXT",e[e.TEXTURE_MAX_ANISOTROPY_EXT=34046]="TEXTURE_MAX_ANISOTROPY_EXT",e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37493]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ETC2=37494]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37495]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37496]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37497]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",e[e.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",e[e.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",e[e.UNSIGNED_INT_24_8_WEBGL=34042]="UNSIGNED_INT_24_8_WEBGL",e[e.HALF_FLOAT_OES=36193]="HALF_FLOAT_OES",e[e.RGBA32F_EXT=34836]="RGBA32F_EXT",e[e.RGB32F_EXT=34837]="RGB32F_EXT",e[e.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT=33297]="FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT",e[e.UNSIGNED_NORMALIZED_EXT=35863]="UNSIGNED_NORMALIZED_EXT",e[e.MIN_EXT=32775]="MIN_EXT",e[e.MAX_EXT=32776]="MAX_EXT",e[e.SRGB_EXT=35904]="SRGB_EXT",e[e.SRGB_ALPHA_EXT=35906]="SRGB_ALPHA_EXT",e[e.SRGB8_ALPHA8_EXT=35907]="SRGB8_ALPHA8_EXT",e[e.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT=33296]="FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT",e[e.FRAGMENT_SHADER_DERIVATIVE_HINT_OES=35723]="FRAGMENT_SHADER_DERIVATIVE_HINT_OES",e[e.COLOR_ATTACHMENT0_WEBGL=36064]="COLOR_ATTACHMENT0_WEBGL",e[e.COLOR_ATTACHMENT1_WEBGL=36065]="COLOR_ATTACHMENT1_WEBGL",e[e.COLOR_ATTACHMENT2_WEBGL=36066]="COLOR_ATTACHMENT2_WEBGL",e[e.COLOR_ATTACHMENT3_WEBGL=36067]="COLOR_ATTACHMENT3_WEBGL",e[e.COLOR_ATTACHMENT4_WEBGL=36068]="COLOR_ATTACHMENT4_WEBGL",e[e.COLOR_ATTACHMENT5_WEBGL=36069]="COLOR_ATTACHMENT5_WEBGL",e[e.COLOR_ATTACHMENT6_WEBGL=36070]="COLOR_ATTACHMENT6_WEBGL",e[e.COLOR_ATTACHMENT7_WEBGL=36071]="COLOR_ATTACHMENT7_WEBGL",e[e.COLOR_ATTACHMENT8_WEBGL=36072]="COLOR_ATTACHMENT8_WEBGL",e[e.COLOR_ATTACHMENT9_WEBGL=36073]="COLOR_ATTACHMENT9_WEBGL",e[e.COLOR_ATTACHMENT10_WEBGL=36074]="COLOR_ATTACHMENT10_WEBGL",e[e.COLOR_ATTACHMENT11_WEBGL=36075]="COLOR_ATTACHMENT11_WEBGL",e[e.COLOR_ATTACHMENT12_WEBGL=36076]="COLOR_ATTACHMENT12_WEBGL",e[e.COLOR_ATTACHMENT13_WEBGL=36077]="COLOR_ATTACHMENT13_WEBGL",e[e.COLOR_ATTACHMENT14_WEBGL=36078]="COLOR_ATTACHMENT14_WEBGL",e[e.COLOR_ATTACHMENT15_WEBGL=36079]="COLOR_ATTACHMENT15_WEBGL",e[e.DRAW_BUFFER0_WEBGL=34853]="DRAW_BUFFER0_WEBGL",e[e.DRAW_BUFFER1_WEBGL=34854]="DRAW_BUFFER1_WEBGL",e[e.DRAW_BUFFER2_WEBGL=34855]="DRAW_BUFFER2_WEBGL",e[e.DRAW_BUFFER3_WEBGL=34856]="DRAW_BUFFER3_WEBGL",e[e.DRAW_BUFFER4_WEBGL=34857]="DRAW_BUFFER4_WEBGL",e[e.DRAW_BUFFER5_WEBGL=34858]="DRAW_BUFFER5_WEBGL",e[e.DRAW_BUFFER6_WEBGL=34859]="DRAW_BUFFER6_WEBGL",e[e.DRAW_BUFFER7_WEBGL=34860]="DRAW_BUFFER7_WEBGL",e[e.DRAW_BUFFER8_WEBGL=34861]="DRAW_BUFFER8_WEBGL",e[e.DRAW_BUFFER9_WEBGL=34862]="DRAW_BUFFER9_WEBGL",e[e.DRAW_BUFFER10_WEBGL=34863]="DRAW_BUFFER10_WEBGL",e[e.DRAW_BUFFER11_WEBGL=34864]="DRAW_BUFFER11_WEBGL",e[e.DRAW_BUFFER12_WEBGL=34865]="DRAW_BUFFER12_WEBGL",e[e.DRAW_BUFFER13_WEBGL=34866]="DRAW_BUFFER13_WEBGL",e[e.DRAW_BUFFER14_WEBGL=34867]="DRAW_BUFFER14_WEBGL",e[e.DRAW_BUFFER15_WEBGL=34868]="DRAW_BUFFER15_WEBGL",e[e.MAX_COLOR_ATTACHMENTS_WEBGL=36063]="MAX_COLOR_ATTACHMENTS_WEBGL",e[e.MAX_DRAW_BUFFERS_WEBGL=34852]="MAX_DRAW_BUFFERS_WEBGL",e[e.VERTEX_ARRAY_BINDING_OES=34229]="VERTEX_ARRAY_BINDING_OES",e[e.QUERY_COUNTER_BITS_EXT=34916]="QUERY_COUNTER_BITS_EXT",e[e.CURRENT_QUERY_EXT=34917]="CURRENT_QUERY_EXT",e[e.QUERY_RESULT_EXT=34918]="QUERY_RESULT_EXT",e[e.QUERY_RESULT_AVAILABLE_EXT=34919]="QUERY_RESULT_AVAILABLE_EXT",e[e.TIME_ELAPSED_EXT=35007]="TIME_ELAPSED_EXT",e[e.TIMESTAMP_EXT=36392]="TIMESTAMP_EXT",e[e.GPU_DISJOINT_EXT=36795]="GPU_DISJOINT_EXT"})(zi||(zi={}));var Ep;(function(e){e[e.Buffer=0]="Buffer",e[e.Texture=1]="Texture",e[e.RenderTarget=2]="RenderTarget",e[e.Sampler=3]="Sampler",e[e.Program=4]="Program",e[e.Bindings=5]="Bindings",e[e.InputLayout=6]="InputLayout",e[e.RenderPipeline=7]="RenderPipeline",e[e.ComputePipeline=8]="ComputePipeline",e[e.Readback=9]="Readback",e[e.QueryPool=10]="QueryPool",e[e.RenderBundle=11]="RenderBundle"})(Ep||(Ep={}));var Rd;(function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"})(Rd||(Rd={}));var nA;(function(e){e[e.CCW=2305]="CCW",e[e.CW=2304]="CW"})(nA||(nA={}));var gv;(function(e){e[e.NONE=0]="NONE",e[e.FRONT=1]="FRONT",e[e.BACK=2]="BACK",e[e.FRONT_AND_BACK=3]="FRONT_AND_BACK"})(gv||(gv={}));var Gd;(function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC=768]="SRC",e[e.ONE_MINUS_SRC=769]="ONE_MINUS_SRC",e[e.DST=774]="DST",e[e.ONE_MINUS_DST=775]="ONE_MINUS_DST",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.CONST=32769]="CONST",e[e.ONE_MINUS_CONSTANT=32770]="ONE_MINUS_CONSTANT",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE"})(Gd||(Gd={}));var zm;(function(e){e[e.ADD=32774]="ADD",e[e.SUBSTRACT=32778]="SUBSTRACT",e[e.REVERSE_SUBSTRACT=32779]="REVERSE_SUBSTRACT",e[e.MIN=32775]="MIN",e[e.MAX=32776]="MAX"})(zm||(zm={}));var sv;(function(e){e[e.CLAMP_TO_EDGE=0]="CLAMP_TO_EDGE",e[e.REPEAT=1]="REPEAT",e[e.MIRRORED_REPEAT=2]="MIRRORED_REPEAT"})(sv||(sv={}));var mm;(function(e){e[e.POINT=0]="POINT",e[e.BILINEAR=1]="BILINEAR"})(mm||(mm={}));var km;(function(e){e[e.NO_MIP=0]="NO_MIP",e[e.NEAREST=1]="NEAREST",e[e.LINEAR=2]="LINEAR"})(km||(km={}));var Tm;(function(e){e[e.POINTS=0]="POINTS",e[e.TRIANGLES=1]="TRIANGLES",e[e.TRIANGLE_STRIP=2]="TRIANGLE_STRIP",e[e.LINES=3]="LINES",e[e.LINE_STRIP=4]="LINE_STRIP"})(Tm||(Tm={}));var g0;(function(e){e[e.MAP_READ=1]="MAP_READ",e[e.MAP_WRITE=2]="MAP_WRITE",e[e.COPY_SRC=4]="COPY_SRC",e[e.COPY_DST=8]="COPY_DST",e[e.INDEX=16]="INDEX",e[e.VERTEX=32]="VERTEX",e[e.UNIFORM=64]="UNIFORM",e[e.STORAGE=128]="STORAGE",e[e.INDIRECT=256]="INDIRECT",e[e.QUERY_RESOLVE=512]="QUERY_RESOLVE"})(g0||(g0={}));var Wv;(function(e){e[e.STATIC=1]="STATIC",e[e.DYNAMIC=2]="DYNAMIC"})(Wv||(Wv={}));var u1;(function(e){e[e.VERTEX=1]="VERTEX",e[e.INSTANCE=2]="INSTANCE"})(u1||(u1={}));var NM;(function(e){e.LOADED="loaded"})(NM||(NM={}));var Zd;(function(e){e[e.TEXTURE_2D=0]="TEXTURE_2D",e[e.TEXTURE_2D_ARRAY=1]="TEXTURE_2D_ARRAY",e[e.TEXTURE_3D=2]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP=3]="TEXTURE_CUBE_MAP"})(Zd||(Zd={}));var Ym;(function(e){e[e.SAMPLED=1]="SAMPLED",e[e.RENDER_TARGET=2]="RENDER_TARGET",e[e.STORAGE=4]="STORAGE"})(Ym||(Ym={}));var Zm;(function(e){e[e.NONE=0]="NONE",e[e.RED=1]="RED",e[e.GREEN=2]="GREEN",e[e.BLUE=4]="BLUE",e[e.ALPHA=8]="ALPHA",e[e.RGB=7]="RGB",e[e.ALL=15]="ALL"})(Zm||(Zm={}));var sm;(function(e){e[e.KEEP=7680]="KEEP",e[e.ZERO=0]="ZERO",e[e.REPLACE=7681]="REPLACE",e[e.INVERT=5386]="INVERT",e[e.INCREMENT_CLAMP=7682]="INCREMENT_CLAMP",e[e.DECREMENT_CLAMP=7683]="DECREMENT_CLAMP",e[e.INCREMENT_WRAP=34055]="INCREMENT_WRAP",e[e.DECREMENT_WRAP=34056]="DECREMENT_WRAP"})(sm||(sm={}));function L$(e,i,r,n){var t=Zd.TEXTURE_2D,o=1,u=Ym.SAMPLED;return{dimension:t,format:e,width:i,height:r,depthOrArrayLayers:o,mipLevelCount:n,usage:u}}var um;(function(e){e[e.Float=0]="Float",e[e.UnfilterableFloat=1]="UnfilterableFloat",e[e.Uint=2]="Uint",e[e.Sint=3]="Sint",e[e.Depth=4]="Depth"})(um||(um={}));var cg;(function(e){e[e.LOWER_LEFT=0]="LOWER_LEFT",e[e.UPPER_LEFT=1]="UPPER_LEFT"})(cg||(cg={}));var r_;(function(e){e[e.NEGATIVE_ONE=0]="NEGATIVE_ONE",e[e.ZERO=1]="ZERO"})(r_||(r_={}));var p2;(function(e){e[e.OcclusionConservative=0]="OcclusionConservative"})(p2||(p2={}));var pu;(function(e){e[e.U8=1]="U8",e[e.U16=2]="U16",e[e.U32=3]="U32",e[e.S8=4]="S8",e[e.S16=5]="S16",e[e.S32=6]="S32",e[e.F16=7]="F16",e[e.F32=8]="F32",e[e.BC1=65]="BC1",e[e.BC2=66]="BC2",e[e.BC3=67]="BC3",e[e.BC4_UNORM=68]="BC4_UNORM",e[e.BC4_SNORM=69]="BC4_SNORM",e[e.BC5_UNORM=70]="BC5_UNORM",e[e.BC5_SNORM=71]="BC5_SNORM",e[e.U16_PACKED_5551=97]="U16_PACKED_5551",e[e.U16_PACKED_565=98]="U16_PACKED_565",e[e.D24=129]="D24",e[e.D32F=130]="D32F",e[e.D24S8=131]="D24S8",e[e.D32FS8=132]="D32FS8"})(pu||(pu={}));var uf;(function(e){e[e.R=1]="R",e[e.RG=2]="RG",e[e.RGB=3]="RGB",e[e.RGBA=4]="RGBA",e[e.A=5]="A"})(uf||(uf={}));function D$(e){return e}var Cc;(function(e){e[e.None=0]="None",e[e.Normalized=1]="Normalized",e[e.sRGB=2]="sRGB",e[e.Depth=4]="Depth",e[e.Stencil=8]="Stencil",e[e.RenderTarget=16]="RenderTarget",e[e.Luminance=32]="Luminance"})(Cc||(Cc={}));function Kf(e,i,r){return e<<16|i<<8|r}var Ta;(function(e){e[e.ALPHA=Kf(pu.U8,uf.A,Cc.None)]="ALPHA",e[e.U8_LUMINANCE=Kf(pu.U8,uf.A,Cc.Luminance)]="U8_LUMINANCE",e[e.F16_LUMINANCE=Kf(pu.F16,uf.A,Cc.Luminance)]="F16_LUMINANCE",e[e.F32_LUMINANCE=Kf(pu.F32,uf.A,Cc.Luminance)]="F32_LUMINANCE",e[e.F16_R=Kf(pu.F16,uf.R,Cc.None)]="F16_R",e[e.F16_RG=Kf(pu.F16,uf.RG,Cc.None)]="F16_RG",e[e.F16_RGB=Kf(pu.F16,uf.RGB,Cc.None)]="F16_RGB",e[e.F16_RGBA=Kf(pu.F16,uf.RGBA,Cc.None)]="F16_RGBA",e[e.F32_R=Kf(pu.F32,uf.R,Cc.None)]="F32_R",e[e.F32_RG=Kf(pu.F32,uf.RG,Cc.None)]="F32_RG",e[e.F32_RGB=Kf(pu.F32,uf.RGB,Cc.None)]="F32_RGB",e[e.F32_RGBA=Kf(pu.F32,uf.RGBA,Cc.None)]="F32_RGBA",e[e.U8_R=Kf(pu.U8,uf.R,Cc.None)]="U8_R",e[e.U8_R_NORM=Kf(pu.U8,uf.R,Cc.Normalized)]="U8_R_NORM",e[e.U8_RG=Kf(pu.U8,uf.RG,Cc.None)]="U8_RG",e[e.U8_RG_NORM=Kf(pu.U8,uf.RG,Cc.Normalized)]="U8_RG_NORM",e[e.U8_RGB=Kf(pu.U8,uf.RGB,Cc.None)]="U8_RGB",e[e.U8_RGB_NORM=Kf(pu.U8,uf.RGB,Cc.Normalized)]="U8_RGB_NORM",e[e.U8_RGB_SRGB=Kf(pu.U8,uf.RGB,Cc.sRGB|Cc.Normalized)]="U8_RGB_SRGB",e[e.U8_RGBA=Kf(pu.U8,uf.RGBA,Cc.None)]="U8_RGBA",e[e.U8_RGBA_NORM=Kf(pu.U8,uf.RGBA,Cc.Normalized)]="U8_RGBA_NORM",e[e.U8_RGBA_SRGB=Kf(pu.U8,uf.RGBA,Cc.sRGB|Cc.Normalized)]="U8_RGBA_SRGB",e[e.U16_R=Kf(pu.U16,uf.R,Cc.None)]="U16_R",e[e.U16_R_NORM=Kf(pu.U16,uf.R,Cc.Normalized)]="U16_R_NORM",e[e.U16_RG_NORM=Kf(pu.U16,uf.RG,Cc.Normalized)]="U16_RG_NORM",e[e.U16_RGBA_NORM=Kf(pu.U16,uf.RGBA,Cc.Normalized)]="U16_RGBA_NORM",e[e.U16_RGBA=Kf(pu.U16,uf.RGBA,Cc.None)]="U16_RGBA",e[e.U16_RGB=Kf(pu.U16,uf.RGB,Cc.None)]="U16_RGB",e[e.U16_RG=Kf(pu.U16,uf.RG,Cc.None)]="U16_RG",e[e.U32_R=Kf(pu.U32,uf.R,Cc.None)]="U32_R",e[e.U32_RG=Kf(pu.U32,uf.RG,Cc.None)]="U32_RG",e[e.U32_RGB=Kf(pu.U32,uf.RGB,Cc.None)]="U32_RGB",e[e.U32_RGBA=Kf(pu.U32,uf.RGBA,Cc.None)]="U32_RGBA",e[e.S8_R=Kf(pu.S8,uf.R,Cc.None)]="S8_R",e[e.S8_R_NORM=Kf(pu.S8,uf.R,Cc.Normalized)]="S8_R_NORM",e[e.S8_RG_NORM=Kf(pu.S8,uf.RG,Cc.Normalized)]="S8_RG_NORM",e[e.S8_RGB_NORM=Kf(pu.S8,uf.RGB,Cc.Normalized)]="S8_RGB_NORM",e[e.S8_RGBA_NORM=Kf(pu.S8,uf.RGBA,Cc.Normalized)]="S8_RGBA_NORM",e[e.S16_R=Kf(pu.S16,uf.R,Cc.None)]="S16_R",e[e.S16_RG=Kf(pu.S16,uf.RG,Cc.None)]="S16_RG",e[e.S16_RG_NORM=Kf(pu.S16,uf.RG,Cc.Normalized)]="S16_RG_NORM",e[e.S16_RGB_NORM=Kf(pu.S16,uf.RGB,Cc.Normalized)]="S16_RGB_NORM",e[e.S16_RGBA=Kf(pu.S16,uf.RGBA,Cc.None)]="S16_RGBA",e[e.S16_RGBA_NORM=Kf(pu.S16,uf.RGBA,Cc.Normalized)]="S16_RGBA_NORM",e[e.S32_R=Kf(pu.S32,uf.R,Cc.None)]="S32_R",e[e.S32_RG=Kf(pu.S32,uf.RG,Cc.None)]="S32_RG",e[e.S32_RGB=Kf(pu.S32,uf.RGB,Cc.None)]="S32_RGB",e[e.S32_RGBA=Kf(pu.S32,uf.RGBA,Cc.None)]="S32_RGBA",e[e.U16_RGBA_5551=Kf(pu.U16_PACKED_5551,uf.RGBA,Cc.Normalized)]="U16_RGBA_5551",e[e.U16_RGB_565=Kf(pu.U16_PACKED_565,uf.RGB,Cc.Normalized)]="U16_RGB_565",e[e.BC1=Kf(pu.BC1,uf.RGBA,Cc.Normalized)]="BC1",e[e.BC1_SRGB=Kf(pu.BC1,uf.RGBA,Cc.Normalized|Cc.sRGB)]="BC1_SRGB",e[e.BC2=Kf(pu.BC2,uf.RGBA,Cc.Normalized)]="BC2",e[e.BC2_SRGB=Kf(pu.BC2,uf.RGBA,Cc.Normalized|Cc.sRGB)]="BC2_SRGB",e[e.BC3=Kf(pu.BC3,uf.RGBA,Cc.Normalized)]="BC3",e[e.BC3_SRGB=Kf(pu.BC3,uf.RGBA,Cc.Normalized|Cc.sRGB)]="BC3_SRGB",e[e.BC4_UNORM=Kf(pu.BC4_UNORM,uf.R,Cc.Normalized)]="BC4_UNORM",e[e.BC4_SNORM=Kf(pu.BC4_SNORM,uf.R,Cc.Normalized)]="BC4_SNORM",e[e.BC5_UNORM=Kf(pu.BC5_UNORM,uf.RG,Cc.Normalized)]="BC5_UNORM",e[e.BC5_SNORM=Kf(pu.BC5_SNORM,uf.RG,Cc.Normalized)]="BC5_SNORM",e[e.D24=Kf(pu.D24,uf.R,Cc.Depth)]="D24",e[e.D24_S8=Kf(pu.D24S8,uf.RG,Cc.Depth|Cc.Stencil)]="D24_S8",e[e.D32F=Kf(pu.D32F,uf.R,Cc.Depth)]="D32F",e[e.D32F_S8=Kf(pu.D32FS8,uf.RG,Cc.Depth|Cc.Stencil)]="D32F_S8",e[e.U8_RGB_RT=Kf(pu.U8,uf.RGB,Cc.RenderTarget|Cc.Normalized)]="U8_RGB_RT",e[e.U8_RGBA_RT=Kf(pu.U8,uf.RGBA,Cc.RenderTarget|Cc.Normalized)]="U8_RGBA_RT",e[e.U8_RGBA_RT_SRGB=Kf(pu.U8,uf.RGBA,Cc.RenderTarget|Cc.Normalized|Cc.sRGB)]="U8_RGBA_RT_SRGB"})(Ta||(Ta={}));function m2(e){return e>>>8&255}function fg(e){return e>>>16&255}function n_(e){return e&255}function zM(e){switch(e){case pu.F32:case pu.U32:case pu.S32:return 4;case pu.U16:case pu.S16:case pu.F16:return 2;case pu.U8:case pu.S8:return 1;default:throw new Error("whoops")}}function ZM(e){return zM(fg(e))}function k$(e){return m2(e)}function _Z(e){var i=zM(fg(e)),r=m2(e);return i*r}function F$(e,i){return e&4294967040|i}function B$(e,i){return e&4294902015|i<<8}function UM(e){var i=n_(e);if(i&Cc.Depth)return um.Depth;if(i&Cc.Normalized)return um.Float;var r=fg(e);if(r===pu.F16||r===pu.F32)return um.Float;if(r===pu.U8||r===pu.U16||r===pu.U32)return um.Uint;if(r===pu.S8||r===pu.S16||r===pu.S32)return um.Sint;throw new Error("whoops")}function gd(e,i){if(i===void 0&&(i=""),!e)throw new Error("Assert fail: ".concat(i))}function l1(e){if(e!=null)return e;throw new Error("Missing object")}function jM(e,i){return e.r===i.r&&e.g===i.g&&e.b===i.b&&e.a===i.a}function VM(e,i){e.r=i.r,e.g=i.g,e.b=i.b,e.a=i.a}function $M(e){var i=e.r,r=e.g,n=e.b,t=e.a;return{r:i,g:r,b:n,a:t}}function iA(e,i,r,n){return n===void 0&&(n=1),{r:e,g:i,b:r,a:n}}var v2=iA(0,0,0,0),N$=iA(0,0,0,1),AZ=iA(1,1,1,0),z$=iA(1,1,1,1),i_=!0;function Z$(e,i){i===void 0&&(i=i_),i&&(e[10]=-e[10],e[14]=-e[14])}function U$(e,i){i===void 0&&(i=i_),i&&(e[10]=-e[10],e[14]=-e[14]+1)}function bZ(e,i){if(i===void 0&&(i=i_),i)switch(e){case Rd.LESS:return Rd.GREATER;case Rd.LEQUAL:return Rd.GEQUAL;case Rd.GEQUAL:return Rd.LEQUAL;case Rd.GREATER:return Rd.LESS;default:return e}else return e}function j$(e,i){return i===void 0&&(i=i_),i?1-e:e}function V$(e,i){return i===void 0&&(i=i_),i?-e:e}function $$(e,i,r,n){if(n===void 0&&(n=i_),r=bZ(r,n),r===Rd.LESS)return ei;if(r===Rd.GEQUAL)return e>=i;throw new Error("whoops")}function g2(e){return!!(e&&!(e&e-1))}function a_(e,i){return e!=null?e:i}function xZ(e){return e===void 0?null:e}function H$(e,i,r){e.length=i,e.fill(r)}function y2(e,i){var r=i-1;return e+r&~r}function G$(e,i){return((e+i-1)/i|0)*i}function wZ(e,i,r){for(var n=0,t=e.length;n>>1),u=r(i,e[o]);u<0?t=o:n=o+1}return n}function W$(e,i,r){var n=wZ(e,i,r);e.splice(n,0,i)}function X$(e,i,r){return r?e|=i:e&=~i,e}function EZ(e,i){for(var r=new Array(e),n=0;n-1;if(v=v.replace(";","").replace("[","").trim(),!c.startsWith("#")){if(c){var G=r.find(function(Fe){return c===Fe.type});if(G)if(E)for(var ie=function(Fe){G.uniforms.forEach(function(it){i.push("".concat(v,"[").concat(Fe,"].").concat(it.name))})},xe=0;xe<5;xe++)ie(xe);else G.uniforms.forEach(function(Fe){i.push("".concat(v,".").concat(Fe.name))})}v&&i.push(v)}}),""}),i}function t5(e){if(e===void 0)return null;var i=/binding\s*=\s*(\d+)/.exec(e);if(i!==null){var r=parseInt(i[1],10);if(!Number.isNaN(r))return r}return null}function nU(e){var i="",r=e;return[r,i]}function Sy(e,i,r,n,t){var o;n===void 0&&(n=null),t===void 0&&(t=!0);var u=e.glslVersion==="#version 100",c=i==="frag"&&((o=r.match(/^\s*layout\(location\s*=\s*\d*\)\s*out\s+vec4\s*(.*);$/gm))===null||o===void 0?void 0:o.length)>1,v=r.replace(`\r -`,` -`).split(` -`).map(function(Rn){return Rn.replace(/[/][/].*$/,"")}).filter(function(Rn){var kn=!Rn||/^\s+$/.test(Rn);return!kn}),E="";n!==null&&(E=Object.keys(n).map(function(Rn){return aA(Rn,n[Rn])}).join(` -`));var G=v.find(function(Rn){return Rn.startsWith("precision")})||"precision mediump float;",ie=t?v.filter(function(Rn){return!Rn.startsWith("precision")}).join(` -`):v.join(` -`),xe="";if(e.viewportOrigin===cg.UPPER_LEFT&&(xe+="".concat(aA("VIEWPORT_ORIGIN_TL","1"),` -`)),e.clipSpaceNearZ===r_.ZERO&&(xe+="".concat(aA("CLIPSPACE_NEAR_ZERO","1"),` -`)),e.explicitBindingLocations){var Fe=0,it=0,gt=0;ie=ie.replace(/^\s*(layout\((.*)\))?\s*uniform(.+{)$/gm,function(Rn,kn,ui,Di){var Aa=ui?"".concat(ui,", "):"";return"layout(".concat(Aa,"set = ").concat(Fe,", binding = ").concat(it++,") uniform ").concat(Di)}),Fe++,it=0,gd(e.separateSamplerTextures),ie=ie.replace(/^\s*(layout\((.*)\))?\s*uniform sampler(\w+) (.*);/gm,function(Rn,kn,ui,Di,Aa){var Pa=t5(ui);Pa===null&&(Pa=it++);var Lo=(0,jc.CR)(nU(Di),2),ns=Lo[0],ws=Lo[1];return i==="frag"?` -layout(set = `.concat(Fe,", binding = ").concat(Pa*2+0,") uniform texture").concat(ns," T_").concat(Aa,`; -layout(set = `).concat(Fe,", binding = ").concat(Pa*2+1,") uniform sampler").concat(ws," S_").concat(Aa,";").trim():""}),ie=ie.replace(i==="frag"?/^\s*\b(varying|in)\b/gm:/^\s*\b(varying|out)\b/gm,function(Rn,kn){return"layout(location = ".concat(gt++,") ").concat(kn)}),xe+="".concat(aA("gl_VertexID","gl_VertexIndex"),` -`),xe+="".concat(aA("gl_InstanceID","gl_InstanceIndex"),` -`),G=G.replace(/^precision (.*) sampler(.*);$/gm,"")}else{var Dt=0;ie=ie.replace(/^\s*(layout\((.*)\))?\s*uniform sampler(\w+) (.*);/gm,function(Rn,kn,ui,Di,Aa){var Pa=t5(ui);return Pa===null&&(Pa=Dt++),"uniform sampler".concat(Di," ").concat(Aa,"; // BINDING=").concat(Pa)})}if(e.separateSamplerTextures)ie=ie.replace(/\bSAMPLER_(\w+)\((.*?)\)/g,function(Rn,kn,ui){return"sampler".concat(kn,"(T_").concat(ui,", S_").concat(ui,")")}),ie=ie.replace(/\bTEXTURE\((.*?)\)/g,function(Rn,kn){return"T_".concat(kn)});else{var ar=[];ie=ie.replace(/\bSAMPLER_(\w+)\((.*?)\)/g,function(Rn,kn,ui){return ar.push([ui,kn]),ui}),u&&ar.forEach(function(Rn){var kn=(0,jc.CR)(Rn,2),ui=kn[0],Di=kn[1];ie=ie.replace(new RegExp("texture\\(".concat(ui),"g"),function(){return"texture".concat(Di,"(").concat(ui)})}),ie=ie.replace(/\bTEXTURE\((.*?)\)/g,function(Rn,kn){return kn})}var Mr="".concat(u?"":e.glslVersion,` -`).concat(u&&c?`#extension GL_EXT_draw_buffers : require -`:"",` -`).concat(u&&i==="frag"?`#extension GL_OES_standard_derivatives : enable -`:"").concat(t?G:"",` -`).concat(xe||"").concat(E?E+` -`:"",` -`).concat(ie,` -`).trim();if(e.explicitBindingLocations&&i==="frag"&&(Mr=Mr.replace(/^\b(out)\b/g,function(Rn,kn){return"layout(location = 0) ".concat(kn)})),u){if(i==="frag"&&(Mr=Mr.replace(/^\s*in\s+(\S+)\s*(.*);$/gm,function(Rn,kn,ui){return"varying ".concat(kn," ").concat(ui,`; -`)})),i==="vert"&&(Mr=Mr.replace(/^\s*out\s+(\S+)\s*(.*);$/gm,function(Rn,kn,ui){return"varying ".concat(kn," ").concat(ui,`; -`)}),Mr=Mr.replace(/^\s*layout\(location\s*=\s*\S*\)\s*in\s+(\S+)\s*(.*);$/gm,function(Rn,kn,ui){return"attribute ".concat(kn," ").concat(ui,`; -`)})),Mr=Mr.replace(/\s*uniform\s*.*\s*{((?:\s*.*\s*)*?)};/g,function(Rn,kn){return kn.trim().replace(/^.*$/gm,function(ui){var Di=ui.trim();return Di.startsWith("#")?Di:ui?"uniform ".concat(Di):""})}),i==="frag")if(c){var Zr=[];Mr=Mr.replace(/^\s*layout\(location\s*=\s*\d*\)\s*out\s+vec4\s*(.*);$/gm,function(Rn,kn){return Zr.push(kn),"vec4 ".concat(kn,`; -`)});var mn=Mr.lastIndexOf("}");Mr=Mr.substring(0,mn)+` - `.concat(Zr.map(function(Rn,kn){return"gl_FragData[".concat(kn,"] = ").concat(Rn,`; - `)}).join(` -`))+Mr.substring(mn)}else{var zn;if(Mr=Mr.replace(/^\s*out\s+(\S+)\s*(.*);$/gm,function(Rn,kn,ui){return zn=ui,"".concat(kn," ").concat(ui,`; -`)}),zn){var mn=Mr.lastIndexOf("}");Mr=Mr.substring(0,mn)+` - gl_FragColor = vec4(`.concat(zn,`); -`)+Mr.substring(mn)}}Mr=Mr.replace(/^\s*layout\((.*)\)/gm,"")}return Mr}function eH(e,i,r,n){n===void 0&&(n=null);var t=Sy(e,"vert",i,n),o=Sy(e,"frag",r,n);return{vert:i,frag:r,preprocessedVert:t,preprocessedFrag:o}}var Nv=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=e.call(this)||this;return o.id=n,o.device=t,o.device.resourceCreationTracker!==null&&o.device.resourceCreationTracker.trackResourceCreated(o),o}return i.prototype.destroy=function(){this.device.resourceCreationTracker!==null&&this.device.resourceCreationTracker.trackResourceDestroyed(this)},i}(BM),iU=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=r.descriptor,u=e.call(this,{id:n,device:t})||this;u.type=Ep.Bindings;var c=o.uniformBufferBindings,v=o.samplerBindings;return u.uniformBufferBindings=c||[],u.samplerBindings=v||[],u.bindingLayouts=u.createBindingLayouts(),u}return i.prototype.createBindingLayouts=function(){var r=0,n=0,t=[],o=this.uniformBufferBindings.length,u=this.samplerBindings.length;return t.push({firstUniformBuffer:r,numUniformBuffers:o,firstSampler:n,numSamplers:u}),r+=o,n+=u,{numUniformBuffers:r,numSamplers:n,bindingLayoutTables:t}},i}(Nv);function Cf(e){return typeof WebGL2RenderingContext!="undefined"&&e instanceof WebGL2RenderingContext?!0:!!(e&&e._version===2)}function r5(e){var i=fg(e);switch(i){case pu.BC1:case pu.BC2:case pu.BC3:case pu.BC4_UNORM:case pu.BC4_SNORM:case pu.BC5_UNORM:case pu.BC5_SNORM:return!0;default:return!1}}function n5(e){var i=n_(e);if(i&Cc.Normalized)return!1;var r=fg(e);return r===pu.S8||r===pu.S16||r===pu.S32||r===pu.U8||r===pu.U16||r===pu.U32}function aU(e){switch(e){case Wv.STATIC:return zi.STATIC_DRAW;case Wv.DYNAMIC:return zi.DYNAMIC_DRAW}}function i5(e){if(e&g0.INDEX)return zi.ELEMENT_ARRAY_BUFFER;if(e&g0.VERTEX)return zi.ARRAY_BUFFER;if(e&g0.UNIFORM)return zi.UNIFORM_BUFFER}function oU(e){switch(e){case Tm.TRIANGLES:return zi.TRIANGLES;case Tm.POINTS:return zi.POINTS;case Tm.TRIANGLE_STRIP:return zi.TRIANGLE_STRIP;case Tm.LINES:return zi.LINES;case Tm.LINE_STRIP:return zi.LINE_STRIP;default:throw new Error("Unknown primitive topology mode")}}function sU(e){switch(e){case pu.U8:return zi.UNSIGNED_BYTE;case pu.U16:return zi.UNSIGNED_SHORT;case pu.U32:return zi.UNSIGNED_INT;case pu.S8:return zi.BYTE;case pu.S16:return zi.SHORT;case pu.S32:return zi.INT;case pu.F16:return zi.HALF_FLOAT;case pu.F32:return zi.FLOAT;default:throw new Error("whoops")}}function uU(e){switch(e){case uf.R:return 1;case uf.RG:return 2;case uf.RGB:return 3;case uf.RGBA:return 4;default:return 1}}function lU(e){var i=fg(e),r=m2(e),n=n_(e),t=sU(i),o=uU(r),u=!!(n&Cc.Normalized);return{size:o,type:t,normalized:u}}function cU(e){switch(e){case Ta.U8_R:return zi.UNSIGNED_BYTE;case Ta.U16_R:return zi.UNSIGNED_SHORT;case Ta.U32_R:return zi.UNSIGNED_INT;default:throw new Error("whoops")}}function oA(e){switch(e){case sv.CLAMP_TO_EDGE:return zi.CLAMP_TO_EDGE;case sv.REPEAT:return zi.REPEAT;case sv.MIRRORED_REPEAT:return zi.MIRRORED_REPEAT;default:throw new Error("whoops")}}function x2(e,i){if(i===km.LINEAR&&e===mm.BILINEAR)return zi.LINEAR_MIPMAP_LINEAR;if(i===km.LINEAR&&e===mm.POINT)return zi.NEAREST_MIPMAP_LINEAR;if(i===km.NEAREST&&e===mm.BILINEAR)return zi.LINEAR_MIPMAP_NEAREST;if(i===km.NEAREST&&e===mm.POINT)return zi.NEAREST_MIPMAP_NEAREST;if(i===km.NO_MIP&&e===mm.BILINEAR)return zi.LINEAR;if(i===km.NO_MIP&&e===mm.POINT)return zi.NEAREST;throw new Error("Unknown texture filter mode")}function u_(e,i){i===void 0&&(i=0);var r=e;return r.gl_buffer_pages[i/r.pageByteSize|0]}function l_(e){var i=e;return i.gl_texture}function Gw(e){var i=e;return i.gl_sampler}function sA(e,i){e.name=i,e.__SPECTOR_Metadata={name:i}}function a5(e,i){for(var r=[];;){var n=i.exec(e);if(!n)break;r.push(n)}return r}function Cy(e){return e.blendMode==zm.ADD&&e.blendSrcFactor==Gd.ONE&&e.blendDstFactor===Gd.ZERO}function fU(e){switch(e){case p2.OcclusionConservative:return zi.ANY_SAMPLES_PASSED_CONSERVATIVE;default:throw new Error("whoops")}}function hU(e){if(e===Zd.TEXTURE_2D)return zi.TEXTURE_2D;if(e===Zd.TEXTURE_2D_ARRAY)return zi.TEXTURE_2D_ARRAY;if(e===Zd.TEXTURE_CUBE_MAP)return zi.TEXTURE_CUBE_MAP;if(e===Zd.TEXTURE_3D)return zi.TEXTURE_3D;throw new Error("whoops")}function Ww(e,i,r,n){return!(e%r!==0||i%n!==0)}var dU=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=r.descriptor,u=e.call(this,{id:n,device:t})||this;u.type=Ep.Buffer;var c=o.viewOrSize,v=o.usage,E=o.hint,G=E===void 0?Wv.STATIC:E,ie=t.uniformBufferMaxPageByteSize,xe=t.gl,Fe=v&g0.UNIFORM;Fe||(Cf(xe)?xe.bindVertexArray(null):t.OES_vertex_array_object.bindVertexArrayOES(null));var it=t_(c)?y2(c,4):y2(c.byteLength,4);u.gl_buffer_pages=[];var gt;if(Fe){for(var Dt=it;Dt>0;)u.gl_buffer_pages.push(u.createBufferPage(Math.min(Dt,ie),v,G)),Dt-=ie;gt=ie}else u.gl_buffer_pages.push(u.createBufferPage(it,v,G)),gt=it;return u.pageByteSize=gt,u.byteSize=it,u.usage=v,u.gl_target=i5(v),t_(c)||u.setSubData(0,new Uint8Array(c.buffer)),Fe||(Cf(xe)?xe.bindVertexArray(u.device.currentBoundVAO):t.OES_vertex_array_object.bindVertexArrayOES(u.device.currentBoundVAO)),u}return i.prototype.setSubData=function(r,n,t,o){t===void 0&&(t=0),o===void 0&&(o=n.byteLength-t);for(var u=this.device.gl,c=this.pageByteSize,v=r+o,E=r,G=r%c;E=1,!u){G=c.device.ensureResourceExists(v.createTexture());var xe=c.device.translateTextureType(o.format),Fe=c.device.translateTextureInternalFormat(o.format);if(c.device.setActiveTexture(v.TEXTURE0),c.device.currentTextures[0]=null,c.preprocessImage(),o.dimension===Zd.TEXTURE_2D){if(E=zi.TEXTURE_2D,v.bindTexture(E,G),c.immutable)if(Cf(v))v.texStorage2D(E,ie,Fe,o.width,o.height);else{var it=(Fe===zi.DEPTH_COMPONENT||c.isNPOT(),0);(c.format===Ta.D32F||c.format===Ta.D24_S8)&&!Cf(v)&&!t.WEBGL_depth_texture||(v.texImage2D(E,it,Fe,o.width,o.height,0,Fe,xe,null),c.mipmaps&&(c.mipmaps=!1,v.texParameteri(zi.TEXTURE_2D,zi.TEXTURE_MIN_FILTER,zi.LINEAR),v.texParameteri(zi.TEXTURE_2D,zi.TEXTURE_WRAP_S,zi.CLAMP_TO_EDGE),v.texParameteri(zi.TEXTURE_2D,zi.TEXTURE_WRAP_T,zi.CLAMP_TO_EDGE)))}gd(o.depthOrArrayLayers===1)}else if(o.dimension===Zd.TEXTURE_2D_ARRAY)E=zi.TEXTURE_2D_ARRAY,v.bindTexture(E,G),c.immutable&&Cf(v)&&v.texStorage3D(E,ie,Fe,o.width,o.height,o.depthOrArrayLayers);else if(o.dimension===Zd.TEXTURE_3D)E=zi.TEXTURE_3D,v.bindTexture(E,G),c.immutable&&Cf(v)&&v.texStorage3D(E,ie,Fe,o.width,o.height,o.depthOrArrayLayers);else if(o.dimension===Zd.TEXTURE_CUBE_MAP)E=zi.TEXTURE_CUBE_MAP,v.bindTexture(E,G),c.immutable&&Cf(v)&&v.texStorage2D(E,ie,Fe,o.width,o.height),gd(o.depthOrArrayLayers===6);else throw new Error("whoops")}return c.gl_texture=G,c.gl_target=E,c.mipLevelCount=ie,c}return i.prototype.setImageData=function(r,n){n===void 0&&(n=0);var t=this.device.gl;r5(this.format);var o=this.gl_target===zi.TEXTURE_3D||this.gl_target===zi.TEXTURE_2D_ARRAY,u=this.gl_target===zi.TEXTURE_CUBE_MAP,c=eU(r[0]);this.device.setActiveTexture(t.TEXTURE0),this.device.currentTextures[0]=null;var v=r[0],E,G;c?(E=this.width,G=this.height):(E=v.width,G=v.height,this.width=E,this.height=G),t.bindTexture(this.gl_target,this.gl_texture);var ie=this.device.translateTextureFormat(this.format),xe=Cf(t)?this.device.translateInternalTextureFormat(this.format):ie,Fe=this.device.translateTextureType(this.format);this.preprocessImage();for(var it=0;it1){var n=fg(r.format);if(n===pu.BC1)for(var t=r.width,o=r.height,u=0;u1?c.renderbufferStorageMultisample(zi.RENDERBUFFER,xe,gt,E,G):c.renderbufferStorage(zi.RENDERBUFFER,gt,E,G)}return u.format=v,u.width=E,u.height=G,u.sampleCount=xe,u}return i.prototype.destroy=function(){e.prototype.destroy.call(this),this.gl_renderbuffer!==null&&this.device.gl.deleteRenderbuffer(this.gl_renderbuffer),this.texture&&this.texture.destroy()},i}(Nv),yv;(function(e){e[e.NeedsCompile=0]="NeedsCompile",e[e.Compiling=1]="Compiling",e[e.NeedsBind=2]="NeedsBind",e[e.ReadyToUse=3]="ReadyToUse"})(yv||(yv={}));var vU=function(e){(0,jc.ZT)(i,e);function i(r,n){var t=r.id,o=r.device,u=r.descriptor,c=e.call(this,{id:t,device:o})||this;c.rawVertexGLSL=n,c.type=Ep.Program,c.uniformSetters={},c.attributes=[];var v=c.device.gl;return c.descriptor=u,c.gl_program=c.device.ensureResourceExists(v.createProgram()),c.gl_shader_vert=null,c.gl_shader_frag=null,c.compileState=yv.NeedsCompile,c.tryCompileProgram(),c}return i.prototype.destroy=function(){e.prototype.destroy.call(this),this.device.gl.deleteProgram(this.gl_program),this.device.gl.deleteShader(this.gl_shader_vert),this.device.gl.deleteShader(this.gl_shader_frag)},i.prototype.tryCompileProgram=function(){gd(this.compileState===yv.NeedsCompile);var r=this.descriptor,n=r.vertex,t=r.fragment,o=this.device.gl;n!=null&&n.glsl&&(t!=null&&t.glsl)&&(this.gl_shader_vert=this.compileShader(n.postprocess?n.postprocess(n.glsl):n.glsl,o.VERTEX_SHADER),this.gl_shader_frag=this.compileShader(t.postprocess?t.postprocess(t.glsl):t.glsl,o.FRAGMENT_SHADER),o.attachShader(this.gl_program,this.gl_shader_vert),o.attachShader(this.gl_program,this.gl_shader_frag),o.linkProgram(this.gl_program),this.compileState=yv.Compiling,Cf(o)||(this.readUniformLocationsFromLinkedProgram(),this.readAttributesFromLinkedProgram()))},i.prototype.readAttributesFromLinkedProgram=function(){for(var r,n=this.device.gl,t=n.getProgramParameter(this.gl_program,n.ACTIVE_ATTRIBUTES),o=tU(this.descriptor.vertex.glsl),u=rU(this.rawVertexGLSL,o),c=function(G){var ie=n.getActiveAttrib(v.gl_program,G),xe=ie.name,Fe=ie.type,it=ie.size,gt=n.getAttribLocation(v.gl_program,xe),Dt=(r=u.find(function(ar){return ar.name===xe}))===null||r===void 0?void 0:r.location;gt>=0&&!Bv(Dt)&&(v.attributes[Dt]={name:xe,location:gt,type:Fe,size:it})},v=this,E=0;E1)for(var v=0;v1&&v.device.EXT_texture_filter_anisotropic!==null&&(gd(o.minFilter===mm.BILINEAR&&o.magFilter===mm.BILINEAR&&o.mipmapFilter===km.LINEAR),E.samplerParameterf(G,v.device.EXT_texture_filter_anisotropic.TEXTURE_MAX_ANISOTROPY_EXT,ie)),v.gl_sampler=G}else v.descriptor=o;return v}return i.prototype.setTextureParameters=function(r,n,t){var o,u=this.device.gl,c=this.descriptor;this.isNPOT(n,t)?u.texParameteri(zi.TEXTURE_2D,zi.TEXTURE_MIN_FILTER,zi.LINEAR):u.texParameteri(r,zi.TEXTURE_MIN_FILTER,x2(c.minFilter,c.mipmapFilter)),u.texParameteri(zi.TEXTURE_2D,zi.TEXTURE_WRAP_S,oA(c.addressModeU)),u.texParameteri(zi.TEXTURE_2D,zi.TEXTURE_WRAP_T,oA(c.addressModeV)),u.texParameteri(r,zi.TEXTURE_MAG_FILTER,x2(c.magFilter,km.NO_MIP));var v=(o=c.maxAnisotropy)!==null&&o!==void 0?o:1;v>1&&this.device.EXT_texture_filter_anisotropic!==null&&(gd(c.minFilter===mm.BILINEAR&&c.magFilter===mm.BILINEAR&&c.mipmapFilter===km.LINEAR),u.texParameteri(r,this.device.EXT_texture_filter_anisotropic.TEXTURE_MAX_ANISOTROPY_EXT,v))},i.prototype.destroy=function(){e.prototype.destroy.call(this),Cf(this.device.gl)&&this.device.gl.deleteSampler(Gw(this))},i.prototype.isNPOT=function(r,n){return!g2(r)||!g2(n)},i}(Nv),wU=function(){function e(){}return e.prototype.dispatchWorkgroups=function(i,r,n){},e.prototype.dispatchWorkgroupsIndirect=function(i,r){},e.prototype.setPipeline=function(i){},e.prototype.setBindings=function(i){},e.prototype.pushDebugGroup=function(i){},e.prototype.popDebugGroup=function(){},e.prototype.insertDebugMarker=function(i){},e}(),EU=function(e){(0,jc.ZT)(i,e);function i(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Ep.RenderBundle,r.commands=[],r}return i.prototype.push=function(r){this.commands.push(r)},i.prototype.replay=function(){this.commands.forEach(function(r){return r()})},i}(Nv),o5=65536,SU=/uniform(?:\s+)(\w+)(?:\s?){([^]*?)}/g,CU=function(){function e(i,r){r===void 0&&(r={}),this.shaderDebug=!1,this.OES_vertex_array_object=null,this.ANGLE_instanced_arrays=null,this.OES_texture_float=null,this.OES_draw_buffers_indexed=null,this.WEBGL_draw_buffers=null,this.WEBGL_depth_texture=null,this.WEBGL_color_buffer_float=null,this.EXT_color_buffer_half_float=null,this.WEBGL_compressed_texture_s3tc=null,this.WEBGL_compressed_texture_s3tc_srgb=null,this.EXT_texture_compression_rgtc=null,this.EXT_texture_filter_anisotropic=null,this.KHR_parallel_shader_compile=null,this.EXT_texture_norm16=null,this.EXT_color_buffer_float=null,this.OES_texture_float_linear=null,this.OES_texture_half_float_linear=null,this.scTexture=null,this.scPlatformFramebuffer=null,this.currentActiveTexture=null,this.currentBoundVAO=null,this.currentProgram=null,this.resourceCreationTracker=null,this.resourceUniqueId=0,this.currentColorAttachments=[],this.currentColorAttachmentLevels=[],this.currentColorResolveTos=[],this.currentColorResolveToLevels=[],this.currentSampleCount=-1,this.currentIndexBufferByteOffset=null,this.currentMegaState=o_(c1),this.currentSamplers=[],this.currentTextures=[],this.currentUniformBuffers=[],this.currentUniformBufferByteOffsets=[],this.currentUniformBufferByteSizes=[],this.currentScissorEnabled=!1,this.currentStencilRef=null,this.currentRenderPassDescriptor=null,this.currentRenderPassDescriptorStack=[],this.debugGroupStack=[],this.resolveColorAttachmentsChanged=!1,this.resolveDepthStencilAttachmentsChanged=!1,this.explicitBindingLocations=!1,this.separateSamplerTextures=!1,this.viewportOrigin=cg.LOWER_LEFT,this.clipSpaceNearZ=r_.NEGATIVE_ONE,this.supportMRT=!1,this.inBlitRenderPass=!1,this.supportedSampleCounts=[],this.occlusionQueriesRecommended=!1,this.computeShadersSupported=!1,this.gl=i,this.contextAttributes=l1(i.getContextAttributes()),Cf(i)?(this.EXT_texture_norm16=i.getExtension("EXT_texture_norm16"),this.EXT_color_buffer_float=i.getExtension("EXT_color_buffer_float")):(this.OES_vertex_array_object=i.getExtension("OES_vertex_array_object"),this.ANGLE_instanced_arrays=i.getExtension("ANGLE_instanced_arrays"),this.OES_texture_float=i.getExtension("OES_texture_float"),this.WEBGL_draw_buffers=i.getExtension("WEBGL_draw_buffers"),this.WEBGL_depth_texture=i.getExtension("WEBGL_depth_texture"),this.WEBGL_color_buffer_float=i.getExtension("WEBGL_color_buffer_float"),this.EXT_color_buffer_half_float=i.getExtension("EXT_color_buffer_half_float"),i.getExtension("EXT_frag_depth"),i.getExtension("OES_element_index_uint"),i.getExtension("OES_standard_derivatives")),this.WEBGL_compressed_texture_s3tc=i.getExtension("WEBGL_compressed_texture_s3tc"),this.WEBGL_compressed_texture_s3tc_srgb=i.getExtension("WEBGL_compressed_texture_s3tc_srgb"),this.EXT_texture_compression_rgtc=i.getExtension("EXT_texture_compression_rgtc"),this.EXT_texture_filter_anisotropic=i.getExtension("EXT_texture_filter_anisotropic"),this.EXT_texture_norm16=i.getExtension("EXT_texture_norm16"),this.OES_texture_float_linear=i.getExtension("OES_texture_float_linear"),this.OES_texture_half_float_linear=i.getExtension("OES_texture_half_float_linear"),this.KHR_parallel_shader_compile=i.getExtension("KHR_parallel_shader_compile"),Cf(i)?(this.platformString="WebGL2",this.glslVersion="#version 300 es"):(this.platformString="WebGL1",this.glslVersion="#version 100"),this.scTexture=new Xw({id:this.getNextUniqueId(),device:this,descriptor:{width:0,height:0,depthOrArrayLayers:1,dimension:Zd.TEXTURE_2D,mipLevelCount:1,usage:Ym.RENDER_TARGET,format:this.contextAttributes.alpha===!1?Ta.U8_RGB_RT:Ta.U8_RGBA_RT},fake:!0}),this.scTexture.formatKind=um.Float,this.scTexture.gl_target=null,this.scTexture.gl_texture=null,this.resolveColorReadFramebuffer=this.ensureResourceExists(i.createFramebuffer()),this.resolveColorDrawFramebuffer=this.ensureResourceExists(i.createFramebuffer()),this.resolveDepthStencilReadFramebuffer=this.ensureResourceExists(i.createFramebuffer()),this.resolveDepthStencilDrawFramebuffer=this.ensureResourceExists(i.createFramebuffer()),this.renderPassDrawFramebuffer=this.ensureResourceExists(i.createFramebuffer()),this.readbackFramebuffer=this.ensureResourceExists(i.createFramebuffer()),this.fallbackTexture2D=this.createFallbackTexture(Zd.TEXTURE_2D,um.Float),this.fallbackTexture2DDepth=this.createFallbackTexture(Zd.TEXTURE_2D,um.Depth),this.fallbackVertexBuffer=this.createBuffer({viewOrSize:1,usage:g0.VERTEX,hint:Wv.STATIC}),Cf(i)&&(this.fallbackTexture2DArray=this.createFallbackTexture(Zd.TEXTURE_2D_ARRAY,um.Float),this.fallbackTexture3D=this.createFallbackTexture(Zd.TEXTURE_3D,um.Float),this.fallbackTextureCube=this.createFallbackTexture(Zd.TEXTURE_CUBE_MAP,um.Float)),this.currentMegaState.depthCompare=Rd.LESS,this.currentMegaState.depthWrite=!1,this.currentMegaState.attachmentsState[0].channelWriteMask=Zm.ALL,i.enable(i.DEPTH_TEST),i.enable(i.STENCIL_TEST),this.checkLimits(),r.shaderDebug&&(this.shaderDebug=!0),r.trackResources&&(this.resourceCreationTracker=new bU)}return e.prototype.destroy=function(){this.blitBindings&&this.blitBindings.destroy(),this.blitInputLayout&&this.blitInputLayout.destroy(),this.blitRenderPipeline&&this.blitRenderPipeline.destroy(),this.blitVertexBuffer&&this.blitVertexBuffer.destroy(),this.blitProgram&&this.blitProgram.destroy()},e.prototype.createFallbackTexture=function(i,r){var n=i===Zd.TEXTURE_CUBE_MAP?6:1,t=r===um.Depth?Ta.D32F:Ta.U8_RGBA_NORM,o=this.createTexture({dimension:i,format:t,usage:Ym.SAMPLED,width:1,height:1,depthOrArrayLayers:n,mipLevelCount:1});return r===um.Float&&o.setImageData([new Uint8Array(4*n)]),l_(o)},e.prototype.getNextUniqueId=function(){return++this.resourceUniqueId},e.prototype.checkLimits=function(){var i=this.gl;if(this.maxVertexAttribs=i.getParameter(zi.MAX_VERTEX_ATTRIBS),Cf(i)){this.uniformBufferMaxPageByteSize=Math.min(i.getParameter(zi.MAX_UNIFORM_BLOCK_SIZE),o5),this.uniformBufferWordAlignment=i.getParameter(i.UNIFORM_BUFFER_OFFSET_ALIGNMENT)/4;var r=i.getInternalformatParameter(i.RENDERBUFFER,i.DEPTH32F_STENCIL8,i.SAMPLES);this.supportedSampleCounts=r?(0,jc.ev)([],(0,jc.CR)(r),!1):[],this.occlusionQueriesRecommended=!0}else this.uniformBufferWordAlignment=64,this.uniformBufferMaxPageByteSize=o5;this.uniformBufferMaxPageWordSize=this.uniformBufferMaxPageByteSize/4,this.supportedSampleCounts.includes(1)||this.supportedSampleCounts.push(1),this.supportedSampleCounts.sort(function(n,t){return n-t})},e.prototype.configureSwapChain=function(i,r,n){var t=this.scTexture;t.width=i,t.height=r,this.scPlatformFramebuffer=xZ(n)},e.prototype.getDevice=function(){return this},e.prototype.getCanvas=function(){return this.gl.canvas},e.prototype.getOnscreenTexture=function(){return this.scTexture},e.prototype.beginFrame=function(){},e.prototype.endFrame=function(){},e.prototype.translateTextureInternalFormat=function(i,r){switch(r===void 0&&(r=!1),i){case Ta.ALPHA:return zi.ALPHA;case Ta.U8_LUMINANCE:case Ta.F16_LUMINANCE:case Ta.F32_LUMINANCE:return zi.LUMINANCE;case Ta.F16_R:return zi.R16F;case Ta.F16_RG:return zi.RG16F;case Ta.F16_RGB:return zi.RGB16F;case Ta.F16_RGBA:return zi.RGBA16F;case Ta.F32_R:return zi.R32F;case Ta.F32_RG:return zi.RG32F;case Ta.F32_RGB:return zi.RGB32F;case Ta.F32_RGBA:return Cf(this.gl)?zi.RGBA32F:r?this.WEBGL_color_buffer_float.RGBA32F_EXT:zi.RGBA;case Ta.U8_R_NORM:return zi.R8;case Ta.U8_RG_NORM:return zi.RG8;case Ta.U8_RGB_NORM:case Ta.U8_RGB_RT:return zi.RGB8;case Ta.U8_RGB_SRGB:return zi.SRGB8;case Ta.U8_RGBA_NORM:case Ta.U8_RGBA_RT:return Cf(this.gl)?zi.RGBA8:r?zi.RGBA4:zi.RGBA;case Ta.U8_RGBA:return zi.RGBA;case Ta.U8_RGBA_SRGB:case Ta.U8_RGBA_RT_SRGB:return zi.SRGB8_ALPHA8;case Ta.U16_R:return zi.R16UI;case Ta.U16_R_NORM:return this.EXT_texture_norm16.R16_EXT;case Ta.U16_RG_NORM:return this.EXT_texture_norm16.RG16_EXT;case Ta.U16_RGBA_NORM:return this.EXT_texture_norm16.RGBA16_EXT;case Ta.U16_RGBA_5551:return zi.RGB5_A1;case Ta.U16_RGB_565:return zi.RGB565;case Ta.U32_R:return zi.R32UI;case Ta.S8_RGBA_NORM:return zi.RGBA8_SNORM;case Ta.S8_RG_NORM:return zi.RG8_SNORM;case Ta.BC1:return this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT;case Ta.BC1_SRGB:return this.WEBGL_compressed_texture_s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;case Ta.BC2:return this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT;case Ta.BC2_SRGB:return this.WEBGL_compressed_texture_s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;case Ta.BC3:return this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT;case Ta.BC3_SRGB:return this.WEBGL_compressed_texture_s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;case Ta.BC4_UNORM:return this.EXT_texture_compression_rgtc.COMPRESSED_RED_RGTC1_EXT;case Ta.BC4_SNORM:return this.EXT_texture_compression_rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT;case Ta.BC5_UNORM:return this.EXT_texture_compression_rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT;case Ta.BC5_SNORM:return this.EXT_texture_compression_rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;case Ta.D32F_S8:return Cf(this.gl)?zi.DEPTH32F_STENCIL8:this.WEBGL_depth_texture?zi.DEPTH_STENCIL:zi.DEPTH_COMPONENT16;case Ta.D24_S8:return Cf(this.gl)?zi.DEPTH24_STENCIL8:this.WEBGL_depth_texture?zi.DEPTH_STENCIL:zi.DEPTH_COMPONENT16;case Ta.D32F:return Cf(this.gl)?zi.DEPTH_COMPONENT32F:this.WEBGL_depth_texture?zi.DEPTH_COMPONENT:zi.DEPTH_COMPONENT16;case Ta.D24:return Cf(this.gl)?zi.DEPTH_COMPONENT24:this.WEBGL_depth_texture?zi.DEPTH_COMPONENT:zi.DEPTH_COMPONENT16;default:throw new Error("whoops")}},e.prototype.translateTextureType=function(i){var r=fg(i);switch(r){case pu.U8:return zi.UNSIGNED_BYTE;case pu.U16:return zi.UNSIGNED_SHORT;case pu.U32:return zi.UNSIGNED_INT;case pu.S8:return zi.BYTE;case pu.F16:return zi.HALF_FLOAT;case pu.F32:return zi.FLOAT;case pu.U16_PACKED_5551:return zi.UNSIGNED_SHORT_5_5_5_1;case pu.D32F:return Cf(this.gl)?zi.FLOAT:this.WEBGL_depth_texture?zi.UNSIGNED_INT:zi.UNSIGNED_BYTE;case pu.D24:return Cf(this.gl)?zi.UNSIGNED_INT_24_8:this.WEBGL_depth_texture?zi.UNSIGNED_SHORT:zi.UNSIGNED_BYTE;case pu.D24S8:return Cf(this.gl)?zi.UNSIGNED_INT_24_8:this.WEBGL_depth_texture?zi.UNSIGNED_INT_24_8_WEBGL:zi.UNSIGNED_BYTE;case pu.D32FS8:return zi.FLOAT_32_UNSIGNED_INT_24_8_REV;default:throw new Error("whoops")}},e.prototype.translateInternalTextureFormat=function(i){switch(i){case Ta.F32_R:return zi.R32F;case Ta.F32_RG:return zi.RG32F;case Ta.F32_RGB:return zi.RGB32F;case Ta.F32_RGBA:return zi.RGBA32F;case Ta.F16_R:return zi.R16F;case Ta.F16_RG:return zi.RG16F;case Ta.F16_RGB:return zi.RGB16F;case Ta.F16_RGBA:return zi.RGBA16F}return this.translateTextureFormat(i)},e.prototype.translateTextureFormat=function(i){if(r5(i)||i===Ta.F32_LUMINANCE||i===Ta.U8_LUMINANCE)return this.translateTextureInternalFormat(i);var r=Cf(this.gl)||!Cf(this.gl)&&!!this.WEBGL_depth_texture;switch(i){case Ta.D24_S8:case Ta.D32F_S8:return r?zi.DEPTH_STENCIL:zi.RGBA;case Ta.D24:case Ta.D32F:return r?zi.DEPTH_COMPONENT:zi.RGBA}var n=n5(i),t=m2(i);switch(t){case uf.A:return zi.ALPHA;case uf.R:return n?zi.RED_INTEGER:zi.RED;case uf.RG:return n?zi.RG_INTEGER:zi.RG;case uf.RGB:return n?zi.RGB_INTEGER:zi.RGB;case uf.RGBA:return zi.RGBA}},e.prototype.setActiveTexture=function(i){this.currentActiveTexture!==i&&(this.gl.activeTexture(i),this.currentActiveTexture=i)},e.prototype.bindVAO=function(i){this.currentBoundVAO!==i&&(Cf(this.gl)?this.gl.bindVertexArray(i):this.OES_vertex_array_object.bindVertexArrayOES(i),this.currentBoundVAO=i)},e.prototype.programCompiled=function(i){gd(i.compileState!==yv.NeedsCompile),i.compileState===yv.Compiling&&(i.compileState=yv.NeedsBind,this.shaderDebug&&this.checkProgramCompilationForErrors(i))},e.prototype.useProgram=function(i){this.currentProgram!==i&&(this.programCompiled(i),this.gl.useProgram(i.gl_program),this.currentProgram=i)},e.prototype.ensureResourceExists=function(i){if(i===null){var r=this.gl.getError();throw new Error("Created resource is null; GL error encountered: ".concat(r))}else return i},e.prototype.createBuffer=function(i){return new dU({id:this.getNextUniqueId(),device:this,descriptor:i})},e.prototype.createTexture=function(i){return new Xw({id:this.getNextUniqueId(),device:this,descriptor:i})},e.prototype.createSampler=function(i){return new xU({id:this.getNextUniqueId(),device:this,descriptor:i})},e.prototype.createRenderTarget=function(i){return new mU({id:this.getNextUniqueId(),device:this,descriptor:i})},e.prototype.createRenderTargetFromTexture=function(i){var r=i,n=r.format,t=r.width,o=r.height,u=r.mipLevelCount;return gd(u===1),this.createRenderTarget({format:n,width:t,height:o,sampleCount:1,texture:i})},e.prototype.createProgram=function(i){var r,n,t,o=(r=i.vertex)===null||r===void 0?void 0:r.glsl;return!((n=i.vertex)===null||n===void 0)&&n.glsl&&(i.vertex.glsl=Sy(this.queryVendorInfo(),"vert",i.vertex.glsl)),!((t=i.fragment)===null||t===void 0)&&t.glsl&&(i.fragment.glsl=Sy(this.queryVendorInfo(),"frag",i.fragment.glsl)),this.createProgramSimple(i,o)},e.prototype.createProgramSimple=function(i,r){var n=new vU({id:this.getNextUniqueId(),device:this,descriptor:i},r);return n},e.prototype.createBindings=function(i){return new iU({id:this.getNextUniqueId(),device:this,descriptor:i})},e.prototype.createInputLayout=function(i){return new pU({id:this.getNextUniqueId(),device:this,descriptor:i})},e.prototype.createRenderPipeline=function(i){return new _U({id:this.getNextUniqueId(),device:this,descriptor:i})},e.prototype.createComputePass=function(){return new wU},e.prototype.createComputePipeline=function(i){return new AU({id:this.getNextUniqueId(),device:this,descriptor:i})},e.prototype.createReadback=function(){return new yU({id:this.getNextUniqueId(),device:this})},e.prototype.createQueryPool=function(i,r){return new gU({id:this.getNextUniqueId(),device:this,descriptor:{type:i,elemCount:r}})},e.prototype.formatRenderPassDescriptor=function(i){var r,n,t,o,u,c,v=i.colorAttachment;i.depthClearValue=(r=i.depthClearValue)!==null&&r!==void 0?r:"load",i.stencilClearValue=(n=i.stencilClearValue)!==null&&n!==void 0?n:"load";for(var E=0;E=0;r--)this.debugGroupStack[r].drawCallCount+=i},e.prototype.debugGroupStatisticsBufferUpload=function(i){i===void 0&&(i=1);for(var r=this.debugGroupStack.length-1;r>=0;r--)this.debugGroupStack[r].bufferUploadCount+=i},e.prototype.debugGroupStatisticsTextureBind=function(i){i===void 0&&(i=1);for(var r=this.debugGroupStack.length-1;r>=0;r--)this.debugGroupStack[r].textureBindCount+=i},e.prototype.debugGroupStatisticsTriangles=function(i){for(var r=this.debugGroupStack.length-1;r>=0;r--)this.debugGroupStack[r].triangleCount+=i},e.prototype.reportShaderError=function(i,r){var n=this.gl,t=n.getShaderParameter(i,n.COMPILE_STATUS);if(!t){console.error(SZ(r));var o=n.getExtension("WEBGL_debug_shaders");o&&console.error(o.getTranslatedShaderSource(i)),console.error(n.getShaderInfoLog(i))}return t},e.prototype.checkProgramCompilationForErrors=function(i){var r=this.gl,n=i.gl_program;if(!r.getProgramParameter(n,r.LINK_STATUS)){var t=i.descriptor;if(!this.reportShaderError(i.gl_shader_vert,t.vertex.glsl)||!this.reportShaderError(i.gl_shader_frag,t.fragment.glsl))return;console.error(r.getProgramInfoLog(i.gl_program))}},e.prototype.bindFramebufferAttachment=function(i,r,n,t){var o=this.gl;if(Bv(n))o.framebufferRenderbuffer(i,r,o.RENDERBUFFER,null);else if(n.type===Ep.RenderTarget)n.gl_renderbuffer!==null?o.framebufferRenderbuffer(i,r,o.RENDERBUFFER,n.gl_renderbuffer):n.texture!==null&&o.framebufferTexture2D(i,r,zi.TEXTURE_2D,l_(n.texture),t);else if(n.type===Ep.Texture){var u=l_(n);n.dimension===Zd.TEXTURE_2D?o.framebufferTexture2D(i,r,zi.TEXTURE_2D,u,t):Cf(o)&&(n.dimension,Zd.TEXTURE_2D_ARRAY)}},e.prototype.bindFramebufferDepthStencilAttachment=function(i,r){var n=this.gl,t=Bv(r)?Cc.Depth|Cc.Stencil:n_(r.format),o=!!(t&Cc.Depth),u=!!(t&Cc.Stencil);if(o&&u){var c=Cf(this.gl)||!Cf(this.gl)&&!!this.WEBGL_depth_texture;c?this.bindFramebufferAttachment(i,n.DEPTH_STENCIL_ATTACHMENT,r,0):this.bindFramebufferAttachment(i,n.DEPTH_ATTACHMENT,r,0)}else o?(this.bindFramebufferAttachment(i,n.DEPTH_ATTACHMENT,r,0),this.bindFramebufferAttachment(i,n.STENCIL_ATTACHMENT,null,0)):u&&(this.bindFramebufferAttachment(i,n.STENCIL_ATTACHMENT,r,0),this.bindFramebufferAttachment(i,n.DEPTH_ATTACHMENT,null,0))},e.prototype.validateCurrentAttachments=function(){for(var i=-1,r=-1,n=-1,t=0;t=E.numUniformBuffers),gd(c.length>=E.numSamplers);for(var G=0;G{throw Error("TextDecoder not available")}};typeof TextDecoder!="undefined"&&s5.decode();let uA=null;function w2(){return(uA===null||uA.byteLength===0)&&(uA=new Uint8Array(Mm.memory.buffer)),uA}function E2(e,i){return e=e>>>0,s5.decode(w2().subarray(e,e+i))}const $g=new Array(128).fill(void 0);$g.push(void 0,null,!0,!1);let lA=$g.length;function MU(e){lA===$g.length&&$g.push($g.length+1);const i=lA;return lA=$g[i],$g[i]=e,i}function S2(e){return $g[e]}function PU(e){e<132||($g[e]=lA,lA=e)}function IU(e){const i=S2(e);return PU(e),i}let cA=0;const C2=typeof TextEncoder!="undefined"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},RU=typeof C2.encodeInto=="function"?function(e,i){return C2.encodeInto(e,i)}:function(e,i){const r=C2.encode(e);return i.set(r),{read:e.length,written:r.length}};function Yw(e,i,r){if(r===void 0){const c=C2.encode(e),v=i(c.length,1)>>>0;return w2().subarray(v,v+c.length).set(c),cA=c.length,v}let n=e.length,t=i(n,1)>>>0;const o=w2();let u=0;for(;u127)break;o[t+u]=c}if(u!==n){u!==0&&(e=e.slice(u)),t=r(t,n,n=u+e.length*3,1)>>>0;const c=w2().subarray(t+u,t+n),v=RU(e,c);u+=v.written}return cA=u,t}let fA=null;function T2(){return(fA===null||fA.byteLength===0)&&(fA=new Int32Array(Mm.memory.buffer)),fA}function OU(e,i,r){let n,t;try{const c=Mm.__wbindgen_add_to_stack_pointer(-16),v=Yw(e,Mm.__wbindgen_malloc,Mm.__wbindgen_realloc),E=cA,G=Yw(i,Mm.__wbindgen_malloc,Mm.__wbindgen_realloc),ie=cA;Mm.glsl_compile(c,v,E,G,ie,r);var o=T2()[c/4+0],u=T2()[c/4+1];return n=o,t=u,E2(o,u)}finally{Mm.__wbindgen_add_to_stack_pointer(16),Mm.__wbindgen_free(n,t,1)}}class hA{static __wrap(i){i=i>>>0;const r=Object.create(hA.prototype);return r.__wbg_ptr=i,r}__destroy_into_raw(){const i=this.__wbg_ptr;return this.__wbg_ptr=0,i}free(){const i=this.__destroy_into_raw();Mm.__wbg_wgslcomposer_free(i)}constructor(){const i=Mm.wgslcomposer_new();return hA.__wrap(i)}wgsl_compile(i){let r,n;try{const u=Mm.__wbindgen_add_to_stack_pointer(-16),c=Yw(i,Mm.__wbindgen_malloc,Mm.__wbindgen_realloc),v=cA;Mm.wgslcomposer_wgsl_compile(u,this.__wbg_ptr,c,v);var t=T2()[u/4+0],o=T2()[u/4+1];return r=t,n=o,E2(t,o)}finally{Mm.__wbindgen_add_to_stack_pointer(16),Mm.__wbindgen_free(r,n,1)}}}function LU(e,i){return v_(this,null,function*(){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return yield WebAssembly.instantiateStreaming(e,i)}catch(n){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n);else throw n}const r=yield e.arrayBuffer();return yield WebAssembly.instantiate(r,i)}else{const r=yield WebAssembly.instantiate(e,i);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}})}function DU(){const e={};return e.wbg={},e.wbg.__wbindgen_string_new=function(i,r){const n=E2(i,r);return MU(n)},e.wbg.__wbindgen_object_drop_ref=function(i){IU(i)},e.wbg.__wbg_log_1d3ae0273d8f4f8a=function(i){console.log(S2(i))},e.wbg.__wbg_log_576ca876af0d4a77=function(i,r){console.log(S2(i),S2(r))},e.wbg.__wbindgen_throw=function(i,r){throw new Error(E2(i,r))},e}function kU(e,i){return Mm=e.exports,u5.__wbindgen_wasm_module=i,fA=null,uA=null,Mm}function u5(e){return v_(this,null,function*(){if(Mm!==void 0)return Mm;const i=DU();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:r,module:n}=yield LU(yield e,i);return kU(r,n)})}var Fm;(function(e){e[e.COPY_SRC=1]="COPY_SRC",e[e.COPY_DST=2]="COPY_DST",e[e.TEXTURE_BINDING=4]="TEXTURE_BINDING",e[e.STORAGE_BINDING=8]="STORAGE_BINDING",e[e.STORAGE=8]="STORAGE",e[e.RENDER_ATTACHMENT=16]="RENDER_ATTACHMENT"})(Fm||(Fm={}));var Kw;(function(e){e[e.READ=1]="READ",e[e.WRITE=2]="WRITE"})(Kw||(Kw={}));function FU(e){var i=0;return e&Ym.SAMPLED&&(i|=Fm.TEXTURE_BINDING|Fm.COPY_DST|Fm.COPY_SRC),e&Ym.STORAGE&&(i|=Fm.TEXTURE_BINDING|Fm.STORAGE_BINDING|Fm.COPY_SRC|Fm.COPY_DST),e&Ym.RENDER_TARGET&&(i|=Fm.RENDER_ATTACHMENT|Fm.TEXTURE_BINDING|Fm.COPY_SRC|Fm.COPY_DST),i}function qw(e){if(e===Ta.U8_R_NORM)return"r8unorm";if(e===Ta.S8_R_NORM)return"r8snorm";if(e===Ta.U8_RG_NORM)return"rg8unorm";if(e===Ta.S8_RG_NORM)return"rg8snorm";if(e===Ta.U32_R)return"r32uint";if(e===Ta.S32_R)return"r32sint";if(e===Ta.F32_R)return"r32float";if(e===Ta.U16_RG)return"rg16uint";if(e===Ta.S16_RG)return"rg16sint";if(e===Ta.F16_RG)return"rg16float";if(e===Ta.U8_RGBA_RT)return"bgra8unorm";if(e===Ta.U8_RGBA_RT_SRGB)return"bgra8unorm-srgb";if(e===Ta.U8_RGBA_NORM)return"rgba8unorm";if(e===Ta.U8_RGBA_SRGB)return"rgba8unorm-srgb";if(e===Ta.S8_RGBA_NORM)return"rgba8snorm";if(e===Ta.F32_RGB)return"rgb9e5ufloat";if(e===Ta.U32_RG)return"rg32uint";if(e===Ta.S32_RG)return"rg32sint";if(e===Ta.F32_RG)return"rg32float";if(e===Ta.U16_RGBA)return"rgba16uint";if(e===Ta.S16_RGBA)return"rgba16sint";if(e===Ta.F16_RGBA)return"rgba16float";if(e===Ta.F32_RGBA)return"rgba32float";if(e===Ta.U32_RGBA)return"rgba32uint";if(e===Ta.S32_RGBA)return"rgba32sint";if(e===Ta.D24)return"depth24plus";if(e===Ta.D24_S8)return"depth24plus-stencil8";if(e===Ta.D32F)return"depth32float";if(e===Ta.D32F_S8)return"depth32float-stencil8";if(e===Ta.BC1)return"bc1-rgba-unorm";if(e===Ta.BC1_SRGB)return"bc1-rgba-unorm-srgb";if(e===Ta.BC2)return"bc2-rgba-unorm";if(e===Ta.BC2_SRGB)return"bc2-rgba-unorm-srgb";if(e===Ta.BC3)return"bc3-rgba-unorm";if(e===Ta.BC3_SRGB)return"bc3-rgba-unorm-srgb";if(e===Ta.BC4_SNORM)return"bc4-r-snorm";if(e===Ta.BC4_UNORM)return"bc4-r-unorm";if(e===Ta.BC5_SNORM)return"bc5-rg-snorm";if(e===Ta.BC5_UNORM)return"bc5-rg-unorm";throw"whoops"}function BU(e){if(e===Zd.TEXTURE_2D)return"2d";if(e===Zd.TEXTURE_CUBE_MAP)return"2d";if(e===Zd.TEXTURE_2D_ARRAY)return"2d";if(e===Zd.TEXTURE_3D)return"3d";throw new Error("whoops")}function NU(e){if(e===Zd.TEXTURE_2D)return"2d";if(e===Zd.TEXTURE_CUBE_MAP)return"cube";if(e===Zd.TEXTURE_2D_ARRAY)return"2d-array";if(e===Zd.TEXTURE_3D)return"3d";throw new Error("whoops")}function zU(e){var i=0;return e&g0.INDEX&&(i|=GPUBufferUsage.INDEX),e&g0.VERTEX&&(i|=GPUBufferUsage.VERTEX),e&g0.UNIFORM&&(i|=GPUBufferUsage.UNIFORM),e&g0.STORAGE&&(i|=GPUBufferUsage.STORAGE),e&g0.COPY_SRC&&(i|=GPUBufferUsage.COPY_SRC),e&g0.INDIRECT&&(i|=GPUBufferUsage.INDIRECT),i|=GPUBufferUsage.COPY_DST,i}function Qw(e){if(e===sv.CLAMP_TO_EDGE)return"clamp-to-edge";if(e===sv.REPEAT)return"repeat";if(e===sv.MIRRORED_REPEAT)return"mirror-repeat";throw new Error("whoops")}function l5(e){if(e===mm.BILINEAR)return"linear";if(e===mm.POINT)return"nearest";throw new Error("whoops")}function ZU(e){if(e===km.LINEAR)return"linear";if(e===km.NEAREST)return"nearest";if(e===km.NO_MIP)return"nearest";throw new Error("whoops")}function c_(e){var i=e;return i.gpuBuffer}function UU(e){var i=e;return i.gpuSampler}function jU(e){var i=e;return i.querySet}function VU(e){if(e===p2.OcclusionConservative)return"occlusion";throw new Error("whoops")}function $U(e){switch(e){case Tm.TRIANGLES:return"triangle-list";case Tm.POINTS:return"point-list";case Tm.TRIANGLE_STRIP:return"triangle-strip";case Tm.LINES:return"line-list";case Tm.LINE_STRIP:return"line-strip";default:throw new Error("Unknown primitive topology mode")}}function HU(e){if(e===gv.NONE)return"none";if(e===gv.FRONT)return"front";if(e===gv.BACK)return"back";throw new Error("whoops")}function GU(e){if(e===nA.CCW)return"ccw";if(e===nA.CW)return"cw";throw new Error("whoops")}function WU(e,i){return{topology:$U(e),cullMode:HU(i.cullMode),frontFace:GU(i.frontFace)}}function c5(e){if(e===Gd.ZERO)return"zero";if(e===Gd.ONE)return"one";if(e===Gd.SRC)return"src";if(e===Gd.ONE_MINUS_SRC)return"one-minus-src";if(e===Gd.DST)return"dst";if(e===Gd.ONE_MINUS_DST)return"one-minus-dst";if(e===Gd.SRC_ALPHA)return"src-alpha";if(e===Gd.ONE_MINUS_SRC_ALPHA)return"one-minus-src-alpha";if(e===Gd.DST_ALPHA)return"dst-alpha";if(e===Gd.ONE_MINUS_DST_ALPHA)return"one-minus-dst-alpha";if(e===Gd.CONST)return"constant";if(e===Gd.ONE_MINUS_CONSTANT)return"one-minus-constant";if(e===Gd.SRC_ALPHA_SATURATE)return"src-alpha-saturated";throw new Error("whoops")}function XU(e){if(e===zm.ADD)return"add";if(e===zm.SUBSTRACT)return"subtract";if(e===zm.REVERSE_SUBSTRACT)return"reverse-subtract";if(e===zm.MIN)return"min";if(e===zm.MAX)return"max";throw new Error("whoops")}function f5(e){return{operation:XU(e.blendMode),srcFactor:c5(e.blendSrcFactor),dstFactor:c5(e.blendDstFactor)}}function h5(e){return e.blendMode===zm.ADD&&e.blendSrcFactor===Gd.ONE&&e.blendDstFactor===Gd.ZERO}function YU(e){if(!(h5(e.rgbBlendState)&&h5(e.alphaBlendState)))return{color:f5(e.rgbBlendState),alpha:f5(e.alphaBlendState)}}function KU(e,i){return{format:qw(i),blend:YU(e),writeMask:e.channelWriteMask}}function qU(e,i){return i.attachmentsState.map(function(r,n){return KU(r,e[n])})}function M2(e){if(e===Rd.NEVER)return"never";if(e===Rd.LESS)return"less";if(e===Rd.EQUAL)return"equal";if(e===Rd.LEQUAL)return"less-equal";if(e===Rd.GREATER)return"greater";if(e===Rd.NOTEQUAL)return"not-equal";if(e===Rd.GEQUAL)return"greater-equal";if(e===Rd.ALWAYS)return"always";throw new Error("whoops")}function f_(e){if(e===sm.KEEP)return"keep";if(e===sm.REPLACE)return"replace";if(e===sm.ZERO)return"zero";if(e===sm.DECREMENT_CLAMP)return"decrement-clamp";if(e===sm.DECREMENT_WRAP)return"decrement-wrap";if(e===sm.INCREMENT_CLAMP)return"increment-clamp";if(e===sm.INCREMENT_WRAP)return"increment-wrap";if(e===sm.INVERT)return"invert";throw new Error("whoops")}function QU(e,i){if(!Bv(e))return{format:qw(e),depthWriteEnabled:!!i.depthWrite,depthCompare:M2(i.depthCompare),depthBias:i.polygonOffset?1:0,depthBiasSlopeScale:i.polygonOffset?1:0,stencilFront:{compare:M2(i.stencilFront.compare),passOp:f_(i.stencilFront.passOp),failOp:f_(i.stencilFront.failOp),depthFailOp:f_(i.stencilFront.depthFailOp)},stencilBack:{compare:M2(i.stencilBack.compare),passOp:f_(i.stencilBack.passOp),failOp:f_(i.stencilBack.failOp),depthFailOp:f_(i.stencilBack.depthFailOp)},stencilReadMask:1,stencilWriteMask:1}}function JU(e){if(e!==null){if(e===Ta.U16_R)return"uint16";if(e===Ta.U32_R)return"uint32";throw new Error("whoops")}}function ej(e){if(e===u1.VERTEX)return"vertex";if(e===u1.INSTANCE)return"instance";throw new Error("whoops")}function tj(e){if(e===Ta.U8_R)return"uint8x2";if(e===Ta.U8_RG)return"uint8x2";if(e===Ta.U8_RGB)return"uint8x4";if(e===Ta.U8_RGBA)return"uint8x4";if(e===Ta.U8_RG_NORM)return"unorm8x2";if(e===Ta.U8_RGBA_NORM)return"unorm8x4";if(e===Ta.S8_RGB_NORM)return"snorm8x4";if(e===Ta.S8_RGBA_NORM)return"snorm8x4";if(e===Ta.U16_RG_NORM)return"unorm16x2";if(e===Ta.U16_RGBA_NORM)return"unorm16x4";if(e===Ta.S16_RG_NORM)return"snorm16x2";if(e===Ta.S16_RGBA_NORM)return"snorm16x4";if(e===Ta.S16_RG)return"uint16x2";if(e===Ta.F16_RG)return"float16x2";if(e===Ta.F16_RGBA)return"float16x4";if(e===Ta.F32_R)return"float32";if(e===Ta.F32_RG)return"float32x2";if(e===Ta.F32_RGB)return"float32x3";if(e===Ta.F32_RGBA)return"float32x4";throw"whoops"}function rj(e){var i=fg(e);switch(i){case pu.BC1:case pu.BC2:case pu.BC3:case pu.BC4_SNORM:case pu.BC4_UNORM:case pu.BC5_SNORM:case pu.BC5_UNORM:return!0;default:return!1}}function nj(e){var i=fg(e);switch(i){case pu.BC1:case pu.BC2:case pu.BC3:case pu.BC4_SNORM:case pu.BC4_UNORM:case pu.BC5_SNORM:case pu.BC5_UNORM:return 4;default:return 1}}function d5(e,i,r,n){switch(r===void 0&&(r=!1),e){case Ta.S8_R:case Ta.S8_R_NORM:case Ta.S8_RG_NORM:case Ta.S8_RGB_NORM:case Ta.S8_RGBA_NORM:{var t=i instanceof ArrayBuffer?new Int8Array(i):new Int8Array(i);return n&&t.set(new Int8Array(n)),t}case Ta.U8_R:case Ta.U8_R_NORM:case Ta.U8_RG:case Ta.U8_RG_NORM:case Ta.U8_RGB:case Ta.U8_RGB_NORM:case Ta.U8_RGB_SRGB:case Ta.U8_RGBA:case Ta.U8_RGBA_NORM:case Ta.U8_RGBA_SRGB:{var o=i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i);return n&&o.set(new Uint8Array(n)),o}case Ta.S16_R:case Ta.S16_RG:case Ta.S16_RG_NORM:case Ta.S16_RGB_NORM:case Ta.S16_RGBA:case Ta.S16_RGBA_NORM:{var u=i instanceof ArrayBuffer?new Int16Array(i):new Int16Array(r?i/2:i);return n&&u.set(new Int16Array(n)),u}case Ta.U16_R:case Ta.U16_RGB:case Ta.U16_RGBA_5551:case Ta.U16_RGBA_NORM:case Ta.U16_RG_NORM:case Ta.U16_R_NORM:{var c=i instanceof ArrayBuffer?new Uint16Array(i):new Uint16Array(r?i/2:i);return n&&c.set(new Uint16Array(n)),c}case Ta.S32_R:{var v=i instanceof ArrayBuffer?new Int32Array(i):new Int32Array(r?i/4:i);return n&&v.set(new Int32Array(n)),v}case Ta.U32_R:case Ta.U32_RG:{var E=i instanceof ArrayBuffer?new Uint32Array(i):new Uint32Array(r?i/4:i);return n&&E.set(new Uint32Array(n)),E}case Ta.F32_R:case Ta.F32_RG:case Ta.F32_RGB:case Ta.F32_RGBA:{var G=i instanceof ArrayBuffer?new Float32Array(i):new Float32Array(r?i/4:i);return n&&G.set(new Float32Array(n)),G}}var ie=i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i);return n&&ie.set(new Uint8Array(n)),ie}function ij(e){var i=(e&32768)>>15,r=(e&31744)>>10,n=e&1023;return r===0?(i?-1:1)*Math.pow(2,-14)*(n/Math.pow(2,10)):r==31?n?NaN:(i?-1:1)*(1/0):(i?-1:1)*Math.pow(2,r-15)*(1+n/Math.pow(2,10))}function p5(e){switch(e){case"r8unorm":case"r8snorm":case"r8uint":case"r8sint":return{width:1,height:1,length:1};case"r16uint":case"r16sint":case"r16float":case"rg8unorm":case"rg8snorm":case"rg8uint":case"rg8sint":return{width:1,height:1,length:2};case"r32uint":case"r32sint":case"r32float":case"rg16uint":case"rg16sint":case"rg16float":case"rgba8unorm":case"rgba8unorm-srgb":case"rgba8snorm":case"rgba8uint":case"rgba8sint":case"bgra8unorm":case"bgra8unorm-srgb":case"rgb9e5ufloat":case"rgb10a2unorm":case"rg11b10ufloat":return{width:1,height:1,length:4};case"rg32uint":case"rg32sint":case"rg32float":case"rgba16uint":case"rgba16sint":case"rgba16float":return{width:1,height:1,length:8};case"rgba32uint":case"rgba32sint":case"rgba32float":return{width:1,height:1,length:16};case"stencil8":throw new Error("No fixed size for Stencil8 format!");case"depth16unorm":return{width:1,height:1,length:2};case"depth24plus":throw new Error("No fixed size for Depth24Plus format!");case"depth24plus-stencil8":throw new Error("No fixed size for Depth24PlusStencil8 format!");case"depth32float":return{width:1,height:1,length:4};case"depth32float-stencil8":return{width:1,height:1,length:5};case"bc7-rgba-unorm":case"bc7-rgba-unorm-srgb":case"bc6h-rgb-ufloat":case"bc6h-rgb-float":case"bc2-rgba-unorm":case"bc2-rgba-unorm-srgb":case"bc3-rgba-unorm":case"bc3-rgba-unorm-srgb":case"bc5-rg-unorm":case"bc5-rg-snorm":return{width:4,height:4,length:16};case"bc4-r-unorm":case"bc4-r-snorm":case"bc1-rgba-unorm":case"bc1-rgba-unorm-srgb":return{width:4,height:4,length:8};default:return{width:1,height:1,length:4}}}var Xv=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=e.call(this)||this;return o.id=n,o.device=t,o}return i.prototype.destroy=function(){},i}(BM),aj=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=r.descriptor,u,c,v=e.call(this,{id:n,device:t})||this;v.type=Ep.Bindings;var E=o.pipeline;gd(!!E);var G=o.uniformBufferBindings,ie=o.storageBufferBindings,xe=o.samplerBindings,Fe=o.storageTextureBindings;v.numUniformBuffers=(G==null?void 0:G.length)||0;var it=[[],[],[],[]],gt=0;if(G&&G.length)for(var Dt=0;Dtie;)this.device.device.queue.writeBuffer(u,r+xe,n.buffer,c+xe,ie),xe+=ie;this.device.device.queue.writeBuffer(u,r+xe,n.buffer,c+xe,o-xe)},i.prototype.destroy=function(){e.prototype.destroy.call(this),this.gpuBuffer.destroy()},i}(Xv),m5=function(){function e(){this.gpuComputePassEncoder=null}return e.prototype.dispatchWorkgroups=function(i,r,n){this.gpuComputePassEncoder.dispatchWorkgroups(i,r,n)},e.prototype.dispatchWorkgroupsIndirect=function(i,r){this.gpuComputePassEncoder.dispatchWorkgroupsIndirect(i.gpuBuffer,r)},e.prototype.finish=function(){this.gpuComputePassEncoder.end(),this.gpuComputePassEncoder=null,this.frameCommandEncoder=null},e.prototype.beginComputePass=function(i){gd(this.gpuComputePassEncoder===null),this.frameCommandEncoder=i,this.gpuComputePassEncoder=this.frameCommandEncoder.beginComputePass(this.gpuComputePassDescriptor)},e.prototype.setPipeline=function(i){var r=i,n=l1(r.gpuComputePipeline);this.gpuComputePassEncoder.setPipeline(n)},e.prototype.setBindings=function(i){var r=this,n=i;n.gpuBindGroup.forEach(function(t,o){t&&r.gpuComputePassEncoder.setBindGroup(o,n.gpuBindGroup[o])})},e.prototype.pushDebugGroup=function(i){this.gpuComputePassEncoder.pushDebugGroup(i)},e.prototype.popDebugGroup=function(){this.gpuComputePassEncoder.popDebugGroup()},e.prototype.insertDebugMarker=function(i){this.gpuComputePassEncoder.insertDebugMarker(i)},e}(),sj=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=r.descriptor,u=e.call(this,{id:n,device:t})||this;u.type=Ep.ComputePipeline,u.gpuComputePipeline=null,u.descriptor=o;var c=o.program,v=c.computeStage;if(v===null)return u;var E={layout:"auto",compute:(0,jc.pi)({},v)};return u.gpuComputePipeline=u.device.device.createComputePipeline(E),u.name!==void 0&&(u.gpuComputePipeline.label=u.name),u}return i.prototype.getBindGroupLayout=function(r){return this.gpuComputePipeline.getBindGroupLayout(r)},i}(Xv),uj=function(e){(0,jc.ZT)(i,e);function i(r){var n,t,o,u,c=r.id,v=r.device,E=r.descriptor,G=e.call(this,{id:c,device:v})||this;G.type=Ep.InputLayout;var ie=[];try{for(var xe=(0,jc.XA)(E.vertexBufferDescriptors),Fe=xe.next();!Fe.done;Fe=xe.next()){var it=Fe.value,gt=it.arrayStride,Dt=it.stepMode,ar=it.attributes;ie.push({arrayStride:gt,stepMode:ej(Dt),attributes:[]});try{for(var Mr=(o=void 0,(0,jc.XA)(ar)),Zr=Mr.next();!Zr.done;Zr=Mr.next()){var mn=Zr.value,zn=mn.shaderLocation,Rn=mn.format,kn=mn.offset;ie[ie.length-1].attributes.push({shaderLocation:zn,format:tj(Rn),offset:kn})}}catch(ui){o={error:ui}}finally{try{Zr&&!Zr.done&&(u=Mr.return)&&u.call(Mr)}finally{if(o)throw o.error}}}}catch(ui){n={error:ui}}finally{try{Fe&&!Fe.done&&(t=xe.return)&&t.call(xe)}finally{if(n)throw n.error}}return G.indexFormat=JU(E.indexBufferFormat),G.buffers=ie,G}return i}(Xv),v5=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=r.descriptor,u=e.call(this,{id:n,device:t})||this;return u.type=Ep.Program,u.vertexStage=null,u.fragmentStage=null,u.computeStage=null,u.descriptor=o,o.vertex&&(u.vertexStage=u.createShaderStage(o.vertex,"vertex")),o.fragment&&(u.fragmentStage=u.createShaderStage(o.fragment,"fragment")),o.compute&&(u.computeStage=u.createShaderStage(o.compute,"compute")),u}return i.prototype.setUniformsLegacy=function(r){},i.prototype.createShaderStage=function(r,n){var t,o,u=r.glsl,c=r.wgsl,v=r.entryPoint,E=r.postprocess,G=!1,ie=c;if(!ie)try{ie=this.device.glsl_compile(u,n,G)}catch(ar){throw console.error(ar,u),new Error("whoops")}var xe=function(ar){if(!ie.includes(ar))return"continue";ie=ie.replace("var T_".concat(ar,": texture_2d;"),"var T_".concat(ar,": texture_depth_2d;")),ie=ie.replace(new RegExp("textureSample\\(T_".concat(ar,"(.*)\\);$"),"gm"),function(Mr,Zr){return"vec4(textureSample(T_".concat(ar).concat(Zr,"), 0.0, 0.0, 0.0);")})};try{for(var Fe=(0,jc.XA)(["u_TextureFramebufferDepth"]),it=Fe.next();!it.done;it=Fe.next()){var gt=it.value;xe(gt)}}catch(ar){t={error:ar}}finally{try{it&&!it.done&&(o=Fe.return)&&o.call(Fe)}finally{if(t)throw t.error}}E&&(ie=E(ie));var Dt=this.device.device.createShaderModule({code:ie});return{module:Dt,entryPoint:v||"main"}},i}(Xv),lj=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=r.descriptor,u=e.call(this,{id:n,device:t})||this;u.type=Ep.QueryPool;var c=o.elemCount,v=o.type;return u.querySet=u.device.device.createQuerySet({type:VU(v),count:c}),u.resolveBuffer=u.device.device.createBuffer({size:c*8,usage:GPUBufferUsage.QUERY_RESOLVE|GPUBufferUsage.COPY_SRC}),u.cpuBuffer=u.device.device.createBuffer({size:c*8,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ}),u.results=null,u}return i.prototype.queryResultOcclusion=function(r){return this.results===null?null:this.results[r]!==BigInt(0)},i.prototype.destroy=function(){e.prototype.destroy.call(this),this.querySet.destroy(),this.resolveBuffer.destroy(),this.cpuBuffer.destroy()},i}(Xv),cj=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=e.call(this,{id:n,device:t})||this;return o.type=Ep.Readback,o}return i.prototype.readTexture=function(r,n,t,o,u,c,v,E){return v===void 0&&(v=0),(0,jc.mG)(this,void 0,void 0,function(){var G,ie,xe,Fe,it,gt,Dt,ar;return(0,jc.Jh)(this,function(Mr){return G=r,ie=0,xe=p5(G.gpuTextureformat),Fe=Math.ceil(o/xe.width)*xe.length,it=Math.ceil(Fe/256)*256,gt=it*u,Dt=this.device.createBuffer({usage:g0.STORAGE|g0.MAP_READ|g0.COPY_DST,hint:Wv.STATIC,viewOrSize:gt}),ar=this.device.device.createCommandEncoder(),ar.copyTextureToBuffer({texture:G.gpuTexture,mipLevel:0,origin:{x:n,y:t,z:Math.max(ie,0)}},{buffer:Dt.gpuBuffer,offset:0,bytesPerRow:it},{width:o,height:u,depthOrArrayLayers:1}),this.device.device.queue.submit([ar.finish()]),[2,this.readBuffer(Dt,0,c.byteLength===gt?c:null,v,gt,G.format,!0,!1,Fe,it,u)]})})},i.prototype.readTextureSync=function(r,n,t,o,u,c,v,E){throw new Error("ERROR_MSG_METHOD_NOT_IMPLEMENTED")},i.prototype.readBuffer=function(r,n,t,o,u,c,v,E,G,ie,xe){var Fe=this;n===void 0&&(n=0),t===void 0&&(t=null),u===void 0&&(u=0),c===void 0&&(c=Ta.U8_RGB),v===void 0&&(v=!1),G===void 0&&(G=0),ie===void 0&&(ie=0),xe===void 0&&(xe=0);var it=r,gt=u||it.size,Dt=t||it.view,ar=Dt&&Dt.constructor&&Dt.constructor.BYTES_PER_ELEMENT||ZM(c),Mr=it;if(!(it.usage&g0.MAP_READ&&it.usage&g0.COPY_DST)){var Zr=this.device.device.createCommandEncoder();Mr=this.device.createBuffer({usage:g0.STORAGE|g0.MAP_READ|g0.COPY_DST,hint:Wv.STATIC,viewOrSize:gt}),Zr.copyBufferToBuffer(it.gpuBuffer,n,Mr.gpuBuffer,0,gt),this.device.device.queue.submit([Zr.finish()])}return new Promise(function(mn,zn){Mr.gpuBuffer.mapAsync(Kw.READ,n,gt).then(function(){var Rn=Mr.gpuBuffer.getMappedRange(n,gt),kn=Dt;if(v)kn===null?kn=d5(c,gt,!0,Rn):kn=d5(c,kn.buffer,void 0,Rn);else if(kn===null)switch(ar){case 1:kn=new Uint8Array(gt),kn.set(new Uint8Array(Rn));break;case 2:kn=Fe.getHalfFloatAsFloatRGBAArrayBuffer(gt/2,Rn);break;case 4:kn=new Float32Array(gt/4),kn.set(new Float32Array(Rn));break}else switch(ar){case 1:kn=new Uint8Array(kn.buffer),kn.set(new Uint8Array(Rn));break;case 2:kn=Fe.getHalfFloatAsFloatRGBAArrayBuffer(gt/2,Rn,Dt);break;case 4:var ui=Dt&&Dt.constructor||Float32Array;kn=new ui(kn.buffer),kn.set(new ui(Rn));break}if(G!==ie){ar===1&&!v&&(G*=2,ie*=2);for(var Di=new Uint8Array(kn.buffer),Aa=G,Pa=0,Lo=1;Lo1?xe.resolveTarget=this.getTextureView(ie,this.gfxColorResolveToLevel[E]):xe.storeOp="store")}else{this.gpuColorAttachments.length=E,this.gfxColorAttachment.length=E,this.gfxColorResolveTo.length=E;break}}if(this.gfxDepthStencilAttachment=i.depthStencilAttachment,this.gfxDepthStencilResolveTo=i.depthStencilResolveTo,i.depthStencilAttachment){var it=i.depthStencilAttachment,xe=this.gpuDepthStencilAttachment;xe.view=it.gpuTextureView;var gt=!!(n_(it.format)&Cc.Depth);gt?(i.depthClearValue==="load"?xe.depthLoadOp="load":(xe.depthLoadOp="clear",xe.depthClearValue=i.depthClearValue),i.depthStencilStore||this.gfxDepthStencilResolveTo!==null?xe.depthStoreOp="store":xe.depthStoreOp="discard"):(xe.depthLoadOp=void 0,xe.depthStoreOp=void 0);var Dt=!!(n_(it.format)&Cc.Stencil);Dt?(i.stencilClearValue==="load"?xe.stencilLoadOp="load":(xe.stencilLoadOp="clear",xe.stencilClearValue=i.stencilClearValue),i.depthStencilStore||this.gfxDepthStencilResolveTo!==null?xe.stencilStoreOp="store":xe.stencilStoreOp="discard"):(xe.stencilLoadOp=void 0,xe.stencilStoreOp=void 0),this.gpuRenderPassDescriptor.depthStencilAttachment=this.gpuDepthStencilAttachment}else this.gpuRenderPassDescriptor.depthStencilAttachment=void 0;this.gpuRenderPassDescriptor.occlusionQuerySet=Bv(i.occlusionQueryPool)?void 0:jU(i.occlusionQueryPool)},e.prototype.beginRenderPass=function(i,r){gd(this.gpuRenderPassEncoder===null),this.setRenderPassDescriptor(r),this.frameCommandEncoder=i,this.gpuRenderPassEncoder=this.frameCommandEncoder.beginRenderPass(this.gpuRenderPassDescriptor)},e.prototype.flipY=function(i,r){var n=this.device.swapChainHeight;return n-i-r},e.prototype.setViewport=function(i,r,n,t,o,u){o===void 0&&(o=0),u===void 0&&(u=1),this.gpuRenderPassEncoder.setViewport(i,this.flipY(r,t),n,t,o,u)},e.prototype.setScissorRect=function(i,r,n,t){this.gpuRenderPassEncoder.setScissorRect(i,this.flipY(r,t),n,t)},e.prototype.setPipeline=function(i){var r=i,n=l1(r.gpuRenderPipeline);this.getEncoder().setPipeline(n)},e.prototype.setVertexInput=function(i,r,n){if(i!==null){var t=this.getEncoder(),o=i;n!==null&&t.setIndexBuffer(c_(n.buffer),l1(o.indexFormat),n.offset);for(var u=0;u1||this.copyAttachment(this.gfxDepthStencilResolveTo,0,this.gfxDepthStencilAttachment,0)),this.frameCommandEncoder=null},e.prototype.copyAttachment=function(i,r,n,t){gd(n.sampleCount===1);var o={texture:n.gpuTexture,mipLevel:t},u={texture:i.gpuTexture,mipLevel:r};gd(n.width>>>t===i.width>>>r),gd(n.height>>>t===i.height>>>r),gd(!!(n.usage&Fm.COPY_SRC)),gd(!!(i.usage&Fm.COPY_DST)),this.frameCommandEncoder.copyTextureToTexture(o,u,[i.width,i.height,1])},e}(),fj=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=r.descriptor,u=e.call(this,{id:n,device:t})||this;return u.type=Ep.RenderPipeline,u.isCreatingAsync=!1,u.gpuRenderPipeline=null,u.descriptor=o,u.device.createRenderPipelineInternal(u,!1),u}return i.prototype.getBindGroupLayout=function(r){return this.gpuRenderPipeline.getBindGroupLayout(r)},i}(Xv),hj=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=r.descriptor,u,c,v=e.call(this,{id:n,device:t})||this;v.type=Ep.Sampler;var E=o.lodMinClamp,G=o.mipmapFilter===km.NO_MIP?o.lodMinClamp:o.lodMaxClamp,ie=(u=o.maxAnisotropy)!==null&&u!==void 0?u:1;return ie>1&&gd(o.minFilter===mm.BILINEAR&&o.magFilter===mm.BILINEAR&&o.mipmapFilter===km.LINEAR),v.gpuSampler=v.device.device.createSampler({addressModeU:Qw(o.addressModeU),addressModeV:Qw(o.addressModeV),addressModeW:Qw((c=o.addressModeW)!==null&&c!==void 0?c:o.addressModeU),lodMinClamp:E,lodMaxClamp:G,minFilter:l5(o.minFilter),magFilter:l5(o.magFilter),mipmapFilter:ZU(o.mipmapFilter),compare:o.compareFunction!==void 0?M2(o.compareFunction):void 0,maxAnisotropy:ie}),v}return i}(Xv),P2=function(e){(0,jc.ZT)(i,e);function i(r){var n=r.id,t=r.device,o=r.descriptor,u=r.skipCreate,c=r.sampleCount,v=e.call(this,{id:n,device:t})||this;v.type=Ep.Texture,v.flipY=!1;var E=o.format,G=o.dimension,ie=o.width,xe=o.height,Fe=o.depthOrArrayLayers,it=o.mipLevelCount,gt=o.usage,Dt=o.pixelStore;return v.flipY=!!(Dt!=null&&Dt.unpackFlipY),v.device.createTextureShared({format:E,dimension:G!=null?G:Zd.TEXTURE_2D,width:ie,height:xe,depthOrArrayLayers:Fe!=null?Fe:1,mipLevelCount:it!=null?it:1,usage:gt,sampleCount:c!=null?c:1},v,u),v}return i.prototype.textureFromImageBitmapOrCanvas=function(r,n,t){for(var o=n[0].width,u=n[0].height,c={size:{width:o,height:u,depthOrArrayLayers:t},format:"rgba8unorm",usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT},v=r.createTexture(c),E=0;E>>2,uniformBufferWordAlignment:this.device.limits.minUniformBufferOffsetAlignment>>>2,supportedSampleCounts:[1],occlusionQueriesRecommended:!0,computeShadersSupported:!0}},e.prototype.queryTextureFormatSupported=function(i,r,n){if(rj(i)){if(!this.featureTextureCompressionBC)return!1;var t=nj(i);return r%t!==0||n%t!==0?!1:this.featureTextureCompressionBC}switch(i){case Ta.U16_RGBA_NORM:return!1;case Ta.F32_RGBA:return!1}return!0},e.prototype.queryPlatformAvailable=function(){return!0},e.prototype.queryVendorInfo=function(){return this},e.prototype.queryRenderPass=function(i){var r=i;return r.descriptor},e.prototype.queryRenderTarget=function(i){var r=i;return r},e.prototype.setResourceName=function(i,r){if(i.name=r,i.type===Ep.Buffer){var n=i;n.gpuBuffer.label=r}else if(i.type===Ep.Texture){var n=i;n.gpuTexture.label=r,n.gpuTextureView.label=r}else if(i.type===Ep.RenderTarget){var n=i;n.gpuTexture.label=r,n.gpuTextureView.label=r}else if(i.type===Ep.Sampler){var n=i;n.gpuSampler.label=r}else if(i.type===Ep.RenderPipeline){var n=i;n.gpuRenderPipeline!==null&&(n.gpuRenderPipeline.label=r)}},e.prototype.setResourceLeakCheck=function(i,r){},e.prototype.checkForLeaks=function(){},e.prototype.programPatched=function(i){},e.prototype.pipelineQueryReady=function(i){var r=i;return r.gpuRenderPipeline!==null},e.prototype.pipelineForceReady=function(i){var r=i;this.createRenderPipelineInternal(r,!1)},e}(),mj=function(){function e(i){this.pluginOptions=i}return e.prototype.createSwapChain=function(i){return(0,jc.mG)(this,void 0,void 0,function(){var r,n,t,o,u,c,v,E;return(0,jc.Jh)(this,function(G){switch(G.label){case 0:if(globalThis.navigator.gpu===void 0)return[2,null];r=null,G.label=1;case 1:return G.trys.push([1,3,,4]),n=this.pluginOptions.xrCompatible,[4,globalThis.navigator.gpu.requestAdapter({xrCompatible:n})];case 2:return r=G.sent(),[3,4];case 3:return t=G.sent(),console.log(t),[3,4];case 4:return r===null?[2,null]:(o=["depth32float-stencil8","texture-compression-bc","float32-filterable"],u=o.filter(function(ie){return r.features.has(ie)}),[4,r.requestDevice({requiredFeatures:u})]);case 5:if(c=G.sent(),c&&(v=this.pluginOptions.onContextLost,c.lost.then(function(){v&&v()})),c===null)return[2,null];if(E=i.getContext("webgpu"),!E)return[2,null];G.label=6;case 6:return G.trys.push([6,8,,9]),[4,u5(this.pluginOptions.shaderCompilerPath)];case 7:return G.sent(),[3,9];case 8:return G.sent(),[3,9];case 9:return[2,new pj(r,c,i,E,OU,hA&&new hA)]}})})},e}(),vj=vi.isPlainObject,gj=vi.isTypedArray,yj=function(){function e(i,r){(0,Je.Z)(this,e),(0,St.Z)(this,"destroyed",!1),(0,St.Z)(this,"uniforms",{}),this.reGl=i;var n=r.vs,t=r.fs,o=r.attributes,u=r.uniforms,c=r.primitive,v=r.count,E=r.elements,G=r.depth,ie=r.cull,xe=r.instances,Fe={platformString:"WebGL1",glslVersion:"#version 100",explicitBindingLocations:!1,separateSamplerTextures:!1,viewportOrigin:cg.LOWER_LEFT,clipSpaceNearZ:r_.NEGATIVE_ONE,supportMRT:!1},it={};this.options=r,u&&(this.uniforms=this.extractUniforms(u),Object.keys(u).forEach(function(Zr){it[Zr]=i.prop(Zr)}));var gt={};Object.keys(o).forEach(function(Zr){gt[Zr]=o[Zr].get()});var Dt=jy(Sy(Fe,"frag",t,null,!1)),ar=jy(Sy(Fe,"vert",n,null,!1)),Mr={attributes:gt,frag:Dt,uniforms:it,vert:ar,colorMask:i.prop("colorMask"),lineWidth:1,blend:{enable:i.prop("blend.enable"),func:i.prop("blend.func"),equation:i.prop("blend.equation"),color:i.prop("blend.color")},stencil:{enable:i.prop("stencil.enable"),mask:i.prop("stencil.mask"),func:i.prop("stencil.func"),opFront:i.prop("stencil.opFront"),opBack:i.prop("stencil.opBack")},primitive:tZ[c===void 0?Or.TRIANGLES:c]};xe&&(Mr.instances=xe),v?Mr.count=v:E&&(Mr.elements=E.get()),this.initDepthDrawParams({depth:G},Mr),this.initCullDrawParams({cull:ie},Mr),this.drawCommand=i(Mr),this.drawParams=Mr}return(0,vt.Z)(e,[{key:"updateAttributesAndElements",value:function(r,n){var t={};Object.keys(r).forEach(function(o){t[o]=r[o].get()}),this.drawParams.attributes=t,this.drawParams.elements=n.get(),this.drawCommand=this.reGl(this.drawParams)}},{key:"updateAttributes",value:function(r){var n={};Object.keys(r).forEach(function(t){n[t]=r[t].get()}),this.drawParams.attributes=n,this.drawCommand=this.reGl(this.drawParams)}},{key:"addUniforms",value:function(r){this.uniforms=(0,Me.Z)((0,Me.Z)({},this.uniforms),this.extractUniforms(r))}},{key:"draw",value:function(r,n){if(!(this.drawParams.attributes&&Object.keys(this.drawParams.attributes).length===0)){var t=(0,Me.Z)((0,Me.Z)({},this.uniforms),this.extractUniforms(r.uniforms||{})),o={};Object.keys(t).forEach(function(u){var c=(0,bf.Z)(t[u]);c==="boolean"||c==="number"||Array.isArray(t[u])||t[u].BYTES_PER_ELEMENT?o[u]=t[u]:o[u]=t[u].get()}),o.blend=n?this.getBlendDrawParams({blend:{enable:!1}}):this.getBlendDrawParams(r),o.stencil=this.getStencilDrawParams(r),o.colorMask=this.getColorMaskDrawParams(r,n),this.drawCommand(o)}}},{key:"destroy",value:function(){var r;(r=this.drawParams)===null||r===void 0||(r=r.elements)===null||r===void 0||r.destroy(),this.options.attributes&&Object.values(this.options.attributes).forEach(function(n){n==null||n.destroy()}),this.destroyed=!0}},{key:"initDepthDrawParams",value:function(r,n){var t=r.depth;t&&(n.depth={enable:t.enable===void 0?!0:!!t.enable,mask:t.mask===void 0?!0:!!t.mask,func:aZ[t.func||Or.LESS],range:t.range||[0,1]})}},{key:"getBlendDrawParams",value:function(r){var n=r.blend,t=n||{},o=t.enable,u=t.func,c=t.equation,v=t.color,E=v===void 0?[0,0,0,0]:v;return{enable:!!o,func:{srcRGB:d2[u&&u.srcRGB||Or.SRC_ALPHA],srcAlpha:d2[u&&u.srcAlpha||Or.SRC_ALPHA],dstRGB:d2[u&&u.dstRGB||Or.ONE_MINUS_SRC_ALPHA],dstAlpha:d2[u&&u.dstAlpha||Or.ONE_MINUS_SRC_ALPHA]},equation:{rgb:FM[c&&c.rgb||Or.FUNC_ADD],alpha:FM[c&&c.alpha||Or.FUNC_ADD]},color:E}}},{key:"getStencilDrawParams",value:function(r){var n=r.stencil,t=n||{},o=t.enable,u=t.mask,c=u===void 0?-1:u,v=t.func,E=v===void 0?{cmp:Or.ALWAYS,ref:0,mask:-1}:v,G=t.opFront,ie=G===void 0?{fail:Or.KEEP,zfail:Or.KEEP,zpass:Or.KEEP}:G,xe=t.opBack,Fe=xe===void 0?{fail:Or.KEEP,zfail:Or.KEEP,zpass:Or.KEEP}:xe;return{enable:!!o,mask:c,func:(0,Me.Z)((0,Me.Z)({},E),{},{cmp:oZ[E.cmp]}),opFront:{fail:e_[ie.fail],zfail:e_[ie.zfail],zpass:e_[ie.zpass]},opBack:{fail:e_[Fe.fail],zfail:e_[Fe.zfail],zpass:e_[Fe.zpass]}}}},{key:"getColorMaskDrawParams",value:function(r,n){var t=r.stencil,o=t!=null&&t.enable&&t.opFront&&!n?[!1,!1,!1,!1]:[!0,!0,!0,!0];return o}},{key:"initCullDrawParams",value:function(r,n){var t=r.cull;if(t){var o=t.enable,u=t.face,c=u===void 0?Or.BACK:u;n.cull={enable:!!o,face:sZ[c]}}}},{key:"extractUniforms",value:function(r){var n=this,t={};return Object.keys(r).forEach(function(o){n.extractUniformsRecursively(o,r[o],t,"")}),t}},{key:"extractUniformsRecursively",value:function(r,n,t,o){var u=this;if(n===null||typeof n=="number"||typeof n=="boolean"||Array.isArray(n)&&typeof n[0]=="number"||gj(n)||n===""||"resize"in n){t["".concat(o&&o+".").concat(r)]=n;return}vj(n)&&Object.keys(n).forEach(function(c){u.extractUniformsRecursively(c,n[c],t,"".concat(o&&o+".").concat(r))}),Array.isArray(n)&&n.forEach(function(c,v){Object.keys(c).forEach(function(E){u.extractUniformsRecursively(E,c[E],t,"".concat(o&&o+".").concat(r,"[").concat(v,"]"))})})}}]),e}(),_j=function(){function e(i,r){(0,Je.Z)(this,e),(0,St.Z)(this,"isDestroy",!1);var n=r.data,t=r.type,o=t===void 0?Or.UNSIGNED_BYTE:t,u=r.width,c=r.height,v=r.flipY,E=v===void 0?!1:v,G=r.format,ie=G===void 0?Or.RGBA:G,xe=r.mipmap,Fe=xe===void 0?!1:xe,it=r.wrapS,gt=it===void 0?Or.CLAMP_TO_EDGE:it,Dt=r.wrapT,ar=Dt===void 0?Or.CLAMP_TO_EDGE:Dt,Mr=r.aniso,Zr=Mr===void 0?0:Mr,mn=r.alignment,zn=mn===void 0?1:mn,Rn=r.premultiplyAlpha,kn=Rn===void 0?!1:Rn,ui=r.mag,Di=ui===void 0?Or.NEAREST:ui,Aa=r.min,Pa=Aa===void 0?Or.NEAREST:Aa,Lo=r.colorSpace,ns=Lo===void 0?Or.BROWSER_DEFAULT_WEBGL:Lo,ws=r.x,Pf=ws===void 0?0:ws,ih=r.y,ld=ih===void 0?0:ih,Vp=r.copy,Cd=Vp===void 0?!1:Vp;this.width=u,this.height=c;var Pm={width:u,height:c,type:Vw[o],format:rZ[ie],wrapS:kM[gt],wrapT:kM[ar],mag:DM[Di],min:DM[Pa],alignment:zn,flipY:E,colorSpace:iZ[ns],premultiplyAlpha:kn,aniso:Zr,x:Pf,y:ld,copy:Cd};n&&(Pm.data=n),typeof Fe=="number"?Pm.mipmap=nZ[Fe]:typeof Fe=="boolean"&&(Pm.mipmap=Fe),this.texture=i.texture(Pm)}return(0,vt.Z)(e,[{key:"get",value:function(){return this.texture}},{key:"update",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.texture(r)}},{key:"bind",value:function(){this.texture._texture.bind()}},{key:"resize",value:function(r){var n=r.width,t=r.height;this.texture.resize(n,t),this.width=n,this.height=t}},{key:"getSize",value:function(){return[this.width,this.height]}},{key:"destroy",value:function(){if(!this.isDestroy){var r;(r=this.texture)===null||r===void 0||r.destroy()}this.isDestroy=!0}}]),e}(),y5,_5,Aj=(y5=(0,bo.b2)(),y5(_5=function(){function e(){var i=this;(0,Je.Z)(this,e),(0,St.Z)(this,"uniformBuffers",[]),(0,St.Z)(this,"queryVerdorInfo",function(){return"WebGL1"}),(0,St.Z)(this,"createModel",function(r){return new yj(i.gl,r)}),(0,St.Z)(this,"createAttribute",function(r){return new eZ(i.gl,r)}),(0,St.Z)(this,"createBuffer",function(r){return new uZ(i.gl,r)}),(0,St.Z)(this,"createElements",function(r){return new lZ(i.gl,r)}),(0,St.Z)(this,"createTexture2D",function(r){return new _j(i.gl,r)}),(0,St.Z)(this,"createFramebuffer",function(r){return new cZ(i.gl,r)}),(0,St.Z)(this,"useFramebuffer",function(r,n){i.gl({framebuffer:r?r.get():null})(n)}),(0,St.Z)(this,"useFramebufferAsync",function(){var r=(0,Qi.Z)(Qr().mark(function n(t,o){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:i.gl({framebuffer:t?t.get():null})(o);case 1:case"end":return c.stop()}},n)}));return function(n,t){return r.apply(this,arguments)}}()),(0,St.Z)(this,"clear",function(r){var n,t=r.color,o=r.depth,u=r.stencil,c=r.framebuffer,v=c===void 0?null:c,E={color:t,depth:o,stencil:u};E.framebuffer=v===null?v:v.get(),(n=i.gl)===null||n===void 0||n.clear(E)}),(0,St.Z)(this,"viewport",function(r){var n=r.x,t=r.y,o=r.width,u=r.height;i.gl._gl.viewport(n,t,o,u),i.width=o,i.height=u,i.gl._refresh()}),(0,St.Z)(this,"readPixels",function(r){var n=r.framebuffer,t=r.x,o=r.y,u=r.width,c=r.height,v={x:t,y:o,width:u,height:c};return n&&(v.framebuffer=n.get()),i.gl.read(v)}),(0,St.Z)(this,"readPixelsAsync",function(){var r=(0,Qi.Z)(Qr().mark(function n(t){return Qr().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",i.readPixels(t));case 1:case"end":return u.stop()}},n)}));return function(n){return r.apply(this,arguments)}}()),(0,St.Z)(this,"getViewportSize",function(){return{width:i.gl._gl.drawingBufferWidth,height:i.gl._gl.drawingBufferHeight}}),(0,St.Z)(this,"getContainer",function(){var r;return(r=i.canvas)===null||r===void 0?void 0:r.parentElement}),(0,St.Z)(this,"getCanvas",function(){return i.canvas}),(0,St.Z)(this,"getGLContext",function(){return i.gl._gl}),(0,St.Z)(this,"destroy",function(){var r;i.canvas=null,(r=i.gl)===null||r===void 0||(r=r._gl)===null||r===void 0||(r=r.getExtension("WEBGL_lose_context"))===null||r===void 0||r.loseContext(),i.gl.destroy(),i.gl=null})}return(0,vt.Z)(e,[{key:"init",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t,o,u){var c=this;return Qr().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(this.canvas=t,!u){E.next=5;break}this.gl=u,E.next=8;break;case 5:return E.next=7,new Promise(function(G,ie){Jz()({canvas:c.canvas,attributes:{alpha:!0,antialias:o.antialias,premultipliedAlpha:!0,preserveDrawingBuffer:o.preserveDrawingBuffer,stencil:o.stencil},extensions:["OES_element_index_uint","OES_standard_derivatives","ANGLE_instanced_arrays"],optionalExtensions:["oes_texture_float_linear","OES_texture_float","EXT_texture_filter_anisotropic","EXT_blend_minmax","WEBGL_depth_texture","WEBGL_lose_context"],profile:!0,onDone:function(Fe,it){(Fe||!it)&&ie(Fe),G(it)}})});case 7:this.gl=E.sent;case 8:this.extensionObject={OES_texture_float:this.testExtension("OES_texture_float")};case 9:case"end":return E.stop()}},n,this)}));function r(n,t,o){return i.apply(this,arguments)}return r}()},{key:"getPointSizeRange",value:function(){return this.gl._gl.getParameter(this.gl._gl.ALIASED_POINT_SIZE_RANGE)}},{key:"testExtension",value:function(r){return!!this.getGLContext().getExtension(r)}},{key:"setState",value:function(){this.gl({cull:{enable:!1,face:"back"},viewport:{x:0,y:0,height:this.width,width:this.height},blend:{enable:!0,equation:"add"},framebuffer:null}),this.gl._refresh()}},{key:"setBaseState",value:function(){this.gl({cull:{enable:!1,face:"back"},viewport:{x:0,y:0,height:this.width,width:this.height},blend:{enable:!1,equation:"add"},framebuffer:null}),this.gl._refresh()}},{key:"setCustomLayerDefaults",value:function(){var r=this.getGLContext();r.disable(r.CULL_FACE)}},{key:"setDirty",value:function(r){this.isDirty=r}},{key:"getDirty",value:function(){return this.isDirty}},{key:"beginFrame",value:function(){}},{key:"endFrame",value:function(){}}]),e}())||_5),bj=function(){function e(i,r){(0,Je.Z)(this,e);var n=r.buffer,t=r.offset,o=r.stride,u=r.normalized,c=r.size,v=r.divisor,E=r.shaderLocation;this.buffer=n,this.attribute={shaderLocation:E,buffer:n.get(),offset:t||0,stride:o||0,normalized:u||!1,divisor:v||0},c&&(this.attribute.size=c)}return(0,vt.Z)(e,[{key:"get",value:function(){return this.buffer}},{key:"updateBuffer",value:function(r){this.buffer.subData(r)}},{key:"destroy",value:function(){this.buffer.destroy()}}]),e}(),Ty,Hg,h_,dA,pA,hg,I2,f1,Km,dg,pg,R2=(Ty={},(0,St.Z)(Ty,Or.FLOAT,Float32Array),(0,St.Z)(Ty,Or.UNSIGNED_BYTE,Uint8Array),(0,St.Z)(Ty,Or.SHORT,Int16Array),(0,St.Z)(Ty,Or.UNSIGNED_SHORT,Uint16Array),(0,St.Z)(Ty,Or.INT,Int32Array),(0,St.Z)(Ty,Or.UNSIGNED_INT,Uint32Array),Ty),xj=(Hg={},(0,St.Z)(Hg,Or.POINTS,Tm.POINTS),(0,St.Z)(Hg,Or.LINES,Tm.LINES),(0,St.Z)(Hg,Or.LINE_LOOP,Tm.LINES),(0,St.Z)(Hg,Or.LINE_STRIP,Tm.LINE_STRIP),(0,St.Z)(Hg,Or.TRIANGLES,Tm.TRIANGLES),(0,St.Z)(Hg,Or.TRIANGLE_FAN,Tm.TRIANGLES),(0,St.Z)(Hg,Or.TRIANGLE_STRIP,Tm.TRIANGLE_STRIP),Hg),wj=(h_={},(0,St.Z)(h_,1,Ta.F32_R),(0,St.Z)(h_,2,Ta.F32_RG),(0,St.Z)(h_,3,Ta.F32_RGB),(0,St.Z)(h_,4,Ta.F32_RGBA),h_),Ej=(dA={},(0,St.Z)(dA,Or.STATIC_DRAW,Wv.STATIC),(0,St.Z)(dA,Or.DYNAMIC_DRAW,Wv.DYNAMIC),(0,St.Z)(dA,Or.STREAM_DRAW,Wv.DYNAMIC),dA),A5=(pA={},(0,St.Z)(pA,Or.REPEAT,sv.REPEAT),(0,St.Z)(pA,Or.CLAMP_TO_EDGE,sv.CLAMP_TO_EDGE),(0,St.Z)(pA,Or.MIRRORED_REPEAT,sv.MIRRORED_REPEAT),pA),Sj=(hg={},(0,St.Z)(hg,Or.NEVER,Rd.NEVER),(0,St.Z)(hg,Or.ALWAYS,Rd.ALWAYS),(0,St.Z)(hg,Or.LESS,Rd.LESS),(0,St.Z)(hg,Or.LEQUAL,Rd.LEQUAL),(0,St.Z)(hg,Or.GREATER,Rd.GREATER),(0,St.Z)(hg,Or.GEQUAL,Rd.GEQUAL),(0,St.Z)(hg,Or.EQUAL,Rd.EQUAL),(0,St.Z)(hg,Or.NOTEQUAL,Rd.NOTEQUAL),hg),Cj=(I2={},(0,St.Z)(I2,Or.FRONT,gv.FRONT),(0,St.Z)(I2,Or.BACK,gv.BACK),I2),b5=(f1={},(0,St.Z)(f1,Or.FUNC_ADD,zm.ADD),(0,St.Z)(f1,Or.MIN_EXT,zm.MIN),(0,St.Z)(f1,Or.MAX_EXT,zm.MAX),(0,St.Z)(f1,Or.FUNC_SUBTRACT,zm.SUBSTRACT),(0,St.Z)(f1,Or.FUNC_REVERSE_SUBTRACT,zm.REVERSE_SUBSTRACT),f1),O2=(Km={},(0,St.Z)(Km,Or.ZERO,Gd.ZERO),(0,St.Z)(Km,Or.ONE,Gd.ONE),(0,St.Z)(Km,Or.SRC_COLOR,Gd.SRC),(0,St.Z)(Km,Or.ONE_MINUS_SRC_COLOR,Gd.ONE_MINUS_SRC),(0,St.Z)(Km,Or.SRC_ALPHA,Gd.SRC_ALPHA),(0,St.Z)(Km,Or.ONE_MINUS_SRC_ALPHA,Gd.ONE_MINUS_SRC_ALPHA),(0,St.Z)(Km,Or.DST_COLOR,Gd.DST),(0,St.Z)(Km,Or.ONE_MINUS_DST_COLOR,Gd.ONE_MINUS_DST),(0,St.Z)(Km,Or.DST_ALPHA,Gd.DST_ALPHA),(0,St.Z)(Km,Or.ONE_MINUS_DST_ALPHA,Gd.ONE_MINUS_DST_ALPHA),(0,St.Z)(Km,Or.CONSTANT_COLOR,Gd.CONST),(0,St.Z)(Km,Or.ONE_MINUS_CONSTANT_COLOR,Gd.ONE_MINUS_CONSTANT),(0,St.Z)(Km,Or.CONSTANT_ALPHA,Gd.CONST),(0,St.Z)(Km,Or.ONE_MINUS_CONSTANT_ALPHA,Gd.ONE_MINUS_CONSTANT),(0,St.Z)(Km,Or.SRC_ALPHA_SATURATE,Gd.SRC_ALPHA_SATURATE),Km),d_=(dg={},(0,St.Z)(dg,Or.REPLACE,sm.REPLACE),(0,St.Z)(dg,Or.KEEP,sm.KEEP),(0,St.Z)(dg,Or.ZERO,sm.ZERO),(0,St.Z)(dg,Or.INVERT,sm.INVERT),(0,St.Z)(dg,Or.INCR,sm.INCREMENT_CLAMP),(0,St.Z)(dg,Or.DECR,sm.DECREMENT_CLAMP),(0,St.Z)(dg,Or.INCR_WRAP,sm.INCREMENT_WRAP),(0,St.Z)(dg,Or.DECR_WRAP,sm.DECREMENT_WRAP),dg),Tj=(pg={},(0,St.Z)(pg,Or.ALWAYS,Rd.ALWAYS),(0,St.Z)(pg,Or.EQUAL,Rd.EQUAL),(0,St.Z)(pg,Or.GEQUAL,Rd.GEQUAL),(0,St.Z)(pg,Or.GREATER,Rd.GREATER),(0,St.Z)(pg,Or.LEQUAL,Rd.LEQUAL),(0,St.Z)(pg,Or.LESS,Rd.LESS),(0,St.Z)(pg,Or.NEVER,Rd.NEVER),(0,St.Z)(pg,Or.NOTEQUAL,Rd.NOTEQUAL),pg),Mj={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121};function L2(e){return Object.prototype.toString.call(e)in Mj}function Pj(e,i){for(var r=e.length,n=Math.ceil(r/3),t=r+n,o=new Float32Array(t),u=0;u=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function Rj(e,i){if(e){if(typeof e=="string")return w5(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w5(e,i)}}function w5(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r1&&arguments[1]!==void 0?arguments[1]:0;return e+=i,e+=e<<10,e+=e>>>6,e>>>0}function E5(e){return e+=e<<3,e^=e>>>11,e+=e<<15,e>>>0}function S5(e){return 0}var Oj=(0,vt.Z)(function e(){(0,Je.Z)(this,e),(0,St.Z)(this,"keys",[]),(0,St.Z)(this,"values",[])}),D2=function(){function e(i,r){(0,Je.Z)(this,e),(0,St.Z)(this,"buckets",new Map),this.keyEqualFunc=i,this.keyHashFunc=r}return(0,vt.Z)(e,[{key:"findBucketIndex",value:function(r,n){for(var t=0;t=0)){c.next=12;break}return c.next=9,t.values[o];case 9:o--,c.next=6;break;case 12:c.next=3;break;case 14:c.next=19;break;case 16:c.prev=16,c.t0=c.catch(1),r.e(c.t0);case 19:return c.prev=19,r.f(),c.finish(19);case 22:case"end":return c.stop()}},i,this,[[1,16,19,22]])})}]),e}();function k2(e,i){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Lj(e))||i&&e&&typeof e.length=="number"){r&&(e=r);var n=0,t=function(){};return{s:t,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:t}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,u=!1,c;return{s:function(){r=r.call(e)},n:function(){var E=r.next();return o=E.done,E},e:function(E){u=!0,c=E},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(u)throw c}}}}function Lj(e,i){if(e){if(typeof e=="string")return C5(e,i);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C5(e,i)}}function C5(e,i){(i==null||i>e.length)&&(i=e.length);for(var r=0,n=new Array(i);r0}),n=this.device.createBindings(o),this.bindingsCache.add(o,n)}return n}},{key:"createRenderPipeline",value:function(r){var n=this.renderPipelinesCache.get(r);if(n===null){var t=VZ(r);t.colorAttachmentFormats=t.colorAttachmentFormats.filter(function(o){return o}),n=this.device.createRenderPipeline(t),this.renderPipelinesCache.add(t,n)}return n}},{key:"createInputLayout",value:function(r){r.vertexBufferDescriptors=r.vertexBufferDescriptors.filter(function(o){return!!o});var n=this.inputLayoutsCache.get(r);if(n===null){var t=GZ(r);n=this.device.createInputLayout(t),this.inputLayoutsCache.add(t,n)}return n}},{key:"createProgram",value:function(r){var n=this.programCache.get(r);if(n===null){var t=Zj(r);n=this.device.createProgram(r),this.programCache.add(t,n)}return n}},{key:"destroy",value:function(){var r=k2(this.bindingsCache.values()),n;try{for(r.s();!(n=r.n()).done;){var t=n.value;t.destroy()}}catch(it){r.e(it)}finally{r.f()}var o=k2(this.renderPipelinesCache.values()),u;try{for(o.s();!(u=o.n()).done;){var c=u.value;c.destroy()}}catch(it){o.e(it)}finally{o.f()}var v=k2(this.inputLayoutsCache.values()),E;try{for(v.s();!(E=v.n()).done;){var G=E.value;G.destroy()}}catch(it){v.e(it)}finally{v.f()}var ie=k2(this.programCache.values()),xe;try{for(ie.s();!(xe=ie.n()).done;){var Fe=xe.value;Fe.destroy()}}catch(it){ie.e(it)}finally{ie.f()}this.bindingsCache.clear(),this.renderPipelinesCache.clear(),this.inputLayoutsCache.clear(),this.programCache.clear()}}]),e}(),jj=function(){function e(i,r){(0,Je.Z)(this,e);var n=r.data,t=r.type,o=r.count,u=o===void 0?0:o,c;L2(n)?c=n:c=new R2[this.type||Or.UNSIGNED_INT](n),this.type=t,this.count=u,this.indexBuffer=i.createBuffer({viewOrSize:c,usage:g0.INDEX})}return(0,vt.Z)(e,[{key:"get",value:function(){return this.indexBuffer}},{key:"subData",value:function(r){var n=r.data,t;L2(n)?t=n:t=new R2[this.type||Or.UNSIGNED_INT](n),this.indexBuffer.setSubData(0,new Uint8Array(t.buffer))}},{key:"destroy",value:function(){this.indexBuffer.destroy()}}]),e}();function M5(e){return!!(e&&e.texture)}var P5=function(){function e(i,r){(0,Je.Z)(this,e),(0,St.Z)(this,"isDestroy",!1),this.device=i,this.options=r;var n=r.wrapS,t=n===void 0?Or.CLAMP_TO_EDGE:n,o=r.wrapT,u=o===void 0?Or.CLAMP_TO_EDGE:o,c=r.aniso,v=r.mipmap,E=v===void 0?!1:v,G=r.mag,ie=G===void 0?Or.NEAREST:G,xe=r.min,Fe=xe===void 0?Or.NEAREST:xe;this.createTexture(r),this.sampler=i.createSampler({addressModeU:A5[t],addressModeV:A5[u],minFilter:Fe===Or.NEAREST?mm.POINT:mm.BILINEAR,magFilter:ie===Or.NEAREST?mm.POINT:mm.BILINEAR,mipmapFilter:km.NO_MIP,maxAnisotropy:c})}return(0,vt.Z)(e,[{key:"createTexture",value:function(r){var n=r.type,t=n===void 0?Or.UNSIGNED_BYTE:n,o=r.width,u=r.height,c=r.flipY,v=c===void 0?!1:c,E=r.format,G=E===void 0?Or.RGBA:E,ie=r.aniso,xe=r.alignment,Fe=xe===void 0?1:xe,it=r.usage,gt=it===void 0?Oh.SAMPLED:it,Dt=r.unorm,ar=Dt===void 0?!1:Dt,Mr=r.label,Zr=r.data;this.width=o,this.height=u;var mn=Ta.U8_RGBA_RT;if(t===Or.UNSIGNED_BYTE&&G===Or.RGBA)mn=ar?Ta.U8_RGBA_NORM:Ta.U8_RGBA_RT;else if(t===Or.UNSIGNED_BYTE&&G===Or.LUMINANCE)mn=Ta.U8_LUMINANCE;else if(t===Or.FLOAT&&G===Or.RGB)this.device.queryVendorInfo().platformString==="WebGPU"?(Zr&&(Zr=Pj(Zr,0)),mn=Ta.F32_RGBA):mn=Ta.F32_RGB;else if(t===Or.FLOAT&&G===Or.RGBA)mn=Ta.F32_RGBA;else if(t===Or.FLOAT&&G===Or.RED)mn=Ta.F32_R;else throw new Error("create texture error, type: ".concat(t,", format: ").concat(G));this.texture=this.device.createTexture({format:mn,width:o,height:u,usage:gt===Oh.SAMPLED?Ym.SAMPLED:Ym.RENDER_TARGET,pixelStore:{unpackFlipY:v,packAlignment:Fe},mipLevelCount:1}),Mr&&this.device.setResourceName(this.texture,Mr),Zr&&this.texture.setImageData([Zr])}},{key:"get",value:function(){return this.texture}},{key:"update",value:function(r){var n=r.data;this.texture.setImageData([n])}},{key:"bind",value:function(){}},{key:"resize",value:function(r){var n=r.width,t=r.height;(this.width!==n||this.height!==t)&&this.destroy(),this.options.width=n,this.options.height=t,this.createTexture(this.options),this.isDestroy=!1}},{key:"getSize",value:function(){return[this.width,this.height]}},{key:"destroy",value:function(){if(!this.isDestroy&&!this.texture.destroyed){var r;(r=this.texture)===null||r===void 0||r.destroy()}this.isDestroy=!0}}]),e}(),I5=function(){function e(i,r){(0,Je.Z)(this,e),this.device=i,this.options=r,this.createColorRenderTarget(),this.createDepthRenderTarget()}return(0,vt.Z)(e,[{key:"createColorRenderTarget",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.options,t=n.width,o=n.height,u=n.color;u&&(M5(u)?(r&&u.resize({width:t,height:o}),this.colorTexture=u.get(),this.colorRenderTarget=this.device.createRenderTargetFromTexture(this.colorTexture),this.width=u.width,this.height=u.height):t&&o&&(this.colorTexture=this.device.createTexture({format:Ta.U8_RGBA_RT,usage:Ym.RENDER_TARGET,width:t,height:o}),this.colorRenderTarget=this.device.createRenderTargetFromTexture(this.colorTexture),this.width=t,this.height=o))}},{key:"createDepthRenderTarget",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.options,t=n.width,o=n.height,u=n.depth;u&&(M5(u)?(r&&u.resize({width:t,height:o}),this.depthTexture=u.get(),this.depthRenderTarget=this.device.createRenderTargetFromTexture(this.depthTexture),this.width=u.width,this.height=u.height):t&&o&&(this.depthTexture=this.device.createTexture({format:Ta.D24_S8,usage:Ym.RENDER_TARGET,width:t,height:o}),this.depthRenderTarget=this.device.createRenderTargetFromTexture(this.depthTexture),this.width=t,this.height=o))}},{key:"get",value:function(){return this.colorRenderTarget}},{key:"destroy",value:function(){var r,n;(r=this.colorRenderTarget)===null||r===void 0||r.destroy(),(n=this.depthRenderTarget)===null||n===void 0||n.destroy()}},{key:"resize",value:function(r){var n=r.width,t=r.height;(this.width!==n||this.height!==t)&&(this.destroy(),this.colorTexture.destroyed=!0,this.depthTexture.destroyed=!0,this.options.width=n,this.options.height=t,this.createColorRenderTarget(!0),this.createDepthRenderTarget(!0))}}]),e}(),Vj=vi.isPlainObject,$j=vi.isTypedArray,Hj=function(){function e(i,r,n){var t=this;(0,Je.Z)(this,e),(0,St.Z)(this,"destroyed",!1),(0,St.Z)(this,"uniforms",{}),(0,St.Z)(this,"vertexBuffers",[]),this.device=i,this.options=r,this.service=n;var o=r.vs,u=r.fs,c=r.attributes,v=r.uniforms,E=r.count,G=r.elements,ie=r.diagnosticDerivativeUniformityEnabled;this.options=r;var xe=ie?"":this.service.viewportOrigin===cg.UPPER_LEFT?"diagnostic(off,derivative_uniformity);":"";this.program=n.renderCache.createProgram({vertex:{glsl:o},fragment:{glsl:u,postprocess:function(ar){return xe+ar}}}),v&&(this.uniforms=this.extractUniforms(v));var Fe=[],it=0;Object.keys(c).forEach(function(Dt){var ar=c[Dt],Mr=ar.get();t.vertexBuffers.push(Mr.get());var Zr=ar.attribute,mn=Zr.offset,zn=mn===void 0?0:mn,Rn=Zr.stride,kn=Rn===void 0?0:Rn,ui=Zr.size,Di=ui===void 0?1:ui,Aa=Zr.divisor,Pa=Aa===void 0?0:Aa,Lo=Zr.shaderLocation,ns=Lo===void 0?0:Lo;Fe.push({arrayStride:kn||Di*4,stepMode:u1.VERTEX,attributes:[{format:wj[Di],shaderLocation:ns,offset:zn,divisor:Pa}]}),it=Mr.size/Di}),E||(this.options.count=it),G&&(this.indexBuffer=G.get());var gt=n.renderCache.createInputLayout({vertexBufferDescriptors:Fe,indexBufferFormat:G?Ta.U32_R:null,program:this.program});this.inputLayout=gt,this.pipeline=this.createPipeline(r)}return(0,vt.Z)(e,[{key:"createPipeline",value:function(r,n){var t=r.primitive,o=t===void 0?Or.TRIANGLES:t,u=r.depth,c=r.cull,v=r.blend,E=r.stencil,G=this.initDepthDrawParams({depth:u}),ie=!!(G&&G.enable),xe=this.initCullDrawParams({cull:c}),Fe=!!(xe&&xe.enable),it=this.getBlendDrawParams({blend:v}),gt=!!(it&&it.enable),Dt=this.getStencilDrawParams({stencil:E}),ar=!!(Dt&&Dt.enable);return this.device.createRenderPipeline({inputLayout:this.inputLayout,program:this.program,topology:xj[o],colorAttachmentFormats:[Ta.U8_RGBA_RT],depthStencilAttachmentFormat:Ta.D24_S8,megaStateDescriptor:{attachmentsState:[n?{channelWriteMask:Zm.ALL,rgbBlendState:{blendMode:zm.ADD,blendSrcFactor:Gd.ONE,blendDstFactor:Gd.ZERO},alphaBlendState:{blendMode:zm.ADD,blendSrcFactor:Gd.ONE,blendDstFactor:Gd.ZERO}}:{channelWriteMask:ar&&Dt.opFront.zpass===sm.REPLACE?Zm.NONE:Zm.ALL,rgbBlendState:{blendMode:gt&&it.equation.rgb||zm.ADD,blendSrcFactor:gt&&it.func.srcRGB||Gd.SRC_ALPHA,blendDstFactor:gt&&it.func.dstRGB||Gd.ONE_MINUS_SRC_ALPHA},alphaBlendState:{blendMode:gt&&it.equation.alpha||zm.ADD,blendSrcFactor:gt&&it.func.srcAlpha||Gd.ONE,blendDstFactor:gt&&it.func.dstAlpha||Gd.ONE}}],blendConstant:gt?v2:void 0,depthWrite:ie,depthCompare:ie&&G.func||Rd.LESS,cullMode:Fe&&xe.face||gv.NONE,stencilWrite:ar,stencilFront:{compare:ar?Dt.func.cmp:Rd.ALWAYS,passOp:Dt.opFront.zpass,failOp:Dt.opFront.fail,depthFailOp:Dt.opFront.zfail,mask:Dt.opFront.mask},stencilBack:{compare:ar?Dt.func.cmp:Rd.ALWAYS,passOp:Dt.opBack.zpass,failOp:Dt.opBack.fail,depthFailOp:Dt.opBack.zfail,mask:Dt.opBack.mask}}})}},{key:"updateAttributesAndElements",value:function(){}},{key:"updateAttributes",value:function(){}},{key:"addUniforms",value:function(r){this.uniforms=(0,Me.Z)((0,Me.Z)({},this.uniforms),this.extractUniforms(r))}},{key:"draw",value:function(r,n){var t=this,o=(0,Me.Z)((0,Me.Z)({},this.options),r),u=o.count,c=u===void 0?0:u,v=o.instances,E=o.elements,G=o.uniforms,ie=G===void 0?{}:G,xe=o.uniformBuffers,Fe=o.textures;this.uniforms=(0,Me.Z)((0,Me.Z)({},this.uniforms),this.extractUniforms(ie));var it=this.service,gt=it.renderPass,Dt=it.currentFramebuffer,ar=it.width,Mr=it.height,Zr=it.renderCache;this.pipeline=this.createPipeline(o,n);var mn=this.service.device,zn=mn.swapChainHeight;if(mn.swapChainHeight=(Dt==null?void 0:Dt.height)||Mr,gt.setViewport(0,0,(Dt==null?void 0:Dt.width)||ar,(Dt==null?void 0:Dt.height)||Mr),mn.swapChainHeight=zn,gt.setPipeline(this.pipeline),gt.setStencilReference(1),gt.setVertexInput(this.inputLayout,this.vertexBuffers.map(function(kn){return{buffer:kn}}),E?{buffer:this.indexBuffer,offset:0}:null),xe&&(this.bindings=Zr.createBindings({pipeline:this.pipeline,uniformBufferBindings:xe.map(function(kn,ui){var Di=kn;return{binding:ui,buffer:Di.get(),size:Di.size}}),samplerBindings:Fe==null?void 0:Fe.map(function(kn){return{texture:kn.texture,sampler:kn.sampler}})})),this.bindings&&(gt.setBindings(this.bindings),Object.keys(this.uniforms).forEach(function(kn){var ui=t.uniforms[kn];ui instanceof P5?t.uniforms[kn]=ui.get():ui instanceof I5&&(t.uniforms[kn]=ui.get().texture)}),this.program.setUniformsLegacy(this.uniforms)),E){var Rn=E.count;Rn===0?gt.draw(c,v):gt.drawIndexed(Rn,v)}else gt.draw(c,v)}},{key:"destroy",value:function(){var r,n,t;this.program.destroy(),(r=this.vertexBuffers)===null||r===void 0||r.forEach(function(o){return o.destroy()}),(n=this.indexBuffer)===null||n===void 0||n.destroy(),(t=this.bindings)===null||t===void 0||t.destroy(),this.inputLayout.destroy(),this.pipeline.destroy(),this.destroyed=!0}},{key:"initDepthDrawParams",value:function(r){var n=r.depth;if(n)return{enable:n.enable===void 0?!0:!!n.enable,mask:n.mask===void 0?!0:!!n.mask,func:Sj[n.func||Or.LESS],range:n.range||[0,1]}}},{key:"getBlendDrawParams",value:function(r){var n=r.blend,t=n||{},o=t.enable,u=t.func,c=t.equation,v=t.color,E=v===void 0?[0,0,0,0]:v;return{enable:!!o,func:{srcRGB:O2[u&&u.srcRGB||Or.SRC_ALPHA],srcAlpha:O2[u&&u.srcAlpha||Or.SRC_ALPHA],dstRGB:O2[u&&u.dstRGB||Or.ONE_MINUS_SRC_ALPHA],dstAlpha:O2[u&&u.dstAlpha||Or.ONE_MINUS_SRC_ALPHA]},equation:{rgb:b5[c&&c.rgb||Or.FUNC_ADD],alpha:b5[c&&c.alpha||Or.FUNC_ADD]},color:E}}},{key:"getStencilDrawParams",value:function(r){var n=r.stencil,t=n||{},o=t.enable,u=t.mask,c=u===void 0?4294967295:u,v=t.func,E=v===void 0?{cmp:Or.ALWAYS,ref:0,mask:4294967295}:v,G=t.opFront,ie=G===void 0?{fail:Or.KEEP,zfail:Or.KEEP,zpass:Or.KEEP}:G,xe=t.opBack,Fe=xe===void 0?{fail:Or.KEEP,zfail:Or.KEEP,zpass:Or.KEEP}:xe;return{enable:!!o,mask:c,func:(0,Me.Z)((0,Me.Z)({},E),{},{cmp:Tj[E.cmp]}),opFront:{fail:d_[ie.fail],zfail:d_[ie.zfail],zpass:d_[ie.zpass],mask:E.mask},opBack:{fail:d_[Fe.fail],zfail:d_[Fe.zfail],zpass:d_[Fe.zpass],mask:E.mask}}}},{key:"initCullDrawParams",value:function(r){var n=r.cull;if(n){var t=n.enable,o=n.face,u=o===void 0?Or.BACK:o;return{enable:!!t,face:Cj[u]}}}},{key:"extractUniforms",value:function(r){var n=this,t={};return Object.keys(r).forEach(function(o){n.extractUniformsRecursively(o,r[o],t,"")}),t}},{key:"extractUniformsRecursively",value:function(r,n,t,o){var u=this;if(n===null||typeof n=="number"||typeof n=="boolean"||Array.isArray(n)&&typeof n[0]=="number"||$j(n)||n===""||"resize"in n){t["".concat(o&&o+".").concat(r)]=n;return}Vj(n)&&Object.keys(n).forEach(function(c){u.extractUniformsRecursively(c,n[c],t,"".concat(o&&o+".").concat(r))}),Array.isArray(n)&&n.forEach(function(c,v){Object.keys(c).forEach(function(E){u.extractUniformsRecursively(E,c[E],t,"".concat(o&&o+".").concat(r,"[").concat(v,"]"))})})}}]),e}();function Gj(e){return typeof WebGL2RenderingContext!="undefined"&&e instanceof WebGL2RenderingContext?!0:!!(e&&e._version===2)}var R5,O5,F2=vi.isUndefined,Wj=(R5=(0,bo.b2)(),R5(O5=function(){function e(){var i=this;(0,Je.Z)(this,e),(0,St.Z)(this,"uniformBuffers",[]),(0,St.Z)(this,"queryVerdorInfo",function(){return i.device.queryVendorInfo().platformString}),(0,St.Z)(this,"createModel",function(r){return new Hj(i.device,r,i)}),(0,St.Z)(this,"createAttribute",function(r){return new bj(i.device,r)}),(0,St.Z)(this,"createBuffer",function(r){return new Ij(i.device,r)}),(0,St.Z)(this,"createElements",function(r){return new jj(i.device,r)}),(0,St.Z)(this,"createTexture2D",function(r){return new P5(i.device,r)}),(0,St.Z)(this,"createFramebuffer",function(r){return new I5(i.device,r)}),(0,St.Z)(this,"useFramebuffer",function(r,n){i.currentFramebuffer=r,i.beginFrame(),n(),i.endFrame(),i.currentFramebuffer=null}),(0,St.Z)(this,"useFramebufferAsync",function(){var r=(0,Qi.Z)(Qr().mark(function n(t,o){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return i.currentFramebuffer=t,i.preRenderPass=i.renderPass,i.beginFrame(),c.next=5,o();case 5:i.endFrame(),i.currentFramebuffer=null,i.renderPass=i.preRenderPass;case 8:case"end":return c.stop()}},n)}));return function(n,t){return r.apply(this,arguments)}}()),(0,St.Z)(this,"clear",function(r){var n=r.color,t=r.depth,o=r.stencil,u=r.framebuffer,c=u===void 0?null:u;if(c)c.clearOptions={color:n,depth:t,stencil:o};else{var v=i.queryVerdorInfo();if(v==="WebGL1"){var E=i.getGLContext();F2(o)?F2(t)||(E.clearDepth(t),E.clear(E.DEPTH_BUFFER_BIT)):(E.clearStencil(o),E.clear(E.STENCIL_BUFFER_BIT))}else if(v==="WebGL2"){var G=i.getGLContext();F2(o)?F2(t)||G.clearBufferfv(G.DEPTH,0,[t]):G.clearBufferiv(G.STENCIL,0,[o])}}}),(0,St.Z)(this,"viewport",function(r){var n=r.width,t=r.height;i.swapChain.configureSwapChain(n,t),i.createMainColorDepthRT(n,t),i.width=n,i.height=t}),(0,St.Z)(this,"readPixels",function(r){var n=r.framebuffer,t=r.x,o=r.y,u=r.width,c=r.height,v=i.device.createReadback(),E=n.colorTexture,G=v.readTextureSync(E,t,i.viewportOrigin===cg.LOWER_LEFT?o:i.height-o,u,c,new Uint8Array(u*c*4));return v.destroy(),G}),(0,St.Z)(this,"readPixelsAsync",function(){var r=(0,Qi.Z)(Qr().mark(function n(t){var o,u,c,v,E,G,ie,xe,Fe,it;return Qr().wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return o=t.framebuffer,u=t.x,c=t.y,v=t.width,E=t.height,G=i.device.createReadback(),ie=o.colorTexture,Dt.next=5,G.readTexture(ie,u,i.viewportOrigin===cg.LOWER_LEFT?c:i.height-c,v,E,new Uint8Array(v*E*4));case 5:if(xe=Dt.sent,i.viewportOrigin!==cg.LOWER_LEFT)for(Fe=0;Fe1&&arguments[1]!==void 0?arguments[1]:{};return(0,Je.Z)(this,r),t=i.call(this),(0,St.Z)((0,Gr.Z)(t),"isEnable",!1),(0,St.Z)((0,Gr.Z)(t),"onDragStart",function(u){t.box.style.display="block",t.startEvent=t.endEvent=u,t.syncBoxBound(),t.emit("selectstart",t.getLngLatBox(),t.startEvent,t.endEvent)}),(0,St.Z)((0,Gr.Z)(t),"onDragging",function(u){t.endEvent=u,t.syncBoxBound(),t.emit("selecting",t.getLngLatBox(),t.startEvent,t.endEvent)}),(0,St.Z)((0,Gr.Z)(t),"onDragEnd",function(u){t.endEvent=u,t.box.style.display="none",t.emit("selectend",t.getLngLatBox(),t.startEvent,t.endEvent)}),t.scene=n,t.options=o,t}return(0,vt.Z)(r,[{key:"container",get:function(){return this.scene.getMapService().getMarkerContainer()}},{key:"enable",value:function(){if(!this.isEnable){var t=this.options.className;if(this.scene.setMapStatus({dragEnable:!1}),this.container.style.cursor="crosshair",!this.box){var o=aa("div",void 0,this.container);o.classList.add("l7-select-box"),t&&o.classList.add(t),o.style.display="none",this.box=o}this.scene.on("dragstart",this.onDragStart),this.scene.on("dragging",this.onDragging),this.scene.on("dragend",this.onDragEnd),this.isEnable=!0}}},{key:"disable",value:function(){this.isEnable&&(this.scene.setMapStatus({dragEnable:!0}),this.container.style.cursor="auto",this.scene.off("dragstart",this.onDragStart),this.scene.off("dragging",this.onDragging),this.scene.off("dragend",this.onDragEnd),this.isEnable=!1)}},{key:"syncBoxBound",value:function(){var t=this.startEvent,o=t.x,u=t.y,c=this.endEvent,v=c.x,E=c.y,G=Math.min(o,v),ie=Math.min(u,E),xe=Math.abs(o-v),Fe=Math.abs(u-E);this.box.style.top="".concat(ie,"px"),this.box.style.left="".concat(G,"px"),this.box.style.width="".concat(xe,"px"),this.box.style.height="".concat(Fe,"px")}},{key:"getLngLatBox",value:function(){var t=this.startEvent.lngLat,o=t.lng,u=t.lat,c=this.endEvent.lngLat,v=c.lng,E=c.lat;return su([[o,u],[v,E]])}}]),r}(cf.EventEmitter),qj=function(){function e(i){(0,Je.Z)(this,e);var r=i.id,n=i.map,t=i.canvas,o=i.renderer,u=o===void 0?"regl":o,c=Jm();this.container=c,n.setContainer(c,r,t),c.bind(vr.IRendererService).to(u==="regl"?Aj:Wj).inSingletonScope(),this.sceneService=c.get(vr.ISceneService),this.mapService=c.get(vr.IMapService),this.iconService=c.get(vr.IIconService),this.fontService=c.get(vr.IFontService),this.controlService=c.get(vr.IControlService),this.layerService=c.get(vr.ILayerService),this.debugService=c.get(vr.IDebugService),this.debugService.setEnable(i.debug),this.markerService=c.get(vr.IMarkerService),this.interactionService=c.get(vr.IInteractionService),this.popupService=c.get(vr.IPopupService),this.boxSelect=new Kj(this,{}),this.initComponent(r),this.sceneService.init(i),this.initControl()}return(0,vt.Z)(e,[{key:"map",get:function(){return this.mapService.map}},{key:"loaded",get:function(){return this.sceneService.loaded}},{key:"getServiceContainer",value:function(){return this.container}},{key:"getSize",value:function(){return this.mapService.getSize()}},{key:"getMinZoom",value:function(){return this.mapService.getMinZoom()}},{key:"getMaxZoom",value:function(){return this.mapService.getMaxZoom()}},{key:"getType",value:function(){return this.mapService.getType()}},{key:"getMapContainer",value:function(){return this.mapService.getMapContainer()}},{key:"getMapCanvasContainer",value:function(){return this.mapService.getMapCanvasContainer()}},{key:"getMapService",value:function(){return this.mapService}},{key:"getDebugService",value:function(){return this.debugService}},{key:"exportPng",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t){return Qr().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.sceneService.exportPng(t));case 1:case"end":return u.stop()}},n,this)}));function r(n){return i.apply(this,arguments)}return r}()},{key:"exportMap",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t){return Qr().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",this.sceneService.exportPng(t));case 1:case"end":return u.stop()}},n,this)}));function r(n){return i.apply(this,arguments)}return r}()},{key:"registerRenderService",value:function(r){var n=this;if(this.sceneService.loaded){var t=new r(this);t.init()}else this.on("loaded",function(){var o=new r(n);o.init()})}},{key:"setBgColor",value:function(r){this.mapService.setBgColor(r)}},{key:"addLayer",value:function(r){var n=this,t=av(this.container);if(r.setContainer(t,this.container),this.sceneService.addLayer(r),r.inited){var o=this.initMask(r);this.addMask(o,r.id)}else r.on("inited",function(){var u=n.initMask(r);n.addMask(u,r.id)})}},{key:"initMask",value:function(r){var n=r.getLayerConfig(),t=n.mask,o=n.maskfence,u=n.maskColor,c=u===void 0?"#000":u,v=n.maskOpacity,E=v===void 0?0:v;if(!(!t||!o)){var G=new Yx().source(o).shape("fill").style({color:c,opacity:E});return G}}},{key:"addMask",value:function(r,n){if(r){var t=this.getLayer(n);if(t){var o=av(this.container);r.setContainer(o,this.container),t.addMaskLayer(r),this.sceneService.addMask(r)}else console.warn("parent layer not find!")}}},{key:"getPickedLayer",value:function(){return this.layerService.pickedLayerId}},{key:"getLayers",value:function(){return this.layerService.getLayers()}},{key:"getLayer",value:function(r){return this.layerService.getLayer(r)}},{key:"getLayerByName",value:function(r){return this.layerService.getLayerByName(r)}},{key:"removeLayer",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t,o){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.layerService.remove(t,o);case 2:case"end":return c.stop()}},n,this)}));function r(n,t){return i.apply(this,arguments)}return r}()},{key:"removeAllLayer",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(){return Qr().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.layerService.removeAllLayers();case 2:case"end":return o.stop()}},n,this)}));function r(){return i.apply(this,arguments)}return r}()},{key:"render",value:function(){this.sceneService.render()}},{key:"setEnableRender",value:function(r){this.layerService.setEnableRender(r)}},{key:"addIconFont",value:function(r,n){this.fontService.addIconFont(r,n)}},{key:"addIconFonts",value:function(r){var n=this;r.forEach(function(t){var o=(0,wi.Z)(t,2),u=o[0],c=o[1];n.fontService.addIconFont(u,c)})}},{key:"addFontFace",value:function(r,n){var t=this;this.fontService.once("fontloaded",function(o){t.emit("fontloaded",o)}),this.fontService.addFontFace(r,n)}},{key:"addImage",value:function(){var i=(0,Qi.Z)(Qr().mark(function n(t,o){return Qr().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.iconService.addImage(t,o);case 2:case"end":return c.stop()}},n,this)}));function r(n,t){return i.apply(this,arguments)}return r}()},{key:"hasImage",value:function(r){return this.iconService.hasImage(r)}},{key:"removeImage",value:function(r){this.iconService.removeImage(r)}},{key:"addIconFontGlyphs",value:function(r,n){this.fontService.addIconGlyphs(n)}},{key:"addControl",value:function(r){this.controlService.addControl(r,this.container)}},{key:"removeControl",value:function(r){this.controlService.removeControl(r)}},{key:"getControlByName",value:function(r){return this.controlService.getControlByName(r)}},{key:"addMarker",value:function(r){this.markerService.addMarker(r)}},{key:"addMarkerLayer",value:function(r){this.markerService.addMarkerLayer(r)}},{key:"removeMarkerLayer",value:function(r){this.markerService.removeMarkerLayer(r)}},{key:"removeAllMarkers",value:function(){this.markerService.removeAllMarkers()}},{key:"removeAllMakers",value:function(){console.warn("removeAllMakers \u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 removeAllMarkers"),this.markerService.removeAllMarkers()}},{key:"addPopup",value:function(r){this.popupService.addPopup(r)}},{key:"removePopup",value:function(r){this.popupService.removePopup(r)}},{key:"on",value:function(r,n){if(Jw.includes(r)){var t;(t=this.boxSelect)===null||t===void 0||t.on(r,n)}else wv.includes(r)?this.sceneService.on(r,n):this.mapService.on(r,n)}},{key:"once",value:function(r,n){if(Jw.includes(r)){var t;(t=this.boxSelect)===null||t===void 0||t.once(r,n)}else wv.includes(r)?this.sceneService.once(r,n):this.mapService.once(r,n)}},{key:"emit",value:function(r,n){wv.indexOf(r)===-1?this.mapService.on(r,n):this.sceneService.emit(r,n)}},{key:"off",value:function(r,n){if(Jw.includes(r)){var t;(t=this.boxSelect)===null||t===void 0||t.off(r,n)}else wv.includes(r)?this.sceneService.off(r,n):this.mapService.off(r,n)}},{key:"getZoom",value:function(){return this.mapService.getZoom()}},{key:"getCenter",value:function(r){return this.mapService.getCenter(r)}},{key:"setCenter",value:function(r,n){return this.mapService.setCenter(r,n)}},{key:"getPitch",value:function(){return this.mapService.getPitch()}},{key:"setPitch",value:function(r){return this.mapService.setPitch(r)}},{key:"getRotation",value:function(){return this.mapService.getRotation()}},{key:"getBounds",value:function(){return this.mapService.getBounds()}},{key:"setRotation",value:function(r){this.mapService.setRotation(r)}},{key:"zoomIn",value:function(){this.mapService.zoomIn()}},{key:"zoomOut",value:function(){this.mapService.zoomOut()}},{key:"panTo",value:function(r){this.mapService.panTo(r)}},{key:"panBy",value:function(r,n){this.mapService.panBy(r,n)}},{key:"getContainer",value:function(){return this.mapService.getContainer()}},{key:"setZoom",value:function(r){this.mapService.setZoom(r)}},{key:"fitBounds",value:function(r,n){var t=this.sceneService.getSceneConfig(),o=t.fitBoundsOptions,u=t.animate;this.mapService.fitBounds(r,n||(0,Me.Z)((0,Me.Z)({},o),{},{animate:u}))}},{key:"setZoomAndCenter",value:function(r,n){this.mapService.setZoomAndCenter(r,n)}},{key:"setMapStyle",value:function(r){this.mapService.setMapStyle(r)}},{key:"setMapStatus",value:function(r){this.mapService.setMapStatus(r)}},{key:"pixelToLngLat",value:function(r){return this.mapService.pixelToLngLat(r)}},{key:"lngLatToPixel",value:function(r){return this.mapService.lngLatToPixel(r)}},{key:"containerToLngLat",value:function(r){return this.mapService.containerToLngLat(r)}},{key:"lngLatToContainer",value:function(r){return this.mapService.lngLatToContainer(r)}},{key:"destroy",value:function(){this.sceneService.destroy()}},{key:"registerPostProcessingPass",value:function(r,n){this.container.bind(vr.IPostProcessingPass).to(r).whenTargetNamed(n)}},{key:"enableShaderPick",value:function(){this.layerService.enableShaderPick()}},{key:"diasbleShaderPick",value:function(){this.layerService.disableShaderPick()}},{key:"enableBoxSelect",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.boxSelect.enable(),n&&this.boxSelect.once("selectend",function(){r.disableBoxSelect()})}},{key:"disableBoxSelect",value:function(){this.boxSelect.disable()}},{key:"getProtocol",value:function(r){return _i.REGISTERED_PROTOCOLS[r]}},{key:"startAnimate",value:function(){this.layerService.startAnimate()}},{key:"stopAnimate",value:function(){this.layerService.stopAnimate()}},{key:"getPointSizeRange",value:function(){return this.sceneService.getPointSizeRange()}},{key:"initComponent",value:function(r){this.controlService.init({container:ma(r)},this.container),this.markerService.init(this.container),this.popupService.init(this.container)}},{key:"initControl",value:function(){var r=this.sceneService.getSceneConfig(),n=r.logoVisible,t=r.logoPosition;n&&this.addControl(new PE({position:t}))}}],[{key:"addProtocol",value:function(r,n){_i.REGISTERED_PROTOCOLS[r]=n}},{key:"removeProtocol",value:function(r){delete _i.REGISTERED_PROTOCOLS[r]}}]),e}(),Qj="2.20.15"},7292:function(Ke,ye,_){"use strict";_.d(ye,{FM:function(){return eh},Co:function(){return Qc},br:function(){return sp},L6:function(){return O0},ot:function(){return t0},l_:function(){return E0},zP:function(){return no},yD:function(){return Cp},$2:function(){return La},Kh:function(){return cl},Ie:function(){return sn},OB:function(){return to},w3:function(){return A0},Jx:function(){return Ns},CB:function(){return Z0},ns:function(){return bc},dW:function(){return Ju},YY:function(){return Bl},jf:function(){return j0},Ly:function(){return b0}});var M=_(60965),V=_(77617),y=_(98621),d=_.n(y),$=function(Q,ae){return Q===void 0&&(Q=[]),ae===void 0&&(ae=[]),d()(Q,ae)},X=function(Q){return function(ae,ue){var $e=(0,V.useRef)(),Xt=(0,V.useRef)(0);(ue===void 0||!$(ue,$e.current))&&($e.current=ue,Xt.current+=1),Q(ae,[Xt.current])}},oe=X(V.useEffect),re=_(92310),le=_.n(re),ce=_(63364);function Ie(Q){return Q===null}var we=Ie,Ee=_(59657),qe=_(21314),Xe="[object Number]";function ft(Q){return typeof Q=="number"||(0,qe.Z)(Q)&&(0,Ee.Z)(Q)==Xe}var Ge=ft,lt=_(49336);function Ye(Q){"@babel/helpers - typeof";return Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ae){return typeof ae}:function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae},Ye(Q)}function It(Q,ae){var ue=typeof Symbol!="undefined"&&Q[Symbol.iterator]||Q["@@iterator"];if(!ue){if(Array.isArray(Q)||(ue=At(Q))||ae&&Q&&typeof Q.length=="number"){ue&&(Q=ue);var $e=0,Xt=function(){};return{s:Xt,n:function(){return $e>=Q.length?{done:!0}:{done:!1,value:Q[$e++]}},e:function(Un){throw Un},f:Xt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Sr=!0,Dr=!1,fn;return{s:function(){ue=ue.call(Q)},n:function(){var Un=ue.next();return Sr=Un.done,Un},e:function(Un){Dr=!0,fn=Un},f:function(){try{!Sr&&ue.return!=null&&ue.return()}finally{if(Dr)throw fn}}}}function At(Q,ae){if(Q){if(typeof Q=="string")return Ue(Q,ae);var ue=Object.prototype.toString.call(Q).slice(8,-1);if(ue==="Object"&&Q.constructor&&(ue=Q.constructor.name),ue==="Map"||ue==="Set")return Array.from(Q);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return Ue(Q,ae)}}function Ue(Q,ae){(ae==null||ae>Q.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ue0&&arguments[0]!==void 0?arguments[0]:{};return Object.entries(ae!=null?ae:{}).map(function(ue){var $e=Mn(ue,2),Xt=$e[0],Sr=$e[1],Dr=ca(Xt),fn=Sr;return typeof fn=="number"?fn="".concat(fn,"px"):typeof fn=="string"&&(fn=fn.replace("'","")),"".concat(Dr," :").concat(fn)}).join("; ")};function ko(Q,ae){return ju(Q)||El(Q,ae)||Js(Q,ae)||_o()}function _o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Js(Q,ae){if(Q){if(typeof Q=="string")return fo(Q,ae);var ue=Object.prototype.toString.call(Q).slice(8,-1);if(ue==="Object"&&Q.constructor&&(ue=Q.constructor.name),ue==="Map"||ue==="Set")return Array.from(Q);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return fo(Q,ae)}}function fo(Q,ae){(ae==null||ae>Q.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ue1&&arguments[1]!==void 0?arguments[1]:!1;return Object.entries(Q).sort(function(ue,$e){var Xt=ko(ue,1),Sr=Xt[0],Dr=ko($e,1),fn=Dr[0];return Sr.localeCompare(fn)}).map(function(ue){var $e=ko(ue,2),Xt=$e[0],Sr=$e[1],Dr=String(Sr);return ae&&(Dr=window.encodeURI(String(Sr))),"".concat(Xt,"=").concat(Dr)}).join("&")}function Es(Q,ae){return"".concat(Q,"?").concat(_l(ae,!0))}function yc(Q){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ae){return typeof ae}:function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae},yc(Q)}function Vl(){"use strict";Vl=function(){return ae};var Q,ae={},ue=Object.prototype,$e=ue.hasOwnProperty,Xt=Object.defineProperty||function(la,si,Fi){la[si]=Fi.value},Sr=typeof Symbol=="function"?Symbol:{},Dr=Sr.iterator||"@@iterator",fn=Sr.asyncIterator||"@@asyncIterator",Bn=Sr.toStringTag||"@@toStringTag";function Un(la,si,Fi){return Object.defineProperty(la,si,{value:Fi,enumerable:!0,configurable:!0,writable:!0}),la[si]}try{Un({},"")}catch(la){Un=function(Fi,So,os){return Fi[So]=os}}function ta(la,si,Fi,So){var os=si&&si.prototype instanceof nl?si:nl,jo=Object.create(os.prototype),uc=new Oh(So||[]);return Xt(jo,"_invoke",{value:rf(la,Fi,uc)}),jo}function Fo(la,si,Fi){try{return{type:"normal",arg:la.call(si,Fi)}}catch(So){return{type:"throw",arg:So}}}ae.wrap=ta;var qs="suspendedStart",ol="suspendedYield",Dl="executing",hu="completed",du={};function nl(){}function Zl(){}function sc(){}var Sf={};Un(Sf,Dr,function(){return this});var Wf=Object.getPrototypeOf,gf=Wf&&Wf(Wf(ed([])));gf&&gf!==ue&&$e.call(gf,Dr)&&(Sf=gf);var Wc=sc.prototype=nl.prototype=Object.create(Sf);function nh(la){["next","throw","return"].forEach(function(si){Un(la,si,function(Fi){return this._invoke(si,Fi)})})}function ch(la,si){function Fi(os,jo,uc,Xc){var zf=Fo(la[os],la,jo);if(zf.type!=="throw"){var ep=zf.arg,dd=ep.value;return dd&&yc(dd)=="object"&&$e.call(dd,"__await")?si.resolve(dd.__await).then(function(ip){Fi("next",ip,uc,Xc)},function(ip){Fi("throw",ip,uc,Xc)}):si.resolve(dd).then(function(ip){ep.value=ip,uc(ep)},function(ip){return Fi("throw",ip,uc,Xc)})}Xc(zf.arg)}var So;Xt(this,"_invoke",{value:function(jo,uc){function Xc(){return new si(function(zf,ep){Fi(jo,uc,zf,ep)})}return So=So?So.then(Xc,Xc):Xc()}})}function rf(la,si,Fi){var So=qs;return function(os,jo){if(So===Dl)throw new Error("Generator is already running");if(So===hu){if(os==="throw")throw jo;return{value:Q,done:!0}}for(Fi.method=os,Fi.arg=jo;;){var uc=Fi.delegate;if(uc){var Xc=wf(uc,Fi);if(Xc){if(Xc===du)continue;return Xc}}if(Fi.method==="next")Fi.sent=Fi._sent=Fi.arg;else if(Fi.method==="throw"){if(So===qs)throw So=hu,Fi.arg;Fi.dispatchException(Fi.arg)}else Fi.method==="return"&&Fi.abrupt("return",Fi.arg);So=Dl;var zf=Fo(la,si,Fi);if(zf.type==="normal"){if(So=Fi.done?hu:ol,zf.arg===du)continue;return{value:zf.arg,done:Fi.done}}zf.type==="throw"&&(So=hu,Fi.method="throw",Fi.arg=zf.arg)}}}function wf(la,si){var Fi=si.method,So=la.iterator[Fi];if(So===Q)return si.delegate=null,Fi==="throw"&&la.iterator.return&&(si.method="return",si.arg=Q,wf(la,si),si.method==="throw")||Fi!=="return"&&(si.method="throw",si.arg=new TypeError("The iterator does not provide a '"+Fi+"' method")),du;var os=Fo(So,la.iterator,si.arg);if(os.type==="throw")return si.method="throw",si.arg=os.arg,si.delegate=null,du;var jo=os.arg;return jo?jo.done?(si[la.resultName]=jo.value,si.next=la.nextLoc,si.method!=="return"&&(si.method="next",si.arg=Q),si.delegate=null,du):jo:(si.method="throw",si.arg=new TypeError("iterator result is not an object"),si.delegate=null,du)}function $h(la){var si={tryLoc:la[0]};1 in la&&(si.catchLoc=la[1]),2 in la&&(si.finallyLoc=la[2],si.afterLoc=la[3]),this.tryEntries.push(si)}function fh(la){var si=la.completion||{};si.type="normal",delete si.arg,la.completion=si}function Oh(la){this.tryEntries=[{tryLoc:"root"}],la.forEach($h,this),this.reset(!0)}function ed(la){if(la||la===""){var si=la[Dr];if(si)return si.call(la);if(typeof la.next=="function")return la;if(!isNaN(la.length)){var Fi=-1,So=function os(){for(;++Fi=0;--os){var jo=this.tryEntries[os],uc=jo.completion;if(jo.tryLoc==="root")return So("end");if(jo.tryLoc<=this.prev){var Xc=$e.call(jo,"catchLoc"),zf=$e.call(jo,"finallyLoc");if(Xc&&zf){if(this.prev=0;--So){var os=this.tryEntries[So];if(os.tryLoc<=this.prev&&$e.call(os,"finallyLoc")&&this.prev=0;--Fi){var So=this.tryEntries[Fi];if(So.finallyLoc===si)return this.complete(So.completion,So.afterLoc),fh(So),du}},catch:function(si){for(var Fi=this.tryEntries.length-1;Fi>=0;--Fi){var So=this.tryEntries[Fi];if(So.tryLoc===si){var os=So.completion;if(os.type==="throw"){var jo=os.arg;fh(So)}return jo}}throw new Error("illegal catch attempt")},delegateYield:function(si,Fi,So){return this.delegate={iterator:ed(si),resultName:Fi,nextLoc:So},this.method==="next"&&(this.arg=Q),du}},ae}function tc(Q,ae,ue,$e,Xt,Sr,Dr){try{var fn=Q[Sr](Dr),Bn=fn.value}catch(Un){ue(Un);return}fn.done?ae(Bn):Promise.resolve(Bn).then($e,Xt)}function Au(Q){return function(){var ae=this,ue=arguments;return new Promise(function($e,Xt){var Sr=Q.apply(ae,ue);function Dr(Bn){tc(Sr,$e,Xt,Dr,fn,"next",Bn)}function fn(Bn){tc(Sr,$e,Xt,Dr,fn,"throw",Bn)}Dr(void 0)})}}var On=function(){var Q=Au(Vl().mark(function ae(ue,$e){return Vl().wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:if(ue!=="Map"){Sr.next=2;break}return Sr.abrupt("return",new M.Map($e));case 2:if(ue!=="Gaode"){Sr.next=6;break}return Sr.abrupt("return",new M.GaodeMap($e));case 6:if(ue!=="GaodeV1"){Sr.next=10;break}return Sr.abrupt("return",new M.GaodeMapV1($e));case 10:if(ue!=="GaodeV2"){Sr.next=12;break}return Sr.abrupt("return",new M.GaodeMapV2($e));case 12:if(ue!=="Tencent"){Sr.next=14;break}return Sr.abrupt("return",Promise.resolve(Promise.resolve().then(_.bind(_,60965))).then(function(Dr){var fn=Dr.TencentMap;return new fn($e)}));case 14:if(ue!=="Baidu"){Sr.next=16;break}return Sr.abrupt("return",Promise.resolve(Promise.resolve().then(_.bind(_,60965))).then(function(Dr){var fn=Dr.BaiduMap;return new fn($e)}));case 16:return Sr.abrupt("return",Promise.resolve(Promise.resolve().then(_.bind(_,60965))).then(function(Dr){var fn=Dr.Mapbox;return new fn($e)}));case 17:case"end":return Sr.stop()}},ae)}));return function(ue,$e){return Q.apply(this,arguments)}}(),tn=function(Q,ae){return Q?Q.map(function(ue,$e){return Object.is(Q[$e],ae==null?void 0:ae[$e])?-1:$e}).filter(function(ue){return ue>=0}):ae?ae.map(function(ue,$e){return $e}):[]},Pi=function(Q,ae){var ue=(0,V.useRef)();(0,V.useEffect)(function(){var $e=tn(ue.current,ae),Xt=ue.current;return ue.current=ae,Q($e,Xt,ae)},ae)},ut=Pi,Wt=_(41806),wr={onLoaded:"loaded",onDestroy:"destroy",onResize:"resize",onMapMove:"mapmove",onMoveStart:"movestart",onMoveEnd:"moveend",onZoomChange:"zoomchange",onZoomStart:"zoomstart",onZoomEnd:"zoomend",onClick:"click",onDblclick:"dblclick",onContextMenu:"contextmenu",onMouseMove:"mousemove",onMouseWheel:"mousewheel",onMouseDown:"mousedown",onMouseOver:"mouseover",onMouseOut:"mouseout",onMouseUp:"mouseup",onDragStart:"dragstart",onDragging:"dragging",onDragEnd:"dragend"},bn=Object.keys(wr);function vn(Q){return xn(Q)||Bo(Q)||ya(Q)||Xi()}function Xi(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ya(Q,ae){if(Q){if(typeof Q=="string")return zr(Q,ae);var ue=Object.prototype.toString.call(Q).slice(8,-1);if(ue==="Object"&&Q.constructor&&(ue=Q.constructor.name),ue==="Map"||ue==="Set")return Array.from(Q);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return zr(Q,ae)}}function Bo(Q){if(typeof Symbol!="undefined"&&Q[Symbol.iterator]!=null||Q["@@iterator"]!=null)return Array.from(Q)}function xn(Q){if(Array.isArray(Q))return zr(Q)}function zr(Q,ae){(ae==null||ae>Q.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ue=0)&&Object.prototype.propertyIsEnumerable.call(Q,$e)&&(ue[$e]=Q[$e])}return ue}function Yi(Q,ae){if(Q==null)return{};var ue={},$e=Object.keys(Q),Xt,Sr;for(Sr=0;Sr<$e.length;Sr++)Xt=$e[Sr],!(ae.indexOf(Xt)>=0)&&(ue[Xt]=Q[Xt]);return ue}var ua=V.createContext(null),La=(0,V.memo)((0,V.forwardRef)(function(ae,ue){var $e=ae.id,Xt=ae.style,Sr=ae.className,Dr=ae.map,fn=ae.mapType,Bn=fn===void 0?"Gaode":fn,Un=ae.mapOptions,ta=Un===void 0?{}:Un,Fo=ae.onLayerManagerCreated,qs=ae.onSceneLoaded,ol=ae.children,Dl=ma(ae,lr),hu=(0,V.useRef)(),du=(0,V.useState)(null),nl=ti(du,2),Zl=nl[0],sc=nl[1],Sf=(0,V.useRef)({scene:null,layerManager:null}),Wf=Sf.current;(0,V.useEffect)(function(){var Wc,nh=!0,ch=(0,ce.Z)(Dr)?On(Bn,ta):typeof Dr=="function"?Dr():Dr;return Promise.resolve(ch).then(function(rf){if(nh){Wc=new M.Scene(Yr(Yr({},Dl),{},{id:hu.current,map:rf}));var wf=new pt({scene:Wc});Wf.scene=Wc,Wf.layerManager=wf,Wc.once("loaded",function(){qs&&qs(Wc),Fo&&Fo(wf),sc(Wc)})}}).catch(function(rf){console.error(rf)}),function(){nh=!1,Wc&&(Wf.scene=null,Wf.layerManager=null,Wc.destroy())}},[]),xt(Zl,ae),(0,V.useImperativeHandle)(ue,function(){return{getScene:function(){return Zl},getMap:function(){return Zl.map}}},[Zl]),(0,V.useEffect)(function(){Zl&&ta.style&&Zl.setMapStyle(ta.style)},[ta.style]),oe(function(){we(Zl)||(ta.center&&Ge(ta.zoom)?Zl.setZoomAndCenter(ta.zoom,ta.center):Ge(ta.zoom)?Zl.setZoom(ta.zoom):ta.center&&Zl.setCenter(ta.center))},[ta.zoom,ta.center]),(0,V.useEffect)(function(){Zl&&Ge(ta.pitch)&&Zl.setPitch(ta.pitch)},[ta.pitch]),(0,V.useEffect)(function(){Zl&&Ge(ta.rotation)&&Zl.setRotation(ta.rotation)},[ta.rotation]);var gf=(0,V.useMemo)(function(){return Yr({position:"relative"},Xt)},[Xt]);return V.createElement("div",{id:$e,ref:hu,style:gf,className:le()("larkmap",Sr)},Zl&&V.createElement(ua.Provider,{value:Wf},ol))})),aa=_(8142),ho=function(){var ae=(0,V.useContext)(ua);if(!ae)throw new Error("The useScene must be used in the LarkMap container");var ue=ae.scene;return ue},Po=function(ae,ue,$e){var Xt=ho(),Sr=(0,V.useRef)();(0,V.useEffect)(function(){var Dr=new M.Control($e);return Dr.onAdd=function(){return ae(Xt)},Dr.onRemove=function(){},Sr.current=Dr,Xt.addControl(Dr),function(){typeof ue=="function"&&ue(Xt),Sr.current=null,Xt.removeControl(Dr)}},[]),(0,aa.Z)(function(){var Dr;(Dr=Sr.current)===null||Dr===void 0||Dr.setOptions($e)},[$e])},Ms=function(){var ae=(0,V.useContext)(ua);if(!ae)throw new Error("The useLayerManager must be used in the LarkMap container");var ue=ae.layerManager;return ue};function Mu(Q,ae){return Vs(Q)||js(Q,ae)||Xs(Q,ae)||vs()}function vs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xs(Q,ae){if(Q){if(typeof Q=="string")return iu(Q,ae);var ue=Object.prototype.toString.call(Q).slice(8,-1);if(ue==="Object"&&Q.constructor&&(ue=Q.constructor.name),ue==="Map"||ue==="Set")return Array.from(Q);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return iu(Q,ae)}}function iu(Q,ae){(ae==null||ae>Q.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ue-1;)Xf.call(Q,Sr,1);return Q},bh=null,Nn=Array.prototype.splice,Pn=function(ae,ue){if(!isArrayLike(ae))return[];for(var $e=ae?ue.length:0,Xt=$e-1;$e--;){var Sr=void 0,Dr=ue[$e];($e===Xt||Dr!==Sr)&&(Sr=Dr,Nn.call(ae,Dr,1))}return ae},xi=null,qi=function(Q,ae,ue){if(!Zf(Q)&&!qu(Q))return Q;var $e=ue;return fl(Q,function(Xt,Sr){$e=ae($e,Xt,Sr)}),$e},Xa=qi,To=function(Q,ae){var ue=[];if(!isArrayLike(Q))return ue;for(var $e=-1,Xt=[],Sr=Q.length;++$eSr[fn])return 1;if(Xt[fn]0},Df=null,af=function(Q,ae){if(isArray(Q)){for(var ue,$e=-1/0,Xt=0;Xt$e&&(ue=Sr,$e=Dr)}return ue}},cd=function(Q,ae){if(isArray(Q)){for(var ue,$e=1/0,Xt=0;Xtfn&&ta>fn);)if(Bn.push(Un),fn-=ta,Dr=Dr.substr(Xt),!Dr)return Bn.join("");for(;Un=Dr.substr(0,1),ta=measureTextWidth(Un,ue),!(ta+Sr>fn);)if(Bn.push(Un),fn-=ta,Dr=Dr.substr(1),!Dr)return Bn.join("");return""+Bn.join("")+$e},J=function(){function Q(){this.map={}}return Q.prototype.has=function(ae){return this.map[ae]!==void 0},Q.prototype.get=function(ae,ue){var $e=this.map[ae];return $e===void 0?ue:$e},Q.prototype.set=function(ae,ue){this.map[ae]=ue},Q.prototype.clear=function(){this.map={}},Q.prototype.delete=function(ae){delete this.map[ae]},Q.prototype.size=function(){return Object.keys(this.map).length},Q}(),f=null;function O(Q,ae){return function(){for(var ue=[],$e=0;$e=0)&&Object.prototype.propertyIsEnumerable.call(Q,$e)&&(ue[$e]=Q[$e])}return ue}function pr(Q,ae){if(Q==null)return{};var ue={},$e=Object.keys(Q),Xt,Sr;for(Sr=0;Sr<$e.length;Sr++)Xt=$e[Sr],!(ae.indexOf(Xt)>=0)&&(ue[Xt]=Q[Xt]);return ue}var di=function(ae,ue){var $e=ue.onCreated,Xt=ue.source,Sr=oi(ue,hr),Dr=Ms(),fn=(0,V.useRef)(),Bn=(0,V.useRef)(Sr),Un=(0,V.useRef)(Xt);return fn.current||(fn.current=new ae(ue),$e&&fn.current.once("inited",function(){return $e(fn.current)}),Dr.addLayer(fn.current)),(0,aa.Z)(function(){if(fn.current){var ta=!(0,Se.Z)(Bn.current,Sr);ta&&(fn.current.update(Sr),Bn.current=Kt(Sr))}},[Sr]),(0,aa.Z)(function(){if(fn.current){var ta=Xt.data,Fo=oi(Xt,Fr),qs=Un.current,ol=qs.data,Dl=oi(qs,Br),hu=ta!==ol||!(0,Se.Z)(Fo,Dl);hu&&(fn.current.changeData(Xt),Un.current=Xr({},Xt))}},[Xt]),(0,V.useEffect)(function(){return function(){fn.current&&(Dr.removeLayer(fn.current),fn.current=null)}},[]),fn},Ji={onRemove:"remove",onShow:"show",onHide:"hide",onDataUpdate:"dataUpdate",onLegend:"legend",onLegendColor:"legend:color",onLegendSize:"legend:size",onClick:"click",onUnClick:"unclick",onDblClick:"dblclick",onUndblclick:"undblclick",onContextMenu:"contextmenu",onUnContextMenu:"uncontextmenu",onMouseEnter:"mouseenter",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseUp:"mouseup",onMouseDown:"mousedown",onUnMousemove:"unmousemove",onUnMouseup:"unmouseup",onUnMousedown:"unmousedown",onUnPick:"unpick"},ja=function(ae,ue){var $e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ji,Xt=(0,V.useMemo)(function(){return Object.keys($e)},[$e]),Sr=function(ta){Xt.forEach(function(Fo){var qs=$e[Fo],ol=ue[Fo];Fo&&ol&&ae[ta](qs,ol)})},Dr=function(){return Sr("on")},fn=function(){return Sr("off")},Bn=(0,V.useRef)(!0);Bn.current&&Dr(),(0,V.useEffect)(function(){return Bn.current?Bn.current=!1:Dr(),function(){fn()}},Xt.map(function(Un){return ue[Un]})),(0,Wt.Z)(function(){fn()})},no=(0,V.memo)((0,V.forwardRef)(function(ae,ue){var $e=di(he,ae);return ja($e.current,ae),(0,V.useImperativeHandle)(ue,function(){return $e.current}),null})),Ss=null,tu=function(Q){(0,Wa.ZT)(ae,Q);function ae(){var ue=Q.apply(this,(0,Wa.ev)([],(0,Wa.CR)(arguments),!1))||this;return ue.type="lineLayer",ue}return ae.prototype.createLayer=function(){var ue=this.getLayerConfig(),$e=new M.LineLayer(ue);return $e},ae}(Z),sn=(0,V.memo)((0,V.forwardRef)(function(ae,ue){var $e=di(tu,ae);return ja($e.current,ae),(0,V.useImperativeHandle)(ue,function(){return $e.current}),null})),bu=function(Q){(0,Wa.ZT)(ae,Q);function ae(){var ue=Q.apply(this,(0,Wa.ev)([],(0,Wa.CR)(arguments),!1))||this;return ue.type="pointLayer",ue}return ae.prototype.createLayer=function(){var ue=this.getLayerConfig(),$e=new M.PointLayer(ue);return $e},ae}(Z),bc=(0,V.memo)((0,V.forwardRef)(function(ae,ue){var $e=di(bu,ae);return ja($e.current,ae),(0,V.useImperativeHandle)(ue,function(){return $e.current}),null})),uu=function(Q){(0,Wa.ZT)(ae,Q);function ae(){var ue=Q.apply(this,(0,Wa.ev)([],(0,Wa.CR)(arguments),!1))||this;return ue.type="polygonLayer",ue}return ae.prototype.createLayer=function(){var ue=this.getLayerConfig(),$e=new M.PolygonLayer(ue);return $e},ae}(Z),Ju=(0,V.memo)((0,V.forwardRef)(function(ae,ue){var $e=di(uu,ae);return ja($e.current,ae),(0,V.useImperativeHandle)(ue,function(){return $e.current}),null})),Sc=function(Q){(0,Wa.ZT)(ae,Q);function ae(){var ue=Q.apply(this,(0,Wa.ev)([],(0,Wa.CR)(arguments),!1))||this;return ue.type="rasterLayer",ue}return ae.prototype.createLayer=function(){var ue=this.getLayerConfig(),$e=new M.RasterLayer(ue);return $e},ae}(Z),Bl=(0,V.memo)((0,V.forwardRef)(function(ae,ue){var $e=di(Sc,ae);return ja($e.current,ae),(0,V.useImperativeHandle)(ue,function(){return $e.current}),null})),Ol=null,oc;(function(Q){Q.BubbleLayer="bubbleLayer",Q.ChoroplethLayer="choroplethLayer",Q.IconImageLayer="iconImageLayer",Q.IconFontLayer="iconFontLayer",Q.FlowLayer="flowLayer"})(oc||(oc={}));var Ql=function(Q){(0,Wa.ZT)(ae,Q);function ae(ue,$e){ue===void 0&&(ue=[]),$e===void 0&&($e={});var Xt=Q.call(this)||this;Xt.layerMap=new Map,Xt.name=$e.name?$e.name:H("layerGroup");for(var Sr=0;SrQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ue=0)&&Object.prototype.propertyIsEnumerable.call(Q,$e)&&(ue[$e]=Q[$e])}return ue}function Ja(Q,ae){if(Q==null)return{};var ue={},$e=Object.keys(Q),Xt,Sr;for(Sr=0;Sr<$e.length;Sr++)Xt=$e[Sr],!(ae.indexOf(Xt)>=0)&&(ue[Xt]=Q[Xt]);return ue}var ga="SECRET_COMBOBOX_MODE_DO_NOT_USE",Yu="larkmap-select",tf=function(ae,ue){var $e=ae.prefixCls,Xt=ae.bordered,Sr=Xt===void 0?!0:Xt,Dr=ae.className,fn=ae.getPopupContainer,Bn=ae.dropdownClassName,Un=ae.popupClassName,ta=ae.listHeight,Fo=ta===void 0?256:ta,qs=ae.placement,ol=ae.listItemHeight,Dl=ol===void 0?24:ol,hu=ae.disabled,du=ae.notFoundContent,nl=fi(ae,Pl),Zl=V.useMemo(function(){var Wf=nl,gf=Wf.mode;if(gf!=="combobox")return gf===ga?"combobox":gf},[nl]),sc=(0,ef.Z)(nl,"suffixIcon","itemIcon"),Sf=le()(pf({},"".concat(Yu,"-borderless"),!Sr),Dr);return V.createElement(th.ZP,mu({ref:ue},sc,{listHeight:Fo,listItemHeight:Dl,mode:Zl,prefixCls:Yu,placement:qs,notFoundContent:du!=null?du:"\u5F53\u524D\u65E0\u6570\u636E",className:Sf,getPopupContainer:fn,dropdownClassName:Un,disabled:hu}))},bo=V.forwardRef(tf);bo.SECRET_COMBOBOX_MODE_DO_NOT_USE=ga,bo.Option=th.Wx,bo.OptGroup=th.Xo;var Nr=bo;function vr(Q){"@babel/helpers - typeof";return vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ae){return typeof ae}:function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae},vr(Q)}var hi=["searchParams","showDistrict","showAddress","onSearchFinish","onChange"],Ma=["keywords","privateKey"];function Ra(){return Ra=Object.assign?Object.assign.bind():function(Q){for(var ae=1;ae=0;--os){var jo=this.tryEntries[os],uc=jo.completion;if(jo.tryLoc==="root")return So("end");if(jo.tryLoc<=this.prev){var Xc=$e.call(jo,"catchLoc"),zf=$e.call(jo,"finallyLoc");if(Xc&&zf){if(this.prev=0;--So){var os=this.tryEntries[So];if(os.tryLoc<=this.prev&&$e.call(os,"finallyLoc")&&this.prev=0;--Fi){var So=this.tryEntries[Fi];if(So.finallyLoc===si)return this.complete(So.completion,So.afterLoc),fh(So),du}},catch:function(si){for(var Fi=this.tryEntries.length-1;Fi>=0;--Fi){var So=this.tryEntries[Fi];if(So.tryLoc===si){var os=So.completion;if(os.type==="throw"){var jo=os.arg;fh(So)}return jo}}throw new Error("illegal catch attempt")},delegateYield:function(si,Fi,So){return this.delegate={iterator:ed(si),resultName:Fi,nextLoc:So},this.method==="next"&&(this.arg=Q),du}},ae}function ea(Q){return D(Q)||Qn(Q)||Er(Q)||Vi()}function Vi(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qn(Q){if(typeof Symbol!="undefined"&&Q[Symbol.iterator]!=null||Q["@@iterator"]!=null)return Array.from(Q)}function D(Q){if(Array.isArray(Q))return An(Q)}function I(Q,ae){var ue=Object.keys(Q);if(Object.getOwnPropertySymbols){var $e=Object.getOwnPropertySymbols(Q);ae&&($e=$e.filter(function(Xt){return Object.getOwnPropertyDescriptor(Q,Xt).enumerable})),ue.push.apply(ue,$e)}return ue}function B(Q){for(var ae=1;aeQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ue=0)&&Object.prototype.propertyIsEnumerable.call(Q,$e)&&(ue[$e]=Q[$e])}return ue}function va(Q,ae){if(Q==null)return{};var ue={},$e=Object.keys(Q),Xt,Sr;for(Sr=0;Sr<$e.length;Sr++)Xt=$e[Sr],!(ae.indexOf(Xt)>=0)&&(ue[Xt]=Q[Xt]);return ue}var es=Nr.Option,Io=function(ae){var ue=ae.searchParams,$e=ae.showDistrict,Xt=ae.showAddress,Sr=ae.onSearchFinish,Dr=ae.onChange,fn=Ei(ae,hi),Bn=(0,V.useState)([]),Un=Bt(Bn,2),ta=Un[0],Fo=Un[1];(0,V.useEffect)(function(){Sr==null||Sr(ta)},[Sr,ta]);var qs=(0,md.Z)(function(){var hu=Ve(Ni().mark(function du(nl){var Zl,sc,Sf,Wf,gf,Wc,nh;return Ni().wrap(function(rf){for(;;)switch(rf.prev=rf.next){case 0:if(nl){rf.next=3;break}return Fo([]),rf.abrupt("return");case 3:return sc=ue.keywords,Sf=ue.privateKey,Wf=Ei(ue,Ma),gf=B(B({},Wf),{},{keywords:[].concat(ea((sc!=null?sc:"").split("|")),[nl]).filter(function(wf){return!!wf}).join("|")}),Sf&&(gf.sig=id()(_l(gf,!1)+Sf)),Wc="".concat($d,"?").concat(_l(gf,!0)),rf.next=9,fetch(Wc);case 9:return rf.next=11,rf.sent.json();case 11:nh=rf.sent,Fo(((Zl=nh==null?void 0:nh.tips)!==null&&Zl!==void 0?Zl:[]).filter(function(wf){return wf.location&&wf.location.length}).map(function(wf){var $h=wf.location.split(","),fh=Bt($h,2),Oh=fh[0],ed=fh[1];return wf.longitude=+Oh,wf.latitude=+ed,wf}));case 13:case"end":return rf.stop()}},du)}));return function(du){return hu.apply(this,arguments)}}(),{wait:1e3}),ol=qs.run,Dl=(0,V.useCallback)(function(hu){var du=hu&&ta.find(function(nl){return nl.name===hu});Dr==null||Dr(hu||void 0,du||void 0)},[Dr,ta]);return V.createElement(Nr,Ra({className:"".concat(df),onSearch:ol,onChange:Dl,clearIcon:function(){return null}},fn),ta.map(function(hu){var du="".concat($e?hu.district:"").concat(Xt?hu.address:"");return V.createElement(es,{key:hu.id,value:hu.name},V.createElement("div",{title:hu.name,className:"".concat(df,"__option-name")},hu.name),du&&V.createElement("div",{title:du,className:"".concat(df,"__option-tip")},du))}))};Io.defaultProps={placeholder:"\u8BF7\u8F93\u5165\u8981\u641C\u7D22\u5730\u540D",showSearch:!0,allowClear:!0,filterOption:!1,defaultActiveFirstOption:!1,showAddress:!0,showDistrict:!0};function io(Q){"@babel/helpers - typeof";return io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ae){return typeof ae}:function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae},io(Q)}function ao(){"use strict";ao=function(){return ae};var Q,ae={},ue=Object.prototype,$e=ue.hasOwnProperty,Xt=Object.defineProperty||function(la,si,Fi){la[si]=Fi.value},Sr=typeof Symbol=="function"?Symbol:{},Dr=Sr.iterator||"@@iterator",fn=Sr.asyncIterator||"@@asyncIterator",Bn=Sr.toStringTag||"@@toStringTag";function Un(la,si,Fi){return Object.defineProperty(la,si,{value:Fi,enumerable:!0,configurable:!0,writable:!0}),la[si]}try{Un({},"")}catch(la){Un=function(Fi,So,os){return Fi[So]=os}}function ta(la,si,Fi,So){var os=si&&si.prototype instanceof nl?si:nl,jo=Object.create(os.prototype),uc=new Oh(So||[]);return Xt(jo,"_invoke",{value:rf(la,Fi,uc)}),jo}function Fo(la,si,Fi){try{return{type:"normal",arg:la.call(si,Fi)}}catch(So){return{type:"throw",arg:So}}}ae.wrap=ta;var qs="suspendedStart",ol="suspendedYield",Dl="executing",hu="completed",du={};function nl(){}function Zl(){}function sc(){}var Sf={};Un(Sf,Dr,function(){return this});var Wf=Object.getPrototypeOf,gf=Wf&&Wf(Wf(ed([])));gf&&gf!==ue&&$e.call(gf,Dr)&&(Sf=gf);var Wc=sc.prototype=nl.prototype=Object.create(Sf);function nh(la){["next","throw","return"].forEach(function(si){Un(la,si,function(Fi){return this._invoke(si,Fi)})})}function ch(la,si){function Fi(os,jo,uc,Xc){var zf=Fo(la[os],la,jo);if(zf.type!=="throw"){var ep=zf.arg,dd=ep.value;return dd&&io(dd)=="object"&&$e.call(dd,"__await")?si.resolve(dd.__await).then(function(ip){Fi("next",ip,uc,Xc)},function(ip){Fi("throw",ip,uc,Xc)}):si.resolve(dd).then(function(ip){ep.value=ip,uc(ep)},function(ip){return Fi("throw",ip,uc,Xc)})}Xc(zf.arg)}var So;Xt(this,"_invoke",{value:function(jo,uc){function Xc(){return new si(function(zf,ep){Fi(jo,uc,zf,ep)})}return So=So?So.then(Xc,Xc):Xc()}})}function rf(la,si,Fi){var So=qs;return function(os,jo){if(So===Dl)throw new Error("Generator is already running");if(So===hu){if(os==="throw")throw jo;return{value:Q,done:!0}}for(Fi.method=os,Fi.arg=jo;;){var uc=Fi.delegate;if(uc){var Xc=wf(uc,Fi);if(Xc){if(Xc===du)continue;return Xc}}if(Fi.method==="next")Fi.sent=Fi._sent=Fi.arg;else if(Fi.method==="throw"){if(So===qs)throw So=hu,Fi.arg;Fi.dispatchException(Fi.arg)}else Fi.method==="return"&&Fi.abrupt("return",Fi.arg);So=Dl;var zf=Fo(la,si,Fi);if(zf.type==="normal"){if(So=Fi.done?hu:ol,zf.arg===du)continue;return{value:zf.arg,done:Fi.done}}zf.type==="throw"&&(So=hu,Fi.method="throw",Fi.arg=zf.arg)}}}function wf(la,si){var Fi=si.method,So=la.iterator[Fi];if(So===Q)return si.delegate=null,Fi==="throw"&&la.iterator.return&&(si.method="return",si.arg=Q,wf(la,si),si.method==="throw")||Fi!=="return"&&(si.method="throw",si.arg=new TypeError("The iterator does not provide a '"+Fi+"' method")),du;var os=Fo(So,la.iterator,si.arg);if(os.type==="throw")return si.method="throw",si.arg=os.arg,si.delegate=null,du;var jo=os.arg;return jo?jo.done?(si[la.resultName]=jo.value,si.next=la.nextLoc,si.method!=="return"&&(si.method="next",si.arg=Q),si.delegate=null,du):jo:(si.method="throw",si.arg=new TypeError("iterator result is not an object"),si.delegate=null,du)}function $h(la){var si={tryLoc:la[0]};1 in la&&(si.catchLoc=la[1]),2 in la&&(si.finallyLoc=la[2],si.afterLoc=la[3]),this.tryEntries.push(si)}function fh(la){var si=la.completion||{};si.type="normal",delete si.arg,la.completion=si}function Oh(la){this.tryEntries=[{tryLoc:"root"}],la.forEach($h,this),this.reset(!0)}function ed(la){if(la||la===""){var si=la[Dr];if(si)return si.call(la);if(typeof la.next=="function")return la;if(!isNaN(la.length)){var Fi=-1,So=function os(){for(;++Fi=0;--os){var jo=this.tryEntries[os],uc=jo.completion;if(jo.tryLoc==="root")return So("end");if(jo.tryLoc<=this.prev){var Xc=$e.call(jo,"catchLoc"),zf=$e.call(jo,"finallyLoc");if(Xc&&zf){if(this.prev=0;--So){var os=this.tryEntries[So];if(os.tryLoc<=this.prev&&$e.call(os,"finallyLoc")&&this.prev=0;--Fi){var So=this.tryEntries[Fi];if(So.finallyLoc===si)return this.complete(So.completion,So.afterLoc),fh(So),du}},catch:function(si){for(var Fi=this.tryEntries.length-1;Fi>=0;--Fi){var So=this.tryEntries[Fi];if(So.tryLoc===si){var os=So.completion;if(os.type==="throw"){var jo=os.arg;fh(So)}return jo}}throw new Error("illegal catch attempt")},delegateYield:function(si,Fi,So){return this.delegate={iterator:ed(si),resultName:Fi,nextLoc:So},this.method==="next"&&(this.arg=Q),du}},ae}function Va(Q){return Ru(Q)||Ll(Q)||Wh(Q)||zl()}function zl(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ll(Q){if(typeof Symbol!="undefined"&&Q[Symbol.iterator]!=null||Q["@@iterator"]!=null)return Array.from(Q)}function Ru(Q){if(Array.isArray(Q))return Nf(Q)}function xl(Q,ae){var ue=Object.keys(Q);if(Object.getOwnPropertySymbols){var $e=Object.getOwnPropertySymbols(Q);ae&&($e=$e.filter(function(Xt){return Object.getOwnPropertyDescriptor(Q,Xt).enumerable})),ue.push.apply(ue,$e)}return ue}function Th(Q){for(var ae=1;aeQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ue2&&arguments[2]!==void 0?arguments[2]:5,Xt=[ae],Sr=l()(ae).object(),Dr=l()(ue).object();if($e<2)return $e<1?[]:Xt;var fn={r:(Sr.r-Dr.r)/($e-1),g:(Sr.g-Dr.g)/($e-1),b:(Sr.b-Dr.b)/($e-1)};return Hr(new Array($e-2),function(Bn,Un){return Xt.push(l()({r:mh(Sr.r-fn.r*(Un+1),0),g:mh(Sr.g-fn.g*(Un+1),0),b:mh(Sr.b-fn.b*(Un+1),0)}).hex())}),Xt.push(ue),Xt};function xf(Q){"@babel/helpers - typeof";return xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ae){return typeof ae}:function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae},xf(Q)}function pc(Q,ae,ue){return ae=sf(ae),ae in Q?Object.defineProperty(Q,ae,{value:ue,enumerable:!0,configurable:!0,writable:!0}):Q[ae]=ue,Q}function sf(Q){var ae=Kl(Q,"string");return xf(ae)==="symbol"?ae:String(ae)}function Kl(Q,ae){if(xf(Q)!=="object"||Q===null)return Q;var ue=Q[Symbol.toPrimitive];if(ue!==void 0){var $e=ue.call(Q,ae||"default");if(xf($e)!=="object")return $e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ae==="string"?String:Number)(Q)}var Hc="larkmap-legend-category";function Vh(Q){var ae=Q.labels,ue=Q.colors,$e=Q.geometryType,Xt=$e===void 0?"circle":$e,Sr=Q.isStrokeColor,Dr=Q.style,fn=Q.className;function Bn(Fo){return Sr?{border:"2px solid ".concat(Fo)}:{background:Fo}}function Un(Fo){return V.createElement("div",{className:le()(Hc,fn),style:Dr},ae.map(function(qs,ol){return V.createElement("div",{className:"".concat(Hc,"__content"),key:qs},V.createElement("div",{className:le()("".concat(Hc,"__content__shape"),pc({},"".concat(Hc,"__content__").concat(Xt),Xt)),style:Bn(Fo[ol])}),V.createElement("div",{className:"".concat(Hc,"labels")},qs))}))}function ta(){if(Array.isArray(ue))return Un(ue);var Fo=rh(ue.startColor,ue.endColor,ae.length);return Un(Fo)}return V.createElement(ta,null)}Vh.defaultProps={geometryType:"circle",isStrokeColor:!1};var Ad=_(76374);function Oo(Q){var ae=(0,V.useRef)(0),ue=(0,Wa.CR)((0,V.useState)(Q),2),$e=ue[0],Xt=ue[1],Sr=(0,V.useCallback)(function(Dr){cancelAnimationFrame(ae.current),ae.current=requestAnimationFrame(function(){Xt(Dr)})},[]);return(0,Wt.Z)(function(){cancelAnimationFrame(ae.current)}),[$e,Sr]}var Pc=Oo,Nc=_(7428),mc=!!(typeof window!="undefined"&&window.document&&window.document.createElement),sh=mc;function A(Q,ae){if(sh){if(!Q)return ae;var ue;return(0,Nc.mf)(Q)?ue=Q():"current"in Q?ue=Q.current:ue=Q,ue}}function p(Q,ae){if(Q===ae)return!0;for(var ue=0;ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueQ.length)&&(ae=Q.length);for(var ue=0,$e=new Array(ae);ueL.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e { return state.dataSource.find((item) => item.value === state.value)?.type })}}',domain:'{{ $form.getFieldState("fillColorField",state=> { return state.dataSource.find((item) => item.value === state.value)?.domain })}}',defaultColors:'{{ $form.getFieldState("fillColorRange",state=> { return state?.value?.colors })}}'},"x-decorator-props":{},"x-reactions":[{dependencies:["fillColorField"],fulfill:{state:{visible:"{{ $deps[0] !== undefined }}"}}}]},fillColor:{type:"string",title:"\u989C\u8272",default:"#F7664E","x-decorator":"FormItem","x-component":"ColorPicker","x-component-props":{placeholder:"\u989C\u8272"},"x-decorator-props":{},"x-reactions":[{dependencies:["fillColorField"],fulfill:{state:{visible:"{{ $deps[0] === undefined }}"}}}]},fillColorRange:{type:"object",title:"\u989C\u8272",default:{colors:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],isReversed:!1},"x-decorator":"FormItem","x-component":"ColorRangeSelector","x-component-props":{options:Ie(ir)},"x-decorator-props":{},"x-reactions":[{dependencies:["fillColorField","fillColorScale"],fulfill:{state:{visible:"{{ $deps[0] !== undefined && !$deps[1].isCustom }}"}}}]},fillColorOpacity:{type:"number",title:"\u900F\u660E\u5EA6",default:1,"x-decorator-props":{},"x-decorator":"FormItem","x-component":"Slider","x-component-props":{min:0,max:1,step:.1}}}}}}};function lt(L){return Ue(L)||At(L)||It(L)||Ye()}function Ye(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function It(L,N){if(L){if(typeof L=="string")return rt(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return rt(L,N)}}function At(L){if(typeof Symbol!="undefined"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}function Ue(L){if(Array.isArray(L))return rt(L)}function rt(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e0&&arguments[0]!==void 0?arguments[0]:{},N=L.collapseTitle,_e=N===void 0?"\u5176\u5B83\u5C5E\u6027":N;return{type:"void","x-component":"FormCollapse","x-component-props":{ghost:!0,destroyInactivePanel:!0,defaultActiveKey:[]},properties:{stackingPatterns:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:_e},properties:{zoom:{type:"number",title:"\u53EF\u89C1\u5C42\u7EA7","x-decorator":"FormItem","x-component":"SliderRange","x-component-props":{dots:!1,range:!0,min:0,max:24},default:[0,24],"x-decorator-props":{}},blend:{type:"string",title:"\u6DF7\u5408\u6548\u679C","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:"\u8BF7\u9009\u62E9"},"x-decorator-props":{},default:"normal",enum:[{label:"\u6B63\u5E38",value:"normal"},{label:"\u53E0\u52A0\u6A21\u5F0F",value:"additive"},{label:"\u76F8\u51CF\u6A21\u5F0F",value:"subtractive"},{label:"\u6700\u5927\u503C",value:"max"},{label:"\u6700\u5C0F\u503C",value:"min"}]}}}}}};function st(L){return Mt(L)||mt(L)||at(L)||Et()}function Et(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function at(L,N){if(L){if(typeof L=="string")return Me(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return Me(L,N)}}function mt(L){if(typeof Symbol!="undefined"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}function Mt(L){if(Array.isArray(L))return Me(L)}function Me(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e0&&arguments[0]!==void 0?arguments[0]:{};return{type:"object",properties:{collapseItem_fillColor:Ge(L),collapseItem_stroke:Rt(),collapseItem_fillradius:Ht(L),collapseItem_labelstyle:Ze(L),collapseItem_other:Ct(L)}}};function Je(L){return br(L)||et(L)||pt(L)||Ce()}function Ce(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pt(L,N){if(L){if(typeof L=="string")return Jt(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return Jt(L,N)}}function et(L){if(typeof Symbol!="undefined"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}function br(L){if(Array.isArray(L))return Jt(L)}function Jt(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e0&&arguments[0]!==void 0?arguments[0]:{};return{type:"object",properties:{collapseItem_fillColor:Ge(L),collapseItem_stroke:Rt(),collapseItem_labelstyle:Ze(L),collapseItem_other:Ct(L)}}};function da(L){return bt(L)||Ir(L)||uo(L)||pa()}function pa(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uo(L,N){if(L){if(typeof L=="string")return Yt(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return Yt(L,N)}}function Ir(L){if(typeof Symbol!="undefined"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}function bt(L){if(Array.isArray(L))return Yt(L)}function Yt(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_eL.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e0&&arguments[0]!==void 0?arguments[0]:{},N=L.fieldList,_e=N===void 0?[]:N,Ne=L.colorRanges,ir=Ne===void 0?[]:Ne;return{type:"object",properties:{collapseItem_fillColor:{type:"void","x-component":"FormCollapse","x-component-props":{ghost:!0,destroyInactivePanel:!0,defaultActiveKey:[]},properties:{fillColor:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:"\u989C\u8272"},properties:{fillColorField:{type:"string",title:"\u586B\u5145\u5B57\u6BB5","x-decorator":"FormItem","x-component":"FieldSelect","x-decorator-props":{tooltip:"\u9009\u4E2D\u4E00\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C\u4E3A\u989C\u8272\u586B\u5145\u5B57\u6BB5"},"x-component-props":{allowClear:!0,placeholder:"\u8BF7\u9009\u62E9\u5B57\u6BB5"},enum:Ii(_e)},fillColorScale:{type:"string",title:"\u989C\u8272\u5212\u5206","x-decorator":"FormItem","x-component":"ScaleSelector","x-component-props":{placeholder:"\u8BF7\u9009\u62E9",dataType:'{{ $form.getFieldState("fillColorField",state=> { return state.dataSource.find((item) => item.value === state.value)?.type })}}',domain:'{{ $form.getFieldState("fillColorField",state=> { return state.dataSource.find((item) => item.value === state.value)?.domain })}}',defaultColors:'{{ $form.getFieldState("fillColorRange",state=> { return state?.value?.colors })}}'},"x-decorator-props":{},"x-reactions":[{dependencies:["fillColorField"],fulfill:{state:{visible:"{{ $deps[0] !== undefined }}"}}}]},sourceColor:{title:"\u8D77\u70B9\u989C\u8272",type:"string",default:"#F7664E","x-decorator":"FormItem","x-component":"ColorPicker","x-component-props":{placeholder:"\u989C\u8272"},"x-decorator-props":{},"x-reactions":[{dependencies:["fillColorField"],fulfill:{state:{visible:"{{ $deps[0] === undefined }}"}}}]},targetColor:{type:"string",title:"\u7EC8\u70B9\u989C\u8272",default:"#5B8FF9","x-decorator":"FormItem","x-component":"ColorPicker","x-reactions":[{dependencies:["fillColorField"],fulfill:{state:{visible:"{{ $deps[0] === undefined }}"}}}]},fillColorRange:{type:"object",title:"\u989C\u8272",default:{colors:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],isReversed:!1},"x-decorator":"FormItem","x-component":"ColorRangeSelector","x-component-props":{options:Ii(ir)},"x-decorator-props":{},"x-reactions":[{dependencies:["fillColorField","fillColorScale"],fulfill:{state:{visible:"{{ $deps[0] !== undefined && !$deps[1].isCustom }}"}}}]},fillColorOpacity:{type:"number",title:"\u900F\u660E\u5EA6",default:1,"x-decorator-props":{},"x-decorator":"FormItem","x-component":"Slider","x-component-props":{min:0,max:1,step:.1}}}}}},collapseItem_fillSize:{type:"void","x-component":"FormCollapse","x-component-props":{ghost:!0,destroyInactivePanel:!0,defaultActiveKey:[]},properties:{fillSize:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:"\u7EBF\u5BBD"},properties:{sizeField:{type:"string",title:"\u57FA\u4E8E\u5B57\u6BB5","x-decorator":"FormItem","x-component":"FieldSelect","x-decorator-props":{tooltip:"\u9009\u4E2D\u4E00\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C\u4E3A\u586B\u5145\u5927\u5C0F"},"x-component-props":{allowClear:!0,placeholder:"\u8BF7\u9009\u62E9\u5B57\u6BB5"},enum:Ii(_e)},size:{type:"number",title:"\u5BBD\u5EA6","x-decorator":"FormItem","x-component":"Slider","x-component-props":{dots:!1,range:!1},"x-decorator-props":{},"x-reactions":[{dependencies:["sizeField"],fulfill:{state:{visible:"{{ $deps[0] === undefined }}"}}}]},sizeRange:{type:"number",title:"\u5BBD\u5EA6","x-decorator":"FormItem","x-component":"SliderRange","x-component-props":{dots:!1,range:!0},default:[0,20],"x-decorator-props":{},"x-reactions":[{dependencies:["sizeField"],fulfill:{state:{visible:"{{ $deps[0] !== undefined }}"}}}]}}}}},collapseItem_animate:ai(),collapseItem_other:Ct(L)}}},Os=_(52853);function ro(L){return ss(L)||qa(L)||Do(L)||Tu()}function Tu(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Do(L,N){if(L){if(typeof L=="string")return ca(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return ca(L,N)}}function qa(L){if(typeof Symbol!="undefined"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}function ss(L){if(Array.isArray(L))return ca(L)}function ca(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_eL.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_eL.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e0&&arguments[0]!==void 0?arguments[0]:{},N=L.fieldList,_e=N===void 0?[]:N,Ne=L.colorRanges,ir=Ne===void 0?[]:Ne;return{type:"object",properties:{color:{type:"void","x-component":"FormCollapse","x-component-props":{ghost:!0,destroyInactivePanel:!0,defaultActiveKey:[]},properties:{color:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:"\u70ED\u529B\u989C\u8272"},properties:{colorsRange:{type:"string",title:"\u989C\u8272",default:{colors:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"].reverse(),isReversed:!0},"x-decorator":"FormItem","x-component":"ColorRangeSelector","x-decorator-props":{},"x-component-props":{options:ho(ir)}},opacity:{type:"number",title:"\u900F\u660E\u5EA6",default:1,"x-decorator-props":{},"x-decorator":"FormItem","x-component":"Slider","x-component-props":{max:1,step:.1}}}}}},collapseItem_fillSize:{type:"void","x-component":"FormCollapse","x-component-props":{ghost:!0,destroyInactivePanel:!0,defaultActiveKey:[]},properties:{fillsize:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:"\u70ED\u529B\u534A\u5F84"},properties:{radius:{type:"number",title:"\u70ED\u529B\u534A\u5F84",default:20,"x-decorator-props":{},"x-decorator":"FormItem","x-component":"Slider","x-component-props":{max:30,min:0,step:1}},sizeField:{type:"string",title:"\u6743\u91CD\u5B57\u6BB5","x-decorator":"FormItem","x-component":"FieldSelect","x-decorator-props":{tooltip:"\u9009\u4E2D\u4E00\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C\u4E3A\u70ED\u529B\u8BA1\u7B97"},"x-component-props":{allowClear:!0,placeholder:"\u8BF7\u9009\u62E9\u5B57\u6BB5"},enum:ho(_e)},intensity:{type:"number",title:"\u70ED\u529B\u5F3A\u5EA6",default:1,"x-decorator":"FormItem","x-component":"Slider","x-component-props":{dots:!1,range:!1,min:1,max:5},"x-decorator-props":{}}}}}},collapseItem_other:Ct(L)}}};function js(L){return ul(L)||al(L)||sl(L)||Vs()}function Vs(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sl(L,N){if(L){if(typeof L=="string")return _c(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return _c(L,N)}}function al(L){if(typeof Symbol!="undefined"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}function ul(L){if(Array.isArray(L))return _c(L)}function _c(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_eL.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e0&&arguments[0]!==void 0?arguments[0]:{};return{type:"object",properties:{collapseItem_fillColor:ah(L),collapseItem_fillSize:{type:"void","x-component":"FormCollapse","x-component-props":{ghost:!0,destroyInactivePanel:!0,defaultActiveKey:[]},properties:{fillSize:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:"\u534A\u5F84"},properties:{aggregateSize:{type:"number",title:"\u7F51\u683C\u534A\u5F84",default:10,"x-decorator":"FormItem","x-component":"Slider","x-component-props":{dots:!1,range:!1,max:500,step:1,min:0},"x-decorator-props":{tooltip:"\u7F51\u683C\u534A\u5F84\u5355\u4F4D\u516C\u91CC"}},coverage:{type:"number",title:"\u8986\u76D6\u5EA6","x-decorator":"FormItem","x-component":"Slider","x-component-props":{dots:!1,range:!1,max:1,step:.1,min:0},"x-decorator-props":{}}}}}},collapseItem_other:Ct(L)}}};function Ac(L){return bh(L)||zc(L)||_f(L)||Xf()}function Xf(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _f(L,N){if(L){if(typeof L=="string")return Nn(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return Nn(L,N)}}function zc(L){if(typeof Symbol!="undefined"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}function bh(L){if(Array.isArray(L))return Nn(L)}function Nn(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e { - state.dataSource = $form.getFieldState("aggregateMethod", (state) => { - return state.value - ? [ - { value: "count", label: "count" }, - { label: state.value, value: state.value }, - ] - : [{ value: "count", label: "count" }]; - }); - }); - - $form.setFieldState("fillColorField", (state) => { - state.value = $form - .getFieldState("aggregateMethod", (state) => { - return [state.value, "count"]; - }) - .includes(state.value) - ? state.value - : undefined; - });`}},{dependencies:["aggregateField"],fulfill:{state:{visible:"{{ $deps[0] !== undefined }}"}}}]}}}}}}};function xi(L){"@babel/helpers - typeof";return xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},xi(L)}function qi(L,N){var _e=Object.keys(L);if(Object.getOwnPropertySymbols){var Ne=Object.getOwnPropertySymbols(L);N&&(Ne=Ne.filter(function(ir){return Object.getOwnPropertyDescriptor(L,ir).enumerable})),_e.push.apply(_e,Ne)}return _e}function Xa(L){for(var N=1;N0&&arguments[0]!==void 0?arguments[0]:{};return{type:"object",properties:{collapseItem_fillColor:ah(L),collapseItem_fillSize:{type:"void","x-component":"FormCollapse","x-component-props":{ghost:!0,destroyInactivePanel:!0,defaultActiveKey:[]},properties:{fillSize:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:"\u534A\u5F84"},properties:{aggregateSize:{type:"number",title:"\u8702\u7A9D\u534A\u5F84","x-decorator":"FormItem","x-component":"Slider","x-component-props":{dots:!1,range:!1,max:500,step:1,min:0},"x-decorator-props":{tooltip:"\u8702\u7A9D\u534A\u5F84\u5355\u4F4D\u516C\u91CC"}},coverage:{type:"number",title:"\u8986\u76D6\u5EA6","x-decorator":"FormItem","x-component":"Slider","x-component-props":{dots:!1,range:!1,max:1,step:.1,min:0},"x-decorator-props":{}}}}}},collapseItem_other:Ct(L)}}};function Qf(L){return Fc(L)||Rl(L)||Eu(L)||ds()}function ds(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eu(L,N){if(L){if(typeof L=="string")return Yc(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return Yc(L,N)}}function Rl(L){if(typeof Symbol!="undefined"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}function Fc(L){if(Array.isArray(L))return Yc(L)}function Yc(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e { - state.dataSource = $form.getFieldState("aggregateMethod", (state) => { - return state.value - ? [ - { value: "count", label: "count" }, - { label: state.value, value: state.value }, - ] - : [{ value: "count", label: "count" }]; - }); - }); - - $form.setFieldState("fillColorField", (state) => { - state.value = $form - .getFieldState("aggregateMethod", (state) => { - return [state.value, "count"]; - }) - .includes(state.value) - ? state.value - : undefined; - });`}},{dependencies:["aggregateField"],fulfill:{state:{visible:"{{ $deps[0] !== undefined }}"}}}]}}}}}}};function Lf(L){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},Lf(L)}function If(L,N){var _e=Object.keys(L);if(Object.getOwnPropertySymbols){var Ne=Object.getOwnPropertySymbols(L);N&&(Ne=Ne.filter(function(ir){return Object.getOwnPropertyDescriptor(L,ir).enumerable})),_e.push.apply(_e,Ne)}return _e}function wd(L){for(var N=1;N{ state.value = undefined })"}}]},iconImgScale:{type:"array",title:"\u56FE\u6807\u6620\u5C04","x-decorator":"FormItem","x-component":"IconScaleSelector","x-component-props":{domain:'{{ $form.getFieldState("iconField",state=> { return state.dataSource.find((item) => item.value === state.value)?.domain })}}'},"x-decorator-props":{tooltip:"\u70B9\u51FB\u53EF\u6DFB\u52A0\u67E5\u770B\u56FE\u6807"},"x-reactions":[{dependencies:["iconField"],fulfill:{state:{visible:"{{ $deps[0] !== undefined }}"}}}]},iconImg:{type:"string",title:"\u56FE\u6807\u5F62\u72B6",required:!0,"x-decorator":"FormItem","x-component":"IconSelector","x-decorator-props":{tooltip:"\u9009\u4E2D\u4E00\u4E2A\u56FE\u6807\u4F5C\u4E3A\u586B\u5145\u56FE\u6807",allowClear:!0},"x-component-props":{placeholder:"\u8BF7\u9009\u62E9\u56FE\u6807"},"x-reactions":[{dependencies:["iconField"],fulfill:{state:{visible:"{{ $deps[0] === undefined }}"}}}]},fillOpacity:{type:"number",title:"\u900F\u660E\u5EA6",default:1,"x-decorator-props":{},"x-decorator":"FormItem","x-component":"Slider","x-component-props":{min:0,max:1,step:.1}}}}}},collapseItem_fillRadius:Ht({fieldList:_e,collapseTitle:"\u56FE\u6807\u5927\u5C0F"}),collapseItem_fillLabel:Ze({fieldList:_e}),collapseItem_other:Ct({})}}};function ha(L){return na(L)||Bi(L)||Ti(L)||ba()}function ba(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ti(L,N){if(L){if(typeof L=="string")return Sa(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return Sa(L,N)}}function Bi(L){if(typeof Symbol!="undefined"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}function na(L){if(Array.isArray(L))return Sa(L)}function Sa(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e=L.length?{done:!0}:{done:!1,value:L[Ne++]}},e:function(wn){throw wn},f:ir}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ar=!0,pn=!1,En;return{s:function(){_e=_e.call(L)},n:function(){var wn=_e.next();return Ar=wn.done,wn},e:function(wn){pn=!0,En=wn},f:function(){try{!Ar&&_e.return!=null&&_e.return()}finally{if(pn)throw En}}}}function ct(L,N){if(L){if(typeof L=="string")return Ut(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return Ut(L,N)}}function Ut(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e180?Ar[0]-=360:pn<-180&&(Ar[0]+=360)}}catch(En){Ne.e(En)}finally{Ne.f()}}function cr(L,N,_e){var Ne=(0,me.rS)(L),ir=S(Ne,2),Ar=ir[0],pn=ir[1],En=N.length;Kt(N,pn);for(var In=N[0]===N[En-1]?En-1:En,wn=0;wn1&&arguments[1]!==void 0?arguments[1]:1,_e=(0,me.jf)(L,!0);return N!==1?cr(L,_e,N):Kt(_e),_e}var Fr=function(N,_e){var Ne="".concat(_e,"_geometry"),ir=N.filter(function(pn){return pn[_e]}).map(function(pn){return w(w({},pn),{},Gt({},Ne,{type:"Polygon",coordinates:[hr(pn[_e])]}))}),Ar={data:ir,parser:{type:"json",geometry:Ne}};return Ar};function Br(){return Br=Object.assign?Object.assign.bind():function(L){for(var N=1;NL.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e1&&arguments[1]!==void 0?arguments[1]:[];return Ss(Ss({},Ji(L)),{},{collapseItem_fillColor:Ge({fieldList:L,colorRanges:N}),collapseItem_other:Ct({})})};function uu(L){"@babel/helpers - typeof";return uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},uu(L)}var Ju=function(N){var _e,Ne,ir,Ar,pn,En=N.sourceConfig,In=N.visConfig,wn=In.fillColor,$i=In.opacity,Hi=In.minZoom,Ya=Hi===void 0?0:Hi,Wi=In.maxZoom,Ka=Wi===void 0?24:Wi,po=In.blend,Zo=En.parser,Uo=uu(wn)==="object"&&(wn==null||(_e=wn.scale)===null||_e===void 0?void 0:_e.domain)&&(wn==null||(Ne=wn.scale)===null||Ne===void 0?void 0:Ne.domain.length)!==0,Oa=uu(wn)==="object"?{type:wn==null||(ir=wn.scale)===null||ir===void 0?void 0:ir.type,domain:wn==null||(Ar=wn.scale)===null||Ar===void 0?void 0:Ar.domain,range:wn==null?void 0:wn.value,unknown:wn==null||(pn=wn.scale)===null||pn===void 0?void 0:pn.unknown,isCustom:Uo}:void 0;return{hexagonId:Zo==null?void 0:Zo.hexagonId,fillColorField:uu(wn)==="object"?wn==null?void 0:wn.field:void 0,fillColorRange:uu(wn)==="object"?{colors:(wn==null?void 0:wn.value)||[],isReversed:(wn==null?void 0:wn.isReversed)||!1}:void 0,fillColorScale:Oa,fillColor:uu(wn)!=="object"?wn:void 0,fillColorOpacity:$i,zoom:[Ya,Ka],blend:po}},Sc=function(N){var _e,Ne,ir,Ar,pn,En={parser:{hexagonId:N.hexagonId}},In=N.fillColorField?{field:N.fillColorField,value:N.fillColorScale.isCustom?N.fillColorScale.range:(_e=N.fillColorRange)===null||_e===void 0?void 0:_e.colors,scale:N.fillColorScale.isCustom?{type:N.fillColorScale.type,domain:N.fillColorScale.domain,unknown:N.fillColorScale.unknown}:{type:N.fillColorScale.type},isReversed:(Ne=(ir=N.fillColorRange)===null||ir===void 0?void 0:ir.isReversed)!==null&&Ne!==void 0?Ne:!1}:N.fillColor;return{sourceConfig:En,visConfig:{fillColor:In,opacity:N.fillColorOpacity,lineWidth:0,minZoom:N==null||(Ar=N.zoom)===null||Ar===void 0?void 0:Ar[0],maxZoom:N==null||(pn=N.zoom)===null||pn===void 0?void 0:pn[1],blend:N.blend}}},Bl=function(L){var N=bc(L.datasetFields);return{schema:N,toValues:Ju,fromValues:Sc}},Ol=function(){return d.createElement("svg",{viewBox:"0 0 64 64",width:"1em",height:"1em",style:{fill:"currentcolor"}},d.createElement("path",{d:"M44.59,54.5H19.41L6.81,32.68,19.41,10.87H44.59L57.19,32.68Zm-23-3.83H42.38l10.38-18-10.38-18H21.62l-10.38,18Z"}),d.createElement("polygon",{points:"24.65 32.86 24.65 37.79 22.53 37.79 22.53 26.3 24.65 26.3 24.65 30.91 29.32 30.91 29.32 26.3 31.43 26.3 31.43 37.79 29.32 37.79 29.32 32.86 24.65 32.86"}),d.createElement("path",{d:"M33.79,37.05l.6-1.67a5.86,5.86,0,0,0,1.39.61,5.59,5.59,0,0,0,1.5.19A2.57,2.57,0,0,0,39,35.66a1.81,1.81,0,0,0,.61-1.46A1.29,1.29,0,0,0,38.94,33a4.55,4.55,0,0,0-2.05-.32H35.74V31h1.1A5.4,5.4,0,0,0,38,30.85a2.1,2.1,0,0,0,.77-.29,1.53,1.53,0,0,0,.51-.54,1.58,1.58,0,0,0,.15-.73,1.14,1.14,0,0,0-.51-1,2.67,2.67,0,0,0-1.5-.34,4.56,4.56,0,0,0-1.51.24,5,5,0,0,0-1.34.73l-.7-1.61a4.92,4.92,0,0,1,1.66-.83,6.91,6.91,0,0,1,2-.31,4.41,4.41,0,0,1,2.81.79,2.71,2.71,0,0,1,1,2.24,2.33,2.33,0,0,1-.54,1.62,3.45,3.45,0,0,1-1.46.93v0a3,3,0,0,1,1.67.81,2.3,2.3,0,0,1,.64,1.7A3.27,3.27,0,0,1,40.48,37a5,5,0,0,1-3.16.91A6.77,6.77,0,0,1,33.79,37.05Z"}))},oc=(0,y.Fl)({version:"v0.1",metadata:{name:"H3HexagonLayer",displayName:"H3 \u56FE\u5C42",description:"\u7528\u4E8E H3 \u6570\u636E\u5C55\u793A",type:"Layer",icon:Ol,color:"turquoise"},defaultVisConfig:{visible:!0,fillColor:"rgb(90, 216, 166)",opacity:.8,state:{active:{strokeColor:"yellow",fillColor:!1},select:{fillColor:!1,strokeColor:"red"}},minZoom:0,maxZoom:24,blend:"normal"},component:Xr,registerForm:Bl}),Ql=function(N){return d.createElement($.YY,N)},Cu=Ql,Bc=function(){return{collapseItem_style:{type:"void","x-component":"FormCollapse","x-component-props":{ghost:!0,destroyInactivePanel:!0,defaultActiveKey:[]},properties:{style:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:"\u6837\u5F0F"},properties:{opacity:{type:"number",title:"\u900F\u660E\u5EA6",default:1,"x-decorator-props":{},"x-decorator":"FormItem","x-component":"Slider","x-component-props":{min:0,max:1,step:.1}}}}}},collapseItem_other:Ct()}},ff=function(N){var _e=N.sourceConfig,Ne=N.visConfig,ir=_e.parser,Ar=Ne.style,pn=Ne.minZoom,En=pn===void 0?0:pn,In=Ne.maxZoom,wn=In===void 0?24:In,$i=Ne.blend;return{opacity:Ar==null?void 0:Ar.opacity,zoom:[En,wn],blend:$i}},Eh=function(N){var _e,Ne,ir={parser:{type:"rasterTile"}};return{sourceConfig:ir,visConfig:{style:{opacity:N==null?void 0:N.opacity},minZoom:N==null||(_e=N.zoom)===null||_e===void 0?void 0:_e[0],maxZoom:N==null||(Ne=N.zoom)===null||Ne===void 0?void 0:Ne[1],blend:N.blend}}},Rf=function(L){var N=Bc();return{schema:N,toValues:ff,fromValues:Eh}},Xl=d.createElement("svg",{viewBox:"0 0 56 56",width:"1em",height:"1em",style:{fill:"currentcolor"}},d.createElement("path",{d:"m27.55,22.84L1.87,37.3l26.58,14.97,25.68-14.46-26.58-14.97Z",style:{opacity:.6}}),d.createElement("path",{d:"m27.55,14.32L1.87,28.78l26.58,14.97,25.68-14.46-26.58-14.97Z",style:{opacity:.6}}),d.createElement("path",{d:"m27.55,3.73L1.87,18.19l26.58,14.97,25.68-14.46L27.55,3.73Z",style:{opacity:.6}}),d.createElement("path",{d:"m11.06,24.01h8.74v2.3h-2.93v7.01h-2.88v-7.01h-2.93v-2.3Z",fill:"#c0c0c0"}),d.createElement("path",{d:"m22.44,24.01h3.78l1.46,5.66,1.45-5.66h3.78v9.31h-2.35v-7.1l-1.81,7.1h-2.13l-1.81-7.1v7.1h-2.35v-9.31Z",fill:"#c0c0c0"}),d.createElement("path",{d:"m35.6,30.24l2.74-.17c.06.44.18.78.36,1.02.3.38.72.56,1.27.56.41,0,.73-.1.95-.29.22-.19.33-.42.33-.67s-.11-.46-.32-.65c-.21-.19-.7-.37-1.47-.54-1.26-.28-2.16-.66-2.7-1.13-.54-.47-.81-1.07-.81-1.8,0-.48.14-.93.42-1.36.28-.42.69-.76,1.25-1,.56-.24,1.32-.36,2.29-.36,1.19,0,2.1.22,2.72.66.62.44,1,1.15,1.11,2.11l-2.71.16c-.07-.42-.22-.72-.45-.91s-.55-.29-.96-.29c-.33,0-.59.07-.76.21-.17.14-.25.31-.25.52,0,.15.07.28.21.4.14.12.46.24.96.34,1.26.27,2.16.54,2.7.82.54.28.94.62,1.19,1.03.25.41.37.87.37,1.38,0,.6-.16,1.15-.49,1.65-.33.5-.79.89-1.38,1.15-.59.26-1.34.39-2.24.39-1.58,0-2.68-.3-3.29-.91s-.95-1.38-1.03-2.32Z",fill:"#c0c0c0"})),jf=function(){return d.createElement("svg",{viewBox:"0 0 56 56",width:"1em",height:"1em",style:{fill:"currentcolor"}},d.createElement("path",{d:"m27.55,22.84L1.87,37.3l26.58,14.97,25.68-14.46-26.58-14.97Z",style:{opacity:.6}}),d.createElement("path",{d:"m27.55,14.32L1.87,28.78l26.58,14.97,25.68-14.46-26.58-14.97Z",style:{opacity:.6}}),d.createElement("path",{d:"m27.55,3.73L1.87,18.19l26.58,14.97,25.68-14.46L27.55,3.73Z",style:{opacity:.6}}),d.createElement("path",{d:"m9.93,20.28h3.17l1.65,2.86,1.6-2.86h3.14l-2.9,4.51,3.17,4.8h-3.23l-1.84-2.99-1.84,2.99h-3.21l3.21-4.85-2.92-4.46Z",fill:"#c0c0c0"}),d.createElement("path",{d:"m21.1,20.28h3.19l1.88,3.14,1.88-3.14h3.18l-3.62,5.41v3.9h-2.88v-3.9l-3.62-5.41Z",fill:"#c0c0c0"}),d.createElement("path",{d:"m33.28,20.28h8.14v1.86l-5.22,5.45h5.41v2h-8.83v-1.93l5.17-5.39h-4.67v-1.99Z",fill:"#c0c0c0"}))},Yf=(0,y.Fl)({version:"v0.1",metadata:{name:"TileLayer",displayName:"\u74E6\u7247\u56FE\u5C42",description:"\u7528\u4E8E\u6805\u683C\u74E6\u7247\u670D\u52A1\u5C55\u793A",type:"Layer",icon:jf,color:"#5558db"},defaultVisConfig:{visible:!0,style:{opacity:1},minZoom:0,maxZoom:24,blend:"normal"},component:Cu,registerForm:Rf}),Ah=_(60965),vf=_(30678),Ph=_(1469);function Ld(L,N){return(0,vf.Z)(L,N,function(_e,Ne){return(0,Ph.Z)(L,Ne)})}var Hh=Ld,Dh=_(83462),eh=(0,Dh.Z)(function(L,N){return L==null?{}:Hh(L,N)}),Hf=eh;function qh(){return qh=Object.assign?Object.assign.bind():function(L){for(var N=1;NL.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e=0;--Ic){var Kc=this.tryEntries[Ic],Zh=Kc.completion;if(Kc.tryLoc==="root")return il("end");if(Kc.tryLoc<=this.prev){var Kh=Ne.call(Kc,"catchLoc"),hp=Ne.call(Kc,"finallyLoc");if(Kh&&hp){if(this.prev=0;--il){var Ic=this.tryEntries[il];if(Ic.tryLoc<=this.prev&&Ne.call(Ic,"finallyLoc")&&this.prev=0;--Rs){var il=this.tryEntries[Rs];if(il.finallyLoc===ts)return this.complete(il.completion,il.afterLoc),Xh(il),Zo}},catch:function(ts){for(var Rs=this.tryEntries.length-1;Rs>=0;--Rs){var il=this.tryEntries[Rs];if(il.tryLoc===ts){var Ic=il.completion;if(Ic.type==="throw"){var Kc=Ic.arg;Xh(il)}return Kc}}throw new Error("illegal catch attempt")},delegateYield:function(ts,Rs,il){return this.delegate={iterator:sd(ts),resultName:Rs,nextLoc:il},this.method==="next"&&(this.arg=L),Zo}},N}function dh(L,N,_e,Ne,ir,Ar,pn){try{var En=L[Ar](pn),In=En.value}catch(wn){_e(wn);return}En.done?N(In):Promise.resolve(In).then(Ne,ir)}function rd(L){return function(){var N=this,_e=arguments;return new Promise(function(Ne,ir){var Ar=L.apply(N,_e);function pn(In){dh(Ar,Ne,ir,pn,En,"next",In)}function En(In){dh(Ar,Ne,ir,pn,En,"throw",In)}pn(void 0)})}}var $p=new Map,k0=function(){var L=rd(Zc().mark(function N(_e,Ne){var ir,Ar,pn,En;return Zc().wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:if(ir=_e.data,Ar=_e.filter,Ar){wn.next=3;break}return wn.abrupt("return",ir);case 3:return wn.prev=3,wn.next=6,(0,y.LY)(ir,Ar);case 6:pn=wn.sent,wn.next=14;break;case 9:return wn.prev=9,wn.t0=wn.catch(3),En=new Error("applyDatasetFilter is failure, filter data: '".concat(JSON.stringify(Ar),"'.")),console.error(En),wn.abrupt("return",Promise.reject(En));case 14:if(!Ne.aborted){wn.next=16;break}return wn.abrupt("return",Promise.reject("Aborted the request"));case 16:return wn.abrupt("return",pn);case 17:case"end":return wn.stop()}},N,null,[[3,9]])}));return function(_e,Ne){return L.apply(this,arguments)}}(),H0=function(N){var _e=N.properties,Ne=N.filter,ir=N.signal,Ar=JSON.stringify(_e),pn={mode:"cors",cache:"default",signal:ir},En=Object.assign(pn,{body:kh(_e.requestOptions.body)==="object"?JSON.stringify(_e.requestOptions.body):_e.requestOptions.body});if($p.has(Ar)){var In=$p.get(Ar);return k0({data:In,filter:Ne},ir)}var wn=_e.onComplete,$i=_e.onError;return fetch(_e.url,En).then(function(Hi){return Hi.ok?Hi.json():Promise.reject(new Error("status ".concat(Hi.status," ").concat(Hi.statusText)))}).then(function(Hi){if(wn&&(0,y.p5)(wn)){var Ya=(0,y.dL)(wn.value);return Ya?Ya(Hi):Hi}return Hi}).then(function(Hi){if(Array.isArray(Hi)&&Hi.length===0||kh(Hi[0])==="object"){var Ya=(0,y.uQ)(Hi);return $p.set(Ar,Ya),k0({data:Ya,filter:Ne},ir)}return Promise.reject(new Error("\u6570\u636E\u683C\u5F0F\u4E0D\u662F\u6570\u7EC4\u5BF9\u8C61, \u8BF7\u68C0\u67E5\u6570\u636E\u683C\u5F0F\u662F\u5426\u6B63\u786E\u3002"))}).catch(function(Hi){if(Hi.name=="AbortError")return[];var Ya=$i&&(0,y.p5)($i)?(0,y.dL)($i.value):void 0;if(Ya){var Wi=Ya(Hi);throw Wi||Hi}else throw Hi})},_0=(0,y.$v)({version:"v0.1",metadata:{name:"GET_FETCH_DATA_LIST",displayName:"\u901A\u8FC7 fetch \u83B7\u53D6\u6570\u636E",type:"Dataset"},service:H0}),tm=_(92310),Dc=_.n(tm),F0="li-base-layout",I0=function(){return d.createElement("svg",{viewBox:"0 0 64 64",width:"1em",height:"1em",fill:"currentColor"},d.createElement("path",{fill:"currentColor",transform:"rotate(90 32,31.99999809265137)",d:"m4.229698,4.420779l0,55.158442l55.540603,0l0,-55.158442l-55.540603,0zm51.655308,51.400535l-47.642627,0l0,-35.604584l47.70632,0l-0.063693,35.604584zm0.063693,-39.680958l-47.642627,0l0,-7.961669l47.642627,0l0,7.961669z"}))},_d=_(68564),e0=_(5022),R0,O0,Td,pp;function B0(L,N){return N||(N=L.slice(0)),Object.freeze(Object.defineProperties(L,{raw:{value:Object.freeze(N)}}))}var Hp=function(){var N=e0.Z.useToken,_e=N(),Ne=_e.token,ir=Ne.colorBgLayout;return{baseLayout:(0,_d.iv)(R0||(R0=B0([` - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - `]))),baseContainer:(0,_d.iv)(O0||(O0=B0([` - display: flex; - flex: auto; - width: 100%; - height: 100%; - `]))),mapContainer:(0,_d.iv)(Td||(Td=B0([` - flex: auto; - `]))),sidePanel:(0,_d.iv)(pp||(pp=B0([` - width: 350px; - padding: 15px 10px; - overflow: hidden; - overflow-y: auto; - background-color: `,`; - - > :nth-child(n + 2) { - margin-top: 10px; - } - `])),ir)}},G0=Hp,Ed=function(N){var _e=N.showSidePanel,Ne=N.slotsElements,ir=N.children,Ar=G0(),pn=(0,d.useMemo)(function(){return{content:Ne.content,controls:Ne.controls}},[Ne.content,Ne.controls]);return d.createElement("div",{className:Dc()(F0,Ar.baseLayout)},d.createElement("div",{className:Dc()("".concat(F0,"__main"),Ar.baseContainer)},d.createElement(y.h_,{className:Dc()(Ar.mapContainer,"".concat(F0,"__map-container")),slotsElements:pn},ir),_e&&d.createElement("div",{className:Dc()(Ar.sidePanel,"".concat(F0,"__side-panel"))},Ne.sidePanel?Ne.sidePanel({}):null)))},t0=Ed;function zp(L){"@babel/helpers - typeof";return zp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},zp(L)}function kp(L,N){var _e=Object.keys(L);if(Object.getOwnPropertySymbols){var Ne=Object.getOwnPropertySymbols(L);N&&(Ne=Ne.filter(function(ir){return Object.getOwnPropertyDescriptor(L,ir).enumerable})),_e.push.apply(_e,Ne)}return _e}function mp(L){for(var N=1;N=72.004&&L<=137.8347&&N>=.8293&&N<=55.8271}function Nd(L,N){var _e=-100+2*L+3*N+.2*N*N+.1*L*N+.2*nd(j0(L));return _e+=(20*bf(6*L*xp)+20*bf(2*L*xp))*2/3,_e+=(20*bf(N*xp)+40*bf(N/3*xp))*2/3,_e+=(160*bf(N/12*xp)+320*bf(N*xp/30))*2/3,_e}function u0(L,N){var _e=300+L+2*N+.1*L*L+.1*L*N+.1*nd(j0(L));return _e+=(20*bf(6*L*xp)+20*bf(2*L*xp))*2/3,_e+=(20*bf(L*xp)+40*bf(L/3*xp))*2/3,_e+=(150*bf(L/12*xp)+300*bf(L/30*xp))*2/3,_e}function b0(L,N){var _e=u0(L-105,N-35),Ne=Nd(L-105,N-35),ir=N/180*xp,Ar=bf(ir);Ar=1-X0*Ar*Ar;var pn=nd(Ar);return _e=_e*180/(rm/pn*fm(ir)*xp),Ne=Ne*180/(rm*(1-X0)/(Ar*pn)*xp),[_e,Ne]}function Jd(L){var N=L[0],_e=L[1];if(!Y0(N,_e))return[N,_e];var Ne=b0(N,_e);return[N+Ne[0],_e+Ne[1]]}function Cr(L){var N=L[0],_e=L[1];if(!Y0(N,_e))return[N,_e];for(var Ne=[N,_e],ir=Ne[0],Ar=Ne[1],pn=Jd([ir,Ar]),En=pn[0]-N,In=pn[1]-_e;j0(En)>1e-6||j0(In)>1e-6;)ir-=En,Ar-=In,pn=Jd([ir,Ar]),En=pn[0]-N,In=pn[1]-_e;return[ir,Ar]}var Dn=Math.sin,Ci=Math.cos,eo=Math.atan2,zo=Math.sqrt,to=Math.PI,Ha=to*3e3/180;function Cs(L){var N=L[0],_e=L[1],Ne=N-.0065,ir=_e-.006,Ar=zo(Ne*Ne+ir*ir)-2e-5*Dn(ir*Ha),pn=eo(ir,Ne)-3e-6*Ci(Ne*Ha),En=Ar*Ci(pn),In=Ar*Dn(pn);return[En,In]}function ls(L){var N=L[0],_e=L[1],Ne=N,ir=_e,Ar=zo(Ne*Ne+ir*ir)+2e-5*Dn(ir*Ha),pn=eo(ir,Ne)+3e-6*Ci(Ne*Ha),En=Ar*Ci(pn)+.0065,In=Ar*Dn(pn)+.006;return[En,In]}var Su=180/Math.PI,ru=Math.PI/180,nu=6378137,xu=20037508342789244e-9;function Ns(L){return[L[0]*Su/nu,(Math.PI*.5-2*Math.atan(Math.exp(-L[1]/nu)))*Su]}function wu(L){var N=Math.abs(L[0])<=180?L[0]:L[0]-(L[0]<0?-1:1)*360,_e=[nu*N*ru,nu*Math.log(Math.tan(Math.PI*.25+.5*L[1]*ru))];return _e[0]>xu&&(_e[0]=xu),_e[0]<-xu&&(_e[0]=-xu),_e[1]>xu&&(_e[1]=xu),_e[1]<-xu&&(_e[1]=-xu),_e}var _a=Math.abs,Ao=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],lu=[75,60,45,30,15,0],el=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],As=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]];function bl(L,N,_e){var Ne=_a(N)/_e[9],ir=_e[0]+_e[1]*_a(L),Ar=_e[2]+_e[3]*Ne+_e[4]*Math.pow(Ne,2)+_e[5]*Math.pow(Ne,3)+_e[6]*Math.pow(Ne,4)+_e[7]*Math.pow(Ne,5)+_e[8]*Math.pow(Ne,6);return ir*=L<0?-1:1,Ar*=N<0?-1:1,[ir,Ar]}function Is(L){for(var N=L[0],_e=L[1],Ne=[],ir=0;irlu[ir]){Ne=As[ir];break}return bl(N,_e,Ne)}function tl(L){for(var N=L[0],_e=L[1],Ne=[],ir=0;ir=Ao[ir]){Ne=el[ir];break}return bl(N,_e,Ne)}function Ho(L,N){if(!L)throw new Error(N)}function rl(L){return!!L&&Object.prototype.toString.call(L)==="[object Array]"}function xc(L){return!isNaN(Number(L))&&L!==null&&!rl(L)}function kc(){for(var L=[],N=0;N=2,"Invalid input coordinate: "+L),Ho(xc(L[0])&&xc(L[1]),"Invalid input coordinate: "+L),L=L.map(Number),pn=!0);var En=ir;return pn?En(L):(Wu(L,function(In){var wn;wn=En(In),In[0]=wn[0],In[1]=wn[1]}),L)}var Fh=Bp(Bp({},Jl),{CRSTypes:Jl,transform:Md}),Bf=Fh,md;function Vf(L,N){return N||(N=L.slice(0)),Object.freeze(Object.defineProperties(L,{raw:{value:Object.freeze(N)}}))}var id=function(){var N=e0.Z.useToken,_e=N(),Ne=_e.token,ir=Ne.colorText,Ar=Ne.colorTextDescription,pn=Ne.colorBgContainer,En=Ne.colorBorder,In=Ne.borderRadius;return{geoLocation:(0,_d.iv)(md||(md=Vf([` - color: `,`; - background: `,` !important; - border-color: `,`; - border-radius: `,`px; - - svg { - fill: `,` !important; - } - - &:hover { - svg { - fill: `,` !important; - } - } - `])),Ar,pn,En,In,Ar,ir)}},df=id,$d=function(N){var _e=N.position,Ne=df(),ir=function(pn){return Bf.transform(pn,Bf.WGS84,Bf.GCJ02)};return d.createElement($.l_,{className:Dc()("li-geo-location-control",Ne.geoLocation),transform:ir,position:_e})},ef=$d,th=function(){var L={position:{title:"\u653E\u7F6E\u65B9\u4F4D",type:"string","x-decorator":"FormItem","x-component":"ControlPositionSelect",default:"bottomright"}};return{schema:L}},Xu=function(){return d.createElement("svg",{className:"l7-iconfont",fill:"currentColor","aria-hidden":"true",style:{width:"1em",height:"1em"}},d.createElement("use",{href:"#l7-icon-reposition"}))},Pl=(0,y.mV)({version:"v0.1",metadata:{name:"GeoLocateControl",displayName:"GPS \u5B9A\u4F4D",description:"\u4F7F\u7528 GPS \u5B9A\u4F4D\u5230\u5730\u56FE\u4E0A",type:"Auto",category:"MapControl",icon:Xu},defaultProperties:{position:"bottomright"},component:ef,registerForm:th}),mu=_(49397),pf=_(41522),jh=_(11908),qp=_(34591),fi=_(50555),Ja=_(43418),ga=_(81664),Yu=_(20906),tf=_(66187),bo=_(47562),Nr=_(32095),vr=_(20573),hi=_(30462),Ma=_(2741),Ra=_(16380);function Ni(L){return!!(L&&L.then)}var Vi=L=>{const{type:N,children:_e,prefixCls:Ne,buttonProps:ir,close:Ar,autoFocus:pn,emitEvent:En,isSilent:In,quitOnNullishReturnValue:wn,actionFn:$i}=L,Hi=d.useRef(!1),Ya=d.useRef(null),[Wi,Ka]=(0,hi.Z)(!1),po=function(){Ar==null||Ar.apply(void 0,arguments)};d.useEffect(()=>{let Oa=null;return pn&&(Oa=setTimeout(()=>{var rs;(rs=Ya.current)===null||rs===void 0||rs.focus()})),()=>{Oa&&clearTimeout(Oa)}},[]);const Zo=Oa=>{Ni(Oa)&&(Ka(!0),Oa.then(function(){Ka(!1,!0),po.apply(void 0,arguments),Hi.current=!1},rs=>{if(Ka(!1,!0),Hi.current=!1,!(In!=null&&In()))return Promise.reject(rs)}))},Uo=Oa=>{if(Hi.current)return;if(Hi.current=!0,!$i){po();return}let rs;if(En){if(rs=$i(Oa),wn&&!Ni(rs)){Hi.current=!1,po(Oa);return}}else if($i.length)rs=$i(Ar),Hi.current=!1;else if(rs=$i(),!rs){po();return}Zo(rs)};return d.createElement(Ma.ZP,Object.assign({},(0,Ra.nx)(N),{onClick:Uo,loading:Wi,prefixCls:Ne},ir,{ref:Ya}),_e)};const Qn=d.createContext({}),{Provider:D}=Qn;var B=()=>{const{autoFocusButton:L,cancelButtonProps:N,cancelTextLocale:_e,isSilent:Ne,mergedOkCancel:ir,rootPrefixCls:Ar,close:pn,onCancel:En,onConfirm:In}=(0,d.useContext)(Qn);return ir?d.createElement(Vi,{isSilent:Ne,actionFn:En,close:function(){pn==null||pn.apply(void 0,arguments),In==null||In(!1)},autoFocus:L==="cancel",buttonProps:N,prefixCls:`${Ar}-btn`},_e):null},fe=()=>{const{autoFocusButton:L,close:N,isSilent:_e,okButtonProps:Ne,rootPrefixCls:ir,okTextLocale:Ar,okType:pn,onConfirm:En,onOk:In}=(0,d.useContext)(Qn);return d.createElement(Vi,{isSilent:_e,type:pn||"primary",actionFn:In,close:function(){N==null||N.apply(void 0,arguments),En==null||En(!0)},autoFocus:L==="ok",buttonProps:Ne,prefixCls:`${ir}-btn`},Ar)},Ae=_(39694),Le=_(79384),Ve=_(35372),Bt=_(526),sr=d.createContext({}),Er=_(54131),An=_(99569),ci=_(57901),bi=_(84821),Ei=_(3286);function va(L,N,_e){var Ne=N;return!Ne&&_e&&(Ne="".concat(L,"-").concat(_e)),Ne}function es(L,N){var _e=L["page".concat(N?"Y":"X","Offset")],Ne="scroll".concat(N?"Top":"Left");if(typeof _e!="number"){var ir=L.document;_e=ir.documentElement[Ne],typeof _e!="number"&&(_e=ir.body[Ne])}return _e}function Io(L){var N=L.getBoundingClientRect(),_e={left:N.left,top:N.top},Ne=L.ownerDocument,ir=Ne.defaultView||Ne.parentWindow;return _e.left+=es(ir),_e.top+=es(ir,!0),_e}var io=_(44516),ao=_(88831),Va=d.memo(function(L){var N=L.children;return N},function(L,N){var _e=N.shouldUpdate;return!_e}),zl={width:0,height:0,overflow:"hidden",outline:"none"},Ll=d.forwardRef(function(L,N){var _e=L.prefixCls,Ne=L.className,ir=L.style,Ar=L.title,pn=L.ariaId,En=L.footer,In=L.closable,wn=L.closeIcon,$i=L.onClose,Hi=L.children,Ya=L.bodyStyle,Wi=L.bodyProps,Ka=L.modalRender,po=L.onMouseDown,Zo=L.onMouseUp,Uo=L.holderRef,Oa=L.visible,rs=L.forceRender,Du=L.width,Us=L.height,vl=L.classNames,Tl=L.styles,Ul=d.useContext(sr),ku=Ul.panel,Hl=(0,ao.x1)(Uo,ku),jl=(0,d.useRef)(),Mh=(0,d.useRef)();d.useImperativeHandle(N,function(){return{focus:function(){var il;(il=jl.current)===null||il===void 0||il.focus()},changeActive:function(il){var Ic=document,Kc=Ic.activeElement;il&&Kc===Mh.current?jl.current.focus():!il&&Kc===jl.current&&Mh.current.focus()}}});var Xh={};Du!==void 0&&(Xh.width=Du),Us!==void 0&&(Xh.height=Us);var Yh;En&&(Yh=d.createElement("div",{className:Dc()("".concat(_e,"-footer"),vl==null?void 0:vl.footer),style:(0,Er.Z)({},Tl==null?void 0:Tl.footer)},En));var sd;Ar&&(sd=d.createElement("div",{className:Dc()("".concat(_e,"-header"),vl==null?void 0:vl.header),style:(0,Er.Z)({},Tl==null?void 0:Tl.header)},d.createElement("div",{className:"".concat(_e,"-title"),id:pn},Ar)));var Nu;In&&(Nu=d.createElement("button",{type:"button",onClick:$i,"aria-label":"Close",className:"".concat(_e,"-close")},wn||d.createElement("span",{className:"".concat(_e,"-close-x")})));var ts=d.createElement("div",{className:Dc()("".concat(_e,"-content"),vl==null?void 0:vl.content),style:Tl==null?void 0:Tl.content},Nu,sd,d.createElement("div",(0,Le.Z)({className:Dc()("".concat(_e,"-body"),vl==null?void 0:vl.body),style:(0,Er.Z)((0,Er.Z)({},Ya),Tl==null?void 0:Tl.body)},Wi),Hi),Yh);return d.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":Ar?pn:null,"aria-modal":"true",ref:Hl,style:(0,Er.Z)((0,Er.Z)({},ir),Xh),className:Dc()(_e,Ne),onMouseDown:po,onMouseUp:Zo},d.createElement("div",{tabIndex:0,ref:jl,style:zl,"aria-hidden":"true"}),d.createElement(Va,{shouldUpdate:Oa||rs},Ka?Ka(ts):ts),d.createElement("div",{tabIndex:0,ref:Mh,style:zl,"aria-hidden":"true"}))}),Ru=Ll,xl=d.forwardRef(function(L,N){var _e=L.prefixCls,Ne=L.title,ir=L.style,Ar=L.className,pn=L.visible,En=L.forceRender,In=L.destroyOnClose,wn=L.motionName,$i=L.ariaId,Hi=L.onVisibleChanged,Ya=L.mousePosition,Wi=(0,d.useRef)(),Ka=d.useState(),po=(0,Ve.Z)(Ka,2),Zo=po[0],Uo=po[1],Oa={};Zo&&(Oa.transformOrigin=Zo);function rs(){var Du=Io(Wi.current);Uo(Ya?"".concat(Ya.x-Du.left,"px ").concat(Ya.y-Du.top,"px"):"")}return d.createElement(io.ZP,{visible:pn,onVisibleChanged:Hi,onAppearPrepare:rs,onEnterPrepare:rs,forceRender:En,motionName:wn,removeOnLeave:In,ref:Wi},function(Du,Us){var vl=Du.className,Tl=Du.style;return d.createElement(Ru,(0,Le.Z)({},L,{ref:N,title:Ne,ariaId:$i,prefixCls:_e,holderRef:Us,style:(0,Er.Z)((0,Er.Z)((0,Er.Z)({},Tl),ir),Oa),className:Dc()(Ar,vl)}))})});xl.displayName="Content";var Th=xl;function Bh(L){var N=L.prefixCls,_e=L.style,Ne=L.visible,ir=L.maskProps,Ar=L.motionName,pn=L.className;return d.createElement(io.ZP,{key:"mask",visible:Ne,motionName:Ar,leavedClassName:"".concat(N,"-mask-hidden")},function(En,In){var wn=En.className,$i=En.style;return d.createElement("div",(0,Le.Z)({ref:In,style:(0,Er.Z)((0,Er.Z)({},$i),_e),className:Dc()("".concat(N,"-mask"),wn,pn)},ir))})}var wh=_(36014);function Jf(L){var N=L.prefixCls,_e=N===void 0?"rc-dialog":N,Ne=L.zIndex,ir=L.visible,Ar=ir===void 0?!1:ir,pn=L.keyboard,En=pn===void 0?!0:pn,In=L.focusTriggerAfterClose,wn=In===void 0?!0:In,$i=L.wrapStyle,Hi=L.wrapClassName,Ya=L.wrapProps,Wi=L.onClose,Ka=L.afterOpenChange,po=L.afterClose,Zo=L.transitionName,Uo=L.animation,Oa=L.closable,rs=Oa===void 0?!0:Oa,Du=L.mask,Us=Du===void 0?!0:Du,vl=L.maskTransitionName,Tl=L.maskAnimation,Ul=L.maskClosable,ku=Ul===void 0?!0:Ul,Hl=L.maskStyle,jl=L.maskProps,Mh=L.rootClassName,Xh=L.classNames,Yh=L.styles,sd=(0,d.useRef)(),Nu=(0,d.useRef)(),ts=(0,d.useRef)(),Rs=d.useState(Ar),il=(0,Ve.Z)(Rs,2),Ic=il[0],Kc=il[1],Zh=(0,ci.Z)();function Kh(){(0,An.Z)(Nu.current,document.activeElement)||(sd.current=document.activeElement)}function hp(){if(!(0,An.Z)(Nu.current,document.activeElement)){var wp;(wp=ts.current)===null||wp===void 0||wp.focus()}}function Id(wp){if(wp)hp();else{if(Kc(!1),Us&&sd.current&&wn){try{sd.current.focus({preventScroll:!0})}catch(dm){}sd.current=null}Ic&&(po==null||po())}Ka==null||Ka(wp)}function pd(wp){Wi==null||Wi(wp)}var bd=(0,d.useRef)(!1),dp=(0,d.useRef)(),Kd=function(){clearTimeout(dp.current),bd.current=!0},L0=function(){dp.current=setTimeout(function(){bd.current=!1})},x0=null;ku&&(x0=function(dm){bd.current?bd.current=!1:Nu.current===dm.target&&pd(dm)});function D0(wp){if(En&&wp.keyCode===bi.Z.ESC){wp.stopPropagation(),pd(wp);return}Ar&&wp.keyCode===bi.Z.TAB&&ts.current.changeActive(!wp.shiftKey)}return(0,d.useEffect)(function(){Ar&&(Kc(!0),Kh())},[Ar]),(0,d.useEffect)(function(){return function(){clearTimeout(dp.current)}},[]),d.createElement("div",(0,Le.Z)({className:Dc()("".concat(_e,"-root"),Mh)},(0,Ei.Z)(L,{data:!0})),d.createElement(Bh,{prefixCls:_e,visible:Us&&Ar,motionName:va(_e,vl,Tl),style:(0,Er.Z)((0,Er.Z)({zIndex:Ne},Hl),Yh==null?void 0:Yh.mask),maskProps:jl,className:Xh==null?void 0:Xh.mask}),d.createElement("div",(0,Le.Z)({tabIndex:-1,onKeyDown:D0,className:Dc()("".concat(_e,"-wrap"),Hi,Xh==null?void 0:Xh.wrapper),ref:Nu,onClick:x0,style:(0,Er.Z)((0,Er.Z)((0,Er.Z)({zIndex:Ne},$i),Yh==null?void 0:Yh.wrapper),{},{display:Ic?null:"none"})},Ya),d.createElement(Th,(0,Le.Z)({},L,{onMouseDown:Kd,onMouseUp:L0,ref:ts,closable:rs,ariaId:Zh,prefixCls:_e,visible:Ar&&Ic,onClose:pd,onVisibleChanged:Id,motionName:va(_e,Zo,Uo)}))))}var Yl=function(N){var _e=N.visible,Ne=N.getContainer,ir=N.forceRender,Ar=N.destroyOnClose,pn=Ar===void 0?!1:Ar,En=N.afterClose,In=N.panelRef,wn=d.useState(_e),$i=(0,Ve.Z)(wn,2),Hi=$i[0],Ya=$i[1],Wi=d.useMemo(function(){return{panel:In}},[In]);return d.useEffect(function(){_e&&Ya(!0)},[_e]),!ir&&pn&&!Hi?null:d.createElement(sr.Provider,{value:Wi},d.createElement(Bt.Z,{open:_e||ir||Hi,autoDestroy:!1,getContainer:Ne,autoLock:_e||Hi},d.createElement(Jf,(0,Le.Z)({},N,{destroyOnClose:pn,afterClose:function(){En==null||En(),Ya(!1)}}))))};Yl.displayName="Dialog";var Mc=Yl,ad=Mc;function Tf(L,N,_e){return typeof L=="boolean"?L:N===void 0?!!_e:N!==!1&&N!==null}function Wh(L,N,_e){let Ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:d.createElement(Ae.Z,null),ir=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(!Tf(L,N,ir))return[!1,null];const pn=typeof N=="boolean"||N===void 0||N===null?Ne:N;return[!0,_e?_e(pn):pn]}var Nf=Wh,hm=_(42871);const bm=()=>(0,hm.Z)()&&window.document.documentElement;var xm=_(53843),jp=_(76135),Rm=_(53615),up=_(53580),V0=_(33401);function xd(){}const n0=d.createContext({add:xd,remove:xd});function od(L){const N=d.useContext(n0),_e=d.useRef();return(0,V0.zX)(ir=>{if(ir){const Ar=L?ir.querySelector(L):ir;N.add(Ar),_e.current=Ar}else N.remove(_e.current)})}var Fd=null,zd=_(50138),Yd=()=>{const{cancelButtonProps:L,cancelTextLocale:N,onCancel:_e}=(0,d.useContext)(Qn);return d.createElement(Ma.ZP,Object.assign({onClick:_e},L),N)},cp=()=>{const{confirmLoading:L,okButtonProps:N,okType:_e,okTextLocale:Ne,onOk:ir}=(0,d.useContext)(Qn);return d.createElement(Ma.ZP,Object.assign({},(0,Ra.nx)(_e),{loading:L,onClick:ir},N),Ne)},Bd=_(51877);function Pp(L,N){return d.createElement("span",{className:`${L}-close-x`},N||d.createElement(Ae.Z,{className:`${L}-close-icon`}))}const se=L=>{const{okText:N,okType:_e="primary",cancelText:Ne,confirmLoading:ir,onOk:Ar,onCancel:pn,okButtonProps:En,cancelButtonProps:In,footer:wn}=L,[$i]=(0,Nr.Z)("Modal",(0,Bd.A)()),Hi=N||($i==null?void 0:$i.okText),Ya=Ne||($i==null?void 0:$i.cancelText),Wi={confirmLoading:ir,okButtonProps:En,cancelButtonProps:In,okTextLocale:Hi,cancelTextLocale:Ya,okType:_e,onOk:Ar,onCancel:pn},Ka=d.useMemo(()=>Wi,(0,mu.Z)(Object.values(Wi)));let po;return typeof wn=="function"||typeof wn=="undefined"?(po=d.createElement(d.Fragment,null,d.createElement(Yd,null),d.createElement(cp,null)),typeof wn=="function"&&(po=wn(po,{OkBtn:cp,CancelBtn:Yd})),po=d.createElement(D,{value:Ka},po)):po=wn,d.createElement(zd.n,{disabled:!1},po)};var a=_(75199),s=_(78600),l=_(8264);const g=new s.E4("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),P=new s.E4("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),j=function(L){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:_e}=L,Ne=`${_e}-fade`,ir=N?"&":"";return[(0,l.R)(Ne,g,P,L.motionDurationMid,N),{[` - ${ir}${Ne}-enter, - ${ir}${Ne}-appear - `]:{opacity:0,animationTimingFunction:"linear"},[`${ir}${Ne}-leave`]:{animationTimingFunction:"linear"}}]},ne=new s.E4("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),ge=new s.E4("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),ze=new s.E4("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),ht=new s.E4("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),zt=new s.E4("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),qt=new s.E4("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),_r=new s.E4("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),Rr=new s.E4("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),Kr=new s.E4("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),qr=new s.E4("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),an=new s.E4("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),en=new s.E4("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),Hr={zoom:{inKeyframes:ne,outKeyframes:ge},"zoom-big":{inKeyframes:ze,outKeyframes:ht},"zoom-big-fast":{inKeyframes:ze,outKeyframes:ht},"zoom-left":{inKeyframes:_r,outKeyframes:Rr},"zoom-right":{inKeyframes:Kr,outKeyframes:qr},"zoom-up":{inKeyframes:zt,outKeyframes:qt},"zoom-down":{inKeyframes:an,outKeyframes:en}},Fn=(L,N)=>{const{antCls:_e}=L,Ne=`${_e}-${N}`,{inKeyframes:ir,outKeyframes:Ar}=Hr[N];return[(0,l.R)(Ne,ir,Ar,N==="zoom-big-fast"?L.motionDurationFast:L.motionDurationMid),{[` - ${Ne}-enter, - ${Ne}-appear - `]:{transform:"scale(0)",opacity:0,animationTimingFunction:L.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${Ne}-leave`]:{animationTimingFunction:L.motionEaseInOutCirc}}]};var ni=_(12228),Mi=_(93319);function wa(L){return{position:L,inset:0}}const za=L=>{const{componentCls:N,antCls:_e}=L;return[{[`${N}-root`]:{[`${N}${_e}-zoom-enter, ${N}${_e}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:L.motionDurationSlow,userSelect:"none"},[`${N}${_e}-zoom-leave ${N}-content`]:{pointerEvents:"none"},[`${N}-mask`]:Object.assign(Object.assign({},wa("fixed")),{zIndex:L.zIndexPopupBase,height:"100%",backgroundColor:L.colorBgMask,pointerEvents:"none",[`${N}-hidden`]:{display:"none"}}),[`${N}-wrap`]:Object.assign(Object.assign({},wa("fixed")),{zIndex:L.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch",[`&:has(${N}${_e}-zoom-enter), &:has(${N}${_e}-zoom-appear)`]:{pointerEvents:"none"}})}},{[`${N}-root`]:j(L)}]},oo=L=>{const{componentCls:N}=L;return[{[`${N}-root`]:{[`${N}-wrap-rtl`]:{direction:"rtl"},[`${N}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[N]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${L.screenSMMax}px)`]:{[N]:{maxWidth:"calc(100vw - 16px)",margin:`${(0,s.bf)(L.marginXS)} auto`},[`${N}-centered`]:{[N]:{flex:1}}}}},{[N]:Object.assign(Object.assign({},(0,a.Wf)(L)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${(0,s.bf)(L.calc(L.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:L.paddingLG,[`${N}-title`]:{margin:0,color:L.titleColor,fontWeight:L.fontWeightStrong,fontSize:L.titleFontSize,lineHeight:L.titleLineHeight,wordWrap:"break-word"},[`${N}-content`]:{position:"relative",backgroundColor:L.contentBg,backgroundClip:"padding-box",border:0,borderRadius:L.borderRadiusLG,boxShadow:L.boxShadow,pointerEvents:"auto",padding:L.contentPadding},[`${N}-close`]:Object.assign({position:"absolute",top:L.calc(L.modalHeaderHeight).sub(L.modalCloseBtnSize).div(2).equal(),insetInlineEnd:L.calc(L.modalHeaderHeight).sub(L.modalCloseBtnSize).div(2).equal(),zIndex:L.calc(L.zIndexPopupBase).add(10).equal(),padding:0,color:L.modalCloseIconColor,fontWeight:L.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:L.borderRadiusSM,width:L.modalCloseBtnSize,height:L.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${L.motionDurationMid}, background-color ${L.motionDurationMid}`,"&-x":{display:"flex",fontSize:L.fontSizeLG,fontStyle:"normal",lineHeight:`${(0,s.bf)(L.modalCloseBtnSize)}`,justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:L.modalIconHoverColor,backgroundColor:L.closeBtnHoverBg,textDecoration:"none"},"&:active":{backgroundColor:L.closeBtnActiveBg}},(0,a.Qy)(L)),[`${N}-header`]:{color:L.colorText,background:L.headerBg,borderRadius:`${(0,s.bf)(L.borderRadiusLG)} ${(0,s.bf)(L.borderRadiusLG)} 0 0`,marginBottom:L.headerMarginBottom,padding:L.headerPadding,borderBottom:L.headerBorderBottom},[`${N}-body`]:{fontSize:L.fontSize,lineHeight:L.lineHeight,wordWrap:"break-word",padding:L.bodyPadding},[`${N}-footer`]:{textAlign:"end",background:L.footerBg,marginTop:L.footerMarginTop,padding:L.footerPadding,borderTop:L.footerBorderTop,borderRadius:L.footerBorderRadius,[`> ${L.antCls}-btn + ${L.antCls}-btn`]:{marginInlineStart:L.marginXS}},[`${N}-open`]:{overflow:"hidden"}})},{[`${N}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${N}-content, - ${N}-body, - ${N}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${N}-confirm-body`]:{marginBottom:"auto"}}}]},Ds=L=>{const{componentCls:N}=L;return{[`${N}-root`]:{[`${N}-wrap-rtl`]:{direction:"rtl",[`${N}-confirm-body`]:{direction:"rtl"}}}}},lo=L=>{const N=L.padding,_e=L.fontSizeHeading5,Ne=L.lineHeightHeading5;return(0,ni.TS)(L,{modalHeaderHeight:L.calc(L.calc(Ne).mul(_e).equal()).add(L.calc(N).mul(2).equal()).equal(),modalFooterBorderColorSplit:L.colorSplit,modalFooterBorderStyle:L.lineType,modalFooterBorderWidth:L.lineWidth,modalIconHoverColor:L.colorIconHover,modalCloseIconColor:L.colorIcon,modalCloseBtnSize:L.fontHeight,modalConfirmIconSize:L.fontHeight,modalTitleHeight:L.calc(L.titleFontSize).mul(L.titleLineHeight).equal()})},cs=L=>({footerBg:"transparent",headerBg:L.colorBgElevated,titleLineHeight:L.lineHeightHeading5,titleFontSize:L.fontSizeHeading5,contentBg:L.colorBgElevated,titleColor:L.colorTextHeading,closeBtnHoverBg:L.wireframe?"transparent":L.colorFillContent,closeBtnActiveBg:L.wireframe?"transparent":L.colorFillContentHover,contentPadding:L.wireframe?0:`${(0,s.bf)(L.paddingMD)} ${(0,s.bf)(L.paddingContentHorizontalLG)}`,headerPadding:L.wireframe?`${(0,s.bf)(L.padding)} ${(0,s.bf)(L.paddingLG)}`:0,headerBorderBottom:L.wireframe?`${(0,s.bf)(L.lineWidth)} ${L.lineType} ${L.colorSplit}`:"none",headerMarginBottom:L.wireframe?0:L.marginXS,bodyPadding:L.wireframe?L.paddingLG:0,footerPadding:L.wireframe?`${(0,s.bf)(L.paddingXS)} ${(0,s.bf)(L.padding)}`:0,footerBorderTop:L.wireframe?`${(0,s.bf)(L.lineWidth)} ${L.lineType} ${L.colorSplit}`:"none",footerBorderRadius:L.wireframe?`0 0 ${(0,s.bf)(L.borderRadiusLG)} ${(0,s.bf)(L.borderRadiusLG)}`:0,footerMarginTop:L.wireframe?0:L.marginSM,confirmBodyPadding:L.wireframe?`${(0,s.bf)(L.padding*2)} ${(0,s.bf)(L.padding*2)} ${(0,s.bf)(L.paddingLG)}`:0,confirmIconMarginInlineEnd:L.wireframe?L.margin:L.marginSM,confirmBtnsMarginTop:L.wireframe?L.marginLG:L.marginSM});var as=(0,Mi.I$)("Modal",L=>{const N=lo(L);return[oo(N),Ds(N),za(N),Fn(N,"zoom")]},cs,{unitless:{titleLineHeight:!0}}),$s=function(L,N){var _e={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&N.indexOf(Ne)<0&&(_e[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ir=0,Ne=Object.getOwnPropertySymbols(L);ir{ps={x:L.pageX,y:L.pageY},setTimeout(()=>{ps=null},100)};bm()&&document.documentElement.addEventListener("click",fs,!0);var Ou=L=>{var N;const{getPopupContainer:_e,getPrefixCls:Ne,direction:ir,modal:Ar}=d.useContext(jh.E_),pn=Zh=>{const{onCancel:Kh}=L;Kh==null||Kh(Zh)},En=Zh=>{const{onOk:Kh}=L;Kh==null||Kh(Zh)},{prefixCls:In,className:wn,rootClassName:$i,open:Hi,wrapClassName:Ya,centered:Wi,getContainer:Ka,closeIcon:po,closable:Zo,focusTriggerAfterClose:Uo=!0,style:Oa,visible:rs,width:Du=520,footer:Us,classNames:vl,styles:Tl}=L,Ul=$s(L,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","closeIcon","closable","focusTriggerAfterClose","style","visible","width","footer","classNames","styles"]),ku=Ne("modal",In),Hl=Ne(),jl=(0,jp.Z)(ku),[Mh,Xh,Yh]=as(ku,jl),sd=Dc()(Ya,{[`${ku}-centered`]:!!Wi,[`${ku}-wrap-rtl`]:ir==="rtl"}),Nu=Us!==null&&d.createElement(se,Object.assign({},L,{onOk:En,onCancel:pn})),[ts,Rs]=Nf(Zo,typeof po!="undefined"?po:Ar==null?void 0:Ar.closeIcon,Zh=>Pp(ku,Zh),d.createElement(Ae.Z,{className:`${ku}-close-icon`}),!0),il=od(`.${ku}-content`),[Ic,Kc]=(0,tf.Cn)("Modal",Ul.zIndex);return Mh(d.createElement(up.BR,null,d.createElement(Rm.Ux,{status:!0,override:!0},d.createElement(xm.Z.Provider,{value:Kc},d.createElement(ad,Object.assign({width:Du},Ul,{zIndex:Ic,getContainer:Ka===void 0?_e:Ka,prefixCls:ku,rootClassName:Dc()(Xh,$i,Yh,jl),footer:Nu,visible:Hi!=null?Hi:rs,mousePosition:(N=Ul.mousePosition)!==null&&N!==void 0?N:ps,onClose:pn,closable:ts,closeIcon:Rs,focusTriggerAfterClose:Uo,transitionName:(0,bo.m)(Hl,"zoom",L.transitionName),maskTransitionName:(0,bo.m)(Hl,"fade",L.maskTransitionName),className:Dc()(Xh,wn,Ar==null?void 0:Ar.className),style:Object.assign(Object.assign({},Ar==null?void 0:Ar.style),Oa),classNames:Object.assign(Object.assign(Object.assign({},Ar==null?void 0:Ar.classNames),vl),{wrapper:Dc()(sd,vl==null?void 0:vl.wrapper)}),styles:Object.assign(Object.assign({},Ar==null?void 0:Ar.styles),Tl),panelRef:il}))))))};const wl=L=>{const{componentCls:N,titleFontSize:_e,titleLineHeight:Ne,modalConfirmIconSize:ir,fontSize:Ar,lineHeight:pn,modalTitleHeight:En,fontHeight:In,confirmBodyPadding:wn}=L,$i=`${N}-confirm`;return{[$i]:{"&-rtl":{direction:"rtl"},[`${L.antCls}-modal-header`]:{display:"none"},[`${$i}-body-wrapper`]:Object.assign({},(0,a.dF)()),[`&${N} ${N}-body`]:{padding:wn},[`${$i}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${L.iconCls}`]:{flex:"none",fontSize:ir,marginInlineEnd:L.confirmIconMarginInlineEnd,marginTop:L.calc(L.calc(In).sub(ir).equal()).div(2).equal()},[`&-has-title > ${L.iconCls}`]:{marginTop:L.calc(L.calc(En).sub(ir).equal()).div(2).equal()}},[`${$i}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:L.marginXS,maxWidth:`calc(100% - ${(0,s.bf)(L.calc(L.modalConfirmIconSize).add(L.marginSM).equal())})`},[`${$i}-title`]:{color:L.colorTextHeading,fontWeight:L.fontWeightStrong,fontSize:_e,lineHeight:Ne},[`${$i}-content`]:{color:L.colorText,fontSize:Ar,lineHeight:pn},[`${$i}-btns`]:{textAlign:"end",marginTop:L.confirmBtnsMarginTop,[`${L.antCls}-btn + ${L.antCls}-btn`]:{marginBottom:0,marginInlineStart:L.marginXS}}},[`${$i}-error ${$i}-body > ${L.iconCls}`]:{color:L.colorError},[`${$i}-warning ${$i}-body > ${L.iconCls}, - ${$i}-confirm ${$i}-body > ${L.iconCls}`]:{color:L.colorWarning},[`${$i}-info ${$i}-body > ${L.iconCls}`]:{color:L.colorInfo},[`${$i}-success ${$i}-body > ${L.iconCls}`]:{color:L.colorSuccess}}};var wo=(0,Mi.bk)(["Modal","confirm"],L=>{const N=lo(L);return[wl(N)]},cs,{order:-1e3}),Zs=function(L,N){var _e={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&N.indexOf(Ne)<0&&(_e[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ir=0,Ne=Object.getOwnPropertySymbols(L);irOa,(0,mu.Z)(Object.values(Oa))),Du=d.createElement(d.Fragment,null,d.createElement(B,null),d.createElement(fe,null)),Us=L.title!==void 0&&L.title!==null,vl=`${Ar}-body`;return d.createElement("div",{className:`${Ar}-body-wrapper`},d.createElement("div",{className:Dc()(vl,{[`${vl}-has-title`]:Us})},Hi,d.createElement("div",{className:`${Ar}-paragraph`},Us&&d.createElement("span",{className:`${Ar}-title`},L.title),d.createElement("div",{className:`${Ar}-content`},L.content))),In===void 0||typeof In=="function"?d.createElement(D,{value:rs},d.createElement("div",{className:`${Ar}-btns`},typeof In=="function"?In(Du,{OkBtn:fe,CancelBtn:B}):Du)):In,d.createElement(wo,{prefixCls:N}))}const Gf=L=>{const{close:N,zIndex:_e,afterClose:Ne,open:ir,keyboard:Ar,centered:pn,getContainer:En,maskStyle:In,direction:wn,prefixCls:$i,wrapClassName:Hi,rootPrefixCls:Ya,bodyStyle:Wi,closable:Ka=!1,closeIcon:po,modalRender:Zo,focusTriggerAfterClose:Uo,onConfirm:Oa,styles:rs}=L,Du=`${$i}-confirm`,Us=L.width||416,vl=L.style||{},Tl=L.mask===void 0?!0:L.mask,Ul=L.maskClosable===void 0?!1:L.maskClosable,ku=Dc()(Du,`${Du}-${L.type}`,{[`${Du}-rtl`]:wn==="rtl"},L.className),[,Hl]=(0,vr.ZP)(),jl=d.useMemo(()=>_e!==void 0?_e:Hl.zIndexPopupBase+tf.u6,[_e,Hl]);return d.createElement(Ou,{prefixCls:$i,className:ku,wrapClassName:Dc()({[`${Du}-centered`]:!!L.centered},Hi),onCancel:()=>{N==null||N({triggerCancel:!0}),Oa==null||Oa(!1)},open:ir,title:"",footer:null,transitionName:(0,bo.m)(Ya||"","zoom",L.transitionName),maskTransitionName:(0,bo.m)(Ya||"","fade",L.maskTransitionName),mask:Tl,maskClosable:Ul,style:vl,styles:Object.assign({body:Wi,mask:In},rs),width:Us,zIndex:jl,afterClose:Ne,keyboard:Ar,centered:pn,getContainer:En,closable:Ka,closeIcon:po,modalRender:Zo,focusTriggerAfterClose:Uo},d.createElement(Cl,Object.assign({},L,{confirmPrefixCls:Du})))};var gc=L=>{const{rootPrefixCls:N,iconPrefixCls:_e,direction:Ne,theme:ir}=L;return d.createElement(qp.ZP,{prefixCls:N,iconPrefixCls:_e,direction:Ne,theme:ir},d.createElement(Gf,Object.assign({},L)))},Lc=[];let oh="";function Rh(){return oh}const ph=L=>{var N,_e;const{prefixCls:Ne,getContainer:ir,direction:Ar}=L,pn=(0,Bd.A)(),En=(0,d.useContext)(jh.E_),In=Rh()||En.getPrefixCls(),wn=Ne||`${In}-modal`;let $i=ir;return $i===!1&&($i=void 0),d.createElement(gc,Object.assign({},L,{rootPrefixCls:In,prefixCls:wn,iconPrefixCls:En.iconPrefixCls,theme:En.theme,direction:Ar!=null?Ar:En.direction,locale:(_e=(N=En.locale)===null||N===void 0?void 0:N.Modal)!==null&&_e!==void 0?_e:pn,getContainer:$i}))};function mh(L){const N=(0,qp.w6)(),_e=document.createDocumentFragment();let Ne=Object.assign(Object.assign({},L),{close:En,open:!0}),ir;function Ar(){for(var wn=arguments.length,$i=new Array(wn),Hi=0;HiWi&&Wi.triggerCancel);L.onCancel&&Ya&&L.onCancel.apply(L,[()=>{}].concat((0,mu.Z)($i.slice(1))));for(let Wi=0;Wi{const $i=N.getPrefixCls(void 0,Rh()),Hi=N.getIconPrefixCls(),Ya=N.getTheme(),Wi=d.createElement(ph,Object.assign({},wn));(0,pf.s)(d.createElement(qp.ZP,{prefixCls:$i,iconPrefixCls:Hi,theme:Ya},N.holderRender?N.holderRender(Wi):Wi),_e)})}function En(){for(var wn=arguments.length,$i=new Array(wn),Hi=0;Hi{typeof L.afterClose=="function"&&L.afterClose(),Ar.apply(this,$i)}}),Ne.visible&&delete Ne.visible,pn(Ne)}function In(wn){typeof wn=="function"?Ne=wn(Ne):Ne=Object.assign(Object.assign({},Ne),wn),pn(Ne)}return pn(Ne),Lc.push(En),{destroy:En,update:In}}function rh(L){return Object.assign(Object.assign({},L),{type:"warning"})}function xf(L){return Object.assign(Object.assign({},L),{type:"info"})}function pc(L){return Object.assign(Object.assign({},L),{type:"success"})}function sf(L){return Object.assign(Object.assign({},L),{type:"error"})}function Kl(L){return Object.assign(Object.assign({},L),{type:"confirm"})}function Hc(L){let{rootPrefixCls:N}=L;oh=N}var Vh=_(94379),Ad=function(L,N){var _e={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&N.indexOf(Ne)<0&&(_e[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ir=0,Ne=Object.getOwnPropertySymbols(L);ir{const{prefixCls:N,className:_e,closeIcon:Ne,closable:ir,type:Ar,title:pn,children:En,footer:In}=L,wn=Ad(L,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:$i}=d.useContext(jh.E_),Hi=$i(),Ya=N||$i("modal"),Wi=(0,jp.Z)(Hi),[Ka,po,Zo]=as(Ya,Wi),Uo=`${Ya}-confirm`;let Oa={};return Ar?Oa={closable:ir!=null?ir:!1,title:"",footer:"",children:d.createElement(Cl,Object.assign({},L,{prefixCls:Ya,confirmPrefixCls:Uo,rootPrefixCls:Hi,content:En}))}:Oa={closable:ir!=null?ir:!0,title:pn,footer:In!==null&&d.createElement(se,Object.assign({},L)),children:En},Ka(d.createElement(Ru,Object.assign({prefixCls:Ya,className:Dc()(po,`${Ya}-pure-panel`,Ar&&Uo,Ar&&`${Uo}-${Ar}`,_e,Zo,Wi)},wn,{closeIcon:Pp(Ya,Ne),closable:ir},Oa)))};var Pc=(0,Vh.i)(Oo);function Nc(){const[L,N]=d.useState([]),_e=d.useCallback(Ne=>(N(ir=>[].concat((0,mu.Z)(ir),[Ne])),()=>{N(ir=>ir.filter(Ar=>Ar!==Ne))}),[]);return[L,_e]}var mc=_(69502),sh=function(L,N){var _e={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&N.indexOf(Ne)<0&&(_e[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ir=0,Ne=Object.getOwnPropertySymbols(L);ir{var _e,{afterClose:Ne,config:ir}=L,Ar=sh(L,["afterClose","config"]);const[pn,En]=d.useState(!0),[In,wn]=d.useState(ir),{direction:$i,getPrefixCls:Hi}=d.useContext(jh.E_),Ya=Hi("modal"),Wi=Hi(),Ka=()=>{var Oa;Ne(),(Oa=In.afterClose)===null||Oa===void 0||Oa.call(In)},po=function(){En(!1);for(var Oa=arguments.length,rs=new Array(Oa),Du=0;Duvl&&vl.triggerCancel);In.onCancel&&Us&&In.onCancel.apply(In,[()=>{}].concat((0,mu.Z)(rs.slice(1))))};d.useImperativeHandle(N,()=>({destroy:po,update:Oa=>{wn(rs=>Object.assign(Object.assign({},rs),Oa))}}));const Zo=(_e=In.okCancel)!==null&&_e!==void 0?_e:In.type==="confirm",[Uo]=(0,Nr.Z)("Modal",mc.Z.Modal);return d.createElement(gc,Object.assign({prefixCls:Ya,rootPrefixCls:Wi},In,{close:po,open:pn,afterClose:Ka,okText:In.okText||(Zo?Uo==null?void 0:Uo.okText:Uo==null?void 0:Uo.justOkText),direction:In.direction||$i,cancelText:In.cancelText||(Uo==null?void 0:Uo.cancelText)},Ar))};var p=d.forwardRef(A);let C=0;const W=d.memo(d.forwardRef((L,N)=>{const[_e,Ne]=Nc();return d.useImperativeHandle(N,()=>({patchElement:Ne}),[]),d.createElement(d.Fragment,null,_e)}));function pe(){const L=d.useRef(null),[N,_e]=d.useState([]);d.useEffect(()=>{N.length&&((0,mu.Z)(N).forEach(pn=>{pn()}),_e([]))},[N]);const Ne=d.useCallback(Ar=>function(En){var In;C+=1;const wn=d.createRef();let $i;const Hi=new Promise(Zo=>{$i=Zo});let Ya=!1,Wi;const Ka=d.createElement(p,{key:`modal-${C}`,config:Ar(En),ref:wn,afterClose:()=>{Wi==null||Wi()},isSilent:()=>Ya,onConfirm:Zo=>{$i(Zo)}});return Wi=(In=L.current)===null||In===void 0?void 0:In.patchElement(Ka),Wi&&Lc.push(Wi),{destroy:()=>{function Zo(){var Uo;(Uo=wn.current)===null||Uo===void 0||Uo.destroy()}wn.current?Zo():_e(Uo=>[].concat((0,mu.Z)(Uo),[Zo]))},update:Zo=>{function Uo(){var Oa;(Oa=wn.current)===null||Oa===void 0||Oa.update(Zo)}wn.current?Uo():_e(Oa=>[].concat((0,mu.Z)(Oa),[Uo]))},then:Zo=>(Ya=!0,Hi.then(Zo))}},[]);return[d.useMemo(()=>({info:Ne(xf),success:Ne(pc),error:Ne(sf),warning:Ne(rh),confirm:Ne(Kl)}),[]),d.createElement(W,{key:"modal-holder",ref:L})]}var Te=pe;function De(L){return mh(rh(L))}const dt=Ou;dt.useModal=Te,dt.info=function(N){return mh(xf(N))},dt.success=function(N){return mh(pc(N))},dt.error=function(N){return mh(sf(N))},dt.warning=De,dt.warn=De,dt.confirm=function(N){return mh(Kl(N))},dt.destroyAll=function(){for(;Lc.length;){const N=Lc.pop();N&&N()}},dt.config=Hc,dt._InternalPanelDoNotUseOrYouWillBeFired=Pc;var Ot=dt,nr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},Pr=nr,kr=_(12213),U=function(N,_e){return d.createElement(kr.Z,(0,Le.Z)({},N,{ref:_e,icon:Pr}))},z=d.forwardRef(U),te=_(16514),Re=_(13255),Lt=_(56348),or=/margin|padding|width|height|max|min|offset/,Lr={left:!0,top:!0},Ur={cssFloat:1,styleFloat:1,float:1};function cn(L){return L.nodeType===1?L.ownerDocument.defaultView.getComputedStyle(L,null):{}}function $n(L,N,_e){if(N=N.toLowerCase(),_e==="auto"){if(N==="height")return L.offsetHeight;if(N==="width")return L.offsetWidth}return N in Lr||(Lr[N]=or.test(N)),Lr[N]?parseFloat(_e)||0:_e}function Ai(L,N){var _e=arguments.length,Ne=cn(L);return N=Ur[N]?"cssFloat"in L.style?"cssFloat":"styleFloat":N,_e===1?Ne:$n(L,N,Ne[N]||L.style[N])}function Qo(L,N,_e){var Ne=arguments.length;if(N=Ur[N]?"cssFloat"in L.style?"cssFloat":"styleFloat":N,Ne===3)return typeof _e=="number"&&or.test(N)&&(_e="".concat(_e,"px")),L.style[N]=_e,_e;for(var ir in N)N.hasOwnProperty(ir)&&Qo(L,ir,N[ir]);return cn(L)}function Go(L){return L===document.body?document.documentElement.clientWidth:L.offsetWidth}function xo(L){return L===document.body?window.innerHeight||document.documentElement.clientHeight:L.offsetHeight}function Wo(){var L=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),N=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:L,height:N}}function hs(){var L=document.documentElement.clientWidth,N=window.innerHeight||document.documentElement.clientHeight;return{width:L,height:N}}function ms(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function Xo(L){var N=L.getBoundingClientRect(),_e=document.documentElement;return{left:N.left+(window.pageXOffset||_e.scrollLeft)-(_e.clientLeft||document.body.clientLeft||0),top:N.top+(window.pageYOffset||_e.scrollTop)-(_e.clientTop||document.body.clientTop||0)}}var ys=_(84381),gl=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],Bu=d.createContext(null),Gc=0;function uh(L,N){var _e=d.useState(function(){return Gc+=1,String(Gc)}),Ne=(0,Ve.Z)(_e,1),ir=Ne[0],Ar=d.useContext(Bu),pn={data:N,canPreview:L};return d.useEffect(function(){if(Ar)return Ar.register(ir,pn)},[]),d.useEffect(function(){Ar&&Ar.register(ir,pn)},[L,N]),ir}function Ef(L){return new Promise(function(N){var _e=document.createElement("img");_e.onerror=function(){return N(!1)},_e.onload=function(){return N(!0)},_e.src=L})}function lh(L){var N=L.src,_e=L.isCustomPlaceholder,Ne=L.fallback,ir=(0,d.useState)(_e?"loading":"normal"),Ar=(0,Ve.Z)(ir,2),pn=Ar[0],En=Ar[1],In=(0,d.useRef)(!1),wn=pn==="error";(0,d.useEffect)(function(){var Wi=!0;return Ef(N).then(function(Ka){!Ka&&Wi&&En("error")}),function(){Wi=!1}},[N]),(0,d.useEffect)(function(){_e&&!In.current?En("loading"):wn&&En("normal")},[N]);var $i=function(){En("normal")},Hi=function(Ka){In.current=!1,pn==="loading"&&Ka!==null&&Ka!==void 0&&Ka.complete&&(Ka.naturalWidth||Ka.naturalHeight)&&(In.current=!0,$i())},Ya=wn&&Ne?{src:Ne}:{onLoad:$i,src:N};return[Hi,Ya,pn]}var gp=_(79161);function Hd(L,N,_e,Ne){var ir=gp.unstable_batchedUpdates?function(pn){gp.unstable_batchedUpdates(_e,pn)}:_e;return L!=null&&L.addEventListener&&L.addEventListener(N,ir,Ne),{remove:function(){L!=null&&L.removeEventListener&&L.removeEventListener(N,ir,Ne)}}}var fp=_(70780),yp=_(90571),Ip={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function l0(L,N,_e,Ne){var ir=(0,d.useRef)(null),Ar=(0,d.useRef)([]),pn=(0,d.useState)(Ip),En=(0,Ve.Z)(pn,2),In=En[0],wn=En[1],$i=function(Ka){wn(Ip),Ne&&!(0,fp.Z)(Ip,In)&&Ne({transform:Ip,action:Ka})},Hi=function(Ka,po){ir.current===null&&(Ar.current=[],ir.current=(0,yp.Z)(function(){wn(function(Zo){var Uo=Zo;return Ar.current.forEach(function(Oa){Uo=(0,Er.Z)((0,Er.Z)({},Uo),Oa)}),ir.current=null,Ne==null||Ne({transform:Uo,action:po}),Uo})})),Ar.current.push((0,Er.Z)((0,Er.Z)({},In),Ka))},Ya=function(Ka,po,Zo,Uo,Oa){var rs=L.current,Du=rs.width,Us=rs.height,vl=rs.offsetWidth,Tl=rs.offsetHeight,Ul=rs.offsetLeft,ku=rs.offsetTop,Hl=Ka,jl=In.scale*Ka;jl>_e?(jl=_e,Hl=_e/In.scale):jlNe){if(N>0)return(0,te.Z)({},L,Ar);if(N<0&&irNe)return(0,te.Z)({},L,N<0?Ar:-Ar);return{}}function ml(L,N,_e,Ne){var ir=hs(),Ar=ir.width,pn=ir.height,En=null;return L<=Ar&&N<=pn?En={x:0,y:0}:(L>Ar||N>pn)&&(En=(0,Er.Z)((0,Er.Z)({},Nh("x",_e,L,Ar)),Nh("y",Ne,N,pn))),En}var vu=1,Q=1;function ae(L,N,_e,Ne,ir,Ar,pn){var En=ir.rotate,In=ir.scale,wn=ir.x,$i=ir.y,Hi=(0,d.useState)(!1),Ya=(0,Ve.Z)(Hi,2),Wi=Ya[0],Ka=Ya[1],po=(0,d.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),Zo=function(Us){!N||Us.button!==0||(Us.preventDefault(),Us.stopPropagation(),po.current={diffX:Us.pageX-wn,diffY:Us.pageY-$i,transformX:wn,transformY:$i},Ka(!0))},Uo=function(Us){_e&&Wi&&Ar({x:Us.pageX-po.current.diffX,y:Us.pageY-po.current.diffY},"move")},Oa=function(){if(_e&&Wi){Ka(!1);var Us=po.current,vl=Us.transformX,Tl=Us.transformY,Ul=wn!==vl&&$i!==Tl;if(!Ul)return;var ku=L.current.offsetWidth*In,Hl=L.current.offsetHeight*In,jl=L.current.getBoundingClientRect(),Mh=jl.left,Xh=jl.top,Yh=En%180!==0,sd=ml(Yh?Hl:ku,Yh?ku:Hl,Mh,Xh);sd&&Ar((0,Er.Z)({},sd),"dragRebound")}},rs=function(Us){if(!(!_e||Us.deltaY==0)){var vl=Math.abs(Us.deltaY/100),Tl=Math.min(vl,Q),Ul=vu+Tl*Ne;Us.deltaY>0&&(Ul=vu/Ul),pn(Ul,"wheel",Us.clientX,Us.clientY)}};return(0,d.useEffect)(function(){var Du,Us,vl,Tl;if(N){vl=Hd(window,"mouseup",Oa,!1),Tl=Hd(window,"mousemove",Uo,!1);try{window.top!==window.self&&(Du=Hd(window.top,"mouseup",Oa,!1),Us=Hd(window.top,"mousemove",Uo,!1))}catch(Ul){(0,wh.Kp)(!1,"[rc-image] ".concat(Ul))}}return function(){var Ul,ku,Hl,jl;(Ul=vl)===null||Ul===void 0||Ul.remove(),(ku=Tl)===null||ku===void 0||ku.remove(),(Hl=Du)===null||Hl===void 0||Hl.remove(),(jl=Us)===null||jl===void 0||jl.remove()}},[_e,Wi,wn,$i,En,N]),{isMoving:Wi,onMouseDown:Zo,onMouseMove:Uo,onMouseUp:Oa,onWheel:rs}}function ue(L,N){var _e=L.x-N.x,Ne=L.y-N.y;return Math.hypot(_e,Ne)}function $e(L,N,_e,Ne){var ir=ue(L,_e),Ar=ue(N,Ne);if(ir===0&&Ar===0)return[L.x,L.y];var pn=ir/(ir+Ar),En=L.x+pn*(N.x-L.x),In=L.y+pn*(N.y-L.y);return[En,In]}function Xt(L,N,_e,Ne,ir,Ar,pn){var En=ir.rotate,In=ir.scale,wn=ir.x,$i=ir.y,Hi=(0,d.useState)(!1),Ya=(0,Ve.Z)(Hi,2),Wi=Ya[0],Ka=Ya[1],po=(0,d.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),Zo=function(Us){po.current=(0,Er.Z)((0,Er.Z)({},po.current),Us)},Uo=function(Us){if(N){Us.stopPropagation(),Ka(!0);var vl=Us.touches,Tl=vl===void 0?[]:vl;Tl.length>1?Zo({point1:{x:Tl[0].clientX,y:Tl[0].clientY},point2:{x:Tl[1].clientX,y:Tl[1].clientY},eventType:"touchZoom"}):Zo({point1:{x:Tl[0].clientX-wn,y:Tl[0].clientY-$i},eventType:"move"})}},Oa=function(Us){var vl=Us.touches,Tl=vl===void 0?[]:vl,Ul=po.current,ku=Ul.point1,Hl=Ul.point2,jl=Ul.eventType;if(Tl.length>1&&jl==="touchZoom"){var Mh={x:Tl[0].clientX,y:Tl[0].clientY},Xh={x:Tl[1].clientX,y:Tl[1].clientY},Yh=$e(ku,Hl,Mh,Xh),sd=(0,Ve.Z)(Yh,2),Nu=sd[0],ts=sd[1],Rs=ue(Mh,Xh)/ue(ku,Hl);pn(Rs,"touchZoom",Nu,ts,!0),Zo({point1:Mh,point2:Xh,eventType:"touchZoom"})}else jl==="move"&&(Ar({x:Tl[0].clientX-ku.x,y:Tl[0].clientY-ku.y},"move"),Zo({eventType:"move"}))},rs=function(){if(_e){if(Wi&&Ka(!1),Zo({eventType:"none"}),Ne>In)return Ar({x:0,y:0,scale:Ne},"touchZoom");var Us=L.current.offsetWidth*In,vl=L.current.offsetHeight*In,Tl=L.current.getBoundingClientRect(),Ul=Tl.left,ku=Tl.top,Hl=En%180!==0,jl=ml(Hl?vl:Us,Hl?Us:vl,Ul,ku);jl&&Ar((0,Er.Z)({},jl),"dragRebound")}};return(0,d.useEffect)(function(){var Du;return _e&&N&&(Du=Hd(window,"touchmove",function(Us){return Us.preventDefault()},{passive:!1})),function(){var Us;(Us=Du)===null||Us===void 0||Us.remove()}},[_e,N]),{isTouching:Wi,onTouchStart:Uo,onTouchMove:Oa,onTouchEnd:rs}}var Sr=function(N){var _e=N.visible,Ne=N.maskTransitionName,ir=N.getContainer,Ar=N.prefixCls,pn=N.rootClassName,En=N.icons,In=N.countRender,wn=N.showSwitch,$i=N.showProgress,Hi=N.current,Ya=N.transform,Wi=N.count,Ka=N.scale,po=N.minScale,Zo=N.maxScale,Uo=N.closeIcon,Oa=N.onSwitchLeft,rs=N.onSwitchRight,Du=N.onClose,Us=N.onZoomIn,vl=N.onZoomOut,Tl=N.onRotateRight,Ul=N.onRotateLeft,ku=N.onFlipX,Hl=N.onFlipY,jl=N.toolbarRender,Mh=N.zIndex,Xh=(0,d.useContext)(Bu),Yh=En.rotateLeft,sd=En.rotateRight,Nu=En.zoomIn,ts=En.zoomOut,Rs=En.close,il=En.left,Ic=En.right,Kc=En.flipX,Zh=En.flipY,Kh="".concat(Ar,"-operations-operation");d.useEffect(function(){var bd=function(Kd){Kd.keyCode===bi.Z.ESC&&Du()};return _e&&window.addEventListener("keydown",bd),function(){window.removeEventListener("keydown",bd)}},[_e]);var hp=[{icon:Zh,onClick:Hl,type:"flipY"},{icon:Kc,onClick:ku,type:"flipX"},{icon:Yh,onClick:Ul,type:"rotateLeft"},{icon:sd,onClick:Tl,type:"rotateRight"},{icon:ts,onClick:vl,type:"zoomOut",disabled:Ka<=po},{icon:Nu,onClick:Us,type:"zoomIn",disabled:Ka===Zo}],Id=hp.map(function(bd){var dp,Kd=bd.icon,L0=bd.onClick,x0=bd.type,D0=bd.disabled;return d.createElement("div",{className:Dc()(Kh,(dp={},(0,te.Z)(dp,"".concat(Ar,"-operations-operation-").concat(x0),!0),(0,te.Z)(dp,"".concat(Ar,"-operations-operation-disabled"),!!D0),dp)),onClick:L0,key:x0},Kd)}),pd=d.createElement("div",{className:"".concat(Ar,"-operations")},Id);return d.createElement(io.ZP,{visible:_e,motionName:Ne},function(bd){var dp=bd.className,Kd=bd.style;return d.createElement(Bt.Z,{open:!0,getContainer:ir!=null?ir:document.body},d.createElement("div",{className:Dc()("".concat(Ar,"-operations-wrapper"),dp,pn),style:(0,Er.Z)((0,Er.Z)({},Kd),{},{zIndex:Mh})},Uo===null?null:d.createElement("button",{className:"".concat(Ar,"-close"),onClick:Du},Uo||Rs),wn&&d.createElement(d.Fragment,null,d.createElement("div",{className:Dc()("".concat(Ar,"-switch-left"),(0,te.Z)({},"".concat(Ar,"-switch-left-disabled"),Hi===0)),onClick:Oa},il),d.createElement("div",{className:Dc()("".concat(Ar,"-switch-right"),(0,te.Z)({},"".concat(Ar,"-switch-right-disabled"),Hi===Wi-1)),onClick:rs},Ic)),d.createElement("div",{className:"".concat(Ar,"-footer")},$i&&d.createElement("div",{className:"".concat(Ar,"-progress")},In?In(Hi+1,Wi):"".concat(Hi+1," / ").concat(Wi)),jl?jl(pd,(0,Er.Z)({icons:{flipYIcon:Id[0],flipXIcon:Id[1],rotateLeftIcon:Id[2],rotateRightIcon:Id[3],zoomOutIcon:Id[4],zoomInIcon:Id[5]},actions:{onFlipY:Hl,onFlipX:ku,onRotateLeft:Ul,onRotateRight:Tl,onZoomOut:vl,onZoomIn:Us},transform:Ya},Xh?{current:Hi,total:Wi}:{})):pd)))})},Dr=Sr,fn=["fallback","src","imgRef"],Bn=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],Un=function(N){var _e=N.fallback,Ne=N.src,ir=N.imgRef,Ar=(0,Lt.Z)(N,fn),pn=lh({src:Ne,fallback:_e}),En=(0,Ve.Z)(pn,2),In=En[0],wn=En[1];return d.createElement("img",(0,Le.Z)({ref:function(Hi){ir.current=Hi,In(Hi)}},Ar,wn))},ta=function(N){var _e=N.prefixCls,Ne=N.src,ir=N.alt,Ar=N.fallback,pn=N.movable,En=pn===void 0?!0:pn,In=N.onClose,wn=N.visible,$i=N.icons,Hi=$i===void 0?{}:$i,Ya=N.rootClassName,Wi=N.closeIcon,Ka=N.getContainer,po=N.current,Zo=po===void 0?0:po,Uo=N.count,Oa=Uo===void 0?1:Uo,rs=N.countRender,Du=N.scaleStep,Us=Du===void 0?.5:Du,vl=N.minScale,Tl=vl===void 0?1:vl,Ul=N.maxScale,ku=Ul===void 0?50:Ul,Hl=N.transitionName,jl=Hl===void 0?"zoom":Hl,Mh=N.maskTransitionName,Xh=Mh===void 0?"fade":Mh,Yh=N.imageRender,sd=N.imgCommonProps,Nu=N.toolbarRender,ts=N.onTransform,Rs=N.onChange,il=(0,Lt.Z)(N,Bn),Ic=(0,d.useRef)(),Kc=(0,d.useContext)(Bu),Zh=Kc&&Oa>1,Kh=Kc&&Oa>=1,hp=(0,d.useState)(!0),Id=(0,Ve.Z)(hp,2),pd=Id[0],bd=Id[1],dp=l0(Ic,Tl,ku,ts),Kd=dp.transform,L0=dp.resetTransform,x0=dp.updateTransform,D0=dp.dispatchZoomChange,wp=ae(Ic,En,wn,Us,Kd,x0,D0),dm=wp.isMoving,am=wp.onMouseDown,Um=wp.onWheel,w0=Xt(Ic,En,wn,Tl,Kd,x0,D0),Om=w0.isTouching,Nm=w0.onTouchStart,om=w0.onTouchMove,Lm=w0.onTouchEnd,jm=Kd.rotate,Sm=Kd.scale,Cm=Dc()((0,te.Z)({},"".concat(_e,"-moving"),dm));(0,d.useEffect)(function(){pd||bd(!0)},[pd]);var fv=function(){L0("close")},uy=function(){D0(vu+Us,"zoomIn")},hv=function(){D0(vu/(vu+Us),"zoomOut")},dv=function(){x0({rotate:jm+90},"rotateRight")},iv=function(){x0({rotate:jm-90},"rotateLeft")},Mg=function(){x0({flipX:!Kd.flipX},"flipX")},T0=function(){x0({flipY:!Kd.flipY},"flipY")},Pg=function(ym){ym==null||ym.preventDefault(),ym==null||ym.stopPropagation(),Zo>0&&(bd(!1),L0("prev"),Rs==null||Rs(Zo-1,Zo))},Jm=function(ym){ym==null||ym.preventDefault(),ym==null||ym.stopPropagation(),Zo({position:L||"absolute",inset:0}),Xg=L=>{const{iconCls:N,motionDurationSlow:_e,paddingXXS:Ne,marginXXS:ir,prefixCls:Ar,colorTextLightSolid:pn}=L;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:pn,background:new rv.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${_e}`,[`.${Ar}-mask-info`]:Object.assign(Object.assign({},a.vS),{padding:`0 ${(0,s.bf)(Ne)}`,[N]:{marginInlineEnd:ir,svg:{verticalAlign:"baseline"}}})}},Ry=L=>{const{previewCls:N,modalMaskBg:_e,paddingSM:Ne,marginXL:ir,margin:Ar,paddingLG:pn,previewOperationColorDisabled:En,previewOperationHoverColor:In,motionDurationSlow:wn,iconCls:$i,colorTextLightSolid:Hi}=L,Ya=new rv.C(_e).setAlpha(.1),Wi=Ya.clone().setAlpha(.2);return{[`${N}-footer`]:{position:"fixed",bottom:ir,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:L.previewOperationColor},[`${N}-progress`]:{marginBottom:Ar},[`${N}-close`]:{position:"fixed",top:ir,right:{_skip_check_:!0,value:ir},display:"flex",color:Hi,backgroundColor:Ya.toRgbString(),borderRadius:"50%",padding:Ne,outline:0,border:0,cursor:"pointer",transition:`all ${wn}`,"&:hover":{backgroundColor:Wi.toRgbString()},[`& > ${$i}`]:{fontSize:L.previewOperationSize}},[`${N}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${(0,s.bf)(pn)}`,backgroundColor:Ya.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:Ne,padding:Ne,cursor:"pointer",transition:`all ${wn}`,userSelect:"none",[`&:not(${N}-operations-operation-disabled):hover > ${$i}`]:{color:In},"&-disabled":{color:En,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${$i}`]:{fontSize:L.previewOperationSize}}}}},mg=L=>{const{modalMaskBg:N,iconCls:_e,previewOperationColorDisabled:Ne,previewCls:ir,zIndexPopup:Ar,motionDurationSlow:pn}=L,En=new rv.C(N).setAlpha(.1),In=En.clone().setAlpha(.2);return{[`${ir}-switch-left, ${ir}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:L.calc(Ar).add(1).equal({unit:!1}),display:"flex",alignItems:"center",justifyContent:"center",width:L.imagePreviewSwitchSize,height:L.imagePreviewSwitchSize,marginTop:L.calc(L.imagePreviewSwitchSize).mul(-1).div(2).equal(),color:L.previewOperationColor,background:En.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${pn}`,userSelect:"none","&:hover":{background:In.toRgbString()},["&-disabled"]:{"&, &:hover":{color:Ne,background:"transparent",cursor:"not-allowed",[`> ${_e}`]:{cursor:"not-allowed"}}},[`> ${_e}`]:{fontSize:L.previewOperationSize}},[`${ir}-switch-left`]:{insetInlineStart:L.marginSM},[`${ir}-switch-right`]:{insetInlineEnd:L.marginSM}}},Yg=L=>{const{motionEaseOut:N,previewCls:_e,motionDurationSlow:Ne,componentCls:ir}=L;return[{[`${ir}-preview-root`]:{[_e]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${_e}-body`]:Object.assign(Object.assign({},Iv()),{overflow:"hidden"}),[`${_e}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${Ne} ${N} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},Iv()),{transition:`transform ${Ne} ${N} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${_e}-moving`]:{[`${_e}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${ir}-preview-root`]:{[`${_e}-wrap`]:{zIndex:L.zIndexPopup}}},{[`${ir}-preview-operations-wrapper`]:{position:"fixed",zIndex:L.calc(L.zIndexPopup).add(1).equal({unit:!1})},"&":[Ry(L),mg(L)]}]},Oy=L=>{const{componentCls:N}=L;return{[N]:{position:"relative",display:"inline-block",[`${N}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${N}-img-placeholder`]:{backgroundColor:L.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${N}-mask`]:Object.assign({},Xg(L)),[`${N}-mask:hover`]:{opacity:1},[`${N}-placeholder`]:Object.assign({},Iv())}}},zv=L=>{const{previewCls:N}=L;return{[`${N}-root`]:Fn(L,"zoom"),["&"]:j(L,!0)}},Kg=L=>({zIndexPopup:L.zIndexPopupBase+80,previewOperationColor:new rv.C(L.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new rv.C(L.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new rv.C(L.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:L.fontSizeIcon*1.5});var vg=(0,Mi.I$)("Image",L=>{const N=`${L.componentCls}-preview`,_e=(0,ni.TS)(L,{previewCls:N,modalMaskBg:new rv.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:L.controlHeightLG});return[Oy(_e),Yg(_e),za((0,ni.TS)(_e,{componentCls:N})),zv(_e)]},Kg),qm=function(L,N){var _e={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&N.indexOf(Ne)<0&&(_e[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ir=0,Ne=Object.getOwnPropertySymbols(L);ir{var{previewPrefixCls:N,preview:_e}=L,Ne=qm(L,["previewPrefixCls","preview"]);const{getPrefixCls:ir}=d.useContext(jh.E_),Ar=ir("image",N),pn=`${Ar}-preview`,En=ir(),In=(0,jp.Z)(Ar),[wn,$i,Hi]=vg(Ar,In),[Ya]=(0,tf.Cn)("ImagePreview",typeof _e=="object"?_e.zIndex:void 0),Wi=d.useMemo(()=>{var Ka;if(_e===!1)return _e;const po=typeof _e=="object"?_e:{},Zo=Dc()($i,Hi,In,(Ka=po.rootClassName)!==null&&Ka!==void 0?Ka:"");return Object.assign(Object.assign({},po),{transitionName:(0,bo.m)(En,"zoom",po.transitionName),maskTransitionName:(0,bo.m)(En,"fade",po.maskTransitionName),rootClassName:Zo,zIndex:Ya})},[_e]);return wn(d.createElement(Wf.PreviewGroup,Object.assign({preview:Wi,previewPrefixCls:pn,icons:lv},Ne)))},gg=function(L,N){var _e={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&N.indexOf(Ne)<0&&(_e[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ir=0,Ne=Object.getOwnPropertySymbols(L);ir{var N;const{prefixCls:_e,preview:Ne,className:ir,rootClassName:Ar,style:pn}=L,En=gg(L,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:In,locale:wn=mc.Z,getPopupContainer:$i,image:Hi}=d.useContext(jh.E_),Ya=In("image",_e),Wi=In(),Ka=wn.Image||mc.Z.Image,po=(0,jp.Z)(Ya),[Zo,Uo,Oa]=vg(Ya,po),rs=Dc()(Ar,Uo,Oa,po),Du=Dc()(ir,Uo,Hi==null?void 0:Hi.className),[Us]=(0,tf.Cn)("ImagePreview",typeof Ne=="object"?Ne.zIndex:void 0),vl=d.useMemo(()=>{var Ul;if(Ne===!1)return Ne;const ku=typeof Ne=="object"?Ne:{},{getContainer:Hl,closeIcon:jl}=ku,Mh=gg(ku,["getContainer","closeIcon"]);return Object.assign(Object.assign({mask:d.createElement("div",{className:`${Ya}-mask-info`},d.createElement(z,null),Ka==null?void 0:Ka.preview),icons:lv},Mh),{getContainer:Hl!=null?Hl:$i,transitionName:(0,bo.m)(Wi,"zoom",ku.transitionName),maskTransitionName:(0,bo.m)(Wi,"fade",ku.maskTransitionName),zIndex:Us,closeIcon:jl!=null?jl:(Ul=Hi==null?void 0:Hi.preview)===null||Ul===void 0?void 0:Ul.closeIcon})},[Ne,Ka,(N=Hi==null?void 0:Hi.preview)===null||N===void 0?void 0:N.closeIcon]),Tl=Object.assign(Object.assign({},Hi==null?void 0:Hi.style),pn);return Zo(d.createElement(Wf,Object.assign({prefixCls:Ya,preview:vl,rootClassName:rs,className:Du,style:Tl},En)))};g_.PreviewGroup=Zv;var p1=g_,m1;function K0(L,N){return N||(N=L.slice(0)),Object.freeze(Object.defineProperties(L,{raw:{value:Object.freeze(N)}}))}var Or=function(){var N=e0.Z.useToken,_e=N(),Ne=_e.token,ir=Ne.colorText,Ar=Ne.colorTextDescription,pn=Ne.colorBgContainer,En=Ne.colorBorder,In=Ne.borderRadius;return{exportImageIcon:(0,_d.iv)(m1||(m1=K0([` - color: `,`; - background: `,` !important; - border-color: `,`; - border-radius: `,`px; - - .l7-iconfont { - fill: `,`; - } - - &:hover { - .l7-iconfont { - fill: `,`; - } - } - `])),Ar,pn,En,In,Ar,ir)}},yg=Or;function Ly(L,N){return y_(L)||qg(L,N)||v1(L,N)||vA()}function vA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v1(L,N){if(L){if(typeof L=="string")return _g(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return _g(L,N)}}function _g(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof po=="number"){var Oa,rs=Ka[Zo],Du=rs+po,Us=[];Ne.forEach(function(Hl){Us.push(Hl.value)}),Us.push(L,N),Us.push(En(rs));var vl=po>0?1:-1;Uo==="unit"?Us.push(En(rs+vl*_e)):Us.push(En(Du)),Us=Us.filter(function(Hl){return Hl!==null}).filter(function(Hl){return po<0?Hl<=rs:Hl>=rs}),Uo==="unit"&&(Us=Us.filter(function(Hl){return Hl!==rs}));var Tl=Uo==="unit"?rs:Du;Oa=Us[0];var Ul=Math.abs(Oa-Tl);if(Us.forEach(function(Hl){var jl=Math.abs(Hl-Tl);jl1){var ku=(0,mu.Z)(Ka);return ku[Zo]=Oa,Wi(ku,po-vl,Zo,Uo)}return Oa}else{if(po==="min")return L;if(po==="max")return N}},$i=function(Ka,po,Zo){var Uo=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",Oa=Ka[Zo],rs=wn(Ka,po,Zo,Uo);return{value:rs,changed:rs!==Oa}},Hi=function(Ka){return Ar===null&&Ka===0||typeof Ar=="number"&&Ka3&&arguments[3]!==void 0?arguments[3]:"unit",Oa=Ka.map(In),rs=Oa[Zo],Du=wn(Oa,po,Zo,Uo);if(Oa[Zo]=Du,ir===!1){var Us=Ar||0;Zo>0&&Oa[Zo-1]!==rs&&(Oa[Zo]=Math.max(Oa[Zo],Oa[Zo-1]+Us)),Zo0;ku-=1)for(var Hl=!0;Hi(Oa[ku]-Oa[ku-1])&&Hl;){var jl=$i(Oa,-1,ku-1);Oa[ku-1]=jl.value,Hl=jl.changed}for(var Mh=Oa.length-1;Mh>0;Mh-=1)for(var Xh=!0;Hi(Oa[Mh]-Oa[Mh-1])&&Xh;){var Yh=$i(Oa,-1,Mh-1);Oa[Mh-1]=Yh.value,Xh=Yh.changed}for(var sd=0;sd=0?ts:!1},[ts,jm]),Cm=d.useMemo(function(){var M0=Object.keys(Kd||{});return M0.map(function(ud){var Mf=Kd[ud],q0={value:Number(ud)};return Mf&&(0,Re.Z)(Mf)==="object"&&!d.isValidElement(Mf)&&("label"in Mf||"style"in Mf)?(q0.style=Mf.style,q0.label=Mf.label):q0.label=Mf,q0}).filter(function(ud){var Mf=ud.label;return Mf||typeof Mf=="number"}).sort(function(ud,Mf){return ud.value-Mf.value})},[Kd]),fv=C1(om,Lm,jm,Cm,sd,Sm),uy=(0,Ve.Z)(fv,2),hv=uy[0],dv=uy[1],iv=(0,ys.Z)(Tl,{value:vl}),Mg=(0,Ve.Z)(iv,2),T0=Mg[0],Pg=Mg[1],Jm=d.useMemo(function(){var M0=T0==null?[]:Array.isArray(T0)?T0:[T0],ud=(0,Ve.Z)(M0,1),Mf=ud[0],q0=Mf===void 0?om:Mf,pl=T0===null?[]:[q0];if(Ul){if(pl=(0,mu.Z)(M0),ku||T0===void 0){var pm=ku>=0?ku+1:2;for(pl=pl.slice(0,pm);pl.length=0&&w0.current.focus(M0)}bx(null)},[I1]);var hE=d.useMemo(function(){return Rs&&jm===null?!1:Rs},[Rs,jm]),ob=function(ud,Mf){ib(ud,Mf),jl==null||jl(rg(av.current))},Ex=nb!==-1;d.useEffect(function(){if(!Ex){var M0=Jm.lastIndexOf(lE);w0.current.focus(M0)}},[Ex]);var cy=d.useMemo(function(){return(0,mu.Z)(M_).sort(function(M0,ud){return M0-ud})},[M_]),Sx=d.useMemo(function(){return Ul?[cy[0],cy[cy.length-1]]:[om,cy[0]]},[cy,Ul,om]),sb=(0,Ve.Z)(Sx,2),Xy=sb[0],ub=sb[1];d.useImperativeHandle(N,function(){return{focus:function(){w0.current.focus(0)},blur:function(){var ud=document,Mf=ud.activeElement;Om.current.contains(Mf)&&(Mf==null||Mf.blur())}}}),d.useEffect(function(){Wi&&w0.current.focus(0)},[]);var dE=d.useMemo(function(){return{min:om,max:Lm,direction:Nm,disabled:$i,keyboard:Ya,step:jm,included:Zh,includedStart:Xy,includedEnd:ub,range:Ul,tabIndex:wp,ariaLabelForHandle:dm,ariaLabelledByForHandle:am,ariaValueTextFormatterForHandle:Um,styles:In||{},classNames:En||{}}},[om,Lm,Nm,$i,Ya,jm,Zh,Xy,ub,Ul,wp,dm,am,Um,In,En]);return d.createElement(bv.Provider,{value:dE},d.createElement("div",{ref:Om,className:Dc()(ir,Ar,(_e={},(0,te.Z)(_e,"".concat(ir,"-disabled"),$i),(0,te.Z)(_e,"".concat(ir,"-vertical"),Ic),(0,te.Z)(_e,"".concat(ir,"-horizontal"),!Ic),(0,te.Z)(_e,"".concat(ir,"-with-marks"),Cm.length),_e)),style:pn,onMouseDown:cE},d.createElement("div",{className:Dc()("".concat(ir,"-rail"),En==null?void 0:En.rail),style:(0,Er.Z)((0,Er.Z)({},pd),In==null?void 0:In.rail)}),d.createElement(de,{prefixCls:ir,style:hp,values:cy,startPoint:Kh,onStartMove:hE?ob:null}),d.createElement(k,{prefixCls:ir,marks:Cm,dots:L0,style:bd,activeStyle:dp}),d.createElement(zy,{ref:w0,prefixCls:ir,style:Id,values:M_,draggingIndex:nb,onStartMove:ob,onOffsetChange:xx,onFocus:Ka,onBlur:po,handleRender:x0,onChangeComplete:Vm}),d.createElement(j2,{prefixCls:ir,marks:Cm,onClick:Ax})))}),ke=be,Be=ke;function yt(L){var N=L.children,_e=L.prefixCls,Ne=L.id,ir=L.overlayInnerStyle,Ar=L.className,pn=L.style;return d.createElement("div",{className:Dc()("".concat(_e,"-content"),Ar),style:pn},d.createElement("div",{className:"".concat(_e,"-inner"),id:Ne,role:"tooltip",style:ir},typeof N=="function"?N():N))}var Tt=_(35593),nt={shiftX:64,adjustY:1},Vt={adjustX:1,shiftY:!0},$t=[0,0],ur={left:{points:["cr","cl"],overflow:Vt,offset:[-4,0],targetOffset:$t},right:{points:["cl","cr"],overflow:Vt,offset:[4,0],targetOffset:$t},top:{points:["bc","tc"],overflow:nt,offset:[0,-4],targetOffset:$t},bottom:{points:["tc","bc"],overflow:nt,offset:[0,4],targetOffset:$t},topLeft:{points:["bl","tl"],overflow:nt,offset:[0,-4],targetOffset:$t},leftTop:{points:["tr","tl"],overflow:Vt,offset:[-4,0],targetOffset:$t},topRight:{points:["br","tr"],overflow:nt,offset:[0,-4],targetOffset:$t},rightTop:{points:["tl","tr"],overflow:Vt,offset:[4,0],targetOffset:$t},bottomRight:{points:["tr","br"],overflow:nt,offset:[0,4],targetOffset:$t},rightBottom:{points:["bl","br"],overflow:Vt,offset:[4,0],targetOffset:$t},bottomLeft:{points:["tl","bl"],overflow:nt,offset:[0,4],targetOffset:$t},leftBottom:{points:["br","bl"],overflow:Vt,offset:[-4,0],targetOffset:$t}},yr=null,Ri=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],ii=function(N,_e){var Ne=N.overlayClassName,ir=N.trigger,Ar=ir===void 0?["hover"]:ir,pn=N.mouseEnterDelay,En=pn===void 0?0:pn,In=N.mouseLeaveDelay,wn=In===void 0?.1:In,$i=N.overlayStyle,Hi=N.prefixCls,Ya=Hi===void 0?"rc-tooltip":Hi,Wi=N.children,Ka=N.onVisibleChange,po=N.afterVisibleChange,Zo=N.transitionName,Uo=N.animation,Oa=N.motion,rs=N.placement,Du=rs===void 0?"right":rs,Us=N.align,vl=Us===void 0?{}:Us,Tl=N.destroyTooltipOnHide,Ul=Tl===void 0?!1:Tl,ku=N.defaultVisible,Hl=N.getTooltipContainer,jl=N.overlayInnerStyle,Mh=N.arrowContent,Xh=N.overlay,Yh=N.id,sd=N.showArrow,Nu=sd===void 0?!0:sd,ts=(0,Lt.Z)(N,Ri),Rs=(0,d.useRef)(null);(0,d.useImperativeHandle)(_e,function(){return Rs.current});var il=(0,Er.Z)({},ts);"visible"in N&&(il.popupVisible=N.visible);var Ic=function(){return d.createElement(yt,{key:"content",prefixCls:Ya,id:Yh,overlayInnerStyle:jl},Xh)};return d.createElement(Tt.Z,(0,Le.Z)({popupClassName:Ne,prefixCls:Ya,popup:Ic,action:Ar,builtinPlacements:ur,popupPlacement:Du,ref:Rs,popupAlign:vl,getPopupContainer:Hl,onPopupVisibleChange:Ka,afterPopupVisibleChange:po,popupTransitionName:Zo,popupAnimation:Uo,popupMotion:Oa,defaultPopupVisible:ku,autoDestroy:Ul,mouseLeaveDelay:wn,popupStyle:$i,mouseEnterDelay:En,arrow:Nu},il),Wi)},xa=(0,d.forwardRef)(ii),Oi=xa,jn=_(95156);const Si=8;function Ga(L){const{contentRadius:N,limitVerticalRadius:_e}=L,Ne=N>12?N+2:12;return{arrowOffsetHorizontal:Ne,arrowOffsetVertical:_e?Si:Ne}}function Na(L,N){return L?N:{}}function Eo(L,N,_e){const{componentCls:Ne,boxShadowPopoverArrow:ir,arrowOffsetVertical:Ar,arrowOffsetHorizontal:pn}=L,{arrowDistance:En=0,arrowPlacement:In={left:!0,right:!0,top:!0,bottom:!0}}=_e||{};return{[Ne]:Object.assign(Object.assign(Object.assign(Object.assign({[`${Ne}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,jn.W)(L,N,ir)),{"&:before":{background:N}})]},Na(!!In.top,{[[`&-placement-top > ${Ne}-arrow`,`&-placement-topLeft > ${Ne}-arrow`,`&-placement-topRight > ${Ne}-arrow`].join(",")]:{bottom:En,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${Ne}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft > ${Ne}-arrow`]:{left:{_skip_check_:!0,value:pn}},[`&-placement-topRight > ${Ne}-arrow`]:{right:{_skip_check_:!0,value:pn}}})),Na(!!In.bottom,{[[`&-placement-bottom > ${Ne}-arrow`,`&-placement-bottomLeft > ${Ne}-arrow`,`&-placement-bottomRight > ${Ne}-arrow`].join(",")]:{top:En,transform:"translateY(-100%)"},[`&-placement-bottom > ${Ne}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft > ${Ne}-arrow`]:{left:{_skip_check_:!0,value:pn}},[`&-placement-bottomRight > ${Ne}-arrow`]:{right:{_skip_check_:!0,value:pn}}})),Na(!!In.left,{[[`&-placement-left > ${Ne}-arrow`,`&-placement-leftTop > ${Ne}-arrow`,`&-placement-leftBottom > ${Ne}-arrow`].join(",")]:{right:{_skip_check_:!0,value:En},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${Ne}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${Ne}-arrow`]:{top:Ar},[`&-placement-leftBottom > ${Ne}-arrow`]:{bottom:Ar}})),Na(!!In.right,{[[`&-placement-right > ${Ne}-arrow`,`&-placement-rightTop > ${Ne}-arrow`,`&-placement-rightBottom > ${Ne}-arrow`].join(",")]:{left:{_skip_check_:!0,value:En},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${Ne}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${Ne}-arrow`]:{top:Ar},[`&-placement-rightBottom > ${Ne}-arrow`]:{bottom:Ar}}))}}function go(L,N,_e,Ne){if(Ne===!1)return{adjustX:!1,adjustY:!1};const ir=Ne&&typeof Ne=="object"?Ne:{},Ar={};switch(L){case"top":case"bottom":Ar.shiftX=N.arrowOffsetHorizontal*2+_e,Ar.shiftY=!0,Ar.adjustY=!0;break;case"left":case"right":Ar.shiftY=N.arrowOffsetVertical*2+_e,Ar.shiftX=!0,Ar.adjustX=!0;break}const pn=Object.assign(Object.assign({},Ar),ir);return pn.shiftX||(pn.adjustX=!0),pn.shiftY||(pn.adjustY=!0),pn}const $o={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},Ki={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},vh=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function ql(L){const{arrowWidth:N,autoAdjustOverflow:_e,arrowPointAtCenter:Ne,offset:ir,borderRadius:Ar,visibleFirst:pn}=L,En=N/2,In={};return Object.keys($o).forEach(wn=>{const $i=Ne&&Ki[wn]||$o[wn],Hi=Object.assign(Object.assign({},$i),{offset:[0,0],dynamicInset:!0});switch(In[wn]=Hi,vh.has(wn)&&(Hi.autoArrow=!1),wn){case"top":case"topLeft":case"topRight":Hi.offset[1]=-En-ir;break;case"bottom":case"bottomLeft":case"bottomRight":Hi.offset[1]=En+ir;break;case"left":case"leftTop":case"leftBottom":Hi.offset[0]=-En-ir;break;case"right":case"rightTop":case"rightBottom":Hi.offset[0]=En+ir;break}const Ya=Ga({contentRadius:Ar,limitVerticalRadius:!0});if(Ne)switch(wn){case"topLeft":case"bottomLeft":Hi.offset[0]=-Ya.arrowOffsetHorizontal-En;break;case"topRight":case"bottomRight":Hi.offset[0]=Ya.arrowOffsetHorizontal+En;break;case"leftTop":case"rightTop":Hi.offset[1]=-Ya.arrowOffsetHorizontal-En;break;case"leftBottom":case"rightBottom":Hi.offset[1]=Ya.arrowOffsetHorizontal+En;break}Hi.overflow=go(wn,Ya,N,_e),pn&&(Hi.htmlRegion="visibleFirst")}),In}var zh=_(48894),vd=_(58068);const Nl=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function hh(L,N){return Nl.reduce((_e,Ne)=>{const ir=L[`${Ne}1`],Ar=L[`${Ne}3`],pn=L[`${Ne}6`],En=L[`${Ne}7`];return Object.assign(Object.assign({},_e),N(Ne,{lightColor:ir,lightBorderColor:Ar,darkColor:pn,textColor:En}))},{})}const Of=L=>{const{componentCls:N,tooltipMaxWidth:_e,tooltipColor:Ne,tooltipBg:ir,tooltipBorderRadius:Ar,zIndexPopup:pn,controlHeight:En,boxShadowSecondary:In,paddingSM:wn,paddingXS:$i}=L;return[{[N]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,a.Wf)(L)),{position:"absolute",zIndex:pn,display:"block",width:"max-content",maxWidth:_e,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":ir,[`${N}-inner`]:{minWidth:En,minHeight:En,padding:`${(0,s.bf)(L.calc(wn).div(2).equal())} ${(0,s.bf)($i)}`,color:Ne,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:ir,borderRadius:Ar,boxShadow:In,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${N}-inner`]:{borderRadius:L.min(Ar,Si)}},[`${N}-content`]:{position:"relative"}}),hh(L,(Hi,Ya)=>{let{darkColor:Wi}=Ya;return{[`&${N}-${Hi}`]:{[`${N}-inner`]:{backgroundColor:Wi},[`${N}-arrow`]:{"--antd-arrow-background-color":Wi}}}})),{"&-rtl":{direction:"rtl"}})},Eo(L,"var(--antd-arrow-background-color)"),{[`${N}-pure`]:{position:"relative",maxWidth:"none",margin:L.sizePopupArrow}}]},_p=L=>Object.assign(Object.assign({zIndexPopup:L.zIndexPopupBase+70},Ga({contentRadius:L.borderRadius,limitVerticalRadius:!0})),(0,jn.w)((0,ni.TS)(L,{borderRadiusOuter:Math.min(L.borderRadiusOuter,4)})));var ap=function(L){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,Mi.I$)("Tooltip",Ne=>{const{borderRadius:ir,colorTextLightSolid:Ar,colorBgSpotlight:pn}=Ne,En=(0,ni.TS)(Ne,{tooltipMaxWidth:250,tooltipColor:Ar,tooltipBorderRadius:ir,tooltipBg:pn});return[Of(En),Fn(Ne,"zoom-big-fast")]},_p,{resetStyle:!1,injectStyle:N})(L)};const Sd=Nl.map(L=>`${L}-inverse`),Im=null;function im(L){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,mu.Z)(Sd),(0,mu.Z)(Nl)).includes(L):Nl.includes(L)}function Em(L){return Im.includes(L)}function Rp(L,N){const _e=im(N),Ne=Dc()({[`${L}-${N}`]:N&&_e}),ir={},Ar={};return N&&!_e&&(ir.background=N,Ar["--antd-arrow-background-color"]=N),{className:Ne,overlayStyle:ir,arrowStyle:Ar}}var C0=L=>{const{prefixCls:N,className:_e,placement:Ne="top",title:ir,color:Ar,overlayInnerStyle:pn}=L,{getPrefixCls:En}=d.useContext(jh.E_),In=En("tooltip",N),[wn,$i,Hi]=ap(In),Ya=Rp(In,Ar),Wi=Ya.arrowStyle,Ka=Object.assign(Object.assign({},pn),Ya.overlayStyle),po=Dc()($i,Hi,In,`${In}-pure`,`${In}-placement-${Ne}`,_e,Ya.className);return wn(d.createElement("div",{className:po,style:Wi},d.createElement("div",{className:`${In}-arrow`}),d.createElement(yt,Object.assign({},L,{className:$i,prefixCls:In,overlayInnerStyle:Ka}),ir)))},nv=function(L,N){var _e={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&N.indexOf(Ne)<0&&(_e[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ir=0,Ne=Object.getOwnPropertySymbols(L);ir{var _e,Ne;const{prefixCls:ir,openClassName:Ar,getTooltipContainer:pn,overlayClassName:En,color:In,overlayInnerStyle:wn,children:$i,afterOpenChange:Hi,afterVisibleChange:Ya,destroyTooltipOnHide:Wi,arrow:Ka=!0,title:po,overlay:Zo,builtinPlacements:Uo,arrowPointAtCenter:Oa=!1,autoAdjustOverflow:rs=!0}=L,Du=!!Ka,[,Us]=(0,vr.ZP)(),{getPopupContainer:vl,getPrefixCls:Tl,direction:Ul}=d.useContext(jh.E_),ku=(0,vd.ln)("Tooltip"),Hl=d.useRef(null),jl=()=>{var Sm;(Sm=Hl.current)===null||Sm===void 0||Sm.forceAlign()};d.useImperativeHandle(N,()=>({forceAlign:jl,forcePopupAlign:()=>{ku.deprecated(!1,"forcePopupAlign","forceAlign"),jl()}}));const[Mh,Xh]=(0,ys.Z)(!1,{value:(_e=L.open)!==null&&_e!==void 0?_e:L.visible,defaultValue:(Ne=L.defaultOpen)!==null&&Ne!==void 0?Ne:L.defaultVisible}),Yh=!po&&!Zo&&po!==0,sd=Sm=>{var Cm,fv;Xh(Yh?!1:Sm),Yh||((Cm=L.onOpenChange)===null||Cm===void 0||Cm.call(L,Sm),(fv=L.onVisibleChange)===null||fv===void 0||fv.call(L,Sm))},Nu=d.useMemo(()=>{var Sm,Cm;let fv=Oa;return typeof Ka=="object"&&(fv=(Cm=(Sm=Ka.pointAtCenter)!==null&&Sm!==void 0?Sm:Ka.arrowPointAtCenter)!==null&&Cm!==void 0?Cm:Oa),Uo||ql({arrowPointAtCenter:fv,autoAdjustOverflow:rs,arrowWidth:Du?Us.sizePopupArrow:0,borderRadius:Us.borderRadius,offset:Us.marginXXS,visibleFirst:!0})},[Oa,Ka,Uo,Us]),ts=d.useMemo(()=>po===0?po:Zo||po||"",[Zo,po]),Rs=d.createElement(up.BR,null,typeof ts=="function"?ts():ts),{getPopupContainer:il,placement:Ic="top",mouseEnterDelay:Kc=.1,mouseLeaveDelay:Zh=.1,overlayStyle:Kh,rootClassName:hp}=L,Id=nv(L,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),pd=Tl("tooltip",ir),bd=Tl(),dp=L["data-popover-inject"];let Kd=Mh;!("open"in L)&&!("visible"in L)&&Yh&&(Kd=!1);const L0=(0,zh.l$)($i)&&!(0,zh.M2)($i)?$i:d.createElement("span",null,$i),x0=L0.props,D0=!x0.className||typeof x0.className=="string"?Dc()(x0.className,Ar||`${pd}-open`):x0.className,[wp,dm,am]=ap(pd,!dp),Um=Rp(pd,In),w0=Um.arrowStyle,Om=Object.assign(Object.assign({},wn),Um.overlayStyle),Nm=Dc()(En,{[`${pd}-rtl`]:Ul==="rtl"},Um.className,hp,dm,am),[om,Lm]=(0,tf.Cn)("Tooltip",Id.zIndex),jm=d.createElement(Oi,Object.assign({},Id,{zIndex:om,showArrow:Du,placement:Ic,mouseEnterDelay:Kc,mouseLeaveDelay:Zh,prefixCls:pd,overlayClassName:Nm,overlayStyle:Object.assign(Object.assign({},w0),Kh),getTooltipContainer:il||pn||vl,ref:Hl,builtinPlacements:Nu,overlay:Rs,visible:Kd,onVisibleChange:sd,afterVisibleChange:Hi!=null?Hi:Ya,overlayInnerStyle:Om,arrowContent:d.createElement("span",{className:`${pd}-arrow-content`}),motion:{motionName:(0,bo.m)(bd,"zoom-big-fast",L.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Wi}),Kd?(0,zh.Tm)(L0,{className:D0}):L0);return wp(d.createElement(xm.Z.Provider,{value:Lm},jm))});Qm._InternalPanelDoNotUseOrYouWillBeFired=C0;var Sg=Qm,ay=d.forwardRef((L,N)=>{const{open:_e}=L,Ne=(0,d.useRef)(null),ir=(0,d.useRef)(null);function Ar(){yp.Z.cancel(ir.current),ir.current=null}function pn(){ir.current=(0,yp.Z)(()=>{var En;(En=Ne.current)===null||En===void 0||En.forceAlign(),ir.current=null})}return d.useEffect(()=>(_e?pn():Ar(),Ar),[_e,L.title]),d.createElement(Sg,Object.assign({ref:(0,ao.sQ)(Ne,N)},L))});const oy=L=>{const{componentCls:N,antCls:_e,controlSize:Ne,dotSize:ir,marginFull:Ar,marginPart:pn,colorFillContentHover:En,handleColorDisabled:In,calc:wn}=L;return{[N]:Object.assign(Object.assign({},(0,a.Wf)(L)),{position:"relative",height:Ne,margin:`${(0,s.bf)(pn)} ${(0,s.bf)(Ar)}`,padding:0,cursor:"pointer",touchAction:"none",["&-vertical"]:{margin:`${(0,s.bf)(Ar)} ${(0,s.bf)(pn)}`},[`${N}-rail`]:{position:"absolute",backgroundColor:L.railBg,borderRadius:L.borderRadiusXS,transition:`background-color ${L.motionDurationMid}`},[`${N}-track,${N}-tracks`]:{position:"absolute",transition:`background-color ${L.motionDurationMid}`},[`${N}-track`]:{backgroundColor:L.trackBg,borderRadius:L.borderRadiusXS},[`${N}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${N}-rail`]:{backgroundColor:L.railHoverBg},[`${N}-track`]:{backgroundColor:L.trackHoverBg},[`${N}-dot`]:{borderColor:En},[`${N}-handle::after`]:{boxShadow:`0 0 0 ${(0,s.bf)(L.handleLineWidth)} ${L.colorPrimaryBorderHover}`},[`${N}-dot-active`]:{borderColor:L.dotActiveBorderColor}},[`${N}-handle`]:{position:"absolute",width:L.handleSize,height:L.handleSize,outline:"none","&::before":{content:'""',position:"absolute",insetInlineStart:wn(L.handleLineWidth).mul(-1).equal(),insetBlockStart:wn(L.handleLineWidth).mul(-1).equal(),width:wn(L.handleSize).add(wn(L.handleLineWidth).mul(2)).equal(),height:wn(L.handleSize).add(wn(L.handleLineWidth).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:L.handleSize,height:L.handleSize,backgroundColor:L.colorBgElevated,boxShadow:`0 0 0 ${(0,s.bf)(L.handleLineWidth)} ${L.handleColor}`,borderRadius:"50%",cursor:"pointer",transition:` - inset-inline-start ${L.motionDurationMid}, - inset-block-start ${L.motionDurationMid}, - width ${L.motionDurationMid}, - height ${L.motionDurationMid}, - box-shadow ${L.motionDurationMid} - `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:wn(L.handleSizeHover).sub(L.handleSize).div(2).add(L.handleLineWidthHover).mul(-1).equal(),insetBlockStart:wn(L.handleSizeHover).sub(L.handleSize).div(2).add(L.handleLineWidthHover).mul(-1).equal(),width:wn(L.handleSizeHover).add(wn(L.handleLineWidthHover).mul(2)).equal(),height:wn(L.handleSizeHover).add(wn(L.handleLineWidthHover).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${(0,s.bf)(L.handleLineWidthHover)} ${L.handleActiveColor}`,width:L.handleSizeHover,height:L.handleSizeHover,insetInlineStart:L.calc(L.handleSize).sub(L.handleSizeHover).div(2).equal(),insetBlockStart:L.calc(L.handleSize).sub(L.handleSizeHover).div(2).equal()}}},[`${N}-mark`]:{position:"absolute",fontSize:L.fontSize},[`${N}-mark-text`]:{position:"absolute",display:"inline-block",color:L.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:L.colorText}},[`${N}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${N}-dot`]:{position:"absolute",width:ir,height:ir,backgroundColor:L.colorBgElevated,border:`${(0,s.bf)(L.handleLineWidth)} solid ${L.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${L.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:L.dotActiveBorderColor}},[`&${N}-disabled`]:{cursor:"not-allowed",[`${N}-rail`]:{backgroundColor:`${L.railBg} !important`},[`${N}-track`]:{backgroundColor:`${L.trackBgDisabled} !important`},[` - ${N}-dot - `]:{backgroundColor:L.colorBgElevated,borderColor:L.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${N}-handle::after`]:{backgroundColor:L.colorBgElevated,cursor:"not-allowed",width:L.handleSize,height:L.handleSize,boxShadow:`0 0 0 ${(0,s.bf)(L.handleLineWidth)} ${In}`,insetInlineStart:0,insetBlockStart:0},[` - ${N}-mark-text, - ${N}-dot - `]:{cursor:"not-allowed !important"}},[`&-tooltip ${_e}-tooltip-inner`]:{minWidth:"unset"}})}},Zy=(L,N)=>{const{componentCls:_e,railSize:Ne,handleSize:ir,dotSize:Ar,marginFull:pn,calc:En}=L,In=N?"paddingBlock":"paddingInline",wn=N?"width":"height",$i=N?"height":"width",Hi=N?"insetBlockStart":"insetInlineStart",Ya=N?"top":"insetInlineStart",Wi=En(Ne).mul(3).sub(ir).div(2).equal(),Ka=En(ir).sub(Ne).div(2).equal(),po=N?{borderWidth:`${(0,s.bf)(Ka)} 0`,transform:`translateY(${(0,s.bf)(En(Ka).mul(-1).equal())})`}:{borderWidth:`0 ${(0,s.bf)(Ka)}`,transform:`translateX(${(0,s.bf)(L.calc(Ka).mul(-1).equal())})`};return{[In]:Ne,[$i]:En(Ne).mul(3).equal(),[`${_e}-rail`]:{[wn]:"100%",[$i]:Ne},[`${_e}-track,${_e}-tracks`]:{[$i]:Ne},[`${_e}-track-draggable`]:Object.assign({},po),[`${_e}-handle`]:{[Hi]:Wi},[`${_e}-mark`]:{insetInlineStart:0,top:0,[Ya]:En(Ne).mul(3).add(N?0:pn).equal(),[wn]:"100%"},[`${_e}-step`]:{insetInlineStart:0,top:0,[Ya]:Ne,[wn]:"100%",[$i]:Ne},[`${_e}-dot`]:{position:"absolute",[Hi]:En(Ne).sub(Ar).div(2).equal()}}},T1=L=>{const{componentCls:N,marginPartWithMark:_e}=L;return{[`${N}-horizontal`]:Object.assign(Object.assign({},Zy(L,!0)),{[`&${N}-with-marks`]:{marginBottom:_e}})}},Uy=L=>{const{componentCls:N}=L;return{[`${N}-vertical`]:Object.assign(Object.assign({},Zy(L,!1)),{height:"100%"})}},jy=L=>{const _e=L.controlHeightLG/4,Ne=L.controlHeightSM/2,ir=L.lineWidth+1,Ar=L.lineWidth+1*3;return{controlSize:_e,railSize:4,handleSize:_e,handleSizeHover:Ne,dotSize:8,handleLineWidth:ir,handleLineWidthHover:Ar,railBg:L.colorFillTertiary,railHoverBg:L.colorFillSecondary,trackBg:L.colorPrimaryBorder,trackHoverBg:L.colorPrimaryBorderHover,handleColor:L.colorPrimaryBorder,handleActiveColor:L.colorPrimary,handleColorDisabled:new rv.C(L.colorTextDisabled).onBackground(L.colorBgContainer).toHexShortString(),dotBorderColor:L.colorBorderSecondary,dotActiveBorderColor:L.colorPrimaryBorder,trackBgDisabled:L.colorBgContainerDisabled}};var EA=(0,Mi.I$)("Slider",L=>{const N=(0,ni.TS)(L,{marginPart:L.calc(L.controlHeight).sub(L.controlSize).div(2).equal(),marginFull:L.calc(L.controlSize).div(2).equal(),marginPartWithMark:L.calc(L.controlHeightLG).sub(L.controlSize).equal()});return[oy(N),T1(N),Uy(N)]},jy),SA=function(L,N){var _e={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&N.indexOf(Ne)<0&&(_e[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ir=0,Ne=Object.getOwnPropertySymbols(L);irtypeof _e=="number"?_e.toString():""}var CA=d.forwardRef((L,N)=>{const{prefixCls:_e,range:Ne,className:ir,rootClassName:Ar,style:pn,disabled:En,tooltipPrefixCls:In,tipFormatter:wn,tooltipVisible:$i,getTooltipPopupContainer:Hi,tooltipPlacement:Ya}=L,Wi=SA(L,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement"]),{direction:Ka,slider:po,getPrefixCls:Zo,getPopupContainer:Uo}=d.useContext(jh.E_),Oa=d.useContext(zd.Z),rs=En!=null?En:Oa,[Du,Us]=d.useState({}),vl=(ts,Rs)=>{Us(il=>Object.assign(Object.assign({},il),{[ts]:Rs}))},Tl=(ts,Rs)=>ts||(Rs?Ka==="rtl"?"left":"right":"top"),Ul=Zo("slider",_e),[ku,Hl,jl]=EA(Ul),Mh=Dc()(ir,po==null?void 0:po.className,Ar,{[`${Ul}-rtl`]:Ka==="rtl"},Hl,jl);Ka==="rtl"&&!Wi.vertical&&(Wi.reverse=!Wi.reverse);const[Xh,Yh]=d.useMemo(()=>Ne?typeof Ne=="object"?[!0,Ne.draggableTrack]:[!0,!1]:[!1],[Ne]),sd=(ts,Rs)=>{var il;const{index:Ic,dragging:Kc}=Rs,{tooltip:Zh={},vertical:Kh}=L,hp=Object.assign({},Zh),{open:Id,placement:pd,getPopupContainer:bd,prefixCls:dp,formatter:Kd}=hp,L0=V2(Kd,wn),x0=L0?Du[Ic]||Kc:!1,D0=(il=Id!=null?Id:$i)!==null&&il!==void 0?il:Id===void 0&&x0,wp=Object.assign(Object.assign({},ts.props),{onMouseEnter:()=>vl(Ic,!0),onMouseLeave:()=>vl(Ic,!1),onFocus:dm=>{var am;vl(Ic,!0),(am=Wi.onFocus)===null||am===void 0||am.call(Wi,dm)},onBlur:dm=>{var am;vl(Ic,!1),(am=Wi.onBlur)===null||am===void 0||am.call(Wi,dm)}});return d.createElement(ay,Object.assign({},hp,{prefixCls:Zo("tooltip",dp!=null?dp:In),title:L0?L0(Rs.value):"",open:D0,placement:Tl(pd!=null?pd:Ya,Kh),key:Ic,overlayClassName:`${Ul}-tooltip`,getPopupContainer:bd||Hi||Uo}),d.cloneElement(ts,wp))},Nu=Object.assign(Object.assign({},po==null?void 0:po.style),pn);return ku(d.createElement(Be,Object.assign({},Wi,{step:Wi.step,range:Xh,draggableTrack:Yh,className:Mh,style:Nu,disabled:rs,ref:N,prefixCls:Ul,handleRender:sd})))});const Vy=L=>L?typeof L=="function"?L():L:null,TA=L=>{const{componentCls:N,popoverColor:_e,titleMinWidth:Ne,fontWeightStrong:ir,innerPadding:Ar,boxShadowSecondary:pn,colorTextHeading:En,borderRadiusLG:In,zIndexPopup:wn,titleMarginBottom:$i,colorBgElevated:Hi,popoverBg:Ya,titleBorderBottom:Wi,innerContentPadding:Ka,titlePadding:po}=L;return[{[N]:Object.assign(Object.assign({},(0,a.Wf)(L)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:wn,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":Hi,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${N}-content`]:{position:"relative"},[`${N}-inner`]:{backgroundColor:Ya,backgroundClip:"padding-box",borderRadius:In,boxShadow:pn,padding:Ar},[`${N}-title`]:{minWidth:Ne,marginBottom:$i,color:En,fontWeight:ir,borderBottom:Wi,padding:po},[`${N}-inner-content`]:{color:_e,padding:Ka}})},Eo(L,"var(--antd-arrow-background-color)"),{[`${N}-pure`]:{position:"relative",maxWidth:"none",margin:L.sizePopupArrow,display:"inline-block",[`${N}-content`]:{display:"inline-block"}}}]},H2=L=>{const{componentCls:N}=L;return{[N]:Nl.map(_e=>{const Ne=L[`${_e}6`];return{[`&${N}-${_e}`]:{"--antd-arrow-background-color":Ne,[`${N}-inner`]:{backgroundColor:Ne},[`${N}-arrow`]:{background:"transparent"}}}})}},G2=L=>{const{lineWidth:N,controlHeight:_e,fontHeight:Ne,padding:ir,wireframe:Ar,zIndexPopupBase:pn,borderRadiusLG:En,marginXS:In,lineType:wn,colorSplit:$i,paddingSM:Hi}=L,Ya=_e-Ne,Wi=Ya/2,Ka=Ya/2-N,po=ir;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:pn+30},(0,jn.w)(L)),Ga({contentRadius:En,limitVerticalRadius:!0})),{innerPadding:Ar?0:12,titleMarginBottom:Ar?0:In,titlePadding:Ar?`${Wi}px ${po}px ${Ka}px`:0,titleBorderBottom:Ar?`${N}px ${wn} ${$i}`:"none",innerContentPadding:Ar?`${Hi}px ${po}px`:0})};var MA=(0,Mi.I$)("Popover",L=>{const{colorBgElevated:N,colorText:_e}=L,Ne=(0,ni.TS)(L,{popoverBg:N,popoverColor:_e});return[TA(Ne),H2(Ne),Fn(Ne,"zoom-big")]},G2,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),W2=function(L,N){var _e={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&N.indexOf(Ne)<0&&(_e[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ir=0,Ne=Object.getOwnPropertySymbols(L);ir!N&&!_e?null:d.createElement(d.Fragment,null,N&&d.createElement("div",{className:`${L}-title`},Vy(N)),d.createElement("div",{className:`${L}-inner-content`},Vy(_e))),PA=L=>{const{hashId:N,prefixCls:_e,className:Ne,style:ir,placement:Ar="top",title:pn,content:En,children:In}=L;return d.createElement("div",{className:Dc()(N,_e,`${_e}-pure`,`${_e}-placement-${Ar}`,Ne),style:ir},d.createElement("div",{className:`${_e}-arrow`}),d.createElement(yt,Object.assign({},L,{className:N,prefixCls:_e}),In||X2(_e,pn,En)))};var Y2=L=>{const{prefixCls:N,className:_e}=L,Ne=W2(L,["prefixCls","className"]),{getPrefixCls:ir}=d.useContext(jh.E_),Ar=ir("popover",N),[pn,En,In]=MA(Ar);return pn(d.createElement(PA,Object.assign({},Ne,{prefixCls:Ar,hashId:En,className:Dc()(_e,In)})))},IA=function(L,N){var _e={};for(var Ne in L)Object.prototype.hasOwnProperty.call(L,Ne)&&N.indexOf(Ne)<0&&(_e[Ne]=L[Ne]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ir=0,Ne=Object.getOwnPropertySymbols(L);ir{let{title:N,content:_e,prefixCls:Ne}=L;return d.createElement(d.Fragment,null,N&&d.createElement("div",{className:`${Ne}-title`},Vy(N)),d.createElement("div",{className:`${Ne}-inner-content`},Vy(_e)))},OA=d.forwardRef((L,N)=>{const{prefixCls:_e,title:Ne,content:ir,overlayClassName:Ar,placement:pn="top",trigger:En="hover",mouseEnterDelay:In=.1,mouseLeaveDelay:wn=.1,overlayStyle:$i={}}=L,Hi=IA(L,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:Ya}=d.useContext(jh.E_),Wi=Ya("popover",_e),[Ka,po,Zo]=MA(Wi),Uo=Ya(),Oa=Dc()(Ar,po,Zo);return Ka(d.createElement(Sg,Object.assign({placement:pn,trigger:En,mouseEnterDelay:In,mouseLeaveDelay:wn,overlayStyle:$i},Hi,{prefixCls:Wi,overlayClassName:Oa,ref:N,overlay:Ne||ir?d.createElement(RA,{prefixCls:Wi,title:Ne,content:ir}):null,transitionName:(0,bo.m)(Uo,"zoom-big",Hi.transitionName),"data-popover-inject":!0})))});OA._InternalPanelDoNotUseOrYouWillBeFired=Y2;var K2=OA,q2,LA,DA;function Pd(L,N){return N||(N=L.slice(0)),Object.freeze(Object.defineProperties(L,{raw:{value:Object.freeze(N)}}))}var Cg=function(){var N=e0.Z.useToken,_e=N(),Ne=_e.token,ir=Ne.colorText,Ar=Ne.colorTextDescription,pn=Ne.colorBgContainer,En=Ne.borderRadius;return{settingContainer:(0,_d.iv)(q2||(q2=Pd([` - width: 200px; - `]))),settingBtn:(0,_d.iv)(LA||(LA=Pd([` - display: flex; - align-items: center; - justify-content: center; - width: 28px; - height: 28px; - background-color: `,`; - border-radius: `,`px; - cursor: pointer; - font-size: 16px; - - svg { - color: `,`; - } - - &:hover { - svg { - color: `,`; - } - } - `])),pn,En,Ar,ir),settingContainerItem:(0,_d.iv)(DA||(DA=Pd([` - display: flex; - justify-content: space-between; - `])))}},kA=Cg,sy="li-map-view-setting-control",M1=new Map([["topleft","rightTop"],["topcenter","bottom"],["topright","leftTop"],["bottomleft","rightBottom"],["bottomcenter","top"],["bottomright","leftBottom"],["leftcenter","right"],["rightcenter","left"],[void 0,"rightBottom"]]),b_=function(){return d.createElement("svg",{viewBox:"0 0 64 64",width:"1em",height:"1em",fill:"currentcolor"},d.createElement("path",{fill:"currentcolor",d:"m52.98253,40.465802c-3.228081,0 -6.013093,2.120406 -6.64605,5.063657l-19.463432,0c0.221535,-1.898871 0,-3.797743 -0.632957,-5.285192c-0.632957,-1.487449 -1.708984,-2.753364 -3.228081,-3.797743l13.070565,-12.880678c0.854492,0.411422 1.708984,0.411422 2.563476,0.411422c3.861039,0 7.057472,-3.164786 7.057472,-6.962528c0.221535,-3.797743 -3.006546,-6.962528 -6.867585,-6.962528s-7.057472,3.164786 -7.057472,6.962528c0,0.854492 0.221535,1.898871 0.44307,2.531829l-14.779549,14.368127l-12.437608,12.247721c-0.632957,0.854492 -0.854492,1.487449 -0.854492,2.120406c0,0.411422 0,0.632957 0.221535,1.044379c0.44307,1.044379 1.487449,1.677336 2.563476,1.677336l40.477609,0c1.297562,1.677336 3.228081,2.943251 5.570023,2.943251c3.861039,0 6.867585,-2.943251 6.867585,-6.740994s-3.006546,-6.740994 -6.867585,-6.740994zm-35.129121,-0.854492c1.076027,0.632957 1.708984,1.487449 1.930519,2.310294c0.44307,0.854492 0.632957,1.898871 0.44307,2.943251l-7.722077,0l5.348488,-5.253544z"}))};function $y(L,N){return NA(L)||BA(L,N)||J2(L,N)||Q2()}function Q2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J2(L,N){if(L){if(typeof L=="string")return FA(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return FA(L,N)}}function FA(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e360?Math.round(jl-360):Math.round(360-jl));else{var Mh=jl===0?0:jl<0?Math.round(-jl):Math.round(360-jl);Ka(Mh)}};return ku(),Ar==null||Ar.on("moveend",ku),function(){Ar==null||Ar.off("moveend",ku)}}},[Ar,rs]);var Tl=(0,d.useMemo)(function(){return M1.get(_e)},[_e]),Ul=d.createElement("div",{className:Dc()("".concat(sy,"__setting-container"),Zo.settingContainer)},d.createElement("div",{className:Dc()("".concat(sy,"__setting-container__item"),Zo.settingContainerItem)},d.createElement("div",null,"\u5730\u56FE\u503E\u659C"),d.createElement("div",null,"".concat(wn,"\xB0"))),d.createElement(CA,{value:wn,min:0,max:po?90:60,onChange:Us}),d.createElement("div",{className:Dc()("".concat(sy,"__setting-container__item"),Zo.settingContainerItem)},d.createElement("div",null,"\u5730\u56FE\u65CB\u8F6C"),d.createElement("div",null,"".concat(Wi,"\xB0"))),d.createElement(CA,{value:Wi,min:0,max:360,onChange:vl}));return d.createElement($.br,{position:_e,className:sy},d.createElement(K2,{arrow:!1,placement:Tl,content:Ul,trigger:"click",open:rs,onOpenChange:function(Hl){return Du(Hl)}},d.createElement(Sg,{placement:Tl,title:"\u5730\u56FE\u503E\u89D2"},d.createElement("div",{className:Dc()("".concat(sy,"__setting-btn"),Zo.settingBtn)},d.createElement(xA,{component:b_})))))},x_=zA,ZA=function(){var L={position:{title:"\u653E\u7F6E\u65B9\u4F4D",type:"string","x-decorator":"FormItem","x-component":"ControlPositionSelect",default:"bottomright"}};return{schema:L}},ex=(0,y.mV)({version:"v0.1",metadata:{name:"MapViewSettingControl",displayName:"\u503E\u89D2\u8C03\u6574",description:"\u8C03\u6574\u5730\u56FE\u89C6\u89D2",type:"Auto",category:"MapControl",icon:b_},defaultProperties:{position:"topright"},component:x_,registerForm:ZA}),UA,w_,jA,E_,S_,VA,$A;function Tg(L,N){return N||(N=L.slice(0)),Object.freeze(Object.defineProperties(L,{raw:{value:Object.freeze(N)}}))}var HA=function(){var N=e0.Z.useToken,_e=N(),Ne=_e.token,ir=Ne.colorText,Ar=Ne.colorTextDescription,pn=Ne.colorBgElevated,En=Ne.zIndexBase,In=Ne.zIndexPopupBase;return{layerPopup:(0,_d.iv)(UA||(UA=Tg([` - width: 280px !important; - // \u56FE\u5C42\u4FE1\u606F\u6846\u663E\u793A\u5C42\u7EA7\u4F4D\u4E8E\u5C5E\u6027\u9762\u677F\uFF08zIndexPopupBase + 80\uFF09\u4E4B\u4E0A - z-index: `,`; - - .l7-popup-tip { - border-top-color: `,`; - border-bottom-color: `,`; - } - - .l7-popup-content { - padding: 12px; - color: `,`; - background: `,`; - - .l7-popup-close-button { - fill: `,`; - } - } - `])),In+100,pn,pn,ir,pn,ir),popupRow:(0,_d.iv)(w_||(w_=Tg([` - display: flex; - width: 100%; - height: 28px; - color: `,`; - line-height: 28px; - `])),Ar),popupRowImage:(0,_d.iv)(jA||(jA=Tg([` - display: flex; - width: 100%; - height: 40px; - color: `,`; - line-height: 40px; - `])),Ar),imagePreview:(0,_d.iv)(E_||(E_=Tg([` - .ant-image-preview-wrap { - z-index: `,`; - } - `])),In+101),rowItem:(0,_d.iv)(S_||(S_=Tg([` - overflow: hidden; - font-weight: 500; - font-size: 12px; - white-space: nowrap; - text-overflow: ellipsis; - `]))),rowKey:(0,_d.iv)(VA||(VA=Tg([` - max-width: 90%; - text-align: left; - `]))),rowValue:(0,_d.iv)($A||($A=Tg([` - flex: 1; - min-width: 10%; - margin-left: 5px; - color: `,`; - text-align: right !important; - `])),ir)}},GA=HA,WA=function(N){var _e=/^(https|http).*(jpeg|jpg|gif|png)/;return _e.test(N)};function Hy(L){"@babel/helpers - typeof";return Hy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},Hy(L)}var tg="li-layer-popup",tx=function(N){var _e=N.isOpen,Ne=_e===void 0?!0:_e,ir=N.trigger,Ar=N.items,pn=Ar===void 0?[]:Ar,En=GA(),In=ir==="click",wn=(0,d.useMemo)(function(){var $i=pn.map(function(Hi){var Ya=new Map,Wi=Hi.layerId,Ka=Hi.fields;Ka.forEach(function(Zo){Ya.has(Zo.field)||Ya.set(Zo.field,Zo)});var po=Array.from(Ya.values());return{layer:Wi,fields:po,customContent:function(Uo){return d.createElement(d.Fragment,null,po.map(function(Oa,rs){var Du=Oa.formatField?"".concat(Oa.formatField,":"):"".concat(Oa.field,":"),Us=Hy(Uo[Oa.field])==="object"?JSON.stringify(Uo[Oa.field]):Uo[Oa.field];return WA(Us)?d.createElement("div",{className:Dc()("".concat(tg,"__row_image"),En.popupRowImage),key:rs},d.createElement("div",{className:Dc()("".concat(tg,"__row_key"),En.rowItem,En.rowKey)},Du),d.createElement("div",{className:Dc()("".concat(tg,"__row_value"),En.rowItem,En.rowValue)},d.createElement(p1,{rootClassName:En.imagePreview,referrerPolicy:"no-referrer",height:40,src:Us}))):d.createElement("div",{className:Dc()("".concat(tg,"__row_item"),En.popupRow),key:rs},d.createElement("div",{className:Dc()("".concat(tg,"__row_key"),En.rowItem,En.rowKey)},Du),d.createElement("div",{className:Dc()("".concat(tg,"__row_value"),En.rowItem,En.rowValue)},Us))}))}}}).filter(function(Hi){return Hi&&Hi.fields.length});return $i},[pn]);return d.createElement(d.Fragment,null,Ne&&d.createElement($.Kh,{className:Dc()(tg,En.layerPopup),closeButton:In,anchor:"top-left",offsets:[10,-10],items:wn,trigger:ir}))},rx=tx;function Gy(L){"@babel/helpers - typeof";return Gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},Gy(L)}var nx=["items"],Ov=["items"];function XA(L,N){return ox(L)||ax(L,N)||ix(L,N)||YA()}function YA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ix(L,N){if(L){if(typeof L=="string")return KA(L,N);var _e=Object.prototype.toString.call(L).slice(8,-1);if(_e==="Object"&&L.constructor&&(_e=L.constructor.name),_e==="Map"||_e==="Set")return Array.from(L);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return KA(L,N)}}function KA(L,N){(N==null||N>L.length)&&(N=L.length);for(var _e=0,Ne=new Array(N);_e=0)&&Object.prototype.propertyIsEnumerable.call(L,Ne)&&(_e[Ne]=L[Ne])}return _e}function ux(L,N){if(L==null)return{};var _e={},Ne=Object.keys(L),ir,Ar;for(Ar=0;Ar=0)&&(_e[ir]=L[ir]);return _e}var lx=function(N){var _e=N.items,Ne=QA(N,nx),ir=_e.reduce(function(Ar,pn){var En=pn.layerId;return Ar[En]=pn.fields.map(function(In){return{field:In.field,formatField:In.formatField}}),Ar},{});return Wy(Wy({},Ne),{},{items:ir})},cx=function(N){var _e=N.items,Ne=QA(N,Ov),ir=Object.entries(_e).map(function(Ar){var pn=XA(Ar,2),En=pn[0],In=pn[1];return{layerId:En,fields:In.map(function(wn){return{field:wn.field,formatField:wn.formatField!==""?wn.formatField:void 0}})}});return Wy(Wy({},Ne),{},{items:ir})},fx=function(N){var _e=N.layers,Ne=N.datasets,ir=_e.filter(function(pn){return!["GridLayer","HexbinLayer","HeatmapLayer"].includes(pn.type)}).map(function(pn){var En=Ne.find(function($i){return $i.id===pn.sourceConfig.datasetId});if(!(En===void 0||!(0,y.mi)(En))){var In=(En==null?void 0:En.columns)||[],wn=In.map(function($i){return{label:$i.name,value:$i.name}});return C_({},"items.".concat(pn.id),{type:"array","x-component":"ArrayItems","x-component-props":{style:{width:"100%",marginTop:10}},"x-decorator":"FormItem","x-decorator-props":{labelWidth:"100%",wrapperWidth:"100%",layout:"vertical"},title:pn.metadata.name,items:{type:"object",properties:{fields:{type:"void","x-component":"FormGrid","x-component-props":{colWrap:!1},properties:{field:{type:"string",enum:wn,"x-decorator":"FormItem",required:!0,"x-decorator-props":{gridSpan:7},"x-component":"Select","x-component-props":{placeholder:"\u9009\u62E9\u7C7B\u76EE\u6807\u7B7E"}},formatField:{type:"string","x-decorator":"FormItem","x-component":"Input","x-decorator-props":{gridSpan:6},"x-component-props":{placeholder:"\u8F93\u5165\u7C7B\u76EE\u522B\u540D"}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove","x-component-props":{},"x-decorator-props":{gridSpan:1}}}}}},properties:{add:{type:"void",title:"\u6DFB\u52A0\u7C7B\u76EE","x-component":"ArrayItems.Addition","x-component-props":{block:!0}}}})}}).filter(function(pn){return pn!==void 0}),Ar=ir.reduce(function(pn,En){return Object.assign(pn,En)},{});return Ar},JA=function(L){var N=Wy({isOpen:{title:"\u5F00\u542F\u56FE\u5C42\u4FE1\u606F\u6846",type:"boolean","x-decorator":"FormItem","x-component":"Switch",default:!0,"x-decorator-props":{labelCol:9,wrapperCol:15}},trigger:{title:"\u6253\u5F00\u65B9\u5F0F",type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{options:[{value:"click",label:"\u70B9\u51FB"},{value:"hover",label:"\u5212\u5165"}]},default:"hover"}},fx(L));return{schema:N,toValues:lx,fromValues:cx}},eb=function(){return d.createElement("svg",{viewBox:"0 0 64 64",width:"1em",height:"1em",fill:"currentColor"},d.createElement("path",{fill:"currentColor",transform:"rotate(180 31.999999999999996,32)",d:"m48.786114,21.23426l-33.572225,0l0,-5.382871l33.572225,0l0,5.382871m0,8.074306l-33.572225,0l0,-5.382871l33.572225,0l0,5.382871m0,8.074306l-33.572225,0l0,-5.382871l33.572225,0l0,5.382871m11.190742,-26.914353c0,-2.960579 -2.517917,-5.382871 -5.595371,-5.382871l-44.762966,0c-3.077454,0 -5.595371,2.422292 -5.595371,5.382871l0,32.297224c0,2.960579 2.517917,5.382871 5.595371,5.382871l39.167595,0l11.190742,10.765741l0,-48.445836z"}))},hx=(0,y.mV)({version:"v0.1",metadata:{name:"LayerPopup",displayName:"\u4FE1\u606F\u6846",description:"\u5F39\u7A97\u5F62\u5F0F\u5C55\u793A\u56FE\u5C42\u7684\u989D\u5916\u4FE1\u606F",type:"Auto",category:"LayerInteraction",icon:eb},defaultProperties:{isOpen:!0,trigger:"hover",items:[]},component:rx,registerForm:JA}),dx=function(N){var _e=N.position,Ne=N.url,ir=N.href,Ar=N.height,pn=N.width;return d.createElement($.OB,{position:_e,img:Ne,href:ir||"",style:{width:pn,height:Ar}})},px=dx,mx=function(){var L={position:{title:"\u653E\u7F6E\u65B9\u4F4D",type:"string","x-decorator":"FormItem","x-component":"ControlPositionSelect",default:"bottomLeft"},url:{title:"\u56FE\u7247\u5730\u5740",type:"string","x-decorator":"FormItem","x-component":"Input",default:"https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*GRb1TKp4HcMAAAAAAAAAAAAAARQnAQ"},href:{title:"\u8DF3\u8F6C\u5730\u5740",type:"string","x-decorator":"FormItem","x-component":"Input"},width:{title:"\u56FE\u7247\u5BBD\u5EA6",type:"string","x-decorator":"FormItem","x-component":"NumberPicker","x-component-props":{addonAfter:"px",min:0,precision:0},default:89},height:{title:"\u56FE\u7247\u9AD8\u5EA6",type:"string","x-decorator":"FormItem","x-component":"NumberPicker","x-component-props":{addonAfter:"px",min:0,precision:0},default:16}};return{schema:L}},vx=function(){return d.createElement("svg",{viewBox:"0 0 64 64",width:"1em",height:"1em",fill:"currentColor"},d.createElement("path",{fill:"currentColor",d:"m7.552775,33.880555l-3.761111,0l0,-18.805557l3.761111,0l0,15.044446l7.522223,0l0,3.761111l-7.522223,0zm-3.761111,15.044446l56.416671,0l0,-3.761111l-56.416671,0l0,3.761111zm37.611114,-7.522223l-7.522223,0l0,-3.761111l7.522223,0l0,-3.761111l-7.522223,0l0,-11.283334l7.522223,0l3.761111,0l0,11.283334l0,3.761111l0,3.761111l-3.761111,0zm0,-11.283334l0,-3.761111l-3.761111,0l0,3.761111l3.761111,0zm18.805557,-7.522223l0,11.283334l-11.283334,0l0,-11.283334l11.283334,0zm-3.761111,3.761111l-3.761111,0l0,3.761111l3.761111,0l0,-3.761111zm-26.32778,7.522223l-11.283334,0l0,-11.283334l11.283334,0l0,11.283334zm-3.700934,-7.522223l-3.761111,0l0,3.761111l3.761111,0l0,-3.761111z"}))},gx=(0,y.mV)({version:"v0.1",metadata:{name:"LogoControl",displayName:"Logo",description:"\u81EA\u5B9A\u4E49 Logo \u56FE\u6807",type:"Auto",category:"MapControl",icon:vx},defaultProperties:{position:"leftbottom",url:"https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*GRb1TKp4HcMAAAAAAAAAAAAAARQnAQ",width:89,height:16},component:px,registerForm:mx}),tb=[Qa,ri,Au,ma,Zu,Fs,cf,q,oc,Yf,Dp],rb=Object.values(V),yx=Object.values(M),_x={version:"v0.1",layers:tb,widgets:rb,services:yx}},71720:function(Ke,ye,_){var Yd,lp,cp,Bd,Pp,se,a,s,l,g,P,j,ne,ge,ze,ht,zt,qt,_r,U2,Kr,Wg,an,en,Hr,Fn,ni,Mi,wa,za,Py,Ds,lo,cs,as,$s,ps,fs,Ks,Ou,wl,wo,Zs,Cl,Gf,ec,gc,$c,Lc,oh,Rh,ph,mh,rh,xf,pc,sf,Kl,Hc,Vh,mA,Oo,tE,Nc,rE,sh,nE,p,iE,W,aE,Te,oE,dt,sE,nr,N5,kr;"use strict";_.d(ye,{JX:function(){return Va},h_:function(){return F},LY:function(){return Qs},d_:function(){return Wt},Fl:function(){return zl},$v:function(){return Pu},mV:function(){return rc},p5:function(){return Fd},mi:function(){return Zi},dL:function(){return nm},uQ:function(){return da},$r:function(){return Yf}});var M=_(7292),V=_(92310),y=_.n(V),d=_(77617),$=_(8142),X=function(U){return U.ADD_DATASET="add:dataset",U.REMOVE_DATASET="remove:dataset",U.UPDATE_DATASET="update:dataset",U.ADD_FILTER="add:filter",U.UPDATE_FILTER="update:filter",U.REMOVE_FILTER="remove:filter",U.CLEAR_FILTER="clear:filter",U}({}),oe=function(U){return U.SET_SCENE="set-scene",U.UPDATE_VIEWSTATE="update:view-state",U}({}),re=function(U){return U.ADD_LAYER="add:layer",U.REMOVE_LAYER="remove:layer",U.UPDATE_LAYER="update:layer",U.SET_LAYERMANAGER="set:layer-manager",U}({}),le=function(U){return U.UPDATE_WIDGETSPROPS="update:widgets-props",U}({}),ce=function(U){return U.UPDATE_GLOBAL="update:global",U}({}),Ie=d.createContext(null),we=function(){var z=d.useContext(Ie);if(z===void 0||Object.keys(z).length===0)throw new Error("useLIContext must be used within a LIContext.Provider");return z},Ee=function(){var z=we(),te=z.stateManager;return te};function qe(U,z){return Ye(U)||lt(U,z)||ft(U,z)||Xe()}function Xe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ft(U,z){if(U){if(typeof U=="string")return Ge(U,z);var te=Object.prototype.toString.call(U).slice(8,-1);if(te==="Object"&&U.constructor&&(te=U.constructor.name),te==="Map"||te==="Set")return Array.from(U);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return Ge(U,z)}}function Ge(U,z){(z==null||z>U.length)&&(z=U.length);for(var te=0,Re=new Array(z);teU.length)&&(z=U.length);for(var te=0,Re=new Array(z);te2&&arguments[2]!==void 0?arguments[2]:50,Lt=z.length,or=Math.max(Math.floor(Lt/Re),1),Lr=0;LrU.length)&&(z=U.length);for(var te=0,Re=new Array(z);te=Ur&&z<=cn};return er(te).some(Re)};function on(U,z){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Re=Yn(z,te),Lt=te.useRegExp?U:U.map(function(Lr){var Ur=ln(Yn(Lr,te));return te.mustStart&&(Ur="^".concat(Ur)),te.mustEnd&&(Ur="".concat(Ur,"$")),Ur}),or=new RegExp(Lt.join("|"),te.caseSensitive?"g":"gi");return!!Re.match(or)}var ri=/[.*+?^${}()|[\]\\]/g,nn=/(?:[\^`\xA8\xAF\xB4\xB7\xB8\u02B0-\u034E\u0350-\u0357\u035D-\u0362\u0374\u0375\u037A\u0384\u0385\u0483-\u0487\u0559\u0591-\u05A1\u05A3-\u05BD\u05BF\u05C1\u05C2\u05C4\u064B-\u0652\u0657\u0658\u06DF\u06E0\u06E5\u06E6\u06EA-\u06EC\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F5\u0818\u0819\u0898-\u089F\u08C9-\u08D2\u08E3-\u08FE\u093C\u094D\u0951-\u0954\u0971\u09BC\u09CD\u0A3C\u0A4D\u0ABC\u0ACD\u0AFD-\u0AFF\u0B3C\u0B4D\u0B55\u0BCD\u0C3C\u0C4D\u0CBC\u0CCD\u0D3B\u0D3C\u0D4D\u0DCA\u0E47-\u0E4C\u0E4E\u0EBA\u0EC8-\u0ECC\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F82-\u0F84\u0F86\u0F87\u0FC6\u1037\u1039\u103A\u1063\u1064\u1069-\u106D\u1087-\u108D\u108F\u109A\u109B\u135D-\u135F\u1714\u1715\u17C9-\u17D3\u17DD\u1939-\u193B\u1A75-\u1A7C\u1A7F\u1AB0-\u1ABE\u1AC1-\u1ACB\u1B34\u1B44\u1B6B-\u1B73\u1BAA\u1BAB\u1C36\u1C37\u1C78-\u1C7D\u1CD0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1D2C-\u1D6A\u1DC4-\u1DCF\u1DF5-\u1DFF\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2CEF-\u2CF1\u2E2F\u302A-\u302F\u3099-\u309C\u30FC\uA66F\uA67C\uA67D\uA67F\uA69C\uA69D\uA6F0\uA6F1\uA700-\uA721\uA788-\uA78A\uA7F8\uA7F9\uA8C4\uA8E0-\uA8F1\uA92B-\uA92E\uA953\uA9B3\uA9C0\uA9E5\uAA7B-\uAA7D\uAABF-\uAAC2\uAAF6\uAB5B-\uAB5F\uAB69-\uAB6B\uABEC\uABED\uFB1E\uFE20-\uFE2F\uFF3E\uFF40\uFF70\uFF9E\uFF9F\uFFE3]|\uD800\uDEE0|\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDEE5\uDEE6]|\uD803[\uDD22-\uDD27\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC46\uDC70\uDCB9\uDCBA\uDD33\uDD34\uDD73\uDDC0\uDDCA-\uDDCC\uDE35\uDE36\uDEE9\uDEEA\uDF3C\uDF4D\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC42\uDC46\uDCC2\uDCC3\uDDBF\uDDC0\uDE3F\uDEB6\uDEB7\uDF2B]|\uD806[\uDC39\uDC3A\uDD3D\uDD3E\uDD43\uDDE0\uDE34\uDE47\uDE99]|\uD807[\uDC3F\uDD42\uDD44\uDD45\uDD97]|\uD80D[\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF8F-\uDF9F\uDFF0\uDFF1]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uD838[\uDC30-\uDC6D\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD46\uDD48-\uDD4A])/g;function ln(U){return U.replace(ri,"\\$&")}function Yn(U,z){var te=String(U);return z.keepSpecialCharacters||(te=te.normalize("NFD").replace(nn,"")),te}var Wn=function(z,te){return te.includes(z)},Tn=function(z,te){return!te.includes(z)},ai=function(z,te){return on([te],z)},Ii=function(z,te){return!on([te],z)},ki=function(z,te){return z===te},Fa=function(z,te){return z>te},sa=function(z,te){return z>=te},vo=function(z,te){return zLt}else return!1},Tu=function(z,te){var Re=new Date(z).getTime();if(isFinite(Re)){var Lt=new Date(te).getTime();return Re":Fa,">=":sa,"<":vo,"<=":Ro,BETWEEN:Za},date:{BETWEEN:Os,">":ro,"<":Tu}};function qa(U){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},qa(U)}function ss(U,z){var te=Object.keys(U);if(Object.getOwnPropertySymbols){var Re=Object.getOwnPropertySymbols(U);z&&(Re=Re.filter(function(Lt){return Object.getOwnPropertyDescriptor(U,Lt).enumerable})),te.push.apply(te,Re)}return te}function ca(U){for(var z=1;z1&&arguments[1]!==void 0?arguments[1]:"datasetId",Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"\u5173\u8054\u7684\u6570\u636E\u6E90",Lt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,or=z.datasets.map(function(Lr){return{label:Lr.metadata.name,value:Lr.id,columns:wr(isLocalOrRemoteDataset(Lr)?Lr.columns:[])}});return On({},te,{type:"string",title:Re,required:Lt,enum:or,"x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:"\u8BF7\u9009\u62E9\u6570\u636E\u6E90"},"x-decorator-props":{tooltip:"\u8BF7\u9009\u62E9\u5173\u8054\u7684\u6570\u636E\u96C6\u4F5C\u4E3A\u6570\u636E\u6E90"}})},vn=function(z){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"serviceName",Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"\u5173\u8054\u7684\u670D\u52A1",Lt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,or=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],Lr=z.services.filter(function(Ur){return Ur.metadata.type!=="Dataset"&&(isUndefined(Ur.metadata.category)||or.length===0||or.includes(Ur.metadata.category))}).map(function(Ur){return{label:Ur.metadata.displayName,value:Ur.metadata.name,metadata:Ur.metadata}});return On({},te,{type:"string",title:Re,required:Lt,enum:Lr,"x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:"\u8BF7\u9009\u62E9\u670D\u52A1"},"x-decorator-props":{tooltip:"\u8BF7\u9009\u62E9\u5173\u8054\u7684\u670D\u52A1\u8D44\u4EA7"}})},Xi=typeof window=="undefined"||"Deno"in window;function ya(){}function Bo(U,z){return typeof U=="function"?U(z):U}function xn(U){return typeof U=="number"&&U>=0&&U!==1/0}function zr(U,z){return Math.max(U+(z||0)-Date.now(),0)}function xt(U,z){const{type:te="all",exact:Re,fetchStatus:Lt,predicate:or,queryKey:Lr,stale:Ur}=U;if(Lr){if(Re){if(z.queryHash!==lr(Lr,z.options))return!1}else if(!Yr(z.queryKey,Lr))return!1}if(te!=="all"){const cn=z.isActive();if(te==="active"&&!cn||te==="inactive"&&cn)return!1}return!(typeof Ur=="boolean"&&z.isStale()!==Ur||typeof Lt!="undefined"&&Lt!==z.state.fetchStatus||or&&!or(z))}function Nt(U,z){const{exact:te,status:Re,predicate:Lt,mutationKey:or}=U;if(or){if(!z.options.mutationKey)return!1;if(te){if($r(z.options.mutationKey)!==$r(or))return!1}else if(!Yr(z.options.mutationKey,or))return!1}return!(Re&&z.state.status!==Re||Lt&&!Lt(z))}function lr(U,z){return((z==null?void 0:z.queryKeyHashFn)||$r)(U)}function $r(U){return JSON.stringify(U,(z,te)=>ti(te)?Object.keys(te).sort().reduce((Re,Lt)=>(Re[Lt]=te[Lt],Re),{}):te)}function Yr(U,z){return U===z?!0:typeof U!=typeof z?!1:U&&z&&typeof U=="object"&&typeof z=="object"?!Object.keys(z).some(te=>!Yr(U[te],z[te])):!1}function un(U,z){if(U===z)return U;const te=qn(U)&&qn(z);if(te||ti(U)&&ti(z)){const Re=te?U:Object.keys(U),Lt=Re.length,or=te?z:Object.keys(z),Lr=or.length,Ur=te?[]:{};let cn=0;for(let $n=0;$n{setTimeout(z,U)})}function ia(U,z,te){return typeof te.structuralSharing=="function"?te.structuralSharing(U,z):te.structuralSharing!==!1?un(U,z):z}function vi(U){return U}function gi(U,z,te=0){const Re=[...U,z];return te&&Re.length>te?Re.slice(1):Re}function ma(U,z,te=0){const Re=[z,...U];return te&&Re.length>te?Re.slice(0,-1):Re}function Yi(){let U=[],z=0,te=Go=>{Go()},Re=Go=>{Go()},Lt=Go=>setTimeout(Go,0);const or=Go=>{Lt=Go},Lr=Go=>{let xo;z++;try{xo=Go()}finally{z--,z||$n()}return xo},Ur=Go=>{z?U.push(Go):Lt(()=>{te(Go)})},cn=Go=>(...xo)=>{Ur(()=>{Go(...xo)})},$n=()=>{const Go=U;U=[],Go.length&&Lt(()=>{Re(()=>{Go.forEach(xo=>{te(xo)})})})};return{batch:Lr,batchCalls:cn,schedule:Ur,setNotifyFunction:Go=>{te=Go},setBatchNotifyFunction:Go=>{Re=Go},setScheduler:or}}var ua=Yi(),La=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(U){return this.listeners.add(U),this.onSubscribe(),()=>{this.listeners.delete(U),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},aa=(Bd=class extends La{constructor(){super();Lh(this,Yd,void 0);Lh(this,lp,void 0);Lh(this,cp,void 0);$f(this,cp,z=>{if(!Xi&&window.addEventListener){const te=()=>z();return window.addEventListener("visibilitychange",te,!1),()=>{window.removeEventListener("visibilitychange",te)}}})}onSubscribe(){yo(this,lp)||this.setEventListener(yo(this,cp))}onUnsubscribe(){var z;this.hasListeners()||((z=yo(this,lp))==null||z.call(this),$f(this,lp,void 0))}setEventListener(z){var te;$f(this,cp,z),(te=yo(this,lp))==null||te.call(this),$f(this,lp,z(Re=>{typeof Re=="boolean"?this.setFocused(Re):this.onFocus()}))}setFocused(z){yo(this,Yd)!==z&&($f(this,Yd,z),this.onFocus())}onFocus(){this.listeners.forEach(z=>{z()})}isFocused(){var z;return typeof yo(this,Yd)=="boolean"?yo(this,Yd):((z=globalThis.document)==null?void 0:z.visibilityState)!=="hidden"}},Yd=new WeakMap,lp=new WeakMap,cp=new WeakMap,Bd),ho=new aa,Po=(s=class extends La{constructor(){super();Lh(this,Pp,!0);Lh(this,se,void 0);Lh(this,a,void 0);$f(this,a,z=>{if(!Xi&&window.addEventListener){const te=()=>z(!0),Re=()=>z(!1);return window.addEventListener("online",te,!1),window.addEventListener("offline",Re,!1),()=>{window.removeEventListener("online",te),window.removeEventListener("offline",Re)}}})}onSubscribe(){yo(this,se)||this.setEventListener(yo(this,a))}onUnsubscribe(){var z;this.hasListeners()||((z=yo(this,se))==null||z.call(this),$f(this,se,void 0))}setEventListener(z){var te;$f(this,a,z),(te=yo(this,se))==null||te.call(this),$f(this,se,z(this.setOnline.bind(this)))}setOnline(z){yo(this,Pp)!==z&&($f(this,Pp,z),this.listeners.forEach(Re=>{Re(z)}))}isOnline(){return yo(this,Pp)}},Pp=new WeakMap,se=new WeakMap,a=new WeakMap,s),Ms=new Po;function Mu(U){return Math.min(1e3*vm(2,U),3e4)}function vs(U){return(U!=null?U:"online")==="online"?Ms.isOnline():!0}var Xs=class{constructor(U){this.revert=U==null?void 0:U.revert,this.silent=U==null?void 0:U.silent}};function iu(U){return U instanceof Xs}function js(U){let z=!1,te=0,Re=!1,Lt,or,Lr;const Ur=new Promise((ms,Xo)=>{or=ms,Lr=Xo}),cn=ms=>{var Xo;Re||(xo(new Xs(ms)),(Xo=U.abort)==null||Xo.call(U))},$n=()=>{z=!0},Ai=()=>{z=!1},Qo=()=>!ho.isFocused()||U.networkMode!=="always"&&!Ms.isOnline(),Go=ms=>{var Xo;Re||(Re=!0,(Xo=U.onSuccess)==null||Xo.call(U,ms),Lt==null||Lt(),or(ms))},xo=ms=>{var Xo;Re||(Re=!0,(Xo=U.onError)==null||Xo.call(U,ms),Lt==null||Lt(),Lr(ms))},Wo=()=>new Promise(ms=>{var Xo;Lt=ys=>{const gl=Re||!Qo();return gl&&ms(ys),gl},(Xo=U.onPause)==null||Xo.call(U)}).then(()=>{var ms;Lt=void 0,Re||(ms=U.onContinue)==null||ms.call(U)}),hs=()=>{if(Re)return;let ms;try{ms=U.fn()}catch(Xo){ms=Promise.reject(Xo)}Promise.resolve(ms).then(Go).catch(Xo=>{var uh,Ef,lh;if(Re)return;const ys=(uh=U.retry)!=null?uh:Xi?0:3,gl=(Ef=U.retryDelay)!=null?Ef:Mu,Bu=typeof gl=="function"?gl(te,Xo):gl,Gc=ys===!0||typeof ys=="number"&&te{if(Qo())return Wo()}).then(()=>{z?xo(Xo):hs()})})};return vs(U.networkMode)?hs():Wo().then(hs),{promise:Ur,cancel:cn,continue:()=>(Lt==null?void 0:Lt())?Ur:Promise.resolve(),cancelRetry:$n,continueRetry:Ai}}var Vs=(g=class{constructor(){Lh(this,l,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xn(this.gcTime)&&$f(this,l,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(U){this.gcTime=Math.max(this.gcTime||0,U!=null?U:Xi?1/0:5*60*1e3)}clearGcTimeout(){yo(this,l)&&(clearTimeout(yo(this,l)),$f(this,l,void 0))}},l=new WeakMap,g),sl=(an=class extends Vs{constructor(z){super();Lh(this,_r);Lh(this,Kr);Lh(this,P,void 0);Lh(this,j,void 0);Lh(this,ne,void 0);Lh(this,ge,void 0);Lh(this,ze,void 0);Lh(this,ht,void 0);Lh(this,zt,void 0);Lh(this,qt,void 0);$f(this,qt,!1),$f(this,zt,z.defaultOptions),Sp(this,_r,U2).call(this,z.options),$f(this,ht,[]),$f(this,ne,z.cache),this.queryKey=z.queryKey,this.queryHash=z.queryHash,$f(this,P,z.state||al(this.options)),this.state=yo(this,P),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!yo(this,ht).length&&this.state.fetchStatus==="idle"&&yo(this,ne).remove(this)}setData(z,te){const Re=ia(this.state.data,z,this.options);return Sp(this,Kr,Wg).call(this,{data:Re,type:"success",dataUpdatedAt:te==null?void 0:te.updatedAt,manual:te==null?void 0:te.manual}),Re}setState(z,te){Sp(this,Kr,Wg).call(this,{type:"setState",state:z,setStateOptions:te})}cancel(z){var Re;const te=yo(this,ge);return(Re=yo(this,ze))==null||Re.cancel(z),te?te.then(ya).catch(ya):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(yo(this,P))}isActive(){return yo(this,ht).some(z=>z.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||yo(this,ht).some(z=>z.getCurrentResult().isStale)}isStaleByTime(z=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!zr(this.state.dataUpdatedAt,z)}onFocus(){var te;const z=yo(this,ht).find(Re=>Re.shouldFetchOnWindowFocus());z==null||z.refetch({cancelRefetch:!1}),(te=yo(this,ze))==null||te.continue()}onOnline(){var te;const z=yo(this,ht).find(Re=>Re.shouldFetchOnReconnect());z==null||z.refetch({cancelRefetch:!1}),(te=yo(this,ze))==null||te.continue()}addObserver(z){yo(this,ht).includes(z)||(yo(this,ht).push(z),this.clearGcTimeout(),yo(this,ne).notify({type:"observerAdded",query:this,observer:z}))}removeObserver(z){yo(this,ht).includes(z)&&($f(this,ht,yo(this,ht).filter(te=>te!==z)),yo(this,ht).length||(yo(this,ze)&&(yo(this,qt)?yo(this,ze).cancel({revert:!0}):yo(this,ze).cancelRetry()),this.scheduleGc()),yo(this,ne).notify({type:"observerRemoved",query:this,observer:z}))}getObserversCount(){return yo(this,ht).length}invalidate(){this.state.isInvalidated||Sp(this,Kr,Wg).call(this,{type:"invalidate"})}fetch(z,te){var $n,Ai,Qo,Go;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(te!=null&&te.cancelRefetch))this.cancel({silent:!0});else if(yo(this,ge))return($n=yo(this,ze))==null||$n.continueRetry(),yo(this,ge)}if(z&&Sp(this,_r,U2).call(this,z),!this.options.queryFn){const xo=yo(this,ht).find(Wo=>Wo.options.queryFn);xo&&Sp(this,_r,U2).call(this,xo.options)}const Re=new AbortController,Lt={queryKey:this.queryKey,meta:this.meta},or=xo=>{Object.defineProperty(xo,"signal",{enumerable:!0,get:()=>($f(this,qt,!0),Re.signal)})};or(Lt);const Lr=()=>this.options.queryFn?($f(this,qt,!1),this.options.persister?this.options.persister(this.options.queryFn,Lt,this):this.options.queryFn(Lt)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),Ur={fetchOptions:te,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:Lr};or(Ur),(Ai=this.options.behavior)==null||Ai.onFetch(Ur,this),$f(this,j,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((Qo=Ur.fetchOptions)==null?void 0:Qo.meta))&&Sp(this,Kr,Wg).call(this,{type:"fetch",meta:(Go=Ur.fetchOptions)==null?void 0:Go.meta});const cn=xo=>{var Wo,hs,ms,Xo;iu(xo)&&xo.silent||Sp(this,Kr,Wg).call(this,{type:"error",error:xo}),iu(xo)||((hs=(Wo=yo(this,ne).config).onError)==null||hs.call(Wo,xo,this),(Xo=(ms=yo(this,ne).config).onSettled)==null||Xo.call(ms,this.state.data,xo,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return $f(this,ze,js({fn:Ur.fetchFn,abort:Re.abort.bind(Re),onSuccess:xo=>{var Wo,hs,ms,Xo;if(typeof xo=="undefined"){cn(new Error(`${this.queryHash} data is undefined`));return}this.setData(xo),(hs=(Wo=yo(this,ne).config).onSuccess)==null||hs.call(Wo,xo,this),(Xo=(ms=yo(this,ne).config).onSettled)==null||Xo.call(ms,xo,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:cn,onFail:(xo,Wo)=>{Sp(this,Kr,Wg).call(this,{type:"failed",failureCount:xo,error:Wo})},onPause:()=>{Sp(this,Kr,Wg).call(this,{type:"pause"})},onContinue:()=>{Sp(this,Kr,Wg).call(this,{type:"continue"})},retry:Ur.options.retry,retryDelay:Ur.options.retryDelay,networkMode:Ur.options.networkMode})),$f(this,ge,yo(this,ze).promise),yo(this,ge)}},P=new WeakMap,j=new WeakMap,ne=new WeakMap,ge=new WeakMap,ze=new WeakMap,ht=new WeakMap,zt=new WeakMap,qt=new WeakMap,_r=new WeakSet,U2=function(z){this.options=Od(Od({},yo(this,zt)),z),this.updateGcTime(this.options.gcTime)},Kr=new WeakSet,Wg=function(z){const te=Re=>{var Lt,or;switch(z.type){case"failed":return gm(Od({},Re),{fetchFailureCount:z.failureCount,fetchFailureReason:z.error});case"pause":return gm(Od({},Re),{fetchStatus:"paused"});case"continue":return gm(Od({},Re),{fetchStatus:"fetching"});case"fetch":return Od(gm(Od({},Re),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(Lt=z.meta)!=null?Lt:null,fetchStatus:vs(this.options.networkMode)?"fetching":"paused"}),!Re.dataUpdatedAt&&{error:null,status:"pending"});case"success":return Od(gm(Od({},Re),{data:z.data,dataUpdateCount:Re.dataUpdateCount+1,dataUpdatedAt:(or=z.dataUpdatedAt)!=null?or:Date.now(),error:null,isInvalidated:!1,status:"success"}),!z.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const Lr=z.error;return iu(Lr)&&Lr.revert&&yo(this,j)?gm(Od({},yo(this,j)),{fetchStatus:"idle"}):gm(Od({},Re),{error:Lr,errorUpdateCount:Re.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:Re.fetchFailureCount+1,fetchFailureReason:Lr,fetchStatus:"idle",status:"error"});case"invalidate":return gm(Od({},Re),{isInvalidated:!0});case"setState":return Od(Od({},Re),z.state)}};this.state=te(this.state),ua.batch(()=>{yo(this,ht).forEach(Re=>{Re.onQueryUpdate()}),yo(this,ne).notify({query:this,type:"updated",action:z})})},an);function al(U){const z=typeof U.initialData=="function"?U.initialData():U.initialData,te=typeof z!="undefined",Re=te?typeof U.initialDataUpdatedAt=="function"?U.initialDataUpdatedAt():U.initialDataUpdatedAt:0;return{data:z,dataUpdateCount:0,dataUpdatedAt:te?Re!=null?Re:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:te?"success":"pending",fetchStatus:"idle"}}var ul=(Hr=class extends La{constructor(z={}){super();Lh(this,en,void 0);this.config=z,$f(this,en,new Map)}build(z,te,Re){var Ur;const Lt=te.queryKey,or=(Ur=te.queryHash)!=null?Ur:lr(Lt,te);let Lr=this.get(or);return Lr||(Lr=new sl({cache:this,queryKey:Lt,queryHash:or,options:z.defaultQueryOptions(te),state:Re,defaultOptions:z.getQueryDefaults(Lt)}),this.add(Lr)),Lr}add(z){yo(this,en).has(z.queryHash)||(yo(this,en).set(z.queryHash,z),this.notify({type:"added",query:z}))}remove(z){const te=yo(this,en).get(z.queryHash);te&&(z.destroy(),te===z&&yo(this,en).delete(z.queryHash),this.notify({type:"removed",query:z}))}clear(){ua.batch(()=>{this.getAll().forEach(z=>{this.remove(z)})})}get(z){return yo(this,en).get(z)}getAll(){return[...yo(this,en).values()]}find(z){const te=Od({exact:!0},z);return this.getAll().find(Re=>xt(te,Re))}findAll(z={}){const te=this.getAll();return Object.keys(z).length>0?te.filter(Re=>xt(z,Re)):te}notify(z){ua.batch(()=>{this.listeners.forEach(te=>{te(z)})})}onFocus(){ua.batch(()=>{this.getAll().forEach(z=>{z.onFocus()})})}onOnline(){ua.batch(()=>{this.getAll().forEach(z=>{z.onOnline()})})}},en=new WeakMap,Hr),_c=(Ds=class extends Vs{constructor(z){super();Lh(this,za);Lh(this,Fn,void 0);Lh(this,ni,void 0);Lh(this,Mi,void 0);Lh(this,wa,void 0);this.mutationId=z.mutationId,$f(this,ni,z.defaultOptions),$f(this,Mi,z.mutationCache),$f(this,Fn,[]),this.state=z.state||Yo(),this.setOptions(z.options),this.scheduleGc()}setOptions(z){this.options=Od(Od({},yo(this,ni)),z),this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(z){yo(this,Fn).includes(z)||(yo(this,Fn).push(z),this.clearGcTimeout(),yo(this,Mi).notify({type:"observerAdded",mutation:this,observer:z}))}removeObserver(z){$f(this,Fn,yo(this,Fn).filter(te=>te!==z)),this.scheduleGc(),yo(this,Mi).notify({type:"observerRemoved",mutation:this,observer:z})}optionalRemove(){yo(this,Fn).length||(this.state.status==="pending"?this.scheduleGc():yo(this,Mi).remove(this))}continue(){var z,te;return(te=(z=yo(this,wa))==null?void 0:z.continue())!=null?te:this.execute(this.state.variables)}execute(z){return v_(this,null,function*(){var Lt,or,Lr,Ur,cn,$n,Ai,Qo,Go,xo,Wo,hs,ms,Xo,ys,gl,Bu,Gc,uh,Ef;const te=()=>{var lh;return $f(this,wa,js({fn:()=>this.options.mutationFn?this.options.mutationFn(z):Promise.reject(new Error("No mutationFn found")),onFail:(gp,Hd)=>{Sp(this,za,Py).call(this,{type:"failed",failureCount:gp,error:Hd})},onPause:()=>{Sp(this,za,Py).call(this,{type:"pause"})},onContinue:()=>{Sp(this,za,Py).call(this,{type:"continue"})},retry:(lh=this.options.retry)!=null?lh:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),yo(this,wa).promise},Re=this.state.status==="pending";try{if(!Re){Sp(this,za,Py).call(this,{type:"pending",variables:z}),yield(or=(Lt=yo(this,Mi).config).onMutate)==null?void 0:or.call(Lt,z,this);const gp=yield(Ur=(Lr=this.options).onMutate)==null?void 0:Ur.call(Lr,z);gp!==this.state.context&&Sp(this,za,Py).call(this,{type:"pending",context:gp,variables:z})}const lh=yield te();return yield($n=(cn=yo(this,Mi).config).onSuccess)==null?void 0:$n.call(cn,lh,z,this.state.context,this),yield(Qo=(Ai=this.options).onSuccess)==null?void 0:Qo.call(Ai,lh,z,this.state.context),yield(xo=(Go=yo(this,Mi).config).onSettled)==null?void 0:xo.call(Go,lh,null,this.state.variables,this.state.context,this),yield(hs=(Wo=this.options).onSettled)==null?void 0:hs.call(Wo,lh,null,z,this.state.context),Sp(this,za,Py).call(this,{type:"success",data:lh}),lh}catch(lh){try{throw yield(Xo=(ms=yo(this,Mi).config).onError)==null?void 0:Xo.call(ms,lh,z,this.state.context,this),yield(gl=(ys=this.options).onError)==null?void 0:gl.call(ys,lh,z,this.state.context),yield(Gc=(Bu=yo(this,Mi).config).onSettled)==null?void 0:Gc.call(Bu,void 0,lh,this.state.variables,this.state.context,this),yield(Ef=(uh=this.options).onSettled)==null?void 0:Ef.call(uh,void 0,lh,z,this.state.context),lh}finally{Sp(this,za,Py).call(this,{type:"error",error:lh})}}})}},Fn=new WeakMap,ni=new WeakMap,Mi=new WeakMap,wa=new WeakMap,za=new WeakSet,Py=function(z){const te=Re=>{switch(z.type){case"failed":return gm(Od({},Re),{failureCount:z.failureCount,failureReason:z.error});case"pause":return gm(Od({},Re),{isPaused:!0});case"continue":return gm(Od({},Re),{isPaused:!1});case"pending":return gm(Od({},Re),{context:z.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!vs(this.options.networkMode),status:"pending",variables:z.variables,submittedAt:Date.now()});case"success":return gm(Od({},Re),{data:z.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return gm(Od({},Re),{data:void 0,error:z.error,failureCount:Re.failureCount+1,failureReason:z.error,isPaused:!1,status:"error"})}};this.state=te(this.state),ua.batch(()=>{yo(this,Fn).forEach(Re=>{Re.onMutationUpdate(z)}),yo(this,Mi).notify({mutation:this,type:"updated",action:z})})},Ds);function Yo(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var No=($s=class extends La{constructor(z={}){super();Lh(this,lo,void 0);Lh(this,cs,void 0);Lh(this,as,void 0);this.config=z,$f(this,lo,[]),$f(this,cs,0)}build(z,te,Re){const Lt=new _c({mutationCache:this,mutationId:++Z2(this,cs)._,options:z.defaultMutationOptions(te),state:Re});return this.add(Lt),Lt}add(z){yo(this,lo).push(z),this.notify({type:"added",mutation:z})}remove(z){$f(this,lo,yo(this,lo).filter(te=>te!==z)),this.notify({type:"removed",mutation:z})}clear(){ua.batch(()=>{yo(this,lo).forEach(z=>{this.remove(z)})})}getAll(){return yo(this,lo)}find(z){const te=Od({exact:!0},z);return yo(this,lo).find(Re=>Nt(te,Re))}findAll(z={}){return yo(this,lo).filter(te=>Nt(z,te))}notify(z){ua.batch(()=>{this.listeners.forEach(te=>{te(z)})})}resumePausedMutations(){var z;return $f(this,as,((z=yo(this,as))!=null?z:Promise.resolve()).then(()=>{const te=yo(this,lo).filter(Re=>Re.state.isPaused);return ua.batch(()=>te.reduce((Re,Lt)=>Re.then(()=>Lt.continue().catch(ya)),Promise.resolve()))}).then(()=>{$f(this,as,void 0)})),yo(this,as)}},lo=new WeakMap,cs=new WeakMap,as=new WeakMap,$s);function Ku(U){return{onFetch:(z,te)=>{const Re=()=>v_(this,null,function*(){var Wo,hs,ms,Xo,ys,gl;const Lt=z.options,or=(ms=(hs=(Wo=z.fetchOptions)==null?void 0:Wo.meta)==null?void 0:hs.fetchMore)==null?void 0:ms.direction,Lr=((Xo=z.state.data)==null?void 0:Xo.pages)||[],Ur=((ys=z.state.data)==null?void 0:ys.pageParams)||[],cn={pages:[],pageParams:[]};let $n=!1;const Ai=Bu=>{Object.defineProperty(Bu,"signal",{enumerable:!0,get:()=>(z.signal.aborted?$n=!0:z.signal.addEventListener("abort",()=>{$n=!0}),z.signal)})},Qo=z.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${z.options.queryHash}'`))),Go=(Bu,Gc,uh)=>v_(this,null,function*(){if($n)return Promise.reject();if(Gc==null&&Bu.pages.length)return Promise.resolve(Bu);const Ef={queryKey:z.queryKey,pageParam:Gc,direction:uh?"backward":"forward",meta:z.options.meta};Ai(Ef);const lh=yield Qo(Ef),{maxPages:gp}=z.options,Hd=uh?ma:gi;return{pages:Hd(Bu.pages,lh,gp),pageParams:Hd(Bu.pageParams,Gc,gp)}});let xo;if(or&&Lr.length){const Bu=or==="backward",Gc=Bu?Wa:Rc,uh={pages:Lr,pageParams:Ur},Ef=Gc(Lt,uh);xo=yield Go(uh,Ef,Bu)}else{xo=yield Go(cn,(gl=Ur[0])!=null?gl:Lt.initialPageParam);const Bu=U!=null?U:Lr.length;for(let Gc=1;Gc{var Lt,or;return(or=(Lt=z.options).persister)==null?void 0:or.call(Lt,Re,{queryKey:z.queryKey,meta:z.options.meta,signal:z.signal},te)}:z.fetchFn=Re}}}function Rc(U,{pages:z,pageParams:te}){const Re=z.length-1;return U.getNextPageParam(z[Re],z,te[Re],te)}function Wa(U,{pages:z,pageParams:te}){var Re;return(Re=U.getPreviousPageParam)==null?void 0:Re.call(U,z[0],z,te[0],te)}function mf(U,z){return z?Rc(U,z)!=null:!1}function yf(U,z){return!z||!U.getPreviousPageParam?!1:Wa(U,z)!=null}var yl=(Gf=class{constructor(U={}){Lh(this,ps,void 0);Lh(this,fs,void 0);Lh(this,Ks,void 0);Lh(this,Ou,void 0);Lh(this,wl,void 0);Lh(this,wo,void 0);Lh(this,Zs,void 0);Lh(this,Cl,void 0);$f(this,ps,U.queryCache||new ul),$f(this,fs,U.mutationCache||new No),$f(this,Ks,U.defaultOptions||{}),$f(this,Ou,new Map),$f(this,wl,new Map),$f(this,wo,0)}mount(){Z2(this,wo)._++,yo(this,wo)===1&&($f(this,Zs,ho.subscribe(()=>{ho.isFocused()&&(this.resumePausedMutations(),yo(this,ps).onFocus())})),$f(this,Cl,Ms.subscribe(()=>{Ms.isOnline()&&(this.resumePausedMutations(),yo(this,ps).onOnline())})))}unmount(){var U,z;Z2(this,wo)._--,yo(this,wo)===0&&((U=yo(this,Zs))==null||U.call(this),$f(this,Zs,void 0),(z=yo(this,Cl))==null||z.call(this),$f(this,Cl,void 0))}isFetching(U){return yo(this,ps).findAll(gm(Od({},U),{fetchStatus:"fetching"})).length}isMutating(U){return yo(this,fs).findAll(gm(Od({},U),{status:"pending"})).length}getQueryData(U){var z;return(z=yo(this,ps).find({queryKey:U}))==null?void 0:z.state.data}ensureQueryData(U){const z=this.getQueryData(U.queryKey);return z!==void 0?Promise.resolve(z):this.fetchQuery(U)}getQueriesData(U){return this.getQueryCache().findAll(U).map(({queryKey:z,state:te})=>{const Re=te.data;return[z,Re]})}setQueryData(U,z,te){const Re=yo(this,ps).find({queryKey:U}),Lt=Re==null?void 0:Re.state.data,or=Bo(z,Lt);if(typeof or=="undefined")return;const Lr=this.defaultQueryOptions({queryKey:U});return yo(this,ps).build(this,Lr).setData(or,gm(Od({},te),{manual:!0}))}setQueriesData(U,z,te){return ua.batch(()=>this.getQueryCache().findAll(U).map(({queryKey:Re})=>[Re,this.setQueryData(Re,z,te)]))}getQueryState(U){var z;return(z=yo(this,ps).find({queryKey:U}))==null?void 0:z.state}removeQueries(U){const z=yo(this,ps);ua.batch(()=>{z.findAll(U).forEach(te=>{z.remove(te)})})}resetQueries(U,z){const te=yo(this,ps),Re=Od({type:"active"},U);return ua.batch(()=>(te.findAll(U).forEach(Lt=>{Lt.reset()}),this.refetchQueries(Re,z)))}cancelQueries(U={},z={}){const te=Od({revert:!0},z),Re=ua.batch(()=>yo(this,ps).findAll(U).map(Lt=>Lt.cancel(te)));return Promise.all(Re).then(ya).catch(ya)}invalidateQueries(U={},z={}){return ua.batch(()=>{var Re,Lt;if(yo(this,ps).findAll(U).forEach(or=>{or.invalidate()}),U.refetchType==="none")return Promise.resolve();const te=gm(Od({},U),{type:(Lt=(Re=U.refetchType)!=null?Re:U.type)!=null?Lt:"active"});return this.refetchQueries(te,z)})}refetchQueries(U={},z){var Lt;const te=gm(Od({},z),{cancelRefetch:(Lt=z==null?void 0:z.cancelRefetch)!=null?Lt:!0}),Re=ua.batch(()=>yo(this,ps).findAll(U).filter(or=>!or.isDisabled()).map(or=>{let Lr=or.fetch(void 0,te);return te.throwOnError||(Lr=Lr.catch(ya)),or.state.fetchStatus==="paused"?Promise.resolve():Lr}));return Promise.all(Re).then(ya)}fetchQuery(U){const z=this.defaultQueryOptions(U);typeof z.retry=="undefined"&&(z.retry=!1);const te=yo(this,ps).build(this,z);return te.isStaleByTime(z.staleTime)?te.fetch(z):Promise.resolve(te.state.data)}prefetchQuery(U){return this.fetchQuery(U).then(ya).catch(ya)}fetchInfiniteQuery(U){return U.behavior=Ku(U.pages),this.fetchQuery(U)}prefetchInfiniteQuery(U){return this.fetchInfiniteQuery(U).then(ya).catch(ya)}resumePausedMutations(){return yo(this,fs).resumePausedMutations()}getQueryCache(){return yo(this,ps)}getMutationCache(){return yo(this,fs)}getDefaultOptions(){return yo(this,Ks)}setDefaultOptions(U){$f(this,Ks,U)}setQueryDefaults(U,z){yo(this,Ou).set($r(U),{queryKey:U,defaultOptions:z})}getQueryDefaults(U){const z=[...yo(this,Ou).values()];let te={};return z.forEach(Re=>{Yr(U,Re.queryKey)&&(te=Od(Od({},te),Re.defaultOptions))}),te}setMutationDefaults(U,z){yo(this,wl).set($r(U),{mutationKey:U,defaultOptions:z})}getMutationDefaults(U){const z=[...yo(this,wl).values()];let te={};return z.forEach(Re=>{Yr(U,Re.mutationKey)&&(te=Od(Od({},te),Re.defaultOptions))}),te}defaultQueryOptions(U){if(U!=null&&U._defaulted)return U;const z=gm(Od(Od(Od({},yo(this,Ks).queries),(U==null?void 0:U.queryKey)&&this.getQueryDefaults(U.queryKey)),U),{_defaulted:!0});return z.queryHash||(z.queryHash=lr(z.queryKey,z)),typeof z.refetchOnReconnect=="undefined"&&(z.refetchOnReconnect=z.networkMode!=="always"),typeof z.throwOnError=="undefined"&&(z.throwOnError=!!z.suspense),typeof z.networkMode=="undefined"&&z.persister&&(z.networkMode="offlineFirst"),z}defaultMutationOptions(U){return U!=null&&U._defaulted?U:gm(Od(Od(Od({},yo(this,Ks).mutations),(U==null?void 0:U.mutationKey)&&this.getMutationDefaults(U.mutationKey)),U),{_defaulted:!0})}clear(){yo(this,ps).clear(),yo(this,fs).clear()}},ps=new WeakMap,fs=new WeakMap,Ks=new WeakMap,Ou=new WeakMap,wl=new WeakMap,wo=new WeakMap,Zs=new WeakMap,Cl=new WeakMap,Gf);function Ec(U){"@babel/helpers - typeof";return Ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},Ec(U)}function Zf(U,z){if(!(U instanceof z))throw new TypeError("Cannot call a class as a function")}function Vu(U,z){for(var te=0;te=U.length?{done:!0}:{done:!1,value:U[Re++]}},e:function($n){throw $n},f:Lt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var or=!0,Lr=!1,Ur;return{s:function(){te=te.call(U)},n:function(){var $n=te.next();return or=$n.done,$n},e:function($n){Lr=!0,Ur=$n},f:function(){try{!or&&te.return!=null&&te.return()}finally{if(Lr)throw Ur}}}}function qu(U,z){if(U){if(typeof U=="string")return hl(U,z);var te=Object.prototype.toString.call(U).slice(8,-1);if(te==="Object"&&U.constructor&&(te=U.constructor.name),te==="Map"||te==="Set")return Array.from(U);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return hl(U,z)}}function hl(U,z){(z==null||z>U.length)&&(z=U.length);for(var te=0,Re=new Array(z);te1&&arguments[1]!==void 0?arguments[1]:yn.Z,Re=(0,d.useRef)(),Lt=z();return(!Re.current||!te(Re.current,Lt))&&(Re.current=Lt),Re.current};function ks(U){"@babel/helpers - typeof";return ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},ks(U)}function au(U,z){var te=Object.keys(U);if(Object.getOwnPropertySymbols){var Re=Object.getOwnPropertySymbols(U);z&&(Re=Re.filter(function(Lt){return Object.getOwnPropertyDescriptor(U,Lt).enumerable})),te.push.apply(te,Re)}return te}function Al(U){for(var z=1;zU.length)&&(z=U.length);for(var te=0,Re=new Array(z);te=0;--ue){var $e=this.tryEntries[ue],Xt=$e.completion;if($e.tryLoc==="root")return ae("end");if($e.tryLoc<=this.prev){var Sr=Re.call($e,"catchLoc"),Dr=Re.call($e,"finallyLoc");if(Sr&&Dr){if(this.prev<$e.catchLoc)return ae($e.catchLoc,!0);if(this.prev<$e.finallyLoc)return ae($e.finallyLoc)}else if(Sr){if(this.prev<$e.catchLoc)return ae($e.catchLoc,!0)}else{if(!Dr)throw new Error("try statement without catch or finally");if(this.prev<$e.finallyLoc)return ae($e.finallyLoc)}}}},abrupt:function(vu,Q){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var ue=this.tryEntries[ae];if(ue.tryLoc<=this.prev&&Re.call(ue,"finallyLoc")&&this.prev=0;--Q){var ae=this.tryEntries[Q];if(ae.finallyLoc===vu)return this.complete(ae.completion,ae.afterLoc),Ip(ae),ms}},catch:function(vu){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var ae=this.tryEntries[Q];if(ae.tryLoc===vu){var ue=ae.completion;if(ue.type==="throw"){var $e=ue.arg;Ip(ae)}return $e}}throw new Error("illegal catch attempt")},delegateYield:function(vu,Q,ae){return this.delegate={iterator:Nh(vu),resultName:Q,nextLoc:ae},this.method==="next"&&(this.arg=U),ms}},z}function Nn(U,z,te,Re,Lt,or,Lr){try{var Ur=U[or](Lr),cn=Ur.value}catch($n){te($n);return}Ur.done?z(cn):Promise.resolve(cn).then(Re,Lt)}function Pn(U){return function(){var z=this,te=arguments;return new Promise(function(Re,Lt){var or=U.apply(z,te);function Lr(cn){Nn(or,Re,Lt,Lr,Ur,"next",cn)}function Ur(cn){Nn(or,Re,Lt,Lr,Ur,"throw",cn)}Lr(void 0)})}}var xi=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return gn(z,te,function(Re,Lt){return!!(Re.data===Lt.data&&(0,yn.Z)(Re.filter,Lt.filter))})},qi={id:"noop",type:"local",data:[],columns:[],metadata:{name:"noop"}},Xa=function(){return Promise.resolve([])},To=function(){var U=Pn(bh().mark(function z(te){var Re,Lt,or,Lr;return bh().wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:if(Re=te.data,Lt=te.filter,Lt){cn.next=3;break}return cn.abrupt("return",Re);case 3:return cn.prev=3,cn.next=6,Qs(Re,Lt);case 6:or=cn.sent,cn.next=14;break;case 9:return cn.prev=9,cn.t0=cn.catch(3),Lr=new Error("applyDatasetFilter is failure, filter data: '".concat(JSON.stringify(Lt),"'.")),console.error(Lr),cn.abrupt("return",Re);case 14:return cn.abrupt("return",or);case 15:case"end":return cn.stop()}},z,null,[[3,9]])}));return function(te){return U.apply(this,arguments)}}();function Gs(U,z){var te=(0,d.useMemo)(function(){var Wo=U.columns||[],hs=z||U.filter;return(0,_i.Z)(hs)?hs:_o(hs,Wo)},[U.filter,z,U.columns]),Re=Il(function(){return{data:U.data,filter:te}},xi),Lt=(0,d.useState)(Re),or=ah(Lt,2),Lr=or[0],Ur=or[1];br(function(){return Ur(Re)},[Re],{wait:1e3});var cn=(0,d.useState)(),$n=ah(cn,2),Ai=$n[0],Qo=$n[1],Go=U.id===qi.id?Xa:To;(0,d.useEffect)(function(){var Wo=!1;return Go(Lr).then(function(hs){Wo||Qo(hs)}).catch(function(hs){console.error(hs)}),function(){Wo=!0}},[Lr]);var xo=(0,d.useMemo)(function(){return Al(Al({},U),{},{data:(0,Hn.Z)(Ai)?Ai:[]})},[U,Ai]);return xo}function xs(U,z){return Uu(U)||ll(U,z)||ou(U,z)||Jo()}function Jo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ou(U,z){if(U){if(typeof U=="string")return Iu(U,z);var te=Object.prototype.toString.call(U).slice(8,-1);if(te==="Object"&&U.constructor&&(te=U.constructor.name),te==="Map"||te==="Set")return Array.from(U);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return Iu(U,z)}}function Iu(U,z){(z==null||z>U.length)&&(z=U.length);for(var te=0,Re=new Array(z);te{Object.defineProperty(te,Re,{configurable:!1,enumerable:!0,get:()=>(yo(this,Hc).add(Re),z[Re])})}),te}getCurrentQuery(){return yo(this,gc)}refetch(te={}){var z=B5(te,[]);return this.fetch(Od({},z))}fetchOptimistic(z){const te=yo(this,ec).defaultQueryOptions(z),Re=yo(this,ec).getQueryCache().build(yo(this,ec),te);return Re.isFetchingOptimistic=!0,Re.fetch().then(()=>this.createResult(Re,te))}fetch(z){var te;return Sp(this,Vh,mA).call(this,gm(Od({},z),{cancelRefetch:(te=z.cancelRefetch)!=null?te:!0})).then(()=>(this.updateResult(),yo(this,Lc)))}createResult(z,te){var uh;const Re=yo(this,gc),Lt=this.options,or=yo(this,Lc),Lr=yo(this,oh),Ur=yo(this,Rh),$n=z!==Re?z.state:yo(this,$c),{state:Ai}=z;let{error:Qo,errorUpdatedAt:Go,fetchStatus:xo,status:Wo}=Ai,hs=!1,ms;if(te._optimisticResults){const Ef=this.hasListeners(),lh=!Ef&&Ys(z,te),gp=Ef&&Fs(z,Re,te,Lt);(lh||gp)&&(xo=vs(z.options.networkMode)?"fetching":"paused",Ai.dataUpdatedAt||(Wo="pending")),te._optimisticResults==="isRestoring"&&(xo="idle")}if(te.select&&typeof Ai.data!="undefined")if(or&&Ai.data===(Lr==null?void 0:Lr.data)&&te.select===yo(this,mh))ms=yo(this,rh);else try{$f(this,mh,te.select),ms=te.select(Ai.data),ms=ia(or==null?void 0:or.data,ms,te),$f(this,rh,ms),$f(this,ph,null)}catch(Ef){$f(this,ph,Ef)}else ms=Ai.data;if(typeof te.placeholderData!="undefined"&&typeof ms=="undefined"&&Wo==="pending"){let Ef;if(or!=null&&or.isPlaceholderData&&te.placeholderData===(Ur==null?void 0:Ur.placeholderData))Ef=or.data;else if(Ef=typeof te.placeholderData=="function"?te.placeholderData((uh=yo(this,xf))==null?void 0:uh.state.data,yo(this,xf)):te.placeholderData,te.select&&typeof Ef!="undefined")try{Ef=te.select(Ef),$f(this,ph,null)}catch(lh){$f(this,ph,lh)}typeof Ef!="undefined"&&(Wo="success",ms=ia(or==null?void 0:or.data,Ef,te),hs=!0)}yo(this,ph)&&(Qo=yo(this,ph),ms=yo(this,rh),Go=Date.now(),Wo="error");const Xo=xo==="fetching",ys=Wo==="pending",gl=Wo==="error",Bu=ys&&Xo;return{status:Wo,fetchStatus:xo,isPending:ys,isSuccess:Wo==="success",isError:gl,isInitialLoading:Bu,isLoading:Bu,data:ms,dataUpdatedAt:Ai.dataUpdatedAt,error:Qo,errorUpdatedAt:Go,failureCount:Ai.fetchFailureCount,failureReason:Ai.fetchFailureReason,errorUpdateCount:Ai.errorUpdateCount,isFetched:Ai.dataUpdateCount>0||Ai.errorUpdateCount>0,isFetchedAfterMount:Ai.dataUpdateCount>$n.dataUpdateCount||Ai.errorUpdateCount>$n.errorUpdateCount,isFetching:Xo,isRefetching:Xo&&!ys,isLoadingError:gl&&Ai.dataUpdatedAt===0,isPaused:xo==="paused",isPlaceholderData:hs,isRefetchError:gl&&Ai.dataUpdatedAt!==0,isStale:Qu(z,te),refetch:this.refetch}}updateResult(z){const te=yo(this,Lc),Re=this.createResult(yo(this,gc),this.options);if($f(this,oh,yo(this,gc).state),$f(this,Rh,this.options),yo(this,oh).data!==void 0&&$f(this,xf,yo(this,gc)),Sn(Re,te))return;$f(this,Lc,Re);const Lt={},or=()=>{if(!te)return!0;const{notifyOnChangeProps:Lr}=this.options,Ur=typeof Lr=="function"?Lr():Lr;if(Ur==="all"||!Ur&&!yo(this,Hc).size)return!0;const cn=new Set(Ur!=null?Ur:yo(this,Hc));return this.options.throwOnError&&cn.add("error"),Object.keys(yo(this,Lc)).some($n=>{const Ai=$n;return yo(this,Lc)[Ai]!==te[Ai]&&cn.has(Ai)})};(z==null?void 0:z.listeners)!==!1&&or()&&(Lt.listeners=!0),Sp(this,nr,N5).call(this,Od(Od({},Lt),z))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Sp(this,p,iE).call(this)}},ec=new WeakMap,gc=new WeakMap,$c=new WeakMap,Lc=new WeakMap,oh=new WeakMap,Rh=new WeakMap,ph=new WeakMap,mh=new WeakMap,rh=new WeakMap,xf=new WeakMap,pc=new WeakMap,sf=new WeakMap,Kl=new WeakMap,Hc=new WeakMap,Vh=new WeakSet,mA=function(z){Sp(this,dt,sE).call(this);let te=yo(this,gc).fetch(this.options,z);return z!=null&&z.throwOnError||(te=te.catch(ya)),te},Oo=new WeakSet,tE=function(){if(Sp(this,W,aE).call(this),Xi||yo(this,Lc).isStale||!xn(this.options.staleTime))return;const te=zr(yo(this,Lc).dataUpdatedAt,this.options.staleTime)+1;$f(this,pc,setTimeout(()=>{yo(this,Lc).isStale||this.updateResult()},te))},Nc=new WeakSet,rE=function(){var z;return(z=typeof this.options.refetchInterval=="function"?this.options.refetchInterval(yo(this,gc)):this.options.refetchInterval)!=null?z:!1},sh=new WeakSet,nE=function(z){Sp(this,Te,oE).call(this),$f(this,Kl,z),!(Xi||this.options.enabled===!1||!xn(yo(this,Kl))||yo(this,Kl)===0)&&$f(this,sf,setInterval(()=>{(this.options.refetchIntervalInBackground||ho.isFocused())&&Sp(this,Vh,mA).call(this)},yo(this,Kl)))},p=new WeakSet,iE=function(){Sp(this,Oo,tE).call(this),Sp(this,sh,nE).call(this,Sp(this,Nc,rE).call(this))},W=new WeakSet,aE=function(){yo(this,pc)&&(clearTimeout(yo(this,pc)),$f(this,pc,void 0))},Te=new WeakSet,oE=function(){yo(this,sf)&&(clearInterval(yo(this,sf)),$f(this,sf,void 0))},dt=new WeakSet,sE=function(){const z=yo(this,ec).getQueryCache().build(yo(this,ec),this.options);if(z===yo(this,gc))return;const te=yo(this,gc);$f(this,gc,z),$f(this,$c,z.state),this.hasListeners()&&(te==null||te.removeObserver(this),z.addObserver(this))},nr=new WeakSet,N5=function(z){ua.batch(()=>{z.listeners&&this.listeners.forEach(te=>{te(yo(this,Lc))}),yo(this,ec).getQueryCache().notify({query:yo(this,gc),type:"observerResultsUpdated"})})},kr);function su(U,z){return z.enabled!==!1&&!U.state.dataUpdatedAt&&!(U.state.status==="error"&&z.retryOnMount===!1)}function Ys(U,z){return su(U,z)||U.state.dataUpdatedAt>0&&_s(U,z,z.refetchOnMount)}function _s(U,z,te){if(z.enabled!==!1){const Re=typeof te=="function"?te(U):te;return Re==="always"||Re!==!1&&Qu(U,z)}return!1}function Fs(U,z,te,Re){return te.enabled!==!1&&(U!==z||Re.enabled===!1)&&(!te.suspense||U.state.status!=="error")&&Qu(U,te)}function Qu(U,z){return U.isStaleByTime(z.staleTime)}function Sl(U,z){return!Sn(U.getCurrentResult(),z)}function nc(){let U=!1;return{clearReset:()=>{U=!1},reset:()=>{U=!0},isReset:()=>U}}var dl=d.createContext(nc()),Ml=()=>d.useContext(dl),Vc=({children:U})=>{const[z]=React.useState(()=>nc());return React.createElement(dl.Provider,{value:z},typeof U=="function"?U(z):U)},kl=d.createContext(void 0),Qf=U=>{const z=d.useContext(kl);if(U)return U;if(!z)throw new Error("No QueryClient set, use QueryClientProvider to set one");return z},ds=({client:U,children:z})=>(React.useEffect(()=>(U.mount(),()=>{U.unmount()}),[U]),React.createElement(kl.Provider,{value:U},z)),Eu=d.createContext(!1),Rl=()=>d.useContext(Eu),Fc=Eu.Provider;function Yc(U,z){return typeof U=="function"?U(...z):!!U}var xh=(U,z)=>{(U.suspense||U.throwOnError)&&(z.isReset()||(U.retryOnMount=!1))},Lf=U=>{d.useEffect(()=>{U.clearReset()},[U])},If=({result:U,errorResetBoundary:z,throwOnError:te,query:Re})=>U.isError&&!z.isReset()&&!U.isFetching&&Re&&Yc(te,[U.error,Re]),wd=(U,z)=>typeof z.state.data=="undefined",_h=U=>{U.suspense&&typeof U.staleTime!="number"&&(U.staleTime=1e3)},Df=(U,z)=>U.isLoading&&U.isFetching&&!z,af=(U,z)=>(U==null?void 0:U.suspense)&&z.isPending,cd=(U,z,te)=>z.fetchOptimistic(U).catch(()=>{te.clearReset()});function Uf(U,z,te){const Re=Qf(te),Lt=Rl(),or=Ml(),Lr=Re.defaultQueryOptions(U);Lr._optimisticResults=Lt?"isRestoring":"optimistic",_h(Lr),xh(Lr,or),Lf(or);const[Ur]=d.useState(()=>new z(Re,Lr)),cn=Ur.getOptimisticResult(Lr);if(d.useSyncExternalStore(d.useCallback($n=>{const Ai=Lt?()=>{}:Ur.subscribe(ua.batchCalls($n));return Ur.updateResult(),Ai},[Ur,Lt]),()=>Ur.getCurrentResult(),()=>Ur.getCurrentResult()),d.useEffect(()=>{Ur.setOptions(Lr,{listeners:!1})},[Lr,Ur]),af(Lr,cn))throw cd(Lr,Ur,or);if(If({result:cn,errorResetBoundary:or,throwOnError:Lr.throwOnError,query:Re.getQueryCache().get(Lr.queryHash)}))throw cn.error;return Lr.notifyOnChangeProps?cn:Ur.trackResult(cn)}function _u(U,z){return Uf(U,Lu,z)}function Ls(U){"@babel/helpers - typeof";return Ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},Ls(U)}function Af(U,z){var te=Object.keys(U);if(Object.getOwnPropertySymbols){var Re=Object.getOwnPropertySymbols(U);z&&(Re=Re.filter(function(Lt){return Object.getOwnPropertyDescriptor(U,Lt).enumerable})),te.push.apply(te,Re)}return te}function fd(U){for(var z=1;zU.length)&&(z=U.length);for(var te=0,Re=new Array(z);teU.length)&&(z=U.length);for(var te=0,Re=new Array(z);te=0)&&Object.prototype.propertyIsEnumerable.call(U,Re)&&(te[Re]=U[Re])}return te}function eu(U,z){if(U==null)return{};var te={},Re=Object.keys(U),Lt,or;for(or=0;or=0)&&(te[Lt]=U[Lt]);return te}function Bs(U,z){return h(U)||Gu(U,z)||yu(U,z)||cu()}function cu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yu(U,z){if(U){if(typeof U=="string")return fu(U,z);var te=Object.prototype.toString.call(U).slice(8,-1);if(te==="Object"&&U.constructor&&(te=U.constructor.name),te==="Map"||te==="Set")return Array.from(U);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return fu(U,z)}}function fu(U,z){(z==null||z>U.length)&&(z=U.length);for(var te=0,Re=new Array(z);teU.length)&&(z=U.length);for(var te=0,Re=new Array(z);teU.length)&&(z=U.length);for(var te=0,Re=new Array(z);teU.length)&&(z=U.length);for(var te=0,Re=new Array(z);teU.length)&&(z=U.length);for(var te=0,Re=new Array(z);teU.length)&&(z=U.length);for(var te=0,Re=new Array(z);teU.length)&&(z=U.length);for(var te=0,Re=new Array(z);teU.length)&&(z=U.length);for(var te=0,Re=new Array(z);teU.length)&&(z=U.length);for(var te=0,Re=new Array(z);te=U.length?{done:!0}:{done:!1,value:U[Re++]}},e:function($n){throw $n},f:Lt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var or=!0,Lr=!1,Ur;return{s:function(){te=te.call(U)},n:function(){var $n=te.next();return or=$n.done,$n},e:function($n){Lr=!0,Ur=$n},f:function(){try{!or&&te.return!=null&&te.return()}finally{if(Lr)throw Ur}}}}function Uh(U,z){if(U){if(typeof U=="string")return Dd(U,z);var te=Object.prototype.toString.call(U).slice(8,-1);if(te==="Object"&&U.constructor&&(te=U.constructor.name),te==="Map"||te==="Set")return Array.from(U);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return Dd(U,z)}}function Dd(U,z){(z==null||z>U.length)&&(z=U.length);for(var te=0,Re=new Array(z);te0&&arguments[0]!==void 0?arguments[0]:[];Wl(this,U),Qc(this,"widgets",new Map),Qc(this,"layers",new Map),Qc(this,"services",new Map),te.forEach(function(Re){return z.installAsset(Re)})}return Jh(U,[{key:"registerWidget",value:function(te){this.widgets.has(te.metadata.name)||this.widgets.set(te.metadata.name,te)}},{key:"registerLayer",value:function(te){this.layers.has(te.metadata.name)||this.layers.set(te.metadata.name,te)}},{key:"registerService",value:function(te){this.services.has(te.metadata.name)||this.services.set(te.metadata.name,te)}},{key:"getWidget",value:function(te){var Re=this.widgets.get(te);if(!Re){var Lt={component:function(){return"\u7EC4\u4EF6 ".concat(te," \u672A\u6CE8\u518C\u6210\u529F.")},metadata:{},registerForm:{}};return console.error("[li-sdk]: \u7EC4\u4EF6 ".concat(te," \u672A\u6CE8\u518C\u6210\u529F.")),Lt}return Re}},{key:"getLayer",value:function(te){var Re=this.layers.get(te);if(!Re){var Lt={component:function(){return null},metadata:{},registerForm:{}};return console.error("[li-sdk]: \u56FE\u5C42 ".concat(te," \u672A\u6CE8\u518C\u6210\u529F.")),Lt}return Re}},{key:"getService",value:function(te){var Re=this.services.get(te);if(!Re){var Lt={service:function(){return Promise.resolve([])},metadata:{}};return console.error("[li-sdk]: \u670D\u52A1 ".concat(te," \u672A\u6CE8\u518C\u6210\u529F.")),Lt}return Re}},{key:"getAllWidgets",value:function(){var te=[],Re=Qh(this.widgets.values()),Lt;try{for(Re.s();!(Lt=Re.n()).done;){var or=Lt.value;te.push(or)}}catch(Lr){Re.e(Lr)}finally{Re.f()}return te}},{key:"getAllLayers",value:function(){var te=[],Re=Qh(this.layers.values()),Lt;try{for(Re.s();!(Lt=Re.n()).done;){var or=Lt.value;te.push(or)}}catch(Lr){Re.e(Lr)}finally{Re.f()}return te}},{key:"getAllServices",value:function(){var te=[],Re=Qh(this.services.values()),Lt;try{for(Re.s();!(Lt=Re.n()).done;){var or=Lt.value;te.push(or)}}catch(Lr){Re.e(Lr)}finally{Re.f()}return te}},{key:"installAsset",value:function(te){var Re,Lt=this,or,Lr;(Re=te.widgets)===null||Re===void 0||Re.forEach(function(Ur){return Lt.registerWidget(Ur)}),(or=te.layers)===null||or===void 0||or.forEach(function(Ur){return Lt.registerLayer(Ur)}),(Lr=te.services)===null||Lr===void 0||Lr.forEach(function(Ur){return Lt.registerService(Ur)})}}]),U}(),Ih=kf,hd=_(21376),Gh=_(32312),Jp=_(91284);function i0(U,z,te){(te!==void 0&&!(0,Jp.Z)(U[z],te)||te===void 0&&!(z in U))&&(0,Gh.Z)(U,z,te)}var Cp=i0,Tp=_(63928),sp=_(45785),y0=_(21246),a0=_(10214),Lp=_(78163),Wd=_(18519),d0=_(83047),hf=_(21314);function Jc(U){return(0,hf.Z)(U)&&(0,d0.Z)(U)}var td=Jc,Ud=_(43156),P0=_(60240),Dp=_(9935),kh=_(77844),Zc=_(58166);function dh(U,z){if(!(z==="constructor"&&typeof U[z]=="function")&&z!="__proto__")return U[z]}var rd=dh,$p=_(71554),k0=_(84975);function H0(U){return(0,$p.Z)(U,(0,k0.Z)(U))}var _0=H0;function tm(U,z,te,Re,Lt,or,Lr){var Ur=rd(U,te),cn=rd(z,te),$n=Lr.get(cn);if($n){Cp(U,te,$n);return}var Ai=or?or(Ur,cn,te+"",U,z,Lr):void 0,Qo=Ai===void 0;if(Qo){var Go=(0,Hn.Z)(cn),xo=!Go&&(0,Ud.Z)(cn),Wo=!Go&&!xo&&(0,Zc.Z)(cn);Ai=cn,Go||xo||Wo?(0,Hn.Z)(Ur)?Ai=Ur:td(Ur)?Ai=(0,a0.Z)(Ur):xo?(Qo=!1,Ai=(0,sp.Z)(cn,!0)):Wo?(Qo=!1,Ai=(0,y0.Z)(cn,!0)):Ai=[]:(0,kh.Z)(cn)||(0,Wd.Z)(cn)?(Ai=Ur,(0,Wd.Z)(Ur)?Ai=_0(Ur):(!(0,Dp.Z)(Ur)||(0,P0.Z)(Ur))&&(Ai=(0,Lp.Z)(cn))):Qo=!1}Qo&&(Lr.set(cn,Ai),Lt(Ai,cn,Re,or,Lr),Lr.delete(cn)),Cp(U,te,Ai)}var Dc=tm;function F0(U,z,te,Re,Lt){U!==z&&(0,Tp.Z)(z,function(or,Lr){if(Lt||(Lt=new hd.Z),(0,Dp.Z)(or))Dc(U,z,Lr,te,F0,Re,Lt);else{var Ur=Re?Re(rd(U,Lr),or,Lr+"",U,z,Lt):void 0;Ur===void 0&&(Ur=or),Cp(U,Lr,Ur)}},k0.Z)}var I0=F0,_d=_(64739),e0=_(48301),R0=_(79524);function O0(U,z){return(0,R0.Z)((0,e0.Z)(U,z,_d.Z),U+"")}var Td=O0,pp=_(1773);function B0(U,z,te){if(!(0,Dp.Z)(te))return!1;var Re=typeof z;return(Re=="number"?(0,d0.Z)(te)&&(0,pp.Z)(z,te.length):Re=="string"&&z in te)?(0,Jp.Z)(te[z],U):!1}var Hp=B0;function G0(U){return Td(function(z,te){var Re=-1,Lt=te.length,or=Lt>1?te[Lt-1]:void 0,Lr=Lt>2?te[2]:void 0;for(or=U.length>3&&typeof or=="function"?(Lt--,or):void 0,Lr&&Hp(te[0],te[1],Lr)&&(or=Lt<3?void 0:or,Lt=1),z=Object(z);++Re0&&arguments[0]!==void 0?arguments[0]:{},Ai=Ur.map(function(Qo){return d.cloneElement(Qo,$n)});return Ai}};for(var or in z[U])Lt();return Re},[z,U]);return te}function Ra(){return Ra=Object.assign?Object.assign.bind():function(U){for(var z=1;zU.length)&&(z=U.length);for(var te=0,Re=new Array(z);te0&&arguments[0]!==void 0?arguments[0]:{assets:[]};Bt(this,U),An(this,"options",void 0),An(this,"registryManager",void 0),An(this,"stateManager",void 0),An(this,"eventBus",new Hf.Z),An(this,"App",void 0);var te=z.assets,Re=z.initialGlobalState;this.options=z,this.registryManager=new Ih(te),this.stateManager=new hi(Re),this.App=(0,d.memo)(this.getApp()),this.installAssets(te)}return Er(U,[{key:"installAssets",value:function(te){var Re=this;te.forEach(function(Lt){return Re.registryManager.installAsset(Lt)})}},{key:"getApp",value:function(){var te=this.eventBus,Re=this.registryManager,Lt=this.stateManager;return function(Lr){var Ur=Lr.config,cn=Ur.datasets,$n=Ur.spec;Lt.initState(Lr.config);var Ai=(0,d.useMemo)(function(){return{eventBus:te,registryManager:Re,stateManager:Lt}},[cn,$n]);return d.createElement(Ie.Provider,{value:Ai},d.createElement(Le,Lr))}}}]),U}(),va=Ei,es=["assets","initialGlobalState"];function Io(U,z){if(U==null)return{};var te=io(U,z),Re,Lt;if(Object.getOwnPropertySymbols){var or=Object.getOwnPropertySymbols(U);for(Lt=0;Lt=0)&&Object.prototype.propertyIsEnumerable.call(U,Re)&&(te[Re]=U[Re])}return te}function io(U,z){if(U==null)return{};var te={},Re=Object.keys(U),Lt,or;for(or=0;or=0)&&(te[Lt]=U[Lt]);return te}var ao=function(z){var te=z.assets,Re=z.initialGlobalState,Lt=Io(z,es),or=(0,d.useMemo)(function(){return new va({assets:te,initialGlobalState:Re})},[]),Lr=or.App;return d.createElement(Lr,Lt)},Va=(0,d.memo)(ao);function zl(U){var z,te=(z=U.registerForm)!==null&&z!==void 0?z:{schema:{}},Re=Object.assign(U,{registerForm:te});return Re}function Ll(U){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},Ll(U)}var Ru;function xl(U,z,te){return z=Th(z),z in U?Object.defineProperty(U,z,{value:te,enumerable:!0,configurable:!0,writable:!0}):U[z]=te,U}function Th(U){var z=Bh(U,"string");return Ll(z)==="symbol"?z:String(z)}function Bh(U,z){if(Ll(U)!=="object"||U===null)return U;var te=U[Symbol.toPrimitive];if(te!==void 0){var Re=te.call(U,z||"default");if(Ll(Re)!=="object")return Re;throw new TypeError("@@toPrimitive must return a primitive value.")}return(z==="string"?String:Number)(U)}function wh(U){return ad(U)||Mc(U)||Yl(U)||Jf()}function Jf(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yl(U,z){if(U){if(typeof U=="string")return Tf(U,z);var te=Object.prototype.toString.call(U).slice(8,-1);if(te==="Object"&&U.constructor&&(te=U.constructor.name),te==="Map"||te==="Set")return Array.from(U);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return Tf(U,z)}}function Mc(U){if(typeof Symbol!="undefined"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}function ad(U){if(Array.isArray(U))return Tf(U)}function Tf(U,z){(z==null||z>U.length)&&(z=U.length);for(var te=0,Re=new Array(z);te.5?rt/(2-lt-Ye):rt/(lt+Ye),lt){case Xe:It=(ft-Ge)/rt+(ft1&&(Ge-=1),Ge<1/6?Xe+(ft-Xe)*(6*Ge):Ge<1/2?ft:Ge<2/3?Xe+(ft-Xe)*(2/3-Ge)*6:Xe}function $(Xe,ft,Ge){var lt,Ye,It;if(Xe=(0,M.sh)(Xe,360),ft=(0,M.sh)(ft,100),Ge=(0,M.sh)(Ge,100),ft===0)Ye=Ge,It=Ge,lt=Ge;else{var At=Ge<.5?Ge*(1+ft):Ge+ft-Ge*ft,Ue=2*Ge-At;lt=d(Ue,At,Xe+1/3),Ye=d(Ue,At,Xe),It=d(Ue,At,Xe-1/3)}return{r:lt*255,g:Ye*255,b:It*255}}function X(Xe,ft,Ge){Xe=(0,M.sh)(Xe,255),ft=(0,M.sh)(ft,255),Ge=(0,M.sh)(Ge,255);var lt=Math.max(Xe,ft,Ge),Ye=Math.min(Xe,ft,Ge),It=0,At=lt,Ue=lt-Ye,rt=lt===0?0:Ue/lt;if(lt===Ye)It=0;else{switch(lt){case Xe:It=(ft-Ge)/Ue+(ft>16,g:(Xe&65280)>>8,b:Xe&255}}},93796:function(Ke,ye,_){"use strict";_.d(ye,{R:function(){return M}});var M={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},9915:function(Ke,ye,_){"use strict";_.d(ye,{uA:function(){return d}});var M=_(12722),V=_(93796),y=_(12187);function d(Ee){var qe={r:0,g:0,b:0},Xe=1,ft=null,Ge=null,lt=null,Ye=!1,It=!1;return typeof Ee=="string"&&(Ee=Ie(Ee)),typeof Ee=="object"&&(we(Ee.r)&&we(Ee.g)&&we(Ee.b)?(qe=(0,M.rW)(Ee.r,Ee.g,Ee.b),Ye=!0,It=String(Ee.r).substr(-1)==="%"?"prgb":"rgb"):we(Ee.h)&&we(Ee.s)&&we(Ee.v)?(ft=(0,y.JX)(Ee.s),Ge=(0,y.JX)(Ee.v),qe=(0,M.WE)(Ee.h,ft,Ge),Ye=!0,It="hsv"):we(Ee.h)&&we(Ee.s)&&we(Ee.l)&&(ft=(0,y.JX)(Ee.s),lt=(0,y.JX)(Ee.l),qe=(0,M.ve)(Ee.h,ft,lt),Ye=!0,It="hsl"),Object.prototype.hasOwnProperty.call(Ee,"a")&&(Xe=Ee.a)),Xe=(0,y.Yq)(Xe),{ok:Ye,format:Ee.format||It,r:Math.min(255,Math.max(qe.r,0)),g:Math.min(255,Math.max(qe.g,0)),b:Math.min(255,Math.max(qe.b,0)),a:Xe}}var $="[-\\+]?\\d+%?",X="[-\\+]?\\d*\\.\\d+%?",oe="(?:".concat(X,")|(?:").concat($,")"),re="[\\s|\\(]+(".concat(oe,")[,|\\s]+(").concat(oe,")[,|\\s]+(").concat(oe,")\\s*\\)?"),le="[\\s|\\(]+(".concat(oe,")[,|\\s]+(").concat(oe,")[,|\\s]+(").concat(oe,")[,|\\s]+(").concat(oe,")\\s*\\)?"),ce={CSS_UNIT:new RegExp(oe),rgb:new RegExp("rgb"+re),rgba:new RegExp("rgba"+le),hsl:new RegExp("hsl"+re),hsla:new RegExp("hsla"+le),hsv:new RegExp("hsv"+re),hsva:new RegExp("hsva"+le),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Ie(Ee){if(Ee=Ee.trim().toLowerCase(),Ee.length===0)return!1;var qe=!1;if(V.R[Ee])Ee=V.R[Ee],qe=!0;else if(Ee==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Xe=ce.rgb.exec(Ee);return Xe?{r:Xe[1],g:Xe[2],b:Xe[3]}:(Xe=ce.rgba.exec(Ee),Xe?{r:Xe[1],g:Xe[2],b:Xe[3],a:Xe[4]}:(Xe=ce.hsl.exec(Ee),Xe?{h:Xe[1],s:Xe[2],l:Xe[3]}:(Xe=ce.hsla.exec(Ee),Xe?{h:Xe[1],s:Xe[2],l:Xe[3],a:Xe[4]}:(Xe=ce.hsv.exec(Ee),Xe?{h:Xe[1],s:Xe[2],v:Xe[3]}:(Xe=ce.hsva.exec(Ee),Xe?{h:Xe[1],s:Xe[2],v:Xe[3],a:Xe[4]}:(Xe=ce.hex8.exec(Ee),Xe?{r:(0,M.VD)(Xe[1]),g:(0,M.VD)(Xe[2]),b:(0,M.VD)(Xe[3]),a:(0,M.T6)(Xe[4]),format:qe?"name":"hex8"}:(Xe=ce.hex6.exec(Ee),Xe?{r:(0,M.VD)(Xe[1]),g:(0,M.VD)(Xe[2]),b:(0,M.VD)(Xe[3]),format:qe?"name":"hex"}:(Xe=ce.hex4.exec(Ee),Xe?{r:(0,M.VD)(Xe[1]+Xe[1]),g:(0,M.VD)(Xe[2]+Xe[2]),b:(0,M.VD)(Xe[3]+Xe[3]),a:(0,M.T6)(Xe[4]+Xe[4]),format:qe?"name":"hex8"}:(Xe=ce.hex3.exec(Ee),Xe?{r:(0,M.VD)(Xe[1]+Xe[1]),g:(0,M.VD)(Xe[2]+Xe[2]),b:(0,M.VD)(Xe[3]+Xe[3]),format:qe?"name":"hex"}:!1)))))))))}function we(Ee){return!!ce.CSS_UNIT.exec(String(Ee))}},64993:function(Ke,ye,_){"use strict";_.d(ye,{C:function(){return $}});var M=_(12722),V=_(93796),y=_(9915),d=_(12187),$=function(){function oe(re,le){re===void 0&&(re=""),le===void 0&&(le={});var ce;if(re instanceof oe)return re;typeof re=="number"&&(re=(0,M.Yt)(re)),this.originalInput=re;var Ie=(0,y.uA)(re);this.originalInput=re,this.r=Ie.r,this.g=Ie.g,this.b=Ie.b,this.a=Ie.a,this.roundA=Math.round(100*this.a)/100,this.format=(ce=le.format)!==null&&ce!==void 0?ce:Ie.format,this.gradientType=le.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=Ie.ok}return oe.prototype.isDark=function(){return this.getBrightness()<128},oe.prototype.isLight=function(){return!this.isDark()},oe.prototype.getBrightness=function(){var re=this.toRgb();return(re.r*299+re.g*587+re.b*114)/1e3},oe.prototype.getLuminance=function(){var re=this.toRgb(),le,ce,Ie,we=re.r/255,Ee=re.g/255,qe=re.b/255;return we<=.03928?le=we/12.92:le=Math.pow((we+.055)/1.055,2.4),Ee<=.03928?ce=Ee/12.92:ce=Math.pow((Ee+.055)/1.055,2.4),qe<=.03928?Ie=qe/12.92:Ie=Math.pow((qe+.055)/1.055,2.4),.2126*le+.7152*ce+.0722*Ie},oe.prototype.getAlpha=function(){return this.a},oe.prototype.setAlpha=function(re){return this.a=(0,d.Yq)(re),this.roundA=Math.round(100*this.a)/100,this},oe.prototype.isMonochrome=function(){var re=this.toHsl().s;return re===0},oe.prototype.toHsv=function(){var re=(0,M.py)(this.r,this.g,this.b);return{h:re.h*360,s:re.s,v:re.v,a:this.a}},oe.prototype.toHsvString=function(){var re=(0,M.py)(this.r,this.g,this.b),le=Math.round(re.h*360),ce=Math.round(re.s*100),Ie=Math.round(re.v*100);return this.a===1?"hsv(".concat(le,", ").concat(ce,"%, ").concat(Ie,"%)"):"hsva(".concat(le,", ").concat(ce,"%, ").concat(Ie,"%, ").concat(this.roundA,")")},oe.prototype.toHsl=function(){var re=(0,M.lC)(this.r,this.g,this.b);return{h:re.h*360,s:re.s,l:re.l,a:this.a}},oe.prototype.toHslString=function(){var re=(0,M.lC)(this.r,this.g,this.b),le=Math.round(re.h*360),ce=Math.round(re.s*100),Ie=Math.round(re.l*100);return this.a===1?"hsl(".concat(le,", ").concat(ce,"%, ").concat(Ie,"%)"):"hsla(".concat(le,", ").concat(ce,"%, ").concat(Ie,"%, ").concat(this.roundA,")")},oe.prototype.toHex=function(re){return re===void 0&&(re=!1),(0,M.vq)(this.r,this.g,this.b,re)},oe.prototype.toHexString=function(re){return re===void 0&&(re=!1),"#"+this.toHex(re)},oe.prototype.toHex8=function(re){return re===void 0&&(re=!1),(0,M.s)(this.r,this.g,this.b,this.a,re)},oe.prototype.toHex8String=function(re){return re===void 0&&(re=!1),"#"+this.toHex8(re)},oe.prototype.toHexShortString=function(re){return re===void 0&&(re=!1),this.a===1?this.toHexString(re):this.toHex8String(re)},oe.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},oe.prototype.toRgbString=function(){var re=Math.round(this.r),le=Math.round(this.g),ce=Math.round(this.b);return this.a===1?"rgb(".concat(re,", ").concat(le,", ").concat(ce,")"):"rgba(".concat(re,", ").concat(le,", ").concat(ce,", ").concat(this.roundA,")")},oe.prototype.toPercentageRgb=function(){var re=function(le){return"".concat(Math.round((0,d.sh)(le,255)*100),"%")};return{r:re(this.r),g:re(this.g),b:re(this.b),a:this.a}},oe.prototype.toPercentageRgbString=function(){var re=function(le){return Math.round((0,d.sh)(le,255)*100)};return this.a===1?"rgb(".concat(re(this.r),"%, ").concat(re(this.g),"%, ").concat(re(this.b),"%)"):"rgba(".concat(re(this.r),"%, ").concat(re(this.g),"%, ").concat(re(this.b),"%, ").concat(this.roundA,")")},oe.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var re="#"+(0,M.vq)(this.r,this.g,this.b,!1),le=0,ce=Object.entries(V.R);le=0,we=!le&&Ie&&(re.startsWith("hex")||re==="name");return we?re==="name"&&this.a===0?this.toName():this.toRgbString():(re==="rgb"&&(ce=this.toRgbString()),re==="prgb"&&(ce=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(ce=this.toHexString()),re==="hex3"&&(ce=this.toHexString(!0)),re==="hex4"&&(ce=this.toHex8String(!0)),re==="hex8"&&(ce=this.toHex8String()),re==="name"&&(ce=this.toName()),re==="hsl"&&(ce=this.toHslString()),re==="hsv"&&(ce=this.toHsvString()),ce||this.toHexString())},oe.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},oe.prototype.clone=function(){return new oe(this.toString())},oe.prototype.lighten=function(re){re===void 0&&(re=10);var le=this.toHsl();return le.l+=re/100,le.l=(0,d.V2)(le.l),new oe(le)},oe.prototype.brighten=function(re){re===void 0&&(re=10);var le=this.toRgb();return le.r=Math.max(0,Math.min(255,le.r-Math.round(255*-(re/100)))),le.g=Math.max(0,Math.min(255,le.g-Math.round(255*-(re/100)))),le.b=Math.max(0,Math.min(255,le.b-Math.round(255*-(re/100)))),new oe(le)},oe.prototype.darken=function(re){re===void 0&&(re=10);var le=this.toHsl();return le.l-=re/100,le.l=(0,d.V2)(le.l),new oe(le)},oe.prototype.tint=function(re){return re===void 0&&(re=10),this.mix("white",re)},oe.prototype.shade=function(re){return re===void 0&&(re=10),this.mix("black",re)},oe.prototype.desaturate=function(re){re===void 0&&(re=10);var le=this.toHsl();return le.s-=re/100,le.s=(0,d.V2)(le.s),new oe(le)},oe.prototype.saturate=function(re){re===void 0&&(re=10);var le=this.toHsl();return le.s+=re/100,le.s=(0,d.V2)(le.s),new oe(le)},oe.prototype.greyscale=function(){return this.desaturate(100)},oe.prototype.spin=function(re){var le=this.toHsl(),ce=(le.h+re)%360;return le.h=ce<0?360+ce:ce,new oe(le)},oe.prototype.mix=function(re,le){le===void 0&&(le=50);var ce=this.toRgb(),Ie=new oe(re).toRgb(),we=le/100,Ee={r:(Ie.r-ce.r)*we+ce.r,g:(Ie.g-ce.g)*we+ce.g,b:(Ie.b-ce.b)*we+ce.b,a:(Ie.a-ce.a)*we+ce.a};return new oe(Ee)},oe.prototype.analogous=function(re,le){re===void 0&&(re=6),le===void 0&&(le=30);var ce=this.toHsl(),Ie=360/le,we=[this];for(ce.h=(ce.h-(Ie*re>>1)+720)%360;--re;)ce.h=(ce.h+Ie)%360,we.push(new oe(ce));return we},oe.prototype.complement=function(){var re=this.toHsl();return re.h=(re.h+180)%360,new oe(re)},oe.prototype.monochromatic=function(re){re===void 0&&(re=6);for(var le=this.toHsv(),ce=le.h,Ie=le.s,we=le.v,Ee=[],qe=1/re;re--;)Ee.push(new oe({h:ce,s:Ie,v:we})),we=(we+qe)%1;return Ee},oe.prototype.splitcomplement=function(){var re=this.toHsl(),le=re.h;return[this,new oe({h:(le+72)%360,s:re.s,l:re.l}),new oe({h:(le+216)%360,s:re.s,l:re.l})]},oe.prototype.onBackground=function(re){var le=this.toRgb(),ce=new oe(re).toRgb(),Ie=le.a+ce.a*(1-le.a);return new oe({r:(le.r*le.a+ce.r*ce.a*(1-le.a))/Ie,g:(le.g*le.a+ce.g*ce.a*(1-le.a))/Ie,b:(le.b*le.a+ce.b*ce.a*(1-le.a))/Ie,a:Ie})},oe.prototype.triad=function(){return this.polyad(3)},oe.prototype.tetrad=function(){return this.polyad(4)},oe.prototype.polyad=function(re){for(var le=this.toHsl(),ce=le.h,Ie=[this],we=360/re,Ee=1;Ee1)&&(re=1),re}function X(re){return re<=1?"".concat(Number(re)*100,"%"):re}function oe(re){return re.length===1?"0"+re:String(re)}},68564:function(Ke,ye,_){"use strict";_.d(ye,{iv:function(){return On}});function M(ut){if(ut.sheet)return ut.sheet;for(var Wt=0;Wt0?we(rt,--At):0,Ye--,Ue===10&&(Ye=1,lt--),Ue}function at(){return Ue=At2||Ht(Ue)>3?"":" "}function et(ut){for(;at();)switch(Ht(Ue)){case 0:append(gn(At-1),ut);break;case 2:append(Je(Ue),ut);break;default:append(from(Ue),ut)}return ut}function br(ut,Wt){for(;--Wt&&at()&&!(Ue<48||Ue>102||Ue>57&&Ue<65||Ue>70&&Ue<97););return Me(ut,Mt()+(Wt<6&&mt()==32&&at()==32))}function Jt(ut){for(;at();)switch(Ue){case ut:return At;case 34:case 39:ut!==34&&ut!==39&&Jt(Ue);break;case 40:ut===41&&Jt(ut);break;case 92:at();break}return At}function Vr(ut,Wt){for(;at()&&ut+Ue!==47+10;)if(ut+Ue===42+42&&mt()===47)break;return"/*"+Me(Wt,At-1)+"*"+$(ut===47?ut:at())}function gn(ut){for(;!Ht(mt());)at();return Me(ut,At)}var yn="-ms-",_i="-moz-",Hn="-webkit-",Ln="comm",Ia="rule",Zi="decl",Ua="@page",fa="@media",ka="@import",mo="@charset",_n="@viewport",yi="@supports",Zn="@document",gr="@namespace",Ea="@keyframes",co="@font-face",Qa="@counter-style",oa="@font-feature-values",ji="@layer";function so(ut,Wt){for(var wr="",bn=Xe(ut),vn=0;vn-1&&!ut.return)switch(ut.type){case DECLARATION:ut.return=prefix(ut.value,ut.length,wr);return;case KEYFRAMES:return serialize([copy(ut,{value:replace(ut.value,"@","@"+WEBKIT)})],bn);case RULESET:if(ut.length)return combine(ut.props,function(vn){switch(match(vn,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(ut,{props:[replace(vn,/:(read-\w+)/,":"+MOZ+"$1")]})],bn);case"::placeholder":return serialize([copy(ut,{props:[replace(vn,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(ut,{props:[replace(vn,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(ut,{props:[replace(vn,/:(plac\w+)/,MS+"input-$1")]})],bn)}return""})}}function pa(ut){switch(ut.type){case RULESET:ut.props=ut.props.map(function(Wt){return combine(tokenize(Wt),function(wr,bn,vn){switch(charat(wr,0)){case 12:return substr(wr,1,strlen(wr));case 0:case 40:case 43:case 62:case 126:return wr;case 58:vn[++bn]==="global"&&(vn[bn]="",vn[++bn]="\f"+substr(vn[bn],bn=1,-1));case 32:return bn===1?"":wr;default:switch(bn){case 0:return ut=wr,sizeof(vn)>1?"":wr;case(bn=sizeof(vn)-1):case 2:return bn===2?wr+ut+ut:wr+ut;default:return wr}}})})}}function uo(ut){return vt(Ir("",null,null,null,[""],ut=Rt(ut),0,[0],ut))}function Ir(ut,Wt,wr,bn,vn,Xi,ya,Bo,xn){for(var zr=0,xt=0,Nt=ya,lr=0,$r=0,Yr=0,un=1,Sn=1,qn=1,ti=0,Ui="",ra=vn,ia=Xi,vi=bn,gi=Ui;Sn;)switch(Yr=ti,ti=at()){case 40:if(Yr!=108&&we(gi,Nt-1)==58){Ie(gi+=ce(Je(ti),"&","&\f"),"&\f")!=-1&&(qn=-1);break}case 34:case 39:case 91:gi+=Je(ti);break;case 9:case 10:case 13:case 32:gi+=pt(Yr);break;case 92:gi+=br(Mt()-1,7);continue;case 47:switch(mt()){case 42:case 47:ft(Yt(Vr(at(),Mt()),Wt,wr),xn);break;default:gi+="/"}break;case 123*un:Bo[zr++]=qe(gi)*qn;case 125*un:case 59:case 0:switch(ti){case 0:case 125:Sn=0;case 59+xt:qn==-1&&(gi=ce(gi,/\f/g,"")),$r>0&&qe(gi)-Nt&&ft($r>32?Pt(gi+";",bn,wr,Nt-1):Pt(ce(gi," ","")+";",bn,wr,Nt-2),xn);break;case 59:gi+=";";default:if(ft(vi=bt(gi,Wt,wr,zr,xt,vn,Bo,Ui,ra=[],ia=[],Nt),Xi),ti===123)if(xt===0)Ir(gi,Wt,vi,vi,ra,Xi,Nt,Bo,ia);else switch(lr===99&&we(gi,3)===110?100:lr){case 100:case 108:case 109:case 115:Ir(ut,vi,vi,bn&&ft(bt(ut,vi,vi,0,0,vn,Bo,Ui,vn,ra=[],Nt),ia),vn,ia,Nt,Bo,bn?ra:ia);break;default:Ir(gi,vi,vi,vi,[""],ia,0,Bo,ia)}}zr=xt=$r=0,un=qn=1,Ui=gi="",Nt=ya;break;case 58:Nt=1+qe(gi),$r=Yr;default:if(un<1){if(ti==123)--un;else if(ti==125&&un++==0&&Et()==125)continue}switch(gi+=$(ti),ti*un){case 38:qn=xt>0?1:(gi+="\f",-1);break;case 44:Bo[zr++]=(qe(gi)-1)*qn,qn=1;break;case 64:mt()===45&&(gi+=Je(at())),lr=mt(),xt=Nt=qe(Ui=gi+=gn(Mt())),ti++;break;case 45:Yr===45&&qe(gi)==2&&(un=0)}}return Xi}function bt(ut,Wt,wr,bn,vn,Xi,ya,Bo,xn,zr,xt){for(var Nt=vn-1,lr=vn===0?Xi:[""],$r=Xe(lr),Yr=0,un=0,Sn=0;Yr0?lr[qn]+" "+ti:ce(ti,/&\f/g,lr[qn])))&&(xn[Sn++]=Ui);return Ze(ut,Wt,wr,vn===0?Ia:Bo,xn,zr,xt)}function Yt(ut,Wt,wr){return Ze(ut,Wt,wr,Ln,$(st()),Ee(ut,2,-2),0)}function Pt(ut,Wt,wr,bn){return Ze(ut,Wt,wr,Zi,Ee(ut,0,bn),Ee(ut,bn+1,-1),bn)}var xr=function(Wt,wr,bn){for(var vn=0,Xi=0;vn=Xi,Xi=mt(),vn===38&&Xi===12&&(wr[bn]=1),!Ht(Xi);)at();return Me(Wt,At)},Tr=function(Wt,wr){var bn=-1,vn=44;do switch(Ht(vn)){case 0:vn===38&&mt()===12&&(wr[bn]=1),Wt[bn]+=xr(At-1,wr,bn);break;case 2:Wt[bn]+=Je(vn);break;case 4:if(vn===44){Wt[++bn]=mt()===58?"&\f":"",wr[bn]=Wt[bn].length;break}default:Wt[bn]+=$(vn)}while(vn=at());return Wt},hn=function(Wt,wr){return vt(Tr(Rt(Wt),wr))},Cn=new WeakMap,tr=function(Wt){if(!(Wt.type!=="rule"||!Wt.parent||Wt.length<1)){for(var wr=Wt.value,bn=Wt.parent,vn=Wt.column===bn.column&&Wt.line===bn.line;bn.type!=="rule";)if(bn=bn.parent,!bn)return;if(!(Wt.props.length===1&&wr.charCodeAt(0)!==58&&!Cn.get(bn))&&!vn){Cn.set(Wt,!0);for(var Xi=[],ya=hn(wr,Xi),Bo=bn.props,xn=0,zr=0;xn-1},_t=function(Wt){return function(wr,bn,vn){if(!(wr.type!=="rule"||Wt.compat)){var Xi=wr.value.match(/(:first|:nth|:nth-last)-child/g);if(Xi){for(var ya=!!wr.parent,Bo=ya?wr.parent.children:vn,xn=Bo.length-1;xn>=0;xn--){var zr=Bo[xn];if(zr.line=0;bn--)if(!Zt(wr[bn]))return!0;return!1},fr=function(Wt){Wt.type="",Wt.value="",Wt.return="",Wt.children="",Wt.props=""},mr=function(Wt,wr,bn){Zt(Wt)&&(Wt.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),fr(Wt)):rr(wr,bn)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),fr(Wt)))};function Qe(ut,Wt){switch(oe(ut,Wt)){case 5103:return Hn+"print-"+ut+ut;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 Hn+ut+ut;case 5349:case 4246:case 4810:case 6968:case 2756:return Hn+ut+_i+ut+yn+ut+ut;case 6828:case 4268:return Hn+ut+yn+ut+ut;case 6165:return Hn+ut+yn+"flex-"+ut+ut;case 5187:return Hn+ut+ce(ut,/(\w+).+(:[^]+)/,Hn+"box-$1$2"+yn+"flex-$1$2")+ut;case 5443:return Hn+ut+yn+"flex-item-"+ce(ut,/flex-|-self/,"")+ut;case 4675:return Hn+ut+yn+"flex-line-pack"+ce(ut,/align-content|flex-|-self/,"")+ut;case 5548:return Hn+ut+yn+ce(ut,"shrink","negative")+ut;case 5292:return Hn+ut+yn+ce(ut,"basis","preferred-size")+ut;case 6060:return Hn+"box-"+ce(ut,"-grow","")+Hn+ut+yn+ce(ut,"grow","positive")+ut;case 4554:return Hn+ce(ut,/([^-])(transform)/g,"$1"+Hn+"$2")+ut;case 6187:return ce(ce(ce(ut,/(zoom-|grab)/,Hn+"$1"),/(image-set)/,Hn+"$1"),ut,"")+ut;case 5495:case 3959:return ce(ut,/(image-set\([^]*)/,Hn+"$1$`$1");case 4968:return ce(ce(ut,/(.+:)(flex-)?(.*)/,Hn+"box-pack:$3"+yn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Hn+ut+ut;case 4095:case 3583:case 4068:case 2532:return ce(ut,/(.+)-inline(.+)/,Hn+"$1$2")+ut;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(qe(ut)-1-Wt>6)switch(we(ut,Wt+1)){case 109:if(we(ut,Wt+4)!==45)break;case 102:return ce(ut,/(.+:)(.+)-([^]+)/,"$1"+Hn+"$2-$3$1"+_i+(we(ut,Wt+3)==108?"$3":"$2-$3"))+ut;case 115:return~Ie(ut,"stretch")?Qe(ce(ut,"stretch","fill-available"),Wt)+ut:ut}break;case 4949:if(we(ut,Wt+1)!==115)break;case 6444:switch(we(ut,qe(ut)-3-(~Ie(ut,"!important")&&10))){case 107:return ce(ut,":",":"+Hn)+ut;case 101:return ce(ut,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Hn+(we(ut,14)===45?"inline-":"")+"box$3$1"+Hn+"$2$3$1"+yn+"$2box$3")+ut}break;case 5936:switch(we(ut,Wt+11)){case 114:return Hn+ut+yn+ce(ut,/[svh]\w+-[tblr]{2}/,"tb")+ut;case 108:return Hn+ut+yn+ce(ut,/[svh]\w+-[tblr]{2}/,"tb-rl")+ut;case 45:return Hn+ut+yn+ce(ut,/[svh]\w+-[tblr]{2}/,"lr")+ut}return Hn+ut+yn+ut+ut}return ut}var er=function(Wt,wr,bn,vn){if(Wt.length>-1&&!Wt.return)switch(Wt.type){case Zi:Wt.return=Qe(Wt.value,Wt.length);break;case Ea:return so([Ct(Wt,{value:ce(Wt.value,"@","@"+Hn)})],vn);case Ia:if(Wt.length)return Ge(Wt.props,function(Xi){switch(le(Xi,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return so([Ct(Wt,{props:[ce(Xi,/:(read-\w+)/,":"+_i+"$1")]})],vn);case"::placeholder":return so([Ct(Wt,{props:[ce(Xi,/:(plac\w+)/,":"+Hn+"input-$1")]}),Ct(Wt,{props:[ce(Xi,/:(plac\w+)/,":"+_i+"$1")]}),Ct(Wt,{props:[ce(Xi,/:(plac\w+)/,yn+"input-$1")]})],vn)}return""})}},jr=[er],on=function(Wt){var wr=Wt.key;if(wr==="css"){var bn=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(bn,function(un){var Sn=un.getAttribute("data-emotion");Sn.indexOf(" ")!==-1&&(document.head.appendChild(un),un.setAttribute("data-s",""))})}var vn=Wt.stylisPlugins||jr,Xi={},ya,Bo=[];ya=Wt.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+wr+' "]'),function(un){for(var Sn=un.getAttribute("data-emotion").split(" "),qn=1;qn=4;++bn,vn-=4)wr=ut.charCodeAt(bn)&255|(ut.charCodeAt(++bn)&255)<<8|(ut.charCodeAt(++bn)&255)<<16|(ut.charCodeAt(++bn)&255)<<24,wr=(wr&65535)*1540483477+((wr>>>16)*59797<<16),wr^=wr>>>24,Wt=(wr&65535)*1540483477+((wr>>>16)*59797<<16)^(Wt&65535)*1540483477+((Wt>>>16)*59797<<16);switch(vn){case 3:Wt^=(ut.charCodeAt(bn+2)&255)<<16;case 2:Wt^=(ut.charCodeAt(bn+1)&255)<<8;case 1:Wt^=ut.charCodeAt(bn)&255,Wt=(Wt&65535)*1540483477+((Wt>>>16)*59797<<16)}return Wt^=Wt>>>13,Wt=(Wt&65535)*1540483477+((Wt>>>16)*59797<<16),((Wt^Wt>>>15)>>>0).toString(36)}var nn={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,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};function ln(ut){var Wt=Object.create(null);return function(wr){return Wt[wr]===void 0&&(Wt[wr]=ut(wr)),Wt[wr]}}var Yn=`You have illegal escape sequence in your template literal, most likely inside content's property value. -Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". -You can read more about this here: -https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,Wn="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Tn=/[A-Z]|^ms/g,ai=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ii=function(Wt){return Wt.charCodeAt(1)===45},ki=function(Wt){return Wt!=null&&typeof Wt!="boolean"},Fa=ln(function(ut){return Ii(ut)?ut:ut.replace(Tn,"-$&").toLowerCase()}),sa=function(Wt,wr){switch(Wt){case"animation":case"animationName":if(typeof wr=="string")return wr.replace(ai,function(bn,vn,Xi){return wi={name:vn,styles:Xi,next:wi},vn})}return nn[Wt]!==1&&!Ii(Wt)&&typeof wr=="number"&&wr!==0?wr+"px":wr};if(!1)var vo,Ro,Za,Os,ro,Tu;var Do=null;function qa(ut,Wt,wr){if(wr==null)return"";if(wr.__emotion_styles!==void 0)return wr;switch(typeof wr){case"boolean":return"";case"object":{if(wr.anim===1)return wi={name:wr.name,styles:wr.styles,next:wi},wr.name;if(wr.styles!==void 0){var bn=wr.next;if(bn!==void 0)for(;bn!==void 0;)wi={name:bn.name,styles:bn.styles,next:wi},bn=bn.next;var vn=wr.styles+";";return vn}return ss(ut,Wt,wr)}case"function":{if(ut!==void 0){var Xi=wi,ya=wr(ut);return wi=Xi,qa(ut,Wt,ya)}break}case"string":if(!1)var Bo,xn;break}if(Wt==null)return wr;var zr=Wt[wr];return zr!==void 0?zr:wr}function ss(ut,Wt,wr){var bn="";if(Array.isArray(wr))for(var vn=0;vn=Math.abs(le)?d-ce+le:le-ce+d,d=ce}d+$>=0!=!!y&&V.reverse()}},59263:function(Ke){"use strict";Ke.exports=ye;function ye(_,M){this.x=_,this.y=M}ye.prototype={clone:function(){return new ye(this.x,this.y)},add:function(_){return this.clone()._add(_)},sub:function(_){return this.clone()._sub(_)},multByPoint:function(_){return this.clone()._multByPoint(_)},divByPoint:function(_){return this.clone()._divByPoint(_)},mult:function(_){return this.clone()._mult(_)},div:function(_){return this.clone()._div(_)},rotate:function(_){return this.clone()._rotate(_)},rotateAround:function(_,M){return this.clone()._rotateAround(_,M)},matMult:function(_){return this.clone()._matMult(_)},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(_){return this.x===_.x&&this.y===_.y},dist:function(_){return Math.sqrt(this.distSqr(_))},distSqr:function(_){var M=_.x-this.x,V=_.y-this.y;return M*M+V*V},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(_){return Math.atan2(this.y-_.y,this.x-_.x)},angleWith:function(_){return this.angleWithSep(_.x,_.y)},angleWithSep:function(_,M){return Math.atan2(this.x*M-this.y*_,this.x*_+this.y*M)},_matMult:function(_){var M=_[0]*this.x+_[1]*this.y,V=_[2]*this.x+_[3]*this.y;return this.x=M,this.y=V,this},_add:function(_){return this.x+=_.x,this.y+=_.y,this},_sub:function(_){return this.x-=_.x,this.y-=_.y,this},_mult:function(_){return this.x*=_,this.y*=_,this},_div:function(_){return this.x/=_,this.y/=_,this},_multByPoint:function(_){return this.x*=_.x,this.y*=_.y,this},_divByPoint:function(_){return this.x/=_.x,this.y/=_.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var _=this.y;return this.y=this.x,this.x=-_,this},_rotate:function(_){var M=Math.cos(_),V=Math.sin(_),y=M*this.x-V*this.y,d=V*this.x+M*this.y;return this.x=y,this.y=d,this},_rotateAround:function(_,M){var V=Math.cos(_),y=Math.sin(_),d=M.x+V*(this.x-M.x)-y*(this.y-M.y),$=M.y+y*(this.x-M.x)+V*(this.y-M.y);return this.x=d,this.y=$,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},ye.convert=function(_){return _ instanceof ye?_:Array.isArray(_)?new ye(_[0],_[1]):_}},52155:function(Ke){"use strict";Ke.exports=_,Ke.exports.default=_;var ye=1e20;function _($,X,oe,re,le,ce){this.fontSize=$||24,this.buffer=X===void 0?3:X,this.cutoff=re||.25,this.fontFamily=le||"sans-serif",this.fontWeight=ce||"normal",this.radius=oe||8;var Ie=this.size=this.fontSize+this.buffer*2,we=Ie+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=Ie,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textAlign="left",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(we*we),this.gridInner=new Float64Array(we*we),this.f=new Float64Array(we),this.z=new Float64Array(we+1),this.v=new Uint16Array(we),this.useMetrics=this.ctx.measureText("A").actualBoundingBoxLeft!==void 0,this.middle=Math.round(Ie/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function M($,X,oe,re,le,ce,Ie){ce.fill(ye,0,X*oe),Ie.fill(0,0,X*oe);for(var we=(X-re)/2,Ee=0;Ee-1);Ee++,ce[Ee]=we,Ie[Ee]=qe,Ie[Ee+1]=ye}for(we=0,Ee=0;wey)return y;for(;V$?V=d:y=d,d=(y-V)*.5+V}return d},ye.prototype.solve=function(_,M){return this.sampleCurveY(this.solveCurveX(_,M))}},8332:function(Ke,ye,_){Ke.exports.VectorTile=_(29148),_(82442),_(37815)},29148:function(Ke,ye,_){"use strict";var M=_(37815);Ke.exports=V;function V(d,$){this.layers=d.readFields(y,{},$)}function y(d,$,X){if(d===3){var oe=new M(X,X.readVarint()+X.pos);oe.length&&($[oe.name]=oe)}}},82442:function(Ke,ye,_){"use strict";var M=_(59263);Ke.exports=V;function V(oe,re,le,ce,Ie){this.properties={},this.extent=le,this.type=0,this._pbf=oe,this._geometry=-1,this._keys=ce,this._values=Ie,oe.readFields(y,this,re)}function y(oe,re,le){oe==1?re.id=le.readVarint():oe==2?d(le,re):oe==3?re.type=le.readVarint():oe==4&&(re._geometry=le.pos)}function d(oe,re){for(var le=oe.readVarint()+oe.pos;oe.pos>3}if(ce--,le===1||le===2)Ie+=oe.readSVarint(),we+=oe.readSVarint(),le===1&&(qe&&Ee.push(qe),qe=[]),qe.push(new M(Ie,we));else if(le===7)qe&&qe.push(qe[0].clone());else throw new Error("unknown command "+le)}return qe&&Ee.push(qe),Ee},V.prototype.bbox=function(){var oe=this._pbf;oe.pos=this._geometry;for(var re=oe.readVarint()+oe.pos,le=1,ce=0,Ie=0,we=0,Ee=1/0,qe=-1/0,Xe=1/0,ft=-1/0;oe.pos>3}if(ce--,le===1||le===2)Ie+=oe.readSVarint(),we+=oe.readSVarint(),Ieqe&&(qe=Ie),weft&&(ft=we);else if(le!==7)throw new Error("unknown command "+le)}return[Ee,Xe,qe,ft]},V.prototype.toGeoJSON=function(oe,re,le){var ce=this.extent*Math.pow(2,le),Ie=this.extent*oe,we=this.extent*re,Ee=this.loadGeometry(),qe=V.types[this.type],Xe,ft;function Ge(It){for(var At=0;At>3;X=re===1?$.readString():re===2?$.readFloat():re===3?$.readDouble():re===4?$.readVarint64():re===5?$.readVarint():re===6?$.readSVarint():re===7?$.readBoolean():null}return X}V.prototype.feature=function($){if($<0||$>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[$];var X=this._pbf.readVarint()+this._pbf.pos;return new M(this._pbf,X,this.extent,this._keys,this._values)}},526:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Et}});var M=_(35372),V=_(77617),y=_(79161),d=_(42871),$=_(36014),X=_(88831),oe=V.createContext(null),re=oe,le=_(49397),ce=_(70658),Ie=[];function we(at,mt){var Mt=V.useState(function(){if(!(0,d.Z)())return null;var gn=document.createElement("div");return gn}),Me=(0,M.Z)(Mt,1),Ht=Me[0],Rt=V.useRef(!1),vt=V.useContext(re),Je=V.useState(Ie),Ce=(0,M.Z)(Je,2),pt=Ce[0],et=Ce[1],br=vt||(Rt.current?void 0:function(gn){et(function(yn){var _i=[gn].concat((0,le.Z)(yn));return _i})});function Jt(){Ht.parentElement||document.body.appendChild(Ht),Rt.current=!0}function Vr(){var gn;(gn=Ht.parentElement)===null||gn===void 0||gn.removeChild(Ht),Rt.current=!1}return(0,ce.Z)(function(){return at?vt?vt(Jt):Jt():Vr(),Vr},[at]),(0,ce.Z)(function(){pt.length&&(pt.forEach(function(gn){return gn()}),et(Ie))},[pt]),[Ht,br]}var Ee=_(75966),qe;function Xe(at){if(typeof document=="undefined")return 0;if(at||qe===void 0){var mt=document.createElement("div");mt.style.width="100%",mt.style.height="200px";var Mt=document.createElement("div"),Me=Mt.style;Me.position="absolute",Me.top="0",Me.left="0",Me.pointerEvents="none",Me.visibility="hidden",Me.width="200px",Me.height="150px",Me.overflow="hidden",Mt.appendChild(mt),document.body.appendChild(Mt);var Ht=mt.offsetWidth;Mt.style.overflow="scroll";var Rt=mt.offsetWidth;Ht===Rt&&(Rt=Mt.clientWidth),document.body.removeChild(Mt),qe=Ht-Rt}return qe}function ft(at){var mt=at.match(/^(.*)px$/),Mt=Number(mt==null?void 0:mt[1]);return Number.isNaN(Mt)?Xe():Mt}function Ge(at){if(typeof document=="undefined"||!at||!(at instanceof Element))return{width:0,height:0};var mt=getComputedStyle(at,"::-webkit-scrollbar"),Mt=mt.width,Me=mt.height;return{width:ft(Mt),height:ft(Me)}}function lt(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var Ye="rc-util-locker-".concat(Date.now()),It=0;function At(at){var mt=!!at,Mt=V.useState(function(){return It+=1,"".concat(Ye,"_").concat(It)}),Me=(0,M.Z)(Mt,1),Ht=Me[0];(0,ce.Z)(function(){if(mt){var Rt=Ge(document.body).width,vt=lt();(0,Ee.hq)(` -html body { - overflow-y: hidden; - `.concat(vt?"width: calc(100% - ".concat(Rt,"px);"):"",` -}`),Ht)}else(0,Ee.jL)(Ht);return function(){(0,Ee.jL)(Ht)}},[mt,Ht])}var Ue=!1;function rt(at){return typeof at=="boolean"&&(Ue=at),Ue}var Ze=function(mt){return mt===!1?!1:!(0,d.Z)()||!mt?null:typeof mt=="string"?document.querySelector(mt):typeof mt=="function"?mt():mt},Ct=V.forwardRef(function(at,mt){var Mt=at.open,Me=at.autoLock,Ht=at.getContainer,Rt=at.debug,vt=at.autoDestroy,Je=vt===void 0?!0:vt,Ce=at.children,pt=V.useState(Mt),et=(0,M.Z)(pt,2),br=et[0],Jt=et[1],Vr=br||Mt;V.useEffect(function(){(Je||Mt)&&Jt(Mt)},[Mt,Je]);var gn=V.useState(function(){return Ze(Ht)}),yn=(0,M.Z)(gn,2),_i=yn[0],Hn=yn[1];V.useEffect(function(){var gr=Ze(Ht);Hn(gr!=null?gr:null)});var Ln=we(Vr&&!_i,Rt),Ia=(0,M.Z)(Ln,2),Zi=Ia[0],Ua=Ia[1],fa=_i!=null?_i:Zi;At(Me&&Mt&&(0,d.Z)()&&(fa===Zi||fa===document.body));var ka=null;if(Ce&&(0,X.Yr)(Ce)&&mt){var mo=Ce;ka=mo.ref}var _n=(0,X.x1)(ka,mt);if(!Vr||!(0,d.Z)()||_i===void 0)return null;var yi=fa===!1||rt(),Zn=Ce;return mt&&(Zn=V.cloneElement(Ce,{ref:_n})),V.createElement(re.Provider,{value:Ua},yi?Zn:(0,y.createPortal)(Zn,fa))}),st=Ct,Et=st},35593:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return mo}});var M=_(54131),V=_(35372),y=_(56348),d=_(526),$=_(92310),X=_.n($),oe=_(28647),re=_(58035),le=_(39057),ce=_(60402),Ie=_(57901),we=_(70658),Ee=_(15639),qe=_(77617),Xe=_(79384),ft=_(44516),Ge=_(88831);function lt(_n){var yi=_n.prefixCls,Zn=_n.align,gr=_n.arrow,Ea=_n.arrowPos,co=gr||{},Qa=co.className,oa=co.content,ji=Ea.x,so=ji===void 0?0:ji,ei=Ea.y,Kn=ei===void 0?0:ei,Jn=qe.useRef();if(!Zn||!Zn.points)return null;var da={position:"absolute"};if(Zn.autoArrow!==!1){var pa=Zn.points[0],uo=Zn.points[1],Ir=pa[0],bt=pa[1],Yt=uo[0],Pt=uo[1];Ir===Yt||!["t","b"].includes(Ir)?da.top=Kn:Ir==="t"?da.top=0:da.bottom=0,bt===Pt||!["l","r"].includes(bt)?da.left=so:bt==="l"?da.left=0:da.right=0}return qe.createElement("div",{ref:Jn,className:X()("".concat(yi,"-arrow"),Qa),style:da},oa)}function Ye(_n){var yi=_n.prefixCls,Zn=_n.open,gr=_n.zIndex,Ea=_n.mask,co=_n.motion;return Ea?qe.createElement(ft.ZP,(0,Xe.Z)({},co,{motionAppear:!0,visible:Zn,removeOnLeave:!0}),function(Qa){var oa=Qa.className;return qe.createElement("div",{style:{zIndex:gr},className:X()("".concat(yi,"-mask"),oa)})}):null}var It=qe.memo(function(_n){var yi=_n.children;return yi},function(_n,yi){return yi.cache}),At=It,Ue=qe.forwardRef(function(_n,yi){var Zn=_n.popup,gr=_n.className,Ea=_n.prefixCls,co=_n.style,Qa=_n.target,oa=_n.onVisibleChanged,ji=_n.open,so=_n.keepDom,ei=_n.fresh,Kn=_n.onClick,Jn=_n.mask,da=_n.arrow,pa=_n.arrowPos,uo=_n.align,Ir=_n.motion,bt=_n.maskMotion,Yt=_n.forceRender,Pt=_n.getPopupContainer,xr=_n.autoDestroy,Tr=_n.portal,hn=_n.zIndex,Cn=_n.onMouseEnter,tr=_n.onMouseLeave,jt=_n.onPointerEnter,He=_n.ready,We=_n.offsetX,_t=_n.offsetY,Zt=_n.offsetR,rr=_n.offsetB,fr=_n.onAlign,mr=_n.onPrepare,Qe=_n.stretch,er=_n.targetWidth,jr=_n.targetHeight,on=typeof Zn=="function"?Zn():Zn,ri=ji||so,nn=(Pt==null?void 0:Pt.length)>0,ln=qe.useState(!Pt||!nn),Yn=(0,V.Z)(ln,2),Wn=Yn[0],Tn=Yn[1];if((0,we.Z)(function(){!Wn&&nn&&Qa&&Tn(!0)},[Wn,nn,Qa]),!Wn)return null;var ai="auto",Ii={left:"-1000vw",top:"-1000vh",right:ai,bottom:ai};if(He||!ji){var ki,Fa=uo.points,sa=uo.dynamicInset||((ki=uo._experimental)===null||ki===void 0?void 0:ki.dynamicInset),vo=sa&&Fa[0][1]==="r",Ro=sa&&Fa[0][0]==="b";vo?(Ii.right=Zt,Ii.left=ai):(Ii.left=We,Ii.right=ai),Ro?(Ii.bottom=rr,Ii.top=ai):(Ii.top=_t,Ii.bottom=ai)}var Za={};return Qe&&(Qe.includes("height")&&jr?Za.height=jr:Qe.includes("minHeight")&&jr&&(Za.minHeight=jr),Qe.includes("width")&&er?Za.width=er:Qe.includes("minWidth")&&er&&(Za.minWidth=er)),ji||(Za.pointerEvents="none"),qe.createElement(Tr,{open:Yt||ri,getContainer:Pt&&function(){return Pt(Qa)},autoDestroy:xr},qe.createElement(Ye,{prefixCls:Ea,open:ji,zIndex:hn,mask:Jn,motion:bt}),qe.createElement(oe.Z,{onResize:fr,disabled:!ji},function(Os){return qe.createElement(ft.ZP,(0,Xe.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Yt,leavedClassName:"".concat(Ea,"-hidden")},Ir,{onAppearPrepare:mr,onEnterPrepare:mr,visible:ji,onVisibleChanged:function(Tu){var Do;Ir==null||(Do=Ir.onVisibleChanged)===null||Do===void 0||Do.call(Ir,Tu),oa(Tu)}}),function(ro,Tu){var Do=ro.className,qa=ro.style,ss=X()(Ea,Do,gr);return qe.createElement("div",{ref:(0,Ge.sQ)(Os,yi,Tu),className:ss,style:(0,M.Z)((0,M.Z)((0,M.Z)((0,M.Z)({"--arrow-x":"".concat(pa.x||0,"px"),"--arrow-y":"".concat(pa.y||0,"px")},Ii),Za),qa),{},{boxSizing:"border-box",zIndex:hn},co),onMouseEnter:Cn,onMouseLeave:tr,onPointerEnter:jt,onClick:Kn},da&&qe.createElement(lt,{prefixCls:Ea,arrow:da,arrowPos:pa,align:uo}),qe.createElement(At,{cache:!ji&&!ei},on))})}))}),rt=Ue,Ze=qe.forwardRef(function(_n,yi){var Zn=_n.children,gr=_n.getTriggerDOMNode,Ea=(0,Ge.Yr)(Zn),co=qe.useCallback(function(oa){(0,Ge.mH)(yi,gr?gr(oa):oa)},[gr]),Qa=(0,Ge.x1)(co,Zn.ref);return Ea?qe.cloneElement(Zn,{ref:Qa}):Zn}),Ct=Ze,st=qe.createContext(null),Et=st;function at(_n){return _n?Array.isArray(_n)?_n:[_n]:[]}function mt(_n,yi,Zn,gr){return qe.useMemo(function(){var Ea=at(Zn!=null?Zn:yi),co=at(gr!=null?gr:yi),Qa=new Set(Ea),oa=new Set(co);return _n&&(Qa.has("hover")&&(Qa.delete("hover"),Qa.add("click")),oa.has("hover")&&(oa.delete("hover"),oa.add("click"))),[Qa,oa]},[_n,yi,Zn,gr])}var Mt=_(95077);function Me(){var _n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],yi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Zn=arguments.length>2?arguments[2]:void 0;return Zn?_n[0]===yi[0]:_n[0]===yi[0]&&_n[1]===yi[1]}function Ht(_n,yi,Zn,gr){for(var Ea=Zn.points,co=Object.keys(_n),Qa=0;Qa1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(_n)?yi:_n}function pt(_n){return Ce(parseFloat(_n),0)}function et(_n,yi){var Zn=(0,M.Z)({},_n);return(yi||[]).forEach(function(gr){if(!(gr instanceof HTMLBodyElement||gr instanceof HTMLHtmlElement)){var Ea=vt(gr).getComputedStyle(gr),co=Ea.overflow,Qa=Ea.overflowClipMargin,oa=Ea.borderTopWidth,ji=Ea.borderBottomWidth,so=Ea.borderLeftWidth,ei=Ea.borderRightWidth,Kn=gr.getBoundingClientRect(),Jn=gr.offsetHeight,da=gr.clientHeight,pa=gr.offsetWidth,uo=gr.clientWidth,Ir=pt(oa),bt=pt(ji),Yt=pt(so),Pt=pt(ei),xr=Ce(Math.round(Kn.width/pa*1e3)/1e3),Tr=Ce(Math.round(Kn.height/Jn*1e3)/1e3),hn=(pa-uo-Yt-Pt)*xr,Cn=(Jn-da-Ir-bt)*Tr,tr=Ir*Tr,jt=bt*Tr,He=Yt*xr,We=Pt*xr,_t=0,Zt=0;if(co==="clip"){var rr=pt(Qa);_t=rr*xr,Zt=rr*Tr}var fr=Kn.x+He-_t,mr=Kn.y+tr-Zt,Qe=fr+Kn.width+2*_t-He-We-hn,er=mr+Kn.height+2*Zt-tr-jt-Cn;Zn.left=Math.max(Zn.left,fr),Zn.top=Math.max(Zn.top,mr),Zn.right=Math.min(Zn.right,Qe),Zn.bottom=Math.min(Zn.bottom,er)}}),Zn}function br(_n){var yi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Zn="".concat(yi),gr=Zn.match(/^(.*)\%$/);return gr?_n*(parseFloat(gr[1])/100):parseFloat(Zn)}function Jt(_n,yi){var Zn=yi||[],gr=(0,V.Z)(Zn,2),Ea=gr[0],co=gr[1];return[br(_n.width,Ea),br(_n.height,co)]}function Vr(){var _n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[_n[0],_n[1]]}function gn(_n,yi){var Zn=yi[0],gr=yi[1],Ea,co;return Zn==="t"?co=_n.y:Zn==="b"?co=_n.y+_n.height:co=_n.y+_n.height/2,gr==="l"?Ea=_n.x:gr==="r"?Ea=_n.x+_n.width:Ea=_n.x+_n.width/2,{x:Ea,y:co}}function yn(_n,yi){var Zn={t:"b",b:"t",l:"r",r:"l"};return _n.map(function(gr,Ea){return Ea===yi?Zn[gr]||"c":gr}).join("")}function _i(_n,yi,Zn,gr,Ea,co,Qa){var oa=qe.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Ea[gr]||{}}),ji=(0,V.Z)(oa,2),so=ji[0],ei=ji[1],Kn=qe.useRef(0),Jn=qe.useMemo(function(){return yi?Je(yi):[]},[yi]),da=qe.useRef({}),pa=function(){da.current={}};_n||pa();var uo=(0,ce.Z)(function(){if(yi&&Zn&&_n){let fl=function(gu,Pu){var Co=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ss,zu=on.x+gu,Zu=on.y+Pu,St=zu+ki,qu=Zu+Ii,hl=Math.max(zu,Co.left),rc=Math.max(Zu,Co.top),bs=Math.min(St,Co.right),Il=Math.min(qu,Co.bottom);return Math.max(0,(bs-hl)*(Il-rc))},lf=function(){Yr=on.y+Wt,un=Yr+Ii,Sn=on.x+ut,qn=Sn+ki};var Yt,Pt,xr=yi,Tr=xr.ownerDocument,hn=vt(xr),Cn=hn.getComputedStyle(xr),tr=Cn.width,jt=Cn.height,He=Cn.position,We=xr.style.left,_t=xr.style.top,Zt=xr.style.right,rr=xr.style.bottom,fr=xr.style.overflow,mr=(0,M.Z)((0,M.Z)({},Ea[gr]),co),Qe=Tr.createElement("div");(Yt=xr.parentElement)===null||Yt===void 0||Yt.appendChild(Qe),Qe.style.left="".concat(xr.offsetLeft,"px"),Qe.style.top="".concat(xr.offsetTop,"px"),Qe.style.position=He,Qe.style.height="".concat(xr.offsetHeight,"px"),Qe.style.width="".concat(xr.offsetWidth,"px"),xr.style.left="0",xr.style.top="0",xr.style.right="auto",xr.style.bottom="auto",xr.style.overflow="hidden";var er;if(Array.isArray(Zn))er={x:Zn[0],y:Zn[1],width:0,height:0};else{var jr=Zn.getBoundingClientRect();er={x:jr.x,y:jr.y,width:jr.width,height:jr.height}}var on=xr.getBoundingClientRect(),ri=Tr.documentElement,nn=ri.clientWidth,ln=ri.clientHeight,Yn=ri.scrollWidth,Wn=ri.scrollHeight,Tn=ri.scrollTop,ai=ri.scrollLeft,Ii=on.height,ki=on.width,Fa=er.height,sa=er.width,vo={left:0,top:0,right:nn,bottom:ln},Ro={left:-ai,top:-Tn,right:Yn-ai,bottom:Wn-Tn},Za=mr.htmlRegion,Os="visible",ro="visibleFirst";Za!=="scroll"&&Za!==ro&&(Za=Os);var Tu=Za===ro,Do=et(Ro,Jn),qa=et(vo,Jn),ss=Za===Os?qa:Do,ca=Tu?qa:ss;xr.style.left="auto",xr.style.top="auto",xr.style.right="0",xr.style.bottom="0";var Mn=xr.getBoundingClientRect();xr.style.left=We,xr.style.top=_t,xr.style.right=Zt,xr.style.bottom=rr,xr.style.overflow=fr,(Pt=xr.parentElement)===null||Pt===void 0||Pt.removeChild(Qe);var wi=Ce(Math.round(ki/parseFloat(tr)*1e3)/1e3),Fu=Ce(Math.round(Ii/parseFloat(jt)*1e3)/1e3);if(wi===0||Fu===0||(0,re.S)(Zn)&&!(0,Mt.Z)(Zn))return;var Hs=mr.offset,us=mr.targetOffset,Ts=Jt(on,Hs),Qs=(0,V.Z)(Ts,2),ko=Qs[0],_o=Qs[1],Js=Jt(er,us),fo=(0,V.Z)(Js,2),El=fo[0],ju=fo[1];er.x-=El,er.y-=ju;var _l=mr.points||[],Es=(0,V.Z)(_l,2),yc=Es[0],Vl=Es[1],tc=Vr(Vl),Au=Vr(yc),On=gn(er,tc),tn=gn(on,Au),Pi=(0,M.Z)({},mr),ut=On.x-tn.x+ko,Wt=On.y-tn.y+_o,wr=fl(ut,Wt),bn=fl(ut,Wt,qa),vn=gn(er,["t","l"]),Xi=gn(on,["t","l"]),ya=gn(er,["b","r"]),Bo=gn(on,["b","r"]),xn=mr.overflow||{},zr=xn.adjustX,xt=xn.adjustY,Nt=xn.shiftX,lr=xn.shiftY,$r=function(Pu){return typeof Pu=="boolean"?Pu:Pu>=0},Yr,un,Sn,qn;lf();var ti=$r(xt),Ui=Au[0]===tc[0];if(ti&&Au[0]==="t"&&(un>ca.bottom||da.current.bt)){var ra=Wt;Ui?ra-=Ii-Fa:ra=vn.y-Bo.y-_o;var ia=fl(ut,ra),vi=fl(ut,ra,qa);ia>wr||ia===wr&&(!Tu||vi>=bn)?(da.current.bt=!0,Wt=ra,_o=-_o,Pi.points=[yn(Au,0),yn(tc,0)]):da.current.bt=!1}if(ti&&Au[0]==="b"&&(Yrwr||ma===wr&&(!Tu||Yi>=bn)?(da.current.tb=!0,Wt=gi,_o=-_o,Pi.points=[yn(Au,0),yn(tc,0)]):da.current.tb=!1}var ua=$r(zr),La=Au[1]===tc[1];if(ua&&Au[1]==="l"&&(qn>ca.right||da.current.rl)){var aa=ut;La?aa-=ki-sa:aa=vn.x-Bo.x-ko;var ho=fl(aa,Wt),Po=fl(aa,Wt,qa);ho>wr||ho===wr&&(!Tu||Po>=bn)?(da.current.rl=!0,ut=aa,ko=-ko,Pi.points=[yn(Au,1),yn(tc,1)]):da.current.rl=!1}if(ua&&Au[1]==="r"&&(Snwr||Mu===wr&&(!Tu||vs>=bn)?(da.current.lr=!0,ut=Ms,ko=-ko,Pi.points=[yn(Au,1),yn(tc,1)]):da.current.lr=!1}lf();var Xs=Nt===!0?0:Nt;typeof Xs=="number"&&(Snqa.right&&(ut-=qn-qa.right-ko,er.x>qa.right-Xs&&(ut+=er.x-qa.right+Xs)));var iu=lr===!0?0:lr;typeof iu=="number"&&(Yrqa.bottom&&(Wt-=un-qa.bottom-_o,er.y>qa.bottom-iu&&(Wt+=er.y-qa.bottom+iu)));var js=on.x+ut,Vs=js+ki,sl=on.y+Wt,al=sl+Ii,ul=er.x,_c=ul+sa,Yo=er.y,No=Yo+Fa,Ku=Math.max(js,ul),Rc=Math.min(Vs,_c),Wa=(Ku+Rc)/2,mf=Wa-js,yf=Math.max(sl,Yo),yl=Math.min(al,No),Ec=(yf+yl)/2,Zf=Ec-sl;Qa==null||Qa(yi,Pi);var Vu=Mn.right-on.x-(ut+on.width),lc=Mn.bottom-on.y-(Wt+on.height);ei({ready:!0,offsetX:ut/wi,offsetY:Wt/Fu,offsetR:Vu/wi,offsetB:lc/Fu,arrowX:mf/wi,arrowY:Zf/Fu,scaleX:wi,scaleY:Fu,align:Pi})}}),Ir=function(){Kn.current+=1;var Pt=Kn.current;Promise.resolve().then(function(){Kn.current===Pt&&uo()})},bt=function(){ei(function(Pt){return(0,M.Z)((0,M.Z)({},Pt),{},{ready:!1})})};return(0,we.Z)(bt,[gr]),(0,we.Z)(function(){_n||bt()},[_n]),[so.ready,so.offsetX,so.offsetY,so.offsetR,so.offsetB,so.arrowX,so.arrowY,so.scaleX,so.scaleY,so.align,Ir]}var Hn=_(49397);function Ln(_n,yi,Zn,gr,Ea){(0,we.Z)(function(){if(_n&&yi&&Zn){let Kn=function(){gr(),Ea()};var co=yi,Qa=Zn,oa=Je(co),ji=Je(Qa),so=vt(Qa),ei=new Set([so].concat((0,Hn.Z)(oa),(0,Hn.Z)(ji)));return ei.forEach(function(Jn){Jn.addEventListener("scroll",Kn,{passive:!0})}),so.addEventListener("resize",Kn,{passive:!0}),gr(),function(){ei.forEach(function(Jn){Jn.removeEventListener("scroll",Kn),so.removeEventListener("resize",Kn)})}}},[_n,yi,Zn])}var Ia=_(36014),Zi=_(90571);function Ua(_n,yi,Zn,gr,Ea,co,Qa,oa){var ji=qe.useRef(_n),so=qe.useRef(!1);ji.current!==_n&&(so.current=!0,ji.current=_n),qe.useEffect(function(){var ei=(0,Zi.Z)(function(){so.current=!1});return function(){Zi.Z.cancel(ei)}},[_n]),qe.useEffect(function(){if(yi&&gr&&(!Ea||co)){var ei=function(){var He=!1,We=function(rr){var fr=rr.target;He=Qa(fr)},_t=function(rr){var fr=rr.target;!so.current&&ji.current&&!He&&!Qa(fr)&&oa(!1)};return[We,_t]},Kn=ei(),Jn=(0,V.Z)(Kn,2),da=Jn[0],pa=Jn[1],uo=ei(),Ir=(0,V.Z)(uo,2),bt=Ir[0],Yt=Ir[1],Pt=vt(gr);Pt.addEventListener("mousedown",da,!0),Pt.addEventListener("click",pa,!0),Pt.addEventListener("contextmenu",pa,!0);var xr=(0,le.A)(Zn);if(xr&&(xr.addEventListener("mousedown",bt,!0),xr.addEventListener("click",Yt,!0),xr.addEventListener("contextmenu",Yt,!0)),!1)var Tr,hn,Cn,tr;return function(){Pt.removeEventListener("mousedown",da,!0),Pt.removeEventListener("click",pa,!0),Pt.removeEventListener("contextmenu",pa,!0),xr&&(xr.removeEventListener("mousedown",bt,!0),xr.removeEventListener("click",Yt,!0),xr.removeEventListener("contextmenu",Yt,!0))}}},[yi,Zn,gr,Ea,co])}var fa=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function ka(){var _n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.Z,yi=qe.forwardRef(function(Zn,gr){var Ea=Zn.prefixCls,co=Ea===void 0?"rc-trigger-popup":Ea,Qa=Zn.children,oa=Zn.action,ji=oa===void 0?"hover":oa,so=Zn.showAction,ei=Zn.hideAction,Kn=Zn.popupVisible,Jn=Zn.defaultPopupVisible,da=Zn.onPopupVisibleChange,pa=Zn.afterPopupVisibleChange,uo=Zn.mouseEnterDelay,Ir=Zn.mouseLeaveDelay,bt=Ir===void 0?.1:Ir,Yt=Zn.focusDelay,Pt=Zn.blurDelay,xr=Zn.mask,Tr=Zn.maskClosable,hn=Tr===void 0?!0:Tr,Cn=Zn.getPopupContainer,tr=Zn.forceRender,jt=Zn.autoDestroy,He=Zn.destroyPopupOnHide,We=Zn.popup,_t=Zn.popupClassName,Zt=Zn.popupStyle,rr=Zn.popupPlacement,fr=Zn.builtinPlacements,mr=fr===void 0?{}:fr,Qe=Zn.popupAlign,er=Zn.zIndex,jr=Zn.stretch,on=Zn.getPopupClassNameFromAlign,ri=Zn.fresh,nn=Zn.alignPoint,ln=Zn.onPopupClick,Yn=Zn.onPopupAlign,Wn=Zn.arrow,Tn=Zn.popupMotion,ai=Zn.maskMotion,Ii=Zn.popupTransitionName,ki=Zn.popupAnimation,Fa=Zn.maskTransitionName,sa=Zn.maskAnimation,vo=Zn.className,Ro=Zn.getTriggerDOMNode,Za=(0,y.Z)(Zn,fa),Os=jt||He||!1,ro=qe.useState(!1),Tu=(0,V.Z)(ro,2),Do=Tu[0],qa=Tu[1];(0,we.Z)(function(){qa((0,Ee.Z)())},[]);var ss=qe.useRef({}),ca=qe.useContext(Et),Mn=qe.useMemo(function(){return{registerSubPopup:function(au,Al){ss.current[au]=Al,ca==null||ca.registerSubPopup(au,Al)}}},[ca]),wi=(0,Ie.Z)(),Fu=qe.useState(null),Hs=(0,V.Z)(Fu,2),us=Hs[0],Ts=Hs[1],Qs=(0,ce.Z)(function(ks){(0,re.S)(ks)&&us!==ks&&Ts(ks),ca==null||ca.registerSubPopup(wi,ks)}),ko=qe.useState(null),_o=(0,V.Z)(ko,2),Js=_o[0],fo=_o[1],El=qe.useRef(null),ju=(0,ce.Z)(function(ks){(0,re.S)(ks)&&Js!==ks&&(fo(ks),El.current=ks)}),_l=qe.Children.only(Qa),Es=(_l==null?void 0:_l.props)||{},yc={},Vl=(0,ce.Z)(function(ks){var au,Al,cc=Js;return(cc==null?void 0:cc.contains(ks))||((au=(0,le.A)(cc))===null||au===void 0?void 0:au.host)===ks||ks===cc||(us==null?void 0:us.contains(ks))||((Al=(0,le.A)(us))===null||Al===void 0?void 0:Al.host)===ks||ks===us||Object.values(ss.current).some(function(Gl){return(Gl==null?void 0:Gl.contains(ks))||ks===Gl})}),tc=Rt(co,Tn,ki,Ii),Au=Rt(co,ai,sa,Fa),On=qe.useState(Jn||!1),tn=(0,V.Z)(On,2),Pi=tn[0],ut=tn[1],Wt=Kn!=null?Kn:Pi,wr=(0,ce.Z)(function(ks){Kn===void 0&&ut(ks)});(0,we.Z)(function(){ut(Kn||!1)},[Kn]);var bn=qe.useRef(Wt);bn.current=Wt;var vn=qe.useRef([]);vn.current=[];var Xi=(0,ce.Z)(function(ks){var au;wr(ks),((au=vn.current[vn.current.length-1])!==null&&au!==void 0?au:Wt)!==ks&&(vn.current.push(ks),da==null||da(ks))}),ya=qe.useRef(),Bo=function(){clearTimeout(ya.current)},xn=function(au){var Al=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Bo(),Al===0?Xi(au):ya.current=setTimeout(function(){Xi(au)},Al*1e3)};qe.useEffect(function(){return Bo},[]);var zr=qe.useState(!1),xt=(0,V.Z)(zr,2),Nt=xt[0],lr=xt[1];(0,we.Z)(function(ks){(!ks||Wt)&&lr(!0)},[Wt]);var $r=qe.useState(null),Yr=(0,V.Z)($r,2),un=Yr[0],Sn=Yr[1],qn=qe.useState([0,0]),ti=(0,V.Z)(qn,2),Ui=ti[0],ra=ti[1],ia=function(au){ra([au.clientX,au.clientY])},vi=_i(Wt,us,nn?Ui:Js,rr,mr,Qe,Yn),gi=(0,V.Z)(vi,11),ma=gi[0],Yi=gi[1],ua=gi[2],La=gi[3],aa=gi[4],ho=gi[5],Po=gi[6],Ms=gi[7],Mu=gi[8],vs=gi[9],Xs=gi[10],iu=mt(Do,ji,so,ei),js=(0,V.Z)(iu,2),Vs=js[0],sl=js[1],al=Vs.has("click"),ul=sl.has("click")||sl.has("contextMenu"),_c=(0,ce.Z)(function(){Nt||Xs()}),Yo=function(){bn.current&&nn&&ul&&xn(!1)};Ln(Wt,Js,us,_c,Yo),(0,we.Z)(function(){_c()},[Ui,rr]),(0,we.Z)(function(){Wt&&!(mr!=null&&mr[rr])&&_c()},[JSON.stringify(Qe)]);var No=qe.useMemo(function(){var ks=Ht(mr,co,vs,nn);return X()(ks,on==null?void 0:on(vs))},[vs,on,mr,co,nn]);qe.useImperativeHandle(gr,function(){return{nativeElement:El.current,forceAlign:_c}});var Ku=qe.useState(0),Rc=(0,V.Z)(Ku,2),Wa=Rc[0],mf=Rc[1],yf=qe.useState(0),yl=(0,V.Z)(yf,2),Ec=yl[0],Zf=yl[1],Vu=function(){if(jr&&Js){var au=Js.getBoundingClientRect();mf(au.width),Zf(au.height)}},lc=function(){Vu(),_c()},fl=function(au){lr(!1),Xs(),pa==null||pa(au)},lf=function(){return new Promise(function(au){Vu(),Sn(function(){return au})})};(0,we.Z)(function(){un&&(Xs(),un(),Sn(null))},[un]);function gu(ks,au,Al,cc){yc[ks]=function(Gl){var yh;cc==null||cc(Gl),xn(au,Al);for(var ah=arguments.length,qf=new Array(ah>1?ah-1:0),Ac=1;Ac1?Al-1:0),Gl=1;Gl1?Al-1:0),Gl=1;GlX[0]&&($[0]=X[0]),$[1]>X[1]&&($[1]=X[1]),$[2]=0))throw new Error("precision must be a positive number");var at=Math.pow(10,Et||0);return Math.round(st*at)/at}ye.round=Ee;function qe(st,Et){Et===void 0&&(Et="kilometers");var at=ye.factors[Et];if(!at)throw new Error(Et+" units is invalid");return st*at}ye.radiansToLength=qe;function Xe(st,Et){Et===void 0&&(Et="kilometers");var at=ye.factors[Et];if(!at)throw new Error(Et+" units is invalid");return st/at}ye.lengthToRadians=Xe;function ft(st,Et){return lt(Xe(st,Et))}ye.lengthToDegrees=ft;function Ge(st){var Et=st%360;return Et<0&&(Et+=360),Et}ye.bearingToAzimuth=Ge;function lt(st){var Et=st%(2*Math.PI);return Et*180/Math.PI}ye.radiansToDegrees=lt;function Ye(st){var Et=st%360;return Et*Math.PI/180}ye.degreesToRadians=Ye;function It(st,Et,at){if(Et===void 0&&(Et="kilometers"),at===void 0&&(at="kilometers"),!(st>=0))throw new Error("length must be a positive number");return qe(Xe(st,Et),at)}ye.convertLength=It;function At(st,Et,at){if(Et===void 0&&(Et="meters"),at===void 0&&(at="kilometers"),!(st>=0))throw new Error("area must be a positive number");var mt=ye.areaFactors[Et];if(!mt)throw new Error("invalid original units");var Mt=ye.areaFactors[at];if(!Mt)throw new Error("invalid final units");return st/mt*Mt}ye.convertArea=At;function Ue(st){return!isNaN(st)&&st!==null&&!Array.isArray(st)}ye.isNumber=Ue;function rt(st){return!!st&&st.constructor===Object}ye.isObject=rt;function Ze(st){if(!st)throw new Error("bbox is required");if(!Array.isArray(st))throw new Error("bbox must be an Array");if(st.length!==4&&st.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");st.forEach(function(Et){if(!Ue(Et))throw new Error("bbox must only contain numbers")})}ye.validateBBox=Ze;function Ct(st){if(!st)throw new Error("id is required");if(["string","number"].indexOf(typeof st)===-1)throw new Error("id must be a number or a string")}ye.validateId=Ct},9750:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0});var M=_(78161);function V(Ye,It,At){if(Ye!==null)for(var Ue,rt,Ze,Ct,st,Et,at,mt=0,Mt=0,Me,Ht=Ye.type,Rt=Ht==="FeatureCollection",vt=Ht==="Feature",Je=Rt?Ye.features.length:1,Ce=0;CeEt||Rt>at||vt>mt){st=Mt,Et=Ue,at=Rt,mt=vt,Ze=0;return}var Je=M.lineString([st,Mt],At.properties);if(It(Je,Ue,rt,vt,Ze)===!1)return!1;Ze++,st=Mt})===!1)return!1}}})}function qe(Ye,It,At){var Ue=At,rt=!1;return Ee(Ye,function(Ze,Ct,st,Et,at){rt===!1&&At===void 0?Ue=Ze:Ue=It(Ue,Ze,Ct,st,Et,at),rt=!0}),Ue}function Xe(Ye,It){if(!Ye)throw new Error("geojson is required");Ie(Ye,function(At,Ue,rt){if(At.geometry!==null){var Ze=At.geometry.type,Ct=At.geometry.coordinates;switch(Ze){case"LineString":if(It(At,Ue,rt,0,0)===!1)return!1;break;case"Polygon":for(var st=0;stM.createElement(y.ZP,{theme:{token:{motion:!1,zIndexPopupBase:0}}},M.createElement(oe,Object.assign({},re)))}const X=(oe,re,le,ce)=>$(we=>{const{prefixCls:Ee,style:qe}=we,Xe=M.useRef(null),[ft,Ge]=M.useState(0),[lt,Ye]=M.useState(0),[It,At]=(0,V.Z)(!1,{value:we.open}),{getPrefixCls:Ue}=M.useContext(d.E_),rt=Ue(re||"select",Ee);M.useEffect(()=>{if(At(!0),typeof ResizeObserver!="undefined"){const st=new ResizeObserver(at=>{const mt=at[0].target;Ge(mt.offsetHeight+8),Ye(mt.offsetWidth)}),Et=setInterval(()=>{var at;const mt=le?`.${le(rt)}`:`.${rt}-dropdown`,Mt=(at=Xe.current)===null||at===void 0?void 0:at.querySelector(mt);Mt&&(clearInterval(Et),st.observe(Mt))},10);return()=>{clearInterval(Et),st.disconnect()}}},[]);let Ze=Object.assign(Object.assign({},we),{style:Object.assign(Object.assign({},qe),{margin:0}),open:It,visible:It,getPopupContainer:()=>Xe.current});ce&&(Ze=ce(Ze));const Ct={paddingBottom:ft,position:"relative",minWidth:lt};return M.createElement("div",{ref:Xe,style:Ct},M.createElement(oe,Object.assign({},Ze)))});ye.Z=X},66187:function(Ke,ye,_){"use strict";_.d(ye,{Cn:function(){return ce},u6:function(){return X}});var M=_(77617),V=_(20573),y=_(53843);const d=100,X=d*10,oe={Modal:d,Drawer:d,Popover:d,Popconfirm:d,Tooltip:d,Tour:d},re={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function le(Ie){return Ie in oe}function ce(Ie,we){const[,Ee]=(0,V.ZP)(),qe=M.useContext(y.Z),Xe=le(Ie);if(we!==void 0)return[we,we];let ft=qe!=null?qe:0;return Xe?(ft+=(qe?0:Ee.zIndexPopupBase)+oe[Ie],ft=Math.min(ft,Ee.zIndexPopupBase+X)):ft+=re[Ie],[qe===void 0?we:ft,ft]}},47562:function(Ke,ye,_){"use strict";_.d(ye,{m:function(){return oe}});const M=()=>({height:0,opacity:0}),V=le=>{const{scrollHeight:ce}=le;return{height:ce,opacity:1}},y=le=>({height:le?le.offsetHeight:0}),d=(le,ce)=>(ce==null?void 0:ce.deadline)===!0||ce.propertyName==="height",$=function(){return{motionName:`${arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant"}-motion-collapse`,onAppearStart:M,onEnterStart:M,onAppearActive:V,onEnterActive:V,onLeaveStart:y,onLeaveActive:M,onAppearEnd:d,onEnterEnd:d,onLeaveEnd:d,motionDeadline:500}},X=null,oe=(le,ce,Ie)=>Ie!==void 0?Ie:`${le}-${ce}`;var re=null},48894:function(Ke,ye,_){"use strict";var M;_.d(ye,{M2:function(){return d},Tm:function(){return X},l$:function(){return y}});var V=_(77617);const{isValidElement:y}=M||(M=_.t(V,2));function d(oe){return oe&&y(oe)&&oe.type===V.Fragment}function $(oe,re,le){return y(oe)?V.cloneElement(oe,typeof le=="function"?le(oe.props||{}):le):re}function X(oe,re){return $(oe,oe,re)}},75490:function(Ke,ye,_){"use strict";_.d(ye,{F:function(){return $},Z:function(){return d}});var M=_(92310),V=_.n(M);const y=null;function d(X,oe,re){return V()({[`${X}-status-success`]:oe==="success",[`${X}-status-warning`]:oe==="warning",[`${X}-status-error`]:oe==="error",[`${X}-status-validating`]:oe==="validating",[`${X}-has-feedback`]:re})}const $=(X,oe)=>oe||X},58068:function(Ke,ye,_){"use strict";_.d(ye,{G8:function(){return oe},ln:function(){return re}});var M=_(77617),V=_(36014);function y(){}let d=null;function $(){d=null,rcResetWarned()}let X=null;const oe=M.createContext({}),re=()=>{const ce=()=>{};return ce.deprecated=y,ce};var le=null},53843:function(Ke,ye,_){"use strict";var M=_(77617);const V=M.createContext(void 0);ye.Z=V},16380:function(Ke,ye,_){"use strict";_.d(ye,{Te:function(){return oe},aG:function(){return d},hU:function(){return le},nx:function(){return $}});var M=_(77617),V=_(48894);const y=/^[\u4e00-\u9fa5]{2}$/,d=y.test.bind(y);function $(Ee){return Ee==="danger"?{danger:!0}:{type:Ee}}function X(Ee){return typeof Ee=="string"}function oe(Ee){return Ee==="text"||Ee==="link"}function re(Ee,qe){if(Ee==null)return;const Xe=qe?" ":"";return typeof Ee!="string"&&typeof Ee!="number"&&X(Ee.type)&&d(Ee.props.children)?(0,V.Tm)(Ee,{children:Ee.props.children.split("").join(Xe)}):X(Ee)?d(Ee)?M.createElement("span",null,Ee.split("").join(Xe)):M.createElement("span",null,Ee):(0,V.M2)(Ee)?M.createElement("span",null,Ee):Ee}function le(Ee,qe){let Xe=!1;const ft=[];return M.Children.forEach(Ee,Ge=>{const lt=typeof Ge,Ye=lt==="string"||lt==="number";if(Xe&&Ye){const It=ft.length-1,At=ft[It];ft[It]=`${At}${Ge}`}else ft.push(Ge);Xe=Ye}),M.Children.map(ft,Ge=>re(Ge,qe))}const ce=null,Ie=null,we=null},2741:function(Ke,ye,_){"use strict";_.d(ye,{ZP:function(){return mr}});var M=_(77617),V=_(92310),y=_.n(V),d=_(99468),$=_(88831),X=_(95077),oe=_(11908),re=_(48894),le=_(93319);const ce=Qe=>{const{componentCls:er,colorPrimary:jr}=Qe;return{[er]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${jr})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${Qe.motionEaseOutCirc}`,`opacity 2s ${Qe.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow 0.3s ${Qe.motionEaseInOut}`,`opacity 0.35s ${Qe.motionEaseInOut}`].join(",")}}}}};var Ie=(0,le.ZP)("Wave",Qe=>[ce(Qe)]),we=_(33401),Ee=_(90571),qe=_(44516),Xe=_(41522);function ft(Qe){const er=(Qe||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return er&&er[1]&&er[2]&&er[3]?!(er[1]===er[2]&&er[2]===er[3]):!0}function Ge(Qe){return Qe&&Qe!=="#fff"&&Qe!=="#ffffff"&&Qe!=="rgb(255, 255, 255)"&&Qe!=="rgba(255, 255, 255, 1)"&&ft(Qe)&&!/rgba\((?:\d*, ){3}0\)/.test(Qe)&&Qe!=="transparent"}function lt(Qe){const{borderTopColor:er,borderColor:jr,backgroundColor:on}=getComputedStyle(Qe);return Ge(er)?er:Ge(jr)?jr:Ge(on)?on:null}const Ye="ant-wave-target";function It(Qe){return Number.isNaN(Qe)?0:Qe}const At=Qe=>{const{className:er,target:jr,component:on}=Qe,ri=M.useRef(null),[nn,ln]=M.useState(null),[Yn,Wn]=M.useState([]),[Tn,ai]=M.useState(0),[Ii,ki]=M.useState(0),[Fa,sa]=M.useState(0),[vo,Ro]=M.useState(0),[Za,Os]=M.useState(!1),ro={left:Tn,top:Ii,width:Fa,height:vo,borderRadius:Yn.map(qa=>`${qa}px`).join(" ")};nn&&(ro["--wave-color"]=nn);function Tu(){const qa=getComputedStyle(jr);ln(lt(jr));const ss=qa.position==="static",{borderLeftWidth:ca,borderTopWidth:Mn}=qa;ai(ss?jr.offsetLeft:It(-parseFloat(ca))),ki(ss?jr.offsetTop:It(-parseFloat(Mn))),sa(jr.offsetWidth),Ro(jr.offsetHeight);const{borderTopLeftRadius:wi,borderTopRightRadius:Fu,borderBottomLeftRadius:Hs,borderBottomRightRadius:us}=qa;Wn([wi,Fu,us,Hs].map(Ts=>It(parseFloat(Ts))))}if(M.useEffect(()=>{if(jr){const qa=(0,Ee.Z)(()=>{Tu(),Os(!0)});let ss;return typeof ResizeObserver!="undefined"&&(ss=new ResizeObserver(Tu),ss.observe(jr)),()=>{Ee.Z.cancel(qa),ss==null||ss.disconnect()}}},[]),!Za)return null;const Do=(on==="Checkbox"||on==="Radio")&&(jr==null?void 0:jr.classList.contains(Ye));return M.createElement(qe.ZP,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(qa,ss)=>{var ca;if(ss.deadline||ss.propertyName==="opacity"){const Mn=(ca=ri.current)===null||ca===void 0?void 0:ca.parentElement;(0,Xe.v)(Mn).then(()=>{Mn==null||Mn.remove()})}return!1}},qa=>{let{className:ss}=qa;return M.createElement("div",{ref:ri,className:y()(er,{"wave-quick":Do},ss),style:ro})})};var rt=(Qe,er)=>{var jr;const{component:on}=er;if(on==="Checkbox"&&!(!((jr=Qe.querySelector("input"))===null||jr===void 0)&&jr.checked))return;const ri=document.createElement("div");ri.style.position="absolute",ri.style.left="0px",ri.style.top="0px",Qe==null||Qe.insertBefore(ri,Qe==null?void 0:Qe.firstChild),(0,Xe.s)(M.createElement(At,Object.assign({},er,{target:Qe})),ri)},Ze=_(20573);function Ct(Qe,er,jr){const{wave:on}=M.useContext(oe.E_),[,ri,nn]=(0,Ze.ZP)(),ln=(0,we.zX)(Tn=>{const ai=Qe.current;if(on!=null&&on.disabled||!ai)return;const Ii=ai.querySelector(`.${Ye}`)||ai,{showEffect:ki}=on||{};(ki||rt)(Ii,{className:er,token:ri,component:jr,event:Tn,hashId:nn})}),Yn=M.useRef();return Tn=>{Ee.Z.cancel(Yn.current),Yn.current=(0,Ee.Z)(()=>{ln(Tn)})}}var Et=Qe=>{const{children:er,disabled:jr,component:on}=Qe,{getPrefixCls:ri}=(0,M.useContext)(oe.E_),nn=(0,M.useRef)(null),ln=ri("wave"),[,Yn]=Ie(ln),Wn=Ct(nn,y()(ln,Yn),on);if(M.useEffect(()=>{const ai=nn.current;if(!ai||ai.nodeType!==1||jr)return;const Ii=ki=>{!(0,X.Z)(ki.target)||!ai.getAttribute||ai.getAttribute("disabled")||ai.disabled||ai.className.includes("disabled")||ai.className.includes("-leave")||Wn(ki)};return ai.addEventListener("click",Ii,!0),()=>{ai.removeEventListener("click",Ii,!0)}},[jr]),!M.isValidElement(er))return er!=null?er:null;const Tn=(0,$.Yr)(er)?(0,$.sQ)(er.ref,nn):nn;return(0,re.Tm)(er,{ref:Tn})},at=_(50138),mt=_(15550),Mt=_(53580),Me=function(Qe,er){var jr={};for(var on in Qe)Object.prototype.hasOwnProperty.call(Qe,on)&&er.indexOf(on)<0&&(jr[on]=Qe[on]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ri=0,on=Object.getOwnPropertySymbols(Qe);ri{const{getPrefixCls:er,direction:jr}=M.useContext(oe.E_),{prefixCls:on,size:ri,className:nn}=Qe,ln=Me(Qe,["prefixCls","size","className"]),Yn=er("btn-group",on),[,,Wn]=(0,Ze.ZP)();let Tn="";switch(ri){case"large":Tn="lg";break;case"small":Tn="sm";break;case"middle":default:}const ai=y()(Yn,{[`${Yn}-${Tn}`]:Tn,[`${Yn}-rtl`]:jr==="rtl"},nn,Wn);return M.createElement(Ht.Provider,{value:ri},M.createElement("div",Object.assign({},ln,{className:ai})))},Je=_(16380),pt=(0,M.forwardRef)((Qe,er)=>{const{className:jr,style:on,children:ri,prefixCls:nn}=Qe,ln=y()(`${nn}-icon`,jr);return M.createElement("span",{ref:er,className:ln,style:on},ri)}),et=_(20555);const br=(0,M.forwardRef)((Qe,er)=>{let{prefixCls:jr,className:on,style:ri,iconClassName:nn}=Qe;const ln=y()(`${jr}-loading-icon`,on);return M.createElement(pt,{prefixCls:jr,className:ln,style:ri,ref:er},M.createElement(et.Z,{className:nn}))}),Jt=()=>({width:0,opacity:0,transform:"scale(0)"}),Vr=Qe=>({width:Qe.scrollWidth,opacity:1,transform:"scale(1)"});var yn=Qe=>{const{prefixCls:er,loading:jr,existIcon:on,className:ri,style:nn}=Qe,ln=!!jr;return on?M.createElement(br,{prefixCls:er,className:ri,style:nn}):M.createElement(qe.ZP,{visible:ln,motionName:`${er}-loading-icon-motion`,motionLeave:ln,removeOnLeave:!0,onAppearStart:Jt,onAppearActive:Vr,onEnterStart:Jt,onEnterActive:Vr,onLeaveStart:Vr,onLeaveActive:Jt},(Yn,Wn)=>{let{className:Tn,style:ai}=Yn;return M.createElement(br,{prefixCls:er,className:ri,style:Object.assign(Object.assign({},nn),ai),ref:Wn,iconClassName:Tn})})},_i=_(78600),Hn=_(75199),Ln=_(12228);const Ia=(Qe,er)=>({[`> span, > ${Qe}`]:{"&:not(:last-child)":{[`&, & > ${Qe}`]:{"&:not(:disabled)":{borderInlineEndColor:er}}},"&:not(:first-child)":{[`&, & > ${Qe}`]:{"&:not(:disabled)":{borderInlineStartColor:er}}}}});var Ua=Qe=>{const{componentCls:er,fontSize:jr,lineWidth:on,groupBorderColor:ri,colorErrorHover:nn}=Qe;return{[`${er}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${er}`]:{"&:not(:last-child)":{[`&, & > ${er}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:Qe.calc(on).mul(-1).equal(),[`&, & > ${er}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[er]:{position:"relative",zIndex:1,[`&:hover, - &:focus, - &:active`]:{zIndex:2},"&[disabled]":{zIndex:0}},[`${er}-icon-only`]:{fontSize:jr}},Ia(`${er}-primary`,ri),Ia(`${er}-danger`,nn)]}},fa=_(10176);const ka=Qe=>{const{paddingInline:er,onlyIconSize:jr,paddingBlock:on}=Qe;return(0,Ln.TS)(Qe,{buttonPaddingHorizontal:er,buttonPaddingVertical:on,buttonIconOnlyFontSize:jr})},mo=Qe=>{var er,jr,on,ri,nn,ln;const Yn=(er=Qe.contentFontSize)!==null&&er!==void 0?er:Qe.fontSize,Wn=(jr=Qe.contentFontSizeSM)!==null&&jr!==void 0?jr:Qe.fontSize,Tn=(on=Qe.contentFontSizeLG)!==null&&on!==void 0?on:Qe.fontSizeLG,ai=(ri=Qe.contentLineHeight)!==null&&ri!==void 0?ri:(0,fa.D)(Yn),Ii=(nn=Qe.contentLineHeightSM)!==null&&nn!==void 0?nn:(0,fa.D)(Wn),ki=(ln=Qe.contentLineHeightLG)!==null&&ln!==void 0?ln:(0,fa.D)(Tn);return{fontWeight:400,defaultShadow:`0 ${Qe.controlOutlineWidth}px 0 ${Qe.controlTmpOutline}`,primaryShadow:`0 ${Qe.controlOutlineWidth}px 0 ${Qe.controlOutline}`,dangerShadow:`0 ${Qe.controlOutlineWidth}px 0 ${Qe.colorErrorOutline}`,primaryColor:Qe.colorTextLightSolid,dangerColor:Qe.colorTextLightSolid,borderColorDisabled:Qe.colorBorder,defaultGhostColor:Qe.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:Qe.colorBgContainer,paddingInline:Qe.paddingContentHorizontal-Qe.lineWidth,paddingInlineLG:Qe.paddingContentHorizontal-Qe.lineWidth,paddingInlineSM:8-Qe.lineWidth,onlyIconSize:Qe.fontSizeLG,onlyIconSizeSM:Qe.fontSizeLG-2,onlyIconSizeLG:Qe.fontSizeLG+2,groupBorderColor:Qe.colorPrimaryHover,linkHoverBg:"transparent",textHoverBg:Qe.colorBgTextHover,defaultColor:Qe.colorText,defaultBg:Qe.colorBgContainer,defaultBorderColor:Qe.colorBorder,defaultBorderColorDisabled:Qe.colorBorder,defaultHoverBg:Qe.colorBgContainer,defaultHoverColor:Qe.colorPrimaryHover,defaultHoverBorderColor:Qe.colorPrimaryHover,defaultActiveBg:Qe.colorBgContainer,defaultActiveColor:Qe.colorPrimaryActive,defaultActiveBorderColor:Qe.colorPrimaryActive,contentFontSize:Yn,contentFontSizeSM:Wn,contentFontSizeLG:Tn,contentLineHeight:ai,contentLineHeightSM:Ii,contentLineHeightLG:ki,paddingBlock:Math.max((Qe.controlHeight-Yn*ai)/2-Qe.lineWidth,0),paddingBlockSM:Math.max((Qe.controlHeightSM-Wn*Ii)/2-Qe.lineWidth,0),paddingBlockLG:Math.max((Qe.controlHeightLG-Tn*ki)/2-Qe.lineWidth,0)}},_n=Qe=>{const{componentCls:er,iconCls:jr,fontWeight:on}=Qe;return{[er]:{outline:"none",position:"relative",display:"inline-block",fontWeight:on,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${(0,_i.bf)(Qe.lineWidth)} ${Qe.lineType} transparent`,cursor:"pointer",transition:`all ${Qe.motionDurationMid} ${Qe.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:Qe.colorText,"&:disabled > *":{pointerEvents:"none"},"> span":{display:"inline-block"},[`${er}-icon`]:{lineHeight:0},[`> ${jr} + span, > span + ${jr}`]:{marginInlineStart:Qe.marginXS},[`&:not(${er}-icon-only) > ${er}-icon`]:{[`&${er}-loading-icon, &:not(:last-child)`]:{marginInlineEnd:Qe.marginXS}},"> a":{color:"currentColor"},"&:not(:disabled)":Object.assign({},(0,Hn.Qy)(Qe)),[`&${er}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${er}-two-chinese-chars > *:not(${jr})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&-icon-only${er}-compact-item`]:{flex:"none"}}}},yi=(Qe,er,jr)=>({[`&:not(:disabled):not(${Qe}-disabled)`]:{"&:hover":er,"&:active":jr}}),Zn=Qe=>({minWidth:Qe.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),gr=Qe=>({borderRadius:Qe.controlHeight,paddingInlineStart:Qe.calc(Qe.controlHeight).div(2).equal(),paddingInlineEnd:Qe.calc(Qe.controlHeight).div(2).equal()}),Ea=Qe=>({cursor:"not-allowed",borderColor:Qe.borderColorDisabled,color:Qe.colorTextDisabled,background:Qe.colorBgContainerDisabled,boxShadow:"none"}),co=(Qe,er,jr,on,ri,nn,ln,Yn)=>({[`&${Qe}-background-ghost`]:Object.assign(Object.assign({color:jr||void 0,background:er,borderColor:on||void 0,boxShadow:"none"},yi(Qe,Object.assign({background:er},ln),Object.assign({background:er},Yn))),{"&:disabled":{cursor:"not-allowed",color:ri||void 0,borderColor:nn||void 0}})}),Qa=Qe=>({[`&:disabled, &${Qe.componentCls}-disabled`]:Object.assign({},Ea(Qe))}),oa=Qe=>Object.assign({},Qa(Qe)),ji=Qe=>({[`&:disabled, &${Qe.componentCls}-disabled`]:{cursor:"not-allowed",color:Qe.colorTextDisabled}}),so=Qe=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},oa(Qe)),{background:Qe.defaultBg,borderColor:Qe.defaultBorderColor,color:Qe.defaultColor,boxShadow:Qe.defaultShadow}),yi(Qe.componentCls,{color:Qe.defaultHoverColor,borderColor:Qe.defaultHoverBorderColor,background:Qe.defaultHoverBg},{color:Qe.defaultActiveColor,borderColor:Qe.defaultActiveBorderColor,background:Qe.defaultActiveBg})),co(Qe.componentCls,Qe.ghostBg,Qe.defaultGhostColor,Qe.defaultGhostBorderColor,Qe.colorTextDisabled,Qe.colorBorder)),{[`&${Qe.componentCls}-dangerous`]:Object.assign(Object.assign(Object.assign({color:Qe.colorError,borderColor:Qe.colorError},yi(Qe.componentCls,{color:Qe.colorErrorHover,borderColor:Qe.colorErrorBorderHover},{color:Qe.colorErrorActive,borderColor:Qe.colorErrorActive})),co(Qe.componentCls,Qe.ghostBg,Qe.colorError,Qe.colorError,Qe.colorTextDisabled,Qe.colorBorder)),Qa(Qe))}),ei=Qe=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},oa(Qe)),{color:Qe.primaryColor,background:Qe.colorPrimary,boxShadow:Qe.primaryShadow}),yi(Qe.componentCls,{color:Qe.colorTextLightSolid,background:Qe.colorPrimaryHover},{color:Qe.colorTextLightSolid,background:Qe.colorPrimaryActive})),co(Qe.componentCls,Qe.ghostBg,Qe.colorPrimary,Qe.colorPrimary,Qe.colorTextDisabled,Qe.colorBorder,{color:Qe.colorPrimaryHover,borderColor:Qe.colorPrimaryHover},{color:Qe.colorPrimaryActive,borderColor:Qe.colorPrimaryActive})),{[`&${Qe.componentCls}-dangerous`]:Object.assign(Object.assign(Object.assign({background:Qe.colorError,boxShadow:Qe.dangerShadow,color:Qe.dangerColor},yi(Qe.componentCls,{background:Qe.colorErrorHover},{background:Qe.colorErrorActive})),co(Qe.componentCls,Qe.ghostBg,Qe.colorError,Qe.colorError,Qe.colorTextDisabled,Qe.colorBorder,{color:Qe.colorErrorHover,borderColor:Qe.colorErrorHover},{color:Qe.colorErrorActive,borderColor:Qe.colorErrorActive})),Qa(Qe))}),Kn=Qe=>Object.assign(Object.assign({},so(Qe)),{borderStyle:"dashed"}),Jn=Qe=>Object.assign(Object.assign(Object.assign({color:Qe.colorLink},yi(Qe.componentCls,{color:Qe.colorLinkHover,background:Qe.linkHoverBg},{color:Qe.colorLinkActive})),ji(Qe)),{[`&${Qe.componentCls}-dangerous`]:Object.assign(Object.assign({color:Qe.colorError},yi(Qe.componentCls,{color:Qe.colorErrorHover},{color:Qe.colorErrorActive})),ji(Qe))}),da=Qe=>Object.assign(Object.assign(Object.assign({},yi(Qe.componentCls,{color:Qe.colorText,background:Qe.textHoverBg},{color:Qe.colorText,background:Qe.colorBgTextActive})),ji(Qe)),{[`&${Qe.componentCls}-dangerous`]:Object.assign(Object.assign({color:Qe.colorError},ji(Qe)),yi(Qe.componentCls,{color:Qe.colorErrorHover,background:Qe.colorErrorBg},{color:Qe.colorErrorHover,background:Qe.colorErrorBg}))}),pa=Qe=>{const{componentCls:er}=Qe;return{[`${er}-default`]:so(Qe),[`${er}-primary`]:ei(Qe),[`${er}-dashed`]:Kn(Qe),[`${er}-link`]:Jn(Qe),[`${er}-text`]:da(Qe),[`${er}-ghost`]:co(Qe.componentCls,Qe.ghostBg,Qe.colorBgContainer,Qe.colorBgContainer,Qe.colorTextDisabled,Qe.colorBorder)}},uo=function(Qe){let er=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:jr,controlHeight:on,fontSize:ri,lineHeight:nn,borderRadius:ln,buttonPaddingHorizontal:Yn,iconCls:Wn,buttonPaddingVertical:Tn}=Qe,ai=`${jr}-icon-only`;return[{[`${er}`]:{fontSize:ri,lineHeight:nn,height:on,padding:`${(0,_i.bf)(Tn)} ${(0,_i.bf)(Yn)}`,borderRadius:ln,[`&${ai}`]:{width:on,paddingInlineStart:0,paddingInlineEnd:0,[`&${jr}-round`]:{width:"auto"},[Wn]:{fontSize:Qe.buttonIconOnlyFontSize}},[`&${jr}-loading`]:{opacity:Qe.opacityLoading,cursor:"default"},[`${jr}-loading-icon`]:{transition:`width ${Qe.motionDurationSlow} ${Qe.motionEaseInOut}, opacity ${Qe.motionDurationSlow} ${Qe.motionEaseInOut}`}}},{[`${jr}${jr}-circle${er}`]:Zn(Qe)},{[`${jr}${jr}-round${er}`]:gr(Qe)}]},Ir=Qe=>{const er=(0,Ln.TS)(Qe,{fontSize:Qe.contentFontSize,lineHeight:Qe.contentLineHeight});return uo(er,Qe.componentCls)},bt=Qe=>{const er=(0,Ln.TS)(Qe,{controlHeight:Qe.controlHeightSM,fontSize:Qe.contentFontSizeSM,lineHeight:Qe.contentLineHeightSM,padding:Qe.paddingXS,buttonPaddingHorizontal:Qe.paddingInlineSM,buttonPaddingVertical:Qe.paddingBlockSM,borderRadius:Qe.borderRadiusSM,buttonIconOnlyFontSize:Qe.onlyIconSizeSM});return uo(er,`${Qe.componentCls}-sm`)},Yt=Qe=>{const er=(0,Ln.TS)(Qe,{controlHeight:Qe.controlHeightLG,fontSize:Qe.contentFontSizeLG,lineHeight:Qe.contentLineHeightLG,buttonPaddingHorizontal:Qe.paddingInlineLG,buttonPaddingVertical:Qe.paddingBlockLG,borderRadius:Qe.borderRadiusLG,buttonIconOnlyFontSize:Qe.onlyIconSizeLG});return uo(er,`${Qe.componentCls}-lg`)},Pt=Qe=>{const{componentCls:er}=Qe;return{[er]:{[`&${er}-block`]:{width:"100%"}}}};var xr=(0,le.I$)("Button",Qe=>{const er=ka(Qe);return[_n(er),Ir(er),bt(er),Yt(er),Pt(er),pa(er),Ua(er)]},mo,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}}),Tr=_(5283);function hn(Qe,er){return{[`&-item:not(${er}-last-item)`]:{marginBottom:Qe.calc(Qe.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function Cn(Qe,er){return{[`&-item:not(${er}-first-item):not(${er}-last-item)`]:{borderRadius:0},[`&-item${er}-first-item:not(${er}-last-item)`]:{[`&, &${Qe}-sm, &${Qe}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${er}-last-item:not(${er}-first-item)`]:{[`&, &${Qe}-sm, &${Qe}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function tr(Qe){const er=`${Qe.componentCls}-compact-vertical`;return{[er]:Object.assign(Object.assign({},hn(Qe,er)),Cn(Qe.componentCls,er))}}const jt=Qe=>{const{componentCls:er,calc:jr}=Qe;return{[er]:{[`&-compact-item${er}-primary`]:{[`&:not([disabled]) + ${er}-compact-item${er}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:jr(Qe.lineWidth).mul(-1).equal(),insetInlineStart:jr(Qe.lineWidth).mul(-1).equal(),display:"inline-block",width:Qe.lineWidth,height:`calc(100% + ${(0,_i.bf)(Qe.lineWidth)} * 2)`,backgroundColor:Qe.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${er}-primary`]:{[`&:not([disabled]) + ${er}-compact-vertical-item${er}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:jr(Qe.lineWidth).mul(-1).equal(),insetInlineStart:jr(Qe.lineWidth).mul(-1).equal(),display:"inline-block",width:`calc(100% + ${(0,_i.bf)(Qe.lineWidth)} * 2)`,height:Qe.lineWidth,backgroundColor:Qe.colorPrimaryHover,content:'""'}}}}}}};var He=(0,le.bk)(["Button","compact"],Qe=>{const er=ka(Qe);return[(0,Tr.c)(er),tr(er),jt(er)]},mo),We=function(Qe,er){var jr={};for(var on in Qe)Object.prototype.hasOwnProperty.call(Qe,on)&&er.indexOf(on)<0&&(jr[on]=Qe[on]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ri=0,on=Object.getOwnPropertySymbols(Qe);ri{var jr,on;const{loading:ri=!1,prefixCls:nn,type:ln="default",danger:Yn,shape:Wn="default",size:Tn,styles:ai,disabled:Ii,className:ki,rootClassName:Fa,children:sa,icon:vo,ghost:Ro=!1,block:Za=!1,htmlType:Os="button",classNames:ro,style:Tu={}}=Qe,Do=We(Qe,["loading","prefixCls","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","ghost","block","htmlType","classNames","style"]),{getPrefixCls:qa,autoInsertSpaceInButton:ss,direction:ca,button:Mn}=(0,M.useContext)(oe.E_),wi=qa("btn",nn),[Fu,Hs,us]=xr(wi),Ts=(0,M.useContext)(at.Z),Qs=Ii!=null?Ii:Ts,ko=(0,M.useContext)(Ht),_o=(0,M.useMemo)(()=>_t(ri),[ri]),[Js,fo]=(0,M.useState)(_o.loading),[El,ju]=(0,M.useState)(!1),_l=(0,M.createRef)(),Es=(0,$.sQ)(er,_l),yc=M.Children.count(sa)===1&&!vo&&!(0,Je.Te)(ln);(0,M.useEffect)(()=>{let xt=null;_o.delay>0?xt=setTimeout(()=>{xt=null,fo(!0)},_o.delay):fo(_o.loading);function Nt(){xt&&(clearTimeout(xt),xt=null)}return Nt},[_o]),(0,M.useEffect)(()=>{if(!Es||!Es.current||ss===!1)return;const xt=Es.current.textContent;yc&&(0,Je.aG)(xt)?El||ju(!0):El&&ju(!1)},[Es]);const Vl=xt=>{const{onClick:Nt}=Qe;if(Js||Qs){xt.preventDefault();return}Nt==null||Nt(xt)},tc=ss!==!1,{compactSize:Au,compactItemClassnames:On}=(0,Mt.ri)(wi,ca),tn={large:"lg",small:"sm",middle:void 0},Pi=(0,mt.Z)(xt=>{var Nt,lr;return(lr=(Nt=Tn!=null?Tn:Au)!==null&&Nt!==void 0?Nt:ko)!==null&&lr!==void 0?lr:xt}),ut=Pi&&tn[Pi]||"",Wt=Js?"loading":vo,wr=(0,d.Z)(Do,["navigate"]),bn=y()(wi,Hs,us,{[`${wi}-${Wn}`]:Wn!=="default"&&Wn,[`${wi}-${ln}`]:ln,[`${wi}-${ut}`]:ut,[`${wi}-icon-only`]:!sa&&sa!==0&&!!Wt,[`${wi}-background-ghost`]:Ro&&!(0,Je.Te)(ln),[`${wi}-loading`]:Js,[`${wi}-two-chinese-chars`]:El&&tc&&!Js,[`${wi}-block`]:Za,[`${wi}-dangerous`]:!!Yn,[`${wi}-rtl`]:ca==="rtl"},On,ki,Fa,Mn==null?void 0:Mn.className),vn=Object.assign(Object.assign({},Mn==null?void 0:Mn.style),Tu),Xi=y()(ro==null?void 0:ro.icon,(jr=Mn==null?void 0:Mn.classNames)===null||jr===void 0?void 0:jr.icon),ya=Object.assign(Object.assign({},(ai==null?void 0:ai.icon)||{}),((on=Mn==null?void 0:Mn.styles)===null||on===void 0?void 0:on.icon)||{}),Bo=vo&&!Js?M.createElement(pt,{prefixCls:wi,className:Xi,style:ya},vo):M.createElement(yn,{existIcon:!!vo,prefixCls:wi,loading:!!Js}),xn=sa||sa===0?(0,Je.hU)(sa,yc&&tc):null;if(wr.href!==void 0)return Fu(M.createElement("a",Object.assign({},wr,{className:y()(bn,{[`${wi}-disabled`]:Qs}),href:Qs?void 0:wr.href,style:vn,onClick:Vl,ref:Es,tabIndex:Qs?-1:0}),Bo,xn));let zr=M.createElement("button",Object.assign({},Do,{type:Os,className:bn,style:vn,onClick:Vl,disabled:Qs,ref:Es}),Bo,xn,!!On&&M.createElement(He,{key:"compact",prefixCls:wi}));return(0,Je.Te)(ln)||(zr=M.createElement(Et,{component:"Button",disabled:!!Js},zr)),Fu(zr)},rr=(0,M.forwardRef)(Zt);rr.Group=vt,rr.__ANT_BUTTON=!0;var fr=rr,mr=fr},50138:function(Ke,ye,_){"use strict";_.d(ye,{n:function(){return y}});var M=_(77617);const V=M.createContext(!1),y=d=>{let{children:$,disabled:X}=d;const oe=M.useContext(V);return M.createElement(V.Provider,{value:X!=null?X:oe},$)};ye.Z=V},11621:function(Ke,ye,_){"use strict";_.d(ye,{q:function(){return y}});var M=_(77617);const V=M.createContext(void 0),y=d=>{let{children:$,size:X}=d;const oe=M.useContext(V);return M.createElement(V.Provider,{value:X||oe},$)};ye.Z=V},11908:function(Ke,ye,_){"use strict";_.d(ye,{E_:function(){return d},oR:function(){return V}});var M=_(77617);const V="anticon",y=(X,oe)=>oe||(X?`ant-${X}`:"ant"),d=M.createContext({getPrefixCls:y,iconPrefixCls:V}),{Consumer:$}=d},76135:function(Ke,ye,_){"use strict";var M=_(20573);const V=y=>{const[,,,,d]=(0,M.ZP)();return d?`${y}-css-var`:""};ye.Z=V},15550:function(Ke,ye,_){"use strict";var M=_(77617),V=_(11621);const y=d=>{const $=M.useContext(V.Z);return M.useMemo(()=>d?typeof d=="string"?d!=null?d:$:d instanceof Function?d($):$:$,[d,$])};ye.Z=y},34591:function(Ke,ye,_){"use strict";_.d(ye,{ZP:function(){return Qa},w6:function(){return gr}});var M=_(77617),V=_.t(M,2),y=_(78600),d=_(48081),$=_(4065),X=_(19076),oe=_(58068),re=(0,M.createContext)(void 0),le=_(51877),ce=_(75851);const Ie="internalMark";var Ee=oa=>{const{locale:ji={},children:so,_ANT_MARK__:ei}=oa;M.useEffect(()=>(0,le.f)(ji&&ji.Modal),[ji]);const Kn=M.useMemo(()=>Object.assign(Object.assign({},ji),{exist:!0}),[ji]);return M.createElement(ce.Z.Provider,{value:Kn},so)},qe=_(69502),Xe=_(47436),ft=_(19717),Ge=_(11908),lt=_(10129),Ye=_(64993),It=_(42871),At=_(75966);const Ue=`-ant-${Date.now()}-${Math.random()}`;function rt(oa,ji){const so={},ei=(da,pa)=>{let uo=da.clone();return uo=(pa==null?void 0:pa(uo))||uo,uo.toRgbString()},Kn=(da,pa)=>{const uo=new Ye.C(da),Ir=(0,lt.R_)(uo.toRgbString());so[`${pa}-color`]=ei(uo),so[`${pa}-color-disabled`]=Ir[1],so[`${pa}-color-hover`]=Ir[4],so[`${pa}-color-active`]=Ir[6],so[`${pa}-color-outline`]=uo.clone().setAlpha(.2).toRgbString(),so[`${pa}-color-deprecated-bg`]=Ir[0],so[`${pa}-color-deprecated-border`]=Ir[2]};if(ji.primaryColor){Kn(ji.primaryColor,"primary");const da=new Ye.C(ji.primaryColor),pa=(0,lt.R_)(da.toRgbString());pa.forEach((Ir,bt)=>{so[`primary-${bt+1}`]=Ir}),so["primary-color-deprecated-l-35"]=ei(da,Ir=>Ir.lighten(35)),so["primary-color-deprecated-l-20"]=ei(da,Ir=>Ir.lighten(20)),so["primary-color-deprecated-t-20"]=ei(da,Ir=>Ir.tint(20)),so["primary-color-deprecated-t-50"]=ei(da,Ir=>Ir.tint(50)),so["primary-color-deprecated-f-12"]=ei(da,Ir=>Ir.setAlpha(Ir.getAlpha()*.12));const uo=new Ye.C(pa[0]);so["primary-color-active-deprecated-f-30"]=ei(uo,Ir=>Ir.setAlpha(Ir.getAlpha()*.3)),so["primary-color-active-deprecated-d-02"]=ei(uo,Ir=>Ir.darken(2))}return ji.successColor&&Kn(ji.successColor,"success"),ji.warningColor&&Kn(ji.warningColor,"warning"),ji.errorColor&&Kn(ji.errorColor,"error"),ji.infoColor&&Kn(ji.infoColor,"info"),` - :root { - ${Object.keys(so).map(da=>`--${oa}-${da}: ${so[da]};`).join(` -`)} - } - `.trim()}function Ze(oa,ji){const so=rt(oa,ji);(0,It.Z)()&&(0,At.hq)(so,`${Ue}-dynamic-theme`)}var Ct=_(50138),st=_(11621);function Et(){const oa=(0,M.useContext)(Ct.Z),ji=(0,M.useContext)(st.Z);return{componentDisabled:oa,componentSize:ji}}var at=Et,mt=_(70780);const Mt=Object.assign({},V),{useId:Me}=Mt;var vt=typeof Me=="undefined"?()=>"":Me;function Je(oa,ji){var so;const ei=(0,oe.ln)("ConfigProvider"),Kn=oa||{},Jn=Kn.inherit===!1||!ji?Xe.u_:ji,da=vt();return(0,$.Z)(()=>{var pa,uo;if(!oa)return ji;const Ir=Object.assign({},Jn.components);Object.keys(oa.components||{}).forEach(Pt=>{Ir[Pt]=Object.assign(Object.assign({},Ir[Pt]),oa.components[Pt])});const bt=`css-var-${da.replace(/:/g,"")}`,Yt=((pa=Kn.cssVar)!==null&&pa!==void 0?pa:Jn.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:"ant"},typeof Jn.cssVar=="object"?Jn.cssVar:{}),typeof Kn.cssVar=="object"?Kn.cssVar:{}),{key:typeof Kn.cssVar=="object"&&((uo=Kn.cssVar)===null||uo===void 0?void 0:uo.key)||bt});return Object.assign(Object.assign(Object.assign({},Jn),Kn),{token:Object.assign(Object.assign({},Jn.token),Kn.token),components:Ir,cssVar:Yt})},[Kn,Jn],(pa,uo)=>pa.some((Ir,bt)=>{const Yt=uo[bt];return!(0,mt.Z)(Ir,Yt,!0)}))}var Ce=_(44516),pt=_(20573);function et(oa){const{children:ji}=oa,[,so]=(0,pt.ZP)(),{motion:ei}=so,Kn=M.useRef(!1);return Kn.current=Kn.current||ei===!1,Kn.current?M.createElement(Ce.zt,{motion:ei},ji):ji}const br=null;var Jt=()=>null,Vr=_(85034),gn=function(oa,ji){var so={};for(var ei in oa)Object.prototype.hasOwnProperty.call(oa,ei)&&ji.indexOf(ei)<0&&(so[ei]=oa[ei]);if(oa!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Kn=0,ei=Object.getOwnPropertySymbols(oa);Knji.endsWith("Color"))}const Zn=oa=>{const{prefixCls:ji,iconPrefixCls:so,theme:ei,holderRender:Kn}=oa;ji!==void 0&&(Zi=ji),so!==void 0&&(Ua=so),"holderRender"in oa&&(ka=Kn),ei&&(yi(ei)?Ze(mo(),ei):fa=ei)},gr=()=>({getPrefixCls:(oa,ji)=>ji||(oa?`${mo()}-${oa}`:mo()),getIconPrefixCls:_n,getRootPrefixCls:()=>Zi||mo(),getTheme:()=>fa,holderRender:ka}),Ea=oa=>{const{children:ji,csp:so,autoInsertSpaceInButton:ei,alert:Kn,anchor:Jn,form:da,locale:pa,componentSize:uo,direction:Ir,space:bt,virtual:Yt,dropdownMatchSelectWidth:Pt,popupMatchSelectWidth:xr,popupOverflow:Tr,legacyLocale:hn,parentContext:Cn,iconPrefixCls:tr,theme:jt,componentDisabled:He,segmented:We,statistic:_t,spin:Zt,calendar:rr,carousel:fr,cascader:mr,collapse:Qe,typography:er,checkbox:jr,descriptions:on,divider:ri,drawer:nn,skeleton:ln,steps:Yn,image:Wn,layout:Tn,list:ai,mentions:Ii,modal:ki,progress:Fa,result:sa,slider:vo,breadcrumb:Ro,menu:Za,pagination:Os,input:ro,empty:Tu,badge:Do,radio:qa,rate:ss,switch:ca,transfer:Mn,avatar:wi,message:Fu,tag:Hs,table:us,card:Ts,tabs:Qs,timeline:ko,timePicker:_o,upload:Js,notification:fo,tree:El,colorPicker:ju,datePicker:_l,rangePicker:Es,flex:yc,wave:Vl,dropdown:tc,warning:Au,tour:On}=oa,tn=M.useCallback((zr,xt)=>{const{prefixCls:Nt}=oa;if(xt)return xt;const lr=Nt||Cn.getPrefixCls("");return zr?`${lr}-${zr}`:lr},[Cn.getPrefixCls,oa.prefixCls]),Pi=tr||Cn.iconPrefixCls||Ge.oR,ut=so||Cn.csp;(0,Vr.Z)(Pi,ut);const Wt=Je(jt,Cn.theme),wr={csp:ut,autoInsertSpaceInButton:ei,alert:Kn,anchor:Jn,locale:pa||hn,direction:Ir,space:bt,virtual:Yt,popupMatchSelectWidth:xr!=null?xr:Pt,popupOverflow:Tr,getPrefixCls:tn,iconPrefixCls:Pi,theme:Wt,segmented:We,statistic:_t,spin:Zt,calendar:rr,carousel:fr,cascader:mr,collapse:Qe,typography:er,checkbox:jr,descriptions:on,divider:ri,drawer:nn,skeleton:ln,steps:Yn,image:Wn,input:ro,layout:Tn,list:ai,mentions:Ii,modal:ki,progress:Fa,result:sa,slider:vo,breadcrumb:Ro,menu:Za,pagination:Os,empty:Tu,badge:Do,radio:qa,rate:ss,switch:ca,transfer:Mn,avatar:wi,message:Fu,tag:Hs,table:us,card:Ts,tabs:Qs,timeline:ko,timePicker:_o,upload:Js,notification:fo,tree:El,colorPicker:ju,datePicker:_l,rangePicker:Es,flex:yc,wave:Vl,dropdown:tc,warning:Au,tour:On},bn=Object.assign({},Cn);Object.keys(wr).forEach(zr=>{wr[zr]!==void 0&&(bn[zr]=wr[zr])}),Ln.forEach(zr=>{const xt=oa[zr];xt&&(bn[zr]=xt)});const vn=(0,$.Z)(()=>bn,bn,(zr,xt)=>{const Nt=Object.keys(zr),lr=Object.keys(xt);return Nt.length!==lr.length||Nt.some($r=>zr[$r]!==xt[$r])}),Xi=M.useMemo(()=>({prefixCls:Pi,csp:ut}),[Pi,ut]);let ya=M.createElement(M.Fragment,null,M.createElement(Jt,{dropdownMatchSelectWidth:Pt}),ji);const Bo=M.useMemo(()=>{var zr,xt,Nt,lr;return(0,X.T)(((zr=qe.Z.Form)===null||zr===void 0?void 0:zr.defaultValidateMessages)||{},((Nt=(xt=vn.locale)===null||xt===void 0?void 0:xt.Form)===null||Nt===void 0?void 0:Nt.defaultValidateMessages)||{},((lr=vn.form)===null||lr===void 0?void 0:lr.validateMessages)||{},(da==null?void 0:da.validateMessages)||{})},[vn,da==null?void 0:da.validateMessages]);Object.keys(Bo).length>0&&(ya=M.createElement(re.Provider,{value:Bo},ya)),pa&&(ya=M.createElement(Ee,{locale:pa,_ANT_MARK__:Ie},ya)),(Pi||ut)&&(ya=M.createElement(d.Z.Provider,{value:Xi},ya)),uo&&(ya=M.createElement(st.q,{size:uo},ya)),ya=M.createElement(et,null,ya);const xn=M.useMemo(()=>{const zr=Wt||{},{algorithm:xt,token:Nt,components:lr,cssVar:$r}=zr,Yr=gn(zr,["algorithm","token","components","cssVar"]),un=xt&&(!Array.isArray(xt)||xt.length>0)?(0,y.jG)(xt):Xe.uH,Sn={};Object.entries(lr||{}).forEach(ti=>{let[Ui,ra]=ti;const ia=Object.assign({},ra);"algorithm"in ia&&(ia.algorithm===!0?ia.theme=un:(Array.isArray(ia.algorithm)||typeof ia.algorithm=="function")&&(ia.theme=(0,y.jG)(ia.algorithm)),delete ia.algorithm),Sn[Ui]=ia});const qn=Object.assign(Object.assign({},ft.Z),Nt);return Object.assign(Object.assign({},Yr),{theme:un,token:qn,components:Sn,override:Object.assign({override:qn},Sn),cssVar:$r})},[Wt]);return jt&&(ya=M.createElement(Xe.Mj.Provider,{value:xn},ya)),vn.warning&&(ya=M.createElement(oe.G8.Provider,{value:vn.warning},ya)),He!==void 0&&(ya=M.createElement(Ct.n,{disabled:He},ya)),M.createElement(Ge.E_.Provider,{value:vn},ya)},co=oa=>{const ji=M.useContext(Ge.E_),so=M.useContext(ce.Z);return M.createElement(Ea,Object.assign({parentContext:ji,legacyLocale:so},oa))};co.ConfigContext=Ge.E_,co.SizeContext=st.Z,co.config=Zn,co.useConfig=at,Object.defineProperty(co,"SizeContext",{get:()=>st.Z});var Qa=co},11123:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Fl}});var M=_(9498),V=_.n(M),y=_(36014),d=_(23001),$=_.n(d),X=_(61072),oe=_.n(X),re=_(96901),le=_.n(re),ce=_(50499),Ie=_.n(ce),we=_(24213),Ee=_.n(we),qe=_(32591),Xe=_.n(qe);V().extend(Xe()),V().extend(Ee()),V().extend($()),V().extend(oe()),V().extend(le()),V().extend(Ie()),V().extend(function(Oe,Ft){var dr=Ft.prototype,Wr=dr.format;dr.format=function(Gn){var mi=(Gn||"").replace("Wo","wo");return Wr.bind(this)(mi)}});var ft={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},Ge=function(Ft){var dr=ft[Ft];return dr||Ft.split("_")[0]},lt=function(){(0,y.ET)(!1,"Not match any format. Please help to fire a issue about this.")},Ye={getNow:function(){return V()()},getFixedDate:function(Ft){return V()(Ft,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(Ft){return Ft.endOf("month")},getWeekDay:function(Ft){var dr=Ft.locale("en");return dr.weekday()+dr.localeData().firstDayOfWeek()},getYear:function(Ft){return Ft.year()},getMonth:function(Ft){return Ft.month()},getDate:function(Ft){return Ft.date()},getHour:function(Ft){return Ft.hour()},getMinute:function(Ft){return Ft.minute()},getSecond:function(Ft){return Ft.second()},getMillisecond:function(Ft){return Ft.millisecond()},addYear:function(Ft,dr){return Ft.add(dr,"year")},addMonth:function(Ft,dr){return Ft.add(dr,"month")},addDate:function(Ft,dr){return Ft.add(dr,"day")},setYear:function(Ft,dr){return Ft.year(dr)},setMonth:function(Ft,dr){return Ft.month(dr)},setDate:function(Ft,dr){return Ft.date(dr)},setHour:function(Ft,dr){return Ft.hour(dr)},setMinute:function(Ft,dr){return Ft.minute(dr)},setSecond:function(Ft,dr){return Ft.second(dr)},setMillisecond:function(Ft,dr){return Ft.millisecond(dr)},isAfter:function(Ft,dr){return Ft.isAfter(dr)},isValidate:function(Ft){return Ft.isValid()},locale:{getWeekFirstDay:function(Ft){return V()().locale(Ge(Ft)).localeData().firstDayOfWeek()},getWeekFirstDate:function(Ft,dr){return dr.locale(Ge(Ft)).weekday(0)},getWeek:function(Ft,dr){return dr.locale(Ge(Ft)).week()},getShortWeekDays:function(Ft){return V()().locale(Ge(Ft)).localeData().weekdaysMin()},getShortMonths:function(Ft){return V()().locale(Ge(Ft)).localeData().monthsShort()},format:function(Ft,dr,Wr){return dr.locale(Ge(Ft)).format(Wr)},parse:function(Ft,dr,Wr){for(var Jr=Ge(Ft),Gn=0;Gn2&&arguments[2]!==void 0?arguments[2]:"0",Wr=String(Oe);Wr.length2&&arguments[2]!==void 0?arguments[2]:[],Wr=Ue.useState([!1,!1]),Jr=(0,Vr.Z)(Wr,2),Gn=Jr[0],mi=Jr[1],Vn=function(Xn,Ca){mi(function($a){return Zn($a,Ca,Xn)})},Gi=Ue.useMemo(function(){return Gn.map(function(Li,Xn){if(Li)return!0;var Ca=Oe[Xn];return Ca?!!(!dr[Xn]&&!Ca||Ca&&Ft(Ca,{activeIndex:Xn})):!1})},[Oe,Gn,Ft,dr]);return[Gi,Vn]}function ji(Oe,Ft,dr,Wr,Jr){var Gn="",mi=[];return Oe&&mi.push(Jr?"hh":"HH"),Ft&&mi.push("mm"),dr&&mi.push("ss"),Gn=mi.join(":"),Wr&&(Gn+=".SSS"),Jr&&(Gn+=" A"),Gn}function so(Oe,Ft,dr,Wr,Jr,Gn){var mi=Oe.fieldDateTimeFormat,Vn=Oe.fieldDateFormat,Gi=Oe.fieldTimeFormat,Li=Oe.fieldMonthFormat,Xn=Oe.fieldYearFormat,Ca=Oe.fieldWeekFormat,$a=Oe.fieldQuarterFormat,Ba=Oe.yearFormat,ha=Oe.cellYearFormat,ba=Oe.cellQuarterFormat,Ti=Oe.dayFormat,Bi=Oe.cellDateFormat,na=ji(Ft,dr,Wr,Jr,Gn);return(0,Jt.Z)((0,Jt.Z)({},Oe),{},{fieldDateTimeFormat:mi||"YYYY-MM-DD ".concat(na),fieldDateFormat:Vn||"YYYY-MM-DD",fieldTimeFormat:Gi||na,fieldMonthFormat:Li||"YYYY-MM",fieldYearFormat:Xn||"YYYY",fieldWeekFormat:Ca||"gggg-wo",fieldQuarterFormat:$a||"YYYY-[Q]Q",yearFormat:Ba||"YYYY",cellYearFormat:ha||"YYYY",cellQuarterFormat:ba||"[Q]Q",cellDateFormat:Bi||Ti||"D"})}function ei(Oe,Ft){var dr=Ft.showHour,Wr=Ft.showMinute,Jr=Ft.showSecond,Gn=Ft.showMillisecond,mi=Ft.use12Hours;return Ue.useMemo(function(){return so(Oe,dr,Wr,Jr,Gn,mi)},[Oe,dr,Wr,Jr,Gn,mi])}var Kn=_(13255);function Jn(Oe,Ft,dr){return dr!=null?dr:Ft.some(function(Wr){return Oe.includes(Wr)})}var da=["showNow","showHour","showMinute","showSecond","showMillisecond","use12Hours","hourStep","minuteStep","secondStep","millisecondStep","hideDisabledOptions","defaultValue","disabledHours","disabledMinutes","disabledSeconds","disabledMilliseconds","disabledTime","changeOnScroll","defaultOpenValue"];function pa(Oe){var Ft=gr(Oe,da),dr=Oe.format,Wr=Oe.picker,Jr=null;return dr&&(Jr=dr,Array.isArray(Jr)&&(Jr=Jr[0]),Jr=(0,Kn.Z)(Jr)==="object"?Jr.format:Jr),Wr==="time"&&(Ft.format=Jr),[Ft,Jr]}function uo(Oe){return Oe&&typeof Oe=="string"}function Ir(Oe){var Ft=Oe.showTime,dr=pa(Oe),Wr=(0,Vr.Z)(dr,2),Jr=Wr[0],Gn=Wr[1],mi=Ft&&(0,Kn.Z)(Ft)==="object"?Ft:{},Vn=(0,Jt.Z)((0,Jt.Z)({defaultOpenValue:mi.defaultOpenValue||mi.defaultValue},Jr),mi),Gi=Vn.showMillisecond,Li=Vn.showHour,Xn=Vn.showMinute,Ca=Vn.showSecond;return!Li&&!Xn&&!Ca&&!Gi&&(Li=!0,Xn=!0,Ca=!0),[Vn,(0,Jt.Z)((0,Jt.Z)({},Vn),{},{showHour:Li,showMinute:Xn,showSecond:Ca,showMillisecond:Gi}),Vn.format,Gn]}function bt(Oe,Ft,dr,Wr,Jr){var Gn=Oe==="time";if(Oe==="datetime"||Gn){for(var mi=Wr,Vn=Ea(Oe,Jr,null),Gi=Vn,Li=[Ft,dr],Xn=0;Xn1&&(mi=Ft.addDate(mi,-7)),mi}function er(Oe,Ft){var dr=Ft.generateConfig,Wr=Ft.locale,Jr=Ft.format;return Oe?typeof Jr=="function"?Jr(Oe):dr.locale.format(Wr.locale,Oe,Jr):""}function jr(Oe,Ft,dr){var Wr=Ft,Jr=["getHour","getMinute","getSecond","getMillisecond"],Gn=["setHour","setMinute","setSecond","setMillisecond"];return Gn.forEach(function(mi,Vn){dr?Wr=Oe[mi](Wr,Oe[Jr[Vn]](dr)):Wr=Oe[mi](Wr,0)}),Wr}function on(Oe,Ft,dr,Wr,Jr){var Gn=(0,gn.zX)(function(mi,Vn){return!!(dr&&dr(mi,Vn)||Wr&&Oe.isAfter(Wr,mi)&&!rr(Oe,Ft,Wr,mi,Vn.type)||Jr&&Oe.isAfter(mi,Jr)&&!rr(Oe,Ft,Jr,mi,Vn.type))});return Gn}function ri(Oe,Ft,dr){return Ue.useMemo(function(){var Wr=Ea(Oe,Ft,dr),Jr=yi(Wr),Gn=Jr[0],mi=(0,Kn.Z)(Gn)==="object"&&Gn.type==="mask"?Gn.format:null;return[Jr.map(function(Vn){return typeof Vn=="string"||typeof Vn=="function"?Vn:Vn.format}),mi]},[Oe,Ft,dr])}function nn(Oe,Ft,dr){return typeof Oe[0]=="function"||dr?!0:Ft}function ln(Oe,Ft,dr,Wr){var Jr=(0,gn.zX)(function(Gn,mi){var Vn=(0,Jt.Z)({type:Ft},mi);if(delete Vn.activeIndex,!Oe.isValidate(Gn)||dr&&dr(Gn,Vn))return!0;if((Ft==="date"||Ft==="time")&&Wr){var Gi,Li=((Gi=Wr.disabledTime)===null||Gi===void 0?void 0:Gi.call(Wr,Gn,mi&&mi.activeIndex===1?"end":"start"))||{},Xn=Li.disabledHours,Ca=Li.disabledMinutes,$a=Li.disabledSeconds,Ba=Li.disabledMilliseconds,ha=Wr.disabledHours,ba=Wr.disabledMinutes,Ti=Wr.disabledSeconds,Bi=Xn||ha,na=Ca||ba,Sa=$a||Ti,Ko=Oe.getHour(Gn),qo=Oe.getMinute(Gn),gs=Oe.getSecond(Gn),Da=Oe.getMillisecond(Gn);if(Bi&&Bi().includes(Ko)||na&&na(Ko).includes(qo)||Sa&&Sa(Ko,qo).includes(gs)||Ba&&Ba(Ko,qo,gs).includes(Da))return!0}return!1});return Jr}function Yn(Oe){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dr=Ue.useMemo(function(){var Wr=Oe&&yi(Oe);return Ft&&Wr&&(Wr[1]=Wr[1]||Wr[0]),Wr},[Oe,Ft]);return dr}function Wn(Oe,Ft){var dr=Oe.generateConfig,Wr=Oe.locale,Jr=Oe.picker,Gn=Jr===void 0?"date":Jr,mi=Oe.prefixCls,Vn=mi===void 0?"rc-picker":mi,Gi=Oe.styles,Li=Gi===void 0?{}:Gi,Xn=Oe.classNames,Ca=Xn===void 0?{}:Xn,$a=Oe.order,Ba=$a===void 0?!0:$a,ha=Oe.components,ba=ha===void 0?{}:ha,Ti=Oe.inputRender,Bi=Oe.allowClear,na=Oe.clearIcon,Sa=Oe.needConfirm,Ko=Oe.multiple,qo=Oe.format,gs=Oe.inputReadOnly,Da=Oe.disabledDate,Hu=Oe.minDate,Mo=Oe.maxDate,Ps=Oe.showTime,eu=Oe.value,Bs=Oe.defaultValue,cu=Oe.pickerValue,yu=Oe.defaultPickerValue,fu=Yn(eu),Gu=Yn(Bs),h=Yn(cu),m=Yn(yu),F=Gn==="date"&&Ps?"datetime":Gn,H=F==="time"||F==="datetime",ve=H||Ko,ot=Sa!=null?Sa:H,kt=Ir(Oe),J=(0,Vr.Z)(kt,4),f=J[0],O=J[1],K=J[2],q=J[3],me=ei(Wr,O),je=Ue.useMemo(function(){return bt(F,K,q,f,me)},[F,K,q,f,me]),tt=Ue.useMemo(function(){return(0,Jt.Z)((0,Jt.Z)({},Oe),{},{prefixCls:Vn,locale:me,picker:Gn,styles:Li,classNames:Ca,order:Ba,components:(0,Jt.Z)({input:Ti},ba),clearIcon:Yt(Vn,Bi,na),showTime:je,value:fu,defaultValue:Gu,pickerValue:h,defaultPickerValue:m},Ft==null?void 0:Ft())},[Oe]),w=ri(F,me,qo),Gt=(0,Vr.Z)(w,2),b=Gt[0],x=Gt[1],S=nn(b,gs,Ko),Z=on(dr,Wr,Da,Hu,Mo),he=ln(dr,Gn,Da,je),Se=Ue.useMemo(function(){return(0,Jt.Z)((0,Jt.Z)({},tt),{},{needConfirm:ot,inputReadOnly:S,disabledDate:Z})},[tt,ot,S,Z]);return[Se,F,ve,b,x,he]}var Tn=_(90571);function ai(Oe,Ft,dr){var Wr=(0,gn.C8)(Ft,{value:Oe}),Jr=(0,Vr.Z)(Wr,2),Gn=Jr[0],mi=Jr[1],Vn=Ue.useRef(Oe),Gi=Ue.useRef(),Li=function(){Tn.Z.cancel(Gi.current)},Xn=(0,gn.zX)(function(){mi(Vn.current),dr&&Gn!==Vn.current&&dr(Vn.current)}),Ca=(0,gn.zX)(function($a,Ba){Li(),Vn.current=$a,$a||Ba?Xn():Gi.current=(0,Tn.Z)(Xn)});return Ue.useEffect(function(){return Li},[]),[Gn,Ca]}function Ii(Oe,Ft){var dr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],Wr=arguments.length>3?arguments[3]:void 0,Jr=dr.every(function(Xn){return Xn})?!1:Oe,Gn=ai(Jr,Ft||!1,Wr),mi=(0,Vr.Z)(Gn,2),Vn=mi[0],Gi=mi[1];function Li(Xn){var Ca=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!Ca.inherit||Vn)&&Gi(Xn,Ca.force)}return[Vn,Li]}function ki(Oe){var Ft=Ue.useRef();return Ue.useImperativeHandle(Oe,function(){var dr;return{nativeElement:(dr=Ft.current)===null||dr===void 0?void 0:dr.nativeElement,focus:function(){var Jr;(Jr=Ft.current)===null||Jr===void 0||Jr.focus()},blur:function(){var Jr;(Jr=Ft.current)===null||Jr===void 0||Jr.blur()}}}),Ft}function Fa(Oe,Ft){return Ue.useMemo(function(){return Oe||(Ft?((0,y.ZP)(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.entries(Ft).map(function(dr){var Wr=(0,Vr.Z)(dr,2),Jr=Wr[0],Gn=Wr[1];return{label:Jr,value:Gn}})):[])},[Oe,Ft])}function sa(Oe,Ft){var dr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Wr=Ue.useRef(Ft);Wr.current=Ft,(0,yn.o)(function(){if(Oe)Wr.current(Oe);else{var Jr=(0,Tn.Z)(function(){Wr.current(Oe)},dr);return function(){Tn.Z.cancel(Jr)}}},[Oe])}function vo(Oe){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],dr=Ue.useState(0),Wr=(0,Vr.Z)(dr,2),Jr=Wr[0],Gn=Wr[1],mi=Ue.useState(!1),Vn=(0,Vr.Z)(mi,2),Gi=Vn[0],Li=Vn[1],Xn=Ue.useRef([]),Ca=Ue.useRef(null),$a=function(Ti){Li(Ti)},Ba=function(Ti){return Ti&&(Ca.current=Ti),Ca.current},ha=function(Ti){var Bi=Xn.current,na=new Set(Bi.filter(function(Ko){return Ti[Ko]||Ft[Ko]})),Sa=Bi[Bi.length-1]===0?1:0;return na.size>=2||Oe[Sa]?null:Sa};return sa(Gi,function(){Gi||(Xn.current=[])}),Ue.useEffect(function(){Gi&&Xn.current.push(Jr)},[Gi,Jr]),[Gi,$a,Ba,Jr,Gn,ha,Xn.current]}function Ro(Oe,Ft,dr,Wr,Jr,Gn){var mi=dr[dr.length-1],Vn=dr.find(function(Li){return Oe[Li]}),Gi=function(Xn,Ca){var $a=(0,Vr.Z)(Oe,2),Ba=$a[0],ha=$a[1],ba=(0,Jt.Z)((0,Jt.Z)({},Ca),{},{from:mi!==Vn?Oe[Vn]:void 0});return mi===1&&Ft[0]&&Ba&&!rr(Wr,Jr,Ba,Xn,ba.type)&&Wr.isAfter(Ba,Xn)||mi===0&&Ft[1]&&ha&&!rr(Wr,Jr,ha,Xn,ba.type)&&Wr.isAfter(Xn,ha)?!0:Gn==null?void 0:Gn(Xn,ba)};return Gi}function Za(Oe,Ft,dr,Wr){switch(Ft){case"date":case"week":return Oe.addMonth(dr,Wr);case"month":case"quarter":return Oe.addYear(dr,Wr);case"year":return Oe.addYear(dr,Wr*10);case"decade":return Oe.addYear(dr,Wr*100);default:return dr}}var Os=[];function ro(Oe,Ft,dr,Wr,Jr,Gn,mi,Vn){var Gi=arguments.length>8&&arguments[8]!==void 0?arguments[8]:Os,Li=arguments.length>9&&arguments[9]!==void 0?arguments[9]:Os,Xn=arguments.length>10&&arguments[10]!==void 0?arguments[10]:Os,Ca=arguments.length>11?arguments[11]:void 0,$a=arguments.length>12?arguments[12]:void 0,Ba=arguments.length>13?arguments[13]:void 0,ha=mi==="time",ba=Gn||0,Ti=function(h){var m=Oe.getNow();return ha&&(m=jr(Oe,m)),Gi[h]||dr[h]||m},Bi=(0,Vr.Z)(Li,2),na=Bi[0],Sa=Bi[1],Ko=(0,gn.C8)(function(){return Ti(0)},{value:na}),qo=(0,Vr.Z)(Ko,2),gs=qo[0],Da=qo[1],Hu=(0,gn.C8)(function(){return Ti(1)},{value:Sa}),Mo=(0,Vr.Z)(Hu,2),Ps=Mo[0],eu=Mo[1],Bs=Ue.useMemo(function(){var Gu=[gs,Ps][ba];return ha?Gu:jr(Oe,Gu,Xn[ba])},[ha,gs,Ps,ba,Oe,Xn]),cu=function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"panel",F=[Da,eu][ba];F(h);var H=[gs,Ps];H[ba]=h,Ca&&(!rr(Oe,Ft,gs,H[0],mi)||!rr(Oe,Ft,Ps,H[1],mi))&&Ca(H,{source:m,range:ba===1?"end":"start",mode:Wr})},yu=function(h,m){if(Vn){var F={date:"month",week:"month",month:"year",quarter:"year"},H=F[mi];if(H&&!rr(Oe,Ft,h,m,H))return Za(Oe,mi,m,-1);if(mi==="year"){var ve=Math.floor(Oe.getYear(h)/10),ot=Math.floor(Oe.getYear(m)/10);if(ve!==ot)return Za(Oe,mi,m,-1)}}return m},fu=Ue.useRef(null);return(0,yn.Z)(function(){if(Jr&&!Gi[ba]){var Gu=ha?null:Oe.getNow();if(fu.current!==null&&fu.current!==ba?Gu=[gs,Ps][ba^1]:dr[ba]?Gu=ba===0?dr[0]:yu(dr[0],dr[1]):dr[ba^1]&&(Gu=dr[ba^1]),Gu){$a&&Oe.isAfter($a,Gu)&&(Gu=$a);var h=Vn?Za(Oe,mi,Gu,1):Gu;Ba&&Oe.isAfter(h,Ba)&&(Gu=Za(Oe,mi,Ba,-1)),cu(Gu,"reset")}}},[Jr,ba,dr[ba]]),Ue.useEffect(function(){Jr?fu.current=ba:fu.current=null},[Jr,ba]),(0,yn.Z)(function(){Jr&&Gi&&Gi[ba]&&cu(Gi[ba],"reset")},[Jr,ba]),[Bs,cu]}function Tu(Oe,Ft){var dr=Ue.useRef(Oe),Wr=Ue.useState({}),Jr=(0,Vr.Z)(Wr,2),Gn=Jr[1],mi=function(Li){return Li&&Ft!==void 0?Ft:dr.current},Vn=function(Li){dr.current=Li,Gn({})};return[mi,Vn,mi(!0)]}var Do=[];function qa(Oe,Ft,dr){var Wr=function(mi){return mi.map(function(Vn){return er(Vn,{generateConfig:Oe,locale:Ft,format:dr[0]})})},Jr=function(mi,Vn){for(var Gi=Math.max(mi.length,Vn.length),Li=-1,Xn=0;Xn2&&arguments[2]!==void 0?arguments[2]:1,Wr=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,Jr=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],Gn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,mi=[],Vn=dr>=1?dr|0:1,Gi=Oe;Gi<=Ft;Gi+=Vn){var Li=Jr.includes(Gi);(!Li||!Wr)&&mi.push({label:_n(Gi,Gn),value:Gi,disabled:Li})}return mi}function ko(Oe){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dr=arguments.length>2?arguments[2]:void 0,Wr=Ft||{},Jr=Wr.use12Hours,Gn=Wr.hourStep,mi=Gn===void 0?1:Gn,Vn=Wr.minuteStep,Gi=Vn===void 0?1:Vn,Li=Wr.secondStep,Xn=Li===void 0?1:Li,Ca=Wr.millisecondStep,$a=Ca===void 0?100:Ca,Ba=Wr.hideDisabledOptions,ha=Wr.disabledTime,ba=Wr.disabledHours,Ti=Wr.disabledMinutes,Bi=Wr.disabledSeconds,na=Ue.useMemo(function(){return dr||Oe.getNow()},[dr,Oe]);if(!1)var Sa,Ko,qo;var gs=Ue.useCallback(function(ve){var ot=(ha==null?void 0:ha(ve))||{};return[ot.disabledHours||ba||Ts,ot.disabledMinutes||Ti||Ts,ot.disabledSeconds||Bi||Ts,ot.disabledMilliseconds||Ts]},[ha,ba,Ti,Bi]),Da=Ue.useMemo(function(){return gs(na)},[na,gs]),Hu=(0,Vr.Z)(Da,4),Mo=Hu[0],Ps=Hu[1],eu=Hu[2],Bs=Hu[3],cu=Ue.useCallback(function(ve,ot,kt,J){var f=Qs(0,23,mi,Ba,ve()),O=Jr?f.map(function(je){return(0,Jt.Z)((0,Jt.Z)({},je),{},{label:_n(je.value%12||12,2)})}):f,K=function(tt){return Qs(0,59,Gi,Ba,ot(tt))},q=function(tt,w){return Qs(0,59,Xn,Ba,kt(tt,w))},me=function(tt,w,Gt){return Qs(0,999,$a,Ba,J(tt,w,Gt),3)};return[O,K,q,me]},[Ba,mi,Jr,$a,Gi,Xn]),yu=Ue.useMemo(function(){return cu(Mo,Ps,eu,Bs)},[cu,Mo,Ps,eu,Bs]),fu=(0,Vr.Z)(yu,4),Gu=fu[0],h=fu[1],m=fu[2],F=fu[3],H=function(ot,kt){var J=function(){return Gu},f=h,O=m,K=F;if(kt){var q=gs(kt),me=(0,Vr.Z)(q,4),je=me[0],tt=me[1],w=me[2],Gt=me[3],b=cu(je,tt,w,Gt),x=(0,Vr.Z)(b,4),S=x[0],Z=x[1],he=x[2],Se=x[3];J=function(){return S},f=Z,O=he,K=Se}var Pe=us(ot,J,f,O,K,Oe);return Pe};return[H,Gu,h,m,F]}function _o(Oe){var Ft=Oe.mode,dr=Oe.internalMode,Wr=Oe.renderExtraFooter,Jr=Oe.showNow,Gn=Oe.showTime,mi=Oe.onSubmit,Vn=Oe.onNow,Gi=Oe.invalid,Li=Oe.needConfirm,Xn=Oe.generateConfig,Ca=Oe.disabledDate,$a=Ue.useContext(Ua),Ba=$a.prefixCls,ha=$a.locale,ba=$a.button,Ti=ba===void 0?"button":ba,Bi=Xn.getNow(),na=ko(Xn,Gn,Bi),Sa=(0,Vr.Z)(na,1),Ko=Sa[0],qo=Wr==null?void 0:Wr(Ft),gs=Ca(Bi,{type:Ft}),Da=function(){if(!gs){var yu=Ko(Bi);Vn(yu)}},Hu="".concat(Ba,"-now"),Mo="".concat(Hu,"-btn"),Ps=Jr&&Ue.createElement("li",{className:Hu},Ue.createElement("a",{className:et()(Mo,gs&&"".concat(Mo,"-disabled")),"aria-disabled":gs,onClick:Da},dr==="date"?ha.today:ha.now)),eu=Li&&Ue.createElement("li",{className:"".concat(Ba,"-ok")},Ue.createElement(Ti,{disabled:Gi,onClick:mi},ha.ok)),Bs=(Ps||eu)&&Ue.createElement("ul",{className:"".concat(Ba,"-ranges")},Ps,eu);return!qo&&!Bs?null:Ue.createElement("div",{className:"".concat(Ba,"-footer")},qo&&Ue.createElement("div",{className:"".concat(Ba,"-footer-extra")},qo),Bs)}function Js(Oe,Ft,dr){function Wr(Jr,Gn){var mi=Jr.findIndex(function(Gi){return rr(Oe,Ft,Gi,Gn,dr)});if(mi===-1)return[].concat((0,br.Z)(Jr),[Gn]);var Vn=(0,br.Z)(Jr);return Vn.splice(mi,1),Vn}return Wr}var fo=Ue.createContext(null);function El(){return Ue.useContext(fo)}function ju(Oe,Ft){var dr=Oe.prefixCls,Wr=Oe.generateConfig,Jr=Oe.locale,Gn=Oe.disabledDate,mi=Oe.minDate,Vn=Oe.maxDate,Gi=Oe.cellRender,Li=Oe.hoverValue,Xn=Oe.hoverRangeValue,Ca=Oe.onHover,$a=Oe.values,Ba=Oe.pickerValue,ha=Oe.onSelect,ba=Oe.prevIcon,Ti=Oe.nextIcon,Bi=Oe.superPrevIcon,na=Oe.superNextIcon,Sa=Wr.getNow(),Ko={now:Sa,values:$a,pickerValue:Ba,prefixCls:dr,disabledDate:Gn,minDate:mi,maxDate:Vn,cellRender:Gi,hoverValue:Li,hoverRangeValue:Xn,onHover:Ca,locale:Jr,generateConfig:Wr,onSelect:ha,panelType:Ft,prevIcon:ba,nextIcon:Ti,superPrevIcon:Bi,superNextIcon:na};return[Ko,Sa]}var _l=Ue.createContext({});function Es(Oe){for(var Ft=Oe.rowNum,dr=Oe.colNum,Wr=Oe.baseDate,Jr=Oe.getCellDate,Gn=Oe.prefixColumn,mi=Oe.rowClassName,Vn=Oe.titleFormat,Gi=Oe.getCellText,Li=Oe.getCellClassName,Xn=Oe.headerCells,Ca=Oe.cellSelection,$a=Ca===void 0?!0:Ca,Ba=Oe.disabledDate,ha=El(),ba=ha.prefixCls,Ti=ha.panelType,Bi=ha.now,na=ha.disabledDate,Sa=ha.cellRender,Ko=ha.onHover,qo=ha.hoverValue,gs=ha.hoverRangeValue,Da=ha.generateConfig,Hu=ha.values,Mo=ha.locale,Ps=ha.onSelect,eu=Ba||na,Bs="".concat(ba,"-cell"),cu=Ue.useContext(_l),yu=cu.onCellDblClick,fu=function(kt){return Hu.some(function(J){return J&&rr(Da,Mo,kt,J,Ti)})},Gu=[],h=0;h1&&arguments[1]!==void 0?arguments[1]:!1;Ut(pr),Ti==null||Ti(pr),di&&wt(pr)},cr=function(pr,di){me(pr),di&&Kt(di),wt(di,pr)},hr=function(pr){if(he(pr),Kt(pr),q!==Ko){var di=["decade","year"],Ji=[].concat(di,["month"]),ja={quarter:[].concat(di,["quarter"]),week:[].concat((0,br.Z)(Ji),["week"]),date:[].concat((0,br.Z)(Ji),["date"])},no=ja[Ko]||Ji,Ss=no.indexOf(q),tu=no[Ss+1];tu&&cr(tu,pr)}},Fr=Ue.useMemo(function(){var oi,pr;if(Array.isArray(Da)){var di=(0,Vr.Z)(Da,2);oi=di[0],pr=di[1]}else oi=Da;return!oi&&!pr?null:(oi=oi||pr,pr=pr||oi,Jr.isAfter(oi,pr)?[pr,oi]:[oi,pr])},[Da,Jr]),Br=Qa(Hu,Mo,Ps),rn=Bs[je]||xt[je]||Au,Xr=Ue.useContext(_l),dn=Ue.useMemo(function(){return(0,Jt.Z)((0,Jt.Z)({},Xr),{},{hideHeader:cu})},[Xr,cu]),Qt="".concat(yu,"-panel"),li=gr(Oe,["showWeek","prevIcon","nextIcon","superPrevIcon","superNextIcon","disabledDate","minDate","maxDate","onHover"]);return Ue.createElement(_l.Provider,{value:dn},Ue.createElement("div",{ref:fu,tabIndex:Gi,className:et()(Qt,(0,Ln.Z)({},"".concat(Qt,"-rtl"),Gn==="rtl"))},Ue.createElement(rn,(0,rt.Z)({},li,{showTime:J,prefixCls:yu,locale:ot,generateConfig:Jr,onModeChange:cr,pickerValue:ct,onPickerValueChange:function(pr){Kt(pr,!0)},value:S[0],onSelect:hr,values:S,cellRender:Br,hoverRangeValue:Fr,hoverValue:gs}))))}var lr=Ue.memo(Ue.forwardRef(Nt)),$r=lr;function Yr(Oe){var Ft=Oe.picker,dr=Oe.multiplePanel,Wr=Oe.pickerValue,Jr=Oe.onPickerValueChange,Gn=Oe.onSubmit,mi=Oe.range,Vn=Oe.hoverValue,Gi=Ue.useContext(Ua),Li=Gi.prefixCls,Xn=Gi.generateConfig,Ca=Ue.useCallback(function(Bi,na){return Za(Xn,Ft,Bi,na)},[Xn,Ft]),$a=Ue.useMemo(function(){return Ca(Wr,1)},[Wr,Ca]),Ba=function(na){Jr(Ca(na,-1))},ha={onCellDblClick:function(){Gn()}},ba=Ft==="time",Ti=(0,Jt.Z)((0,Jt.Z)({},Oe),{},{hoverValue:null,hoverRangeValue:null,hideHeader:ba});return mi?Ti.hoverRangeValue=Vn:Ti.hoverValue=Vn,dr?Ue.createElement("div",{className:"".concat(Li,"-panels")},Ue.createElement(_l.Provider,{value:(0,Jt.Z)((0,Jt.Z)({},ha),{},{hideNext:!0})},Ue.createElement($r,Ti)),Ue.createElement(_l.Provider,{value:(0,Jt.Z)((0,Jt.Z)({},ha),{},{hidePrev:!0})},Ue.createElement($r,(0,rt.Z)({},Ti,{pickerValue:$a,onPickerValueChange:Ba})))):Ue.createElement(_l.Provider,{value:(0,Jt.Z)({},ha)},Ue.createElement($r,Ti))}function un(Oe){return typeof Oe=="function"?Oe():Oe}function Sn(Oe){var Ft=Oe.prefixCls,dr=Oe.presets,Wr=Oe.onClick,Jr=Oe.onHover;return dr.length?Ue.createElement("div",{className:"".concat(Ft,"-presets")},Ue.createElement("ul",null,dr.map(function(Gn,mi){var Vn=Gn.label,Gi=Gn.value;return Ue.createElement("li",{key:mi,onClick:function(){Wr(un(Gi))},onMouseEnter:function(){Jr(un(Gi))},onMouseLeave:function(){Jr(null)}},Vn)}))):null}function qn(Oe){var Ft,dr=Oe.panelRender,Wr=Oe.internalMode,Jr=Oe.picker,Gn=Oe.showNow,mi=Oe.range,Vn=Oe.multiple,Gi=Oe.activeOffset,Li=Gi===void 0?0:Gi,Xn=Oe.presets,Ca=Oe.onPresetHover,$a=Oe.onPresetSubmit,Ba=Oe.onFocus,ha=Oe.onBlur,ba=Oe.direction,Ti=Oe.value,Bi=Oe.onSelect,na=Oe.isInvalid,Sa=Oe.defaultOpenValue,Ko=Oe.onOk,qo=Oe.onSubmit,gs=Ue.useContext(Ua),Da=gs.prefixCls,Hu="".concat(Da,"-panel"),Mo=ba==="rtl",Ps=Ue.useRef(null),eu=Ue.useState(0),Bs=(0,Vr.Z)(eu,2),cu=Bs[0],yu=Bs[1],fu=Ue.useState(0),Gu=(0,Vr.Z)(fu,2),h=Gu[0],m=Gu[1],F=function(Gt){Gt.offsetWidth&&yu(Gt.offsetWidth)};Ue.useEffect(function(){if(mi){var w;Li+cu<((w=Ps.current)===null||w===void 0?void 0:w.offsetWidth)?m(Li):m(0)}},[cu,Li,mi]);function H(w){return w.filter(function(Gt){return Gt})}var ve=Ue.useMemo(function(){return H(yi(Ti))},[Ti]),ot=Jr==="time"&&!ve.length,kt=Ue.useMemo(function(){return ot?H([Sa]):ve},[ot,ve,Sa]),J=ot?Sa:ve,f=Ue.useMemo(function(){return kt.length?kt.some(function(w){return na(w)}):!0},[kt,na]),O=function(){ot&&Bi(Sa),Ko(),qo()},K=Ue.createElement("div",{className:"".concat(Da,"-panel-layout")},Ue.createElement(Sn,{prefixCls:Da,presets:Xn,onClick:$a,onHover:Ca}),Ue.createElement("div",null,Ue.createElement(Yr,(0,rt.Z)({},Oe,{value:J})),Ue.createElement(_o,(0,rt.Z)({},Oe,{showNow:Vn?!1:Gn,invalid:f,onSubmit:O}))));dr&&(K=dr(K));var q="".concat(Hu,"-container"),me="marginLeft",je="marginRight",tt=Ue.createElement("div",{tabIndex:-1,className:et()(q,"".concat(Da,"-").concat(Wr,"-panel-container")),style:(Ft={},(0,Ln.Z)(Ft,Mo?je:me,h),(0,Ln.Z)(Ft,Mo?me:je,"auto"),Ft),onFocus:Ba,onBlur:ha},K);return mi&&(tt=Ue.createElement("div",{ref:Ps,className:et()("".concat(Da,"-range-wrapper"),"".concat(Da,"-").concat(Jr,"-range-wrapper"))},Ue.createElement("div",{className:"".concat(Da,"-range-arrow"),style:(0,Ln.Z)({},Mo?"right":"left",Li)}),Ue.createElement(Hs.Z,{onResize:F},tt))),tt}var ti=_(56348);function Ui(Oe,Ft){var dr=Oe.format,Wr=Oe.maskFormat,Jr=Oe.generateConfig,Gn=Oe.locale,mi=Oe.preserveInvalidOnBlur,Vn=Oe.inputReadOnly,Gi=Oe.required,Li=Oe["aria-required"],Xn=Oe.onSubmit,Ca=Oe.onFocus,$a=Oe.onBlur,Ba=Oe.onInputChange,ha=Oe.onInvalid,ba=Oe.open,Ti=Oe.onOpenChange,Bi=Oe.onKeyDown,na=Oe.onChange,Sa=Oe.activeHelp,Ko=Oe.name,qo=Oe.autoComplete,gs=Oe.id,Da=Oe.value,Hu=Oe.invalid,Mo=Oe.placeholder,Ps=Oe.disabled,eu=Oe.activeIndex,Bs=Oe.allHelp,cu=Oe.picker,yu=function(ot,kt){var J=Jr.locale.parse(Gn.locale,ot,[kt]);return J&&Jr.isValidate(J)?J:null},fu=dr[0],Gu=Ue.useCallback(function(ve){return er(ve,{locale:Gn,format:fu,generateConfig:Jr})},[Gn,Jr,fu]),h=Ue.useMemo(function(){return Da.map(Gu)},[Da,Gu]),m=Ue.useMemo(function(){var ve=cu==="time"?8:10,ot=typeof fu=="function"?fu(Jr.getNow()).length:fu.length;return Math.max(ve,ot)+2},[fu,cu,Jr]),F=function(ot){for(var kt=0;kt=Vn&&dr<=Gi)return Gn;var Li=Math.min(Math.abs(dr-Vn),Math.abs(dr-Gi));Li0?Ol:oc));var ff=Bc+Ju,Eh=oc-Ol+1;return String(Ol+(Eh+ff-Ol)%Eh)};switch(Ji){case"Backspace":case"Delete":ja="",no=tu;break;case"ArrowLeft":ja="",sn(-1);break;case"ArrowRight":ja="",sn(1);break;case"ArrowUp":ja="",no=bu(1);break;case"ArrowDown":ja="",no=bu(-1);break;default:isNaN(Number(Ji))||(ja=kt+Ji,no=ja);break}if(ja!==null&&(J(ja),ja.length>=Ss&&(sn(1),J(""))),no!==null){var bc=Gt.slice(0,Se)+_n(no,Ss)+Gt.slice(Pe);Ut(bc.slice(0,Vn.length))}w({})},li=Ue.useRef();(0,yn.Z)(function(){if(!(!fu||!Vn||cr.current)){if(!S.match(Gt)){Ut(Vn);return}return x.current.setSelectionRange(Se,Pe),li.current=(0,Tn.Z)(function(){x.current.setSelectionRange(Se,Pe)}),function(){Tn.Z.cancel(li.current)}}},[S,Vn,fu,Gt,K,Se,Pe,tt,Ut]);var oi=Vn?{onFocus:Br,onBlur:Xr,onKeyDown:Qt,onMouseDown:hr,onMouseUp:Fr,onPaste:Kt}:{};return Ue.createElement("div",{ref:b,className:et()(Bs,(dr={},(0,Ln.Z)(dr,"".concat(Bs,"-active"),Wr&&Gn),(0,Ln.Z)(dr,"".concat(Bs,"-placeholder"),Ca),dr))},Ue.createElement(eu,(0,rt.Z)({ref:x,"aria-invalid":Bi,autoComplete:"off"},Sa,{onKeyDown:dn,onBlur:rn},oi,{value:Gt,onChange:wt})),Ue.createElement(ma,{type:"suffix",icon:mi}),na)}),Xs=vs,iu=["id","clearIcon","suffixIcon","separator","activeIndex","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","value","onChange","onSubmit","onInputChange","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onActiveOffset","onMouseDown","required","aria-required","autoFocus"];function js(Oe,Ft){var dr,Wr=Oe.id,Jr=Oe.clearIcon,Gn=Oe.suffixIcon,mi=Oe.separator,Vn=mi===void 0?"~":mi,Gi=Oe.activeIndex,Li=Oe.activeHelp,Xn=Oe.allHelp,Ca=Oe.focused,$a=Oe.onFocus,Ba=Oe.onBlur,ha=Oe.onKeyDown,ba=Oe.locale,Ti=Oe.generateConfig,Bi=Oe.placeholder,na=Oe.className,Sa=Oe.style,Ko=Oe.onClick,qo=Oe.onClear,gs=Oe.value,Da=Oe.onChange,Hu=Oe.onSubmit,Mo=Oe.onInputChange,Ps=Oe.format,eu=Oe.maskFormat,Bs=Oe.preserveInvalidOnBlur,cu=Oe.onInvalid,yu=Oe.disabled,fu=Oe.invalid,Gu=Oe.inputReadOnly,h=Oe.direction,m=Oe.onOpenChange,F=Oe.onActiveOffset,H=Oe.onMouseDown,ve=Oe.required,ot=Oe["aria-required"],kt=Oe.autoFocus,J=(0,ti.Z)(Oe,iu),f=h==="rtl",O=Ue.useContext(Ua),K=O.prefixCls,q=Ue.useMemo(function(){if(typeof Wr=="string")return[Wr];var Fr=Wr||{};return[Fr.start,Fr.end]},[Wr]),me=Ue.useRef(),je=Ue.useRef(),tt=Ue.useRef(),w=function(Br){var rn;return(rn=[je,tt][Br])===null||rn===void 0?void 0:rn.current};Ue.useImperativeHandle(Ft,function(){return{nativeElement:me.current,focus:function(){var Br,rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;(Br=w(rn))===null||Br===void 0||Br.focus()},blur:function(){var Br,rn;(Br=w(0))===null||Br===void 0||Br.blur(),(rn=w(1))===null||rn===void 0||rn.blur()}}});var Gt=ia(J),b=Ue.useMemo(function(){return Array.isArray(Bi)?Bi:[Bi,Bi]},[Bi]),x=Ui((0,Jt.Z)((0,Jt.Z)({},Oe),{},{id:q,placeholder:b})),S=(0,Vr.Z)(x,1),Z=S[0],he=f?"right":"left",Se=Ue.useState((0,Ln.Z)({position:"absolute",width:0},he,0)),Pe=(0,Vr.Z)(Se,2),ct=Pe[0],Ut=Pe[1],wt=(0,gn.zX)(function(){var Fr=w(Gi);if(Fr){var Br=Fr.nativeElement,rn=Br.offsetWidth,Xr=Br.offsetLeft,dn=Br.offsetParent,Qt=Xr;if(f){var li=dn,oi=getComputedStyle(li);Qt=li.offsetWidth-parseFloat(oi.borderRightWidth)-parseFloat(oi.borderLeftWidth)-Xr-rn}Ut(function(pr){return(0,Jt.Z)((0,Jt.Z)({},pr),{},(0,Ln.Z)({width:rn},he,Qt))}),F(Qt)}});Ue.useEffect(function(){wt()},[Gi]);var Kt=Jr&&(gs[0]&&!yu[0]||gs[1]&&!yu[1]),cr=kt&&!yu[0],hr=kt&&!cr&&!yu[1];return Ue.createElement(Hs.Z,{onResize:wt},Ue.createElement("div",(0,rt.Z)({},Gt,{className:et()(K,"".concat(K,"-range"),(dr={},(0,Ln.Z)(dr,"".concat(K,"-focused"),Ca),(0,Ln.Z)(dr,"".concat(K,"-disabled"),yu.every(function(Fr){return Fr})),(0,Ln.Z)(dr,"".concat(K,"-invalid"),fu.some(function(Fr){return Fr})),(0,Ln.Z)(dr,"".concat(K,"-rtl"),f),dr),na),style:Sa,ref:me,onClick:Ko,onMouseDown:function(Br){var rn=Br.target;rn!==je.current.inputElement&&rn!==tt.current.inputElement&&Br.preventDefault(),H==null||H(Br)}}),Ue.createElement(Xs,(0,rt.Z)({ref:je},Z(0),{autoFocus:cr,"date-range":"start"})),Ue.createElement("div",{className:"".concat(K,"-range-separator")},Vn),Ue.createElement(Xs,(0,rt.Z)({ref:tt},Z(1),{autoFocus:hr,"date-range":"end"})),Ue.createElement("div",{className:"".concat(K,"-active-bar"),style:ct}),Ue.createElement(ma,{type:"suffix",icon:Gn}),Kt&&Ue.createElement(Yi,{icon:Jr,onClear:qo})))}var Vs=Ue.forwardRef(js),sl=Vs;function al(Oe,Ft){var dr=Oe!=null?Oe:Ft;return Array.isArray(dr)?dr:[dr,dr]}function ul(Oe){return Oe===1?"end":"start"}function _c(Oe,Ft){var dr=Wn(Oe,function(){var kh=Oe.disabled,Zc=Oe.allowEmpty,dh=al(kh,!1),rd=al(Zc,!1);return{disabled:dh,allowEmpty:rd}}),Wr=(0,Vr.Z)(dr,6),Jr=Wr[0],Gn=Wr[1],mi=Wr[2],Vn=Wr[3],Gi=Wr[4],Li=Wr[5],Xn=Jr.prefixCls,Ca=Jr.styles,$a=Jr.classNames,Ba=Jr.defaultValue,ha=Jr.value,ba=Jr.needConfirm,Ti=Jr.onKeyDown,Bi=Jr.disabled,na=Jr.allowEmpty,Sa=Jr.disabledDate,Ko=Jr.minDate,qo=Jr.maxDate,gs=Jr.defaultOpen,Da=Jr.open,Hu=Jr.onOpenChange,Mo=Jr.locale,Ps=Jr.generateConfig,eu=Jr.picker,Bs=Jr.showNow,cu=Jr.showToday,yu=Jr.showTime,fu=Jr.mode,Gu=Jr.onPanelChange,h=Jr.onCalendarChange,m=Jr.onOk,F=Jr.defaultPickerValue,H=Jr.pickerValue,ve=Jr.onPickerValueChange,ot=Jr.inputReadOnly,kt=Jr.suffixIcon,J=Jr.onFocus,f=Jr.onBlur,O=Jr.presets,K=Jr.ranges,q=Jr.components,me=Jr.cellRender,je=Jr.dateRender,tt=Jr.monthCellRender,w=Jr.onClick,Gt=ki(Ft),b=Ii(Da,gs,Bi,Hu),x=(0,Vr.Z)(b,2),S=x[0],Z=x[1],he=function(Zc,dh){(Bi.some(function(rd){return!rd})||!Zc)&&Z(Zc,dh)},Se=Mn(Ps,Mo,Vn,!0,!1,Ba,ha,h,m),Pe=(0,Vr.Z)(Se,5),ct=Pe[0],Ut=Pe[1],wt=Pe[2],Kt=Pe[3],cr=Pe[4],hr=wt(),Fr=vo(Bi,na),Br=(0,Vr.Z)(Fr,7),rn=Br[0],Xr=Br[1],dn=Br[2],Qt=Br[3],li=Br[4],oi=Br[5],pr=Br[6],di=function(Zc,dh){Xr(!0),J==null||J(Zc,{range:ul(dh!=null?dh:Qt)})},Ji=function(Zc,dh){Xr(!1),f==null||f(Zc,{range:ul(dh!=null?dh:Qt)})},ja=Ue.useMemo(function(){if(!yu)return null;var kh=yu.disabledTime,Zc=kh?function(dh){var rd=ul(Qt);return kh(dh,rd)}:void 0;return(0,Jt.Z)((0,Jt.Z)({},yu),{},{disabledTime:Zc})},[yu,Qt]),no=(0,gn.C8)([eu,eu],{value:fu}),Ss=(0,Vr.Z)(no,2),tu=Ss[0],sn=Ss[1],bu=tu[Qt]||eu,bc=bu==="date"&&ja?"datetime":bu,uu=bc===eu&&bc!=="time",Ju=Fu(eu,bu,Bs,cu,!0),Sc=wi(Jr,ct,Ut,wt,Kt,Bi,Vn,rn,S,Li),Bl=(0,Vr.Z)(Sc,2),Ol=Bl[0],oc=Bl[1],Ql=Ro(hr,Bi,pr,Ps,Mo,Sa),Cu=oa(hr,Li,na),Bc=(0,Vr.Z)(Cu,2),ff=Bc[0],Eh=Bc[1],Rf=ro(Ps,Mo,hr,tu,S,Qt,Gn,uu,F,H,ja==null?void 0:ja.defaultOpenValue,ve,Ko,qo),Xl=(0,Vr.Z)(Rf,2),jf=Xl[0],Yf=Xl[1],Ah=(0,gn.zX)(function(kh,Zc,dh){var rd=Zn(tu,Qt,Zc);if((rd[0]!==tu[0]||rd[1]!==tu[1])&&sn(rd),Gu&&dh!==!1){var $p=(0,br.Z)(hr);kh&&($p[Qt]=kh),Gu($p,rd)}}),vf=function(Zc,dh){return Zn(hr,dh,Zc)},Ph=function(Zc,dh){var rd=hr;Zc&&(rd=vf(Zc,Qt));var $p=oi(rd);Kt(rd),Ol(Qt,$p===null),$p===null?he(!1,{force:!0}):dh||Gt.current.focus($p)},Ld=function(Zc){if(!Gt.current.nativeElement.contains(document.activeElement)){var dh=Bi.findIndex(function(rd){return!rd});dh>=0&&Gt.current.focus(dh)}he(!0),w==null||w(Zc)},Hh=function(){oc(null),he(!1,{force:!0})},Dh=Ue.useState(null),eh=(0,Vr.Z)(Dh,2),Hf=eh[0],qh=eh[1],Qh=Ue.useState(null),Uh=(0,Vr.Z)(Qh,2),Dd=Uh[0],Wl=Uh[1],yd=Ue.useMemo(function(){return Dd||hr},[hr,Dd]);Ue.useEffect(function(){S||Wl(null)},[S]);var Jh=Ue.useState(0),Qc=(0,Vr.Z)(Jh,2),Ap=Qc[0],vc=Qc[1],kf=Fa(O,K),Ih=function(Zc){Wl(Zc),qh("preset")},hd=function(Zc){var dh=oc(Zc);dh&&he(!1,{force:!0})},Gh=function(Zc){Ph(Zc)},Jp=function(Zc){Wl(Zc?vf(Zc,Qt):null),qh("cell")},i0=function(Zc){he(!0),di(Zc)},Cp=function(Zc){dn("panel");var dh=Zn(hr,Qt,Zc);Kt(dh),!ba&&!mi&&Gn===bc&&Ph(Zc)},Tp=function(){he(!1)},sp=Qa(me,je,tt,ul(Qt)),y0=hr[Qt]||null,a0=(0,gn.zX)(function(kh){return Li(kh,{activeIndex:Qt})}),Lp=Ue.useMemo(function(){var kh=(0,Hn.Z)(Jr,!1),Zc=(0,_i.Z)(Jr,[].concat((0,br.Z)(Object.keys(kh)),["onChange","onCalendarChange","style","className","onPanelChange"]));return Zc},[Jr]),Wd=Ue.createElement(qn,(0,rt.Z)({},Lp,{showNow:Ju,showTime:ja,range:!0,multiplePanel:uu,activeOffset:Ap,disabledDate:Ql,onFocus:i0,onBlur:Ji,picker:eu,mode:bu,internalMode:bc,onPanelChange:Ah,format:Gi,value:y0,isInvalid:a0,onChange:null,onSelect:Cp,pickerValue:jf,defaultOpenValue:yi(yu==null?void 0:yu.defaultOpenValue)[Qt],onPickerValueChange:Yf,hoverValue:yd,onHover:Jp,needConfirm:ba,onSubmit:Ph,onOk:cr,presets:kf,onPresetHover:Ih,onPresetSubmit:hd,onNow:Gh,cellRender:sp})),d0=function(Zc,dh){var rd=vf(Zc,dh);Kt(rd)},hf=function(){dn("input")},Jc=function(Zc,dh){dn("input"),he(!0,{inherit:!0}),li(dh),di(Zc,dh)},td=function(Zc,dh){he(!1),Ji(Zc,dh)},Ud=function(Zc,dh){Zc.key==="Tab"&&Ph(null,!0),Ti==null||Ti(Zc,dh)},P0=Ue.useMemo(function(){return{prefixCls:Xn,locale:Mo,generateConfig:Ps,button:q.button,input:q.input}},[Xn,Mo,Ps,q.button,q.input]);if((0,yn.Z)(function(){S&&Qt!==void 0&&Ah(null,eu,!1)},[S,Qt,eu]),(0,yn.Z)(function(){var kh=dn();!S&&kh==="input"&&(he(!1),Ph(null,!0)),!S&&mi&&!ba&&kh==="panel"&&(he(!0),Ph())},[S]),!1)var Dp;return Ue.createElement(Ua.Provider,{value:P0},Ue.createElement(mo,(0,rt.Z)({},co(Jr),{popupElement:Wd,popupStyle:Ca.popup,popupClassName:$a.popup,visible:S,onClose:Tp,range:!0}),Ue.createElement(sl,(0,rt.Z)({},Jr,{ref:Gt,suffixIcon:kt,activeIndex:rn||S?Qt:null,activeHelp:!!Dd,allHelp:!!Dd&&Hf==="preset",focused:rn,onFocus:Jc,onBlur:td,onKeyDown:Ud,onSubmit:Ph,value:yd,maskFormat:Gi,onChange:d0,onInputChange:hf,format:Vn,inputReadOnly:ot,disabled:Bi,open:S,onOpenChange:he,onClick:Ld,onClear:Hh,invalid:ff,onInvalid:Eh,onActiveOffset:vc}))))}var Yo=Ue.forwardRef(_c),No=Yo,Ku=_(1439);function Rc(Oe){var Ft=Oe.prefixCls,dr=Oe.value,Wr=Oe.onRemove,Jr=Oe.removeIcon,Gn=Jr===void 0?"\xD7":Jr,mi=Oe.formatDate,Vn=Oe.disabled,Gi=Oe.maxTagCount,Li="".concat(Ft,"-selector"),Xn="".concat(Ft,"-selection"),Ca="".concat(Xn,"-overflow");function $a(ba,Ti){return Ue.createElement("span",{className:et()("".concat(Xn,"-item")),title:typeof ba=="string"?ba:null},Ue.createElement("span",{className:"".concat(Xn,"-item-content")},ba),!Vn&&Ti&&Ue.createElement("span",{onMouseDown:function(na){na.preventDefault()},onClick:Ti,className:"".concat(Xn,"-item-remove")},Gn))}function Ba(ba){var Ti=mi(ba),Bi=function(Sa){Sa&&Sa.stopPropagation(),Wr(ba)};return $a(Ti,Bi)}function ha(ba){var Ti="+ ".concat(ba.length," ...");return $a(Ti)}return Ue.createElement("div",{className:Li},Ue.createElement(Ku.Z,{prefixCls:Ca,data:dr,renderItem:Ba,renderRest:ha,itemKey:function(Ti){return mi(Ti)},maxCount:Gi}))}var Wa=["id","open","clearIcon","suffixIcon","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","internalPicker","value","onChange","onSubmit","onInputChange","multiple","maxTagCount","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onMouseDown","required","aria-required","autoFocus","removeIcon"];function mf(Oe,Ft){var dr,Wr=Oe.id,Jr=Oe.open,Gn=Oe.clearIcon,mi=Oe.suffixIcon,Vn=Oe.activeHelp,Gi=Oe.allHelp,Li=Oe.focused,Xn=Oe.onFocus,Ca=Oe.onBlur,$a=Oe.onKeyDown,Ba=Oe.locale,ha=Oe.generateConfig,ba=Oe.placeholder,Ti=Oe.className,Bi=Oe.style,na=Oe.onClick,Sa=Oe.onClear,Ko=Oe.internalPicker,qo=Oe.value,gs=Oe.onChange,Da=Oe.onSubmit,Hu=Oe.onInputChange,Mo=Oe.multiple,Ps=Oe.maxTagCount,eu=Oe.format,Bs=Oe.maskFormat,cu=Oe.preserveInvalidOnBlur,yu=Oe.onInvalid,fu=Oe.disabled,Gu=Oe.invalid,h=Oe.inputReadOnly,m=Oe.direction,F=Oe.onOpenChange,H=Oe.onMouseDown,ve=Oe.required,ot=Oe["aria-required"],kt=Oe.autoFocus,J=Oe.removeIcon,f=(0,ti.Z)(Oe,Wa),O=m==="rtl",K=Ue.useContext(Ua),q=K.prefixCls,me=Ue.useRef(),je=Ue.useRef();Ue.useImperativeHandle(Ft,function(){return{nativeElement:me.current,focus:function(){var ct;(ct=je.current)===null||ct===void 0||ct.focus()},blur:function(){var ct;(ct=je.current)===null||ct===void 0||ct.blur()}}});var tt=ia(f),w=function(ct){gs([ct])},Gt=function(ct){var Ut=qo.filter(function(wt){return wt&&!rr(ha,Ba,wt,ct,Ko)});gs(Ut),Jr||Da()},b=Ui((0,Jt.Z)((0,Jt.Z)({},Oe),{},{onChange:w}),function(Pe){var ct=Pe.valueTexts;return{value:ct[0]||"",active:Li}}),x=(0,Vr.Z)(b,2),S=x[0],Z=x[1],he=!!(Gn&&qo.length&&!fu),Se=Mo?Ue.createElement(Ue.Fragment,null,Ue.createElement(Rc,{prefixCls:q,value:qo,onRemove:Gt,formatDate:Z,maxTagCount:Ps,disabled:fu,removeIcon:J}),Ue.createElement("input",{className:"".concat(q,"-multiple-input"),value:qo.map(Z).join(","),ref:je,readOnly:!0,autoFocus:kt}),Ue.createElement(ma,{type:"suffix",icon:mi}),he&&Ue.createElement(Yi,{icon:Gn,onClear:Sa})):Ue.createElement(Xs,(0,rt.Z)({ref:je},S(),{autoFocus:kt,suffixIcon:mi,clearIcon:he&&Ue.createElement(Yi,{icon:Gn,onClear:Sa}),showActiveCls:!1}));return Ue.createElement("div",(0,rt.Z)({},tt,{className:et()(q,(dr={},(0,Ln.Z)(dr,"".concat(q,"-multiple"),Mo),(0,Ln.Z)(dr,"".concat(q,"-focused"),Li),(0,Ln.Z)(dr,"".concat(q,"-disabled"),fu),(0,Ln.Z)(dr,"".concat(q,"-invalid"),Gu),(0,Ln.Z)(dr,"".concat(q,"-rtl"),O),dr),Ti),style:Bi,ref:me,onClick:na,onMouseDown:function(ct){var Ut,wt=ct.target;wt!==((Ut=je.current)===null||Ut===void 0?void 0:Ut.inputElement)&&ct.preventDefault(),H==null||H(ct)}}),Se)}var yf=Ue.forwardRef(mf),yl=yf;function Ec(Oe,Ft){var dr=Wn(Oe),Wr=(0,Vr.Z)(dr,6),Jr=Wr[0],Gn=Wr[1],mi=Wr[2],Vn=Wr[3],Gi=Wr[4],Li=Wr[5],Xn=Jr,Ca=Xn.prefixCls,$a=Xn.styles,Ba=Xn.classNames,ha=Xn.order,ba=Xn.defaultValue,Ti=Xn.value,Bi=Xn.needConfirm,na=Xn.onChange,Sa=Xn.onKeyDown,Ko=Xn.disabled,qo=Xn.disabledDate,gs=Xn.minDate,Da=Xn.maxDate,Hu=Xn.defaultOpen,Mo=Xn.open,Ps=Xn.onOpenChange,eu=Xn.locale,Bs=Xn.generateConfig,cu=Xn.picker,yu=Xn.showNow,fu=Xn.showToday,Gu=Xn.showTime,h=Xn.mode,m=Xn.onPanelChange,F=Xn.onCalendarChange,H=Xn.onOk,ve=Xn.multiple,ot=Xn.defaultPickerValue,kt=Xn.pickerValue,J=Xn.onPickerValueChange,f=Xn.inputReadOnly,O=Xn.suffixIcon,K=Xn.removeIcon,q=Xn.onFocus,me=Xn.onBlur,je=Xn.presets,tt=Xn.components,w=Xn.cellRender,Gt=Xn.dateRender,b=Xn.monthCellRender,x=Xn.onClick,S=ki(Ft);function Z(hf){return hf===null?null:ve?hf:hf[0]}var he=Js(Bs,eu,Gn),Se=Ii(Mo,Hu,[Ko],Ps),Pe=(0,Vr.Z)(Se,2),ct=Pe[0],Ut=Pe[1],wt=function(Jc,td,Ud){if(F){var P0=(0,Jt.Z)({},Ud);delete P0.range,F(Z(Jc),Z(td),P0)}},Kt=function(Jc){H==null||H(Z(Jc))},cr=Mn(Bs,eu,Vn,!1,ha,ba,Ti,wt,Kt),hr=(0,Vr.Z)(cr,5),Fr=hr[0],Br=hr[1],rn=hr[2],Xr=hr[3],dn=hr[4],Qt=rn(),li=vo([Ko]),oi=(0,Vr.Z)(li,4),pr=oi[0],di=oi[1],Ji=oi[2],ja=oi[3],no=function(Jc){di(!0),q==null||q(Jc,{})},Ss=function(Jc){di(!1),me==null||me(Jc,{})},tu=(0,gn.C8)(cu,{value:h}),sn=(0,Vr.Z)(tu,2),bu=sn[0],bc=sn[1],uu=bu==="date"&&Gu?"datetime":bu,Ju=Fu(cu,bu,yu,fu),Sc=na&&function(hf,Jc){na(Z(hf),Z(Jc))},Bl=wi((0,Jt.Z)((0,Jt.Z)({},Jr),{},{onChange:Sc}),Fr,Br,rn,Xr,[],Vn,pr,ct,Li),Ol=(0,Vr.Z)(Bl,2),oc=Ol[1],Ql=oa(Qt,Li),Cu=(0,Vr.Z)(Ql,2),Bc=Cu[0],ff=Cu[1],Eh=Ue.useMemo(function(){return Bc.some(function(hf){return hf})},[Bc]),Rf=function(Jc,td){if(J){var Ud=(0,Jt.Z)((0,Jt.Z)({},td),{},{mode:td.mode[0]});delete Ud.range,J(Jc[0],Ud)}},Xl=ro(Bs,eu,Qt,[bu],ct,ja,Gn,!1,ot,kt,yi(Gu==null?void 0:Gu.defaultOpenValue),Rf,gs,Da),jf=(0,Vr.Z)(Xl,2),Yf=jf[0],Ah=jf[1],vf=(0,gn.zX)(function(hf,Jc,td){if(bc(Jc),m&&td!==!1){var Ud=hf||Qt[Qt.length-1];m(Ud,Jc)}}),Ph=function(){oc(rn()),Ut(!1,{force:!0})},Ld=function(Jc){!Ko&&!S.current.nativeElement.contains(document.activeElement)&&S.current.focus(),Ut(!0),x==null||x(Jc)},Hh=function(){oc(null),Ut(!1,{force:!0})},Dh=Ue.useState(null),eh=(0,Vr.Z)(Dh,2),Hf=eh[0],qh=eh[1],Qh=Ue.useState(null),Uh=(0,Vr.Z)(Qh,2),Dd=Uh[0],Wl=Uh[1],yd=Ue.useMemo(function(){var hf=[Dd].concat((0,br.Z)(Qt)).filter(function(Jc){return Jc});return ve?hf:hf.slice(0,1)},[Qt,Dd,ve]),Jh=Ue.useMemo(function(){return!ve&&Dd?[Dd]:Qt.filter(function(hf){return hf})},[Qt,Dd,ve]);Ue.useEffect(function(){ct||Wl(null)},[ct]);var Qc=Fa(je),Ap=function(Jc){Wl(Jc),qh("preset")},vc=function(Jc){var td=ve?he(rn(),Jc):[Jc],Ud=oc(td);Ud&&!ve&&Ut(!1,{force:!0})},kf=function(Jc){vc(Jc)},Ih=function(Jc){Wl(Jc),qh("cell")},hd=function(Jc){Ut(!0),no(Jc)},Gh=function(Jc){Ji("panel");var td=ve?he(rn(),Jc):[Jc];Xr(td),!Bi&&!mi&&Gn===uu&&Ph()},Jp=function(){Ut(!1)},i0=Qa(w,Gt,b),Cp=Ue.useMemo(function(){var hf=(0,Hn.Z)(Jr,!1),Jc=(0,_i.Z)(Jr,[].concat((0,br.Z)(Object.keys(hf)),["onChange","onCalendarChange","style","className","onPanelChange"]));return(0,Jt.Z)((0,Jt.Z)({},Jc),{},{multiple:Jr.multiple})},[Jr]),Tp=Ue.createElement(qn,(0,rt.Z)({},Cp,{showNow:Ju,showTime:Gu,disabledDate:qo,onFocus:hd,onBlur:Ss,picker:cu,mode:bu,internalMode:uu,onPanelChange:vf,format:Gi,value:Qt,isInvalid:Li,onChange:null,onSelect:Gh,pickerValue:Yf,defaultOpenValue:Gu==null?void 0:Gu.defaultOpenValue,onPickerValueChange:Ah,hoverValue:yd,onHover:Ih,needConfirm:Bi,onSubmit:Ph,onOk:dn,presets:Qc,onPresetHover:Ap,onPresetSubmit:vc,onNow:kf,cellRender:i0})),sp=function(Jc){Xr(Jc)},y0=function(){Ji("input")},a0=function(Jc){Ji("input"),Ut(!0,{inherit:!0}),no(Jc)},Lp=function(Jc){Ut(!1),Ss(Jc)},Wd=function(Jc,td){Jc.key==="Tab"&&Ph(),Sa==null||Sa(Jc,td)},d0=Ue.useMemo(function(){return{prefixCls:Ca,locale:eu,generateConfig:Bs,button:tt.button,input:tt.input}},[Ca,eu,Bs,tt.button,tt.input]);return(0,yn.Z)(function(){ct&&ja!==void 0&&vf(null,cu,!1)},[ct,ja,cu]),(0,yn.Z)(function(){var hf=Ji();!ct&&hf==="input"&&(Ut(!1),Ph()),!ct&&mi&&!Bi&&hf==="panel"&&(Ut(!0),Ph())},[ct]),Ue.createElement(Ua.Provider,{value:d0},Ue.createElement(mo,(0,rt.Z)({},co(Jr),{popupElement:Tp,popupStyle:$a.popup,popupClassName:Ba.popup,visible:ct,onClose:Jp}),Ue.createElement(yl,(0,rt.Z)({},Jr,{ref:S,suffixIcon:O,removeIcon:K,activeHelp:!!Dd,allHelp:!!Dd&&Hf==="preset",focused:pr,onFocus:a0,onBlur:Lp,onKeyDown:Wd,onSubmit:Ph,value:Jh,maskFormat:Gi,onChange:sp,onInputChange:y0,internalPicker:Gn,format:Vn,inputReadOnly:f,disabled:Ko,open:ct,onOpenChange:Ut,onClick:Ld,onClear:Hh,invalid:Eh,onInvalid:function(Jc){ff(Jc,0)}}))))}var Zf=Ue.forwardRef(Ec),Vu=Zf,lc=Vu,fl=_(66187),lf=_(75490),gu=_(11908),Pu=_(50138),Co=_(76135),zu=_(15550),Zu=_(53615),St=_(53792),qu=_(32095),hl=_(53580),rc=_(16331),bs=_(78600),Il=_(75199),ks=_(5283),au=_(93319),Al=_(12228);function cc(Oe){return(0,Al.TS)(Oe,{inputAffixPadding:Oe.paddingXXS})}const Gl=Oe=>{const{controlHeight:Ft,fontSize:dr,lineHeight:Wr,lineWidth:Jr,controlHeightSM:Gn,controlHeightLG:mi,fontSizeLG:Vn,lineHeightLG:Gi,paddingSM:Li,controlPaddingHorizontalSM:Xn,controlPaddingHorizontal:Ca,colorFillAlter:$a,colorPrimaryHover:Ba,colorPrimary:ha,controlOutlineWidth:ba,controlOutline:Ti,colorErrorOutline:Bi,colorWarningOutline:na,colorBgContainer:Sa}=Oe;return{paddingBlock:Math.max(Math.round((Ft-dr*Wr)/2*10)/10-Jr,0),paddingBlockSM:Math.max(Math.round((Gn-dr*Wr)/2*10)/10-Jr,0),paddingBlockLG:Math.ceil((mi-Vn*Gi)/2*10)/10-Jr,paddingInline:Li-Jr,paddingInlineSM:Xn-Jr,paddingInlineLG:Ca-Jr,addonBg:$a,activeBorderColor:ha,hoverBorderColor:Ba,activeShadow:`0 0 0 ${ba}px ${Ti}`,errorActiveShadow:`0 0 0 ${ba}px ${Bi}`,warningActiveShadow:`0 0 0 ${ba}px ${na}`,hoverBg:Sa,activeBg:Sa,inputFontSize:dr,inputFontSizeLG:Vn,inputFontSizeSM:dr}},yh=Oe=>({borderColor:Oe.hoverBorderColor,backgroundColor:Oe.hoverBg}),ah=Oe=>({color:Oe.colorTextDisabled,backgroundColor:Oe.colorBgContainerDisabled,borderColor:Oe.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},yh((0,Al.TS)(Oe,{hoverBorderColor:Oe.colorBorder,hoverBg:Oe.colorBgContainerDisabled})))}),qf=(Oe,Ft)=>({background:Oe.colorBgContainer,borderWidth:Oe.lineWidth,borderStyle:Oe.lineType,borderColor:Ft.borderColor,"&:hover":{borderColor:Ft.hoverBorderColor,backgroundColor:Oe.hoverBg},"&:focus, &:focus-within":{borderColor:Ft.activeBorderColor,boxShadow:Ft.activeShadow,outline:0,backgroundColor:Oe.activeBg}}),Ac=(Oe,Ft)=>({[`&${Oe.componentCls}-status-${Ft.status}:not(${Oe.componentCls}-disabled)`]:Object.assign(Object.assign({},qf(Oe,Ft)),{[`${Oe.componentCls}-prefix, ${Oe.componentCls}-suffix`]:{color:Ft.affixColor}})}),Xf=(Oe,Ft)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},qf(Oe,{borderColor:Oe.colorBorder,hoverBorderColor:Oe.hoverBorderColor,activeBorderColor:Oe.activeBorderColor,activeShadow:Oe.activeShadow})),{[`&${Oe.componentCls}-disabled, &[disabled]`]:Object.assign({},ah(Oe))}),Ac(Oe,{status:"error",borderColor:Oe.colorError,hoverBorderColor:Oe.colorErrorBorderHover,activeBorderColor:Oe.colorError,activeShadow:Oe.errorActiveShadow,affixColor:Oe.colorError})),Ac(Oe,{status:"warning",borderColor:Oe.colorWarning,hoverBorderColor:Oe.colorWarningBorderHover,activeBorderColor:Oe.colorWarning,activeShadow:Oe.warningActiveShadow,affixColor:Oe.colorWarning})),Ft)}),_f=(Oe,Ft)=>({[`&${Oe.componentCls}-group-wrapper-status-${Ft.status}`]:{[`${Oe.componentCls}-group-addon`]:{borderColor:Ft.addonBorderColor,color:Ft.addonColor}}}),zc=Oe=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${Oe.componentCls}-group`]:{"&-addon":{background:Oe.addonBg,border:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},_f(Oe,{status:"error",addonBorderColor:Oe.colorError,addonColor:Oe.colorErrorText})),_f(Oe,{status:"warning",addonBorderColor:Oe.colorWarning,addonColor:Oe.colorWarningText})),{[`&${Oe.componentCls}-group-wrapper-disabled`]:{[`${Oe.componentCls}-group-addon`]:Object.assign({},ah(Oe))}})}),bh=(Oe,Ft)=>({"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${Oe.componentCls}-disabled, &[disabled]`]:{color:Oe.colorTextDisabled}},Ft)}),Nn=(Oe,Ft)=>({background:Ft.bg,borderWidth:Oe.lineWidth,borderStyle:Oe.lineType,borderColor:"transparent",["input&, & input, textarea&, & textarea"]:{color:Ft==null?void 0:Ft.inputColor},"&:hover":{background:Ft.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:Ft.activeBorderColor,backgroundColor:Oe.activeBg}}),Pn=(Oe,Ft)=>({[`&${Oe.componentCls}-status-${Ft.status}:not(${Oe.componentCls}-disabled)`]:Object.assign(Object.assign({},Nn(Oe,Ft)),{[`${Oe.componentCls}-prefix, ${Oe.componentCls}-suffix`]:{color:Ft.affixColor}})}),xi=(Oe,Ft)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Nn(Oe,{bg:Oe.colorFillTertiary,hoverBg:Oe.colorFillSecondary,activeBorderColor:Oe.colorPrimary})),{[`&${Oe.componentCls}-disabled, &[disabled]`]:Object.assign({},ah(Oe))}),Pn(Oe,{status:"error",bg:Oe.colorErrorBg,hoverBg:Oe.colorErrorBgHover,activeBorderColor:Oe.colorError,inputColor:Oe.colorErrorText,affixColor:Oe.colorError})),Pn(Oe,{status:"warning",bg:Oe.colorWarningBg,hoverBg:Oe.colorWarningBgHover,activeBorderColor:Oe.colorWarning,inputColor:Oe.colorWarningText,affixColor:Oe.colorWarning})),Ft)}),qi=(Oe,Ft)=>({[`&${Oe.componentCls}-group-wrapper-status-${Ft.status}`]:{[`${Oe.componentCls}-group-addon`]:{background:Ft.addonBg,color:Ft.addonColor}}}),Xa=Oe=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${Oe.componentCls}-group`]:{"&-addon":{background:Oe.colorFillTertiary},[`${Oe.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.colorSplit}`}}}},qi(Oe,{status:"error",addonBg:Oe.colorErrorBg,addonColor:Oe.colorErrorText})),qi(Oe,{status:"warning",addonBg:Oe.colorWarningBg,addonColor:Oe.colorWarningText})),{[`&${Oe.componentCls}-group-wrapper-disabled`]:{[`${Oe.componentCls}-group`]:{"&-addon":{background:Oe.colorFillTertiary,color:Oe.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.colorBorder}`,borderTop:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.colorBorder}`,borderBottom:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.colorBorder}`,borderTop:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.colorBorder}`,borderBottom:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.colorBorder}`}}}})}),To=Oe=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:Oe,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Gs=Oe=>({borderColor:Oe.activeBorderColor,boxShadow:Oe.activeShadow,outline:0,backgroundColor:Oe.activeBg}),xs=Oe=>{const{paddingBlockLG:Ft,lineHeightLG:dr,borderRadiusLG:Wr,paddingInlineLG:Jr}=Oe;return{padding:`${(0,bs.bf)(Ft)} ${(0,bs.bf)(Jr)}`,fontSize:Oe.inputFontSizeLG,lineHeight:dr,borderRadius:Wr}},Jo=Oe=>({padding:`${(0,bs.bf)(Oe.paddingBlockSM)} ${(0,bs.bf)(Oe.paddingInlineSM)}`,fontSize:Oe.inputFontSizeSM,borderRadius:Oe.borderRadiusSM}),ou=Oe=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,bs.bf)(Oe.paddingBlock)} ${(0,bs.bf)(Oe.paddingInline)}`,color:Oe.colorText,fontSize:Oe.inputFontSize,lineHeight:Oe.lineHeight,borderRadius:Oe.borderRadius,transition:`all ${Oe.motionDurationMid}`},To(Oe.colorTextPlaceholder)),{"textarea&":{maxWidth:"100%",height:"auto",minHeight:Oe.controlHeight,lineHeight:Oe.lineHeight,verticalAlign:"bottom",transition:`all ${Oe.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},xs(Oe)),"&-sm":Object.assign({},Jo(Oe)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),Iu=Oe=>{const{componentCls:Ft,antCls:dr}=Oe;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,["&[class*='col-']"]:{paddingInlineEnd:Oe.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${Ft}, &-lg > ${Ft}-group-addon`]:Object.assign({},xs(Oe)),[`&-sm ${Ft}, &-sm > ${Ft}-group-addon`]:Object.assign({},Jo(Oe)),[`&-lg ${dr}-select-single ${dr}-select-selector`]:{height:Oe.controlHeightLG},[`&-sm ${dr}-select-single ${dr}-select-selector`]:{height:Oe.controlHeightSM},[`> ${Ft}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${Ft}-group`]:{["&-addon, &-wrap"]:{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${(0,bs.bf)(Oe.paddingInline)}`,color:Oe.colorText,fontWeight:"normal",fontSize:Oe.inputFontSize,textAlign:"center",borderRadius:Oe.borderRadius,transition:`all ${Oe.motionDurationSlow}`,lineHeight:1,[`${dr}-select`]:{margin:`${(0,bs.bf)(Oe.calc(Oe.paddingBlock).add(1).mul(-1).equal())} ${(0,bs.bf)(Oe.calc(Oe.paddingInline).mul(-1).equal())}`,[`&${dr}-select-single:not(${dr}-select-customize-input):not(${dr}-pagination-size-changer)`]:{[`${dr}-select-selector`]:{backgroundColor:"inherit",border:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${dr}-select-selector`]:{color:Oe.colorPrimary}}},[`${dr}-cascader-picker`]:{margin:`-9px ${(0,bs.bf)(Oe.calc(Oe.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${dr}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[`${Ft}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${Ft}-search-with-button &`]:{zIndex:0}}},[`> ${Ft}:first-child, ${Ft}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${dr}-select ${dr}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Ft}-affix-wrapper`]:{[`&:not(:first-child) ${Ft}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${Ft}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Ft}:last-child, ${Ft}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${dr}-select ${dr}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${Ft}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${Ft}-search &`]:{borderStartStartRadius:Oe.borderRadius,borderEndStartRadius:Oe.borderRadius}},[`&:not(:first-child), ${Ft}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${Ft}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,Il.dF)()),{[`${Ft}-group-addon, ${Ft}-group-wrap, > ${Ft}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:Oe.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[` - & > ${Ft}-affix-wrapper, - & > ${Ft}-number-affix-wrapper, - & > ${dr}-picker-range - `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:Oe.calc(Oe.lineWidth).mul(-1).equal(),borderInlineEndWidth:Oe.lineWidth},[`${Ft}`]:{float:"none"},[`& > ${dr}-select > ${dr}-select-selector, - & > ${dr}-select-auto-complete ${Ft}, - & > ${dr}-cascader-picker ${Ft}, - & > ${Ft}-group-wrapper ${Ft}`]:{borderInlineEndWidth:Oe.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${dr}-select-focused`]:{zIndex:1},[`& > ${dr}-select > ${dr}-select-arrow`]:{zIndex:1},[`& > *:first-child, - & > ${dr}-select:first-child > ${dr}-select-selector, - & > ${dr}-select-auto-complete:first-child ${Ft}, - & > ${dr}-cascader-picker:first-child ${Ft}`]:{borderStartStartRadius:Oe.borderRadius,borderEndStartRadius:Oe.borderRadius},[`& > *:last-child, - & > ${dr}-select:last-child > ${dr}-select-selector, - & > ${dr}-cascader-picker:last-child ${Ft}, - & > ${dr}-cascader-picker-focused:last-child ${Ft}`]:{borderInlineEndWidth:Oe.lineWidth,borderStartEndRadius:Oe.borderRadius,borderEndEndRadius:Oe.borderRadius},[`& > ${dr}-select-auto-complete ${Ft}`]:{verticalAlign:"top"},[`${Ft}-group-wrapper + ${Ft}-group-wrapper`]:{marginInlineStart:Oe.calc(Oe.lineWidth).mul(-1).equal(),[`${Ft}-affix-wrapper`]:{borderRadius:0}},[`${Ft}-group-wrapper:not(:last-child)`]:{[`&${Ft}-search > ${Ft}-group`]:{[`& > ${Ft}-group-addon > ${Ft}-search-button`]:{borderRadius:0},[`& > ${Ft}`]:{borderStartStartRadius:Oe.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Oe.borderRadius}}}})}},ll=Oe=>{const{componentCls:Ft,controlHeightSM:dr,lineWidth:Wr,calc:Jr}=Oe,Gn=16,mi=Jr(dr).sub(Jr(Wr).mul(2)).sub(Gn).div(2).equal();return{[Ft]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Il.Wf)(Oe)),ou(Oe)),Xf(Oe)),xi(Oe)),bh(Oe)),{'&[type="color"]':{height:Oe.controlHeight,[`&${Ft}-lg`]:{height:Oe.controlHeightLG},[`&${Ft}-sm`]:{height:dr,paddingTop:mi,paddingBottom:mi}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},Uu=Oe=>{const{componentCls:Ft}=Oe;return{[`${Ft}-clear-icon`]:{margin:0,color:Oe.colorTextQuaternary,fontSize:Oe.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${Oe.motionDurationSlow}`,"&:hover":{color:Oe.colorTextTertiary},"&:active":{color:Oe.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,bs.bf)(Oe.inputAffixPadding)}`}}}},Oc=Oe=>{const{componentCls:Ft,inputAffixPadding:dr,colorTextDescription:Wr,motionDurationSlow:Jr,colorIcon:Gn,colorIconHover:mi,iconCls:Vn}=Oe;return{[`${Ft}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign({},ou(Oe)),{display:"inline-flex",[`&:not(${Ft}-disabled):hover`]:{zIndex:1,[`${Ft}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${Ft}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Ft}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:Oe.paddingXS}},"&-show-count-suffix":{color:Wr},"&-show-count-has-suffix":{marginInlineEnd:Oe.paddingXXS},"&-prefix":{marginInlineEnd:dr},"&-suffix":{marginInlineStart:dr}}}),Uu(Oe)),{[`${Vn}${Ft}-password-icon`]:{color:Gn,cursor:"pointer",transition:`all ${Jr}`,"&:hover":{color:mi}}})}},fc=Oe=>{const{componentCls:Ft,borderRadiusLG:dr,borderRadiusSM:Wr}=Oe;return{[`${Ft}-group`]:Object.assign(Object.assign(Object.assign({},(0,Il.Wf)(Oe)),Iu(Oe)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${Ft}-group-addon`]:{borderRadius:dr,fontSize:Oe.inputFontSizeLG}},"&-sm":{[`${Ft}-group-addon`]:{borderRadius:Wr}}},zc(Oe)),Xa(Oe)),{[`&:not(${Ft}-compact-first-item):not(${Ft}-compact-last-item)${Ft}-compact-item`]:{[`${Ft}, ${Ft}-group-addon`]:{borderRadius:0}},[`&:not(${Ft}-compact-last-item)${Ft}-compact-first-item`]:{[`${Ft}, ${Ft}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${Ft}-compact-first-item)${Ft}-compact-last-item`]:{[`${Ft}, ${Ft}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${Ft}-compact-last-item)${Ft}-compact-item`]:{[`${Ft}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}}})})}},Lu=Oe=>{const{componentCls:Ft,antCls:dr}=Oe,Wr=`${Ft}-search`;return{[Wr]:{[`${Ft}`]:{"&:hover, &:focus":{borderColor:Oe.colorPrimaryHover,[`+ ${Ft}-group-addon ${Wr}-button:not(${dr}-btn-primary)`]:{borderInlineStartColor:Oe.colorPrimaryHover}}},[`${Ft}-affix-wrapper`]:{borderRadius:0},[`${Ft}-lg`]:{lineHeight:Oe.calc(Oe.lineHeightLG).sub(2e-4).equal({unit:!1})},[`> ${Ft}-group`]:{[`> ${Ft}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Wr}-button`]:{marginInlineEnd:-1,paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:Oe.borderRadius,borderEndEndRadius:Oe.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Wr}-button:not(${dr}-btn-primary)`]:{color:Oe.colorTextDescription,"&:hover":{color:Oe.colorPrimaryHover},"&:active":{color:Oe.colorPrimaryActive},[`&${dr}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Wr}-button`]:{height:Oe.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Wr}-button`]:{height:Oe.controlHeightLG},[`&-small ${Wr}-button`]:{height:Oe.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${Ft}-compact-item`]:{[`&:not(${Ft}-compact-last-item)`]:{[`${Ft}-group-addon`]:{[`${Ft}-search-button`]:{marginInlineEnd:Oe.calc(Oe.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${Ft}-compact-first-item)`]:{[`${Ft},${Ft}-affix-wrapper`]:{borderRadius:0}},[`> ${Ft}-group-addon ${Ft}-search-button, - > ${Ft}, - ${Ft}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${Ft}-affix-wrapper-focused`]:{zIndex:2}}}}},su=Oe=>{const{componentCls:Ft,paddingLG:dr}=Oe,Wr=`${Ft}-textarea`;return{[Wr]:{position:"relative","&-show-count":{[`> ${Ft}`]:{height:"100%"},[`${Ft}-data-count`]:{position:"absolute",bottom:Oe.calc(Oe.fontSize).mul(Oe.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:Oe.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${Ft}`]:{paddingInlineEnd:dr}},[`&-affix-wrapper${Wr}-has-feedback`]:{[`${Ft}`]:{paddingInlineEnd:dr}},[`&-affix-wrapper${Ft}-affix-wrapper`]:{padding:0,[`> textarea${Ft}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent","&:focus":{boxShadow:"none !important"}},[`${Ft}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${Ft}-clear-icon`]:{position:"absolute",insetInlineEnd:Oe.paddingXS,insetBlockStart:Oe.paddingXS},[`${Wr}-suffix`]:{position:"absolute",top:0,insetInlineEnd:Oe.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}},Ys=Oe=>{const{componentCls:Ft}=Oe;return{[`${Ft}-out-of-range`]:{[`&, & input, & textarea, ${Ft}-show-count-suffix, ${Ft}-data-count`]:{color:Oe.colorError}}}};var _s=(0,au.I$)("Input",Oe=>{const Ft=(0,Al.TS)(Oe,cc(Oe));return[ll(Ft),su(Ft),Oc(Ft),fc(Ft),Lu(Ft),Ys(Ft),(0,ks.c)(Ft)]},Gl),Fs=_(29412),Qu=_(70914),Sl=_(95156),nc=_(40183);const dl=(Oe,Ft)=>{const{componentCls:dr,selectHeight:Wr,fontHeight:Jr,lineWidth:Gn,calc:mi}=Oe,Vn=Ft?`${dr}-${Ft}`:"",Gi=Oe.calc(Jr).add(2).equal(),Li=()=>mi(Wr).sub(Gi).sub(mi(Gn).mul(2)),Xn=Oe.max(Li().div(2).equal(),0),Ca=Oe.max(Li().sub(Xn).equal(),0);return[(0,nc.j)(Oe,Ft),{[`${dr}-multiple${Vn}`]:{paddingTop:Xn,paddingBottom:Ca,paddingInlineStart:Xn}}]};var Vc=Oe=>{const{componentCls:Ft,calc:dr,lineWidth:Wr}=Oe,Jr=(0,Al.TS)(Oe,{fontHeight:Oe.fontSize,selectHeight:Oe.controlHeightSM,multipleSelectItemHeight:Oe.controlHeightXS,borderRadius:Oe.borderRadiusSM,borderRadiusSM:Oe.borderRadiusXS}),Gn=(0,Al.TS)(Oe,{fontHeight:dr(Oe.multipleItemHeightLG).sub(dr(Wr).mul(2).equal()).equal(),fontSize:Oe.fontSizeLG,selectHeight:Oe.controlHeightLG,multipleSelectItemHeight:Oe.multipleItemHeightLG,borderRadius:Oe.borderRadiusLG,borderRadiusSM:Oe.borderRadius});return[dl(Jr,"small"),dl(Oe),dl(Gn,"large"),(0,nc.j)(Oe),{[`${Ft}${Ft}-multiple`]:{width:"100%",[`${Ft}-selector`]:{flex:"auto",padding:0,"&:after":{margin:0}},[`${Ft}-selection-item`]:{marginBlock:0},[`${Ft}-multiple-input`]:{width:0,height:0,border:0,visibility:"hidden",position:"absolute",zIndex:-1}}}]},kl=_(64993);const Qf=Oe=>{const{pickerCellCls:Ft,pickerCellInnerCls:dr,cellHeight:Wr,borderRadiusSM:Jr,motionDurationMid:Gn,cellHoverBg:mi,lineWidth:Vn,lineType:Gi,colorPrimary:Li,cellActiveWithRangeBg:Xn,colorTextLightSolid:Ca,colorTextDisabled:$a,cellBgDisabled:Ba,colorFillSecondary:ha}=Oe;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:Wr,transform:"translateY(-50%)",content:'""'},[dr]:{position:"relative",zIndex:2,display:"inline-block",minWidth:Wr,height:Wr,lineHeight:(0,bs.bf)(Wr),borderRadius:Jr,transition:`background ${Gn}`},[`&:hover:not(${Ft}-in-view), - &:hover:not(${Ft}-selected):not(${Ft}-range-start):not(${Ft}-range-end)`]:{[dr]:{background:mi}},[`&-in-view${Ft}-today ${dr}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${(0,bs.bf)(Vn)} ${Gi} ${Li}`,borderRadius:Jr,content:'""'}},[`&-in-view${Ft}-in-range, - &-in-view${Ft}-range-start, - &-in-view${Ft}-range-end`]:{position:"relative",[`&:not(${Ft}-disabled):before`]:{background:Xn}},[`&-in-view${Ft}-selected, - &-in-view${Ft}-range-start, - &-in-view${Ft}-range-end`]:{[`&:not(${Ft}-disabled) ${dr}`]:{color:Ca,background:Li},[`&${Ft}-disabled ${dr}`]:{background:ha}},[`&-in-view${Ft}-range-start:not(${Ft}-disabled):before`]:{insetInlineStart:"50%"},[`&-in-view${Ft}-range-end:not(${Ft}-disabled):before`]:{insetInlineEnd:"50%"},[`&-in-view${Ft}-range-start:not(${Ft}-range-end) ${dr}`]:{borderStartStartRadius:Jr,borderEndStartRadius:Jr,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${Ft}-range-end:not(${Ft}-range-start) ${dr}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:Jr,borderEndEndRadius:Jr},"&-disabled":{color:$a,pointerEvents:"none",[dr]:{background:"transparent"},"&::before":{background:Ba}},[`&-disabled${Ft}-today ${dr}::before`]:{borderColor:$a}}},ds=Oe=>{const{componentCls:Ft,pickerCellCls:dr,pickerCellInnerCls:Wr,pickerYearMonthCellWidth:Jr,pickerControlIconSize:Gn,cellWidth:mi,paddingSM:Vn,paddingXS:Gi,paddingXXS:Li,colorBgContainer:Xn,lineWidth:Ca,lineType:$a,borderRadiusLG:Ba,colorPrimary:ha,colorTextHeading:ba,colorSplit:Ti,pickerControlIconBorderWidth:Bi,colorIcon:na,textHeight:Sa,motionDurationMid:Ko,colorIconHover:qo,fontWeightStrong:gs,cellHeight:Da,pickerCellPaddingVertical:Hu,colorTextDisabled:Mo,colorText:Ps,fontSize:eu,motionDurationSlow:Bs,withoutTimeCellHeight:cu,pickerQuarterPanelContentHeight:yu,borderRadiusSM:fu,colorTextLightSolid:Gu,cellHoverBg:h,timeColumnHeight:m,timeColumnWidth:F,timeCellHeight:H,controlItemBgActive:ve,marginXXS:ot,pickerDatePanelPaddingHorizontal:kt,pickerControlIconMargin:J}=Oe,f=Oe.calc(mi).mul(7).add(Oe.calc(kt).mul(2)).equal();return{[Ft]:{"&-panel":{display:"inline-flex",flexDirection:"column",textAlign:"center",background:Xn,borderRadius:Ba,outline:"none","&-focused":{borderColor:ha},"&-rtl":{direction:"rtl",[`${Ft}-prev-icon, - ${Ft}-super-prev-icon`]:{transform:"rotate(45deg)"},[`${Ft}-next-icon, - ${Ft}-super-next-icon`]:{transform:"rotate(-135deg)"}}},[`&-decade-panel, - &-year-panel, - &-quarter-panel, - &-month-panel, - &-week-panel, - &-date-panel, - &-time-panel`]:{display:"flex",flexDirection:"column",width:f},"&-header":{display:"flex",padding:`0 ${(0,bs.bf)(Gi)}`,color:ba,borderBottom:`${(0,bs.bf)(Ca)} ${$a} ${Ti}`,"> *":{flex:"none"},button:{padding:0,color:na,lineHeight:(0,bs.bf)(Sa),background:"transparent",border:0,cursor:"pointer",transition:`color ${Ko}`,fontSize:"inherit"},"> button":{minWidth:"1.6em",fontSize:eu,"&:hover":{color:qo},"&:disabled":{opacity:.25,pointerEvents:"none"}},"&-view":{flex:"auto",fontWeight:gs,lineHeight:(0,bs.bf)(Sa),button:{color:"inherit",fontWeight:"inherit",verticalAlign:"top","&:not(:first-child)":{marginInlineStart:Gi},"&:hover":{color:ha}}}},[`&-prev-icon, - &-next-icon, - &-super-prev-icon, - &-super-next-icon`]:{position:"relative",display:"inline-block",width:Gn,height:Gn,"&::before":{position:"absolute",top:0,insetInlineStart:0,display:"inline-block",width:Gn,height:Gn,border:"0 solid currentcolor",borderBlockStartWidth:Bi,borderBlockEndWidth:0,borderInlineStartWidth:Bi,borderInlineEndWidth:0,content:'""'}},[`&-super-prev-icon, - &-super-next-icon`]:{"&::after":{position:"absolute",top:J,insetInlineStart:J,display:"inline-block",width:Gn,height:Gn,border:"0 solid currentcolor",borderBlockStartWidth:Bi,borderBlockEndWidth:0,borderInlineStartWidth:Bi,borderInlineEndWidth:0,content:'""'}},[`&-prev-icon, - &-super-prev-icon`]:{transform:"rotate(-45deg)"},[`&-next-icon, - &-super-next-icon`]:{transform:"rotate(135deg)"},"&-content":{width:"100%",tableLayout:"fixed",borderCollapse:"collapse","th, td":{position:"relative",minWidth:Da,fontWeight:"normal"},th:{height:Oe.calc(Da).add(Oe.calc(Hu).mul(2)).equal(),color:Ps,verticalAlign:"middle"}},"&-cell":Object.assign({padding:`${(0,bs.bf)(Hu)} 0`,color:Mo,cursor:"pointer","&-in-view":{color:Ps}},Qf(Oe)),[`&-decade-panel, - &-year-panel, - &-quarter-panel, - &-month-panel`]:{[`${Ft}-content`]:{height:Oe.calc(cu).mul(4).equal()},[Wr]:{padding:`0 ${(0,bs.bf)(Gi)}`}},"&-quarter-panel":{[`${Ft}-content`]:{height:yu}},"&-decade-panel":{[Wr]:{padding:`0 ${(0,bs.bf)(Oe.calc(Gi).div(2).equal())}`},[`${Ft}-cell::before`]:{display:"none"}},[`&-year-panel, - &-quarter-panel, - &-month-panel`]:{[`${Ft}-body`]:{padding:`0 ${(0,bs.bf)(Gi)}`},[Wr]:{width:Jr}},"&-date-panel":{[`${Ft}-body`]:{padding:`${(0,bs.bf)(Gi)} ${(0,bs.bf)(kt)}`},[`${Ft}-content th`]:{boxSizing:"border-box",padding:0}},"&-week-panel":{[`${Ft}-cell`]:{[`&:hover ${Wr}, - &-selected ${Wr}, - ${Wr}`]:{background:"transparent !important"}},"&-row":{td:{"&:before":{transition:`background ${Ko}`},"&:first-child:before":{borderStartStartRadius:fu,borderEndStartRadius:fu},"&:last-child:before":{borderStartEndRadius:fu,borderEndEndRadius:fu}},["&:hover td"]:{"&:before":{background:h}},[`&-range-start td, - &-range-end td, - &-selected td`]:{[`&${dr}`]:{"&:before":{background:ha},[`&${Ft}-cell-week`]:{color:new kl.C(Gu).setAlpha(.5).toHexString()},[Wr]:{color:Gu}}},["&-range-hover td:before"]:{background:ve}}},["&-week-panel, &-date-panel-show-week"]:{[`${Ft}-body`]:{padding:`${(0,bs.bf)(Gi)} ${(0,bs.bf)(Vn)}`},[`${Ft}-content th`]:{width:"auto"}},"&-datetime-panel":{display:"flex",[`${Ft}-time-panel`]:{borderInlineStart:`${(0,bs.bf)(Ca)} ${$a} ${Ti}`},[`${Ft}-date-panel, - ${Ft}-time-panel`]:{transition:`opacity ${Bs}`},"&-active":{[`${Ft}-date-panel, - ${Ft}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",direction:"ltr",[`${Ft}-content`]:{display:"flex",flex:"auto",height:m},"&-column":{flex:"1 0 auto",width:F,margin:`${(0,bs.bf)(Li)} 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${Ko}`,overflowX:"hidden","&::-webkit-scrollbar":{width:8,backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:Oe.colorTextTertiary,borderRadius:4},"&":{scrollbarWidth:"thin",scrollbarColor:`${Oe.colorTextTertiary} transparent`},"&::after":{display:"block",height:Oe.calc(m).sub(H).equal(),content:'""'},"&:not(:first-child)":{borderInlineStart:`${(0,bs.bf)(Ca)} ${$a} ${Ti}`},"&-active":{background:new kl.C(ve).setAlpha(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${Ft}-time-panel-cell`]:{marginInline:ot,[`${Ft}-time-panel-cell-inner`]:{display:"block",width:Oe.calc(F).sub(Oe.calc(ot).mul(2)).equal(),height:H,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:Oe.calc(F).sub(H).div(2).equal(),color:Ps,lineHeight:(0,bs.bf)(H),borderRadius:fu,cursor:"pointer",transition:`background ${Ko}`,"&:hover":{background:h}},"&-selected":{[`${Ft}-time-panel-cell-inner`]:{background:ve}},"&-disabled":{[`${Ft}-time-panel-cell-inner`]:{color:Mo,background:"transparent",cursor:"not-allowed"}}}}}},[`&-datetime-panel ${Ft}-time-panel-column:after`]:{height:Oe.calc(m).sub(H).add(Oe.calc(Li).mul(2)).equal()}}}};var Rl=Oe=>{const{componentCls:Ft,textHeight:dr,lineWidth:Wr,paddingSM:Jr,antCls:Gn,colorPrimary:mi,cellActiveWithRangeBg:Vn,colorPrimaryBorder:Gi,lineType:Li,colorSplit:Xn}=Oe;return{[`${Ft}-dropdown`]:{[`${Ft}-footer`]:{borderTop:`${(0,bs.bf)(Wr)} ${Li} ${Xn}`,"&-extra":{padding:`0 ${(0,bs.bf)(Jr)}`,lineHeight:(0,bs.bf)(Oe.calc(dr).sub(Oe.calc(Wr).mul(2)).equal()),textAlign:"start","&:not(:last-child)":{borderBottom:`${(0,bs.bf)(Wr)} ${Li} ${Xn}`}}},[`${Ft}-panels + ${Ft}-footer ${Ft}-ranges`]:{justifyContent:"space-between"},[`${Ft}-ranges`]:{marginBlock:0,paddingInline:(0,bs.bf)(Jr),overflow:"hidden",textAlign:"start",listStyle:"none",display:"flex",justifyContent:"center",alignItems:"center","> li":{lineHeight:(0,bs.bf)(Oe.calc(dr).sub(Oe.calc(Wr).mul(2)).equal()),display:"inline-block"},[`${Ft}-now-btn-disabled`]:{pointerEvents:"none",color:Oe.colorTextDisabled},[`${Ft}-preset > ${Gn}-tag-blue`]:{color:mi,background:Vn,borderColor:Gi,cursor:"pointer"},[`${Ft}-ok`]:{paddingBlock:Oe.calc(Wr).mul(2).equal(),marginInlineStart:"auto"}}}}};const Fc=Oe=>{const{componentCls:Ft,controlHeightLG:dr,paddingXXS:Wr,padding:Jr}=Oe;return{pickerCellCls:`${Ft}-cell`,pickerCellInnerCls:`${Ft}-cell-inner`,pickerYearMonthCellWidth:Oe.calc(dr).mul(1.5).equal(),pickerQuarterPanelContentHeight:Oe.calc(dr).mul(1.4).equal(),pickerCellPaddingVertical:Oe.calc(Wr).add(Oe.calc(Wr).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:Oe.calc(Jr).add(Oe.calc(Wr).div(2)).equal()}},Yc=Oe=>{const{colorBgContainerDisabled:Ft,controlHeightSM:dr,controlHeightLG:Wr}=Oe;return{cellHoverBg:Oe.controlItemBgHover,cellActiveWithRangeBg:Oe.controlItemBgActive,cellHoverWithRangeBg:new kl.C(Oe.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new kl.C(Oe.colorPrimary).lighten(20).toHexString(),cellBgDisabled:Ft,timeColumnWidth:Wr*1.4,timeColumnHeight:28*8,timeCellHeight:28,cellWidth:dr*1.5,cellHeight:dr,textHeight:Wr,withoutTimeCellHeight:Wr*1.65,multipleItemBg:Oe.colorFillSecondary,multipleItemBorderColor:"transparent",multipleItemHeight:dr,multipleItemHeightLG:Oe.controlHeight,multipleSelectorBgDisabled:Ft,multipleItemColorDisabled:Oe.colorTextDisabled,multipleItemBorderColorDisabled:"transparent"}},xh=Oe=>Object.assign(Object.assign(Object.assign(Object.assign({},Gl(Oe)),Yc(Oe)),(0,Sl.w)(Oe)),{presetsWidth:120,presetsMaxWidth:200,zIndexPopup:Oe.zIndexPopupBase+50});var If=Oe=>{const{componentCls:Ft}=Oe;return{[Ft]:[Object.assign(Object.assign(Object.assign({},Xf(Oe)),xi(Oe)),bh(Oe)),{"&-outlined":{[`&${Ft}-multiple ${Ft}-selection-item`]:{background:Oe.multipleItemBg,border:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.multipleItemBorderColor}`}},"&-filled":{[`&${Ft}-multiple ${Ft}-selection-item`]:{background:Oe.colorBgContainer,border:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.colorSplit}`}},"&-borderless":{[`&${Ft}-multiple ${Ft}-selection-item`]:{background:Oe.multipleItemBg,border:`${(0,bs.bf)(Oe.lineWidth)} ${Oe.lineType} ${Oe.multipleItemBorderColor}`}}}]}};const wd=(Oe,Ft,dr,Wr)=>{const Jr=Oe.calc(dr).add(2).equal(),Gn=Oe.max(Oe.calc(Ft).sub(Jr).div(2).equal(),0),mi=Oe.max(Oe.calc(Ft).sub(Jr).sub(Gn).equal(),0);return{padding:`${(0,bs.bf)(Gn)} ${(0,bs.bf)(Wr)} ${(0,bs.bf)(mi)}`}},_h=Oe=>{const{componentCls:Ft,colorError:dr,colorWarning:Wr}=Oe;return{[`${Ft}:not(${Ft}-disabled):not([disabled])`]:{[`&${Ft}-status-error`]:{[`${Ft}-active-bar`]:{background:dr}},[`&${Ft}-status-warning`]:{[`${Ft}-active-bar`]:{background:Wr}}}}},Df=Oe=>{const{componentCls:Ft,antCls:dr,controlHeight:Wr,paddingInline:Jr,lineWidth:Gn,lineType:mi,colorBorder:Vn,borderRadius:Gi,motionDurationMid:Li,colorTextDisabled:Xn,colorTextPlaceholder:Ca,controlHeightLG:$a,fontSizeLG:Ba,controlHeightSM:ha,paddingInlineSM:ba,paddingXS:Ti,marginXS:Bi,colorTextDescription:na,lineWidthBold:Sa,colorPrimary:Ko,motionDurationSlow:qo,zIndexPopup:gs,paddingXXS:Da,sizePopupArrow:Hu,colorBgElevated:Mo,borderRadiusLG:Ps,boxShadowSecondary:eu,borderRadiusSM:Bs,colorSplit:cu,cellHoverBg:yu,presetsWidth:fu,presetsMaxWidth:Gu,boxShadowPopoverArrow:h,fontHeight:m,fontHeightLG:F,lineHeightLG:H}=Oe;return[{[Ft]:Object.assign(Object.assign(Object.assign({},(0,Il.Wf)(Oe)),wd(Oe,Wr,m,Jr)),{position:"relative",display:"inline-flex",alignItems:"center",lineHeight:1,borderRadius:Gi,transition:`border ${Li}, box-shadow ${Li}, background ${Li}`,[`${Ft}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",color:"inherit",fontSize:Oe.fontSize,lineHeight:Oe.lineHeight,transition:`all ${Li}`},To(Ca)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,fontFamily:"inherit","&:focus":{boxShadow:"none",outline:0},"&[disabled]":{background:"transparent",color:Xn,cursor:"not-allowed"}}),"&-placeholder":{"> input":{color:Ca}}},"&-large":Object.assign(Object.assign({},wd(Oe,$a,F,Jr)),{[`${Ft}-input > input`]:{fontSize:Ba,lineHeight:H}}),"&-small":Object.assign({},wd(Oe,ha,m,ba)),[`${Ft}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:Oe.calc(Ti).div(2).equal(),color:Xn,lineHeight:1,pointerEvents:"none",transition:`opacity ${Li}, color ${Li}`,"> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:Bi}}},[`${Ft}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:Xn,lineHeight:1,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${Li}, color ${Li}`,"> *":{verticalAlign:"top"},"&:hover":{color:na}},"&:hover":{[`${Ft}-clear`]:{opacity:1},[`${Ft}-suffix:not(:last-child)`]:{opacity:0}},[`${Ft}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:Ba,color:Xn,fontSize:Ba,verticalAlign:"top",cursor:"default",[`${Ft}-focused &`]:{color:na},[`${Ft}-range-separator &`]:{[`${Ft}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${Ft}-active-bar`]:{bottom:Oe.calc(Gn).mul(-1).equal(),height:Sa,background:Ko,opacity:0,transition:`all ${qo} ease-out`,pointerEvents:"none"},[`&${Ft}-focused`]:{[`${Ft}-active-bar`]:{opacity:1}},[`${Ft}-range-separator`]:{alignItems:"center",padding:`0 ${(0,bs.bf)(Ti)}`,lineHeight:1}},"&-range, &-multiple":{[`${Ft}-clear`]:{insetInlineEnd:Jr},[`&${Ft}-small`]:{[`${Ft}-clear`]:{insetInlineEnd:ba}}},"&-dropdown":Object.assign(Object.assign(Object.assign({},(0,Il.Wf)(Oe)),ds(Oe)),{pointerEvents:"none",position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:gs,[`&${Ft}-dropdown-hidden`]:{display:"none"},[`&${Ft}-dropdown-placement-bottomLeft`]:{[`${Ft}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${Ft}-dropdown-placement-topLeft`]:{[`${Ft}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${dr}-slide-up-enter${dr}-slide-up-enter-active${Ft}-dropdown-placement-topLeft, - &${dr}-slide-up-enter${dr}-slide-up-enter-active${Ft}-dropdown-placement-topRight, - &${dr}-slide-up-appear${dr}-slide-up-appear-active${Ft}-dropdown-placement-topLeft, - &${dr}-slide-up-appear${dr}-slide-up-appear-active${Ft}-dropdown-placement-topRight`]:{animationName:Fs.Qt},[`&${dr}-slide-up-enter${dr}-slide-up-enter-active${Ft}-dropdown-placement-bottomLeft, - &${dr}-slide-up-enter${dr}-slide-up-enter-active${Ft}-dropdown-placement-bottomRight, - &${dr}-slide-up-appear${dr}-slide-up-appear-active${Ft}-dropdown-placement-bottomLeft, - &${dr}-slide-up-appear${dr}-slide-up-appear-active${Ft}-dropdown-placement-bottomRight`]:{animationName:Fs.fJ},[`&${dr}-slide-up-leave${dr}-slide-up-leave-active${Ft}-dropdown-placement-topLeft, - &${dr}-slide-up-leave${dr}-slide-up-leave-active${Ft}-dropdown-placement-topRight`]:{animationName:Fs.ly},[`&${dr}-slide-up-leave${dr}-slide-up-leave-active${Ft}-dropdown-placement-bottomLeft, - &${dr}-slide-up-leave${dr}-slide-up-leave-active${Ft}-dropdown-placement-bottomRight`]:{animationName:Fs.Uw},[`${Ft}-panel > ${Ft}-time-panel`]:{paddingTop:Da},[`${Ft}-range-wrapper`]:{display:"flex",position:"relative"},[`${Ft}-range-arrow`]:Object.assign({position:"absolute",zIndex:1,display:"none",marginInlineStart:Oe.calc(Jr).mul(1.5).equal(),transition:`left ${qo} ease-out`},(0,Sl.W)(Oe,Mo,h)),[`${Ft}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:Mo,borderRadius:Ps,boxShadow:eu,transition:`margin ${qo}`,display:"inline-block",pointerEvents:"auto",[`${Ft}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${Ft}-presets`]:{display:"flex",flexDirection:"column",minWidth:fu,maxWidth:Gu,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:Ti,borderInlineEnd:`${(0,bs.bf)(Gn)} ${mi} ${cu}`,li:Object.assign(Object.assign({},Il.vS),{borderRadius:Bs,paddingInline:Ti,paddingBlock:Oe.calc(ha).sub(m).div(2).equal(),cursor:"pointer",transition:`all ${qo}`,"+ li":{marginTop:Bi},"&:hover":{background:yu}})}},[`${Ft}-panels`]:{display:"inline-flex",flexWrap:"nowrap",direction:"ltr","&:last-child":{[`${Ft}-panel`]:{borderWidth:0}}},[`${Ft}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${Ft}-content, - table`]:{textAlign:"center"},"&-focused":{borderColor:Vn}}}}),"&-dropdown-range":{padding:`${(0,bs.bf)(Oe.calc(Hu).mul(2).div(3).equal())} 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${Ft}-separator`]:{transform:"rotate(180deg)"},[`${Ft}-footer`]:{"&-extra":{direction:"rtl"}}}})},(0,Fs.oN)(Oe,"slide-up"),(0,Fs.oN)(Oe,"slide-down"),(0,Qu.Fm)(Oe,"move-up"),(0,Qu.Fm)(Oe,"move-down")]};var af=(0,au.I$)("DatePicker",Oe=>{const Ft=(0,Al.TS)(cc(Oe),Fc(Oe),{inputPaddingHorizontalBase:Oe.calc(Oe.paddingSM).sub(1).equal(),multipleSelectItemHeight:Oe.multipleItemHeight,selectHeight:Oe.controlHeight});return[Rl(Ft),Df(Ft),If(Ft),_h(Ft),Vc(Ft),(0,ks.c)(Oe,{focusElCls:`${Oe.componentCls}-focused`})]},xh),cd=_(74615);function Uf(Oe,Ft,dr){return dr!==void 0?dr:Ft==="year"&&Oe.lang.yearPlaceholder?Oe.lang.yearPlaceholder:Ft==="quarter"&&Oe.lang.quarterPlaceholder?Oe.lang.quarterPlaceholder:Ft==="month"&&Oe.lang.monthPlaceholder?Oe.lang.monthPlaceholder:Ft==="week"&&Oe.lang.weekPlaceholder?Oe.lang.weekPlaceholder:Ft==="time"&&Oe.timePickerLocale.placeholder?Oe.timePickerLocale.placeholder:Oe.lang.placeholder}function _u(Oe,Ft,dr){return dr!==void 0?dr:Ft==="year"&&Oe.lang.yearPlaceholder?Oe.lang.rangeYearPlaceholder:Ft==="quarter"&&Oe.lang.quarterPlaceholder?Oe.lang.rangeQuarterPlaceholder:Ft==="month"&&Oe.lang.monthPlaceholder?Oe.lang.rangeMonthPlaceholder:Ft==="week"&&Oe.lang.weekPlaceholder?Oe.lang.rangeWeekPlaceholder:Ft==="time"&&Oe.timePickerLocale.placeholder?Oe.timePickerLocale.rangePlaceholder:Oe.lang.rangePlaceholder}function Ls(Oe,Ft){const dr={adjustX:1,adjustY:1};switch(Ft){case"bottomLeft":return{points:["tl","bl"],offset:[0,4],overflow:dr};case"bottomRight":return{points:["tr","br"],offset:[0,4],overflow:dr};case"topLeft":return{points:["bl","tl"],offset:[0,-4],overflow:dr};case"topRight":return{points:["br","tr"],offset:[0,-4],overflow:dr};default:return{points:Oe==="rtl"?["tr","br"]:["tl","bl"],offset:[0,4],overflow:dr}}}function Af(Oe,Ft){const{allowClear:dr=!0}=Oe,{clearIcon:Wr,removeIcon:Jr}=(0,cd.Z)(Object.assign(Object.assign({},Oe),{prefixCls:Ft,componentName:"DatePicker"}));return[Ue.useMemo(()=>dr===!1?!1:Object.assign({clearIcon:Wr},dr===!0?{}:dr),[dr,Wr]),Jr]}var fd=_(2741);function Qi(Oe){return Ue.createElement(fd.ZP,Object.assign({size:"small",type:"primary"},Oe))}function Gr(Oe){return(0,Ue.useMemo)(()=>Object.assign({button:Qi},Oe),[Oe])}var of=function(Oe,Ft){var dr={};for(var Wr in Oe)Object.prototype.hasOwnProperty.call(Oe,Wr)&&Ft.indexOf(Wr)<0&&(dr[Wr]=Oe[Wr]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jr=0,Wr=Object.getOwnPropertySymbols(Oe);Jr{var Jr;const{prefixCls:Gn,getPopupContainer:mi,components:Vn,className:Gi,style:Li,placement:Xn,size:Ca,disabled:$a,bordered:Ba=!0,placeholder:ha,popupClassName:ba,dropdownClassName:Ti,status:Bi,rootClassName:na,variant:Sa}=dr,Ko=of(dr,["prefixCls","getPopupContainer","components","className","style","placement","size","disabled","bordered","placeholder","popupClassName","dropdownClassName","status","rootClassName","variant"]),qo=Ue.useRef(null),{getPrefixCls:gs,direction:Da,getPopupContainer:Hu,rangePicker:Mo}=(0,Ue.useContext)(gu.E_),Ps=gs("picker",Gn),{compactSize:eu,compactItemClassnames:Bs}=(0,hl.ri)(Ps,Da),{picker:cu}=dr,yu=gs(),[fu,Gu]=(0,St.Z)(Sa,Ba),h=(0,Co.Z)(Ps),[m,F,H]=af(Ps,h),[ve]=Af(dr,Ps),ot=Gr(Vn),kt=(0,zu.Z)(b=>{var x;return(x=Ca!=null?Ca:eu)!==null&&x!==void 0?x:b}),J=Ue.useContext(Pu.Z),f=$a!=null?$a:J,O=(0,Ue.useContext)(Zu.aM),{hasFeedback:K,status:q,feedbackIcon:me}=O,je=Ue.createElement(Ue.Fragment,null,cu==="time"?Ue.createElement(Ht,null):Ue.createElement(at,null),K&&me);(0,Ue.useImperativeHandle)(Wr,()=>qo.current);const[tt]=(0,qu.Z)("Calendar",rc.Z),w=Object.assign(Object.assign({},tt),dr.locale),[Gt]=(0,fl.Cn)("DatePicker",(Jr=dr.popupStyle)===null||Jr===void 0?void 0:Jr.zIndex);return m(Ue.createElement(hl.BR,null,Ue.createElement(No,Object.assign({separator:Ue.createElement("span",{"aria-label":"to",className:`${Ps}-separator`},Ue.createElement(Ce,null)),disabled:f,ref:qo,popupAlign:Ls(Da,Xn),placeholder:_u(w,cu,ha),suffixIcon:je,prevIcon:Ue.createElement("span",{className:`${Ps}-prev-icon`}),nextIcon:Ue.createElement("span",{className:`${Ps}-next-icon`}),superPrevIcon:Ue.createElement("span",{className:`${Ps}-super-prev-icon`}),superNextIcon:Ue.createElement("span",{className:`${Ps}-super-next-icon`}),transitionName:`${yu}-slide-up`},Ko,{className:et()({[`${Ps}-${kt}`]:kt,[`${Ps}-${fu}`]:Gu},(0,lf.Z)(Ps,(0,lf.F)(q,Bi),K),F,Bs,Gi,Mo==null?void 0:Mo.className,H,h,na),style:Object.assign(Object.assign({},Mo==null?void 0:Mo.style),Li),locale:w.lang,prefixCls:Ps,getPopupContainer:mi||Hu,generateConfig:Oe,components:ot,direction:Da,classNames:{popup:et()(F,ba||Ti,H,h,na)},styles:{popup:Object.assign(Object.assign({},dr.popupStyle),{zIndex:Gt})},allowClear:ve}))))})}var is=function(Oe,Ft){var dr={};for(var Wr in Oe)Object.prototype.hasOwnProperty.call(Oe,Wr)&&Ft.indexOf(Wr)<0&&(dr[Wr]=Oe[Wr]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jr=0,Wr=Object.getOwnPropertySymbols(Oe);Jr{var ha;const{prefixCls:ba,getPopupContainer:Ti,components:Bi,style:na,className:Sa,rootClassName:Ko,size:qo,bordered:gs,placement:Da,placeholder:Hu,popupClassName:Mo,dropdownClassName:Ps,disabled:eu,status:Bs,variant:cu}=$a,yu=is($a,["prefixCls","getPopupContainer","components","style","className","rootClassName","size","bordered","placement","placeholder","popupClassName","dropdownClassName","disabled","status","variant"]),{getPrefixCls:fu,direction:Gu,getPopupContainer:h,[Xn]:m}=(0,Ue.useContext)(gu.E_),F=fu("picker",ba),{compactSize:H,compactItemClassnames:ve}=(0,hl.ri)(F,Gu),ot=Ue.useRef(null),[kt,J]=(0,St.Z)(cu,gs),f=(0,Co.Z)(F),[O,K,q]=af(F,f);(0,Ue.useImperativeHandle)(Ba,()=>ot.current);const me={showToday:!0},je=Gi||$a.picker,tt=fu(),[w,Gt]=Af($a,F),b=Gr(Bi),x=(0,zu.Z)(hr=>{var Fr;return(Fr=qo!=null?qo:H)!==null&&Fr!==void 0?Fr:hr}),S=Ue.useContext(Pu.Z),Z=eu!=null?eu:S,he=(0,Ue.useContext)(Zu.aM),{hasFeedback:Se,status:Pe,feedbackIcon:ct}=he,Ut=Ue.createElement(Ue.Fragment,null,je==="time"?Ue.createElement(Ht,null):Ue.createElement(at,null),Se&&ct),[wt]=(0,qu.Z)("DatePicker",rc.Z),Kt=Object.assign(Object.assign({},wt),$a.locale),[cr]=(0,fl.Cn)("DatePicker",(ha=$a.popupStyle)===null||ha===void 0?void 0:ha.zIndex);return O(Ue.createElement(hl.BR,null,Ue.createElement(lc,Object.assign({ref:ot,placeholder:Uf(Kt,je,Hu),suffixIcon:Ut,dropdownAlign:Ls(Gu,Da),prevIcon:Ue.createElement("span",{className:`${F}-prev-icon`}),nextIcon:Ue.createElement("span",{className:`${F}-next-icon`}),superPrevIcon:Ue.createElement("span",{className:`${F}-super-prev-icon`}),superNextIcon:Ue.createElement("span",{className:`${F}-super-next-icon`}),transitionName:`${tt}-slide-up`,picker:Gi},me,yu,{locale:Kt.lang,className:et()({[`${F}-${x}`]:x,[`${F}-${kt}`]:J},(0,lf.Z)(F,(0,lf.F)(Pe,Bs),Se),K,ve,m==null?void 0:m.className,Sa,q,f,Ko),style:Object.assign(Object.assign({},m==null?void 0:m.style),na),prefixCls:F,getPopupContainer:Ti||h,generateConfig:Oe,components:b,direction:Gu,disabled:Z,classNames:{popup:et()(K,q,f,Ko,Mo||Ps)},styles:{popup:Object.assign(Object.assign({},$a.popupStyle),{zIndex:cr})},allowClear:w,removeIcon:Gt}))))})}const dr=Ft(),Wr=Ft("week","WeekPicker"),Jr=Ft("month","MonthPicker"),Gn=Ft("year","YearPicker"),mi=Ft("time","TimePicker"),Vn=Ft("quarter","QuarterPicker");return{DatePicker:dr,WeekPicker:Wr,MonthPicker:Jr,YearPicker:Gn,TimePicker:mi,QuarterPicker:Vn}}function nf(Oe){const{DatePicker:Ft,WeekPicker:dr,MonthPicker:Wr,YearPicker:Jr,TimePicker:Gn,QuarterPicker:mi}=cf(Oe),Vn=Qr(Oe),Gi=Ft;return Gi.WeekPicker=dr,Gi.MonthPicker=Wr,Gi.YearPicker=Jr,Gi.RangePicker=Vn,Gi.TimePicker=Gn,Gi.QuarterPicker=mi,Gi}var ic=nf;const Ws=ic(It);function $u(Oe){const Ft=Ls(Oe.direction,Oe.placement);return Ft.overflow.adjustY=!1,Ft.overflow.adjustX=!1,Object.assign(Object.assign({},Oe),{dropdownAlign:Ft})}const ac=(0,At.Z)(Ws,"picker",null,$u);Ws._InternalPanelDoNotUseOrYouWillBeFired=ac;const $l=(0,At.Z)(Ws.RangePicker,"picker",null,$u);Ws._InternalRangePanelDoNotUseOrYouWillBeFired=$l,Ws.generatePicker=ic;var Fl=Ws},16331:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return $}});var M={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},V=M,y=_(41766),$={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},V),timePickerLocale:Object.assign({},y.Z)}},99742:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Et}});var M=_(77617),V=_(92310),y=_.n(V),d=_(99468);function $(at){return["small","middle","large"].includes(at)}function X(at){return at?typeof at=="number"&&!Number.isNaN(at):!1}var oe=_(11908),re=_(93319),le=_(12228);const ce=["wrap","nowrap","wrap-reverse"],Ie=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],we=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],Ee=(at,mt)=>{const Mt={};return ce.forEach(Me=>{Mt[`${at}-wrap-${Me}`]=mt.wrap===Me}),Mt},qe=(at,mt)=>{const Mt={};return we.forEach(Me=>{Mt[`${at}-align-${Me}`]=mt.align===Me}),Mt[`${at}-align-stretch`]=!mt.align&&!!mt.vertical,Mt},Xe=(at,mt)=>{const Mt={};return Ie.forEach(Me=>{Mt[`${at}-justify-${Me}`]=mt.justify===Me}),Mt};function ft(at,mt){return y()(Object.assign(Object.assign(Object.assign({},Ee(at,mt)),qe(at,mt)),Xe(at,mt)))}var Ge=ft;const lt=at=>{const{componentCls:mt}=at;return{[mt]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},Ye=at=>{const{componentCls:mt}=at;return{[mt]:{"&-gap-small":{gap:at.flexGapSM},"&-gap-middle":{gap:at.flexGap},"&-gap-large":{gap:at.flexGapLG}}}},It=at=>{const{componentCls:mt}=at,Mt={};return ce.forEach(Me=>{Mt[`${mt}-wrap-${Me}`]={flexWrap:Me}}),Mt},At=at=>{const{componentCls:mt}=at,Mt={};return we.forEach(Me=>{Mt[`${mt}-align-${Me}`]={alignItems:Me}}),Mt},Ue=at=>{const{componentCls:mt}=at,Mt={};return Ie.forEach(Me=>{Mt[`${mt}-justify-${Me}`]={justifyContent:Me}}),Mt},rt=()=>({});var Ze=(0,re.I$)("Flex",at=>{const{paddingXS:mt,padding:Mt,paddingLG:Me}=at,Ht=(0,le.TS)(at,{flexGapSM:mt,flexGap:Mt,flexGapLG:Me});return[lt(Ht),Ye(Ht),It(Ht),At(Ht),Ue(Ht)]},rt,{resetStyle:!1}),Ct=function(at,mt){var Mt={};for(var Me in at)Object.prototype.hasOwnProperty.call(at,Me)&&mt.indexOf(Me)<0&&(Mt[Me]=at[Me]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ht=0,Me=Object.getOwnPropertySymbols(at);Ht{const{prefixCls:Mt,rootClassName:Me,className:Ht,style:Rt,flex:vt,gap:Je,children:Ce,vertical:pt=!1,component:et="div"}=at,br=Ct(at,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:Jt,direction:Vr,getPrefixCls:gn}=M.useContext(oe.E_),yn=gn("flex",Mt),[_i,Hn,Ln]=Ze(yn),Ia=pt!=null?pt:Jt==null?void 0:Jt.vertical,Zi=y()(Ht,Me,Jt==null?void 0:Jt.className,yn,Hn,Ln,Ge(yn,at),{[`${yn}-rtl`]:Vr==="rtl",[`${yn}-gap-${Je}`]:$(Je),[`${yn}-vertical`]:Ia}),Ua=Object.assign(Object.assign({},Jt==null?void 0:Jt.style),Rt);return vt&&(Ua.flex=vt),Je&&!$(Je)&&(Ua.gap=Je),_i(M.createElement(et,Object.assign({ref:mt,className:Zi,style:Ua},(0,d.Z)(br,["justify","wrap","align"])),Ce))})},53615:function(Ke,ye,_){"use strict";_.d(ye,{aM:function(){return Xi},Ux:function(){return ya},pg:function(){return Bo}});var M=_(77617),V=_(79384),y=_(56348),d=_(33202),$=_(90304),X=_(54131),oe=_(49397),re=_(61577),le=_(22946),ce=_(7963),Ie=_(3711),we=_(71038),Ee=_(16514),qe=_(45659),Xe=_(70780),ft=_(36014),Ge="RC_FORM_INTERNAL_HOOKS",lt=function(){(0,ft.ZP)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Ye=M.createContext({getFieldValue:lt,getFieldsValue:lt,getFieldError:lt,getFieldWarning:lt,getFieldsError:lt,isFieldsTouched:lt,isFieldTouched:lt,isFieldValidating:lt,isFieldsValidating:lt,resetFields:lt,setFields:lt,setFieldValue:lt,setFieldsValue:lt,validateFields:lt,submit:lt,getInternalHooks:function(){return lt(),{dispatch:lt,initEntityValue:lt,registerField:lt,useSubscribe:lt,setInitialValues:lt,destroyForm:lt,setCallbacks:lt,registerWatch:lt,getFields:lt,setValidateMessages:lt,setPreserve:lt,getInitialValue:lt}}}),It=Ye,At=M.createContext(null),Ue=At;function rt(xn){return xn==null?[]:Array.isArray(xn)?xn:[xn]}function Ze(xn){return xn&&!!xn._init}var Ct=_(97671);function st(){return st=Object.assign?Object.assign.bind():function(xn){for(var zr=1;zr1?zr-1:0),Nt=1;Nt=$r)return un;switch(un){case"%s":return String(xt[lr++]);case"%d":return Number(xt[lr++]);case"%j":try{return JSON.stringify(xt[lr++])}catch(Sn){return"[Circular]"}break;default:return un}});return Yr}return xn}function et(xn){return xn==="string"||xn==="url"||xn==="hex"||xn==="email"||xn==="date"||xn==="pattern"}function br(xn,zr){return!!(xn==null||zr==="array"&&Array.isArray(xn)&&!xn.length||et(zr)&&typeof xn=="string"&&!xn)}function Jt(xn,zr,xt){var Nt=[],lr=0,$r=xn.length;function Yr(un){Nt.push.apply(Nt,un||[]),lr++,lr===$r&&xt(Nt)}xn.forEach(function(un){zr(un,Yr)})}function Vr(xn,zr,xt){var Nt=0,lr=xn.length;function $r(Yr){if(Yr&&Yr.length){xt(Yr);return}var un=Nt;Nt=Nt+1,un()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},yi={integer:function(zr){return yi.number(zr)&&parseInt(zr,10)===zr},float:function(zr){return yi.number(zr)&&!yi.integer(zr)},array:function(zr){return Array.isArray(zr)},regexp:function(zr){if(zr instanceof RegExp)return!0;try{return!!new RegExp(zr)}catch(xt){return!1}},date:function(zr){return typeof zr.getTime=="function"&&typeof zr.getMonth=="function"&&typeof zr.getYear=="function"&&!isNaN(zr.getTime())},number:function(zr){return isNaN(zr)?!1:typeof zr=="number"},object:function(zr){return typeof zr=="object"&&!yi.array(zr)},method:function(zr){return typeof zr=="function"},email:function(zr){return typeof zr=="string"&&zr.length<=320&&!!zr.match(_n.email)},url:function(zr){return typeof zr=="string"&&zr.length<=2048&&!!zr.match(mo())},hex:function(zr){return typeof zr=="string"&&!!zr.match(_n.hex)}},Zn=function(zr,xt,Nt,lr,$r){if(zr.required&&xt===void 0){Ua(zr,xt,Nt,lr,$r);return}var Yr=["integer","float","array","regexp","object","method","email","number","date","url","hex"],un=zr.type;Yr.indexOf(un)>-1?yi[un](xt)||lr.push(pt($r.messages.types[un],zr.fullField,zr.type)):un&&typeof xt!==zr.type&&lr.push(pt($r.messages.types[un],zr.fullField,zr.type))},gr=function(zr,xt,Nt,lr,$r){var Yr=typeof zr.len=="number",un=typeof zr.min=="number",Sn=typeof zr.max=="number",qn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ti=xt,Ui=null,ra=typeof xt=="number",ia=typeof xt=="string",vi=Array.isArray(xt);if(ra?Ui="number":ia?Ui="string":vi&&(Ui="array"),!Ui)return!1;vi&&(ti=xt.length),ia&&(ti=xt.replace(qn,"_").length),Yr?ti!==zr.len&&lr.push(pt($r.messages[Ui].len,zr.fullField,zr.len)):un&&!Sn&&tizr.max?lr.push(pt($r.messages[Ui].max,zr.fullField,zr.max)):un&&Sn&&(tizr.max)&&lr.push(pt($r.messages[Ui].range,zr.fullField,zr.min,zr.max))},Ea="enum",co=function(zr,xt,Nt,lr,$r){zr[Ea]=Array.isArray(zr[Ea])?zr[Ea]:[],zr[Ea].indexOf(xt)===-1&&lr.push(pt($r.messages[Ea],zr.fullField,zr[Ea].join(", ")))},Qa=function(zr,xt,Nt,lr,$r){if(zr.pattern){if(zr.pattern instanceof RegExp)zr.pattern.lastIndex=0,zr.pattern.test(xt)||lr.push(pt($r.messages.pattern.mismatch,zr.fullField,xt,zr.pattern));else if(typeof zr.pattern=="string"){var Yr=new RegExp(zr.pattern);Yr.test(xt)||lr.push(pt($r.messages.pattern.mismatch,zr.fullField,xt,zr.pattern))}}},oa={required:Ua,whitespace:fa,type:Zn,range:gr,enum:co,pattern:Qa},ji=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt,"string")&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r,"string"),br(xt,"string")||(oa.type(zr,xt,lr,Yr,$r),oa.range(zr,xt,lr,Yr,$r),oa.pattern(zr,xt,lr,Yr,$r),zr.whitespace===!0&&oa.whitespace(zr,xt,lr,Yr,$r))}Nt(Yr)},so=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt)&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r),xt!==void 0&&oa.type(zr,xt,lr,Yr,$r)}Nt(Yr)},ei=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(xt===""&&(xt=void 0),br(xt)&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r),xt!==void 0&&(oa.type(zr,xt,lr,Yr,$r),oa.range(zr,xt,lr,Yr,$r))}Nt(Yr)},Kn=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt)&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r),xt!==void 0&&oa.type(zr,xt,lr,Yr,$r)}Nt(Yr)},Jn=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt)&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r),br(xt)||oa.type(zr,xt,lr,Yr,$r)}Nt(Yr)},da=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt)&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r),xt!==void 0&&(oa.type(zr,xt,lr,Yr,$r),oa.range(zr,xt,lr,Yr,$r))}Nt(Yr)},pa=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt)&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r),xt!==void 0&&(oa.type(zr,xt,lr,Yr,$r),oa.range(zr,xt,lr,Yr,$r))}Nt(Yr)},uo=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(xt==null&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r,"array"),xt!=null&&(oa.type(zr,xt,lr,Yr,$r),oa.range(zr,xt,lr,Yr,$r))}Nt(Yr)},Ir=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt)&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r),xt!==void 0&&oa.type(zr,xt,lr,Yr,$r)}Nt(Yr)},bt="enum",Yt=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt)&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r),xt!==void 0&&oa[bt](zr,xt,lr,Yr,$r)}Nt(Yr)},Pt=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt,"string")&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r),br(xt,"string")||oa.pattern(zr,xt,lr,Yr,$r)}Nt(Yr)},xr=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt,"date")&&!zr.required)return Nt();if(oa.required(zr,xt,lr,Yr,$r),!br(xt,"date")){var Sn;xt instanceof Date?Sn=xt:Sn=new Date(xt),oa.type(zr,Sn,lr,Yr,$r),Sn&&oa.range(zr,Sn.getTime(),lr,Yr,$r)}}Nt(Yr)},Tr=function(zr,xt,Nt,lr,$r){var Yr=[],un=Array.isArray(xt)?"array":typeof xt;oa.required(zr,xt,lr,Yr,$r,un),Nt(Yr)},hn=function(zr,xt,Nt,lr,$r){var Yr=zr.type,un=[],Sn=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(Sn){if(br(xt,Yr)&&!zr.required)return Nt();oa.required(zr,xt,lr,un,$r,Yr),br(xt,Yr)||oa.type(zr,xt,lr,un,$r)}Nt(un)},Cn=function(zr,xt,Nt,lr,$r){var Yr=[],un=zr.required||!zr.required&&lr.hasOwnProperty(zr.field);if(un){if(br(xt)&&!zr.required)return Nt();oa.required(zr,xt,lr,Yr,$r)}Nt(Yr)},tr={string:ji,method:so,number:ei,boolean:Kn,regexp:Jn,integer:da,float:pa,array:uo,object:Ir,enum:Yt,pattern:Pt,date:xr,url:hn,hex:hn,email:hn,required:Tr,any:Cn};function jt(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var zr=JSON.parse(JSON.stringify(this));return zr.clone=this.clone,zr}}}var He=jt(),We=function(){function xn(xt){this.rules=null,this._messages=He,this.define(xt)}var zr=xn.prototype;return zr.define=function(Nt){var lr=this;if(!Nt)throw new Error("Cannot configure a schema with no rules");if(typeof Nt!="object"||Array.isArray(Nt))throw new Error("Rules must be an object");this.rules={},Object.keys(Nt).forEach(function($r){var Yr=Nt[$r];lr.rules[$r]=Array.isArray(Yr)?Yr:[Yr]})},zr.messages=function(Nt){return Nt&&(this._messages=Zi(jt(),Nt)),this._messages},zr.validate=function(Nt,lr,$r){var Yr=this;lr===void 0&&(lr={}),$r===void 0&&($r=function(){});var un=Nt,Sn=lr,qn=$r;if(typeof Sn=="function"&&(qn=Sn,Sn={}),!this.rules||Object.keys(this.rules).length===0)return qn&&qn(null,un),Promise.resolve(un);function ti(gi){var ma=[],Yi={};function ua(aa){if(Array.isArray(aa)){var ho;ma=(ho=ma).concat.apply(ho,aa)}else ma.push(aa)}for(var La=0;La2&&arguments[2]!==void 0?arguments[2]:!1;return xn&&xn.some(function(Nt){return Fa(zr,Nt,xt)})}function Fa(xn,zr){var xt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!xn||!zr||!xt&&xn.length!==zr.length?!1:zr.every(function(Nt,lr){return xn[lr]===Nt})}function sa(xn,zr){if(xn===zr)return!0;if(!xn&&zr||xn&&!zr||!xn||!zr||(0,Wn.Z)(xn)!=="object"||(0,Wn.Z)(zr)!=="object")return!1;var xt=Object.keys(xn),Nt=Object.keys(zr),lr=new Set([].concat(xt,Nt));return(0,oe.Z)(lr).every(function($r){var Yr=xn[$r],un=zr[$r];return typeof Yr=="function"&&typeof un=="function"?!0:Yr===un})}function vo(xn){var zr=arguments.length<=1?void 0:arguments[1];return zr&&zr.target&&(0,Wn.Z)(zr.target)==="object"&&xn in zr.target?zr.target[xn]:zr}function Ro(xn,zr,xt){var Nt=xn.length;if(zr<0||zr>=Nt||xt<0||xt>=Nt)return xn;var lr=xn[zr],$r=zr-xt;return $r>0?[].concat((0,oe.Z)(xn.slice(0,xt)),[lr],(0,oe.Z)(xn.slice(xt,zr)),(0,oe.Z)(xn.slice(zr+1,Nt))):$r<0?[].concat((0,oe.Z)(xn.slice(0,zr)),(0,oe.Z)(xn.slice(zr+1,xt+1)),[lr],(0,oe.Z)(xn.slice(xt+1,Nt))):xn}var Za=["name"],Os=[];function ro(xn,zr,xt,Nt,lr,$r){return typeof xn=="function"?xn(zr,xt,"source"in $r?{source:$r.source}:{}):Nt!==lr}var Tu=function(xn){(0,Ie.Z)(xt,xn);var zr=(0,we.Z)(xt);function xt(Nt){var lr;if((0,re.Z)(this,xt),lr=zr.call(this,Nt),(0,Ee.Z)((0,ce.Z)(lr),"state",{resetCount:0}),(0,Ee.Z)((0,ce.Z)(lr),"cancelRegisterFunc",null),(0,Ee.Z)((0,ce.Z)(lr),"mounted",!1),(0,Ee.Z)((0,ce.Z)(lr),"touched",!1),(0,Ee.Z)((0,ce.Z)(lr),"dirty",!1),(0,Ee.Z)((0,ce.Z)(lr),"validatePromise",void 0),(0,Ee.Z)((0,ce.Z)(lr),"prevValidating",void 0),(0,Ee.Z)((0,ce.Z)(lr),"errors",Os),(0,Ee.Z)((0,ce.Z)(lr),"warnings",Os),(0,Ee.Z)((0,ce.Z)(lr),"cancelRegister",function(){var Sn=lr.props,qn=Sn.preserve,ti=Sn.isListField,Ui=Sn.name;lr.cancelRegisterFunc&&lr.cancelRegisterFunc(ti,qn,ai(Ui)),lr.cancelRegisterFunc=null}),(0,Ee.Z)((0,ce.Z)(lr),"getNamePath",function(){var Sn=lr.props,qn=Sn.name,ti=Sn.fieldContext,Ui=ti.prefixName,ra=Ui===void 0?[]:Ui;return qn!==void 0?[].concat((0,oe.Z)(ra),(0,oe.Z)(qn)):[]}),(0,Ee.Z)((0,ce.Z)(lr),"getRules",function(){var Sn=lr.props,qn=Sn.rules,ti=qn===void 0?[]:qn,Ui=Sn.fieldContext;return ti.map(function(ra){return typeof ra=="function"?ra(Ui):ra})}),(0,Ee.Z)((0,ce.Z)(lr),"refresh",function(){lr.mounted&&lr.setState(function(Sn){var qn=Sn.resetCount;return{resetCount:qn+1}})}),(0,Ee.Z)((0,ce.Z)(lr),"metaCache",null),(0,Ee.Z)((0,ce.Z)(lr),"triggerMetaEvent",function(Sn){var qn=lr.props.onMetaChange;if(qn){var ti=(0,X.Z)((0,X.Z)({},lr.getMeta()),{},{destroy:Sn});(0,Xe.Z)(lr.metaCache,ti)||qn(ti),lr.metaCache=ti}else lr.metaCache=null}),(0,Ee.Z)((0,ce.Z)(lr),"onStoreChange",function(Sn,qn,ti){var Ui=lr.props,ra=Ui.shouldUpdate,ia=Ui.dependencies,vi=ia===void 0?[]:ia,gi=Ui.onReset,ma=ti.store,Yi=lr.getNamePath(),ua=lr.getValue(Sn),La=lr.getValue(ma),aa=qn&&ki(qn,Yi);switch(ti.type==="valueUpdate"&&ti.source==="external"&&ua!==La&&(lr.touched=!0,lr.dirty=!0,lr.validatePromise=null,lr.errors=Os,lr.warnings=Os,lr.triggerMetaEvent()),ti.type){case"reset":if(!qn||aa){lr.touched=!1,lr.dirty=!1,lr.validatePromise=void 0,lr.errors=Os,lr.warnings=Os,lr.triggerMetaEvent(),gi==null||gi(),lr.refresh();return}break;case"remove":{if(ra){lr.reRender();return}break}case"setField":{var ho=ti.data;if(aa){"touched"in ho&&(lr.touched=ho.touched),"validating"in ho&&!("originRCField"in ho)&&(lr.validatePromise=ho.validating?Promise.resolve([]):null),"errors"in ho&&(lr.errors=ho.errors||Os),"warnings"in ho&&(lr.warnings=ho.warnings||Os),lr.dirty=!0,lr.triggerMetaEvent(),lr.reRender();return}else if("value"in ho&&ki(qn,Yi,!0)){lr.reRender();return}if(ra&&!Yi.length&&ro(ra,Sn,ma,ua,La,ti)){lr.reRender();return}break}case"dependenciesUpdate":{var Po=vi.map(ai);if(Po.some(function(Ms){return ki(ti.relatedFields,Ms)})){lr.reRender();return}break}default:if(aa||(!vi.length||Yi.length||ra)&&ro(ra,Sn,ma,ua,La,ti)){lr.reRender();return}break}ra===!0&&lr.reRender()}),(0,Ee.Z)((0,ce.Z)(lr),"validateRules",function(Sn){var qn=lr.getNamePath(),ti=lr.getValue(),Ui=Sn||{},ra=Ui.triggerName,ia=Ui.validateOnly,vi=ia===void 0?!1:ia,gi=Promise.resolve().then((0,$.Z)((0,d.Z)().mark(function ma(){var Yi,ua,La,aa,ho,Po,Ms;return(0,d.Z)().wrap(function(vs){for(;;)switch(vs.prev=vs.next){case 0:if(lr.mounted){vs.next=2;break}return vs.abrupt("return",[]);case 2:if(Yi=lr.props,ua=Yi.validateFirst,La=ua===void 0?!1:ua,aa=Yi.messageVariables,ho=Yi.validateDebounce,Po=lr.getRules(),ra&&(Po=Po.filter(function(Xs){return Xs}).filter(function(Xs){var iu=Xs.validateTrigger;if(!iu)return!0;var js=rt(iu);return js.includes(ra)})),!(ho&&ra)){vs.next=10;break}return vs.next=8,new Promise(function(Xs){setTimeout(Xs,ho)});case 8:if(lr.validatePromise===gi){vs.next=10;break}return vs.abrupt("return",[]);case 10:return Ms=on(qn,ti,Po,Sn,La,aa),Ms.catch(function(Xs){return Xs}).then(function(){var Xs=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Os;if(lr.validatePromise===gi){var iu;lr.validatePromise=null;var js=[],Vs=[];(iu=Xs.forEach)===null||iu===void 0||iu.call(Xs,function(sl){var al=sl.rule.warningOnly,ul=sl.errors,_c=ul===void 0?Os:ul;al?Vs.push.apply(Vs,(0,oe.Z)(_c)):js.push.apply(js,(0,oe.Z)(_c))}),lr.errors=js,lr.warnings=Vs,lr.triggerMetaEvent(),lr.reRender()}}),vs.abrupt("return",Ms);case 13:case"end":return vs.stop()}},ma)})));return vi||(lr.validatePromise=gi,lr.dirty=!0,lr.errors=Os,lr.warnings=Os,lr.triggerMetaEvent(),lr.reRender()),gi}),(0,Ee.Z)((0,ce.Z)(lr),"isFieldValidating",function(){return!!lr.validatePromise}),(0,Ee.Z)((0,ce.Z)(lr),"isFieldTouched",function(){return lr.touched}),(0,Ee.Z)((0,ce.Z)(lr),"isFieldDirty",function(){if(lr.dirty||lr.props.initialValue!==void 0)return!0;var Sn=lr.props.fieldContext,qn=Sn.getInternalHooks(Ge),ti=qn.getInitialValue;return ti(lr.getNamePath())!==void 0}),(0,Ee.Z)((0,ce.Z)(lr),"getErrors",function(){return lr.errors}),(0,Ee.Z)((0,ce.Z)(lr),"getWarnings",function(){return lr.warnings}),(0,Ee.Z)((0,ce.Z)(lr),"isListField",function(){return lr.props.isListField}),(0,Ee.Z)((0,ce.Z)(lr),"isList",function(){return lr.props.isList}),(0,Ee.Z)((0,ce.Z)(lr),"isPreserve",function(){return lr.props.preserve}),(0,Ee.Z)((0,ce.Z)(lr),"getMeta",function(){lr.prevValidating=lr.isFieldValidating();var Sn={touched:lr.isFieldTouched(),validating:lr.prevValidating,errors:lr.errors,warnings:lr.warnings,name:lr.getNamePath(),validated:lr.validatePromise===null};return Sn}),(0,Ee.Z)((0,ce.Z)(lr),"getOnlyChild",function(Sn){if(typeof Sn=="function"){var qn=lr.getMeta();return(0,X.Z)((0,X.Z)({},lr.getOnlyChild(Sn(lr.getControlled(),qn,lr.props.fieldContext))),{},{isFunction:!0})}var ti=(0,qe.Z)(Sn);return ti.length!==1||!M.isValidElement(ti[0])?{child:ti,isFunction:!1}:{child:ti[0],isFunction:!1}}),(0,Ee.Z)((0,ce.Z)(lr),"getValue",function(Sn){var qn=lr.props.fieldContext.getFieldsValue,ti=lr.getNamePath();return(0,Tn.Z)(Sn||qn(!0),ti)}),(0,Ee.Z)((0,ce.Z)(lr),"getControlled",function(){var Sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},qn=lr.props,ti=qn.trigger,Ui=qn.validateTrigger,ra=qn.getValueFromEvent,ia=qn.normalize,vi=qn.valuePropName,gi=qn.getValueProps,ma=qn.fieldContext,Yi=Ui!==void 0?Ui:ma.validateTrigger,ua=lr.getNamePath(),La=ma.getInternalHooks,aa=ma.getFieldsValue,ho=La(Ge),Po=ho.dispatch,Ms=lr.getValue(),Mu=gi||function(js){return(0,Ee.Z)({},vi,js)},vs=Sn[ti],Xs=(0,X.Z)((0,X.Z)({},Sn),Mu(Ms));Xs[ti]=function(){lr.touched=!0,lr.dirty=!0,lr.triggerMetaEvent();for(var js,Vs=arguments.length,sl=new Array(Vs),al=0;al=0&&Xs<=iu.length?(ti.keys=[].concat((0,oe.Z)(ti.keys.slice(0,Xs)),[ti.id],(0,oe.Z)(ti.keys.slice(Xs))),La([].concat((0,oe.Z)(iu.slice(0,Xs)),[vs],(0,oe.Z)(iu.slice(Xs))))):(ti.keys=[].concat((0,oe.Z)(ti.keys),[ti.id]),La([].concat((0,oe.Z)(iu),[vs]))),ti.id+=1},remove:function(vs){var Xs=ho(),iu=new Set(Array.isArray(vs)?vs:[vs]);iu.size<=0||(ti.keys=ti.keys.filter(function(js,Vs){return!iu.has(Vs)}),La(Xs.filter(function(js,Vs){return!iu.has(Vs)})))},move:function(vs,Xs){if(vs!==Xs){var iu=ho();vs<0||vs>=iu.length||Xs<0||Xs>=iu.length||(ti.keys=Ro(ti.keys,vs,Xs),La(Ro(iu,vs,Xs)))}}},Ms=ua||[];return Array.isArray(Ms)||(Ms=[]),Nt(Ms.map(function(Mu,vs){var Xs=ti.keys[vs];return Xs===void 0&&(ti.keys[vs]=ti.id,Xs=ti.keys[vs],ti.id+=1),{name:vs,key:Xs,isListField:!0}}),Po,ma)})))}var ca=ss,Mn=_(35372);function wi(xn){var zr=!1,xt=xn.length,Nt=[];return xn.length?new Promise(function(lr,$r){xn.forEach(function(Yr,un){Yr.catch(function(Sn){return zr=!0,Sn}).then(function(Sn){xt-=1,Nt[un]=Sn,!(xt>0)&&(zr&&$r(Nt),lr(Nt))})})}):Promise.resolve([])}var Fu="__@field_split__";function Hs(xn){return xn.map(function(zr){return"".concat((0,Wn.Z)(zr),":").concat(zr)}).join(Fu)}var us=function(){function xn(){(0,re.Z)(this,xn),(0,Ee.Z)(this,"kvs",new Map)}return(0,le.Z)(xn,[{key:"set",value:function(xt,Nt){this.kvs.set(Hs(xt),Nt)}},{key:"get",value:function(xt){return this.kvs.get(Hs(xt))}},{key:"update",value:function(xt,Nt){var lr=this.get(xt),$r=Nt(lr);$r?this.set(xt,$r):this.delete(xt)}},{key:"delete",value:function(xt){this.kvs.delete(Hs(xt))}},{key:"map",value:function(xt){return(0,oe.Z)(this.kvs.entries()).map(function(Nt){var lr=(0,Mn.Z)(Nt,2),$r=lr[0],Yr=lr[1],un=$r.split(Fu);return xt({key:un.map(function(Sn){var qn=Sn.match(/^([^:]*):(.*)$/),ti=(0,Mn.Z)(qn,3),Ui=ti[1],ra=ti[2];return Ui==="number"?Number(ra):ra}),value:Yr})})}},{key:"toJSON",value:function(){var xt={};return this.map(function(Nt){var lr=Nt.key,$r=Nt.value;return xt[lr.join(".")]=$r,null}),xt}}]),xn}(),Ts=us,Qs=["name"],ko=(0,le.Z)(function xn(zr){var xt=this;(0,re.Z)(this,xn),(0,Ee.Z)(this,"formHooked",!1),(0,Ee.Z)(this,"forceRootUpdate",void 0),(0,Ee.Z)(this,"subscribable",!0),(0,Ee.Z)(this,"store",{}),(0,Ee.Z)(this,"fieldEntities",[]),(0,Ee.Z)(this,"initialValues",{}),(0,Ee.Z)(this,"callbacks",{}),(0,Ee.Z)(this,"validateMessages",null),(0,Ee.Z)(this,"preserve",null),(0,Ee.Z)(this,"lastValidatePromise",null),(0,Ee.Z)(this,"getForm",function(){return{getFieldValue:xt.getFieldValue,getFieldsValue:xt.getFieldsValue,getFieldError:xt.getFieldError,getFieldWarning:xt.getFieldWarning,getFieldsError:xt.getFieldsError,isFieldsTouched:xt.isFieldsTouched,isFieldTouched:xt.isFieldTouched,isFieldValidating:xt.isFieldValidating,isFieldsValidating:xt.isFieldsValidating,resetFields:xt.resetFields,setFields:xt.setFields,setFieldValue:xt.setFieldValue,setFieldsValue:xt.setFieldsValue,validateFields:xt.validateFields,submit:xt.submit,_init:!0,getInternalHooks:xt.getInternalHooks}}),(0,Ee.Z)(this,"getInternalHooks",function(Nt){return Nt===Ge?(xt.formHooked=!0,{dispatch:xt.dispatch,initEntityValue:xt.initEntityValue,registerField:xt.registerField,useSubscribe:xt.useSubscribe,setInitialValues:xt.setInitialValues,destroyForm:xt.destroyForm,setCallbacks:xt.setCallbacks,setValidateMessages:xt.setValidateMessages,getFields:xt.getFields,setPreserve:xt.setPreserve,getInitialValue:xt.getInitialValue,registerWatch:xt.registerWatch}):((0,ft.ZP)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),(0,Ee.Z)(this,"useSubscribe",function(Nt){xt.subscribable=Nt}),(0,Ee.Z)(this,"prevWithoutPreserves",null),(0,Ee.Z)(this,"setInitialValues",function(Nt,lr){if(xt.initialValues=Nt||{},lr){var $r,Yr=(0,rr.T)(Nt,xt.store);($r=xt.prevWithoutPreserves)===null||$r===void 0||$r.map(function(un){var Sn=un.key;Yr=(0,rr.Z)(Yr,Sn,(0,Tn.Z)(Nt,Sn))}),xt.prevWithoutPreserves=null,xt.updateStore(Yr)}}),(0,Ee.Z)(this,"destroyForm",function(){var Nt=new Ts;xt.getFieldEntities(!0).forEach(function(lr){xt.isMergedPreserve(lr.isPreserve())||Nt.set(lr.getNamePath(),!0)}),xt.prevWithoutPreserves=Nt}),(0,Ee.Z)(this,"getInitialValue",function(Nt){var lr=(0,Tn.Z)(xt.initialValues,Nt);return Nt.length?(0,rr.T)(lr):lr}),(0,Ee.Z)(this,"setCallbacks",function(Nt){xt.callbacks=Nt}),(0,Ee.Z)(this,"setValidateMessages",function(Nt){xt.validateMessages=Nt}),(0,Ee.Z)(this,"setPreserve",function(Nt){xt.preserve=Nt}),(0,Ee.Z)(this,"watchList",[]),(0,Ee.Z)(this,"registerWatch",function(Nt){return xt.watchList.push(Nt),function(){xt.watchList=xt.watchList.filter(function(lr){return lr!==Nt})}}),(0,Ee.Z)(this,"notifyWatch",function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(xt.watchList.length){var lr=xt.getFieldsValue(),$r=xt.getFieldsValue(!0);xt.watchList.forEach(function(Yr){Yr(lr,$r,Nt)})}}),(0,Ee.Z)(this,"timeoutId",null),(0,Ee.Z)(this,"warningUnhooked",function(){}),(0,Ee.Z)(this,"updateStore",function(Nt){xt.store=Nt}),(0,Ee.Z)(this,"getFieldEntities",function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return Nt?xt.fieldEntities.filter(function(lr){return lr.getNamePath().length}):xt.fieldEntities}),(0,Ee.Z)(this,"getFieldsMap",function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,lr=new Ts;return xt.getFieldEntities(Nt).forEach(function($r){var Yr=$r.getNamePath();lr.set(Yr,$r)}),lr}),(0,Ee.Z)(this,"getFieldEntitiesForNamePathList",function(Nt){if(!Nt)return xt.getFieldEntities(!0);var lr=xt.getFieldsMap(!0);return Nt.map(function($r){var Yr=ai($r);return lr.get(Yr)||{INVALIDATE_NAME_PATH:ai($r)}})}),(0,Ee.Z)(this,"getFieldsValue",function(Nt,lr){xt.warningUnhooked();var $r,Yr,un;if(Nt===!0||Array.isArray(Nt)?($r=Nt,Yr=lr):Nt&&(0,Wn.Z)(Nt)==="object"&&(un=Nt.strict,Yr=Nt.filter),$r===!0&&!Yr)return xt.store;var Sn=xt.getFieldEntitiesForNamePathList(Array.isArray($r)?$r:null),qn=[];return Sn.forEach(function(ti){var Ui,ra,ia="INVALIDATE_NAME_PATH"in ti?ti.INVALIDATE_NAME_PATH:ti.getNamePath();if(un){var vi,gi;if((vi=(gi=ti).isList)!==null&&vi!==void 0&&vi.call(gi))return}else if(!$r&&(Ui=(ra=ti).isListField)!==null&&Ui!==void 0&&Ui.call(ra))return;if(!Yr)qn.push(ia);else{var ma="getMeta"in ti?ti.getMeta():null;Yr(ma)&&qn.push(ia)}}),Ii(xt.store,qn.map(ai))}),(0,Ee.Z)(this,"getFieldValue",function(Nt){xt.warningUnhooked();var lr=ai(Nt);return(0,Tn.Z)(xt.store,lr)}),(0,Ee.Z)(this,"getFieldsError",function(Nt){xt.warningUnhooked();var lr=xt.getFieldEntitiesForNamePathList(Nt);return lr.map(function($r,Yr){return $r&&!("INVALIDATE_NAME_PATH"in $r)?{name:$r.getNamePath(),errors:$r.getErrors(),warnings:$r.getWarnings()}:{name:ai(Nt[Yr]),errors:[],warnings:[]}})}),(0,Ee.Z)(this,"getFieldError",function(Nt){xt.warningUnhooked();var lr=ai(Nt),$r=xt.getFieldsError([lr])[0];return $r.errors}),(0,Ee.Z)(this,"getFieldWarning",function(Nt){xt.warningUnhooked();var lr=ai(Nt),$r=xt.getFieldsError([lr])[0];return $r.warnings}),(0,Ee.Z)(this,"isFieldsTouched",function(){xt.warningUnhooked();for(var Nt=arguments.length,lr=new Array(Nt),$r=0;$r0&&arguments[0]!==void 0?arguments[0]:{},lr=new Ts,$r=xt.getFieldEntities(!0);$r.forEach(function(Sn){var qn=Sn.props.initialValue,ti=Sn.getNamePath();if(qn!==void 0){var Ui=lr.get(ti)||new Set;Ui.add({entity:Sn,value:qn}),lr.set(ti,Ui)}});var Yr=function(qn){qn.forEach(function(ti){var Ui=ti.props.initialValue;if(Ui!==void 0){var ra=ti.getNamePath(),ia=xt.getInitialValue(ra);if(ia!==void 0)(0,ft.ZP)(!1,"Form already set 'initialValues' with path '".concat(ra.join("."),"'. Field can not overwrite it."));else{var vi=lr.get(ra);if(vi&&vi.size>1)(0,ft.ZP)(!1,"Multiple Field with path '".concat(ra.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(vi){var gi=xt.getFieldValue(ra),ma=ti.isListField();!ma&&(!Nt.skipExist||gi===void 0)&&xt.updateStore((0,rr.Z)(xt.store,ra,(0,oe.Z)(vi)[0].value))}}}})},un;Nt.entities?un=Nt.entities:Nt.namePathList?(un=[],Nt.namePathList.forEach(function(Sn){var qn=lr.get(Sn);if(qn){var ti;(ti=un).push.apply(ti,(0,oe.Z)((0,oe.Z)(qn).map(function(Ui){return Ui.entity})))}})):un=$r,Yr(un)}),(0,Ee.Z)(this,"resetFields",function(Nt){xt.warningUnhooked();var lr=xt.store;if(!Nt){xt.updateStore((0,rr.T)(xt.initialValues)),xt.resetWithFieldInitialValue(),xt.notifyObservers(lr,null,{type:"reset"}),xt.notifyWatch();return}var $r=Nt.map(ai);$r.forEach(function(Yr){var un=xt.getInitialValue(Yr);xt.updateStore((0,rr.Z)(xt.store,Yr,un))}),xt.resetWithFieldInitialValue({namePathList:$r}),xt.notifyObservers(lr,$r,{type:"reset"}),xt.notifyWatch($r)}),(0,Ee.Z)(this,"setFields",function(Nt){xt.warningUnhooked();var lr=xt.store,$r=[];Nt.forEach(function(Yr){var un=Yr.name,Sn=(0,y.Z)(Yr,Qs),qn=ai(un);$r.push(qn),"value"in Sn&&xt.updateStore((0,rr.Z)(xt.store,qn,Sn.value)),xt.notifyObservers(lr,[qn],{type:"setField",data:Yr})}),xt.notifyWatch($r)}),(0,Ee.Z)(this,"getFields",function(){var Nt=xt.getFieldEntities(!0),lr=Nt.map(function($r){var Yr=$r.getNamePath(),un=$r.getMeta(),Sn=(0,X.Z)((0,X.Z)({},un),{},{name:Yr,value:xt.getFieldValue(Yr)});return Object.defineProperty(Sn,"originRCField",{value:!0}),Sn});return lr}),(0,Ee.Z)(this,"initEntityValue",function(Nt){var lr=Nt.props.initialValue;if(lr!==void 0){var $r=Nt.getNamePath(),Yr=(0,Tn.Z)(xt.store,$r);Yr===void 0&&xt.updateStore((0,rr.Z)(xt.store,$r,lr))}}),(0,Ee.Z)(this,"isMergedPreserve",function(Nt){var lr=Nt!==void 0?Nt:xt.preserve;return lr!=null?lr:!0}),(0,Ee.Z)(this,"registerField",function(Nt){xt.fieldEntities.push(Nt);var lr=Nt.getNamePath();if(xt.notifyWatch([lr]),Nt.props.initialValue!==void 0){var $r=xt.store;xt.resetWithFieldInitialValue({entities:[Nt],skipExist:!0}),xt.notifyObservers($r,[Nt.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(Yr,un){var Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(xt.fieldEntities=xt.fieldEntities.filter(function(Ui){return Ui!==Nt}),!xt.isMergedPreserve(un)&&(!Yr||Sn.length>1)){var qn=Yr?void 0:xt.getInitialValue(lr);if(lr.length&&xt.getFieldValue(lr)!==qn&&xt.fieldEntities.every(function(Ui){return!Fa(Ui.getNamePath(),lr)})){var ti=xt.store;xt.updateStore((0,rr.Z)(ti,lr,qn,!0)),xt.notifyObservers(ti,[lr],{type:"remove"}),xt.triggerDependenciesUpdate(ti,lr)}}xt.notifyWatch([lr])}}),(0,Ee.Z)(this,"dispatch",function(Nt){switch(Nt.type){case"updateValue":{var lr=Nt.namePath,$r=Nt.value;xt.updateValue(lr,$r);break}case"validateField":{var Yr=Nt.namePath,un=Nt.triggerName;xt.validateFields([Yr],{triggerName:un});break}default:}}),(0,Ee.Z)(this,"notifyObservers",function(Nt,lr,$r){if(xt.subscribable){var Yr=(0,X.Z)((0,X.Z)({},$r),{},{store:xt.getFieldsValue(!0)});xt.getFieldEntities().forEach(function(un){var Sn=un.onStoreChange;Sn(Nt,lr,Yr)})}else xt.forceRootUpdate()}),(0,Ee.Z)(this,"triggerDependenciesUpdate",function(Nt,lr){var $r=xt.getDependencyChildrenFields(lr);return $r.length&&xt.validateFields($r),xt.notifyObservers(Nt,$r,{type:"dependenciesUpdate",relatedFields:[lr].concat((0,oe.Z)($r))}),$r}),(0,Ee.Z)(this,"updateValue",function(Nt,lr){var $r=ai(Nt),Yr=xt.store;xt.updateStore((0,rr.Z)(xt.store,$r,lr)),xt.notifyObservers(Yr,[$r],{type:"valueUpdate",source:"internal"}),xt.notifyWatch([$r]);var un=xt.triggerDependenciesUpdate(Yr,$r),Sn=xt.callbacks.onValuesChange;if(Sn){var qn=Ii(xt.store,[$r]);Sn(qn,xt.getFieldsValue())}xt.triggerOnFieldsChange([$r].concat((0,oe.Z)(un)))}),(0,Ee.Z)(this,"setFieldsValue",function(Nt){xt.warningUnhooked();var lr=xt.store;if(Nt){var $r=(0,rr.T)(xt.store,Nt);xt.updateStore($r)}xt.notifyObservers(lr,null,{type:"valueUpdate",source:"external"}),xt.notifyWatch()}),(0,Ee.Z)(this,"setFieldValue",function(Nt,lr){xt.setFields([{name:Nt,value:lr}])}),(0,Ee.Z)(this,"getDependencyChildrenFields",function(Nt){var lr=new Set,$r=[],Yr=new Ts;xt.getFieldEntities().forEach(function(Sn){var qn=Sn.props.dependencies;(qn||[]).forEach(function(ti){var Ui=ai(ti);Yr.update(Ui,function(){var ra=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return ra.add(Sn),ra})})});var un=function Sn(qn){var ti=Yr.get(qn)||new Set;ti.forEach(function(Ui){if(!lr.has(Ui)){lr.add(Ui);var ra=Ui.getNamePath();Ui.isFieldDirty()&&ra.length&&($r.push(ra),Sn(ra))}})};return un(Nt),$r}),(0,Ee.Z)(this,"triggerOnFieldsChange",function(Nt,lr){var $r=xt.callbacks.onFieldsChange;if($r){var Yr=xt.getFields();if(lr){var un=new Ts;lr.forEach(function(qn){var ti=qn.name,Ui=qn.errors;un.set(ti,Ui)}),Yr.forEach(function(qn){qn.errors=un.get(qn.name)||qn.errors})}var Sn=Yr.filter(function(qn){var ti=qn.name;return ki(Nt,ti)});Sn.length&&$r(Sn,Yr)}}),(0,Ee.Z)(this,"validateFields",function(Nt,lr){xt.warningUnhooked();var $r,Yr;Array.isArray(Nt)||typeof Nt=="string"||typeof lr=="string"?($r=Nt,Yr=lr):Yr=Nt;var un=!!$r,Sn=un?$r.map(ai):[],qn=[],ti=String(Date.now()),Ui=new Set,ra=Yr||{},ia=ra.recursive,vi=ra.dirty;xt.getFieldEntities(!0).forEach(function(ua){if(un||Sn.push(ua.getNamePath()),!(!ua.props.rules||!ua.props.rules.length)&&!(vi&&!ua.isFieldDirty())){var La=ua.getNamePath();if(Ui.add(La.join(ti)),!un||ki(Sn,La,ia)){var aa=ua.validateRules((0,X.Z)({validateMessages:(0,X.Z)((0,X.Z)({},Zt),xt.validateMessages)},Yr));qn.push(aa.then(function(){return{name:La,errors:[],warnings:[]}}).catch(function(ho){var Po,Ms=[],Mu=[];return(Po=ho.forEach)===null||Po===void 0||Po.call(ho,function(vs){var Xs=vs.rule.warningOnly,iu=vs.errors;Xs?Mu.push.apply(Mu,(0,oe.Z)(iu)):Ms.push.apply(Ms,(0,oe.Z)(iu))}),Ms.length?Promise.reject({name:La,errors:Ms,warnings:Mu}):{name:La,errors:Ms,warnings:Mu}}))}}});var gi=wi(qn);xt.lastValidatePromise=gi,gi.catch(function(ua){return ua}).then(function(ua){var La=ua.map(function(aa){var ho=aa.name;return ho});xt.notifyObservers(xt.store,La,{type:"validateFinish"}),xt.triggerOnFieldsChange(La,ua)});var ma=gi.then(function(){return xt.lastValidatePromise===gi?Promise.resolve(xt.getFieldsValue(Sn)):Promise.reject([])}).catch(function(ua){var La=ua.filter(function(aa){return aa&&aa.errors.length});return Promise.reject({values:xt.getFieldsValue(Sn),errorFields:La,outOfDate:xt.lastValidatePromise!==gi})});ma.catch(function(ua){return ua});var Yi=Sn.filter(function(ua){return Ui.has(ua.join(ti))});return xt.triggerOnFieldsChange(Yi),ma}),(0,Ee.Z)(this,"submit",function(){xt.warningUnhooked(),xt.validateFields().then(function(Nt){var lr=xt.callbacks.onFinish;if(lr)try{lr(Nt)}catch($r){console.error($r)}}).catch(function(Nt){var lr=xt.callbacks.onFinishFailed;lr&&lr(Nt)})}),this.forceRootUpdate=zr});function _o(xn){var zr=M.useRef(),xt=M.useState({}),Nt=(0,Mn.Z)(xt,2),lr=Nt[1];if(!zr.current)if(xn)zr.current=xn;else{var $r=function(){lr({})},Yr=new ko($r);zr.current=Yr.getForm()}return[zr.current]}var Js=_o,fo=M.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),El=function(zr){var xt=zr.validateMessages,Nt=zr.onFormChange,lr=zr.onFormFinish,$r=zr.children,Yr=M.useContext(fo),un=M.useRef({});return M.createElement(fo.Provider,{value:(0,X.Z)((0,X.Z)({},Yr),{},{validateMessages:(0,X.Z)((0,X.Z)({},Yr.validateMessages),xt),triggerFormChange:function(qn,ti){Nt&&Nt(qn,{changedFields:ti,forms:un.current}),Yr.triggerFormChange(qn,ti)},triggerFormFinish:function(qn,ti){lr&&lr(qn,{values:ti,forms:un.current}),Yr.triggerFormFinish(qn,ti)},registerForm:function(qn,ti){qn&&(un.current=(0,X.Z)((0,X.Z)({},un.current),{},(0,Ee.Z)({},qn,ti))),Yr.registerForm(qn,ti)},unregisterForm:function(qn){var ti=(0,X.Z)({},un.current);delete ti[qn],un.current=ti,Yr.unregisterForm(qn)}})},$r)},ju=fo,_l=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],Es=function(zr,xt){var Nt=zr.name,lr=zr.initialValues,$r=zr.fields,Yr=zr.form,un=zr.preserve,Sn=zr.children,qn=zr.component,ti=qn===void 0?"form":qn,Ui=zr.validateMessages,ra=zr.validateTrigger,ia=ra===void 0?"onChange":ra,vi=zr.onValuesChange,gi=zr.onFieldsChange,ma=zr.onFinish,Yi=zr.onFinishFailed,ua=(0,y.Z)(zr,_l),La=M.useContext(ju),aa=Js(Yr),ho=(0,Mn.Z)(aa,1),Po=ho[0],Ms=Po.getInternalHooks(Ge),Mu=Ms.useSubscribe,vs=Ms.setInitialValues,Xs=Ms.setCallbacks,iu=Ms.setValidateMessages,js=Ms.setPreserve,Vs=Ms.destroyForm;M.useImperativeHandle(xt,function(){return Po}),M.useEffect(function(){return La.registerForm(Nt,Po),function(){La.unregisterForm(Nt)}},[La,Po,Nt]),iu((0,X.Z)((0,X.Z)({},La.validateMessages),Ui)),Xs({onValuesChange:vi,onFieldsChange:function(Wa){if(La.triggerFormChange(Nt,Wa),gi){for(var mf=arguments.length,yf=new Array(mf>1?mf-1:0),yl=1;yl{}}),wr=null,bn=xn=>{const zr=omit(xn,["prefixCls"]);return React.createElement(RcFormProvider,Object.assign({},zr))},vn=M.createContext({prefixCls:""}),Xi=M.createContext({}),ya=xn=>{let{children:zr,status:xt,override:Nt}=xn;const lr=(0,M.useContext)(Xi),$r=(0,M.useMemo)(()=>{const Yr=Object.assign({},lr);return Nt&&delete Yr.isFormItemInput,xt&&(delete Yr.status,delete Yr.hasFeedback,delete Yr.feedbackIcon),Yr},[xt,Nt,lr]);return M.createElement(Xi.Provider,{value:$r},zr)},Bo=(0,M.createContext)(void 0)},53792:function(Ke,ye,_){"use strict";var M=_(77617),V=_(53615);const y=["outlined","borderless","filled"],d=function($){let X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0;const oe=(0,M.useContext)(V.pg);let re;typeof $!="undefined"?re=$:X===!1?re="borderless":re=oe!=null?oe:"outlined";const le=y.includes(re);return[re,le]};ye.Z=d},75851:function(Ke,ye,_){"use strict";var M=_(77617);const V=(0,M.createContext)(void 0);ye.Z=V},69502:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return re}});var M={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},V=M,y=_(16331),d=y.Z,$=_(41766);const X="${label} is not a valid ${type}";var re={locale:"en",Pagination:V,DatePicker:y.Z,TimePicker:$.Z,Calendar:d,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:X,method:X,array:X,object:X,number:X,date:X,boolean:X,integer:X,float:X,regexp:X,email:X,url:X,hex:X},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty"}}},32095:function(Ke,ye,_){"use strict";var M=_(77617),V=_(75851),y=_(69502);const d=($,X)=>{const oe=M.useContext(V.Z),re=M.useMemo(()=>{var ce;const Ie=X||y.Z[$],we=(ce=oe==null?void 0:oe[$])!==null&&ce!==void 0?ce:{};return Object.assign(Object.assign({},typeof Ie=="function"?Ie():Ie),we||{})},[$,X,oe]),le=M.useMemo(()=>{const ce=oe==null?void 0:oe.locale;return oe!=null&&oe.exist&&!ce?y.Z.locale:ce},[oe]);return[re,le]};ye.Z=d},36632:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return we}});var M={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"},V=M,y={locale:"zh_CN",yearFormat:"YYYY\u5E74",cellDateFormat:"D",cellMeridiemFormat:"A",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708 (\u7FFB\u9875\u4E0A\u952E)",nextMonth:"\u4E0B\u4E2A\u6708 (\u7FFB\u9875\u4E0B\u952E)",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",previousYear:"\u4E0A\u4E00\u5E74 (Control\u952E\u52A0\u5DE6\u65B9\u5411\u952E)",nextYear:"\u4E0B\u4E00\u5E74 (Control\u952E\u52A0\u53F3\u65B9\u5411\u952E)",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA"},d=y,X={placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]};const oe={lang:Object.assign({placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeQuarterPlaceholder:["\u5F00\u59CB\u5B63\u5EA6","\u7ED3\u675F\u5B63\u5EA6"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"]},d),timePickerLocale:Object.assign({},X)};oe.lang.ok="\u786E\u5B9A";var re=oe,le=re;const ce="${label}\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u7684${type}";var we={locale:"zh-cn",Pagination:V,DatePicker:re,TimePicker:X,Calendar:le,global:{placeholder:"\u8BF7\u9009\u62E9"},Table:{filterTitle:"\u7B5B\u9009",filterConfirm:"\u786E\u5B9A",filterReset:"\u91CD\u7F6E",filterEmptyText:"\u65E0\u7B5B\u9009\u9879",filterCheckall:"\u5168\u9009",filterSearchPlaceholder:"\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",selectAll:"\u5168\u9009\u5F53\u9875",selectInvert:"\u53CD\u9009\u5F53\u9875",selectNone:"\u6E05\u7A7A\u6240\u6709",selectionAll:"\u5168\u9009\u6240\u6709",sortTitle:"\u6392\u5E8F",expand:"\u5C55\u5F00\u884C",collapse:"\u5173\u95ED\u884C",triggerDesc:"\u70B9\u51FB\u964D\u5E8F",triggerAsc:"\u70B9\u51FB\u5347\u5E8F",cancelSort:"\u53D6\u6D88\u6392\u5E8F"},Modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",justOkText:"\u77E5\u9053\u4E86"},Tour:{Next:"\u4E0B\u4E00\u6B65",Previous:"\u4E0A\u4E00\u6B65",Finish:"\u7ED3\u675F\u5BFC\u89C8"},Popconfirm:{cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A"},Transfer:{titles:["",""],searchPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",itemUnit:"\u9879",itemsUnit:"\u9879",remove:"\u5220\u9664",selectCurrent:"\u5168\u9009\u5F53\u9875",removeCurrent:"\u5220\u9664\u5F53\u9875",selectAll:"\u5168\u9009\u6240\u6709",removeAll:"\u5220\u9664\u5168\u90E8",selectInvert:"\u53CD\u9009\u5F53\u9875"},Upload:{uploading:"\u6587\u4EF6\u4E0A\u4F20\u4E2D",removeFile:"\u5220\u9664\u6587\u4EF6",uploadError:"\u4E0A\u4F20\u9519\u8BEF",previewFile:"\u9884\u89C8\u6587\u4EF6",downloadFile:"\u4E0B\u8F7D\u6587\u4EF6"},Empty:{description:"\u6682\u65E0\u6570\u636E"},Icon:{icon:"\u56FE\u6807"},Text:{edit:"\u7F16\u8F91",copy:"\u590D\u5236",copied:"\u590D\u5236\u6210\u529F",expand:"\u5C55\u5F00"},Form:{optional:"\uFF08\u53EF\u9009\uFF09",defaultValidateMessages:{default:"\u5B57\u6BB5\u9A8C\u8BC1\u9519\u8BEF${label}",required:"\u8BF7\u8F93\u5165${label}",enum:"${label}\u5FC5\u987B\u662F\u5176\u4E2D\u4E00\u4E2A[${enum}]",whitespace:"${label}\u4E0D\u80FD\u4E3A\u7A7A\u5B57\u7B26",date:{format:"${label}\u65E5\u671F\u683C\u5F0F\u65E0\u6548",parse:"${label}\u4E0D\u80FD\u8F6C\u6362\u4E3A\u65E5\u671F",invalid:"${label}\u662F\u4E00\u4E2A\u65E0\u6548\u65E5\u671F"},types:{string:ce,method:ce,array:ce,object:ce,number:ce,date:ce,boolean:ce,integer:ce,float:ce,regexp:ce,email:ce,url:ce,hex:ce},string:{len:"${label}\u987B\u4E3A${len}\u4E2A\u5B57\u7B26",min:"${label}\u6700\u5C11${min}\u4E2A\u5B57\u7B26",max:"${label}\u6700\u591A${max}\u4E2A\u5B57\u7B26",range:"${label}\u987B\u5728${min}-${max}\u5B57\u7B26\u4E4B\u95F4"},number:{len:"${label}\u5FC5\u987B\u7B49\u4E8E${len}",min:"${label}\u6700\u5C0F\u503C\u4E3A${min}",max:"${label}\u6700\u5927\u503C\u4E3A${max}",range:"${label}\u987B\u5728${min}-${max}\u4E4B\u95F4"},array:{len:"\u987B\u4E3A${len}\u4E2A${label}",min:"\u6700\u5C11${min}\u4E2A${label}",max:"\u6700\u591A${max}\u4E2A${label}",range:"${label}\u6570\u91CF\u987B\u5728${min}-${max}\u4E4B\u95F4"},pattern:{mismatch:"${label}\u4E0E\u6A21\u5F0F\u4E0D\u5339\u914D${pattern}"}}},Image:{preview:"\u9884\u89C8"},QRCode:{expired:"\u4E8C\u7EF4\u7801\u8FC7\u671F",refresh:"\u70B9\u51FB\u5237\u65B0",scanned:"\u5DF2\u626B\u63CF"},ColorPicker:{presetEmpty:"\u6682\u65E0"}}},64451:function(Ke,ye,_){"use strict";_.d(ye,{ZP:function(){return ri}});var M=_(49397),V=_(77617),y=_(41522);const d=V.createContext({}),$=V.createContext({message:{},notification:{},modal:{}});var X=null,oe=_(11908),re=_(34591),le=_(50555),ce=_(43418),Ie=_(81664),we=_(20906),Ee=_(20555),qe=_(92310),Xe=_.n(qe),ft=_(35372),Ge=_(56348),lt=_(54131),Ye=_(79161),It=_(79384),At=_(16514),Ue=_(44516),rt=_(84821),Ze=V.forwardRef(function(nn,ln){var Yn=nn.prefixCls,Wn=nn.style,Tn=nn.className,ai=nn.duration,Ii=ai===void 0?4.5:ai,ki=nn.eventKey,Fa=nn.content,sa=nn.closable,vo=nn.closeIcon,Ro=vo===void 0?"x":vo,Za=nn.props,Os=nn.onClick,ro=nn.onNoticeClose,Tu=nn.times,Do=nn.hovering,qa=V.useState(!1),ss=(0,ft.Z)(qa,2),ca=ss[0],Mn=ss[1],wi=Do||ca,Fu=function(){ro(ki)},Hs=function(Qs){(Qs.key==="Enter"||Qs.code==="Enter"||Qs.keyCode===rt.Z.ENTER)&&Fu()};V.useEffect(function(){if(!wi&&Ii>0){var Ts=setTimeout(function(){Fu()},Ii*1e3);return function(){clearTimeout(Ts)}}},[Ii,wi,Tu]);var us="".concat(Yn,"-notice");return V.createElement("div",(0,It.Z)({},Za,{ref:ln,className:Xe()(us,Tn,(0,At.Z)({},"".concat(us,"-closable"),sa)),style:Wn,onMouseEnter:function(Qs){var ko;Mn(!0),Za==null||(ko=Za.onMouseEnter)===null||ko===void 0||ko.call(Za,Qs)},onMouseLeave:function(Qs){var ko;Mn(!1),Za==null||(ko=Za.onMouseLeave)===null||ko===void 0||ko.call(Za,Qs)},onClick:Os}),V.createElement("div",{className:"".concat(us,"-content")},Fa),sa&&V.createElement("a",{tabIndex:0,className:"".concat(us,"-close"),onKeyDown:Hs,onClick:function(Qs){Qs.preventDefault(),Qs.stopPropagation(),Fu()}},Ro))}),Ct=Ze,st=V.createContext({}),Et=function(ln){var Yn=ln.children,Wn=ln.classNames;return V.createElement(st.Provider,{value:{classNames:Wn}},Yn)},at=Et,mt=_(13255),Mt=8,Me=3,Ht=16,Rt=function(ln){var Yn={offset:Mt,threshold:Me,gap:Ht};if(ln&&(0,mt.Z)(ln)==="object"){var Wn,Tn,ai;Yn.offset=(Wn=ln.offset)!==null&&Wn!==void 0?Wn:Mt,Yn.threshold=(Tn=ln.threshold)!==null&&Tn!==void 0?Tn:Me,Yn.gap=(ai=ln.gap)!==null&&ai!==void 0?ai:Ht}return[!!ln,Yn]},vt=Rt,Je=["className","style","classNames","styles"],Ce=function(ln){var Yn,Wn=ln.configList,Tn=ln.placement,ai=ln.prefixCls,Ii=ln.className,ki=ln.style,Fa=ln.motion,sa=ln.onAllNoticeRemoved,vo=ln.onNoticeClose,Ro=ln.stack,Za=(0,V.useContext)(st),Os=Za.classNames,ro=(0,V.useRef)({}),Tu=(0,V.useState)(null),Do=(0,ft.Z)(Tu,2),qa=Do[0],ss=Do[1],ca=(0,V.useState)([]),Mn=(0,ft.Z)(ca,2),wi=Mn[0],Fu=Mn[1],Hs=Wn.map(function(_l){return{config:_l,key:String(_l.key)}}),us=vt(Ro),Ts=(0,ft.Z)(us,2),Qs=Ts[0],ko=Ts[1],_o=ko.offset,Js=ko.threshold,fo=ko.gap,El=Qs&&(wi.length>0||Hs.length<=Js),ju=typeof Fa=="function"?Fa(Tn):Fa;return(0,V.useEffect)(function(){Qs&&wi.length>1&&Fu(function(_l){return _l.filter(function(Es){return Hs.some(function(yc){var Vl=yc.key;return Es===Vl})})})},[wi,Hs,Qs]),(0,V.useEffect)(function(){var _l;if(Qs&&ro.current[(_l=Hs[Hs.length-1])===null||_l===void 0?void 0:_l.key]){var Es;ss(ro.current[(Es=Hs[Hs.length-1])===null||Es===void 0?void 0:Es.key])}},[Hs,Qs]),V.createElement(Ue.V4,(0,It.Z)({key:Tn,className:Xe()(ai,"".concat(ai,"-").concat(Tn),Os==null?void 0:Os.list,Ii,(Yn={},(0,At.Z)(Yn,"".concat(ai,"-stack"),!!Qs),(0,At.Z)(Yn,"".concat(ai,"-stack-expanded"),El),Yn)),style:ki,keys:Hs,motionAppear:!0},ju,{onAllRemoved:function(){sa(Tn)}}),function(_l,Es){var yc=_l.config,Vl=_l.className,tc=_l.style,Au=_l.index,On=yc,tn=On.key,Pi=On.times,ut=String(tn),Wt=yc,wr=Wt.className,bn=Wt.style,vn=Wt.classNames,Xi=Wt.styles,ya=(0,Ge.Z)(Wt,Je),Bo=Hs.findIndex(function(Ui){return Ui.key===ut}),xn={};if(Qs){var zr=Hs.length-1-(Bo>-1?Bo:Au-1),xt=Tn==="top"||Tn==="bottom"?"-50%":"0";if(zr>0){var Nt,lr,$r;xn.height=El?(Nt=ro.current[ut])===null||Nt===void 0?void 0:Nt.offsetHeight:qa==null?void 0:qa.offsetHeight;for(var Yr=0,un=0;un-1?ro.current[ut]=ra:delete ro.current[ut]},prefixCls:ai,classNames:vn,styles:Xi,className:Xe()(wr,Os==null?void 0:Os.notice),style:bn,times:Pi,key:tn,eventKey:tn,onNoticeClose:vo,hovering:Qs&&wi.length>0})))})},pt=Ce,et=V.forwardRef(function(nn,ln){var Yn=nn.prefixCls,Wn=Yn===void 0?"rc-notification":Yn,Tn=nn.container,ai=nn.motion,Ii=nn.maxCount,ki=nn.className,Fa=nn.style,sa=nn.onAllRemoved,vo=nn.stack,Ro=nn.renderNotifications,Za=V.useState([]),Os=(0,ft.Z)(Za,2),ro=Os[0],Tu=Os[1],Do=function(Ts){var Qs,ko=ro.find(function(_o){return _o.key===Ts});ko==null||(Qs=ko.onClose)===null||Qs===void 0||Qs.call(ko),Tu(function(_o){return _o.filter(function(Js){return Js.key!==Ts})})};V.useImperativeHandle(ln,function(){return{open:function(Ts){Tu(function(Qs){var ko=(0,M.Z)(Qs),_o=ko.findIndex(function(El){return El.key===Ts.key}),Js=(0,lt.Z)({},Ts);if(_o>=0){var fo;Js.times=(((fo=Qs[_o])===null||fo===void 0?void 0:fo.times)||0)+1,ko[_o]=Js}else Js.times=0,ko.push(Js);return Ii>0&&ko.length>Ii&&(ko=ko.slice(-Ii)),ko})},close:function(Ts){Do(Ts)},destroy:function(){Tu([])}}});var qa=V.useState({}),ss=(0,ft.Z)(qa,2),ca=ss[0],Mn=ss[1];V.useEffect(function(){var us={};ro.forEach(function(Ts){var Qs=Ts.placement,ko=Qs===void 0?"topRight":Qs;ko&&(us[ko]=us[ko]||[],us[ko].push(Ts))}),Object.keys(ca).forEach(function(Ts){us[Ts]=us[Ts]||[]}),Mn(us)},[ro]);var wi=function(Ts){Mn(function(Qs){var ko=(0,lt.Z)({},Qs),_o=ko[Ts]||[];return _o.length||delete ko[Ts],ko})},Fu=V.useRef(!1);if(V.useEffect(function(){Object.keys(ca).length>0?Fu.current=!0:Fu.current&&(sa==null||sa(),Fu.current=!1)},[ca]),!Tn)return null;var Hs=Object.keys(ca);return(0,Ye.createPortal)(V.createElement(V.Fragment,null,Hs.map(function(us){var Ts=ca[us],Qs=V.createElement(pt,{key:us,configList:Ts,placement:us,prefixCls:Wn,className:ki==null?void 0:ki(us),style:Fa==null?void 0:Fa(us),motion:ai,onNoticeClose:Do,onAllNoticeRemoved:wi,stack:vo});return Ro?Ro(Qs,{prefixCls:Wn,key:us}):Qs})),Tn)}),br=et,Jt=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],Vr=function(){return document.body},gn=0;function yn(){for(var nn={},ln=arguments.length,Yn=new Array(ln),Wn=0;Wn0&&arguments[0]!==void 0?arguments[0]:{},ln=nn.getContainer,Yn=ln===void 0?Vr:ln,Wn=nn.motion,Tn=nn.prefixCls,ai=nn.maxCount,Ii=nn.className,ki=nn.style,Fa=nn.onAllRemoved,sa=nn.stack,vo=nn.renderNotifications,Ro=(0,Ge.Z)(nn,Jt),Za=V.useState(),Os=(0,ft.Z)(Za,2),ro=Os[0],Tu=Os[1],Do=V.useRef(),qa=V.createElement(br,{container:ro,ref:Do,prefixCls:Tn,motion:Wn,maxCount:ai,className:Ii,style:ki,onAllRemoved:Fa,stack:sa,renderNotifications:vo}),ss=V.useState([]),ca=(0,ft.Z)(ss,2),Mn=ca[0],wi=ca[1],Fu=V.useMemo(function(){return{open:function(us){var Ts=yn(Ro,us);(Ts.key===null||Ts.key===void 0)&&(Ts.key="rc-notification-".concat(gn),gn+=1),wi(function(Qs){return[].concat((0,M.Z)(Qs),[{type:"open",config:Ts}])})},close:function(us){wi(function(Ts){return[].concat((0,M.Z)(Ts),[{type:"close",key:us}])})},destroy:function(){wi(function(us){return[].concat((0,M.Z)(us),[{type:"destroy"}])})}}},[]);return V.useEffect(function(){Tu(Yn())}),V.useEffect(function(){Do.current&&Mn.length&&(Mn.forEach(function(Hs){switch(Hs.type){case"open":Do.current.open(Hs.config);break;case"close":Do.current.close(Hs.key);break;case"destroy":Do.current.destroy();break}}),wi(function(Hs){return Hs.filter(function(us){return!Mn.includes(us)})}))},[Mn]),[Fu,qa]}var Hn=_(78600),Ln=_(66187),Ia=_(75199),Zi=_(93319),Ua=_(12228);const fa=nn=>{const{componentCls:ln,iconCls:Yn,boxShadow:Wn,colorText:Tn,colorSuccess:ai,colorError:Ii,colorWarning:ki,colorInfo:Fa,fontSizeLG:sa,motionEaseInOutCirc:vo,motionDurationSlow:Ro,marginXS:Za,paddingXS:Os,borderRadiusLG:ro,zIndexPopup:Tu,contentPadding:Do,contentBg:qa}=nn,ss=`${ln}-notice`,ca=new Hn.E4("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:Os,transform:"translateY(0)",opacity:1}}),Mn=new Hn.E4("MessageMoveOut",{"0%":{maxHeight:nn.height,padding:Os,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),wi={padding:Os,textAlign:"center",[`${ln}-custom-content > ${Yn}`]:{verticalAlign:"text-bottom",marginInlineEnd:Za,fontSize:sa},[`${ss}-content`]:{display:"inline-block",padding:Do,background:qa,borderRadius:ro,boxShadow:Wn,pointerEvents:"all"},[`${ln}-success > ${Yn}`]:{color:ai},[`${ln}-error > ${Yn}`]:{color:Ii},[`${ln}-warning > ${Yn}`]:{color:ki},[`${ln}-info > ${Yn}, - ${ln}-loading > ${Yn}`]:{color:Fa}};return[{[ln]:Object.assign(Object.assign({},(0,Ia.Wf)(nn)),{color:Tn,position:"fixed",top:Za,width:"100%",pointerEvents:"none",zIndex:Tu,[`${ln}-move-up`]:{animationFillMode:"forwards"},[` - ${ln}-move-up-appear, - ${ln}-move-up-enter - `]:{animationName:ca,animationDuration:Ro,animationPlayState:"paused",animationTimingFunction:vo},[` - ${ln}-move-up-appear${ln}-move-up-appear-active, - ${ln}-move-up-enter${ln}-move-up-enter-active - `]:{animationPlayState:"running"},[`${ln}-move-up-leave`]:{animationName:Mn,animationDuration:Ro,animationPlayState:"paused",animationTimingFunction:vo},[`${ln}-move-up-leave${ln}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[ln]:{[`${ss}-wrapper`]:Object.assign({},wi)}},{[`${ln}-notice-pure-panel`]:Object.assign(Object.assign({},wi),{padding:0,textAlign:"start"})}]},ka=nn=>({zIndexPopup:nn.zIndexPopupBase+Ln.u6+10,contentBg:nn.colorBgElevated,contentPadding:`${(nn.controlHeightLG-nn.fontSize*nn.lineHeight)/2}px ${nn.paddingSM}px`});var mo=(0,Zi.I$)("Message",nn=>{const ln=(0,Ua.TS)(nn,{height:150});return[fa(ln)]},ka),_n=_(76135),yi=function(nn,ln){var Yn={};for(var Wn in nn)Object.prototype.hasOwnProperty.call(nn,Wn)&&ln.indexOf(Wn)<0&&(Yn[Wn]=nn[Wn]);if(nn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tn=0,Wn=Object.getOwnPropertySymbols(nn);Tn{let{prefixCls:ln,type:Yn,icon:Wn,children:Tn}=nn;return V.createElement("div",{className:Xe()(`${ln}-custom-content`,`${ln}-${Yn}`)},Wn||Zn[Yn],V.createElement("span",null,Tn))};var co=nn=>{const{prefixCls:ln,className:Yn,type:Wn,icon:Tn,content:ai}=nn,Ii=yi(nn,["prefixCls","className","type","icon","content"]),{getPrefixCls:ki}=V.useContext(oe.E_),Fa=ln||ki("message"),sa=(0,_n.Z)(Fa),[vo,Ro,Za]=mo(Fa,sa);return vo(V.createElement(Ct,Object.assign({},Ii,{prefixCls:Fa,className:Xe()(Yn,Ro,`${Fa}-notice-pure-panel`,Za,sa),eventKey:"pure",duration:null,content:V.createElement(gr,{prefixCls:Fa,type:Wn,icon:Tn},ai)})))},Qa=_(39694),oa=_(58068);function ji(nn,ln){return{motionName:ln!=null?ln:`${nn}-move-up`}}function so(nn){let ln;const Yn=new Promise(Tn=>{ln=nn(()=>{Tn(!0)})}),Wn=()=>{ln==null||ln()};return Wn.then=(Tn,ai)=>Yn.then(Tn,ai),Wn.promise=Yn,Wn}var ei=function(nn,ln){var Yn={};for(var Wn in nn)Object.prototype.hasOwnProperty.call(nn,Wn)&&ln.indexOf(Wn)<0&&(Yn[Wn]=nn[Wn]);if(nn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tn=0,Wn=Object.getOwnPropertySymbols(nn);Tn{let{children:ln,prefixCls:Yn}=nn;const Wn=(0,_n.Z)(Yn),[Tn,ai,Ii]=mo(Yn,Wn);return Tn(V.createElement(at,{classNames:{list:Xe()(ai,Ii,Wn)}},ln))},pa=(nn,ln)=>{let{prefixCls:Yn,key:Wn}=ln;return V.createElement(da,{prefixCls:Yn,key:Wn},nn)},uo=V.forwardRef((nn,ln)=>{const{top:Yn,prefixCls:Wn,getContainer:Tn,maxCount:ai,duration:Ii=Jn,rtl:ki,transitionName:Fa,onAllRemoved:sa}=nn,{getPrefixCls:vo,getPopupContainer:Ro,message:Za,direction:Os}=V.useContext(oe.E_),ro=Wn||vo("message"),Tu=()=>({left:"50%",transform:"translateX(-50%)",top:Yn!=null?Yn:Kn}),Do=()=>Xe()({[`${ro}-rtl`]:ki!=null?ki:Os==="rtl"}),qa=()=>ji(ro,Fa),ss=V.createElement("span",{className:`${ro}-close-x`},V.createElement(Qa.Z,{className:`${ro}-close-icon`})),[ca,Mn]=_i({prefixCls:ro,style:Tu,className:Do,motion:qa,closable:!1,closeIcon:ss,duration:Ii,getContainer:()=>(Tn==null?void 0:Tn())||(Ro==null?void 0:Ro())||document.body,maxCount:ai,onAllRemoved:sa,renderNotifications:pa});return V.useImperativeHandle(ln,()=>Object.assign(Object.assign({},ca),{prefixCls:ro,message:Za})),Mn});let Ir=0;function bt(nn){const ln=V.useRef(null),Yn=(0,oa.ln)("Message");return[V.useMemo(()=>{const Tn=sa=>{var vo;(vo=ln.current)===null||vo===void 0||vo.close(sa)},ai=sa=>{if(!ln.current){const Hs=()=>{};return Hs.then=()=>{},Hs}const{open:vo,prefixCls:Ro,message:Za}=ln.current,Os=`${Ro}-notice`,{content:ro,icon:Tu,type:Do,key:qa,className:ss,style:ca,onClose:Mn}=sa,wi=ei(sa,["content","icon","type","key","className","style","onClose"]);let Fu=qa;return Fu==null&&(Ir+=1,Fu=`antd-message-${Ir}`),so(Hs=>(vo(Object.assign(Object.assign({},wi),{key:Fu,content:V.createElement(gr,{prefixCls:Ro,type:Do,icon:Tu},ro),placement:"top",className:Xe()(Do&&`${Os}-${Do}`,ss,Za==null?void 0:Za.className),style:Object.assign(Object.assign({},Za==null?void 0:Za.style),ca),onClose:()=>{Mn==null||Mn(),Hs()}})),()=>{Tn(Fu)}))},ki={open:ai,destroy:sa=>{var vo;sa!==void 0?Tn(sa):(vo=ln.current)===null||vo===void 0||vo.destroy()}};return["info","success","warning","error","loading"].forEach(sa=>{const vo=(Ro,Za,Os)=>{let ro;Ro&&typeof Ro=="object"&&"content"in Ro?ro=Ro:ro={content:Ro};let Tu,Do;typeof Za=="function"?Do=Za:(Tu=Za,Do=Os);const qa=Object.assign(Object.assign({onClose:Do,duration:Tu},ro),{type:sa});return ai(qa)};ki[sa]=vo}),ki},[]),V.createElement(uo,Object.assign({key:"message-holder"},nn,{ref:ln}))]}function Yt(nn){return bt(nn)}let Pt=null,xr=nn=>nn(),Tr=[],hn={};function Cn(){const{getContainer:nn,duration:ln,rtl:Yn,maxCount:Wn,top:Tn}=hn,ai=(nn==null?void 0:nn())||document.body;return{getContainer:()=>ai,duration:ln,rtl:Yn,maxCount:Wn,top:Tn}}const tr=V.forwardRef((nn,ln)=>{const{messageConfig:Yn,sync:Wn}=nn,{getPrefixCls:Tn}=(0,V.useContext)(oe.E_),ai=hn.prefixCls||Tn("message"),Ii=(0,V.useContext)(d),[ki,Fa]=bt(Object.assign(Object.assign(Object.assign({},Yn),{prefixCls:ai}),Ii.message));return V.useImperativeHandle(ln,()=>{const sa=Object.assign({},ki);return Object.keys(sa).forEach(vo=>{sa[vo]=function(){return Wn(),ki[vo].apply(ki,arguments)}}),{instance:sa,sync:Wn}}),Fa}),jt=V.forwardRef((nn,ln)=>{const[Yn,Wn]=V.useState(Cn),Tn=()=>{Wn(Cn)};V.useEffect(Tn,[]);const ai=(0,re.w6)(),Ii=ai.getRootPrefixCls(),ki=ai.getIconPrefixCls(),Fa=ai.getTheme(),sa=V.createElement(tr,{ref:ln,sync:Tn,messageConfig:Yn});return V.createElement(re.ZP,{prefixCls:Ii,iconPrefixCls:ki,theme:Fa},ai.holderRender?ai.holderRender(sa):sa)});function He(){if(!Pt){const nn=document.createDocumentFragment(),ln={fragment:nn};Pt=ln,xr(()=>{(0,y.s)(V.createElement(jt,{ref:Yn=>{const{instance:Wn,sync:Tn}=Yn||{};Promise.resolve().then(()=>{!ln.instance&&Wn&&(ln.instance=Wn,ln.sync=Tn,He())})}}),nn)});return}Pt.instance&&(Tr.forEach(nn=>{const{type:ln,skipped:Yn}=nn;if(!Yn)switch(ln){case"open":{xr(()=>{const Wn=Pt.instance.open(Object.assign(Object.assign({},hn),nn.config));Wn==null||Wn.then(nn.resolve),nn.setCloseFn(Wn)});break}case"destroy":xr(()=>{Pt==null||Pt.instance.destroy(nn.key)});break;default:xr(()=>{var Wn;const Tn=(Wn=Pt.instance)[ln].apply(Wn,(0,M.Z)(nn.args));Tn==null||Tn.then(nn.resolve),nn.setCloseFn(Tn)})}}),Tr=[])}function We(nn){hn=Object.assign(Object.assign({},hn),nn),xr(()=>{var ln;(ln=Pt==null?void 0:Pt.sync)===null||ln===void 0||ln.call(Pt)})}function _t(nn){const ln=so(Yn=>{let Wn;const Tn={type:"open",config:nn,resolve:Yn,setCloseFn:ai=>{Wn=ai}};return Tr.push(Tn),()=>{Wn?xr(()=>{Wn()}):Tn.skipped=!0}});return He(),ln}function Zt(nn,ln){const Yn=(0,re.w6)(),Wn=so(Tn=>{let ai;const Ii={type:nn,args:ln,resolve:Tn,setCloseFn:ki=>{ai=ki}};return Tr.push(Ii),()=>{ai?xr(()=>{ai()}):Ii.skipped=!0}});return He(),Wn}function rr(nn){Tr.push({type:"destroy",key:nn}),He()}const fr=["success","info","warning","error","loading"],Qe={open:_t,destroy:rr,config:We,useMessage:Yt,_InternalPanelDoNotUseOrYouWillBeFired:co};fr.forEach(nn=>{Qe[nn]=function(){for(var ln=arguments.length,Yn=new Array(ln),Wn=0;Wn{};let jr=null,on=null;var ri=Qe},51877:function(Ke,ye,_){"use strict";_.d(ye,{A:function(){return X},f:function(){return $}});var M=_(69502);let V=Object.assign({},M.Z.Modal),y=[];const d=()=>y.reduce((oe,re)=>Object.assign(Object.assign({},oe),re),M.Z.Modal);function $(oe){if(oe){const re=Object.assign({},oe);return y.push(re),V=d(),()=>{y=y.filter(le=>le!==re),V=d()}}V=Object.assign({},M.Z.Modal)}function X(){return V}},97881:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Yt}});var M=_(77617),V=_(92310),y=_.n(V),d=_(53662),$=_(99468),X=_(66187),oe=_(47562),re=_(94379),le=_(75490),ce=_(11908),Ie=_(32095),we=_(64993),Ee=_(20573),Xe=()=>{const[,Pt]=(0,Ee.ZP)(),Tr=new we.C(Pt.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return M.createElement("svg",{style:Tr,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},M.createElement("g",{fill:"none",fillRule:"evenodd"},M.createElement("g",{transform:"translate(24 31.67)"},M.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),M.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),M.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),M.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),M.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),M.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),M.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},M.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),M.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Ge=()=>{const[,Pt]=(0,Ee.ZP)(),{colorFill:xr,colorFillTertiary:Tr,colorFillQuaternary:hn,colorBgContainer:Cn}=Pt,{borderColor:tr,shadowColor:jt,contentColor:He}=(0,M.useMemo)(()=>({borderColor:new we.C(xr).onBackground(Cn).toHexShortString(),shadowColor:new we.C(Tr).onBackground(Cn).toHexShortString(),contentColor:new we.C(hn).onBackground(Cn).toHexShortString()}),[xr,Tr,hn,Cn]);return M.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},M.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},M.createElement("ellipse",{fill:jt,cx:"32",cy:"33",rx:"32",ry:"7"}),M.createElement("g",{fillRule:"nonzero",stroke:tr},M.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),M.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:He}))))},lt=_(93319),Ye=_(12228);const It=Pt=>{const{componentCls:xr,margin:Tr,marginXS:hn,marginXL:Cn,fontSize:tr,lineHeight:jt}=Pt;return{[xr]:{marginInline:hn,fontSize:tr,lineHeight:jt,textAlign:"center",[`${xr}-image`]:{height:Pt.emptyImgHeight,marginBottom:hn,opacity:Pt.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${xr}-description`]:{color:Pt.colorText},[`${xr}-footer`]:{marginTop:Tr},"&-normal":{marginBlock:Cn,color:Pt.colorTextDisabled,[`${xr}-description`]:{color:Pt.colorTextDisabled},[`${xr}-image`]:{height:Pt.emptyImgHeightMD}},"&-small":{marginBlock:hn,color:Pt.colorTextDisabled,[`${xr}-image`]:{height:Pt.emptyImgHeightSM}}}}};var At=(0,lt.I$)("Empty",Pt=>{const{componentCls:xr,controlHeightLG:Tr,calc:hn}=Pt,Cn=(0,Ye.TS)(Pt,{emptyImgCls:`${xr}-img`,emptyImgHeight:hn(Tr).mul(2.5).equal(),emptyImgHeightMD:Tr,emptyImgHeightSM:hn(Tr).mul(.875).equal()});return[It(Cn)]}),Ue=function(Pt,xr){var Tr={};for(var hn in Pt)Object.prototype.hasOwnProperty.call(Pt,hn)&&xr.indexOf(hn)<0&&(Tr[hn]=Pt[hn]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Cn=0,hn=Object.getOwnPropertySymbols(Pt);Cn{var{className:xr,rootClassName:Tr,prefixCls:hn,image:Cn=rt,description:tr,children:jt,imageStyle:He,style:We}=Pt,_t=Ue(Pt,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Zt,direction:rr,empty:fr}=M.useContext(ce.E_),mr=Zt("empty",hn),[Qe,er,jr]=At(mr),[on]=(0,Ie.Z)("Empty"),ri=typeof tr!="undefined"?tr:on==null?void 0:on.description,nn=typeof ri=="string"?ri:"empty";let ln=null;return typeof Cn=="string"?ln=M.createElement("img",{alt:nn,src:Cn}):ln=Cn,Qe(M.createElement("div",Object.assign({className:y()(er,jr,mr,fr==null?void 0:fr.className,{[`${mr}-normal`]:Cn===Ze,[`${mr}-rtl`]:rr==="rtl"},xr,Tr),style:Object.assign(Object.assign({},fr==null?void 0:fr.style),We)},_t),M.createElement("div",{className:`${mr}-image`,style:He},ln),ri&&M.createElement("div",{className:`${mr}-description`},ri),jt&&M.createElement("div",{className:`${mr}-footer`},jt)))};Ct.PRESENTED_IMAGE_DEFAULT=rt,Ct.PRESENTED_IMAGE_SIMPLE=Ze;var st=Ct,at=Pt=>{const{componentName:xr}=Pt,{getPrefixCls:Tr}=(0,M.useContext)(ce.E_),hn=Tr("empty");switch(xr){case"Table":case"List":return M.createElement(st,{image:st.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return M.createElement(st,{image:st.PRESENTED_IMAGE_SIMPLE,className:`${hn}-small`});default:return M.createElement(st,null)}},mt=_(50138),Mt=_(76135),Me=_(15550),Ht=_(53615),Rt=_(53792),vt=_(53580);const Je=Pt=>{const Tr={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Pt==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},Tr),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Tr),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Tr),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Tr),{points:["br","tr"],offset:[0,-4]})}};function Ce(Pt,xr){return Pt||Je(xr)}var pt=Ce,et=_(75199),br=_(5283),Jt=_(29412),Vr=_(70914);const gn=Pt=>{const{optionHeight:xr,optionFontSize:Tr,optionLineHeight:hn,optionPadding:Cn}=Pt;return{position:"relative",display:"block",minHeight:xr,padding:Cn,color:Pt.colorText,fontWeight:"normal",fontSize:Tr,lineHeight:hn,boxSizing:"border-box"}};var _i=Pt=>{const{antCls:xr,componentCls:Tr}=Pt,hn=`${Tr}-item`,Cn=`&${xr}-slide-up-enter${xr}-slide-up-enter-active`,tr=`&${xr}-slide-up-appear${xr}-slide-up-appear-active`,jt=`&${xr}-slide-up-leave${xr}-slide-up-leave-active`,He=`${Tr}-dropdown-placement-`;return[{[`${Tr}-dropdown`]:Object.assign(Object.assign({},(0,et.Wf)(Pt)),{position:"absolute",top:-9999,zIndex:Pt.zIndexPopup,boxSizing:"border-box",padding:Pt.paddingXXS,overflow:"hidden",fontSize:Pt.fontSize,fontVariant:"initial",backgroundColor:Pt.colorBgElevated,borderRadius:Pt.borderRadiusLG,outline:"none",boxShadow:Pt.boxShadowSecondary,[` - ${Cn}${He}bottomLeft, - ${tr}${He}bottomLeft - `]:{animationName:Jt.fJ},[` - ${Cn}${He}topLeft, - ${tr}${He}topLeft, - ${Cn}${He}topRight, - ${tr}${He}topRight - `]:{animationName:Jt.Qt},[`${jt}${He}bottomLeft`]:{animationName:Jt.Uw},[` - ${jt}${He}topLeft, - ${jt}${He}topRight - `]:{animationName:Jt.ly},"&-hidden":{display:"none"},[`${hn}`]:Object.assign(Object.assign({},gn(Pt)),{cursor:"pointer",transition:`background ${Pt.motionDurationSlow} ease`,borderRadius:Pt.borderRadiusSM,"&-group":{color:Pt.colorTextDescription,fontSize:Pt.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},et.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${hn}-option-disabled)`]:{backgroundColor:Pt.optionActiveBg},[`&-selected:not(${hn}-option-disabled)`]:{color:Pt.optionSelectedColor,fontWeight:Pt.optionSelectedFontWeight,backgroundColor:Pt.optionSelectedBg,[`${hn}-option-state`]:{color:Pt.colorPrimary},[`&:has(+ ${hn}-option-selected:not(${hn}-option-disabled))`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${hn}-option-selected:not(${hn}-option-disabled)`]:{borderStartStartRadius:0,borderStartEndRadius:0}}},"&-disabled":{[`&${hn}-option-selected`]:{backgroundColor:Pt.colorBgContainerDisabled},color:Pt.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Pt.calc(Pt.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},gn(Pt)),{color:Pt.colorTextDisabled})}),"&-rtl":{direction:"rtl"}})},(0,Jt.oN)(Pt,"slide-up"),(0,Jt.oN)(Pt,"slide-down"),(0,Vr.Fm)(Pt,"move-up"),(0,Vr.Fm)(Pt,"move-down")]},Hn=_(40183),Ln=_(78600);function Ia(Pt,xr){const{componentCls:Tr,inputPaddingHorizontalBase:hn,borderRadius:Cn}=Pt,tr=Pt.calc(Pt.controlHeight).sub(Pt.calc(Pt.lineWidth).mul(2)).equal(),jt=xr?`${Tr}-${xr}`:"";return{[`${Tr}-single${jt}`]:{fontSize:Pt.fontSize,height:Pt.controlHeight,[`${Tr}-selector`]:Object.assign(Object.assign({},(0,et.Wf)(Pt,!0)),{display:"flex",borderRadius:Cn,[`${Tr}-selection-search`]:{position:"absolute",top:0,insetInlineStart:hn,insetInlineEnd:hn,bottom:0,"&-input":{width:"100%",WebkitAppearance:"textfield"}},[` - ${Tr}-selection-item, - ${Tr}-selection-placeholder - `]:{padding:0,lineHeight:(0,Ln.bf)(tr),transition:`all ${Pt.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${Tr}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Tr}-selection-item:empty:after`,`${Tr}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` - &${Tr}-show-arrow ${Tr}-selection-item, - &${Tr}-show-arrow ${Tr}-selection-placeholder - `]:{paddingInlineEnd:Pt.showArrowPaddingInlineEnd},[`&${Tr}-open ${Tr}-selection-item`]:{color:Pt.colorTextPlaceholder},[`&:not(${Tr}-customize-input)`]:{[`${Tr}-selector`]:{width:"100%",height:"100%",padding:`0 ${(0,Ln.bf)(hn)}`,[`${Tr}-selection-search-input`]:{height:tr},"&:after":{lineHeight:(0,Ln.bf)(tr)}}},[`&${Tr}-customize-input`]:{[`${Tr}-selector`]:{"&:after":{display:"none"},[`${Tr}-selection-search`]:{position:"static",width:"100%"},[`${Tr}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${(0,Ln.bf)(hn)}`,"&:after":{display:"none"}}}}}}}function Zi(Pt){const{componentCls:xr}=Pt,Tr=Pt.calc(Pt.controlPaddingHorizontalSM).sub(Pt.lineWidth).equal();return[Ia(Pt),Ia((0,Ye.TS)(Pt,{controlHeight:Pt.controlHeightSM,borderRadius:Pt.borderRadiusSM}),"sm"),{[`${xr}-single${xr}-sm`]:{[`&:not(${xr}-customize-input)`]:{[`${xr}-selection-search`]:{insetInlineStart:Tr,insetInlineEnd:Tr},[`${xr}-selector`]:{padding:`0 ${(0,Ln.bf)(Tr)}`},[`&${xr}-show-arrow ${xr}-selection-search`]:{insetInlineEnd:Pt.calc(Tr).add(Pt.calc(Pt.fontSize).mul(1.5)).equal()},[` - &${xr}-show-arrow ${xr}-selection-item, - &${xr}-show-arrow ${xr}-selection-placeholder - `]:{paddingInlineEnd:Pt.calc(Pt.fontSize).mul(1.5).equal()}}}},Ia((0,Ye.TS)(Pt,{controlHeight:Pt.singleItemHeightLG,fontSize:Pt.fontSizeLG,borderRadius:Pt.borderRadiusLG}),"lg")]}const Ua=Pt=>{const{fontSize:xr,lineHeight:Tr,controlHeight:hn,controlPaddingHorizontal:Cn,zIndexPopupBase:tr,colorText:jt,fontWeightStrong:He,controlItemBgActive:We,controlItemBgHover:_t,colorBgContainer:Zt,colorFillSecondary:rr,controlHeightLG:fr,controlHeightSM:mr,colorBgContainerDisabled:Qe,colorTextDisabled:er}=Pt;return{zIndexPopup:tr+50,optionSelectedColor:jt,optionSelectedFontWeight:He,optionSelectedBg:We,optionActiveBg:_t,optionPadding:`${(hn-xr*Tr)/2}px ${Cn}px`,optionFontSize:xr,optionLineHeight:Tr,optionHeight:hn,selectorBg:Zt,clearBg:Zt,singleItemHeightLG:fr,multipleItemBg:rr,multipleItemBorderColor:"transparent",multipleItemHeight:mr,multipleItemHeightLG:hn,multipleSelectorBgDisabled:Qe,multipleItemColorDisabled:er,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(Pt.fontSize*1.25)}},fa=(Pt,xr)=>{const{componentCls:Tr,antCls:hn,controlOutlineWidth:Cn}=Pt;return{[`&:not(${Tr}-customize-input) ${Tr}-selector`]:{border:`${(0,Ln.bf)(Pt.lineWidth)} ${Pt.lineType} ${xr.borderColor}`,background:Pt.selectorBg},[`&:not(${Tr}-disabled):not(${Tr}-customize-input):not(${hn}-pagination-size-changer)`]:{[`&:hover ${Tr}-selector`]:{borderColor:xr.hoverBorderHover},[`${Tr}-focused& ${Tr}-selector`]:{borderColor:xr.activeBorderColor,boxShadow:`0 0 0 ${(0,Ln.bf)(Cn)} ${xr.activeShadowColor}`,outline:0}}}},ka=(Pt,xr)=>({[`&${Pt.componentCls}-status-${xr.status}`]:Object.assign({},fa(Pt,xr))}),mo=Pt=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},fa(Pt,{borderColor:Pt.colorBorder,hoverBorderHover:Pt.colorPrimaryHover,activeBorderColor:Pt.colorPrimary,activeShadowColor:Pt.controlOutline})),ka(Pt,{status:"error",borderColor:Pt.colorError,hoverBorderHover:Pt.colorErrorHover,activeBorderColor:Pt.colorError,activeShadowColor:Pt.colorErrorOutline})),ka(Pt,{status:"warning",borderColor:Pt.colorWarning,hoverBorderHover:Pt.colorWarningHover,activeBorderColor:Pt.colorWarning,activeShadowColor:Pt.colorWarningOutline})),{[`&${Pt.componentCls}-disabled`]:{[`&:not(${Pt.componentCls}-customize-input) ${Pt.componentCls}-selector`]:{background:Pt.colorBgContainerDisabled,color:Pt.colorTextDisabled}},[`&${Pt.componentCls}-multiple ${Pt.componentCls}-selection-item`]:{background:Pt.multipleItemBg,border:`${(0,Ln.bf)(Pt.lineWidth)} ${Pt.lineType} ${Pt.multipleItemBorderColor}`}})}),_n=(Pt,xr)=>{const{componentCls:Tr,antCls:hn}=Pt;return{[`&:not(${Tr}-customize-input) ${Tr}-selector`]:{background:xr.bg,border:`${(0,Ln.bf)(Pt.lineWidth)} ${Pt.lineType} transparent`,color:xr.color},[`&:not(${Tr}-disabled):not(${Tr}-customize-input):not(${hn}-pagination-size-changer)`]:{[`&:hover ${Tr}-selector`]:{background:xr.hoverBg},[`${Tr}-focused& ${Tr}-selector`]:{background:Pt.selectorBg,borderColor:xr.activeBorderColor,outline:0}}}},yi=(Pt,xr)=>({[`&${Pt.componentCls}-status-${xr.status}`]:Object.assign({},_n(Pt,xr))}),Zn=Pt=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},_n(Pt,{bg:Pt.colorFillTertiary,hoverBg:Pt.colorFillSecondary,activeBorderColor:Pt.colorPrimary,color:Pt.colorText})),yi(Pt,{status:"error",bg:Pt.colorErrorBg,hoverBg:Pt.colorErrorBgHover,activeBorderColor:Pt.colorError,color:Pt.colorError})),yi(Pt,{status:"warning",bg:Pt.colorWarningBg,hoverBg:Pt.colorWarningBgHover,activeBorderColor:Pt.colorWarning,color:Pt.colorWarning})),{[`&${Pt.componentCls}-disabled`]:{[`&:not(${Pt.componentCls}-customize-input) ${Pt.componentCls}-selector`]:{borderColor:Pt.colorBorder,background:Pt.colorBgContainerDisabled,color:Pt.colorTextDisabled}},[`&${Pt.componentCls}-multiple ${Pt.componentCls}-selection-item`]:{background:Pt.colorBgContainer,border:`${(0,Ln.bf)(Pt.lineWidth)} ${Pt.lineType} ${Pt.colorSplit}`}})}),gr=Pt=>({"&-borderless":{[`${Pt.componentCls}-selector`]:{background:"transparent",borderColor:"transparent"},[`&${Pt.componentCls}-disabled`]:{[`&:not(${Pt.componentCls}-customize-input) ${Pt.componentCls}-selector`]:{color:Pt.colorTextDisabled}},[`&${Pt.componentCls}-multiple ${Pt.componentCls}-selection-item`]:{background:Pt.multipleItemBg,border:`${(0,Ln.bf)(Pt.lineWidth)} ${Pt.lineType} ${Pt.multipleItemBorderColor}`}}});var co=Pt=>({[Pt.componentCls]:Object.assign(Object.assign(Object.assign({},mo(Pt)),Zn(Pt)),gr(Pt))});const Qa=Pt=>{const{componentCls:xr}=Pt;return{position:"relative",transition:`all ${Pt.motionDurationMid} ${Pt.motionEaseInOut}`,input:{cursor:"pointer"},[`${xr}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${xr}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},oa=Pt=>{const{componentCls:xr}=Pt;return{[`${xr}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ji=Pt=>{const{antCls:xr,componentCls:Tr,inputPaddingHorizontalBase:hn,iconCls:Cn}=Pt;return{[Tr]:Object.assign(Object.assign({},(0,et.Wf)(Pt)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Tr}-customize-input) ${Tr}-selector`]:Object.assign(Object.assign({},Qa(Pt)),oa(Pt)),[`${Tr}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},et.vS),{[`> ${xr}-typography`]:{display:"inline"}}),[`${Tr}-selection-placeholder`]:Object.assign(Object.assign({},et.vS),{flex:1,color:Pt.colorTextPlaceholder,pointerEvents:"none"}),[`${Tr}-arrow`]:Object.assign(Object.assign({},(0,et.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:hn,height:Pt.fontSizeIcon,marginTop:Pt.calc(Pt.fontSizeIcon).mul(-1).div(2).equal(),color:Pt.colorTextQuaternary,fontSize:Pt.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${Pt.motionDurationSlow} ease`,[Cn]:{verticalAlign:"top",transition:`transform ${Pt.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Tr}-suffix)`]:{pointerEvents:"auto"}},[`${Tr}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Tr}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:hn,zIndex:1,display:"inline-block",width:Pt.fontSizeIcon,height:Pt.fontSizeIcon,marginTop:Pt.calc(Pt.fontSizeIcon).mul(-1).div(2).equal(),color:Pt.colorTextQuaternary,fontSize:Pt.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${Pt.motionDurationMid} ease, opacity ${Pt.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Pt.colorTextTertiary}},"&:hover":{[`${Tr}-clear`]:{opacity:1},[`${Tr}-arrow:not(:last-child)`]:{opacity:0}}}),[`${Tr}-has-feedback`]:{[`${Tr}-clear`]:{insetInlineEnd:Pt.calc(hn).add(Pt.fontSize).add(Pt.paddingXS).equal()}}}},so=Pt=>{const{componentCls:xr}=Pt;return[{[xr]:{[`&${xr}-in-form-item`]:{width:"100%"}}},ji(Pt),Zi(Pt),(0,Hn.Z)(Pt),_i(Pt),{[`${xr}-rtl`]:{direction:"rtl"}},(0,br.c)(Pt,{borderElCls:`${xr}-selector`,focusElCls:`${xr}-focused`})]};var ei=(0,lt.I$)("Select",(Pt,xr)=>{let{rootPrefixCls:Tr}=xr;const hn=(0,Ye.TS)(Pt,{rootPrefixCls:Tr,inputPaddingHorizontalBase:Pt.calc(Pt.paddingSM).sub(1).equal(),multipleSelectItemHeight:Pt.multipleItemHeight,selectHeight:Pt.controlHeight});return[so(hn),co(hn)]},Ua,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),Kn=_(74615);function Jn(Pt,xr){return xr!==void 0?xr:Pt!==null}var da=function(Pt,xr){var Tr={};for(var hn in Pt)Object.prototype.hasOwnProperty.call(Pt,hn)&&xr.indexOf(hn)<0&&(Tr[hn]=Pt[hn]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Cn=0,hn=Object.getOwnPropertySymbols(Pt);Cn{var Tr;const{prefixCls:hn,bordered:Cn,className:tr,rootClassName:jt,getPopupContainer:He,popupClassName:We,dropdownClassName:_t,listHeight:Zt=256,placement:rr,listItemHeight:fr,size:mr,disabled:Qe,notFoundContent:er,status:jr,builtinPlacements:on,dropdownMatchSelectWidth:ri,popupMatchSelectWidth:nn,direction:ln,style:Yn,allowClear:Wn,variant:Tn,dropdownStyle:ai,transitionName:Ii,tagRender:ki,maxCount:Fa}=Pt,sa=da(Pt,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount"]),{getPopupContainer:vo,getPrefixCls:Ro,renderEmpty:Za,direction:Os,virtual:ro,popupMatchSelectWidth:Tu,popupOverflow:Do,select:qa}=M.useContext(ce.E_),[,ss]=(0,Ee.ZP)(),ca=fr!=null?fr:ss==null?void 0:ss.controlHeight,Mn=Ro("select",hn),wi=Ro(),Fu=ln!=null?ln:Os,{compactSize:Hs,compactItemClassnames:us}=(0,vt.ri)(Mn,Fu),[Ts,Qs]=(0,Rt.Z)(Tn,Cn),ko=(0,Mt.Z)(Mn),[_o,Js,fo]=ei(Mn,ko),El=M.useMemo(()=>{const{mode:lr}=Pt;if(lr!=="combobox")return lr===pa?"combobox":lr},[Pt.mode]),ju=El==="multiple"||El==="tags",_l=Jn(Pt.suffixIcon,Pt.showArrow),Es=(Tr=nn!=null?nn:ri)!==null&&Tr!==void 0?Tr:Tu,{status:yc,hasFeedback:Vl,isFormItemInput:tc,feedbackIcon:Au}=M.useContext(Ht.aM),On=(0,le.F)(yc,jr);let tn;er!==void 0?tn=er:El==="combobox"?tn=null:tn=(Za==null?void 0:Za("Select"))||M.createElement(at,{componentName:"Select"});const{suffixIcon:Pi,itemIcon:ut,removeIcon:Wt,clearIcon:wr}=(0,Kn.Z)(Object.assign(Object.assign({},sa),{multiple:ju,hasFeedback:Vl,feedbackIcon:Au,showSuffixIcon:_l,prefixCls:Mn,componentName:"Select"})),bn=Wn===!0?{clearIcon:wr}:Wn,vn=(0,$.Z)(sa,["suffixIcon","itemIcon"]),Xi=y()(We||_t,{[`${Mn}-dropdown-${Fu}`]:Fu==="rtl"},jt,fo,ko,Js),ya=(0,Me.Z)(lr=>{var $r;return($r=mr!=null?mr:Hs)!==null&&$r!==void 0?$r:lr}),Bo=M.useContext(mt.Z),xn=Qe!=null?Qe:Bo,zr=y()({[`${Mn}-lg`]:ya==="large",[`${Mn}-sm`]:ya==="small",[`${Mn}-rtl`]:Fu==="rtl",[`${Mn}-${Ts}`]:Qs,[`${Mn}-in-form-item`]:tc},(0,le.Z)(Mn,On,Vl),us,qa==null?void 0:qa.className,tr,jt,fo,ko,Js),xt=M.useMemo(()=>rr!==void 0?rr:Fu==="rtl"?"bottomRight":"bottomLeft",[rr,Fu]),[Nt]=(0,X.Cn)("SelectLike",ai==null?void 0:ai.zIndex);return _o(M.createElement(d.ZP,Object.assign({ref:xr,virtual:ro,showSearch:qa==null?void 0:qa.showSearch},vn,{style:Object.assign(Object.assign({},qa==null?void 0:qa.style),Yn),dropdownMatchSelectWidth:Es,transitionName:(0,oe.m)(wi,"slide-up",Ii),builtinPlacements:pt(on,Do),listHeight:Zt,listItemHeight:ca,mode:El,prefixCls:Mn,placement:xt,direction:Fu,suffixIcon:Pi,menuItemSelectedIcon:ut,removeIcon:Wt,allowClear:bn,notFoundContent:tn,className:zr,getPopupContainer:He||vo,dropdownClassName:Xi,disabled:xn,dropdownStyle:Object.assign(Object.assign({},ai),{zIndex:Nt}),maxCount:ju?Fa:void 0,tagRender:ju?ki:void 0})))},Ir=M.forwardRef(uo),bt=(0,re.Z)(Ir);Ir.SECRET_COMBOBOX_MODE_DO_NOT_USE=pa,Ir.Option=d.Wx,Ir.OptGroup=d.Xo,Ir._InternalPanelDoNotUseOrYouWillBeFired=bt;var Yt=Ir},40183:function(Ke,ye,_){"use strict";_.d(ye,{j:function(){return X}});var M=_(78600),V=_(75199),y=_(12228);const d=2,$=le=>{const{multipleSelectItemHeight:ce,selectHeight:Ie,lineWidth:we}=le;return le.calc(Ie).sub(ce).div(2).sub(we).equal()},X=(le,ce)=>{const{componentCls:Ie,iconCls:we}=le,Ee=`${Ie}-selection-overflow`,qe=le.multipleSelectItemHeight,Xe=$(le),ft=ce?`${Ie}-${ce}`:"";return{[`${Ie}-multiple${ft}`]:{[Ee]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ie}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",height:"100%",paddingInline:le.calc(d).mul(2).equal(),paddingBlock:le.calc(Xe).sub(d).equal(),borderRadius:le.borderRadius,[`${Ie}-disabled&`]:{background:le.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${(0,M.bf)(d)} 0`,lineHeight:(0,M.bf)(qe),visibility:"hidden",content:'"\\a0"'}},[`${Ie}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:qe,marginTop:d,marginBottom:d,lineHeight:(0,M.bf)(le.calc(qe).sub(le.calc(le.lineWidth).mul(2)).equal()),borderRadius:le.borderRadiusSM,cursor:"default",transition:`font-size ${le.motionDurationSlow}, line-height ${le.motionDurationSlow}, height ${le.motionDurationSlow}`,marginInlineEnd:le.calc(d).mul(2).equal(),paddingInlineStart:le.paddingXS,paddingInlineEnd:le.calc(le.paddingXS).div(2).equal(),[`${Ie}-disabled&`]:{color:le.multipleItemColorDisabled,borderColor:le.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:le.calc(le.paddingXS).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,V.Ro)()),{display:"inline-flex",alignItems:"center",color:le.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${we}`]:{verticalAlign:"-0.2em"},"&:hover":{color:le.colorIconHover}})},[`${Ee}-item + ${Ee}-item`]:{[`${Ie}-selection-search`]:{marginInlineStart:0}},[`${Ee}-item-suffix`]:{height:"100%"},[`${Ie}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:le.calc(le.inputPaddingHorizontalBase).sub(Xe).equal(),[` - &-input, - &-mirror - `]:{height:qe,fontFamily:le.fontFamily,lineHeight:(0,M.bf)(qe),transition:`all ${le.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ie}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:le.inputPaddingHorizontalBase,insetInlineEnd:le.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${le.motionDurationSlow}`}}}};function oe(le,ce){const{componentCls:Ie}=le,we=ce?`${Ie}-${ce}`:"",Ee={[`${Ie}-multiple${we}`]:{fontSize:le.fontSize,[`${Ie}-selector`]:{[`${Ie}-show-search&`]:{cursor:"text"}},[` - &${Ie}-show-arrow ${Ie}-selector, - &${Ie}-allow-clear ${Ie}-selector - `]:{paddingInlineEnd:le.calc(le.fontSizeIcon).add(le.controlPaddingHorizontal).equal()}}};return[X(le,ce),Ee]}const re=le=>{const{componentCls:ce}=le,Ie=(0,y.TS)(le,{selectHeight:le.controlHeightSM,multipleSelectItemHeight:le.controlHeightXS,borderRadius:le.borderRadiusSM,borderRadiusSM:le.borderRadiusXS}),we=(0,y.TS)(le,{fontSize:le.fontSizeLG,selectHeight:le.controlHeightLG,multipleSelectItemHeight:le.multipleItemHeightLG,borderRadius:le.borderRadiusLG,borderRadiusSM:le.borderRadius});return[oe(le),oe(Ie,"sm"),{[`${ce}-multiple${ce}-sm`]:{[`${ce}-selection-placeholder`]:{insetInline:le.calc(le.controlPaddingHorizontalSM).sub(le.lineWidth).equal()},[`${ce}-selection-search`]:{marginInlineStart:2}}},oe(we,"lg")]};ye.Z=re},74615:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Ye}});var M=_(77617),V=_(79384),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},d=y,$=_(12213),X=function(At,Ue){return M.createElement($.Z,(0,V.Z)({},At,{ref:Ue,icon:d}))},oe=M.forwardRef(X),re=_(43418),le=_(39694),ce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},Ie=ce,we=function(At,Ue){return M.createElement($.Z,(0,V.Z)({},At,{ref:Ue,icon:Ie}))},Ee=M.forwardRef(we),qe=_(20555),Xe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ft=Xe,Ge=function(At,Ue){return M.createElement($.Z,(0,V.Z)({},At,{ref:Ue,icon:ft}))},lt=M.forwardRef(Ge);function Ye(It){let{suffixIcon:At,clearIcon:Ue,menuItemSelectedIcon:rt,removeIcon:Ze,loading:Ct,multiple:st,hasFeedback:Et,prefixCls:at,showSuffixIcon:mt,feedbackIcon:Mt,showArrow:Me,componentName:Ht}=It;const Rt=Ue!=null?Ue:M.createElement(re.Z,null),vt=et=>At===null&&!Et&&!Me?null:M.createElement(M.Fragment,null,mt!==!1&&et,Et&&Mt);let Je=null;if(At!==void 0)Je=vt(At);else if(Ct)Je=vt(M.createElement(qe.Z,{spin:!0}));else{const et=`${at}-suffix`;Je=br=>{let{open:Jt,showSearch:Vr}=br;return vt(Jt&&Vr?M.createElement(lt,{className:et}):M.createElement(Ee,{className:et}))}}let Ce=null;rt!==void 0?Ce=rt:st?Ce=M.createElement(oe,null):Ce=null;let pt=null;return Ze!==void 0?pt=Ze:pt=M.createElement(le.Z,null),{clearIcon:Rt,suffixIcon:Je,itemIcon:Ce,removeIcon:pt}}},53580:function(Ke,ye,_){"use strict";_.d(ye,{BR:function(){return re},ri:function(){return oe}});var M=_(92310),V=_.n(M),y=_(45659),d=_(77617),$=function(we,Ee){var qe={};for(var Xe in we)Object.prototype.hasOwnProperty.call(we,Xe)&&Ee.indexOf(Xe)<0&&(qe[Xe]=we[Xe]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,Xe=Object.getOwnPropertySymbols(we);ft{const qe=d.useContext(X),Xe=d.useMemo(()=>{if(!qe)return"";const{compactDirection:ft,isFirstItem:Ge,isLastItem:lt}=qe,Ye=ft==="vertical"?"-vertical-":"-";return V()(`${we}-compact${Ye}item`,{[`${we}-compact${Ye}first-item`]:Ge,[`${we}-compact${Ye}last-item`]:lt,[`${we}-compact${Ye}item-rtl`]:Ee==="rtl"})},[we,Ee,qe]);return{compactSize:qe==null?void 0:qe.compactSize,compactDirection:qe==null?void 0:qe.compactDirection,compactItemClassnames:Xe}},re=we=>{let{children:Ee}=we;return d.createElement(X.Provider,{value:null},Ee)},le=we=>{var{children:Ee}=we,qe=$(we,["children"]);return React.createElement(X.Provider,{value:qe},Ee)},ce=we=>{const{getPrefixCls:Ee,direction:qe}=React.useContext(ConfigContext),{size:Xe,direction:ft,block:Ge,prefixCls:lt,className:Ye,rootClassName:It,children:At}=we,Ue=$(we,["size","direction","block","prefixCls","className","rootClassName","children"]),rt=useSize(Me=>Xe!=null?Xe:Me),Ze=Ee("space-compact",lt),[Ct,st]=useStyle(Ze),Et=classNames(Ze,st,{[`${Ze}-rtl`]:qe==="rtl",[`${Ze}-block`]:Ge,[`${Ze}-vertical`]:ft==="vertical"},Ye,It),at=React.useContext(X),mt=toArray(At),Mt=React.useMemo(()=>mt.map((Me,Ht)=>{const Rt=Me&&Me.key||`${Ze}-item-${Ht}`;return React.createElement(le,{key:Rt,compactSize:rt,compactDirection:ft,isFirstItem:Ht===0&&(!at||(at==null?void 0:at.isFirstItem)),isLastItem:Ht===mt.length-1&&(!at||(at==null?void 0:at.isLastItem))},Me)}),[Xe,mt,at]);return mt.length===0?null:Ct(React.createElement("div",Object.assign({className:Et},Ue),Mt))};var Ie=null},80658:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Ze}});var M=_(77617),V=_(92310),y=_.n(V),d=_(99468);function $(Ct,st,Et){var at=Et||{},mt=at.noTrailing,Mt=mt===void 0?!1:mt,Me=at.noLeading,Ht=Me===void 0?!1:Me,Rt=at.debounceMode,vt=Rt===void 0?void 0:Rt,Je,Ce=!1,pt=0;function et(){Je&&clearTimeout(Je)}function br(Vr){var gn=Vr||{},yn=gn.upcomingOnly,_i=yn===void 0?!1:yn;et(),Ce=!_i}function Jt(){for(var Vr=arguments.length,gn=new Array(Vr),yn=0;ynCt?Ht?(pt=Date.now(),Mt||(Je=setTimeout(vt?Ia:Ln,Ct))):Ln():Mt!==!0&&(Je=setTimeout(vt?Ia:Ln,vt===void 0?Ct-Hn:Ct))}return Jt.cancel=br,Jt}function X(Ct,st,Et){var at=Et||{},mt=at.atBegin,Mt=mt===void 0?!1:mt;return $(Ct,st,{debounceMode:Mt!==!1})}var oe=_(48894),re=_(11908),le=_(78600),ce=_(75199),Ie=_(93319),we=_(12228);const Ee=new le.E4("antSpinMove",{to:{opacity:1}}),qe=new le.E4("antRotate",{to:{transform:"rotate(405deg)"}}),Xe=Ct=>{const{componentCls:st,calc:Et}=Ct;return{[`${st}`]:Object.assign(Object.assign({},(0,ce.Wf)(Ct)),{position:"absolute",display:"none",color:Ct.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${Ct.motionDurationSlow} ${Ct.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},[`${st}-text`]:{fontSize:Ct.fontSize,paddingTop:Et(Et(Ct.dotSize).sub(Ct.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:Ct.colorBgMask,zIndex:Ct.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${Ct.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[`${st}-dot ${st}-dot-item`]:{backgroundColor:Ct.colorWhite},[`${st}-text`]:{color:Ct.colorTextLightSolid}},"&-nested-loading":{position:"relative",[`> div > ${st}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:Ct.contentHeight,[`${st}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:Et(Ct.dotSize).mul(-1).div(2).equal()},[`${st}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${Ct.colorBgContainer}`},[`&${st}-show-text ${st}-dot`]:{marginTop:Et(Ct.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${st}-dot`]:{margin:Et(Ct.dotSizeSM).mul(-1).div(2).equal()},[`${st}-text`]:{paddingTop:Et(Et(Ct.dotSizeSM).sub(Ct.fontSize)).div(2).add(2).equal()},[`&${st}-show-text ${st}-dot`]:{marginTop:Et(Ct.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${st}-dot`]:{margin:Et(Ct.dotSizeLG).mul(-1).div(2).equal()},[`${st}-text`]:{paddingTop:Et(Et(Ct.dotSizeLG).sub(Ct.fontSize)).div(2).add(2).equal()},[`&${st}-show-text ${st}-dot`]:{marginTop:Et(Ct.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${st}-container`]:{position:"relative",transition:`opacity ${Ct.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:Ct.colorBgContainer,opacity:0,transition:`all ${Ct.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${st}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none",["&::after"]:{opacity:.4,pointerEvents:"auto"}}},["&-tip"]:{color:Ct.spinDotDefault},[`${st}-dot`]:{position:"relative",display:"inline-block",fontSize:Ct.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:Et(Ct.dotSize).sub(Et(Ct.marginXXS).div(2)).div(2).equal(),height:Et(Ct.dotSize).sub(Et(Ct.marginXXS).div(2)).div(2).equal(),backgroundColor:Ct.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:Ee,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:qe,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${st}-dot`]:{fontSize:Ct.dotSizeSM,i:{width:Et(Et(Ct.dotSizeSM).sub(Et(Ct.marginXXS).div(2))).div(2).equal(),height:Et(Et(Ct.dotSizeSM).sub(Et(Ct.marginXXS).div(2))).div(2).equal()}},[`&-lg ${st}-dot`]:{fontSize:Ct.dotSizeLG,i:{width:Et(Et(Ct.dotSizeLG).sub(Ct.marginXXS)).div(2).equal(),height:Et(Et(Ct.dotSizeLG).sub(Ct.marginXXS)).div(2).equal()}},[`&${st}-show-text ${st}-text`]:{display:"block"}})}},ft=Ct=>{const{controlHeightLG:st,controlHeight:Et}=Ct;return{contentHeight:400,dotSize:st/2,dotSizeSM:st*.35,dotSizeLG:Et}};var Ge=(0,Ie.I$)("Spin",Ct=>{const st=(0,we.TS)(Ct,{spinDotDefault:Ct.colorTextDescription});return[Xe(st)]},ft),lt=function(Ct,st){var Et={};for(var at in Ct)Object.prototype.hasOwnProperty.call(Ct,at)&&st.indexOf(at)<0&&(Et[at]=Ct[at]);if(Ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,at=Object.getOwnPropertySymbols(Ct);mt{const{prefixCls:st,spinning:Et=!0,delay:at=0,className:mt,rootClassName:Mt,size:Me="default",tip:Ht,wrapperClassName:Rt,style:vt,children:Je,fullscreen:Ce=!1}=Ct,pt=lt(Ct,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen"]),{getPrefixCls:et}=M.useContext(re.E_),br=et("spin",st),[Jt,Vr,gn]=Ge(br),[yn,_i]=M.useState(()=>Et&&!Ue(Et,at));M.useEffect(()=>{if(Et){const _n=X(at,()=>{_i(!0)});return _n(),()=>{var yi;(yi=_n==null?void 0:_n.cancel)===null||yi===void 0||yi.call(_n)}}_i(!1)},[at,Et]);const Hn=M.useMemo(()=>typeof Je!="undefined"&&!Ce,[Je,Ce]),{direction:Ln,spin:Ia}=M.useContext(re.E_),Zi=y()(br,Ia==null?void 0:Ia.className,{[`${br}-sm`]:Me==="small",[`${br}-lg`]:Me==="large",[`${br}-spinning`]:yn,[`${br}-show-text`]:!!Ht,[`${br}-fullscreen`]:Ce,[`${br}-fullscreen-show`]:Ce&&yn,[`${br}-rtl`]:Ln==="rtl"},mt,Mt,Vr,gn),Ua=y()(`${br}-container`,{[`${br}-blur`]:yn}),fa=(0,d.Z)(pt,["indicator"]),ka=Object.assign(Object.assign({},Ia==null?void 0:Ia.style),vt),mo=M.createElement("div",Object.assign({},fa,{style:ka,className:Zi,"aria-live":"polite","aria-busy":yn}),At(br,Ct),Ht&&(Hn||Ce)?M.createElement("div",{className:`${br}-text`},Ht):null);return Jt(Hn?M.createElement("div",Object.assign({},fa,{className:y()(`${br}-nested-loading`,Rt,Vr,gn)}),yn&&M.createElement("div",{key:"loading"},mo),M.createElement("div",{className:Ua,key:"container"},Je)):mo)};rt.setDefaultIndicator=Ct=>{It=Ct};var Ze=rt},5283:function(Ke,ye,_){"use strict";_.d(ye,{c:function(){return y}});function M(d,$,X){const{focusElCls:oe,focus:re,borderElCls:le}=X,ce=le?"> *":"",Ie=["hover",re?"focus":null,"active"].filter(Boolean).map(we=>`&:${we} ${ce}`).join(",");return{[`&-item:not(${$}-last-item)`]:{marginInlineEnd:d.calc(d.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[Ie]:{zIndex:2}},oe?{[`&${oe}`]:{zIndex:2}}:{}),{[`&[disabled] ${ce}`]:{zIndex:0}})}}function V(d,$,X){const{borderElCls:oe}=X,re=oe?`> ${oe}`:"";return{[`&-item:not(${$}-first-item):not(${$}-last-item) ${re}`]:{borderRadius:0},[`&-item:not(${$}-last-item)${$}-first-item`]:{[`& ${re}, &${d}-sm ${re}, &${d}-lg ${re}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${$}-first-item)${$}-last-item`]:{[`& ${re}, &${d}-sm ${re}, &${d}-lg ${re}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function y(d){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:X}=d,oe=`${X}-compact`;return{[oe]:Object.assign(Object.assign({},M(d,oe,$)),V(X,oe,$))}}},75199:function(Ke,ye,_){"use strict";_.d(ye,{Lx:function(){return X},Qy:function(){return le},Ro:function(){return d},Wf:function(){return y},dF:function(){return $},du:function(){return oe},vS:function(){return V}});var M=_(78600);const V={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},y=function(ce){let Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{boxSizing:"border-box",margin:0,padding:0,color:ce.colorText,fontSize:ce.fontSize,lineHeight:ce.lineHeight,listStyle:"none",fontFamily:Ie?"inherit":ce.fontFamily}},d=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),$=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),X=ce=>({a:{color:ce.colorLink,textDecoration:ce.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${ce.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:ce.colorLinkHover},"&:active":{color:ce.colorLinkActive},[`&:active, - &:hover`]:{textDecoration:ce.linkHoverDecoration,outline:0},"&:focus":{textDecoration:ce.linkFocusDecoration,outline:0},"&[disabled]":{color:ce.colorTextDisabled,cursor:"not-allowed"}}}),oe=(ce,Ie,we)=>{const{fontFamily:Ee,fontSize:qe}=ce,Xe=`[class^="${Ie}"], [class*=" ${Ie}"]`;return{[we?`.${we}`:Xe]:{fontFamily:Ee,fontSize:qe,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[Xe]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},re=ce=>({outline:`${(0,M.bf)(ce.lineWidthFocus)} solid ${ce.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),le=ce=>({"&:focus-visible":Object.assign({},re(ce))})},8264:function(Ke,ye,_){"use strict";_.d(ye,{R:function(){return y}});const M=d=>({animationDuration:d,animationFillMode:"both"}),V=d=>({animationDuration:d,animationFillMode:"both"}),y=function(d,$,X,oe){const le=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` - ${le}${d}-enter, - ${le}${d}-appear - `]:Object.assign(Object.assign({},M(oe)),{animationPlayState:"paused"}),[`${le}${d}-leave`]:Object.assign(Object.assign({},V(oe)),{animationPlayState:"paused"}),[` - ${le}${d}-enter${d}-enter-active, - ${le}${d}-appear${d}-appear-active - `]:{animationName:$,animationPlayState:"running"},[`${le}${d}-leave${d}-leave-active`]:{animationName:X,animationPlayState:"running",pointerEvents:"none"}}}},70914:function(Ke,ye,_){"use strict";_.d(ye,{Fm:function(){return we}});var M=_(78600),V=_(8264);const y=new M.E4("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),d=new M.E4("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),$=new M.E4("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),X=new M.E4("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),oe=new M.E4("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),re=new M.E4("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),le=new M.E4("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ce=new M.E4("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Ie={"move-up":{inKeyframes:le,outKeyframes:ce},"move-down":{inKeyframes:y,outKeyframes:d},"move-left":{inKeyframes:$,outKeyframes:X},"move-right":{inKeyframes:oe,outKeyframes:re}},we=(Ee,qe)=>{const{antCls:Xe}=Ee,ft=`${Xe}-${qe}`,{inKeyframes:Ge,outKeyframes:lt}=Ie[qe];return[(0,V.R)(ft,Ge,lt,Ee.motionDurationMid),{[` - ${ft}-enter, - ${ft}-appear - `]:{opacity:0,animationTimingFunction:Ee.motionEaseOutCirc},[`${ft}-leave`]:{animationTimingFunction:Ee.motionEaseInOutCirc}}]}},29412:function(Ke,ye,_){"use strict";_.d(ye,{Qt:function(){return $},Uw:function(){return d},fJ:function(){return y},ly:function(){return X},oN:function(){return we}});var M=_(78600),V=_(8264);const y=new M.E4("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),d=new M.E4("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),$=new M.E4("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),X=new M.E4("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),oe=new M.E4("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),re=new M.E4("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),le=new M.E4("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),ce=new M.E4("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ie={"slide-up":{inKeyframes:y,outKeyframes:d},"slide-down":{inKeyframes:$,outKeyframes:X},"slide-left":{inKeyframes:oe,outKeyframes:re},"slide-right":{inKeyframes:le,outKeyframes:ce}},we=(Ee,qe)=>{const{antCls:Xe}=Ee,ft=`${Xe}-${qe}`,{inKeyframes:Ge,outKeyframes:lt}=Ie[qe];return[(0,V.R)(ft,Ge,lt,Ee.motionDurationMid),{[` - ${ft}-enter, - ${ft}-appear - `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:Ee.motionEaseOutQuint,["&-prepare"]:{transform:"scale(1)"}},[`${ft}-leave`]:{animationTimingFunction:Ee.motionEaseInQuint}}]}},95156:function(Ke,ye,_){"use strict";_.d(ye,{W:function(){return y},w:function(){return V}});var M=_(78600);function V(d){const{sizePopupArrow:$,borderRadiusXS:X,borderRadiusOuter:oe}=d,re=$/2,le=0,ce=re,Ie=oe*1/Math.sqrt(2),we=re-oe*(1-1/Math.sqrt(2)),Ee=re-X*(1/Math.sqrt(2)),qe=oe*(Math.sqrt(2)-1)+X*(1/Math.sqrt(2)),Xe=2*re-Ee,ft=qe,Ge=2*re-Ie,lt=we,Ye=2*re-le,It=ce,At=re*Math.sqrt(2)+oe*(Math.sqrt(2)-2),Ue=oe*(Math.sqrt(2)-1),rt=`polygon(${Ue}px 100%, 50% ${Ue}px, ${2*re-Ue}px 100%, ${Ue}px 100%)`,Ze=`path('M ${le} ${ce} A ${oe} ${oe} 0 0 0 ${Ie} ${we} L ${Ee} ${qe} A ${X} ${X} 0 0 1 ${Xe} ${ft} L ${Ge} ${lt} A ${oe} ${oe} 0 0 0 ${Ye} ${It} Z')`;return{arrowShadowWidth:At,arrowPath:Ze,arrowPolygon:rt}}const y=(d,$,X)=>{const{sizePopupArrow:oe,arrowPolygon:re,arrowPath:le,arrowShadowWidth:ce,borderRadiusXS:Ie,calc:we}=d;return{pointerEvents:"none",width:oe,height:oe,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:oe,height:we(oe).div(2).equal(),background:$,clipPath:{_multi_value_:!0,value:[re,le]},content:'""'},"&::after":{content:'""',position:"absolute",width:ce,height:ce,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,M.bf)(Ie)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:X,zIndex:0,background:"transparent"}}}},47436:function(Ke,ye,_){"use strict";_.d(ye,{Mj:function(){return oe},uH:function(){return $},u_:function(){return X}});var M=_(77617),V=_(78600),y=_(26152),d=_(19717);const $=(0,V.jG)(y.Z),X={token:d.Z,override:{override:d.Z},hashed:!0},oe=M.createContext(X)},5022:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Ze}});var M=_(78600),V=_(26152),y=_(19717),d=_(97239),X=Ct=>{const st=Ct!=null&&Ct.algorithm?(0,M.jG)(Ct.algorithm):(0,M.jG)(V.Z),Et=Object.assign(Object.assign({},y.Z),Ct==null?void 0:Ct.token);return(0,M.t2)(Et,{override:Ct==null?void 0:Ct.token},st,d.Z)},oe=_(20573),re=_(47436),le=_(36670);function ce(Ct){const{sizeUnit:st,sizeStep:Et}=Ct,at=Et-2;return{sizeXXL:st*(at+10),sizeXL:st*(at+6),sizeLG:st*(at+2),sizeMD:st*(at+2),sizeMS:st*(at+1),size:st*at,sizeSM:st*at,sizeXS:st*(at-1),sizeXXS:st*(at-1)}}var Ie=_(71564),Ee=(Ct,st)=>{const Et=st!=null?st:(0,V.Z)(Ct),at=Et.fontSizeSM,mt=Et.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Et),ce(st!=null?st:Ct)),(0,Ie.Z)(at)),{controlHeight:mt}),(0,le.Z)(Object.assign(Object.assign({},Et),{controlHeight:mt})))},qe=_(10129),Xe=_(97900),ft=_(64993);const Ge=(Ct,st)=>new ft.C(Ct).setAlpha(st).toRgbString(),lt=(Ct,st)=>new ft.C(Ct).lighten(st).toHexString(),Ye=Ct=>{const st=(0,qe.R_)(Ct,{theme:"dark"});return{1:st[0],2:st[1],3:st[2],4:st[3],5:st[6],6:st[5],7:st[4],8:st[6],9:st[5],10:st[4]}},It=(Ct,st)=>{const Et=Ct||"#000",at=st||"#fff";return{colorBgBase:Et,colorTextBase:at,colorText:Ge(at,.85),colorTextSecondary:Ge(at,.65),colorTextTertiary:Ge(at,.45),colorTextQuaternary:Ge(at,.25),colorFill:Ge(at,.18),colorFillSecondary:Ge(at,.12),colorFillTertiary:Ge(at,.08),colorFillQuaternary:Ge(at,.04),colorBgElevated:lt(Et,12),colorBgContainer:lt(Et,8),colorBgLayout:lt(Et,0),colorBgSpotlight:lt(Et,26),colorBgBlur:Ge(at,.04),colorBorder:lt(Et,26),colorBorderSecondary:lt(Et,19)}};var Ue=(Ct,st)=>{const Et=Object.keys(y.M).map(mt=>{const Mt=(0,qe.R_)(Ct[mt],{theme:"dark"});return new Array(10).fill(1).reduce((Me,Ht,Rt)=>(Me[`${mt}-${Rt+1}`]=Mt[Rt],Me[`${mt}${Rt+1}`]=Mt[Rt],Me),{})}).reduce((mt,Mt)=>(mt=Object.assign(Object.assign({},mt),Mt),mt),{}),at=st!=null?st:(0,V.Z)(Ct);return Object.assign(Object.assign(Object.assign({},at),Et),(0,Xe.Z)(Ct,{generateColorPalettes:Ye,generateNeutralColorPalettes:It}))};function rt(){const[Ct,st,Et]=(0,oe.ZP)();return{theme:Ct,token:st,hashId:Et}}var Ze={defaultConfig:re.u_,defaultSeed:re.u_.token,useToken:rt,defaultAlgorithm:V.Z,darkAlgorithm:Ue,compactAlgorithm:Ee,getDesignToken:X}},26152:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Xe}});var M=_(10129),V=_(36670);function y(ft){const{sizeUnit:Ge,sizeStep:lt}=ft;return{sizeXXL:Ge*(lt+8),sizeXL:Ge*(lt+4),sizeLG:Ge*(lt+2),sizeMD:Ge*(lt+1),sizeMS:Ge*lt,size:Ge*lt,sizeSM:Ge*(lt-1),sizeXS:Ge*(lt-2),sizeXXS:Ge*(lt-3)}}var d=_(19717),$=_(97900),oe=ft=>{let Ge=ft,lt=ft,Ye=ft,It=ft;return ft<6&&ft>=5?Ge=ft+1:ft<16&&ft>=6?Ge=ft+2:ft>=16&&(Ge=16),ft<7&&ft>=5?lt=4:ft<8&&ft>=7?lt=5:ft<14&&ft>=8?lt=6:ft<16&&ft>=14?lt=7:ft>=16&&(lt=8),ft<6&&ft>=2?Ye=1:ft>=6&&(Ye=2),ft>4&&ft<8?It=4:ft>=8&&(It=6),{borderRadius:ft,borderRadiusXS:Ye,borderRadiusSM:lt,borderRadiusLG:Ge,borderRadiusOuter:It}};function re(ft){const{motionUnit:Ge,motionBase:lt,borderRadius:Ye,lineWidth:It}=ft;return Object.assign({motionDurationFast:`${(lt+Ge).toFixed(1)}s`,motionDurationMid:`${(lt+Ge*2).toFixed(1)}s`,motionDurationSlow:`${(lt+Ge*3).toFixed(1)}s`,lineWidthBold:It+1},oe(Ye))}var le=_(64993);const ce=(ft,Ge)=>new le.C(ft).setAlpha(Ge).toRgbString(),Ie=(ft,Ge)=>new le.C(ft).darken(Ge).toHexString(),we=ft=>{const Ge=(0,M.R_)(ft);return{1:Ge[0],2:Ge[1],3:Ge[2],4:Ge[3],5:Ge[4],6:Ge[5],7:Ge[6],8:Ge[4],9:Ge[5],10:Ge[6]}},Ee=(ft,Ge)=>{const lt=ft||"#fff",Ye=Ge||"#000";return{colorBgBase:lt,colorTextBase:Ye,colorText:ce(Ye,.88),colorTextSecondary:ce(Ye,.65),colorTextTertiary:ce(Ye,.45),colorTextQuaternary:ce(Ye,.25),colorFill:ce(Ye,.15),colorFillSecondary:ce(Ye,.06),colorFillTertiary:ce(Ye,.04),colorFillQuaternary:ce(Ye,.02),colorBgLayout:Ie(lt,4),colorBgContainer:Ie(lt,0),colorBgElevated:Ie(lt,0),colorBgSpotlight:ce(Ye,.85),colorBgBlur:"transparent",colorBorder:Ie(lt,15),colorBorderSecondary:Ie(lt,6)}};var qe=_(71564);function Xe(ft){const Ge=Object.keys(d.M).map(lt=>{const Ye=(0,M.R_)(ft[lt]);return new Array(10).fill(1).reduce((It,At,Ue)=>(It[`${lt}-${Ue+1}`]=Ye[Ue],It[`${lt}${Ue+1}`]=Ye[Ue],It),{})}).reduce((lt,Ye)=>(lt=Object.assign(Object.assign({},lt),Ye),lt),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ft),Ge),(0,$.Z)(ft,{generateColorPalettes:we,generateNeutralColorPalettes:Ee})),(0,qe.Z)(ft.fontSize)),y(ft)),(0,V.Z)(ft)),re(ft))}},19717:function(Ke,ye,_){"use strict";_.d(ye,{M:function(){return M}});const M={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},V=Object.assign(Object.assign({},M),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, -'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', -'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});ye.Z=V},97900:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return V}});var M=_(64993);function V(y,d){let{generateColorPalettes:$,generateNeutralColorPalettes:X}=d;const{colorSuccess:oe,colorWarning:re,colorError:le,colorInfo:ce,colorPrimary:Ie,colorBgBase:we,colorTextBase:Ee}=y,qe=$(Ie),Xe=$(oe),ft=$(re),Ge=$(le),lt=$(ce),Ye=X(we,Ee),It=y.colorLink||y.colorInfo,At=$(It);return Object.assign(Object.assign({},Ye),{colorPrimaryBg:qe[1],colorPrimaryBgHover:qe[2],colorPrimaryBorder:qe[3],colorPrimaryBorderHover:qe[4],colorPrimaryHover:qe[5],colorPrimary:qe[6],colorPrimaryActive:qe[7],colorPrimaryTextHover:qe[8],colorPrimaryText:qe[9],colorPrimaryTextActive:qe[10],colorSuccessBg:Xe[1],colorSuccessBgHover:Xe[2],colorSuccessBorder:Xe[3],colorSuccessBorderHover:Xe[4],colorSuccessHover:Xe[4],colorSuccess:Xe[6],colorSuccessActive:Xe[7],colorSuccessTextHover:Xe[8],colorSuccessText:Xe[9],colorSuccessTextActive:Xe[10],colorErrorBg:Ge[1],colorErrorBgHover:Ge[2],colorErrorBorder:Ge[3],colorErrorBorderHover:Ge[4],colorErrorHover:Ge[5],colorError:Ge[6],colorErrorActive:Ge[7],colorErrorTextHover:Ge[8],colorErrorText:Ge[9],colorErrorTextActive:Ge[10],colorWarningBg:ft[1],colorWarningBgHover:ft[2],colorWarningBorder:ft[3],colorWarningBorderHover:ft[4],colorWarningHover:ft[4],colorWarning:ft[6],colorWarningActive:ft[7],colorWarningTextHover:ft[8],colorWarningText:ft[9],colorWarningTextActive:ft[10],colorInfoBg:lt[1],colorInfoBgHover:lt[2],colorInfoBorder:lt[3],colorInfoBorderHover:lt[4],colorInfoHover:lt[4],colorInfo:lt[6],colorInfoActive:lt[7],colorInfoTextHover:lt[8],colorInfoText:lt[9],colorInfoTextActive:lt[10],colorLinkHover:At[4],colorLink:At[6],colorLinkActive:At[7],colorBgMask:new M.C("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}},36670:function(Ke,ye){"use strict";const _=M=>{const{controlHeight:V}=M;return{controlHeightSM:V*.75,controlHeightXS:V*.5,controlHeightLG:V*1.25}};ye.Z=_},71564:function(Ke,ye,_){"use strict";var M=_(10176);const V=y=>{const d=(0,M.Z)(y),$=d.map(Ee=>Ee.size),X=d.map(Ee=>Ee.lineHeight),oe=$[1],re=$[0],le=$[2],ce=X[1],Ie=X[0],we=X[2];return{fontSizeSM:re,fontSize:oe,fontSizeLG:le,fontSizeXL:$[3],fontSizeHeading1:$[6],fontSizeHeading2:$[5],fontSizeHeading3:$[4],fontSizeHeading4:$[3],fontSizeHeading5:$[2],lineHeight:ce,lineHeightLG:we,lineHeightSM:Ie,fontHeight:Math.round(ce*oe),fontHeightLG:Math.round(we*le),fontHeightSM:Math.round(Ie*re),lineHeightHeading1:X[6],lineHeightHeading2:X[5],lineHeightHeading3:X[4],lineHeightHeading4:X[3],lineHeightHeading5:X[2]}};ye.Z=V},10176:function(Ke,ye,_){"use strict";_.d(ye,{D:function(){return M},Z:function(){return V}});function M(y){return(y+8)/y}function V(y){const d=new Array(10).fill(null).map(($,X)=>{const oe=X-1,re=y*Math.pow(2.71828,oe/5),le=X>1?Math.floor(re):Math.ceil(re);return Math.floor(le/2)*2});return d[1]=y,d.map($=>({size:$,lineHeight:M($)}))}},20573:function(Ke,ye,_){"use strict";_.d(ye,{ZP:function(){return Ee},ID:function(){return ce},NJ:function(){return le}});var M=_(77617),V=_(78600),y="5.14.0",d=y,$=_(47436),X=_(19717),oe=_(97239),re=function(qe,Xe){var ft={};for(var Ge in qe)Object.prototype.hasOwnProperty.call(qe,Ge)&&Xe.indexOf(Ge)<0&&(ft[Ge]=qe[Ge]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var lt=0,Ge=Object.getOwnPropertySymbols(qe);lt{const Ge=ft.getDerivativeToken(qe),{override:lt}=Xe,Ye=re(Xe,["override"]);let It=Object.assign(Object.assign({},Ge),{override:lt});return It=(0,oe.Z)(It),Ye&&Object.entries(Ye).forEach(At=>{let[Ue,rt]=At;const{theme:Ze}=rt,Ct=re(rt,["theme"]);let st=Ct;Ze&&(st=we(Object.assign(Object.assign({},It),Ct),{override:Ct},Ze)),It[Ue]=st}),It};function Ee(){const{token:qe,hashed:Xe,theme:ft,override:Ge,cssVar:lt}=M.useContext($.Mj),Ye=`${d}-${Xe||""}`,It=ft||$.uH,[At,Ue,rt]=(0,V.fp)(It,[X.Z,qe],{salt:Ye,override:Ge,getComputedToken:we,formatToken:oe.Z,cssVar:lt&&{prefix:lt.prefix,key:lt.key,unitless:le,ignore:ce,preserve:Ie}});return[It,rt,Xe?Ue:"",At,lt]}},97239:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return oe}});var M=_(64993),V=_(19717);function y(re){return re>=0&&re<=255}function d(re,le){const{r:ce,g:Ie,b:we,a:Ee}=new M.C(re).toRgb();if(Ee<1)return re;const{r:qe,g:Xe,b:ft}=new M.C(le).toRgb();for(let Ge=.01;Ge<=1;Ge+=.01){const lt=Math.round((ce-qe*(1-Ge))/Ge),Ye=Math.round((Ie-Xe*(1-Ge))/Ge),It=Math.round((we-ft*(1-Ge))/Ge);if(y(lt)&&y(Ye)&&y(It))return new M.C({r:lt,g:Ye,b:It,a:Math.round(Ge*100)/100}).toRgbString()}return new M.C({r:ce,g:Ie,b:we,a:1}).toRgbString()}var $=d,X=function(re,le){var ce={};for(var Ie in re)Object.prototype.hasOwnProperty.call(re,Ie)&&le.indexOf(Ie)<0&&(ce[Ie]=re[Ie]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,Ie=Object.getOwnPropertySymbols(re);we{delete Ie[It]});const we=Object.assign(Object.assign({},ce),Ie),Ee=480,qe=576,Xe=768,ft=992,Ge=1200,lt=1600;if(we.motion===!1){const It="0s";we.motionDurationFast=It,we.motionDurationMid=It,we.motionDurationSlow=It}return Object.assign(Object.assign(Object.assign({},we),{colorFillContent:we.colorFillSecondary,colorFillContentHover:we.colorFill,colorFillAlter:we.colorFillQuaternary,colorBgContainerDisabled:we.colorFillTertiary,colorBorderBg:we.colorBgContainer,colorSplit:$(we.colorBorderSecondary,we.colorBgContainer),colorTextPlaceholder:we.colorTextQuaternary,colorTextDisabled:we.colorTextQuaternary,colorTextHeading:we.colorText,colorTextLabel:we.colorTextSecondary,colorTextDescription:we.colorTextTertiary,colorTextLightSolid:we.colorWhite,colorHighlight:we.colorError,colorBgTextHover:we.colorFillSecondary,colorBgTextActive:we.colorFill,colorIcon:we.colorTextTertiary,colorIconHover:we.colorText,colorErrorOutline:$(we.colorErrorBg,we.colorBgContainer),colorWarningOutline:$(we.colorWarningBg,we.colorBgContainer),fontSizeIcon:we.fontSizeSM,lineWidthFocus:we.lineWidth*4,lineWidth:we.lineWidth,controlOutlineWidth:we.lineWidth*2,controlInteractiveSize:we.controlHeight/2,controlItemBgHover:we.colorFillTertiary,controlItemBgActive:we.colorPrimaryBg,controlItemBgActiveHover:we.colorPrimaryBgHover,controlItemBgActiveDisabled:we.colorFill,controlTmpOutline:we.colorFillQuaternary,controlOutline:$(we.colorPrimaryBg,we.colorBgContainer),lineType:we.lineType,borderRadius:we.borderRadius,borderRadiusXS:we.borderRadiusXS,borderRadiusSM:we.borderRadiusSM,borderRadiusLG:we.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:we.sizeXXS,paddingXS:we.sizeXS,paddingSM:we.sizeSM,padding:we.size,paddingMD:we.sizeMD,paddingLG:we.sizeLG,paddingXL:we.sizeXL,paddingContentHorizontalLG:we.sizeLG,paddingContentVerticalLG:we.sizeMS,paddingContentHorizontal:we.sizeMS,paddingContentVertical:we.sizeSM,paddingContentHorizontalSM:we.size,paddingContentVerticalSM:we.sizeXS,marginXXS:we.sizeXXS,marginXS:we.sizeXS,marginSM:we.sizeSM,margin:we.size,marginMD:we.sizeMD,marginLG:we.sizeLG,marginXL:we.sizeXL,marginXXL:we.sizeXXL,boxShadow:` - 0 6px 16px 0 rgba(0, 0, 0, 0.08), - 0 3px 6px -4px rgba(0, 0, 0, 0.12), - 0 9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowSecondary:` - 0 6px 16px 0 rgba(0, 0, 0, 0.08), - 0 3px 6px -4px rgba(0, 0, 0, 0.12), - 0 9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowTertiary:` - 0 1px 2px 0 rgba(0, 0, 0, 0.03), - 0 1px 6px -1px rgba(0, 0, 0, 0.02), - 0 2px 4px 0 rgba(0, 0, 0, 0.02) - `,screenXS:Ee,screenXSMin:Ee,screenXSMax:qe-1,screenSM:qe,screenSMMin:qe,screenSMMax:Xe-1,screenMD:Xe,screenMDMin:Xe,screenMDMax:ft-1,screenLG:ft,screenLGMin:ft,screenLGMax:Ge-1,screenXL:Ge,screenXLMin:Ge,screenXLMax:lt-1,screenXXL:lt,screenXXLMin:lt,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` - 0 1px 2px -2px ${new M.C("rgba(0, 0, 0, 0.16)").toRgbString()}, - 0 3px 6px 0 ${new M.C("rgba(0, 0, 0, 0.12)").toRgbString()}, - 0 5px 12px 4px ${new M.C("rgba(0, 0, 0, 0.09)").toRgbString()} - `,boxShadowDrawerRight:` - -6px 0 16px 0 rgba(0, 0, 0, 0.08), - -3px 0 6px -4px rgba(0, 0, 0, 0.12), - -9px 0 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowDrawerLeft:` - 6px 0 16px 0 rgba(0, 0, 0, 0.08), - 3px 0 6px -4px rgba(0, 0, 0, 0.12), - 9px 0 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowDrawerUp:` - 0 6px 16px 0 rgba(0, 0, 0, 0.08), - 0 3px 6px -4px rgba(0, 0, 0, 0.12), - 0 9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowDrawerDown:` - 0 -6px 16px 0 rgba(0, 0, 0, 0.08), - 0 -3px 6px -4px rgba(0, 0, 0, 0.12), - 0 -9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),Ie)}},93319:function(Ke,ye,_){"use strict";_.d(ye,{ZP:function(){return mt},I$:function(){return Ht},bk:function(){return Mt}});var M=_(77617),V=_(78600),y=_(33401),d=_(11908),$=_(75199),X=_(20573),oe=_(61577),re=_(22946),le=_(16169),ce=_(72597),Ie=_(26581),we=_(3711),qe=(0,re.Z)(function Rt(){(0,oe.Z)(this,Rt)});function Xe(Rt,vt,Je){return vt=(0,Ie.Z)(vt),(0,le.Z)(Rt,(0,ce.Z)()?Reflect.construct(vt,Je||[],(0,Ie.Z)(Rt).constructor):vt.apply(Rt,Je))}let ft=function(Rt){(0,we.Z)(vt,Rt);function vt(Je){var Ce;return(0,oe.Z)(this,vt),Ce=Xe(this,vt),Ce.result=0,Je instanceof vt?Ce.result=Je.result:typeof Je=="number"&&(Ce.result=Je),Ce}return(0,re.Z)(vt,[{key:"add",value:function(Ce){return Ce instanceof vt?this.result+=Ce.result:typeof Ce=="number"&&(this.result+=Ce),this}},{key:"sub",value:function(Ce){return Ce instanceof vt?this.result-=Ce.result:typeof Ce=="number"&&(this.result-=Ce),this}},{key:"mul",value:function(Ce){return Ce instanceof vt?this.result*=Ce.result:typeof Ce=="number"&&(this.result*=Ce),this}},{key:"div",value:function(Ce){return Ce instanceof vt?this.result/=Ce.result:typeof Ce=="number"&&(this.result/=Ce),this}},{key:"equal",value:function(){return this.result}}]),vt}(qe);function Ge(Rt,vt,Je){return vt=(0,Ie.Z)(vt),(0,le.Z)(Rt,(0,ce.Z)()?Reflect.construct(vt,Je||[],(0,Ie.Z)(Rt).constructor):vt.apply(Rt,Je))}const lt="CALC_UNIT";function Ye(Rt){return typeof Rt=="number"?`${Rt}${lt}`:Rt}let It=function(Rt){(0,we.Z)(vt,Rt);function vt(Je){var Ce;return(0,oe.Z)(this,vt),Ce=Ge(this,vt),Ce.result="",Je instanceof vt?Ce.result=`(${Je.result})`:typeof Je=="number"?Ce.result=Ye(Je):typeof Je=="string"&&(Ce.result=Je),Ce}return(0,re.Z)(vt,[{key:"add",value:function(Ce){return Ce instanceof vt?this.result=`${this.result} + ${Ce.getResult()}`:(typeof Ce=="number"||typeof Ce=="string")&&(this.result=`${this.result} + ${Ye(Ce)}`),this.lowPriority=!0,this}},{key:"sub",value:function(Ce){return Ce instanceof vt?this.result=`${this.result} - ${Ce.getResult()}`:(typeof Ce=="number"||typeof Ce=="string")&&(this.result=`${this.result} - ${Ye(Ce)}`),this.lowPriority=!0,this}},{key:"mul",value:function(Ce){return this.lowPriority&&(this.result=`(${this.result})`),Ce instanceof vt?this.result=`${this.result} * ${Ce.getResult(!0)}`:(typeof Ce=="number"||typeof Ce=="string")&&(this.result=`${this.result} * ${Ce}`),this.lowPriority=!1,this}},{key:"div",value:function(Ce){return this.lowPriority&&(this.result=`(${this.result})`),Ce instanceof vt?this.result=`${this.result} / ${Ce.getResult(!0)}`:(typeof Ce=="number"||typeof Ce=="string")&&(this.result=`${this.result} / ${Ce}`),this.lowPriority=!1,this}},{key:"getResult",value:function(Ce){return this.lowPriority||Ce?`(${this.result})`:this.result}},{key:"equal",value:function(Ce){const{unit:pt=!0}=Ce||{},et=new RegExp(`${lt}`,"g");return this.result=this.result.replace(et,pt?"px":""),typeof this.lowPriority!="undefined"?`calc(${this.result})`:this.result}}]),vt}(qe);var Ue=Rt=>{const vt=Rt==="css"?It:ft;return Je=>new vt(Je)};function rt(Rt){return Rt==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var vt=arguments.length,Je=new Array(vt),Ce=0;Ce(0,V.bf)(pt)).join(",")})`},min:function(){for(var vt=arguments.length,Je=new Array(vt),Ce=0;Ce(0,V.bf)(pt)).join(",")})`}}}var Ze=_(12228),Ct=_(85034);const st=(Rt,vt,Je)=>{var Ce;return typeof Je=="function"?Je((0,Ze.TS)(vt,(Ce=vt[Rt])!==null&&Ce!==void 0?Ce:{})):Je!=null?Je:{}},Et=(Rt,vt,Je,Ce)=>{const pt=Object.assign({},vt[Rt]);if(Ce!=null&&Ce.deprecatedTokens){const{deprecatedTokens:br}=Ce;br.forEach(Jt=>{let[Vr,gn]=Jt;var yn;(pt!=null&&pt[Vr]||pt!=null&&pt[gn])&&((yn=pt[gn])!==null&&yn!==void 0||(pt[gn]=pt==null?void 0:pt[Vr]))})}const et=Object.assign(Object.assign({},Je),pt);return Object.keys(et).forEach(br=>{et[br]===vt[br]&&delete et[br]}),et},at=(Rt,vt)=>`${[vt,Rt.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-")}`;function mt(Rt,vt,Je){let Ce=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const pt=Array.isArray(Rt)?Rt:[Rt,Rt],[et]=pt,br=pt.join("-");return function(Jt){let Vr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jt;const[gn,yn,_i,Hn,Ln]=(0,X.ZP)(),{getPrefixCls:Ia,iconPrefixCls:Zi,csp:Ua}=(0,M.useContext)(d.E_),fa=Ia(),ka=Ln?"css":"js",mo=Ue(ka),{max:_n,min:yi}=rt(ka),Zn={theme:gn,token:Hn,hashId:_i,nonce:()=>Ua==null?void 0:Ua.nonce,clientOnly:Ce.clientOnly,order:Ce.order||-999};return(0,V.xy)(Object.assign(Object.assign({},Zn),{clientOnly:!1,path:["Shared",fa]}),()=>[{"&":(0,$.Lx)(Hn)}]),(0,Ct.Z)(Zi,Ua),[(0,V.xy)(Object.assign(Object.assign({},Zn),{path:[br,Jt,Zi]}),()=>{if(Ce.injectStyle===!1)return[];const{token:Ea,flush:co}=(0,Ze.ZP)(Hn),Qa=st(et,yn,Je),oa=`.${Jt}`,ji=Et(et,yn,Qa,{deprecatedTokens:Ce.deprecatedTokens});Ln&&Object.keys(Qa).forEach(Kn=>{Qa[Kn]=`var(${(0,V.ks)(Kn,at(et,Ln.prefix))})`});const so=(0,Ze.TS)(Ea,{componentCls:oa,prefixCls:Jt,iconCls:`.${Zi}`,antCls:`.${fa}`,calc:mo,max:_n,min:yi},Ln?Qa:ji),ei=vt(so,{hashId:_i,prefixCls:Jt,rootPrefixCls:fa,iconPrefixCls:Zi});return co(et,ji),[Ce.resetStyle===!1?null:(0,$.du)(so,Jt,Vr),ei]}),_i]}}const Mt=(Rt,vt,Je,Ce)=>{const pt=mt(Rt,vt,Je,Object.assign({resetStyle:!1,order:-998},Ce));return br=>{let{prefixCls:Jt,rootCls:Vr=Jt}=br;return pt(Jt,Vr),null}},Me=(Rt,vt,Je)=>{function Ce(gn){return`${Rt}${gn.slice(0,1).toUpperCase()}${gn.slice(1)}`}const{unitless:pt={},injectStyle:et=!0}=Je!=null?Je:{},br={[Ce("zIndexPopup")]:!0};Object.keys(pt).forEach(gn=>{br[Ce(gn)]=pt[gn]});const Jt=gn=>{let{rootCls:yn,cssVar:_i}=gn;const[,Hn]=(0,X.ZP)();return(0,V.CI)({path:[Rt],prefix:_i.prefix,key:_i==null?void 0:_i.key,unitless:Object.assign(Object.assign({},X.NJ),br),ignore:X.ID,token:Hn,scope:yn},()=>{const Ln=st(Rt,Hn,vt),Ia=Et(Rt,Hn,Ln,{deprecatedTokens:Je==null?void 0:Je.deprecatedTokens});return Object.keys(Ln).forEach(Zi=>{Ia[Ce(Zi)]=Ia[Zi],delete Ia[Zi]}),Ia}),null};return gn=>{const[,,,,yn]=(0,X.ZP)();return[_i=>et&&yn?M.createElement(M.Fragment,null,M.createElement(Jt,{rootCls:gn,cssVar:yn,component:Rt}),_i):_i,yn==null?void 0:yn.key]}},Ht=(Rt,vt,Je,Ce)=>{const pt=mt(Rt,vt,Je,Ce),et=Me(Array.isArray(Rt)?Rt[0]:Rt,Je,Ce);return function(br){let Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:br;const[,Vr]=pt(br,Jt),[gn,yn]=et(Jt);return[gn,Vr,yn]}}},12228:function(Ke,ye,_){"use strict";_.d(ye,{TS:function(){return y}});const M=typeof CSSINJS_STATISTIC!="undefined";let V=!0;function y(){for(var re=arguments.length,le=new Array(re),ce=0;ce{Object.keys(we).forEach(qe=>{Object.defineProperty(Ie,qe,{configurable:!0,enumerable:!0,get:()=>we[qe]})})}),V=!0,Ie}const d={},$={};function X(){}const oe=re=>{let le,ce=re,Ie=X;return M&&typeof Proxy!="undefined"&&(le=new Set,ce=new Proxy(re,{get(we,Ee){return V&&le.add(Ee),we[Ee]}}),Ie=(we,Ee)=>{var qe;d[we]={global:Array.from(le),component:Object.assign(Object.assign({},(qe=d[we])===null||qe===void 0?void 0:qe.component),Ee)}}),{token:ce,keys:le,flush:Ie}};ye.ZP=oe},85034:function(Ke,ye,_){"use strict";var M=_(78600),V=_(75199),y=_(20573);const d=($,X)=>{const[oe,re]=(0,y.ZP)();return(0,M.xy)({theme:oe,token:re,hashId:"",path:["ant-design-icons",$],nonce:()=>X==null?void 0:X.nonce},()=>[{[`.${$}`]:Object.assign(Object.assign({},(0,V.Ro)()),{[`.${$} .${$}-icon`]:{display:"block"}})}])};ye.Z=d},41766:function(Ke,ye){"use strict";const _={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};ye.Z=_},71041:function(Ke,ye,_){"use strict";var M=_(28263);Ke.exports=function(d){d=d||{};var $=d.reporter,X=M.getOption(d,"async",!0),oe=M.getOption(d,"auto",!0);oe&&!X&&($&&$.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),X=!0);var re=V(),le,ce=!1;function Ie(lt,Ye){!ce&&oe&&X&&re.size()===0&&qe(),re.add(lt,Ye)}function we(){for(ce=!0;re.size();){var lt=re;re=V(),lt.process()}ce=!1}function Ee(lt){ce||(lt===void 0&&(lt=X),le&&(ft(le),le=null),lt?qe():we())}function qe(){le=Ge(we)}function Xe(){re={},batchSize=0,topLevel=0,bottomLevel=0}function ft(lt){var Ye=clearTimeout;return Ye(lt)}function Ge(lt){var Ye=function(It){return setTimeout(It,0)};return Ye(lt)}return{add:Ie,force:Ee}};function V(){var y={},d=0,$=0,X=0;function oe(ce,Ie){Ie||(Ie=ce,ce=0),ce>$?$=ce:ce-1?V(oe):oe}},71262:function(Ke,ye,_){"use strict";var M=_(36723),V=_(64656),y=_(31099),d=V("%TypeError%"),$=V("%Function.prototype.apply%"),X=V("%Function.prototype.call%"),oe=V("%Reflect.apply%",!0)||M.call(X,$),re=V("%Object.defineProperty%",!0),le=V("%Math.max%");if(re)try{re({},"a",{value:1})}catch(Ie){re=null}Ke.exports=function(we){if(typeof we!="function")throw new d("a function is required");var Ee=oe(M,X,arguments);return y(Ee,1+le(0,we.length-(arguments.length-1)),!0)};var ce=function(){return oe(M,$,arguments)};re?re(Ke.exports,"apply",{value:ce}):Ke.exports.apply=ce},67751:function(Ke){var ye={utf8:{stringToBytes:function(_){return ye.bin.stringToBytes(unescape(encodeURIComponent(_)))},bytesToString:function(_){return decodeURIComponent(escape(ye.bin.bytesToString(_)))}},bin:{stringToBytes:function(_){for(var M=[],V=0;V<_.length;V++)M.push(_.charCodeAt(V)&255);return M},bytesToString:function(_){for(var M=[],V=0;V<_.length;V++)M.push(String.fromCharCode(_[V]));return M.join("")}}};Ke.exports=ye},18135:function(Ke,ye,_){const M=_(45411),V={};for(const $ of Object.keys(M))V[M[$]]=$;const y={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Ke.exports=y;for(const $ of Object.keys(y)){if(!("channels"in y[$]))throw new Error("missing channels property: "+$);if(!("labels"in y[$]))throw new Error("missing channel labels property: "+$);if(y[$].labels.length!==y[$].channels)throw new Error("channel and label counts mismatch: "+$);const{channels:X,labels:oe}=y[$];delete y[$].channels,delete y[$].labels,Object.defineProperty(y[$],"channels",{value:X}),Object.defineProperty(y[$],"labels",{value:oe})}y.rgb.hsl=function($){const X=$[0]/255,oe=$[1]/255,re=$[2]/255,le=Math.min(X,oe,re),ce=Math.max(X,oe,re),Ie=ce-le;let we,Ee;ce===le?we=0:X===ce?we=(oe-re)/Ie:oe===ce?we=2+(re-X)/Ie:re===ce&&(we=4+(X-oe)/Ie),we=Math.min(we*60,360),we<0&&(we+=360);const qe=(le+ce)/2;return ce===le?Ee=0:qe<=.5?Ee=Ie/(ce+le):Ee=Ie/(2-ce-le),[we,Ee*100,qe*100]},y.rgb.hsv=function($){let X,oe,re,le,ce;const Ie=$[0]/255,we=$[1]/255,Ee=$[2]/255,qe=Math.max(Ie,we,Ee),Xe=qe-Math.min(Ie,we,Ee),ft=function(Ge){return(qe-Ge)/6/Xe+1/2};return Xe===0?(le=0,ce=0):(ce=Xe/qe,X=ft(Ie),oe=ft(we),re=ft(Ee),Ie===qe?le=re-oe:we===qe?le=1/3+X-re:Ee===qe&&(le=2/3+oe-X),le<0?le+=1:le>1&&(le-=1)),[le*360,ce*100,qe*100]},y.rgb.hwb=function($){const X=$[0],oe=$[1];let re=$[2];const le=y.rgb.hsl($)[0],ce=1/255*Math.min(X,Math.min(oe,re));return re=1-1/255*Math.max(X,Math.max(oe,re)),[le,ce*100,re*100]},y.rgb.cmyk=function($){const X=$[0]/255,oe=$[1]/255,re=$[2]/255,le=Math.min(1-X,1-oe,1-re),ce=(1-X-le)/(1-le)||0,Ie=(1-oe-le)/(1-le)||0,we=(1-re-le)/(1-le)||0;return[ce*100,Ie*100,we*100,le*100]};function d($,X){return vm($[0]-X[0],2)+vm($[1]-X[1],2)+vm($[2]-X[2],2)}y.rgb.keyword=function($){const X=V[$];if(X)return X;let oe=1/0,re;for(const le of Object.keys(M)){const ce=M[le],Ie=d($,ce);Ie.04045?vm((X+.055)/1.055,2.4):X/12.92,oe=oe>.04045?vm((oe+.055)/1.055,2.4):oe/12.92,re=re>.04045?vm((re+.055)/1.055,2.4):re/12.92;const le=X*.4124+oe*.3576+re*.1805,ce=X*.2126+oe*.7152+re*.0722,Ie=X*.0193+oe*.1192+re*.9505;return[le*100,ce*100,Ie*100]},y.rgb.lab=function($){const X=y.rgb.xyz($);let oe=X[0],re=X[1],le=X[2];oe/=95.047,re/=100,le/=108.883,oe=oe>.008856?vm(oe,1/3):7.787*oe+16/116,re=re>.008856?vm(re,1/3):7.787*re+16/116,le=le>.008856?vm(le,1/3):7.787*le+16/116;const ce=116*re-16,Ie=500*(oe-re),we=200*(re-le);return[ce,Ie,we]},y.hsl.rgb=function($){const X=$[0]/360,oe=$[1]/100,re=$[2]/100;let le,ce,Ie;if(oe===0)return Ie=re*255,[Ie,Ie,Ie];re<.5?le=re*(1+oe):le=re+oe-re*oe;const we=2*re-le,Ee=[0,0,0];for(let qe=0;qe<3;qe++)ce=X+1/3*-(qe-1),ce<0&&ce++,ce>1&&ce--,6*ce<1?Ie=we+(le-we)*6*ce:2*ce<1?Ie=le:3*ce<2?Ie=we+(le-we)*(2/3-ce)*6:Ie=we,Ee[qe]=Ie*255;return Ee},y.hsl.hsv=function($){const X=$[0];let oe=$[1]/100,re=$[2]/100,le=oe;const ce=Math.max(re,.01);re*=2,oe*=re<=1?re:2-re,le*=ce<=1?ce:2-ce;const Ie=(re+oe)/2,we=re===0?2*le/(ce+le):2*oe/(re+oe);return[X,we*100,Ie*100]},y.hsv.rgb=function($){const X=$[0]/60,oe=$[1]/100;let re=$[2]/100;const le=Math.floor(X)%6,ce=X-Math.floor(X),Ie=255*re*(1-oe),we=255*re*(1-oe*ce),Ee=255*re*(1-oe*(1-ce));switch(re*=255,le){case 0:return[re,Ee,Ie];case 1:return[we,re,Ie];case 2:return[Ie,re,Ee];case 3:return[Ie,we,re];case 4:return[Ee,Ie,re];case 5:return[re,Ie,we]}},y.hsv.hsl=function($){const X=$[0],oe=$[1]/100,re=$[2]/100,le=Math.max(re,.01);let ce,Ie;Ie=(2-oe)*re;const we=(2-oe)*le;return ce=oe*le,ce/=we<=1?we:2-we,ce=ce||0,Ie/=2,[X,ce*100,Ie*100]},y.hwb.rgb=function($){const X=$[0]/360;let oe=$[1]/100,re=$[2]/100;const le=oe+re;let ce;le>1&&(oe/=le,re/=le);const Ie=Math.floor(6*X),we=1-re;ce=6*X-Ie,Ie&1&&(ce=1-ce);const Ee=oe+ce*(we-oe);let qe,Xe,ft;switch(Ie){default:case 6:case 0:qe=we,Xe=Ee,ft=oe;break;case 1:qe=Ee,Xe=we,ft=oe;break;case 2:qe=oe,Xe=we,ft=Ee;break;case 3:qe=oe,Xe=Ee,ft=we;break;case 4:qe=Ee,Xe=oe,ft=we;break;case 5:qe=we,Xe=oe,ft=Ee;break}return[qe*255,Xe*255,ft*255]},y.cmyk.rgb=function($){const X=$[0]/100,oe=$[1]/100,re=$[2]/100,le=$[3]/100,ce=1-Math.min(1,X*(1-le)+le),Ie=1-Math.min(1,oe*(1-le)+le),we=1-Math.min(1,re*(1-le)+le);return[ce*255,Ie*255,we*255]},y.xyz.rgb=function($){const X=$[0]/100,oe=$[1]/100,re=$[2]/100;let le,ce,Ie;return le=X*3.2406+oe*-1.5372+re*-.4986,ce=X*-.9689+oe*1.8758+re*.0415,Ie=X*.0557+oe*-.204+re*1.057,le=le>.0031308?1.055*vm(le,1/2.4)-.055:le*12.92,ce=ce>.0031308?1.055*vm(ce,1/2.4)-.055:ce*12.92,Ie=Ie>.0031308?1.055*vm(Ie,1/2.4)-.055:Ie*12.92,le=Math.min(Math.max(0,le),1),ce=Math.min(Math.max(0,ce),1),Ie=Math.min(Math.max(0,Ie),1),[le*255,ce*255,Ie*255]},y.xyz.lab=function($){let X=$[0],oe=$[1],re=$[2];X/=95.047,oe/=100,re/=108.883,X=X>.008856?vm(X,1/3):7.787*X+16/116,oe=oe>.008856?vm(oe,1/3):7.787*oe+16/116,re=re>.008856?vm(re,1/3):7.787*re+16/116;const le=116*oe-16,ce=500*(X-oe),Ie=200*(oe-re);return[le,ce,Ie]},y.lab.xyz=function($){const X=$[0],oe=$[1],re=$[2];let le,ce,Ie;ce=(X+16)/116,le=oe/500+ce,Ie=ce-re/200;const we=vm(ce,3),Ee=vm(le,3),qe=vm(Ie,3);return ce=we>.008856?we:(ce-16/116)/7.787,le=Ee>.008856?Ee:(le-16/116)/7.787,Ie=qe>.008856?qe:(Ie-16/116)/7.787,le*=95.047,ce*=100,Ie*=108.883,[le,ce,Ie]},y.lab.lch=function($){const X=$[0],oe=$[1],re=$[2];let le;le=Math.atan2(re,oe)*360/2/Math.PI,le<0&&(le+=360);const Ie=Math.sqrt(oe*oe+re*re);return[X,Ie,le]},y.lch.lab=function($){const X=$[0],oe=$[1],le=$[2]/360*2*Math.PI,ce=oe*Math.cos(le),Ie=oe*Math.sin(le);return[X,ce,Ie]},y.rgb.ansi16=function($,X=null){const[oe,re,le]=$;let ce=X===null?y.rgb.hsv($)[2]:X;if(ce=Math.round(ce/50),ce===0)return 30;let Ie=30+(Math.round(le/255)<<2|Math.round(re/255)<<1|Math.round(oe/255));return ce===2&&(Ie+=60),Ie},y.hsv.ansi16=function($){return y.rgb.ansi16(y.hsv.rgb($),$[2])},y.rgb.ansi256=function($){const X=$[0],oe=$[1],re=$[2];return X===oe&&oe===re?X<8?16:X>248?231:Math.round((X-8)/247*24)+232:16+36*Math.round(X/255*5)+6*Math.round(oe/255*5)+Math.round(re/255*5)},y.ansi16.rgb=function($){let X=$%10;if(X===0||X===7)return $>50&&(X+=3.5),X=X/10.5*255,[X,X,X];const oe=(~~($>50)+1)*.5,re=(X&1)*oe*255,le=(X>>1&1)*oe*255,ce=(X>>2&1)*oe*255;return[re,le,ce]},y.ansi256.rgb=function($){if($>=232){const ce=($-232)*10+8;return[ce,ce,ce]}$-=16;let X;const oe=Math.floor($/36)/5*255,re=Math.floor((X=$%36)/6)/5*255,le=X%6/5*255;return[oe,re,le]},y.rgb.hex=function($){const oe=(((Math.round($[0])&255)<<16)+((Math.round($[1])&255)<<8)+(Math.round($[2])&255)).toString(16).toUpperCase();return"000000".substring(oe.length)+oe},y.hex.rgb=function($){const X=$.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!X)return[0,0,0];let oe=X[0];X[0].length===3&&(oe=oe.split("").map(we=>we+we).join(""));const re=parseInt(oe,16),le=re>>16&255,ce=re>>8&255,Ie=re&255;return[le,ce,Ie]},y.rgb.hcg=function($){const X=$[0]/255,oe=$[1]/255,re=$[2]/255,le=Math.max(Math.max(X,oe),re),ce=Math.min(Math.min(X,oe),re),Ie=le-ce;let we,Ee;return Ie<1?we=ce/(1-Ie):we=0,Ie<=0?Ee=0:le===X?Ee=(oe-re)/Ie%6:le===oe?Ee=2+(re-X)/Ie:Ee=4+(X-oe)/Ie,Ee/=6,Ee%=1,[Ee*360,Ie*100,we*100]},y.hsl.hcg=function($){const X=$[1]/100,oe=$[2]/100,re=oe<.5?2*X*oe:2*X*(1-oe);let le=0;return re<1&&(le=(oe-.5*re)/(1-re)),[$[0],re*100,le*100]},y.hsv.hcg=function($){const X=$[1]/100,oe=$[2]/100,re=X*oe;let le=0;return re<1&&(le=(oe-re)/(1-re)),[$[0],re*100,le*100]},y.hcg.rgb=function($){const X=$[0]/360,oe=$[1]/100,re=$[2]/100;if(oe===0)return[re*255,re*255,re*255];const le=[0,0,0],ce=X%1*6,Ie=ce%1,we=1-Ie;let Ee=0;switch(Math.floor(ce)){case 0:le[0]=1,le[1]=Ie,le[2]=0;break;case 1:le[0]=we,le[1]=1,le[2]=0;break;case 2:le[0]=0,le[1]=1,le[2]=Ie;break;case 3:le[0]=0,le[1]=we,le[2]=1;break;case 4:le[0]=Ie,le[1]=0,le[2]=1;break;default:le[0]=1,le[1]=0,le[2]=we}return Ee=(1-oe)*re,[(oe*le[0]+Ee)*255,(oe*le[1]+Ee)*255,(oe*le[2]+Ee)*255]},y.hcg.hsv=function($){const X=$[1]/100,oe=$[2]/100,re=X+oe*(1-X);let le=0;return re>0&&(le=X/re),[$[0],le*100,re*100]},y.hcg.hsl=function($){const X=$[1]/100,re=$[2]/100*(1-X)+.5*X;let le=0;return re>0&&re<.5?le=X/(2*re):re>=.5&&re<1&&(le=X/(2*(1-re))),[$[0],le*100,re*100]},y.hcg.hwb=function($){const X=$[1]/100,oe=$[2]/100,re=X+oe*(1-X);return[$[0],(re-X)*100,(1-re)*100]},y.hwb.hcg=function($){const X=$[1]/100,re=1-$[2]/100,le=re-X;let ce=0;return le<1&&(ce=(re-le)/(1-le)),[$[0],le*100,ce*100]},y.apple.rgb=function($){return[$[0]/65535*255,$[1]/65535*255,$[2]/65535*255]},y.rgb.apple=function($){return[$[0]/255*65535,$[1]/255*65535,$[2]/255*65535]},y.gray.rgb=function($){return[$[0]/100*255,$[0]/100*255,$[0]/100*255]},y.gray.hsl=function($){return[0,0,$[0]]},y.gray.hsv=y.gray.hsl,y.gray.hwb=function($){return[0,100,$[0]]},y.gray.cmyk=function($){return[0,0,0,$[0]]},y.gray.lab=function($){return[$[0],0,0]},y.gray.hex=function($){const X=Math.round($[0]/100*255)&255,re=((X<<16)+(X<<8)+X).toString(16).toUpperCase();return"000000".substring(re.length)+re},y.rgb.gray=function($){return[($[0]+$[1]+$[2])/3/255*100]}},41492:function(Ke,ye,_){const M=_(18135),V=_(40756),y={},d=Object.keys(M);function $(oe){const re=function(...le){const ce=le[0];return ce==null?ce:(ce.length>1&&(le=ce),oe(le))};return"conversion"in oe&&(re.conversion=oe.conversion),re}function X(oe){const re=function(...le){const ce=le[0];if(ce==null)return ce;ce.length>1&&(le=ce);const Ie=oe(le);if(typeof Ie=="object")for(let we=Ie.length,Ee=0;Ee{y[oe]={},Object.defineProperty(y[oe],"channels",{value:M[oe].channels}),Object.defineProperty(y[oe],"labels",{value:M[oe].labels});const re=V(oe);Object.keys(re).forEach(ce=>{const Ie=re[ce];y[oe][ce]=X(Ie),y[oe][ce].raw=$(Ie)})}),Ke.exports=y},40756:function(Ke,ye,_){const M=_(18135);function V(){const X={},oe=Object.keys(M);for(let re=oe.length,le=0;le=4&&le[3]!==1&&(ce=", "+le[3]),"hwb("+le[0]+", "+le[1]+"%, "+le[2]+"%"+ce+")"},X.to.keyword=function(le){return d[le.slice(0,3)]};function oe(le,ce,Ie){return Math.min(Math.max(ce,le),Ie)}function re(le){var ce=Math.round(le).toString(16).toUpperCase();return ce.length<2?"0"+ce:ce}},28170:function(Ke,ye,_){const M=_(75196),V=_(41492),y=["keyword","gray","hex"],d={};for(const Ee of Object.keys(V))d[[...V[Ee].labels].sort().join("")]=Ee;const $={};function X(Ee,qe){if(!(this instanceof X))return new X(Ee,qe);if(qe&&qe in y&&(qe=null),qe&&!(qe in V))throw new Error("Unknown model: "+qe);let Xe,ft;if(Ee==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(Ee instanceof X)this.model=Ee.model,this.color=[...Ee.color],this.valpha=Ee.valpha;else if(typeof Ee=="string"){const Ge=M.get(Ee);if(Ge===null)throw new Error("Unable to parse color from string: "+Ee);this.model=Ge.model,ft=V[this.model].channels,this.color=Ge.value.slice(0,ft),this.valpha=typeof Ge.value[ft]=="number"?Ge.value[ft]:1}else if(Ee.length>0){this.model=qe||"rgb",ft=V[this.model].channels;const Ge=Array.prototype.slice.call(Ee,0,ft);this.color=we(Ge,ft),this.valpha=typeof Ee[ft]=="number"?Ee[ft]:1}else if(typeof Ee=="number")this.model="rgb",this.color=[Ee>>16&255,Ee>>8&255,Ee&255],this.valpha=1;else{this.valpha=1;const Ge=Object.keys(Ee);"alpha"in Ee&&(Ge.splice(Ge.indexOf("alpha"),1),this.valpha=typeof Ee.alpha=="number"?Ee.alpha:0);const lt=Ge.sort().join("");if(!(lt in d))throw new Error("Unable to parse color from object: "+JSON.stringify(Ee));this.model=d[lt];const{labels:Ye}=V[this.model],It=[];for(Xe=0;Xe(Ee%360+360)%360),saturationl:le("hsl",1,ce(100)),lightness:le("hsl",2,ce(100)),saturationv:le("hsv",1,ce(100)),value:le("hsv",2,ce(100)),chroma:le("hcg",1,ce(100)),gray:le("hcg",2,ce(100)),white:le("hwb",1,ce(100)),wblack:le("hwb",2,ce(100)),cyan:le("cmyk",0,ce(100)),magenta:le("cmyk",1,ce(100)),yellow:le("cmyk",2,ce(100)),black:le("cmyk",3,ce(100)),x:le("xyz",0,ce(95.047)),y:le("xyz",1,ce(100)),z:le("xyz",2,ce(108.833)),l:le("lab",0,ce(100)),a:le("lab",1),b:le("lab",2),keyword(Ee){return Ee!==void 0?new X(Ee):V[this.model].keyword(this.color)},hex(Ee){return Ee!==void 0?new X(Ee):M.to.hex(this.rgb().round().color)},hexa(Ee){if(Ee!==void 0)return new X(Ee);const qe=this.rgb().round().color;let Xe=Math.round(this.valpha*255).toString(16).toUpperCase();return Xe.length===1&&(Xe="0"+Xe),M.to.hex(qe)+Xe},rgbNumber(){const Ee=this.rgb().color;return(Ee[0]&255)<<16|(Ee[1]&255)<<8|Ee[2]&255},luminosity(){const Ee=this.rgb().color,qe=[];for(const[Xe,ft]of Ee.entries()){const Ge=ft/255;qe[Xe]=Ge<=.04045?Ge/12.92:vm((Ge+.055)/1.055,2.4)}return .2126*qe[0]+.7152*qe[1]+.0722*qe[2]},contrast(Ee){const qe=this.luminosity(),Xe=Ee.luminosity();return qe>Xe?(qe+.05)/(Xe+.05):(Xe+.05)/(qe+.05)},level(Ee){const qe=this.contrast(Ee);return qe>=7?"AAA":qe>=4.5?"AA":""},isDark(){const Ee=this.rgb().color;return(Ee[0]*2126+Ee[1]*7152+Ee[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const Ee=this.rgb();for(let qe=0;qe<3;qe++)Ee.color[qe]=255-Ee.color[qe];return Ee},lighten(Ee){const qe=this.hsl();return qe.color[2]+=qe.color[2]*Ee,qe},darken(Ee){const qe=this.hsl();return qe.color[2]-=qe.color[2]*Ee,qe},saturate(Ee){const qe=this.hsl();return qe.color[1]+=qe.color[1]*Ee,qe},desaturate(Ee){const qe=this.hsl();return qe.color[1]-=qe.color[1]*Ee,qe},whiten(Ee){const qe=this.hwb();return qe.color[1]+=qe.color[1]*Ee,qe},blacken(Ee){const qe=this.hwb();return qe.color[2]+=qe.color[2]*Ee,qe},grayscale(){const Ee=this.rgb().color,qe=Ee[0]*.3+Ee[1]*.59+Ee[2]*.11;return X.rgb(qe,qe,qe)},fade(Ee){return this.alpha(this.valpha-this.valpha*Ee)},opaquer(Ee){return this.alpha(this.valpha+this.valpha*Ee)},rotate(Ee){const qe=this.hsl();let Xe=qe.color[0];return Xe=(Xe+Ee)%360,Xe=Xe<0?360+Xe:Xe,qe.color[0]=Xe,qe},mix(Ee,qe){if(!Ee||!Ee.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof Ee);const Xe=Ee.rgb(),ft=this.rgb(),Ge=qe===void 0?.5:qe,lt=2*Ge-1,Ye=Xe.alpha()-ft.alpha(),It=((lt*Ye===-1?lt:(lt+Ye)/(1+lt*Ye))+1)/2,At=1-It;return X.rgb(It*Xe.red()+At*ft.red(),It*Xe.green()+At*ft.green(),It*Xe.blue()+At*ft.blue(),Xe.alpha()*Ge+ft.alpha()*(1-Ge))}};for(const Ee of Object.keys(V)){if(y.includes(Ee))continue;const{channels:qe}=V[Ee];X.prototype[Ee]=function(...Xe){return this.model===Ee?new X(this):Xe.length>0?new X(Xe,Ee):new X([...Ie(V[this.model][Ee].raw(this.color)),this.valpha],Ee)},X[Ee]=function(...Xe){let ft=Xe[0];return typeof ft=="number"&&(ft=we(Xe,qe)),new X(ft,Ee)}}function oe(Ee,qe){return Number(Ee.toFixed(qe))}function re(Ee){return function(qe){return oe(qe,Ee)}}function le(Ee,qe,Xe){Ee=Array.isArray(Ee)?Ee:[Ee];for(const ft of Ee)($[ft]||($[ft]=[]))[qe]=Xe;return Ee=Ee[0],function(ft){let Ge;return ft!==void 0?(Xe&&(ft=Xe(ft)),Ge=this[Ee](),Ge.color[qe]=ft,Ge):(Ge=this[Ee]().color[qe],Xe&&(Ge=Xe(Ge)),Ge)}}function ce(Ee){return function(qe){return Math.max(0,Math.min(Ee,qe))}}function Ie(Ee){return Array.isArray(Ee)?Ee:[Ee]}function we(Ee,qe){for(let Xe=0;Xest||at.push({node:Me,dist:Ht})}for(;at.length&&!at.peek().node.children;){var Rt=at.pop(),vt=Rt.node,Je=Ge(vt,Ue,rt),Ce=Ge(vt,Ze,Ct);if(Rt.dist=Ue.minX&&At[0]<=Ue.maxX&&At[1]>=Ue.minY&&At[1]<=Ue.maxY}function ce(At,Ue,rt){for(var Ze=Math.min(At[0],Ue[0]),Ct=Math.min(At[1],Ue[1]),st=Math.max(At[0],Ue[0]),Et=Math.max(At[1],Ue[1]),at=rt.search({minX:Ze,minY:Ct,maxX:st,maxY:Et}),mt=0;mt0!=Ie(At,Ue,Ze)>0&&Ie(rt,Ze,At)>0!=Ie(rt,Ze,Ue)>0}function Ee(At){var Ue=At.p,rt=At.next.p;return At.minX=Math.min(Ue[0],rt[0]),At.minY=Math.min(Ue[1],rt[1]),At.maxX=Math.max(Ue[0],rt[0]),At.maxY=Math.max(Ue[1],rt[1]),At}function qe(At){for(var Ue=At[0],rt=At[0],Ze=At[0],Ct=At[0],st=0;stZe[0]&&(Ze=Et),Et[1]Ct[1]&&(Ct=Et)}var at=[Ue,rt,Ze,Ct],mt=at.slice();for(st=0;st1?(Ze=rt[0],Ct=rt[1]):at>0&&(Ze+=st*at,Ct+=Et*at)}return st=At[0]-Ze,Et=At[1]-Ct,st*st+Et*Et}function lt(At,Ue,rt,Ze,Ct,st,Et,at){var mt=rt-At,Mt=Ze-Ue,Me=Et-Ct,Ht=at-st,Rt=At-Ct,vt=Ue-st,Je=mt*mt+Mt*Mt,Ce=mt*Me+Mt*Ht,pt=Me*Me+Ht*Ht,et=mt*Rt+Mt*vt,br=Me*Rt+Ht*vt,Jt=Je*pt-Ce*Ce,Vr,gn,yn,_i,Hn=Jt,Ln=Jt;Jt===0?(gn=0,Hn=1,_i=br,Ln=pt):(gn=Ce*br-pt*et,_i=Je*br-Ce*et,gn<0?(gn=0,_i=br,Ln=pt):gn>Hn&&(gn=Hn,_i=br+Ce,Ln=pt)),_i<0?(_i=0,-et<0?gn=0:-et>Je?gn=Hn:(gn=-et,Hn=Je)):_i>Ln&&(_i=Ln,-et+Ce<0?gn=0:-et+Ce>Je?gn=Hn:(gn=-et+Ce,Hn=Je)),Vr=gn===0?0:gn/Hn,yn=_i===0?0:_i/Ln;var Ia=(1-Vr)*At+Vr*rt,Zi=(1-Vr)*Ue+Vr*Ze,Ua=(1-yn)*Ct+yn*Et,fa=(1-yn)*st+yn*at,ka=Ua-Ia,mo=fa-Zi;return ka*ka+mo*mo}function Ye(At,Ue){return At[0]===Ue[0]?At[1]-Ue[1]:At[0]-Ue[0]}function It(At){At.sort(Ye);for(var Ue=[],rt=0;rt=2&&Ie(Ue[Ue.length-2],Ue[Ue.length-1],At[rt])<=0;)Ue.pop();Ue.push(At[rt])}for(var Ze=[],Ct=At.length-1;Ct>=0;Ct--){for(;Ze.length>=2&&Ie(Ze[Ze.length-2],Ze[Ze.length-1],At[Ct])<=0;)Ze.pop();Ze.push(At[Ct])}return Ze.pop(),Ue.pop(),Ue.concat(Ze)}},75041:function(Ke){(function(){var ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_={rotl:function(M,V){return M<>>32-V},rotr:function(M,V){return M<<32-V|M>>>V},endian:function(M){if(M.constructor==Number)return _.rotl(M,8)&16711935|_.rotl(M,24)&4278255360;for(var V=0;V0;M--)V.push(Math.floor(Math.random()*256));return V},bytesToWords:function(M){for(var V=[],y=0,d=0;y>>5]|=M[y]<<24-d%32;return V},wordsToBytes:function(M){for(var V=[],y=0;y>>5]>>>24-y%32&255);return V},bytesToHex:function(M){for(var V=[],y=0;y>>4).toString(16)),V.push((M[y]&15).toString(16));return V.join("")},hexToBytes:function(M){for(var V=[],y=0;y>>6*(3-$)&63)):V.push("=");return V.join("")},base64ToBytes:function(M){M=M.replace(/[^A-Z0-9+\/]/ig,"");for(var V=[],y=0,d=0;y>>6-d*2);return V}};Ke.exports=_})()},57965:function(Ke,ye,_){"use strict";_.d(ye,{j2:function(){return M},b4:function(){return oe},YF:function(){return V},We:function(){return re},TS:function(){return It},VR:function(){return Ue},G9:function(){return ft},ly:function(){return Ge},sd:function(){return Xe}});function M(rt,Ze){return rtZe?1:rt>=Ze?0:NaN}function V(rt){return rt.length===1&&(rt=y(rt)),{left:function(Ze,Ct,st,Et){for(st==null&&(st=0),Et==null&&(Et=Ze.length);st>>1;rt(Ze[at],Ct)<0?st=at+1:Et=at}return st},right:function(Ze,Ct,st,Et){for(st==null&&(st=0),Et==null&&(Et=Ze.length);st>>1;rt(Ze[at],Ct)>0?Et=at:st=at+1}return st}}}function y(rt){return function(Ze,Ct){return M(rt(Ze),Ct)}}var d=V(M),$=d.right,X=d.left,oe=$;function re(rt,Ze){var Ct=rt.length,st=-1,Et,at,mt;if(Ze==null){for(;++st=Et)for(at=mt=Et;++stEt&&(at=Et),mt=Et)for(at=mt=Et;++stEt&&(at=Et),mt0)return[rt];if((st=Ze0)for(rt=Math.ceil(rt/Mt),Ze=Math.floor(Ze/Mt),mt=new Array(at=Math.ceil(Ze-rt+1));++Et=0?(at>=we?10:at>=Ee?5:at>=qe?2:1)*Math.pow(10,Et):-Math.pow(10,-Et)/(at>=we?10:at>=Ee?5:at>=qe?2:1)}function Ge(rt,Ze,Ct){var st=Math.abs(Ze-rt)/Math.max(0,Ct),Et=Math.pow(10,Math.floor(Math.log(st)/Math.LN10)),at=st/Et;return at>=we?Et*=10:at>=Ee?Et*=5:at>=qe&&(Et*=2),Zevt;)Je.pop(),--Ce;var pt=new Array(Ce+1),et;for(at=0;at<=Ce;++at)et=pt[at]=[],et.x0=at>0?Je[at-1]:Rt,et.x1=at=0;)for(mt=rt[Ze],Ct=mt.length;--Ct>=0;)at[--Et]=mt[Ct];return at}function At(rt){return rt===null?NaN:+rt}function Ue(rt,Ze,Ct){if(Ct==null&&(Ct=At),!!(st=rt.length)){if((Ze=+Ze)<=0||st<2)return+Ct(rt[0],0,rt);if(Ze>=1)return+Ct(rt[st-1],st-1,rt);var st,Et=(st-1)*Ze,at=Math.floor(Et),mt=+Ct(rt[at],at,rt),Mt=+Ct(rt[at+1],at+1,rt);return mt+(Mt-mt)*(Et-at)}}},9498:function(Ke){(function(ye,_){Ke.exports=_()})(this,function(){"use strict";var ye=1e3,_=6e4,M=36e5,V="millisecond",y="second",d="minute",$="hour",X="day",oe="week",re="month",le="quarter",ce="year",Ie="date",we="Invalid Date",Ee=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,qe=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Xe={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Et){var at=["th","st","nd","rd"],mt=Et%100;return"["+Et+(at[(mt-20)%10]||at[mt]||at[0])+"]"}},ft=function(Et,at,mt){var Mt=String(Et);return!Mt||Mt.length>=at?Et:""+Array(at+1-Mt.length).join(mt)+Et},Ge={s:ft,z:function(Et){var at=-Et.utcOffset(),mt=Math.abs(at),Mt=Math.floor(mt/60),Me=mt%60;return(at<=0?"+":"-")+ft(Mt,2,"0")+":"+ft(Me,2,"0")},m:function Et(at,mt){if(at.date()1)return Et(Rt[0])}else{var vt=at.name;Ye[vt]=at,Me=vt}return!Mt&&Me&&(lt=Me),Me||!Mt&<},rt=function(Et,at){if(At(Et))return Et.clone();var mt=typeof at=="object"?at:{};return mt.date=Et,mt.args=arguments,new Ct(mt)},Ze=Ge;Ze.l=Ue,Ze.i=At,Ze.w=function(Et,at){return rt(Et,{locale:at.$L,utc:at.$u,x:at.$x,$offset:at.$offset})};var Ct=function(){function Et(mt){this.$L=Ue(mt.locale,null,!0),this.parse(mt),this.$x=this.$x||mt.x||{},this[It]=!0}var at=Et.prototype;return at.parse=function(mt){this.$d=function(Mt){var Me=Mt.date,Ht=Mt.utc;if(Me===null)return new Date(NaN);if(Ze.u(Me))return new Date;if(Me instanceof Date)return new Date(Me);if(typeof Me=="string"&&!/Z$/i.test(Me)){var Rt=Me.match(Ee);if(Rt){var vt=Rt[2]-1||0,Je=(Rt[7]||"0").substring(0,3);return Ht?new Date(Date.UTC(Rt[1],vt,Rt[3]||1,Rt[4]||0,Rt[5]||0,Rt[6]||0,Je)):new Date(Rt[1],vt,Rt[3]||1,Rt[4]||0,Rt[5]||0,Rt[6]||0,Je)}}return new Date(Me)}(mt),this.init()},at.init=function(){var mt=this.$d;this.$y=mt.getFullYear(),this.$M=mt.getMonth(),this.$D=mt.getDate(),this.$W=mt.getDay(),this.$H=mt.getHours(),this.$m=mt.getMinutes(),this.$s=mt.getSeconds(),this.$ms=mt.getMilliseconds()},at.$utils=function(){return Ze},at.isValid=function(){return this.$d.toString()!==we},at.isSame=function(mt,Mt){var Me=rt(mt);return this.startOf(Mt)<=Me&&Me<=this.endOf(Mt)},at.isAfter=function(mt,Mt){return rt(mt)68?1900:2e3)},X=function(we){return function(Ee){this[we]=+Ee}},oe=[/[+-]\d\d:?(\d\d)?|Z/,function(we){(this.zone||(this.zone={})).offset=function(Ee){if(!Ee||Ee==="Z")return 0;var qe=Ee.match(/([+-]|\d\d)/g),Xe=60*qe[1]+(+qe[2]||0);return Xe===0?0:qe[0]==="+"?-Xe:Xe}(we)}],re=function(we){var Ee=d[we];return Ee&&(Ee.indexOf?Ee:Ee.s.concat(Ee.f))},le=function(we,Ee){var qe,Xe=d.meridiem;if(Xe){for(var ft=1;ft<=24;ft+=1)if(we.indexOf(Xe(ft,0,Ee))>-1){qe=ft>12;break}}else qe=we===(Ee?"pm":"PM");return qe},ce={A:[y,function(we){this.afternoon=le(we,!1)}],a:[y,function(we){this.afternoon=le(we,!0)}],S:[/\d/,function(we){this.milliseconds=100*+we}],SS:[M,function(we){this.milliseconds=10*+we}],SSS:[/\d{3}/,function(we){this.milliseconds=+we}],s:[V,X("seconds")],ss:[V,X("seconds")],m:[V,X("minutes")],mm:[V,X("minutes")],H:[V,X("hours")],h:[V,X("hours")],HH:[V,X("hours")],hh:[V,X("hours")],D:[V,X("day")],DD:[M,X("day")],Do:[y,function(we){var Ee=d.ordinal,qe=we.match(/\d+/);if(this.day=qe[0],Ee)for(var Xe=1;Xe<=31;Xe+=1)Ee(Xe).replace(/\[|\]/g,"")===we&&(this.day=Xe)}],M:[V,X("month")],MM:[M,X("month")],MMM:[y,function(we){var Ee=re("months"),qe=(re("monthsShort")||Ee.map(function(Xe){return Xe.slice(0,3)})).indexOf(we)+1;if(qe<1)throw new Error;this.month=qe%12||qe}],MMMM:[y,function(we){var Ee=re("months").indexOf(we)+1;if(Ee<1)throw new Error;this.month=Ee%12||Ee}],Y:[/[+-]?\d+/,X("year")],YY:[M,function(we){this.year=$(we)}],YYYY:[/\d{4}/,X("year")],Z:oe,ZZ:oe};function Ie(we){var Ee,qe;Ee=we,qe=d&&d.formats;for(var Xe=(we=Ee.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Ue,rt,Ze){var Ct=Ze&&Ze.toUpperCase();return rt||qe[Ze]||ye[Ze]||qe[Ct].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(st,Et,at){return Et||at.slice(1)})})).match(_),ft=Xe.length,Ge=0;Ge-1)return new Date((Mt==="X"?1e3:1)*mt);var Ht=Ie(Mt)(mt),Rt=Ht.year,vt=Ht.month,Je=Ht.day,Ce=Ht.hours,pt=Ht.minutes,et=Ht.seconds,br=Ht.milliseconds,Jt=Ht.zone,Vr=new Date,gn=Je||(Rt||vt?1:Vr.getDate()),yn=Rt||Vr.getFullYear(),_i=0;Rt&&!vt||(_i=vt>0?vt-1:Vr.getMonth());var Hn=Ce||0,Ln=pt||0,Ia=et||0,Zi=br||0;return Jt?new Date(Date.UTC(yn,_i,gn,Hn,Ln,Ia,Zi+60*Jt.offset*1e3)):Me?new Date(Date.UTC(yn,_i,gn,Hn,Ln,Ia,Zi)):new Date(yn,_i,gn,Hn,Ln,Ia,Zi)}catch(Ua){return new Date("")}}(lt,At,Ye),this.init(),Ct&&Ct!==!0&&(this.$L=this.locale(Ct).$L),Ze&<!=this.format(At)&&(this.$d=new Date("")),d={}}else if(At instanceof Array)for(var st=At.length,Et=1;Et<=st;Et+=1){It[1]=At[Et-1];var at=qe.apply(this,It);if(at.isValid()){this.$d=at.$d,this.$L=at.$L,this.init();break}Et===st&&(this.$d=new Date(""))}else ft.call(this,Ge)}}})},61072:function(Ke){(function(ye,_){Ke.exports=_()})(this,function(){"use strict";return function(ye,_,M){var V=_.prototype,y=function(re){return re&&(re.indexOf?re:re.s)},d=function(re,le,ce,Ie,we){var Ee=re.name?re:re.$locale(),qe=y(Ee[le]),Xe=y(Ee[ce]),ft=qe||Xe.map(function(lt){return lt.slice(0,Ie)});if(!we)return ft;var Ge=Ee.weekStart;return ft.map(function(lt,Ye){return ft[(Ye+(Ge||0))%7]})},$=function(){return M.Ls[M.locale()]},X=function(re,le){return re.formats[le]||function(ce){return ce.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Ie,we,Ee){return we||Ee.slice(1)})}(re.formats[le.toUpperCase()])},oe=function(){var re=this;return{months:function(le){return le?le.format("MMMM"):d(re,"months")},monthsShort:function(le){return le?le.format("MMM"):d(re,"monthsShort","months",3)},firstDayOfWeek:function(){return re.$locale().weekStart||0},weekdays:function(le){return le?le.format("dddd"):d(re,"weekdays")},weekdaysMin:function(le){return le?le.format("dd"):d(re,"weekdaysMin","weekdays",2)},weekdaysShort:function(le){return le?le.format("ddd"):d(re,"weekdaysShort","weekdays",3)},longDateFormat:function(le){return X(re.$locale(),le)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};V.localeData=function(){return oe.bind(this)()},M.localeData=function(){var re=$();return{firstDayOfWeek:function(){return re.weekStart||0},weekdays:function(){return M.weekdays()},weekdaysShort:function(){return M.weekdaysShort()},weekdaysMin:function(){return M.weekdaysMin()},months:function(){return M.months()},monthsShort:function(){return M.monthsShort()},longDateFormat:function(le){return X(re,le)},meridiem:re.meridiem,ordinal:re.ordinal}},M.months=function(){return d($(),"months")},M.monthsShort=function(){return d($(),"monthsShort","months",3)},M.weekdays=function(re){return d($(),"weekdays",null,null,re)},M.weekdaysShort=function(re){return d($(),"weekdaysShort","weekdays",3,re)},M.weekdaysMin=function(re){return d($(),"weekdaysMin","weekdays",2,re)}}})},96901:function(Ke){(function(ye,_){Ke.exports=_()})(this,function(){"use strict";var ye="week",_="year";return function(M,V,y){var d=V.prototype;d.week=function($){if($===void 0&&($=null),$!==null)return this.add(7*($-this.week()),"day");var X=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var oe=y(this).startOf(_).add(1,_).date(X),re=y(this).endOf(ye);if(oe.isBefore(re))return 1}var le=y(this).startOf(_).date(X).startOf(ye).subtract(1,"millisecond"),ce=this.diff(le,ye,!0);return ce<0?y(this).startOf("week").week():Math.ceil(ce)},d.weeks=function($){return $===void 0&&($=null),this.week($)}}})},50499:function(Ke){(function(ye,_){Ke.exports=_()})(this,function(){"use strict";return function(ye,_){_.prototype.weekYear=function(){var M=this.month(),V=this.week(),y=this.year();return V===1&&M===11?y+1:M===0&&V>=52?y-1:y}}})},23001:function(Ke){(function(ye,_){Ke.exports=_()})(this,function(){"use strict";return function(ye,_){_.prototype.weekday=function(M){var V=this.$locale().weekStart||0,y=this.$W,d=(y0&&typeof we[0]!="number")}function Ie(we,Ee,qe){var Xe,ft;if(typeof we!=typeof Ee||le(we)||le(Ee)||we.prototype!==Ee.prototype||V(we)!==V(Ee))return!1;var Ge=d(we),lt=d(Ee);if(Ge!==lt)return!1;if(Ge||lt)return we.source===Ee.source&&$(we)===$(Ee);if(X(we)&&X(Ee))return oe.call(we)===oe.call(Ee);var Ye=ce(we),It=ce(Ee);if(Ye!==It)return!1;if(Ye||It){if(we.length!==Ee.length)return!1;for(Xe=0;Xe=0;Xe--)if(At[Xe]!=Ue[Xe])return!1;for(Xe=At.length-1;Xe>=0;Xe--)if(ft=At[Xe],!re(we[ft],Ee[ft],qe))return!1;return!0}Ke.exports=re},51494:function(Ke,ye,_){"use strict";var M=_(38262)(),V=_(64656),y=M&&V("%Object.defineProperty%",!0);if(y)try{y({},"a",{value:1})}catch(oe){y=!1}var d=V("%SyntaxError%"),$=V("%TypeError%"),X=_(67747);Ke.exports=function(re,le,ce){if(!re||typeof re!="object"&&typeof re!="function")throw new $("`obj` must be an object or a function`");if(typeof le!="string"&&typeof le!="symbol")throw new $("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new $("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new $("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new $("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new $("`loose`, if provided, must be a boolean");var Ie=arguments.length>3?arguments[3]:null,we=arguments.length>4?arguments[4]:null,Ee=arguments.length>5?arguments[5]:null,qe=arguments.length>6?arguments[6]:!1,Xe=!!X&&X(re,le);if(y)y(re,le,{configurable:Ee===null&&Xe?Xe.configurable:!Ee,enumerable:Ie===null&&Xe?Xe.enumerable:!Ie,value:ce,writable:we===null&&Xe?Xe.writable:!we});else if(qe||!Ie&&!we&&!Ee)re[le]=ce;else throw new d("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}},8263:function(Ke,ye,_){"use strict";var M=_(64253),V=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",y=Object.prototype.toString,d=Array.prototype.concat,$=_(51494),X=function(ce){return typeof ce=="function"&&y.call(ce)==="[object Function]"},oe=_(38262)(),re=function(ce,Ie,we,Ee){if(Ie in ce){if(Ee===!0){if(ce[Ie]===we)return}else if(!X(Ee)||!Ee())return}oe?$(ce,Ie,we,!0):$(ce,Ie,we)},le=function(ce,Ie){var we=arguments.length>2?arguments[2]:{},Ee=M(Ie);V&&(Ee=d.call(Ee,Object.getOwnPropertySymbols(Ie)));for(var qe=0;qe=this.minPts&&(M=this._mergeArrays(M,d))}this._assigned[y]!==1&&this._addToCluster(y,_)}},ye.prototype._addToCluster=function(_,M){this.clusters[M].push(_),this._assigned[_]=1},ye.prototype._regionQuery=function(_){for(var M=[],V=0;V0){for(var re=0;re=0);return M},ye.prototype.assign=function(){for(var _=!1,M=this.dataset.length,V,y=0;y=this.minPts)return $}},V.prototype._regionQuery=function(y,d){d=d||this.epsilon;for(var $=[],X=0,oe=this.dataset.length;Xd&&(V=y):M80*Rt){et=Jt=Me[0],br=Vr=Me[1];for(var Hn=Rt;HnJt&&(Jt=gn),yn>Vr&&(Vr=yn);_i=Math.max(Jt-et,Vr-br),_i=_i!==0?32767/_i:0}return V(Ce,pt,Rt,et,br,_i,0),pt}function _(Me,Ht,Rt,vt,Je){var Ce,pt;if(Je===Mt(Me,Ht,Rt,vt)>0)for(Ce=Ht;Ce=Ht;Ce-=vt)pt=Et(Ce,Me[Ce],Me[Ce+1],pt);return pt&&Ye(pt,pt.next)&&(at(pt),pt=pt.next),pt}function M(Me,Ht){if(!Me)return Me;Ht||(Ht=Me);var Rt=Me,vt;do if(vt=!1,!Rt.steiner&&(Ye(Rt,Rt.next)||lt(Rt.prev,Rt,Rt.next)===0)){if(at(Rt),Rt=Ht=Rt.prev,Rt===Rt.next)break;vt=!0}else Rt=Rt.next;while(vt||Rt!==Ht);return Ht}function V(Me,Ht,Rt,vt,Je,Ce,pt){if(Me){!pt&&Ce&&we(Me,vt,Je,Ce);for(var et=Me,br,Jt;Me.prev!==Me.next;){if(br=Me.prev,Jt=Me.next,Ce?d(Me,vt,Je,Ce):y(Me)){Ht.push(br.i/Rt|0),Ht.push(Me.i/Rt|0),Ht.push(Jt.i/Rt|0),at(Me),Me=Jt.next,et=Jt.next;continue}if(Me=Jt,Me===et){pt?pt===1?(Me=$(M(Me),Ht,Rt),V(Me,Ht,Rt,vt,Je,Ce,2)):pt===2&&X(Me,Ht,Rt,vt,Je,Ce):V(M(Me),Ht,Rt,vt,Je,Ce,1);break}}}}function y(Me){var Ht=Me.prev,Rt=Me,vt=Me.next;if(lt(Ht,Rt,vt)>=0)return!1;for(var Je=Ht.x,Ce=Rt.x,pt=vt.x,et=Ht.y,br=Rt.y,Jt=vt.y,Vr=JeCe?Je>pt?Je:pt:Ce>pt?Ce:pt,_i=et>br?et>Jt?et:Jt:br>Jt?br:Jt,Hn=vt.next;Hn!==Ht;){if(Hn.x>=Vr&&Hn.x<=yn&&Hn.y>=gn&&Hn.y<=_i&&ft(Je,et,Ce,br,pt,Jt,Hn.x,Hn.y)&<(Hn.prev,Hn,Hn.next)>=0)return!1;Hn=Hn.next}return!0}function d(Me,Ht,Rt,vt){var Je=Me.prev,Ce=Me,pt=Me.next;if(lt(Je,Ce,pt)>=0)return!1;for(var et=Je.x,br=Ce.x,Jt=pt.x,Vr=Je.y,gn=Ce.y,yn=pt.y,_i=etbr?et>Jt?et:Jt:br>Jt?br:Jt,Ia=Vr>gn?Vr>yn?Vr:yn:gn>yn?gn:yn,Zi=qe(_i,Hn,Ht,Rt,vt),Ua=qe(Ln,Ia,Ht,Rt,vt),fa=Me.prevZ,ka=Me.nextZ;fa&&fa.z>=Zi&&ka&&ka.z<=Ua;){if(fa.x>=_i&&fa.x<=Ln&&fa.y>=Hn&&fa.y<=Ia&&fa!==Je&&fa!==pt&&ft(et,Vr,br,gn,Jt,yn,fa.x,fa.y)&<(fa.prev,fa,fa.next)>=0||(fa=fa.prevZ,ka.x>=_i&&ka.x<=Ln&&ka.y>=Hn&&ka.y<=Ia&&ka!==Je&&ka!==pt&&ft(et,Vr,br,gn,Jt,yn,ka.x,ka.y)&<(ka.prev,ka,ka.next)>=0))return!1;ka=ka.nextZ}for(;fa&&fa.z>=Zi;){if(fa.x>=_i&&fa.x<=Ln&&fa.y>=Hn&&fa.y<=Ia&&fa!==Je&&fa!==pt&&ft(et,Vr,br,gn,Jt,yn,fa.x,fa.y)&<(fa.prev,fa,fa.next)>=0)return!1;fa=fa.prevZ}for(;ka&&ka.z<=Ua;){if(ka.x>=_i&&ka.x<=Ln&&ka.y>=Hn&&ka.y<=Ia&&ka!==Je&&ka!==pt&&ft(et,Vr,br,gn,Jt,yn,ka.x,ka.y)&<(ka.prev,ka,ka.next)>=0)return!1;ka=ka.nextZ}return!0}function $(Me,Ht,Rt){var vt=Me;do{var Je=vt.prev,Ce=vt.next.next;!Ye(Je,Ce)&&It(Je,vt,vt.next,Ce)&&Ze(Je,Ce)&&Ze(Ce,Je)&&(Ht.push(Je.i/Rt|0),Ht.push(vt.i/Rt|0),Ht.push(Ce.i/Rt|0),at(vt),at(vt.next),vt=Me=Ce),vt=vt.next}while(vt!==Me);return M(vt)}function X(Me,Ht,Rt,vt,Je,Ce){var pt=Me;do{for(var et=pt.next.next;et!==pt.prev;){if(pt.i!==et.i&&Ge(pt,et)){var br=st(pt,et);pt=M(pt,pt.next),br=M(br,br.next),V(pt,Ht,Rt,vt,Je,Ce,0),V(br,Ht,Rt,vt,Je,Ce,0);return}et=et.next}pt=pt.next}while(pt!==Me)}function oe(Me,Ht,Rt,vt){var Je=[],Ce,pt,et,br,Jt;for(Ce=0,pt=Ht.length;Ce=Rt.next.y&&Rt.next.y!==Rt.y){var et=Rt.x+(Je-Rt.y)*(Rt.next.x-Rt.x)/(Rt.next.y-Rt.y);if(et<=vt&&et>Ce&&(Ce=et,pt=Rt.x=Rt.x&&Rt.x>=Jt&&vt!==Rt.x&&ft(Jept.x||Rt.x===pt.x&&Ie(pt,Rt)))&&(pt=Rt,gn=yn)),Rt=Rt.next;while(Rt!==br);return pt}function Ie(Me,Ht){return lt(Me.prev,Me,Ht.prev)<0&<(Ht.next,Me,Me.next)<0}function we(Me,Ht,Rt,vt){var Je=Me;do Je.z===0&&(Je.z=qe(Je.x,Je.y,Ht,Rt,vt)),Je.prevZ=Je.prev,Je.nextZ=Je.next,Je=Je.next;while(Je!==Me);Je.prevZ.nextZ=null,Je.prevZ=null,Ee(Je)}function Ee(Me){var Ht,Rt,vt,Je,Ce,pt,et,br,Jt=1;do{for(Rt=Me,Me=null,Ce=null,pt=0;Rt;){for(pt++,vt=Rt,et=0,Ht=0;Ht0||br>0&&vt;)et!==0&&(br===0||!vt||Rt.z<=vt.z)?(Je=Rt,Rt=Rt.nextZ,et--):(Je=vt,vt=vt.nextZ,br--),Ce?Ce.nextZ=Je:Me=Je,Je.prevZ=Ce,Ce=Je;Rt=vt}Ce.nextZ=null,Jt*=2}while(pt>1);return Me}function qe(Me,Ht,Rt,vt,Je){return Me=(Me-Rt)*Je|0,Ht=(Ht-vt)*Je|0,Me=(Me|Me<<8)&16711935,Me=(Me|Me<<4)&252645135,Me=(Me|Me<<2)&858993459,Me=(Me|Me<<1)&1431655765,Ht=(Ht|Ht<<8)&16711935,Ht=(Ht|Ht<<4)&252645135,Ht=(Ht|Ht<<2)&858993459,Ht=(Ht|Ht<<1)&1431655765,Me|Ht<<1}function Xe(Me){var Ht=Me,Rt=Me;do(Ht.x=(Me-pt)*(Ce-et)&&(Me-pt)*(vt-et)>=(Rt-pt)*(Ht-et)&&(Rt-pt)*(Ce-et)>=(Je-pt)*(vt-et)}function Ge(Me,Ht){return Me.next.i!==Ht.i&&Me.prev.i!==Ht.i&&!rt(Me,Ht)&&(Ze(Me,Ht)&&Ze(Ht,Me)&&Ct(Me,Ht)&&(lt(Me.prev,Me,Ht.prev)||lt(Me,Ht.prev,Ht))||Ye(Me,Ht)&<(Me.prev,Me,Me.next)>0&<(Ht.prev,Ht,Ht.next)>0)}function lt(Me,Ht,Rt){return(Ht.y-Me.y)*(Rt.x-Ht.x)-(Ht.x-Me.x)*(Rt.y-Ht.y)}function Ye(Me,Ht){return Me.x===Ht.x&&Me.y===Ht.y}function It(Me,Ht,Rt,vt){var Je=Ue(lt(Me,Ht,Rt)),Ce=Ue(lt(Me,Ht,vt)),pt=Ue(lt(Rt,vt,Me)),et=Ue(lt(Rt,vt,Ht));return!!(Je!==Ce&&pt!==et||Je===0&&At(Me,Rt,Ht)||Ce===0&&At(Me,vt,Ht)||pt===0&&At(Rt,Me,vt)||et===0&&At(Rt,Ht,vt))}function At(Me,Ht,Rt){return Ht.x<=Math.max(Me.x,Rt.x)&&Ht.x>=Math.min(Me.x,Rt.x)&&Ht.y<=Math.max(Me.y,Rt.y)&&Ht.y>=Math.min(Me.y,Rt.y)}function Ue(Me){return Me>0?1:Me<0?-1:0}function rt(Me,Ht){var Rt=Me;do{if(Rt.i!==Me.i&&Rt.next.i!==Me.i&&Rt.i!==Ht.i&&Rt.next.i!==Ht.i&&It(Rt,Rt.next,Me,Ht))return!0;Rt=Rt.next}while(Rt!==Me);return!1}function Ze(Me,Ht){return lt(Me.prev,Me,Me.next)<0?lt(Me,Ht,Me.next)>=0&<(Me,Me.prev,Ht)>=0:lt(Me,Ht,Me.prev)<0||lt(Me,Me.next,Ht)<0}function Ct(Me,Ht){var Rt=Me,vt=!1,Je=(Me.x+Ht.x)/2,Ce=(Me.y+Ht.y)/2;do Rt.y>Ce!=Rt.next.y>Ce&&Rt.next.y!==Rt.y&&Je<(Rt.next.x-Rt.x)*(Ce-Rt.y)/(Rt.next.y-Rt.y)+Rt.x&&(vt=!vt),Rt=Rt.next;while(Rt!==Me);return vt}function st(Me,Ht){var Rt=new mt(Me.i,Me.x,Me.y),vt=new mt(Ht.i,Ht.x,Ht.y),Je=Me.next,Ce=Ht.prev;return Me.next=Ht,Ht.prev=Me,Rt.next=Je,Je.prev=Rt,vt.next=Rt,Rt.prev=vt,Ce.next=vt,vt.prev=Ce,vt}function Et(Me,Ht,Rt,vt){var Je=new mt(Me,Ht,Rt);return vt?(Je.next=vt.next,Je.prev=vt,vt.next.prev=Je,vt.next=Je):(Je.prev=Je,Je.next=Je),Je}function at(Me){Me.next.prev=Me.prev,Me.prev.next=Me.next,Me.prevZ&&(Me.prevZ.nextZ=Me.nextZ),Me.nextZ&&(Me.nextZ.prevZ=Me.prevZ)}function mt(Me,Ht,Rt){this.i=Me,this.x=Ht,this.y=Rt,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}ye.deviation=function(Me,Ht,Rt,vt){var Je=Ht&&Ht.length,Ce=Je?Ht[0]*Rt:Me.length,pt=Math.abs(Mt(Me,0,Ce,Rt));if(Je)for(var et=0,br=Ht.length;et0&&(vt+=Me[Je-1].length,Rt.holes.push(vt))}return Rt}},42676:function(Ke){"use strict";var ye=Ke.exports={};ye.isIE=function(_){function M(){var y=navigator.userAgent.toLowerCase();return y.indexOf("msie")!==-1||y.indexOf("trident")!==-1||y.indexOf(" edge/")!==-1}if(!M())return!1;if(!_)return!0;var V=function(){var y,d=3,$=document.createElement("div"),X=$.getElementsByTagName("i");do $.innerHTML="";while(X[0]);return d>4?d:y}();return _===V},ye.isLegacyOpera=function(){return!!window.opera}},55776:function(Ke){"use strict";var ye=Ke.exports={};ye.forEach=function(_,M){for(var V=0;V<_.length;V++){var y=M(_[V]);if(y)return y}}},85480:function(Ke,ye,_){"use strict";var M=_(42676);Ke.exports=function(V){V=V||{};var y=V.reporter,d=V.batchProcessor,$=V.stateHandler.getState;if(!y)throw new Error("Missing required dependency: reporter.");function X(Ie,we){function Ee(){we(Ie)}if(M.isIE(8))$(Ie).object={proxy:Ee},Ie.attachEvent("onresize",Ee);else{var qe=le(Ie);if(!qe)throw new Error("Element is not detectable by this strategy.");qe.contentDocument.defaultView.addEventListener("resize",Ee)}}function oe(Ie){var we=V.important?" !important; ":"; ";return(Ie.join(we)+we).trim()}function re(Ie,we,Ee){Ee||(Ee=we,we=Ie,Ie=null),Ie=Ie||{};var qe=Ie.debug;function Xe(ft,Ge){var lt=oe(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),Ye=!1,It=window.getComputedStyle(ft),At=ft.offsetWidth,Ue=ft.offsetHeight;$(ft).startSize={width:At,height:Ue};function rt(){function Ze(){if(It.position==="static"){ft.style.setProperty("position","relative",Ie.important?"important":"");var Et=function(at,mt,Mt,Me){function Ht(vt){return vt.replace(/[^-\d\.]/g,"")}var Rt=Mt[Me];Rt!=="auto"&&Ht(Rt)!=="0"&&(at.warn("An element that is positioned static has style."+Me+"="+Rt+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+Me+" will be set to 0. Element: ",mt),mt.style.setProperty(Me,"0",Ie.important?"important":""))};Et(y,ft,It,"top"),Et(y,ft,It,"right"),Et(y,ft,It,"bottom"),Et(y,ft,It,"left")}}function Ct(){Ye||Ze();function Et(mt,Mt){if(!mt.contentDocument){var Me=$(mt);Me.checkForObjectDocumentTimeoutId&&window.clearTimeout(Me.checkForObjectDocumentTimeoutId),Me.checkForObjectDocumentTimeoutId=setTimeout(function(){Me.checkForObjectDocumentTimeoutId=0,Et(mt,Mt)},100);return}Mt(mt.contentDocument)}var at=this;Et(at,function(Mt){Ge(ft)})}It.position!==""&&(Ze(It),Ye=!0);var st=document.createElement("object");st.style.cssText=lt,st.tabIndex=-1,st.type="text/html",st.setAttribute("aria-hidden","true"),st.onload=Ct,M.isIE()||(st.data="about:blank"),$(ft)&&(ft.appendChild(st),$(ft).object=st,M.isIE()&&(st.data="about:blank"))}d?d.add(rt):rt()}M.isIE(8)?Ee(we):Xe(we,Ee)}function le(Ie){return $(Ie).object}function ce(Ie){if($(Ie)){var we=le(Ie);we&&(M.isIE(8)?Ie.detachEvent("onresize",we.proxy):Ie.removeChild(we),$(Ie).checkForObjectDocumentTimeoutId&&window.clearTimeout($(Ie).checkForObjectDocumentTimeoutId),delete $(Ie).object)}}return{makeDetectable:re,addListener:X,uninstall:ce}}},16462:function(Ke,ye,_){"use strict";var M=_(55776).forEach;Ke.exports=function(V){V=V||{};var y=V.reporter,d=V.batchProcessor,$=V.stateHandler.getState,X=V.stateHandler.hasState,oe=V.idHandler;if(!d)throw new Error("Missing required dependency: batchProcessor");if(!y)throw new Error("Missing required dependency: reporter.");var re=Ee(),le="erd_scroll_detection_scrollbar_style",ce="erd_scroll_detection_container";function Ie(rt){qe(rt,le,ce)}Ie(window.document);function we(rt){var Ze=V.important?" !important; ":"; ";return(rt.join(Ze)+Ze).trim()}function Ee(){var rt=500,Ze=500,Ct=document.createElement("div");Ct.style.cssText=we(["position: absolute","width: "+rt*2+"px","height: "+Ze*2+"px","visibility: hidden","margin: 0","padding: 0"]);var st=document.createElement("div");st.style.cssText=we(["position: absolute","width: "+rt+"px","height: "+Ze+"px","overflow: scroll","visibility: none","top: "+-rt*3+"px","left: "+-Ze*3+"px","visibility: hidden","margin: 0","padding: 0"]),st.appendChild(Ct),document.body.insertBefore(st,document.body.firstChild);var Et=rt-st.clientWidth,at=Ze-st.clientHeight;return document.body.removeChild(st),{width:Et,height:at}}function qe(rt,Ze,Ct){function st(Mt,Me){Me=Me||function(Rt){rt.head.appendChild(Rt)};var Ht=rt.createElement("style");return Ht.innerHTML=Mt,Ht.id=Ze,Me(Ht),Ht}if(!rt.getElementById(Ze)){var Et=Ct+"_animation",at=Ct+"_animation_active",mt=`/* Created by the element-resize-detector library. */ -`;mt+="."+Ct+" > div::-webkit-scrollbar { "+we(["display: none"])+` } - -`,mt+="."+at+" { "+we(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+Et,"animation-name: "+Et])+` } -`,mt+="@-webkit-keyframes "+Et+` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } } -`,mt+="@keyframes "+Et+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",st(mt)}}function Xe(rt){rt.className+=" "+ce+"_animation_active"}function ft(rt,Ze,Ct){if(rt.addEventListener)rt.addEventListener(Ze,Ct);else if(rt.attachEvent)rt.attachEvent("on"+Ze,Ct);else return y.error("[scroll] Don't know how to add event listeners.")}function Ge(rt,Ze,Ct){if(rt.removeEventListener)rt.removeEventListener(Ze,Ct);else if(rt.detachEvent)rt.detachEvent("on"+Ze,Ct);else return y.error("[scroll] Don't know how to remove event listeners.")}function lt(rt){return $(rt).container.childNodes[0].childNodes[0].childNodes[0]}function Ye(rt){return $(rt).container.childNodes[0].childNodes[0].childNodes[1]}function It(rt,Ze){var Ct=$(rt).listeners;if(!Ct.push)throw new Error("Cannot add listener to an element that is not detectable.");$(rt).listeners.push(Ze)}function At(rt,Ze,Ct){Ct||(Ct=Ze,Ze=rt,rt=null),rt=rt||{};function st(){if(rt.debug){var Zi=Array.prototype.slice.call(arguments);if(Zi.unshift(oe.get(Ze),"Scroll: "),y.log.apply)y.log.apply(null,Zi);else for(var Ua=0;Ua=0&&(re=[].concat(X.slice(le,X.length),X.slice(1,le+1))),re},V.prototype.comparePath=function(X,oe){var re=this;return X.every(function(le,ce){return re.compareCoord(le,this[ce])},oe)},V.prototype.comparePolygon=function(X,oe){if(this.compareLine(X.coordinates[0],oe.coordinates[0],1,!0)){var re=X.coordinates.slice(1,X.coordinates.length),le=oe.coordinates.slice(1,oe.coordinates.length),ce=this;return re.every(function(Ie){return this.some(function(we){return ce.compareLine(Ie,we,1,!0)})},le)}else return!1},V.prototype.compareFeature=function(X,oe){return X.id!==oe.id||!this.objectComparator(X.properties,oe.properties)||!this.compareBBox(X,oe)?!1:this.compare(X.geometry,oe.geometry)},V.prototype.compareBBox=function(X,oe){return!!(!X.bbox&&!oe.bbox||X.bbox&&oe.bbox&&this.compareCoord(X.bbox,oe.bbox))},V.prototype.removePseudo=function(X){return X};function $(X,oe){return M(X,oe,{strict:!0})}Ke.exports=V},56898:function(Ke,ye,_){var M=_(79535),V=_(78161),y=_(9750),d=_(76314).Z,$=y.featureEach,X=y.coordEach,oe=V.polygon,re=V.featureCollection;function le(ce){var Ie=new M(ce);return Ie.insert=function(we){if(we.type!=="Feature")throw new Error("invalid feature");return we.bbox=we.bbox?we.bbox:d(we),M.prototype.insert.call(this,we)},Ie.load=function(we){var Ee=[];return Array.isArray(we)?we.forEach(function(qe){if(qe.type!=="Feature")throw new Error("invalid features");qe.bbox=qe.bbox?qe.bbox:d(qe),Ee.push(qe)}):$(we,function(qe){if(qe.type!=="Feature")throw new Error("invalid features");qe.bbox=qe.bbox?qe.bbox:d(qe),Ee.push(qe)}),M.prototype.load.call(this,Ee)},Ie.remove=function(we,Ee){if(we.type!=="Feature")throw new Error("invalid feature");return we.bbox=we.bbox?we.bbox:d(we),M.prototype.remove.call(this,we,Ee)},Ie.clear=function(){return M.prototype.clear.call(this)},Ie.search=function(we){var Ee=M.prototype.search.call(this,this.toBBox(we));return re(Ee)},Ie.collides=function(we){return M.prototype.collides.call(this,this.toBBox(we))},Ie.all=function(){var we=M.prototype.all.call(this);return re(we)},Ie.toJSON=function(){return M.prototype.toJSON.call(this)},Ie.fromJSON=function(we){return M.prototype.fromJSON.call(this,we)},Ie.toBBox=function(we){var Ee;if(we.bbox)Ee=we.bbox;else if(Array.isArray(we)&&we.length===4)Ee=we;else if(Array.isArray(we)&&we.length===6)Ee=[we[0],we[1],we[3],we[4]];else if(we.type==="Feature")Ee=d(we);else if(we.type==="FeatureCollection")Ee=d(we);else throw new Error("invalid geojson");return{minX:Ee[0],minY:Ee[1],maxX:Ee[2],maxY:Ee[3]}},Ie}Ke.exports=le,Ke.exports.default=le},64656:function(Ke,ye,_){"use strict";var M,V=_(68772),y=_(40625),d=_(92947),$=Function,X=function(Mt){try{return $('"use strict"; return ('+Mt+").constructor;")()}catch(Me){}},oe=Object.getOwnPropertyDescriptor;if(oe)try{oe({},"")}catch(Mt){oe=null}var re=function(){throw new d},le=oe?function(){try{return arguments.callee,re}catch(Mt){try{return oe(arguments,"callee").get}catch(Me){return re}}}():re,ce=_(9997)(),Ie=_(77916)(),we=Object.getPrototypeOf||(Ie?function(Mt){return Mt.__proto__}:null),Ee={},qe=typeof Uint8Array=="undefined"||!we?M:we(Uint8Array),Xe={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?M:ArrayBuffer,"%ArrayIteratorPrototype%":ce&&we?we([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":Ee,"%AsyncGenerator%":Ee,"%AsyncGeneratorFunction%":Ee,"%AsyncIteratorPrototype%":Ee,"%Atomics%":typeof Atomics=="undefined"?M:Atomics,"%BigInt%":typeof BigInt=="undefined"?M:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?M:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?M:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?M:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?M:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?M:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?M:FinalizationRegistry,"%Function%":$,"%GeneratorFunction%":Ee,"%Int8Array%":typeof Int8Array=="undefined"?M:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?M:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ce&&we?we(we([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map=="undefined"?M:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!ce||!we?M:we(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?M:Promise,"%Proxy%":typeof Proxy=="undefined"?M:Proxy,"%RangeError%":V,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?M:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!ce||!we?M:we(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ce&&we?we(""[Symbol.iterator]()):M,"%Symbol%":ce?Symbol:M,"%SyntaxError%":y,"%ThrowTypeError%":le,"%TypedArray%":qe,"%TypeError%":d,"%Uint8Array%":typeof Uint8Array=="undefined"?M:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?M:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?M:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?M:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?M:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?M:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?M:WeakSet};if(we)try{null.error}catch(Mt){var ft=we(we(Mt));Xe["%Error.prototype%"]=ft}var Ge=function Mt(Me){var Ht;if(Me==="%AsyncFunction%")Ht=X("async function () {}");else if(Me==="%GeneratorFunction%")Ht=X("function* () {}");else if(Me==="%AsyncGeneratorFunction%")Ht=X("async function* () {}");else if(Me==="%AsyncGenerator%"){var Rt=Mt("%AsyncGeneratorFunction%");Rt&&(Ht=Rt.prototype)}else if(Me==="%AsyncIteratorPrototype%"){var vt=Mt("%AsyncGenerator%");vt&&we&&(Ht=we(vt.prototype))}return Xe[Me]=Ht,Ht},lt={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ye=_(36723),It=_(68854),At=Ye.call(Function.call,Array.prototype.concat),Ue=Ye.call(Function.apply,Array.prototype.splice),rt=Ye.call(Function.call,String.prototype.replace),Ze=Ye.call(Function.call,String.prototype.slice),Ct=Ye.call(Function.call,RegExp.prototype.exec),st=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Et=/\\(\\)?/g,at=function(Me){var Ht=Ze(Me,0,1),Rt=Ze(Me,-1);if(Ht==="%"&&Rt!=="%")throw new y("invalid intrinsic syntax, expected closing `%`");if(Rt==="%"&&Ht!=="%")throw new y("invalid intrinsic syntax, expected opening `%`");var vt=[];return rt(Me,st,function(Je,Ce,pt,et){vt[vt.length]=pt?rt(et,Et,"$1"):Ce||Je}),vt},mt=function(Me,Ht){var Rt=Me,vt;if(It(lt,Rt)&&(vt=lt[Rt],Rt="%"+vt[0]+"%"),It(Xe,Rt)){var Je=Xe[Rt];if(Je===Ee&&(Je=Ge(Rt)),typeof Je=="undefined"&&!Ht)throw new d("intrinsic "+Me+" exists, but is not available. Please file an issue!");return{alias:vt,name:Rt,value:Je}}throw new y("intrinsic "+Me+" does not exist!")};Ke.exports=function(Me,Ht){if(typeof Me!="string"||Me.length===0)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ht!="boolean")throw new d('"allowMissing" argument must be a boolean');if(Ct(/^%?[^%]*%?$/,Me)===null)throw new y("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Rt=at(Me),vt=Rt.length>0?Rt[0]:"",Je=mt("%"+vt+"%",Ht),Ce=Je.name,pt=Je.value,et=!1,br=Je.alias;br&&(vt=br[0],Ue(Rt,At([0,1],br)));for(var Jt=1,Vr=!0;Jt=Rt.length){var Hn=oe(pt,gn);Vr=!!Hn,Vr&&"get"in Hn&&!("originalValue"in Hn.get)?pt=Hn.get:pt=pt[gn]}else Vr=It(pt,gn),pt=pt[gn];Vr&&!et&&(Xe[Ce]=pt)}}return pt}},67747:function(Ke,ye,_){"use strict";var M=_(64656),V=M("%Object.getOwnPropertyDescriptor%",!0);if(V)try{V([],"length")}catch(y){V=null}Ke.exports=V},51831:function(Ke,ye,_){"use strict";_.d(ye,{BT:function(){return _t},jf:function(){return on},rS:function(){return jr}});var M=function(On){On=On||{};var tn=typeof On!="undefined"?On:{},Pi={},ut;for(ut in tn)tn.hasOwnProperty(ut)&&(Pi[ut]=tn[ut]);var Wt=[],wr="";function bn(q){return tn.locateFile?tn.locateFile(q,wr):wr+q}var vn;typeof document!="undefined"&&document.currentScript&&(wr=document.currentScript.src),wr.indexOf("blob:")!==0?wr=wr.substr(0,wr.lastIndexOf("/")+1):wr="",vn=function(me,je,tt){var w=new XMLHttpRequest;w.open("GET",me,!0),w.responseType="arraybuffer",w.onload=function(){if(w.status==200||w.status==0&&w.response){je(w.response);return}var b=zc(me);if(b){je(b.buffer);return}tt()},w.onerror=tt,w.send(null)};var Xi=tn.print||console.log.bind(console),ya=tn.printErr||console.warn.bind(console);for(ut in Pi)Pi.hasOwnProperty(ut)&&(tn[ut]=Pi[ut]);Pi=null,tn.arguments&&(Wt=tn.arguments);var Bo=0,xn=function(q){Bo=q},zr=function(){return Bo},xt=8;function Nt(q,me,je,tt){switch(je=je||"i8",je.charAt(je.length-1)==="*"&&(je="i32"),je){case"i1":La[q>>0]=me;break;case"i8":La[q>>0]=me;break;case"i16":ho[q>>1]=me;break;case"i32":Ms[q>>2]=me;break;case"i64":hl=[me>>>0,(qu=me,+Ec(qu)>=1?qu>0?(lc(+Vu(qu/4294967296),4294967295)|0)>>>0:~~+Zf((qu-+(~~qu>>>0))/4294967296)>>>0:0)],Ms[q>>2]=hl[0],Ms[q+4>>2]=hl[1];break;case"float":vs[q>>2]=me;break;case"double":Xs[q>>3]=me;break;default:K("invalid type for setValue: "+je)}}function lr(q,me,je){switch(me=me||"i8",me.charAt(me.length-1)==="*"&&(me="i32"),me){case"i1":return La[q>>0];case"i8":return La[q>>0];case"i16":return ho[q>>1];case"i32":return Ms[q>>2];case"i64":return Ms[q>>2];case"float":return vs[q>>2];case"double":return Xs[q>>3];default:K("invalid type for getValue: "+me)}return null}var $r=!1;function Yr(q,me){q||K("Assertion failed: "+me)}function un(q){var me=tn["_"+q];return Yr(me,"Cannot call unknown function "+q+", make sure it is exported"),me}function Sn(q,me,je,tt,w){var Gt={string:function(ct){var Ut=0;if(ct!=null&&ct!==0){var wt=(ct.length<<2)+1;Ut=m(wt),vi(ct,Ut,wt)}return Ut},array:function(ct){var Ut=m(ct.length);return ma(ct,Ut),Ut}};function b(ct){return me==="string"?ra(ct):me==="boolean"?!!ct:ct}var x=un(q),S=[],Z=0;if(tt)for(var he=0;he=tt);)++w;if(w-me>16&&q.subarray&&ti)return ti.decode(q.subarray(me,w));for(var Gt="";me>10,56320|Z&1023)}}return Gt}function ra(q,me){return q?Ui(aa,q,me):""}function ia(q,me,je,tt){if(!(tt>0))return 0;for(var w=je,Gt=je+tt-1,b=0;b=55296&&x<=57343){var S=q.charCodeAt(++b);x=65536+((x&1023)<<10)|S&1023}if(x<=127){if(je>=Gt)break;me[je++]=x}else if(x<=2047){if(je+1>=Gt)break;me[je++]=192|x>>6,me[je++]=128|x&63}else if(x<=65535){if(je+2>=Gt)break;me[je++]=224|x>>12,me[je++]=128|x>>6&63,me[je++]=128|x&63}else{if(je+3>=Gt)break;me[je++]=240|x>>18,me[je++]=128|x>>12&63,me[je++]=128|x>>6&63,me[je++]=128|x&63}}return me[je]=0,je-w}function vi(q,me,je){return ia(q,aa,me,je)}var gi=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function ma(q,me){La.set(q,me)}function Yi(q,me){return q%me>0&&(q+=me-q%me),q}var ua,La,aa,ho,Po,Ms,Mu,vs,Xs;function iu(q){ua=q,tn.HEAP8=La=new Int8Array(q),tn.HEAP16=ho=new Int16Array(q),tn.HEAP32=Ms=new Int32Array(q),tn.HEAPU8=aa=new Uint8Array(q),tn.HEAPU16=Po=new Uint16Array(q),tn.HEAPU32=Mu=new Uint32Array(q),tn.HEAPF32=vs=new Float32Array(q),tn.HEAPF64=Xs=new Float64Array(q)}var js=5267040,Vs=24128,sl=tn.TOTAL_MEMORY||33554432;tn.buffer?ua=tn.buffer:ua=new ArrayBuffer(sl),sl=ua.byteLength,iu(ua),Ms[Vs>>2]=js;function al(q){for(;q.length>0;){var me=q.shift();if(typeof me=="function"){me();continue}var je=me.func;typeof je=="number"?me.arg===void 0?tn.dynCall_v(je):tn.dynCall_vi(je,me.arg):je(me.arg===void 0?null:me.arg)}}var ul=[],_c=[],Yo=[],No=[];function Ku(){if(tn.preRun)for(typeof tn.preRun=="function"&&(tn.preRun=[tn.preRun]);tn.preRun.length;)yf(tn.preRun.shift());al(ul)}function Rc(){al(_c)}function Wa(){al(Yo)}function mf(){if(tn.postRun)for(typeof tn.postRun=="function"&&(tn.postRun=[tn.postRun]);tn.postRun.length;)yl(tn.postRun.shift());al(No)}function yf(q){ul.unshift(q)}function yl(q){No.unshift(q)}var Ec=Math.abs,Zf=Math.ceil,Vu=Math.floor,lc=Math.min,fl=0,lf=null,gu=null;function Pu(q){fl++,tn.monitorRunDependencies&&tn.monitorRunDependencies(fl)}function Co(q){if(fl--,tn.monitorRunDependencies&&tn.monitorRunDependencies(fl),fl==0&&(lf!==null&&(clearInterval(lf),lf=null),gu)){var me=gu;gu=null,me()}}tn.preloadedImages={},tn.preloadedAudios={};var zu=null,Zu="data:application/octet-stream;base64,";function St(q){return String.prototype.startsWith?q.startsWith(Zu):q.indexOf(Zu)===0}var qu,hl;zu="data:application/octet-stream;base64,AAAAAAAAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAAAQAAAAQAAAADAAAABgAAAAUAAAACAAAAAAAAAAIAAAADAAAAAQAAAAQAAAAGAAAAAAAAAAUAAAADAAAABgAAAAQAAAAFAAAAAAAAAAEAAAACAAAABAAAAAUAAAAGAAAAAAAAAAIAAAADAAAAAQAAAAUAAAACAAAAAAAAAAEAAAADAAAABgAAAAQAAAAGAAAAAAAAAAUAAAACAAAAAQAAAAQAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAAAAAAEAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAYAAAAAAAAABQAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAAAAAAYAAAAAAAAAAwAAAAIAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAFAAAABAAAAAAAAAABAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAYAAAAAAAAABAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAgAAAAQAAAADAAAACAAAAAEAAAAHAAAABgAAAAkAAAAAAAAAAwAAAAIAAAACAAAABgAAAAoAAAALAAAAAAAAAAEAAAAFAAAAAwAAAA0AAAABAAAABwAAAAQAAAAMAAAAAAAAAAQAAAB/AAAADwAAAAgAAAADAAAAAAAAAAwAAAAFAAAAAgAAABIAAAAKAAAACAAAAAAAAAAQAAAABgAAAA4AAAALAAAAEQAAAAEAAAAJAAAAAgAAAAcAAAAVAAAACQAAABMAAAADAAAADQAAAAEAAAAIAAAABQAAABYAAAAQAAAABAAAAAAAAAAPAAAACQAAABMAAAAOAAAAFAAAAAEAAAAHAAAABgAAAAoAAAALAAAAGAAAABcAAAAFAAAAAgAAABIAAAALAAAAEQAAABcAAAAZAAAAAgAAAAYAAAAKAAAADAAAABwAAAANAAAAGgAAAAQAAAAPAAAAAwAAAA0AAAAaAAAAFQAAAB0AAAADAAAADAAAAAcAAAAOAAAAfwAAABEAAAAbAAAACQAAABQAAAAGAAAADwAAABYAAAAcAAAAHwAAAAQAAAAIAAAADAAAABAAAAASAAAAIQAAAB4AAAAIAAAABQAAABYAAAARAAAACwAAAA4AAAAGAAAAIwAAABkAAAAbAAAAEgAAABgAAAAeAAAAIAAAAAUAAAAKAAAAEAAAABMAAAAiAAAAFAAAACQAAAAHAAAAFQAAAAkAAAAUAAAADgAAABMAAAAJAAAAKAAAABsAAAAkAAAAFQAAACYAAAATAAAAIgAAAA0AAAAdAAAABwAAABYAAAAQAAAAKQAAACEAAAAPAAAACAAAAB8AAAAXAAAAGAAAAAsAAAAKAAAAJwAAACUAAAAZAAAAGAAAAH8AAAAgAAAAJQAAAAoAAAAXAAAAEgAAABkAAAAXAAAAEQAAAAsAAAAtAAAAJwAAACMAAAAaAAAAKgAAAB0AAAArAAAADAAAABwAAAANAAAAGwAAACgAAAAjAAAALgAAAA4AAAAUAAAAEQAAABwAAAAfAAAAKgAAACwAAAAMAAAADwAAABoAAAAdAAAAKwAAACYAAAAvAAAADQAAABoAAAAVAAAAHgAAACAAAAAwAAAAMgAAABAAAAASAAAAIQAAAB8AAAApAAAALAAAADUAAAAPAAAAFgAAABwAAAAgAAAAHgAAABgAAAASAAAANAAAADIAAAAlAAAAIQAAAB4AAAAxAAAAMAAAABYAAAAQAAAAKQAAACIAAAATAAAAJgAAABUAAAA2AAAAJAAAADMAAAAjAAAALgAAAC0AAAA4AAAAEQAAABsAAAAZAAAAJAAAABQAAAAiAAAAEwAAADcAAAAoAAAANgAAACUAAAAnAAAANAAAADkAAAAYAAAAFwAAACAAAAAmAAAAfwAAACIAAAAzAAAAHQAAAC8AAAAVAAAAJwAAACUAAAAZAAAAFwAAADsAAAA5AAAALQAAACgAAAAbAAAAJAAAABQAAAA8AAAALgAAADcAAAApAAAAMQAAADUAAAA9AAAAFgAAACEAAAAfAAAAKgAAADoAAAArAAAAPgAAABwAAAAsAAAAGgAAACsAAAA+AAAALwAAAEAAAAAaAAAAKgAAAB0AAAAsAAAANQAAADoAAABBAAAAHAAAAB8AAAAqAAAALQAAACcAAAAjAAAAGQAAAD8AAAA7AAAAOAAAAC4AAAA8AAAAOAAAAEQAAAAbAAAAKAAAACMAAAAvAAAAJgAAACsAAAAdAAAARQAAADMAAABAAAAAMAAAADEAAAAeAAAAIQAAAEMAAABCAAAAMgAAADEAAAB/AAAAPQAAAEIAAAAhAAAAMAAAACkAAAAyAAAAMAAAACAAAAAeAAAARgAAAEMAAAA0AAAAMwAAAEUAAAA2AAAARwAAACYAAAAvAAAAIgAAADQAAAA5AAAARgAAAEoAAAAgAAAAJQAAADIAAAA1AAAAPQAAAEEAAABLAAAAHwAAACkAAAAsAAAANgAAAEcAAAA3AAAASQAAACIAAAAzAAAAJAAAADcAAAAoAAAANgAAACQAAABIAAAAPAAAAEkAAAA4AAAARAAAAD8AAABNAAAAIwAAAC4AAAAtAAAAOQAAADsAAABKAAAATgAAACUAAAAnAAAANAAAADoAAAB/AAAAPgAAAEwAAAAsAAAAQQAAACoAAAA7AAAAPwAAAE4AAABPAAAAJwAAAC0AAAA5AAAAPAAAAEgAAABEAAAAUAAAACgAAAA3AAAALgAAAD0AAAA1AAAAMQAAACkAAABRAAAASwAAAEIAAAA+AAAAKwAAADoAAAAqAAAAUgAAAEAAAABMAAAAPwAAAH8AAAA4AAAALQAAAE8AAAA7AAAATQAAAEAAAAAvAAAAPgAAACsAAABUAAAARQAAAFIAAABBAAAAOgAAADUAAAAsAAAAVgAAAEwAAABLAAAAQgAAAEMAAABRAAAAVQAAADEAAAAwAAAAPQAAAEMAAABCAAAAMgAAADAAAABXAAAAVQAAAEYAAABEAAAAOAAAADwAAAAuAAAAWgAAAE0AAABQAAAARQAAADMAAABAAAAALwAAAFkAAABHAAAAVAAAAEYAAABDAAAANAAAADIAAABTAAAAVwAAAEoAAABHAAAAWQAAAEkAAABbAAAAMwAAAEUAAAA2AAAASAAAAH8AAABJAAAANwAAAFAAAAA8AAAAWAAAAEkAAABbAAAASAAAAFgAAAA2AAAARwAAADcAAABKAAAATgAAAFMAAABcAAAANAAAADkAAABGAAAASwAAAEEAAAA9AAAANQAAAF4AAABWAAAAUQAAAEwAAABWAAAAUgAAAGAAAAA6AAAAQQAAAD4AAABNAAAAPwAAAEQAAAA4AAAAXQAAAE8AAABaAAAATgAAAEoAAAA7AAAAOQAAAF8AAABcAAAATwAAAE8AAABOAAAAPwAAADsAAABdAAAAXwAAAE0AAABQAAAARAAAAEgAAAA8AAAAYwAAAFoAAABYAAAAUQAAAFUAAABeAAAAZQAAAD0AAABCAAAASwAAAFIAAABgAAAAVAAAAGIAAAA+AAAATAAAAEAAAABTAAAAfwAAAEoAAABGAAAAZAAAAFcAAABcAAAAVAAAAEUAAABSAAAAQAAAAGEAAABZAAAAYgAAAFUAAABXAAAAZQAAAGYAAABCAAAAQwAAAFEAAABWAAAATAAAAEsAAABBAAAAaAAAAGAAAABeAAAAVwAAAFMAAABmAAAAZAAAAEMAAABGAAAAVQAAAFgAAABIAAAAWwAAAEkAAABjAAAAUAAAAGkAAABZAAAAYQAAAFsAAABnAAAARQAAAFQAAABHAAAAWgAAAE0AAABQAAAARAAAAGoAAABdAAAAYwAAAFsAAABJAAAAWQAAAEcAAABpAAAAWAAAAGcAAABcAAAAUwAAAE4AAABKAAAAbAAAAGQAAABfAAAAXQAAAE8AAABaAAAATQAAAG0AAABfAAAAagAAAF4AAABWAAAAUQAAAEsAAABrAAAAaAAAAGUAAABfAAAAXAAAAE8AAABOAAAAbQAAAGwAAABdAAAAYAAAAGgAAABiAAAAbgAAAEwAAABWAAAAUgAAAGEAAAB/AAAAYgAAAFQAAABnAAAAWQAAAG8AAABiAAAAbgAAAGEAAABvAAAAUgAAAGAAAABUAAAAYwAAAFAAAABpAAAAWAAAAGoAAABaAAAAcQAAAGQAAABmAAAAUwAAAFcAAABsAAAAcgAAAFwAAABlAAAAZgAAAGsAAABwAAAAUQAAAFUAAABeAAAAZgAAAGUAAABXAAAAVQAAAHIAAABwAAAAZAAAAGcAAABbAAAAYQAAAFkAAAB0AAAAaQAAAG8AAABoAAAAawAAAG4AAABzAAAAVgAAAF4AAABgAAAAaQAAAFgAAABnAAAAWwAAAHEAAABjAAAAdAAAAGoAAABdAAAAYwAAAFoAAAB1AAAAbQAAAHEAAABrAAAAfwAAAGUAAABeAAAAcwAAAGgAAABwAAAAbAAAAGQAAABfAAAAXAAAAHYAAAByAAAAbQAAAG0AAABsAAAAXQAAAF8AAAB1AAAAdgAAAGoAAABuAAAAYgAAAGgAAABgAAAAdwAAAG8AAABzAAAAbwAAAGEAAABuAAAAYgAAAHQAAABnAAAAdwAAAHAAAABrAAAAZgAAAGUAAAB4AAAAcwAAAHIAAABxAAAAYwAAAHQAAABpAAAAdQAAAGoAAAB5AAAAcgAAAHAAAABkAAAAZgAAAHYAAAB4AAAAbAAAAHMAAABuAAAAawAAAGgAAAB4AAAAdwAAAHAAAAB0AAAAZwAAAHcAAABvAAAAcQAAAGkAAAB5AAAAdQAAAH8AAABtAAAAdgAAAHEAAAB5AAAAagAAAHYAAAB4AAAAbAAAAHIAAAB1AAAAeQAAAG0AAAB3AAAAbwAAAHMAAABuAAAAeQAAAHQAAAB4AAAAeAAAAHMAAAByAAAAcAAAAHkAAAB3AAAAdgAAAHkAAAB0AAAAeAAAAHcAAAB1AAAAcQAAAHYAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAACAAAABQAAAAEAAAAAAAAA/////wEAAAAAAAAAAwAAAAQAAAACAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAUAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABAAAAAUAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAUAAAABAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAD//////////wEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAAAAAAAAAAABAAAAAgAAAAYAAAAEAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAAAAAAAAAAAAQAAAAEAAAAFAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAAAAAAAAAAABAAAAAwAAAAcAAAAGAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADgAAAAIAAAAAAAAAAAAAAAEAAAAAAAAACQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAAAAAAAAAAAAAEAAAAEAAAACAAAAAoAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAAAAAAAAAAAAQAAAAsAAAAPAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAIAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAAAAAAAAAAAAQAAAAwAAAAQAAAADAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAAAAAAAAAAABAAAACgAAABMAAAAIAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAAAAAAAAAAAAAEAAAANAAAAEQAAAA0AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAACAAAAAAAAAAAAAAABAAAADgAAABIAAAAPAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABIAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAAAAAAAAQAAAP//////////EwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAASAAAAAAAAABgAAAAAAAAAIQAAAAAAAAAeAAAAAAAAACAAAAADAAAAMQAAAAEAAAAwAAAAAwAAADIAAAADAAAACAAAAAAAAAAFAAAABQAAAAoAAAAFAAAAFgAAAAAAAAAQAAAAAAAAABIAAAAAAAAAKQAAAAEAAAAhAAAAAAAAAB4AAAAAAAAABAAAAAAAAAAAAAAABQAAAAIAAAAFAAAADwAAAAEAAAAIAAAAAAAAAAUAAAAFAAAAHwAAAAEAAAAWAAAAAAAAABAAAAAAAAAAAgAAAAAAAAAGAAAAAAAAAA4AAAAAAAAACgAAAAAAAAALAAAAAAAAABEAAAADAAAAGAAAAAEAAAAXAAAAAwAAABkAAAADAAAAAAAAAAAAAAABAAAABQAAAAkAAAAFAAAABQAAAAAAAAACAAAAAAAAAAYAAAAAAAAAEgAAAAEAAAAKAAAAAAAAAAsAAAAAAAAABAAAAAEAAAADAAAABQAAAAcAAAAFAAAACAAAAAEAAAAAAAAAAAAAAAEAAAAFAAAAEAAAAAEAAAAFAAAAAAAAAAIAAAAAAAAABwAAAAAAAAAVAAAAAAAAACYAAAAAAAAACQAAAAAAAAATAAAAAAAAACIAAAADAAAADgAAAAEAAAAUAAAAAwAAACQAAAADAAAAAwAAAAAAAAANAAAABQAAAB0AAAAFAAAAAQAAAAAAAAAHAAAAAAAAABUAAAAAAAAABgAAAAEAAAAJAAAAAAAAABMAAAAAAAAABAAAAAIAAAAMAAAABQAAABoAAAAFAAAAAAAAAAEAAAADAAAAAAAAAA0AAAAFAAAAAgAAAAEAAAABAAAAAAAAAAcAAAAAAAAAGgAAAAAAAAAqAAAAAAAAADoAAAAAAAAAHQAAAAAAAAArAAAAAAAAAD4AAAADAAAAJgAAAAEAAAAvAAAAAwAAAEAAAAADAAAADAAAAAAAAAAcAAAABQAAACwAAAAFAAAADQAAAAAAAAAaAAAAAAAAACoAAAAAAAAAFQAAAAEAAAAdAAAAAAAAACsAAAAAAAAABAAAAAMAAAAPAAAABQAAAB8AAAAFAAAAAwAAAAEAAAAMAAAAAAAAABwAAAAFAAAABwAAAAEAAAANAAAAAAAAABoAAAAAAAAAHwAAAAAAAAApAAAAAAAAADEAAAAAAAAALAAAAAAAAAA1AAAAAAAAAD0AAAADAAAAOgAAAAEAAABBAAAAAwAAAEsAAAADAAAADwAAAAAAAAAWAAAABQAAACEAAAAFAAAAHAAAAAAAAAAfAAAAAAAAACkAAAAAAAAAKgAAAAEAAAAsAAAAAAAAADUAAAAAAAAABAAAAAQAAAAIAAAABQAAABAAAAAFAAAADAAAAAEAAAAPAAAAAAAAABYAAAAFAAAAGgAAAAEAAAAcAAAAAAAAAB8AAAAAAAAAMgAAAAAAAAAwAAAAAAAAADEAAAADAAAAIAAAAAAAAAAeAAAAAwAAACEAAAADAAAAGAAAAAMAAAASAAAAAwAAABAAAAADAAAARgAAAAAAAABDAAAAAAAAAEIAAAADAAAANAAAAAMAAAAyAAAAAAAAADAAAAAAAAAAJQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAUwAAAAAAAABXAAAAAwAAAFUAAAADAAAASgAAAAMAAABGAAAAAAAAAEMAAAAAAAAAOQAAAAEAAAA0AAAAAwAAADIAAAAAAAAAGQAAAAAAAAAXAAAAAAAAABgAAAADAAAAEQAAAAAAAAALAAAAAwAAAAoAAAADAAAADgAAAAMAAAAGAAAAAwAAAAIAAAADAAAALQAAAAAAAAAnAAAAAAAAACUAAAADAAAAIwAAAAMAAAAZAAAAAAAAABcAAAAAAAAAGwAAAAMAAAARAAAAAAAAAAsAAAADAAAAPwAAAAAAAAA7AAAAAwAAADkAAAADAAAAOAAAAAMAAAAtAAAAAAAAACcAAAAAAAAALgAAAAMAAAAjAAAAAwAAABkAAAAAAAAAJAAAAAAAAAAUAAAAAAAAAA4AAAADAAAAIgAAAAAAAAATAAAAAwAAAAkAAAADAAAAJgAAAAMAAAAVAAAAAwAAAAcAAAADAAAANwAAAAAAAAAoAAAAAAAAABsAAAADAAAANgAAAAMAAAAkAAAAAAAAABQAAAAAAAAAMwAAAAMAAAAiAAAAAAAAABMAAAADAAAASAAAAAAAAAA8AAAAAwAAAC4AAAADAAAASQAAAAMAAAA3AAAAAAAAACgAAAAAAAAARwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAQAAAAAAAAAAvAAAAAAAAACYAAAADAAAAPgAAAAAAAAArAAAAAwAAAB0AAAADAAAAOgAAAAMAAAAqAAAAAwAAABoAAAADAAAAVAAAAAAAAABFAAAAAAAAADMAAAADAAAAUgAAAAMAAABAAAAAAAAAAC8AAAAAAAAATAAAAAMAAAA+AAAAAAAAACsAAAADAAAAYQAAAAAAAABZAAAAAwAAAEcAAAADAAAAYgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAYAAAAAMAAABSAAAAAwAAAEAAAAAAAAAASwAAAAAAAABBAAAAAAAAADoAAAADAAAAPQAAAAAAAAA1AAAAAwAAACwAAAADAAAAMQAAAAMAAAApAAAAAwAAAB8AAAADAAAAXgAAAAAAAABWAAAAAAAAAEwAAAADAAAAUQAAAAMAAABLAAAAAAAAAEEAAAAAAAAAQgAAAAMAAAA9AAAAAAAAADUAAAADAAAAawAAAAAAAABoAAAAAwAAAGAAAAADAAAAZQAAAAMAAABeAAAAAAAAAFYAAAAAAAAAVQAAAAMAAABRAAAAAwAAAEsAAAAAAAAAOQAAAAAAAAA7AAAAAAAAAD8AAAADAAAASgAAAAAAAABOAAAAAwAAAE8AAAADAAAAUwAAAAMAAABcAAAAAwAAAF8AAAADAAAAJQAAAAAAAAAnAAAAAwAAAC0AAAADAAAANAAAAAAAAAA5AAAAAAAAADsAAAAAAAAARgAAAAMAAABKAAAAAAAAAE4AAAADAAAAGAAAAAAAAAAXAAAAAwAAABkAAAADAAAAIAAAAAMAAAAlAAAAAAAAACcAAAADAAAAMgAAAAMAAAA0AAAAAAAAADkAAAAAAAAALgAAAAAAAAA8AAAAAAAAAEgAAAADAAAAOAAAAAAAAABEAAAAAwAAAFAAAAADAAAAPwAAAAMAAABNAAAAAwAAAFoAAAADAAAAGwAAAAAAAAAoAAAAAwAAADcAAAADAAAAIwAAAAAAAAAuAAAAAAAAADwAAAAAAAAALQAAAAMAAAA4AAAAAAAAAEQAAAADAAAADgAAAAAAAAAUAAAAAwAAACQAAAADAAAAEQAAAAMAAAAbAAAAAAAAACgAAAADAAAAGQAAAAMAAAAjAAAAAAAAAC4AAAAAAAAARwAAAAAAAABZAAAAAAAAAGEAAAADAAAASQAAAAAAAABbAAAAAwAAAGcAAAADAAAASAAAAAMAAABYAAAAAwAAAGkAAAADAAAAMwAAAAAAAABFAAAAAwAAAFQAAAADAAAANgAAAAAAAABHAAAAAAAAAFkAAAAAAAAANwAAAAMAAABJAAAAAAAAAFsAAAADAAAAJgAAAAAAAAAvAAAAAwAAAEAAAAADAAAAIgAAAAMAAAAzAAAAAAAAAEUAAAADAAAAJAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAYAAAAAAAAABoAAAAAAAAAGsAAAADAAAAYgAAAAAAAABuAAAAAwAAAHMAAAADAAAAYQAAAAMAAABvAAAAAwAAAHcAAAADAAAATAAAAAAAAABWAAAAAwAAAF4AAAADAAAAUgAAAAAAAABgAAAAAAAAAGgAAAAAAAAAVAAAAAMAAABiAAAAAAAAAG4AAAADAAAAOgAAAAAAAABBAAAAAwAAAEsAAAADAAAAPgAAAAMAAABMAAAAAAAAAFYAAAADAAAAQAAAAAMAAABSAAAAAAAAAGAAAAAAAAAAVQAAAAAAAABXAAAAAAAAAFMAAAADAAAAZQAAAAAAAABmAAAAAwAAAGQAAAADAAAAawAAAAMAAABwAAAAAwAAAHIAAAADAAAAQgAAAAAAAABDAAAAAwAAAEYAAAADAAAAUQAAAAAAAABVAAAAAAAAAFcAAAAAAAAAXgAAAAMAAABlAAAAAAAAAGYAAAADAAAAMQAAAAAAAAAwAAAAAwAAADIAAAADAAAAPQAAAAMAAABCAAAAAAAAAEMAAAADAAAASwAAAAMAAABRAAAAAAAAAFUAAAAAAAAAXwAAAAAAAABcAAAAAAAAAFMAAAAAAAAATwAAAAAAAABOAAAAAAAAAEoAAAADAAAAPwAAAAEAAAA7AAAAAwAAADkAAAADAAAAbQAAAAAAAABsAAAAAAAAAGQAAAAFAAAAXQAAAAEAAABfAAAAAAAAAFwAAAAAAAAATQAAAAEAAABPAAAAAAAAAE4AAAAAAAAAdQAAAAQAAAB2AAAABQAAAHIAAAAFAAAAagAAAAEAAABtAAAAAAAAAGwAAAAAAAAAWgAAAAEAAABdAAAAAQAAAF8AAAAAAAAAWgAAAAAAAABNAAAAAAAAAD8AAAAAAAAAUAAAAAAAAABEAAAAAAAAADgAAAADAAAASAAAAAEAAAA8AAAAAwAAAC4AAAADAAAAagAAAAAAAABdAAAAAAAAAE8AAAAFAAAAYwAAAAEAAABaAAAAAAAAAE0AAAAAAAAAWAAAAAEAAABQAAAAAAAAAEQAAAAAAAAAdQAAAAMAAABtAAAABQAAAF8AAAAFAAAAcQAAAAEAAABqAAAAAAAAAF0AAAAAAAAAaQAAAAEAAABjAAAAAQAAAFoAAAAAAAAAaQAAAAAAAABYAAAAAAAAAEgAAAAAAAAAZwAAAAAAAABbAAAAAAAAAEkAAAADAAAAYQAAAAEAAABZAAAAAwAAAEcAAAADAAAAcQAAAAAAAABjAAAAAAAAAFAAAAAFAAAAdAAAAAEAAABpAAAAAAAAAFgAAAAAAAAAbwAAAAEAAABnAAAAAAAAAFsAAAAAAAAAdQAAAAIAAABqAAAABQAAAFoAAAAFAAAAeQAAAAEAAABxAAAAAAAAAGMAAAAAAAAAdwAAAAEAAAB0AAAAAQAAAGkAAAAAAAAAdwAAAAAAAABvAAAAAAAAAGEAAAAAAAAAcwAAAAAAAABuAAAAAAAAAGIAAAADAAAAawAAAAEAAABoAAAAAwAAAGAAAAADAAAAeQAAAAAAAAB0AAAAAAAAAGcAAAAFAAAAeAAAAAEAAAB3AAAAAAAAAG8AAAAAAAAAcAAAAAEAAABzAAAAAAAAAG4AAAAAAAAAdQAAAAEAAABxAAAABQAAAGkAAAAFAAAAdgAAAAEAAAB5AAAAAAAAAHQAAAAAAAAAcgAAAAEAAAB4AAAAAQAAAHcAAAAAAAAAcgAAAAAAAABwAAAAAAAAAGsAAAAAAAAAZAAAAAAAAABmAAAAAAAAAGUAAAADAAAAUwAAAAEAAABXAAAAAwAAAFUAAAADAAAAdgAAAAAAAAB4AAAAAAAAAHMAAAAFAAAAbAAAAAEAAAByAAAAAAAAAHAAAAAAAAAAXAAAAAEAAABkAAAAAAAAAGYAAAAAAAAAdQAAAAAAAAB5AAAABQAAAHcAAAAFAAAAbQAAAAEAAAB2AAAAAAAAAHgAAAAAAAAAXwAAAAEAAABsAAAAAQAAAHIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAGAAAAAgAAAAUAAAABAAAABAAAAAAAAAAAAAAABQAAAAMAAAABAAAABgAAAAQAAAACAAAAAAAAAH6iBfbytuk/Gq6akm/58z/Xrm0Liez0P5doSdOpSwRAWs602ULg8D/dT7Rcbo/1v1N1RQHFNOM/g9Snx7HW3L8HWsP8Q3jfP6VwOLosutk/9rjk1YQcxj+gnmKMsNn6P/HDeuPFY+M/YHwDjqKhB0Ci19/fCVrbP4UxKkDWOP6/pvljWa09tL9wi7wrQXjnv/Z6yLImkM2/3yTlOzY14D+m+WNZrT20PzwKVQnrQwNA9nrIsiaQzT/g40rFrRQFwPa45NWEHMa/kbslHEZq97/xw3rjxWPjv4cLC2SMBci/otff3wla27+rKF5oIAv0P1N1RQHFNOO/iDJPGyWHBUAHWsP8Q3jfvwQf/by16gXAfqIF9vK26b8XrO0Vh0r+v9eubQuJ7PS/BxLrA0ZZ479azrTZQuDwv1MK1EuItPw/yscgV9Z6FkAwHBR2WjQMQJNRzXsQ5vY/GlUHVJYKF0DONuFv2lMNQNCGZ28QJfk/0WUwoIL36D8ggDOMQuATQNqMOeAy/wZAWFYOYM+M2z/LWC4uH3oSQDE+LyTsMgRAkJzhRGWFGEDd4soovCQQQKqk0DJMEP8/rGmNdwOLBUAW2X/9xCbjP4hu3dcqJhNAzuYItRvdB0CgzW3zJW/sPxotm/Y2TxRAQAk9XmdDDEC1Kx9MKgT3P1M+NctcghZAFVqcLlb0C0Bgzd3sB2b2P77mZDPUWhZAFROHJpUGCEDAfma5CxXtPz1DWq/zYxRAmhYY5824F0DOuQKWSbAOQNCMqrvu3fs/L6DR22K2wT9nAAxPBU8RQGiN6mW43AFAZhu25b633D8c1YgmzowSQNM25BRKWARArGS08/lNxD+LFssHwmMRQLC5aNcxBgJABL9HT0WRF0CjCmJmOGEOQHsuaVzMP/s/TWJCaGGwBUCeu1PAPLzjP9nqN9DZOBNAKE4JcydbCkCGtbd1qjPzP8dgm9U8jhVAtPeKTkVwDkCeCLss5l37P401XMPLmBdAFd29VMVQDUBg0yA55h75Pz6odcYLCRdApBM4rBrkAkDyAVWgQxbRP4XDMnK20hFAymLlF7EmzD8GUgo9XBHlP3lbK7T9COc/k+OhPthhy7+YGEpnrOvCPzBFhLs15u4/epbqB6H4uz9IuuLF5svev6lzLKY31es/CaQ0envF5z8ZY0xlUADXv7zaz7HYEuI/CfbK1sn16T8uAQfWwxLWPzKn/YuFN94/5KdbC1AFu793fyCSnlfvPzK2y4doAMY/NRg5t1/X6b/shq4QJaHDP5yNIAKPOeI/vpn7BSE30r/X4YQrO6nrv78Ziv/Thto/DqJ1Y6+y5z9l51NaxFrlv8QlA65HOLS/86dxiEc96z+Hj0+LFjneP6LzBZ8LTc2/DaJ1Y6+y579l51NaxFrlP8QlA65HOLQ/8qdxiEc967+Jj0+LFjnev6LzBZ8LTc0/1qdbC1AFuz93fyCSnlfvvzK2y4doAMa/NRg5t1/X6T/vhq4QJaHDv5yNIAKPOeK/wJn7BSE30j/W4YQrO6nrP78Ziv/Thtq/CaQ0envF578XY0xlUADXP7zaz7HYEuK/CvbK1sn16b8rAQfWwxLWvzKn/YuFN96/zWLlF7EmzL8GUgo9XBHlv3lbK7T9COe/kOOhPthhyz+cGEpnrOvCvzBFhLs15u6/c5bqB6H4u79IuuLF5sveP6lzLKY31eu/AQAAAP////8HAAAA/////zEAAAD/////VwEAAP////9hCQAA/////6dBAAD/////kcsBAP/////3kAwA/////8H2VwAAAAAAAAAAAAAAAAACAAAA/////w4AAAD/////YgAAAP////+uAgAA/////8ISAAD/////ToMAAP////8ilwMA/////+4hGQD/////gu2vAAAAAAAAAAAAAAAAAAAAAAACAAAA//////////8BAAAAAwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////AgAAAP//////////AQAAAAAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD/////////////////////AQAAAP///////////////wIAAAD///////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP///////////////////////////////wIAAAD///////////////8BAAAA/////////////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAABAAAA//////////8CAAAA//////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAAAQAAAP//////////AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAACAAAAAAAAAAIAAAABAAAAAQAAAAIAAAACAAAAAAAAAAUAAAAFAAAAAAAAAAIAAAACAAAAAwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAEAAAACAAAAAgAAAAIAAAAAAAAABQAAAAYAAAAAAAAAAgAAAAIAAAADAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAAAAAACAAAAAQAAAAMAAAACAAAAAgAAAAAAAAAFAAAABwAAAAAAAAACAAAAAgAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAACAAAAAAAAAAIAAAABAAAABAAAAAIAAAACAAAAAAAAAAUAAAAIAAAAAAAAAAIAAAACAAAAAwAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAIAAAAAAAAAAgAAAAEAAAAAAAAAAgAAAAIAAAAAAAAABQAAAAkAAAAAAAAAAgAAAAIAAAADAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAIAAAAAAAAAAwAAAA4AAAACAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAgAAAAMAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAgAAAAAAAAADAAAACgAAAAIAAAAAAAAAAgAAAAMAAAABAAAAAAAAAAIAAAACAAAAAwAAAAcAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAACAAAAAAAAAAMAAAALAAAAAgAAAAAAAAACAAAAAwAAAAIAAAAAAAAAAgAAAAIAAAADAAAACAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAIAAAAAAAAAAwAAAAwAAAACAAAAAAAAAAIAAAADAAAAAwAAAAAAAAACAAAAAgAAAAMAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAACAAAAAgAAAAAAAAADAAAADQAAAAIAAAAAAAAAAgAAAAMAAAAEAAAAAAAAAAIAAAACAAAAAwAAAAoAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAACAAAAAAAAAAMAAAAGAAAAAgAAAAAAAAACAAAAAwAAAA8AAAAAAAAAAgAAAAIAAAADAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAIAAAAAAAAAAwAAAAcAAAACAAAAAAAAAAIAAAADAAAAEAAAAAAAAAACAAAAAgAAAAMAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAgAAAAAAAAADAAAACAAAAAIAAAAAAAAAAgAAAAMAAAARAAAAAAAAAAIAAAACAAAAAwAAAA0AAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAACAAAAAAAAAAMAAAAJAAAAAgAAAAAAAAACAAAAAwAAABIAAAAAAAAAAgAAAAIAAAADAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAgAAAAIAAAAAAAAAAwAAAAUAAAACAAAAAAAAAAIAAAADAAAAEwAAAAAAAAACAAAAAgAAAAMAAAAPAAAAAAAAAAAAAAAAAAAAAAAAABAAAAACAAAAAAAAAAIAAAABAAAAEwAAAAIAAAACAAAAAAAAAAUAAAAKAAAAAAAAAAIAAAACAAAAAwAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAIAAAAAAAAAAgAAAAEAAAAPAAAAAgAAAAIAAAAAAAAABQAAAAsAAAAAAAAAAgAAAAIAAAADAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAgAAAAAAAAACAAAAAQAAABAAAAACAAAAAgAAAAAAAAAFAAAADAAAAAAAAAACAAAAAgAAAAMAAAASAAAAAAAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAIAAAABAAAAEQAAAAIAAAACAAAAAAAAAAUAAAANAAAAAAAAAAIAAAACAAAAAwAAABMAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAIAAAAAAAAAAgAAAAEAAAASAAAAAgAAAAIAAAAAAAAABQAAAA4AAAAAAAAAAgAAAAIAAAADAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAAAAAAUAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAQAAAAAAAAABQAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAAAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAQAAAAAAAAABQAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAOgehWlKfUEEz1zLi+JsiQa2og3wcMfVAWCbHorc0yEDi+Yn/Y6mbQJ11/mfsnG9At6bnG4UQQkBvMCQWKqUUQJVmwwswmOc/3hVgVBL3uj//qqOEOdGOPw/WDN4gnGE/H3ANkCUgND+AA8btKgAHPwTXBqJVSdo+XfRQAqsKrj4fc+zLYbSPQklEmCZHv2FCUP+uDso1NEKYtPhwphUHQptxnyFXYdpB7CddZAMmrkGAt1AxSTqBQUibBVdTsFNBSuX3MV+AJkFocv82SLf5QAqmgj7AY81A23VDSEnLoEDGEJVSeDFzQDYrqvBk70VA8U157pcRGUBWfEF+ZKbsP7KBdLHZTpFAqKYk69AqekDbeGY41MdjQD8AZzHK501A1vcrrjubNkD5LnquvBYhQCbiRRD71QlAqt72EbOH8z8Eu+jL1YbdP4uaox/xUcY/abedg1XfsD+BsUdzJ4KZP5wE9YFySIM/rW1kAKMpbT+rZFthVRhWPy4PKlXIs0A/qMZLlwDnMEHByqEF0I0ZQQYSFD8lUQNBPpY+dFs07UAH8BZImBPWQN9RY0I0sMBA2T7kLfc6qUByFYvfhBKTQMq+0Mis1XxA0XQbeQXMZUBJJ5aEGXpQQP7/SY0a6ThAaMD92b/UIkAs8s8yqXoMQNIegOvCk/U/aOi7NZJP4D8AAAAA/////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAD/////AAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAA/////wAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAP////8AAAAABQAAAAAAAAAAAAAAAAAAAAAAAAD/////BQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAQAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAEAAQAAAQEAAAAAAAEAAAABAAAAAQABAAAAAAAAAAAAAAAAAAAAAAcAAAAHAAAAAQAAAAIAAAAEAAAAAwAAAAAAAAAAAAAABwAAAAMAAAABAAAAAgAAAAUAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAGAAAAAgAAAAMAAAAFAAAABAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAwAAAAEAAAAFAAAABAAAAAAAAAAAAAAABwAAAAUAAAADAAAABAAAAAEAAAAAAAAAAgAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAGFsZ29zLmMAaDNOZWlnaGJvclJvdGF0aW9ucwBjb29yZGlqay5jAF91cEFwN0NoZWNrZWQAX3VwQXA3ckNoZWNrZWQAZGlyZWN0ZWRFZGdlLmMAZGlyZWN0ZWRFZGdlVG9Cb3VuZGFyeQBhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0NlbGxCb3VuZGFyeQBhZGphY2VudEZhY2VEaXJbY2VudGVySUpLLmZhY2VdW2ZhY2UyXSA9PSBLSQBfZmFjZUlqa1RvQ2VsbEJvdW5kYXJ5AGgzSW5kZXguYwBjb21wYWN0Q2VsbHMAbGF0TG5nVG9DZWxsAGNlbGxUb0NoaWxkUG9zAHZhbGlkYXRlQ2hpbGRQb3MAbGF0TG5nLmMAY2VsbEFyZWFSYWRzMgBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGNlbGxUb0xvY2FsSWprAGJhc2VDZWxsICE9IG9yaWdpbkJhc2VDZWxsACEob3JpZ2luT25QZW50ICYmIGluZGV4T25QZW50KQBiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvQ2VsbAAhX2lzQmFzZUNlbGxQZW50YWdvbihiYXNlQ2VsbCkAYmFzZUNlbGxSb3RhdGlvbnMgPj0gMABncmlkUGF0aENlbGxzADAAdmVydGV4LmMAY2VsbFRvVmVydGV4AGdyYXBoLT5idWNrZXRzICE9IE5VTEwAdmVydGV4R3JhcGguYwBpbml0VmVydGV4R3JhcGgAbm9kZSAhPSBOVUxMAGFkZFZlcnRleE5vZGU=";var rc=24144;function bs(q){return q}function Il(q){var me=/\b__Z[\w\d_]+/g;return q.replace(me,function(je){var tt=je;return je===tt?je:tt+" ["+je+"]"})}function ks(){var q=new Error;if(!q.stack){try{throw new Error(0)}catch(me){q=me}if(!q.stack)return"(no stack trace available)"}return q.stack.toString()}function au(){var q=ks();return tn.extraStackTrace&&(q+=` -`+tn.extraStackTrace()),Il(q)}function Al(q,me,je,tt){K("Assertion failed: "+ra(q)+", at: "+[me?ra(me):"unknown filename",je,tt?ra(tt):"unknown function"])}function cc(){return La.length}function Gl(q,me,je){aa.set(aa.subarray(me,me+je),q)}function yh(q){return tn.___errno_location&&(Ms[tn.___errno_location()>>2]=q),q}function ah(q){K("OOM")}function qf(q){try{var me=new ArrayBuffer(q);return me.byteLength!=q?void 0:(new Int8Array(me).set(La),Lf(me),iu(me),1)}catch(je){}}function Ac(q){var me=cc(),je=16777216,tt=2147483648-je;if(q>tt)return!1;for(var w=16777216,Gt=Math.max(me,w);Gt>4,w=(x&15)<<4|S>>2,Gt=(S&3)<<6|Z,je=je+String.fromCharCode(tt),S!==64&&(je=je+String.fromCharCode(w)),Z!==64&&(je=je+String.fromCharCode(Gt));while(he13780509?(I=Y0(15,I)|0,I|0):(B=((D|0)<0)<<31>>31,fe=ga(D|0,B|0,3,0)|0,ee=pr()|0,B=mu(D|0,B|0,1,0)|0,B=ga(fe|0,ee|0,B|0,pr()|0)|0,B=mu(B|0,pr()|0,1,0)|0,D=pr()|0,w[I>>2]=B,w[I+4>>2]=D,I=0,I|0)}function Ol(D,I,B,ee){return D=D|0,I=I|0,B=B|0,ee=ee|0,oc(D,I,B,ee,0)|0}function oc(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0;if(Bt=sn,sn=sn+16|0,Le=Bt,!(Ql(D,I,B,ee,fe)|0))return ee=0,sn=Bt,ee|0;do if((B|0)>=0){if((B|0)>13780509){if(Ae=Y0(15,Le)|0,Ae|0)break;Ve=Le,Le=w[Ve>>2]|0,Ve=w[Ve+4>>2]|0}else Ae=((B|0)<0)<<31>>31,sr=ga(B|0,Ae|0,3,0)|0,Ve=pr()|0,Ae=mu(B|0,Ae|0,1,0)|0,Ae=ga(sr|0,Ve|0,Ae|0,pr()|0)|0,Ae=mu(Ae|0,pr()|0,1,0)|0,Ve=pr()|0,w[Le>>2]=Ae,w[Le+4>>2]=Ve,Le=Ae;if(ea(ee|0,0,Le<<3|0)|0,fe|0){ea(fe|0,0,Le<<2|0)|0,Ae=Cu(D,I,B,ee,fe,Le,Ve,0)|0;break}Ae=Pl(Le,4)|0,Ae?(sr=Cu(D,I,B,ee,Ae,Le,Ve,0)|0,Xu(Ae),Ae=sr):Ae=13}else Ae=2;while(0);return sr=Ae,sn=Bt,sr|0}function Ql(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0;if(va=sn,sn=sn+16|0,bi=va,Ei=va+8|0,ci=bi,w[ci>>2]=D,w[ci+4>>2]=I,(B|0)<0)return Ei=2,sn=va,Ei|0;if(Ae=ee,w[Ae>>2]=D,w[Ae+4>>2]=I,Ae=(fe|0)!=0,Ae&&(w[fe>>2]=0),Sh(D,I)|0)return Ei=9,sn=va,Ei|0;w[Ei>>2]=0;e:do if((B|0)>=1)if(Ae)for(Er=1,sr=0,An=0,ci=1,Ae=D;;){if(!(sr|An)){if(Ae=Bc(Ae,I,4,Ei,bi)|0,Ae|0)break e;if(I=bi,Ae=w[I>>2]|0,I=w[I+4>>2]|0,Sh(Ae,I)|0){Ae=9;break e}}if(Ae=Bc(Ae,I,w[22384+(An<<2)>>2]|0,Ei,bi)|0,Ae|0)break e;if(I=bi,Ae=w[I>>2]|0,I=w[I+4>>2]|0,D=ee+(Er<<3)|0,w[D>>2]=Ae,w[D+4>>2]=I,w[fe+(Er<<2)>>2]=ci,D=sr+1|0,Le=(D|0)==(ci|0),Ve=An+1|0,Bt=(Ve|0)==6,Sh(Ae,I)|0){Ae=9;break e}if(ci=ci+(Bt&Le&1)|0,(ci|0)>(B|0)){Ae=0;break}else Er=Er+1|0,sr=Le?0:D,An=Le?Bt?0:Ve:An}else for(Er=1,sr=0,An=0,ci=1,Ae=D;;){if(!(sr|An)){if(Ae=Bc(Ae,I,4,Ei,bi)|0,Ae|0)break e;if(I=bi,Ae=w[I>>2]|0,I=w[I+4>>2]|0,Sh(Ae,I)|0){Ae=9;break e}}if(Ae=Bc(Ae,I,w[22384+(An<<2)>>2]|0,Ei,bi)|0,Ae|0)break e;if(I=bi,Ae=w[I>>2]|0,I=w[I+4>>2]|0,D=ee+(Er<<3)|0,w[D>>2]=Ae,w[D+4>>2]=I,D=sr+1|0,Le=(D|0)==(ci|0),Ve=An+1|0,Bt=(Ve|0)==6,Sh(Ae,I)|0){Ae=9;break e}if(ci=ci+(Bt&Le&1)|0,(ci|0)>(B|0)){Ae=0;break}else Er=Er+1|0,sr=Le?0:D,An=Le?Bt?0:Ve:An}else Ae=0;while(0);return Ei=Ae,sn=va,Ei|0}function Cu(D,I,B,ee,fe,Ae,Le,Ve){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0,Ae=Ae|0,Le=Le|0,Ve=Ve|0;var Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0;if(va=sn,sn=sn+16|0,bi=va+8|0,Ei=va,Bt=tf(D|0,I|0,Ae|0,Le|0)|0,Er=pr()|0,An=ee+(Bt<<3)|0,es=An,Io=w[es>>2]|0,es=w[es+4>>2]|0,sr=(Io|0)==(D|0)&(es|0)==(I|0),!((Io|0)==0&(es|0)==0|sr))do Bt=mu(Bt|0,Er|0,1,0)|0,Bt=Yu(Bt|0,pr()|0,Ae|0,Le|0)|0,Er=pr()|0,An=ee+(Bt<<3)|0,Io=An,es=w[Io>>2]|0,Io=w[Io+4>>2]|0,sr=(es|0)==(D|0)&(Io|0)==(I|0);while(!((es|0)==0&(Io|0)==0|sr));if(Bt=fe+(Bt<<2)|0,sr&&(w[Bt>>2]|0)<=(Ve|0)||(Io=An,w[Io>>2]=D,w[Io+4>>2]=I,w[Bt>>2]=Ve,(Ve|0)>=(B|0)))return Io=0,sn=va,Io|0;switch(sr=Ve+1|0,w[bi>>2]=0,Bt=Bc(D,I,2,bi,Ei)|0,Bt|0){case 9:{ci=9;break}case 0:{Bt=Ei,Bt=Cu(w[Bt>>2]|0,w[Bt+4>>2]|0,B,ee,fe,Ae,Le,sr)|0,Bt||(ci=9);break}default:}e:do if((ci|0)==9){switch(w[bi>>2]=0,Bt=Bc(D,I,3,bi,Ei)|0,Bt|0){case 9:break;case 0:{if(Bt=Ei,Bt=Cu(w[Bt>>2]|0,w[Bt+4>>2]|0,B,ee,fe,Ae,Le,sr)|0,Bt|0)break e;break}default:break e}switch(w[bi>>2]=0,Bt=Bc(D,I,1,bi,Ei)|0,Bt|0){case 9:break;case 0:{if(Bt=Ei,Bt=Cu(w[Bt>>2]|0,w[Bt+4>>2]|0,B,ee,fe,Ae,Le,sr)|0,Bt|0)break e;break}default:break e}switch(w[bi>>2]=0,Bt=Bc(D,I,5,bi,Ei)|0,Bt|0){case 9:break;case 0:{if(Bt=Ei,Bt=Cu(w[Bt>>2]|0,w[Bt+4>>2]|0,B,ee,fe,Ae,Le,sr)|0,Bt|0)break e;break}default:break e}switch(w[bi>>2]=0,Bt=Bc(D,I,4,bi,Ei)|0,Bt|0){case 9:break;case 0:{if(Bt=Ei,Bt=Cu(w[Bt>>2]|0,w[Bt+4>>2]|0,B,ee,fe,Ae,Le,sr)|0,Bt|0)break e;break}default:break e}switch(w[bi>>2]=0,Bt=Bc(D,I,6,bi,Ei)|0,Bt|0){case 9:break;case 0:{if(Bt=Ei,Bt=Cu(w[Bt>>2]|0,w[Bt+4>>2]|0,B,ee,fe,Ae,Le,sr)|0,Bt|0)break e;break}default:break e}return Io=0,sn=va,Io|0}while(0);return Io=Bt,sn=va,Io|0}function Bc(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0;if(B>>>0>6)return fe=1,fe|0;if(An=(w[ee>>2]|0)%6|0,w[ee>>2]=An,(An|0)>0){Ae=0;do B=Jc(B)|0,Ae=Ae+1|0;while((Ae|0)<(w[ee>>2]|0))}if(An=Nr(D|0,I|0,45)|0,pr()|0,Er=An&127,Er>>>0>121)return fe=5,fe|0;Bt=Fp(D,I)|0,Ae=Nr(D|0,I|0,52)|0,pr()|0,Ae=Ae&15;e:do if(!Ae)sr=8;else{for(;;){if(Le=(15-Ae|0)*3|0,Ve=Nr(D|0,I|0,Le|0)|0,pr()|0,Ve=Ve&7,(Ve|0)==7){I=5;break}if(Ei=(Qd(Ae)|0)==0,Ae=Ae+-1|0,ci=vr(7,0,Le|0)|0,I=I&~(pr()|0),bi=vr(w[(Ei?432:16)+(Ve*28|0)+(B<<2)>>2]|0,0,Le|0)|0,Le=pr()|0,B=w[(Ei?640:224)+(Ve*28|0)+(B<<2)>>2]|0,D=bi|D&~ci,I=Le|I,!B){B=0;break e}if(!Ae){sr=8;break e}}return I|0}while(0);(sr|0)==8&&(Ei=w[848+(Er*28|0)+(B<<2)>>2]|0,bi=vr(Ei|0,0,45)|0,D=bi|D,I=pr()|0|I&-1040385,B=w[4272+(Er*28|0)+(B<<2)>>2]|0,(Ei&127|0)==127&&(Ei=vr(w[848+(Er*28|0)+20>>2]|0,0,45)|0,I=pr()|0|I&-1040385,B=w[4272+(Er*28|0)+20>>2]|0,D=Zp(Ei|D,I)|0,I=pr()|0,w[ee>>2]=(w[ee>>2]|0)+1)),Ve=Nr(D|0,I|0,45)|0,pr()|0,Ve=Ve&127;e:do if(vf(Ve)|0){t:do if((Fp(D,I)|0)==1){if((Er|0)!=(Ve|0))if(Hf(Ve,w[7696+(Er*28|0)>>2]|0)|0){D=Xp(D,I)|0,Le=1,I=pr()|0;break}else di(23313,22416,436,22424);switch(Bt|0){case 3:{D=Zp(D,I)|0,I=pr()|0,w[ee>>2]=(w[ee>>2]|0)+1,Le=0;break t}case 5:{D=Xp(D,I)|0,I=pr()|0,w[ee>>2]=(w[ee>>2]|0)+5,Le=0;break t}case 0:return Ei=9,Ei|0;default:return Ei=1,Ei|0}}else Le=0;while(0);if((B|0)>0){Ae=0;do D=z0(D,I)|0,I=pr()|0,Ae=Ae+1|0;while((Ae|0)!=(B|0))}if((Er|0)!=(Ve|0)){if(!(Ph(Ve)|0)){if((Le|0)!=0|(Fp(D,I)|0)!=5)break;w[ee>>2]=(w[ee>>2]|0)+1;break}switch(An&127){case 8:case 118:break e;default:}(Fp(D,I)|0)!=3&&(w[ee>>2]=(w[ee>>2]|0)+1)}}else if((B|0)>0){Ae=0;do D=Zp(D,I)|0,I=pr()|0,Ae=Ae+1|0;while((Ae|0)!=(B|0))}while(0);return w[ee>>2]=((w[ee>>2]|0)+B|0)%6|0,Ei=fe,w[Ei>>2]=D,w[Ei+4>>2]=I,Ei=0,Ei|0}function ff(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0;for(Ve=sn,sn=sn+16|0,Ae=Ve,Le=Ve+8|0,fe=(Sh(D,I)|0)==0,fe=fe?1:2;;){if(w[Le>>2]=0,sr=(Bc(D,I,fe,Le,Ae)|0)==0,Bt=Ae,sr&((w[Bt>>2]|0)==(B|0)?(w[Bt+4>>2]|0)==(ee|0):0)){D=4;break}if(fe=fe+1|0,fe>>>0>=7){fe=7,D=4;break}}return(D|0)==4?(sn=Ve,fe|0):0}function Eh(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0;if(Ei=sn,sn=sn+16|0,ci=Ei,bi=Ei+8|0,An=ci,w[An>>2]=D,w[An+4>>2]=I,!B)return bi=ee,w[bi>>2]=D,w[bi+4>>2]=I,bi=0,sn=Ei,bi|0;w[bi>>2]=0;e:do if(Sh(D,I)|0)D=9;else{if(Ae=(B|0)>0,Ae){fe=0,An=D;do{if(D=Bc(An,I,4,bi,ci)|0,D|0)break e;if(I=ci,An=w[I>>2]|0,I=w[I+4>>2]|0,fe=fe+1|0,Sh(An,I)|0){D=9;break e}}while((fe|0)<(B|0));if(Er=ee,w[Er>>2]=An,w[Er+4>>2]=I,Er=B+-1|0,Ae){sr=0,D=1;do{if(fe=22384+(sr<<2)|0,(sr|0)==5)for(Le=w[fe>>2]|0,Ae=0,fe=D;;){if(D=ci,D=Bc(w[D>>2]|0,w[D+4>>2]|0,Le,bi,ci)|0,D|0)break e;if((Ae|0)!=(Er|0))if(Bt=ci,Ve=w[Bt>>2]|0,Bt=w[Bt+4>>2]|0,D=ee+(fe<<3)|0,w[D>>2]=Ve,w[D+4>>2]=Bt,!(Sh(Ve,Bt)|0))D=fe+1|0;else{D=9;break e}else D=fe;if(Ae=Ae+1|0,(Ae|0)>=(B|0))break;fe=D}else for(Le=ci,Bt=w[fe>>2]|0,Ve=0,fe=D,Ae=w[Le>>2]|0,Le=w[Le+4>>2]|0;;){if(D=Bc(Ae,Le,Bt,bi,ci)|0,D|0)break e;if(Le=ci,Ae=w[Le>>2]|0,Le=w[Le+4>>2]|0,D=ee+(fe<<3)|0,w[D>>2]=Ae,w[D+4>>2]=Le,D=fe+1|0,Sh(Ae,Le)|0){D=9;break e}if(Ve=Ve+1|0,(Ve|0)>=(B|0))break;fe=D}sr=sr+1|0}while(sr>>>0<6);D=ci,Le=An,fe=w[D>>2]|0,Ae=I,D=w[D+4>>2]|0}else Le=An,fe=An,Ae=I,D=I}else Le=ee,w[Le>>2]=D,w[Le+4>>2]=I,Le=D,fe=D,Ae=I,D=I;D=(Le|0)==(fe|0)&(Ae|0)==(D|0)?0:9}while(0);return bi=D,sn=Ei,bi|0}function Rf(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0;if(Ve=sn,sn=sn+48|0,fe=Ve+16|0,Ae=Ve+8|0,Le=Ve,B|0)return Le=15,sn=Ve,Le|0;if(sr=D,Bt=w[sr+4>>2]|0,B=Ae,w[B>>2]=w[sr>>2],w[B+4>>2]=Bt,lu(Ae,fe),I=Jh(fe,I,Le)|0,!I){if(B=w[Ae>>2]|0,Ae=w[D+8>>2]|0,(Ae|0)>0){fe=w[D+12>>2]|0,I=0;do B=(w[fe+(I<<3)>>2]|0)+B|0,I=I+1|0;while((I|0)<(Ae|0))}I=Le,fe=w[I>>2]|0,I=w[I+4>>2]|0,Ae=((B|0)<0)<<31>>31,(I|0)<(Ae|0)|(I|0)==(Ae|0)&fe>>>0>>0?(I=Le,w[I>>2]=B,w[I+4>>2]=Ae,I=Ae):B=fe,Bt=mu(B|0,I|0,12,0)|0,sr=pr()|0,I=Le,w[I>>2]=Bt,w[I+4>>2]=sr,I=ee,w[I>>2]=Bt,w[I+4>>2]=sr,I=0}return sr=I,sn=Ve,sr|0}function Xl(D,I,B,ee,fe,Ae,Le){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0,Ae=Ae|0,Le=Le|0;var Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0,Va=0,zl=0,Ll=0,Ru=0,xl=0,Th=0,Bh=0,wh=0,Jf=0,Yl=0,Mc=0,ad=0,Tf=0,Wh=0,Nf=0,hm=0;if(ad=sn,sn=sn+64|0,wh=ad+48|0,Jf=ad+32|0,Yl=ad+24|0,zl=ad+8|0,Ll=ad,Bt=w[D>>2]|0,(Bt|0)<=0)return Mc=0,sn=ad,Mc|0;for(Ru=D+4|0,xl=wh+8|0,Th=Jf+8|0,Bh=zl+8|0,Ve=0,ao=0;;){sr=w[Ru>>2]|0,io=sr+(ao<<4)|0,w[wh>>2]=w[io>>2],w[wh+4>>2]=w[io+4>>2],w[wh+8>>2]=w[io+8>>2],w[wh+12>>2]=w[io+12>>2],(ao|0)==(Bt+-1|0)?(w[Jf>>2]=w[sr>>2],w[Jf+4>>2]=w[sr+4>>2],w[Jf+8>>2]=w[sr+8>>2],w[Jf+12>>2]=w[sr+12>>2]):(io=sr+(ao+1<<4)|0,w[Jf>>2]=w[io>>2],w[Jf+4>>2]=w[io+4>>2],w[Jf+8>>2]=w[io+8>>2],w[Jf+12>>2]=w[io+12>>2]),Bt=Qc(wh,Jf,ee,Yl)|0;e:do if(Bt)sr=0,Ve=Bt;else if(sr=Yl,Bt=w[sr>>2]|0,sr=w[sr+4>>2]|0,(sr|0)>0|(sr|0)==0&Bt>>>0>0){Io=0,io=0;t:for(;;){if(hm=+x[wh>>3],es=pf(Bt|0,sr|0,Io|0,io|0)|0,Nf=+(es>>>0)+4294967296*+(pr()|0),Tf=+(Bt>>>0)+4294967296*+(sr|0),Wh=+(Io>>>0)+4294967296*+(io|0),x[zl>>3]=hm*Nf/Tf+ +x[Jf>>3]*Wh/Tf,x[Bh>>3]=+x[xl>>3]*Nf/Tf+ +x[Th>>3]*Wh/Tf,Bt=r0(zl,ee,Ll)|0,Bt|0){Ve=Bt;break}es=Ll,va=w[es>>2]|0,es=w[es+4>>2]|0,ci=tf(va|0,es|0,I|0,B|0)|0,Er=pr()|0,Bt=Le+(ci<<3)|0,An=Bt,sr=w[An>>2]|0,An=w[An+4>>2]|0;r:do if((sr|0)==0&(An|0)==0)Va=Bt,Mc=16;else for(bi=0,Ei=0;;){if((bi|0)>(B|0)|(bi|0)==(B|0)&Ei>>>0>I>>>0){Ve=1;break t}if((sr|0)==(va|0)&(An|0)==(es|0))break r;if(Bt=mu(ci|0,Er|0,1,0)|0,ci=Yu(Bt|0,pr()|0,I|0,B|0)|0,Er=pr()|0,Ei=mu(Ei|0,bi|0,1,0)|0,bi=pr()|0,Bt=Le+(ci<<3)|0,An=Bt,sr=w[An>>2]|0,An=w[An+4>>2]|0,(sr|0)==0&(An|0)==0){Va=Bt,Mc=16;break}}while(0);if((Mc|0)==16&&(Mc=0,!((va|0)==0&(es|0)==0))&&(Ei=Va,w[Ei>>2]=va,w[Ei+4>>2]=es,Ei=Ae+(w[fe>>2]<<3)|0,w[Ei>>2]=va,w[Ei+4>>2]=es,Ei=fe,Ei=mu(w[Ei>>2]|0,w[Ei+4>>2]|0,1,0)|0,va=pr()|0,es=fe,w[es>>2]=Ei,w[es+4>>2]=va),Io=mu(Io|0,io|0,1,0)|0,io=pr()|0,sr=Yl,Bt=w[sr>>2]|0,sr=w[sr+4>>2]|0,!((sr|0)>(io|0)|(sr|0)==(io|0)&Bt>>>0>Io>>>0)){sr=1;break e}}sr=0}else sr=1;while(0);if(ao=ao+1|0,!sr){Mc=21;break}if(Bt=w[D>>2]|0,(ao|0)>=(Bt|0)){Ve=0,Mc=21;break}}return(Mc|0)==21?(sn=ad,Ve|0):0}function jf(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0,Va=0,zl=0,Ll=0,Ru=0,xl=0,Th=0,Bh=0,wh=0,Jf=0,Yl=0,Mc=0,ad=0,Tf=0,Wh=0,Nf=0;if(Nf=sn,sn=sn+112|0,Mc=Nf+80|0,Bt=Nf+72|0,ad=Nf,Tf=Nf+56|0,B|0)return Wh=15,sn=Nf,Wh|0;if(sr=D+8|0,Wh=th((w[sr>>2]<<5)+32|0)|0,!Wh)return Wh=13,sn=Nf,Wh|0;if(el(D,Wh),Jf=D,Yl=w[Jf+4>>2]|0,B=Bt,w[B>>2]=w[Jf>>2],w[B+4>>2]=Yl,lu(Bt,Mc),B=Jh(Mc,I,ad)|0,B)Jf=0,Yl=0;else{if(B=w[Bt>>2]|0,Ae=w[sr>>2]|0,(Ae|0)>0){Le=w[D+12>>2]|0,fe=0;do B=(w[Le+(fe<<3)>>2]|0)+B|0,fe=fe+1|0;while((fe|0)!=(Ae|0));fe=B}else fe=B;B=ad,Ae=w[B>>2]|0,B=w[B+4>>2]|0,Le=((fe|0)<0)<<31>>31,(B|0)<(Le|0)|(B|0)==(Le|0)&Ae>>>0>>0?(B=ad,w[B>>2]=fe,w[B+4>>2]=Le,B=Le):fe=Ae,Jf=mu(fe|0,B|0,12,0)|0,Yl=pr()|0,B=ad,w[B>>2]=Jf,w[B+4>>2]=Yl,B=0}if(B|0)return Xu(Wh),Wh=B,sn=Nf,Wh|0;if(fe=Pl(Jf,8)|0,!fe)return Xu(Wh),Wh=13,sn=Nf,Wh|0;if(Ve=Pl(Jf,8)|0,!Ve)return Xu(Wh),Xu(fe),Wh=13,sn=Nf,Wh|0;Bh=Mc,w[Bh>>2]=0,w[Bh+4>>2]=0,Bh=D,wh=w[Bh+4>>2]|0,B=Bt,w[B>>2]=w[Bh>>2],w[B+4>>2]=wh,B=Xl(Bt,Jf,Yl,I,Mc,fe,Ve)|0;e:do if(B)Xu(fe),Xu(Ve),Xu(Wh);else{t:do if((w[sr>>2]|0)>0){for(Le=D+12|0,Ae=0;B=Xl((w[Le>>2]|0)+(Ae<<3)|0,Jf,Yl,I,Mc,fe,Ve)|0,Ae=Ae+1|0,!(B|0);)if((Ae|0)>=(w[sr>>2]|0))break t;Xu(fe),Xu(Ve),Xu(Wh);break e}while(0);(Yl|0)>0|(Yl|0)==0&Jf>>>0>0&&ea(Ve|0,0,Jf<<3|0)|0,wh=Mc,Bh=w[wh+4>>2]|0;t:do if((Bh|0)>0|(Bh|0)==0&(w[wh>>2]|0)>>>0>0){Ru=fe,xl=Ve,Th=fe,Bh=Ve,wh=fe,B=fe,Va=fe,zl=Ve,Ll=Ve,fe=Ve;r:for(;;){for(es=0,Io=0,io=0,ao=0,Ae=0,Le=0;;){Ve=ad,Bt=Ve+56|0;do w[Ve>>2]=0,Ve=Ve+4|0;while((Ve|0)<(Bt|0));if(I=Ru+(es<<3)|0,sr=w[I>>2]|0,I=w[I+4>>2]|0,Ql(sr,I,1,ad,0)|0){Ve=ad,Bt=Ve+56|0;do w[Ve>>2]=0,Ve=Ve+4|0;while((Ve|0)<(Bt|0));Ve=Pl(7,4)|0,Ve|0&&(Cu(sr,I,1,ad,Ve,7,0,0)|0,Xu(Ve))}for(va=0;;){Ei=ad+(va<<3)|0,bi=w[Ei>>2]|0,Ei=w[Ei+4>>2]|0;n:do if((bi|0)==0&(Ei|0)==0)Ve=Ae,Bt=Le;else{if(Er=tf(bi|0,Ei|0,Jf|0,Yl|0)|0,sr=pr()|0,Ve=ee+(Er<<3)|0,I=Ve,Bt=w[I>>2]|0,I=w[I+4>>2]|0,!((Bt|0)==0&(I|0)==0)){An=0,ci=0;do{if((An|0)>(Yl|0)|(An|0)==(Yl|0)&ci>>>0>Jf>>>0)break r;if((Bt|0)==(bi|0)&(I|0)==(Ei|0)){Ve=Ae,Bt=Le;break n}Ve=mu(Er|0,sr|0,1,0)|0,Er=Yu(Ve|0,pr()|0,Jf|0,Yl|0)|0,sr=pr()|0,ci=mu(ci|0,An|0,1,0)|0,An=pr()|0,Ve=ee+(Er<<3)|0,I=Ve,Bt=w[I>>2]|0,I=w[I+4>>2]|0}while(!((Bt|0)==0&(I|0)==0))}(bi|0)==0&(Ei|0)==0?(Ve=Ae,Bt=Le):(s0(bi,Ei,Tf)|0,As(D,Wh,Tf)|0&&(ci=mu(Ae|0,Le|0,1,0)|0,Le=pr()|0,An=Ve,w[An>>2]=bi,w[An+4>>2]=Ei,Ae=xl+(Ae<<3)|0,w[Ae>>2]=bi,w[Ae+4>>2]=Ei,Ae=ci),Ve=Ae,Bt=Le)}while(0);if(va=va+1|0,va>>>0>=7)break;Ae=Ve,Le=Bt}if(es=mu(es|0,Io|0,1,0)|0,Io=pr()|0,io=mu(io|0,ao|0,1,0)|0,ao=pr()|0,Le=Mc,Ae=w[Le>>2]|0,Le=w[Le+4>>2]|0,(ao|0)<(Le|0)|(ao|0)==(Le|0)&io>>>0>>0)Ae=Ve,Le=Bt;else break}if((Le|0)>0|(Le|0)==0&Ae>>>0>0){Ae=0,Le=0;do ao=Ru+(Ae<<3)|0,w[ao>>2]=0,w[ao+4>>2]=0,Ae=mu(Ae|0,Le|0,1,0)|0,Le=pr()|0,ao=Mc,io=w[ao+4>>2]|0;while((Le|0)<(io|0)|((Le|0)==(io|0)?Ae>>>0<(w[ao>>2]|0)>>>0:0))}if(ao=Mc,w[ao>>2]=Ve,w[ao+4>>2]=Bt,(Bt|0)>0|(Bt|0)==0&Ve>>>0>0)va=fe,es=Ll,Io=wh,io=zl,ao=xl,fe=Va,Ll=B,zl=Th,Va=va,B=es,wh=Bh,Bh=Io,Th=io,xl=Ru,Ru=ao;else break t}Xu(Th),Xu(Bh),Xu(Wh),B=1;break e}else B=Ve;while(0);Xu(Wh),Xu(fe),Xu(B),B=0}while(0);return Wh=B,sn=Nf,Wh|0}function Yf(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0;if(Er=sn,sn=sn+176|0,Bt=Er,(I|0)<1)return Ff(B,0,0),sr=0,sn=Er,sr|0;for(Ve=D,Ve=Nr(w[Ve>>2]|0,w[Ve+4>>2]|0,52)|0,pr()|0,Ff(B,(I|0)>6?I:6,Ve&15),Ve=0;ee=D+(Ve<<3)|0,ee=m0(w[ee>>2]|0,w[ee+4>>2]|0,Bt)|0,!(ee|0);){if(ee=w[Bt>>2]|0,(ee|0)>0){Le=0;do Ae=Bt+8+(Le<<4)|0,Le=Le+1|0,ee=Bt+8+(((Le|0)%(ee|0)|0)<<4)|0,fe=Vf(B,ee,Ae)|0,fe?Bf(B,fe)|0:md(B,Ae,ee)|0,ee=w[Bt>>2]|0;while((Le|0)<(ee|0))}if(Ve=Ve+1|0,(Ve|0)>=(I|0)){ee=0,sr=13;break}}return(sr|0)==13?(sn=Er,ee|0):(Md(B),sr=ee,sn=Er,sr|0)}function Ah(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0;if(Ae=sn,sn=sn+32|0,ee=Ae,fe=Ae+16|0,D=Yf(D,I,fe)|0,D|0)return B=D,sn=Ae,B|0;if(w[B>>2]=0,w[B+4>>2]=0,w[B+8>>2]=0,D=Fh(fe)|0,D|0)do{I=eo(B)|0;do zo(I,D)|0,Le=D+16|0,w[ee>>2]=w[Le>>2],w[ee+4>>2]=w[Le+4>>2],w[ee+8>>2]=w[Le+8>>2],w[ee+12>>2]=w[Le+12>>2],Bf(fe,D)|0,D=id(fe,ee)|0;while(D|0);D=Fh(fe)|0}while(D|0);return Md(fe),D=Ha(B)|0,D?(to(B),Le=D,sn=Ae,Le|0):(Le=0,sn=Ae,Le|0)}function vf(D){return D=D|0,D>>>0>121?(D=0,D|0):(D=w[7696+(D*28|0)+16>>2]|0,D|0)}function Ph(D){return D=D|0,(D|0)==4|(D|0)==117|0}function Ld(D){return D=D|0,w[11120+((w[D>>2]|0)*216|0)+((w[D+4>>2]|0)*72|0)+((w[D+8>>2]|0)*24|0)+(w[D+12>>2]<<3)>>2]|0}function Hh(D){return D=D|0,w[11120+((w[D>>2]|0)*216|0)+((w[D+4>>2]|0)*72|0)+((w[D+8>>2]|0)*24|0)+(w[D+12>>2]<<3)+4>>2]|0}function Dh(D,I){D=D|0,I=I|0,D=7696+(D*28|0)|0,w[I>>2]=w[D>>2],w[I+4>>2]=w[D+4>>2],w[I+8>>2]=w[D+8>>2],w[I+12>>2]=w[D+12>>2]}function eh(D,I){D=D|0,I=I|0;var B=0,ee=0;if(I>>>0>20)return I=-1,I|0;do if((w[11120+(I*216|0)>>2]|0)!=(D|0))if((w[11120+(I*216|0)+8>>2]|0)!=(D|0))if((w[11120+(I*216|0)+16>>2]|0)!=(D|0))if((w[11120+(I*216|0)+24>>2]|0)!=(D|0))if((w[11120+(I*216|0)+32>>2]|0)!=(D|0))if((w[11120+(I*216|0)+40>>2]|0)!=(D|0))if((w[11120+(I*216|0)+48>>2]|0)!=(D|0))if((w[11120+(I*216|0)+56>>2]|0)!=(D|0))if((w[11120+(I*216|0)+64>>2]|0)!=(D|0))if((w[11120+(I*216|0)+72>>2]|0)!=(D|0))if((w[11120+(I*216|0)+80>>2]|0)!=(D|0))if((w[11120+(I*216|0)+88>>2]|0)!=(D|0))if((w[11120+(I*216|0)+96>>2]|0)!=(D|0))if((w[11120+(I*216|0)+104>>2]|0)!=(D|0))if((w[11120+(I*216|0)+112>>2]|0)!=(D|0))if((w[11120+(I*216|0)+120>>2]|0)!=(D|0))if((w[11120+(I*216|0)+128>>2]|0)!=(D|0))if((w[11120+(I*216|0)+136>>2]|0)==(D|0))D=2,B=1,ee=2;else{if((w[11120+(I*216|0)+144>>2]|0)==(D|0)){D=0,B=2,ee=0;break}if((w[11120+(I*216|0)+152>>2]|0)==(D|0)){D=0,B=2,ee=1;break}if((w[11120+(I*216|0)+160>>2]|0)==(D|0)){D=0,B=2,ee=2;break}if((w[11120+(I*216|0)+168>>2]|0)==(D|0)){D=1,B=2,ee=0;break}if((w[11120+(I*216|0)+176>>2]|0)==(D|0)){D=1,B=2,ee=1;break}if((w[11120+(I*216|0)+184>>2]|0)==(D|0)){D=1,B=2,ee=2;break}if((w[11120+(I*216|0)+192>>2]|0)==(D|0)){D=2,B=2,ee=0;break}if((w[11120+(I*216|0)+200>>2]|0)==(D|0)){D=2,B=2,ee=1;break}if((w[11120+(I*216|0)+208>>2]|0)==(D|0)){D=2,B=2,ee=2;break}else D=-1;return D|0}else D=2,B=1,ee=1;else D=2,B=1,ee=0;else D=1,B=1,ee=2;else D=1,B=1,ee=1;else D=1,B=1,ee=0;else D=0,B=1,ee=2;else D=0,B=1,ee=1;else D=0,B=1,ee=0;else D=2,B=0,ee=2;else D=2,B=0,ee=1;else D=2,B=0,ee=0;else D=1,B=0,ee=2;else D=1,B=0,ee=1;else D=1,B=0,ee=0;else D=0,B=0,ee=2;else D=0,B=0,ee=1;else D=0,B=0,ee=0;while(0);return I=w[11120+(I*216|0)+(B*72|0)+(D*24|0)+(ee<<3)+4>>2]|0,I|0}function Hf(D,I){return D=D|0,I=I|0,(w[7696+(D*28|0)+20>>2]|0)==(I|0)?(I=1,I|0):(I=(w[7696+(D*28|0)+24>>2]|0)==(I|0),I|0)}function qh(D,I){return D=D|0,I=I|0,w[848+(D*28|0)+(I<<2)>>2]|0}function Qh(D,I){return D=D|0,I=I|0,(w[848+(D*28|0)>>2]|0)==(I|0)?(I=0,I|0):(w[848+(D*28|0)+4>>2]|0)==(I|0)?(I=1,I|0):(w[848+(D*28|0)+8>>2]|0)==(I|0)?(I=2,I|0):(w[848+(D*28|0)+12>>2]|0)==(I|0)?(I=3,I|0):(w[848+(D*28|0)+16>>2]|0)==(I|0)?(I=4,I|0):(w[848+(D*28|0)+20>>2]|0)==(I|0)?(I=5,I|0):((w[848+(D*28|0)+24>>2]|0)==(I|0)?6:7)|0}function Uh(){return 122}function Dd(D){D=D|0;var I=0,B=0,ee=0;I=0;do vr(I|0,0,45)|0,ee=pr()|0|134225919,B=D+(I<<3)|0,w[B>>2]=-1,w[B+4>>2]=ee,I=I+1|0;while((I|0)!=122);return 0}function Wl(D){return D=D|0,+x[D+16>>3]<+x[D+24>>3]|0}function yd(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0;return B=+x[I>>3],!(B>=+x[D+8>>3])||!(B<=+x[D>>3])?(I=0,I|0):(ee=+x[D+16>>3],B=+x[D+24>>3],fe=+x[I+8>>3],I=fe>=B,D=fe<=ee&1,ee>2]=0,Ve=Ve+4|0;while((Ve|0)<(Bt|0));return I=Vd(I,sr)|0,I|0?(bi=I,sn=Ei,bi|0):(Bt=sr,sr=w[Bt>>2]|0,Bt=w[Bt+4>>2]|0,s0(sr,Bt,Er)|0,m0(sr,Bt,An)|0,Le=+Bp(Er,An+8|0),x[Er>>3]=+x[D>>3],Bt=Er+8|0,x[Bt>>3]=+x[D+16>>3],x[An>>3]=+x[D+8>>3],sr=An+8|0,x[sr>>3]=+x[D+24>>3],fe=+Bp(Er,An),es=+x[Bt>>3]-+x[sr>>3],Ae=+Se(+es),va=+x[Er>>3]-+x[An>>3],ee=+Se(+va),!(es==0|va==0)&&(es=+hi(+Ae,+ee),es=+rn(+(fe*fe/+Ma(+(es/+Ma(+Ae,+ee)),3)/(Le*(Le*2.59807621135)*.8))),x[S>>3]=es,ci=~~es>>>0,bi=+Se(es)>=1?es>0?~~+dn(+he(es/4294967296),4294967295)>>>0:~~+rn((es-+(~~es>>>0))/4294967296)>>>0:0,(w[S+4>>2]&2146435072|0)!=2146435072)?(An=(ci|0)==0&(bi|0)==0,I=B,w[I>>2]=An?1:ci,w[I+4>>2]=An?0:bi,I=0):I=1,bi=I,sn=Ei,bi|0)}function Qc(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0;sr=sn,sn=sn+288|0,Le=sr+264|0,Ve=sr+96|0,Bt=sr,fe=Bt,Ae=fe+96|0;do w[fe>>2]=0,fe=fe+4|0;while((fe|0)<(Ae|0));return B=Vd(B,Bt)|0,B|0?(ee=B,sn=sr,ee|0):(B=Bt,fe=w[B>>2]|0,B=w[B+4>>2]|0,s0(fe,B,Le)|0,m0(fe,B,Ve)|0,Er=+Bp(Le,Ve+8|0),Er=+rn(+(+Bp(D,I)/(Er*2))),x[S>>3]=Er,B=~~Er>>>0,fe=+Se(Er)>=1?Er>0?~~+dn(+he(Er/4294967296),4294967295)>>>0:~~+rn((Er-+(~~Er>>>0))/4294967296)>>>0:0,(w[S+4>>2]&2146435072|0)==2146435072?(ee=1,sn=sr,ee|0):(Bt=(B|0)==0&(fe|0)==0,w[ee>>2]=Bt?1:B,w[ee+4>>2]=Bt?0:fe,ee=0,sn=sr,ee|0))}function Ap(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0,w[D>>2]=I,w[D+4>>2]=B,w[D+8>>2]=ee}function vc(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0;An=I+8|0,w[An>>2]=0,Bt=+x[D>>3],Le=+Se(+Bt),sr=+x[D+8>>3],Ve=+Se(+sr)/.8660254037844386,Le=Le+Ve*.5,B=~~Le,D=~~Ve,Le=Le-+(B|0),Ve=Ve-+(D|0);do if(Le<.5)if(Le<.3333333333333333)if(w[I>>2]=B,Ve<(Le+1)*.5){w[I+4>>2]=D;break}else{D=D+1|0,w[I+4>>2]=D;break}else if(ci=1-Le,D=(!(Ve>2]=D,ci<=Ve&Ve>2]=B;break}else{w[I>>2]=B;break}else{if(!(Le<.6666666666666666))if(B=B+1|0,w[I>>2]=B,Ve>2]=D;break}else{D=D+1|0,w[I+4>>2]=D;break}if(Ve<1-Le){if(w[I+4>>2]=D,Le*2+-1>2]=B;break}}else D=D+1|0,w[I+4>>2]=D;B=B+1|0,w[I>>2]=B}while(0);do if(Bt<0)if(D&1){Er=(D+1|0)/2|0,Er=pf(B|0,((B|0)<0)<<31>>31|0,Er|0,((Er|0)<0)<<31>>31|0)|0,B=~~(+(B|0)-((+(Er>>>0)+4294967296*+(pr()|0))*2+1)),w[I>>2]=B;break}else{Er=(D|0)/2|0,Er=pf(B|0,((B|0)<0)<<31>>31|0,Er|0,((Er|0)<0)<<31>>31|0)|0,B=~~(+(B|0)-(+(Er>>>0)+4294967296*+(pr()|0))*2),w[I>>2]=B;break}while(0);Er=I+4|0,sr<0&&(B=B-((D<<1|1|0)/2|0)|0,w[I>>2]=B,D=0-D|0,w[Er>>2]=D),ee=D-B|0,(B|0)<0?(fe=0-B|0,w[Er>>2]=ee,w[An>>2]=fe,w[I>>2]=0,D=ee,B=0):fe=0,(D|0)<0&&(B=B-D|0,w[I>>2]=B,fe=fe-D|0,w[An>>2]=fe,w[Er>>2]=0,D=0),Ae=B-fe|0,ee=D-fe|0,(fe|0)<0&&(w[I>>2]=Ae,w[Er>>2]=ee,w[An>>2]=0,D=ee,B=Ae,fe=0),ee=(D|0)<(B|0)?D:B,ee=(fe|0)<(ee|0)?fe:ee,!((ee|0)<=0)&&(w[I>>2]=B-ee,w[Er>>2]=D-ee,w[An>>2]=fe-ee)}function kf(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0;I=w[D>>2]|0,Le=D+4|0,B=w[Le>>2]|0,(I|0)<0&&(B=B-I|0,w[Le>>2]=B,Ae=D+8|0,w[Ae>>2]=(w[Ae>>2]|0)-I,w[D>>2]=0,I=0),(B|0)<0?(I=I-B|0,w[D>>2]=I,Ae=D+8|0,fe=(w[Ae>>2]|0)-B|0,w[Ae>>2]=fe,w[Le>>2]=0,B=0):(fe=D+8|0,Ae=fe,fe=w[fe>>2]|0),(fe|0)<0&&(I=I-fe|0,w[D>>2]=I,B=B-fe|0,w[Le>>2]=B,w[Ae>>2]=0,fe=0),ee=(B|0)<(I|0)?B:I,ee=(fe|0)<(ee|0)?fe:ee,!((ee|0)<=0)&&(w[D>>2]=I-ee,w[Le>>2]=B-ee,w[Ae>>2]=fe-ee)}function Ih(D,I){D=D|0,I=I|0;var B=0,ee=0;ee=w[D+8>>2]|0,B=+((w[D+4>>2]|0)-ee|0),x[I>>3]=+((w[D>>2]|0)-ee|0)-B*.5,x[I+8>>3]=B*.8660254037844386}function hd(D,I,B){D=D|0,I=I|0,B=B|0,w[B>>2]=(w[I>>2]|0)+(w[D>>2]|0),w[B+4>>2]=(w[I+4>>2]|0)+(w[D+4>>2]|0),w[B+8>>2]=(w[I+8>>2]|0)+(w[D+8>>2]|0)}function Gh(D,I,B){D=D|0,I=I|0,B=B|0,w[B>>2]=(w[D>>2]|0)-(w[I>>2]|0),w[B+4>>2]=(w[D+4>>2]|0)-(w[I+4>>2]|0),w[B+8>>2]=(w[D+8>>2]|0)-(w[I+8>>2]|0)}function Jp(D,I){D=D|0,I=I|0;var B=0,ee=0;B=Xr(w[D>>2]|0,I)|0,w[D>>2]=B,B=D+4|0,ee=Xr(w[B>>2]|0,I)|0,w[B>>2]=ee,D=D+8|0,I=Xr(w[D>>2]|0,I)|0,w[D>>2]=I}function i0(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;Le=w[D>>2]|0,Ve=(Le|0)<0,ee=(w[D+4>>2]|0)-(Ve?Le:0)|0,Ae=(ee|0)<0,fe=(Ae?0-ee|0:0)+((w[D+8>>2]|0)-(Ve?Le:0))|0,B=(fe|0)<0,D=B?0:fe,I=(Ae?0:ee)-(B?fe:0)|0,fe=(Ve?0:Le)-(Ae?ee:0)-(B?fe:0)|0,B=(I|0)<(fe|0)?I:fe,B=(D|0)<(B|0)?D:B,ee=(B|0)>0,D=D-(ee?B:0)|0,I=I-(ee?B:0)|0;e:do switch(fe-(ee?B:0)|0){case 0:switch(I|0){case 0:return Ve=D|0?(D|0)==1?1:7:0,Ve|0;case 1:return Ve=D|0?(D|0)==1?3:7:2,Ve|0;default:break e}case 1:switch(I|0){case 0:return Ve=D|0?(D|0)==1?5:7:4,Ve|0;case 1:{if(!D)D=6;else break e;return D|0}default:break e}default:}while(0);return Ve=7,Ve|0}function Cp(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;Le=D+8|0,fe=w[Le>>2]|0,Ae=(w[D>>2]|0)-fe|0,Ve=D+4|0,fe=(w[Ve>>2]|0)-fe|0;do if(Ae>>>0>715827881|fe>>>0>715827881){if(B=(Ae|0)>0,B){if((2147483647-Ae|0)<(Ae|0)||(2147483647-(Ae<<1)|0)<(Ae|0))return Ve=1,Ve|0}else if((-2147483648-Ae|0)>(Ae|0)||(-2147483648-(Ae<<1)|0)>(Ae|0))return Ve=1,Ve|0;if(I=Ae*3|0,(fe|0)>0){if((2147483647-fe|0)<(fe|0))return Ve=1,Ve|0}else if((-2147483648-fe|0)>(fe|0))return Ve=1,Ve|0;if(ee=fe<<1,(Ae|0)>-1){if((I|-2147483648|0)>=(fe|0))return Ve=1,Ve|0}else if((I^-2147483648|0)<(fe|0))return Ve=1,Ve|0;if(B){if((2147483647-Ae|0)<(ee|0))I=1;else{B=ee;break}return I|0}else{if((-2147483648-Ae|0)>(ee|0))I=1;else{B=ee;break}return I|0}}else B=fe<<1,I=Ae*3|0;while(0);ee=ef(+(I-fe|0)/7)|0,w[D>>2]=ee,fe=ef(+(B+Ae|0)/7)|0,w[Ve>>2]=fe,w[Le>>2]=0,B=(fe|0)<(ee|0),I=B?ee:fe,B=B?fe:ee;do if((B|0)<0){if((I|0)>0){if((I|-2147483648|0)<(B|0)&((B|0)!=-2147483648&(2147483647-I|0)>=(B|0)))break;di(23313,22444,355,22455)}if((B|0)==-2147483648|(-2147483648-I|0)>(B|0)&&di(23313,22444,355,22455),(I|0)>-1){if((I|-2147483648|0)<(B|0))break;di(23313,22444,355,22455)}else{if((I^-2147483648|0)>=(B|0))break;di(23313,22444,355,22455)}}while(0);return I=fe-ee|0,(ee|0)<0?(B=0-ee|0,w[Ve>>2]=I,w[Le>>2]=B,w[D>>2]=0,ee=0):(I=fe,B=0),(I|0)<0&&(ee=ee-I|0,w[D>>2]=ee,B=B-I|0,w[Le>>2]=B,w[Ve>>2]=0,I=0),Ae=ee-B|0,fe=I-B|0,(B|0)<0?(w[D>>2]=Ae,w[Ve>>2]=fe,w[Le>>2]=0,I=fe,fe=Ae,B=0):fe=ee,ee=(I|0)<(fe|0)?I:fe,ee=(B|0)<(ee|0)?B:ee,(ee|0)<=0?(Ve=0,Ve|0):(w[D>>2]=fe-ee,w[Ve>>2]=I-ee,w[Le>>2]=B-ee,Ve=0,Ve|0)}function Tp(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;Le=D+8|0,fe=w[Le>>2]|0,Ae=(w[D>>2]|0)-fe|0,Ve=D+4|0,fe=(w[Ve>>2]|0)-fe|0;do if(Ae>>>0>715827881|fe>>>0>715827881){if(B=(Ae|0)>0,B){if((2147483647-Ae|0)<(Ae|0))return Ve=1,Ve|0}else if((-2147483648-Ae|0)>(Ae|0))return Ve=1,Ve|0;if(I=Ae<<1,(fe|0)>0){if((2147483647-fe|0)<(fe|0)||(2147483647-(fe<<1)|0)<(fe|0))return Ve=1,Ve|0}else if((-2147483648-fe|0)>(fe|0)||(-2147483648-(fe<<1)|0)>(fe|0))return Ve=1,Ve|0;if(ee=fe*3|0,B){if((2147483647-I|0)<(fe|0))return Ve=1,Ve|0}else if((-2147483648-I|0)>(fe|0))return Ve=1,Ve|0;if((fe|0)>-1){if((ee|-2147483648|0)<(Ae|0)){B=ee;break}else I=1;return I|0}else{if((ee^-2147483648|0)<(Ae|0))I=1;else{B=ee;break}return I|0}}else B=fe*3|0,I=Ae<<1;while(0);ee=ef(+(I+fe|0)/7)|0,w[D>>2]=ee,fe=ef(+(B-Ae|0)/7)|0,w[Ve>>2]=fe,w[Le>>2]=0,B=(fe|0)<(ee|0),I=B?ee:fe,B=B?fe:ee;do if((B|0)<0){if((I|0)>0){if((I|-2147483648|0)<(B|0)&((B|0)!=-2147483648&(2147483647-I|0)>=(B|0)))break;di(23313,22444,404,22469)}if((B|0)==-2147483648|(-2147483648-I|0)>(B|0)&&di(23313,22444,404,22469),(I|0)>-1){if((I|-2147483648|0)<(B|0))break;di(23313,22444,404,22469)}else{if((I^-2147483648|0)>=(B|0))break;di(23313,22444,404,22469)}}while(0);return I=fe-ee|0,(ee|0)<0?(B=0-ee|0,w[Ve>>2]=I,w[Le>>2]=B,w[D>>2]=0,ee=0):(I=fe,B=0),(I|0)<0&&(ee=ee-I|0,w[D>>2]=ee,B=B-I|0,w[Le>>2]=B,w[Ve>>2]=0,I=0),Ae=ee-B|0,fe=I-B|0,(B|0)<0?(w[D>>2]=Ae,w[Ve>>2]=fe,w[Le>>2]=0,I=fe,fe=Ae,B=0):fe=ee,ee=(I|0)<(fe|0)?I:fe,ee=(B|0)<(ee|0)?B:ee,(ee|0)<=0?(Ve=0,Ve|0):(w[D>>2]=fe-ee,w[Ve>>2]=I-ee,w[Le>>2]=B-ee,Ve=0,Ve|0)}function sp(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;Le=D+8|0,B=w[Le>>2]|0,I=(w[D>>2]|0)-B|0,Ve=D+4|0,B=(w[Ve>>2]|0)-B|0,ee=ef(+((I*3|0)-B|0)/7)|0,w[D>>2]=ee,I=ef(+((B<<1)+I|0)/7)|0,w[Ve>>2]=I,w[Le>>2]=0,B=I-ee|0,(ee|0)<0?(Ae=0-ee|0,w[Ve>>2]=B,w[Le>>2]=Ae,w[D>>2]=0,I=B,ee=0,B=Ae):B=0,(I|0)<0&&(ee=ee-I|0,w[D>>2]=ee,B=B-I|0,w[Le>>2]=B,w[Ve>>2]=0,I=0),Ae=ee-B|0,fe=I-B|0,(B|0)<0?(w[D>>2]=Ae,w[Ve>>2]=fe,w[Le>>2]=0,I=fe,fe=Ae,B=0):fe=ee,ee=(I|0)<(fe|0)?I:fe,ee=(B|0)<(ee|0)?B:ee,!((ee|0)<=0)&&(w[D>>2]=fe-ee,w[Ve>>2]=I-ee,w[Le>>2]=B-ee)}function y0(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;Le=D+8|0,B=w[Le>>2]|0,I=(w[D>>2]|0)-B|0,Ve=D+4|0,B=(w[Ve>>2]|0)-B|0,ee=ef(+((I<<1)+B|0)/7)|0,w[D>>2]=ee,I=ef(+((B*3|0)-I|0)/7)|0,w[Ve>>2]=I,w[Le>>2]=0,B=I-ee|0,(ee|0)<0?(Ae=0-ee|0,w[Ve>>2]=B,w[Le>>2]=Ae,w[D>>2]=0,I=B,ee=0,B=Ae):B=0,(I|0)<0&&(ee=ee-I|0,w[D>>2]=ee,B=B-I|0,w[Le>>2]=B,w[Ve>>2]=0,I=0),Ae=ee-B|0,fe=I-B|0,(B|0)<0?(w[D>>2]=Ae,w[Ve>>2]=fe,w[Le>>2]=0,I=fe,fe=Ae,B=0):fe=ee,ee=(I|0)<(fe|0)?I:fe,ee=(B|0)<(ee|0)?B:ee,!((ee|0)<=0)&&(w[D>>2]=fe-ee,w[Ve>>2]=I-ee,w[Le>>2]=B-ee)}function a0(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;I=w[D>>2]|0,Le=D+4|0,B=w[Le>>2]|0,Ve=D+8|0,ee=w[Ve>>2]|0,fe=B+(I*3|0)|0,w[D>>2]=fe,B=ee+(B*3|0)|0,w[Le>>2]=B,I=(ee*3|0)+I|0,w[Ve>>2]=I,ee=B-fe|0,(fe|0)<0?(I=I-fe|0,w[Le>>2]=ee,w[Ve>>2]=I,w[D>>2]=0,B=ee,ee=0):ee=fe,(B|0)<0&&(ee=ee-B|0,w[D>>2]=ee,I=I-B|0,w[Ve>>2]=I,w[Le>>2]=0,B=0),Ae=ee-I|0,fe=B-I|0,(I|0)<0?(w[D>>2]=Ae,w[Le>>2]=fe,w[Ve>>2]=0,ee=Ae,I=0):fe=B,B=(fe|0)<(ee|0)?fe:ee,B=(I|0)<(B|0)?I:B,!((B|0)<=0)&&(w[D>>2]=ee-B,w[Le>>2]=fe-B,w[Ve>>2]=I-B)}function Lp(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;fe=w[D>>2]|0,Le=D+4|0,I=w[Le>>2]|0,Ve=D+8|0,B=w[Ve>>2]|0,ee=(I*3|0)+fe|0,fe=B+(fe*3|0)|0,w[D>>2]=fe,w[Le>>2]=ee,I=(B*3|0)+I|0,w[Ve>>2]=I,B=ee-fe|0,(fe|0)<0?(I=I-fe|0,w[Le>>2]=B,w[Ve>>2]=I,w[D>>2]=0,fe=0):B=ee,(B|0)<0&&(fe=fe-B|0,w[D>>2]=fe,I=I-B|0,w[Ve>>2]=I,w[Le>>2]=0,B=0),Ae=fe-I|0,ee=B-I|0,(I|0)<0?(w[D>>2]=Ae,w[Le>>2]=ee,w[Ve>>2]=0,fe=Ae,I=0):ee=B,B=(ee|0)<(fe|0)?ee:fe,B=(I|0)<(B|0)?I:B,!((B|0)<=0)&&(w[D>>2]=fe-B,w[Le>>2]=ee-B,w[Ve>>2]=I-B)}function Wd(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;(I+-1|0)>>>0>=6||(fe=(w[15440+(I*12|0)>>2]|0)+(w[D>>2]|0)|0,w[D>>2]=fe,Ve=D+4|0,ee=(w[15440+(I*12|0)+4>>2]|0)+(w[Ve>>2]|0)|0,w[Ve>>2]=ee,Le=D+8|0,I=(w[15440+(I*12|0)+8>>2]|0)+(w[Le>>2]|0)|0,w[Le>>2]=I,B=ee-fe|0,(fe|0)<0?(I=I-fe|0,w[Ve>>2]=B,w[Le>>2]=I,w[D>>2]=0,ee=0):(B=ee,ee=fe),(B|0)<0&&(ee=ee-B|0,w[D>>2]=ee,I=I-B|0,w[Le>>2]=I,w[Ve>>2]=0,B=0),Ae=ee-I|0,fe=B-I|0,(I|0)<0?(w[D>>2]=Ae,w[Ve>>2]=fe,w[Le>>2]=0,ee=Ae,I=0):fe=B,B=(fe|0)<(ee|0)?fe:ee,B=(I|0)<(B|0)?I:B,!((B|0)<=0)&&(w[D>>2]=ee-B,w[Ve>>2]=fe-B,w[Le>>2]=I-B))}function d0(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;fe=w[D>>2]|0,Le=D+4|0,I=w[Le>>2]|0,Ve=D+8|0,B=w[Ve>>2]|0,ee=I+fe|0,fe=B+fe|0,w[D>>2]=fe,w[Le>>2]=ee,I=B+I|0,w[Ve>>2]=I,B=ee-fe|0,(fe|0)<0?(I=I-fe|0,w[Le>>2]=B,w[Ve>>2]=I,w[D>>2]=0,ee=0):(B=ee,ee=fe),(B|0)<0&&(ee=ee-B|0,w[D>>2]=ee,I=I-B|0,w[Ve>>2]=I,w[Le>>2]=0,B=0),Ae=ee-I|0,fe=B-I|0,(I|0)<0?(w[D>>2]=Ae,w[Le>>2]=fe,w[Ve>>2]=0,ee=Ae,I=0):fe=B,B=(fe|0)<(ee|0)?fe:ee,B=(I|0)<(B|0)?I:B,!((B|0)<=0)&&(w[D>>2]=ee-B,w[Le>>2]=fe-B,w[Ve>>2]=I-B)}function hf(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;I=w[D>>2]|0,Le=D+4|0,ee=w[Le>>2]|0,Ve=D+8|0,B=w[Ve>>2]|0,fe=ee+I|0,w[D>>2]=fe,ee=B+ee|0,w[Le>>2]=ee,I=B+I|0,w[Ve>>2]=I,B=ee-fe|0,(fe|0)<0?(I=I-fe|0,w[Le>>2]=B,w[Ve>>2]=I,w[D>>2]=0,ee=0):(B=ee,ee=fe),(B|0)<0&&(ee=ee-B|0,w[D>>2]=ee,I=I-B|0,w[Ve>>2]=I,w[Le>>2]=0,B=0),Ae=ee-I|0,fe=B-I|0,(I|0)<0?(w[D>>2]=Ae,w[Le>>2]=fe,w[Ve>>2]=0,ee=Ae,I=0):fe=B,B=(fe|0)<(ee|0)?fe:ee,B=(I|0)<(B|0)?I:B,!((B|0)<=0)&&(w[D>>2]=ee-B,w[Le>>2]=fe-B,w[Ve>>2]=I-B)}function Jc(D){switch(D=D|0,D|0){case 1:{D=5;break}case 5:{D=4;break}case 4:{D=6;break}case 6:{D=2;break}case 2:{D=3;break}case 3:{D=1;break}default:}return D|0}function td(D){switch(D=D|0,D|0){case 1:{D=3;break}case 3:{D=2;break}case 2:{D=6;break}case 6:{D=4;break}case 4:{D=5;break}case 5:{D=1;break}default:}return D|0}function Ud(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;I=w[D>>2]|0,Le=D+4|0,B=w[Le>>2]|0,Ve=D+8|0,ee=w[Ve>>2]|0,fe=B+(I<<1)|0,w[D>>2]=fe,B=ee+(B<<1)|0,w[Le>>2]=B,I=(ee<<1)+I|0,w[Ve>>2]=I,ee=B-fe|0,(fe|0)<0?(I=I-fe|0,w[Le>>2]=ee,w[Ve>>2]=I,w[D>>2]=0,B=ee,ee=0):ee=fe,(B|0)<0&&(ee=ee-B|0,w[D>>2]=ee,I=I-B|0,w[Ve>>2]=I,w[Le>>2]=0,B=0),Ae=ee-I|0,fe=B-I|0,(I|0)<0?(w[D>>2]=Ae,w[Le>>2]=fe,w[Ve>>2]=0,ee=Ae,I=0):fe=B,B=(fe|0)<(ee|0)?fe:ee,B=(I|0)<(B|0)?I:B,!((B|0)<=0)&&(w[D>>2]=ee-B,w[Le>>2]=fe-B,w[Ve>>2]=I-B)}function P0(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;fe=w[D>>2]|0,Le=D+4|0,I=w[Le>>2]|0,Ve=D+8|0,B=w[Ve>>2]|0,ee=(I<<1)+fe|0,fe=B+(fe<<1)|0,w[D>>2]=fe,w[Le>>2]=ee,I=(B<<1)+I|0,w[Ve>>2]=I,B=ee-fe|0,(fe|0)<0?(I=I-fe|0,w[Le>>2]=B,w[Ve>>2]=I,w[D>>2]=0,fe=0):B=ee,(B|0)<0&&(fe=fe-B|0,w[D>>2]=fe,I=I-B|0,w[Ve>>2]=I,w[Le>>2]=0,B=0),Ae=fe-I|0,ee=B-I|0,(I|0)<0?(w[D>>2]=Ae,w[Le>>2]=ee,w[Ve>>2]=0,fe=Ae,I=0):ee=B,B=(ee|0)<(fe|0)?ee:fe,B=(I|0)<(B|0)?I:B,!((B|0)<=0)&&(w[D>>2]=fe-B,w[Le>>2]=ee-B,w[Ve>>2]=I-B)}function Dp(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;return Le=(w[D>>2]|0)-(w[I>>2]|0)|0,Ve=(Le|0)<0,ee=(w[D+4>>2]|0)-(w[I+4>>2]|0)-(Ve?Le:0)|0,Ae=(ee|0)<0,fe=(Ve?0-Le|0:0)+(w[D+8>>2]|0)-(w[I+8>>2]|0)+(Ae?0-ee|0:0)|0,D=(fe|0)<0,I=D?0:fe,B=(Ae?0:ee)-(D?fe:0)|0,fe=(Ve?0:Le)-(Ae?ee:0)-(D?fe:0)|0,D=(B|0)<(fe|0)?B:fe,D=(I|0)<(D|0)?I:D,ee=(D|0)>0,I=I-(ee?D:0)|0,B=B-(ee?D:0)|0,D=fe-(ee?D:0)|0,D=(D|0)>-1?D:0-D|0,B=(B|0)>-1?B:0-B|0,I=(I|0)>-1?I:0-I|0,I=(B|0)>(I|0)?B:I,((D|0)>(I|0)?D:I)|0}function kh(D,I){D=D|0,I=I|0;var B=0;B=w[D+8>>2]|0,w[I>>2]=(w[D>>2]|0)-B,w[I+4>>2]=(w[D+4>>2]|0)-B}function Zc(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;ee=w[D>>2]|0,w[I>>2]=ee,fe=w[D+4>>2]|0,Le=I+4|0,w[Le>>2]=fe,Ve=I+8|0,w[Ve>>2]=0,B=(fe|0)<(ee|0),D=B?ee:fe,B=B?fe:ee;do if((B|0)<0){if((D|0)>0){if((D|-2147483648|0)<(B|0)&((B|0)!=-2147483648&(2147483647-D|0)>=(B|0)))break;return D=1,D|0}if((B|0)==-2147483648|(-2147483648-D|0)>(B|0))return I=1,I|0;if((D|0)>-1){if((D|-2147483648|0)<(B|0))break;return D=1,D|0}else{if((D^-2147483648|0)<(B|0))D=1;else break;return D|0}}while(0);return D=fe-ee|0,(ee|0)<0?(B=0-ee|0,w[Le>>2]=D,w[Ve>>2]=B,w[I>>2]=0,ee=0):(D=fe,B=0),(D|0)<0&&(ee=ee-D|0,w[I>>2]=ee,B=B-D|0,w[Ve>>2]=B,w[Le>>2]=0,D=0),Ae=ee-B|0,fe=D-B|0,(B|0)<0?(w[I>>2]=Ae,w[Le>>2]=fe,w[Ve>>2]=0,D=fe,fe=Ae,B=0):fe=ee,ee=(D|0)<(fe|0)?D:fe,ee=(B|0)<(ee|0)?B:ee,(ee|0)<=0?(I=0,I|0):(w[I>>2]=fe-ee,w[Le>>2]=D-ee,w[Ve>>2]=B-ee,I=0,I|0)}function dh(D){D=D|0;var I=0,B=0,ee=0,fe=0;I=D+8|0,fe=w[I>>2]|0,B=fe-(w[D>>2]|0)|0,w[D>>2]=B,ee=D+4|0,D=(w[ee>>2]|0)-fe|0,w[ee>>2]=D,w[I>>2]=0-(D+B)}function rd(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;B=w[D>>2]|0,I=0-B|0,w[D>>2]=I,Le=D+8|0,w[Le>>2]=0,Ve=D+4|0,ee=w[Ve>>2]|0,fe=ee+B|0,(B|0)>0?(w[Ve>>2]=fe,w[Le>>2]=B,w[D>>2]=0,I=0,ee=fe):B=0,(ee|0)<0?(Ae=I-ee|0,w[D>>2]=Ae,B=B-ee|0,w[Le>>2]=B,w[Ve>>2]=0,fe=Ae-B|0,I=0-B|0,(B|0)<0?(w[D>>2]=fe,w[Ve>>2]=I,w[Le>>2]=0,ee=I,B=0):(ee=0,fe=Ae)):fe=I,I=(ee|0)<(fe|0)?ee:fe,I=(B|0)<(I|0)?B:I,!((I|0)<=0)&&(w[D>>2]=fe-I,w[Ve>>2]=ee-I,w[Le>>2]=B-I)}function $p(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0;if(An=sn,sn=sn+64|0,Er=An,Ve=An+56|0,!(!0&(I&2013265920|0)==134217728&(!0&(ee&2013265920|0)==134217728)))return fe=5,sn=An,fe|0;if((D|0)==(B|0)&(I|0)==(ee|0))return w[fe>>2]=0,fe=0,sn=An,fe|0;if(Le=Nr(D|0,I|0,52)|0,pr()|0,Le=Le&15,sr=Nr(B|0,ee|0,52)|0,pr()|0,(Le|0)!=(sr&15|0))return fe=12,sn=An,fe|0;if(Ae=Le+-1|0,Le>>>0>1){bp(D,I,Ae,Er)|0,bp(B,ee,Ae,Ve)|0,sr=Er,Bt=w[sr>>2]|0,sr=w[sr+4>>2]|0;e:do if((Bt|0)==(w[Ve>>2]|0)&&(sr|0)==(w[Ve+4>>2]|0)){Le=(Le^15)*3|0,Ae=Nr(D|0,I|0,Le|0)|0,pr()|0,Ae=Ae&7,Le=Nr(B|0,ee|0,Le|0)|0,pr()|0,Le=Le&7;do if((Ae|0)==0|(Le|0)==0)w[fe>>2]=1,Ae=0;else if((Ae|0)==7)Ae=5;else{if((Ae|0)==1|(Le|0)==1&&Sh(Bt,sr)|0){Ae=5;break}if((w[15536+(Ae<<2)>>2]|0)!=(Le|0)&&(w[15568+(Ae<<2)>>2]|0)!=(Le|0))break e;w[fe>>2]=1,Ae=0}while(0);return fe=Ae,sn=An,fe|0}while(0)}Ae=Er,Le=Ae+56|0;do w[Ae>>2]=0,Ae=Ae+4|0;while((Ae|0)<(Le|0));return Ol(D,I,1,Er)|0,I=Er,!((w[I>>2]|0)==(B|0)&&(w[I+4>>2]|0)==(ee|0))&&(I=Er+8|0,!((w[I>>2]|0)==(B|0)&&(w[I+4>>2]|0)==(ee|0)))&&(I=Er+16|0,!((w[I>>2]|0)==(B|0)&&(w[I+4>>2]|0)==(ee|0)))&&(I=Er+24|0,!((w[I>>2]|0)==(B|0)&&(w[I+4>>2]|0)==(ee|0)))&&(I=Er+32|0,!((w[I>>2]|0)==(B|0)&&(w[I+4>>2]|0)==(ee|0)))&&(I=Er+40|0,!((w[I>>2]|0)==(B|0)&&(w[I+4>>2]|0)==(ee|0)))?(Ae=Er+48|0,Ae=((w[Ae>>2]|0)==(B|0)?(w[Ae+4>>2]|0)==(ee|0):0)&1):Ae=1,w[fe>>2]=Ae,fe=0,sn=An,fe|0}function k0(D,I,B,ee,fe){return D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0,B=ff(D,I,B,ee)|0,(B|0)==7?(fe=11,fe|0):(ee=vr(B|0,0,56)|0,I=I&-2130706433|(pr()|0)|268435456,w[fe>>2]=D|ee,w[fe+4>>2]=I,fe=0,fe|0)}function H0(D,I,B){return D=D|0,I=I|0,B=B|0,!0&(I&2013265920|0)==268435456?(w[B>>2]=D,w[B+4>>2]=I&-2130706433|134217728,B=0,B|0):(B=6,B|0)}function _0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0;return fe=sn,sn=sn+16|0,ee=fe,w[ee>>2]=0,!0&(I&2013265920|0)==268435456?(Ae=Nr(D|0,I|0,56)|0,pr()|0,ee=Bc(D,I&-2130706433|134217728,Ae&7,ee,B)|0,sn=fe,ee|0):(ee=6,sn=fe,ee|0)}function tm(D,I){D=D|0,I=I|0;var B=0;switch(B=Nr(D|0,I|0,56)|0,pr()|0,B&7){case 0:case 7:return B=0,B|0;default:}return B=I&-2130706433|134217728,!(!0&(I&2013265920|0)==268435456)||!0&(I&117440512|0)==16777216&(Sh(D,B)|0)!=0?(B=0,B|0):(B=mp(D,B)|0,B|0)}function Dc(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0;return fe=sn,sn=sn+16|0,ee=fe,!0&(I&2013265920|0)==268435456?(Ae=I&-2130706433|134217728,Le=B,w[Le>>2]=D,w[Le+4>>2]=Ae,w[ee>>2]=0,I=Nr(D|0,I|0,56)|0,pr()|0,ee=Bc(D,Ae,I&7,ee,B+8|0)|0,sn=fe,ee|0):(ee=6,sn=fe,ee|0)}function F0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0;return fe=(Sh(D,I)|0)==0,I=I&-2130706433,ee=B,w[ee>>2]=fe?D:0,w[ee+4>>2]=fe?I|285212672:0,ee=B+8|0,w[ee>>2]=D,w[ee+4>>2]=I|301989888,ee=B+16|0,w[ee>>2]=D,w[ee+4>>2]=I|318767104,ee=B+24|0,w[ee>>2]=D,w[ee+4>>2]=I|335544320,ee=B+32|0,w[ee>>2]=D,w[ee+4>>2]=I|352321536,B=B+40|0,w[B>>2]=D,w[B+4>>2]=I|369098752,0}function I0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0;return Le=sn,sn=sn+16|0,fe=Le,Ae=I&-2130706433|134217728,!0&(I&2013265920|0)==268435456?(ee=Nr(D|0,I|0,56)|0,pr()|0,ee=Jl(D,Ae,ee&7)|0,(ee|0)==-1?(w[B>>2]=0,Ae=6,sn=Le,Ae|0):(Mp(D,Ae,fe)|0&&di(23313,22484,282,22499),I=Nr(D|0,I|0,52)|0,pr()|0,I=I&15,Sh(D,Ae)|0?pp(fe,I,ee,2,B):Ed(fe,I,ee,2,B),Ae=0,sn=Le,Ae|0)):(Ae=6,sn=Le,Ae|0)}function _d(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0;ee=sn,sn=sn+16|0,fe=ee,e0(D,I,B,fe),vc(fe,B+4|0),sn=ee}function e0(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0;if(Ve=sn,sn=sn+16|0,Bt=Ve,R0(D,B,Bt),Ae=+cr(+(1-+x[Bt>>3]*.5)),Ae<1e-16){w[ee>>2]=0,w[ee+4>>2]=0,w[ee+8>>2]=0,w[ee+12>>2]=0,sn=Ve;return}if(Bt=w[B>>2]|0,fe=+x[15920+(Bt*24|0)>>3],fe=+Z0(fe-+Z0(+fm(15600+(Bt<<4)|0,D))),Qd(I)|0?Le=+Z0(fe+-.3334731722518321):Le=fe,fe=+Kt(+Ae)/.381966011250105,(I|0)>0){D=0;do fe=fe*2.6457513110645907,D=D+1|0;while((D|0)!=(I|0))}Ae=+Ut(+Le)*fe,x[ee>>3]=Ae,Le=+wt(+Le)*fe,x[ee+8>>3]=Le,sn=Ve}function R0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0;if(Ae=sn,sn=sn+32|0,fe=Ae,cl(D,fe),w[I>>2]=0,x[B>>3]=5,ee=+wc(16400,fe),ee<+x[B>>3]&&(w[I>>2]=0,x[B>>3]=ee),ee=+wc(16424,fe),ee<+x[B>>3]&&(w[I>>2]=1,x[B>>3]=ee),ee=+wc(16448,fe),ee<+x[B>>3]&&(w[I>>2]=2,x[B>>3]=ee),ee=+wc(16472,fe),ee<+x[B>>3]&&(w[I>>2]=3,x[B>>3]=ee),ee=+wc(16496,fe),ee<+x[B>>3]&&(w[I>>2]=4,x[B>>3]=ee),ee=+wc(16520,fe),ee<+x[B>>3]&&(w[I>>2]=5,x[B>>3]=ee),ee=+wc(16544,fe),ee<+x[B>>3]&&(w[I>>2]=6,x[B>>3]=ee),ee=+wc(16568,fe),ee<+x[B>>3]&&(w[I>>2]=7,x[B>>3]=ee),ee=+wc(16592,fe),ee<+x[B>>3]&&(w[I>>2]=8,x[B>>3]=ee),ee=+wc(16616,fe),ee<+x[B>>3]&&(w[I>>2]=9,x[B>>3]=ee),ee=+wc(16640,fe),ee<+x[B>>3]&&(w[I>>2]=10,x[B>>3]=ee),ee=+wc(16664,fe),ee<+x[B>>3]&&(w[I>>2]=11,x[B>>3]=ee),ee=+wc(16688,fe),ee<+x[B>>3]&&(w[I>>2]=12,x[B>>3]=ee),ee=+wc(16712,fe),ee<+x[B>>3]&&(w[I>>2]=13,x[B>>3]=ee),ee=+wc(16736,fe),ee<+x[B>>3]&&(w[I>>2]=14,x[B>>3]=ee),ee=+wc(16760,fe),ee<+x[B>>3]&&(w[I>>2]=15,x[B>>3]=ee),ee=+wc(16784,fe),ee<+x[B>>3]&&(w[I>>2]=16,x[B>>3]=ee),ee=+wc(16808,fe),ee<+x[B>>3]&&(w[I>>2]=17,x[B>>3]=ee),ee=+wc(16832,fe),ee<+x[B>>3]&&(w[I>>2]=18,x[B>>3]=ee),ee=+wc(16856,fe),!(ee<+x[B>>3])){sn=Ae;return}w[I>>2]=19,x[B>>3]=ee,sn=Ae}function O0(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0;if(Ae=+zs(D),Ae<1e-16){I=15600+(I<<4)|0,w[fe>>2]=w[I>>2],w[fe+4>>2]=w[I+4>>2],w[fe+8>>2]=w[I+8>>2],w[fe+12>>2]=w[I+12>>2];return}if(Le=+Br(+ +x[D+8>>3],+ +x[D>>3]),(B|0)>0){D=0;do Ae=Ae/2.6457513110645907,D=D+1|0;while((D|0)!=(B|0))}ee?(Ae=Ae/3,B=(Qd(B)|0)==0,Ae=+Fr(+((B?Ae:Ae/2.6457513110645907)*.381966011250105))):(Ae=+Fr(+(Ae*.381966011250105)),Qd(B)|0&&(Le=+Z0(Le+.3334731722518321))),nd(15600+(I<<4)|0,+Z0(+x[15920+(I*24|0)>>3]-Le),Ae,fe)}function Td(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0;ee=sn,sn=sn+16|0,fe=ee,Ih(D+4|0,fe),O0(fe,w[D>>2]|0,I,0,B),sn=ee}function pp(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0,Va=0,zl=0,Ll=0,Ru=0,xl=0,Th=0,Bh=0,wh=0,Jf=0,Yl=0,Mc=0,ad=0,Tf=0;if(Mc=sn,sn=sn+272|0,Ae=Mc+256|0,io=Mc+240|0,wh=Mc,Jf=Mc+224|0,Yl=Mc+208|0,ao=Mc+176|0,Va=Mc+160|0,zl=Mc+192|0,Ll=Mc+144|0,Ru=Mc+128|0,xl=Mc+112|0,Th=Mc+96|0,Bh=Mc+80|0,w[Ae>>2]=I,w[io>>2]=w[D>>2],w[io+4>>2]=w[D+4>>2],w[io+8>>2]=w[D+8>>2],w[io+12>>2]=w[D+12>>2],B0(io,Ae,wh),w[fe>>2]=0,io=ee+B+((ee|0)==5&1)|0,(io|0)<=(B|0)){sn=Mc;return}Bt=w[Ae>>2]|0,sr=Jf+4|0,Er=ao+4|0,An=B+5|0,ci=16880+(Bt<<2)|0,bi=16960+(Bt<<2)|0,Ei=Ru+8|0,va=xl+8|0,es=Th+8|0,Io=Yl+4|0,Ve=B;e:for(;;){Le=wh+(((Ve|0)%5|0)<<4)|0,w[Yl>>2]=w[Le>>2],w[Yl+4>>2]=w[Le+4>>2],w[Yl+8>>2]=w[Le+8>>2],w[Yl+12>>2]=w[Le+12>>2];do;while((Hp(Yl,Bt,0,1)|0)==2);if((Ve|0)>(B|0)&(Qd(I)|0)!=0){if(w[ao>>2]=w[Yl>>2],w[ao+4>>2]=w[Yl+4>>2],w[ao+8>>2]=w[Yl+8>>2],w[ao+12>>2]=w[Yl+12>>2],Ih(sr,Va),ee=w[ao>>2]|0,Ae=w[17040+(ee*80|0)+(w[Jf>>2]<<2)>>2]|0,w[ao>>2]=w[18640+(ee*80|0)+(Ae*20|0)>>2],Le=w[18640+(ee*80|0)+(Ae*20|0)+16>>2]|0,(Le|0)>0){D=0;do d0(Er),D=D+1|0;while((D|0)<(Le|0))}switch(Le=18640+(ee*80|0)+(Ae*20|0)+4|0,w[zl>>2]=w[Le>>2],w[zl+4>>2]=w[Le+4>>2],w[zl+8>>2]=w[Le+8>>2],Jp(zl,(w[ci>>2]|0)*3|0),hd(Er,zl,Er),kf(Er),Ih(Er,Ll),ad=+(w[bi>>2]|0),x[Ru>>3]=ad*3,x[Ei>>3]=0,Tf=ad*-1.5,x[xl>>3]=Tf,x[va>>3]=ad*2.598076211353316,x[Th>>3]=Tf,x[es>>3]=ad*-2.598076211353316,w[17040+((w[ao>>2]|0)*80|0)+(w[Yl>>2]<<2)>>2]|0){case 1:{D=xl,ee=Ru;break}case 3:{D=Th,ee=xl;break}case 2:{D=Ru,ee=Th;break}default:{D=12;break e}}Vo(Va,Ll,ee,D,Bh),O0(Bh,w[ao>>2]|0,Bt,1,fe+8+(w[fe>>2]<<4)|0),w[fe>>2]=(w[fe>>2]|0)+1}if((Ve|0)<(An|0)&&(Ih(Io,ao),O0(ao,w[Yl>>2]|0,Bt,1,fe+8+(w[fe>>2]<<4)|0),w[fe>>2]=(w[fe>>2]|0)+1),w[Jf>>2]=w[Yl>>2],w[Jf+4>>2]=w[Yl+4>>2],w[Jf+8>>2]=w[Yl+8>>2],w[Jf+12>>2]=w[Yl+12>>2],Ve=Ve+1|0,(Ve|0)>=(io|0)){D=3;break}}if((D|0)==3){sn=Mc;return}else(D|0)==12&&di(22522,22569,571,22579)}function B0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0;Bt=sn,sn=sn+128|0,ee=Bt+64|0,fe=Bt,Ae=ee,Le=20240,Ve=Ae+60|0;do w[Ae>>2]=w[Le>>2],Ae=Ae+4|0,Le=Le+4|0;while((Ae|0)<(Ve|0));Ae=fe,Le=20304,Ve=Ae+60|0;do w[Ae>>2]=w[Le>>2],Ae=Ae+4|0,Le=Le+4|0;while((Ae|0)<(Ve|0));Ve=(Qd(w[I>>2]|0)|0)==0,ee=Ve?ee:fe,fe=D+4|0,Ud(fe),P0(fe),Qd(w[I>>2]|0)|0&&(Lp(fe),w[I>>2]=(w[I>>2]|0)+1),w[B>>2]=w[D>>2],I=B+4|0,hd(fe,ee,I),kf(I),w[B+16>>2]=w[D>>2],I=B+20|0,hd(fe,ee+12|0,I),kf(I),w[B+32>>2]=w[D>>2],I=B+36|0,hd(fe,ee+24|0,I),kf(I),w[B+48>>2]=w[D>>2],I=B+52|0,hd(fe,ee+36|0,I),kf(I),w[B+64>>2]=w[D>>2],B=B+68|0,hd(fe,ee+48|0,B),kf(B),sn=Bt}function Hp(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0;if(Ei=sn,sn=sn+32|0,ci=Ei+12|0,Ve=Ei,bi=D+4|0,An=w[16960+(I<<2)>>2]|0,Er=(ee|0)!=0,An=Er?An*3|0:An,fe=w[bi>>2]|0,sr=D+8|0,Le=w[sr>>2]|0,Er){if(Ae=D+12|0,ee=w[Ae>>2]|0,fe=Le+fe+ee|0,(fe|0)==(An|0))return bi=1,sn=Ei,bi|0;Bt=Ae}else Bt=D+12|0,ee=w[Bt>>2]|0,fe=Le+fe+ee|0;if((fe|0)<=(An|0))return bi=0,sn=Ei,bi|0;do if((ee|0)>0){if(ee=w[D>>2]|0,(Le|0)>0){Ae=18640+(ee*80|0)+60|0,ee=D;break}ee=18640+(ee*80|0)+40|0,B?(Ap(ci,An,0,0),Gh(bi,ci,Ve),hf(Ve),hd(Ve,ci,bi),Ae=ee,ee=D):(Ae=ee,ee=D)}else Ae=18640+((w[D>>2]|0)*80|0)+20|0,ee=D;while(0);if(w[ee>>2]=w[Ae>>2],fe=Ae+16|0,(w[fe>>2]|0)>0){ee=0;do d0(bi),ee=ee+1|0;while((ee|0)<(w[fe>>2]|0))}return D=Ae+4|0,w[ci>>2]=w[D>>2],w[ci+4>>2]=w[D+4>>2],w[ci+8>>2]=w[D+8>>2],I=w[16880+(I<<2)>>2]|0,Jp(ci,Er?I*3|0:I),hd(bi,ci,bi),kf(bi),Er?ee=((w[sr>>2]|0)+(w[bi>>2]|0)+(w[Bt>>2]|0)|0)==(An|0)?1:2:ee=2,bi=ee,sn=Ei,bi|0}function G0(D,I){D=D|0,I=I|0;var B=0;do B=Hp(D,I,0,1)|0;while((B|0)==2);return B|0}function Ed(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0,Va=0,zl=0,Ll=0,Ru=0,xl=0,Th=0,Bh=0,wh=0;if(Th=sn,sn=sn+240|0,Ae=Th+224|0,zl=Th+208|0,Ll=Th,Ru=Th+192|0,xl=Th+176|0,es=Th+160|0,Io=Th+144|0,io=Th+128|0,ao=Th+112|0,Va=Th+96|0,w[Ae>>2]=I,w[zl>>2]=w[D>>2],w[zl+4>>2]=w[D+4>>2],w[zl+8>>2]=w[D+8>>2],w[zl+12>>2]=w[D+12>>2],t0(zl,Ae,Ll),w[fe>>2]=0,va=ee+B+((ee|0)==6&1)|0,(va|0)<=(B|0)){sn=Th;return}Bt=w[Ae>>2]|0,sr=B+6|0,Er=16960+(Bt<<2)|0,An=Io+8|0,ci=io+8|0,bi=ao+8|0,Ei=Ru+4|0,Le=0,Ve=B,ee=-1;e:for(;;){if(Ae=(Ve|0)%6|0,D=Ll+(Ae<<4)|0,w[Ru>>2]=w[D>>2],w[Ru+4>>2]=w[D+4>>2],w[Ru+8>>2]=w[D+8>>2],w[Ru+12>>2]=w[D+12>>2],D=Le,Le=Hp(Ru,Bt,0,1)|0,(Ve|0)>(B|0)&(Qd(I)|0)!=0&&(D|0)!=1&&(w[Ru>>2]|0)!=(ee|0)){switch(Ih(Ll+(((Ae+5|0)%6|0)<<4)+4|0,xl),Ih(Ll+(Ae<<4)+4|0,es),Bh=+(w[Er>>2]|0),x[Io>>3]=Bh*3,x[An>>3]=0,wh=Bh*-1.5,x[io>>3]=wh,x[ci>>3]=Bh*2.598076211353316,x[ao>>3]=wh,x[bi>>3]=Bh*-2.598076211353316,Ae=w[zl>>2]|0,w[17040+(Ae*80|0)+(((ee|0)==(Ae|0)?w[Ru>>2]|0:ee)<<2)>>2]|0){case 1:{D=io,ee=Io;break}case 3:{D=ao,ee=io;break}case 2:{D=Io,ee=ao;break}default:{D=8;break e}}Vo(xl,es,ee,D,Va),!(hc(xl,Va)|0)&&!(hc(es,Va)|0)&&(O0(Va,w[zl>>2]|0,Bt,1,fe+8+(w[fe>>2]<<4)|0),w[fe>>2]=(w[fe>>2]|0)+1)}if((Ve|0)<(sr|0)&&(Ih(Ei,xl),O0(xl,w[Ru>>2]|0,Bt,1,fe+8+(w[fe>>2]<<4)|0),w[fe>>2]=(w[fe>>2]|0)+1),Ve=Ve+1|0,(Ve|0)>=(va|0)){D=3;break}else ee=w[Ru>>2]|0}if((D|0)==3){sn=Th;return}else(D|0)==8&&di(22606,22569,736,22651)}function t0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0;Bt=sn,sn=sn+160|0,ee=Bt+80|0,fe=Bt,Ae=ee,Le=20368,Ve=Ae+72|0;do w[Ae>>2]=w[Le>>2],Ae=Ae+4|0,Le=Le+4|0;while((Ae|0)<(Ve|0));Ae=fe,Le=20448,Ve=Ae+72|0;do w[Ae>>2]=w[Le>>2],Ae=Ae+4|0,Le=Le+4|0;while((Ae|0)<(Ve|0));Ve=(Qd(w[I>>2]|0)|0)==0,ee=Ve?ee:fe,fe=D+4|0,Ud(fe),P0(fe),Qd(w[I>>2]|0)|0&&(Lp(fe),w[I>>2]=(w[I>>2]|0)+1),w[B>>2]=w[D>>2],I=B+4|0,hd(fe,ee,I),kf(I),w[B+16>>2]=w[D>>2],I=B+20|0,hd(fe,ee+12|0,I),kf(I),w[B+32>>2]=w[D>>2],I=B+36|0,hd(fe,ee+24|0,I),kf(I),w[B+48>>2]=w[D>>2],I=B+52|0,hd(fe,ee+36|0,I),kf(I),w[B+64>>2]=w[D>>2],I=B+68|0,hd(fe,ee+48|0,I),kf(I),w[B+80>>2]=w[D>>2],B=B+84|0,hd(fe,ee+60|0,B),kf(B),sn=Bt}function zp(D,I){return D=D|0,I=I|0,I=Nr(D|0,I|0,52)|0,pr()|0,I&15|0}function kp(D,I){return D=D|0,I=I|0,I=Nr(D|0,I|0,45)|0,pr()|0,I&127|0}function mp(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;if(!(!0&(I&-16777216|0)==134217728)||(Le=Nr(D|0,I|0,45)|0,pr()|0,Le=Le&127,Le>>>0>121))return I=0,I|0;B=Nr(D|0,I|0,52)|0,pr()|0,B=B&15;do if(B|0){for(fe=1,ee=0;;){if(Ae=Nr(D|0,I|0,(15-fe|0)*3|0)|0,pr()|0,Ae=Ae&7,(Ae|0)!=0&(ee^1))if((Ae|0)==1&(vf(Le)|0)!=0){Ve=0,ee=13;break}else ee=1;if((Ae|0)==7){Ve=0,ee=13;break}if(fe>>>0>>0)fe=fe+1|0;else{ee=9;break}}if((ee|0)==9){if((B|0)==15)Ve=1;else break;return Ve|0}else if((ee|0)==13)return Ve|0}while(0);for(;;){if(Ve=Nr(D|0,I|0,(14-B|0)*3|0)|0,pr()|0,!((Ve&7|0)==7&!0)){Ve=0,ee=13;break}if(B>>>0<14)B=B+1|0;else{Ve=1,ee=13;break}}return(ee|0)==13?Ve|0:0}function bp(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0;if(Ae=Nr(D|0,I|0,52)|0,pr()|0,Ae=Ae&15,B>>>0>15)return ee=4,ee|0;if((Ae|0)<(B|0))return ee=12,ee|0;if((Ae|0)==(B|0))return w[ee>>2]=D,w[ee+4>>2]=I,ee=0,ee|0;if(fe=vr(B|0,0,52)|0,fe=fe|D,D=pr()|0|I&-15728641,(Ae|0)>(B|0))do I=vr(7,0,(14-B|0)*3|0)|0,B=B+1|0,fe=I|fe,D=pr()|0|D;while((B|0)<(Ae|0));return w[ee>>2]=fe,w[ee+4>>2]=D,ee=0,ee|0}function W0(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0;if(Ae=Nr(D|0,I|0,52)|0,pr()|0,Ae=Ae&15,!((B|0)<16&(Ae|0)<=(B|0)))return ee=4,ee|0;fe=B-Ae|0,B=Nr(D|0,I|0,45)|0,pr()|0;e:do if(!(vf(B&127)|0))B=_a(7,0,fe,((fe|0)<0)<<31>>31)|0,fe=pr()|0;else{t:do if(Ae|0){for(B=1;Le=vr(7,0,(15-B|0)*3|0)|0,!!((Le&D|0)==0&((pr()|0)&I|0)==0);)if(B>>>0>>0)B=B+1|0;else break t;B=_a(7,0,fe,((fe|0)<0)<<31>>31)|0,fe=pr()|0;break e}while(0);B=_a(7,0,fe,((fe|0)<0)<<31>>31)|0,B=ga(B|0,pr()|0,5,0)|0,B=mu(B|0,pr()|0,-5,-1)|0,B=fi(B|0,pr()|0,6,0)|0,B=mu(B|0,pr()|0,1,0)|0,fe=pr()|0}while(0);return Le=ee,w[Le>>2]=B,w[Le+4>>2]=fe,Le=0,Le|0}function Sh(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0;if(fe=Nr(D|0,I|0,45)|0,pr()|0,!(vf(fe&127)|0))return fe=0,fe|0;fe=Nr(D|0,I|0,52)|0,pr()|0,fe=fe&15;e:do if(!fe)B=0;else for(ee=1;;){if(B=Nr(D|0,I|0,(15-ee|0)*3|0)|0,pr()|0,B=B&7,B|0)break e;if(ee>>>0>>0)ee=ee+1|0;else{B=0;break}}while(0);return fe=(B|0)==0&1,fe|0}function E0(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0;if(Le=sn,sn=sn+16|0,Ae=Le,Am(Ae,D,I,B),I=Ae,D=w[I>>2]|0,I=w[I+4>>2]|0,(D|0)==0&(I|0)==0)return sn=Le,0;fe=0,B=0;do Ve=ee+(fe<<3)|0,w[Ve>>2]=D,w[Ve+4>>2]=I,fe=mu(fe|0,B|0,1,0)|0,B=pr()|0,S0(Ae),Ve=Ae,D=w[Ve>>2]|0,I=w[Ve+4>>2]|0;while(!((D|0)==0&(I|0)==0));return sn=Le,0}function o0(D,I,B,ee){return D=D|0,I=I|0,B=B|0,ee=ee|0,(ee|0)<(B|0)?(B=I,ee=D,oi(B|0),ee|0):(B=vr(-1,-1,((ee-B|0)*3|0)+3|0)|0,ee=vr(~B|0,~(pr()|0)|0,(15-ee|0)*3|0)|0,B=~(pr()|0)&I,ee=~ee&D,oi(B|0),ee|0)}function Gp(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0;return fe=Nr(D|0,I|0,52)|0,pr()|0,fe=fe&15,(B|0)<16&(fe|0)<=(B|0)?((fe|0)<(B|0)&&(fe=vr(-1,-1,((B+-1-fe|0)*3|0)+3|0)|0,fe=vr(~fe|0,~(pr()|0)|0,(15-B|0)*3|0)|0,I=~(pr()|0)&I,D=~fe&D),fe=vr(B|0,0,52)|0,B=I&-15728641|(pr()|0),w[ee>>2]=D|fe,w[ee+4>>2]=B,ee=0,ee|0):(ee=4,ee|0)}function N0(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0,Va=0,zl=0,Ll=0,Ru=0,xl=0;if((B|0)==0&(ee|0)==0)return Ru=0,Ru|0;if(fe=D,Ae=w[fe>>2]|0,fe=w[fe+4>>2]|0,!0&(fe&15728640|0)==0){if(!((ee|0)>0|(ee|0)==0&B>>>0>0)||(Ru=I,w[Ru>>2]=Ae,w[Ru+4>>2]=fe,(B|0)==1&(ee|0)==0))return Ru=0,Ru|0;fe=1;do zl=D+(fe<<3)|0,Ll=w[zl+4>>2]|0,Ru=I+(fe<<3)|0,w[Ru>>2]=w[zl>>2],w[Ru+4>>2]=Ll,fe=fe+1|0;while(0<(ee|0)|(ee|0)==0&fe>>>0>>0);return fe=0,fe|0}if(Va=B<<3,Ll=th(Va)|0,!Ll)return Ru=13,Ru|0;if(Ni(Ll|0,D|0,Va|0)|0,zl=Pl(B,8)|0,!zl)return Xu(Ll),Ru=13,Ru|0;e:do if(B|0){t:for(;;){fe=Ll,Io=w[fe>>2]|0,fe=w[fe+4>>2]|0,io=Nr(Io|0,fe|0,52)|0,pr()|0,io=io&15,ao=io+-1|0,es=(B|0)>0;r:do if((io|0)!=0&es){if(bi=((B|0)<0)<<31>>31,Ei=vr(ao|0,0,52)|0,va=pr()|0,ao>>>0>15){if(!((Io|0)==0&(fe|0)==0)){Ru=17;break t}for(Ae=0;;){if(Ae=Ae+1|0,(Ae|0)>=(B|0))break r;if(ee=Ll+(Ae<<3)|0,va=w[ee>>2]|0,ee=w[ee+4>>2]|0,!((va|0)==0&(ee|0)==0)){fe=ee,Ru=17;break t}}}for(Ae=0,D=Io,ee=fe;;){if(!((D|0)==0&(ee|0)==0)){if(!(!0&(ee&117440512|0)==0)){Ru=22;break t}if(Ve=Nr(D|0,ee|0,52)|0,pr()|0,Ve=Ve&15,(Ve|0)<(ao|0)){fe=12,Ru=28;break t}if((Ve|0)!=(ao|0)&&(D=D|Ei,ee=ee&-15728641|va,Ve>>>0>=io>>>0)){Le=ao;do ci=vr(7,0,(14-Le|0)*3|0)|0,Le=Le+1|0,D=ci|D,ee=pr()|0|ee;while(Le>>>0>>0)}if(Le=tf(D|0,ee|0,B|0,bi|0)|0,pr()|0,sr=zl+(Le<<3)|0,Ve=sr,Bt=w[Ve>>2]|0,Ve=w[Ve+4>>2]|0,(Bt|0)==0&(Ve|0)==0)Le=sr;else for(ci=0;;){if((ci|0)>(B|0)){Ru=32;break t}if((Bt|0)==(D|0)&(Ve&-117440513|0)==(ee|0)){Er=Nr(Bt|0,Ve|0,56)|0,pr()|0,Er=Er&7,An=Er+1|0,xl=Nr(Bt|0,Ve|0,45)|0,pr()|0;n:do if(!(vf(xl&127)|0))Ve=7;else{if(Bt=Nr(Bt|0,Ve|0,52)|0,pr()|0,Bt=Bt&15,!Bt){Ve=6;break}for(Ve=1;;){if(xl=vr(7,0,(15-Ve|0)*3|0)|0,!((xl&D|0)==0&((pr()|0)&ee|0)==0)){Ve=7;break n}if(Ve>>>0>>0)Ve=Ve+1|0;else{Ve=6;break}}}while(0);if((Er+2|0)>>>0>Ve>>>0){Ru=42;break t}xl=vr(An|0,0,56)|0,ee=pr()|0|ee&-117440513,An=sr,w[An>>2]=0,w[An+4>>2]=0,D=xl|D}else Le=(Le+1|0)%(B|0)|0;if(sr=zl+(Le<<3)|0,Ve=sr,Bt=w[Ve>>2]|0,Ve=w[Ve+4>>2]|0,(Bt|0)==0&(Ve|0)==0){Le=sr;break}else ci=ci+1|0}xl=Le,w[xl>>2]=D,w[xl+4>>2]=ee}if(Ae=Ae+1|0,(Ae|0)>=(B|0))break r;ee=Ll+(Ae<<3)|0,D=w[ee>>2]|0,ee=w[ee+4>>2]|0}}while(0);if((B+5|0)>>>0<11){Ru=85;break}if(va=Pl((B|0)/6|0,8)|0,!va){Ru=49;break}r:do if(es){ci=0,An=0;do{if(Ve=zl+(ci<<3)|0,ee=Ve,Ae=w[ee>>2]|0,ee=w[ee+4>>2]|0,!((Ae|0)==0&(ee|0)==0)){Bt=Nr(Ae|0,ee|0,56)|0,pr()|0,Bt=Bt&7,D=Bt+1|0,sr=ee&-117440513,xl=Nr(Ae|0,ee|0,45)|0,pr()|0;n:do if(vf(xl&127)|0){if(Er=Nr(Ae|0,ee|0,52)|0,pr()|0,Er=Er&15,Er|0)for(Le=1;;){if(xl=vr(7,0,(15-Le|0)*3|0)|0,!((Ae&xl|0)==0&(sr&(pr()|0)|0)==0))break n;if(Le>>>0>>0)Le=Le+1|0;else break}ee=vr(D|0,0,56)|0,Ae=ee|Ae,ee=pr()|0|sr,D=Ve,w[D>>2]=Ae,w[D+4>>2]=ee,D=Bt+2|0}while(0);(D|0)==7&&(xl=va+(An<<3)|0,w[xl>>2]=Ae,w[xl+4>>2]=ee&-117440513,An=An+1|0)}ci=ci+1|0}while((ci|0)!=(B|0));if(es){if(ci=((B|0)<0)<<31>>31,bi=vr(ao|0,0,52)|0,Ei=pr()|0,ao>>>0>15){if(!((Io|0)==0&(fe|0)==0)){fe=4,Ru=84;break t}for(fe=0;;){if(fe=fe+1|0,(fe|0)>=(B|0)){Ae=0,fe=An;break r}if(xl=Ll+(fe<<3)|0,!((w[xl>>2]|0)==0&(w[xl+4>>2]|0)==0)){fe=4,Ru=84;break t}}}for(Er=0,Ae=0,sr=Io;;){do if(!((sr|0)==0&(fe|0)==0)){if(Ve=Nr(sr|0,fe|0,52)|0,pr()|0,Ve=Ve&15,(Ve|0)<(ao|0)){fe=12,Ru=84;break t}do if((Ve|0)==(ao|0))ee=sr,Ve=fe;else{if(ee=sr|bi,D=fe&-15728641|Ei,Ve>>>0>>0){Ve=D;break}Le=ao;do xl=vr(7,0,(14-Le|0)*3|0)|0,Le=Le+1|0,ee=xl|ee,D=pr()|0|D;while(Le>>>0>>0);Ve=D}while(0);for(Le=tf(ee|0,Ve|0,B|0,ci|0)|0,pr()|0,D=0;;){if((D|0)>(B|0)){Ru=77;break t}if(xl=zl+(Le<<3)|0,Bt=w[xl+4>>2]|0,(Bt&-117440513|0)==(Ve|0)&&(w[xl>>2]|0)==(ee|0)){Ru=79;break}if(Le=(Le+1|0)%(B|0)|0,xl=zl+(Le<<3)|0,(w[xl>>2]|0)==(ee|0)&&(w[xl+4>>2]|0)==(Ve|0))break;D=D+1|0}if((Ru|0)==79&&(Ru=0,!0&(Bt&117440512|0)==100663296))break;xl=I+(Ae<<3)|0,w[xl>>2]=sr,w[xl+4>>2]=fe,Ae=Ae+1|0}while(0);if(fe=Er+1|0,(fe|0)>=(B|0)){fe=An;break r}xl=Ll+(fe<<3)|0,Er=fe,sr=w[xl>>2]|0,fe=w[xl+4>>2]|0}}else Ae=0,fe=An}else Ae=0,fe=0;while(0);if(ea(zl|0,0,Va|0)|0,Ni(Ll|0,va|0,fe<<3|0)|0,Xu(va),fe)I=I+(Ae<<3)|0,B=fe;else break e}if((Ru|0)==17)!0&(fe&117440512|0)==0?(fe=4,Ru=28):Ru=22;else if((Ru|0)==32)di(23313,22674,362,22684);else{if((Ru|0)==42)return Xu(Ll),Xu(zl),xl=10,xl|0;if((Ru|0)==49)return Xu(Ll),Xu(zl),xl=13,xl|0;if((Ru|0)==77)di(23313,22674,462,22684);else{if((Ru|0)==84)return Xu(va),Xu(Ll),Xu(zl),xl=fe,xl|0;if((Ru|0)==85){Ni(I|0,Ll|0,B<<3|0)|0;break}}}if((Ru|0)==22)return Xu(Ll),Xu(zl),xl=5,xl|0;if((Ru|0)==28)return Xu(Ll),Xu(zl),xl=fe,xl|0}while(0);return Xu(Ll),Xu(zl),xl=0,xl|0}function _m(D,I,B,ee,fe,Ae,Le){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0,Ae=Ae|0,Le=Le|0;var Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0;if(va=sn,sn=sn+16|0,Ei=va,!((B|0)>0|(B|0)==0&I>>>0>0))return Ei=0,sn=va,Ei|0;if((Le|0)>=16)return Ei=12,sn=va,Ei|0;ci=0,bi=0,An=0,Ve=0;e:for(;;){if(sr=D+(ci<<3)|0,Bt=w[sr>>2]|0,sr=w[sr+4>>2]|0,Er=Nr(Bt|0,sr|0,52)|0,pr()|0,(Er&15|0)>(Le|0)){Ve=12,Bt=11;break}if(Am(Ei,Bt,sr,Le),Er=Ei,sr=w[Er>>2]|0,Er=w[Er+4>>2]|0,(sr|0)==0&(Er|0)==0)Bt=An;else{Bt=An;do{if(!((Ve|0)<(Ae|0)|(Ve|0)==(Ae|0)&Bt>>>0>>0)){Bt=10;break e}An=ee+(Bt<<3)|0,w[An>>2]=sr,w[An+4>>2]=Er,Bt=mu(Bt|0,Ve|0,1,0)|0,Ve=pr()|0,S0(Ei),An=Ei,sr=w[An>>2]|0,Er=w[An+4>>2]|0}while(!((sr|0)==0&(Er|0)==0))}if(ci=mu(ci|0,bi|0,1,0)|0,bi=pr()|0,(bi|0)<(B|0)|(bi|0)==(B|0)&ci>>>0>>0)An=Bt;else{Ve=0,Bt=11;break}}return(Bt|0)==10?(Ei=14,sn=va,Ei|0):(Bt|0)==11?(sn=va,Ve|0):0}function Wp(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0;ci=sn,sn=sn+16|0,An=ci;e:do if((B|0)>0|(B|0)==0&I>>>0>0){for(sr=0,Le=0,Ae=0,Er=0;;){if(Bt=D+(sr<<3)|0,Ve=w[Bt>>2]|0,Bt=w[Bt+4>>2]|0,!((Ve|0)==0&(Bt|0)==0)&&(Bt=(W0(Ve,Bt,ee,An)|0)==0,Ve=An,Le=mu(w[Ve>>2]|0,w[Ve+4>>2]|0,Le|0,Ae|0)|0,Ae=pr()|0,!Bt)){Ae=12;break}if(sr=mu(sr|0,Er|0,1,0)|0,Er=pr()|0,!((Er|0)<(B|0)|(Er|0)==(B|0)&sr>>>0>>0))break e}return sn=ci,Ae|0}else Le=0,Ae=0;while(0);return w[fe>>2]=Le,w[fe+4>>2]=Ae,fe=0,sn=ci,fe|0}function p0(D,I){return D=D|0,I=I|0,I=Nr(D|0,I|0,52)|0,pr()|0,I&1|0}function Fp(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0;if(fe=Nr(D|0,I|0,52)|0,pr()|0,fe=fe&15,!fe)return fe=0,fe|0;for(ee=1;;){if(B=Nr(D|0,I|0,(15-ee|0)*3|0)|0,pr()|0,B=B&7,B|0){ee=5;break}if(ee>>>0>>0)ee=ee+1|0;else{B=0,ee=5;break}}return(ee|0)==5?B|0:0}function z0(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0;if(Bt=Nr(D|0,I|0,52)|0,pr()|0,Bt=Bt&15,!Bt)return Ve=I,Bt=D,oi(Ve|0),Bt|0;for(Ve=1,B=0;;){Ae=(15-Ve|0)*3|0,ee=vr(7,0,Ae|0)|0,fe=pr()|0,Le=Nr(D|0,I|0,Ae|0)|0,pr()|0,Ae=vr(Jc(Le&7)|0,0,Ae|0)|0,Le=pr()|0,D=Ae|D&~ee,I=Le|I&~fe;e:do if(!B)if((Ae&ee|0)==0&(Le&fe|0)==0)B=0;else if(ee=Nr(D|0,I|0,52)|0,pr()|0,ee=ee&15,!ee)B=1;else{B=1;t:for(;;){switch(Le=Nr(D|0,I|0,(15-B|0)*3|0)|0,pr()|0,Le&7){case 1:break t;case 0:break;default:{B=1;break e}}if(B>>>0>>0)B=B+1|0;else{B=1;break e}}for(B=1;;)if(Le=(15-B|0)*3|0,fe=Nr(D|0,I|0,Le|0)|0,pr()|0,Ae=vr(7,0,Le|0)|0,I=I&~(pr()|0),Le=vr(Jc(fe&7)|0,0,Le|0)|0,D=D&~Ae|Le,I=I|(pr()|0),B>>>0>>0)B=B+1|0;else{B=1;break}}while(0);if(Ve>>>0>>0)Ve=Ve+1|0;else break}return oi(I|0),D|0}function Zp(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0;if(ee=Nr(D|0,I|0,52)|0,pr()|0,ee=ee&15,!ee)return B=I,ee=D,oi(B|0),ee|0;for(B=1;Ae=(15-B|0)*3|0,Le=Nr(D|0,I|0,Ae|0)|0,pr()|0,fe=vr(7,0,Ae|0)|0,I=I&~(pr()|0),Ae=vr(Jc(Le&7)|0,0,Ae|0)|0,D=Ae|D&~fe,I=pr()|0|I,B>>>0>>0;)B=B+1|0;return oi(I|0),D|0}function vp(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0;if(Bt=Nr(D|0,I|0,52)|0,pr()|0,Bt=Bt&15,!Bt)return Ve=I,Bt=D,oi(Ve|0),Bt|0;for(Ve=1,B=0;;){Ae=(15-Ve|0)*3|0,ee=vr(7,0,Ae|0)|0,fe=pr()|0,Le=Nr(D|0,I|0,Ae|0)|0,pr()|0,Ae=vr(td(Le&7)|0,0,Ae|0)|0,Le=pr()|0,D=Ae|D&~ee,I=Le|I&~fe;e:do if(!B)if((Ae&ee|0)==0&(Le&fe|0)==0)B=0;else if(ee=Nr(D|0,I|0,52)|0,pr()|0,ee=ee&15,!ee)B=1;else{B=1;t:for(;;){switch(Le=Nr(D|0,I|0,(15-B|0)*3|0)|0,pr()|0,Le&7){case 1:break t;case 0:break;default:{B=1;break e}}if(B>>>0>>0)B=B+1|0;else{B=1;break e}}for(B=1;;)if(fe=(15-B|0)*3|0,Ae=vr(7,0,fe|0)|0,Le=I&~(pr()|0),I=Nr(D|0,I|0,fe|0)|0,pr()|0,I=vr(td(I&7)|0,0,fe|0)|0,D=D&~Ae|I,I=Le|(pr()|0),B>>>0>>0)B=B+1|0;else{B=1;break}}while(0);if(Ve>>>0>>0)Ve=Ve+1|0;else break}return oi(I|0),D|0}function Xp(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0;if(ee=Nr(D|0,I|0,52)|0,pr()|0,ee=ee&15,!ee)return B=I,ee=D,oi(B|0),ee|0;for(B=1;Le=(15-B|0)*3|0,Ae=vr(7,0,Le|0)|0,fe=I&~(pr()|0),I=Nr(D|0,I|0,Le|0)|0,pr()|0,I=vr(td(I&7)|0,0,Le|0)|0,D=I|D&~Ae,I=pr()|0|fe,B>>>0>>0;)B=B+1|0;return oi(I|0),D|0}function kd(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0;if(Bt=sn,sn=sn+64|0,Ve=Bt+40|0,ee=Bt+24|0,fe=Bt+12|0,Ae=Bt,vr(I|0,0,52)|0,B=pr()|0|134225919,!I)return(w[D+4>>2]|0)>2||(w[D+8>>2]|0)>2||(w[D+12>>2]|0)>2?(Le=0,Ve=0,oi(Le|0),sn=Bt,Ve|0):(vr(Ld(D)|0,0,45)|0,Le=pr()|0|B,Ve=-1,oi(Le|0),sn=Bt,Ve|0);if(w[Ve>>2]=w[D>>2],w[Ve+4>>2]=w[D+4>>2],w[Ve+8>>2]=w[D+8>>2],w[Ve+12>>2]=w[D+12>>2],Le=Ve+4|0,(I|0)>0)for(D=-1;w[ee>>2]=w[Le>>2],w[ee+4>>2]=w[Le+4>>2],w[ee+8>>2]=w[Le+8>>2],I&1?(sp(Le),w[fe>>2]=w[Le>>2],w[fe+4>>2]=w[Le+4>>2],w[fe+8>>2]=w[Le+8>>2],a0(fe)):(y0(Le),w[fe>>2]=w[Le>>2],w[fe+4>>2]=w[Le+4>>2],w[fe+8>>2]=w[Le+8>>2],Lp(fe)),Gh(ee,fe,Ae),kf(Ae),Er=(15-I|0)*3|0,sr=vr(7,0,Er|0)|0,B=B&~(pr()|0),Er=vr(i0(Ae)|0,0,Er|0)|0,D=Er|D&~sr,B=pr()|0|B,(I|0)>1;)I=I+-1|0;else D=-1;e:do if((w[Le>>2]|0)<=2&&(w[Ve+8>>2]|0)<=2&&(w[Ve+12>>2]|0)<=2){if(ee=Ld(Ve)|0,I=vr(ee|0,0,45)|0,I=I|D,D=pr()|0|B&-1040385,Ae=Hh(Ve)|0,!(vf(ee)|0)){if((Ae|0)<=0)break;for(fe=0;;){if(ee=Nr(I|0,D|0,52)|0,pr()|0,ee=ee&15,ee)for(B=1;Er=(15-B|0)*3|0,Ve=Nr(I|0,D|0,Er|0)|0,pr()|0,sr=vr(7,0,Er|0)|0,D=D&~(pr()|0),Er=vr(Jc(Ve&7)|0,0,Er|0)|0,I=I&~sr|Er,D=D|(pr()|0),B>>>0>>0;)B=B+1|0;if(fe=fe+1|0,(fe|0)==(Ae|0))break e}}fe=Nr(I|0,D|0,52)|0,pr()|0,fe=fe&15;t:do if(fe){B=1;r:for(;;){switch(Er=Nr(I|0,D|0,(15-B|0)*3|0)|0,pr()|0,Er&7){case 1:break r;case 0:break;default:break t}if(B>>>0>>0)B=B+1|0;else break t}if(Hf(ee,w[Ve>>2]|0)|0)for(B=1;Ve=(15-B|0)*3|0,sr=vr(7,0,Ve|0)|0,Er=D&~(pr()|0),D=Nr(I|0,D|0,Ve|0)|0,pr()|0,D=vr(td(D&7)|0,0,Ve|0)|0,I=I&~sr|D,D=Er|(pr()|0),B>>>0>>0;)B=B+1|0;else for(B=1;Er=(15-B|0)*3|0,Ve=Nr(I|0,D|0,Er|0)|0,pr()|0,sr=vr(7,0,Er|0)|0,D=D&~(pr()|0),Er=vr(Jc(Ve&7)|0,0,Er|0)|0,I=I&~sr|Er,D=D|(pr()|0),B>>>0>>0;)B=B+1|0}while(0);if((Ae|0)>0){B=0;do I=z0(I,D)|0,D=pr()|0,B=B+1|0;while((B|0)!=(Ae|0))}}else I=0,D=0;while(0);return sr=D,Er=I,oi(sr|0),sn=Bt,Er|0}function Qd(D){return D=D|0,(D|0)%2|0|0}function r0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0;return fe=sn,sn=sn+16|0,ee=fe,I>>>0>15?(ee=4,sn=fe,ee|0):(w[D+4>>2]&2146435072|0)==2146435072||(w[D+8+4>>2]&2146435072|0)==2146435072?(ee=3,sn=fe,ee|0):(_d(D,I,ee),I=kd(ee,I)|0,ee=pr()|0,w[B>>2]=I,w[B+4>>2]=ee,(I|0)==0&(ee|0)==0&&di(23313,22674,786,22697),ee=0,sn=fe,ee|0)}function Up(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0;if(fe=B+4|0,Ae=Nr(D|0,I|0,52)|0,pr()|0,Ae=Ae&15,Le=Nr(D|0,I|0,45)|0,pr()|0,ee=(Ae|0)==0,vf(Le&127)|0){if(ee)return Le=1,Le|0;ee=1}else{if(ee)return Le=0,Le|0;!(w[fe>>2]|0)&&!(w[B+8>>2]|0)?ee=(w[B+12>>2]|0)!=0&1:ee=1}for(B=1;B&1?a0(fe):Lp(fe),Le=Nr(D|0,I|0,(15-B|0)*3|0)|0,pr()|0,Wd(fe,Le&7),B>>>0>>0;)B=B+1|0;return ee|0}function Mp(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0;if(Er=sn,sn=sn+16|0,Bt=Er,sr=Nr(D|0,I|0,45)|0,pr()|0,sr=sr&127,sr>>>0>121)return w[B>>2]=0,w[B+4>>2]=0,w[B+8>>2]=0,w[B+12>>2]=0,sr=5,sn=Er,sr|0;e:do if(vf(sr)|0&&(Ae=Nr(D|0,I|0,52)|0,pr()|0,Ae=Ae&15,(Ae|0)!=0)){ee=1;t:for(;;){switch(Ve=Nr(D|0,I|0,(15-ee|0)*3|0)|0,pr()|0,Ve&7){case 5:break t;case 0:break;default:{ee=I;break e}}if(ee>>>0>>0)ee=ee+1|0;else{ee=I;break e}}for(fe=1,ee=I;I=(15-fe|0)*3|0,Le=vr(7,0,I|0)|0,Ve=ee&~(pr()|0),ee=Nr(D|0,ee|0,I|0)|0,pr()|0,ee=vr(td(ee&7)|0,0,I|0)|0,D=D&~Le|ee,ee=Ve|(pr()|0),fe>>>0>>0;)fe=fe+1|0}else ee=I;while(0);if(Ve=7696+(sr*28|0)|0,w[B>>2]=w[Ve>>2],w[B+4>>2]=w[Ve+4>>2],w[B+8>>2]=w[Ve+8>>2],w[B+12>>2]=w[Ve+12>>2],!(Up(D,ee,B)|0))return sr=0,sn=Er,sr|0;if(Le=B+4|0,w[Bt>>2]=w[Le>>2],w[Bt+4>>2]=w[Le+4>>2],w[Bt+8>>2]=w[Le+8>>2],Ae=Nr(D|0,ee|0,52)|0,pr()|0,Ve=Ae&15,Ae&1?(Lp(Le),Ae=Ve+1|0):Ae=Ve,!(vf(sr)|0))ee=0;else{e:do if(!Ve)ee=0;else for(I=1;;){if(fe=Nr(D|0,ee|0,(15-I|0)*3|0)|0,pr()|0,fe=fe&7,fe|0){ee=fe;break e}if(I>>>0>>0)I=I+1|0;else{ee=0;break}}while(0);ee=(ee|0)==4&1}if(!(Hp(B,Ae,ee,0)|0))(Ae|0)!=(Ve|0)&&(w[Le>>2]=w[Bt>>2],w[Le+4>>2]=w[Bt+4>>2],w[Le+8>>2]=w[Bt+8>>2]);else{if(vf(sr)|0)do;while(Hp(B,Ae,0,0)|0);(Ae|0)!=(Ve|0)&&y0(Le)}return sr=0,sn=Er,sr|0}function s0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0;return Ae=sn,sn=sn+16|0,ee=Ae,fe=Mp(D,I,ee)|0,fe|0?(sn=Ae,fe|0):(fe=Nr(D|0,I|0,52)|0,pr()|0,Td(ee,fe&15,B),fe=0,sn=Ae,fe|0)}function m0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0;if(Le=sn,sn=sn+16|0,Ae=Le,ee=Mp(D,I,Ae)|0,ee|0)return Ae=ee,sn=Le,Ae|0;ee=Nr(D|0,I|0,45)|0,pr()|0,ee=(vf(ee&127)|0)==0,fe=Nr(D|0,I|0,52)|0,pr()|0,fe=fe&15;e:do if(!ee){if(fe|0)for(ee=1;;){if(Ve=vr(7,0,(15-ee|0)*3|0)|0,!((Ve&D|0)==0&((pr()|0)&I|0)==0))break e;if(ee>>>0>>0)ee=ee+1|0;else break}return pp(Ae,fe,0,5,B),Ve=0,sn=Le,Ve|0}while(0);return Ed(Ae,fe,0,6,B),Ve=0,sn=Le,Ve|0}function cm(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0;if(fe=Nr(D|0,I|0,45)|0,pr()|0,!(vf(fe&127)|0))return fe=2,w[B>>2]=fe,0;if(fe=Nr(D|0,I|0,52)|0,pr()|0,fe=fe&15,!fe)return fe=5,w[B>>2]=fe,0;for(ee=1;;){if(Ae=vr(7,0,(15-ee|0)*3|0)|0,!((Ae&D|0)==0&((pr()|0)&I|0)==0)){ee=2,D=6;break}if(ee>>>0>>0)ee=ee+1|0;else{ee=5,D=6;break}}return(D|0)==6&&(w[B>>2]=ee),0}function A0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0;An=sn,sn=sn+128|0,sr=An+112|0,Ae=An+96|0,Er=An,fe=Nr(D|0,I|0,52)|0,pr()|0,Ve=fe&15,w[sr>>2]=Ve,Le=Nr(D|0,I|0,45)|0,pr()|0,Le=Le&127;e:do if(vf(Le)|0){if(Ve|0)for(ee=1;;){if(Bt=vr(7,0,(15-ee|0)*3|0)|0,!((Bt&D|0)==0&((pr()|0)&I|0)==0)){fe=0;break e}if(ee>>>0>>0)ee=ee+1|0;else break}if(fe&1)fe=1;else return Bt=vr(Ve+1|0,0,52)|0,Er=pr()|0|I&-15728641,sr=vr(7,0,(14-Ve|0)*3|0)|0,Er=A0((Bt|D)&~sr,Er&~(pr()|0),B)|0,sn=An,Er|0}else fe=0;while(0);if(ee=Mp(D,I,Ae)|0,!ee){fe?(B0(Ae,sr,Er),Bt=5):(t0(Ae,sr,Er),Bt=6);e:do if(vf(Le)|0)if(!Ve)D=5;else for(ee=1;;){if(Le=vr(7,0,(15-ee|0)*3|0)|0,!((Le&D|0)==0&((pr()|0)&I|0)==0)){D=2;break e}if(ee>>>0>>0)ee=ee+1|0;else{D=5;break}}else D=2;while(0);ea(B|0,-1,D<<2|0)|0;e:do if(fe)for(Ae=0;;){if(Le=Er+(Ae<<4)|0,G0(Le,w[sr>>2]|0)|0,Le=w[Le>>2]|0,Ve=w[B>>2]|0,(Ve|0)==-1|(Ve|0)==(Le|0))ee=B;else{fe=0;do{if(fe=fe+1|0,fe>>>0>=D>>>0){ee=1;break e}ee=B+(fe<<2)|0,Ve=w[ee>>2]|0}while(!((Ve|0)==-1|(Ve|0)==(Le|0)))}if(w[ee>>2]=Le,Ae=Ae+1|0,Ae>>>0>=Bt>>>0){ee=0;break}}else for(Ae=0;;){if(Le=Er+(Ae<<4)|0,Hp(Le,w[sr>>2]|0,0,1)|0,Le=w[Le>>2]|0,Ve=w[B>>2]|0,(Ve|0)==-1|(Ve|0)==(Le|0))ee=B;else{fe=0;do{if(fe=fe+1|0,fe>>>0>=D>>>0){ee=1;break e}ee=B+(fe<<2)|0,Ve=w[ee>>2]|0}while(!((Ve|0)==-1|(Ve|0)==(Le|0)))}if(w[ee>>2]=Le,Ae=Ae+1|0,Ae>>>0>=Bt>>>0){ee=0;break}}while(0)}return Er=ee,sn=An,Er|0}function jd(){return 12}function Vd(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0;if(D>>>0>15)return Ve=4,Ve|0;if(vr(D|0,0,52)|0,Ve=pr()|0|134225919,!D){B=0,ee=0;do vf(ee)|0&&(vr(ee|0,0,45)|0,Le=Ve|(pr()|0),D=I+(B<<3)|0,w[D>>2]=-1,w[D+4>>2]=Le,B=B+1|0),ee=ee+1|0;while((ee|0)!=122);return B=0,B|0}B=0,Le=0;do{if(vf(Le)|0){for(vr(Le|0,0,45)|0,ee=1,fe=-1,Ae=Ve|(pr()|0);Bt=vr(7,0,(15-ee|0)*3|0)|0,fe=fe&~Bt,Ae=Ae&~(pr()|0),(ee|0)!=(D|0);)ee=ee+1|0;Bt=I+(B<<3)|0,w[Bt>>2]=fe,w[Bt+4>>2]=Ae,B=B+1|0}Le=Le+1|0}while((Le|0)!=122);return B=0,B|0}function Xd(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0;if(io=sn,sn=sn+16|0,es=io,Io=Nr(D|0,I|0,52)|0,pr()|0,Io=Io&15,B>>>0>15)return Io=4,sn=io,Io|0;if((Io|0)<(B|0))return Io=12,sn=io,Io|0;if((Io|0)!=(B|0))if(Ae=vr(B|0,0,52)|0,Ae=Ae|D,Ve=pr()|0|I&-15728641,(Io|0)>(B|0)){Bt=B;do va=vr(7,0,(14-Bt|0)*3|0)|0,Bt=Bt+1|0,Ae=va|Ae,Ve=pr()|0|Ve;while((Bt|0)<(Io|0));va=Ae}else va=Ae;else va=D,Ve=I;Ei=Nr(va|0,Ve|0,45)|0,pr()|0;e:do if(vf(Ei&127)|0){if(Bt=Nr(va|0,Ve|0,52)|0,pr()|0,Bt=Bt&15,Bt|0)for(Ae=1;;){if(Ei=vr(7,0,(15-Ae|0)*3|0)|0,!((Ei&va|0)==0&((pr()|0)&Ve|0)==0)){sr=33;break e}if(Ae>>>0>>0)Ae=Ae+1|0;else break}if(Ei=ee,w[Ei>>2]=0,w[Ei+4>>2]=0,(Io|0)>(B|0)){for(Ei=I&-15728641,bi=Io;;){if(ci=bi,bi=bi+-1|0,bi>>>0>15|(Io|0)<(bi|0)){sr=19;break}if((Io|0)!=(bi|0))if(Ae=vr(bi|0,0,52)|0,Ae=Ae|D,Bt=pr()|0|Ei,(Io|0)<(ci|0))An=Ae;else{sr=bi;do An=vr(7,0,(14-sr|0)*3|0)|0,sr=sr+1|0,Ae=An|Ae,Bt=pr()|0|Bt;while((sr|0)<(Io|0));An=Ae}else An=D,Bt=I;if(Er=Nr(An|0,Bt|0,45)|0,pr()|0,!(vf(Er&127)|0))Ae=0;else{Er=Nr(An|0,Bt|0,52)|0,pr()|0,Er=Er&15;t:do if(!Er)Ae=0;else for(sr=1;;){if(Ae=Nr(An|0,Bt|0,(15-sr|0)*3|0)|0,pr()|0,Ae=Ae&7,Ae|0)break t;if(sr>>>0>>0)sr=sr+1|0;else{Ae=0;break}}while(0);Ae=(Ae|0)==0&1}if(Bt=Nr(D|0,I|0,(15-ci|0)*3|0)|0,pr()|0,Bt=Bt&7,(Bt|0)==7){fe=5,sr=42;break}if(Ae=(Ae|0)!=0,(Bt|0)==1&Ae){fe=5,sr=42;break}if(An=Bt+(((Bt|0)!=0&Ae)<<31>>31)|0,An|0&&(sr=Io-ci|0,sr=_a(7,0,sr,((sr|0)<0)<<31>>31)|0,Er=pr()|0,Ae?(Ae=ga(sr|0,Er|0,5,0)|0,Ae=mu(Ae|0,pr()|0,-5,-1)|0,Ae=fi(Ae|0,pr()|0,6,0)|0,Ae=mu(Ae|0,pr()|0,1,0)|0,Bt=pr()|0):(Ae=sr,Bt=Er),ci=An+-1|0,ci=ga(sr|0,Er|0,ci|0,((ci|0)<0)<<31>>31|0)|0,ci=mu(Ae|0,Bt|0,ci|0,pr()|0)|0,An=pr()|0,Er=ee,Er=mu(ci|0,An|0,w[Er>>2]|0,w[Er+4>>2]|0)|0,An=pr()|0,ci=ee,w[ci>>2]=Er,w[ci+4>>2]=An),(bi|0)<=(B|0)){sr=37;break}}if((sr|0)==19)di(23313,22674,1099,22710);else if((sr|0)==37){Le=ee,fe=w[Le+4>>2]|0,Le=w[Le>>2]|0;break}else if((sr|0)==42)return sn=io,fe|0}else fe=0,Le=0}else sr=33;while(0);e:do if((sr|0)==33)if(Ei=ee,w[Ei>>2]=0,w[Ei+4>>2]=0,(Io|0)>(B|0)){for(Ae=Io;;){if(fe=Nr(D|0,I|0,(15-Ae|0)*3|0)|0,pr()|0,fe=fe&7,(fe|0)==7){fe=5;break}if(Le=Io-Ae|0,Le=_a(7,0,Le,((Le|0)<0)<<31>>31)|0,fe=ga(Le|0,pr()|0,fe|0,0)|0,Le=pr()|0,Ei=ee,Le=mu(w[Ei>>2]|0,w[Ei+4>>2]|0,fe|0,Le|0)|0,fe=pr()|0,Ei=ee,w[Ei>>2]=Le,w[Ei+4>>2]=fe,Ae=Ae+-1|0,(Ae|0)<=(B|0))break e}return sn=io,fe|0}else fe=0,Le=0;while(0);return W0(va,Ve,Io,es)|0&&di(23313,22674,1063,22725),Io=es,es=w[Io+4>>2]|0,((fe|0)>-1|(fe|0)==-1&Le>>>0>4294967295)&((es|0)>(fe|0)|((es|0)==(fe|0)?(w[Io>>2]|0)>>>0>Le>>>0:0))?(Io=0,sn=io,Io|0):(di(23313,22674,1139,22710),0)}function Yp(D,I,B,ee,fe,Ae){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0,Ae=Ae|0;var Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0;if(An=sn,sn=sn+16|0,Le=An,fe>>>0>15)return Ae=4,sn=An,Ae|0;if(Ve=Nr(B|0,ee|0,52)|0,pr()|0,Ve=Ve&15,(Ve|0)>(fe|0))return Ae=12,sn=An,Ae|0;if(W0(B,ee,fe,Le)|0&&di(23313,22674,1063,22725),Er=Le,sr=w[Er+4>>2]|0,!(((I|0)>-1|(I|0)==-1&D>>>0>4294967295)&((sr|0)>(I|0)|((sr|0)==(I|0)?(w[Er>>2]|0)>>>0>D>>>0:0))))return Ae=2,sn=An,Ae|0;Er=fe-Ve|0,fe=vr(fe|0,0,52)|0,Bt=pr()|0|ee&-15728641,sr=Ae,w[sr>>2]=fe|B,w[sr+4>>2]=Bt,sr=Nr(B|0,ee|0,45)|0,pr()|0;e:do if(vf(sr&127)|0){if(Ve|0)for(Le=1;;){if(sr=vr(7,0,(15-Le|0)*3|0)|0,!((sr&B|0)==0&((pr()|0)&ee|0)==0))break e;if(Le>>>0>>0)Le=Le+1|0;else break}if((Er|0)<1)return Ae=0,sn=An,Ae|0;for(sr=Ve^15,ee=-1,Bt=1,Le=1;;){Ve=Er-Bt|0,Ve=_a(7,0,Ve,((Ve|0)<0)<<31>>31)|0,B=pr()|0;do if(Le)if(Le=ga(Ve|0,B|0,5,0)|0,Le=mu(Le|0,pr()|0,-5,-1)|0,Le=fi(Le|0,pr()|0,6,0)|0,fe=pr()|0,(I|0)>(fe|0)|(I|0)==(fe|0)&D>>>0>Le>>>0){I=mu(D|0,I|0,-1,-1)|0,I=pf(I|0,pr()|0,Le|0,fe|0)|0,Le=pr()|0,ci=Ae,Ei=w[ci>>2]|0,ci=w[ci+4>>2]|0,va=(sr+ee|0)*3|0,bi=vr(7,0,va|0)|0,ci=ci&~(pr()|0),ee=fi(I|0,Le|0,Ve|0,B|0)|0,D=pr()|0,fe=mu(ee|0,D|0,2,0)|0,va=vr(fe|0,pr()|0,va|0)|0,ci=pr()|0|ci,fe=Ae,w[fe>>2]=va|Ei&~bi,w[fe+4>>2]=ci,D=ga(ee|0,D|0,Ve|0,B|0)|0,D=pf(I|0,Le|0,D|0,pr()|0)|0,Le=0,I=pr()|0;break}else{va=Ae,bi=w[va>>2]|0,va=w[va+4>>2]|0,Ei=vr(7,0,(sr+ee|0)*3|0)|0,va=va&~(pr()|0),Le=Ae,w[Le>>2]=bi&~Ei,w[Le+4>>2]=va,Le=1;break}else bi=Ae,fe=w[bi>>2]|0,bi=w[bi+4>>2]|0,ee=(sr+ee|0)*3|0,ci=vr(7,0,ee|0)|0,bi=bi&~(pr()|0),va=fi(D|0,I|0,Ve|0,B|0)|0,Le=pr()|0,ee=vr(va|0,Le|0,ee|0)|0,bi=pr()|0|bi,Ei=Ae,w[Ei>>2]=ee|fe&~ci,w[Ei+4>>2]=bi,Le=ga(va|0,Le|0,Ve|0,B|0)|0,D=pf(D|0,I|0,Le|0,pr()|0)|0,Le=0,I=pr()|0;while(0);if((Er|0)>(Bt|0))ee=~Bt,Bt=Bt+1|0;else{I=0;break}}return sn=An,I|0}while(0);if((Er|0)<1)return va=0,sn=An,va|0;for(fe=Ve^15,Le=1;;)if(Ei=Er-Le|0,Ei=_a(7,0,Ei,((Ei|0)<0)<<31>>31)|0,va=pr()|0,Bt=Ae,B=w[Bt>>2]|0,Bt=w[Bt+4>>2]|0,Ve=(fe-Le|0)*3|0,ee=vr(7,0,Ve|0)|0,Bt=Bt&~(pr()|0),ci=fi(D|0,I|0,Ei|0,va|0)|0,bi=pr()|0,Ve=vr(ci|0,bi|0,Ve|0)|0,Bt=pr()|0|Bt,sr=Ae,w[sr>>2]=Ve|B&~ee,w[sr+4>>2]=Bt,va=ga(ci|0,bi|0,Ei|0,va|0)|0,D=pf(D|0,I|0,va|0,pr()|0)|0,I=pr()|0,(Er|0)<=(Le|0)){I=0;break}else Le=Le+1|0;return sn=An,I|0}function Am(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0;fe=Nr(I|0,B|0,52)|0,pr()|0,fe=fe&15,(I|0)==0&(B|0)==0|((ee|0)>15|(fe|0)>(ee|0))?(ee=-1,fe=-1,I=0,B=0):(Ae=o0(I,B,fe+1|0,ee)|0,B=(pr()|0)&-15728641,I=vr(ee|0,0,52)|0,I=Ae|I,B=B|(pr()|0),Ae=(Sh(I,B)|0)==0,ee=Ae?-1:ee),Ae=D,w[Ae>>2]=I,w[Ae+4>>2]=B,w[D+8>>2]=fe,w[D+12>>2]=ee}function S0(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0;if(B=D,I=w[B>>2]|0,B=w[B+4>>2]|0,!((I|0)==0&(B|0)==0)&&(ee=Nr(I|0,B|0,52)|0,pr()|0,ee=ee&15,Ve=vr(1,0,(ee^15)*3|0)|0,I=mu(Ve|0,pr()|0,I|0,B|0)|0,B=pr()|0,Ve=D,w[Ve>>2]=I,w[Ve+4>>2]=B,Ve=D+8|0,Le=w[Ve>>2]|0,!((ee|0)<(Le|0)))){for(Bt=D+12|0,Ae=ee;;){if((Ae|0)==(Le|0)){ee=5;break}if(sr=(Ae|0)==(w[Bt>>2]|0),fe=(15-Ae|0)*3|0,ee=Nr(I|0,B|0,fe|0)|0,pr()|0,ee=ee&7,sr&((ee|0)==1&!0)){ee=7;break}if(!((ee|0)==7&!0)){ee=10;break}if(sr=vr(1,0,fe|0)|0,I=mu(I|0,B|0,sr|0,pr()|0)|0,B=pr()|0,sr=D,w[sr>>2]=I,w[sr+4>>2]=B,(Ae|0)>(Le|0))Ae=Ae+-1|0;else{ee=10;break}}if((ee|0)==5){sr=D,w[sr>>2]=0,w[sr+4>>2]=0,w[Ve>>2]=-1,w[Bt>>2]=-1;return}else if((ee|0)==7){Le=vr(1,0,fe|0)|0,Le=mu(I|0,B|0,Le|0,pr()|0)|0,Ve=pr()|0,sr=D,w[sr>>2]=Le,w[sr+4>>2]=Ve,w[Bt>>2]=Ae+-1;return}else if((ee|0)==10)return}}function Z0(D){D=+D;var I=0;return I=D<0?D+6.283185307179586:D,+(D>=6.283185307179586?I+-6.283185307179586:I)}function Kp(D,I){return D=D|0,I=I|0,+Se(+(+x[D>>3]-+x[I>>3]))<17453292519943298e-27?(I=+Se(+(+x[D+8>>3]-+x[I+8>>3]))<17453292519943298e-27,I|0):(I=0,I|0)}function U0(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0;return fe=+x[I>>3],ee=+x[D>>3],Ae=+wt(+((fe-ee)*.5)),B=+wt(+((+x[I+8>>3]-+x[D+8>>3])*.5)),B=Ae*Ae+B*(+Ut(+fe)*+Ut(+ee)*B),+(+Br(+ +Pe(+B),+ +Pe(+(1-B)))*2)}function Bp(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0;return fe=+x[I>>3],ee=+x[D>>3],Ae=+wt(+((fe-ee)*.5)),B=+wt(+((+x[I+8>>3]-+x[D+8>>3])*.5)),B=Ae*Ae+B*(+Ut(+fe)*+Ut(+ee)*B),+(+Br(+ +Pe(+B),+ +Pe(+(1-B)))*2*6371.007180918475)}function bf(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0;return fe=+x[I>>3],ee=+x[D>>3],Ae=+wt(+((fe-ee)*.5)),B=+wt(+((+x[I+8>>3]-+x[D+8>>3])*.5)),B=Ae*Ae+B*(+Ut(+fe)*+Ut(+ee)*B),+(+Br(+ +Pe(+B),+ +Pe(+(1-B)))*2*6371.007180918475*1e3)}function fm(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0;return Ae=+x[I>>3],ee=+Ut(+Ae),fe=+x[I+8>>3]-+x[D+8>>3],Le=ee*+wt(+fe),B=+x[D>>3],+ +Br(+Le,+(+wt(+Ae)*+Ut(+B)-+Ut(+fe)*(ee*+wt(+B))))}function nd(D,I,B,ee){D=D|0,I=+I,B=+B,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0;if(B<1e-16){w[ee>>2]=w[D>>2],w[ee+4>>2]=w[D+4>>2],w[ee+8>>2]=w[D+8>>2],w[ee+12>>2]=w[D+12>>2];return}Ae=I<0?I+6.283185307179586:I,Ae=I>=6.283185307179586?Ae+-6.283185307179586:Ae;do if(Ae<1e-16)I=+x[D>>3]+B,x[ee>>3]=I,fe=ee;else{if(fe=+Se(+(Ae+-3.141592653589793))<1e-16,I=+x[D>>3],fe){I=I-B,x[ee>>3]=I,fe=ee;break}if(Le=+Ut(+B),B=+wt(+B),I=Le*+wt(+I)+ +Ut(+Ae)*(B*+Ut(+I)),I=I>1?1:I,I=+hr(+(I<-1?-1:I)),x[ee>>3]=I,+Se(+(I+-1.5707963267948966))<1e-16){x[ee>>3]=1.5707963267948966,x[ee+8>>3]=0;return}if(+Se(+(I+1.5707963267948966))<1e-16){x[ee>>3]=-1.5707963267948966,x[ee+8>>3]=0;return}if(Ve=+Ut(+I),Ae=B*+wt(+Ae)/Ve,B=+x[D>>3],I=(Le-+wt(+I)*+wt(+B))/+Ut(+B)/Ve,Le=Ae>1?1:Ae,I=I>1?1:I,I=+x[D+8>>3]+ +Br(+(Le<-1?-1:Le),+(I<-1?-1:I)),I>3.141592653589793)do I=I+-6.283185307179586;while(I>3.141592653589793);if(I<-3.141592653589793)do I=I+6.283185307179586;while(I<-3.141592653589793);x[ee+8>>3]=I;return}while(0);if(+Se(+(I+-1.5707963267948966))<1e-16){x[fe>>3]=1.5707963267948966,x[ee+8>>3]=0;return}if(+Se(+(I+1.5707963267948966))<1e-16){x[fe>>3]=-1.5707963267948966,x[ee+8>>3]=0;return}if(I=+x[D+8>>3],I>3.141592653589793)do I=I+-6.283185307179586;while(I>3.141592653589793);if(I<-3.141592653589793)do I=I+6.283185307179586;while(I<-3.141592653589793);x[ee+8>>3]=I}function j0(D,I){return D=D|0,I=I|0,D>>>0>15?(I=4,I|0):(x[I>>3]=+x[20528+(D<<3)>>3],I=0,I|0)}function xp(D,I){return D=D|0,I=I|0,D>>>0>15?(I=4,I|0):(x[I>>3]=+x[20656+(D<<3)>>3],I=0,I|0)}function rm(D,I){return D=D|0,I=I|0,D>>>0>15?(I=4,I|0):(x[I>>3]=+x[20784+(D<<3)>>3],I=0,I|0)}function X0(D,I){return D=D|0,I=I|0,D>>>0>15?(I=4,I|0):(x[I>>3]=+x[20912+(D<<3)>>3],I=0,I|0)}function Y0(D,I){D=D|0,I=I|0;var B=0;return D>>>0>15?(I=4,I|0):(B=_a(7,0,D,((D|0)<0)<<31>>31)|0,B=ga(B|0,pr()|0,120,0)|0,D=pr()|0,w[I>>2]=B|2,w[I+4>>2]=D,I=0,I|0)}function Nd(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0;return ci=+x[I>>3],Er=+x[D>>3],Bt=+wt(+((ci-Er)*.5)),Ae=+x[I+8>>3],sr=+x[D+8>>3],Le=+wt(+((Ae-sr)*.5)),Ve=+Ut(+Er),An=+Ut(+ci),Le=Bt*Bt+Le*(An*Ve*Le),Le=+Br(+ +Pe(+Le),+ +Pe(+(1-Le)))*2,Bt=+x[B>>3],ci=+wt(+((Bt-ci)*.5)),ee=+x[B+8>>3],Ae=+wt(+((ee-Ae)*.5)),fe=+Ut(+Bt),Ae=ci*ci+Ae*(An*fe*Ae),Ae=+Br(+ +Pe(+Ae),+ +Pe(+(1-Ae)))*2,Bt=+wt(+((Er-Bt)*.5)),ee=+wt(+((sr-ee)*.5)),ee=Bt*Bt+ee*(Ve*fe*ee),ee=+Br(+ +Pe(+ee),+ +Pe(+(1-ee)))*2,fe=(Le+Ae+ee)*.5,+(+Fr(+ +Pe(+(+Kt(+(fe*.5))*+Kt(+((fe-Le)*.5))*+Kt(+((fe-Ae)*.5))*+Kt(+((fe-ee)*.5)))))*4)}function u0(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0;if(Ve=sn,sn=sn+192|0,Ae=Ve+168|0,Le=Ve,fe=s0(D,I,Ae)|0,fe|0)return B=fe,sn=Ve,B|0;if(m0(D,I,Le)|0&&di(23313,22742,386,22751),I=w[Le>>2]|0,(I|0)>0){if(ee=+Nd(Le+8|0,Le+8+(((I|0)!=1&1)<<4)|0,Ae)+0,(I|0)!=1){D=1;do fe=D,D=D+1|0,ee=ee+ +Nd(Le+8+(fe<<4)|0,Le+8+(((D|0)%(I|0)|0)<<4)|0,Ae);while((D|0)<(I|0))}}else ee=0;return x[B>>3]=ee,B=0,sn=Ve,B|0}function b0(D,I,B){return D=D|0,I=I|0,B=B|0,D=u0(D,I,B)|0,D|0||(x[B>>3]=+x[B>>3]*6371.007180918475*6371.007180918475),D|0}function Jd(D,I,B){return D=D|0,I=I|0,B=B|0,D=u0(D,I,B)|0,D|0||(x[B>>3]=+x[B>>3]*6371.007180918475*6371.007180918475*1e3*1e3),D|0}function Cr(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0;if(Ve=sn,sn=sn+176|0,Le=Ve,D=I0(D,I,Le)|0,D|0)return Le=D,sn=Ve,Le|0;if(x[B>>3]=0,D=w[Le>>2]|0,(D|0)<=1)return Le=0,sn=Ve,Le|0;I=D+-1|0,D=0,ee=+x[Le+8>>3],fe=+x[Le+16>>3],Ae=0;do D=D+1|0,sr=ee,ee=+x[Le+8+(D<<4)>>3],Er=+wt(+((ee-sr)*.5)),Bt=fe,fe=+x[Le+8+(D<<4)+8>>3],Bt=+wt(+((fe-Bt)*.5)),Bt=Er*Er+Bt*(+Ut(+ee)*+Ut(+sr)*Bt),Ae=Ae+ +Br(+ +Pe(+Bt),+ +Pe(+(1-Bt)))*2;while((D|0)<(I|0));return x[B>>3]=Ae,Le=0,sn=Ve,Le|0}function Dn(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0;if(Ve=sn,sn=sn+176|0,Le=Ve,D=I0(D,I,Le)|0,D|0)return Le=D,Ae=+x[B>>3],Ae=Ae*6371.007180918475,x[B>>3]=Ae,sn=Ve,Le|0;if(x[B>>3]=0,D=w[Le>>2]|0,(D|0)<=1)return Le=0,Ae=0,Ae=Ae*6371.007180918475,x[B>>3]=Ae,sn=Ve,Le|0;I=D+-1|0,D=0,ee=+x[Le+8>>3],fe=+x[Le+16>>3],Ae=0;do D=D+1|0,sr=ee,ee=+x[Le+8+(D<<4)>>3],Er=+wt(+((ee-sr)*.5)),Bt=fe,fe=+x[Le+8+(D<<4)+8>>3],Bt=+wt(+((fe-Bt)*.5)),Bt=Er*Er+Bt*(+Ut(+sr)*+Ut(+ee)*Bt),Ae=Ae+ +Br(+ +Pe(+Bt),+ +Pe(+(1-Bt)))*2;while((D|0)!=(I|0));return x[B>>3]=Ae,Le=0,Er=Ae,Er=Er*6371.007180918475,x[B>>3]=Er,sn=Ve,Le|0}function Ci(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0;if(Ve=sn,sn=sn+176|0,Le=Ve,D=I0(D,I,Le)|0,D|0)return Le=D,Ae=+x[B>>3],Ae=Ae*6371.007180918475,Ae=Ae*1e3,x[B>>3]=Ae,sn=Ve,Le|0;if(x[B>>3]=0,D=w[Le>>2]|0,(D|0)<=1)return Le=0,Ae=0,Ae=Ae*6371.007180918475,Ae=Ae*1e3,x[B>>3]=Ae,sn=Ve,Le|0;I=D+-1|0,D=0,ee=+x[Le+8>>3],fe=+x[Le+16>>3],Ae=0;do D=D+1|0,sr=ee,ee=+x[Le+8+(D<<4)>>3],Er=+wt(+((ee-sr)*.5)),Bt=fe,fe=+x[Le+8+(D<<4)+8>>3],Bt=+wt(+((fe-Bt)*.5)),Bt=Er*Er+Bt*(+Ut(+sr)*+Ut(+ee)*Bt),Ae=Ae+ +Br(+ +Pe(+Bt),+ +Pe(+(1-Bt)))*2;while((D|0)!=(I|0));return x[B>>3]=Ae,Le=0,Er=Ae,Er=Er*6371.007180918475,Er=Er*1e3,x[B>>3]=Er,sn=Ve,Le|0}function eo(D){D=D|0;var I=0,B=0,ee=0;return I=Pl(1,12)|0,I||di(22832,22787,49,22845),B=D+4|0,ee=w[B>>2]|0,ee|0?(ee=ee+8|0,w[ee>>2]=I,w[B>>2]=I,I|0):(w[D>>2]|0&&di(22862,22787,61,22885),ee=D,w[ee>>2]=I,w[B>>2]=I,I|0)}function zo(D,I){D=D|0,I=I|0;var B=0,ee=0;return ee=th(24)|0,ee||di(22899,22787,78,22913),w[ee>>2]=w[I>>2],w[ee+4>>2]=w[I+4>>2],w[ee+8>>2]=w[I+8>>2],w[ee+12>>2]=w[I+12>>2],w[ee+16>>2]=0,I=D+4|0,B=w[I>>2]|0,B|0?(w[B+16>>2]=ee,w[I>>2]=ee,ee|0):(w[D>>2]|0&&di(22928,22787,82,22913),w[D>>2]=ee,w[I>>2]=ee,ee|0)}function to(D){D=D|0;var I=0,B=0,ee=0,fe=0;if(D)for(ee=1;;){if(I=w[D>>2]|0,I|0)do{if(B=w[I>>2]|0,B|0)do fe=B,B=w[B+16>>2]|0,Xu(fe);while(B|0);fe=I,I=w[I+8>>2]|0,Xu(fe)}while(I|0);if(I=D,D=w[D+8>>2]|0,ee||Xu(I),D)ee=0;else break}}function Ha(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0,Va=0,zl=0,Ll=0,Ru=0,xl=0,Th=0,Bh=0,wh=0,Jf=0,Yl=0,Mc=0,ad=0,Tf=0;if(fe=D+8|0,w[fe>>2]|0)return Tf=1,Tf|0;if(ee=w[D>>2]|0,!ee)return Tf=0,Tf|0;I=ee,B=0;do B=B+1|0,I=w[I+8>>2]|0;while(I|0);if(B>>>0<2)return Tf=0,Tf|0;Mc=th(B<<2)|0,Mc||di(22948,22787,317,22967),Yl=th(B<<5)|0,Yl||di(22989,22787,321,22967),w[D>>2]=0,Ll=D+4|0,w[Ll>>2]=0,w[fe>>2]=0,B=0,Jf=0,zl=0,An=0;e:for(;;){if(Er=w[ee>>2]|0,Er){Ae=0,Le=Er;do{if(Bt=+x[Le+8>>3],I=Le,Le=w[Le+16>>2]|0,sr=(Le|0)==0,fe=sr?Er:Le,Ve=+x[fe+8>>3],+Se(+(Bt-Ve))>3.141592653589793){Tf=14;break}Ae=Ae+(Ve-Bt)*(+x[I>>3]+ +x[fe>>3])}while(!sr);if((Tf|0)==14){Tf=0,Ae=0,I=Er;do Va=+x[I+8>>3],wh=I+16|0,Bh=w[wh>>2]|0,Bh=Bh|0?Bh:Er,ao=+x[Bh+8>>3],Ae=Ae+(+x[I>>3]+ +x[Bh>>3])*((ao<0?ao+6.283185307179586:ao)-(Va<0?Va+6.283185307179586:Va)),I=w[(I|0?wh:ee)>>2]|0;while(I|0)}Ae>0?(w[Mc+(Jf<<2)>>2]=ee,Jf=Jf+1|0,fe=zl,I=An):Tf=19}else Tf=19;if((Tf|0)==19){Tf=0;do if(B){if(I=B+8|0,w[I>>2]|0){Tf=21;break e}if(B=Pl(1,12)|0,!B){Tf=23;break e}w[I>>2]=B,fe=B+4|0,Le=B,I=An}else if(An){fe=Ll,Le=An+8|0,I=ee,B=D;break}else if(w[D>>2]|0){Tf=27;break e}else{fe=Ll,Le=D,I=ee,B=D;break}while(0);if(w[Le>>2]=ee,w[fe>>2]=ee,Le=Yl+(zl<<5)|0,sr=w[ee>>2]|0,sr){for(Er=Yl+(zl<<5)+8|0,x[Er>>3]=17976931348623157e292,An=Yl+(zl<<5)+24|0,x[An>>3]=17976931348623157e292,x[Le>>3]=-17976931348623157e292,ci=Yl+(zl<<5)+16|0,x[ci>>3]=-17976931348623157e292,Io=17976931348623157e292,io=-17976931348623157e292,fe=0,bi=sr,Bt=17976931348623157e292,va=17976931348623157e292,es=-17976931348623157e292,Ve=-17976931348623157e292;Ae=+x[bi>>3],Va=+x[bi+8>>3],bi=w[bi+16>>2]|0,Ei=(bi|0)==0,ao=+x[(Ei?sr:bi)+8>>3],Ae>3]=Ae,Bt=Ae),Va>3]=Va,va=Va),Ae>es?x[Le>>3]=Ae:Ae=es,Va>Ve&&(x[ci>>3]=Va,Ve=Va),Io=Va>0&Vaio?Va:io,fe=fe|+Se(+(Va-ao))>3.141592653589793,!Ei;)es=Ae;fe&&(x[ci>>3]=io,x[An>>3]=Io)}else w[Le>>2]=0,w[Le+4>>2]=0,w[Le+8>>2]=0,w[Le+12>>2]=0,w[Le+16>>2]=0,w[Le+20>>2]=0,w[Le+24>>2]=0,w[Le+28>>2]=0;fe=zl+1|0}if(wh=ee+8|0,ee=w[wh>>2]|0,w[wh>>2]=0,ee)zl=fe,An=I;else{Tf=45;break}}if((Tf|0)==21)di(22765,22787,35,22799);else if((Tf|0)==23)di(22819,22787,37,22799);else if((Tf|0)==27)di(22862,22787,61,22885);else if((Tf|0)==45){e:do if((Jf|0)>0){for(wh=(fe|0)==0,Th=fe<<2,Bh=(D|0)==0,xl=0,I=0;;){if(Ru=w[Mc+(xl<<2)>>2]|0,wh)Tf=73;else{if(zl=th(Th)|0,!zl){Tf=50;break}if(Ll=th(Th)|0,!Ll){Tf=52;break}t:do if(Bh)B=0;else{for(fe=0,B=0,Le=D;ee=Yl+(fe<<5)|0,Cs(w[Le>>2]|0,ee,w[Ru>>2]|0)|0?(w[zl+(B<<2)>>2]=Le,w[Ll+(B<<2)>>2]=ee,Ei=B+1|0):Ei=B,Le=w[Le+8>>2]|0,Le;)fe=fe+1|0,B=Ei;if((Ei|0)>0)if(ee=w[zl>>2]|0,(Ei|0)==1)B=ee;else for(ci=0,bi=-1,B=ee,An=ee;;){for(sr=w[An>>2]|0,ee=0,Le=0;fe=w[w[zl+(Le<<2)>>2]>>2]|0,(fe|0)==(sr|0)?Er=ee:Er=ee+((Cs(fe,w[Ll+(Le<<2)>>2]|0,w[sr>>2]|0)|0)&1)|0,Le=Le+1|0,(Le|0)!=(Ei|0);)ee=Er;if(fe=(Er|0)>(bi|0),B=fe?An:B,ee=ci+1|0,(ee|0)==(Ei|0))break t;ci=ee,bi=fe?Er:bi,An=w[zl+(ee<<2)>>2]|0}else B=0}while(0);if(Xu(zl),Xu(Ll),B){if(fe=B+4|0,ee=w[fe>>2]|0,ee)B=ee+8|0;else if(w[B>>2]|0){Tf=70;break}w[B>>2]=Ru,w[fe>>2]=Ru}else Tf=73}if((Tf|0)==73){if(Tf=0,I=w[Ru>>2]|0,I|0)do Ll=I,I=w[I+16>>2]|0,Xu(Ll);while(I|0);Xu(Ru),I=1}if(xl=xl+1|0,(xl|0)>=(Jf|0)){ad=I;break e}}(Tf|0)==50?di(23004,22787,249,23023):(Tf|0)==52?di(23042,22787,252,23023):(Tf|0)==70&&di(22862,22787,61,22885)}else ad=0;while(0);return Xu(Mc),Xu(Yl),Tf=ad,Tf|0}return 0}function Cs(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0;if(!(yd(I,B)|0)||(I=Wl(I)|0,ee=+x[B>>3],fe=+x[B+8>>3],fe=I&fe<0?fe+6.283185307179586:fe,D=w[D>>2]|0,!D))return D=0,D|0;if(I){I=0,sr=fe,B=D;e:for(;;){for(;Le=+x[B>>3],fe=+x[B+8>>3],B=B+16|0,Er=w[B>>2]|0,Er=Er|0?Er:D,Ae=+x[Er>>3],Ve=+x[Er+8>>3],Le>Ae?(Bt=Le,Le=Ve):(Bt=Ae,Ae=Le,Le=fe,fe=Ve),ee=ee==Ae|ee==Bt?ee+2220446049250313e-31:ee,!!(eeBt);)if(B=w[B>>2]|0,!B){B=22;break e}if(Ve=Le<0?Le+6.283185307179586:Le,Le=fe<0?fe+6.283185307179586:fe,sr=Ve==sr|Le==sr?sr+-2220446049250313e-31:sr,Bt=Ve+(Le-Ve)*((ee-Ae)/(Bt-Ae)),(Bt<0?Bt+6.283185307179586:Bt)>sr&&(I=I^1),B=w[B>>2]|0,!B){B=22;break}}if((B|0)==22)return I|0}else{I=0,sr=fe,B=D;e:for(;;){for(;Le=+x[B>>3],fe=+x[B+8>>3],B=B+16|0,Er=w[B>>2]|0,Er=Er|0?Er:D,Ae=+x[Er>>3],Ve=+x[Er+8>>3],Le>Ae?(Bt=Le,Le=Ve):(Bt=Ae,Ae=Le,Le=fe,fe=Ve),ee=ee==Ae|ee==Bt?ee+2220446049250313e-31:ee,!!(eeBt);)if(B=w[B>>2]|0,!B){B=22;break e}if(sr=Le==sr|fe==sr?sr+-2220446049250313e-31:sr,Le+(fe-Le)*((ee-Ae)/(Bt-Ae))>sr&&(I=I^1),B=w[B>>2]|0,!B){B=22;break}}if((B|0)==22)return I|0}return 0}function ls(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0;if(io=sn,sn=sn+32|0,Io=io+16|0,es=io,Ae=Nr(D|0,I|0,52)|0,pr()|0,Ae=Ae&15,bi=Nr(B|0,ee|0,52)|0,pr()|0,(Ae|0)!=(bi&15|0))return Io=12,sn=io,Io|0;if(sr=Nr(D|0,I|0,45)|0,pr()|0,sr=sr&127,Er=Nr(B|0,ee|0,45)|0,pr()|0,Er=Er&127,sr>>>0>121|Er>>>0>121)return Io=5,sn=io,Io|0;if(bi=(sr|0)!=(Er|0),bi){if(Ve=Qh(sr,Er)|0,(Ve|0)==7)return Io=1,sn=io,Io|0;Bt=Qh(Er,sr)|0,(Bt|0)==7?di(23066,23090,161,23100):(Ei=Ve,Le=Bt)}else Ei=0,Le=0;An=vf(sr)|0,ci=vf(Er)|0,w[Io>>2]=0,w[Io+4>>2]=0,w[Io+8>>2]=0,w[Io+12>>2]=0;do if(Ei){if(Er=w[4272+(sr*28|0)+(Ei<<2)>>2]|0,Ve=(Er|0)>0,ci)if(Ve){sr=0,Bt=B,Ve=ee;do Bt=vp(Bt,Ve)|0,Ve=pr()|0,Le=td(Le)|0,(Le|0)==1&&(Le=td(1)|0),sr=sr+1|0;while((sr|0)!=(Er|0));Er=Le,sr=Bt,Bt=Ve}else Er=Le,sr=B,Bt=ee;else if(Ve){sr=0,Bt=B,Ve=ee;do Bt=Xp(Bt,Ve)|0,Ve=pr()|0,Le=td(Le)|0,sr=sr+1|0;while((sr|0)!=(Er|0));Er=Le,sr=Bt,Bt=Ve}else Er=Le,sr=B,Bt=ee;if(Up(sr,Bt,Io)|0,bi||di(23115,23090,191,23100),Ve=(An|0)!=0,Le=(ci|0)!=0,Ve&Le&&di(23142,23090,192,23100),Ve){if(Le=Fp(D,I)|0,(Le|0)==7){Ae=5;break}if(tt[21872+(Le*7|0)+Ei>>0]|0){Ae=1;break}Bt=w[21040+(Le*28|0)+(Ei<<2)>>2]|0,sr=Bt}else if(Le){if(Le=Fp(sr,Bt)|0,(Le|0)==7){Ae=5;break}if(tt[21872+(Le*7|0)+Er>>0]|0){Ae=1;break}sr=0,Bt=w[21040+(Er*28|0)+(Le<<2)>>2]|0}else sr=0,Bt=0;if((sr|Bt|0)<0)Ae=5;else{if((Bt|0)>0){Ve=Io+4|0,Le=0;do hf(Ve),Le=Le+1|0;while((Le|0)!=(Bt|0))}if(w[es>>2]=0,w[es+4>>2]=0,w[es+8>>2]=0,Wd(es,Ei),Ae|0)for(;Qd(Ae)|0?a0(es):Lp(es),(Ae|0)>1;)Ae=Ae+-1|0;if((sr|0)>0){Ae=0;do hf(es),Ae=Ae+1|0;while((Ae|0)!=(sr|0))}va=Io+4|0,hd(va,es,va),kf(va),va=51}}else if(Up(B,ee,Io)|0,(An|0)!=0&(ci|0)!=0)if((Er|0)!=(sr|0)&&di(23173,23090,261,23100),Le=Fp(D,I)|0,Ae=Fp(B,ee)|0,(Le|0)==7|(Ae|0)==7)Ae=5;else if(tt[21872+(Le*7|0)+Ae>>0]|0)Ae=1;else if(Le=w[21040+(Le*28|0)+(Ae<<2)>>2]|0,(Le|0)>0){Ve=Io+4|0,Ae=0;do hf(Ve),Ae=Ae+1|0;while((Ae|0)!=(Le|0));va=51}else va=51;else va=51;while(0);return(va|0)==51&&(Ae=Io+4|0,w[fe>>2]=w[Ae>>2],w[fe+4>>2]=w[Ae+4>>2],w[fe+8>>2]=w[Ae+8>>2],Ae=0),Io=Ae,sn=io,Io|0}function Su(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0;if(va=sn,sn=sn+48|0,sr=va+36|0,Le=va+24|0,Ve=va+12|0,Bt=va,fe=Nr(D|0,I|0,52)|0,pr()|0,fe=fe&15,ci=Nr(D|0,I|0,45)|0,pr()|0,ci=ci&127,ci>>>0>121)return ee=5,sn=va,ee|0;if(Er=vf(ci)|0,vr(fe|0,0,52)|0,es=pr()|0|134225919,Ae=ee,w[Ae>>2]=-1,w[Ae+4>>2]=es,!fe)return fe=i0(B)|0,(fe|0)==7||(fe=qh(ci,fe)|0,(fe|0)==127)?(es=1,sn=va,es|0):(bi=vr(fe|0,0,45)|0,Ei=pr()|0,ci=ee,Ei=w[ci+4>>2]&-1040385|Ei,es=ee,w[es>>2]=w[ci>>2]|bi,w[es+4>>2]=Ei,es=0,sn=va,es|0);for(w[sr>>2]=w[B>>2],w[sr+4>>2]=w[B+4>>2],w[sr+8>>2]=w[B+8>>2],B=fe;;){if(Ae=B,B=B+-1|0,w[Le>>2]=w[sr>>2],w[Le+4>>2]=w[sr+4>>2],w[Le+8>>2]=w[sr+8>>2],Qd(Ae)|0){if(fe=Cp(sr)|0,fe|0){B=13;break}w[Ve>>2]=w[sr>>2],w[Ve+4>>2]=w[sr+4>>2],w[Ve+8>>2]=w[sr+8>>2],a0(Ve)}else{if(fe=Tp(sr)|0,fe|0){B=13;break}w[Ve>>2]=w[sr>>2],w[Ve+4>>2]=w[sr+4>>2],w[Ve+8>>2]=w[sr+8>>2],Lp(Ve)}if(Gh(Le,Ve,Bt),kf(Bt),fe=ee,io=w[fe>>2]|0,fe=w[fe+4>>2]|0,ao=(15-Ae|0)*3|0,Io=vr(7,0,ao|0)|0,fe=fe&~(pr()|0),ao=vr(i0(Bt)|0,0,ao|0)|0,fe=pr()|0|fe,es=ee,w[es>>2]=ao|io&~Io,w[es+4>>2]=fe,(Ae|0)<=1){B=14;break}}e:do if((B|0)!=13&&(B|0)==14)if((w[sr>>2]|0)<=1&&(w[sr+4>>2]|0)<=1&&(w[sr+8>>2]|0)<=1){B=i0(sr)|0,fe=qh(ci,B)|0,(fe|0)==127?Bt=0:Bt=vf(fe)|0;t:do if(B){if(Er){if(fe=Fp(D,I)|0,(fe|0)==7){fe=5;break e}if(Ae=w[21248+(fe*28|0)+(B<<2)>>2]|0,(Ae|0)>0){fe=B,B=0;do fe=Jc(fe)|0,B=B+1|0;while((B|0)!=(Ae|0))}else fe=B;if((fe|0)==1){fe=9;break e}B=qh(ci,fe)|0,(B|0)==127&&di(23200,23090,411,23230),vf(B)|0?di(23245,23090,412,23230):(Ei=B,bi=Ae,An=fe)}else Ei=fe,bi=0,An=B;if(Ve=w[4272+(ci*28|0)+(An<<2)>>2]|0,(Ve|0)<=-1&&di(23276,23090,419,23230),!Bt){if((bi|0)<0){fe=5;break e}if(bi|0){Ae=ee,fe=0,B=w[Ae>>2]|0,Ae=w[Ae+4>>2]|0;do B=Zp(B,Ae)|0,Ae=pr()|0,ao=ee,w[ao>>2]=B,w[ao+4>>2]=Ae,fe=fe+1|0;while((fe|0)<(bi|0))}if((Ve|0)<=0){fe=Ei,B=58;break}for(Ae=ee,fe=0,B=w[Ae>>2]|0,Ae=w[Ae+4>>2]|0;;)if(B=Zp(B,Ae)|0,Ae=pr()|0,ao=ee,w[ao>>2]=B,w[ao+4>>2]=Ae,fe=fe+1|0,(fe|0)==(Ve|0)){fe=Ei,B=58;break t}}if(Le=Qh(Ei,ci)|0,(Le|0)==7&&di(23066,23090,428,23230),fe=ee,B=w[fe>>2]|0,fe=w[fe+4>>2]|0,(Ve|0)>0){Ae=0;do B=Zp(B,fe)|0,fe=pr()|0,ao=ee,w[ao>>2]=B,w[ao+4>>2]=fe,Ae=Ae+1|0;while((Ae|0)!=(Ve|0))}if(fe=Fp(B,fe)|0,(fe|0)==7&&di(23313,23090,440,23230),B=Ph(Ei)|0,B=w[(B?21664:21456)+(Le*28|0)+(fe<<2)>>2]|0,(B|0)<0&&di(23313,23090,454,23230),!B)fe=Ei,B=58;else{Le=ee,fe=0,Ae=w[Le>>2]|0,Le=w[Le+4>>2]|0;do Ae=z0(Ae,Le)|0,Le=pr()|0,ao=ee,w[ao>>2]=Ae,w[ao+4>>2]=Le,fe=fe+1|0;while((fe|0)<(B|0));fe=Ei,B=58}}else if((Er|0)!=0&(Bt|0)!=0){if(B=Fp(D,I)|0,Ae=ee,Ae=Fp(w[Ae>>2]|0,w[Ae+4>>2]|0)|0,(B|0)==7|(Ae|0)==7){fe=5;break e}if(Ae=w[21248+(B*28|0)+(Ae<<2)>>2]|0,(Ae|0)<0){fe=5;break e}if(!Ae)B=59;else{Ve=ee,B=0,Le=w[Ve>>2]|0,Ve=w[Ve+4>>2]|0;do Le=Zp(Le,Ve)|0,Ve=pr()|0,ao=ee,w[ao>>2]=Le,w[ao+4>>2]=Ve,B=B+1|0;while((B|0)<(Ae|0));B=58}}else B=58;while(0);if((B|0)==58&&Bt&&(B=59),(B|0)==59&&(ao=ee,(Fp(w[ao>>2]|0,w[ao+4>>2]|0)|0)==1)){fe=9;break}ao=ee,Io=w[ao>>2]|0,ao=w[ao+4>>2]&-1040385,io=vr(fe|0,0,45)|0,ao=ao|(pr()|0),fe=ee,w[fe>>2]=Io|io,w[fe+4>>2]=ao,fe=0}else fe=1;while(0);return ao=fe,sn=va,ao|0}function ru(D,I,B,ee,fe,Ae){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0,Ae=Ae|0;var Le=0,Ve=0;return Ve=sn,sn=sn+16|0,Le=Ve,fe?D=15:(D=ls(D,I,B,ee,Le)|0,D||(kh(Le,Ae),D=0)),sn=Ve,D|0}function nu(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0;return Le=sn,sn=sn+16|0,Ae=Le,ee?B=15:(B=Zc(B,Ae)|0,B||(B=Su(D,I,Ae,fe)|0)),sn=Le,B|0}function xu(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0;return Bt=sn,sn=sn+32|0,Le=Bt+12|0,Ve=Bt,Ae=ls(D,I,D,I,Le)|0,Ae|0?(Ve=Ae,sn=Bt,Ve|0):(D=ls(D,I,B,ee,Ve)|0,D|0?(Ve=D,sn=Bt,Ve|0):(Le=Dp(Le,Ve)|0,Ve=fe,w[Ve>>2]=Le,w[Ve+4>>2]=((Le|0)<0)<<31>>31,Ve=0,sn=Bt,Ve|0))}function Ns(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0;return Bt=sn,sn=sn+32|0,Le=Bt+12|0,Ve=Bt,Ae=ls(D,I,D,I,Le)|0,!Ae&&(Ae=ls(D,I,B,ee,Ve)|0,!Ae)?(ee=Dp(Le,Ve)|0,ee=mu(ee|0,((ee|0)<0)<<31>>31|0,1,0)|0,Le=pr()|0,Ve=fe,w[Ve>>2]=ee,w[Ve+4>>2]=Le,Ve=0,sn=Bt,Ve|0):(Ve=Ae,sn=Bt,Ve|0)}function wu(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0,Va=0,zl=0,Ll=0,Ru=0,xl=0;if(Ru=sn,sn=sn+48|0,Le=Ru+24|0,Ve=Ru+12|0,Ll=Ru,Ae=ls(D,I,D,I,Le)|0,!Ae&&(Ae=ls(D,I,B,ee,Ve)|0,!Ae)){Va=Dp(Le,Ve)|0,zl=((Va|0)<0)<<31>>31,w[Le>>2]=0,w[Le+4>>2]=0,w[Le+8>>2]=0,w[Ve>>2]=0,w[Ve+4>>2]=0,w[Ve+8>>2]=0,ls(D,I,D,I,Le)|0&&di(23313,23090,691,23299),ls(D,I,B,ee,Ve)|0&&di(23313,23090,696,23299),dh(Le),dh(Ve),Va?(An=w[Le>>2]|0,Ei=+(Va|0),Io=Le+4|0,ci=w[Io>>2]|0,io=Le+8|0,bi=w[io>>2]|0,ao=Le,ee=An,Ae=ci,B=bi,va=+((w[Ve>>2]|0)-An|0)/Ei,es=+((w[Ve+4>>2]|0)-ci|0)/Ei,Ei=+((w[Ve+8>>2]|0)-bi|0)/Ei):(Ae=Le+4|0,B=Le+8|0,Io=Ae,io=B,ao=Le,ee=w[Le>>2]|0,Ae=w[Ae>>2]|0,B=w[B>>2]|0,va=0,es=0,Ei=0),w[Ll>>2]=ee,bi=Ll+4|0,w[bi>>2]=Ae,ci=Ll+8|0,w[ci>>2]=B;e:do if((Va|0)<0)Ae=0;else for(Er=0,An=0,Ae=ee;;){sr=+(An>>>0)+4294967296*+(Er|0),xl=va*sr+ +(Ae|0),Bt=es*sr+ +(w[Io>>2]|0),sr=Ei*sr+ +(w[io>>2]|0),B=~~+Ra(+xl),Le=~~+Ra(+Bt),Ae=~~+Ra(+sr),xl=+Se(+(+(B|0)-xl)),Bt=+Se(+(+(Le|0)-Bt)),sr=+Se(+(+(Ae|0)-sr));do if(xl>Bt&xl>sr)B=0-(Le+Ae)|0,ee=Le;else if(Ve=0-B|0,Bt>sr){ee=Ve-Ae|0;break}else{ee=Le,Ae=Ve-Le|0;break}while(0);if(w[Ll>>2]=B,w[bi>>2]=ee,w[ci>>2]=Ae,rd(Ll),Ae=Su(D,I,Ll,fe+(An<<3)|0)|0,Ae|0)break e;if(!((Er|0)<(zl|0)|(Er|0)==(zl|0)&An>>>0>>0)){Ae=0;break e}Ae=mu(An|0,Er|0,1,0)|0,Ve=pr()|0,Er=Ve,An=Ae,Ae=w[ao>>2]|0}while(0);return Ll=Ae,sn=Ru,Ll|0}return Ll=Ae,sn=Ru,Ll|0}function _a(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0;if((B|0)==0&(ee|0)==0)return fe=0,Ae=1,oi(fe|0),Ae|0;Ae=D,fe=I,D=1,I=0;do Le=(B&1|0)==0&!0,D=ga((Le?1:Ae)|0,(Le?0:fe)|0,D|0,I|0)|0,I=pr()|0,B=bo(B|0,ee|0,1)|0,ee=pr()|0,Ae=ga(Ae|0,fe|0,Ae|0,fe|0)|0,fe=pr()|0;while(!((B|0)==0&(ee|0)==0));return oi(I|0),D|0}function Ao(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0;if(!(yd(I,B)|0)||(I=Wl(I)|0,ee=+x[B>>3],fe=+x[B+8>>3],fe=I&fe<0?fe+6.283185307179586:fe,ci=w[D>>2]|0,(ci|0)<=0))return ci=0,ci|0;if(An=w[D+4>>2]|0,I){I=0,Er=fe,B=-1,D=0;e:for(;;){for(sr=D;Le=+x[An+(sr<<4)>>3],fe=+x[An+(sr<<4)+8>>3],D=(B+2|0)%(ci|0)|0,Ae=+x[An+(D<<4)>>3],Ve=+x[An+(D<<4)+8>>3],Le>Ae?(Bt=Le,Le=Ve):(Bt=Ae,Ae=Le,Le=fe,fe=Ve),ee=ee==Ae|ee==Bt?ee+2220446049250313e-31:ee,!!(eeBt);)if(B=sr+1|0,(B|0)>=(ci|0)){B=22;break e}else D=sr,sr=B,B=D;if(Ve=Le<0?Le+6.283185307179586:Le,Le=fe<0?fe+6.283185307179586:fe,Er=Ve==Er|Le==Er?Er+-2220446049250313e-31:Er,Bt=Ve+(Le-Ve)*((ee-Ae)/(Bt-Ae)),(Bt<0?Bt+6.283185307179586:Bt)>Er&&(I=I^1),D=sr+1|0,(D|0)>=(ci|0)){B=22;break}else B=sr}if((B|0)==22)return I|0}else{I=0,Er=fe,B=-1,D=0;e:for(;;){for(sr=D;Le=+x[An+(sr<<4)>>3],fe=+x[An+(sr<<4)+8>>3],D=(B+2|0)%(ci|0)|0,Ae=+x[An+(D<<4)>>3],Ve=+x[An+(D<<4)+8>>3],Le>Ae?(Bt=Le,Le=Ve):(Bt=Ae,Ae=Le,Le=fe,fe=Ve),ee=ee==Ae|ee==Bt?ee+2220446049250313e-31:ee,!!(eeBt);)if(B=sr+1|0,(B|0)>=(ci|0)){B=22;break e}else D=sr,sr=B,B=D;if(Er=Le==Er|fe==Er?Er+-2220446049250313e-31:Er,Le+(fe-Le)*((ee-Ae)/(Bt-Ae))>Er&&(I=I^1),D=sr+1|0,(D|0)>=(ci|0)){B=22;break}else B=sr}if((B|0)==22)return I|0}return 0}function lu(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0;if(Ei=w[D>>2]|0,!Ei){w[I>>2]=0,w[I+4>>2]=0,w[I+8>>2]=0,w[I+12>>2]=0,w[I+16>>2]=0,w[I+20>>2]=0,w[I+24>>2]=0,w[I+28>>2]=0;return}if(va=I+8|0,x[va>>3]=17976931348623157e292,es=I+24|0,x[es>>3]=17976931348623157e292,x[I>>3]=-17976931348623157e292,Io=I+16|0,x[Io>>3]=-17976931348623157e292,!((Ei|0)<=0)){for(ci=w[D+4>>2]|0,sr=17976931348623157e292,Er=-17976931348623157e292,An=0,D=-1,Ae=17976931348623157e292,Le=17976931348623157e292,Bt=-17976931348623157e292,ee=-17976931348623157e292,bi=0;B=+x[ci+(bi<<4)>>3],Ve=+x[ci+(bi<<4)+8>>3],D=D+2|0,fe=+x[ci+(((D|0)==(Ei|0)?0:D)<<4)+8>>3],B>3]=B,Ae=B),Ve>3]=Ve,Le=Ve),B>Bt?x[I>>3]=B:B=Bt,Ve>ee&&(x[Io>>3]=Ve,ee=Ve),sr=Ve>0&VeEr?Ve:Er,An=An|+Se(+(Ve-fe))>3.141592653589793,D=bi+1|0,(D|0)!=(Ei|0);)io=bi,Bt=B,bi=D,D=io;An&&(x[Io>>3]=Er,x[es>>3]=sr)}}function el(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0,Va=0,zl=0,Ll=0,Ru=0;if(Ei=w[D>>2]|0,Ei){if(va=I+8|0,x[va>>3]=17976931348623157e292,es=I+24|0,x[es>>3]=17976931348623157e292,x[I>>3]=-17976931348623157e292,Io=I+16|0,x[Io>>3]=-17976931348623157e292,(Ei|0)>0){for(fe=w[D+4>>2]|0,ci=17976931348623157e292,bi=-17976931348623157e292,ee=0,B=-1,Bt=17976931348623157e292,sr=17976931348623157e292,An=-17976931348623157e292,Le=-17976931348623157e292,io=0;Ae=+x[fe+(io<<4)>>3],Er=+x[fe+(io<<4)+8>>3],Ll=B+2|0,Ve=+x[fe+(((Ll|0)==(Ei|0)?0:Ll)<<4)+8>>3],Ae>3]=Ae,Bt=Ae),Er>3]=Er,sr=Er),Ae>An?x[I>>3]=Ae:Ae=An,Er>Le&&(x[Io>>3]=Er,Le=Er),ci=Er>0&Erbi?Er:bi,ee=ee|+Se(+(Er-Ve))>3.141592653589793,B=io+1|0,(B|0)!=(Ei|0);)Ll=io,An=Ae,io=B,B=Ll;ee&&(x[Io>>3]=bi,x[es>>3]=ci)}}else w[I>>2]=0,w[I+4>>2]=0,w[I+8>>2]=0,w[I+12>>2]=0,w[I+16>>2]=0,w[I+20>>2]=0,w[I+24>>2]=0,w[I+28>>2]=0;if(Ll=D+8|0,B=w[Ll>>2]|0,!((B|0)<=0)){zl=D+12|0,Va=0;do if(fe=w[zl>>2]|0,ee=Va,Va=Va+1|0,es=I+(Va<<5)|0,Io=w[fe+(ee<<3)>>2]|0,Io){if(io=I+(Va<<5)+8|0,x[io>>3]=17976931348623157e292,D=I+(Va<<5)+24|0,x[D>>3]=17976931348623157e292,x[es>>3]=-17976931348623157e292,ao=I+(Va<<5)+16|0,x[ao>>3]=-17976931348623157e292,(Io|0)>0){for(Ei=w[fe+(ee<<3)+4>>2]|0,ci=17976931348623157e292,bi=-17976931348623157e292,fe=0,ee=-1,va=0,Bt=17976931348623157e292,sr=17976931348623157e292,Er=-17976931348623157e292,Le=-17976931348623157e292;Ae=+x[Ei+(va<<4)>>3],An=+x[Ei+(va<<4)+8>>3],ee=ee+2|0,Ve=+x[Ei+(((ee|0)==(Io|0)?0:ee)<<4)+8>>3],Ae>3]=Ae,Bt=Ae),An>3]=An,sr=An),Ae>Er?x[es>>3]=Ae:Ae=Er,An>Le&&(x[ao>>3]=An,Le=An),ci=An>0&Anbi?An:bi,fe=fe|+Se(+(An-Ve))>3.141592653589793,ee=va+1|0,(ee|0)!=(Io|0);)Ru=va,va=ee,Er=Ae,ee=Ru;fe&&(x[ao>>3]=bi,x[D>>3]=ci)}}else w[es>>2]=0,w[es+4>>2]=0,w[es+8>>2]=0,w[es+12>>2]=0,w[es+16>>2]=0,w[es+20>>2]=0,w[es+24>>2]=0,w[es+28>>2]=0,B=w[Ll>>2]|0;while((Va|0)<(B|0))}}function As(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0;if(!(Ao(D,I,B)|0))return fe=0,fe|0;if(fe=D+8|0,(w[fe>>2]|0)<=0)return fe=1,fe|0;for(ee=D+12|0,D=0;;){if(Ae=D,D=D+1|0,Ao((w[ee>>2]|0)+(Ae<<3)|0,I+(D<<5)|0,B)|0){D=0,ee=6;break}if((D|0)>=(w[fe>>2]|0)){D=1,ee=6;break}}return(ee|0)==6?D|0:0}function bl(){return 8}function Is(){return 16}function tl(){return 168}function Ho(){return 8}function rl(){return 16}function xc(){return 12}function kc(){return 8}function Wu(D){return D=D|0,+(+((w[D>>2]|0)>>>0)+4294967296*+(w[D+4>>2]|0))}function zs(D){D=D|0;var I=0,B=0;return B=+x[D>>3],I=+x[D+8>>3],+ +Pe(+(B*B+I*I))}function Vo(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0;sr=+x[D>>3],Bt=+x[I>>3]-sr,Ve=+x[D+8>>3],Le=+x[I+8>>3]-Ve,An=+x[B>>3],Ae=+x[ee>>3]-An,ci=+x[B+8>>3],Er=+x[ee+8>>3]-ci,Ae=(Ae*(Ve-ci)-(sr-An)*Er)/(Bt*Er-Le*Ae),x[fe>>3]=sr+Bt*Ae,x[fe+8>>3]=Ve+Le*Ae}function hc(D,I){return D=D|0,I=I|0,+Se(+(+x[D>>3]-+x[I>>3]))<11920928955078125e-23?(I=+Se(+(+x[D+8>>3]-+x[I+8>>3]))<11920928955078125e-23,I|0):(I=0,I|0)}function wc(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0;return fe=+x[D>>3]-+x[I>>3],ee=+x[D+8>>3]-+x[I+8>>3],B=+x[D+16>>3]-+x[I+16>>3],+(fe*fe+ee*ee+B*B)}function cl(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0;B=+x[D>>3],ee=+Ut(+B),B=+wt(+B),x[I+16>>3]=B,B=+x[D+8>>3],fe=ee*+Ut(+B),x[I>>3]=fe,B=ee*+wt(+B),x[I+8>>3]=B}function Jl(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0;if(Ae=sn,sn=sn+16|0,fe=Ae,ee=Sh(D,I)|0,(B+-1|0)>>>0>5||(ee=(ee|0)!=0,(B|0)==1&ee))return fe=-1,sn=Ae,fe|0;do if(Uc(D,I,fe)|0)ee=-1;else if(ee){ee=((w[21936+(B<<2)>>2]|0)+5-(w[fe>>2]|0)|0)%5|0;break}else{ee=((w[21968+(B<<2)>>2]|0)+6-(w[fe>>2]|0)|0)%6|0;break}while(0);return fe=ee,sn=Ae,fe|0}function Uc(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0;if(sr=sn,sn=sn+32|0,Le=sr+16|0,Ve=sr,ee=Mp(D,I,Le)|0,ee|0)return B=ee,sn=sr,B|0;Ae=kp(D,I)|0,Bt=Fp(D,I)|0,Dh(Ae,Ve),ee=eh(Ae,w[Le>>2]|0)|0;e:do if(vf(Ae)|0){do switch(Ae|0){case 4:{D=0;break}case 14:{D=1;break}case 24:{D=2;break}case 38:{D=3;break}case 49:{D=4;break}case 58:{D=5;break}case 63:{D=6;break}case 72:{D=7;break}case 83:{D=8;break}case 97:{D=9;break}case 107:{D=10;break}case 117:{D=11;break}default:{ee=1;break e}}while(0);if(fe=w[22e3+(D*24|0)+8>>2]|0,I=w[22e3+(D*24|0)+16>>2]|0,D=w[Le>>2]|0,(D|0)!=(w[Ve>>2]|0)&&(Ve=Ph(Ae)|0,D=w[Le>>2]|0,Ve|(D|0)==(I|0)&&(ee=(ee+1|0)%6|0)),(Bt|0)==3&(D|0)==(I|0)){ee=(ee+5|0)%6|0,fe=22;break}(Bt|0)==5&(D|0)==(fe|0)&&(ee=(ee+1|0)%6|0),fe=22}else fe=22;while(0);return(fe|0)==22&&(w[B>>2]=ee,ee=0),B=ee,sn=sr,B|0}function dc(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0;if(ao=sn,sn=sn+32|0,io=ao+24|0,es=ao+20|0,Ei=ao+8|0,bi=ao+16|0,ci=ao,Bt=(Sh(D,I)|0)==0,Bt=Bt?6:5,Er=Nr(D|0,I|0,52)|0,pr()|0,Er=Er&15,Bt>>>0<=B>>>0)return ee=2,sn=ao,ee|0;An=(Er|0)==0,!An&&(va=vr(7,0,(Er^15)*3|0)|0,(va&D|0)==0&((pr()|0)&I|0)==0)?fe=B:Ae=4;e:do if((Ae|0)==4){if(fe=(Sh(D,I)|0)!=0,((fe?4:5)|0)<(B|0)||Uc(D,I,io)|0||(Ae=(w[io>>2]|0)+B|0,fe?fe=22288+(((Ae|0)%5|0)<<2)|0:fe=22320+(((Ae|0)%6|0)<<2)|0,va=w[fe>>2]|0,(va|0)==7))return ee=1,sn=ao,ee|0;w[es>>2]=0,fe=Bc(D,I,va,es,Ei)|0;do if(!fe){if(Ve=Ei,sr=w[Ve>>2]|0,Ve=w[Ve+4>>2]|0,Le=Ve>>>0>>0|(Ve|0)==(I|0)&sr>>>0>>0,Ae=Le?sr:D,Le=Le?Ve:I,!An&&(An=vr(7,0,(Er^15)*3|0)|0,(sr&An|0)==0&(Ve&(pr()|0)|0)==0))fe=B;else{if(Ve=(B+-1+Bt|0)%(Bt|0)|0,fe=Sh(D,I)|0,(Ve|0)<0&&di(23313,23315,245,23324),Bt=(fe|0)!=0,((Bt?4:5)|0)<(Ve|0)&&di(23313,23315,245,23324),Uc(D,I,io)|0&&di(23313,23315,245,23324),fe=(w[io>>2]|0)+Ve|0,Bt?fe=22288+(((fe|0)%5|0)<<2)|0:fe=22320+(((fe|0)%6|0)<<2)|0,Ve=w[fe>>2]|0,(Ve|0)==7&&di(23313,23315,245,23324),w[bi>>2]=0,fe=Bc(D,I,Ve,bi,ci)|0,fe|0)break;sr=ci,Bt=w[sr>>2]|0,sr=w[sr+4>>2]|0;do if(sr>>>0>>0|(sr|0)==(Le|0)&Bt>>>0>>0){if(Sh(Bt,sr)|0?Ae=ff(Bt,sr,D,I)|0:Ae=w[22384+((((w[bi>>2]|0)+(w[22352+(Ve<<2)>>2]|0)|0)%6|0)<<2)>>2]|0,fe=Sh(Bt,sr)|0,(Ae+-1|0)>>>0>5){fe=-1,Ae=Bt,Le=sr;break}if(fe=(fe|0)!=0,(Ae|0)==1&fe){fe=-1,Ae=Bt,Le=sr;break}do if(Uc(Bt,sr,io)|0)fe=-1;else if(fe){fe=((w[21936+(Ae<<2)>>2]|0)+5-(w[io>>2]|0)|0)%5|0;break}else{fe=((w[21968+(Ae<<2)>>2]|0)+6-(w[io>>2]|0)|0)%6|0;break}while(0);Ae=Bt,Le=sr}else fe=B;while(0);Ve=Ei,sr=w[Ve>>2]|0,Ve=w[Ve+4>>2]|0}if((Ae|0)==(sr|0)&(Le|0)==(Ve|0)){if(Bt=(Sh(sr,Ve)|0)!=0,Bt?D=ff(sr,Ve,D,I)|0:D=w[22384+((((w[es>>2]|0)+(w[22352+(va<<2)>>2]|0)|0)%6|0)<<2)>>2]|0,fe=Sh(sr,Ve)|0,(D+-1|0)>>>0<=5&&(Io=(fe|0)!=0,!((D|0)==1&Io)))do if(Uc(sr,Ve,io)|0)fe=-1;else if(Io){fe=((w[21936+(D<<2)>>2]|0)+5-(w[io>>2]|0)|0)%5|0;break}else{fe=((w[21968+(D<<2)>>2]|0)+6-(w[io>>2]|0)|0)%6|0;break}while(0);else fe=-1;fe=fe+1|0,fe=(fe|0)==6|Bt&(fe|0)==5?0:fe}I=Le,D=Ae;break e}while(0);return ee=fe,sn=ao,ee|0}while(0);return Io=vr(fe|0,0,56)|0,io=pr()|0|I&-2130706433|536870912,w[ee>>2]=Io|D,w[ee+4>>2]=io,ee=0,sn=ao,ee|0}function Ch(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0;return Ae=(Sh(D,I)|0)==0,ee=dc(D,I,0,B)|0,fe=(ee|0)==0,Ae?!fe||(ee=dc(D,I,1,B+8|0)|0,ee|0)||(ee=dc(D,I,2,B+16|0)|0,ee|0)||(ee=dc(D,I,3,B+24|0)|0,ee|0)||(ee=dc(D,I,4,B+32|0)|0,ee)?(Ae=ee,Ae|0):dc(D,I,5,B+40|0)|0:!fe||(ee=dc(D,I,1,B+8|0)|0,ee|0)||(ee=dc(D,I,2,B+16|0)|0,ee|0)||(ee=dc(D,I,3,B+24|0)|0,ee|0)||(ee=dc(D,I,4,B+32|0)|0,ee|0)?(Ae=ee,Ae|0):(Ae=B+40|0,w[Ae>>2]=0,w[Ae+4>>2]=0,Ae=0,Ae|0)}function rp(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0;return Bt=sn,sn=sn+192|0,fe=Bt,Ae=Bt+168|0,Le=Nr(D|0,I|0,56)|0,pr()|0,Le=Le&7,Ve=I&-2130706433|134217728,ee=Mp(D,Ve,Ae)|0,ee|0?(Ve=ee,sn=Bt,Ve|0):(I=Nr(D|0,I|0,52)|0,pr()|0,I=I&15,Sh(D,Ve)|0?pp(Ae,I,Le,1,fe):Ed(Ae,I,Le,1,fe),Ve=fe+8|0,w[B>>2]=w[Ve>>2],w[B+4>>2]=w[Ve+4>>2],w[B+8>>2]=w[Ve+8>>2],w[B+12>>2]=w[Ve+12>>2],Ve=0,sn=Bt,Ve|0)}function np(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0;return fe=sn,sn=sn+16|0,B=fe,!(!0&(I&2013265920|0)==536870912)||(ee=I&-2130706433|134217728,!(mp(D,ee)|0))?(ee=0,sn=fe,ee|0):(Ae=Nr(D|0,I|0,56)|0,pr()|0,Ae=(dc(D,ee,Ae&7,B)|0)==0,ee=B,ee=Ae&((w[ee>>2]|0)==(D|0)?(w[ee+4>>2]|0)==(I|0):0)&1,sn=fe,ee|0)}function Ff(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0;(I|0)>0?(ee=Pl(I,4)|0,w[D>>2]=ee,ee||di(23337,23360,40,23374)):w[D>>2]=0,w[D+4>>2]=I,w[D+8>>2]=0,w[D+12>>2]=B}function Md(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0;fe=D+4|0,Ae=D+12|0,Le=D+8|0;e:for(;;){for(B=w[fe>>2]|0,I=0;;){if((I|0)>=(B|0))break e;if(ee=w[D>>2]|0,Ve=w[ee+(I<<2)>>2]|0,!Ve)I=I+1|0;else break}I=ee+(~~(+Se(+(+ct(10,+ +(15-(w[Ae>>2]|0)|0))*(+x[Ve>>3]+ +x[Ve+8>>3])))%+(B|0))>>>0<<2)|0,B=w[I>>2]|0;t:do if(B|0){if(ee=Ve+32|0,(B|0)==(Ve|0))w[I>>2]=w[ee>>2];else{if(B=B+32|0,I=w[B>>2]|0,!I)break;for(;(I|0)!=(Ve|0);)if(B=I+32|0,I=w[B>>2]|0,!I)break t;w[B>>2]=w[ee>>2]}Xu(Ve),w[Le>>2]=(w[Le>>2]|0)+-1}while(0)}Xu(w[D>>2]|0)}function Fh(D){D=D|0;var I=0,B=0,ee=0;for(ee=w[D+4>>2]|0,B=0;;){if((B|0)>=(ee|0)){I=0,B=4;break}if(I=w[(w[D>>2]|0)+(B<<2)>>2]|0,!I)B=B+1|0;else{B=4;break}}return(B|0)==4?I|0:0}function Bf(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0;if(B=~~(+Se(+(+ct(10,+ +(15-(w[D+12>>2]|0)|0))*(+x[I>>3]+ +x[I+8>>3])))%+(w[D+4>>2]|0))>>>0,B=(w[D>>2]|0)+(B<<2)|0,ee=w[B>>2]|0,!ee)return Ae=1,Ae|0;Ae=I+32|0;do if((ee|0)!=(I|0)){if(B=w[ee+32>>2]|0,!B)return Ae=1,Ae|0;for(fe=B;;){if((fe|0)==(I|0)){fe=8;break}if(B=w[fe+32>>2]|0,B)ee=fe,fe=B;else{B=1,fe=10;break}}if((fe|0)==8){w[ee+32>>2]=w[Ae>>2];break}else if((fe|0)==10)return B|0}else w[B>>2]=w[Ae>>2];while(0);return Xu(I),Ae=D+8|0,w[Ae>>2]=(w[Ae>>2]|0)+-1,Ae=0,Ae|0}function md(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0;Ae=th(40)|0,Ae||di(23390,23360,98,23403),w[Ae>>2]=w[I>>2],w[Ae+4>>2]=w[I+4>>2],w[Ae+8>>2]=w[I+8>>2],w[Ae+12>>2]=w[I+12>>2],fe=Ae+16|0,w[fe>>2]=w[B>>2],w[fe+4>>2]=w[B+4>>2],w[fe+8>>2]=w[B+8>>2],w[fe+12>>2]=w[B+12>>2],w[Ae+32>>2]=0,fe=~~(+Se(+(+ct(10,+ +(15-(w[D+12>>2]|0)|0))*(+x[I>>3]+ +x[I+8>>3])))%+(w[D+4>>2]|0))>>>0,fe=(w[D>>2]|0)+(fe<<2)|0,ee=w[fe>>2]|0;do if(!ee)w[fe>>2]=Ae;else{for(;!(Kp(ee,I)|0&&Kp(ee+16|0,B)|0);)if(fe=w[ee+32>>2]|0,ee=fe|0?fe:ee,!(w[ee+32>>2]|0)){Le=10;break}if((Le|0)==10){w[ee+32>>2]=Ae;break}return Xu(Ae),Le=ee,Le|0}while(0);return Le=D+8|0,w[Le>>2]=(w[Le>>2]|0)+1,Le=Ae,Le|0}function Vf(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0;if(fe=~~(+Se(+(+ct(10,+ +(15-(w[D+12>>2]|0)|0))*(+x[I>>3]+ +x[I+8>>3])))%+(w[D+4>>2]|0))>>>0,fe=w[(w[D>>2]|0)+(fe<<2)>>2]|0,!fe)return B=0,B|0;if(!B){for(D=fe;;){if(Kp(D,I)|0){ee=10;break}if(D=w[D+32>>2]|0,!D){D=0,ee=10;break}}if((ee|0)==10)return D|0}for(D=fe;;){if(Kp(D,I)|0&&Kp(D+16|0,B)|0){ee=10;break}if(D=w[D+32>>2]|0,!D){D=0,ee=10;break}}return(ee|0)==10?D|0:0}function id(D,I){D=D|0,I=I|0;var B=0;if(B=~~(+Se(+(+ct(10,+ +(15-(w[D+12>>2]|0)|0))*(+x[I>>3]+ +x[I+8>>3])))%+(w[D+4>>2]|0))>>>0,D=w[(w[D>>2]|0)+(B<<2)>>2]|0,!D)return B=0,B|0;for(;;){if(Kp(D,I)|0){I=5;break}if(D=w[D+32>>2]|0,!D){D=0,I=5;break}}return(I|0)==5?D|0:0}function df(){return 23424}function $d(D){return D=+D,+ +Vi(+D)}function ef(D){return D=+D,~~+$d(D)|0}function th(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0,va=0,es=0,Io=0,io=0,ao=0,Va=0,zl=0;zl=sn,sn=sn+16|0,ci=zl;do if(D>>>0<245){if(sr=D>>>0<11?16:D+11&-8,D=sr>>>3,An=w[5857]|0,B=An>>>D,B&3|0)return I=(B&1^1)+D|0,D=23468+(I<<1<<2)|0,B=D+8|0,ee=w[B>>2]|0,fe=ee+8|0,Ae=w[fe>>2]|0,(Ae|0)==(D|0)?w[5857]=An&~(1<>2]=D,w[B>>2]=Ae),Va=I<<3,w[ee+4>>2]=Va|3,Va=ee+Va+4|0,w[Va>>2]=w[Va>>2]|1,Va=fe,sn=zl,Va|0;if(Er=w[5859]|0,sr>>>0>Er>>>0){if(B|0)return I=2<>>12&16,I=I>>>Ve,B=I>>>5&8,I=I>>>B,Ae=I>>>2&4,I=I>>>Ae,D=I>>>1&2,I=I>>>D,ee=I>>>1&1,ee=(B|Ve|Ae|D|ee)+(I>>>ee)|0,I=23468+(ee<<1<<2)|0,D=I+8|0,Ae=w[D>>2]|0,Ve=Ae+8|0,B=w[Ve>>2]|0,(B|0)==(I|0)?(D=An&~(1<>2]=I,w[D>>2]=B,D=An),Va=ee<<3,Le=Va-sr|0,w[Ae+4>>2]=sr|3,fe=Ae+sr|0,w[fe+4>>2]=Le|1,w[Ae+Va>>2]=Le,Er|0&&(ee=w[5862]|0,I=Er>>>3,B=23468+(I<<1<<2)|0,I=1<>2]|0):(w[5857]=D|I,I=B,D=B+8|0),w[D>>2]=ee,w[I+12>>2]=ee,w[ee+8>>2]=I,w[ee+12>>2]=B),w[5859]=Le,w[5862]=fe,Va=Ve,sn=zl,Va|0;if(Ae=w[5858]|0,Ae){for(B=(Ae&0-Ae)+-1|0,fe=B>>>12&16,B=B>>>fe,ee=B>>>5&8,B=B>>>ee,Le=B>>>2&4,B=B>>>Le,Ve=B>>>1&2,B=B>>>Ve,Bt=B>>>1&1,Bt=w[23732+((ee|fe|Le|Ve|Bt)+(B>>>Bt)<<2)>>2]|0,B=Bt,Ve=Bt,Bt=(w[Bt+4>>2]&-8)-sr|0;D=w[B+16>>2]|0,!(!D&&(D=w[B+20>>2]|0,!D));)Le=(w[D+4>>2]&-8)-sr|0,fe=Le>>>0>>0,B=D,Ve=fe?D:Ve,Bt=fe?Le:Bt;if(Le=Ve+sr|0,Le>>>0>Ve>>>0){fe=w[Ve+24>>2]|0,I=w[Ve+12>>2]|0;do if((I|0)==(Ve|0)){if(D=Ve+20|0,I=w[D>>2]|0,!I&&(D=Ve+16|0,I=w[D>>2]|0,!I)){B=0;break}for(;;)if(ee=I+20|0,B=w[ee>>2]|0,B)I=B,D=ee;else if(ee=I+16|0,B=w[ee>>2]|0,B)I=B,D=ee;else break;w[D>>2]=0,B=I}else B=w[Ve+8>>2]|0,w[B+12>>2]=I,w[I+8>>2]=B,B=I;while(0);do if(fe|0){if(I=w[Ve+28>>2]|0,D=23732+(I<<2)|0,(Ve|0)==(w[D>>2]|0)){if(w[D>>2]=B,!B){w[5858]=Ae&~(1<>2]|0)==(Ve|0)?Va:fe+20|0)>>2]=B,!B)break;w[B+24>>2]=fe,I=w[Ve+16>>2]|0,I|0&&(w[B+16>>2]=I,w[I+24>>2]=B),I=w[Ve+20>>2]|0,I|0&&(w[B+20>>2]=I,w[I+24>>2]=B)}while(0);return Bt>>>0<16?(Va=Bt+sr|0,w[Ve+4>>2]=Va|3,Va=Ve+Va+4|0,w[Va>>2]=w[Va>>2]|1):(w[Ve+4>>2]=sr|3,w[Le+4>>2]=Bt|1,w[Le+Bt>>2]=Bt,Er|0&&(ee=w[5862]|0,I=Er>>>3,B=23468+(I<<1<<2)|0,I=1<>2]|0):(w[5857]=I|An,I=B,D=B+8|0),w[D>>2]=ee,w[I+12>>2]=ee,w[ee+8>>2]=I,w[ee+12>>2]=B),w[5859]=Bt,w[5862]=Le),Va=Ve+8|0,sn=zl,Va|0}else An=sr}else An=sr}else An=sr}else if(D>>>0<=4294967231)if(D=D+11|0,sr=D&-8,ee=w[5858]|0,ee){fe=0-sr|0,D=D>>>8,D?sr>>>0>16777215?Bt=31:(An=(D+1048320|0)>>>16&8,va=D<>>16&4,va=va<>>16&2,Bt=14-(Ve|An|Bt)+(va<>>15)|0,Bt=sr>>>(Bt+7|0)&1|Bt<<1):Bt=0,B=w[23732+(Bt<<2)>>2]|0;e:do if(!B)B=0,D=0,va=61;else for(D=0,Ve=sr<<((Bt|0)==31?0:25-(Bt>>>1)|0),Ae=0;;){if(Le=(w[B+4>>2]&-8)-sr|0,Le>>>0>>0)if(Le)D=B,fe=Le;else{D=B,fe=0,va=65;break e}if(va=w[B+20>>2]|0,B=w[B+16+(Ve>>>31<<2)>>2]|0,Ae=(va|0)==0|(va|0)==(B|0)?Ae:va,B)Ve=Ve<<1;else{B=Ae,va=61;break}}while(0);if((va|0)==61){if((B|0)==0&(D|0)==0){if(D=2<>>12&16,An=An>>>Le,Ae=An>>>5&8,An=An>>>Ae,Ve=An>>>2&4,An=An>>>Ve,Bt=An>>>1&2,An=An>>>Bt,B=An>>>1&1,D=0,B=w[23732+((Ae|Le|Ve|Bt|B)+(An>>>B)<<2)>>2]|0}B?va=65:(Ve=D,Le=fe)}if((va|0)==65)for(Ae=B;;)if(An=(w[Ae+4>>2]&-8)-sr|0,B=An>>>0>>0,fe=B?An:fe,D=B?Ae:D,B=w[Ae+16>>2]|0,B||(B=w[Ae+20>>2]|0),B)Ae=B;else{Ve=D,Le=fe;break}if(Ve|0&&Le>>>0<((w[5859]|0)-sr|0)>>>0&&(Er=Ve+sr|0,Er>>>0>Ve>>>0)){Ae=w[Ve+24>>2]|0,I=w[Ve+12>>2]|0;do if((I|0)==(Ve|0)){if(D=Ve+20|0,I=w[D>>2]|0,!I&&(D=Ve+16|0,I=w[D>>2]|0,!I)){I=0;break}for(;;)if(fe=I+20|0,B=w[fe>>2]|0,B)I=B,D=fe;else if(fe=I+16|0,B=w[fe>>2]|0,B)I=B,D=fe;else break;w[D>>2]=0}else Va=w[Ve+8>>2]|0,w[Va+12>>2]=I,w[I+8>>2]=Va;while(0);do if(Ae){if(D=w[Ve+28>>2]|0,B=23732+(D<<2)|0,(Ve|0)==(w[B>>2]|0)){if(w[B>>2]=I,!I){ee=ee&~(1<>2]|0)==(Ve|0)?Va:Ae+20|0)>>2]=I,!I)break;w[I+24>>2]=Ae,D=w[Ve+16>>2]|0,D|0&&(w[I+16>>2]=D,w[D+24>>2]=I),D=w[Ve+20>>2]|0,D&&(w[I+20>>2]=D,w[D+24>>2]=I)}while(0);e:do if(Le>>>0<16)Va=Le+sr|0,w[Ve+4>>2]=Va|3,Va=Ve+Va+4|0,w[Va>>2]=w[Va>>2]|1;else{if(w[Ve+4>>2]=sr|3,w[Er+4>>2]=Le|1,w[Er+Le>>2]=Le,I=Le>>>3,Le>>>0<256){B=23468+(I<<1<<2)|0,D=w[5857]|0,I=1<>2]|0):(w[5857]=D|I,I=B,D=B+8|0),w[D>>2]=Er,w[I+12>>2]=Er,w[Er+8>>2]=I,w[Er+12>>2]=B;break}if(I=Le>>>8,I?Le>>>0>16777215?B=31:(ao=(I+1048320|0)>>>16&8,Va=I<>>16&4,Va=Va<>>16&2,B=14-(io|ao|B)+(Va<>>15)|0,B=Le>>>(B+7|0)&1|B<<1):B=0,I=23732+(B<<2)|0,w[Er+28>>2]=B,D=Er+16|0,w[D+4>>2]=0,w[D>>2]=0,D=1<>2]=Er,w[Er+24>>2]=I,w[Er+12>>2]=Er,w[Er+8>>2]=Er;break}I=w[I>>2]|0;t:do if((w[I+4>>2]&-8|0)!=(Le|0)){for(ee=Le<<((B|0)==31?0:25-(B>>>1)|0);B=I+16+(ee>>>31<<2)|0,D=w[B>>2]|0,!!D;)if((w[D+4>>2]&-8|0)==(Le|0)){I=D;break t}else ee=ee<<1,I=D;w[B>>2]=Er,w[Er+24>>2]=I,w[Er+12>>2]=Er,w[Er+8>>2]=Er;break e}while(0);ao=I+8|0,Va=w[ao>>2]|0,w[Va+12>>2]=Er,w[ao>>2]=Er,w[Er+8>>2]=Va,w[Er+12>>2]=I,w[Er+24>>2]=0}while(0);return Va=Ve+8|0,sn=zl,Va|0}else An=sr}else An=sr;else An=-1;while(0);if(B=w[5859]|0,B>>>0>=An>>>0)return I=B-An|0,D=w[5862]|0,I>>>0>15?(Va=D+An|0,w[5862]=Va,w[5859]=I,w[Va+4>>2]=I|1,w[D+B>>2]=I,w[D+4>>2]=An|3):(w[5859]=0,w[5862]=0,w[D+4>>2]=B|3,Va=D+B+4|0,w[Va>>2]=w[Va>>2]|1),Va=D+8|0,sn=zl,Va|0;if(Le=w[5860]|0,Le>>>0>An>>>0)return io=Le-An|0,w[5860]=io,Va=w[5863]|0,ao=Va+An|0,w[5863]=ao,w[ao+4>>2]=io|1,w[Va+4>>2]=An|3,Va=Va+8|0,sn=zl,Va|0;if(w[5975]|0?D=w[5977]|0:(w[5977]=4096,w[5976]=4096,w[5978]=-1,w[5979]=-1,w[5980]=0,w[5968]=0,w[5975]=ci&-16^1431655768,D=4096),Ve=An+48|0,Bt=An+47|0,Ae=D+Bt|0,fe=0-D|0,sr=Ae&fe,sr>>>0<=An>>>0||(D=w[5967]|0,D|0&&(Er=w[5965]|0,ci=Er+sr|0,ci>>>0<=Er>>>0|ci>>>0>D>>>0)))return Va=0,sn=zl,Va|0;e:do if(w[5968]&4)I=0,va=143;else{B=w[5863]|0;t:do if(B){for(ee=23876;ci=w[ee>>2]|0,!(ci>>>0<=B>>>0&&(ci+(w[ee+4>>2]|0)|0)>>>0>B>>>0);)if(D=w[ee+8>>2]|0,D)ee=D;else{va=128;break t}if(I=Ae-Le&fe,I>>>0<2147483647)if(D=Qn(I|0)|0,(D|0)==((w[ee>>2]|0)+(w[ee+4>>2]|0)|0)){if((D|0)!=-1){Le=I,Ae=D,va=145;break e}}else ee=D,va=136;else I=0}else va=128;while(0);do if((va|0)==128)if(B=Qn(0)|0,(B|0)!=-1&&(I=B,bi=w[5976]|0,Ei=bi+-1|0,I=(Ei&I|0?(Ei+I&0-bi)-I|0:0)+sr|0,bi=w[5965]|0,Ei=I+bi|0,I>>>0>An>>>0&I>>>0<2147483647)){if(ci=w[5967]|0,ci|0&&Ei>>>0<=bi>>>0|Ei>>>0>ci>>>0){I=0;break}if(D=Qn(I|0)|0,(D|0)==(B|0)){Le=I,Ae=B,va=145;break e}else ee=D,va=136}else I=0;while(0);do if((va|0)==136){if(B=0-I|0,!(Ve>>>0>I>>>0&(I>>>0<2147483647&(ee|0)!=-1)))if((ee|0)==-1){I=0;break}else{Le=I,Ae=ee,va=145;break e}if(D=w[5977]|0,D=Bt-I+D&0-D,D>>>0>=2147483647){Le=I,Ae=ee,va=145;break e}if((Qn(D|0)|0)==-1){Qn(B|0)|0,I=0;break}else{Le=D+I|0,Ae=ee,va=145;break e}}while(0);w[5968]=w[5968]|4,va=143}while(0);if((va|0)==143&&sr>>>0<2147483647&&(io=Qn(sr|0)|0,Ei=Qn(0)|0,es=Ei-io|0,Io=es>>>0>(An+40|0)>>>0,!((io|0)==-1|Io^1|io>>>0>>0&((io|0)!=-1&(Ei|0)!=-1)^1))&&(Le=Io?es:I,Ae=io,va=145),(va|0)==145){I=(w[5965]|0)+Le|0,w[5965]=I,I>>>0>(w[5966]|0)>>>0&&(w[5966]=I),Bt=w[5863]|0;e:do if(Bt){for(I=23876;;){if(D=w[I>>2]|0,B=w[I+4>>2]|0,(Ae|0)==(D+B|0)){va=154;break}if(ee=w[I+8>>2]|0,ee)I=ee;else break}if((va|0)==154&&(ao=I+4|0,(w[I+12>>2]&8|0)==0)&&Ae>>>0>Bt>>>0&D>>>0<=Bt>>>0){w[ao>>2]=B+Le,Va=(w[5860]|0)+Le|0,io=Bt+8|0,io=io&7|0?0-io&7:0,ao=Bt+io|0,io=Va-io|0,w[5863]=ao,w[5860]=io,w[ao+4>>2]=io|1,w[Bt+Va+4>>2]=40,w[5864]=w[5979];break}for(Ae>>>0<(w[5861]|0)>>>0&&(w[5861]=Ae),B=Ae+Le|0,I=23876;;){if((w[I>>2]|0)==(B|0)){va=162;break}if(D=w[I+8>>2]|0,D)I=D;else break}if((va|0)==162&&!(w[I+12>>2]&8|0)){w[I>>2]=Ae,Er=I+4|0,w[Er>>2]=(w[Er>>2]|0)+Le,Er=Ae+8|0,Er=Ae+(Er&7|0?0-Er&7:0)|0,I=B+8|0,I=B+(I&7|0?0-I&7:0)|0,sr=Er+An|0,Ve=I-Er-An|0,w[Er+4>>2]=An|3;t:do if((Bt|0)==(I|0))Va=(w[5860]|0)+Ve|0,w[5860]=Va,w[5863]=sr,w[sr+4>>2]=Va|1;else{if((w[5862]|0)==(I|0)){Va=(w[5859]|0)+Ve|0,w[5859]=Va,w[5862]=sr,w[sr+4>>2]=Va|1,w[sr+Va>>2]=Va;break}if(D=w[I+4>>2]|0,(D&3|0)==1){Le=D&-8,ee=D>>>3;r:do if(D>>>0<256)if(D=w[I+8>>2]|0,B=w[I+12>>2]|0,(B|0)==(D|0)){w[5857]=w[5857]&~(1<>2]=B,w[B+8>>2]=D;break}else{Ae=w[I+24>>2]|0,D=w[I+12>>2]|0;do if((D|0)==(I|0)){if(B=I+16|0,ee=B+4|0,D=w[ee>>2]|0,D)B=ee;else if(D=w[B>>2]|0,!D){D=0;break}for(;;)if(fe=D+20|0,ee=w[fe>>2]|0,ee)D=ee,B=fe;else if(fe=D+16|0,ee=w[fe>>2]|0,ee)D=ee,B=fe;else break;w[B>>2]=0}else Va=w[I+8>>2]|0,w[Va+12>>2]=D,w[D+8>>2]=Va;while(0);if(!Ae)break;B=w[I+28>>2]|0,ee=23732+(B<<2)|0;do if((w[ee>>2]|0)!=(I|0)){if(Va=Ae+16|0,w[((w[Va>>2]|0)==(I|0)?Va:Ae+20|0)>>2]=D,!D)break r}else{if(w[ee>>2]=D,D|0)break;w[5858]=w[5858]&~(1<>2]=Ae,B=I+16|0,ee=w[B>>2]|0,ee|0&&(w[D+16>>2]=ee,w[ee+24>>2]=D),B=w[B+4>>2]|0,!B)break;w[D+20>>2]=B,w[B+24>>2]=D}while(0);I=I+Le|0,fe=Le+Ve|0}else fe=Ve;if(I=I+4|0,w[I>>2]=w[I>>2]&-2,w[sr+4>>2]=fe|1,w[sr+fe>>2]=fe,I=fe>>>3,fe>>>0<256){B=23468+(I<<1<<2)|0,D=w[5857]|0,I=1<>2]|0):(w[5857]=D|I,I=B,D=B+8|0),w[D>>2]=sr,w[I+12>>2]=sr,w[sr+8>>2]=I,w[sr+12>>2]=B;break}I=fe>>>8;do if(!I)ee=0;else{if(fe>>>0>16777215){ee=31;break}ao=(I+1048320|0)>>>16&8,Va=I<>>16&4,Va=Va<>>16&2,ee=14-(io|ao|ee)+(Va<>>15)|0,ee=fe>>>(ee+7|0)&1|ee<<1}while(0);if(I=23732+(ee<<2)|0,w[sr+28>>2]=ee,D=sr+16|0,w[D+4>>2]=0,w[D>>2]=0,D=w[5858]|0,B=1<>2]=sr,w[sr+24>>2]=I,w[sr+12>>2]=sr,w[sr+8>>2]=sr;break}I=w[I>>2]|0;r:do if((w[I+4>>2]&-8|0)!=(fe|0)){for(ee=fe<<((ee|0)==31?0:25-(ee>>>1)|0);B=I+16+(ee>>>31<<2)|0,D=w[B>>2]|0,!!D;)if((w[D+4>>2]&-8|0)==(fe|0)){I=D;break r}else ee=ee<<1,I=D;w[B>>2]=sr,w[sr+24>>2]=I,w[sr+12>>2]=sr,w[sr+8>>2]=sr;break t}while(0);ao=I+8|0,Va=w[ao>>2]|0,w[Va+12>>2]=sr,w[ao>>2]=sr,w[sr+8>>2]=Va,w[sr+12>>2]=I,w[sr+24>>2]=0}while(0);return Va=Er+8|0,sn=zl,Va|0}for(I=23876;D=w[I>>2]|0,!(D>>>0<=Bt>>>0&&(Va=D+(w[I+4>>2]|0)|0,Va>>>0>Bt>>>0));)I=w[I+8>>2]|0;fe=Va+-47|0,D=fe+8|0,D=fe+(D&7|0?0-D&7:0)|0,fe=Bt+16|0,D=D>>>0>>0?Bt:D,I=D+8|0,B=Le+-40|0,io=Ae+8|0,io=io&7|0?0-io&7:0,ao=Ae+io|0,io=B-io|0,w[5863]=ao,w[5860]=io,w[ao+4>>2]=io|1,w[Ae+B+4>>2]=40,w[5864]=w[5979],B=D+4|0,w[B>>2]=27,w[I>>2]=w[5969],w[I+4>>2]=w[5970],w[I+8>>2]=w[5971],w[I+12>>2]=w[5972],w[5969]=Ae,w[5970]=Le,w[5972]=0,w[5971]=I,I=D+24|0;do ao=I,I=I+4|0,w[I>>2]=7;while((ao+8|0)>>>0>>0);if((D|0)!=(Bt|0)){if(Ae=D-Bt|0,w[B>>2]=w[B>>2]&-2,w[Bt+4>>2]=Ae|1,w[D>>2]=Ae,I=Ae>>>3,Ae>>>0<256){B=23468+(I<<1<<2)|0,D=w[5857]|0,I=1<>2]|0):(w[5857]=D|I,I=B,D=B+8|0),w[D>>2]=Bt,w[I+12>>2]=Bt,w[Bt+8>>2]=I,w[Bt+12>>2]=B;break}if(I=Ae>>>8,I?Ae>>>0>16777215?ee=31:(ao=(I+1048320|0)>>>16&8,Va=I<>>16&4,Va=Va<>>16&2,ee=14-(io|ao|ee)+(Va<>>15)|0,ee=Ae>>>(ee+7|0)&1|ee<<1):ee=0,B=23732+(ee<<2)|0,w[Bt+28>>2]=ee,w[Bt+20>>2]=0,w[fe>>2]=0,I=w[5858]|0,D=1<>2]=Bt,w[Bt+24>>2]=B,w[Bt+12>>2]=Bt,w[Bt+8>>2]=Bt;break}I=w[B>>2]|0;t:do if((w[I+4>>2]&-8|0)!=(Ae|0)){for(ee=Ae<<((ee|0)==31?0:25-(ee>>>1)|0);B=I+16+(ee>>>31<<2)|0,D=w[B>>2]|0,!!D;)if((w[D+4>>2]&-8|0)==(Ae|0)){I=D;break t}else ee=ee<<1,I=D;w[B>>2]=Bt,w[Bt+24>>2]=I,w[Bt+12>>2]=Bt,w[Bt+8>>2]=Bt;break e}while(0);ao=I+8|0,Va=w[ao>>2]|0,w[Va+12>>2]=Bt,w[ao>>2]=Bt,w[Bt+8>>2]=Va,w[Bt+12>>2]=I,w[Bt+24>>2]=0}}else Va=w[5861]|0,(Va|0)==0|Ae>>>0>>0&&(w[5861]=Ae),w[5969]=Ae,w[5970]=Le,w[5972]=0,w[5866]=w[5975],w[5865]=-1,w[5870]=23468,w[5869]=23468,w[5872]=23476,w[5871]=23476,w[5874]=23484,w[5873]=23484,w[5876]=23492,w[5875]=23492,w[5878]=23500,w[5877]=23500,w[5880]=23508,w[5879]=23508,w[5882]=23516,w[5881]=23516,w[5884]=23524,w[5883]=23524,w[5886]=23532,w[5885]=23532,w[5888]=23540,w[5887]=23540,w[5890]=23548,w[5889]=23548,w[5892]=23556,w[5891]=23556,w[5894]=23564,w[5893]=23564,w[5896]=23572,w[5895]=23572,w[5898]=23580,w[5897]=23580,w[5900]=23588,w[5899]=23588,w[5902]=23596,w[5901]=23596,w[5904]=23604,w[5903]=23604,w[5906]=23612,w[5905]=23612,w[5908]=23620,w[5907]=23620,w[5910]=23628,w[5909]=23628,w[5912]=23636,w[5911]=23636,w[5914]=23644,w[5913]=23644,w[5916]=23652,w[5915]=23652,w[5918]=23660,w[5917]=23660,w[5920]=23668,w[5919]=23668,w[5922]=23676,w[5921]=23676,w[5924]=23684,w[5923]=23684,w[5926]=23692,w[5925]=23692,w[5928]=23700,w[5927]=23700,w[5930]=23708,w[5929]=23708,w[5932]=23716,w[5931]=23716,Va=Le+-40|0,io=Ae+8|0,io=io&7|0?0-io&7:0,ao=Ae+io|0,io=Va-io|0,w[5863]=ao,w[5860]=io,w[ao+4>>2]=io|1,w[Ae+Va+4>>2]=40,w[5864]=w[5979];while(0);if(I=w[5860]|0,I>>>0>An>>>0)return io=I-An|0,w[5860]=io,Va=w[5863]|0,ao=Va+An|0,w[5863]=ao,w[ao+4>>2]=io|1,w[Va+4>>2]=An|3,Va=Va+8|0,sn=zl,Va|0}return Va=df()|0,w[Va>>2]=12,Va=0,sn=zl,Va|0}function Xu(D){D=D|0;var I=0,B=0,ee=0,fe=0,Ae=0,Le=0,Ve=0,Bt=0;if(D){B=D+-8|0,fe=w[5861]|0,D=w[D+-4>>2]|0,I=D&-8,Bt=B+I|0;do if(D&1)Ve=B,Le=B;else{if(ee=w[B>>2]|0,!(D&3)||(Le=B+(0-ee)|0,Ae=ee+I|0,Le>>>0>>0))return;if((w[5862]|0)==(Le|0)){if(D=Bt+4|0,I=w[D>>2]|0,(I&3|0)!=3){Ve=Le,I=Ae;break}w[5859]=Ae,w[D>>2]=I&-2,w[Le+4>>2]=Ae|1,w[Le+Ae>>2]=Ae;return}if(B=ee>>>3,ee>>>0<256)if(D=w[Le+8>>2]|0,I=w[Le+12>>2]|0,(I|0)==(D|0)){w[5857]=w[5857]&~(1<>2]=I,w[I+8>>2]=D,Ve=Le,I=Ae;break}fe=w[Le+24>>2]|0,D=w[Le+12>>2]|0;do if((D|0)==(Le|0)){if(I=Le+16|0,B=I+4|0,D=w[B>>2]|0,D)I=B;else if(D=w[I>>2]|0,!D){D=0;break}for(;;)if(ee=D+20|0,B=w[ee>>2]|0,B)D=B,I=ee;else if(ee=D+16|0,B=w[ee>>2]|0,B)D=B,I=ee;else break;w[I>>2]=0}else Ve=w[Le+8>>2]|0,w[Ve+12>>2]=D,w[D+8>>2]=Ve;while(0);if(fe){if(I=w[Le+28>>2]|0,B=23732+(I<<2)|0,(w[B>>2]|0)==(Le|0)){if(w[B>>2]=D,!D){w[5858]=w[5858]&~(1<>2]|0)==(Le|0)?Ve:fe+20|0)>>2]=D,!D){Ve=Le,I=Ae;break}w[D+24>>2]=fe,I=Le+16|0,B=w[I>>2]|0,B|0&&(w[D+16>>2]=B,w[B+24>>2]=D),I=w[I+4>>2]|0,I?(w[D+20>>2]=I,w[I+24>>2]=D,Ve=Le,I=Ae):(Ve=Le,I=Ae)}else Ve=Le,I=Ae}while(0);if(!(Le>>>0>=Bt>>>0)&&(D=Bt+4|0,ee=w[D>>2]|0,!!(ee&1))){if(ee&2)w[D>>2]=ee&-2,w[Ve+4>>2]=I|1,w[Le+I>>2]=I,fe=I;else{if((w[5863]|0)==(Bt|0)){if(Bt=(w[5860]|0)+I|0,w[5860]=Bt,w[5863]=Ve,w[Ve+4>>2]=Bt|1,(Ve|0)!=(w[5862]|0))return;w[5862]=0,w[5859]=0;return}if((w[5862]|0)==(Bt|0)){Bt=(w[5859]|0)+I|0,w[5859]=Bt,w[5862]=Le,w[Ve+4>>2]=Bt|1,w[Le+Bt>>2]=Bt;return}fe=(ee&-8)+I|0,B=ee>>>3;do if(ee>>>0<256)if(I=w[Bt+8>>2]|0,D=w[Bt+12>>2]|0,(D|0)==(I|0)){w[5857]=w[5857]&~(1<>2]=D,w[D+8>>2]=I;break}else{Ae=w[Bt+24>>2]|0,D=w[Bt+12>>2]|0;do if((D|0)==(Bt|0)){if(I=Bt+16|0,B=I+4|0,D=w[B>>2]|0,D)I=B;else if(D=w[I>>2]|0,!D){B=0;break}for(;;)if(ee=D+20|0,B=w[ee>>2]|0,B)D=B,I=ee;else if(ee=D+16|0,B=w[ee>>2]|0,B)D=B,I=ee;else break;w[I>>2]=0,B=D}else B=w[Bt+8>>2]|0,w[B+12>>2]=D,w[D+8>>2]=B,B=D;while(0);if(Ae|0){if(D=w[Bt+28>>2]|0,I=23732+(D<<2)|0,(w[I>>2]|0)==(Bt|0)){if(w[I>>2]=B,!B){w[5858]=w[5858]&~(1<>2]|0)==(Bt|0)?ee:Ae+20|0)>>2]=B,!B)break;w[B+24>>2]=Ae,D=Bt+16|0,I=w[D>>2]|0,I|0&&(w[B+16>>2]=I,w[I+24>>2]=B),D=w[D+4>>2]|0,D|0&&(w[B+20>>2]=D,w[D+24>>2]=B)}}while(0);if(w[Ve+4>>2]=fe|1,w[Le+fe>>2]=fe,(Ve|0)==(w[5862]|0)){w[5859]=fe;return}}if(D=fe>>>3,fe>>>0<256){B=23468+(D<<1<<2)|0,I=w[5857]|0,D=1<>2]|0):(w[5857]=I|D,D=B,I=B+8|0),w[I>>2]=Ve,w[D+12>>2]=Ve,w[Ve+8>>2]=D,w[Ve+12>>2]=B;return}D=fe>>>8,D?fe>>>0>16777215?ee=31:(Le=(D+1048320|0)>>>16&8,Bt=D<>>16&4,Bt=Bt<>>16&2,ee=14-(Ae|Le|ee)+(Bt<>>15)|0,ee=fe>>>(ee+7|0)&1|ee<<1):ee=0,D=23732+(ee<<2)|0,w[Ve+28>>2]=ee,w[Ve+20>>2]=0,w[Ve+16>>2]=0,I=w[5858]|0,B=1<>2]=Ve,w[Ve+24>>2]=D,w[Ve+12>>2]=Ve,w[Ve+8>>2]=Ve;else{D=w[D>>2]|0;t:do if((w[D+4>>2]&-8|0)!=(fe|0)){for(ee=fe<<((ee|0)==31?0:25-(ee>>>1)|0);B=D+16+(ee>>>31<<2)|0,I=w[B>>2]|0,!!I;)if((w[I+4>>2]&-8|0)==(fe|0)){D=I;break t}else ee=ee<<1,D=I;w[B>>2]=Ve,w[Ve+24>>2]=D,w[Ve+12>>2]=Ve,w[Ve+8>>2]=Ve;break e}while(0);Le=D+8|0,Bt=w[Le>>2]|0,w[Bt+12>>2]=Ve,w[Le>>2]=Ve,w[Ve+8>>2]=Bt,w[Ve+12>>2]=D,w[Ve+24>>2]=0}while(0);if(Bt=(w[5865]|0)+-1|0,w[5865]=Bt,!(Bt|0)){for(D=23884;D=w[D>>2]|0,D;)D=D+8|0;w[5865]=-1}}}}function Pl(D,I){D=D|0,I=I|0;var B=0;return D?(B=Xr(I,D)|0,(I|D)>>>0>65535&&(B=((B>>>0)/(D>>>0)|0|0)==(I|0)?B:-1)):B=0,D=th(B)|0,!D||!(w[D+-4>>2]&3)||ea(D|0,0,B|0)|0,D|0}function mu(D,I,B,ee){return D=D|0,I=I|0,B=B|0,ee=ee|0,B=D+B>>>0,oi(I+ee+(B>>>0>>0|0)>>>0|0),B|0|0}function pf(D,I,B,ee){return D=D|0,I=I|0,B=B|0,ee=ee|0,ee=I-ee-(B>>>0>D>>>0|0)>>>0,oi(ee|0),D-B>>>0|0|0}function jh(D){return D=D|0,(D?31-(li(D^D-1)|0)|0:32)|0}function qp(D,I,B,ee,fe){D=D|0,I=I|0,B=B|0,ee=ee|0,fe=fe|0;var Ae=0,Le=0,Ve=0,Bt=0,sr=0,Er=0,An=0,ci=0,bi=0,Ei=0;if(Er=D,Bt=I,sr=Bt,Le=B,ci=ee,Ve=ci,!sr)return Ae=(fe|0)!=0,Ve?Ae?(w[fe>>2]=D|0,w[fe+4>>2]=I&0,ci=0,fe=0,oi(ci|0),fe|0):(ci=0,fe=0,oi(ci|0),fe|0):(Ae&&(w[fe>>2]=(Er>>>0)%(Le>>>0),w[fe+4>>2]=0),ci=0,fe=(Er>>>0)/(Le>>>0)>>>0,oi(ci|0),fe|0);Ae=(Ve|0)==0;do if(Le){if(!Ae){if(Ae=(li(Ve|0)|0)-(li(sr|0)|0)|0,Ae>>>0<=31){An=Ae+1|0,Ve=31-Ae|0,I=Ae-31>>31,Le=An,D=Er>>>(An>>>0)&I|sr<>>(An>>>0)&I,Ae=0,Ve=Er<>2]=D|0,w[fe+4>>2]=Bt|I&0,ci=0,fe=0,oi(ci|0),fe|0):(ci=0,fe=0,oi(ci|0),fe|0)}if(Ae=Le-1|0,Ae&Le|0){Ve=(li(Le|0)|0)+33-(li(sr|0)|0)|0,Ei=64-Ve|0,An=32-Ve|0,Bt=An>>31,bi=Ve-32|0,I=bi>>31,Le=Ve,D=An-1>>31&sr>>>(bi>>>0)|(sr<>>(Ve>>>0))&I,I=I&sr>>>(Ve>>>0),Ae=Er<>>(bi>>>0))&Bt|Er<>31;break}return fe|0&&(w[fe>>2]=Ae&Er,w[fe+4>>2]=0),(Le|0)==1?(bi=Bt|I&0,Ei=D|0|0,oi(bi|0),Ei|0):(Ei=jh(Le|0)|0,bi=sr>>>(Ei>>>0)|0,Ei=sr<<32-Ei|Er>>>(Ei>>>0)|0,oi(bi|0),Ei|0)}else{if(Ae)return fe|0&&(w[fe>>2]=(sr>>>0)%(Le>>>0),w[fe+4>>2]=0),bi=0,Ei=(sr>>>0)/(Le>>>0)>>>0,oi(bi|0),Ei|0;if(!Er)return fe|0&&(w[fe>>2]=0,w[fe+4>>2]=(sr>>>0)%(Ve>>>0)),bi=0,Ei=(sr>>>0)/(Ve>>>0)>>>0,oi(bi|0),Ei|0;if(Ae=Ve-1|0,!(Ae&Ve))return fe|0&&(w[fe>>2]=D|0,w[fe+4>>2]=Ae&sr|I&0),bi=0,Ei=sr>>>((jh(Ve|0)|0)>>>0),oi(bi|0),Ei|0;if(Ae=(li(Ve|0)|0)-(li(sr|0)|0)|0,Ae>>>0<=30){I=Ae+1|0,Ve=31-Ae|0,Le=I,D=sr<>>(I>>>0),I=sr>>>(I>>>0),Ae=0,Ve=Er<>2]=D|0,w[fe+4>>2]=Bt|I&0,bi=0,Ei=0,oi(bi|0),Ei|0):(bi=0,Ei=0,oi(bi|0),Ei|0)}while(0);if(!Le)sr=Ve,Bt=0,Ve=0;else{An=B|0|0,Er=ci|ee&0,sr=mu(An|0,Er|0,-1,-1)|0,B=pr()|0,Bt=Ve,Ve=0;do ee=Bt,Bt=Ae>>>31|Bt<<1,Ae=Ve|Ae<<1,ee=D<<1|ee>>>31|0,ci=D>>>31|I<<1|0,pf(sr|0,B|0,ee|0,ci|0)|0,Ei=pr()|0,bi=Ei>>31|((Ei|0)<0?-1:0)<<1,Ve=bi&1,D=pf(ee|0,ci|0,bi&An|0,(((Ei|0)<0?-1:0)>>31|((Ei|0)<0?-1:0)<<1)&Er|0)|0,I=pr()|0,Le=Le-1|0;while(Le|0);sr=Bt,Bt=0}return Le=0,fe|0&&(w[fe>>2]=D,w[fe+4>>2]=I),bi=(Ae|0)>>>31|(sr|Le)<<1|(Le<<1|Ae>>>31)&0|Bt,Ei=(Ae<<1|0)&-2|Ve,oi(bi|0),Ei|0}function fi(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0;return sr=I>>31|((I|0)<0?-1:0)<<1,Bt=((I|0)<0?-1:0)>>31|((I|0)<0?-1:0)<<1,Ae=ee>>31|((ee|0)<0?-1:0)<<1,fe=((ee|0)<0?-1:0)>>31|((ee|0)<0?-1:0)<<1,Ve=pf(sr^D|0,Bt^I|0,sr|0,Bt|0)|0,Le=pr()|0,D=Ae^sr,I=fe^Bt,pf((qp(Ve,Le,pf(Ae^B|0,fe^ee|0,Ae|0,fe|0)|0,pr()|0,0)|0)^D|0,(pr()|0)^I|0,D|0,I|0)|0}function Ja(D,I){D=D|0,I=I|0;var B=0,ee=0,fe=0,Ae=0;return Ae=D&65535,fe=I&65535,B=Xr(fe,Ae)|0,ee=D>>>16,D=(B>>>16)+(Xr(fe,ee)|0)|0,fe=I>>>16,I=Xr(fe,Ae)|0,oi((D>>>16)+(Xr(fe,ee)|0)+(((D&65535)+I|0)>>>16)|0),D+I<<16|B&65535|0|0}function ga(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0;return fe=D,Ae=B,B=Ja(fe,Ae)|0,D=pr()|0,oi((Xr(I,Ae)|0)+(Xr(ee,fe)|0)+D|D&0|0),B|0|0|0}function Yu(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0,Le=0,Ve=0,Bt=0,sr=0;return fe=sn,sn=sn+16|0,Ve=fe|0,Le=I>>31|((I|0)<0?-1:0)<<1,Ae=((I|0)<0?-1:0)>>31|((I|0)<0?-1:0)<<1,sr=ee>>31|((ee|0)<0?-1:0)<<1,Bt=((ee|0)<0?-1:0)>>31|((ee|0)<0?-1:0)<<1,D=pf(Le^D|0,Ae^I|0,Le|0,Ae|0)|0,I=pr()|0,qp(D,I,pf(sr^B|0,Bt^ee|0,sr|0,Bt|0)|0,pr()|0,Ve)|0,ee=pf(w[Ve>>2]^Le|0,w[Ve+4>>2]^Ae|0,Le|0,Ae|0)|0,B=pr()|0,sn=fe,oi(B|0),ee|0}function tf(D,I,B,ee){D=D|0,I=I|0,B=B|0,ee=ee|0;var fe=0,Ae=0;return Ae=sn,sn=sn+16|0,fe=Ae|0,qp(D,I,B,ee,fe)|0,sn=Ae,oi(w[fe+4>>2]|0),w[fe>>2]|0|0}function bo(D,I,B){return D=D|0,I=I|0,B=B|0,(B|0)<32?(oi(I>>B|0),D>>>B|(I&(1<>B-32|0)}function Nr(D,I,B){return D=D|0,I=I|0,B=B|0,(B|0)<32?(oi(I>>>B|0),D>>>B|(I&(1<>>B-32|0)}function vr(D,I,B){return D=D|0,I=I|0,B=B|0,(B|0)<32?(oi(I<>>32-B|0),D<=0?+he(D+.5):+rn(D-.5)}function Ni(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0;if((B|0)>=8192)return no(D|0,I|0,B|0)|0,D|0;if(Ae=D|0,fe=D+B|0,(D&3)==(I&3)){for(;D&3;){if(!B)return Ae|0;tt[D>>0]=tt[I>>0]|0,D=D+1|0,I=I+1|0,B=B-1|0}for(B=fe&-4|0,ee=B-64|0;(D|0)<=(ee|0);)w[D>>2]=w[I>>2],w[D+4>>2]=w[I+4>>2],w[D+8>>2]=w[I+8>>2],w[D+12>>2]=w[I+12>>2],w[D+16>>2]=w[I+16>>2],w[D+20>>2]=w[I+20>>2],w[D+24>>2]=w[I+24>>2],w[D+28>>2]=w[I+28>>2],w[D+32>>2]=w[I+32>>2],w[D+36>>2]=w[I+36>>2],w[D+40>>2]=w[I+40>>2],w[D+44>>2]=w[I+44>>2],w[D+48>>2]=w[I+48>>2],w[D+52>>2]=w[I+52>>2],w[D+56>>2]=w[I+56>>2],w[D+60>>2]=w[I+60>>2],D=D+64|0,I=I+64|0;for(;(D|0)<(B|0);)w[D>>2]=w[I>>2],D=D+4|0,I=I+4|0}else for(B=fe-4|0;(D|0)<(B|0);)tt[D>>0]=tt[I>>0]|0,tt[D+1>>0]=tt[I+1>>0]|0,tt[D+2>>0]=tt[I+2>>0]|0,tt[D+3>>0]=tt[I+3>>0]|0,D=D+4|0,I=I+4|0;for(;(D|0)<(fe|0);)tt[D>>0]=tt[I>>0]|0,D=D+1|0,I=I+1|0;return Ae|0}function ea(D,I,B){D=D|0,I=I|0,B=B|0;var ee=0,fe=0,Ae=0,Le=0;if(Ae=D+B|0,I=I&255,(B|0)>=67){for(;D&3;)tt[D>>0]=I,D=D+1|0;for(ee=Ae&-4|0,Le=I|I<<8|I<<16|I<<24,fe=ee-64|0;(D|0)<=(fe|0);)w[D>>2]=Le,w[D+4>>2]=Le,w[D+8>>2]=Le,w[D+12>>2]=Le,w[D+16>>2]=Le,w[D+20>>2]=Le,w[D+24>>2]=Le,w[D+28>>2]=Le,w[D+32>>2]=Le,w[D+36>>2]=Le,w[D+40>>2]=Le,w[D+44>>2]=Le,w[D+48>>2]=Le,w[D+52>>2]=Le,w[D+56>>2]=Le,w[D+60>>2]=Le,D=D+64|0;for(;(D|0)<(ee|0);)w[D>>2]=Le,D=D+4|0}for(;(D|0)<(Ae|0);)tt[D>>0]=I,D=D+1|0;return Ae-B|0}function Vi(D){return D=+D,D>=0?+he(D+.5):+rn(D-.5)}function Qn(D){D=D|0;var I=0,B=0,ee=0;return ee=ja()|0,B=w[Z>>2]|0,I=B+D|0,(D|0)>0&(I|0)<(B|0)|(I|0)<0?(tu(I|0)|0,Ji(12),-1):(I|0)>(ee|0)&&!(Ss(I|0)|0)?(Ji(12),-1):(w[Z>>2]=I,B|0)}return{___divdi3:fi,___muldi3:ga,___remdi3:Yu,___uremdi3:tf,_areNeighborCells:$p,_bitshift64Ashr:bo,_bitshift64Lshr:Nr,_bitshift64Shl:vr,_calloc:Pl,_cellAreaKm2:b0,_cellAreaM2:Jd,_cellAreaRads2:u0,_cellToBoundary:m0,_cellToCenterChild:Gp,_cellToChildPos:Xd,_cellToChildren:E0,_cellToChildrenSize:W0,_cellToLatLng:s0,_cellToLocalIj:ru,_cellToParent:bp,_cellToVertex:dc,_cellToVertexes:Ch,_cellsToDirectedEdge:k0,_cellsToLinkedMultiPolygon:Ah,_childPosToCell:Yp,_compactCells:N0,_destroyLinkedMultiPolygon:to,_directedEdgeToBoundary:I0,_directedEdgeToCells:Dc,_edgeLengthKm:Dn,_edgeLengthM:Ci,_edgeLengthRads:Cr,_emscripten_replace_memory:bu,_free:Xu,_getBaseCellNumber:kp,_getDirectedEdgeDestination:_0,_getDirectedEdgeOrigin:H0,_getHexagonAreaAvgKm2:j0,_getHexagonAreaAvgM2:xp,_getHexagonEdgeLengthAvgKm:rm,_getHexagonEdgeLengthAvgM:X0,_getIcosahedronFaces:A0,_getNumCells:Y0,_getPentagons:Vd,_getRes0Cells:Dd,_getResolution:zp,_greatCircleDistanceKm:Bp,_greatCircleDistanceM:bf,_greatCircleDistanceRads:U0,_gridDisk:Ol,_gridDiskDistances:oc,_gridDistance:xu,_gridPathCells:wu,_gridPathCellsSize:Ns,_gridRingUnsafe:Eh,_i64Add:mu,_i64Subtract:pf,_isPentagon:Sh,_isResClassIII:p0,_isValidCell:mp,_isValidDirectedEdge:tm,_isValidVertex:np,_latLngToCell:r0,_llvm_maxnum_f64:hi,_llvm_minnum_f64:Ma,_llvm_round_f64:Ra,_localIjToCell:nu,_malloc:th,_maxFaceCount:cm,_maxGridDiskSize:Bl,_maxPolygonToCellsSize:Rf,_memcpy:Ni,_memset:ea,_originToDirectedEdges:F0,_pentagonCount:jd,_polygonToCells:jf,_readInt64AsDoubleFromPointer:Wu,_res0CellCount:Uh,_round:Vi,_sbrk:Qn,_sizeOfCellBoundary:tl,_sizeOfCoordIJ:kc,_sizeOfGeoLoop:Ho,_sizeOfGeoPolygon:rl,_sizeOfH3Index:bl,_sizeOfLatLng:Is,_sizeOfLinkedGeoPolygon:xc,_uncompactCells:_m,_uncompactCellsSize:Wp,_vertexToLatLng:rp,establishStackSpace:Sc,stackAlloc:bc,stackRestore:Ju,stackSave:uu}}(bh,Nn,ua),xi=tn.___divdi3=Pn.___divdi3,qi=tn.___muldi3=Pn.___muldi3,Xa=tn.___remdi3=Pn.___remdi3,To=tn.___uremdi3=Pn.___uremdi3,Gs=tn._areNeighborCells=Pn._areNeighborCells,xs=tn._bitshift64Ashr=Pn._bitshift64Ashr,Jo=tn._bitshift64Lshr=Pn._bitshift64Lshr,ou=tn._bitshift64Shl=Pn._bitshift64Shl,Iu=tn._calloc=Pn._calloc,ll=tn._cellAreaKm2=Pn._cellAreaKm2,Uu=tn._cellAreaM2=Pn._cellAreaM2,Oc=tn._cellAreaRads2=Pn._cellAreaRads2,fc=tn._cellToBoundary=Pn._cellToBoundary,Lu=tn._cellToCenterChild=Pn._cellToCenterChild,su=tn._cellToChildPos=Pn._cellToChildPos,Ys=tn._cellToChildren=Pn._cellToChildren,_s=tn._cellToChildrenSize=Pn._cellToChildrenSize,Fs=tn._cellToLatLng=Pn._cellToLatLng,Qu=tn._cellToLocalIj=Pn._cellToLocalIj,Sl=tn._cellToParent=Pn._cellToParent,nc=tn._cellToVertex=Pn._cellToVertex,dl=tn._cellToVertexes=Pn._cellToVertexes,Ml=tn._cellsToDirectedEdge=Pn._cellsToDirectedEdge,Vc=tn._cellsToLinkedMultiPolygon=Pn._cellsToLinkedMultiPolygon,kl=tn._childPosToCell=Pn._childPosToCell,Qf=tn._compactCells=Pn._compactCells,ds=tn._destroyLinkedMultiPolygon=Pn._destroyLinkedMultiPolygon,Eu=tn._directedEdgeToBoundary=Pn._directedEdgeToBoundary,Rl=tn._directedEdgeToCells=Pn._directedEdgeToCells,Fc=tn._edgeLengthKm=Pn._edgeLengthKm,Yc=tn._edgeLengthM=Pn._edgeLengthM,xh=tn._edgeLengthRads=Pn._edgeLengthRads,Lf=tn._emscripten_replace_memory=Pn._emscripten_replace_memory,If=tn._free=Pn._free,wd=tn._getBaseCellNumber=Pn._getBaseCellNumber,_h=tn._getDirectedEdgeDestination=Pn._getDirectedEdgeDestination,Df=tn._getDirectedEdgeOrigin=Pn._getDirectedEdgeOrigin,af=tn._getHexagonAreaAvgKm2=Pn._getHexagonAreaAvgKm2,cd=tn._getHexagonAreaAvgM2=Pn._getHexagonAreaAvgM2,Uf=tn._getHexagonEdgeLengthAvgKm=Pn._getHexagonEdgeLengthAvgKm,_u=tn._getHexagonEdgeLengthAvgM=Pn._getHexagonEdgeLengthAvgM,Ls=tn._getIcosahedronFaces=Pn._getIcosahedronFaces,Af=tn._getNumCells=Pn._getNumCells,fd=tn._getPentagons=Pn._getPentagons,Qi=tn._getRes0Cells=Pn._getRes0Cells,Gr=tn._getResolution=Pn._getResolution,of=tn._greatCircleDistanceKm=Pn._greatCircleDistanceKm,Qr=tn._greatCircleDistanceM=Pn._greatCircleDistanceM,is=tn._greatCircleDistanceRads=Pn._greatCircleDistanceRads,cf=tn._gridDisk=Pn._gridDisk,nf=tn._gridDiskDistances=Pn._gridDiskDistances,ic=tn._gridDistance=Pn._gridDistance,Ws=tn._gridPathCells=Pn._gridPathCells,$u=tn._gridPathCellsSize=Pn._gridPathCellsSize,ac=tn._gridRingUnsafe=Pn._gridRingUnsafe,$l=tn._i64Add=Pn._i64Add,Fl=tn._i64Subtract=Pn._i64Subtract,Oe=tn._isPentagon=Pn._isPentagon,Ft=tn._isResClassIII=Pn._isResClassIII,dr=tn._isValidCell=Pn._isValidCell,Wr=tn._isValidDirectedEdge=Pn._isValidDirectedEdge,Jr=tn._isValidVertex=Pn._isValidVertex,Gn=tn._latLngToCell=Pn._latLngToCell,mi=tn._llvm_maxnum_f64=Pn._llvm_maxnum_f64,Vn=tn._llvm_minnum_f64=Pn._llvm_minnum_f64,Gi=tn._llvm_round_f64=Pn._llvm_round_f64,Li=tn._localIjToCell=Pn._localIjToCell,Xn=tn._malloc=Pn._malloc,Ca=tn._maxFaceCount=Pn._maxFaceCount,$a=tn._maxGridDiskSize=Pn._maxGridDiskSize,Ba=tn._maxPolygonToCellsSize=Pn._maxPolygonToCellsSize,ha=tn._memcpy=Pn._memcpy,ba=tn._memset=Pn._memset,Ti=tn._originToDirectedEdges=Pn._originToDirectedEdges,Bi=tn._pentagonCount=Pn._pentagonCount,na=tn._polygonToCells=Pn._polygonToCells,Sa=tn._readInt64AsDoubleFromPointer=Pn._readInt64AsDoubleFromPointer,Ko=tn._res0CellCount=Pn._res0CellCount,qo=tn._round=Pn._round,gs=tn._sbrk=Pn._sbrk,Da=tn._sizeOfCellBoundary=Pn._sizeOfCellBoundary,Hu=tn._sizeOfCoordIJ=Pn._sizeOfCoordIJ,Mo=tn._sizeOfGeoLoop=Pn._sizeOfGeoLoop,Ps=tn._sizeOfGeoPolygon=Pn._sizeOfGeoPolygon,eu=tn._sizeOfH3Index=Pn._sizeOfH3Index,Bs=tn._sizeOfLatLng=Pn._sizeOfLatLng,cu=tn._sizeOfLinkedGeoPolygon=Pn._sizeOfLinkedGeoPolygon,yu=tn._uncompactCells=Pn._uncompactCells,fu=tn._uncompactCellsSize=Pn._uncompactCellsSize,Gu=tn._vertexToLatLng=Pn._vertexToLatLng,h=tn.establishStackSpace=Pn.establishStackSpace,m=tn.stackAlloc=Pn.stackAlloc,F=tn.stackRestore=Pn.stackRestore,H=tn.stackSave=Pn.stackSave;if(tn.asm=Pn,tn.cwrap=qn,tn.setValue=Nt,tn.getValue=lr,zu){St(zu)||(zu=bn(zu));{Pu("memory initializer");var ve=function(q){q.byteLength&&(q=new Uint8Array(q)),aa.set(q,xt),tn.memoryInitializerRequest&&delete tn.memoryInitializerRequest.response,Co("memory initializer")},ot=function(){vn(zu,ve,function(){throw"could not load memory initializer "+zu})},kt=zc(zu);if(kt)ve(kt.buffer);else if(tn.memoryInitializerRequest){var J=function(){var q=tn.memoryInitializerRequest,me=q.response;if(q.status!==200&&q.status!==0){var je=zc(tn.memoryInitializerRequestURL);if(je)me=je.buffer;else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+q.status+", retrying "+zu),ot();return}}ve(me)};tn.memoryInitializerRequest.response?setTimeout(J,0):tn.memoryInitializerRequest.addEventListener("load",J)}else ot()}}var f;gu=function q(){f||O(),f||(gu=q)};function O(q){if(q=q||Wt,fl>0||(Ku(),fl>0))return;function me(){f||(f=!0,!$r&&(Rc(),Wa(),tn.onRuntimeInitialized&&tn.onRuntimeInitialized(),mf()))}tn.setStatus?(tn.setStatus("Running..."),setTimeout(function(){setTimeout(function(){tn.setStatus("")},1),me()},1)):me()}tn.run=O;function K(q){throw tn.onAbort&&tn.onAbort(q),q+="",Xi(q),ya(q),$r=!0,"abort("+q+"). Build with -s ASSERTIONS=1 for more info."}if(tn.abort=K,tn.preInit)for(typeof tn.preInit=="function"&&(tn.preInit=[tn.preInit]);tn.preInit.length>0;)tn.preInit.pop()();return O(),On}(typeof M=="object"?M:{}),V="number",y=V,d=V,$=V,X=V,oe=V,re=V,le=[["sizeOfH3Index",V],["sizeOfLatLng",V],["sizeOfCellBoundary",V],["sizeOfGeoLoop",V],["sizeOfGeoPolygon",V],["sizeOfLinkedGeoPolygon",V],["sizeOfCoordIJ",V],["readInt64AsDoubleFromPointer",V],["isValidCell",d,[$,X]],["latLngToCell",y,[V,V,oe,re]],["cellToLatLng",y,[$,X,re]],["cellToBoundary",y,[$,X,re]],["maxGridDiskSize",y,[V,re]],["gridDisk",y,[$,X,V,re]],["gridDiskDistances",y,[$,X,V,re,re]],["gridRingUnsafe",y,[$,X,V,re]],["maxPolygonToCellsSize",y,[re,oe,V,re]],["polygonToCells",y,[re,oe,V,re]],["cellsToLinkedMultiPolygon",y,[re,V,re]],["destroyLinkedMultiPolygon",null,[re]],["compactCells",y,[re,re,V,V]],["uncompactCells",y,[re,V,V,re,V,oe]],["uncompactCellsSize",y,[re,V,V,oe,re]],["isPentagon",d,[$,X]],["isResClassIII",d,[$,X]],["getBaseCellNumber",V,[$,X]],["getResolution",V,[$,X]],["maxFaceCount",y,[$,X,re]],["getIcosahedronFaces",y,[$,X,re]],["cellToParent",y,[$,X,oe,re]],["cellToChildren",y,[$,X,oe,re]],["cellToCenterChild",y,[$,X,oe,re]],["cellToChildrenSize",y,[$,X,oe,re]],["cellToChildPos",y,[$,X,oe,re]],["childPosToCell",y,[V,V,$,X,oe,re]],["areNeighborCells",y,[$,X,$,X,re]],["cellsToDirectedEdge",y,[$,X,$,X,re]],["getDirectedEdgeOrigin",y,[$,X,re]],["getDirectedEdgeDestination",y,[$,X,re]],["isValidDirectedEdge",d,[$,X]],["directedEdgeToCells",y,[$,X,re]],["originToDirectedEdges",y,[$,X,re]],["directedEdgeToBoundary",y,[$,X,re]],["gridDistance",y,[$,X,$,X,re]],["gridPathCells",y,[$,X,$,X,re]],["gridPathCellsSize",y,[$,X,$,X,re]],["cellToLocalIj",y,[$,X,$,X,V,re]],["localIjToCell",y,[$,X,re,V,re]],["getHexagonAreaAvgM2",y,[oe,re]],["getHexagonAreaAvgKm2",y,[oe,re]],["getHexagonEdgeLengthAvgM",y,[oe,re]],["getHexagonEdgeLengthAvgKm",y,[oe,re]],["greatCircleDistanceM",V,[re,re]],["greatCircleDistanceKm",V,[re,re]],["greatCircleDistanceRads",V,[re,re]],["cellAreaM2",y,[$,X,re]],["cellAreaKm2",y,[$,X,re]],["cellAreaRads2",y,[$,X,re]],["edgeLengthM",y,[$,X,re]],["edgeLengthKm",y,[$,X,re]],["edgeLengthRads",y,[$,X,re]],["getNumCells",y,[oe,re]],["getRes0Cells",y,[re]],["res0CellCount",V],["getPentagons",y,[V,re]],["pentagonCount",V],["cellToVertex",y,[$,X,V,re]],["cellToVertexes",y,[$,X,re]],["vertexToLatLng",y,[$,X,re]],["isValidVertex",d,[$,X]]],ce=0,Ie=1,we=2,Ee=3,qe=4,Xe=5,ft=6,Ge=7,lt=8,Ye=9,It=10,At=11,Ue=12,rt=13,Ze=14,Ct=15,st={};st[ce]="Success",st[Ie]="The operation failed but a more specific error is not available",st[we]="Argument was outside of acceptable range",st[Ee]="Latitude or longitude arguments were outside of acceptable range",st[qe]="Resolution argument was outside of acceptable range",st[Xe]="Cell argument was not valid",st[ft]="Directed edge argument was not valid",st[Ge]="Undirected edge argument was not valid",st[lt]="Vertex argument was not valid",st[Ye]="Pentagon distortion was encountered",st[It]="Duplicate input",st[At]="Cell arguments were not neighbors",st[Ue]="Cell arguments had incompatible resolutions",st[rt]="Memory allocation failed",st[Ze]="Bounds of provided memory were insufficient",st[Ct]="Mode or flags argument was not valid";var Et=1e3,at=1001,mt=1002,Mt={};Mt[Et]="Unknown unit",Mt[at]="Array length out of bounds",Mt[mt]="Got unexpected null value for H3 index";var Me="Unknown error";function Ht(On,tn,Pi){var ut=Pi&&"value"in Pi,Wt=new Error((On[tn]||Me)+" (code: "+tn+(ut?", value: "+Pi.value:"")+")");return Wt.code=tn,Wt}function Rt(On,tn){var Pi=arguments.length===2?{value:tn}:{};return Ht(st,On,Pi)}function vt(On,tn){var Pi=arguments.length===2?{value:tn}:{};return Ht(Mt,On,Pi)}function Je(On){if(On!==0)throw Rt(On)}var Ce={};le.forEach(function(tn){Ce[tn[0]]=M.cwrap.apply(M,tn)});var pt=16,et=0,br=4,Jt=4,Vr=8,gn=8,yn=Ce.sizeOfH3Index(),_i=Ce.sizeOfLatLng(),Hn=Ce.sizeOfCellBoundary(),Ln=Ce.sizeOfGeoPolygon(),Ia=Ce.sizeOfGeoLoop(),Zi=Ce.sizeOfLinkedGeoPolygon(),Ua=Ce.sizeOfCoordIJ(),fa={m:"m",m2:"m2",km:"km",km2:"km2",rads:"rads",rads2:"rads2"};function ka(On){if(typeof On!="number"||On<0||On>15||Math.floor(On)!==On)throw Rt(qe,On);return On}function mo(On){if(!On)throw vt(mt);return On}var _n=Math.pow(2,32)-1;function yi(On){if(On>_n)throw vt(at,On);return On}var Zn=/[^0-9a-fA-F]/;function gr(On){if(Array.isArray(On)&&On.length===2&&Number.isInteger(On[0])&&Number.isInteger(On[1]))return On;if(typeof On!="string"||Zn.test(On))return[0,0];var tn=parseInt(On.substring(0,On.length-8),pt),Pi=parseInt(On.substring(On.length-8),pt);return[Pi,tn]}function Ea(On){if(On>=0)return On.toString(pt);On=On&2147483647;var tn=Qa(8,On.toString(pt)),Pi=(parseInt(tn[0],pt)+8).toString(pt);return tn=Pi+tn.substring(1),tn}function co(On,tn){return Ea(tn)+Qa(8,Ea(On))}function Qa(On,tn){for(var Pi=On-tn.length,ut="",Wt=0;Wt0){vn=M._calloc(Pi,Ia);for(var Xi=0;Xi0){for(var bn=M.getValue(On+ut,"i32"),vn=0;vn=0&&Pi.push(Wt)}return Pi}function _t(On){var tn=gr(On),Pi=tn[0],ut=tn[1];return!!Ce.isValidCell(Pi,ut)}function Zt(On){var tn=gr(On),Pi=tn[0],ut=tn[1];return!!Ce.isPentagon(Pi,ut)}function rr(On){var tn=gr(On),Pi=tn[0],ut=tn[1];return!!Ce.isResClassIII(Pi,ut)}function fr(On){var tn=gr(On),Pi=tn[0],ut=tn[1];return Ce.getBaseCellNumber(Pi,ut)}function mr(On){var tn=gr(On),Pi=tn[0],ut=tn[1],Wt=M._malloc(br);try{Je(Ce.maxFaceCount(Pi,ut,Wt));var wr=M.getValue(Wt,"i32"),bn=M._malloc(br*wr);try{return Je(Ce.getIcosahedronFaces(Pi,ut,bn)),We(bn,wr)}finally{M._free(bn)}}finally{M._free(Wt)}}function Qe(On){var tn=gr(On),Pi=tn[0],ut=tn[1];return Ce.isValidCell(Pi,ut)?Ce.getResolution(Pi,ut):-1}function er(On,tn,Pi){var ut=M._malloc(_i);M.HEAPF64.set([On,tn].map(tc),ut/Vr);var Wt=M._malloc(yn);try{return Je(Ce.latLngToCell(ut,Pi,Wt)),mo(Jn(Wt))}finally{M._free(Wt),M._free(ut)}}function jr(On){var tn=M._malloc(_i),Pi=gr(On),ut=Pi[0],Wt=Pi[1];try{return Je(Ce.cellToLatLng(ut,Wt,tn)),Tr(tn)}finally{M._free(tn)}}function on(On,tn){var Pi=M._malloc(Hn),ut=gr(On),Wt=ut[0],wr=ut[1];try{return Je(Ce.cellToBoundary(Wt,wr,Pi)),Cn(Pi,tn,tn)}finally{M._free(Pi)}}function ri(On,tn){var Pi=gr(On),ut=Pi[0],Wt=Pi[1],wr=M._malloc(yn);try{return Je(Ce.cellToParent(ut,Wt,tn,wr)),mo(Jn(wr))}finally{M._free(wr)}}function nn(On,tn){if(!_t(On))return[];var Pi=gr(On),ut=Pi[0],Wt=Pi[1],wr=yi(ln(On,tn)),bn=M._calloc(wr,yn);try{return Je(Ce.cellToChildren(ut,Wt,tn,bn)),bt(bn,wr)}finally{M._free(bn)}}function ln(On,tn){if(!_t(On))throw Rt(Xe);var Pi=gr(On),ut=Pi[0],Wt=Pi[1],wr=M._malloc(gn);try{return Je(Ce.cellToChildrenSize(ut,Wt,tn,wr)),uo(wr)}finally{M._free(wr)}}function Yn(On,tn){var Pi=gr(On),ut=Pi[0],Wt=Pi[1],wr=M._malloc(yn);try{return Je(Ce.cellToCenterChild(ut,Wt,tn,wr)),mo(Jn(wr))}finally{M._free(wr)}}function Wn(On,tn){var Pi=gr(On),ut=Pi[0],Wt=Pi[1],wr=M._malloc(gn);try{return Je(Ce.cellToChildPos(ut,Wt,tn,wr)),uo(wr)}finally{M._free(wr)}}function Tn(On,tn,Pi){var ut=ji(On),Wt=ut[0],wr=ut[1],bn=gr(tn),vn=bn[0],Xi=bn[1],ya=M._malloc(yn);try{return Je(Ce.childPosToCell(Wt,wr,vn,Xi,Pi,ya)),mo(Jn(ya))}finally{M._free(ya)}}function ai(On,tn){var Pi=gr(On),ut=Pi[0],Wt=Pi[1],wr=M._malloc(gn);try{Je(Ce.maxGridDiskSize(tn,wr));var bn=yi(uo(wr)),vn=M._calloc(bn,yn);try{return Je(Ce.gridDisk(ut,Wt,tn,vn)),bt(vn,bn)}finally{M._free(vn)}}finally{M._free(wr)}}function Ii(On,tn){var Pi=gr(On),ut=Pi[0],Wt=Pi[1],wr=M._malloc(gn);try{Je(Ce.maxGridDiskSize(tn,wr));var bn=yi(uo(wr)),vn=M._calloc(bn,yn),Xi=M._calloc(bn,br);try{Je(Ce.gridDiskDistances(ut,Wt,tn,vn,Xi));for(var ya=[],Bo=0;Bo\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",ya=V.console&&(V.console.warn||V.console.log);return ya&&ya.call(V.console,bn,Xi),ut.apply(this,arguments)}}var ft;typeof Object.assign!="function"?ft=function(Wt){if(Wt===$||Wt===null)throw new TypeError("Cannot convert undefined or null to object");for(var wr=Object(Wt),bn=1;bn-1}function Et(ut){return ut.trim().split(/\s+/g)}function at(ut,Wt,wr){if(ut.indexOf&&!wr)return ut.indexOf(Wt);for(var bn=0;bnzr[Wt]}):bn=bn.sort()),bn}function Me(ut,Wt){for(var wr,bn,vn=Wt[0].toUpperCase()+Wt.slice(1),Xi=0;Xi1&&!wr.firstMultiple?wr.firstMultiple=Kn(Wt):vn===1&&(wr.firstMultiple=!1);var Xi=wr.firstInput,ya=wr.firstMultiple,Bo=ya?ya.center:Xi.center,xn=Wt.center=Jn(bn);Wt.timeStamp=Ie(),Wt.deltaTime=Wt.timeStamp-Xi.timeStamp,Wt.angle=Ir(Bo,xn),Wt.distance=uo(Bo,xn),so(wr,Wt),Wt.offsetDirection=pa(Wt.deltaX,Wt.deltaY);var zr=da(Wt.deltaTime,Wt.deltaX,Wt.deltaY);Wt.overallVelocityX=zr.x,Wt.overallVelocityY=zr.y,Wt.overallVelocity=ce(zr.x)>ce(zr.y)?zr.x:zr.y,Wt.scale=ya?Yt(ya.pointers,bn):1,Wt.rotation=ya?bt(ya.pointers,bn):0,Wt.maxPointers=wr.prevInput?Wt.pointers.length>wr.prevInput.maxPointers?Wt.pointers.length:wr.prevInput.maxPointers:Wt.pointers.length,ei(wr,Wt);var xt=ut.element;Ct(Wt.srcEvent.target,xt)&&(xt=Wt.srcEvent.target),Wt.target=xt}function so(ut,Wt){var wr=Wt.center,bn=ut.offsetDelta||{},vn=ut.prevDelta||{},Xi=ut.prevInput||{};(Wt.eventType===_i||Xi.eventType===Ln)&&(vn=ut.prevDelta={x:Xi.deltaX||0,y:Xi.deltaY||0},bn=ut.offsetDelta={x:wr.x,y:wr.y}),Wt.deltaX=vn.x+(wr.x-bn.x),Wt.deltaY=vn.y+(wr.y-bn.y)}function ei(ut,Wt){var wr=ut.lastInterval||Wt,bn=Wt.timeStamp-wr.timeStamp,vn,Xi,ya,Bo;if(Wt.eventType!=Ia&&(bn>yn||wr.velocity===$)){var xn=Wt.deltaX-wr.deltaX,zr=Wt.deltaY-wr.deltaY,xt=da(bn,xn,zr);Xi=xt.x,ya=xt.y,vn=ce(xt.x)>ce(xt.y)?xt.x:xt.y,Bo=pa(xn,zr),ut.lastInterval=Wt}else vn=wr.velocity,Xi=wr.velocityX,ya=wr.velocityY,Bo=wr.direction;Wt.velocity=vn,Wt.velocityX=Xi,Wt.velocityY=ya,Wt.direction=Bo}function Kn(ut){for(var Wt=[],wr=0;wr=ce(Wt)?ut<0?Ua:fa:Wt<0?ka:mo}function uo(ut,Wt,wr){wr||(wr=gr);var bn=Wt[wr[0]]-ut[wr[0]],vn=Wt[wr[1]]-ut[wr[1]];return Math.sqrt(bn*bn+vn*vn)}function Ir(ut,Wt,wr){wr||(wr=gr);var bn=Wt[wr[0]]-ut[wr[0]],vn=Wt[wr[1]]-ut[wr[1]];return Math.atan2(vn,bn)*180/Math.PI}function bt(ut,Wt){return Ir(Wt[1],Wt[0],Ea)+Ir(ut[1],ut[0],Ea)}function Yt(ut,Wt){return uo(Wt[0],Wt[1],Ea)/uo(ut[0],ut[1],Ea)}var Pt={mousedown:_i,mousemove:Hn,mouseup:Ln},xr="mousedown",Tr="mousemove mouseup";function hn(){this.evEl=xr,this.evWin=Tr,this.pressed=!1,co.apply(this,arguments)}Ye(hn,co,{handler:function(Wt){var wr=Pt[Wt.type];wr&_i&&Wt.button===0&&(this.pressed=!0),wr&Hn&&Wt.which!==1&&(wr=Ln),this.pressed&&(wr&Ln&&(this.pressed=!1),this.callback(this.manager,wr,{pointers:[Wt],changedPointers:[Wt],pointerType:Vr,srcEvent:Wt}))}});var Cn={pointerdown:_i,pointermove:Hn,pointerup:Ln,pointercancel:Ia,pointerout:Ia},tr={2:br,3:Jt,4:Vr,5:gn},jt="pointerdown",He="pointermove pointerup pointercancel";V.MSPointerEvent&&!V.PointerEvent&&(jt="MSPointerDown",He="MSPointerMove MSPointerUp MSPointerCancel");function We(){this.evEl=jt,this.evWin=He,co.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}Ye(We,co,{handler:function(Wt){var wr=this.store,bn=!1,vn=Wt.type.toLowerCase().replace("ms",""),Xi=Cn[vn],ya=tr[Wt.pointerType]||Wt.pointerType,Bo=ya==br,xn=at(wr,Wt.pointerId,"pointerId");Xi&_i&&(Wt.button===0||Bo)?xn<0&&(wr.push(Wt),xn=wr.length-1):Xi&(Ln|Ia)&&(bn=!0),!(xn<0)&&(wr[xn]=Wt,this.callback(this.manager,Xi,{pointers:wr,changedPointers:[Wt],pointerType:ya,srcEvent:Wt}),bn&&wr.splice(xn,1))}});var _t={touchstart:_i,touchmove:Hn,touchend:Ln,touchcancel:Ia},Zt="touchstart",rr="touchstart touchmove touchend touchcancel";function fr(){this.evTarget=Zt,this.evWin=rr,this.started=!1,co.apply(this,arguments)}Ye(fr,co,{handler:function(Wt){var wr=_t[Wt.type];if(wr===_i&&(this.started=!0),!!this.started){var bn=mr.call(this,Wt,wr);wr&(Ln|Ia)&&bn[0].length-bn[1].length===0&&(this.started=!1),this.callback(this.manager,wr,{pointers:bn[0],changedPointers:bn[1],pointerType:br,srcEvent:Wt})}}});function mr(ut,Wt){var wr=mt(ut.touches),bn=mt(ut.changedTouches);return Wt&(Ln|Ia)&&(wr=Mt(wr.concat(bn),"identifier",!0)),[wr,bn]}var Qe={touchstart:_i,touchmove:Hn,touchend:Ln,touchcancel:Ia},er="touchstart touchmove touchend touchcancel";function jr(){this.evTarget=er,this.targetIds={},co.apply(this,arguments)}Ye(jr,co,{handler:function(Wt){var wr=Qe[Wt.type],bn=on.call(this,Wt,wr);bn&&this.callback(this.manager,wr,{pointers:bn[0],changedPointers:bn[1],pointerType:br,srcEvent:Wt})}});function on(ut,Wt){var wr=mt(ut.touches),bn=this.targetIds;if(Wt&(_i|Hn)&&wr.length===1)return bn[wr[0].identifier]=!0,[wr,wr];var vn,Xi,ya=mt(ut.changedTouches),Bo=[],xn=this.target;if(Xi=wr.filter(function(zr){return Ct(zr.target,xn)}),Wt===_i)for(vn=0;vn-1&&bn.splice(Xi,1)};setTimeout(vn,ri)}}function Tn(ut){for(var Wt=ut.srcEvent.clientX,wr=ut.srcEvent.clientY,bn=0;bn-1&&this.requireFail.splice(Wt,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(ut){return!!this.simultaneous[ut.id]},emit:function(ut){var Wt=this,wr=this.state;function bn(vn){Wt.manager.emit(vn,ut)}wr=Mn&&bn(Wt.options.event+Ts(wr))},tryEmit:function(ut){if(this.canEmit())return this.emit(ut);this.state=Hs},canEmit:function(){for(var ut=0;utWt.threshold&&vn&Wt.direction},attrTest:function(ut){return _o.prototype.attrTest.call(this,ut)&&(this.state&ss||!(this.state&ss)&&this.directionTest(ut))},emit:function(ut){this.pX=ut.deltaX,this.pY=ut.deltaY;var Wt=Qs(ut.direction);Wt&&(ut.additionalEvent=this.options.event+Wt),this._super.emit.call(this,ut)}});function fo(){_o.apply(this,arguments)}Ye(fo,_o,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[vo]},attrTest:function(ut){return this._super.attrTest.call(this,ut)&&(Math.abs(ut.scale-1)>this.options.threshold||this.state&ss)},emit:function(ut){if(ut.scale!==1){var Wt=ut.scale<1?"in":"out";ut.additionalEvent=this.options.event+Wt}this._super.emit.call(this,ut)}});function El(){us.apply(this,arguments),this._timer=null,this._input=null}Ye(El,us,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Fa]},process:function(ut){var Wt=this.options,wr=ut.pointers.length===Wt.pointers,bn=ut.distanceWt.time;if(this._input=ut,!bn||!wr||ut.eventType&(Ln|Ia)&&!vn)this.reset();else if(ut.eventType&_i)this.reset(),this._timer=we(function(){this.state=wi,this.tryEmit()},Wt.time,this);else if(ut.eventType&Ln)return wi;return Hs},reset:function(){clearTimeout(this._timer)},emit:function(ut){this.state===wi&&(ut&&ut.eventType&Ln?this.manager.emit(this.options.event+"up",ut):(this._input.timeStamp=Ie(),this.manager.emit(this.options.event,this._input)))}});function ju(){_o.apply(this,arguments)}Ye(ju,_o,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[vo]},attrTest:function(ut){return this._super.attrTest.call(this,ut)&&(Math.abs(ut.rotation)>this.options.threshold||this.state&ss)}});function _l(){_o.apply(this,arguments)}Ye(_l,_o,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:_n|yi,pointers:1},getTouchAction:function(){return Js.prototype.getTouchAction.call(this)},attrTest:function(ut){var Wt=this.options.direction,wr;return Wt&(_n|yi)?wr=ut.overallVelocity:Wt&_n?wr=ut.overallVelocityX:Wt&yi&&(wr=ut.overallVelocityY),this._super.attrTest.call(this,ut)&&Wt&ut.offsetDirection&&ut.distance>this.options.threshold&&ut.maxPointers==this.options.pointers&&ce(wr)>this.options.velocity&&ut.eventType&Ln},emit:function(ut){var Wt=Qs(ut.offsetDirection);Wt&&this.manager.emit(this.options.event+Wt,ut),this.manager.emit(this.options.event,ut)}});function Es(){us.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}Ye(Es,us,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[sa]},process:function(ut){var Wt=this.options,wr=ut.pointers.length===Wt.pointers,bn=ut.distance>1,ce=-7,Ie=V?d-1:0,we=V?-1:1,Ee=_[M+Ie];for(Ie+=we,$=Ee&(1<<-ce)-1,Ee>>=-ce,ce+=oe;ce>0;$=$*256+_[M+Ie],Ie+=we,ce-=8);for(X=$&(1<<-ce)-1,$>>=-ce,ce+=y;ce>0;X=X*256+_[M+Ie],Ie+=we,ce-=8);if($===0)$=1-le;else{if($===re)return X?NaN:(Ee?-1:1)*(1/0);X=X+Math.pow(2,y),$=$-le}return(Ee?-1:1)*X*Math.pow(2,$-y)},ye.write=function(_,M,V,y,d,$){var X,oe,re,le=$*8-d-1,ce=(1<>1,we=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ee=y?0:$-1,qe=y?1:-1,Xe=M<0||M===0&&1/M<0?1:0;for(M=Math.abs(M),isNaN(M)||M===1/0?(oe=isNaN(M)?1:0,X=ce):(X=Math.floor(Math.log(M)/Math.LN2),M*(re=Math.pow(2,-X))<1&&(X--,re*=2),X+Ie>=1?M+=we/re:M+=we*Math.pow(2,1-Ie),M*re>=2&&(X++,re/=2),X+Ie>=ce?(oe=0,X=ce):X+Ie>=1?(oe=(M*re-1)*Math.pow(2,d),X=X+Ie):(oe=M*Math.pow(2,Ie-1)*Math.pow(2,d),X=0));d>=8;_[V+Ee]=oe&255,Ee+=qe,oe/=256,d-=8);for(X=X<0;_[V+Ee]=X&255,Ee+=qe,X/=256,le-=8);_[V+Ee-qe]|=Xe*128}},3039:function(Ke,ye){"use strict";Object.defineProperty(ye,"__esModule",{value:!0});var _=Symbol.for("INJECTION");function M(X,oe,re,le){function ce(){return le&&!Reflect.hasMetadata(_,this,oe)&&Reflect.defineMetadata(_,re(),this,oe),Reflect.hasMetadata(_,this,oe)?Reflect.getMetadata(_,this,oe):re()}function Ie(we){Reflect.defineMetadata(_,we,this,oe)}Object.defineProperty(X,oe,{configurable:!0,enumerable:!0,get:ce,set:Ie})}function V(X,oe){return function(re){return function(le,ce){var Ie=function(){return X.get(re)};M(le,ce,Ie,oe)}}}ye.makePropertyInjectDecorator=V;function y(X,oe){return function(re,le){return function(ce,Ie){var we=function(){return X.getNamed(re,le)};M(ce,Ie,we,oe)}}}ye.makePropertyInjectNamedDecorator=y;function d(X,oe){return function(re,le,ce){return function(Ie,we){var Ee=function(){return X.getTagged(re,le,ce)};M(Ie,we,Ee,oe)}}}ye.makePropertyInjectTaggedDecorator=d;function $(X,oe){return function(re){return function(le,ce){var Ie=function(){return X.getAll(re)};M(le,ce,Ie,oe)}}}ye.makePropertyMultiInjectDecorator=$},11922:function(Ke,ye,_){"use strict";var M;M={value:!0};var V=_(3039);function y(d,$){$===void 0&&($=!0);var X=V.makePropertyInjectDecorator(d,$),oe=V.makePropertyInjectNamedDecorator(d,$),re=V.makePropertyInjectTaggedDecorator(d,$),le=V.makePropertyMultiInjectDecorator(d,$);return{lazyInject:X,lazyInjectNamed:oe,lazyInjectTagged:re,lazyMultiInject:le}}ye.Z=y},80626:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.tagProperty=ye.tagParameter=ye.decorate=void 0;var M=_(36078),V=_(50295);function y(le,ce,Ie,we){var Ee=V.TAGGED;$(Ee,le,ce,we,Ie)}ye.tagParameter=y;function d(le,ce,Ie){var we=V.TAGGED_PROP;$(we,le.constructor,ce,Ie)}ye.tagProperty=d;function $(le,ce,Ie,we,Ee){var qe={},Xe=typeof Ee=="number",ft=Ee!==void 0&&Xe?Ee.toString():Ie;if(Xe&&Ie!==void 0)throw new Error(M.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(le,ce)&&(qe=Reflect.getMetadata(le,ce));var Ge=qe[ft];if(!Array.isArray(Ge))Ge=[];else for(var lt=0,Ye=Ge;lt= than the number of constructor arguments of its base class.")};ye.ARGUMENTS_LENGTH_MISMATCH=M,ye.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",ye.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",ye.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",ye.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",ye.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";var V=function(){for(var d=[],$=0;$0&&Ue[Ue.length-1])&&(st[0]===6||st[0]===2)){Ye=0;continue}if(st[0]===3&&(!Ue||st[1]>Ue[0]&&st[1]0?$._map.set(oe,re):$._map.delete(oe)})},y.prototype.hasKey=function(d){if(d==null)throw new Error(M.NULL_ARGUMENT);return this._map.has(d)},y.prototype.clone=function(){var d=new y;return this._map.forEach(function($,X){$.forEach(function(oe){return d.add(X,oe.clone())})}),d},y.prototype.traverse=function(d){this._map.forEach(function($,X){d(X,$)})},y}();ye.Lookup=V},99311:function(Ke,ye,_){"use strict";var M;M={value:!0},M=M=M=M=M=M=ye.GW=M=M=ye.zY=M=M=M=M=M=ye.f3=M=M=ye.b2=M=M=M=M=M=ye.W2=M=void 0;var V=_(50295);M=V;var y=_(70596);Object.defineProperty(ye,"W2",{enumerable:!0,get:function(){return y.Container}});var d=_(77690);M={enumerable:!0,get:function(){return d.BindingScopeEnum}},M={enumerable:!0,get:function(){return d.BindingTypeEnum}},M={enumerable:!0,get:function(){return d.TargetTypeEnum}};var $=_(42913);M={enumerable:!0,get:function(){return $.AsyncContainerModule}},M={enumerable:!0,get:function(){return $.ContainerModule}};var X=_(91773);Object.defineProperty(ye,"b2",{enumerable:!0,get:function(){return X.injectable}});var oe=_(79189);M={enumerable:!0,get:function(){return oe.tagged}};var re=_(79817);M={enumerable:!0,get:function(){return re.named}};var le=_(76213);Object.defineProperty(ye,"f3",{enumerable:!0,get:function(){return le.inject}}),M={enumerable:!0,get:function(){return le.LazyServiceIdentifer}};var ce=_(71316);M={enumerable:!0,get:function(){return ce.optional}};var Ie=_(19235);M={enumerable:!0,get:function(){return Ie.unmanaged}};var we=_(41528);M={enumerable:!0,get:function(){return we.multiInject}};var Ee=_(8245);M={enumerable:!0,get:function(){return Ee.targetName}};var qe=_(71971);Object.defineProperty(ye,"zY",{enumerable:!0,get:function(){return qe.postConstruct}});var Xe=_(43870);M={enumerable:!0,get:function(){return Xe.MetadataReader}};var ft=_(70023);M={enumerable:!0,get:function(){return ft.id}};var Ge=_(80626);Object.defineProperty(ye,"GW",{enumerable:!0,get:function(){return Ge.decorate}});var lt=_(83140);M={enumerable:!0,get:function(){return lt.traverseAncerstors}},M={enumerable:!0,get:function(){return lt.taggedConstraint}},M={enumerable:!0,get:function(){return lt.namedConstraint}},M={enumerable:!0,get:function(){return lt.typeConstraint}};var Ye=_(29552);M={enumerable:!0,get:function(){return Ye.getServiceIdentifierAsString}};var It=_(34384);M={enumerable:!0,get:function(){return It.multiBindToService}}},91519:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.Context=void 0;var M=_(70023),V=function(){function y(d){this.id=M.id(),this.container=d}return y.prototype.addPlan=function(d){this.plan=d},y.prototype.setCurrentRequest=function(d){this.currentRequest=d},y}();ye.Context=V},25092:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.Metadata=void 0;var M=_(50295),V=function(){function y(d,$){this.key=d,this.value=$}return y.prototype.toString=function(){return this.key===M.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},y}();ye.Metadata=V},43870:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.MetadataReader=void 0;var M=_(50295),V=function(){function y(){}return y.prototype.getConstructorMetadata=function(d){var $=Reflect.getMetadata(M.PARAM_TYPES,d),X=Reflect.getMetadata(M.TAGGED,d);return{compilerGeneratedMetadata:$,userGeneratedMetadata:X||{}}},y.prototype.getPropertiesMetadata=function(d){var $=Reflect.getMetadata(M.TAGGED_PROP,d)||[];return $},y}();ye.MetadataReader=V},6335:function(Ke,ye){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.Plan=void 0;var _=function(){function M(V,y){this.parentContext=V,this.rootRequest=y}return M}();ye.Plan=_},54142:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.getBindingDictionary=ye.createMockRequest=ye.plan=void 0;var M=_(13497),V=_(36078),y=_(77690),d=_(50295),$=_(92542),X=_(29552),oe=_(91519),re=_(25092),le=_(6335),ce=_(16664),Ie=_(14810),we=_(69660);function Ee(At){return At._bindingDictionary}ye.getBindingDictionary=Ee;function qe(At,Ue,rt,Ze,Ct,st){var Et=At?d.MULTI_INJECT_TAG:d.INJECT_TAG,at=new re.Metadata(Et,rt),mt=new we.Target(Ue,Ze,rt,at);if(Ct!==void 0){var Mt=new re.Metadata(Ct,st);mt.metadata.push(Mt)}return mt}function Xe(At,Ue,rt,Ze,Ct){var st=lt(rt.container,Ct.serviceIdentifier),Et=[];return st.length===M.BindingCount.NoBindingsAvailable&&rt.container.options.autoBindInjectable&&typeof Ct.serviceIdentifier=="function"&&At.getConstructorMetadata(Ct.serviceIdentifier).compilerGeneratedMetadata&&(rt.container.bind(Ct.serviceIdentifier).toSelf(),st=lt(rt.container,Ct.serviceIdentifier)),Ue?Et=st:Et=st.filter(function(at){var mt=new Ie.Request(at.serviceIdentifier,rt,Ze,at,Ct);return at.constraint(mt)}),ft(Ct.serviceIdentifier,Et,Ct,rt.container),Et}function ft(At,Ue,rt,Ze){switch(Ue.length){case M.BindingCount.NoBindingsAvailable:if(rt.isOptional())return Ue;var Ct=X.getServiceIdentifierAsString(At),st=V.NOT_REGISTERED;throw st+=X.listMetadataForTarget(Ct,rt),st+=X.listRegisteredBindingsForServiceIdentifier(Ze,Ct,lt),new Error(st);case M.BindingCount.OnlyOneBindingAvailable:if(!rt.isArray())return Ue;case M.BindingCount.MultipleBindingsAvailable:default:if(rt.isArray())return Ue;var Ct=X.getServiceIdentifierAsString(At),st=V.AMBIGUOUS_MATCH+" "+Ct;throw st+=X.listRegisteredBindingsForServiceIdentifier(Ze,Ct,lt),new Error(st)}}function Ge(At,Ue,rt,Ze,Ct,st){var Et,at;if(Ct===null){Et=Xe(At,Ue,Ze,null,st),at=new Ie.Request(rt,Ze,null,Et,st);var mt=new le.Plan(Ze,at);Ze.addPlan(mt)}else Et=Xe(At,Ue,Ze,Ct,st),at=Ct.addChildRequest(st.serviceIdentifier,Et,st);Et.forEach(function(Mt){var Me=null;if(st.isArray())Me=at.addChildRequest(Mt.serviceIdentifier,Mt,st);else{if(Mt.cache)return;Me=at}if(Mt.type===y.BindingTypeEnum.Instance&&Mt.implementationType!==null){var Ht=ce.getDependencies(At,Mt.implementationType);if(!Ze.container.options.skipBaseClassChecks){var Rt=ce.getBaseClassDependencyCount(At,Mt.implementationType);if(Ht.length0,Ct=rt.length>Ge.length,st=Ze||Ct?rt.length:Ge.length,Et=Ie(lt,ft,It,Ue,st),at=we(Xe,Ge),mt=M(M([],Et),at);return mt}function ce(Xe,ft,Ge,lt,Ye){var It=Ye[Xe.toString()]||[],At=qe(It),Ue=At.unmanaged!==!0,rt=lt[Xe],Ze=At.inject||At.multiInject;if(rt=Ze||rt,rt instanceof V.LazyServiceIdentifer&&(rt=rt.unwrap()),Ue){var Ct=rt===Object,st=rt===Function,Et=rt===void 0,at=Ct||st||Et;if(!ft&&at){var mt=y.MISSING_INJECT_ANNOTATION+" argument "+Xe+" in class "+Ge+".";throw new Error(mt)}var Mt=new oe.Target(d.TargetTypeEnum.ConstructorArgument,At.targetName,rt);return Mt.metadata=It,Mt}return null}function Ie(Xe,ft,Ge,lt,Ye){for(var It=[],At=0;At0?Ue:Ee(Xe,Ge)}else return 0}ye.getBaseClassDependencyCount=Ee;function qe(Xe){var ft={};return Xe.forEach(function(Ge){ft[Ge.key.toString()]=Ge.value}),{inject:ft[$.INJECT_TAG],multiInject:ft[$.MULTI_INJECT_TAG],targetName:ft[$.NAME_TAG],unmanaged:ft[$.UNMANAGED_TAG]}}},14810:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.Request=void 0;var M=_(70023),V=function(){function y(d,$,X,oe,re){this.id=M.id(),this.serviceIdentifier=d,this.parentContext=$,this.parentRequest=X,this.target=re,this.childRequests=[],this.bindings=Array.isArray(oe)?oe:[oe],this.requestScope=X===null?new Map:null}return y.prototype.addChildRequest=function(d,$,X){var oe=new y(d,this.parentContext,this,$,X);return this.childRequests.push(oe),oe},y}();ye.Request=V},69660:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.Target=void 0;var M=_(50295),V=_(70023),y=_(25092),d=_(68634),$=function(){function X(oe,re,le,ce){this.id=V.id(),this.type=oe,this.serviceIdentifier=le,this.name=new d.QueryableString(re||""),this.metadata=new Array;var Ie=null;typeof ce=="string"?Ie=new y.Metadata(M.NAMED_TAG,ce):ce instanceof y.Metadata&&(Ie=ce),Ie!==null&&this.metadata.push(Ie)}return X.prototype.hasTag=function(oe){for(var re=0,le=this.metadata;re0){var Ee=ce.filter(function(Xe){return Xe.target!==null&&Xe.target.type===y.TargetTypeEnum.ConstructorArgument}),qe=Ee.map(Ie);we=X(le,qe),we=$(we,ce,Ie)}else we=new le;return oe(le,we),we}ye.resolveInstance=re},9386:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.resolve=void 0;var M=_(36078),V=_(77690),y=_(92542),d=_(29552),$=_(74962),X=function(le,ce,Ie){try{return Ie()}catch(we){throw y.isStackOverflowExeption(we)?new Error(M.CIRCULAR_DEPENDENCY_IN_FACTORY(le,ce.toString())):we}},oe=function(le){return function(ce){ce.parentContext.setCurrentRequest(ce);var Ie=ce.bindings,we=ce.childRequests,Ee=ce.target&&ce.target.isArray(),qe=!ce.parentRequest||!ce.parentRequest.target||!ce.target||!ce.parentRequest.target.matchesArray(ce.target.serviceIdentifier);if(Ee&&qe)return we.map(function(It){var At=oe(le);return At(It)});var Xe=null;if(ce.target.isOptional()&&Ie.length===0)return;var ft=Ie[0],Ge=ft.scope===V.BindingScopeEnum.Singleton,lt=ft.scope===V.BindingScopeEnum.Request;if(Ge&&ft.activated)return ft.cache;if(lt&&le!==null&&le.has(ft.id))return le.get(ft.id);if(ft.type===V.BindingTypeEnum.ConstantValue)Xe=ft.cache,ft.activated=!0;else if(ft.type===V.BindingTypeEnum.Function)Xe=ft.cache,ft.activated=!0;else if(ft.type===V.BindingTypeEnum.Constructor)Xe=ft.implementationType;else if(ft.type===V.BindingTypeEnum.DynamicValue&&ft.dynamicValue!==null)Xe=X("toDynamicValue",ft.serviceIdentifier,function(){return ft.dynamicValue(ce.parentContext)});else if(ft.type===V.BindingTypeEnum.Factory&&ft.factory!==null)Xe=X("toFactory",ft.serviceIdentifier,function(){return ft.factory(ce.parentContext)});else if(ft.type===V.BindingTypeEnum.Provider&&ft.provider!==null)Xe=X("toProvider",ft.serviceIdentifier,function(){return ft.provider(ce.parentContext)});else if(ft.type===V.BindingTypeEnum.Instance&&ft.implementationType!==null)Xe=$.resolveInstance(ft.implementationType,we,oe(le));else{var Ye=d.getServiceIdentifierAsString(ce.serviceIdentifier);throw new Error(M.INVALID_BINDING_TYPE+" "+Ye)}return typeof ft.onActivation=="function"&&(Xe=ft.onActivation(ce.parentContext,Xe)),Ge&&(ft.cache=Xe,ft.activated=!0),lt&&le!==null&&!le.has(ft.id)&&le.set(ft.id,Xe),Xe}};function re(le){var ce=oe(le.plan.rootRequest.requestScope);return ce(le.plan.rootRequest)}ye.resolve=re},91640:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.BindingInSyntax=void 0;var M=_(77690),V=_(46890),y=function(){function d($){this._binding=$}return d.prototype.inRequestScope=function(){return this._binding.scope=M.BindingScopeEnum.Request,new V.BindingWhenOnSyntax(this._binding)},d.prototype.inSingletonScope=function(){return this._binding.scope=M.BindingScopeEnum.Singleton,new V.BindingWhenOnSyntax(this._binding)},d.prototype.inTransientScope=function(){return this._binding.scope=M.BindingScopeEnum.Transient,new V.BindingWhenOnSyntax(this._binding)},d}();ye.BindingInSyntax=y},82386:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.BindingInWhenOnSyntax=void 0;var M=_(91640),V=_(8926),y=_(36890),d=function(){function $(X){this._binding=X,this._bindingWhenSyntax=new y.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new V.BindingOnSyntax(this._binding),this._bindingInSyntax=new M.BindingInSyntax(X)}return $.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},$.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},$.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},$.prototype.when=function(X){return this._bindingWhenSyntax.when(X)},$.prototype.whenTargetNamed=function(X){return this._bindingWhenSyntax.whenTargetNamed(X)},$.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},$.prototype.whenTargetTagged=function(X,oe){return this._bindingWhenSyntax.whenTargetTagged(X,oe)},$.prototype.whenInjectedInto=function(X){return this._bindingWhenSyntax.whenInjectedInto(X)},$.prototype.whenParentNamed=function(X){return this._bindingWhenSyntax.whenParentNamed(X)},$.prototype.whenParentTagged=function(X,oe){return this._bindingWhenSyntax.whenParentTagged(X,oe)},$.prototype.whenAnyAncestorIs=function(X){return this._bindingWhenSyntax.whenAnyAncestorIs(X)},$.prototype.whenNoAncestorIs=function(X){return this._bindingWhenSyntax.whenNoAncestorIs(X)},$.prototype.whenAnyAncestorNamed=function(X){return this._bindingWhenSyntax.whenAnyAncestorNamed(X)},$.prototype.whenAnyAncestorTagged=function(X,oe){return this._bindingWhenSyntax.whenAnyAncestorTagged(X,oe)},$.prototype.whenNoAncestorNamed=function(X){return this._bindingWhenSyntax.whenNoAncestorNamed(X)},$.prototype.whenNoAncestorTagged=function(X,oe){return this._bindingWhenSyntax.whenNoAncestorTagged(X,oe)},$.prototype.whenAnyAncestorMatches=function(X){return this._bindingWhenSyntax.whenAnyAncestorMatches(X)},$.prototype.whenNoAncestorMatches=function(X){return this._bindingWhenSyntax.whenNoAncestorMatches(X)},$.prototype.onActivation=function(X){return this._bindingOnSyntax.onActivation(X)},$}();ye.BindingInWhenOnSyntax=d},8926:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.BindingOnSyntax=void 0;var M=_(36890),V=function(){function y(d){this._binding=d}return y.prototype.onActivation=function(d){return this._binding.onActivation=d,new M.BindingWhenSyntax(this._binding)},y}();ye.BindingOnSyntax=V},43313:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.BindingToSyntax=void 0;var M=_(36078),V=_(77690),y=_(82386),d=_(46890),$=function(){function X(oe){this._binding=oe}return X.prototype.to=function(oe){return this._binding.type=V.BindingTypeEnum.Instance,this._binding.implementationType=oe,new y.BindingInWhenOnSyntax(this._binding)},X.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+M.INVALID_TO_SELF_VALUE);var oe=this._binding.serviceIdentifier;return this.to(oe)},X.prototype.toConstantValue=function(oe){return this._binding.type=V.BindingTypeEnum.ConstantValue,this._binding.cache=oe,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=V.BindingScopeEnum.Singleton,new d.BindingWhenOnSyntax(this._binding)},X.prototype.toDynamicValue=function(oe){return this._binding.type=V.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=oe,this._binding.implementationType=null,new y.BindingInWhenOnSyntax(this._binding)},X.prototype.toConstructor=function(oe){return this._binding.type=V.BindingTypeEnum.Constructor,this._binding.implementationType=oe,this._binding.scope=V.BindingScopeEnum.Singleton,new d.BindingWhenOnSyntax(this._binding)},X.prototype.toFactory=function(oe){return this._binding.type=V.BindingTypeEnum.Factory,this._binding.factory=oe,this._binding.scope=V.BindingScopeEnum.Singleton,new d.BindingWhenOnSyntax(this._binding)},X.prototype.toFunction=function(oe){if(typeof oe!="function")throw new Error(M.INVALID_FUNCTION_BINDING);var re=this.toConstantValue(oe);return this._binding.type=V.BindingTypeEnum.Function,this._binding.scope=V.BindingScopeEnum.Singleton,re},X.prototype.toAutoFactory=function(oe){return this._binding.type=V.BindingTypeEnum.Factory,this._binding.factory=function(re){var le=function(){return re.container.get(oe)};return le},this._binding.scope=V.BindingScopeEnum.Singleton,new d.BindingWhenOnSyntax(this._binding)},X.prototype.toProvider=function(oe){return this._binding.type=V.BindingTypeEnum.Provider,this._binding.provider=oe,this._binding.scope=V.BindingScopeEnum.Singleton,new d.BindingWhenOnSyntax(this._binding)},X.prototype.toService=function(oe){this.toDynamicValue(function(re){return re.container.get(oe)})},X}();ye.BindingToSyntax=$},46890:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.BindingWhenOnSyntax=void 0;var M=_(8926),V=_(36890),y=function(){function d($){this._binding=$,this._bindingWhenSyntax=new V.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new M.BindingOnSyntax(this._binding)}return d.prototype.when=function($){return this._bindingWhenSyntax.when($)},d.prototype.whenTargetNamed=function($){return this._bindingWhenSyntax.whenTargetNamed($)},d.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},d.prototype.whenTargetTagged=function($,X){return this._bindingWhenSyntax.whenTargetTagged($,X)},d.prototype.whenInjectedInto=function($){return this._bindingWhenSyntax.whenInjectedInto($)},d.prototype.whenParentNamed=function($){return this._bindingWhenSyntax.whenParentNamed($)},d.prototype.whenParentTagged=function($,X){return this._bindingWhenSyntax.whenParentTagged($,X)},d.prototype.whenAnyAncestorIs=function($){return this._bindingWhenSyntax.whenAnyAncestorIs($)},d.prototype.whenNoAncestorIs=function($){return this._bindingWhenSyntax.whenNoAncestorIs($)},d.prototype.whenAnyAncestorNamed=function($){return this._bindingWhenSyntax.whenAnyAncestorNamed($)},d.prototype.whenAnyAncestorTagged=function($,X){return this._bindingWhenSyntax.whenAnyAncestorTagged($,X)},d.prototype.whenNoAncestorNamed=function($){return this._bindingWhenSyntax.whenNoAncestorNamed($)},d.prototype.whenNoAncestorTagged=function($,X){return this._bindingWhenSyntax.whenNoAncestorTagged($,X)},d.prototype.whenAnyAncestorMatches=function($){return this._bindingWhenSyntax.whenAnyAncestorMatches($)},d.prototype.whenNoAncestorMatches=function($){return this._bindingWhenSyntax.whenNoAncestorMatches($)},d.prototype.onActivation=function($){return this._bindingOnSyntax.onActivation($)},d}();ye.BindingWhenOnSyntax=y},36890:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.BindingWhenSyntax=void 0;var M=_(8926),V=_(83140),y=function(){function d($){this._binding=$}return d.prototype.when=function($){return this._binding.constraint=$,new M.BindingOnSyntax(this._binding)},d.prototype.whenTargetNamed=function($){return this._binding.constraint=V.namedConstraint($),new M.BindingOnSyntax(this._binding)},d.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function($){var X=$.target!==null&&!$.target.isNamed()&&!$.target.isTagged();return X},new M.BindingOnSyntax(this._binding)},d.prototype.whenTargetTagged=function($,X){return this._binding.constraint=V.taggedConstraint($)(X),new M.BindingOnSyntax(this._binding)},d.prototype.whenInjectedInto=function($){return this._binding.constraint=function(X){return V.typeConstraint($)(X.parentRequest)},new M.BindingOnSyntax(this._binding)},d.prototype.whenParentNamed=function($){return this._binding.constraint=function(X){return V.namedConstraint($)(X.parentRequest)},new M.BindingOnSyntax(this._binding)},d.prototype.whenParentTagged=function($,X){return this._binding.constraint=function(oe){return V.taggedConstraint($)(X)(oe.parentRequest)},new M.BindingOnSyntax(this._binding)},d.prototype.whenAnyAncestorIs=function($){return this._binding.constraint=function(X){return V.traverseAncerstors(X,V.typeConstraint($))},new M.BindingOnSyntax(this._binding)},d.prototype.whenNoAncestorIs=function($){return this._binding.constraint=function(X){return!V.traverseAncerstors(X,V.typeConstraint($))},new M.BindingOnSyntax(this._binding)},d.prototype.whenAnyAncestorNamed=function($){return this._binding.constraint=function(X){return V.traverseAncerstors(X,V.namedConstraint($))},new M.BindingOnSyntax(this._binding)},d.prototype.whenNoAncestorNamed=function($){return this._binding.constraint=function(X){return!V.traverseAncerstors(X,V.namedConstraint($))},new M.BindingOnSyntax(this._binding)},d.prototype.whenAnyAncestorTagged=function($,X){return this._binding.constraint=function(oe){return V.traverseAncerstors(oe,V.taggedConstraint($)(X))},new M.BindingOnSyntax(this._binding)},d.prototype.whenNoAncestorTagged=function($,X){return this._binding.constraint=function(oe){return!V.traverseAncerstors(oe,V.taggedConstraint($)(X))},new M.BindingOnSyntax(this._binding)},d.prototype.whenAnyAncestorMatches=function($){return this._binding.constraint=function(X){return V.traverseAncerstors(X,$)},new M.BindingOnSyntax(this._binding)},d.prototype.whenNoAncestorMatches=function($){return this._binding.constraint=function(X){return!V.traverseAncerstors(X,$)},new M.BindingOnSyntax(this._binding)},d}();ye.BindingWhenSyntax=y},83140:function(Ke,ye,_){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.typeConstraint=ye.namedConstraint=ye.taggedConstraint=ye.traverseAncerstors=void 0;var M=_(50295),V=_(25092),y=function(oe,re){var le=oe.parentRequest;return le!==null?re(le)?!0:y(le,re):!1};ye.traverseAncerstors=y;var d=function(oe){return function(re){var le=function(ce){return ce!==null&&ce.target!==null&&ce.target.matchesTag(oe)(re)};return le.metaData=new V.Metadata(oe,re),le}};ye.taggedConstraint=d;var $=d(M.NAMED_TAG);ye.namedConstraint=$;var X=function(oe){return function(re){var le=null;if(re!==null)if(le=re.bindings[0],typeof oe=="string"){var ce=le.serviceIdentifier;return ce===oe}else{var Ie=re.bindings[0].implementationType;return oe===Ie}return!1}};ye.typeConstraint=X},34384:function(Ke,ye){"use strict";Object.defineProperty(ye,"__esModule",{value:!0}),ye.multiBindToService=void 0;var _=function(M){return function(V){return function(){for(var y=[],d=0;d ")}function X(le){le.childRequests.forEach(function(ce){if(d(ce,ce.serviceIdentifier)){var Ie=$(ce);throw new Error(M.CIRCULAR_DEPENDENCY+" "+Ie)}else X(ce)})}ye.circularDependencyToException=X;function oe(le,ce){if(ce.isTagged()||ce.isNamed()){var Ie="",we=ce.getNamedTag(),Ee=ce.getCustomTags();return we!==null&&(Ie+=we.toString()+` -`),Ee!==null&&Ee.forEach(function(qe){Ie+=qe.toString()+` -`})," "+le+` - `+le+" - "+Ie}else return" "+le}ye.listMetadataForTarget=oe;function re(le){if(le.name)return le.name;var ce=le.toString(),Ie=ce.match(/^function\s*([^\s(]+)/);return Ie?Ie[1]:"Anonymous function: "+ce}ye.getFunctionName=re},76051:function(Ke,ye,_){"use strict";var M=_(80758)(),V=_(97683),y=V("Object.prototype.toString"),d=function(re){return M&&re&&typeof re=="object"&&Symbol.toStringTag in re?!1:y(re)==="[object Arguments]"},$=function(re){return d(re)?!0:re!==null&&typeof re=="object"&&typeof re.length=="number"&&re.length>=0&&y(re)!=="[object Array]"&&y(re.callee)==="[object Function]"},X=function(){return d(arguments)}();d.isLegacyArguments=$,Ke.exports=X?d:$},22948:function(Ke){Ke.exports=function(_){return!_||typeof _=="string"?!1:_ instanceof Array||Array.isArray(_)||_.length>=0&&(_.splice instanceof Function||Object.getOwnPropertyDescriptor(_,_.length-1)&&_.constructor.name!=="String")}},78034:function(Ke){Ke.exports=function(M){return M!=null&&(ye(M)||_(M)||!!M._isBuffer)};function ye(M){return!!M.constructor&&typeof M.constructor.isBuffer=="function"&&M.constructor.isBuffer(M)}function _(M){return typeof M.readFloatLE=="function"&&typeof M.slice=="function"&&ye(M.slice(0,0))}},5012:function(Ke,ye,_){"use strict";var M=Date.prototype.getDay,V=function(oe){try{return M.call(oe),!0}catch(re){return!1}},y=Object.prototype.toString,d="[object Date]",$=_(80758)();Ke.exports=function(oe){return typeof oe!="object"||oe===null?!1:$?V(oe):y.call(oe)===d}},11644:function(Ke,ye,_){"use strict";var M=_(97683),V=_(80758)(),y,d,$,X;if(V){y=M("Object.prototype.hasOwnProperty"),d=M("RegExp.prototype.exec"),$={};var oe=function(){throw $};X={toString:oe,valueOf:oe},typeof Symbol.toPrimitive=="symbol"&&(X[Symbol.toPrimitive]=oe)}var re=M("Object.prototype.toString"),le=Object.getOwnPropertyDescriptor,ce="[object RegExp]";Ke.exports=V?function(we){if(!we||typeof we!="object")return!1;var Ee=le(we,"lastIndex"),qe=Ee&&y(Ee,"value");if(!qe)return!1;try{d(we,X)}catch(Xe){return Xe===$}}:function(we){return!we||typeof we!="object"&&typeof we!="function"?!1:re(we)===ce}},15584:function(Ke,ye,_){var M=_(73893),V=_(33152),y=M(V,"DataView");Ke.exports=y},76414:function(Ke,ye,_){var M=_(64696),V=_(16824),y=_(23476),d=_(63122),$=_(37279);function X(oe){var re=-1,le=oe==null?0:oe.length;for(this.clear();++re-1}Ke.exports=V},94874:function(Ke){function ye(_,M,V){for(var y=-1,d=_==null?0:_.length;++y=M?_:M)),_}Ke.exports=ye},99045:function(Ke,ye,_){var M=_(91866),V=_(74809),y=_(60348),d=_(91937),$=_(26680),X=_(32315),oe=_(47760),re=_(15168),le=_(71678),ce=_(12076),Ie=_(22675),we=_(66139),Ee=_(79264),qe=_(97541),Xe=_(4084),ft=_(80744),Ge=_(57835),lt=_(41626),Ye=_(20816),It=_(65226),At=_(55451),Ue=_(56730),rt=1,Ze=2,Ct=4,st="[object Arguments]",Et="[object Array]",at="[object Boolean]",mt="[object Date]",Mt="[object Error]",Me="[object Function]",Ht="[object GeneratorFunction]",Rt="[object Map]",vt="[object Number]",Je="[object Object]",Ce="[object RegExp]",pt="[object Set]",et="[object String]",br="[object Symbol]",Jt="[object WeakMap]",Vr="[object ArrayBuffer]",gn="[object DataView]",yn="[object Float32Array]",_i="[object Float64Array]",Hn="[object Int8Array]",Ln="[object Int16Array]",Ia="[object Int32Array]",Zi="[object Uint8Array]",Ua="[object Uint8ClampedArray]",fa="[object Uint16Array]",ka="[object Uint32Array]",mo={};mo[st]=mo[Et]=mo[Vr]=mo[gn]=mo[at]=mo[mt]=mo[yn]=mo[_i]=mo[Hn]=mo[Ln]=mo[Ia]=mo[Rt]=mo[vt]=mo[Je]=mo[Ce]=mo[pt]=mo[et]=mo[br]=mo[Zi]=mo[Ua]=mo[fa]=mo[ka]=!0,mo[Mt]=mo[Me]=mo[Jt]=!1;function _n(yi,Zn,gr,Ea,co,Qa){var oa,ji=Zn&rt,so=Zn&Ze,ei=Zn&Ct;if(gr&&(oa=co?gr(yi,Ea,co,Qa):gr(yi)),oa!==void 0)return oa;if(!Ye(yi))return yi;var Kn=ft(yi);if(Kn){if(oa=Ee(yi),!ji)return oe(yi,oa)}else{var Jn=we(yi),da=Jn==Me||Jn==Ht;if(Ge(yi))return X(yi,ji);if(Jn==Je||Jn==st||da&&!co){if(oa=so||da?{}:Xe(yi),!ji)return so?le(yi,$(oa,yi)):re(yi,d(oa,yi))}else{if(!mo[Jn])return co?yi:{};oa=qe(yi,Jn,ji)}}Qa||(Qa=new M);var pa=Qa.get(yi);if(pa)return pa;Qa.set(yi,oa),It(yi)?yi.forEach(function(bt){oa.add(_n(bt,Zn,gr,bt,yi,Qa))}):lt(yi)&&yi.forEach(function(bt,Yt){oa.set(Yt,_n(bt,Zn,gr,Yt,yi,Qa))});var uo=ei?so?Ie:ce:so?Ue:At,Ir=Kn?void 0:uo(yi);return V(Ir||yi,function(bt,Yt){Ir&&(Yt=bt,bt=yi[Yt]),y(oa,Yt,_n(bt,Zn,gr,Yt,yi,Qa))}),oa}Ke.exports=_n},35024:function(Ke,ye,_){var M=_(20816),V=Object.create,y=function(){function d(){}return function($){if(!M($))return{};if(V)return V($);d.prototype=$;var X=new d;return d.prototype=void 0,X}}();Ke.exports=y},51533:function(Ke){function ye(_,M,V,y){for(var d=_.length,$=V+(y?1:-1);y?$--:++$-1;)ft!==le&&oe.call(ft,Ge,1),oe.call(le,Ge,1);return le}Ke.exports=re},92918:function(Ke,ye,_){var M=_(46962),V=_(19652),y=_(71152);function d($,X){return y(V($,X,M),$+"")}Ke.exports=d},63989:function(Ke,ye,_){var M=_(13503),V=_(35234),y=_(46962),d=V?function($,X){return V($,"toString",{configurable:!0,enumerable:!1,value:M(X),writable:!0})}:y;Ke.exports=d},75760:function(Ke){function ye(_,M,V){var y=-1,d=_.length;M<0&&(M=-M>d?0:d+M),V=V>d?d:V,V<0&&(V+=d),d=M>V?0:V-M>>>0,M>>>=0;for(var $=Array(d);++y=oe){var lt=ce?null:$(le);if(lt)return X(lt);Xe=!1,Ee=d,Ge=new M}else Ge=ce?[]:ft;e:for(;++we=X?y:M(y,d,$)}Ke.exports=V},20188:function(Ke,ye,_){var M=_(77945);function V(y){var d=new y.constructor(y.byteLength);return new M(d).set(new M(y)),d}Ke.exports=V},32315:function(Ke,ye,_){Ke=_.nmd(Ke);var M=_(33152),V=ye&&!ye.nodeType&&ye,y=V&&!0&&Ke&&!Ke.nodeType&&Ke,d=y&&y.exports===V,$=d?M.Buffer:void 0,X=$?$.allocUnsafe:void 0;function oe(re,le){if(le)return re.slice();var ce=re.length,Ie=X?X(ce):new re.constructor(ce);return re.copy(Ie),Ie}Ke.exports=oe},27984:function(Ke,ye,_){var M=_(20188);function V(y,d){var $=d?M(y.buffer):y.buffer;return new y.constructor($,y.byteOffset,y.byteLength)}Ke.exports=V},78583:function(Ke){var ye=/\w*$/;function _(M){var V=new M.constructor(M.source,ye.exec(M));return V.lastIndex=M.lastIndex,V}Ke.exports=_},28757:function(Ke,ye,_){var M=_(91869),V=M?M.prototype:void 0,y=V?V.valueOf:void 0;function d($){return y?Object(y.call($)):{}}Ke.exports=d},78358:function(Ke,ye,_){var M=_(20188);function V(y,d){var $=d?M(y.buffer):y.buffer;return new y.constructor($,y.byteOffset,y.length)}Ke.exports=V},47760:function(Ke){function ye(_,M){var V=-1,y=_.length;for(M||(M=Array(y));++V1?X[re-1]:void 0,ce=re>2?X[2]:void 0;for(le=d.length>3&&typeof le=="function"?(re--,le):void 0,ce&&V(X[0],X[1],ce)&&(le=re<3?void 0:le,re=1),$=Object($);++oeqe))return!1;var ft=we.get(oe),Ge=we.get(re);if(ft&&Ge)return ft==re&&Ge==oe;var lt=-1,Ye=!0,It=le&$?new M:void 0;for(we.set(oe,re),we.set(re,oe);++lt-1&&V%1==0&&V-1}Ke.exports=V},54238:function(Ke,ye,_){var M=_(67971);function V(y,d){var $=this.__data__,X=M($,y);return X<0?(++this.size,$.push([y,d])):$[X][1]=d,this}Ke.exports=V},35365:function(Ke,ye,_){var M=_(76414),V=_(99746),y=_(40164);function d(){this.size=0,this.__data__={hash:new M,map:new(y||V),string:new M}}Ke.exports=d},63765:function(Ke,ye,_){var M=_(89819);function V(y){var d=M(this,y).delete(y);return this.size-=d?1:0,d}Ke.exports=V},12608:function(Ke,ye,_){var M=_(89819);function V(y){return M(this,y).get(y)}Ke.exports=V},10203:function(Ke,ye,_){var M=_(89819);function V(y){return M(this,y).has(y)}Ke.exports=V},11298:function(Ke,ye,_){var M=_(89819);function V(y,d){var $=M(this,y),X=$.size;return $.set(y,d),this.size+=$.size==X?0:1,this}Ke.exports=V},83383:function(Ke){function ye(_){var M=-1,V=Array(_.size);return _.forEach(function(y,d){V[++M]=[d,y]}),V}Ke.exports=ye},26332:function(Ke,ye,_){var M=_(52858),V=500;function y(d){var $=M(d,function(oe){return X.size===V&&X.clear(),oe}),X=$.cache;return $}Ke.exports=y},65294:function(Ke,ye,_){var M=_(73893),V=M(Object,"create");Ke.exports=V},23730:function(Ke,ye,_){var M=_(31030),V=M(Object.keys,Object);Ke.exports=V},97817:function(Ke){function ye(_){var M=[];if(_!=null)for(var V in Object(_))M.push(V);return M}Ke.exports=ye},52495:function(Ke,ye,_){Ke=_.nmd(Ke);var M=_(37675),V=ye&&!ye.nodeType&&ye,y=V&&!0&&Ke&&!Ke.nodeType&&Ke,d=y&&y.exports===V,$=d&&M.process,X=function(){try{var oe=y&&y.require&&y.require("util").types;return oe||$&&$.binding&&$.binding("util")}catch(re){}}();Ke.exports=X},74702:function(Ke){var ye=Object.prototype,_=ye.toString;function M(V){return _.call(V)}Ke.exports=M},31030:function(Ke){function ye(_,M){return function(V){return _(M(V))}}Ke.exports=ye},19652:function(Ke,ye,_){var M=_(79628),V=Math.max;function y(d,$,X){return $=V($===void 0?d.length-1:$,0),function(){for(var oe=arguments,re=-1,le=V(oe.length-$,0),ce=Array(le);++re0){if(++d>=ye)return arguments[0]}else d=0;return y.apply(void 0,arguments)}}Ke.exports=V},31119:function(Ke,ye,_){var M=_(99746);function V(){this.__data__=new M,this.size=0}Ke.exports=V},64399:function(Ke){function ye(_){var M=this.__data__,V=M.delete(_);return this.size=M.size,V}Ke.exports=ye},81897:function(Ke){function ye(_){return this.__data__.get(_)}Ke.exports=ye},90558:function(Ke){function ye(_){return this.__data__.has(_)}Ke.exports=ye},64841:function(Ke,ye,_){var M=_(99746),V=_(40164),y=_(52166),d=200;function $(X,oe){var re=this.__data__;if(re instanceof M){var le=re.__data__;if(!V||le.length=le||Me<0||Ye&&Ht>=Ee}function Ct(){var Mt=V();if(Ze(Mt))return st(Mt);Xe=setTimeout(Ct,rt(Mt))}function st(Mt){return Xe=void 0,It&&Ie?At(Mt):(Ie=we=void 0,qe)}function Et(){Xe!==void 0&&clearTimeout(Xe),Ge=0,Ie=ft=we=Xe=void 0}function at(){return Xe===void 0?qe:st(V())}function mt(){var Mt=V(),Me=Ze(Mt);if(Ie=arguments,we=this,ft=Mt,Me){if(Xe===void 0)return Ue(ft);if(Ye)return clearTimeout(Xe),Xe=setTimeout(Ct,le),At(ft)}return Xe===void 0&&(Xe=setTimeout(Ct,le)),qe}return mt.cancel=Et,mt.flush=at,mt}Ke.exports=oe},31876:function(Ke,ye,_){var M=_(70668),V=_(44140),y=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,d="\\u0300-\\u036f",$="\\ufe20-\\ufe2f",X="\\u20d0-\\u20ff",oe=d+$+X,re="["+oe+"]",le=RegExp(re,"g");function ce(Ie){return Ie=V(Ie),Ie&&Ie.replace(y,M).replace(le,"")}Ke.exports=ce},43607:function(Ke){function ye(_,M){return _===M||_!==_&&M!==M}Ke.exports=ye},44231:function(Ke,ye,_){var M=_(89147);function V(y,d,$){var X=y==null?void 0:M(y,d);return X===void 0?$:X}Ke.exports=V},46962:function(Ke){function ye(_){return _}Ke.exports=ye},13053:function(Ke,ye,_){var M=_(4977),V=_(93913),y=Object.prototype,d=y.hasOwnProperty,$=y.propertyIsEnumerable,X=M(function(){return arguments}())?M:function(oe){return V(oe)&&d.call(oe,"callee")&&!$.call(oe,"callee")};Ke.exports=X},80744:function(Ke){var ye=Array.isArray;Ke.exports=ye},24665:function(Ke,ye,_){var M=_(9363),V=_(11156);function y(d){return d!=null&&V(d.length)&&!M(d)}Ke.exports=y},41590:function(Ke,ye,_){var M=_(24665),V=_(93913);function y(d){return V(d)&&M(d)}Ke.exports=y},26561:function(Ke,ye,_){var M=_(86756),V=_(93913),y="[object Boolean]";function d($){return $===!0||$===!1||V($)&&M($)==y}Ke.exports=d},57835:function(Ke,ye,_){Ke=_.nmd(Ke);var M=_(33152),V=_(55950),y=ye&&!ye.nodeType&&ye,d=y&&!0&&Ke&&!Ke.nodeType&&Ke,$=d&&d.exports===y,X=$?M.Buffer:void 0,oe=X?X.isBuffer:void 0,re=oe||V;Ke.exports=re},98621:function(Ke,ye,_){var M=_(77295);function V(y,d){return M(y,d)}Ke.exports=V},9363:function(Ke,ye,_){var M=_(86756),V=_(20816),y="[object AsyncFunction]",d="[object Function]",$="[object GeneratorFunction]",X="[object Proxy]";function oe(re){if(!V(re))return!1;var le=M(re);return le==d||le==$||le==y||le==X}Ke.exports=oe},11156:function(Ke){var ye=9007199254740991;function _(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=ye}Ke.exports=_},41626:function(Ke,ye,_){var M=_(55005),V=_(38342),y=_(52495),d=y&&y.isMap,$=d?V(d):M;Ke.exports=$},93544:function(Ke){function ye(_){return _==null}Ke.exports=ye},68868:function(Ke,ye,_){var M=_(86756),V=_(93913),y="[object Number]";function d($){return typeof $=="number"||V($)&&M($)==y}Ke.exports=d},20816:function(Ke){function ye(_){var M=typeof _;return _!=null&&(M=="object"||M=="function")}Ke.exports=ye},93913:function(Ke){function ye(_){return _!=null&&typeof _=="object"}Ke.exports=ye},19308:function(Ke,ye,_){var M=_(86756),V=_(49217),y=_(93913),d="[object Object]",$=Function.prototype,X=Object.prototype,oe=$.toString,re=X.hasOwnProperty,le=oe.call(Object);function ce(Ie){if(!y(Ie)||M(Ie)!=d)return!1;var we=V(Ie);if(we===null)return!0;var Ee=re.call(we,"constructor")&&we.constructor;return typeof Ee=="function"&&Ee instanceof Ee&&oe.call(Ee)==le}Ke.exports=ce},65226:function(Ke,ye,_){var M=_(38652),V=_(38342),y=_(52495),d=y&&y.isSet,$=d?V(d):M;Ke.exports=$},7941:function(Ke,ye,_){var M=_(86756),V=_(80744),y=_(93913),d="[object String]";function $(X){return typeof X=="string"||!V(X)&&y(X)&&M(X)==d}Ke.exports=$},45029:function(Ke,ye,_){var M=_(86756),V=_(93913),y="[object Symbol]";function d($){return typeof $=="symbol"||V($)&&M($)==y}Ke.exports=d},18397:function(Ke,ye,_){var M=_(10766),V=_(38342),y=_(52495),d=y&&y.isTypedArray,$=d?V(d):M;Ke.exports=$},16513:function(Ke){function ye(_){return _===void 0}Ke.exports=ye},55451:function(Ke,ye,_){var M=_(63333),V=_(6019),y=_(24665);function d($){return y($)?M($):V($)}Ke.exports=d},56730:function(Ke,ye,_){var M=_(63333),V=_(33988),y=_(24665);function d($){return y($)?M($,!0):V($)}Ke.exports=d},52858:function(Ke,ye,_){var M=_(52166),V="Expected a function";function y(d,$){if(typeof d!="function"||$!=null&&typeof $!="function")throw new TypeError(V);var X=function(){var oe=arguments,re=$?$.apply(this,oe):oe[0],le=X.cache;if(le.has(re))return le.get(re);var ce=d.apply(this,oe);return X.cache=le.set(re,ce)||le,ce};return X.cache=new(y.Cache||M),X}y.Cache=M,Ke.exports=y},28440:function(Ke,ye,_){var M=_(50097),V=_(63323),y=V(function(d,$,X){M(d,$,X)});Ke.exports=y},24602:function(Ke,ye,_){var M=_(50097),V=_(63323),y=V(function(d,$,X,oe){M(d,$,X,oe)});Ke.exports=y},9958:function(Ke){function ye(){}Ke.exports=ye},5795:function(Ke,ye,_){var M=_(33152),V=function(){return M.Date.now()};Ke.exports=V},63536:function(Ke,ye,_){var M=_(92918),V=_(14989),y=M(V);Ke.exports=y},14989:function(Ke,ye,_){var M=_(23442);function V(y,d){return y&&y.length&&d&&d.length?M(y,d):y}Ke.exports=V},4134:function(Ke){function ye(){return[]}Ke.exports=ye},55950:function(Ke){function ye(){return!1}Ke.exports=ye},46700:function(Ke,ye,_){var M=_(41571),V=_(20816),y="Expected a function";function d($,X,oe){var re=!0,le=!0;if(typeof $!="function")throw new TypeError(y);return V(oe)&&(re="leading"in oe?!!oe.leading:re,le="trailing"in oe?!!oe.trailing:le),M($,X,{leading:re,maxWait:X,trailing:le})}Ke.exports=d},20168:function(Ke,ye,_){var M=_(13927),V=_(20816),y=_(45029),d=0/0,$=/^[-+]0x[0-9a-f]+$/i,X=/^0b[01]+$/i,oe=/^0o[0-7]+$/i,re=parseInt;function le(ce){if(typeof ce=="number")return ce;if(y(ce))return d;if(V(ce)){var Ie=typeof ce.valueOf=="function"?ce.valueOf():ce;ce=V(Ie)?Ie+"":Ie}if(typeof ce!="string")return ce===0?ce:+ce;ce=M(ce);var we=X.test(ce);return we||oe.test(ce)?re(ce.slice(2),we?2:8):$.test(ce)?d:+ce}Ke.exports=le},20480:function(Ke,ye,_){var M=_(95378),V=_(56730);function y(d){return M(d,V(d))}Ke.exports=y},44140:function(Ke,ye,_){var M=_(50230);function V(y){return y==null?"":M(y)}Ke.exports=V},21691:function(Ke,ye,_){var M=_(29098);function V(y){return y&&y.length?M(y):[]}Ke.exports=V},53592:function(Ke,ye,_){var M=_(44412),V=M("toUpperCase");Ke.exports=V},61503:function(Ke,ye,_){var M=_(34130),V=_(62840),y=_(44140),d=_(97681);function $(X,oe,re){return X=y(X),oe=re?void 0:oe,oe===void 0?V(X)?d(X):M(X):X.match(oe)||[]}Ke.exports=$},17369:function(Ke){(function(ye,_){Ke.exports=_()})(this,function(){"use strict";var ye,_,M;function V(y,d){if(!ye)ye=d;else if(!_)_=d;else{var $="var sharedChunk = {}; ("+ye+")(sharedChunk); ("+_+")(sharedChunk);",X={};ye(X),M=d(X),typeof window!="undefined"&&(M.workerUrl=window.URL.createObjectURL(new Blob([$],{type:"text/javascript"})))}}return V(["exports"],function(y){"use strict";function d(a,s){return a(s={exports:{}},s.exports),s.exports}var $=X;function X(a,s,l,g){this.cx=3*a,this.bx=3*(l-a)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*s,this.by=3*(g-s)-this.cy,this.ay=1-this.cy-this.by,this.p1x=a,this.p1y=g,this.p2x=l,this.p2y=g}X.prototype.sampleCurveX=function(a){return((this.ax*a+this.bx)*a+this.cx)*a},X.prototype.sampleCurveY=function(a){return((this.ay*a+this.by)*a+this.cy)*a},X.prototype.sampleCurveDerivativeX=function(a){return(3*this.ax*a+2*this.bx)*a+this.cx},X.prototype.solveCurveX=function(a,s){var l,g,P,j,ne;for(s===void 0&&(s=1e-6),P=a,ne=0;ne<8;ne++){if(j=this.sampleCurveX(P)-a,Math.abs(j)(g=1))return g;for(;lj?l=P:g=P,P=.5*(g-l)+l}return P},X.prototype.solve=function(a,s){return this.sampleCurveY(this.solveCurveX(a,s))};var oe=re;function re(a,s){this.x=a,this.y=s}re.prototype={clone:function(){return new re(this.x,this.y)},add:function(a){return this.clone()._add(a)},sub:function(a){return this.clone()._sub(a)},multByPoint:function(a){return this.clone()._multByPoint(a)},divByPoint:function(a){return this.clone()._divByPoint(a)},mult:function(a){return this.clone()._mult(a)},div:function(a){return this.clone()._div(a)},rotate:function(a){return this.clone()._rotate(a)},rotateAround:function(a,s){return this.clone()._rotateAround(a,s)},matMult:function(a){return this.clone()._matMult(a)},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(a){return this.x===a.x&&this.y===a.y},dist:function(a){return Math.sqrt(this.distSqr(a))},distSqr:function(a){var s=a.x-this.x,l=a.y-this.y;return s*s+l*l},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(a){return Math.atan2(this.y-a.y,this.x-a.x)},angleWith:function(a){return this.angleWithSep(a.x,a.y)},angleWithSep:function(a,s){return Math.atan2(this.x*s-this.y*a,this.x*a+this.y*s)},_matMult:function(a){var s=a[2]*this.x+a[3]*this.y;return this.x=a[0]*this.x+a[1]*this.y,this.y=s,this},_add:function(a){return this.x+=a.x,this.y+=a.y,this},_sub:function(a){return this.x-=a.x,this.y-=a.y,this},_mult:function(a){return this.x*=a,this.y*=a,this},_div:function(a){return this.x/=a,this.y/=a,this},_multByPoint:function(a){return this.x*=a.x,this.y*=a.y,this},_divByPoint:function(a){return this.x/=a.x,this.y/=a.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var a=this.y;return this.y=this.x,this.x=-a,this},_rotate:function(a){var s=Math.cos(a),l=Math.sin(a),g=l*this.x+s*this.y;return this.x=s*this.x-l*this.y,this.y=g,this},_rotateAround:function(a,s){var l=Math.cos(a),g=Math.sin(a),P=s.y+g*(this.x-s.x)+l*(this.y-s.y);return this.x=s.x+l*(this.x-s.x)-g*(this.y-s.y),this.y=P,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},re.convert=function(a){return a instanceof re?a:Array.isArray(a)?new re(a[0],a[1]):a};var le=typeof self!="undefined"?self:{},ce=Math.pow(2,53)-1;function Ie(a,s,l,g){var P=new $(a,s,l,g);return function(j){return P.solve(j)}}var we=Ie(.25,.1,.25,1);function Ee(a,s,l){return Math.min(l,Math.max(s,a))}function qe(a,s,l){var g=l-s,P=((a-s)%g+g)%g+s;return P===s?l:P}function Xe(a){for(var s=[],l=arguments.length-1;l-- >0;)s[l]=arguments[l+1];for(var g=0,P=s;g>s/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,a)}()}function Ye(a){return!!a&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(a)}function It(a,s){a.forEach(function(l){s[l]&&(s[l]=s[l].bind(s))})}function At(a,s){return a.indexOf(s,a.length-s.length)!==-1}function Ue(a,s,l){var g={};for(var P in a)g[P]=s.call(l||this,a[P],P,a);return g}function rt(a,s,l){var g={};for(var P in a)s.call(l||this,a[P],P,a)&&(g[P]=a[P]);return g}function Ze(a){return Array.isArray(a)?a.map(Ze):typeof a=="object"&&a?Ue(a,Ze):a}var Ct={};function st(a){Ct[a]||(typeof console!="undefined"&&console.warn(a),Ct[a]=!0)}function Et(a,s,l){return(l.y-a.y)*(s.x-a.x)>(s.y-a.y)*(l.x-a.x)}function at(a){for(var s=0,l=0,g=a.length,P=g-1,j=void 0,ne=void 0;l@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(g,P,j,ne){var ge=j||ne;return s[P]=!ge||ge.toLowerCase(),""}),s["max-age"]){var l=parseInt(s["max-age"],10);isNaN(l)?delete s["max-age"]:s["max-age"]=l}return s}var Me=null;function Ht(a){if(Me==null){var s=a.navigator?a.navigator.userAgent:null;Me=!!a.safari||!(!s||!(/\b(iPad|iPhone|iPod)\b/.test(s)||s.match("Safari")&&!s.match("Chrome")))}return Me}function Rt(a){try{var s=le[a];return s.setItem("_mapbox_test_",1),s.removeItem("_mapbox_test_"),!0}catch(l){return!1}}var vt,Je,Ce,pt,et=le.performance&&le.performance.now?le.performance.now.bind(le.performance):Date.now.bind(Date),br=le.requestAnimationFrame||le.mozRequestAnimationFrame||le.webkitRequestAnimationFrame||le.msRequestAnimationFrame,Jt=le.cancelAnimationFrame||le.mozCancelAnimationFrame||le.webkitCancelAnimationFrame||le.msCancelAnimationFrame,Vr={now:et,frame:function(a){var s=br(a);return{cancel:function(){return Jt(s)}}},getImageData:function(a,s){s===void 0&&(s=0);var l=le.document.createElement("canvas"),g=l.getContext("2d");if(!g)throw new Error("failed to create canvas 2d context");return l.width=a.width,l.height=a.height,g.drawImage(a,0,0,a.width,a.height),g.getImageData(-s,-s,a.width+2*s,a.height+2*s)},resolveURL:function(a){return vt||(vt=le.document.createElement("a")),vt.href=a,vt.href},hardwareConcurrency:le.navigator&&le.navigator.hardwareConcurrency||4,get devicePixelRatio(){return le.devicePixelRatio},get prefersReducedMotion(){return!!le.matchMedia&&(Je==null&&(Je=le.matchMedia("(prefers-reduced-motion: reduce)")),Je.matches)}},gn={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},yn={supported:!1,testSupport:function(a){!_i&&pt&&(Hn?Ln(a):Ce=a)}},_i=!1,Hn=!1;function Ln(a){var s=a.createTexture();a.bindTexture(a.TEXTURE_2D,s);try{if(a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,pt),a.isContextLost())return;yn.supported=!0}catch(l){}a.deleteTexture(s),_i=!0}le.document&&((pt=le.document.createElement("img")).onload=function(){Ce&&Ln(Ce),Ce=null,Hn=!0},pt.onerror=function(){_i=!0,Ce=null},pt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var Ia="01",Zi=function(a,s){this._transformRequestFn=a,this._customAccessToken=s,this._createSkuToken()};function Ua(a){return a.indexOf("mapbox:")===0}Zi.prototype._createSkuToken=function(){var a=function(){for(var s="",l=0;l<10;l++)s+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",Ia,s].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=a.token,this._skuTokenExpiresAt=a.tokenExpiresAt},Zi.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Zi.prototype.transformRequest=function(a,s){return this._transformRequestFn&&this._transformRequestFn(a,s)||{url:a}},Zi.prototype.normalizeStyleURL=function(a,s){if(!Ua(a))return a;var l=_n(a);return l.path="/styles/v1"+l.path,this._makeAPIURL(l,this._customAccessToken||s)},Zi.prototype.normalizeGlyphsURL=function(a,s){if(!Ua(a))return a;var l=_n(a);return l.path="/fonts/v1"+l.path,this._makeAPIURL(l,this._customAccessToken||s)},Zi.prototype.normalizeSourceURL=function(a,s){if(!Ua(a))return a;var l=_n(a);return l.path="/v4/"+l.authority+".json",l.params.push("secure"),this._makeAPIURL(l,this._customAccessToken||s)},Zi.prototype.normalizeSpriteURL=function(a,s,l,g){var P=_n(a);return Ua(a)?(P.path="/styles/v1"+P.path+"/sprite"+s+l,this._makeAPIURL(P,this._customAccessToken||g)):(P.path+=""+s+l,yi(P))},Zi.prototype.normalizeTileURL=function(a,s){if(this._isSkuTokenExpired()&&this._createSkuToken(),a&&!Ua(a))return a;var l=_n(a);l.path=l.path.replace(/(\.(png|jpg)\d*)(?=$)/,(Vr.devicePixelRatio>=2||s===512?"@2x":"")+(yn.supported?".webp":"$1")),l.path=l.path.replace(/^.+\/v4\//,"/"),l.path="/v4"+l.path;var g=this._customAccessToken||function(P){for(var j=0,ne=P;j=0&&a.params.splice(P,1)}if(g.path!=="/"&&(a.path=""+g.path+a.path),!gn.REQUIRE_ACCESS_TOKEN)return yi(a);if(!(s=s||gn.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+l);if(s[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+l);return a.params=a.params.filter(function(j){return j.indexOf("access_token")===-1}),a.params.push("access_token="+s),yi(a)};var fa=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function ka(a){return fa.test(a)}var mo=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function _n(a){var s=a.match(mo);if(!s)throw new Error("Unable to parse URL object");return{protocol:s[1],authority:s[2],path:s[3]||"/",params:s[4]?s[4].split("&"):[]}}function yi(a){var s=a.params.length?"?"+a.params.join("&"):"";return a.protocol+"://"+a.authority+a.path+s}function Zn(a){if(!a)return null;var s=a.split(".");if(!s||s.length!==3)return null;try{return JSON.parse(decodeURIComponent(le.atob(s[1]).split("").map(function(l){return"%"+("00"+l.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch(l){return null}}var gr=function(a){this.type=a,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};gr.prototype.getStorageKey=function(a){var s,l=Zn(gn.ACCESS_TOKEN);return s=l&&l.u?le.btoa(encodeURIComponent(l.u).replace(/%([0-9A-F]{2})/g,function(g,P){return String.fromCharCode(+("0x"+P))})):gn.ACCESS_TOKEN||"",a?"mapbox.eventData."+a+":"+s:"mapbox.eventData:"+s},gr.prototype.fetchEventData=function(){var a=Rt("localStorage"),s=this.getStorageKey(),l=this.getStorageKey("uuid");if(a)try{var g=le.localStorage.getItem(s);g&&(this.eventData=JSON.parse(g));var P=le.localStorage.getItem(l);P&&(this.anonId=P)}catch(j){st("Unable to read from LocalStorage")}},gr.prototype.saveEventData=function(){var a=Rt("localStorage"),s=this.getStorageKey(),l=this.getStorageKey("uuid");if(a)try{le.localStorage.setItem(l,this.anonId),Object.keys(this.eventData).length>=1&&le.localStorage.setItem(s,JSON.stringify(this.eventData))}catch(g){st("Unable to write to LocalStorage")}},gr.prototype.processRequests=function(a){},gr.prototype.postEvent=function(a,s,l,g){var P=this;if(gn.EVENTS_URL){var j=_n(gn.EVENTS_URL);j.params.push("access_token="+(g||gn.ACCESS_TOKEN||""));var ne={event:this.type,created:new Date(a).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.3",skuId:Ia,userId:this.anonId},ge=s?Xe(ne,s):ne,ze={url:yi(j),headers:{"Content-Type":"text/plain"},body:JSON.stringify([ge])};this.pendingRequest=jt(ze,function(ht){P.pendingRequest=null,l(ht),P.saveEventData(),P.processRequests(g)})}},gr.prototype.queueRequest=function(a,s){this.queue.push(a),this.processRequests(s)};var Ea,co,Qa=function(a){function s(){a.call(this,"map.load"),this.success={},this.skuToken=""}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.postMapLoadEvent=function(l,g,P,j){this.skuToken=P;var ne=!(!j&&!gn.ACCESS_TOKEN),ge=Array.isArray(l)&&l.some(function(ze){return Ua(ze)||ka(ze)});gn.EVENTS_URL&&ne&&ge&&this.queueRequest({id:g,timestamp:Date.now()},j)},s.prototype.processRequests=function(l){var g=this;if(!this.pendingRequest&&this.queue.length!==0){var P=this.queue.shift(),j=P.id,ne=P.timestamp;j&&this.success[j]||(this.anonId||this.fetchEventData(),Ye(this.anonId)||(this.anonId=lt()),this.postEvent(ne,{skuToken:this.skuToken},function(ge){ge||j&&(g.success[j]=!0)},l))}},s}(gr),oa=new(function(a){function s(l){a.call(this,"appUserTurnstile"),this._customAccessToken=l}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.postTurnstileEvent=function(l,g){gn.EVENTS_URL&&gn.ACCESS_TOKEN&&Array.isArray(l)&&l.some(function(P){return Ua(P)||ka(P)})&&this.queueRequest(Date.now(),g)},s.prototype.processRequests=function(l){var g=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var P=Zn(gn.ACCESS_TOKEN),j=P?P.u:gn.ACCESS_TOKEN,ne=j!==this.eventData.tokenU;Ye(this.anonId)||(this.anonId=lt(),ne=!0);var ge=this.queue.shift();if(this.eventData.lastSuccess){var ze=new Date(this.eventData.lastSuccess),ht=new Date(ge),zt=(ge-this.eventData.lastSuccess)/864e5;ne=ne||zt>=1||zt<-1||ze.getDate()!==ht.getDate()}else ne=!0;if(!ne)return this.processRequests();this.postEvent(ge,{"enabled.telemetry":!1},function(qt){qt||(g.eventData.lastSuccess=ge,g.eventData.tokenU=j)},l)}},s}(gr)),ji=oa.postTurnstileEvent.bind(oa),so=new Qa,ei=so.postMapLoadEvent.bind(so),Kn=500,Jn=50;function da(){le.caches&&!Ea&&(Ea=le.caches.open("mapbox-tiles"))}function pa(a){var s=a.indexOf("?");return s<0?a:a.slice(0,s)}var uo,Ir=1/0;function bt(){return uo==null&&(uo=le.OffscreenCanvas&&new le.OffscreenCanvas(1,1).getContext("2d")&&typeof le.createImageBitmap=="function"),uo}var Yt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Yt);var Pt=function(a){function s(l,g,P){g===401&&ka(P)&&(l+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),a.call(this,l),this.status=g,this.url=P,this.name=this.constructor.name,this.message=l}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},s}(Error),xr=mt()?function(){return self.worker&&self.worker.referrer}:function(){return(le.location.protocol==="blob:"?le.parent:le).location.href},Tr,hn,Cn=function(a,s){if(!(/^file:/.test(l=a.url)||/^file:/.test(xr())&&!/^\w+:/.test(l))){if(le.fetch&&le.Request&&le.AbortController&&le.Request.prototype.hasOwnProperty("signal"))return function(g,P){var j,ne=new le.AbortController,ge=new le.Request(g.url,{method:g.method||"GET",body:g.body,credentials:g.credentials,headers:g.headers,referrer:xr(),signal:ne.signal}),ze=!1,ht=!1,zt=(j=ge.url).indexOf("sku=")>0&&ka(j);g.type==="json"&&ge.headers.set("Accept","application/json");var qt=function(Rr,Kr,qr){if(!ht){if(Rr&&Rr.message!=="SecurityError"&&st(Rr),Kr&&qr)return _r(Kr);var an=Date.now();le.fetch(ge).then(function(en){if(en.ok){var Hr=zt?en.clone():null;return _r(en,Hr,an)}return P(new Pt(en.statusText,en.status,g.url))}).catch(function(en){en.code!==20&&P(new Error(en.message))})}},_r=function(Rr,Kr,qr){(g.type==="arrayBuffer"?Rr.arrayBuffer():g.type==="json"?Rr.json():Rr.text()).then(function(an){ht||(Kr&&qr&&function(en,Hr,Fn){if(da(),Ea){var ni={status:Hr.status,statusText:Hr.statusText,headers:new le.Headers};Hr.headers.forEach(function(wa,za){return ni.headers.set(za,wa)});var Mi=Mt(Hr.headers.get("Cache-Control")||"");Mi["no-store"]||(Mi["max-age"]&&ni.headers.set("Expires",new Date(Fn+1e3*Mi["max-age"]).toUTCString()),new Date(ni.headers.get("Expires")).getTime()-Fn<42e4||function(wa,za){if(co===void 0)try{new Response(new ReadableStream),co=!0}catch(oo){co=!1}co?za(wa.body):wa.blob().then(za)}(Hr,function(wa){var za=new le.Response(wa,ni);da(),Ea&&Ea.then(function(oo){return oo.put(pa(en.url),za)}).catch(function(oo){return st(oo.message)})}))}}(ge,Kr,qr),ze=!0,P(null,an,Rr.headers.get("Cache-Control"),Rr.headers.get("Expires")))}).catch(function(an){ht||P(new Error(an.message))})};return zt?function(Rr,Kr){if(da(),!Ea)return Kr(null);var qr=pa(Rr.url);Ea.then(function(an){an.match(qr).then(function(en){var Hr=function(Fn){if(!Fn)return!1;var ni=new Date(Fn.headers.get("Expires")||0),Mi=Mt(Fn.headers.get("Cache-Control")||"");return ni>Date.now()&&!Mi["no-cache"]}(en);an.delete(qr),Hr&&an.put(qr,en.clone()),Kr(null,en,Hr)}).catch(Kr)}).catch(Kr)}(ge,qt):qt(null,null),{cancel:function(){ht=!0,ze||ne.abort()}}}(a,s);if(mt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",a,s,void 0,!0)}var l;return function(g,P){var j=new le.XMLHttpRequest;for(var ne in j.open(g.method||"GET",g.url,!0),g.type==="arrayBuffer"&&(j.responseType="arraybuffer"),g.headers)j.setRequestHeader(ne,g.headers[ne]);return g.type==="json"&&(j.responseType="text",j.setRequestHeader("Accept","application/json")),j.withCredentials=g.credentials==="include",j.onerror=function(){P(new Error(j.statusText))},j.onload=function(){if((j.status>=200&&j.status<300||j.status===0)&&j.response!==null){var ge=j.response;if(g.type==="json")try{ge=JSON.parse(j.response)}catch(ze){return P(ze)}P(null,ge,j.getResponseHeader("Cache-Control"),j.getResponseHeader("Expires"))}else P(new Pt(j.statusText,j.status,g.url))},j.send(g.body),{cancel:function(){return j.abort()}}}(a,s)},tr=function(a,s){return Cn(Xe(a,{type:"arrayBuffer"}),s)},jt=function(a,s){return Cn(Xe(a,{method:"POST"}),s)},He="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";Tr=[],hn=0;var We=function(a,s){if(yn.supported&&(a.headers||(a.headers={}),a.headers.accept="image/webp,*/*"),hn>=gn.MAX_PARALLEL_IMAGE_REQUESTS){var l={requestParameters:a,callback:s,cancelled:!1,cancel:function(){this.cancelled=!0}};return Tr.push(l),l}hn++;var g=!1,P=function(){if(!g)for(g=!0,hn--;Tr.length&&hn0||this._oneTimeListeners&&this._oneTimeListeners[a]&&this._oneTimeListeners[a].length>0||this._eventedParent&&this._eventedParent.listens(a)},mr.prototype.setEventedParent=function(a,s){return this._eventedParent=a,this._eventedParentData=s,this};var Qe={$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"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],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:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"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:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},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"}}},er=function(a,s,l,g){this.message=(a?a+": ":"")+l,g&&(this.identifier=g),s!=null&&s.__line__&&(this.line=s.__line__)};function jr(a){var s=a.value;return s?[new er(a.key,s,"constants have been deprecated as of v8")]:[]}function on(a){for(var s=[],l=arguments.length-1;l-- >0;)s[l]=arguments[l+1];for(var g=0,P=s;g":a.itemType.kind==="value"?"array":"array<"+s+">"}return a.kind}var Tu=[Wn,Tn,ai,Ii,ki,Ro,Fa,Os(sa),Za];function Do(a,s){if(s.kind==="error")return null;if(a.kind==="array"){if(s.kind==="array"&&(s.N===0&&s.itemType.kind==="value"||!Do(a.itemType,s.itemType))&&(typeof a.N!="number"||a.N===s.N))return null}else{if(a.kind===s.kind)return null;if(a.kind==="value"){for(var l=0,g=Tu;l255?255:ge}function P(ge){return g(ge[ge.length-1]==="%"?parseFloat(ge)/100*255:parseInt(ge))}function j(ge){return(ze=ge[ge.length-1]==="%"?parseFloat(ge)/100:parseFloat(ge))<0?0:ze>1?1:ze;var ze}function ne(ge,ze,ht){return ht<0?ht+=1:ht>1&&(ht-=1),6*ht<1?ge+(ze-ge)*ht*6:2*ht<1?ze:3*ht<2?ge+(ze-ge)*(2/3-ht)*6:ge}try{s.parseCSSColor=function(ge){var ze,ht=ge.replace(/ /g,"").toLowerCase();if(ht in l)return l[ht].slice();if(ht[0]==="#")return ht.length===4?(ze=parseInt(ht.substr(1),16))>=0&&ze<=4095?[(3840&ze)>>4|(3840&ze)>>8,240&ze|(240&ze)>>4,15&ze|(15&ze)<<4,1]:null:ht.length===7&&(ze=parseInt(ht.substr(1),16))>=0&&ze<=16777215?[(16711680&ze)>>16,(65280&ze)>>8,255&ze,1]:null;var zt=ht.indexOf("("),qt=ht.indexOf(")");if(zt!==-1&&qt+1===ht.length){var _r=ht.substr(0,zt),Rr=ht.substr(zt+1,qt-(zt+1)).split(","),Kr=1;switch(_r){case"rgba":if(Rr.length!==4)return null;Kr=j(Rr.pop());case"rgb":return Rr.length!==3?null:[P(Rr[0]),P(Rr[1]),P(Rr[2]),Kr];case"hsla":if(Rr.length!==4)return null;Kr=j(Rr.pop());case"hsl":if(Rr.length!==3)return null;var qr=(parseFloat(Rr[0])%360+360)%360/360,an=j(Rr[1]),en=j(Rr[2]),Hr=en<=.5?en*(an+1):en+an-en*an,Fn=2*en-Hr;return[g(255*ne(Fn,Hr,qr+1/3)),g(255*ne(Fn,Hr,qr)),g(255*ne(Fn,Hr,qr-1/3)),Kr];default:return null}}return null}}catch(ge){}}).parseCSSColor,Mn=function(a,s,l,g){g===void 0&&(g=1),this.r=a,this.g=s,this.b=l,this.a=g};Mn.parse=function(a){if(a){if(a instanceof Mn)return a;if(typeof a=="string"){var s=ca(a);if(s)return new Mn(s[0]/255*s[3],s[1]/255*s[3],s[2]/255*s[3],s[3])}}},Mn.prototype.toString=function(){var a=this.toArray(),s=a[1],l=a[2],g=a[3];return"rgba("+Math.round(a[0])+","+Math.round(s)+","+Math.round(l)+","+g+")"},Mn.prototype.toArray=function(){var a=this.a;return a===0?[0,0,0,0]:[255*this.r/a,255*this.g/a,255*this.b/a,a]},Mn.black=new Mn(0,0,0,1),Mn.white=new Mn(1,1,1,1),Mn.transparent=new Mn(0,0,0,0),Mn.red=new Mn(1,0,0,1);var wi=function(a,s,l){this.sensitivity=a?s?"variant":"case":s?"accent":"base",this.locale=l,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};wi.prototype.compare=function(a,s){return this.collator.compare(a,s)},wi.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Fu=function(a,s,l,g,P){this.text=a,this.image=s,this.scale=l,this.fontStack=g,this.textColor=P},Hs=function(a){this.sections=a};Hs.fromString=function(a){return new Hs([new Fu(a,null,null,null,null)])},Hs.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(a){return a.text.length!==0||a.image&&a.image.name.length!==0})},Hs.factory=function(a){return a instanceof Hs?a:Hs.fromString(a)},Hs.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(a){return a.text}).join("")},Hs.prototype.serialize=function(){for(var a=["format"],s=0,l=this.sections;s=0&&a<=255&&typeof s=="number"&&s>=0&&s<=255&&typeof l=="number"&&l>=0&&l<=255?g===void 0||typeof g=="number"&&g>=0&&g<=1?null:"Invalid rgba value ["+[a,s,l,g].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof g=="number"?[a,s,l,g]:[a,s,l]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Qs(a){if(a===null||typeof a=="string"||typeof a=="boolean"||typeof a=="number"||a instanceof Mn||a instanceof wi||a instanceof Hs||a instanceof us)return!0;if(Array.isArray(a)){for(var s=0,l=a;s2){var ge=a[1];if(typeof ge!="string"||!(ge in El)||ge==="object")return s.error('The item type argument of "array" must be one of string, number, boolean',1);j=El[ge],g++}else j=sa;if(a.length>3){if(a[2]!==null&&(typeof a[2]!="number"||a[2]<0||a[2]!==Math.floor(a[2])))return s.error('The length argument to "array" must be a positive integer literal',2);ne=a[2],g++}l=Os(j,ne)}else l=El[P];for(var ze=[];g1)&&s.push(g)}}return s.concat(this.args.map(function(P){return P.serialize()}))};var _l=function(a){this.type=Ro,this.sections=a};_l.parse=function(a,s){if(a.length<2)return s.error("Expected at least one argument.");var l=a[1];if(!Array.isArray(l)&&typeof l=="object")return s.error("First argument must be an image or text section.");for(var g=[],P=!1,j=1;j<=a.length-1;++j){var ne=a[j];if(P&&typeof ne=="object"&&!Array.isArray(ne)){P=!1;var ge=null;if(ne["font-scale"]&&!(ge=s.parse(ne["font-scale"],1,Tn)))return null;var ze=null;if(ne["text-font"]&&!(ze=s.parse(ne["text-font"],1,Os(ai))))return null;var ht=null;if(ne["text-color"]&&!(ht=s.parse(ne["text-color"],1,ki)))return null;var zt=g[g.length-1];zt.scale=ge,zt.font=ze,zt.textColor=ht}else{var qt=s.parse(a[j],1,sa);if(!qt)return null;var _r=qt.type.kind;if(_r!=="string"&&_r!=="value"&&_r!=="null"&&_r!=="resolvedImage")return s.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");P=!0,g.push({content:qt,scale:null,font:null,textColor:null})}}return new _l(g)},_l.prototype.evaluate=function(a){return new Hs(this.sections.map(function(s){var l=s.content.evaluate(a);return ko(l)===Za?new Fu("",l,null,null,null):new Fu(_o(l),null,s.scale?s.scale.evaluate(a):null,s.font?s.font.evaluate(a).join(","):null,s.textColor?s.textColor.evaluate(a):null)}))},_l.prototype.eachChild=function(a){for(var s=0,l=this.sections;s-1),l},Es.prototype.eachChild=function(a){a(this.input)},Es.prototype.outputDefined=function(){return!1},Es.prototype.serialize=function(){return["image",this.input.serialize()]};var yc={"to-boolean":Ii,"to-color":ki,"to-number":Tn,"to-string":ai},Vl=function(a,s){this.type=a,this.args=s};Vl.parse=function(a,s){if(a.length<2)return s.error("Expected at least one argument.");var l=a[0];if((l==="to-boolean"||l==="to-string")&&a.length!==2)return s.error("Expected one argument.");for(var g=yc[l],P=[],j=1;j4?"Invalid rbga value "+JSON.stringify(s)+": expected an array containing either three or four numeric values.":Ts(s[0],s[1],s[2],s[3])))return new Mn(s[0]/255,s[1]/255,s[2]/255,s[3])}throw new fo(l||"Could not parse color from value '"+(typeof s=="string"?s:String(JSON.stringify(s)))+"'")}if(this.type.kind==="number"){for(var ne=null,ge=0,ze=this.args;ge=s[2]||a[1]<=s[1]||a[3]>=s[3])}function Wt(a,s){var l=(180+a[0])/360,g=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a[1]*Math.PI/360)))/360,P=Math.pow(2,s.z);return[Math.round(l*P*8192),Math.round(g*P*8192)]}function wr(a,s,l){return s[1]>a[1]!=l[1]>a[1]&&a[0]<(l[0]-s[0])*(a[1]-s[1])/(l[1]-s[1])+s[0]}function bn(a,s){for(var l,g,P,j,ne,ge,ze,ht=!1,zt=0,qt=s.length;zt0&&ge<0||ne<0&&ge>0}function ya(a,s,l){for(var g=0,P=l;gl[2]){var P=.5*g,j=a[0]-l[0]>P?-g:l[0]-a[0]>P?g:0;j===0&&(j=a[0]-l[2]>P?-g:l[2]-a[0]>P?g:0),a[0]+=j}Pi(s,a)}function lr(a,s,l,g){for(var P=8192*Math.pow(2,g.z),j=[8192*g.x,8192*g.y],ne=[],ge=0,ze=a;ge=0)return!1;var l=!0;return a.eachChild(function(g){l&&!qn(g,s)&&(l=!1)}),l}Yr.parse=function(a,s){if(a.length!==2)return s.error("'within' expression requires exactly one argument, but found "+(a.length-1)+" instead.");if(Qs(a[1])){var l=a[1];if(l.type==="FeatureCollection")for(var g=0;gs))throw new fo("Input is not a number.");j=ne-1}return 0}Ui.prototype.parse=function(a,s,l,g,P){return P===void 0&&(P={}),s?this.concat(s,l,g)._parse(a,P):this._parse(a,P)},Ui.prototype._parse=function(a,s){function l(ht,zt,qt){return qt==="assert"?new ju(zt,[ht]):qt==="coerce"?new Vl(zt,[ht]):ht}if(a!==null&&typeof a!="string"&&typeof a!="boolean"&&typeof a!="number"||(a=["literal",a]),Array.isArray(a)){if(a.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var g=a[0];if(typeof g!="string")return this.error("Expression name must be a string, but found "+typeof g+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var P=this.registry[g];if(P){var j=P.parse(a,this);if(!j)return null;if(this.expectedType){var ne=this.expectedType,ge=j.type;if(ne.kind!=="string"&&ne.kind!=="number"&&ne.kind!=="boolean"&&ne.kind!=="object"&&ne.kind!=="array"||ge.kind!=="value")if(ne.kind!=="color"&&ne.kind!=="formatted"&&ne.kind!=="resolvedImage"||ge.kind!=="value"&&ge.kind!=="string"){if(this.checkSubtype(ne,ge))return null}else j=l(j,ne,s.typeAnnotation||"coerce");else j=l(j,ne,s.typeAnnotation||"assert")}if(!(j instanceof Js)&&j.type.kind!=="resolvedImage"&&function ht(zt){if(zt instanceof ti)return ht(zt.boundExpression);if(zt instanceof On&&zt.name==="error"||zt instanceof tn||zt instanceof Yr)return!1;var qt=zt instanceof Vl||zt instanceof ju,_r=!0;return zt.eachChild(function(Rr){_r=qt?_r&&ht(Rr):_r&&Rr instanceof Js}),!!_r&&un(zt)&&qn(zt,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(j)){var ze=new Au;try{j=new Js(j.type,j.evaluate(ze))}catch(ht){return this.error(ht.message),null}}return j}return this.error('Unknown expression "'+g+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(a===void 0?"'undefined' value invalid. Use null instead.":typeof a=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof a+" instead.")},Ui.prototype.concat=function(a,s,l){var g=typeof a=="number"?this.path.concat(a):this.path,P=l?this.scope.concat(l):this.scope;return new Ui(this.registry,g,s||null,P,this.errors)},Ui.prototype.error=function(a){for(var s=[],l=arguments.length-1;l-- >0;)s[l]=arguments[l+1];var g=""+this.key+s.map(function(P){return"["+P+"]"}).join("");this.errors.push(new ln(g,a))},Ui.prototype.checkSubtype=function(a,s){var l=Do(a,s);return l&&this.error(l),l};var ia=function(a,s,l){this.type=a,this.input=s,this.labels=[],this.outputs=[];for(var g=0,P=l;g=ne)return s.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ze);var zt=s.parse(ge,ht,P);if(!zt)return null;P=P||zt.type,g.push([ne,zt])}return new ia(P,l,g)},ia.prototype.evaluate=function(a){var s=this.labels,l=this.outputs;if(s.length===1)return l[0].evaluate(a);var g=this.input.evaluate(a);if(g<=s[0])return l[0].evaluate(a);var P=s.length;return g>=s[P-1]?l[P-1].evaluate(a):l[ra(s,g)].evaluate(a)},ia.prototype.eachChild=function(a){a(this.input);for(var s=0,l=this.outputs;s0&&a.push(this.labels[s]),a.push(this.outputs[s].serialize());return a};var gi=Object.freeze({__proto__:null,number:vi,color:function(a,s,l){return new Mn(vi(a.r,s.r,l),vi(a.g,s.g,l),vi(a.b,s.b,l),vi(a.a,s.a,l))},array:function(a,s,l){return a.map(function(g,P){return vi(g,s[P],l)})}}),ma=6/29*3*(6/29),Yi=Math.PI/180,ua=180/Math.PI;function La(a){return a>.008856451679035631?Math.pow(a,1/3):a/ma+4/29}function aa(a){return a>6/29?a*a*a:ma*(a-4/29)}function ho(a){return 255*(a<=.0031308?12.92*a:1.055*Math.pow(a,1/2.4)-.055)}function Po(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Ms(a){var s=Po(a.r),l=Po(a.g),g=Po(a.b),P=La((.4124564*s+.3575761*l+.1804375*g)/.95047),j=La((.2126729*s+.7151522*l+.072175*g)/1);return{l:116*j-16,a:500*(P-j),b:200*(j-La((.0193339*s+.119192*l+.9503041*g)/1.08883)),alpha:a.a}}function Mu(a){var s=(a.l+16)/116,l=isNaN(a.a)?s:s+a.a/500,g=isNaN(a.b)?s:s-a.b/200;return s=1*aa(s),l=.95047*aa(l),g=1.08883*aa(g),new Mn(ho(3.2404542*l-1.5371385*s-.4985314*g),ho(-.969266*l+1.8760108*s+.041556*g),ho(.0556434*l-.2040259*s+1.0572252*g),a.alpha)}function vs(a,s,l){var g=s-a;return a+l*(g>180||g<-180?g-360*Math.round(g/360):g)}var Xs={forward:Ms,reverse:Mu,interpolate:function(a,s,l){return{l:vi(a.l,s.l,l),a:vi(a.a,s.a,l),b:vi(a.b,s.b,l),alpha:vi(a.alpha,s.alpha,l)}}},iu={forward:function(a){var s=Ms(a),l=s.l,g=s.a,P=s.b,j=Math.atan2(P,g)*ua;return{h:j<0?j+360:j,c:Math.sqrt(g*g+P*P),l,alpha:a.a}},reverse:function(a){var s=a.h*Yi,l=a.c;return Mu({l:a.l,a:Math.cos(s)*l,b:Math.sin(s)*l,alpha:a.alpha})},interpolate:function(a,s,l){return{h:vs(a.h,s.h,l),c:vi(a.c,s.c,l),l:vi(a.l,s.l,l),alpha:vi(a.alpha,s.alpha,l)}}},js=Object.freeze({__proto__:null,lab:Xs,hcl:iu}),Vs=function(a,s,l,g,P){this.type=a,this.operator=s,this.interpolation=l,this.input=g,this.labels=[],this.outputs=[];for(var j=0,ne=P;j1}))return s.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);g={name:"cubic-bezier",controlPoints:ge}}if(a.length-1<4)return s.error("Expected at least 4 arguments, but found only "+(a.length-1)+".");if((a.length-1)%2!=0)return s.error("Expected an even number of arguments.");if(!(P=s.parse(P,2,Tn)))return null;var ze=[],ht=null;l==="interpolate-hcl"||l==="interpolate-lab"?ht=ki:s.expectedType&&s.expectedType.kind!=="value"&&(ht=s.expectedType);for(var zt=0;zt=qt)return s.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Rr);var qr=s.parse(_r,Kr,ht);if(!qr)return null;ht=ht||qr.type,ze.push([qt,qr])}return ht.kind==="number"||ht.kind==="color"||ht.kind==="array"&&ht.itemType.kind==="number"&&typeof ht.N=="number"?new Vs(ht,l,g,P,ze):s.error("Type "+ro(ht)+" is not interpolatable.")},Vs.prototype.evaluate=function(a){var s=this.labels,l=this.outputs;if(s.length===1)return l[0].evaluate(a);var g=this.input.evaluate(a);if(g<=s[0])return l[0].evaluate(a);var P=s.length;if(g>=s[P-1])return l[P-1].evaluate(a);var j=ra(s,g),ne=Vs.interpolationFactor(this.interpolation,g,s[j],s[j+1]),ge=l[j].evaluate(a),ze=l[j+1].evaluate(a);return this.operator==="interpolate"?gi[this.type.kind.toLowerCase()](ge,ze,ne):this.operator==="interpolate-hcl"?iu.reverse(iu.interpolate(iu.forward(ge),iu.forward(ze),ne)):Xs.reverse(Xs.interpolate(Xs.forward(ge),Xs.forward(ze),ne))},Vs.prototype.eachChild=function(a){a(this.input);for(var s=0,l=this.outputs;s=l.length)throw new fo("Array index out of bounds: "+s+" > "+(l.length-1)+".");if(s!==Math.floor(s))throw new fo("Array index must be an integer, but found "+s+" instead.");return l[s]},_c.prototype.eachChild=function(a){a(this.index),a(this.input)},_c.prototype.outputDefined=function(){return!1},_c.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Yo=function(a,s){this.type=Ii,this.needle=a,this.haystack=s};Yo.parse=function(a,s){if(a.length!==3)return s.error("Expected 2 arguments, but found "+(a.length-1)+" instead.");var l=s.parse(a[1],1,sa),g=s.parse(a[2],2,sa);return l&&g?qa(l.type,[Ii,ai,Tn,Wn,sa])?new Yo(l,g):s.error("Expected first argument to be of type boolean, string, number or null, but found "+ro(l.type)+" instead"):null},Yo.prototype.evaluate=function(a){var s=this.needle.evaluate(a),l=this.haystack.evaluate(a);if(!l)return!1;if(!ss(s,["boolean","string","number","null"]))throw new fo("Expected first argument to be of type boolean, string, number or null, but found "+ro(ko(s))+" instead.");if(!ss(l,["string","array"]))throw new fo("Expected second argument to be of type array or string, but found "+ro(ko(l))+" instead.");return l.indexOf(s)>=0},Yo.prototype.eachChild=function(a){a(this.needle),a(this.haystack)},Yo.prototype.outputDefined=function(){return!0},Yo.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var No=function(a,s,l){this.type=Tn,this.needle=a,this.haystack=s,this.fromIndex=l};No.parse=function(a,s){if(a.length<=2||a.length>=5)return s.error("Expected 3 or 4 arguments, but found "+(a.length-1)+" instead.");var l=s.parse(a[1],1,sa),g=s.parse(a[2],2,sa);if(!l||!g)return null;if(!qa(l.type,[Ii,ai,Tn,Wn,sa]))return s.error("Expected first argument to be of type boolean, string, number or null, but found "+ro(l.type)+" instead");if(a.length===4){var P=s.parse(a[3],3,Tn);return P?new No(l,g,P):null}return new No(l,g)},No.prototype.evaluate=function(a){var s=this.needle.evaluate(a),l=this.haystack.evaluate(a);if(!ss(s,["boolean","string","number","null"]))throw new fo("Expected first argument to be of type boolean, string, number or null, but found "+ro(ko(s))+" instead.");if(!ss(l,["string","array"]))throw new fo("Expected second argument to be of type array or string, but found "+ro(ko(l))+" instead.");if(this.fromIndex){var g=this.fromIndex.evaluate(a);return l.indexOf(s,g)}return l.indexOf(s)},No.prototype.eachChild=function(a){a(this.needle),a(this.haystack),this.fromIndex&&a(this.fromIndex)},No.prototype.outputDefined=function(){return!1},No.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var a=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),a]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ku=function(a,s,l,g,P,j){this.inputType=a,this.type=s,this.input=l,this.cases=g,this.outputs=P,this.otherwise=j};Ku.parse=function(a,s){if(a.length<5)return s.error("Expected at least 4 arguments, but found only "+(a.length-1)+".");if(a.length%2!=1)return s.error("Expected an even number of arguments.");var l,g;s.expectedType&&s.expectedType.kind!=="value"&&(g=s.expectedType);for(var P={},j=[],ne=2;neNumber.MAX_SAFE_INTEGER)return ht.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof _r=="number"&&Math.floor(_r)!==_r)return ht.error("Numeric branch labels must be integer values.");if(l){if(ht.checkSubtype(l,ko(_r)))return null}else l=ko(_r);if(P[String(_r)]!==void 0)return ht.error("Branch labels must be unique.");P[String(_r)]=j.length}var Rr=s.parse(ze,ne,g);if(!Rr)return null;g=g||Rr.type,j.push(Rr)}var Kr=s.parse(a[1],1,sa);if(!Kr)return null;var qr=s.parse(a[a.length-1],a.length-1,g);return qr?Kr.type.kind!=="value"&&s.concat(1).checkSubtype(l,Kr.type)?null:new Ku(l,g,Kr,P,j,qr):null},Ku.prototype.evaluate=function(a){var s=this.input.evaluate(a);return(ko(s)===this.inputType&&this.outputs[this.cases[s]]||this.otherwise).evaluate(a)},Ku.prototype.eachChild=function(a){a(this.input),this.outputs.forEach(a),a(this.otherwise)},Ku.prototype.outputDefined=function(){return this.outputs.every(function(a){return a.outputDefined()})&&this.otherwise.outputDefined()},Ku.prototype.serialize=function(){for(var a=this,s=["match",this.input.serialize()],l=[],g={},P=0,j=Object.keys(this.cases).sort();P=5)return s.error("Expected 3 or 4 arguments, but found "+(a.length-1)+" instead.");var l=s.parse(a[1],1,sa),g=s.parse(a[2],2,Tn);if(!l||!g)return null;if(!qa(l.type,[Os(sa),ai,sa]))return s.error("Expected first argument to be of type array or string, but found "+ro(l.type)+" instead");if(a.length===4){var P=s.parse(a[3],3,Tn);return P?new Wa(l.type,l,g,P):null}return new Wa(l.type,l,g)},Wa.prototype.evaluate=function(a){var s=this.input.evaluate(a),l=this.beginIndex.evaluate(a);if(!ss(s,["string","array"]))throw new fo("Expected first argument to be of type array or string, but found "+ro(ko(s))+" instead.");if(this.endIndex){var g=this.endIndex.evaluate(a);return s.slice(l,g)}return s.slice(l)},Wa.prototype.eachChild=function(a){a(this.input),a(this.beginIndex),this.endIndex&&a(this.endIndex)},Wa.prototype.outputDefined=function(){return!1},Wa.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var a=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),a]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Ec=yl("==",function(a,s,l){return s===l},yf),Zf=yl("!=",function(a,s,l){return s!==l},function(a,s,l,g){return!yf(0,s,l,g)}),Vu=yl("<",function(a,s,l){return s",function(a,s,l){return s>l},function(a,s,l,g){return g.compare(s,l)>0}),fl=yl("<=",function(a,s,l){return s<=l},function(a,s,l,g){return g.compare(s,l)<=0}),lf=yl(">=",function(a,s,l){return s>=l},function(a,s,l,g){return g.compare(s,l)>=0}),gu=function(a,s,l,g,P){this.type=ai,this.number=a,this.locale=s,this.currency=l,this.minFractionDigits=g,this.maxFractionDigits=P};gu.parse=function(a,s){if(a.length!==3)return s.error("Expected two arguments.");var l=s.parse(a[1],1,Tn);if(!l)return null;var g=a[2];if(typeof g!="object"||Array.isArray(g))return s.error("NumberFormat options argument must be an object.");var P=null;if(g.locale&&!(P=s.parse(g.locale,1,ai)))return null;var j=null;if(g.currency&&!(j=s.parse(g.currency,1,ai)))return null;var ne=null;if(g["min-fraction-digits"]&&!(ne=s.parse(g["min-fraction-digits"],1,Tn)))return null;var ge=null;return g["max-fraction-digits"]&&!(ge=s.parse(g["max-fraction-digits"],1,Tn))?null:new gu(l,P,j,ne,ge)},gu.prototype.evaluate=function(a){return new Intl.NumberFormat(this.locale?this.locale.evaluate(a):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(a):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(a):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(a):void 0}).format(this.number.evaluate(a))},gu.prototype.eachChild=function(a){a(this.number),this.locale&&a(this.locale),this.currency&&a(this.currency),this.minFractionDigits&&a(this.minFractionDigits),this.maxFractionDigits&&a(this.maxFractionDigits)},gu.prototype.outputDefined=function(){return!1},gu.prototype.serialize=function(){var a={};return this.locale&&(a.locale=this.locale.serialize()),this.currency&&(a.currency=this.currency.serialize()),this.minFractionDigits&&(a["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(a["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),a]};var Pu=function(a){this.type=Tn,this.input=a};Pu.parse=function(a,s){if(a.length!==2)return s.error("Expected 1 argument, but found "+(a.length-1)+" instead.");var l=s.parse(a[1],1);return l?l.type.kind!=="array"&&l.type.kind!=="string"&&l.type.kind!=="value"?s.error("Expected argument of type string or array, but found "+ro(l.type)+" instead."):new Pu(l):null},Pu.prototype.evaluate=function(a){var s=this.input.evaluate(a);if(typeof s=="string"||Array.isArray(s))return s.length;throw new fo("Expected value to be of type string or array, but found "+ro(ko(s))+" instead.")},Pu.prototype.eachChild=function(a){a(this.input)},Pu.prototype.outputDefined=function(){return!1},Pu.prototype.serialize=function(){var a=["length"];return this.eachChild(function(s){a.push(s.serialize())}),a};var Co={"==":Ec,"!=":Zf,">":lc,"<":Vu,">=":lf,"<=":fl,array:ju,at:_c,boolean:ju,case:Rc,coalesce:al,collator:tn,format:_l,image:Es,in:Yo,"index-of":No,interpolate:Vs,"interpolate-hcl":Vs,"interpolate-lab":Vs,length:Pu,let:ul,literal:Js,match:Ku,number:ju,"number-format":gu,object:ju,slice:Wa,step:ia,string:ju,"to-boolean":Vl,"to-color":Vl,"to-number":Vl,"to-string":Vl,var:ti,within:Yr};function zu(a,s){var l=s[0],g=s[1],P=s[2],j=s[3];l=l.evaluate(a),g=g.evaluate(a),P=P.evaluate(a);var ne=j?j.evaluate(a):1,ge=Ts(l,g,P,ne);if(ge)throw new fo(ge);return new Mn(l/255*ne,g/255*ne,P/255*ne,ne)}function Zu(a,s){return a in s}function St(a,s){var l=s[a];return l===void 0?null:l}function qu(a){return{type:a}}function hl(a){return{result:"success",value:a}}function rc(a){return{result:"error",value:a}}function bs(a){return a["property-type"]==="data-driven"||a["property-type"]==="cross-faded-data-driven"}function Il(a){return!!a.expression&&a.expression.parameters.indexOf("zoom")>-1}function ks(a){return!!a.expression&&a.expression.interpolated}function au(a){return a instanceof Number?"number":a instanceof String?"string":a instanceof Boolean?"boolean":Array.isArray(a)?"array":a===null?"null":typeof a}function Al(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function cc(a){return a}function Gl(a,s,l){return a!==void 0?a:s!==void 0?s:l!==void 0?l:void 0}function yh(a,s,l,g,P){return Gl(typeof l===P?g[l]:void 0,a.default,s.default)}function ah(a,s,l){if(au(l)!=="number")return Gl(a.default,s.default);var g=a.stops.length;if(g===1||l<=a.stops[0][0])return a.stops[0][1];if(l>=a.stops[g-1][0])return a.stops[g-1][1];var P=ra(a.stops.map(function(j){return j[0]}),l);return a.stops[P][1]}function qf(a,s,l){var g=a.base!==void 0?a.base:1;if(au(l)!=="number")return Gl(a.default,s.default);var P=a.stops.length;if(P===1||l<=a.stops[0][0])return a.stops[0][1];if(l>=a.stops[P-1][0])return a.stops[P-1][1];var j=ra(a.stops.map(function(qt){return qt[0]}),l),ne=function(qt,_r,Rr,Kr){var qr=Kr-Rr,an=qt-Rr;return qr===0?0:_r===1?an/qr:(Math.pow(_r,an)-1)/(Math.pow(_r,qr)-1)}(l,g,a.stops[j][0],a.stops[j+1][0]),ge=a.stops[j][1],ze=a.stops[j+1][1],ht=gi[s.type]||cc;if(a.colorSpace&&a.colorSpace!=="rgb"){var zt=js[a.colorSpace];ht=function(qt,_r){return zt.reverse(zt.interpolate(zt.forward(qt),zt.forward(_r),ne))}}return typeof ge.evaluate=="function"?{evaluate:function(){for(var qt=[],_r=arguments.length;_r--;)qt[_r]=arguments[_r];var Rr=ge.evaluate.apply(void 0,qt),Kr=ze.evaluate.apply(void 0,qt);if(Rr!==void 0&&Kr!==void 0)return ht(Rr,Kr,ne)}}:ht(ge,ze,ne)}function Ac(a,s,l){return s.type==="color"?l=Mn.parse(l):s.type==="formatted"?l=Hs.fromString(l.toString()):s.type==="resolvedImage"?l=us.fromString(l.toString()):au(l)===s.type||s.type==="enum"&&s.values[l]||(l=void 0),Gl(l,a.default,s.default)}On.register(Co,{error:[{kind:"error"},[ai],function(a,s){throw new fo(s[0].evaluate(a))}],typeof:[ai,[sa],function(a,s){return ro(ko(s[0].evaluate(a)))}],"to-rgba":[Os(Tn,4),[ki],function(a,s){return s[0].evaluate(a).toArray()}],rgb:[ki,[Tn,Tn,Tn],zu],rgba:[ki,[Tn,Tn,Tn,Tn],zu],has:{type:Ii,overloads:[[[ai],function(a,s){return Zu(s[0].evaluate(a),a.properties())}],[[ai,Fa],function(a,s){var l=s[1];return Zu(s[0].evaluate(a),l.evaluate(a))}]]},get:{type:sa,overloads:[[[ai],function(a,s){return St(s[0].evaluate(a),a.properties())}],[[ai,Fa],function(a,s){var l=s[1];return St(s[0].evaluate(a),l.evaluate(a))}]]},"feature-state":[sa,[ai],function(a,s){return St(s[0].evaluate(a),a.featureState||{})}],properties:[Fa,[],function(a){return a.properties()}],"geometry-type":[ai,[],function(a){return a.geometryType()}],id:[sa,[],function(a){return a.id()}],zoom:[Tn,[],function(a){return a.globals.zoom}],"heatmap-density":[Tn,[],function(a){return a.globals.heatmapDensity||0}],"line-progress":[Tn,[],function(a){return a.globals.lineProgress||0}],accumulated:[sa,[],function(a){return a.globals.accumulated===void 0?null:a.globals.accumulated}],"+":[Tn,qu(Tn),function(a,s){for(var l=0,g=0,P=s;g":[Ii,[ai,sa],function(a,s){var l=s[0],g=s[1],P=a.properties()[l.value],j=g.value;return typeof P==typeof j&&P>j}],"filter-id->":[Ii,[sa],function(a,s){var l=s[0],g=a.id(),P=l.value;return typeof g==typeof P&&g>P}],"filter-<=":[Ii,[ai,sa],function(a,s){var l=s[0],g=s[1],P=a.properties()[l.value],j=g.value;return typeof P==typeof j&&P<=j}],"filter-id-<=":[Ii,[sa],function(a,s){var l=s[0],g=a.id(),P=l.value;return typeof g==typeof P&&g<=P}],"filter->=":[Ii,[ai,sa],function(a,s){var l=s[0],g=s[1],P=a.properties()[l.value],j=g.value;return typeof P==typeof j&&P>=j}],"filter-id->=":[Ii,[sa],function(a,s){var l=s[0],g=a.id(),P=l.value;return typeof g==typeof P&&g>=P}],"filter-has":[Ii,[sa],function(a,s){return s[0].value in a.properties()}],"filter-has-id":[Ii,[],function(a){return a.id()!==null&&a.id()!==void 0}],"filter-type-in":[Ii,[Os(ai)],function(a,s){return s[0].value.indexOf(a.geometryType())>=0}],"filter-id-in":[Ii,[Os(sa)],function(a,s){return s[0].value.indexOf(a.id())>=0}],"filter-in-small":[Ii,[ai,Os(sa)],function(a,s){var l=s[0];return s[1].value.indexOf(a.properties()[l.value])>=0}],"filter-in-large":[Ii,[ai,Os(sa)],function(a,s){var l=s[0],g=s[1];return function(P,j,ne,ge){for(;ne<=ge;){var ze=ne+ge>>1;if(j[ze]===P)return!0;j[ze]>P?ge=ze-1:ne=ze+1}return!1}(a.properties()[l.value],g.value,0,g.value.length-1)}],all:{type:Ii,overloads:[[[Ii,Ii],function(a,s){var l=s[1];return s[0].evaluate(a)&&l.evaluate(a)}],[qu(Ii),function(a,s){for(var l=0,g=s;l0&&typeof a[0]=="string"&&a[0]in Co}function zc(a,s){var l=new Ui(Co,[],s?function(P){var j={color:ki,string:ai,number:Tn,enum:ai,boolean:Ii,formatted:Ro,resolvedImage:Za};return P.type==="array"?Os(j[P.value]||sa,P.length):j[P.type]}(s):void 0),g=l.parse(a,void 0,void 0,void 0,s&&s.type==="string"?{typeAnnotation:"coerce"}:void 0);return g?hl(new Xf(g,s)):rc(l.errors)}Xf.prototype.evaluateWithoutErrorHandling=function(a,s,l,g,P,j){return this._evaluator.globals=a,this._evaluator.feature=s,this._evaluator.featureState=l,this._evaluator.canonical=g,this._evaluator.availableImages=P||null,this._evaluator.formattedSection=j,this.expression.evaluate(this._evaluator)},Xf.prototype.evaluate=function(a,s,l,g,P,j){this._evaluator.globals=a,this._evaluator.feature=s||null,this._evaluator.featureState=l||null,this._evaluator.canonical=g,this._evaluator.availableImages=P||null,this._evaluator.formattedSection=j||null;try{var ne=this.expression.evaluate(this._evaluator);if(ne==null||typeof ne=="number"&&ne!=ne)return this._defaultValue;if(this._enumValues&&!(ne in this._enumValues))throw new fo("Expected value to be one of "+Object.keys(this._enumValues).map(function(ge){return JSON.stringify(ge)}).join(", ")+", but found "+JSON.stringify(ne)+" instead.");return ne}catch(ge){return this._warningHistory[ge.message]||(this._warningHistory[ge.message]=!0,typeof console!="undefined"&&console.warn(ge.message)),this._defaultValue}};var bh=function(a,s){this.kind=a,this._styleExpression=s,this.isStateDependent=a!=="constant"&&!Sn(s.expression)};bh.prototype.evaluateWithoutErrorHandling=function(a,s,l,g,P,j){return this._styleExpression.evaluateWithoutErrorHandling(a,s,l,g,P,j)},bh.prototype.evaluate=function(a,s,l,g,P,j){return this._styleExpression.evaluate(a,s,l,g,P,j)};var Nn=function(a,s,l,g){this.kind=a,this.zoomStops=l,this._styleExpression=s,this.isStateDependent=a!=="camera"&&!Sn(s.expression),this.interpolationType=g};function Pn(a,s){if((a=zc(a,s)).result==="error")return a;var l=a.value.expression,g=un(l);if(!g&&!bs(s))return rc([new ln("","data expressions not supported")]);var P=qn(l,["zoom"]);if(!P&&!Il(s))return rc([new ln("","zoom expressions not supported")]);var j=function ne(ge){var ze=null;if(ge instanceof ul)ze=ne(ge.result);else if(ge instanceof al)for(var ht=0,zt=ge.args;htg.maximum?[new er(s,l,l+" is greater than the maximum value "+g.maximum)]:[]}function Gs(a){var s,l,g,P=a.valueSpec,j=ri(a.value.type),ne={},ge=j!=="categorical"&&a.value.property===void 0,ze=!ge,ht=au(a.value.stops)==="array"&&au(a.value.stops[0])==="array"&&au(a.value.stops[0][0])==="object",zt=qi({key:a.key,value:a.value,valueSpec:a.styleSpec.function,style:a.style,styleSpec:a.styleSpec,objectElementValidators:{stops:function(Rr){if(j==="identity")return[new er(Rr.key,Rr.value,'identity function may not have a "stops" property')];var Kr=[],qr=Rr.value;return Kr=Kr.concat(Xa({key:Rr.key,value:qr,valueSpec:Rr.valueSpec,style:Rr.style,styleSpec:Rr.styleSpec,arrayElementValidator:qt})),au(qr)==="array"&&qr.length===0&&Kr.push(new er(Rr.key,qr,"array must have at least one stop")),Kr},default:function(Rr){return ds({key:Rr.key,value:Rr.value,valueSpec:P,style:Rr.style,styleSpec:Rr.styleSpec})}}});return j==="identity"&&ge&&zt.push(new er(a.key,a.value,'missing required property "property"')),j==="identity"||a.value.stops||zt.push(new er(a.key,a.value,'missing required property "stops"')),j==="exponential"&&a.valueSpec.expression&&!ks(a.valueSpec)&&zt.push(new er(a.key,a.value,"exponential functions not supported")),a.styleSpec.$version>=8&&(ze&&!bs(a.valueSpec)?zt.push(new er(a.key,a.value,"property functions not supported")):ge&&!Il(a.valueSpec)&&zt.push(new er(a.key,a.value,"zoom functions not supported"))),j!=="categorical"&&!ht||a.value.property!==void 0||zt.push(new er(a.key,a.value,'"property" property is required')),zt;function qt(Rr){var Kr=[],qr=Rr.value,an=Rr.key;if(au(qr)!=="array")return[new er(an,qr,"array expected, "+au(qr)+" found")];if(qr.length!==2)return[new er(an,qr,"array length 2 expected, length "+qr.length+" found")];if(ht){if(au(qr[0])!=="object")return[new er(an,qr,"object expected, "+au(qr[0])+" found")];if(qr[0].zoom===void 0)return[new er(an,qr,"object stop key must have zoom")];if(qr[0].value===void 0)return[new er(an,qr,"object stop key must have value")];if(g&&g>ri(qr[0].zoom))return[new er(an,qr[0].zoom,"stop zoom values must appear in ascending order")];ri(qr[0].zoom)!==g&&(g=ri(qr[0].zoom),l=void 0,ne={}),Kr=Kr.concat(qi({key:an+"[0]",value:qr[0],valueSpec:{zoom:{}},style:Rr.style,styleSpec:Rr.styleSpec,objectElementValidators:{zoom:To,value:_r}}))}else Kr=Kr.concat(_r({key:an+"[0]",value:qr[0],valueSpec:{},style:Rr.style,styleSpec:Rr.styleSpec},qr));return _f(nn(qr[1]))?Kr.concat([new er(an+"[1]",qr[1],"expressions are not allowed in function stops.")]):Kr.concat(ds({key:an+"[1]",value:qr[1],valueSpec:P,style:Rr.style,styleSpec:Rr.styleSpec}))}function _r(Rr,Kr){var qr=au(Rr.value),an=ri(Rr.value),en=Rr.value!==null?Rr.value:Kr;if(s){if(qr!==s)return[new er(Rr.key,en,qr+" stop domain type must match previous stop domain type "+s)]}else s=qr;if(qr!=="number"&&qr!=="string"&&qr!=="boolean")return[new er(Rr.key,en,"stop domain value must be a number, string, or boolean")];if(qr!=="number"&&j!=="categorical"){var Hr="number expected, "+qr+" found";return bs(P)&&j===void 0&&(Hr+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new er(Rr.key,en,Hr)]}return j!=="categorical"||qr!=="number"||isFinite(an)&&Math.floor(an)===an?j!=="categorical"&&qr==="number"&&l!==void 0&&an=2&&a[1]!=="$id"&&a[1]!=="$type";case"in":return a.length>=3&&(typeof a[1]!="string"||Array.isArray(a[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return a.length!==3||Array.isArray(a[1])||Array.isArray(a[2]);case"any":case"all":for(var s=0,l=a.slice(1);ss?1:0}function Oc(a){if(!a)return!0;var s,l=a[0];return a.length<=1?l!=="any":l==="=="?fc(a[1],a[2],"=="):l==="!="?Ys(fc(a[1],a[2],"==")):l==="<"||l===">"||l==="<="||l===">="?fc(a[1],a[2],l):l==="any"?(s=a.slice(1),["any"].concat(s.map(Oc))):l==="all"?["all"].concat(a.slice(1).map(Oc)):l==="none"?["all"].concat(a.slice(1).map(Oc).map(Ys)):l==="in"?Lu(a[1],a.slice(2)):l==="!in"?Ys(Lu(a[1],a.slice(2))):l==="has"?su(a[1]):l==="!has"?Ys(su(a[1])):l!=="within"||a}function fc(a,s,l){switch(a){case"$type":return["filter-type-"+l,s];case"$id":return["filter-id-"+l,s];default:return["filter-"+l,a,s]}}function Lu(a,s){if(s.length===0)return!1;switch(a){case"$type":return["filter-type-in",["literal",s]];case"$id":return["filter-id-in",["literal",s]];default:return s.length>200&&!s.some(function(l){return typeof l!=typeof s[0]})?["filter-in-large",a,["literal",s.sort(Uu)]]:["filter-in-small",a,["literal",s]]}}function su(a){switch(a){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",a]}}function Ys(a){return["!",a]}function _s(a){return ou(nn(a.value))?xs(on({},a,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function s(l){var g=l.value,P=l.key;if(au(g)!=="array")return[new er(P,g,"array expected, "+au(g)+" found")];var j,ne=l.styleSpec,ge=[];if(g.length<1)return[new er(P,g,"filter array must have at least 1 element")];switch(ge=ge.concat(Jo({key:P+"[0]",value:g[0],valueSpec:ne.filter_operator,style:l.style,styleSpec:l.styleSpec})),ri(g[0])){case"<":case"<=":case">":case">=":g.length>=2&&ri(g[1])==="$type"&&ge.push(new er(P,g,'"$type" cannot be use with operator "'+g[0]+'"'));case"==":case"!=":g.length!==3&&ge.push(new er(P,g,'filter array for operator "'+g[0]+'" must have 3 elements'));case"in":case"!in":g.length>=2&&(j=au(g[1]))!=="string"&&ge.push(new er(P+"[1]",g[1],"string expected, "+j+" found"));for(var ze=2;ze=zt[Rr+0]&&g>=zt[Rr+1])?(ne[_r]=!0,j.push(ht[_r])):ne[_r]=!1}}},af.prototype._forEachCell=function(a,s,l,g,P,j,ne,ge){for(var ze=this._convertToCellCoord(a),ht=this._convertToCellCoord(s),zt=this._convertToCellCoord(l),qt=this._convertToCellCoord(g),_r=ze;_r<=zt;_r++)for(var Rr=ht;Rr<=qt;Rr++){var Kr=this.d*Rr+_r;if((!ge||ge(this._convertFromCellCoord(_r),this._convertFromCellCoord(Rr),this._convertFromCellCoord(_r+1),this._convertFromCellCoord(Rr+1)))&&P.call(this,a,s,l,g,Kr,j,ne,ge))return}},af.prototype._convertFromCellCoord=function(a){return(a-this.padding)/this.scale},af.prototype._convertToCellCoord=function(a){return Math.max(0,Math.min(this.d-1,Math.floor(a*this.scale)+this.padding))},af.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var a=this.cells,s=3+this.cells.length+1+1,l=0,g=0;g=0)){var zt=a[ht];ze[ht]=_u[ge].shallow.indexOf(ht)>=0?zt:Gr(zt,s)}a instanceof Error&&(ze.message=a.message)}if(ze.$name)throw new Error("$name property is reserved for worker serialization logic.");return ge!=="Object"&&(ze.$name=ge),ze}throw new Error("can't serialize object of type "+typeof a)}function of(a){if(a==null||typeof a=="boolean"||typeof a=="number"||typeof a=="string"||a instanceof Boolean||a instanceof Number||a instanceof String||a instanceof Date||a instanceof RegExp||fd(a)||Qi(a)||ArrayBuffer.isView(a)||a instanceof cd)return a;if(Array.isArray(a))return a.map(of);if(typeof a=="object"){var s=a.$name||"Object",l=_u[s].klass;if(!l)throw new Error("can't deserialize unregistered class "+s);if(l.deserialize)return l.deserialize(a);for(var g=Object.create(l.prototype),P=0,j=Object.keys(a);P=0?ge:of(ge)}}return g}throw new Error("can't deserialize object of type "+typeof a)}var Qr=function(){this.first=!0};Qr.prototype.update=function(a,s){var l=Math.floor(a);return this.first?(this.first=!1,this.lastIntegerZoom=l,this.lastIntegerZoomTime=0,this.lastZoom=a,this.lastFloorZoom=l,!0):(this.lastFloorZoom>l?(this.lastIntegerZoom=l+1,this.lastIntegerZoomTime=s):this.lastFloorZoom=128&&a<=255},Arabic:function(a){return a>=1536&&a<=1791},"Arabic Supplement":function(a){return a>=1872&&a<=1919},"Arabic Extended-A":function(a){return a>=2208&&a<=2303},"Hangul Jamo":function(a){return a>=4352&&a<=4607},"Unified Canadian Aboriginal Syllabics":function(a){return a>=5120&&a<=5759},Khmer:function(a){return a>=6016&&a<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(a){return a>=6320&&a<=6399},"General Punctuation":function(a){return a>=8192&&a<=8303},"Letterlike Symbols":function(a){return a>=8448&&a<=8527},"Number Forms":function(a){return a>=8528&&a<=8591},"Miscellaneous Technical":function(a){return a>=8960&&a<=9215},"Control Pictures":function(a){return a>=9216&&a<=9279},"Optical Character Recognition":function(a){return a>=9280&&a<=9311},"Enclosed Alphanumerics":function(a){return a>=9312&&a<=9471},"Geometric Shapes":function(a){return a>=9632&&a<=9727},"Miscellaneous Symbols":function(a){return a>=9728&&a<=9983},"Miscellaneous Symbols and Arrows":function(a){return a>=11008&&a<=11263},"CJK Radicals Supplement":function(a){return a>=11904&&a<=12031},"Kangxi Radicals":function(a){return a>=12032&&a<=12255},"Ideographic Description Characters":function(a){return a>=12272&&a<=12287},"CJK Symbols and Punctuation":function(a){return a>=12288&&a<=12351},Hiragana:function(a){return a>=12352&&a<=12447},Katakana:function(a){return a>=12448&&a<=12543},Bopomofo:function(a){return a>=12544&&a<=12591},"Hangul Compatibility Jamo":function(a){return a>=12592&&a<=12687},Kanbun:function(a){return a>=12688&&a<=12703},"Bopomofo Extended":function(a){return a>=12704&&a<=12735},"CJK Strokes":function(a){return a>=12736&&a<=12783},"Katakana Phonetic Extensions":function(a){return a>=12784&&a<=12799},"Enclosed CJK Letters and Months":function(a){return a>=12800&&a<=13055},"CJK Compatibility":function(a){return a>=13056&&a<=13311},"CJK Unified Ideographs Extension A":function(a){return a>=13312&&a<=19903},"Yijing Hexagram Symbols":function(a){return a>=19904&&a<=19967},"CJK Unified Ideographs":function(a){return a>=19968&&a<=40959},"Yi Syllables":function(a){return a>=40960&&a<=42127},"Yi Radicals":function(a){return a>=42128&&a<=42191},"Hangul Jamo Extended-A":function(a){return a>=43360&&a<=43391},"Hangul Syllables":function(a){return a>=44032&&a<=55215},"Hangul Jamo Extended-B":function(a){return a>=55216&&a<=55295},"Private Use Area":function(a){return a>=57344&&a<=63743},"CJK Compatibility Ideographs":function(a){return a>=63744&&a<=64255},"Arabic Presentation Forms-A":function(a){return a>=64336&&a<=65023},"Vertical Forms":function(a){return a>=65040&&a<=65055},"CJK Compatibility Forms":function(a){return a>=65072&&a<=65103},"Small Form Variants":function(a){return a>=65104&&a<=65135},"Arabic Presentation Forms-B":function(a){return a>=65136&&a<=65279},"Halfwidth and Fullwidth Forms":function(a){return a>=65280&&a<=65519}};function cf(a){for(var s=0,l=a;s=65097&&a<=65103)||is["CJK Compatibility Ideographs"](a)||is["CJK Compatibility"](a)||is["CJK Radicals Supplement"](a)||is["CJK Strokes"](a)||!(!is["CJK Symbols and Punctuation"](a)||a>=12296&&a<=12305||a>=12308&&a<=12319||a===12336)||is["CJK Unified Ideographs Extension A"](a)||is["CJK Unified Ideographs"](a)||is["Enclosed CJK Letters and Months"](a)||is["Hangul Compatibility Jamo"](a)||is["Hangul Jamo Extended-A"](a)||is["Hangul Jamo Extended-B"](a)||is["Hangul Jamo"](a)||is["Hangul Syllables"](a)||is.Hiragana(a)||is["Ideographic Description Characters"](a)||is.Kanbun(a)||is["Kangxi Radicals"](a)||is["Katakana Phonetic Extensions"](a)||is.Katakana(a)&&a!==12540||!(!is["Halfwidth and Fullwidth Forms"](a)||a===65288||a===65289||a===65293||a>=65306&&a<=65310||a===65339||a===65341||a===65343||a>=65371&&a<=65503||a===65507||a>=65512&&a<=65519)||!(!is["Small Form Variants"](a)||a>=65112&&a<=65118||a>=65123&&a<=65126)||is["Unified Canadian Aboriginal Syllabics"](a)||is["Unified Canadian Aboriginal Syllabics Extended"](a)||is["Vertical Forms"](a)||is["Yijing Hexagram Symbols"](a)||is["Yi Syllables"](a)||is["Yi Radicals"](a))))}function ic(a){return!(nf(a)||function(s){return!!(is["Latin-1 Supplement"](s)&&(s===167||s===169||s===174||s===177||s===188||s===189||s===190||s===215||s===247)||is["General Punctuation"](s)&&(s===8214||s===8224||s===8225||s===8240||s===8241||s===8251||s===8252||s===8258||s===8263||s===8264||s===8265||s===8273)||is["Letterlike Symbols"](s)||is["Number Forms"](s)||is["Miscellaneous Technical"](s)&&(s>=8960&&s<=8967||s>=8972&&s<=8991||s>=8996&&s<=9e3||s===9003||s>=9085&&s<=9114||s>=9150&&s<=9165||s===9167||s>=9169&&s<=9179||s>=9186&&s<=9215)||is["Control Pictures"](s)&&s!==9251||is["Optical Character Recognition"](s)||is["Enclosed Alphanumerics"](s)||is["Geometric Shapes"](s)||is["Miscellaneous Symbols"](s)&&!(s>=9754&&s<=9759)||is["Miscellaneous Symbols and Arrows"](s)&&(s>=11026&&s<=11055||s>=11088&&s<=11097||s>=11192&&s<=11243)||is["CJK Symbols and Punctuation"](s)||is.Katakana(s)||is["Private Use Area"](s)||is["CJK Compatibility Forms"](s)||is["Small Form Variants"](s)||is["Halfwidth and Fullwidth Forms"](s)||s===8734||s===8756||s===8757||s>=9984&&s<=10087||s>=10102&&s<=10131||s===65532||s===65533)}(a))}function Ws(a){return a>=1424&&a<=2303||is["Arabic Presentation Forms-A"](a)||is["Arabic Presentation Forms-B"](a)}function $u(a,s){return!(!s&&Ws(a)||a>=2304&&a<=3583||a>=3840&&a<=4255||is.Khmer(a))}function ac(a){for(var s=0,l=a;s-1&&(Fl="error"),$l&&$l(a)};function dr(){Wr.fire(new rr("pluginStateChange",{pluginStatus:Fl,pluginURL:Oe}))}var Wr=new mr,Jr=function(){return Fl},Gn=function(){if(Fl!=="deferred"||!Oe)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Fl="loading",dr(),Oe&&tr({url:Oe},function(a){a?Ft(a):(Fl="loaded",dr())})},mi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Fl==="loaded"||mi.applyArabicShaping!=null},isLoading:function(){return Fl==="loading"},setState:function(a){Fl=a.pluginStatus,Oe=a.pluginURL},isParsed:function(){return mi.applyArabicShaping!=null&&mi.processBidirectionalText!=null&&mi.processStyledBidirectionalText!=null},getPluginURL:function(){return Oe}},Vn=function(a,s){this.zoom=a,s?(this.now=s.now,this.fadeDuration=s.fadeDuration,this.zoomHistory=s.zoomHistory,this.transition=s.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Qr,this.transition={})};Vn.prototype.isSupportedScript=function(a){return function(s,l){for(var g=0,P=s;gthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:s+(1-s)*l}:{fromScale:.5,toScale:1,t:1-(1-l)*s}};var Gi=function(a,s){this.property=a,this.value=s,this.expression=function(l,g){if(Al(l))return new xi(l,g);if(_f(l)){var P=Pn(l,g);if(P.result==="error")throw new Error(P.value.map(function(ne){return ne.key+": "+ne.message}).join(", "));return P.value}var j=l;return typeof l=="string"&&g.type==="color"&&(j=Mn.parse(l)),{kind:"constant",evaluate:function(){return j}}}(s===void 0?a.specification.default:s,a.specification)};Gi.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Gi.prototype.possiblyEvaluate=function(a,s,l){return this.property.possiblyEvaluate(this,a,s,l)};var Li=function(a){this.property=a,this.value=new Gi(a,void 0)};Li.prototype.transitioned=function(a,s){return new Ca(this.property,this.value,s,Xe({},a.transition,this.transition),a.now)},Li.prototype.untransitioned=function(){return new Ca(this.property,this.value,null,{},0)};var Xn=function(a){this._properties=a,this._values=Object.create(a.defaultTransitionablePropertyValues)};Xn.prototype.getValue=function(a){return Ze(this._values[a].value.value)},Xn.prototype.setValue=function(a,s){this._values.hasOwnProperty(a)||(this._values[a]=new Li(this._values[a].property)),this._values[a].value=new Gi(this._values[a].property,s===null?void 0:Ze(s))},Xn.prototype.getTransition=function(a){return Ze(this._values[a].transition)},Xn.prototype.setTransition=function(a,s){this._values.hasOwnProperty(a)||(this._values[a]=new Li(this._values[a].property)),this._values[a].transition=Ze(s)||void 0},Xn.prototype.serialize=function(){for(var a={},s=0,l=Object.keys(this._values);sthis.end)return this.prior=null,P;if(this.value.isDataDriven())return this.prior=null,P;if(g=1)return 1;var ze=ge*ge,ht=ze*ge;return 4*(ge<.5?ht:3*(ge-ze)+ht-.75)}(ne))}return P};var $a=function(a){this._properties=a,this._values=Object.create(a.defaultTransitioningPropertyValues)};$a.prototype.possiblyEvaluate=function(a,s,l){for(var g=new ba(this._properties),P=0,j=Object.keys(this._values);Pj.zoomHistory.lastIntegerZoom?{from:l,to:g}:{from:P,to:g}},s.prototype.interpolate=function(l){return l},s}(Bi),Sa=function(a){this.specification=a};Sa.prototype.possiblyEvaluate=function(a,s,l,g){if(a.value!==void 0){if(a.expression.kind==="constant"){var P=a.expression.evaluate(s,null,{},l,g);return this._calculate(P,P,P,s)}return this._calculate(a.expression.evaluate(new Vn(Math.floor(s.zoom-1),s)),a.expression.evaluate(new Vn(Math.floor(s.zoom),s)),a.expression.evaluate(new Vn(Math.floor(s.zoom+1),s)),s)}},Sa.prototype._calculate=function(a,s,l,g){return g.zoom>g.zoomHistory.lastIntegerZoom?{from:a,to:s}:{from:l,to:s}},Sa.prototype.interpolate=function(a){return a};var Ko=function(a){this.specification=a};Ko.prototype.possiblyEvaluate=function(a,s,l,g){return!!a.expression.evaluate(s,null,{},l,g)},Ko.prototype.interpolate=function(){return!1};var qo=function(a){for(var s in this.properties=a,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],a){var l=a[s];l.specification.overridable&&this.overridableProperties.push(s);var g=this.defaultPropertyValues[s]=new Gi(l,void 0),P=this.defaultTransitionablePropertyValues[s]=new Li(l);this.defaultTransitioningPropertyValues[s]=P.untransitioned(),this.defaultPossiblyEvaluatedValues[s]=g.possiblyEvaluate({})}};Ls("DataDrivenProperty",Bi),Ls("DataConstantProperty",Ti),Ls("CrossFadedDataDrivenProperty",na),Ls("CrossFadedProperty",Sa),Ls("ColorRampProperty",Ko);var gs=function(a){function s(l,g){if(a.call(this),this.id=l.id,this.type=l.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},l.type!=="custom"&&(this.metadata=(l=l).metadata,this.minzoom=l.minzoom,this.maxzoom=l.maxzoom,l.type!=="background"&&(this.source=l.source,this.sourceLayer=l["source-layer"],this.filter=l.filter),g.layout&&(this._unevaluatedLayout=new Ba(g.layout)),g.paint)){for(var P in this._transitionablePaint=new Xn(g.paint),l.paint)this.setPaintProperty(P,l.paint[P],{validate:!1});for(var j in l.layout)this.setLayoutProperty(j,l.layout[j],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ba(g.paint)}}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},s.prototype.getLayoutProperty=function(l){return l==="visibility"?this.visibility:this._unevaluatedLayout.getValue(l)},s.prototype.setLayoutProperty=function(l,g,P){P===void 0&&(P={}),g!=null&&this._validate(wd,"layers."+this.id+".layout."+l,l,g,P)||(l!=="visibility"?this._unevaluatedLayout.setValue(l,g):this.visibility=g)},s.prototype.getPaintProperty=function(l){return At(l,"-transition")?this._transitionablePaint.getTransition(l.slice(0,-11)):this._transitionablePaint.getValue(l)},s.prototype.setPaintProperty=function(l,g,P){if(P===void 0&&(P={}),g!=null&&this._validate(If,"layers."+this.id+".paint."+l,l,g,P))return!1;if(At(l,"-transition"))return this._transitionablePaint.setTransition(l.slice(0,-11),g||void 0),!1;var j=this._transitionablePaint._values[l],ne=j.property.specification["property-type"]==="cross-faded-data-driven",ge=j.value.isDataDriven(),ze=j.value;this._transitionablePaint.setValue(l,g),this._handleSpecialPaintPropertyUpdate(l);var ht=this._transitionablePaint._values[l].value;return ht.isDataDriven()||ge||ne||this._handleOverridablePaintPropertyUpdate(l,ze,ht)},s.prototype._handleSpecialPaintPropertyUpdate=function(l){},s.prototype._handleOverridablePaintPropertyUpdate=function(l,g,P){return!1},s.prototype.isHidden=function(l){return!!(this.minzoom&&l=this.maxzoom)||this.visibility==="none"},s.prototype.updateTransitions=function(l){this._transitioningPaint=this._transitionablePaint.transitioned(l,this._transitioningPaint)},s.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},s.prototype.recalculate=function(l,g){l.getCrossfadeParameters&&(this._crossfadeParameters=l.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(l,void 0,g)),this.paint=this._transitioningPaint.possiblyEvaluate(l,void 0,g)},s.prototype.serialize=function(){var l={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(l.layout=l.layout||{},l.layout.visibility=this.visibility),rt(l,function(g,P){return!(g===void 0||P==="layout"&&!Object.keys(g).length||P==="paint"&&!Object.keys(g).length)})},s.prototype._validate=function(l,g,P,j,ne){return ne===void 0&&(ne={}),(!ne||ne.validate!==!1)&&_h(this,l.call(xh,{key:g,layerType:this.type,objectKey:P,value:j,styleSpec:Qe,style:{glyphs:!0,sprite:!0}}))},s.prototype.is3D=function(){return!1},s.prototype.isTileClipped=function(){return!1},s.prototype.hasOffscreenPass=function(){return!1},s.prototype.resize=function(){},s.prototype.isStateDependent=function(){for(var l in this.paint._values){var g=this.paint.get(l);if(g instanceof ha&&bs(g.property.specification)&&(g.value.kind==="source"||g.value.kind==="composite")&&g.value.isStateDependent)return!0}return!1},s}(mr),Da={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Hu=function(a,s){this._structArray=a,this._pos1=s*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Mo=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ps(a,s){s===void 0&&(s=1);var l=0,g=0;return{members:a.map(function(P){var j=Da[P.type].BYTES_PER_ELEMENT,ne=l=eu(l,Math.max(s,j)),ge=P.components||1;return g=Math.max(g,j),l+=j*ge,{name:P.name,type:P.type,components:ge,offset:ne}}),size:eu(l,Math.max(g,s)),alignment:s}}function eu(a,s){return Math.ceil(a/s)*s}Mo.serialize=function(a,s){return a._trim(),s&&(a.isTransferred=!0,s.push(a.arrayBuffer)),{length:a.length,arrayBuffer:a.arrayBuffer}},Mo.deserialize=function(a){var s=Object.create(this.prototype);return s.arrayBuffer=a.arrayBuffer,s.length=a.length,s.capacity=a.arrayBuffer.byteLength/s.bytesPerElement,s._refreshViews(),s},Mo.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Mo.prototype.clear=function(){this.length=0},Mo.prototype.resize=function(a){this.reserve(a),this.length=a},Mo.prototype.reserve=function(a){if(a>this.capacity){this.capacity=Math.max(a,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var s=this.uint8;this._refreshViews(),s&&this.uint8.set(s)}},Mo.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Bs=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g){var P=this.length;return this.resize(P+1),this.emplace(P,l,g)},s.prototype.emplace=function(l,g,P){var j=2*l;return this.int16[j+0]=g,this.int16[j+1]=P,l},s}(Mo);Bs.prototype.bytesPerElement=4,Ls("StructArrayLayout2i4",Bs);var cu=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P,j){var ne=this.length;return this.resize(ne+1),this.emplace(ne,l,g,P,j)},s.prototype.emplace=function(l,g,P,j,ne){var ge=4*l;return this.int16[ge+0]=g,this.int16[ge+1]=P,this.int16[ge+2]=j,this.int16[ge+3]=ne,l},s}(Mo);cu.prototype.bytesPerElement=8,Ls("StructArrayLayout4i8",cu);var yu=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P,j,ne,ge){var ze=this.length;return this.resize(ze+1),this.emplace(ze,l,g,P,j,ne,ge)},s.prototype.emplace=function(l,g,P,j,ne,ge,ze){var ht=6*l;return this.int16[ht+0]=g,this.int16[ht+1]=P,this.int16[ht+2]=j,this.int16[ht+3]=ne,this.int16[ht+4]=ge,this.int16[ht+5]=ze,l},s}(Mo);yu.prototype.bytesPerElement=12,Ls("StructArrayLayout2i4i12",yu);var fu=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P,j,ne,ge){var ze=this.length;return this.resize(ze+1),this.emplace(ze,l,g,P,j,ne,ge)},s.prototype.emplace=function(l,g,P,j,ne,ge,ze){var ht=4*l,zt=8*l;return this.int16[ht+0]=g,this.int16[ht+1]=P,this.uint8[zt+4]=j,this.uint8[zt+5]=ne,this.uint8[zt+6]=ge,this.uint8[zt+7]=ze,l},s}(Mo);fu.prototype.bytesPerElement=8,Ls("StructArrayLayout2i4ub8",fu);var Gu=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g){var P=this.length;return this.resize(P+1),this.emplace(P,l,g)},s.prototype.emplace=function(l,g,P){var j=2*l;return this.float32[j+0]=g,this.float32[j+1]=P,l},s}(Mo);Gu.prototype.bytesPerElement=8,Ls("StructArrayLayout2f8",Gu);var h=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P,j,ne,ge,ze,ht,zt,qt){var _r=this.length;return this.resize(_r+1),this.emplace(_r,l,g,P,j,ne,ge,ze,ht,zt,qt)},s.prototype.emplace=function(l,g,P,j,ne,ge,ze,ht,zt,qt,_r){var Rr=10*l;return this.uint16[Rr+0]=g,this.uint16[Rr+1]=P,this.uint16[Rr+2]=j,this.uint16[Rr+3]=ne,this.uint16[Rr+4]=ge,this.uint16[Rr+5]=ze,this.uint16[Rr+6]=ht,this.uint16[Rr+7]=zt,this.uint16[Rr+8]=qt,this.uint16[Rr+9]=_r,l},s}(Mo);h.prototype.bytesPerElement=20,Ls("StructArrayLayout10ui20",h);var m=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr){var Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr)},s.prototype.emplace=function(l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr,Kr){var qr=12*l;return this.int16[qr+0]=g,this.int16[qr+1]=P,this.int16[qr+2]=j,this.int16[qr+3]=ne,this.uint16[qr+4]=ge,this.uint16[qr+5]=ze,this.uint16[qr+6]=ht,this.uint16[qr+7]=zt,this.int16[qr+8]=qt,this.int16[qr+9]=_r,this.int16[qr+10]=Rr,this.int16[qr+11]=Kr,l},s}(Mo);m.prototype.bytesPerElement=24,Ls("StructArrayLayout4i4ui4i24",m);var F=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P){var j=this.length;return this.resize(j+1),this.emplace(j,l,g,P)},s.prototype.emplace=function(l,g,P,j){var ne=3*l;return this.float32[ne+0]=g,this.float32[ne+1]=P,this.float32[ne+2]=j,l},s}(Mo);F.prototype.bytesPerElement=12,Ls("StructArrayLayout3f12",F);var H=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l){var g=this.length;return this.resize(g+1),this.emplace(g,l)},s.prototype.emplace=function(l,g){return this.uint32[1*l+0]=g,l},s}(Mo);H.prototype.bytesPerElement=4,Ls("StructArrayLayout1ul4",H);var ve=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P,j,ne,ge,ze,ht,zt){var qt=this.length;return this.resize(qt+1),this.emplace(qt,l,g,P,j,ne,ge,ze,ht,zt)},s.prototype.emplace=function(l,g,P,j,ne,ge,ze,ht,zt,qt){var _r=10*l,Rr=5*l;return this.int16[_r+0]=g,this.int16[_r+1]=P,this.int16[_r+2]=j,this.int16[_r+3]=ne,this.int16[_r+4]=ge,this.int16[_r+5]=ze,this.uint32[Rr+3]=ht,this.uint16[_r+8]=zt,this.uint16[_r+9]=qt,l},s}(Mo);ve.prototype.bytesPerElement=20,Ls("StructArrayLayout6i1ul2ui20",ve);var ot=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P,j,ne,ge){var ze=this.length;return this.resize(ze+1),this.emplace(ze,l,g,P,j,ne,ge)},s.prototype.emplace=function(l,g,P,j,ne,ge,ze){var ht=6*l;return this.int16[ht+0]=g,this.int16[ht+1]=P,this.int16[ht+2]=j,this.int16[ht+3]=ne,this.int16[ht+4]=ge,this.int16[ht+5]=ze,l},s}(Mo);ot.prototype.bytesPerElement=12,Ls("StructArrayLayout2i2i2i12",ot);var kt=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P,j,ne){var ge=this.length;return this.resize(ge+1),this.emplace(ge,l,g,P,j,ne)},s.prototype.emplace=function(l,g,P,j,ne,ge){var ze=4*l,ht=8*l;return this.float32[ze+0]=g,this.float32[ze+1]=P,this.float32[ze+2]=j,this.int16[ht+6]=ne,this.int16[ht+7]=ge,l},s}(Mo);kt.prototype.bytesPerElement=16,Ls("StructArrayLayout2f1f2i16",kt);var J=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P,j){var ne=this.length;return this.resize(ne+1),this.emplace(ne,l,g,P,j)},s.prototype.emplace=function(l,g,P,j,ne){var ge=12*l,ze=3*l;return this.uint8[ge+0]=g,this.uint8[ge+1]=P,this.float32[ze+1]=j,this.float32[ze+2]=ne,l},s}(Mo);J.prototype.bytesPerElement=12,Ls("StructArrayLayout2ub2f12",J);var f=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P){var j=this.length;return this.resize(j+1),this.emplace(j,l,g,P)},s.prototype.emplace=function(l,g,P,j){var ne=3*l;return this.uint16[ne+0]=g,this.uint16[ne+1]=P,this.uint16[ne+2]=j,l},s}(Mo);f.prototype.bytesPerElement=6,Ls("StructArrayLayout3ui6",f);var O=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){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)},s.prototype.emplaceBack=function(l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr,Kr,qr,an,en,Hr){var Fn=this.length;return this.resize(Fn+1),this.emplace(Fn,l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr,Kr,qr,an,en,Hr)},s.prototype.emplace=function(l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr,Kr,qr,an,en,Hr,Fn){var ni=24*l,Mi=12*l,wa=48*l;return this.int16[ni+0]=g,this.int16[ni+1]=P,this.uint16[ni+2]=j,this.uint16[ni+3]=ne,this.uint32[Mi+2]=ge,this.uint32[Mi+3]=ze,this.uint32[Mi+4]=ht,this.uint16[ni+10]=zt,this.uint16[ni+11]=qt,this.uint16[ni+12]=_r,this.float32[Mi+7]=Rr,this.float32[Mi+8]=Kr,this.uint8[wa+36]=qr,this.uint8[wa+37]=an,this.uint8[wa+38]=en,this.uint32[Mi+10]=Hr,this.int16[ni+22]=Fn,l},s}(Mo);O.prototype.bytesPerElement=48,Ls("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",O);var K=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){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)},s.prototype.emplaceBack=function(l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr,Kr,qr,an,en,Hr,Fn,ni,Mi,wa,za,oo,Ds,lo,cs,as,$s){var ps=this.length;return this.resize(ps+1),this.emplace(ps,l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr,Kr,qr,an,en,Hr,Fn,ni,Mi,wa,za,oo,Ds,lo,cs,as,$s)},s.prototype.emplace=function(l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr,Kr,qr,an,en,Hr,Fn,ni,Mi,wa,za,oo,Ds,lo,cs,as,$s,ps){var fs=34*l,Ks=17*l;return this.int16[fs+0]=g,this.int16[fs+1]=P,this.int16[fs+2]=j,this.int16[fs+3]=ne,this.int16[fs+4]=ge,this.int16[fs+5]=ze,this.int16[fs+6]=ht,this.int16[fs+7]=zt,this.uint16[fs+8]=qt,this.uint16[fs+9]=_r,this.uint16[fs+10]=Rr,this.uint16[fs+11]=Kr,this.uint16[fs+12]=qr,this.uint16[fs+13]=an,this.uint16[fs+14]=en,this.uint16[fs+15]=Hr,this.uint16[fs+16]=Fn,this.uint16[fs+17]=ni,this.uint16[fs+18]=Mi,this.uint16[fs+19]=wa,this.uint16[fs+20]=za,this.uint16[fs+21]=oo,this.uint16[fs+22]=Ds,this.uint32[Ks+12]=lo,this.float32[Ks+13]=cs,this.float32[Ks+14]=as,this.float32[Ks+15]=$s,this.float32[Ks+16]=ps,l},s}(Mo);K.prototype.bytesPerElement=68,Ls("StructArrayLayout8i15ui1ul4f68",K);var q=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l){var g=this.length;return this.resize(g+1),this.emplace(g,l)},s.prototype.emplace=function(l,g){return this.float32[1*l+0]=g,l},s}(Mo);q.prototype.bytesPerElement=4,Ls("StructArrayLayout1f4",q);var me=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P){var j=this.length;return this.resize(j+1),this.emplace(j,l,g,P)},s.prototype.emplace=function(l,g,P,j){var ne=3*l;return this.int16[ne+0]=g,this.int16[ne+1]=P,this.int16[ne+2]=j,l},s}(Mo);me.prototype.bytesPerElement=6,Ls("StructArrayLayout3i6",me);var je=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P){var j=this.length;return this.resize(j+1),this.emplace(j,l,g,P)},s.prototype.emplace=function(l,g,P,j){var ne=4*l;return this.uint32[2*l+0]=g,this.uint16[ne+2]=P,this.uint16[ne+3]=j,l},s}(Mo);je.prototype.bytesPerElement=8,Ls("StructArrayLayout1ul2ui8",je);var tt=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g){var P=this.length;return this.resize(P+1),this.emplace(P,l,g)},s.prototype.emplace=function(l,g,P){var j=2*l;return this.uint16[j+0]=g,this.uint16[j+1]=P,l},s}(Mo);tt.prototype.bytesPerElement=4,Ls("StructArrayLayout2ui4",tt);var w=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l){var g=this.length;return this.resize(g+1),this.emplace(g,l)},s.prototype.emplace=function(l,g){return this.uint16[1*l+0]=g,l},s}(Mo);w.prototype.bytesPerElement=2,Ls("StructArrayLayout1ui2",w);var Gt=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},s.prototype.emplaceBack=function(l,g,P,j){var ne=this.length;return this.resize(ne+1),this.emplace(ne,l,g,P,j)},s.prototype.emplace=function(l,g,P,j,ne){var ge=4*l;return this.float32[ge+0]=g,this.float32[ge+1]=P,this.float32[ge+2]=j,this.float32[ge+3]=ne,l},s}(Mo);Gt.prototype.bytesPerElement=16,Ls("StructArrayLayout4f16",Gt);var b=function(a){function s(){a.apply(this,arguments)}a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s;var l={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return l.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},l.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},l.x1.get=function(){return this._structArray.int16[this._pos2+2]},l.y1.get=function(){return this._structArray.int16[this._pos2+3]},l.x2.get=function(){return this._structArray.int16[this._pos2+4]},l.y2.get=function(){return this._structArray.int16[this._pos2+5]},l.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},l.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},l.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},l.anchorPoint.get=function(){return new oe(this.anchorPointX,this.anchorPointY)},Object.defineProperties(s.prototype,l),s}(Hu);b.prototype.size=20;var x=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.get=function(l){return new b(this,l)},s}(ve);Ls("CollisionBoxArray",x);var S=function(a){function s(){a.apply(this,arguments)}a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s;var l={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return l.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},l.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},l.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},l.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},l.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},l.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},l.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},l.segment.get=function(){return this._structArray.uint16[this._pos2+10]},l.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},l.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},l.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},l.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},l.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},l.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},l.placedOrientation.set=function(g){this._structArray.uint8[this._pos1+37]=g},l.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},l.hidden.set=function(g){this._structArray.uint8[this._pos1+38]=g},l.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},l.crossTileID.set=function(g){this._structArray.uint32[this._pos4+10]=g},l.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(s.prototype,l),s}(Hu);S.prototype.size=48;var Z=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.get=function(l){return new S(this,l)},s}(O);Ls("PlacedSymbolArray",Z);var he=function(a){function s(){a.apply(this,arguments)}a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s;var l={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return l.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},l.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},l.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},l.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},l.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},l.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},l.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},l.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},l.key.get=function(){return this._structArray.uint16[this._pos2+8]},l.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},l.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},l.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},l.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},l.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},l.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},l.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},l.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},l.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},l.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},l.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},l.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},l.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},l.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},l.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},l.crossTileID.set=function(g){this._structArray.uint32[this._pos4+12]=g},l.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},l.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},l.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},l.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(s.prototype,l),s}(Hu);he.prototype.size=68;var Se=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.get=function(l){return new he(this,l)},s}(K);Ls("SymbolInstanceArray",Se);var Pe=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.getoffsetX=function(l){return this.float32[1*l+0]},s}(q);Ls("GlyphOffsetArray",Pe);var ct=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.getx=function(l){return this.int16[3*l+0]},s.prototype.gety=function(l){return this.int16[3*l+1]},s.prototype.gettileUnitDistanceFromAnchor=function(l){return this.int16[3*l+2]},s}(me);Ls("SymbolLineVertexArray",ct);var Ut=function(a){function s(){a.apply(this,arguments)}a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s;var l={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return l.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},l.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},l.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(s.prototype,l),s}(Hu);Ut.prototype.size=8;var wt=function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.get=function(l){return new Ut(this,l)},s}(je);Ls("FeatureIndexArray",wt);var Kt=Ps([{name:"a_pos",components:2,type:"Int16"}],4).members,cr=function(a){a===void 0&&(a=[]),this.segments=a};function hr(a,s){return 256*(a=Ee(Math.floor(a),0,255))+Ee(Math.floor(s),0,255)}cr.prototype.prepareSegment=function(a,s,l,g){var P=this.segments[this.segments.length-1];return a>cr.MAX_VERTEX_ARRAY_LENGTH&&st("Max vertices per segment is "+cr.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+a),(!P||P.vertexLength+a>cr.MAX_VERTEX_ARRAY_LENGTH||P.sortKey!==g)&&(P={vertexOffset:s.length,primitiveOffset:l.length,vertexLength:0,primitiveLength:0},g!==void 0&&(P.sortKey=g),this.segments.push(P)),P},cr.prototype.get=function(){return this.segments},cr.prototype.destroy=function(){for(var a=0,s=this.segments;a>>16)*ge&65535)<<16)&4294967295)<<15|ht>>>17))*ze+(((ht>>>16)*ze&65535)<<16)&4294967295)<<13|j>>>19))+((5*(j>>>16)&65535)<<16)&4294967295))+((58964+(ne>>>16)&65535)<<16);switch(ht=0,g){case 3:ht^=(255&s.charCodeAt(zt+2))<<16;case 2:ht^=(255&s.charCodeAt(zt+1))<<8;case 1:j^=ht=(65535&(ht=(ht=(65535&(ht^=255&s.charCodeAt(zt)))*ge+(((ht>>>16)*ge&65535)<<16)&4294967295)<<15|ht>>>17))*ze+(((ht>>>16)*ze&65535)<<16)&4294967295}return j^=s.length,j=2246822507*(65535&(j^=j>>>16))+((2246822507*(j>>>16)&65535)<<16)&4294967295,j=3266489909*(65535&(j^=j>>>13))+((3266489909*(j>>>16)&65535)<<16)&4294967295,(j^=j>>>16)>>>0}}),rn=d(function(a){a.exports=function(s,l){for(var g,P=s.length,j=l^P,ne=0;P>=4;)g=1540483477*(65535&(g=255&s.charCodeAt(ne)|(255&s.charCodeAt(++ne))<<8|(255&s.charCodeAt(++ne))<<16|(255&s.charCodeAt(++ne))<<24))+((1540483477*(g>>>16)&65535)<<16),j=1540483477*(65535&j)+((1540483477*(j>>>16)&65535)<<16)^(g=1540483477*(65535&(g^=g>>>24))+((1540483477*(g>>>16)&65535)<<16)),P-=4,++ne;switch(P){case 3:j^=(255&s.charCodeAt(ne+2))<<16;case 2:j^=(255&s.charCodeAt(ne+1))<<8;case 1:j=1540483477*(65535&(j^=255&s.charCodeAt(ne)))+((1540483477*(j>>>16)&65535)<<16)}return j=1540483477*(65535&(j^=j>>>13))+((1540483477*(j>>>16)&65535)<<16),(j^=j>>>15)>>>0}}),Xr=Br,dn=rn;Xr.murmur3=Br,Xr.murmur2=dn;var Qt=function(){this.ids=[],this.positions=[],this.indexed=!1};Qt.prototype.add=function(a,s,l,g){this.ids.push(oi(a)),this.positions.push(s,l,g)},Qt.prototype.getPositions=function(a){for(var s=oi(a),l=0,g=this.ids.length-1;l>1;this.ids[P]>=s?g=P:l=P+1}for(var j=[];this.ids[l]===s;)j.push({index:this.positions[3*l],start:this.positions[3*l+1],end:this.positions[3*l+2]}),l++;return j},Qt.serialize=function(a,s){var l=new Float64Array(a.ids),g=new Uint32Array(a.positions);return function P(j,ne,ge,ze){for(;ge>1],zt=ge-1,qt=ze+1;;){do zt++;while(j[zt]ht);if(zt>=qt)break;pr(j,zt,qt),pr(ne,3*zt,3*qt),pr(ne,3*zt+1,3*qt+1),pr(ne,3*zt+2,3*qt+2)}qt-gene.x+1||zene.y+1)&&st("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return l}function jf(a,s){return{type:a.type,id:a.id,properties:a.properties,geometry:s?Xl(a):[]}}function Yf(a,s,l,g,P){a.emplaceBack(2*s+(g+1)/2,2*l+(P+1)/2)}var Ah=function(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(s){return s.id}),this.index=a.index,this.hasPattern=!1,this.layoutVertexArray=new Bs,this.indexArray=new f,this.segments=new cr,this.programConfigurations=new Cu(a.layers,a.zoom),this.stateDependentLayerIds=this.layers.filter(function(s){return s.isStateDependent()}).map(function(s){return s.id})};function vf(a,s){for(var l=0;l1){if(Dh(a,s))return!0;for(var g=0;g1?l:l.sub(s)._mult(P)._add(s))}function Qh(a,s){for(var l,g,P,j=!1,ne=0;nes.y!=(P=l[ze]).y>s.y&&s.x<(P.x-g.x)*(s.y-g.y)/(P.y-g.y)+g.x&&(j=!j);return j}function Uh(a,s){for(var l=!1,g=0,P=a.length-1;gs.y!=ne.y>s.y&&s.x<(ne.x-j.x)*(s.y-j.y)/(ne.y-j.y)+j.x&&(l=!l)}return l}function Dd(a,s,l){var g=l[0],P=l[2];if(a.xP.x&&s.x>P.x||a.yP.y&&s.y>P.y)return!1;var j=Et(a,s,l[0]);return j!==Et(a,s,l[1])||j!==Et(a,s,l[2])||j!==Et(a,s,l[3])}function Wl(a,s,l){var g=s.paint.get(a).value;return g.kind==="constant"?g.value:l.programConfigurations.get(s.id).getMaxValue(a)}function yd(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1])}function Jh(a,s,l,g,P){if(!s[0]&&!s[1])return a;var j=oe.convert(s)._mult(P);l==="viewport"&&j._rotate(-g);for(var ne=[],ge=0;ge=8192||zt<0||zt>=8192)){var qt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,a.sortKey),_r=qt.vertexLength;Yf(this.layoutVertexArray,ht,zt,-1,-1),Yf(this.layoutVertexArray,ht,zt,1,-1),Yf(this.layoutVertexArray,ht,zt,1,1),Yf(this.layoutVertexArray,ht,zt,-1,1),this.indexArray.emplaceBack(_r,_r+1,_r+2),this.indexArray.emplaceBack(_r,_r+3,_r+2),qt.vertexLength+=4,qt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,a,l,{},g)},Ls("CircleBucket",Ah,{omit:["layers"]});var Qc=new qo({"circle-sort-key":new Bi(Qe.layout_circle["circle-sort-key"])}),Ap={paint:new qo({"circle-radius":new Bi(Qe.paint_circle["circle-radius"]),"circle-color":new Bi(Qe.paint_circle["circle-color"]),"circle-blur":new Bi(Qe.paint_circle["circle-blur"]),"circle-opacity":new Bi(Qe.paint_circle["circle-opacity"]),"circle-translate":new Ti(Qe.paint_circle["circle-translate"]),"circle-translate-anchor":new Ti(Qe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ti(Qe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ti(Qe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Bi(Qe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Bi(Qe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Bi(Qe.paint_circle["circle-stroke-opacity"])}),layout:Qc},vc=typeof Float32Array!="undefined"?Float32Array:Array;function kf(a){return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a}function Ih(a,s,l){var g=s[0],P=s[1],j=s[2],ne=s[3],ge=s[4],ze=s[5],ht=s[6],zt=s[7],qt=s[8],_r=s[9],Rr=s[10],Kr=s[11],qr=s[12],an=s[13],en=s[14],Hr=s[15],Fn=l[0],ni=l[1],Mi=l[2],wa=l[3];return a[0]=Fn*g+ni*ge+Mi*qt+wa*qr,a[1]=Fn*P+ni*ze+Mi*_r+wa*an,a[2]=Fn*j+ni*ht+Mi*Rr+wa*en,a[3]=Fn*ne+ni*zt+Mi*Kr+wa*Hr,a[4]=(Fn=l[4])*g+(ni=l[5])*ge+(Mi=l[6])*qt+(wa=l[7])*qr,a[5]=Fn*P+ni*ze+Mi*_r+wa*an,a[6]=Fn*j+ni*ht+Mi*Rr+wa*en,a[7]=Fn*ne+ni*zt+Mi*Kr+wa*Hr,a[8]=(Fn=l[8])*g+(ni=l[9])*ge+(Mi=l[10])*qt+(wa=l[11])*qr,a[9]=Fn*P+ni*ze+Mi*_r+wa*an,a[10]=Fn*j+ni*ht+Mi*Rr+wa*en,a[11]=Fn*ne+ni*zt+Mi*Kr+wa*Hr,a[12]=(Fn=l[12])*g+(ni=l[13])*ge+(Mi=l[14])*qt+(wa=l[15])*qr,a[13]=Fn*P+ni*ze+Mi*_r+wa*an,a[14]=Fn*j+ni*ht+Mi*Rr+wa*en,a[15]=Fn*ne+ni*zt+Mi*Kr+wa*Hr,a}Math.hypot||(Math.hypot=function(){for(var a=arguments,s=0,l=arguments.length;l--;)s+=a[l]*a[l];return Math.sqrt(s)});var hd,Gh=Ih;function Jp(a,s,l){var g=s[0],P=s[1],j=s[2],ne=s[3];return a[0]=l[0]*g+l[4]*P+l[8]*j+l[12]*ne,a[1]=l[1]*g+l[5]*P+l[9]*j+l[13]*ne,a[2]=l[2]*g+l[6]*P+l[10]*j+l[14]*ne,a[3]=l[3]*g+l[7]*P+l[11]*j+l[15]*ne,a}hd=new vc(3),vc!=Float32Array&&(hd[0]=0,hd[1]=0,hd[2]=0),function(){var a=new vc(4);vc!=Float32Array&&(a[0]=0,a[1]=0,a[2]=0,a[3]=0)}();var i0=(function(){var a=new vc(2);vc!=Float32Array&&(a[0]=0,a[1]=0)}(),function(a){function s(l){a.call(this,l,Ap)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.createBucket=function(l){return new Ah(l)},s.prototype.queryRadius=function(l){var g=l;return Wl("circle-radius",this,g)+Wl("circle-stroke-width",this,g)+yd(this.paint.get("circle-translate"))},s.prototype.queryIntersectsFeature=function(l,g,P,j,ne,ge,ze,ht){for(var zt=Jh(l,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),ge.angle,ze),qt=this.paint.get("circle-radius").evaluate(g,P)+this.paint.get("circle-stroke-width").evaluate(g,P),_r=this.paint.get("circle-pitch-alignment")==="map",Rr=_r?zt:function(za,oo){return za.map(function(Ds){return Cp(Ds,oo)})}(zt,ht),Kr=_r?qt*ze:qt,qr=0,an=j;qra.width||P.height>a.height||l.x>a.width-P.width||l.y>a.height-P.height)throw new RangeError("out of range source coordinates for image copy");if(P.width>s.width||P.height>s.height||g.x>s.width-P.width||g.y>s.height-P.height)throw new RangeError("out of range destination coordinates for image copy");for(var ne=a.data,ge=s.data,ze=0;ze80*l){g=j=a[0],P=ne=a[1];for(var Kr=l;Krj&&(j=ge),ze>ne&&(ne=ze);ht=(ht=Math.max(j-g,ne-P))!==0?1/ht:0}return $p(_r,Rr,l,g,P,ht),Rr}function dh(a,s,l,g,P){var j,ne;if(P===bp(a,s,l,g)>0)for(j=s;j=s;j-=g)ne=zp(j,a[j],a[j+1],ne);return ne&&pp(ne,ne.next)&&(kp(ne),ne=ne.next),ne}function rd(a,s){if(!a)return a;s||(s=a);var l,g=a;do if(l=!1,g.steiner||!pp(g,g.next)&&Td(g.prev,g,g.next)!==0)g=g.next;else{if(kp(g),(g=s=g.prev)===g.next)break;l=!0}while(l||g!==s);return s}function $p(a,s,l,g,P,j,ne){if(a){!ne&&j&&function(zt,qt,_r,Rr){var Kr=zt;do Kr.z===null&&(Kr.z=_d(Kr.x,Kr.y,qt,_r,Rr)),Kr.prevZ=Kr.prev,Kr.nextZ=Kr.next,Kr=Kr.next;while(Kr!==zt);Kr.prevZ.nextZ=null,Kr.prevZ=null,function(qr){var an,en,Hr,Fn,ni,Mi,wa,za,oo=1;do{for(en=qr,qr=null,ni=null,Mi=0;en;){for(Mi++,Hr=en,wa=0,an=0;an0||za>0&&Hr;)wa!==0&&(za===0||!Hr||en.z<=Hr.z)?(Fn=en,en=en.nextZ,wa--):(Fn=Hr,Hr=Hr.nextZ,za--),ni?ni.nextZ=Fn:qr=Fn,Fn.prevZ=ni,ni=Fn;en=Hr}ni.nextZ=null,oo*=2}while(Mi>1)}(Kr)}(a,g,P,j);for(var ge,ze,ht=a;a.prev!==a.next;)if(ge=a.prev,ze=a.next,j?H0(a,g,P,j):k0(a))s.push(ge.i/l),s.push(a.i/l),s.push(ze.i/l),kp(a),a=ze.next,ht=ze.next;else if((a=ze)===ht){ne?ne===1?$p(a=_0(rd(a),s,l),s,l,g,P,j,2):ne===2&&tm(a,s,l,g,P,j):$p(rd(a),s,l,g,P,j,1);break}}}function k0(a){var s=a.prev,l=a,g=a.next;if(Td(s,l,g)>=0)return!1;for(var P=a.next.next;P!==a.prev;){if(R0(s.x,s.y,l.x,l.y,g.x,g.y,P.x,P.y)&&Td(P.prev,P,P.next)>=0)return!1;P=P.next}return!0}function H0(a,s,l,g){var P=a.prev,j=a,ne=a.next;if(Td(P,j,ne)>=0)return!1;for(var ge=P.x>j.x?P.x>ne.x?P.x:ne.x:j.x>ne.x?j.x:ne.x,ze=P.y>j.y?P.y>ne.y?P.y:ne.y:j.y>ne.y?j.y:ne.y,ht=_d(P.x=ht&&_r&&_r.z<=zt;){if(qt!==a.prev&&qt!==a.next&&R0(P.x,P.y,j.x,j.y,ne.x,ne.y,qt.x,qt.y)&&Td(qt.prev,qt,qt.next)>=0||(qt=qt.prevZ,_r!==a.prev&&_r!==a.next&&R0(P.x,P.y,j.x,j.y,ne.x,ne.y,_r.x,_r.y)&&Td(_r.prev,_r,_r.next)>=0))return!1;_r=_r.nextZ}for(;qt&&qt.z>=ht;){if(qt!==a.prev&&qt!==a.next&&R0(P.x,P.y,j.x,j.y,ne.x,ne.y,qt.x,qt.y)&&Td(qt.prev,qt,qt.next)>=0)return!1;qt=qt.prevZ}for(;_r&&_r.z<=zt;){if(_r!==a.prev&&_r!==a.next&&R0(P.x,P.y,j.x,j.y,ne.x,ne.y,_r.x,_r.y)&&Td(_r.prev,_r,_r.next)>=0)return!1;_r=_r.nextZ}return!0}function _0(a,s,l){var g=a;do{var P=g.prev,j=g.next.next;!pp(P,j)&&B0(P,g,g.next,j)&&Ed(P,j)&&Ed(j,P)&&(s.push(P.i/l),s.push(g.i/l),s.push(j.i/l),kp(g),kp(g.next),g=a=j),g=g.next}while(g!==a);return rd(g)}function tm(a,s,l,g,P,j){var ne=a;do{for(var ge=ne.next.next;ge!==ne.prev;){if(ne.i!==ge.i&&O0(ne,ge)){var ze=t0(ne,ge);return ne=rd(ne,ne.next),ze=rd(ze,ze.next),$p(ne,s,l,g,P,j),void $p(ze,s,l,g,P,j)}ge=ge.next}ne=ne.next}while(ne!==a)}function Dc(a,s){return a.x-s.x}function F0(a,s){if(s=function(g,P){var j,ne=P,ge=g.x,ze=g.y,ht=-1/0;do{if(ze<=ne.y&&ze>=ne.next.y&&ne.next.y!==ne.y){var zt=ne.x+(ze-ne.y)*(ne.next.x-ne.x)/(ne.next.y-ne.y);if(zt<=ge&&zt>ht){if(ht=zt,zt===ge){if(ze===ne.y)return ne;if(ze===ne.next.y)return ne.next}j=ne.x=ne.x&&ne.x>=Rr&&ge!==ne.x&&R0(zej.x||ne.x===j.x&&I0(j,ne)))&&(j=ne,qr=qt)),ne=ne.next;while(ne!==_r);return j}(a,s)){var l=t0(s,a);rd(s,s.next),rd(l,l.next)}}function I0(a,s){return Td(a.prev,a,s.prev)<0&&Td(s.next,a,a.next)<0}function _d(a,s,l,g,P){return(a=1431655765&((a=858993459&((a=252645135&((a=16711935&((a=32767*(a-l)*P)|a<<8))|a<<4))|a<<2))|a<<1))|(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s=32767*(s-g)*P)|s<<8))|s<<4))|s<<2))|s<<1))<<1}function e0(a){var s=a,l=a;do(s.x=0&&(a-ne)*(g-ge)-(l-ne)*(s-ge)>=0&&(l-ne)*(j-ge)-(P-ne)*(g-ge)>=0}function O0(a,s){return a.next.i!==s.i&&a.prev.i!==s.i&&!function(l,g){var P=l;do{if(P.i!==l.i&&P.next.i!==l.i&&P.i!==g.i&&P.next.i!==g.i&&B0(P,P.next,l,g))return!0;P=P.next}while(P!==l);return!1}(a,s)&&(Ed(a,s)&&Ed(s,a)&&function(l,g){var P=l,j=!1,ne=(l.x+g.x)/2,ge=(l.y+g.y)/2;do P.y>ge!=P.next.y>ge&&P.next.y!==P.y&&ne<(P.next.x-P.x)*(ge-P.y)/(P.next.y-P.y)+P.x&&(j=!j),P=P.next;while(P!==l);return j}(a,s)&&(Td(a.prev,a,s.prev)||Td(a,s.prev,s))||pp(a,s)&&Td(a.prev,a,a.next)>0&&Td(s.prev,s,s.next)>0)}function Td(a,s,l){return(s.y-a.y)*(l.x-s.x)-(s.x-a.x)*(l.y-s.y)}function pp(a,s){return a.x===s.x&&a.y===s.y}function B0(a,s,l,g){var P=G0(Td(a,s,l)),j=G0(Td(a,s,g)),ne=G0(Td(l,g,a)),ge=G0(Td(l,g,s));return P!==j&&ne!==ge||!(P!==0||!Hp(a,l,s))||!(j!==0||!Hp(a,g,s))||!(ne!==0||!Hp(l,a,g))||!(ge!==0||!Hp(l,s,g))}function Hp(a,s,l){return s.x<=Math.max(a.x,l.x)&&s.x>=Math.min(a.x,l.x)&&s.y<=Math.max(a.y,l.y)&&s.y>=Math.min(a.y,l.y)}function G0(a){return a>0?1:a<0?-1:0}function Ed(a,s){return Td(a.prev,a,a.next)<0?Td(a,s,a.next)>=0&&Td(a,a.prev,s)>=0:Td(a,s,a.prev)<0||Td(a,a.next,s)<0}function t0(a,s){var l=new mp(a.i,a.x,a.y),g=new mp(s.i,s.x,s.y),P=a.next,j=s.prev;return a.next=s,s.prev=a,l.next=P,P.prev=l,g.next=l,l.prev=g,j.next=g,g.prev=j,g}function zp(a,s,l,g){var P=new mp(a,s,l);return g?(P.next=g.next,P.prev=g,g.next.prev=P,g.next=P):(P.prev=P,P.next=P),P}function kp(a){a.next.prev=a.prev,a.prev.next=a.next,a.prevZ&&(a.prevZ.nextZ=a.nextZ),a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function mp(a,s,l){this.i=a,this.x=s,this.y=l,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function bp(a,s,l,g){for(var P=0,j=s,ne=l-g;jze;){if(ht-ze>600){var qt=ht-ze+1,_r=ge-ze+1,Rr=Math.log(qt),Kr=.5*Math.exp(2*Rr/3),qr=.5*Math.sqrt(Rr*Kr*(qt-Kr)/qt)*(_r-qt/2<0?-1:1);j(ne,ge,Math.max(ze,Math.floor(ge-_r*Kr/qt+qr)),Math.min(ht,Math.floor(ge+(qt-_r)*Kr/qt+qr)),zt)}var an=ne[ge],en=ze,Hr=ht;for(Sh(ne,ze,ge),zt(ne[ht],an)>0&&Sh(ne,ze,ht);en0;)Hr--}zt(ne[ze],an)===0?Sh(ne,ze,Hr):Sh(ne,++Hr,ht),Hr<=ge&&(ze=Hr+1),ge<=Hr&&(ht=Hr-1)}})(a,s,l||0,g||a.length-1,P||E0)}function Sh(a,s,l){var g=a[s];a[s]=a[l],a[l]=g}function E0(a,s){return as?1:0}function o0(a,s){var l=a.length;if(l<=1)return[a];for(var g,P,j=[],ne=0;ne1)for(var ze=0;ze0&&l.holes.push(g+=a[P-1].length)}return l},Dp.default=kh;var Wp=function(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(s){return s.id}),this.index=a.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Bs,this.indexArray=new f,this.indexArray2=new tt,this.programConfigurations=new Cu(a.layers,a.zoom),this.segments=new cr,this.segments2=new cr,this.stateDependentLayerIds=this.layers.filter(function(s){return s.isStateDependent()}).map(function(s){return s.id})};Wp.prototype.populate=function(a,s,l){this.hasPattern=N0("fill",this.layers,s);for(var g=this.layers[0].layout.get("fill-sort-key"),P=[],j=0,ne=a;j>3}if(P--,g===1||g===2)j+=a.readSVarint(),ne+=a.readSVarint(),g===1&&(s&&ge.push(s),s=[]),s.push(new oe(j,ne));else{if(g!==7)throw new Error("unknown command "+g);s&&s.push(s[0].clone())}}return s&&ge.push(s),ge},Xp.prototype.bbox=function(){var a=this._pbf;a.pos=this._geometry;for(var s=a.readVarint()+a.pos,l=1,g=0,P=0,j=0,ne=1/0,ge=-1/0,ze=1/0,ht=-1/0;a.pos>3}if(g--,l===1||l===2)(P+=a.readSVarint())ge&&(ge=P),(j+=a.readSVarint())ht&&(ht=j);else if(l!==7)throw new Error("unknown command "+l)}return[ne,ze,ge,ht]},Xp.prototype.toGeoJSON=function(a,s,l){var g,P,j=this.extent*Math.pow(2,l),ne=this.extent*a,ge=this.extent*s,ze=this.loadGeometry(),ht=Xp.types[this.type];function zt(Rr){for(var Kr=0;Kr>3;P=ne===1?g.readString():ne===2?g.readFloat():ne===3?g.readDouble():ne===4?g.readVarint64():ne===5?g.readVarint():ne===6?g.readSVarint():ne===7?g.readBoolean():null}return P}(l))}function s0(a,s,l){if(a===3){var g=new r0(l,l.readVarint()+l.pos);g.length&&(s[g.name]=g)}}Up.prototype.feature=function(a){if(a<0||a>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[a];var s=this._pbf.readVarint()+this._pbf.pos;return new vp(this._pbf,s,this.extent,this._keys,this._values)};var m0={VectorTile:function(a,s){this.layers=a.readFields(s0,{},s)},VectorTileFeature:vp,VectorTileLayer:r0},cm=m0.VectorTileFeature.types,A0=Math.pow(2,13);function jd(a,s,l,g,P,j,ne,ge){a.emplaceBack(s,l,2*Math.floor(g*A0)+ne,P*A0*2,j*A0*2,Math.round(ge))}var Vd=function(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(function(s){return s.id}),this.index=a.index,this.hasPattern=!1,this.layoutVertexArray=new yu,this.indexArray=new f,this.programConfigurations=new Cu(a.layers,a.zoom),this.segments=new cr,this.stateDependentLayerIds=this.layers.filter(function(s){return s.isStateDependent()}).map(function(s){return s.id})};function Xd(a,s){return a.x===s.x&&(a.x<0||a.x>8192)||a.y===s.y&&(a.y<0||a.y>8192)}Vd.prototype.populate=function(a,s,l){this.features=[],this.hasPattern=N0("fill-extrusion",this.layers,s);for(var g=0,P=a;g8192})||Ks.every(function(Ou){return Ou.y<0})||Ks.every(function(Ou){return Ou.y>8192})))for(var qr=0,an=0;an=1){var Hr=Kr[an-1];if(!Xd(en,Hr)){qt.vertexLength+4>cr.MAX_VERTEX_ARRAY_LENGTH&&(qt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Fn=en.sub(Hr)._perp()._unit(),ni=Hr.dist(en);qr+ni>32768&&(qr=0),jd(this.layoutVertexArray,en.x,en.y,Fn.x,Fn.y,0,0,qr),jd(this.layoutVertexArray,en.x,en.y,Fn.x,Fn.y,0,1,qr),jd(this.layoutVertexArray,Hr.x,Hr.y,Fn.x,Fn.y,0,0,qr+=ni),jd(this.layoutVertexArray,Hr.x,Hr.y,Fn.x,Fn.y,0,1,qr);var Mi=qt.vertexLength;this.indexArray.emplaceBack(Mi,Mi+2,Mi+1),this.indexArray.emplaceBack(Mi+1,Mi+2,Mi+3),qt.vertexLength+=4,qt.primitiveLength+=2}}}}if(qt.vertexLength+ze>cr.MAX_VERTEX_ARRAY_LENGTH&&(qt=this.segments.prepareSegment(ze,this.layoutVertexArray,this.indexArray)),cm[a.type]==="Polygon"){for(var wa=[],za=[],oo=qt.vertexLength,Ds=0,lo=ge;Ds=2&&a[ze-1].equals(a[ze-2]);)ze--;for(var ht=0;ht0;if(za&&en>ht){var Ds=zt.dist(Rr);if(Ds>2*qt){var lo=zt.sub(zt.sub(Rr)._mult(qt/Ds)._round());this.updateDistance(Rr,lo),this.addCurrentVertex(lo,qr,0,0,_r),Rr=lo}}var cs=Rr&&Kr,as=cs?l:ge?"butt":g;if(cs&&as==="round"&&(MiP&&(as="bevel"),as==="bevel"&&(Mi>2&&(as="flipbevel"),Mi100)Hr=an.mult(-1);else{var $s=Mi*qr.add(an).mag()/qr.sub(an).mag();Hr._perp()._mult($s*(oo?-1:1))}this.addCurrentVertex(zt,Hr,0,0,_r),this.addCurrentVertex(zt,Hr.mult(-1),0,0,_r)}else if(as==="bevel"||as==="fakeround"){var ps=-Math.sqrt(Mi*Mi-1),fs=oo?ps:0,Ks=oo?0:ps;if(Rr&&this.addCurrentVertex(zt,qr,fs,Ks,_r),as==="fakeround")for(var Ou=Math.round(180*wa/Math.PI/20),wl=1;wl2*qt){var gc=zt.add(Kr.sub(zt)._mult(qt/ec)._round());this.updateDistance(zt,gc),this.addCurrentVertex(gc,an,0,0,_r),zt=gc}}}}},nd.prototype.addCurrentVertex=function(a,s,l,g,P,j){j===void 0&&(j=!1);var ne=s.y*g-s.x,ge=-s.y-s.x*g;this.addHalfVertex(a,s.x+s.y*l,s.y-s.x*l,j,!1,l,P),this.addHalfVertex(a,ne,ge,j,!0,-g,P),this.distance>fm/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(a,s,l,g,P,j))},nd.prototype.addHalfVertex=function(a,s,l,g,P,j,ne){var ge=.5*(this.lineClips?this.scaledDistance*(fm-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((a.x<<1)+(g?1:0),(a.y<<1)+(P?1:0),Math.round(63*s)+128,Math.round(63*l)+128,1+(j===0?0:j<0?-1:1)|(63&ge)<<2,ge>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var ze=ne.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ze),ne.primitiveLength++),P?this.e2=ze:this.e1=ze},nd.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},nd.prototype.updateDistance=function(a,s){this.distance+=a.dist(s),this.updateScaledDistance()},Ls("LineBucket",nd,{omit:["layers","patternFeatures"]});var j0=new qo({"line-cap":new Ti(Qe.layout_line["line-cap"]),"line-join":new Bi(Qe.layout_line["line-join"]),"line-miter-limit":new Ti(Qe.layout_line["line-miter-limit"]),"line-round-limit":new Ti(Qe.layout_line["line-round-limit"]),"line-sort-key":new Bi(Qe.layout_line["line-sort-key"])}),xp={paint:new qo({"line-opacity":new Bi(Qe.paint_line["line-opacity"]),"line-color":new Bi(Qe.paint_line["line-color"]),"line-translate":new Ti(Qe.paint_line["line-translate"]),"line-translate-anchor":new Ti(Qe.paint_line["line-translate-anchor"]),"line-width":new Bi(Qe.paint_line["line-width"]),"line-gap-width":new Bi(Qe.paint_line["line-gap-width"]),"line-offset":new Bi(Qe.paint_line["line-offset"]),"line-blur":new Bi(Qe.paint_line["line-blur"]),"line-dasharray":new Sa(Qe.paint_line["line-dasharray"]),"line-pattern":new na(Qe.paint_line["line-pattern"]),"line-gradient":new Ko(Qe.paint_line["line-gradient"])}),layout:j0},rm=new(function(a){function s(){a.apply(this,arguments)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.possiblyEvaluate=function(l,g){return g=new Vn(Math.floor(g.zoom),{now:g.now,fadeDuration:g.fadeDuration,zoomHistory:g.zoomHistory,transition:g.transition}),a.prototype.possiblyEvaluate.call(this,l,g)},s.prototype.evaluate=function(l,g,P,j){return g=Xe({},g,{zoom:Math.floor(g.zoom)}),a.prototype.evaluate.call(this,l,g,P,j)},s}(Bi))(xp.paint.properties["line-width"].specification);rm.useIntegerZoom=!0;var X0=function(a){function s(l){a.call(this,l,xp),this.gradientVersion=0}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype._handleSpecialPaintPropertyUpdate=function(l){l==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof ia,this.gradientVersion=(this.gradientVersion+1)%ce)},s.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},s.prototype.recalculate=function(l,g){a.prototype.recalculate.call(this,l,g),this.paint._values["line-floorwidth"]=rm.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,l)},s.prototype.createBucket=function(l){return new nd(l)},s.prototype.queryRadius=function(l){var g=l,P=Y0(Wl("line-width",this,g),Wl("line-gap-width",this,g)),j=Wl("line-offset",this,g);return P/2+Math.abs(j)+yd(this.paint.get("line-translate"))},s.prototype.queryIntersectsFeature=function(l,g,P,j,ne,ge,ze){var ht=Jh(l,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ge.angle,ze),zt=ze/2*Y0(this.paint.get("line-width").evaluate(g,P),this.paint.get("line-gap-width").evaluate(g,P)),qt=this.paint.get("line-offset").evaluate(g,P);return qt&&(j=function(_r,Rr){for(var Kr=[],qr=new oe(0,0),an=0;an<_r.length;an++){for(var en=_r[an],Hr=[],Fn=0;Fn=3){for(var en=0;en0?s+2*a:a}var Nd=Ps([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),u0=Ps([{name:"a_projected_pos",components:3,type:"Float32"}],4),b0=(Ps([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Ps([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Jd=(Ps([{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"}]),Ps([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Cr=Ps([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Dn(a,s,l){return a.sections.forEach(function(g){g.text=function(P,j,ne){var ge=j.layout.get("text-transform").evaluate(ne,{});return ge==="uppercase"?P=P.toLocaleUpperCase():ge==="lowercase"&&(P=P.toLocaleLowerCase()),mi.applyArabicShaping&&(P=mi.applyArabicShaping(P)),P}(g.text,s,l)}),a}Ps([{name:"triangle",components:3,type:"Uint16"}]),Ps([{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"}]),Ps([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Ps([{type:"Float32",name:"offsetX"}]),Ps([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Ci={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},eo=function(a,s,l,g,P){var j,ne,ge=8*P-g-1,ze=(1<>1,zt=-7,qt=l?P-1:0,_r=l?-1:1,Rr=a[s+qt];for(qt+=_r,j=Rr&(1<<-zt)-1,Rr>>=-zt,zt+=ge;zt>0;j=256*j+a[s+qt],qt+=_r,zt-=8);for(ne=j&(1<<-zt)-1,j>>=-zt,zt+=g;zt>0;ne=256*ne+a[s+qt],qt+=_r,zt-=8);if(j===0)j=1-ht;else{if(j===ze)return ne?NaN:1/0*(Rr?-1:1);ne+=Math.pow(2,g),j-=ht}return(Rr?-1:1)*ne*Math.pow(2,j-g)},zo=function(a,s,l,g,P,j){var ne,ge,ze,ht=8*j-P-1,zt=(1<>1,_r=P===23?Math.pow(2,-24)-Math.pow(2,-77):0,Rr=g?0:j-1,Kr=g?1:-1,qr=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(ge=isNaN(s)?1:0,ne=zt):(ne=Math.floor(Math.log(s)/Math.LN2),s*(ze=Math.pow(2,-ne))<1&&(ne--,ze*=2),(s+=ne+qt>=1?_r/ze:_r*Math.pow(2,1-qt))*ze>=2&&(ne++,ze/=2),ne+qt>=zt?(ge=0,ne=zt):ne+qt>=1?(ge=(s*ze-1)*Math.pow(2,P),ne+=qt):(ge=s*Math.pow(2,qt-1)*Math.pow(2,P),ne=0));P>=8;a[l+Rr]=255&ge,Rr+=Kr,ge/=256,P-=8);for(ne=ne<0;a[l+Rr]=255&ne,Rr+=Kr,ne/=256,ht-=8);a[l+Rr-Kr]|=128*qr},to=Ha;function Ha(a){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(a)?a:new Uint8Array(a||0),this.pos=0,this.type=0,this.length=this.buf.length}Ha.Varint=0,Ha.Fixed64=1,Ha.Bytes=2,Ha.Fixed32=5;var Cs=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");function ls(a){return a.type===Ha.Bytes?a.readVarint()+a.pos:a.pos+1}function Su(a,s,l){return l?4294967296*s+(a>>>0):4294967296*(s>>>0)+(a>>>0)}function ru(a,s,l){var g=s<=16383?1:s<=2097151?2:s<=268435455?3:Math.floor(Math.log(s)/(7*Math.LN2));l.realloc(g);for(var P=l.pos-1;P>=a;P--)l.buf[P+g]=l.buf[P]}function nu(a,s){for(var l=0;l>>8,a[l+2]=s>>>16,a[l+3]=s>>>24}function tl(a,s){return(a[s]|a[s+1]<<8|a[s+2]<<16)+(a[s+3]<<24)}function Ho(a,s,l){a===1&&l.readMessage(rl,s)}function rl(a,s,l){if(a===3){var g=l.readMessage(xc,{}),P=g.width,j=g.height,ne=g.left,ge=g.top,ze=g.advance;s.push({id:g.id,bitmap:new Lp({width:P+6,height:j+6},g.bitmap),metrics:{width:P,height:j,left:ne,top:ge,advance:ze}})}}function xc(a,s,l){a===1?s.id=l.readVarint():a===2?s.bitmap=l.readBytes():a===3?s.width=l.readVarint():a===4?s.height=l.readVarint():a===5?s.left=l.readSVarint():a===6?s.top=l.readSVarint():a===7&&(s.advance=l.readVarint())}function kc(a){for(var s=0,l=0,g=0,P=a;g=0;_r--){var Rr=ne[_r];if(!(qt.w>Rr.w||qt.h>Rr.h)){if(qt.x=Rr.x,qt.y=Rr.y,ze=Math.max(ze,qt.y+qt.h),ge=Math.max(ge,qt.x+qt.w),qt.w===Rr.w&&qt.h===Rr.h){var Kr=ne.pop();_r>3,j=this.pos;this.type=7&g,a(P,s,this),this.pos===j&&this.skip(g)}return s},readMessage:function(a,s){return this.readFields(a,s,this.readVarint()+this.pos)},readFixed32:function(){var a=bl(this.buf,this.pos);return this.pos+=4,a},readSFixed32:function(){var a=tl(this.buf,this.pos);return this.pos+=4,a},readFixed64:function(){var a=bl(this.buf,this.pos)+4294967296*bl(this.buf,this.pos+4);return this.pos+=8,a},readSFixed64:function(){var a=bl(this.buf,this.pos)+4294967296*tl(this.buf,this.pos+4);return this.pos+=8,a},readFloat:function(){var a=eo(this.buf,this.pos,!0,23,4);return this.pos+=4,a},readDouble:function(){var a=eo(this.buf,this.pos,!0,52,8);return this.pos+=8,a},readVarint:function(a){var s,l,g=this.buf;return s=127&(l=g[this.pos++]),l<128?s:(s|=(127&(l=g[this.pos++]))<<7,l<128?s:(s|=(127&(l=g[this.pos++]))<<14,l<128?s:(s|=(127&(l=g[this.pos++]))<<21,l<128?s:function(P,j,ne){var ge,ze,ht=ne.buf;if(ge=(112&(ze=ht[ne.pos++]))>>4,ze<128||(ge|=(127&(ze=ht[ne.pos++]))<<3,ze<128)||(ge|=(127&(ze=ht[ne.pos++]))<<10,ze<128)||(ge|=(127&(ze=ht[ne.pos++]))<<17,ze<128)||(ge|=(127&(ze=ht[ne.pos++]))<<24,ze<128)||(ge|=(1&(ze=ht[ne.pos++]))<<31,ze<128))return Su(P,ge,j);throw new Error("Expected varint not more than 10 bytes")}(s|=(15&(l=g[this.pos]))<<28,a,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var a=this.readVarint();return a%2==1?(a+1)/-2:a/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var a=this.readVarint()+this.pos,s=this.pos;return this.pos=a,a-s>=12&&Cs?function(l,g,P){return Cs.decode(l.subarray(g,P))}(this.buf,s,a):function(l,g,P){for(var j="",ne=g;ne239?4:zt>223?3:zt>191?2:1;if(ne+_r>P)break;_r===1?zt<128&&(qt=zt):_r===2?(192&(ge=l[ne+1]))==128&&(qt=(31&zt)<<6|63&ge)<=127&&(qt=null):_r===3?(ze=l[ne+2],(192&(ge=l[ne+1]))==128&&(192&ze)==128&&((qt=(15&zt)<<12|(63&ge)<<6|63&ze)<=2047||qt>=55296&&qt<=57343)&&(qt=null)):_r===4&&(ze=l[ne+2],ht=l[ne+3],(192&(ge=l[ne+1]))==128&&(192&ze)==128&&(192&ht)==128&&((qt=(15&zt)<<18|(63&ge)<<12|(63&ze)<<6|63&ht)<=65535||qt>=1114112)&&(qt=null)),qt===null?(qt=65533,_r=1):qt>65535&&(qt-=65536,j+=String.fromCharCode(qt>>>10&1023|55296),qt=56320|1023&qt),j+=String.fromCharCode(qt),ne+=_r}return j}(this.buf,s,a)},readBytes:function(){var a=this.readVarint()+this.pos,s=this.buf.subarray(this.pos,a);return this.pos=a,s},readPackedVarint:function(a,s){if(this.type!==Ha.Bytes)return a.push(this.readVarint(s));var l=ls(this);for(a=a||[];this.pos127;);else if(s===Ha.Bytes)this.pos=this.readVarint()+this.pos;else if(s===Ha.Fixed32)this.pos+=4;else{if(s!==Ha.Fixed64)throw new Error("Unimplemented type: "+s);this.pos+=8}},writeTag:function(a,s){this.writeVarint(a<<3|s)},realloc:function(a){for(var s=this.length||16;s268435455||a<0?function(s,l){var g,P;if(s>=0?(g=s%4294967296|0,P=s/4294967296|0):(P=~(-s/4294967296),4294967295^(g=~(-s%4294967296))?g=g+1|0:(g=0,P=P+1|0)),s>=18446744073709552e3||s<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");l.realloc(10),function(j,ne,ge){ge.buf[ge.pos++]=127&j|128,j>>>=7,ge.buf[ge.pos++]=127&j|128,j>>>=7,ge.buf[ge.pos++]=127&j|128,j>>>=7,ge.buf[ge.pos++]=127&j|128,ge.buf[ge.pos]=127&(j>>>=7)}(g,0,l),function(j,ne){var ge=(7&j)<<4;ne.buf[ne.pos++]|=ge|((j>>>=3)?128:0),j&&(ne.buf[ne.pos++]=127&j|((j>>>=7)?128:0),j&&(ne.buf[ne.pos++]=127&j|((j>>>=7)?128:0),j&&(ne.buf[ne.pos++]=127&j|((j>>>=7)?128:0),j&&(ne.buf[ne.pos++]=127&j|((j>>>=7)?128:0),j&&(ne.buf[ne.pos++]=127&j)))))}(P,l)}(a,this):(this.realloc(4),this.buf[this.pos++]=127&a|(a>127?128:0),a<=127||(this.buf[this.pos++]=127&(a>>>=7)|(a>127?128:0),a<=127||(this.buf[this.pos++]=127&(a>>>=7)|(a>127?128:0),a<=127||(this.buf[this.pos++]=a>>>7&127))))},writeSVarint:function(a){this.writeVarint(a<0?2*-a-1:2*a)},writeBoolean:function(a){this.writeVarint(!!a)},writeString:function(a){a=String(a),this.realloc(4*a.length),this.pos++;var s=this.pos;this.pos=function(g,P,j){for(var ne,ge,ze=0;ze55295&&ne<57344){if(!ge){ne>56319||ze+1===P.length?(g[j++]=239,g[j++]=191,g[j++]=189):ge=ne;continue}if(ne<56320){g[j++]=239,g[j++]=191,g[j++]=189,ge=ne;continue}ne=ge-55296<<10|ne-56320|65536,ge=null}else ge&&(g[j++]=239,g[j++]=191,g[j++]=189,ge=null);ne<128?g[j++]=ne:(ne<2048?g[j++]=ne>>6|192:(ne<65536?g[j++]=ne>>12|224:(g[j++]=ne>>18|240,g[j++]=ne>>12&63|128),g[j++]=ne>>6&63|128),g[j++]=63&ne|128)}return j}(this.buf,a,this.pos);var l=this.pos-s;l>=128&&ru(s,l,this),this.pos=s-1,this.writeVarint(l),this.pos+=l},writeFloat:function(a){this.realloc(4),zo(this.buf,a,this.pos,!0,23,4),this.pos+=4},writeDouble:function(a){this.realloc(8),zo(this.buf,a,this.pos,!0,52,8),this.pos+=8},writeBytes:function(a){var s=a.length;this.writeVarint(s),this.realloc(s);for(var l=0;l=128&&ru(l,g,this),this.pos=l-1,this.writeVarint(g),this.pos+=g},writeMessage:function(a,s,l){this.writeTag(a,Ha.Bytes),this.writeRawMessage(s,l)},writePackedVarint:function(a,s){s.length&&this.writeMessage(a,nu,s)},writePackedSVarint:function(a,s){s.length&&this.writeMessage(a,xu,s)},writePackedBoolean:function(a,s){s.length&&this.writeMessage(a,_a,s)},writePackedFloat:function(a,s){s.length&&this.writeMessage(a,Ns,s)},writePackedDouble:function(a,s){s.length&&this.writeMessage(a,wu,s)},writePackedFixed32:function(a,s){s.length&&this.writeMessage(a,Ao,s)},writePackedSFixed32:function(a,s){s.length&&this.writeMessage(a,lu,s)},writePackedFixed64:function(a,s){s.length&&this.writeMessage(a,el,s)},writePackedSFixed64:function(a,s){s.length&&this.writeMessage(a,As,s)},writeBytesField:function(a,s){this.writeTag(a,Ha.Bytes),this.writeBytes(s)},writeFixed32Field:function(a,s){this.writeTag(a,Ha.Fixed32),this.writeFixed32(s)},writeSFixed32Field:function(a,s){this.writeTag(a,Ha.Fixed32),this.writeSFixed32(s)},writeFixed64Field:function(a,s){this.writeTag(a,Ha.Fixed64),this.writeFixed64(s)},writeSFixed64Field:function(a,s){this.writeTag(a,Ha.Fixed64),this.writeSFixed64(s)},writeVarintField:function(a,s){this.writeTag(a,Ha.Varint),this.writeVarint(s)},writeSVarintField:function(a,s){this.writeTag(a,Ha.Varint),this.writeSVarint(s)},writeStringField:function(a,s){this.writeTag(a,Ha.Bytes),this.writeString(s)},writeFloatField:function(a,s){this.writeTag(a,Ha.Fixed32),this.writeFloat(s)},writeDoubleField:function(a,s){this.writeTag(a,Ha.Fixed64),this.writeDouble(s)},writeBooleanField:function(a,s){this.writeVarintField(a,!!s)}};var Wu=function(a,s){var l=s.pixelRatio,g=s.version,P=s.stretchX,j=s.stretchY,ne=s.content;this.paddedRect=a,this.pixelRatio=l,this.stretchX=P,this.stretchY=j,this.content=ne,this.version=g},zs={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};zs.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},zs.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},zs.tlbr.get=function(){return this.tl.concat(this.br)},zs.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Wu.prototype,zs);var Vo=function(a,s){var l={},g={};this.haveRenderCallbacks=[];var P=[];this.addImages(a,l,P),this.addImages(s,g,P);var j=kc(P),ne=new Wd({width:j.w||1,height:j.h||1});for(var ge in a){var ze=a[ge],ht=l[ge].paddedRect;Wd.copy(ze.data,ne,{x:0,y:0},{x:ht.x+1,y:ht.y+1},ze.data)}for(var zt in s){var qt=s[zt],_r=g[zt].paddedRect,Rr=_r.x+1,Kr=_r.y+1,qr=qt.data.width,an=qt.data.height;Wd.copy(qt.data,ne,{x:0,y:0},{x:Rr,y:Kr},qt.data),Wd.copy(qt.data,ne,{x:0,y:an-1},{x:Rr,y:Kr-1},{width:qr,height:1}),Wd.copy(qt.data,ne,{x:0,y:0},{x:Rr,y:Kr+an},{width:qr,height:1}),Wd.copy(qt.data,ne,{x:qr-1,y:0},{x:Rr-1,y:Kr},{width:1,height:an}),Wd.copy(qt.data,ne,{x:0,y:0},{x:Rr+qr,y:Kr},{width:1,height:an})}this.image=ne,this.iconPositions=l,this.patternPositions=g};Vo.prototype.addImages=function(a,s,l){for(var g in a){var P=a[g],j={x:0,y:0,w:P.data.width+2,h:P.data.height+2};l.push(j),s[g]=new Wu(j,P),P.hasRenderCallback&&this.haveRenderCallbacks.push(g)}},Vo.prototype.patchUpdatedImages=function(a,s){for(var l in a.dispatchRenderCallbacks(this.haveRenderCallbacks),a.updatedImages)this.patchUpdatedImage(this.iconPositions[l],a.getImage(l),s),this.patchUpdatedImage(this.patternPositions[l],a.getImage(l),s)},Vo.prototype.patchUpdatedImage=function(a,s,l){if(a&&s&&a.version!==s.version){a.version=s.version;var g=a.tl;l.update(s.data,void 0,{x:g[0],y:g[1]})}},Ls("ImagePosition",Wu),Ls("ImageAtlas",Vo);var hc={horizontal:1,vertical:2,horizontalOnly:3},wc=function(){this.scale=1,this.fontStack="",this.imageName=null};wc.forText=function(a,s){var l=new wc;return l.scale=a||1,l.fontStack=s,l},wc.forImage=function(a){var s=new wc;return s.imageName=a,s};var cl=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function Jl(a,s,l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr,Kr,qr){var an,en=cl.fromFeature(a,P);qt===hc.vertical&&en.verticalizePunctuation();var Hr=mi.processBidirectionalText,Fn=mi.processStyledBidirectionalText;if(Hr&&en.sections.length===1){an=[];for(var ni=0,Mi=Hr(en.toString(),Md(en,ht,j,s,g,Rr,Kr));ni0&&nr>Pc&&(Pc=nr)}else{var Pr=Ou[mc.fontStack],kr=Pr&&Pr[A];if(kr&&kr.rect)W=kr.rect,C=kr.metrics;else{var U=Ks[mc.fontStack],z=U&&U[A];if(!z)continue;C=z.metrics}p=24*(Hc-mc.scale)}De?(fs.verticalizable=!0,Oo.push({glyph:A,imageName:pe,x:oh,y:Rh+p,vertical:De,scale:mc.scale,fontStack:mc.fontStack,sectionIndex:sh,metrics:C,rect:W}),oh+=Te*mc.scale+gc):(Oo.push({glyph:A,imageName:pe,x:oh,y:Rh+p,vertical:De,scale:mc.scale,fontStack:mc.fontStack,sectionIndex:sh,metrics:C,rect:W}),oh+=C.advance*mc.scale+gc)}Oo.length!==0&&(ph=Math.max(oh-gc,ph),Bf(Oo,0,Oo.length-1,rh,Pc)),oh=0;var te=Zs*Hc+Pc;Ad.lineOffset=Math.max(Pc,Vh),Rh+=te,mh=Math.max(te,mh),++xf}else Rh+=Zs,++xf}var Re,Lt=Rh- -17,or=Fh(Cl),Lr=or.horizontalAlign,Ur=or.verticalAlign;(function(cn,$n,Ai,Qo,Go,xo,Wo,hs,ms){var Xo,ys=($n-Ai)*Go;Xo=xo!==Wo?-hs*Qo- -17:(-Qo*ms+.5)*Wo;for(var gl=0,Bu=cn;gl=0&&g>=a&&Uc[this.text.charCodeAt(g)];g--)l--;this.text=this.text.substring(a,l),this.sectionIndex=this.sectionIndex.slice(a,l)},cl.prototype.substring=function(a,s){var l=new cl;return l.text=this.text.substring(a,s),l.sectionIndex=this.sectionIndex.slice(a,s),l.sections=this.sections,l},cl.prototype.toString=function(){return this.text},cl.prototype.getMaxScale=function(){var a=this;return this.sectionIndex.reduce(function(s,l){return Math.max(s,a.sections[l].scale)},0)},cl.prototype.addTextSection=function(a,s){this.text+=a.text,this.sections.push(wc.forText(a.scale,a.fontStack||s));for(var l=this.sections.length-1,g=0;g=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var Uc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},dc={};function Ch(a,s,l,g,P,j){if(s.imageName){var ne=g[s.imageName];return ne?ne.displaySize[0]*s.scale*24/j+P:0}var ge=l[s.fontStack],ze=ge&&ge[a];return ze?ze.metrics.advance*s.scale+P:0}function rp(a,s,l,g){var P=Math.pow(a-s,2);return g?a=0,qt=0,_r=0;_r-l/2;){if(--ne<0)return!1;ge-=a[ne].dist(j),j=a[ne]}ge+=a[ne].dist(a[ne+1]),ne++;for(var ze=[],ht=0;geg;)ht-=ze.shift().angleDelta;if(ht>P)return!1;ne++,ge+=zt.dist(qt)}return!0}function Xu(a){for(var s=0,l=0;lht){var Kr=(ht-ze)/Rr,qr=vi(qt.x,_r.x,Kr),an=vi(qt.y,_r.y,Kr),en=new Vf(qr,an,_r.angleTo(qt),zt);return en._round(),!ne||th(a,en,ge,ne,s)?en:void 0}ze+=Rr}}function jh(a,s,l,g,P,j,ne,ge,ze){var ht=Pl(g,j,ne),zt=mu(g,P),qt=zt*ne,_r=a[0].x===0||a[0].x===ze||a[0].y===0||a[0].y===ze;return s-qt=0&&wl=0&&wo=0&&lo+za<=oo){var Zs=new Vf(wl,wo,Ks,as);Zs._round(),en&&!th(Kr,Zs,Fn,en,Hr)||cs.push(Zs)}}Ds+=fs}return Mi||cs.length||ni||(cs=Rr(Kr,Ds/2,an,en,Hr,Fn,ni,!0,wa)),cs}(a,_r?s/2*ge%s:(zt/2+2*j)*ne*ge%s,s,ht,l,qt,_r,!1,ze)}function qp(a,s,l,g,P){for(var j=[],ne=0;ne=g&&qt.x>=g||(zt.x>=g?zt=new oe(g,zt.y+(g-zt.x)/(qt.x-zt.x)*(qt.y-zt.y))._round():qt.x>=g&&(qt=new oe(g,zt.y+(g-zt.x)/(qt.x-zt.x)*(qt.y-zt.y))._round()),zt.y>=P&&qt.y>=P||(zt.y>=P?zt=new oe(zt.x+(P-zt.y)/(qt.y-zt.y)*(qt.x-zt.x),P)._round():qt.y>=P&&(qt=new oe(zt.x+(P-zt.y)/(qt.y-zt.y)*(qt.x-zt.x),P)._round()),ze&&zt.equals(ze[ze.length-1])||j.push(ze=[zt]),ze.push(qt)))))}return j}function fi(a,s,l,g){var P=[],j=a.image,ne=j.pixelRatio,ge=j.paddedRect.w-2,ze=j.paddedRect.h-2,ht=a.right-a.left,zt=a.bottom-a.top,qt=j.stretchX||[[0,ge]],_r=j.stretchY||[[0,ze]],Rr=function(wl,wo){return wl+wo[1]-wo[0]},Kr=qt.reduce(Rr,0),qr=_r.reduce(Rr,0),an=ge-Kr,en=ze-qr,Hr=0,Fn=Kr,ni=0,Mi=qr,wa=0,za=an,oo=0,Ds=en;if(j.content&&g){var lo=j.content;Hr=Ja(qt,0,lo[0]),ni=Ja(_r,0,lo[1]),Fn=Ja(qt,lo[0],lo[2]),Mi=Ja(_r,lo[1],lo[3]),wa=lo[0]-Hr,oo=lo[1]-ni,za=lo[2]-lo[0]-Fn,Ds=lo[3]-lo[1]-Mi}var cs=function(wl,wo,Zs,Cl){var Gf=Yu(wl.stretch-Hr,Fn,ht,a.left),ec=tf(wl.fixed-wa,za,wl.stretch,Kr),gc=Yu(wo.stretch-ni,Mi,zt,a.top),$c=tf(wo.fixed-oo,Ds,wo.stretch,qr),Lc=Yu(Zs.stretch-Hr,Fn,ht,a.left),oh=tf(Zs.fixed-wa,za,Zs.stretch,Kr),Rh=Yu(Cl.stretch-ni,Mi,zt,a.top),ph=tf(Cl.fixed-oo,Ds,Cl.stretch,qr),mh=new oe(Gf,gc),rh=new oe(Lc,gc),xf=new oe(Lc,Rh),pc=new oe(Gf,Rh),sf=new oe(ec/ne,$c/ne),Kl=new oe(oh/ne,ph/ne),Hc=s*Math.PI/180;if(Hc){var Vh=Math.sin(Hc),Ad=Math.cos(Hc),Oo=[Ad,-Vh,Vh,Ad];mh._matMult(Oo),rh._matMult(Oo),pc._matMult(Oo),xf._matMult(Oo)}var Pc=wl.stretch+wl.fixed,Nc=wo.stretch+wo.fixed;return{tl:mh,tr:rh,bl:pc,br:xf,tex:{x:j.paddedRect.x+1+Pc,y:j.paddedRect.y+1+Nc,w:Zs.stretch+Zs.fixed-Pc,h:Cl.stretch+Cl.fixed-Nc},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:sf,pixelOffsetBR:Kl,minFontScaleX:za/ne/ht,minFontScaleY:Ds/ne/zt,isSDF:l}};if(g&&(j.stretchX||j.stretchY))for(var as=ga(qt,an,Kr),$s=ga(_r,en,qr),ps=0;ps0&&(Rr=Math.max(10,Rr),this.circleDiameter=Rr)}else{var Kr=j.top*ne-ge,qr=j.bottom*ne+ge,an=j.left*ne-ge,en=j.right*ne+ge,Hr=j.collisionPadding;if(Hr&&(an-=Hr[0]*ne,Kr-=Hr[1]*ne,en+=Hr[2]*ne,qr+=Hr[3]*ne),ht){var Fn=new oe(an,Kr),ni=new oe(en,Kr),Mi=new oe(an,qr),wa=new oe(en,qr),za=ht*Math.PI/180;Fn._rotate(za),ni._rotate(za),Mi._rotate(za),wa._rotate(za),an=Math.min(Fn.x,ni.x,Mi.x,wa.x),en=Math.max(Fn.x,ni.x,Mi.x,wa.x),Kr=Math.min(Fn.y,ni.y,Mi.y,wa.y),qr=Math.max(Fn.y,ni.y,Mi.y,wa.y)}a.emplaceBack(s.x,s.y,an,Kr,en,qr,l,g,P)}this.boxEndIndex=a.length},Nr=function(a,s){if(a===void 0&&(a=[]),s===void 0&&(s=vr),this.data=a,this.length=this.data.length,this.compare=s,this.length>0)for(var l=(this.length>>1)-1;l>=0;l--)this._down(l)};function vr(a,s){return as?1:0}function hi(a,s,l){s===void 0&&(s=1),l===void 0&&(l=!1);for(var g=1/0,P=1/0,j=-1/0,ne=-1/0,ge=a[0],ze=0;zej)&&(j=ht.x),(!ze||ht.y>ne)&&(ne=ht.y)}var zt=Math.min(j-g,ne-P),qt=zt/2,_r=new Nr([],Ma);if(zt===0)return new oe(g,P);for(var Rr=g;Rrqr.d||!qr.d)&&(qr=en,l&&console.log("found best %d after %d probes",Math.round(1e4*en.d)/1e4,an)),en.max-qr.d<=s||(_r.push(new Ra(en.p.x-(qt=en.h/2),en.p.y-qt,qt,a)),_r.push(new Ra(en.p.x+qt,en.p.y-qt,qt,a)),_r.push(new Ra(en.p.x-qt,en.p.y+qt,qt,a)),_r.push(new Ra(en.p.x+qt,en.p.y+qt,qt,a)),an+=4)}return l&&(console.log("num probes: "+an),console.log("best distance: "+qr.d)),qr.p}function Ma(a,s){return s.max-a.max}function Ra(a,s,l,g){this.p=new oe(a,s),this.h=l,this.d=function(P,j){for(var ne=!1,ge=1/0,ze=0;zeP.y!=Kr.y>P.y&&P.x<(Kr.x-Rr.x)*(P.y-Rr.y)/(Kr.y-Rr.y)+Rr.x&&(ne=!ne),ge=Math.min(ge,qh(P,Rr,Kr))}return(ne?1:-1)*Math.sqrt(ge)}(this.p,g),this.max=this.d+this.h*Math.SQRT2}Nr.prototype.push=function(a){this.data.push(a),this.length++,this._up(this.length-1)},Nr.prototype.pop=function(){if(this.length!==0){var a=this.data[0],s=this.data.pop();return this.length--,this.length>0&&(this.data[0]=s,this._down(0)),a}},Nr.prototype.peek=function(){return this.data[0]},Nr.prototype._up=function(a){for(var s=this.data,l=this.compare,g=s[a];a>0;){var P=a-1>>1,j=s[P];if(l(g,j)>=0)break;s[a]=j,a=P}s[a]=g},Nr.prototype._down=function(a){for(var s=this.data,l=this.compare,g=this.length>>1,P=s[a];a=0)break;s[a]=ne,a=j}s[a]=P};var Ni=Number.POSITIVE_INFINITY;function ea(a,s){return s[1]!==Ni?function(l,g,P){var j=0,ne=0;switch(g=Math.abs(g),P=Math.abs(P),l){case"top-right":case"top-left":case"top":ne=P-7;break;case"bottom-right":case"bottom-left":case"bottom":ne=7-P}switch(l){case"top-right":case"bottom-right":case"right":j=-g;break;case"top-left":case"bottom-left":case"left":j=g}return[j,ne]}(a,s[0],s[1]):function(l,g){var P=0,j=0;g<0&&(g=0);var ne=g/Math.sqrt(2);switch(l){case"top-right":case"top-left":j=ne-7;break;case"bottom-right":case"bottom-left":j=7-ne;break;case"bottom":j=7-g;break;case"top":j=g-7}switch(l){case"top-right":case"bottom-right":P=-ne;break;case"top-left":case"bottom-left":P=ne;break;case"left":P=g;break;case"right":P=-g}return[P,j]}(a,s[0])}function Vi(a){switch(a){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Qn(a,s,l,g,P,j,ne,ge,ze,ht,zt,qt,_r,Rr,Kr){var qr=function(ni,Mi,wa,za,oo,Ds,lo,cs){for(var as=za.layout.get("text-rotate").evaluate(Ds,{})*Math.PI/180,$s=[],ps=0,fs=Mi.positionedLines;ps32640&&st(a.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):an.kind==="composite"&&((en=[128*Rr.compositeTextSizes[0].evaluate(ne,{},Kr),128*Rr.compositeTextSizes[1].evaluate(ne,{},Kr)])[0]>32640||en[1]>32640)&&st(a.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),a.addSymbols(a.text,qr,en,ge,j,ne,ht,s,ze.lineStartIndex,ze.lineLength,_r,Kr);for(var Hr=0,Fn=zt;Hr=0;ne--)if(g.dist(j[ne])0)&&(j.value.kind!=="constant"||j.value.value.length>0),ht=ge.value.kind!=="constant"||!!ge.value.value||Object.keys(ge.parameters).length>0,zt=P.get("symbol-sort-key");if(this.features=[],ze||ht){for(var qt=s.iconDependencies,_r=s.glyphDependencies,Rr=s.availableImages,Kr=new Vn(this.zoom),qr=0,an=a;qr=0;for(var Ks=0,Ou=oo.sections;Ks=0;ge--)j[ge]={x:s[ge].x,y:s[ge].y,tileUnitDistanceFromAnchor:P},ge>0&&(P+=s[ge-1].dist(s[ge]));for(var ze=0;ze0},sr.prototype.hasIconData=function(){return this.icon.segments.get().length>0},sr.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},sr.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},sr.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},sr.prototype.addIndicesForPlacedSymbol=function(a,s){for(var l=a.placedSymbolArray.get(s),g=l.vertexStartIndex+4*l.numGlyphs,P=l.vertexStartIndex;P1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(a),this.sortedAngle=a,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var l=0,g=this.symbolInstanceIndexes;l=0&&ge.indexOf(j)===ne&&s.addIndicesForPlacedSymbol(s.text,j)}),P.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,P.verticalPlacedTextSymbolIndex),P.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,P.placedIconSymbolIndex),P.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,P.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Ls("SymbolBucket",sr,{omit:["layers","collisionBoxArray","features","compareText"]}),sr.MAX_GLYPHS=65535,sr.addDynamicAttributes=Ae;var Er=new qo({"symbol-placement":new Ti(Qe.layout_symbol["symbol-placement"]),"symbol-spacing":new Ti(Qe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ti(Qe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Bi(Qe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ti(Qe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ti(Qe.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Ti(Qe.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ti(Qe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ti(Qe.layout_symbol["icon-rotation-alignment"]),"icon-size":new Bi(Qe.layout_symbol["icon-size"]),"icon-text-fit":new Ti(Qe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ti(Qe.layout_symbol["icon-text-fit-padding"]),"icon-image":new Bi(Qe.layout_symbol["icon-image"]),"icon-rotate":new Bi(Qe.layout_symbol["icon-rotate"]),"icon-padding":new Ti(Qe.layout_symbol["icon-padding"]),"icon-keep-upright":new Ti(Qe.layout_symbol["icon-keep-upright"]),"icon-offset":new Bi(Qe.layout_symbol["icon-offset"]),"icon-anchor":new Bi(Qe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ti(Qe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ti(Qe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ti(Qe.layout_symbol["text-rotation-alignment"]),"text-field":new Bi(Qe.layout_symbol["text-field"]),"text-font":new Bi(Qe.layout_symbol["text-font"]),"text-size":new Bi(Qe.layout_symbol["text-size"]),"text-max-width":new Bi(Qe.layout_symbol["text-max-width"]),"text-line-height":new Ti(Qe.layout_symbol["text-line-height"]),"text-letter-spacing":new Bi(Qe.layout_symbol["text-letter-spacing"]),"text-justify":new Bi(Qe.layout_symbol["text-justify"]),"text-radial-offset":new Bi(Qe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ti(Qe.layout_symbol["text-variable-anchor"]),"text-anchor":new Bi(Qe.layout_symbol["text-anchor"]),"text-max-angle":new Ti(Qe.layout_symbol["text-max-angle"]),"text-writing-mode":new Ti(Qe.layout_symbol["text-writing-mode"]),"text-rotate":new Bi(Qe.layout_symbol["text-rotate"]),"text-padding":new Ti(Qe.layout_symbol["text-padding"]),"text-keep-upright":new Ti(Qe.layout_symbol["text-keep-upright"]),"text-transform":new Bi(Qe.layout_symbol["text-transform"]),"text-offset":new Bi(Qe.layout_symbol["text-offset"]),"text-allow-overlap":new Ti(Qe.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Ti(Qe.layout_symbol["text-ignore-placement"]),"text-optional":new Ti(Qe.layout_symbol["text-optional"])}),An={paint:new qo({"icon-opacity":new Bi(Qe.paint_symbol["icon-opacity"]),"icon-color":new Bi(Qe.paint_symbol["icon-color"]),"icon-halo-color":new Bi(Qe.paint_symbol["icon-halo-color"]),"icon-halo-width":new Bi(Qe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Bi(Qe.paint_symbol["icon-halo-blur"]),"icon-translate":new Ti(Qe.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ti(Qe.paint_symbol["icon-translate-anchor"]),"text-opacity":new Bi(Qe.paint_symbol["text-opacity"]),"text-color":new Bi(Qe.paint_symbol["text-color"],{runtimeType:ki,getOverride:function(a){return a.textColor},hasOverride:function(a){return!!a.textColor}}),"text-halo-color":new Bi(Qe.paint_symbol["text-halo-color"]),"text-halo-width":new Bi(Qe.paint_symbol["text-halo-width"]),"text-halo-blur":new Bi(Qe.paint_symbol["text-halo-blur"]),"text-translate":new Ti(Qe.paint_symbol["text-translate"]),"text-translate-anchor":new Ti(Qe.paint_symbol["text-translate-anchor"])}),layout:Er},ci=function(a){this.type=a.property.overrides?a.property.overrides.runtimeType:Wn,this.defaultValue=a};ci.prototype.evaluate=function(a){if(a.formattedSection){var s=this.defaultValue.property.overrides;if(s&&s.hasOverride(a.formattedSection))return s.getOverride(a.formattedSection)}return a.feature&&a.featureState?this.defaultValue.evaluate(a.feature,a.featureState):this.defaultValue.property.specification.default},ci.prototype.eachChild=function(a){this.defaultValue.isConstant()||a(this.defaultValue.value._styleExpression.expression)},ci.prototype.outputDefined=function(){return!1},ci.prototype.serialize=function(){return null},Ls("FormatSectionOverride",ci,{omit:["defaultValue"]});var bi=function(a){function s(l){a.call(this,l,An)}return a&&(s.__proto__=a),(s.prototype=Object.create(a&&a.prototype)).constructor=s,s.prototype.recalculate=function(l,g){if(a.prototype.recalculate.call(this,l,g),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var P=this.layout.get("text-writing-mode");if(P){for(var j=[],ne=0,ge=P;ne",targetMapId:g,sourceMapId:j.mapId})}}},wh.prototype.receive=function(a){var s=a.data,l=s.id;if(l&&(!s.targetMapId||this.mapId===s.targetMapId))if(s.type===""){delete this.tasks[l];var g=this.cancelCallbacks[l];delete this.cancelCallbacks[l],g&&g()}else mt()||s.mustQueue?(this.tasks[l]=s,this.taskQueue.push(l),this.invoker.trigger()):this.processTask(l,s)},wh.prototype.process=function(){if(this.taskQueue.length){var a=this.taskQueue.shift(),s=this.tasks[a];delete this.tasks[a],this.taskQueue.length&&this.invoker.trigger(),s&&this.processTask(a,s)}},wh.prototype.processTask=function(a,s){var l=this;if(s.type===""){var g=this.callbacks[a];delete this.callbacks[a],g&&(s.error?g(of(s.error)):g(null,of(s.data)))}else{var P=!1,j=Ht(this.globalScope)?void 0:[],ne=s.hasCallback?function(zt,qt){P=!0,delete l.cancelCallbacks[a],l.target.postMessage({id:a,type:"",sourceMapId:l.mapId,error:zt?Gr(zt):null,data:Gr(qt,j)},j)}:function(zt){P=!0},ge=null,ze=of(s.data);if(this.parent[s.type])ge=this.parent[s.type](s.sourceMapId,ze,ne);else if(this.parent.getWorkerSource){var ht=s.type.split(".");ge=this.parent.getWorkerSource(s.sourceMapId,ht[0],ze.source)[ht[1]](ze,ne)}else ne(new Error("Could not find function "+s.type));!P&&ge&&ge.cancel&&(this.cancelCallbacks[a]=ge.cancel)}},wh.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Yl=function(a,s){a&&(s?this.setSouthWest(a).setNorthEast(s):a.length===4?this.setSouthWest([a[0],a[1]]).setNorthEast([a[2],a[3]]):this.setSouthWest(a[0]).setNorthEast(a[1]))};Yl.prototype.setNorthEast=function(a){return this._ne=a instanceof Mc?new Mc(a.lng,a.lat):Mc.convert(a),this},Yl.prototype.setSouthWest=function(a){return this._sw=a instanceof Mc?new Mc(a.lng,a.lat):Mc.convert(a),this},Yl.prototype.extend=function(a){var s,l,g=this._sw,P=this._ne;if(a instanceof Mc)s=a,l=a;else{if(!(a instanceof Yl))return Array.isArray(a)?a.length===4||a.every(Array.isArray)?this.extend(Yl.convert(a)):this.extend(Mc.convert(a)):this;if(l=a._ne,!(s=a._sw)||!l)return this}return g||P?(g.lng=Math.min(s.lng,g.lng),g.lat=Math.min(s.lat,g.lat),P.lng=Math.max(l.lng,P.lng),P.lat=Math.max(l.lat,P.lat)):(this._sw=new Mc(s.lng,s.lat),this._ne=new Mc(l.lng,l.lat)),this},Yl.prototype.getCenter=function(){return new Mc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Yl.prototype.getSouthWest=function(){return this._sw},Yl.prototype.getNorthEast=function(){return this._ne},Yl.prototype.getNorthWest=function(){return new Mc(this.getWest(),this.getNorth())},Yl.prototype.getSouthEast=function(){return new Mc(this.getEast(),this.getSouth())},Yl.prototype.getWest=function(){return this._sw.lng},Yl.prototype.getSouth=function(){return this._sw.lat},Yl.prototype.getEast=function(){return this._ne.lng},Yl.prototype.getNorth=function(){return this._ne.lat},Yl.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Yl.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Yl.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Yl.prototype.contains=function(a){var s=Mc.convert(a),l=s.lng,g=s.lat,P=this._sw.lng<=l&&l<=this._ne.lng;return this._sw.lng>this._ne.lng&&(P=this._sw.lng>=l&&l>=this._ne.lng),this._sw.lat<=g&&g<=this._ne.lat&&P},Yl.convert=function(a){return!a||a instanceof Yl?a:new Yl(a)};var Mc=function(a,s){if(isNaN(a)||isNaN(s))throw new Error("Invalid LngLat object: ("+a+", "+s+")");if(this.lng=+a,this.lat=+s,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Mc.prototype.wrap=function(){return new Mc(qe(this.lng,-180,180),this.lat)},Mc.prototype.toArray=function(){return[this.lng,this.lat]},Mc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Mc.prototype.distanceTo=function(a){var s=Math.PI/180,l=this.lat*s,g=a.lat*s,P=Math.sin(l)*Math.sin(g)+Math.cos(l)*Math.cos(g)*Math.cos((a.lng-this.lng)*s);return 63710088e-1*Math.acos(Math.min(P,1))},Mc.prototype.toBounds=function(a){a===void 0&&(a=0);var s=360*a/40075017,l=s/Math.cos(Math.PI/180*this.lat);return new Yl(new Mc(this.lng-l,this.lat-s),new Mc(this.lng+l,this.lat+s))},Mc.convert=function(a){if(a instanceof Mc)return a;if(Array.isArray(a)&&(a.length===2||a.length===3))return new Mc(Number(a[0]),Number(a[1]));if(!Array.isArray(a)&&typeof a=="object"&&a!==null)return new Mc(Number("lng"in a?a.lng:a.lon),Number(a.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var ad=2*Math.PI*63710088e-1;function Tf(a){return ad*Math.cos(a*Math.PI/180)}function Wh(a){return(180+a)/360}function Nf(a){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a*Math.PI/360)))/360}function hm(a,s){return a/Tf(s)}function bm(a){return 360/Math.PI*Math.atan(Math.exp((180-360*a)*Math.PI/180))-90}var xm=function(a,s,l){l===void 0&&(l=0),this.x=+a,this.y=+s,this.z=+l};xm.fromLngLat=function(a,s){s===void 0&&(s=0);var l=Mc.convert(a);return new xm(Wh(l.lng),Nf(l.lat),hm(s,l.lat))},xm.prototype.toLngLat=function(){return new Mc(360*this.x-180,bm(this.y))},xm.prototype.toAltitude=function(){return this.z*Tf(bm(this.y))},xm.prototype.meterInMercatorCoordinateUnits=function(){return 1/ad*(a=bm(this.y),1/Math.cos(a*Math.PI/180));var a};var jp=function(a,s,l){this.z=a,this.x=s,this.y=l,this.key=V0(0,a,a,s,l)};jp.prototype.equals=function(a){return this.z===a.z&&this.x===a.x&&this.y===a.y},jp.prototype.url=function(a,s){var l,g,P,j,ne,ge=(g=this.y,P=this.z,j=Jf(256*(l=this.x),256*(g=Math.pow(2,P)-g-1),P),ne=Jf(256*(l+1),256*(g+1),P),j[0]+","+j[1]+","+ne[0]+","+ne[1]),ze=function(ht,zt,qt){for(var _r,Rr="",Kr=ht;Kr>0;Kr--)Rr+=(zt&(_r=1<this.canonical.z?new up(a,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new up(a,this.wrap,a,this.canonical.x>>s,this.canonical.y>>s)},up.prototype.calculateScaledKey=function(a,s){var l=this.canonical.z-a;return a>this.canonical.z?V0(this.wrap*+s,a,this.canonical.z,this.canonical.x,this.canonical.y):V0(this.wrap*+s,a,a,this.canonical.x>>l,this.canonical.y>>l)},up.prototype.isChildOf=function(a){if(a.wrap!==this.wrap)return!1;var s=this.canonical.z-a.canonical.z;return a.overscaledZ===0||a.overscaledZ>s&&a.canonical.y===this.canonical.y>>s},up.prototype.children=function(a){if(this.overscaledZ>=a)return[new up(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var s=this.canonical.z+1,l=2*this.canonical.x,g=2*this.canonical.y;return[new up(s,this.wrap,s,l,g),new up(s,this.wrap,s,l+1,g),new up(s,this.wrap,s,l,g+1),new up(s,this.wrap,s,l+1,g+1)]},up.prototype.isLessThan=function(a){return this.wrapa.wrap)&&(this.overscaledZa.overscaledZ)&&(this.canonical.xa.canonical.x)&&this.canonical.y=this.dim+1||s<-1||s>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(s+1)*this.stride+(a+1)},xd.prototype._unpackMapbox=function(a,s,l){return(256*a*256+256*s+l)/10-1e4},xd.prototype._unpackTerrarium=function(a,s,l){return 256*a+s+l/256-32768},xd.prototype.getPixels=function(){return new Wd({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},xd.prototype.backfillBorder=function(a,s,l){if(this.dim!==a.dim)throw new Error("dem dimension mismatch");var g=s*this.dim,P=s*this.dim+this.dim,j=l*this.dim,ne=l*this.dim+this.dim;switch(s){case-1:g=P-1;break;case 1:P=g+1}switch(l){case-1:j=ne-1;break;case 1:ne=j+1}for(var ge=-s*this.dim,ze=-l*this.dim,ht=j;ht=0&&zt[3]>=0&&ge.insert(ne,zt[0],zt[1],zt[2],zt[3])}},nm.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new m0.VectorTile(new to(this.rawTileData)).layers,this.sourceLayerCoder=new n0(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},nm.prototype.query=function(a,s,l,g){var P=this;this.loadVTLayers();for(var j=a.params||{},ne=8192/a.tileSize/a.scale,ge=ll(j.filter),ze=a.queryGeometry,ht=a.queryPadding*ne,zt=lp(ze),qt=this.grid.query(zt.minX-ht,zt.minY-ht,zt.maxX+ht,zt.maxY+ht),_r=lp(a.cameraQueryGeometry),Rr=this.grid3D.query(_r.minX-ht,_r.minY-ht,_r.maxX+ht,_r.maxY+ht,function(ni,Mi,wa,za){return function(oo,Ds,lo,cs,as){for(var $s=0,ps=oo;$s=fs.x&&as>=fs.y)return!0}var Ks=[new oe(Ds,lo),new oe(Ds,as),new oe(cs,as),new oe(cs,lo)];if(oo.length>2){for(var Ou=0,wl=Ks;Ou=0)return!0;return!1}(j,qt)){var _r=this.sourceLayerCoder.decode(l),Rr=this.vtLayers[_r].feature(g);if(P.needGeometry){var Kr=jf(Rr,!0);if(!P.filter(new Vn(this.tileID.overscaledZ),Kr,this.tileID.canonical))return}else if(!P.filter(new Vn(this.tileID.overscaledZ),Rr))return;for(var qr=this.getId(Rr,_r),an=0;ang)P=!1;else if(s)if(this.expirationTimeJn&&(a.getActor().send("enforceCacheSizeLimit",Kn),Ir=0)},y.clamp=Ee,y.clearTileCache=function(a){var s=le.caches.delete("mapbox-tiles");a&&s.catch(a).then(function(){return a()})},y.clipLine=qp,y.clone=function(a){var s=new vc(16);return s[0]=a[0],s[1]=a[1],s[2]=a[2],s[3]=a[3],s[4]=a[4],s[5]=a[5],s[6]=a[6],s[7]=a[7],s[8]=a[8],s[9]=a[9],s[10]=a[10],s[11]=a[11],s[12]=a[12],s[13]=a[13],s[14]=a[14],s[15]=a[15],s},y.clone$1=Ze,y.clone$2=function(a){var s=new vc(3);return s[0]=a[0],s[1]=a[1],s[2]=a[2],s},y.collisionCircleLayout=Cr,y.config=gn,y.create=function(){var a=new vc(16);return vc!=Float32Array&&(a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[11]=0,a[12]=0,a[13]=0,a[14]=0),a[0]=1,a[5]=1,a[10]=1,a[15]=1,a},y.create$1=function(){var a=new vc(9);return vc!=Float32Array&&(a[1]=0,a[2]=0,a[3]=0,a[5]=0,a[6]=0,a[7]=0),a[0]=1,a[4]=1,a[8]=1,a},y.create$2=function(){var a=new vc(4);return vc!=Float32Array&&(a[1]=0,a[2]=0),a[0]=1,a[3]=1,a},y.createCommonjsModule=d,y.createExpression=zc,y.createLayout=Ps,y.createStyleLayer=function(a){return a.type==="custom"?new io(a):new ao[a.type](a)},y.cross=function(a,s,l){var g=s[0],P=s[1],j=s[2],ne=l[0],ge=l[1],ze=l[2];return a[0]=P*ze-j*ge,a[1]=j*ne-g*ze,a[2]=g*ge-P*ne,a},y.deepEqual=function a(s,l){if(Array.isArray(s)){if(!Array.isArray(l)||s.length!==l.length)return!1;for(var g=0;g0&&(j=1/Math.sqrt(j)),a[0]=s[0]*j,a[1]=s[1]*j,a[2]=s[2]*j,a},y.number=vi,y.offscreenCanvasSupported=bt,y.ortho=function(a,s,l,g,P,j,ne){var ge=1/(s-l),ze=1/(g-P),ht=1/(j-ne);return a[0]=-2*ge,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*ze,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*ht,a[11]=0,a[12]=(s+l)*ge,a[13]=(P+g)*ze,a[14]=(ne+j)*ht,a[15]=1,a},y.parseGlyphPBF=function(a){return new to(a).readFields(Ho,[])},y.pbf=to,y.performSymbolLayout=function(a,s,l,g,P,j,ne){a.createArrays(),a.tilePixelRatio=8192/(512*a.overscaling),a.compareText={},a.iconsNeedLinear=!1;var ge=a.layers[0].layout,ze=a.layers[0]._unevaluatedLayout._values,ht={};if(a.textSizeData.kind==="composite"){var zt=a.textSizeData,qt=zt.maxZoom;ht.compositeTextSizes=[ze["text-size"].possiblyEvaluate(new Vn(zt.minZoom),ne),ze["text-size"].possiblyEvaluate(new Vn(qt),ne)]}if(a.iconSizeData.kind==="composite"){var _r=a.iconSizeData,Rr=_r.maxZoom;ht.compositeIconSizes=[ze["icon-size"].possiblyEvaluate(new Vn(_r.minZoom),ne),ze["icon-size"].possiblyEvaluate(new Vn(Rr),ne)]}ht.layoutTextSize=ze["text-size"].possiblyEvaluate(new Vn(a.zoom+1),ne),ht.layoutIconSize=ze["icon-size"].possiblyEvaluate(new Vn(a.zoom+1),ne),ht.textMaxSize=ze["text-size"].possiblyEvaluate(new Vn(18));for(var Kr=24*ge.get("text-line-height"),qr=ge.get("text-rotation-alignment")==="map"&&ge.get("symbol-placement")!=="point",an=ge.get("text-keep-upright"),en=ge.get("text-size"),Hr=function(){var Mi=ni[Fn],wa=ge.get("text-font").evaluate(Mi,{},ne).join(","),za=en.evaluate(Mi,{},ne),oo=ht.layoutTextSize.evaluate(Mi,{},ne),Ds=ht.layoutIconSize.evaluate(Mi,{},ne),lo={horizontal:{},vertical:void 0},cs=Mi.text,as=[0,0];if(cs){var $s=cs.toString(),ps=24*ge.get("text-letter-spacing").evaluate(Mi,{},ne),fs=function(pc){for(var sf=0,Kl=pc;sf=8192||l0.y<0||l0.y>=8192||function(Nh,ml,vu,Q,ae,ue,$e,Xt,Sr,Dr,fn,Bn,Un,ta,Fo,qs,ol,Dl,hu,du,nl,Zl,sc,Sf,Wf){var gf,Wc,nh,ch,rf,wf=Nh.addToLineVertexArray(ml,vu),$h=0,fh=0,Oh=0,ed=0,la=-1,si=-1,Fi={},So=Xr(""),os=0,jo=0;if(Xt._unevaluatedLayout.getValue("text-radial-offset")===void 0?(os=(gf=Xt.layout.get("text-offset").evaluate(nl,{},Sf).map(function(Zv){return 24*Zv}))[0],jo=gf[1]):(os=24*Xt.layout.get("text-radial-offset").evaluate(nl,{},Sf),jo=Ni),Nh.allowVerticalPlacement&&Q.vertical){var uc=Xt.layout.get("text-rotate").evaluate(nl,{},Sf)+90;ch=new bo(Sr,ml,Dr,fn,Bn,Q.vertical,Un,ta,Fo,uc),$e&&(rf=new bo(Sr,ml,Dr,fn,Bn,$e,ol,Dl,Fo,uc))}if(ae){var Xc=Xt.layout.get("icon-rotate").evaluate(nl,{}),zf=Xt.layout.get("icon-text-fit")!=="none",ep=fi(ae,Xc,sc,zf),dd=$e?fi($e,Xc,sc,zf):void 0;nh=new bo(Sr,ml,Dr,fn,Bn,ae,ol,Dl,!1,Xc),$h=4*ep.length;var ip=Nh.iconSizeData,wm=null;ip.kind==="source"?(wm=[128*Xt.layout.get("icon-size").evaluate(nl,{})])[0]>32640&&st(Nh.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):ip.kind==="composite"&&((wm=[128*Zl.compositeIconSizes[0].evaluate(nl,{},Sf),128*Zl.compositeIconSizes[1].evaluate(nl,{},Sf)])[0]>32640||wm[1]>32640)&&st(Nh.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),Nh.addSymbols(Nh.icon,ep,wm,du,hu,nl,!1,ml,wf.lineStartIndex,wf.lineLength,-1,Sf),la=Nh.icon.placedSymbolArray.length-1,dd&&(fh=4*dd.length,Nh.addSymbols(Nh.icon,dd,wm,du,hu,nl,hc.vertical,ml,wf.lineStartIndex,wf.lineLength,-1,Sf),si=Nh.icon.placedSymbolArray.length-1)}for(var Iy in Q.horizontal){var Yv=Q.horizontal[Iy];if(!Wc){So=Xr(Yv.text);var rv=Xt.layout.get("text-rotate").evaluate(nl,{},Sf);Wc=new bo(Sr,ml,Dr,fn,Bn,Yv,Un,ta,Fo,rv)}var Iv=Yv.positionedLines.length===1;if(Oh+=Qn(Nh,ml,Yv,ue,Xt,Fo,nl,qs,wf,Q.vertical?hc.horizontal:hc.horizontalOnly,Iv?Object.keys(Q.horizontal):[Iy],Fi,la,Zl,Sf),Iv)break}Q.vertical&&(ed+=Qn(Nh,ml,Q.vertical,ue,Xt,Fo,nl,qs,wf,hc.vertical,["vertical"],Fi,si,Zl,Sf));var Xg=Wc?Wc.boxStartIndex:Nh.collisionBoxArray.length,Ry=Wc?Wc.boxEndIndex:Nh.collisionBoxArray.length,mg=ch?ch.boxStartIndex:Nh.collisionBoxArray.length,Yg=ch?ch.boxEndIndex:Nh.collisionBoxArray.length,Oy=nh?nh.boxStartIndex:Nh.collisionBoxArray.length,zv=nh?nh.boxEndIndex:Nh.collisionBoxArray.length,Kg=rf?rf.boxStartIndex:Nh.collisionBoxArray.length,vg=rf?rf.boxEndIndex:Nh.collisionBoxArray.length,qm=-1,lv=function(Zv,gg){return Zv&&Zv.circleDiameter?Math.max(Zv.circleDiameter,gg):gg};qm=lv(Wc,qm),qm=lv(ch,qm),qm=lv(nh,qm);var d1=(qm=lv(rf,qm))>-1?1:0;d1&&(qm*=Wf/24),Nh.glyphOffsetArray.length>=sr.MAX_GLYPHS&&st("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),nl.sortKey!==void 0&&Nh.addToSortKeyRanges(Nh.symbolInstances.length,nl.sortKey),Nh.symbolInstances.emplaceBack(ml.x,ml.y,Fi.right>=0?Fi.right:-1,Fi.center>=0?Fi.center:-1,Fi.left>=0?Fi.left:-1,Fi.vertical||-1,la,si,So,Xg,Ry,mg,Yg,Oy,zv,Kg,vg,Dr,Oh,ed,$h,fh,d1,0,Un,os,jo,qm)}(pc,l0,Ip,Kl,Hc,Vh,p,pc.layers[0],pc.collisionBoxArray,sf.index,sf.sourceLayerIndex,pc.index,De,Pr,z,Nc,Ot,kr,te,W,sf,Ad,mc,sh,Oo)};if(Re==="line")for(var Ur=0,cn=qp(sf.geometry,0,0,8192,8192);Ur1){var ms=pf(hs,U,Kl.vertical||pe,Hc,24,dt);ms&&Lr(hs,ms)}}else if(sf.type==="Polygon")for(var Xo=0,ys=o0(sf.geometry,0);Xo=Os.maxzoom||Os.visibility!=="none"&&(le(Za,this.zoom,_t),(nn[Os.id]=Os.createBucket({index:Qe.bucketLayerIDs.length,layers:Za,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ai,sourceID:this.source})).populate(Ii,ln,this.tileID.canonical),Qe.bucketLayerIDs.push(Za.map(function(ss){return ss.id})))}}}var ro=y.mapObject(ln.glyphDependencies,function(ss){return Object.keys(ss).map(Number)});Object.keys(ro).length?Zt.send("getGlyphs",{uid:this.uid,stacks:ro},function(ss,ca){er||(er=ss,jr=ca,qa.call(fr))}):jr={};var Tu=Object.keys(ln.iconDependencies);Tu.length?Zt.send("getImages",{icons:Tu,source:this.source,tileID:this.tileID,type:"icons"},function(ss,ca){er||(er=ss,on=ca,qa.call(fr))}):on={};var Do=Object.keys(ln.patternDependencies);function qa(){if(er)return rr(er);if(jr&&on&&ri){var ss=new oe(jr),ca=new y.ImageAtlas(on,ri);for(var Mn in nn){var wi=nn[Mn];wi instanceof y.SymbolBucket?(le(wi.layers,this.zoom,_t),y.performSymbolLayout(wi,jr,ss.positions,on,ca.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):wi.hasPattern&&(wi instanceof y.LineBucket||wi instanceof y.FillBucket||wi instanceof y.FillExtrusionBucket)&&(le(wi.layers,this.zoom,_t),wi.addFeatures(ln,this.tileID.canonical,ca.patternPositions))}this.status="done",rr(null,{buckets:y.values(nn).filter(function(Fu){return!Fu.isEmpty()}),featureIndex:Qe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ss.image,imageAtlas:ca,glyphMap:this.returnDependencies?jr:null,iconMap:this.returnDependencies?on:null,glyphPositions:this.returnDependencies?ss.positions:null})}}Do.length?Zt.send("getImages",{icons:Do,source:this.source,tileID:this.tileID,type:"patterns"},function(ss,ca){er||(er=ss,ri=ca,qa.call(fr))}):ri={},qa.call(this)};var Ie=function(He,We,_t,Zt){this.actor=He,this.layerIndex=We,this.availableImages=_t,this.loadVectorData=Zt||ce,this.loading={},this.loaded={}};Ie.prototype.loadTile=function(He,We){var _t=this,Zt=He.uid;this.loading||(this.loading={});var rr=!!(He&&He.request&&He.request.collectResourceTiming)&&new y.RequestPerformance(He.request),fr=this.loading[Zt]=new re(He);fr.abort=this.loadVectorData(He,function(mr,Qe){if(delete _t.loading[Zt],mr||!Qe)return fr.status="done",_t.loaded[Zt]=fr,We(mr);var er=Qe.rawData,jr={};Qe.expires&&(jr.expires=Qe.expires),Qe.cacheControl&&(jr.cacheControl=Qe.cacheControl);var on={};if(rr){var ri=rr.finish();ri&&(on.resourceTiming=JSON.parse(JSON.stringify(ri)))}fr.vectorTile=Qe.vectorTile,fr.parse(Qe.vectorTile,_t.layerIndex,_t.availableImages,_t.actor,function(nn,ln){if(nn||!ln)return We(nn);We(null,y.extend({rawTileData:er.slice(0)},ln,jr,on))}),_t.loaded=_t.loaded||{},_t.loaded[Zt]=fr})},Ie.prototype.reloadTile=function(He,We){var _t=this,Zt=this.loaded,rr=He.uid,fr=this;if(Zt&&Zt[rr]){var mr=Zt[rr];mr.showCollisionBoxes=He.showCollisionBoxes;var Qe=function(er,jr){var on=mr.reloadCallback;on&&(delete mr.reloadCallback,mr.parse(mr.vectorTile,fr.layerIndex,_t.availableImages,fr.actor,on)),We(er,jr)};mr.status==="parsing"?mr.reloadCallback=Qe:mr.status==="done"&&(mr.vectorTile?mr.parse(mr.vectorTile,this.layerIndex,this.availableImages,this.actor,Qe):Qe())}},Ie.prototype.abortTile=function(He,We){var _t=this.loading,Zt=He.uid;_t&&_t[Zt]&&_t[Zt].abort&&(_t[Zt].abort(),delete _t[Zt]),We()},Ie.prototype.removeTile=function(He,We){var _t=this.loaded,Zt=He.uid;_t&&_t[Zt]&&delete _t[Zt],We()};var we=y.window.ImageBitmap,Ee=function(){this.loaded={}};function qe(He,We){if(He.length!==0){Xe(He[0],We);for(var _t=1;_t=Math.abs(Qe)?_t-er+Qe:Qe-er+_t,_t=er}_t+Zt>=0!=!!We&&He.reverse()}Ee.prototype.loadTile=function(He,We){var _t=He.uid,Zt=He.encoding,rr=He.rawImageData,fr=we&&rr instanceof we?this.getImageData(rr):rr,mr=new y.DEMData(_t,fr,Zt);this.loaded=this.loaded||{},this.loaded[_t]=mr,We(null,mr)},Ee.prototype.getImageData=function(He){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(He.width,He.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=He.width,this.offscreenCanvas.height=He.height,this.offscreenCanvasContext.drawImage(He,0,0,He.width,He.height);var We=this.offscreenCanvasContext.getImageData(-1,-1,He.width+2,He.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new y.RGBAImage({width:We.width,height:We.height},We.data)},Ee.prototype.removeTile=function(He){var We=this.loaded,_t=He.uid;We&&We[_t]&&delete We[_t]};var ft=y.vectorTile.VectorTileFeature.prototype.toGeoJSON,Ge=function(He){this._feature=He,this.extent=y.EXTENT,this.type=He.type,this.properties=He.tags,"id"in He&&!isNaN(He.id)&&(this.id=parseInt(He.id,10))};Ge.prototype.loadGeometry=function(){if(this._feature.type===1){for(var He=[],We=0,_t=this._feature.geometry;We<_t.length;We+=1){var Zt=_t[We];He.push([new y.Point$1(Zt[0],Zt[1])])}return He}for(var rr=[],fr=0,mr=this._feature.geometry;fr>31}function Me(He,We){for(var _t=He.loadGeometry(),Zt=He.type,rr=0,fr=0,mr=_t.length,Qe=0;Qe>1;(function ai(Ii,ki,Fa,sa,vo,Ro){for(;vo>sa;){if(vo-sa>600){var Za=vo-sa+1,Os=Fa-sa+1,ro=Math.log(Za),Tu=.5*Math.exp(2*ro/3),Do=.5*Math.sqrt(ro*Tu*(Za-Tu)/Za)*(Os-Za/2<0?-1:1);ai(Ii,ki,Fa,Math.max(sa,Math.floor(Fa-Os*Tu/Za+Do)),Math.min(vo,Math.floor(Fa+(Za-Os)*Tu/Za+Do)),Ro)}var qa=ki[2*Fa+Ro],ss=sa,ca=vo;for(Rt(Ii,ki,sa,Fa),ki[2*vo+Ro]>qa&&Rt(Ii,ki,sa,vo);ssqa;)ca--}ki[2*sa+Ro]===qa?Rt(Ii,ki,sa,ca):Rt(Ii,ki,++ca,vo),ca<=Fa&&(sa=ca+1),Fa<=ca&&(vo=ca-1)}})(on,ri,Tn,ln,Yn,Wn%2),jr(on,ri,nn,ln,Tn-1,Wn+1),jr(on,ri,nn,Tn+1,Yn,Wn+1)}})(mr,Qe,Zt,0,mr.length-1,0)};et.prototype.range=function(He,We,_t,Zt){return function(rr,fr,mr,Qe,er,jr,on){for(var ri,nn,ln=[0,rr.length-1,0],Yn=[];ln.length;){var Wn=ln.pop(),Tn=ln.pop(),ai=ln.pop();if(Tn-ai<=on)for(var Ii=ai;Ii<=Tn;Ii++)nn=fr[2*Ii+1],(ri=fr[2*Ii])>=mr&&ri<=er&&nn>=Qe&&nn<=jr&&Yn.push(rr[Ii]);else{var ki=Math.floor((ai+Tn)/2);nn=fr[2*ki+1],(ri=fr[2*ki])>=mr&&ri<=er&&nn>=Qe&&nn<=jr&&Yn.push(rr[ki]);var Fa=(Wn+1)%2;(Wn===0?mr<=ri:Qe<=nn)&&(ln.push(ai),ln.push(ki-1),ln.push(Fa)),(Wn===0?er>=ri:jr>=nn)&&(ln.push(ki+1),ln.push(Tn),ln.push(Fa))}}return Yn}(this.ids,this.coords,He,We,_t,Zt,this.nodeSize)},et.prototype.within=function(He,We,_t){return function(Zt,rr,fr,mr,Qe,er){for(var jr=[0,Zt.length-1,0],on=[],ri=Qe*Qe;jr.length;){var nn=jr.pop(),ln=jr.pop(),Yn=jr.pop();if(ln-Yn<=er)for(var Wn=Yn;Wn<=ln;Wn++)Je(rr[2*Wn],rr[2*Wn+1],fr,mr)<=ri&&on.push(Zt[Wn]);else{var Tn=Math.floor((Yn+ln)/2),ai=rr[2*Tn],Ii=rr[2*Tn+1];Je(ai,Ii,fr,mr)<=ri&&on.push(Zt[Tn]);var ki=(nn+1)%2;(nn===0?fr-Qe<=ai:mr-Qe<=Ii)&&(jr.push(Yn),jr.push(Tn-1),jr.push(ki)),(nn===0?fr+Qe>=ai:mr+Qe>=Ii)&&(jr.push(Tn+1),jr.push(ln),jr.push(ki))}}return on}(this.ids,this.coords,He,We,_t,this.nodeSize)};var br={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(He){return He}},Jt=function(He){this.options=Ia(Object.create(br),He),this.trees=new Array(this.options.maxZoom+1)};function Vr(He,We,_t,Zt,rr){return{x:He,y:We,zoom:1/0,id:_t,parentId:-1,numPoints:Zt,properties:rr}}function gn(He,We){var _t=He.geometry.coordinates,Zt=_t[1];return{x:Hn(_t[0]),y:Ln(Zt),zoom:1/0,index:We,parentId:-1}}function yn(He){return{type:"Feature",id:He.id,properties:_i(He),geometry:{type:"Point",coordinates:[(Zt=He.x,360*(Zt-.5)),(We=He.y,_t=(180-360*We)*Math.PI/180,360*Math.atan(Math.exp(_t))/Math.PI-90)]}};var We,_t,Zt}function _i(He){var We=He.numPoints,_t=We>=1e4?Math.round(We/1e3)+"k":We>=1e3?Math.round(We/100)/10+"k":We;return Ia(Ia({},He.properties),{cluster:!0,cluster_id:He.id,point_count:We,point_count_abbreviated:_t})}function Hn(He){return He/360+.5}function Ln(He){var We=Math.sin(He*Math.PI/180),_t=.5-.25*Math.log((1+We)/(1-We))/Math.PI;return _t<0?0:_t>1?1:_t}function Ia(He,We){for(var _t in We)He[_t]=We[_t];return He}function Zi(He){return He.x}function Ua(He){return He.y}function fa(He,We,_t,Zt,rr,fr){var mr=rr-_t,Qe=fr-Zt;if(mr!==0||Qe!==0){var er=((He-_t)*mr+(We-Zt)*Qe)/(mr*mr+Qe*Qe);er>1?(_t=rr,Zt=fr):er>0&&(_t+=mr*er,Zt+=Qe*er)}return(mr=He-_t)*mr+(Qe=We-Zt)*Qe}function ka(He,We,_t,Zt){var rr={id:He===void 0?null:He,type:We,geometry:_t,tags:Zt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(fr){var mr=fr.geometry,Qe=fr.type;if(Qe==="Point"||Qe==="MultiPoint"||Qe==="LineString")mo(fr,mr);else if(Qe==="Polygon"||Qe==="MultiLineString")for(var er=0;er0&&(mr+=Zt?(rr*jr-er*fr)/2:Math.sqrt(Math.pow(er-rr,2)+Math.pow(jr-fr,2))),rr=er,fr=jr}var on=We.length-3;We[2]=1,function ri(nn,ln,Yn,Wn){for(var Tn,ai=Wn,Ii=Yn-ln>>1,ki=Yn-ln,Fa=nn[ln],sa=nn[ln+1],vo=nn[Yn],Ro=nn[Yn+1],Za=ln+3;Zaai)Tn=Za,ai=Os;else if(Os===ai){var ro=Math.abs(Za-Ii);roWn&&(Tn-ln>3&&ri(nn,ln,Tn,Wn),nn[Tn+2]=ai,Yn-Tn>3&&ri(nn,Tn,Yn,Wn))}(We,0,on,_t),We[on+2]=1,We.size=Math.abs(mr),We.start=0,We.end=We.size}function gr(He,We,_t,Zt){for(var rr=0;rr1?1:_t}function Qa(He,We,_t,Zt,rr,fr,mr,Qe){if(Zt/=We,fr>=(_t/=We)&&mr=Zt)return null;for(var er=[],jr=0;jr=_t&&Yn=Zt)){var Wn=[];if(nn==="Point"||nn==="MultiPoint")oa(ri,Wn,_t,Zt,rr);else if(nn==="LineString")ji(ri,Wn,_t,Zt,rr,!1,Qe.lineMetrics);else if(nn==="MultiLineString")ei(ri,Wn,_t,Zt,rr,!1);else if(nn==="Polygon")ei(ri,Wn,_t,Zt,rr,!0);else if(nn==="MultiPolygon")for(var Tn=0;Tn=_t&&mr<=Zt&&(We.push(He[fr]),We.push(He[fr+1]),We.push(He[fr+2]))}}function ji(He,We,_t,Zt,rr,fr,mr){for(var Qe,er,jr=so(He),on=rr===0?Jn:da,ri=He.start,nn=0;nn_t&&(er=on(jr,ln,Yn,Tn,ai,_t),mr&&(jr.start=ri+Qe*er)):Ii>Zt?ki=_t&&(er=on(jr,ln,Yn,Tn,ai,_t),Fa=!0),ki>Zt&&Ii<=Zt&&(er=on(jr,ln,Yn,Tn,ai,Zt),Fa=!0),!fr&&Fa&&(mr&&(jr.end=ri+Qe*er),We.push(jr),jr=so(He)),mr&&(ri+=Qe)}var sa=He.length-3;ln=He[sa],Yn=He[sa+1],Wn=He[sa+2],(Ii=rr===0?ln:Yn)>=_t&&Ii<=Zt&&Kn(jr,ln,Yn,Wn),sa=jr.length-3,fr&&sa>=3&&(jr[sa]!==jr[0]||jr[sa+1]!==jr[1])&&Kn(jr,jr[0],jr[1],jr[2]),jr.length&&We.push(jr)}function so(He){var We=[];return We.size=He.size,We.start=He.start,We.end=He.end,We}function ei(He,We,_t,Zt,rr,fr){for(var mr=0;mrmr.maxX&&(mr.maxX=on),ri>mr.maxY&&(mr.maxY=ri)}return mr}function Pt(He,We,_t,Zt){var rr=We.geometry,fr=We.type,mr=[];if(fr==="Point"||fr==="MultiPoint")for(var Qe=0;Qe0&&We.size<(rr?mr:Zt))_t.numPoints+=We.length/3;else{for(var Qe=[],er=0;ermr)&&(_t.numSimplified++,Qe.push(We[er]),Qe.push(We[er+1])),_t.numPoints++;rr&&function(jr,on){for(var ri=0,nn=0,ln=jr.length,Yn=ln-2;nn0===on)for(nn=0,ln=jr.length;nn24)throw new Error("maxZoom should be in the 0-24 range");if(We.promoteId&&We.generateId)throw new Error("promoteId and generateId cannot be used together.");var Zt=function(rr,fr){var mr=[];if(rr.type==="FeatureCollection")for(var Qe=0;Qe=Zt;jr--){var on=+Date.now();Qe=this._cluster(Qe,jr),this.trees[jr]=new et(Qe,Zi,Ua,fr,Float32Array),_t&&console.log("z%d: %d clusters in %dms",jr,Qe.length,+Date.now()-on)}return _t&&console.timeEnd("total time"),this},Jt.prototype.getClusters=function(He,We){var _t=((He[0]+180)%360+360)%360-180,Zt=Math.max(-90,Math.min(90,He[1])),rr=He[2]===180?180:((He[2]+180)%360+360)%360-180,fr=Math.max(-90,Math.min(90,He[3]));if(He[2]-He[0]>=360)_t=-180,rr=180;else if(_t>rr){var mr=this.getClusters([_t,Zt,180,fr],We),Qe=this.getClusters([-180,Zt,rr,fr],We);return mr.concat(Qe)}for(var er=this.trees[this._limitZoom(We)],jr=[],on=0,ri=er.range(Hn(_t),Ln(fr),Hn(rr),Ln(Zt));onWe&&(nn+=Wn.numPoints||1)}if(nn>=fr){for(var Tn=er.x*ri,ai=er.y*ri,Ii=rr&&ri>1?this._map(er,!0):null,ki=(Qe<<5)+(We+1)+this.points.length,Fa=0,sa=on;Fa1)for(var Za=0,Os=on;Za>5},Jt.prototype._getOriginZoom=function(He){return(He-this.points.length)%32},Jt.prototype._map=function(He,We){if(He.numPoints)return We?Ia({},He.properties):He.properties;var _t=this.points[He.index].properties,Zt=this.options.map(_t);return We&&Zt===_t?Ia({},Zt):Zt},Tr.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Tr.prototype.splitTile=function(He,We,_t,Zt,rr,fr,mr){for(var Qe=[He,We,_t,Zt],er=this.options,jr=er.debug;Qe.length;){Zt=Qe.pop(),_t=Qe.pop(),We=Qe.pop(),He=Qe.pop();var on=1<1&&console.time("creation"),nn=this.tiles[ri]=Yt(He,We,_t,Zt,er),this.tileCoords.push({z:We,x:_t,y:Zt}),jr)){jr>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",We,_t,Zt,nn.numFeatures,nn.numPoints,nn.numSimplified),console.timeEnd("creation"));var ln="z"+We;this.stats[ln]=(this.stats[ln]||0)+1,this.total++}if(nn.source=He,rr){if(We===er.maxZoom||We===rr)continue;var Yn=1<1&&console.time("clipping");var Wn,Tn,ai,Ii,ki,Fa,sa=.5*er.buffer/er.extent,vo=.5-sa,Ro=.5+sa,Za=1+sa;Wn=Tn=ai=Ii=null,ki=Qa(He,on,_t-sa,_t+Ro,0,nn.minX,nn.maxX,er),Fa=Qa(He,on,_t+vo,_t+Za,0,nn.minX,nn.maxX,er),He=null,ki&&(Wn=Qa(ki,on,Zt-sa,Zt+Ro,1,nn.minY,nn.maxY,er),Tn=Qa(ki,on,Zt+vo,Zt+Za,1,nn.minY,nn.maxY,er),ki=null),Fa&&(ai=Qa(Fa,on,Zt-sa,Zt+Ro,1,nn.minY,nn.maxY,er),Ii=Qa(Fa,on,Zt+vo,Zt+Za,1,nn.minY,nn.maxY,er),Fa=null),jr>1&&console.timeEnd("clipping"),Qe.push(Wn||[],We+1,2*_t,2*Zt),Qe.push(Tn||[],We+1,2*_t,2*Zt+1),Qe.push(ai||[],We+1,2*_t+1,2*Zt),Qe.push(Ii||[],We+1,2*_t+1,2*Zt+1)}}},Tr.prototype.getTile=function(He,We,_t){var Zt=this.options,rr=Zt.extent,fr=Zt.debug;if(He<0||He>24)return null;var mr=1<1&&console.log("drilling down to z%d-%d-%d",He,We,_t);for(var er,jr=He,on=We,ri=_t;!er&&jr>0;)jr--,on=Math.floor(on/2),ri=Math.floor(ri/2),er=this.tiles[hn(jr,on,ri)];return er&&er.source?(fr>1&&console.log("found parent tile z%d-%d-%d",jr,on,ri),fr>1&&console.time("drilling down"),this.splitTile(er.source,jr,on,ri,He,We,_t),fr>1&&console.timeEnd("drilling down"),this.tiles[Qe]?Ir(this.tiles[Qe],rr):null):null};var tr=function(He){function We(_t,Zt,rr,fr){He.call(this,_t,Zt,rr,Cn),fr&&(this.loadGeoJSON=fr)}return He&&(We.__proto__=He),(We.prototype=Object.create(He&&He.prototype)).constructor=We,We.prototype.loadData=function(_t,Zt){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Zt,this._pendingLoadDataParams=_t,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},We.prototype._loadData=function(){var _t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var Zt=this._pendingCallback,rr=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var fr=!!(rr&&rr.request&&rr.request.collectResourceTiming)&&new y.RequestPerformance(rr.request);this.loadGeoJSON(rr,function(mr,Qe){if(mr||!Qe)return Zt(mr);if(typeof Qe!="object")return Zt(new Error("Input data given to '"+rr.source+"' is not a valid GeoJSON object."));(function nn(ln,Yn){var Wn,Tn=ln&&ln.type;if(Tn==="FeatureCollection")for(Wn=0;Wn=0?0:b.button},$.remove=function(b){b.parentNode&&b.parentNode.removeChild(b)};var Xe=function(b){function x(){b.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new y.RGBAImage({width:1,height:1}),this.dirty=!0}return b&&(x.__proto__=b),(x.prototype=Object.create(b&&b.prototype)).constructor=x,x.prototype.isLoaded=function(){return this.loaded},x.prototype.setLoaded=function(S){if(this.loaded!==S&&(this.loaded=S,S)){for(var Z=0,he=this.requestors;Z=0?1.2:1))}function It(b,x,S,Z,he,Se,Pe){for(var ct=0;ct65535)Ut(new Error("glyphs > 65535 not supported"));else if(cr.ranges[Fr])Ut(null,{stack:wt,id:Kt,glyph:hr});else{var Br=cr.requests[Fr];Br||(Br=cr.requests[Fr]=[],Ue.loadGlyphRange(wt,Fr,S.url,S.requestManager,function(rn,Xr){if(Xr){for(var dn in Xr)S._doesCharSupportLocalGlyph(+dn)||(cr.glyphs[+dn]=Xr[+dn]);cr.ranges[Fr]=!0}for(var Qt=0,li=Br;Qt1&&(ct=b[++Pe]);var wt=Math.abs(Ut-ct.left),Kt=Math.abs(Ut-ct.right),cr=Math.min(wt,Kt),hr=void 0,Fr=he/S*(Z+1);if(ct.isDash){var Br=Z-Math.abs(Fr);hr=Math.sqrt(cr*cr+Br*Br)}else hr=Z-Math.sqrt(cr*cr+Fr*Fr);this.data[Se+Ut]=Math.max(0,Math.min(255,hr+128))}},st.prototype.addRegularDash=function(b){for(var x=b.length-1;x>=0;--x){var S=b[x],Z=b[x+1];S.zeroLength?b.splice(x,1):Z&&Z.isDash===S.isDash&&(Z.left=S.left,b.splice(x,1))}var he=b[0],Se=b[b.length-1];he.isDash===Se.isDash&&(he.left=Se.left-this.width,Se.right=he.right+this.width);for(var Pe=this.width*this.nextRow,ct=0,Ut=b[ct],wt=0;wt1&&(Ut=b[++ct]);var Kt=Math.abs(wt-Ut.left),cr=Math.abs(wt-Ut.right),hr=Math.min(Kt,cr);this.data[Pe+wt]=Math.max(0,Math.min(255,(Ut.isDash?hr:-hr)+128))}},st.prototype.addDash=function(b,x){var S=x?7:0,Z=2*S+1;if(this.nextRow+Z>this.height)return y.warnOnce("LineAtlas out of space"),null;for(var he=0,Se=0;Se=S&&b.x=Z&&b.y0&&(wt[new y.OverscaledTileID(S.overscaledZ,Pe,Z.z,Se,Z.y-1).key]={backfilled:!1},wt[new y.OverscaledTileID(S.overscaledZ,S.wrap,Z.z,Z.x,Z.y-1).key]={backfilled:!1},wt[new y.OverscaledTileID(S.overscaledZ,Ut,Z.z,ct,Z.y-1).key]={backfilled:!1}),Z.y+10&&(he.resourceTiming=S._resourceTiming,S._resourceTiming=[]),S.fire(new y.Event("data",he))}})},x.prototype.onAdd=function(S){this.map=S,this.load()},x.prototype.setData=function(S){var Z=this;return this._data=S,this.fire(new y.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(he){if(he)Z.fire(new y.ErrorEvent(he));else{var Se={dataType:"source",sourceDataType:"content"};Z._collectResourceTiming&&Z._resourceTiming&&Z._resourceTiming.length>0&&(Se.resourceTiming=Z._resourceTiming,Z._resourceTiming=[]),Z.fire(new y.Event("data",Se))}}),this},x.prototype.getClusterExpansionZoom=function(S,Z){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:S,source:this.id},Z),this},x.prototype.getClusterChildren=function(S,Z){return this.actor.send("geojson.getClusterChildren",{clusterId:S,source:this.id},Z),this},x.prototype.getClusterLeaves=function(S,Z,he,Se){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:S,limit:Z,offset:he},Se),this},x.prototype._updateWorkerData=function(S){var Z=this;this._loaded=!1;var he=y.extend({},this.workerOptions),Se=this._data;typeof Se=="string"?(he.request=this.map._requestManager.transformRequest(y.browser.resolveURL(Se),y.ResourceType.Source),he.request.collectResourceTiming=this._collectResourceTiming):he.data=JSON.stringify(Se),this.actor.send(this.type+".loadData",he,function(Pe,ct){Z._removed||ct&&ct.abandoned||(Z._loaded=!0,ct&&ct.resourceTiming&&ct.resourceTiming[Z.id]&&(Z._resourceTiming=ct.resourceTiming[Z.id].slice(0)),Z.actor.send(Z.type+".coalesce",{source:he.source},null),S(Pe))})},x.prototype.loaded=function(){return this._loaded},x.prototype.loadTile=function(S,Z){var he=this,Se=S.actor?"reloadTile":"loadTile";S.actor=this.actor,S.request=this.actor.send(Se,{type:this.type,uid:S.uid,tileID:S.tileID,zoom:S.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:y.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(Pe,ct){return delete S.request,S.unloadVectorData(),S.aborted?Z(null):Pe?Z(Pe):(S.loadVectorData(ct,he.map.painter,Se==="reloadTile"),Z(null))})},x.prototype.abortTile=function(S){S.request&&(S.request.cancel(),delete S.request),S.aborted=!0},x.prototype.unloadTile=function(S){S.unloadVectorData(),this.actor.send("removeTile",{uid:S.uid,type:this.type,source:this.id})},x.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},x.prototype.serialize=function(){return y.extend({},this._options,{type:this.type,data:this._data})},x.prototype.hasTransition=function(){return!1},x}(y.Evented),vt=y.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Je=function(b){function x(S,Z,he,Se){b.call(this),this.id=S,this.dispatcher=he,this.coordinates=Z.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Se),this.options=Z}return b&&(x.__proto__=b),(x.prototype=Object.create(b&&b.prototype)).constructor=x,x.prototype.load=function(S,Z){var he=this;this._loaded=!1,this.fire(new y.Event("dataloading",{dataType:"source"})),this.url=this.options.url,y.getImage(this.map._requestManager.transformRequest(this.url,y.ResourceType.Image),function(Se,Pe){he._loaded=!0,Se?he.fire(new y.ErrorEvent(Se)):Pe&&(he.image=Pe,S&&(he.coordinates=S),Z&&Z(),he._finishLoading())})},x.prototype.loaded=function(){return this._loaded},x.prototype.updateImage=function(S){var Z=this;return this.image&&S.url?(this.options.url=S.url,this.load(S.coordinates,function(){Z.texture=null}),this):this},x.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new y.Event("data",{dataType:"source",sourceDataType:"metadata"})))},x.prototype.onAdd=function(S){this.map=S,this.load()},x.prototype.setCoordinates=function(S){var Z=this;this.coordinates=S;var he=S.map(y.MercatorCoordinate.fromLngLat);this.tileID=function(Pe){for(var ct=1/0,Ut=1/0,wt=-1/0,Kt=-1/0,cr=0,hr=Pe;crZ.end(0)?this.fire(new y.ErrorEvent(new y.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+Z.start(0)+" and "+Z.end(0)+"-second mark."))):this.video.currentTime=S}},x.prototype.getVideo=function(){return this.video},x.prototype.onAdd=function(S){this.map||(this.map=S,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},x.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var S=this.map.painter.context,Z=S.gl;for(var he in this.boundsBuffer||(this.boundsBuffer=S.createVertexBuffer(this._boundsArray,vt.members)),this.boundsSegments||(this.boundsSegments=y.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(Z.LINEAR,Z.CLAMP_TO_EDGE),Z.texSubImage2D(Z.TEXTURE_2D,0,0,0,Z.RGBA,Z.UNSIGNED_BYTE,this.video)):(this.texture=new y.Texture(S,this.video,Z.RGBA),this.texture.bind(Z.LINEAR,Z.CLAMP_TO_EDGE)),this.tiles){var Se=this.tiles[he];Se.state!=="loaded"&&(Se.state="loaded",Se.texture=this.texture)}}},x.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},x.prototype.hasTransition=function(){return this.video&&!this.video.paused},x}(Je),pt=function(b){function x(S,Z,he,Se){b.call(this,S,Z,he,Se),Z.coordinates?Array.isArray(Z.coordinates)&&Z.coordinates.length===4&&!Z.coordinates.some(function(Pe){return!Array.isArray(Pe)||Pe.length!==2||Pe.some(function(ct){return typeof ct!="number"})})||this.fire(new y.ErrorEvent(new y.ValidationError("sources."+S,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new y.ErrorEvent(new y.ValidationError("sources."+S,null,'missing required property "coordinates"'))),Z.animate&&typeof Z.animate!="boolean"&&this.fire(new y.ErrorEvent(new y.ValidationError("sources."+S,null,'optional "animate" property must be a boolean value'))),Z.canvas?typeof Z.canvas=="string"||Z.canvas instanceof y.window.HTMLCanvasElement||this.fire(new y.ErrorEvent(new y.ValidationError("sources."+S,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 y.ErrorEvent(new y.ValidationError("sources."+S,null,'missing required property "canvas"'))),this.options=Z,this.animate=Z.animate===void 0||Z.animate}return b&&(x.__proto__=b),(x.prototype=Object.create(b&&b.prototype)).constructor=x,x.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof y.window.HTMLCanvasElement?this.options.canvas:y.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new y.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},x.prototype.getCanvas=function(){return this.canvas},x.prototype.onAdd=function(S){this.map=S,this.load(),this.canvas&&this.animate&&this.play()},x.prototype.onRemove=function(){this.pause()},x.prototype.prepare=function(){var S=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,S=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,S=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var Z=this.map.painter.context,he=Z.gl;for(var Se in this.boundsBuffer||(this.boundsBuffer=Z.createVertexBuffer(this._boundsArray,vt.members)),this.boundsSegments||(this.boundsSegments=y.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(S||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new y.Texture(Z,this.canvas,he.RGBA,{premultiply:!0}),this.tiles){var Pe=this.tiles[Se];Pe.state!=="loaded"&&(Pe.state="loaded",Pe.texture=this.texture)}}},x.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},x.prototype.hasTransition=function(){return this._playing},x.prototype._hasInvalidDimensions=function(){for(var S=0,Z=[this.canvas.width,this.canvas.height];Sthis.max){var Pe=this._getAndRemoveByKey(this.order[0]);Pe&&this.onRemove(Pe)}return this},gn.prototype.has=function(b){return b.wrapped().key in this.data},gn.prototype.getAndRemove=function(b){return this.has(b)?this._getAndRemoveByKey(b.wrapped().key):null},gn.prototype._getAndRemoveByKey=function(b){var x=this.data[b].shift();return x.timeout&&clearTimeout(x.timeout),this.data[b].length===0&&delete this.data[b],this.order.splice(this.order.indexOf(b),1),x.value},gn.prototype.getByKey=function(b){var x=this.data[b];return x?x[0].value:null},gn.prototype.get=function(b){return this.has(b)?this.data[b.wrapped().key][0].value:null},gn.prototype.remove=function(b,x){if(!this.has(b))return this;var S=b.wrapped().key,Z=x===void 0?0:this.data[S].indexOf(x),he=this.data[S][Z];return this.data[S].splice(Z,1),he.timeout&&clearTimeout(he.timeout),this.data[S].length===0&&delete this.data[S],this.onRemove(he.value),this.order.splice(this.order.indexOf(S),1),this},gn.prototype.setMaxSize=function(b){for(this.max=b;this.order.length>this.max;){var x=this._getAndRemoveByKey(this.order[0]);x&&this.onRemove(x)}return this},gn.prototype.filter=function(b){var x=[];for(var S in this.data)for(var Z=0,he=this.data[S];Z1||(Math.abs(Kt)>1&&(Math.abs(Kt+hr)===1?Kt+=hr:Math.abs(Kt-hr)===1&&(Kt-=hr)),wt.dem&&Ut.dem&&(Ut.dem.backfillBorder(wt.dem,Kt,cr),Ut.neighboringTiles&&Ut.neighboringTiles[Fr]&&(Ut.neighboringTiles[Fr].backfilled=!0)))}},x.prototype.getTile=function(S){return this.getTileByID(S.key)},x.prototype.getTileByID=function(S){return this._tiles[S]},x.prototype._retainLoadedChildren=function(S,Z,he,Se){for(var Pe in this._tiles){var ct=this._tiles[Pe];if(!(Se[Pe]||!ct.hasData()||ct.tileID.overscaledZ<=Z||ct.tileID.overscaledZ>he)){for(var Ut=ct.tileID;ct&&ct.tileID.overscaledZ>Z+1;){var wt=ct.tileID.scaledTo(ct.tileID.overscaledZ-1);(ct=this._tiles[wt.key])&&ct.hasData()&&(Ut=wt)}for(var Kt=Ut;Kt.overscaledZ>Z;)if(S[(Kt=Kt.scaledTo(Kt.overscaledZ-1)).key]){Se[Ut.key]=Ut;break}}}},x.prototype.findLoadedParent=function(S,Z){if(S.key in this._loadedParentTiles){var he=this._loadedParentTiles[S.key];return he&&he.tileID.overscaledZ>=Z?he:null}for(var Se=S.overscaledZ-1;Se>=Z;Se--){var Pe=S.scaledTo(Se),ct=this._getLoadedTile(Pe);if(ct)return ct}},x.prototype._getLoadedTile=function(S){var Z=this._tiles[S.key];return Z&&Z.hasData()?Z:this._cache.getByKey(S.wrapped().key)},x.prototype.updateCacheSize=function(S){var Z=Math.ceil(S.width/this._source.tileSize)+1,he=Math.ceil(S.height/this._source.tileSize)+1,Se=Math.floor(Z*he*5),Pe=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Se):Se;this._cache.setMaxSize(Pe)},x.prototype.handleWrapJump=function(S){var Z=Math.round((S-(this._prevLng===void 0?S:this._prevLng))/360);if(this._prevLng=S,Z){var he={};for(var Se in this._tiles){var Pe=this._tiles[Se];Pe.tileID=Pe.tileID.unwrapTo(Pe.tileID.wrap+Z),he[Pe.tileID.key]=Pe}for(var ct in this._tiles=he,this._timers)clearTimeout(this._timers[ct]),delete this._timers[ct];for(var Ut in this._tiles)this._setTileReloadTimer(Ut,this._tiles[Ut])}},x.prototype.update=function(S){var Z=this;if(this.transform=S,this._sourceLoaded&&!this._paused){var he;this.updateCacheSize(S),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?he=S.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Ji){return new y.OverscaledTileID(Ji.canonical.z,Ji.wrap,Ji.canonical.z,Ji.canonical.x,Ji.canonical.y)}):(he=S.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(he=he.filter(function(Ji){return Z._source.hasTile(Ji)}))):he=[];var Se=S.coveringZoomLevel(this._source),Pe=Math.max(Se-x.maxOverzooming,this._source.minzoom),ct=Math.max(Se+x.maxUnderzooming,this._source.minzoom),Ut=this._updateRetainedTiles(he,Se);if(on(this._source.type)){for(var wt={},Kt={},cr=0,hr=Object.keys(Ut);crthis._source.maxzoom){var dn=rn.children(this._source.maxzoom)[0],Qt=this.getTile(dn);if(Qt&&Qt.hasData()){he[dn.key]=dn;continue}}else{var li=rn.children(this._source.maxzoom);if(he[li[0].key]&&he[li[1].key]&&he[li[2].key]&&he[li[3].key])continue}for(var oi=Xr.wasRequested(),pr=rn.overscaledZ-1;pr>=Pe;--pr){var di=rn.scaledTo(pr);if(Se[di.key]||(Se[di.key]=!0,!(Xr=this.getTile(di))&&oi&&(Xr=this._addTile(di)),Xr&&(he[di.key]=di,oi=Xr.wasRequested(),Xr.hasData())))break}}}return he},x.prototype._updateLoadedParentTileCache=function(){for(var S in this._loadedParentTiles={},this._tiles){for(var Z=[],he=void 0,Se=this._tiles[S].tileID;Se.overscaledZ>0;){if(Se.key in this._loadedParentTiles){he=this._loadedParentTiles[Se.key];break}Z.push(Se.key);var Pe=Se.scaledTo(Se.overscaledZ-1);if(he=this._getLoadedTile(Pe))break;Se=Pe}for(var ct=0,Ut=Z;ct0||(Z.hasData()&&Z.state!=="reloading"?this._cache.add(Z.tileID,Z,Z.getExpiryTimeout()):(Z.aborted=!0,this._abortTile(Z),this._unloadTile(Z))))},x.prototype.clearTiles=function(){for(var S in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(S);this._cache.reset()},x.prototype.tilesIn=function(S,Z,he){var Se=this,Pe=[],ct=this.transform;if(!ct)return Pe;for(var Ut=he?ct.getCameraQueryGeometry(S):S,wt=S.map(function(pr){return ct.pointCoordinate(pr)}),Kt=Ut.map(function(pr){return ct.pointCoordinate(pr)}),cr=this.getIds(),hr=1/0,Fr=1/0,Br=-1/0,rn=-1/0,Xr=0,dn=Kt;Xr=0&&Ss[1].y+no>=0){var tu=wt.map(function(bu){return Ji.getTilePoint(bu)}),sn=Kt.map(function(bu){return Ji.getTilePoint(bu)});Pe.push({tile:di,tileID:Ji,queryGeometry:tu,cameraQueryGeometry:sn,scale:ja})}}},oi=0;oi=y.browser.now())return!0}return!1},x.prototype.setFeatureState=function(S,Z,he){this._state.updateState(S=S||"_geojsonTileLayer",Z,he)},x.prototype.removeFeatureState=function(S,Z,he){this._state.removeFeatureState(S=S||"_geojsonTileLayer",Z,he)},x.prototype.getFeatureState=function(S,Z){return this._state.getState(S=S||"_geojsonTileLayer",Z)},x.prototype.setDependencies=function(S,Z,he){var Se=this._tiles[S];Se&&Se.setDependencies(Z,he)},x.prototype.reloadTilesForDependencies=function(S,Z){for(var he in this._tiles)this._tiles[he].hasDependency(S,Z)&&this._reloadTile(he,"reloading");this._cache.filter(function(Se){return!Se.hasDependency(S,Z)})},x}(y.Evented);function jr(b,x){var S=Math.abs(2*b.wrap)-+(b.wrap<0),Z=Math.abs(2*x.wrap)-+(x.wrap<0);return b.overscaledZ-x.overscaledZ||Z-S||x.canonical.y-b.canonical.y||x.canonical.x-b.canonical.x}function on(b){return b==="raster"||b==="image"||b==="video"}function ri(){return new y.window.Worker(Gt.workerUrl)}er.maxOverzooming=10,er.maxUnderzooming=3;var nn="mapboxgl_preloaded_worker_pool",ln=function(){this.active={}};ln.prototype.acquire=function(b){if(!this.workers)for(this.workers=[];this.workers.length0?(Z-Se)/Pe:0;return this.points[he].mult(1-ct).add(this.points[x].mult(ct))};var Do=function(b,x,S){var Z=this.boxCells=[],he=this.circleCells=[];this.xCellCount=Math.ceil(b/S),this.yCellCount=Math.ceil(x/S);for(var Se=0;Se=-x[0]&&S<=x[0]&&Z>=-x[1]&&Z<=x[1]}function Fu(b,x,S,Z,he,Se,Pe,ct){var Ut=Z?b.textSizeData:b.iconSizeData,wt=y.evaluateSizeForZoom(Ut,S.transform.zoom),Kt=[256/S.width*2+1,256/S.height*2+1],cr=Z?b.text.dynamicLayoutVertexArray:b.icon.dynamicLayoutVertexArray;cr.clear();for(var hr=b.lineVertexArray,Fr=Z?b.text.placedSymbolArray:b.icon.placedSymbolArray,Br=S.transform.width/S.transform.height,rn=!1,Xr=0;XrMath.abs(S.x-x.x)*Z?{useVertical:!0}:(b===y.WritingMode.vertical?x.yS.x)?{needsFlipping:!0}:null}function Ts(b,x,S,Z,he,Se,Pe,ct,Ut,wt,Kt,cr,hr,Fr){var Br,rn=x/24,Xr=b.lineOffsetX*rn,dn=b.lineOffsetY*rn;if(b.numGlyphs>1){var Qt=b.glyphStartIndex+b.numGlyphs,li=b.lineStartIndex,oi=b.lineStartIndex+b.lineLength,pr=Hs(rn,ct,Xr,dn,S,Kt,cr,b,Ut,Se,hr);if(!pr)return{notEnoughRoom:!0};var di=ca(pr.first.point,Pe).point,Ji=ca(pr.last.point,Pe).point;if(Z&&!S){var ja=us(b.writingMode,di,Ji,Fr);if(ja)return ja}Br=[pr.first];for(var no=b.glyphStartIndex+1;no0?bu.point:Qs(cr,sn,Ss,1,he),uu=us(b.writingMode,Ss,bc,Fr);if(uu)return uu}var Ju=ko(rn*ct.getoffsetX(b.glyphStartIndex),Xr,dn,S,Kt,cr,b.segment,b.lineStartIndex,b.lineStartIndex+b.lineLength,Ut,Se,hr);if(!Ju)return{notEnoughRoom:!0};Br=[Ju]}for(var Sc=0,Bl=Br;Sc0?1:-1,Br=0;Z&&(Fr*=-1,Br=Math.PI),Fr<0&&(Br+=Math.PI);for(var rn=Fr>0?ct+Pe:ct+Pe+1,Xr=he,dn=he,Qt=0,li=0,oi=Math.abs(hr),pr=[];Qt+li<=oi;){if((rn+=Fr)=Ut)return null;if(dn=Xr,pr.push(Xr),(Xr=cr[rn])===void 0){var di=new y.Point(wt.getx(rn),wt.gety(rn)),Ji=ca(di,Kt);if(Ji.signedDistanceFromCamera>0)Xr=cr[rn]=Ji.point;else{var ja=rn-Fr;Xr=Qs(Qt===0?Se:new y.Point(wt.getx(ja),wt.gety(ja)),di,dn,oi-Qt+1,Kt)}}Qt+=li,li=dn.dist(Xr)}var no=(oi-Qt)/li,Ss=Xr.sub(dn),tu=Ss.mult(no)._add(dn);tu._add(Ss._unit()._perp()._mult(S*Fr));var sn=Br+Math.atan2(Xr.y-dn.y,Xr.x-dn.x);return pr.push(tu),{point:tu,angle:sn,path:pr}}Do.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Do.prototype.insert=function(b,x,S,Z,he){this._forEachCell(x,S,Z,he,this._insertBoxCell,this.boxUid++),this.boxKeys.push(b),this.bboxes.push(x),this.bboxes.push(S),this.bboxes.push(Z),this.bboxes.push(he)},Do.prototype.insertCircle=function(b,x,S,Z){this._forEachCell(x-Z,S-Z,x+Z,S+Z,this._insertCircleCell,this.circleUid++),this.circleKeys.push(b),this.circles.push(x),this.circles.push(S),this.circles.push(Z)},Do.prototype._insertBoxCell=function(b,x,S,Z,he,Se){this.boxCells[he].push(Se)},Do.prototype._insertCircleCell=function(b,x,S,Z,he,Se){this.circleCells[he].push(Se)},Do.prototype._query=function(b,x,S,Z,he,Se){if(S<0||b>this.width||Z<0||x>this.height)return!he&&[];var Pe=[];if(b<=0&&x<=0&&this.width<=S&&this.height<=Z){if(he)return!0;for(var ct=0;ct0:Pe},Do.prototype._queryCircle=function(b,x,S,Z,he){var Se=b-S,Pe=b+S,ct=x-S,Ut=x+S;if(Pe<0||Se>this.width||Ut<0||ct>this.height)return!Z&&[];var wt=[];return this._forEachCell(Se,ct,Pe,Ut,this._queryCellCircle,wt,{hitTest:Z,circle:{x:b,y:x,radius:S},seenUids:{box:{},circle:{}}},he),Z?wt.length>0:wt},Do.prototype.query=function(b,x,S,Z,he){return this._query(b,x,S,Z,!1,he)},Do.prototype.hitTest=function(b,x,S,Z,he){return this._query(b,x,S,Z,!0,he)},Do.prototype.hitTestCircle=function(b,x,S,Z){return this._queryCircle(b,x,S,!0,Z)},Do.prototype._queryCell=function(b,x,S,Z,he,Se,Pe,ct){var Ut=Pe.seenUids,wt=this.boxCells[he];if(wt!==null)for(var Kt=this.bboxes,cr=0,hr=wt;cr=Kt[Br+0]&&Z>=Kt[Br+1]&&(!ct||ct(this.boxKeys[Fr]))){if(Pe.hitTest)return Se.push(!0),!0;Se.push({key:this.boxKeys[Fr],x1:Kt[Br],y1:Kt[Br+1],x2:Kt[Br+2],y2:Kt[Br+3]})}}}var rn=this.circleCells[he];if(rn!==null)for(var Xr=this.circles,dn=0,Qt=rn;dnPe*Pe+ct*ct},Do.prototype._circleAndRectCollide=function(b,x,S,Z,he,Se,Pe){var ct=(Se-Z)/2,Ut=Math.abs(b-(Z+ct));if(Ut>ct+S)return!1;var wt=(Pe-he)/2,Kt=Math.abs(x-(he+wt));if(Kt>wt+S)return!1;if(Ut<=ct||Kt<=wt)return!0;var cr=Ut-ct,hr=Kt-wt;return cr*cr+hr*hr<=S*S};var _o=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Js(b,x){for(var S=0;S=1;bc--)bu.push(tu.path[bc]);for(var uu=1;uu0){for(var Ol=bu[0].clone(),oc=bu[0].clone(),Ql=1;Ql=ja.x&&oc.x<=no.x&&Ol.y>=ja.y&&oc.y<=no.y?[bu]:oc.xno.x||oc.yno.y?[]:y.clipLine([bu],ja.x,ja.y,no.x,no.y)}for(var Cu=0,Bc=Bl;Cu=this.screenRightBoundary||Z<100||x>this.screenBottomBoundary},El.prototype.isInsideGrid=function(b,x,S,Z){return S>=0&&b=0&&x0?(this.prevPlacement&&this.prevPlacement.variableOffsets[cr.crossTileID]&&this.prevPlacement.placements[cr.crossTileID]&&this.prevPlacement.placements[cr.crossTileID].text&&(rn=this.prevPlacement.variableOffsets[cr.crossTileID].anchor),this.variableOffsets[cr.crossTileID]={textOffset:Xr,width:S,height:Z,anchor:b,textBoxScale:he,prevAnchor:rn},this.markUsedJustification(hr,b,cr,Fr),hr.allowVerticalPlacement&&(this.markUsedOrientation(hr,Fr,cr),this.placedOrientations[cr.crossTileID]=Fr),{shift:dn,placedGlyphBoxes:Qt}):void 0},Pi.prototype.placeLayerBucketPart=function(b,x,S){var Z=this,he=b.parameters,Se=he.bucket,Pe=he.layout,ct=he.posMatrix,Ut=he.textLabelPlaneMatrix,wt=he.labelToScreenMatrix,Kt=he.textPixelRatio,cr=he.holdingForFade,hr=he.collisionBoxArray,Fr=he.partiallyEvaluatedTextSize,Br=he.collisionGroup,rn=Pe.get("text-optional"),Xr=Pe.get("icon-optional"),dn=Pe.get("text-allow-overlap"),Qt=Pe.get("icon-allow-overlap"),li=Pe.get("text-rotation-alignment")==="map",oi=Pe.get("text-pitch-alignment")==="map",pr=Pe.get("icon-text-fit")!=="none",di=Pe.get("symbol-z-order")==="viewport-y",Ji=dn&&(Qt||!Se.hasIconData()||Xr),ja=Qt&&(dn||!Se.hasTextData()||rn);!Se.collisionArrays&&hr&&Se.deserializeCollisionBoxes(hr);var no=function(uu,Ju){if(!x[uu.crossTileID])if(cr)Z.placements[uu.crossTileID]=new yc(!1,!1,!1);else{var Sc,Bl=!1,Ol=!1,oc=!0,Ql=null,Cu={box:null,offscreen:null},Bc={box:null,offscreen:null},ff=null,Eh=null,Rf=0,Xl=0,jf=0;Ju.textFeatureIndex?Rf=Ju.textFeatureIndex:uu.useRuntimeCollisionCircles&&(Rf=uu.featureIndex),Ju.verticalTextFeatureIndex&&(Xl=Ju.verticalTextFeatureIndex);var Yf=Ju.textBox;if(Yf){var Ah=function(vc){var kf=y.WritingMode.horizontal;if(Se.allowVerticalPlacement&&!vc&&Z.prevPlacement){var Ih=Z.prevPlacement.placedOrientations[uu.crossTileID];Ih&&(Z.placedOrientations[uu.crossTileID]=Ih,Z.markUsedOrientation(Se,kf=Ih,uu))}return kf},vf=function(vc,kf){if(Se.allowVerticalPlacement&&uu.numVerticalGlyphVertices>0&&Ju.verticalTextBox)for(var Ih=0,hd=Se.writingModes;Ih0&&(Ph=Ph.filter(function(vc){return vc!==Ld.anchor})).unshift(Ld.anchor)}var Hh=function(vc,kf,Ih){for(var hd=vc.x2-vc.x1,Gh=vc.y2-vc.y1,Jp=uu.textBoxScale,i0=pr&&!Qt?kf:null,Cp={box:[],offscreen:!1},Tp=dn?2*Ph.length:Ph.length,sp=0;sp=Ph.length,uu,Se,Ih,i0);if(y0&&(Cp=y0.placedGlyphBoxes)&&Cp.box&&Cp.box.length){Bl=!0,Ql=y0.shift;break}}return Cp};vf(function(){return Hh(Yf,Ju.iconBox,y.WritingMode.horizontal)},function(){var vc=Ju.verticalTextBox;return Se.allowVerticalPlacement&&!(Cu&&Cu.box&&Cu.box.length)&&uu.numVerticalGlyphVertices>0&&vc?Hh(vc,Ju.verticalIconBox,y.WritingMode.vertical):{box:null,offscreen:null}}),Cu&&(Bl=Cu.box,oc=Cu.offscreen);var Dh=Ah(Cu&&Cu.box);if(!Bl&&Z.prevPlacement){var eh=Z.prevPlacement.variableOffsets[uu.crossTileID];eh&&(Z.variableOffsets[uu.crossTileID]=eh,Z.markUsedJustification(Se,eh.anchor,uu,Dh))}}else{var Hf=function(vc,kf){var Ih=Z.collisionIndex.placeCollisionBox(vc,dn,Kt,ct,Br.predicate);return Ih&&Ih.box&&Ih.box.length&&(Z.markUsedOrientation(Se,kf,uu),Z.placedOrientations[uu.crossTileID]=kf),Ih};vf(function(){return Hf(Yf,y.WritingMode.horizontal)},function(){var vc=Ju.verticalTextBox;return Se.allowVerticalPlacement&&uu.numVerticalGlyphVertices>0&&vc?Hf(vc,y.WritingMode.vertical):{box:null,offscreen:null}}),Ah(Cu&&Cu.box&&Cu.box.length)}}if(Bl=(Sc=Cu)&&Sc.box&&Sc.box.length>0,oc=Sc&&Sc.offscreen,uu.useRuntimeCollisionCircles){var qh=Se.text.placedSymbolArray.get(uu.centerJustifiedTextSymbolIndex),Qh=y.evaluateSizeForFeature(Se.textSizeData,Fr,qh),Uh=Pe.get("text-padding");ff=Z.collisionIndex.placeCollisionCircles(dn,qh,Se.lineVertexArray,Se.glyphOffsetArray,Qh,ct,Ut,wt,S,oi,Br.predicate,uu.collisionCircleDiameter,Uh),Bl=dn||ff.circles.length>0&&!ff.collisionDetected,oc=oc&&ff.offscreen}if(Ju.iconFeatureIndex&&(jf=Ju.iconFeatureIndex),Ju.iconBox){var Dd=function(vc){var kf=pr&&Ql?tn(vc,Ql.x,Ql.y,li,oi,Z.transform.angle):vc;return Z.collisionIndex.placeCollisionBox(kf,Qt,Kt,ct,Br.predicate)};Ol=Bc&&Bc.box&&Bc.box.length&&Ju.verticalIconBox?(Eh=Dd(Ju.verticalIconBox)).box.length>0:(Eh=Dd(Ju.iconBox)).box.length>0,oc=oc&&Eh.offscreen}var Wl=rn||uu.numHorizontalGlyphVertices===0&&uu.numVerticalGlyphVertices===0,yd=Xr||uu.numIconVertices===0;if(Wl||yd?yd?Wl||(Ol=Ol&&Bl):Bl=Ol&&Bl:Ol=Bl=Ol&&Bl,Bl&&Sc&&Sc.box&&Z.collisionIndex.insertCollisionBox(Sc.box,Pe.get("text-ignore-placement"),Se.bucketInstanceId,Bc&&Bc.box&&Xl?Xl:Rf,Br.ID),Ol&&Eh&&Z.collisionIndex.insertCollisionBox(Eh.box,Pe.get("icon-ignore-placement"),Se.bucketInstanceId,jf,Br.ID),ff&&(Bl&&Z.collisionIndex.insertCollisionCircles(ff.circles,Pe.get("text-ignore-placement"),Se.bucketInstanceId,Rf,Br.ID),S)){var Jh=Se.bucketInstanceId,Qc=Z.collisionCircleArrays[Jh];Qc===void 0&&(Qc=Z.collisionCircleArrays[Jh]=new Vl);for(var Ap=0;Ap=0;--tu){var sn=Ss[tu];no(Se.symbolInstances.get(sn),Se.collisionArrays[sn])}else for(var bu=b.symbolInstanceStart;bu=0&&(b.text.placedSymbolArray.get(ct).crossTileID=he>=0&&ct!==he?0:S.crossTileID)}},Pi.prototype.markUsedOrientation=function(b,x,S){for(var Z=x===y.WritingMode.horizontal||x===y.WritingMode.horizontalOnly?x:0,he=x===y.WritingMode.vertical?x:0,Se=0,Pe=[S.leftJustifiedTextSymbolIndex,S.centerJustifiedTextSymbolIndex,S.rightJustifiedTextSymbolIndex];Se0,ja=Z.placedOrientations[Qt.crossTileID],no=ja===y.WritingMode.vertical,Ss=ja===y.WritingMode.horizontal||ja===y.WritingMode.horizontalOnly;if(li>0||oi>0){var tu=xn(di.text);Fr(b.text,li,no?zr:tu),Fr(b.text,oi,Ss?zr:tu);var sn=di.text.isHidden();[Qt.rightJustifiedTextSymbolIndex,Qt.centerJustifiedTextSymbolIndex,Qt.leftJustifiedTextSymbolIndex].forEach(function(Cu){Cu>=0&&(b.text.placedSymbolArray.get(Cu).hidden=sn||no?1:0)}),Qt.verticalPlacedTextSymbolIndex>=0&&(b.text.placedSymbolArray.get(Qt.verticalPlacedTextSymbolIndex).hidden=sn||Ss?1:0);var bu=Z.variableOffsets[Qt.crossTileID];bu&&Z.markUsedJustification(b,bu.anchor,Qt,ja);var bc=Z.placedOrientations[Qt.crossTileID];bc&&(Z.markUsedJustification(b,"left",Qt,bc),Z.markUsedOrientation(b,bc,Qt))}if(Ji){var uu=xn(di.icon),Ju=!(cr&&Qt.verticalPlacedIconSymbolIndex&&no);Qt.placedIconSymbolIndex>=0&&(Fr(b.icon,Qt.numIconVertices,Ju?uu:zr),b.icon.placedSymbolArray.get(Qt.placedIconSymbolIndex).hidden=di.icon.isHidden()),Qt.verticalPlacedIconSymbolIndex>=0&&(Fr(b.icon,Qt.numVerticalIconVertices,Ju?zr:uu),b.icon.placedSymbolArray.get(Qt.verticalPlacedIconSymbolIndex).hidden=di.icon.isHidden())}if(b.hasIconCollisionBoxData()||b.hasTextCollisionBoxData()){var Sc=b.collisionArrays[dn];if(Sc){var Bl=new y.Point(0,0);if(Sc.textBox||Sc.verticalTextBox){var Ol=!0;if(Ut){var oc=Z.variableOffsets[pr];oc?(Bl=On(oc.anchor,oc.width,oc.height,oc.textOffset,oc.textBoxScale),wt&&Bl._rotate(Kt?Z.transform.angle:-Z.transform.angle)):Ol=!1}Sc.textBox&&ut(b.textCollisionBox.collisionVertexArray,di.text.placed,!Ol||no,Bl.x,Bl.y),Sc.verticalTextBox&&ut(b.textCollisionBox.collisionVertexArray,di.text.placed,!Ol||Ss,Bl.x,Bl.y)}var Ql=!!(!Ss&&Sc.verticalIconBox);Sc.iconBox&&ut(b.iconCollisionBox.collisionVertexArray,di.icon.placed,Ql,cr?Bl.x:0,cr?Bl.y:0),Sc.verticalIconBox&&ut(b.iconCollisionBox.collisionVertexArray,di.icon.placed,!Ql,cr?Bl.x:0,cr?Bl.y:0)}}},rn=0;rnb},Pi.prototype.setStale=function(){this.stale=!0};var Wt=Math.pow(2,25),wr=Math.pow(2,24),bn=Math.pow(2,17),vn=Math.pow(2,16),Xi=Math.pow(2,9),ya=Math.pow(2,8),Bo=Math.pow(2,1);function xn(b){if(b.opacity===0&&!b.placed)return 0;if(b.opacity===1&&b.placed)return 4294967295;var x=b.placed?1:0,S=Math.floor(127*b.opacity);return S*Wt+x*wr+S*bn+x*vn+S*Xi+x*ya+S*Bo+x}var zr=0,xt=function(b){this._sortAcrossTiles=b.layout.get("symbol-z-order")!=="viewport-y"&&b.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};xt.prototype.continuePlacement=function(b,x,S,Z,he){for(var Se=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var Pe=x[b[this._currentPlacementIndex]],ct=this.placement.collisionIndex.transform.zoom;if(Pe.type==="symbol"&&(!Pe.minzoom||Pe.minzoom<=ct)&&(!Pe.maxzoom||Pe.maxzoom>ct)){if(this._inProgressLayer||(this._inProgressLayer=new xt(Pe)),this._inProgressLayer.continuePlacement(S[Pe.source],this.placement,this._showCollisionBoxes,Pe,Se))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Nt.prototype.commit=function(b){return this.placement.commit(b),this.placement};var lr=512/y.EXTENT/2,$r=function(b,x,S){this.tileID=b,this.indexedSymbolInstances={},this.bucketInstanceId=S;for(var Z=0;Zb.overscaledZ)for(var ct in Pe){var Ut=Pe[ct];Ut.tileID.isChildOf(b)&&Ut.findMatches(x.symbolInstances,b,he)}else{var wt=Pe[b.scaledTo(Number(Se)).key];wt&&wt.findMatches(x.symbolInstances,b,he)}}for(var Kt=0;Kt1?"@2x":"",cr=y.getJSON(Se.transformRequest(Se.normalizeSpriteURL(he,Kt,".json"),y.ResourceType.SpriteJSON),function(Br,rn){cr=null,wt||(wt=Br,ct=rn,Fr())}),hr=y.getImage(Se.transformRequest(Se.normalizeSpriteURL(he,Kt,".png"),y.ResourceType.SpriteImage),function(Br,rn){hr=null,wt||(wt=Br,Ut=rn,Fr())});function Fr(){if(wt)Pe(wt);else if(ct&&Ut){var Br=y.browser.getImageData(Ut),rn={};for(var Xr in ct){var dn=ct[Xr],Qt=dn.width,li=dn.height,oi=dn.x,pr=dn.y,di=dn.sdf,Ji=dn.pixelRatio,ja=dn.stretchX,no=dn.stretchY,Ss=dn.content,tu=new y.RGBAImage({width:Qt,height:li});y.RGBAImage.copy(Br,tu,{x:oi,y:pr},{x:0,y:0},{width:Qt,height:li}),rn[Xr]={data:tu,pixelRatio:Ji,sdf:di,stretchX:ja,stretchY:no,content:Ss}}Pe(null,rn)}}return{cancel:function(){cr&&(cr.cancel(),cr=null),hr&&(hr.cancel(),hr=null)}}}(S,this.map._requestManager,function(he,Se){if(Z._spriteRequest=null,he)Z.fire(new y.ErrorEvent(he));else if(Se)for(var Pe in Se)Z.imageManager.addImage(Pe,Se[Pe]);Z.imageManager.setLoaded(!0),Z._availableImages=Z.imageManager.listImages(),Z.dispatcher.broadcast("setImages",Z._availableImages),Z.fire(new y.Event("data",{dataType:"style"}))})},x.prototype._validateLayer=function(S){var Z=this.sourceCaches[S.source];if(Z){var he=S.sourceLayer;if(he){var Se=Z.getSource();(Se.type==="geojson"||Se.vectorLayerIds&&Se.vectorLayerIds.indexOf(he)===-1)&&this.fire(new y.ErrorEvent(new Error('Source layer "'+he+'" does not exist on source "'+Se.id+'" as specified by style layer "'+S.id+'"')))}}},x.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var S in this.sourceCaches)if(!this.sourceCaches[S].loaded())return!1;return!!this.imageManager.isLoaded()},x.prototype._serializeLayers=function(S){for(var Z=[],he=0,Se=S;he0)throw new Error("Unimplemented: "+Se.map(function(Pe){return Pe.command}).join(", ")+".");return he.forEach(function(Pe){Pe.command!=="setTransition"&&Z[Pe.command].apply(Z,Pe.args)}),this.stylesheet=S,!0},x.prototype.addImage=function(S,Z){if(this.getImage(S))return this.fire(new y.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(S,Z),this._afterImageUpdated(S)},x.prototype.updateImage=function(S,Z){this.imageManager.updateImage(S,Z)},x.prototype.getImage=function(S){return this.imageManager.getImage(S)},x.prototype.removeImage=function(S){if(!this.getImage(S))return this.fire(new y.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(S),this._afterImageUpdated(S)},x.prototype._afterImageUpdated=function(S){this._availableImages=this.imageManager.listImages(),this._changedImages[S]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new y.Event("data",{dataType:"style"}))},x.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},x.prototype.addSource=function(S,Z,he){var Se=this;if(he===void 0&&(he={}),this._checkLoaded(),this.sourceCaches[S]!==void 0)throw new Error("There is already a source with this ID");if(!Z.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(Z).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(Z.type)>=0&&this._validate(y.validateStyle.source,"sources."+S,Z,null,he))){this.map&&this.map._collectResourceTiming&&(Z.collectResourceTiming=!0);var Pe=this.sourceCaches[S]=new er(S,Z,this.dispatcher);Pe.style=this,Pe.setEventedParent(this,function(){return{isSourceLoaded:Se.loaded(),source:Pe.serialize(),sourceId:S}}),Pe.onAdd(this.map),this._changed=!0}},x.prototype.removeSource=function(S){if(this._checkLoaded(),this.sourceCaches[S]===void 0)throw new Error("There is no source with this ID");for(var Z in this._layers)if(this._layers[Z].source===S)return this.fire(new y.ErrorEvent(new Error('Source "'+S+'" cannot be removed while layer "'+Z+'" is using it.')));var he=this.sourceCaches[S];delete this.sourceCaches[S],delete this._updatedSources[S],he.fire(new y.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:S})),he.setEventedParent(null),he.clearTiles(),he.onRemove&&he.onRemove(this.map),this._changed=!0},x.prototype.setGeoJSONSourceData=function(S,Z){this._checkLoaded(),this.sourceCaches[S].getSource().setData(Z),this._changed=!0},x.prototype.getSource=function(S){return this.sourceCaches[S]&&this.sourceCaches[S].getSource()},x.prototype.addLayer=function(S,Z,he){he===void 0&&(he={}),this._checkLoaded();var Se=S.id;if(this.getLayer(Se))this.fire(new y.ErrorEvent(new Error('Layer with id "'+Se+'" already exists on this map')));else{var Pe;if(S.type==="custom"){if(qn(this,y.validateCustomStyleLayer(S)))return;Pe=y.createStyleLayer(S)}else{if(typeof S.source=="object"&&(this.addSource(Se,S.source),S=y.clone$1(S),S=y.extend(S,{source:Se})),this._validate(y.validateStyle.layer,"layers."+Se,S,{arrayIndex:-1},he))return;Pe=y.createStyleLayer(S),this._validateLayer(Pe),Pe.setEventedParent(this,{layer:{id:Se}}),this._serializedLayers[Pe.id]=Pe.serialize()}var ct=Z?this._order.indexOf(Z):this._order.length;if(Z&&ct===-1)this.fire(new y.ErrorEvent(new Error('Layer with id "'+Z+'" does not exist on this map.')));else{if(this._order.splice(ct,0,Se),this._layerOrderChanged=!0,this._layers[Se]=Pe,this._removedLayers[Se]&&Pe.source&&Pe.type!=="custom"){var Ut=this._removedLayers[Se];delete this._removedLayers[Se],Ut.type!==Pe.type?this._updatedSources[Pe.source]="clear":(this._updatedSources[Pe.source]="reload",this.sourceCaches[Pe.source].pause())}this._updateLayer(Pe),Pe.onAdd&&Pe.onAdd(this.map)}}},x.prototype.moveLayer=function(S,Z){if(this._checkLoaded(),this._changed=!0,this._layers[S]){if(S!==Z){var he=this._order.indexOf(S);this._order.splice(he,1);var Se=Z?this._order.indexOf(Z):this._order.length;Z&&Se===-1?this.fire(new y.ErrorEvent(new Error('Layer with id "'+Z+'" does not exist on this map.'))):(this._order.splice(Se,0,S),this._layerOrderChanged=!0)}}else this.fire(new y.ErrorEvent(new Error("The layer '"+S+"' does not exist in the map's style and cannot be moved.")))},x.prototype.removeLayer=function(S){this._checkLoaded();var Z=this._layers[S];if(Z){Z.setEventedParent(null);var he=this._order.indexOf(S);this._order.splice(he,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[S]=Z,delete this._layers[S],delete this._serializedLayers[S],delete this._updatedLayers[S],delete this._updatedPaintProps[S],Z.onRemove&&Z.onRemove(this.map)}else this.fire(new y.ErrorEvent(new Error("The layer '"+S+"' does not exist in the map's style and cannot be removed.")))},x.prototype.getLayer=function(S){return this._layers[S]},x.prototype.hasLayer=function(S){return S in this._layers},x.prototype.setLayerZoomRange=function(S,Z,he){this._checkLoaded();var Se=this.getLayer(S);Se?Se.minzoom===Z&&Se.maxzoom===he||(Z!=null&&(Se.minzoom=Z),he!=null&&(Se.maxzoom=he),this._updateLayer(Se)):this.fire(new y.ErrorEvent(new Error("The layer '"+S+"' does not exist in the map's style and cannot have zoom extent.")))},x.prototype.setFilter=function(S,Z,he){he===void 0&&(he={}),this._checkLoaded();var Se=this.getLayer(S);if(Se){if(!y.deepEqual(Se.filter,Z))return Z==null?(Se.filter=void 0,void this._updateLayer(Se)):void(this._validate(y.validateStyle.filter,"layers."+Se.id+".filter",Z,null,he)||(Se.filter=y.clone$1(Z),this._updateLayer(Se)))}else this.fire(new y.ErrorEvent(new Error("The layer '"+S+"' does not exist in the map's style and cannot be filtered.")))},x.prototype.getFilter=function(S){return y.clone$1(this.getLayer(S).filter)},x.prototype.setLayoutProperty=function(S,Z,he,Se){Se===void 0&&(Se={}),this._checkLoaded();var Pe=this.getLayer(S);Pe?y.deepEqual(Pe.getLayoutProperty(Z),he)||(Pe.setLayoutProperty(Z,he,Se),this._updateLayer(Pe)):this.fire(new y.ErrorEvent(new Error("The layer '"+S+"' does not exist in the map's style and cannot be styled.")))},x.prototype.getLayoutProperty=function(S,Z){var he=this.getLayer(S);if(he)return he.getLayoutProperty(Z);this.fire(new y.ErrorEvent(new Error("The layer '"+S+"' does not exist in the map's style.")))},x.prototype.setPaintProperty=function(S,Z,he,Se){Se===void 0&&(Se={}),this._checkLoaded();var Pe=this.getLayer(S);Pe?y.deepEqual(Pe.getPaintProperty(Z),he)||(Pe.setPaintProperty(Z,he,Se)&&this._updateLayer(Pe),this._changed=!0,this._updatedPaintProps[S]=!0):this.fire(new y.ErrorEvent(new Error("The layer '"+S+"' does not exist in the map's style and cannot be styled.")))},x.prototype.getPaintProperty=function(S,Z){return this.getLayer(S).getPaintProperty(Z)},x.prototype.setFeatureState=function(S,Z){this._checkLoaded();var he=S.source,Se=S.sourceLayer,Pe=this.sourceCaches[he];if(Pe!==void 0){var ct=Pe.getSource().type;ct==="geojson"&&Se?this.fire(new y.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ct!=="vector"||Se?(S.id===void 0&&this.fire(new y.ErrorEvent(new Error("The feature id parameter must be provided."))),Pe.setFeatureState(Se,S.id,Z)):this.fire(new y.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new y.ErrorEvent(new Error("The source '"+he+"' does not exist in the map's style.")))},x.prototype.removeFeatureState=function(S,Z){this._checkLoaded();var he=S.source,Se=this.sourceCaches[he];if(Se!==void 0){var Pe=Se.getSource().type,ct=Pe==="vector"?S.sourceLayer:void 0;Pe!=="vector"||ct?Z&&typeof S.id!="string"&&typeof S.id!="number"?this.fire(new y.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):Se.removeFeatureState(ct,S.id,Z):this.fire(new y.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new y.ErrorEvent(new Error("The source '"+he+"' does not exist in the map's style.")))},x.prototype.getFeatureState=function(S){this._checkLoaded();var Z=S.source,he=S.sourceLayer,Se=this.sourceCaches[Z];if(Se!==void 0){if(Se.getSource().type!=="vector"||he)return S.id===void 0&&this.fire(new y.ErrorEvent(new Error("The feature id parameter must be provided."))),Se.getFeatureState(he,S.id);this.fire(new y.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new y.ErrorEvent(new Error("The source '"+Z+"' does not exist in the map's style.")))},x.prototype.getTransition=function(){return y.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},x.prototype.serialize=function(){return y.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:y.mapObject(this.sourceCaches,function(S){return S.serialize()}),layers:this._serializeLayers(this._order)},function(S){return S!==void 0})},x.prototype._updateLayer=function(S){this._updatedLayers[S.id]=!0,S.source&&!this._updatedSources[S.source]&&this.sourceCaches[S.source].getSource().type!=="raster"&&(this._updatedSources[S.source]="reload",this.sourceCaches[S.source].pause()),this._changed=!0},x.prototype._flattenAndSortRenderedFeatures=function(S){for(var Z=this,he=function(ja){return Z._layers[ja].type==="fill-extrusion"},Se={},Pe=[],ct=this._order.length-1;ct>=0;ct--){var Ut=this._order[ct];if(he(Ut)){Se[Ut]=ct;for(var wt=0,Kt=S;wt=0;rn--){var Xr=this._order[rn];if(he(Xr))for(var dn=Pe.length-1;dn>=0;dn--){var Qt=Pe[dn].feature;if(Se[Qt.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Ms=yl("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);}"),Mu=yl("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,0,1);}"),vs=yl(`#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_FragColor=color*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);}`),Xs=yl(`varying vec2 v_pos; -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),iu=yl(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),js=yl(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),Vs=yl(`varying vec4 v_color;void main() {gl_FragColor=v_color; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color; -#pragma mapbox: define highp float base -#pragma mapbox: define highp float height -#pragma mapbox: define highp vec4 color -void main() { -#pragma mapbox: initialize highp float base -#pragma mapbox: initialize highp float height -#pragma mapbox: initialize highp vec4 color -vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),sl=yl(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 -? a_pos -: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),al=yl(`#ifdef GL_ES -precision highp float; -#endif -uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),ul=yl(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; -#define PI 3.141592653589793 -void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),_c=yl(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),Yo=yl(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),No=yl(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),Ku=yl(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),Rc=yl(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),Wa=yl(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),mf=yl(`#define SDF_PX 8.0 -uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),yf=yl(`#define SDF_PX 8.0 -#define SDF 1.0 -#define ICON 0.0 -uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,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);}`);function yl(b,x){var S=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Z=x.match(/attribute ([\w]+) ([\w]+)/g),he=b.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Se=x.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Pe=Se?Se.concat(he):he,ct={};return{fragmentSource:b=b.replace(S,function(Ut,wt,Kt,cr,hr){return ct[hr]=!0,wt==="define"?` -#ifndef HAS_UNIFORM_u_`+hr+` -varying `+Kt+" "+cr+" "+hr+`; -#else -uniform `+Kt+" "+cr+" u_"+hr+`; -#endif -`:` -#ifdef HAS_UNIFORM_u_`+hr+` - `+Kt+" "+cr+" "+hr+" = u_"+hr+`; -#endif -`}),vertexSource:x=x.replace(S,function(Ut,wt,Kt,cr,hr){var Fr=cr==="float"?"vec2":"vec4",Br=hr.match(/color/)?"color":Fr;return ct[hr]?wt==="define"?` -#ifndef HAS_UNIFORM_u_`+hr+` -uniform lowp float u_`+hr+`_t; -attribute `+Kt+" "+Fr+" a_"+hr+`; -varying `+Kt+" "+cr+" "+hr+`; -#else -uniform `+Kt+" "+cr+" u_"+hr+`; -#endif -`:Br==="vec4"?` -#ifndef HAS_UNIFORM_u_`+hr+` - `+hr+" = a_"+hr+`; -#else - `+Kt+" "+cr+" "+hr+" = u_"+hr+`; -#endif -`:` -#ifndef HAS_UNIFORM_u_`+hr+` - `+hr+" = unpack_mix_"+Br+"(a_"+hr+", u_"+hr+`_t); -#else - `+Kt+" "+cr+" "+hr+" = u_"+hr+`; -#endif -`:wt==="define"?` -#ifndef HAS_UNIFORM_u_`+hr+` -uniform lowp float u_`+hr+`_t; -attribute `+Kt+" "+Fr+" a_"+hr+`; -#else -uniform `+Kt+" "+cr+" u_"+hr+`; -#endif -`:Br==="vec4"?` -#ifndef HAS_UNIFORM_u_`+hr+` - `+Kt+" "+cr+" "+hr+" = a_"+hr+`; -#else - `+Kt+" "+cr+" "+hr+" = u_"+hr+`; -#endif -`:` -#ifndef HAS_UNIFORM_u_`+hr+` - `+Kt+" "+cr+" "+hr+" = unpack_mix_"+Br+"(a_"+hr+", u_"+hr+`_t); -#else - `+Kt+" "+cr+" "+hr+" = u_"+hr+`; -#endif -`}),staticAttributes:Z,staticUniforms:Pe}}var Ec=Object.freeze({__proto__:null,prelude:gi,background:ma,backgroundPattern:Yi,circle:ua,clippingMask:La,heatmap:aa,heatmapTexture:ho,collisionBox:Po,collisionCircle:Ms,debug:Mu,fill:vs,fillOutline:Xs,fillOutlinePattern:iu,fillPattern:js,fillExtrusion:Vs,fillExtrusionPattern:sl,hillshadePrepare:al,hillshade:ul,line:_c,lineGradient:Yo,linePattern:No,lineSDF:Ku,raster:Rc,symbolIcon:Wa,symbolSDF:mf,symbolTextAndIcon:yf}),Zf=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function Vu(b){for(var x=[],S=0;S>16,ct>>16],u_pixel_coord_lower:[65535&Pe,65535&ct]}}lc.prototype.draw=function(b,x,S,Z,he,Se,Pe,ct,Ut,wt,Kt,cr,hr,Fr,Br,rn){var Xr,dn=b.gl;if(!this.failedToCreate){for(var Qt in b.program.set(this.program),b.setDepthMode(S),b.setStencilMode(Z),b.setColorMode(he),b.setCullFace(Se),this.fixedUniforms)this.fixedUniforms[Qt].set(Pe[Qt]);Fr&&Fr.setUniforms(b,this.binderUniforms,cr,{zoom:hr});for(var li=(Xr={},Xr[dn.LINES]=2,Xr[dn.TRIANGLES]=3,Xr[dn.LINE_STRIP]=1,Xr)[x],oi=0,pr=Kt.get();oi0?1-1/(1.001-Pe):-Pe),u_contrast_factor:(Se=he.paint.get("raster-contrast"),Se>0?1/(1-Se):1+Se),u_spin_weights:qf(he.paint.get("raster-hue-rotate"))};var Se,Pe};function qf(b){b*=Math.PI/180;var x=Math.sin(b),S=Math.cos(b);return[(2*S+1)/3,(-Math.sqrt(3)*x-S+1)/3,(Math.sqrt(3)*x-S+1)/3]}var Ac,Xf=function(b,x,S,Z,he,Se,Pe,ct,Ut,wt){var Kt=he.transform;return{u_is_size_zoom_constant:+(b==="constant"||b==="source"),u_is_size_feature_constant:+(b==="constant"||b==="camera"),u_size_t:x?x.uSizeT:0,u_size:x?x.uSize:0,u_camera_to_center_distance:Kt.cameraToCenterDistance,u_pitch:Kt.pitch/360*2*Math.PI,u_rotate_symbol:+S,u_aspect_ratio:Kt.width/Kt.height,u_fade_change:he.options.fadeDuration?he.symbolFadeChange:1,u_matrix:Se,u_label_plane_matrix:Pe,u_coord_matrix:ct,u_is_text:+Ut,u_pitch_with_map:+Z,u_texsize:wt,u_texture:0}},_f=function(b,x,S,Z,he,Se,Pe,ct,Ut,wt,Kt){var cr=he.transform;return y.extend(Xf(b,x,S,Z,he,Se,Pe,ct,Ut,wt),{u_gamma_scale:Z?Math.cos(cr._pitch)*cr.cameraToCenterDistance:1,u_device_pixel_ratio:y.browser.devicePixelRatio,u_is_halo:+Kt})},zc=function(b,x,S,Z,he,Se,Pe,ct,Ut,wt){return y.extend(_f(b,x,S,Z,he,Se,Pe,ct,!0,Ut,!0),{u_texsize_icon:wt,u_texture_icon:1})},bh=function(b,x,S){return{u_matrix:b,u_opacity:x,u_color:S}},Nn=function(b,x,S,Z,he,Se){return y.extend(function(Pe,ct,Ut,wt){var Kt=Ut.imageManager.getPattern(Pe.from.toString()),cr=Ut.imageManager.getPattern(Pe.to.toString()),hr=Ut.imageManager.getPixelSize(),Fr=hr.width,Br=hr.height,rn=Math.pow(2,wt.tileID.overscaledZ),Xr=wt.tileSize*Math.pow(2,Ut.transform.tileZoom)/rn,dn=Xr*(wt.tileID.canonical.x+wt.tileID.wrap*rn),Qt=Xr*wt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Kt.tl,u_pattern_br_a:Kt.br,u_pattern_tl_b:cr.tl,u_pattern_br_b:cr.br,u_texsize:[Fr,Br],u_mix:ct.t,u_pattern_size_a:Kt.displaySize,u_pattern_size_b:cr.displaySize,u_scale_a:ct.fromScale,u_scale_b:ct.toScale,u_tile_units_to_pixels:1/ju(wt,1,Ut.transform.tileZoom),u_pixel_coord_upper:[dn>>16,Qt>>16],u_pixel_coord_lower:[65535&dn,65535&Qt]}}(Z,Se,S,he),{u_matrix:b,u_opacity:x})},Pn={fillExtrusion:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_lightpos:new y.Uniform3f(b,x.u_lightpos),u_lightintensity:new y.Uniform1f(b,x.u_lightintensity),u_lightcolor:new y.Uniform3f(b,x.u_lightcolor),u_vertical_gradient:new y.Uniform1f(b,x.u_vertical_gradient),u_opacity:new y.Uniform1f(b,x.u_opacity)}},fillExtrusionPattern:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_lightpos:new y.Uniform3f(b,x.u_lightpos),u_lightintensity:new y.Uniform1f(b,x.u_lightintensity),u_lightcolor:new y.Uniform3f(b,x.u_lightcolor),u_vertical_gradient:new y.Uniform1f(b,x.u_vertical_gradient),u_height_factor:new y.Uniform1f(b,x.u_height_factor),u_image:new y.Uniform1i(b,x.u_image),u_texsize:new y.Uniform2f(b,x.u_texsize),u_pixel_coord_upper:new y.Uniform2f(b,x.u_pixel_coord_upper),u_pixel_coord_lower:new y.Uniform2f(b,x.u_pixel_coord_lower),u_scale:new y.Uniform3f(b,x.u_scale),u_fade:new y.Uniform1f(b,x.u_fade),u_opacity:new y.Uniform1f(b,x.u_opacity)}},fill:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix)}},fillPattern:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_image:new y.Uniform1i(b,x.u_image),u_texsize:new y.Uniform2f(b,x.u_texsize),u_pixel_coord_upper:new y.Uniform2f(b,x.u_pixel_coord_upper),u_pixel_coord_lower:new y.Uniform2f(b,x.u_pixel_coord_lower),u_scale:new y.Uniform3f(b,x.u_scale),u_fade:new y.Uniform1f(b,x.u_fade)}},fillOutline:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_world:new y.Uniform2f(b,x.u_world)}},fillOutlinePattern:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_world:new y.Uniform2f(b,x.u_world),u_image:new y.Uniform1i(b,x.u_image),u_texsize:new y.Uniform2f(b,x.u_texsize),u_pixel_coord_upper:new y.Uniform2f(b,x.u_pixel_coord_upper),u_pixel_coord_lower:new y.Uniform2f(b,x.u_pixel_coord_lower),u_scale:new y.Uniform3f(b,x.u_scale),u_fade:new y.Uniform1f(b,x.u_fade)}},circle:function(b,x){return{u_camera_to_center_distance:new y.Uniform1f(b,x.u_camera_to_center_distance),u_scale_with_map:new y.Uniform1i(b,x.u_scale_with_map),u_pitch_with_map:new y.Uniform1i(b,x.u_pitch_with_map),u_extrude_scale:new y.Uniform2f(b,x.u_extrude_scale),u_device_pixel_ratio:new y.Uniform1f(b,x.u_device_pixel_ratio),u_matrix:new y.UniformMatrix4f(b,x.u_matrix)}},collisionBox:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_camera_to_center_distance:new y.Uniform1f(b,x.u_camera_to_center_distance),u_pixels_to_tile_units:new y.Uniform1f(b,x.u_pixels_to_tile_units),u_extrude_scale:new y.Uniform2f(b,x.u_extrude_scale),u_overscale_factor:new y.Uniform1f(b,x.u_overscale_factor)}},collisionCircle:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_inv_matrix:new y.UniformMatrix4f(b,x.u_inv_matrix),u_camera_to_center_distance:new y.Uniform1f(b,x.u_camera_to_center_distance),u_viewport_size:new y.Uniform2f(b,x.u_viewport_size)}},debug:function(b,x){return{u_color:new y.UniformColor(b,x.u_color),u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_overlay:new y.Uniform1i(b,x.u_overlay),u_overlay_scale:new y.Uniform1f(b,x.u_overlay_scale)}},clippingMask:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix)}},heatmap:function(b,x){return{u_extrude_scale:new y.Uniform1f(b,x.u_extrude_scale),u_intensity:new y.Uniform1f(b,x.u_intensity),u_matrix:new y.UniformMatrix4f(b,x.u_matrix)}},heatmapTexture:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_world:new y.Uniform2f(b,x.u_world),u_image:new y.Uniform1i(b,x.u_image),u_color_ramp:new y.Uniform1i(b,x.u_color_ramp),u_opacity:new y.Uniform1f(b,x.u_opacity)}},hillshade:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_image:new y.Uniform1i(b,x.u_image),u_latrange:new y.Uniform2f(b,x.u_latrange),u_light:new y.Uniform2f(b,x.u_light),u_shadow:new y.UniformColor(b,x.u_shadow),u_highlight:new y.UniformColor(b,x.u_highlight),u_accent:new y.UniformColor(b,x.u_accent)}},hillshadePrepare:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_image:new y.Uniform1i(b,x.u_image),u_dimension:new y.Uniform2f(b,x.u_dimension),u_zoom:new y.Uniform1f(b,x.u_zoom),u_unpack:new y.Uniform4f(b,x.u_unpack)}},line:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_ratio:new y.Uniform1f(b,x.u_ratio),u_device_pixel_ratio:new y.Uniform1f(b,x.u_device_pixel_ratio),u_units_to_pixels:new y.Uniform2f(b,x.u_units_to_pixels)}},lineGradient:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_ratio:new y.Uniform1f(b,x.u_ratio),u_device_pixel_ratio:new y.Uniform1f(b,x.u_device_pixel_ratio),u_units_to_pixels:new y.Uniform2f(b,x.u_units_to_pixels),u_image:new y.Uniform1i(b,x.u_image),u_image_height:new y.Uniform1f(b,x.u_image_height)}},linePattern:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_texsize:new y.Uniform2f(b,x.u_texsize),u_ratio:new y.Uniform1f(b,x.u_ratio),u_device_pixel_ratio:new y.Uniform1f(b,x.u_device_pixel_ratio),u_image:new y.Uniform1i(b,x.u_image),u_units_to_pixels:new y.Uniform2f(b,x.u_units_to_pixels),u_scale:new y.Uniform3f(b,x.u_scale),u_fade:new y.Uniform1f(b,x.u_fade)}},lineSDF:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_ratio:new y.Uniform1f(b,x.u_ratio),u_device_pixel_ratio:new y.Uniform1f(b,x.u_device_pixel_ratio),u_units_to_pixels:new y.Uniform2f(b,x.u_units_to_pixels),u_patternscale_a:new y.Uniform2f(b,x.u_patternscale_a),u_patternscale_b:new y.Uniform2f(b,x.u_patternscale_b),u_sdfgamma:new y.Uniform1f(b,x.u_sdfgamma),u_image:new y.Uniform1i(b,x.u_image),u_tex_y_a:new y.Uniform1f(b,x.u_tex_y_a),u_tex_y_b:new y.Uniform1f(b,x.u_tex_y_b),u_mix:new y.Uniform1f(b,x.u_mix)}},raster:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_tl_parent:new y.Uniform2f(b,x.u_tl_parent),u_scale_parent:new y.Uniform1f(b,x.u_scale_parent),u_buffer_scale:new y.Uniform1f(b,x.u_buffer_scale),u_fade_t:new y.Uniform1f(b,x.u_fade_t),u_opacity:new y.Uniform1f(b,x.u_opacity),u_image0:new y.Uniform1i(b,x.u_image0),u_image1:new y.Uniform1i(b,x.u_image1),u_brightness_low:new y.Uniform1f(b,x.u_brightness_low),u_brightness_high:new y.Uniform1f(b,x.u_brightness_high),u_saturation_factor:new y.Uniform1f(b,x.u_saturation_factor),u_contrast_factor:new y.Uniform1f(b,x.u_contrast_factor),u_spin_weights:new y.Uniform3f(b,x.u_spin_weights)}},symbolIcon:function(b,x){return{u_is_size_zoom_constant:new y.Uniform1i(b,x.u_is_size_zoom_constant),u_is_size_feature_constant:new y.Uniform1i(b,x.u_is_size_feature_constant),u_size_t:new y.Uniform1f(b,x.u_size_t),u_size:new y.Uniform1f(b,x.u_size),u_camera_to_center_distance:new y.Uniform1f(b,x.u_camera_to_center_distance),u_pitch:new y.Uniform1f(b,x.u_pitch),u_rotate_symbol:new y.Uniform1i(b,x.u_rotate_symbol),u_aspect_ratio:new y.Uniform1f(b,x.u_aspect_ratio),u_fade_change:new y.Uniform1f(b,x.u_fade_change),u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_label_plane_matrix:new y.UniformMatrix4f(b,x.u_label_plane_matrix),u_coord_matrix:new y.UniformMatrix4f(b,x.u_coord_matrix),u_is_text:new y.Uniform1i(b,x.u_is_text),u_pitch_with_map:new y.Uniform1i(b,x.u_pitch_with_map),u_texsize:new y.Uniform2f(b,x.u_texsize),u_texture:new y.Uniform1i(b,x.u_texture)}},symbolSDF:function(b,x){return{u_is_size_zoom_constant:new y.Uniform1i(b,x.u_is_size_zoom_constant),u_is_size_feature_constant:new y.Uniform1i(b,x.u_is_size_feature_constant),u_size_t:new y.Uniform1f(b,x.u_size_t),u_size:new y.Uniform1f(b,x.u_size),u_camera_to_center_distance:new y.Uniform1f(b,x.u_camera_to_center_distance),u_pitch:new y.Uniform1f(b,x.u_pitch),u_rotate_symbol:new y.Uniform1i(b,x.u_rotate_symbol),u_aspect_ratio:new y.Uniform1f(b,x.u_aspect_ratio),u_fade_change:new y.Uniform1f(b,x.u_fade_change),u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_label_plane_matrix:new y.UniformMatrix4f(b,x.u_label_plane_matrix),u_coord_matrix:new y.UniformMatrix4f(b,x.u_coord_matrix),u_is_text:new y.Uniform1i(b,x.u_is_text),u_pitch_with_map:new y.Uniform1i(b,x.u_pitch_with_map),u_texsize:new y.Uniform2f(b,x.u_texsize),u_texture:new y.Uniform1i(b,x.u_texture),u_gamma_scale:new y.Uniform1f(b,x.u_gamma_scale),u_device_pixel_ratio:new y.Uniform1f(b,x.u_device_pixel_ratio),u_is_halo:new y.Uniform1i(b,x.u_is_halo)}},symbolTextAndIcon:function(b,x){return{u_is_size_zoom_constant:new y.Uniform1i(b,x.u_is_size_zoom_constant),u_is_size_feature_constant:new y.Uniform1i(b,x.u_is_size_feature_constant),u_size_t:new y.Uniform1f(b,x.u_size_t),u_size:new y.Uniform1f(b,x.u_size),u_camera_to_center_distance:new y.Uniform1f(b,x.u_camera_to_center_distance),u_pitch:new y.Uniform1f(b,x.u_pitch),u_rotate_symbol:new y.Uniform1i(b,x.u_rotate_symbol),u_aspect_ratio:new y.Uniform1f(b,x.u_aspect_ratio),u_fade_change:new y.Uniform1f(b,x.u_fade_change),u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_label_plane_matrix:new y.UniformMatrix4f(b,x.u_label_plane_matrix),u_coord_matrix:new y.UniformMatrix4f(b,x.u_coord_matrix),u_is_text:new y.Uniform1i(b,x.u_is_text),u_pitch_with_map:new y.Uniform1i(b,x.u_pitch_with_map),u_texsize:new y.Uniform2f(b,x.u_texsize),u_texsize_icon:new y.Uniform2f(b,x.u_texsize_icon),u_texture:new y.Uniform1i(b,x.u_texture),u_texture_icon:new y.Uniform1i(b,x.u_texture_icon),u_gamma_scale:new y.Uniform1f(b,x.u_gamma_scale),u_device_pixel_ratio:new y.Uniform1f(b,x.u_device_pixel_ratio),u_is_halo:new y.Uniform1i(b,x.u_is_halo)}},background:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_opacity:new y.Uniform1f(b,x.u_opacity),u_color:new y.UniformColor(b,x.u_color)}},backgroundPattern:function(b,x){return{u_matrix:new y.UniformMatrix4f(b,x.u_matrix),u_opacity:new y.Uniform1f(b,x.u_opacity),u_image:new y.Uniform1i(b,x.u_image),u_pattern_tl_a:new y.Uniform2f(b,x.u_pattern_tl_a),u_pattern_br_a:new y.Uniform2f(b,x.u_pattern_br_a),u_pattern_tl_b:new y.Uniform2f(b,x.u_pattern_tl_b),u_pattern_br_b:new y.Uniform2f(b,x.u_pattern_br_b),u_texsize:new y.Uniform2f(b,x.u_texsize),u_mix:new y.Uniform1f(b,x.u_mix),u_pattern_size_a:new y.Uniform2f(b,x.u_pattern_size_a),u_pattern_size_b:new y.Uniform2f(b,x.u_pattern_size_b),u_scale_a:new y.Uniform1f(b,x.u_scale_a),u_scale_b:new y.Uniform1f(b,x.u_scale_b),u_pixel_coord_upper:new y.Uniform2f(b,x.u_pixel_coord_upper),u_pixel_coord_lower:new y.Uniform2f(b,x.u_pixel_coord_lower),u_tile_units_to_pixels:new y.Uniform1f(b,x.u_tile_units_to_pixels)}}};function xi(b,x,S,Z,he,Se,Pe){for(var ct=b.context,Ut=ct.gl,wt=b.useProgram("collisionBox"),Kt=[],cr=0,hr=0,Fr=0;Fr0){var oi=y.create(),pr=dn;y.mul(oi,Xr.placementInvProjMatrix,b.transform.glCoordMatrix),y.mul(oi,oi,Xr.placementViewportMatrix),Kt.push({circleArray:li,circleOffset:hr,transform:pr,invTransform:oi}),hr=cr+=li.length/4}Qt&&wt.draw(ct,Ut.LINES,Zt.disabled,rr.disabled,b.colorModeForRenderPass(),mr.disabled,qu(dn,b.transform,rn),S.id,Qt.layoutVertexBuffer,Qt.indexBuffer,Qt.segments,null,b.transform.zoom,null,null,Qt.collisionVertexBuffer)}}if(Pe&&Kt.length){var di=b.useProgram("collisionCircle"),Ji=new y.StructArrayLayout2f1f2i16;Ji.resize(4*cr),Ji._trim();for(var ja=0,no=0,Ss=Kt;no=0&&(Br[Xr.associatedIconIndex]={shiftedAnchor:Ji,angle:ja})}else Js(Xr.numGlyphs,hr)}if(Kt){Fr.clear();for(var Ss=b.icon.placedSymbolArray,tu=0;tu0){var Pe=y.browser.now(),ct=(Pe-b.timeAdded)/Se,Ut=x?(Pe-x.timeAdded)/Se:-1,wt=S.getSource(),Kt=he.coveringZoomLevel({tileSize:wt.tileSize,roundZoom:wt.roundZoom}),cr=!x||Math.abs(x.tileID.overscaledZ-Kt)>Math.abs(b.tileID.overscaledZ-Kt),hr=cr&&b.refreshedUponExpiration?1:y.clamp(cr?ct:1-Ut,0,1);return b.refreshedUponExpiration&&ct>=1&&(b.refreshedUponExpiration=!1),x?{opacity:1,mix:1-hr}:{opacity:hr,mix:0}}return{opacity:1,mix:0}}var fc=new y.Color(1,0,0,1),Lu=new y.Color(0,1,0,1),su=new y.Color(0,0,1,1),Ys=new y.Color(1,0,1,1),_s=new y.Color(0,1,1,1);function Fs(b,x,S,Z){Sl(b,0,x+S/2,b.transform.width,S,Z)}function Qu(b,x,S,Z){Sl(b,x-S/2,0,S,b.transform.height,Z)}function Sl(b,x,S,Z,he,Se){var Pe=b.context,ct=Pe.gl;ct.enable(ct.SCISSOR_TEST),ct.scissor(x*y.browser.devicePixelRatio,S*y.browser.devicePixelRatio,Z*y.browser.devicePixelRatio,he*y.browser.devicePixelRatio),Pe.clear({color:Se}),ct.disable(ct.SCISSOR_TEST)}function nc(b,x,S){var Z=b.context,he=Z.gl,Se=S.posMatrix,Pe=b.useProgram("debug"),ct=Zt.disabled,Ut=rr.disabled,wt=b.colorModeForRenderPass();Z.activeTexture.set(he.TEXTURE0),b.emptyTexture.bind(he.LINEAR,he.CLAMP_TO_EDGE),Pe.draw(Z,he.LINE_STRIP,ct,Ut,wt,mr.disabled,rc(Se,y.Color.red),"$debug",b.debugBuffer,b.tileBorderIndexBuffer,b.debugSegments);var Kt=x.getTileByID(S.key).latestRawTileData,cr=Math.floor((Kt&&Kt.byteLength||0)/1024),hr=x.getTile(S).tileSize,Fr=512/Math.min(hr,512)*(S.overscaledZ/b.transform.zoom)*.5,Br=S.canonical.toString();S.overscaledZ!==S.canonical.z&&(Br+=" => "+S.overscaledZ),function(rn,Xr){rn.initDebugOverlayCanvas();var dn=rn.debugOverlayCanvas,Qt=rn.context.gl,li=rn.debugOverlayCanvas.getContext("2d");li.clearRect(0,0,dn.width,dn.height),li.shadowColor="white",li.shadowBlur=2,li.lineWidth=1.5,li.strokeStyle="white",li.textBaseline="top",li.font="bold 36px Open Sans, sans-serif",li.fillText(Xr,5,5),li.strokeText(Xr,5,5),rn.debugOverlayTexture.update(dn),rn.debugOverlayTexture.bind(Qt.LINEAR,Qt.CLAMP_TO_EDGE)}(b,Br+" "+cr+"kb"),Pe.draw(Z,he.TRIANGLES,ct,Ut,fr.alphaBlended,mr.disabled,rc(Se,y.Color.transparent,Fr),"$debug",b.debugBuffer,b.quadTriangleIndexBuffer,b.debugSegments)}var dl={symbol:function(b,x,S,Z,he){if(b.renderPass==="translucent"){var Se=rr.disabled,Pe=b.colorModeForRenderPass();S.layout.get("text-variable-anchor")&&function(ct,Ut,wt,Kt,cr,hr,Fr){for(var Br=Ut.transform,rn=cr==="map",Xr=hr==="map",dn=0,Qt=ct;dn256&&this.clearStencil(),S.setColorMode(fr.disabled),S.setDepthMode(Zt.disabled);var he=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Se=0,Pe=x;Se256&&this.clearStencil();var b=this.nextStencilID++,x=this.context.gl;return new rr({func:x.NOTEQUAL,mask:255},b,255,x.KEEP,x.KEEP,x.REPLACE)},Ml.prototype.stencilModeForClipping=function(b){var x=this.context.gl;return new rr({func:x.EQUAL,mask:255},this._tileClippingMaskIDs[b.key],0,x.KEEP,x.KEEP,x.REPLACE)},Ml.prototype.stencilConfigForOverlap=function(b){var x,S=this.context.gl,Z=b.sort(function(Ut,wt){return wt.overscaledZ-Ut.overscaledZ}),he=Z[Z.length-1].overscaledZ,Se=Z[0].overscaledZ-he+1;if(Se>1){this.currentStencilSource=void 0,this.nextStencilID+Se>256&&this.clearStencil();for(var Pe={},ct=0;ct=0;this.currentLayer--){var li=this.style._layers[Z[this.currentLayer]],oi=he[li.source],pr=wt[li.source];this._renderTileClippingMasks(li,pr),this.renderLayer(this,oi,li,pr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?x.pop():null},Ml.prototype.isPatternMissing=function(b){if(!b)return!1;if(!b.from||!b.to)return!0;var x=this.imageManager.getPattern(b.from.toString()),S=this.imageManager.getPattern(b.to.toString());return!x||!S},Ml.prototype.useProgram=function(b,x){this.cache=this.cache||{};var S=""+b+(x?x.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[S]||(this.cache[S]=new lc(this.context,b,Ec[b],x,Pn[b],this._showOverdrawInspector)),this.cache[S]},Ml.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Ml.prototype.setBaseState=function(){var b=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(b.FUNC_ADD)},Ml.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=y.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new y.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},Ml.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Vc=function(b,x){this.points=b,this.planes=x};Vc.fromInvProjectionMatrix=function(b,x,S){var Z=Math.pow(2,S),he=[[-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(function(Pe){return y.transformMat4([],Pe,b)}).map(function(Pe){return y.scale$1([],Pe,1/Pe[3]/x*Z)}),Se=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(Pe){var ct=y.sub([],he[Pe[0]],he[Pe[1]]),Ut=y.sub([],he[Pe[2]],he[Pe[1]]),wt=y.normalize([],y.cross([],ct,Ut)),Kt=-y.dot(wt,he[Pe[1]]);return wt.concat(Kt)});return new Vc(he,Se)};var kl=function(b,x){this.min=b,this.max=x,this.center=y.scale$2([],y.add([],this.min,this.max),.5)};kl.prototype.quadrant=function(b){for(var x=[b%2==0,b<2],S=y.clone$2(this.min),Z=y.clone$2(this.max),he=0;he=0;if(Se===0)return 0;Se!==x.length&&(S=!1)}if(S)return 2;for(var ct=0;ct<3;ct++){for(var Ut=Number.MAX_VALUE,wt=-Number.MAX_VALUE,Kt=0;Ktthis.max[ct]-this.min[ct])return 0}return 1};var Qf=function(b,x,S,Z){if(b===void 0&&(b=0),x===void 0&&(x=0),S===void 0&&(S=0),Z===void 0&&(Z=0),isNaN(b)||b<0||isNaN(x)||x<0||isNaN(S)||S<0||isNaN(Z)||Z<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=b,this.bottom=x,this.left=S,this.right=Z};Qf.prototype.interpolate=function(b,x,S){return x.top!=null&&b.top!=null&&(this.top=y.number(b.top,x.top,S)),x.bottom!=null&&b.bottom!=null&&(this.bottom=y.number(b.bottom,x.bottom,S)),x.left!=null&&b.left!=null&&(this.left=y.number(b.left,x.left,S)),x.right!=null&&b.right!=null&&(this.right=y.number(b.right,x.right,S)),this},Qf.prototype.getCenter=function(b,x){var S=y.clamp((this.left+b-this.right)/2,0,b),Z=y.clamp((this.top+x-this.bottom)/2,0,x);return new y.Point(S,Z)},Qf.prototype.equals=function(b){return this.top===b.top&&this.bottom===b.bottom&&this.left===b.left&&this.right===b.right},Qf.prototype.clone=function(){return new Qf(this.top,this.bottom,this.left,this.right)},Qf.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var ds=function(b,x,S,Z,he){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=he===void 0||he,this._minZoom=b||0,this._maxZoom=x||22,this._minPitch=S==null?0:S,this._maxPitch=Z==null?60:Z,this.setMaxBounds(),this.width=0,this.height=0,this._center=new y.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Qf,this._posMatrixCache={},this._alignedPosMatrixCache={}},Eu={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};ds.prototype.clone=function(){var b=new ds(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return b.tileSize=this.tileSize,b.latRange=this.latRange,b.width=this.width,b.height=this.height,b._center=this._center,b.zoom=this.zoom,b.angle=this.angle,b._fov=this._fov,b._pitch=this._pitch,b._unmodified=this._unmodified,b._edgeInsets=this._edgeInsets.clone(),b._calcMatrices(),b},Eu.minZoom.get=function(){return this._minZoom},Eu.minZoom.set=function(b){this._minZoom!==b&&(this._minZoom=b,this.zoom=Math.max(this.zoom,b))},Eu.maxZoom.get=function(){return this._maxZoom},Eu.maxZoom.set=function(b){this._maxZoom!==b&&(this._maxZoom=b,this.zoom=Math.min(this.zoom,b))},Eu.minPitch.get=function(){return this._minPitch},Eu.minPitch.set=function(b){this._minPitch!==b&&(this._minPitch=b,this.pitch=Math.max(this.pitch,b))},Eu.maxPitch.get=function(){return this._maxPitch},Eu.maxPitch.set=function(b){this._maxPitch!==b&&(this._maxPitch=b,this.pitch=Math.min(this.pitch,b))},Eu.renderWorldCopies.get=function(){return this._renderWorldCopies},Eu.renderWorldCopies.set=function(b){b===void 0?b=!0:b===null&&(b=!1),this._renderWorldCopies=b},Eu.worldSize.get=function(){return this.tileSize*this.scale},Eu.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Eu.size.get=function(){return new y.Point(this.width,this.height)},Eu.bearing.get=function(){return-this.angle/Math.PI*180},Eu.bearing.set=function(b){var x=-y.wrap(b,-180,180)*Math.PI/180;this.angle!==x&&(this._unmodified=!1,this.angle=x,this._calcMatrices(),this.rotationMatrix=y.create$2(),y.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Eu.pitch.get=function(){return this._pitch/Math.PI*180},Eu.pitch.set=function(b){var x=y.clamp(b,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==x&&(this._unmodified=!1,this._pitch=x,this._calcMatrices())},Eu.fov.get=function(){return this._fov/Math.PI*180},Eu.fov.set=function(b){b=Math.max(.01,Math.min(60,b)),this._fov!==b&&(this._unmodified=!1,this._fov=b/180*Math.PI,this._calcMatrices())},Eu.zoom.get=function(){return this._zoom},Eu.zoom.set=function(b){var x=Math.min(Math.max(b,this.minZoom),this.maxZoom);this._zoom!==x&&(this._unmodified=!1,this._zoom=x,this.scale=this.zoomScale(x),this.tileZoom=Math.floor(x),this.zoomFraction=x-this.tileZoom,this._constrain(),this._calcMatrices())},Eu.center.get=function(){return this._center},Eu.center.set=function(b){b.lat===this._center.lat&&b.lng===this._center.lng||(this._unmodified=!1,this._center=b,this._constrain(),this._calcMatrices())},Eu.padding.get=function(){return this._edgeInsets.toJSON()},Eu.padding.set=function(b){this._edgeInsets.equals(b)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,b,1),this._calcMatrices())},Eu.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},ds.prototype.isPaddingEqual=function(b){return this._edgeInsets.equals(b)},ds.prototype.interpolatePadding=function(b,x,S){this._unmodified=!1,this._edgeInsets.interpolate(b,x,S),this._constrain(),this._calcMatrices()},ds.prototype.coveringZoomLevel=function(b){var x=(b.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/b.tileSize));return Math.max(0,x)},ds.prototype.getVisibleUnwrappedCoordinates=function(b){var x=[new y.UnwrappedTileID(0,b)];if(this._renderWorldCopies)for(var S=this.pointCoordinate(new y.Point(0,0)),Z=this.pointCoordinate(new y.Point(this.width,0)),he=this.pointCoordinate(new y.Point(this.width,this.height)),Se=this.pointCoordinate(new y.Point(0,this.height)),Pe=Math.floor(Math.min(S.x,Z.x,he.x,Se.x)),ct=Math.floor(Math.max(S.x,Z.x,he.x,Se.x)),Ut=Pe-1;Ut<=ct+1;Ut++)Ut!==0&&x.push(new y.UnwrappedTileID(Ut,b));return x},ds.prototype.coveringTiles=function(b){var x=this.coveringZoomLevel(b),S=x;if(b.minzoom!==void 0&&xb.maxzoom&&(x=b.maxzoom);var Z=y.MercatorCoordinate.fromLngLat(this.center),he=Math.pow(2,x),Se=[he*Z.x,he*Z.y,0],Pe=Vc.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,x),ct=b.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(ct=x);var Ut=function(no){return{aabb:new kl([no*he,0,0],[(no+1)*he,he,0]),zoom:0,x:0,y:0,wrap:no,fullyVisible:!1}},wt=[],Kt=[],cr=x,hr=b.reparseOverscaled?S:x;if(this._renderWorldCopies)for(var Fr=1;Fr<=3;Fr++)wt.push(Ut(-Fr)),wt.push(Ut(Fr));for(wt.push(Ut(0));wt.length>0;){var Br=wt.pop(),rn=Br.x,Xr=Br.y,dn=Br.fullyVisible;if(!dn){var Qt=Br.aabb.intersects(Pe);if(Qt===0)continue;dn=Qt===2}var li=Br.aabb.distanceX(Se),oi=Br.aabb.distanceY(Se),pr=Math.max(Math.abs(li),Math.abs(oi));if(Br.zoom===cr||pr>3+(1<=ct)Kt.push({tileID:new y.OverscaledTileID(Br.zoom===cr?hr:Br.zoom,Br.wrap,Br.zoom,rn,Xr),distanceSq:y.sqrLen([Se[0]-.5-rn,Se[1]-.5-Xr])});else for(var di=0;di<4;di++){var Ji=(rn<<1)+di%2,ja=(Xr<<1)+(di>>1);wt.push({aabb:Br.aabb.quadrant(di),zoom:Br.zoom+1,x:Ji,y:ja,wrap:Br.wrap,fullyVisible:dn})}}return Kt.sort(function(no,Ss){return no.distanceSq-Ss.distanceSq}).map(function(no){return no.tileID})},ds.prototype.resize=function(b,x){this.width=b,this.height=x,this.pixelsToGLUnits=[2/b,-2/x],this._constrain(),this._calcMatrices()},Eu.unmodified.get=function(){return this._unmodified},ds.prototype.zoomScale=function(b){return Math.pow(2,b)},ds.prototype.scaleZoom=function(b){return Math.log(b)/Math.LN2},ds.prototype.project=function(b){var x=y.clamp(b.lat,-this.maxValidLatitude,this.maxValidLatitude);return new y.Point(y.mercatorXfromLng(b.lng)*this.worldSize,y.mercatorYfromLat(x)*this.worldSize)},ds.prototype.unproject=function(b){return new y.MercatorCoordinate(b.x/this.worldSize,b.y/this.worldSize).toLngLat()},Eu.point.get=function(){return this.project(this.center)},ds.prototype.setLocationAtPoint=function(b,x){var S=this.pointCoordinate(x),Z=this.pointCoordinate(this.centerPoint),he=this.locationCoordinate(b),Se=new y.MercatorCoordinate(he.x-(S.x-Z.x),he.y-(S.y-Z.y));this.center=this.coordinateLocation(Se),this._renderWorldCopies&&(this.center=this.center.wrap())},ds.prototype.locationPoint=function(b){return this.coordinatePoint(this.locationCoordinate(b))},ds.prototype.pointLocation=function(b){return this.coordinateLocation(this.pointCoordinate(b))},ds.prototype.locationCoordinate=function(b){return y.MercatorCoordinate.fromLngLat(b)},ds.prototype.coordinateLocation=function(b){return b.toLngLat()},ds.prototype.pointCoordinate=function(b){var x=[b.x,b.y,0,1],S=[b.x,b.y,1,1];y.transformMat4(x,x,this.pixelMatrixInverse),y.transformMat4(S,S,this.pixelMatrixInverse);var Z=x[3],he=S[3],Se=x[1]/Z,Pe=S[1]/he,ct=x[2]/Z,Ut=S[2]/he,wt=ct===Ut?0:(0-ct)/(Ut-ct);return new y.MercatorCoordinate(y.number(x[0]/Z,S[0]/he,wt)/this.worldSize,y.number(Se,Pe,wt)/this.worldSize)},ds.prototype.coordinatePoint=function(b){var x=[b.x*this.worldSize,b.y*this.worldSize,0,1];return y.transformMat4(x,x,this.pixelMatrix),new y.Point(x[0]/x[3],x[1]/x[3])},ds.prototype.getBounds=function(){return new y.LngLatBounds().extend(this.pointLocation(new y.Point(0,0))).extend(this.pointLocation(new y.Point(this.width,0))).extend(this.pointLocation(new y.Point(this.width,this.height))).extend(this.pointLocation(new y.Point(0,this.height)))},ds.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new y.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},ds.prototype.setMaxBounds=function(b){b?(this.lngRange=[b.getWest(),b.getEast()],this.latRange=[b.getSouth(),b.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},ds.prototype.calculatePosMatrix=function(b,x){x===void 0&&(x=!1);var S=b.key,Z=x?this._alignedPosMatrixCache:this._posMatrixCache;if(Z[S])return Z[S];var he=b.canonical,Se=this.worldSize/this.zoomScale(he.z),Pe=he.x+Math.pow(2,he.z)*b.wrap,ct=y.identity(new Float64Array(16));return y.translate(ct,ct,[Pe*Se,he.y*Se,0]),y.scale(ct,ct,[Se/y.EXTENT,Se/y.EXTENT,1]),y.multiply(ct,x?this.alignedProjMatrix:this.projMatrix,ct),Z[S]=new Float32Array(ct),Z[S]},ds.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},ds.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var b,x,S,Z,he=-90,Se=90,Pe=-180,ct=180,Ut=this.size,wt=this._unmodified;if(this.latRange){var Kt=this.latRange;he=y.mercatorYfromLat(Kt[1])*this.worldSize,b=(Se=y.mercatorYfromLat(Kt[0])*this.worldSize)-heSe&&(Z=Se-rn)}if(this.lngRange){var Xr=hr.x,dn=Ut.x/2;Xr-dnct&&(S=ct-dn)}S===void 0&&Z===void 0||(this.center=this.unproject(new y.Point(S!==void 0?S:hr.x,Z!==void 0?Z:hr.y))),this._unmodified=wt,this._constraining=!1}},ds.prototype._calcMatrices=function(){if(this.height){var b=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var x=Math.PI/2+this._pitch,S=this._fov*(.5+b.y/this.height),Z=Math.sin(S)*this.cameraToCenterDistance/Math.sin(y.clamp(Math.PI-x-S,.01,Math.PI-.01)),he=this.point,Se=he.x,Pe=he.y,ct=1.01*(Math.cos(Math.PI/2-this._pitch)*Z+this.cameraToCenterDistance),Ut=this.height/50,wt=new Float64Array(16);y.perspective(wt,this._fov,this.width/this.height,Ut,ct),wt[8]=2*-b.x/this.width,wt[9]=2*b.y/this.height,y.scale(wt,wt,[1,-1,1]),y.translate(wt,wt,[0,0,-this.cameraToCenterDistance]),y.rotateX(wt,wt,this._pitch),y.rotateZ(wt,wt,this.angle),y.translate(wt,wt,[-Se,-Pe,0]),this.mercatorMatrix=y.scale([],wt,[this.worldSize,this.worldSize,this.worldSize]),y.scale(wt,wt,[1,1,y.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=wt,this.invProjMatrix=y.invert([],this.projMatrix);var Kt=this.width%2/2,cr=this.height%2/2,hr=Math.cos(this.angle),Fr=Math.sin(this.angle),Br=Se-Math.round(Se)+hr*Kt+Fr*cr,rn=Pe-Math.round(Pe)+hr*cr+Fr*Kt,Xr=new Float64Array(wt);if(y.translate(Xr,Xr,[Br>.5?Br-1:Br,rn>.5?rn-1:rn,0]),this.alignedProjMatrix=Xr,wt=y.create(),y.scale(wt,wt,[this.width/2,-this.height/2,1]),y.translate(wt,wt,[1,-1,0]),this.labelPlaneMatrix=wt,wt=y.create(),y.scale(wt,wt,[1,-1,1]),y.translate(wt,wt,[-1,-1,0]),y.scale(wt,wt,[2/this.width,2/this.height,1]),this.glCoordMatrix=wt,this.pixelMatrix=y.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(wt=y.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=wt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},ds.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var b=this.pointCoordinate(new y.Point(0,0)),x=[b.x*this.worldSize,b.y*this.worldSize,0,1];return y.transformMat4(x,x,this.pixelMatrix)[3]/this.cameraToCenterDistance},ds.prototype.getCameraPoint=function(){var b=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new y.Point(0,b))},ds.prototype.getCameraQueryGeometry=function(b){var x=this.getCameraPoint();if(b.length===1)return[b[0],x];for(var S=x.x,Z=x.y,he=x.x,Se=x.y,Pe=0,ct=b;Pe=3&&!b.some(function(S){return isNaN(S)})){var x=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(b[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+b[2],+b[1]],zoom:+b[0],bearing:x,pitch:+(b[4]||0)}),!0}return!1},Rl.prototype._updateHashUnthrottled=function(){var b=y.window.location.href.replace(/(#.+)?$/,this.getHashString());try{y.window.history.replaceState(y.window.history.state,null,b)}catch(x){}};var Fc={linearity:.3,easing:y.bezier(0,0,.3,1)},Yc=y.extend({deceleration:2500,maxSpeed:1400},Fc),xh=y.extend({deceleration:20,maxSpeed:1400},Fc),Lf=y.extend({deceleration:1e3,maxSpeed:360},Fc),If=y.extend({deceleration:1e3,maxSpeed:90},Fc),wd=function(b){this._map=b,this.clear()};function _h(b,x){(!b.duration||b.duration0&&x-b[0].time>160;)b.shift()},wd.prototype._onMoveEnd=function(b){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var x={zoom:0,bearing:0,pitch:0,pan:new y.Point(0,0),pinchAround:void 0,around:void 0},S=0,Z=this._inertiaBuffer;S=this._clickTolerance||this._map.fire(new af(b.type,this._map,b))},_u.prototype.dblclick=function(b){return this._firePreventable(new af(b.type,this._map,b))},_u.prototype.mouseover=function(b){this._map.fire(new af(b.type,this._map,b))},_u.prototype.mouseout=function(b){this._map.fire(new af(b.type,this._map,b))},_u.prototype.touchstart=function(b){return this._firePreventable(new cd(b.type,this._map,b))},_u.prototype.touchmove=function(b){this._map.fire(new cd(b.type,this._map,b))},_u.prototype.touchend=function(b){this._map.fire(new cd(b.type,this._map,b))},_u.prototype.touchcancel=function(b){this._map.fire(new cd(b.type,this._map,b))},_u.prototype._firePreventable=function(b){if(this._map.fire(b),b.defaultPrevented)return{}},_u.prototype.isEnabled=function(){return!0},_u.prototype.isActive=function(){return!1},_u.prototype.enable=function(){},_u.prototype.disable=function(){};var Ls=function(b){this._map=b};Ls.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ls.prototype.mousemove=function(b){this._map.fire(new af(b.type,this._map,b))},Ls.prototype.mousedown=function(){this._delayContextMenu=!0},Ls.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new af("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ls.prototype.contextmenu=function(b){this._delayContextMenu?this._contextMenuEvent=b:this._map.fire(new af(b.type,this._map,b)),this._map.listens("contextmenu")&&b.preventDefault()},Ls.prototype.isEnabled=function(){return!0},Ls.prototype.isActive=function(){return!1},Ls.prototype.enable=function(){},Ls.prototype.disable=function(){};var Af=function(b,x){this._map=b,this._el=b.getCanvasContainer(),this._container=b.getContainer(),this._clickTolerance=x.clickTolerance||1};function fd(b,x){for(var S={},Z=0;Zthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=b.timeStamp),S.length===this.numTouches&&(this.centroid=function(Z){for(var he=new y.Point(0,0),Se=0,Pe=Z;Se30)&&(this.aborted=!0)}}},Qi.prototype.touchend=function(b,x,S){if((!this.centroid||b.timeStamp-this.startTime>500)&&(this.aborted=!0),S.length===0){var Z=!this.aborted&&this.centroid;if(this.reset(),Z)return Z}};var Gr=function(b){this.singleTap=new Qi(b),this.numTaps=b.numTaps,this.reset()};Gr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Gr.prototype.touchstart=function(b,x,S){this.singleTap.touchstart(b,x,S)},Gr.prototype.touchmove=function(b,x,S){this.singleTap.touchmove(b,x,S)},Gr.prototype.touchend=function(b,x,S){var Z=this.singleTap.touchend(b,x,S);if(Z){var he=b.timeStamp-this.lastTime<500,Se=!this.lastTap||this.lastTap.dist(Z)<30;if(he&&Se||this.reset(),this.count++,this.lastTime=b.timeStamp,this.lastTap=Z,this.count===this.numTaps)return this.reset(),Z}};var of=function(){this._zoomIn=new Gr({numTouches:1,numTaps:2}),this._zoomOut=new Gr({numTouches:2,numTaps:1}),this.reset()};of.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},of.prototype.touchstart=function(b,x,S){this._zoomIn.touchstart(b,x,S),this._zoomOut.touchstart(b,x,S)},of.prototype.touchmove=function(b,x,S){this._zoomIn.touchmove(b,x,S),this._zoomOut.touchmove(b,x,S)},of.prototype.touchend=function(b,x,S){var Z=this,he=this._zoomIn.touchend(b,x,S),Se=this._zoomOut.touchend(b,x,S);return he?(this._active=!0,b.preventDefault(),setTimeout(function(){return Z.reset()},0),{cameraAnimation:function(Pe){return Pe.easeTo({duration:300,zoom:Pe.getZoom()+1,around:Pe.unproject(he)},{originalEvent:b})}}):Se?(this._active=!0,b.preventDefault(),setTimeout(function(){return Z.reset()},0),{cameraAnimation:function(Pe){return Pe.easeTo({duration:300,zoom:Pe.getZoom()-1,around:Pe.unproject(Se)},{originalEvent:b})}}):void 0},of.prototype.touchcancel=function(){this.reset()},of.prototype.enable=function(){this._enabled=!0},of.prototype.disable=function(){this._enabled=!1,this.reset()},of.prototype.isEnabled=function(){return this._enabled},of.prototype.isActive=function(){return this._active};var Qr={0:1,2:2},is=function(b){this.reset(),this._clickTolerance=b.clickTolerance||1};is.prototype.blur=function(){this.reset()},is.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},is.prototype._correctButton=function(b,x){return!1},is.prototype._move=function(b,x){return{}},is.prototype.mousedown=function(b,x){if(!this._lastPoint){var S=$.mouseButton(b);this._correctButton(b,S)&&(this._lastPoint=x,this._eventButton=S)}},is.prototype.mousemoveWindow=function(b,x){var S=this._lastPoint;if(S){if(b.preventDefault(),function(Z,he){var Se=Qr[he];return Z.buttons===void 0||(Z.buttons&Se)!==Se}(b,this._eventButton))this.reset();else if(this._moved||!(x.dist(S)0&&(this._active=!0);var Z=fd(S,x),he=new y.Point(0,0),Se=new y.Point(0,0),Pe=0;for(var ct in Z){var Ut=Z[ct],wt=this._touches[ct];wt&&(he._add(Ut),Se._add(Ut.sub(wt)),Pe++,Z[ct]=Ut)}if(this._touches=Z,!(PeMath.abs(b.x)}var Wr=function(b){function x(){b.apply(this,arguments)}return b&&(x.__proto__=b),(x.prototype=Object.create(b&&b.prototype)).constructor=x,x.prototype.reset=function(){b.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},x.prototype._start=function(S){this._lastPoints=S,dr(S[0].sub(S[1]))&&(this._valid=!1)},x.prototype._move=function(S,Z,he){var Se=S[0].sub(this._lastPoints[0]),Pe=S[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Se,Pe,he.timeStamp),this._valid)return this._lastPoints=S,this._active=!0,{pitchDelta:(Se.y+Pe.y)/2*-.5}},x.prototype.gestureBeginsVertically=function(S,Z,he){if(this._valid!==void 0)return this._valid;var Se=S.mag()>=2,Pe=Z.mag()>=2;if(Se||Pe){if(!Se||!Pe)return this._firstMove===void 0&&(this._firstMove=he),he-this._firstMove<100&&void 0;var ct=S.y>0==Z.y>0;return dr(S)&&dr(Z)&&ct}},x}($u),Jr={panStep:100,bearingStep:15,pitchStep:10},Gn=function(){var b=Jr;this._panStep=b.panStep,this._bearingStep=b.bearingStep,this._pitchStep=b.pitchStep,this._rotationDisabled=!1};function mi(b){return b*(2-b)}Gn.prototype.blur=function(){this.reset()},Gn.prototype.reset=function(){this._active=!1},Gn.prototype.keydown=function(b){var x=this;if(!(b.altKey||b.ctrlKey||b.metaKey)){var S=0,Z=0,he=0,Se=0,Pe=0;switch(b.keyCode){case 61:case 107:case 171:case 187:S=1;break;case 189:case 109:case 173:S=-1;break;case 37:b.shiftKey?Z=-1:(b.preventDefault(),Se=-1);break;case 39:b.shiftKey?Z=1:(b.preventDefault(),Se=1);break;case 38:b.shiftKey?he=1:(b.preventDefault(),Pe=-1);break;case 40:b.shiftKey?he=-1:(b.preventDefault(),Pe=1);break;default:return}return this._rotationDisabled&&(Z=0,he=0),{cameraAnimation:function(ct){var Ut=ct.getZoom();ct.easeTo({duration:300,easeId:"keyboardHandler",easing:mi,zoom:S?Math.round(Ut)+S*(b.shiftKey?2:1):Ut,bearing:ct.getBearing()+Z*x._bearingStep,pitch:ct.getPitch()+he*x._pitchStep,offset:[-Se*x._panStep,-Pe*x._panStep],center:ct.getCenter()},{originalEvent:b})}}}},Gn.prototype.enable=function(){this._enabled=!0},Gn.prototype.disable=function(){this._enabled=!1,this.reset()},Gn.prototype.isEnabled=function(){return this._enabled},Gn.prototype.isActive=function(){return this._active},Gn.prototype.disableRotation=function(){this._rotationDisabled=!0},Gn.prototype.enableRotation=function(){this._rotationDisabled=!1};var Vn=function(b,x){this._map=b,this._el=b.getCanvasContainer(),this._handler=x,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,y.bindAll(["_onTimeout"],this)};Vn.prototype.setZoomRate=function(b){this._defaultZoomRate=b},Vn.prototype.setWheelZoomRate=function(b){this._wheelZoomRate=b},Vn.prototype.isEnabled=function(){return!!this._enabled},Vn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Vn.prototype.isZooming=function(){return!!this._zooming},Vn.prototype.enable=function(b){this.isEnabled()||(this._enabled=!0,this._aroundCenter=b&&b.around==="center")},Vn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Vn.prototype.wheel=function(b){if(this.isEnabled()){var x=b.deltaMode===y.window.WheelEvent.DOM_DELTA_LINE?40*b.deltaY:b.deltaY,S=y.browser.now(),Z=S-(this._lastWheelEventTime||0);this._lastWheelEventTime=S,x!==0&&x%4.000244140625==0?this._type="wheel":x!==0&&Math.abs(x)<4?this._type="trackpad":Z>400?(this._type=null,this._lastValue=x,this._timeout=setTimeout(this._onTimeout,40,b)):this._type||(this._type=Math.abs(Z*x)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,x+=this._lastValue)),b.shiftKey&&x&&(x/=4),this._type&&(this._lastWheelEvent=b,this._delta-=x,this._active||this._start(b)),b.preventDefault()}},Vn.prototype._onTimeout=function(b){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(b)},Vn.prototype._start=function(b){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var x=$.mousePos(this._el,b);this._around=y.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(x)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Vn.prototype.renderFrame=function(){var b=this;if(this._frameId&&(this._frameId=null,this.isActive())){var x=this._map.transform;if(this._delta!==0){var S=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,Z=2/(1+Math.exp(-Math.abs(this._delta*S)));this._delta<0&&Z!==0&&(Z=1/Z);var he=typeof this._targetZoom=="number"?x.zoomScale(this._targetZoom):x.scale;this._targetZoom=Math.min(x.maxZoom,Math.max(x.minZoom,x.scaleZoom(he*Z))),this._type==="wheel"&&(this._startZoom=x.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Se,Pe=typeof this._targetZoom=="number"?this._targetZoom:x.zoom,ct=this._startZoom,Ut=this._easing,wt=!1;if(this._type==="wheel"&&ct&&Ut){var Kt=Math.min((y.browser.now()-this._lastWheelEventTime)/200,1),cr=Ut(Kt);Se=y.number(ct,Pe,cr),Kt<1?this._frameId||(this._frameId=!0):wt=!0}else Se=Pe,wt=!0;return this._active=!0,wt&&(this._active=!1,this._finishTimeout=setTimeout(function(){b._zooming=!1,b._handler._triggerRenderFrame(),delete b._targetZoom,delete b._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!wt,zoomDelta:Se-x.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Vn.prototype._smoothOutEasing=function(b){var x=y.ease;if(this._prevEase){var S=this._prevEase,Z=(y.browser.now()-S.start)/S.duration,he=S.easing(Z+.01)-S.easing(Z),Se=.27/Math.sqrt(he*he+1e-4)*.01,Pe=Math.sqrt(.0729-Se*Se);x=y.bezier(Se,Pe,.25,1)}return this._prevEase={start:y.browser.now(),duration:b,easing:x},x},Vn.prototype.blur=function(){this.reset()},Vn.prototype.reset=function(){this._active=!1};var Gi=function(b,x){this._clickZoom=b,this._tapZoom=x};Gi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Gi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Gi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Gi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Li=function(){this.reset()};Li.prototype.reset=function(){this._active=!1},Li.prototype.blur=function(){this.reset()},Li.prototype.dblclick=function(b,x){return b.preventDefault(),{cameraAnimation:function(S){S.easeTo({duration:300,zoom:S.getZoom()+(b.shiftKey?-1:1),around:S.unproject(x)},{originalEvent:b})}}},Li.prototype.enable=function(){this._enabled=!0},Li.prototype.disable=function(){this._enabled=!1,this.reset()},Li.prototype.isEnabled=function(){return this._enabled},Li.prototype.isActive=function(){return this._active};var Xn=function(){this._tap=new Gr({numTouches:1,numTaps:1}),this.reset()};Xn.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Xn.prototype.touchstart=function(b,x,S){this._swipePoint||(this._tapTime&&b.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?S.length>0&&(this._swipePoint=x[0],this._swipeTouch=S[0].identifier):this._tap.touchstart(b,x,S))},Xn.prototype.touchmove=function(b,x,S){if(this._tapTime){if(this._swipePoint){if(S[0].identifier!==this._swipeTouch)return;var Z=x[0],he=Z.y-this._swipePoint.y;return this._swipePoint=Z,b.preventDefault(),this._active=!0,{zoomDelta:he/128}}}else this._tap.touchmove(b,x,S)},Xn.prototype.touchend=function(b,x,S){this._tapTime?this._swipePoint&&S.length===0&&this.reset():this._tap.touchend(b,x,S)&&(this._tapTime=b.timeStamp)},Xn.prototype.touchcancel=function(){this.reset()},Xn.prototype.enable=function(){this._enabled=!0},Xn.prototype.disable=function(){this._enabled=!1,this.reset()},Xn.prototype.isEnabled=function(){return this._enabled},Xn.prototype.isActive=function(){return this._active};var Ca=function(b,x,S){this._el=b,this._mousePan=x,this._touchPan=S};Ca.prototype.enable=function(b){this._inertiaOptions=b||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ca.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ca.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ca.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var $a=function(b,x,S){this._pitchWithRotate=b.pitchWithRotate,this._mouseRotate=x,this._mousePitch=S};$a.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},$a.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},$a.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},$a.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Ba=function(b,x,S,Z){this._el=b,this._touchZoom=x,this._touchRotate=S,this._tapDragZoom=Z,this._rotationDisabled=!1,this._enabled=!0};Ba.prototype.enable=function(b){this._touchZoom.enable(b),this._rotationDisabled||this._touchRotate.enable(b),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Ba.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Ba.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Ba.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Ba.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Ba.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var ha=function(b){return b.zoom||b.drag||b.pitch||b.rotate},ba=function(b){function x(){b.apply(this,arguments)}return b&&(x.__proto__=b),(x.prototype=Object.create(b&&b.prototype)).constructor=x,x}(y.Event);function Ti(b){return b.panDelta&&b.panDelta.mag()||b.zoomDelta||b.bearingDelta||b.pitchDelta}var Bi=function(b,x){this._map=b,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new wd(b),this._bearingSnap=x.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(x),y.bindAll(["handleEvent","handleWindowEvent"],this);var S=this._el;this._listeners=[[S,"touchstart",{passive:!0}],[S,"touchmove",{passive:!1}],[S,"touchend",void 0],[S,"touchcancel",void 0],[S,"mousedown",void 0],[S,"mousemove",void 0],[S,"mouseup",void 0],[y.window.document,"mousemove",{capture:!0}],[y.window.document,"mouseup",void 0],[S,"mouseover",void 0],[S,"mouseout",void 0],[S,"dblclick",void 0],[S,"click",void 0],[S,"keydown",{capture:!1}],[S,"keyup",void 0],[S,"wheel",{passive:!1}],[S,"contextmenu",void 0],[y.window,"blur",void 0]];for(var Z=0,he=this._listeners;ZPe?Math.min(2,di):Math.max(.5,di),tu=Math.pow(Ss,1-ja),sn=Se.unproject(oi.add(pr.mult(ja*tu)).mult(no));Se.setLocationAtPoint(Se.renderWorldCopies?sn.wrap():sn,rn)}he._fireMoveEvents(Z)},function(ja){he._afterEase(Z,ja)},S),this},x.prototype._prepareEase=function(S,Z,he){he===void 0&&(he={}),this._moving=!0,Z||he.moving||this.fire(new y.Event("movestart",S)),this._zooming&&!he.zooming&&this.fire(new y.Event("zoomstart",S)),this._rotating&&!he.rotating&&this.fire(new y.Event("rotatestart",S)),this._pitching&&!he.pitching&&this.fire(new y.Event("pitchstart",S))},x.prototype._fireMoveEvents=function(S){this.fire(new y.Event("move",S)),this._zooming&&this.fire(new y.Event("zoom",S)),this._rotating&&this.fire(new y.Event("rotate",S)),this._pitching&&this.fire(new y.Event("pitch",S))},x.prototype._afterEase=function(S,Z){if(!this._easeId||!Z||this._easeId!==Z){delete this._easeId;var he=this._zooming,Se=this._rotating,Pe=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,he&&this.fire(new y.Event("zoomend",S)),Se&&this.fire(new y.Event("rotateend",S)),Pe&&this.fire(new y.Event("pitchend",S)),this.fire(new y.Event("moveend",S))}},x.prototype.flyTo=function(S,Z){var he=this;if(!S.essential&&y.browser.prefersReducedMotion){var Se=y.pick(S,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Se,Z)}this.stop(),S=y.extend({offset:[0,0],speed:1.2,curve:1.42,easing:y.ease},S);var Pe=this.transform,ct=this.getZoom(),Ut=this.getBearing(),wt=this.getPitch(),Kt=this.getPadding(),cr="zoom"in S?y.clamp(+S.zoom,Pe.minZoom,Pe.maxZoom):ct,hr="bearing"in S?this._normalizeBearing(S.bearing,Ut):Ut,Fr="pitch"in S?+S.pitch:wt,Br="padding"in S?S.padding:Pe.padding,rn=Pe.zoomScale(cr-ct),Xr=y.Point.convert(S.offset),dn=Pe.centerPoint.add(Xr),Qt=Pe.pointLocation(dn),li=y.LngLat.convert(S.center||Qt);this._normalizeCenter(li);var oi=Pe.project(Qt),pr=Pe.project(li).sub(oi),di=S.curve,Ji=Math.max(Pe.width,Pe.height),ja=Ji/rn,no=pr.mag();if("minZoom"in S){var Ss=y.clamp(Math.min(S.minZoom,ct,cr),Pe.minZoom,Pe.maxZoom),tu=Ji/Pe.zoomScale(Ss-ct);di=Math.sqrt(tu/no*2)}var sn=di*di;function bu(Ql){var Cu=(ja*ja-Ji*Ji+(Ql?-1:1)*sn*sn*no*no)/(2*(Ql?ja:Ji)*sn*no);return Math.log(Math.sqrt(Cu*Cu+1)-Cu)}function bc(Ql){return(Math.exp(Ql)-Math.exp(-Ql))/2}function uu(Ql){return(Math.exp(Ql)+Math.exp(-Ql))/2}var Ju=bu(0),Sc=function(Ql){return uu(Ju)/uu(Ju+di*Ql)},Bl=function(Ql){return Ji*((uu(Ju)*(bc(Cu=Ju+di*Ql)/uu(Cu))-bc(Ju))/sn)/no;var Cu},Ol=(bu(1)-Ju)/di;if(Math.abs(no)<1e-6||!isFinite(Ol)){if(Math.abs(Ji-ja)<1e-6)return this.easeTo(S,Z);var oc=jaS.maxDuration&&(S.duration=0),this._zooming=!0,this._rotating=Ut!==hr,this._pitching=Fr!==wt,this._padding=!Pe.isPaddingEqual(Br),this._prepareEase(Z,!1),this._ease(function(Ql){var Cu=Ql*Ol,Bc=1/Sc(Cu);Pe.zoom=Ql===1?cr:ct+Pe.scaleZoom(Bc),he._rotating&&(Pe.bearing=y.number(Ut,hr,Ql)),he._pitching&&(Pe.pitch=y.number(wt,Fr,Ql)),he._padding&&(Pe.interpolatePadding(Kt,Br,Ql),dn=Pe.centerPoint.add(Xr));var ff=Ql===1?li:Pe.unproject(oi.add(pr.mult(Bl(Cu))).mult(Bc));Pe.setLocationAtPoint(Pe.renderWorldCopies?ff.wrap():ff,dn),he._fireMoveEvents(Z)},function(){return he._afterEase(Z)},S),this},x.prototype.isEasing=function(){return!!this._easeFrameId},x.prototype.stop=function(){return this._stop()},x.prototype._stop=function(S,Z){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var he=this._onEaseEnd;delete this._onEaseEnd,he.call(this,Z)}if(!S){var Se=this.handlers;Se&&Se.stop(!1)}return this},x.prototype._ease=function(S,Z,he){he.animate===!1||he.duration===0?(S(1),Z()):(this._easeStart=y.browser.now(),this._easeOptions=he,this._onEaseFrame=S,this._onEaseEnd=Z,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},x.prototype._renderFrameCallback=function(){var S=Math.min((y.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(S)),S<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},x.prototype._normalizeBearing=function(S,Z){S=y.wrap(S,-180,180);var he=Math.abs(S-Z);return Math.abs(S-360-Z)180?-360:he<-180?360:0}},x}(y.Evented),Sa=function(b){b===void 0&&(b={}),this.options=b,y.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Sa.prototype.getDefaultPosition=function(){return"bottom-right"},Sa.prototype.onAdd=function(b){var x=this.options&&this.options.compact;return this._map=b,this._container=$.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=$.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=$.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),x&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),x===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Sa.prototype.onRemove=function(){$.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Sa.prototype._setElementTitle=function(b,x){var S=this._map._getUIString("AttributionControl."+x);b.title=S,b.setAttribute("aria-label",S)},Sa.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Sa.prototype._updateEditLink=function(){var b=this._editLink;b||(b=this._editLink=this._container.querySelector(".mapbox-improve-map"));var x=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||y.config.ACCESS_TOKEN}];if(b){var S=x.reduce(function(Z,he,Se){return he.value&&(Z+=he.key+"="+he.value+(Se=0)return!1;return!0})).join(" | ");Pe!==this._attribHTML&&(this._attribHTML=Pe,b.length?(this._innerContainer.innerHTML=Pe,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Sa.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Ko=function(){y.bindAll(["_updateLogo"],this),y.bindAll(["_updateCompact"],this)};Ko.prototype.onAdd=function(b){this._map=b,this._container=$.create("div","mapboxgl-ctrl");var x=$.create("a","mapboxgl-ctrl-logo");return x.target="_blank",x.rel="noopener nofollow",x.href="https://www.mapbox.com/",x.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),x.setAttribute("rel","noopener nofollow"),this._container.appendChild(x),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Ko.prototype.onRemove=function(){$.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Ko.prototype.getDefaultPosition=function(){return"bottom-left"},Ko.prototype._updateLogo=function(b){b&&b.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},Ko.prototype._logoRequired=function(){if(this._map.style){var b=this._map.style.sourceCaches;for(var x in b)if(b[x].getSource().mapbox_logo)return!0;return!1}},Ko.prototype._updateCompact=function(){var b=this._container.children;if(b.length){var x=b[0];this._map.getCanvasContainer().offsetWidth<250?x.classList.add("mapboxgl-compact"):x.classList.remove("mapboxgl-compact")}};var qo=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};qo.prototype.add=function(b){var x=++this._id;return this._queue.push({callback:b,id:x,cancelled:!1}),x},qo.prototype.remove=function(b){for(var x=this._currentlyRunning,S=0,Z=x?this._queue.concat(x):this._queue;SZ.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(Z.minPitch!=null&&Z.maxPitch!=null&&Z.minPitch>Z.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(Z.minPitch!=null&&Z.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(Z.maxPitch!=null&&Z.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var Se=new ds(Z.minZoom,Z.maxZoom,Z.minPitch,Z.maxPitch,Z.renderWorldCopies);if(b.call(this,Se,Z),this._interactive=Z.interactive,this._maxTileCacheSize=Z.maxTileCacheSize,this._failIfMajorPerformanceCaveat=Z.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=Z.preserveDrawingBuffer,this._antialias=Z.antialias,this._trackResize=Z.trackResize,this._bearingSnap=Z.bearingSnap,this._refreshExpiredTiles=Z.refreshExpiredTiles,this._fadeDuration=Z.fadeDuration,this._crossSourceCollisions=Z.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=Z.collectResourceTiming,this._renderTaskQueue=new qo,this._controls=[],this._mapId=y.uniqueId(),this._locale=y.extend({},gs,Z.locale),this._clickTolerance=Z.clickTolerance,this._requestManager=new y.RequestManager(Z.transformRequest,Z.accessToken),typeof Z.container=="string"){if(this._container=y.window.document.getElementById(Z.container),!this._container)throw new Error("Container '"+Z.container+"' not found.")}else{if(!(Z.container instanceof Hu))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=Z.container}if(Z.maxBounds&&this.setMaxBounds(Z.maxBounds),y.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return he._update(!1)}),this.on("moveend",function(){return he._update(!1)}),this.on("zoom",function(){return he._update(!0)}),y.window!==void 0&&(y.window.addEventListener("online",this._onWindowOnline,!1),y.window.addEventListener("resize",this._onWindowResize,!1),y.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Bi(this,Z),this._hash=Z.hash&&new Rl(typeof Z.hash=="string"&&Z.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:Z.center,zoom:Z.zoom,bearing:Z.bearing,pitch:Z.pitch}),Z.bounds&&(this.resize(),this.fitBounds(Z.bounds,y.extend({},Z.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=Z.localIdeographFontFamily,Z.style&&this.setStyle(Z.style,{localIdeographFontFamily:Z.localIdeographFontFamily}),Z.attributionControl&&this.addControl(new Sa({customAttribution:Z.customAttribution})),this.addControl(new Ko,Z.logoPosition),this.on("style.load",function(){he.transform.unmodified&&he.jumpTo(he.style.stylesheet)}),this.on("data",function(Pe){he._update(Pe.dataType==="style"),he.fire(new y.Event(Pe.dataType+"data",Pe))}),this.on("dataloading",function(Pe){he.fire(new y.Event(Pe.dataType+"dataloading",Pe))})}b&&(x.__proto__=b),(x.prototype=Object.create(b&&b.prototype)).constructor=x;var S={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return x.prototype._getMapId=function(){return this._mapId},x.prototype.addControl=function(Z,he){if(he===void 0&&(he=Z.getDefaultPosition?Z.getDefaultPosition():"top-right"),!Z||!Z.onAdd)return this.fire(new y.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Se=Z.onAdd(this);this._controls.push(Z);var Pe=this._controlPositions[he];return he.indexOf("bottom")!==-1?Pe.insertBefore(Se,Pe.firstChild):Pe.appendChild(Se),this},x.prototype.removeControl=function(Z){if(!Z||!Z.onRemove)return this.fire(new y.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var he=this._controls.indexOf(Z);return he>-1&&this._controls.splice(he,1),Z.onRemove(this),this},x.prototype.hasControl=function(Z){return this._controls.indexOf(Z)>-1},x.prototype.resize=function(Z){var he=this._containerDimensions(),Se=he[0],Pe=he[1];if(Se===this.transform.width&&Pe===this.transform.height)return this;this._resizeCanvas(Se,Pe),this.transform.resize(Se,Pe),this.painter.resize(Se,Pe);var ct=!this._moving;return ct&&this.fire(new y.Event("movestart",Z)).fire(new y.Event("move",Z)),this.fire(new y.Event("resize",Z)),ct&&this.fire(new y.Event("moveend",Z)),this},x.prototype.getBounds=function(){return this.transform.getBounds()},x.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},x.prototype.setMaxBounds=function(Z){return this.transform.setMaxBounds(y.LngLatBounds.convert(Z)),this._update()},x.prototype.setMinZoom=function(Z){if((Z=Z==null?-2:Z)>=-2&&Z<=this.transform.maxZoom)return this.transform.minZoom=Z,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=Z,this._update(),this.getZoom()>Z&&this.setZoom(Z),this;throw new Error("maxZoom must be greater than the current minZoom")},x.prototype.getMaxZoom=function(){return this.transform.maxZoom},x.prototype.setMinPitch=function(Z){if((Z=Z==null?0:Z)<0)throw new Error("minPitch must be greater than or equal to 0");if(Z>=0&&Z<=this.transform.maxPitch)return this.transform.minPitch=Z,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(Z>=this.transform.minPitch)return this.transform.maxPitch=Z,this._update(),this.getPitch()>Z&&this.setPitch(Z),this;throw new Error("maxPitch must be greater than the current minPitch")},x.prototype.getMaxPitch=function(){return this.transform.maxPitch},x.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},x.prototype.setRenderWorldCopies=function(Z){return this.transform.renderWorldCopies=Z,this._update()},x.prototype.project=function(Z){return this.transform.locationPoint(y.LngLat.convert(Z))},x.prototype.unproject=function(Z){return this.transform.pointLocation(y.Point.convert(Z))},x.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},x.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},x.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},x.prototype._createDelegatedListener=function(Z,he,Se){var Pe,ct=this;if(Z==="mouseenter"||Z==="mouseover"){var Ut=!1;return{layer:he,listener:Se,delegates:{mousemove:function(Kt){var cr=ct.getLayer(he)?ct.queryRenderedFeatures(Kt.point,{layers:[he]}):[];cr.length?Ut||(Ut=!0,Se.call(ct,new af(Z,ct,Kt.originalEvent,{features:cr}))):Ut=!1},mouseout:function(){Ut=!1}}}}if(Z==="mouseleave"||Z==="mouseout"){var wt=!1;return{layer:he,listener:Se,delegates:{mousemove:function(Kt){(ct.getLayer(he)?ct.queryRenderedFeatures(Kt.point,{layers:[he]}):[]).length?wt=!0:wt&&(wt=!1,Se.call(ct,new af(Z,ct,Kt.originalEvent)))},mouseout:function(Kt){wt&&(wt=!1,Se.call(ct,new af(Z,ct,Kt.originalEvent)))}}}}return{layer:he,listener:Se,delegates:(Pe={},Pe[Z]=function(Kt){var cr=ct.getLayer(he)?ct.queryRenderedFeatures(Kt.point,{layers:[he]}):[];cr.length&&(Kt.features=cr,Se.call(ct,Kt),delete Kt.features)},Pe)}},x.prototype.on=function(Z,he,Se){if(Se===void 0)return b.prototype.on.call(this,Z,he);var Pe=this._createDelegatedListener(Z,he,Se);for(var ct in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Z]=this._delegatedListeners[Z]||[],this._delegatedListeners[Z].push(Pe),Pe.delegates)this.on(ct,Pe.delegates[ct]);return this},x.prototype.once=function(Z,he,Se){if(Se===void 0)return b.prototype.once.call(this,Z,he);var Pe=this._createDelegatedListener(Z,he,Se);for(var ct in Pe.delegates)this.once(ct,Pe.delegates[ct]);return this},x.prototype.off=function(Z,he,Se){var Pe=this;return Se===void 0?b.prototype.off.call(this,Z,he):(this._delegatedListeners&&this._delegatedListeners[Z]&&function(ct){for(var Ut=ct[Z],wt=0;wt180;){var Pe=S.locationPoint(b);if(Pe.x>=0&&Pe.y>=0&&Pe.x<=S.width&&Pe.y<=S.height)break;b.lng>S.center.lng?b.lng-=360:b.lng+=360}return b}fu.prototype.down=function(b,x){this.mouseRotate.mousedown(b,x),this.mousePitch&&this.mousePitch.mousedown(b,x),$.disableDrag()},fu.prototype.move=function(b,x){var S=this.map,Z=this.mouseRotate.mousemoveWindow(b,x);if(Z&&Z.bearingDelta&&S.setBearing(S.getBearing()+Z.bearingDelta),this.mousePitch){var he=this.mousePitch.mousemoveWindow(b,x);he&&he.pitchDelta&&S.setPitch(S.getPitch()+he.pitchDelta)}},fu.prototype.off=function(){var b=this.element;$.removeEventListener(b,"mousedown",this.mousedown),$.removeEventListener(b,"touchstart",this.touchstart,{passive:!1}),$.removeEventListener(b,"touchmove",this.touchmove),$.removeEventListener(b,"touchend",this.touchend),$.removeEventListener(b,"touchcancel",this.reset),this.offTemp()},fu.prototype.offTemp=function(){$.enableDrag(),$.removeEventListener(y.window,"mousemove",this.mousemove),$.removeEventListener(y.window,"mouseup",this.mouseup)},fu.prototype.mousedown=function(b){this.down(y.extend({},b,{ctrlKey:!0,preventDefault:function(){return b.preventDefault()}}),$.mousePos(this.element,b)),$.addEventListener(y.window,"mousemove",this.mousemove),$.addEventListener(y.window,"mouseup",this.mouseup)},fu.prototype.mousemove=function(b){this.move(b,$.mousePos(this.element,b))},fu.prototype.mouseup=function(b){this.mouseRotate.mouseupWindow(b),this.mousePitch&&this.mousePitch.mouseupWindow(b),this.offTemp()},fu.prototype.touchstart=function(b){b.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=$.touchPos(this.element,b.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return b.preventDefault()}},this._startPos))},fu.prototype.touchmove=function(b){b.targetTouches.length!==1?this.reset():(this._lastPos=$.touchPos(this.element,b.targetTouches)[0],this.move({preventDefault:function(){return b.preventDefault()}},this._lastPos))},fu.prototype.touchend=function(b){b.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=Z}this._isDragging&&(this._pos=S.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new y.Event("dragstart"))),this.fire(new y.Event("drag")))},x.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new y.Event("dragend")),this._state="inactive"},x.prototype._addDragHandler=function(S){this._element.contains(S.originalEvent.target)&&(S.preventDefault(),this._positionDelta=S.point.sub(this._pos).add(this._offset),this._pointerdownPos=S.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))},x.prototype.setDraggable=function(S){return this._draggable=!!S,this._map&&(S?(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},x.prototype.isDraggable=function(){return this._draggable},x.prototype.setRotation=function(S){return this._rotation=S||0,this._update(),this},x.prototype.getRotation=function(){return this._rotation},x.prototype.setRotationAlignment=function(S){return this._rotationAlignment=S||"auto",this._update(),this},x.prototype.getRotationAlignment=function(){return this._rotationAlignment},x.prototype.setPitchAlignment=function(S){return this._pitchAlignment=S&&S!=="auto"?S:this._rotationAlignment,this._update(),this},x.prototype.getPitchAlignment=function(){return this._pitchAlignment},x}(y.Evented),ve={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ot=0,kt=!1,J=function(b){function x(S){b.call(this),this.options=y.extend({},ve,S),y.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return b&&(x.__proto__=b),(x.prototype=Object.create(b&&b.prototype)).constructor=x,x.prototype.onAdd=function(S){var Z;return this._map=S,this._container=$.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Z=this._setupUI,F!==void 0?Z(F):y.window.navigator.permissions!==void 0?y.window.navigator.permissions.query({name:"geolocation"}).then(function(he){Z(F=he.state!=="denied")}):Z(F=!!y.window.navigator.geolocation),this._container},x.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(y.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(),$.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ot=0,kt=!1},x.prototype._isOutOfMapMaxBounds=function(S){var Z=this._map.getMaxBounds(),he=S.coords;return Z&&(he.longitudeZ.getEast()||he.latitudeZ.getNorth())},x.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},x.prototype._onSuccess=function(S){if(this._map){if(this._isOutOfMapMaxBounds(S))return this._setErrorState(),this.fire(new y.Event("outofmaxbounds",S)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=S,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(S),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(S),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new y.Event("geolocate",S)),this._finish()}},x.prototype._updateCamera=function(S){var Z=new y.LngLat(S.coords.longitude,S.coords.latitude),he=S.coords.accuracy,Se=this._map.getBearing(),Pe=y.extend({bearing:Se},this.options.fitBoundsOptions);this._map.fitBounds(Z.toBounds(he),Pe,{geolocateSource:!0})},x.prototype._updateMarker=function(S){if(S){var Z=new y.LngLat(S.coords.longitude,S.coords.latitude);this._accuracyCircleMarker.setLngLat(Z).addTo(this._map),this._userLocationDotMarker.setLngLat(Z).addTo(this._map),this._accuracy=S.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},x.prototype._updateCircleRadius=function(){var S=this._map._container.clientHeight/2,Z=this._map.unproject([0,S]),he=this._map.unproject([1,S]),Se=Z.distanceTo(he),Pe=Math.ceil(2*this._accuracy/Se);this._circleElement.style.width=Pe+"px",this._circleElement.style.height=Pe+"px"},x.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},x.prototype._onError=function(S){if(this._map){if(this.options.trackUserLocation)if(S.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var Z=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=Z,this._geolocateButton.setAttribute("aria-label",Z),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(S.code===3&&kt)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new y.Event("error",S)),this._finish()}},x.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},x.prototype._setupUI=function(S){var Z=this;if(this._container.addEventListener("contextmenu",function(Pe){return Pe.preventDefault()}),this._geolocateButton=$.create("button","mapboxgl-ctrl-geolocate",this._container),$.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",S===!1){y.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var he=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=he,this._geolocateButton.setAttribute("aria-label",he)}else{var Se=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Se,this._geolocateButton.setAttribute("aria-label",Se)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=$.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new H(this._dotElement),this._circleElement=$.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new H({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(Pe){Pe.geolocateSource||Z._watchState!=="ACTIVE_LOCK"||Pe.originalEvent&&Pe.originalEvent.type==="resize"||(Z._watchState="BACKGROUND",Z._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),Z._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),Z.fire(new y.Event("trackuserlocationend")))})},x.prototype.trigger=function(){if(!this._setup)return y.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new y.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ot--,kt=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new y.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new y.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var S;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++ot>1?(S={maximumAge:6e5,timeout:0},kt=!0):(S=this.options.positionOptions,kt=!1),this._geolocationWatchID=y.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,S)}}else y.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},x.prototype._clearWatch=function(){y.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},x}(y.Evented),f={maxWidth:100,unit:"metric"},O=function(b){this.options=y.extend({},f,b),y.bindAll(["_onMove","setUnit"],this)};function K(b,x,S){var Z=S&&S.maxWidth||100,he=b._container.clientHeight/2,Se=b.unproject([0,he]),Pe=b.unproject([Z,he]),ct=Se.distanceTo(Pe);if(S&&S.unit==="imperial"){var Ut=3.2808*ct;Ut>5280?q(x,Z,Ut/5280,b._getUIString("ScaleControl.Miles")):q(x,Z,Ut,b._getUIString("ScaleControl.Feet"))}else S&&S.unit==="nautical"?q(x,Z,ct/1852,b._getUIString("ScaleControl.NauticalMiles")):ct>=1e3?q(x,Z,ct/1e3,b._getUIString("ScaleControl.Kilometers")):q(x,Z,ct,b._getUIString("ScaleControl.Meters"))}function q(b,x,S,Z){var he,Se,Pe,ct=(he=S,(Se=Math.pow(10,(""+Math.floor(he)).length-1))*(Pe=(Pe=he/Se)>=10?10:Pe>=5?5:Pe>=3?3:Pe>=2?2:Pe>=1?1:function(Ut){var wt=Math.pow(10,Math.ceil(-Math.log(Ut)/Math.LN10));return Math.round(Ut*wt)/wt}(Pe)));b.style.width=x*(ct/S)+"px",b.innerHTML=ct+" "+Z}O.prototype.getDefaultPosition=function(){return"bottom-left"},O.prototype._onMove=function(){K(this._map,this._container,this.options)},O.prototype.onAdd=function(b){return this._map=b,this._container=$.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",b.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},O.prototype.onRemove=function(){$.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},O.prototype.setUnit=function(b){this.options.unit=b,K(this._map,this._container,this.options)};var me=function(b){this._fullscreen=!1,b&&b.container&&(b.container instanceof y.window.HTMLElement?this._container=b.container:y.warnOnce("Full screen control 'container' must be a DOM element.")),y.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in y.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in y.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in y.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in y.window.document&&(this._fullscreenchange="MSFullscreenChange")};me.prototype.onAdd=function(b){return this._map=b,this._container||(this._container=this._map.getContainer()),this._controlContainer=$.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",y.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},me.prototype.onRemove=function(){$.remove(this._controlContainer),this._map=null,y.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},me.prototype._checkFullscreenSupport=function(){return!!(y.window.document.fullscreenEnabled||y.window.document.mozFullScreenEnabled||y.window.document.msFullscreenEnabled||y.window.document.webkitFullscreenEnabled)},me.prototype._setupUI=function(){var b=this._fullscreenButton=$.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);$.create("span","mapboxgl-ctrl-icon",b).setAttribute("aria-hidden",!0),b.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),y.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},me.prototype._updateTitle=function(){var b=this._getTitle();this._fullscreenButton.setAttribute("aria-label",b),this._fullscreenButton.title=b},me.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},me.prototype._isFullscreen=function(){return this._fullscreen},me.prototype._changeIcon=function(){(y.window.document.fullscreenElement||y.window.document.mozFullScreenElement||y.window.document.webkitFullscreenElement||y.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},me.prototype._onClickFullscreen=function(){this._isFullscreen()?y.window.document.exitFullscreen?y.window.document.exitFullscreen():y.window.document.mozCancelFullScreen?y.window.document.mozCancelFullScreen():y.window.document.msExitFullscreen?y.window.document.msExitFullscreen():y.window.document.webkitCancelFullScreen&&y.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var je={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},tt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),w=function(b){function x(S){b.call(this),this.options=y.extend(Object.create(je),S),y.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return b&&(x.__proto__=b),(x.prototype=Object.create(b&&b.prototype)).constructor=x,x.prototype.addTo=function(S){return this._map&&this.remove(),this._map=S,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("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new y.Event("open")),this},x.prototype.isOpen=function(){return!!this._map},x.prototype.remove=function(){return this._content&&$.remove(this._content),this._container&&($.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new y.Event("close")),this},x.prototype.getLngLat=function(){return this._lngLat},x.prototype.setLngLat=function(S){return this._lngLat=y.LngLat.convert(S),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},x.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},x.prototype.getElement=function(){return this._container},x.prototype.setText=function(S){return this.setDOMContent(y.window.document.createTextNode(S))},x.prototype.setHTML=function(S){var Z,he=y.window.document.createDocumentFragment(),Se=y.window.document.createElement("body");for(Se.innerHTML=S;Z=Se.firstChild;)he.appendChild(Z);return this.setDOMContent(he)},x.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},x.prototype.setMaxWidth=function(S){return this.options.maxWidth=S,this._update(),this},x.prototype.setDOMContent=function(S){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=$.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(S),this._createCloseButton(),this._update(),this._focusFirstElement(),this},x.prototype.addClassName=function(S){this._container&&this._container.classList.add(S)},x.prototype.removeClassName=function(S){this._container&&this._container.classList.remove(S)},x.prototype.setOffset=function(S){return this.options.offset=S,this._update(),this},x.prototype.toggleClassName=function(S){if(this._container)return this._container.classList.toggle(S)},x.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=$.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},x.prototype._onMouseUp=function(S){this._update(S.point)},x.prototype._onMouseMove=function(S){this._update(S.point)},x.prototype._onDrag=function(S){this._update(S.point)},x.prototype._update=function(S){var Z=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=$.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=$.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(cr){return Z._container.classList.add(cr)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Gu(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||S)){var he=this._pos=this._trackPointer&&S?S:this._map.project(this._lngLat),Se=this.options.anchor,Pe=function cr(hr){if(hr){if(typeof hr=="number"){var Fr=Math.round(Math.sqrt(.5*Math.pow(hr,2)));return{center:new y.Point(0,0),top:new y.Point(0,hr),"top-left":new y.Point(Fr,Fr),"top-right":new y.Point(-Fr,Fr),bottom:new y.Point(0,-hr),"bottom-left":new y.Point(Fr,-Fr),"bottom-right":new y.Point(-Fr,-Fr),left:new y.Point(hr,0),right:new y.Point(-hr,0)}}if(hr instanceof y.Point||Array.isArray(hr)){var Br=y.Point.convert(hr);return{center:Br,top:Br,"top-left":Br,"top-right":Br,bottom:Br,"bottom-left":Br,"bottom-right":Br,left:Br,right:Br}}return{center:y.Point.convert(hr.center||[0,0]),top:y.Point.convert(hr.top||[0,0]),"top-left":y.Point.convert(hr["top-left"]||[0,0]),"top-right":y.Point.convert(hr["top-right"]||[0,0]),bottom:y.Point.convert(hr.bottom||[0,0]),"bottom-left":y.Point.convert(hr["bottom-left"]||[0,0]),"bottom-right":y.Point.convert(hr["bottom-right"]||[0,0]),left:y.Point.convert(hr.left||[0,0]),right:y.Point.convert(hr.right||[0,0])}}return cr(new y.Point(0,0))}(this.options.offset);if(!Se){var ct,Ut=this._container.offsetWidth,wt=this._container.offsetHeight;ct=he.y+Pe.bottom.ythis._map.transform.height-wt?["bottom"]:[],he.xthis._map.transform.width-Ut/2&&ct.push("right"),Se=ct.length===0?"bottom":ct.join("-")}var Kt=he.add(Pe[Se]).round();$.setTransform(this._container,h[Se]+" translate("+Kt.x+"px,"+Kt.y+"px)"),m(this._container,Se,"popup")}},x.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var S=this._container.querySelector(tt);S&&S.focus()}},x.prototype._onClose=function(){this.remove()},x}(y.Evented),Gt={version:y.version,supported:d,setRTLTextPlugin:y.setRTLTextPlugin,getRTLTextPluginStatus:y.getRTLTextPluginStatus,Map:eu,NavigationControl:yu,GeolocateControl:J,AttributionControl:Sa,ScaleControl:O,FullscreenControl:me,Popup:w,Marker:H,Style:ia,LngLat:y.LngLat,LngLatBounds:y.LngLatBounds,Point:y.Point,MercatorCoordinate:y.MercatorCoordinate,Evented:y.Evented,config:y.config,prewarm:function(){Tn().acquire(nn)},clearPrewarmedResources:function(){var b=Yn;b&&(b.isPreloaded()&&b.numActive()===1?(b.release(nn),Yn=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return y.config.ACCESS_TOKEN},set accessToken(b){y.config.ACCESS_TOKEN=b},get baseApiUrl(){return y.config.API_URL},set baseApiUrl(b){y.config.API_URL=b},get workerCount(){return ln.workerCount},set workerCount(b){ln.workerCount=b},get maxParallelImageRequests(){return y.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(b){y.config.MAX_PARALLEL_IMAGE_REQUESTS=b},clearStorage:function(b){y.clearTileCache(b)},workerUrl:""};return Gt}),M})},93735:function(Ke,ye,_){(function(){var M=_(75041),V=_(67751).utf8,y=_(78034),d=_(67751).bin,$=function(X,oe){X.constructor==String?oe&&oe.encoding==="binary"?X=d.stringToBytes(X):X=V.stringToBytes(X):y(X)?X=Array.prototype.slice.call(X,0):!Array.isArray(X)&&X.constructor!==Uint8Array&&(X=X.toString());for(var re=M.bytesToWords(X),le=X.length*8,ce=1732584193,Ie=-271733879,we=-1732584194,Ee=271733878,qe=0;qe>>24)&16711935|(re[qe]<<24|re[qe]>>>8)&4278255360;re[le>>>5]|=128<>>9<<4)+14]=le;for(var Xe=$._ff,ft=$._gg,Ge=$._hh,lt=$._ii,qe=0;qe>>0,Ie=Ie+It>>>0,we=we+At>>>0,Ee=Ee+Ue>>>0}return M.endian([ce,Ie,we,Ee])};$._ff=function(X,oe,re,le,ce,Ie,we){var Ee=X+(oe&re|~oe&le)+(ce>>>0)+we;return(Ee<>>32-Ie)+oe},$._gg=function(X,oe,re,le,ce,Ie,we){var Ee=X+(oe&le|re&~le)+(ce>>>0)+we;return(Ee<>>32-Ie)+oe},$._hh=function(X,oe,re,le,ce,Ie,we){var Ee=X+(oe^re^le)+(ce>>>0)+we;return(Ee<>>32-Ie)+oe},$._ii=function(X,oe,re,le,ce,Ie,we){var Ee=X+(re^(oe|~le))+(ce>>>0)+we;return(Ee<>>32-Ie)+oe},$._blocksize=16,$._digestsize=16,Ke.exports=function(X,oe){if(X==null)throw new Error("Illegal argument "+X);var re=M.wordsToBytes($(X,oe));return oe&&oe.asBytes?re:oe&&oe.asString?d.bytesToString(re):M.bytesToHex(re)}})()},84126:function(Ke){"use strict";var ye=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;function V(d){if(d==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(d)}function y(){try{if(!Object.assign)return!1;var d=new String("abc");if(d[5]="de",Object.getOwnPropertyNames(d)[0]==="5")return!1;for(var $={},X=0;X<10;X++)$["_"+String.fromCharCode(X)]=X;var oe=Object.getOwnPropertyNames($).map(function(le){return $[le]});if(oe.join("")!=="0123456789")return!1;var re={};return"abcdefghijklmnopqrst".split("").forEach(function(le){re[le]=le}),Object.keys(Object.assign({},re)).join("")==="abcdefghijklmnopqrst"}catch(le){return!1}}Ke.exports=y()?Object.assign:function(d,$){for(var X,oe=V(d),re,le=1;le0&&!V.call(qe,0))for(var At=0;At0)for(var Ue=0;Ue=0&&ye.call(M.callee)==="[object Function]"),y}},88959:function(Ke,ye,_){"use strict";Ke.exports=V;var M=_(67467);function V(mt){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(mt)?mt:new Uint8Array(mt||0),this.pos=0,this.type=0,this.length=this.buf.length}V.Varint=0,V.Fixed64=1,V.Bytes=2,V.Fixed32=5;var y=65536*65536,d=1/y,$=12,X=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");V.prototype={destroy:function(){this.buf=null},readFields:function(mt,Mt,Me){for(Me=Me||this.length;this.pos>3,vt=this.pos;this.type=Ht&7,mt(Rt,Mt,this),this.pos===vt&&this.skip(Ht)}return Mt},readMessage:function(mt,Mt){return this.readFields(mt,Mt,this.readVarint()+this.pos)},readFixed32:function(){var mt=rt(this.buf,this.pos);return this.pos+=4,mt},readSFixed32:function(){var mt=Ct(this.buf,this.pos);return this.pos+=4,mt},readFixed64:function(){var mt=rt(this.buf,this.pos)+rt(this.buf,this.pos+4)*y;return this.pos+=8,mt},readSFixed64:function(){var mt=rt(this.buf,this.pos)+Ct(this.buf,this.pos+4)*y;return this.pos+=8,mt},readFloat:function(){var mt=M.read(this.buf,this.pos,!0,23,4);return this.pos+=4,mt},readDouble:function(){var mt=M.read(this.buf,this.pos,!0,52,8);return this.pos+=8,mt},readVarint:function(mt){var Mt=this.buf,Me,Ht;return Ht=Mt[this.pos++],Me=Ht&127,Ht<128||(Ht=Mt[this.pos++],Me|=(Ht&127)<<7,Ht<128)||(Ht=Mt[this.pos++],Me|=(Ht&127)<<14,Ht<128)||(Ht=Mt[this.pos++],Me|=(Ht&127)<<21,Ht<128)?Me:(Ht=Mt[this.pos],Me|=(Ht&15)<<28,oe(Me,mt,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var mt=this.readVarint();return mt%2===1?(mt+1)/-2:mt/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var mt=this.readVarint()+this.pos,Mt=this.pos;return this.pos=mt,mt-Mt>=$&&X?Et(this.buf,Mt,mt):st(this.buf,Mt,mt)},readBytes:function(){var mt=this.readVarint()+this.pos,Mt=this.buf.subarray(this.pos,mt);return this.pos=mt,Mt},readPackedVarint:function(mt,Mt){if(this.type!==V.Bytes)return mt.push(this.readVarint(Mt));var Me=re(this);for(mt=mt||[];this.pos127;);else if(Mt===V.Bytes)this.pos=this.readVarint()+this.pos;else if(Mt===V.Fixed32)this.pos+=4;else if(Mt===V.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+Mt)},writeTag:function(mt,Mt){this.writeVarint(mt<<3|Mt)},realloc:function(mt){for(var Mt=this.length||16;Mt268435455||mt<0){ce(mt,this);return}this.realloc(4),this.buf[this.pos++]=mt&127|(mt>127?128:0),!(mt<=127)&&(this.buf[this.pos++]=(mt>>>=7)&127|(mt>127?128:0),!(mt<=127)&&(this.buf[this.pos++]=(mt>>>=7)&127|(mt>127?128:0),!(mt<=127)&&(this.buf[this.pos++]=mt>>>7&127)))},writeSVarint:function(mt){this.writeVarint(mt<0?-mt*2-1:mt*2)},writeBoolean:function(mt){this.writeVarint(!!mt)},writeString:function(mt){mt=String(mt),this.realloc(mt.length*4),this.pos++;var Mt=this.pos;this.pos=at(this.buf,mt,this.pos);var Me=this.pos-Mt;Me>=128&&Ee(Mt,Me,this),this.pos=Mt-1,this.writeVarint(Me),this.pos+=Me},writeFloat:function(mt){this.realloc(4),M.write(this.buf,mt,this.pos,!0,23,4),this.pos+=4},writeDouble:function(mt){this.realloc(8),M.write(this.buf,mt,this.pos,!0,52,8),this.pos+=8},writeBytes:function(mt){var Mt=mt.length;this.writeVarint(Mt),this.realloc(Mt);for(var Me=0;Me=128&&Ee(Me,Ht,this),this.pos=Me-1,this.writeVarint(Ht),this.pos+=Ht},writeMessage:function(mt,Mt,Me){this.writeTag(mt,V.Bytes),this.writeRawMessage(Mt,Me)},writePackedVarint:function(mt,Mt){Mt.length&&this.writeMessage(mt,qe,Mt)},writePackedSVarint:function(mt,Mt){Mt.length&&this.writeMessage(mt,Xe,Mt)},writePackedBoolean:function(mt,Mt){Mt.length&&this.writeMessage(mt,lt,Mt)},writePackedFloat:function(mt,Mt){Mt.length&&this.writeMessage(mt,ft,Mt)},writePackedDouble:function(mt,Mt){Mt.length&&this.writeMessage(mt,Ge,Mt)},writePackedFixed32:function(mt,Mt){Mt.length&&this.writeMessage(mt,Ye,Mt)},writePackedSFixed32:function(mt,Mt){Mt.length&&this.writeMessage(mt,It,Mt)},writePackedFixed64:function(mt,Mt){Mt.length&&this.writeMessage(mt,At,Mt)},writePackedSFixed64:function(mt,Mt){Mt.length&&this.writeMessage(mt,Ue,Mt)},writeBytesField:function(mt,Mt){this.writeTag(mt,V.Bytes),this.writeBytes(Mt)},writeFixed32Field:function(mt,Mt){this.writeTag(mt,V.Fixed32),this.writeFixed32(Mt)},writeSFixed32Field:function(mt,Mt){this.writeTag(mt,V.Fixed32),this.writeSFixed32(Mt)},writeFixed64Field:function(mt,Mt){this.writeTag(mt,V.Fixed64),this.writeFixed64(Mt)},writeSFixed64Field:function(mt,Mt){this.writeTag(mt,V.Fixed64),this.writeSFixed64(Mt)},writeVarintField:function(mt,Mt){this.writeTag(mt,V.Varint),this.writeVarint(Mt)},writeSVarintField:function(mt,Mt){this.writeTag(mt,V.Varint),this.writeSVarint(Mt)},writeStringField:function(mt,Mt){this.writeTag(mt,V.Bytes),this.writeString(Mt)},writeFloatField:function(mt,Mt){this.writeTag(mt,V.Fixed32),this.writeFloat(Mt)},writeDoubleField:function(mt,Mt){this.writeTag(mt,V.Fixed64),this.writeDouble(Mt)},writeBooleanField:function(mt,Mt){this.writeVarintField(mt,!!Mt)}};function oe(mt,Mt,Me){var Ht=Me.buf,Rt,vt;if(vt=Ht[Me.pos++],Rt=(vt&112)>>4,vt<128||(vt=Ht[Me.pos++],Rt|=(vt&127)<<3,vt<128)||(vt=Ht[Me.pos++],Rt|=(vt&127)<<10,vt<128)||(vt=Ht[Me.pos++],Rt|=(vt&127)<<17,vt<128)||(vt=Ht[Me.pos++],Rt|=(vt&127)<<24,vt<128)||(vt=Ht[Me.pos++],Rt|=(vt&1)<<31,vt<128))return le(mt,Rt,Mt);throw new Error("Expected varint not more than 10 bytes")}function re(mt){return mt.type===V.Bytes?mt.readVarint()+mt.pos:mt.pos+1}function le(mt,Mt,Me){return Me?Mt*4294967296+(mt>>>0):(Mt>>>0)*4294967296+(mt>>>0)}function ce(mt,Mt){var Me,Ht;if(mt>=0?(Me=mt%4294967296|0,Ht=mt/4294967296|0):(Me=~(-mt%4294967296),Ht=~(-mt/4294967296),Me^4294967295?Me=Me+1|0:(Me=0,Ht=Ht+1|0)),mt>=18446744073709552e3||mt<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Mt.realloc(10),Ie(Me,Ht,Mt),we(Ht,Mt)}function Ie(mt,Mt,Me){Me.buf[Me.pos++]=mt&127|128,mt>>>=7,Me.buf[Me.pos++]=mt&127|128,mt>>>=7,Me.buf[Me.pos++]=mt&127|128,mt>>>=7,Me.buf[Me.pos++]=mt&127|128,mt>>>=7,Me.buf[Me.pos]=mt&127}function we(mt,Mt){var Me=(mt&7)<<4;Mt.buf[Mt.pos++]|=Me|((mt>>>=3)?128:0),mt&&(Mt.buf[Mt.pos++]=mt&127|((mt>>>=7)?128:0),mt&&(Mt.buf[Mt.pos++]=mt&127|((mt>>>=7)?128:0),mt&&(Mt.buf[Mt.pos++]=mt&127|((mt>>>=7)?128:0),mt&&(Mt.buf[Mt.pos++]=mt&127|((mt>>>=7)?128:0),mt&&(Mt.buf[Mt.pos++]=mt&127)))))}function Ee(mt,Mt,Me){var Ht=Mt<=16383?1:Mt<=2097151?2:Mt<=268435455?3:Math.floor(Math.log(Mt)/(Math.LN2*7));Me.realloc(Ht);for(var Rt=Me.pos-1;Rt>=mt;Rt--)Me.buf[Rt+Ht]=Me.buf[Rt]}function qe(mt,Mt){for(var Me=0;Me>>8,mt[Me+2]=Mt>>>16,mt[Me+3]=Mt>>>24}function Ct(mt,Mt){return(mt[Mt]|mt[Mt+1]<<8|mt[Mt+2]<<16)+(mt[Mt+3]<<24)}function st(mt,Mt,Me){for(var Ht="",Rt=Mt;Rt239?4:vt>223?3:vt>191?2:1;if(Rt+Ce>Me)break;var pt,et,br;Ce===1?vt<128&&(Je=vt):Ce===2?(pt=mt[Rt+1],(pt&192)===128&&(Je=(vt&31)<<6|pt&63,Je<=127&&(Je=null))):Ce===3?(pt=mt[Rt+1],et=mt[Rt+2],(pt&192)===128&&(et&192)===128&&(Je=(vt&15)<<12|(pt&63)<<6|et&63,(Je<=2047||Je>=55296&&Je<=57343)&&(Je=null))):Ce===4&&(pt=mt[Rt+1],et=mt[Rt+2],br=mt[Rt+3],(pt&192)===128&&(et&192)===128&&(br&192)===128&&(Je=(vt&15)<<18|(pt&63)<<12|(et&63)<<6|br&63,(Je<=65535||Je>=1114112)&&(Je=null))),Je===null?(Je=65533,Ce=1):Je>65535&&(Je-=65536,Ht+=String.fromCharCode(Je>>>10&1023|55296),Je=56320|Je&1023),Ht+=String.fromCharCode(Je),Rt+=Ce}return Ht}function Et(mt,Mt,Me){return X.decode(mt.subarray(Mt,Me))}function at(mt,Mt,Me){for(var Ht=0,Rt,vt;Ht55295&&Rt<57344)if(vt)if(Rt<56320){mt[Me++]=239,mt[Me++]=191,mt[Me++]=189,vt=Rt;continue}else Rt=vt-55296<<10|Rt-56320|65536,vt=null;else{Rt>56319||Ht+1===Mt.length?(mt[Me++]=239,mt[Me++]=191,mt[Me++]=189):vt=Rt;continue}else vt&&(mt[Me++]=239,mt[Me++]=191,mt[Me++]=189,vt=null);Rt<128?mt[Me++]=Rt:(Rt<2048?mt[Me++]=Rt>>6|192:(Rt<65536?mt[Me++]=Rt>>12|224:(mt[Me++]=Rt>>18|240,mt[Me++]=Rt>>12&63|128),mt[Me++]=Rt>>6&63|128),mt[Me++]=Rt&63|128)}return Me}},35447:function(Ke){Ke.exports=function(_,M,V,y){var d=_[0],$=_[1],X=!1;V===void 0&&(V=0),y===void 0&&(y=M.length);for(var oe=(y-V)/2,re=0,le=oe-1;re$!=Ee>$&&d<(we-ce)*($-Ie)/(Ee-Ie)+ce;qe&&(X=!X)}return X}},76469:function(Ke,ye,_){var M=_(35447),V=_(47176);Ke.exports=function(d,$,X,oe){return $.length>0&&Array.isArray($[0])?V(d,$,X,oe):M(d,$,X,oe)},Ke.exports.nested=V,Ke.exports.flat=M},47176:function(Ke){Ke.exports=function(_,M,V,y){var d=_[0],$=_[1],X=!1;V===void 0&&(V=0),y===void 0&&(y=M.length);for(var oe=y-V,re=0,le=oe-1;re$!=Ee>$&&d<(we-ce)*($-Ie)/(Ee-Ie)+ce;qe&&(X=!X)}return X}},58767:function(Ke,ye,_){var M=_(97671);(function(V,y){Ke.exports=y()})(this,function(){"use strict";function V(Ir,bt){var Yt={label:0,sent:function(){if(Tr[0]&1)throw Tr[1];return Tr[1]},trys:[],ops:[]},Pt,xr,Tr,hn;return hn={next:Cn(0),throw:Cn(1),return:Cn(2)},typeof Symbol=="function"&&(hn[Symbol.iterator]=function(){return this}),hn;function Cn(jt){return function(He){return tr([jt,He])}}function tr(jt){if(Pt)throw new TypeError("Generator is already executing.");for(;Yt;)try{if(Pt=1,xr&&(Tr=jt[0]&2?xr.return:jt[0]?xr.throw||((Tr=xr.return)&&Tr.call(xr),0):xr.next)&&!(Tr=Tr.call(xr,jt[1])).done)return Tr;switch(xr=0,Tr&&(jt=[jt[0]&2,Tr.value]),jt[0]){case 0:case 1:Tr=jt;break;case 4:return Yt.label++,{value:jt[1],done:!1};case 5:Yt.label++,xr=jt[1],jt=[0];continue;case 7:jt=Yt.ops.pop(),Yt.trys.pop();continue;default:if(Tr=Yt.trys,!(Tr=Tr.length>0&&Tr[Tr.length-1])&&(jt[0]===6||jt[0]===2)){Yt=0;continue}if(jt[0]===3&&(!Tr||jt[1]>Tr[0]&&jt[1]bt?1:Ir0){if(bt.right===null)break;if(Yt(Ir,bt.right.key)>0){var Cn=bt.right;if(bt.right=Cn.left,Cn.left=bt,bt=Cn,bt.right===null)break}xr.right=bt,xr=bt,bt=bt.right}else break}return xr.right=bt.left,Tr.left=bt.right,bt.left=Pt.right,bt.right=Pt.left,bt}function X(Ir,bt,Yt,Pt){var xr=new y(Ir,bt);if(Yt===null)return xr.left=xr.right=null,xr;Yt=$(Ir,Yt,Pt);var Tr=Pt(Ir,Yt.key);return Tr<0?(xr.left=Yt.left,xr.right=Yt,Yt.left=null):Tr>=0&&(xr.right=Yt.right,xr.left=Yt,Yt.right=null),xr}function oe(Ir,bt,Yt){var Pt=null,xr=null;if(bt){bt=$(Ir,bt,Yt);var Tr=Yt(bt.key,Ir);Tr===0?(Pt=bt.left,xr=bt.right):Tr<0?(xr=bt.right,bt.right=null,Pt=bt):(Pt=bt.left,bt.left=null,xr=bt)}return{left:Pt,right:xr}}function re(Ir,bt,Yt){return bt===null?Ir:(Ir===null||(bt=$(Ir.key,bt,Yt),bt.left=Ir),bt)}function le(Ir,bt,Yt,Pt,xr){if(Ir){Pt(""+bt+(Yt?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+xr(Ir)+` -`);var Tr=bt+(Yt?" ":"\u2502 ");Ir.left&&le(Ir.left,Tr,!1,Pt,xr),Ir.right&&le(Ir.right,Tr,!0,Pt,xr)}}var ce=function(){function Ir(bt){bt===void 0&&(bt=d),this._root=null,this._size=0,this._comparator=bt}return Ir.prototype.insert=function(bt,Yt){return this._size++,this._root=X(bt,Yt,this._root,this._comparator)},Ir.prototype.add=function(bt,Yt){var Pt=new y(bt,Yt);this._root===null&&(Pt.left=Pt.right=null,this._size++,this._root=Pt);var xr=this._comparator,Tr=$(bt,this._root,xr),hn=xr(bt,Tr.key);return hn===0?this._root=Tr:(hn<0?(Pt.left=Tr.left,Pt.right=Tr,Tr.left=null):hn>0&&(Pt.right=Tr.right,Pt.left=Tr,Tr.right=null),this._size++,this._root=Pt),this._root},Ir.prototype.remove=function(bt){this._root=this._remove(bt,this._root,this._comparator)},Ir.prototype._remove=function(bt,Yt,Pt){var xr;if(Yt===null)return null;Yt=$(bt,Yt,Pt);var Tr=Pt(bt,Yt.key);return Tr===0?(Yt.left===null?xr=Yt.right:(xr=$(bt,Yt.left,Pt),xr.right=Yt.right),this._size--,xr):Yt},Ir.prototype.pop=function(){var bt=this._root;if(bt){for(;bt.left;)bt=bt.left;return this._root=$(bt.key,this._root,this._comparator),this._root=this._remove(bt.key,this._root,this._comparator),{key:bt.key,data:bt.data}}return null},Ir.prototype.findStatic=function(bt){for(var Yt=this._root,Pt=this._comparator;Yt;){var xr=Pt(bt,Yt.key);if(xr===0)return Yt;xr<0?Yt=Yt.left:Yt=Yt.right}return null},Ir.prototype.find=function(bt){return this._root&&(this._root=$(bt,this._root,this._comparator),this._comparator(bt,this._root.key)!==0)?null:this._root},Ir.prototype.contains=function(bt){for(var Yt=this._root,Pt=this._comparator;Yt;){var xr=Pt(bt,Yt.key);if(xr===0)return!0;xr<0?Yt=Yt.left:Yt=Yt.right}return!1},Ir.prototype.forEach=function(bt,Yt){for(var Pt=this._root,xr=[],Tr=!1;!Tr;)Pt!==null?(xr.push(Pt),Pt=Pt.left):xr.length!==0?(Pt=xr.pop(),bt.call(Yt,Pt),Pt=Pt.right):Tr=!0;return this},Ir.prototype.range=function(bt,Yt,Pt,xr){for(var Tr=[],hn=this._comparator,Cn=this._root,tr;Tr.length!==0||Cn;)if(Cn)Tr.push(Cn),Cn=Cn.left;else{if(Cn=Tr.pop(),tr=hn(Cn.key,Yt),tr>0)break;if(hn(Cn.key,bt)>=0&&Pt.call(xr,Cn))return this;Cn=Cn.right}return this},Ir.prototype.keys=function(){var bt=[];return this.forEach(function(Yt){var Pt=Yt.key;return bt.push(Pt)}),bt},Ir.prototype.values=function(){var bt=[];return this.forEach(function(Yt){var Pt=Yt.data;return bt.push(Pt)}),bt},Ir.prototype.min=function(){return this._root?this.minNode(this._root).key:null},Ir.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},Ir.prototype.minNode=function(bt){if(bt===void 0&&(bt=this._root),bt)for(;bt.left;)bt=bt.left;return bt},Ir.prototype.maxNode=function(bt){if(bt===void 0&&(bt=this._root),bt)for(;bt.right;)bt=bt.right;return bt},Ir.prototype.at=function(bt){for(var Yt=this._root,Pt=!1,xr=0,Tr=[];!Pt;)if(Yt)Tr.push(Yt),Yt=Yt.left;else if(Tr.length>0){if(Yt=Tr.pop(),xr===bt)return Yt;xr++,Yt=Yt.right}else Pt=!0;return null},Ir.prototype.next=function(bt){var Yt=this._root,Pt=null;if(bt.right){for(Pt=bt.right;Pt.left;)Pt=Pt.left;return Pt}for(var xr=this._comparator;Yt;){var Tr=xr(bt.key,Yt.key);if(Tr===0)break;Tr<0?(Pt=Yt,Yt=Yt.left):Yt=Yt.right}return Pt},Ir.prototype.prev=function(bt){var Yt=this._root,Pt=null;if(bt.left!==null){for(Pt=bt.left;Pt.right;)Pt=Pt.right;return Pt}for(var xr=this._comparator;Yt;){var Tr=xr(bt.key,Yt.key);if(Tr===0)break;Tr<0?Yt=Yt.left:(Pt=Yt,Yt=Yt.right)}return Pt},Ir.prototype.clear=function(){return this._root=null,this._size=0,this},Ir.prototype.toList=function(){return Ee(this._root)},Ir.prototype.load=function(bt,Yt,Pt){Yt===void 0&&(Yt=[]),Pt===void 0&&(Pt=!1);var xr=bt.length,Tr=this._comparator;if(Pt&&ft(bt,Yt,0,xr-1,Tr),this._root===null)this._root=Ie(bt,Yt,0,xr),this._size=xr;else{var hn=Xe(this.toList(),we(bt,Yt),Tr);xr=this._size+xr,this._root=qe({head:hn},0,xr)}return this},Ir.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(Ir.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(Ir.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),Ir.prototype.toString=function(bt){bt===void 0&&(bt=function(Pt){return String(Pt.key)});var Yt=[];return le(this._root,"",!0,function(Pt){return Yt.push(Pt)},bt),Yt.join("")},Ir.prototype.update=function(bt,Yt,Pt){var xr=this._comparator,Tr=oe(bt,this._root,xr),hn=Tr.left,Cn=Tr.right;xr(bt,Yt)<0?Cn=X(Yt,Pt,Cn,xr):hn=X(Yt,Pt,hn,xr),this._root=re(hn,Cn,xr)},Ir.prototype.split=function(bt){return oe(bt,this._root,this._comparator)},Ir.prototype[Symbol.iterator]=function(){var bt,Yt,Pt;return V(this,function(xr){switch(xr.label){case 0:bt=this._root,Yt=[],Pt=!1,xr.label=1;case 1:return Pt?[3,6]:bt===null?[3,2]:(Yt.push(bt),bt=bt.left,[3,5]);case 2:return Yt.length===0?[3,4]:(bt=Yt.pop(),[4,bt]);case 3:return xr.sent(),bt=bt.right,[3,5];case 4:Pt=!0,xr.label=5;case 5:return[3,1];case 6:return[2]}})},Ir}();function Ie(Ir,bt,Yt,Pt){var xr=Pt-Yt;if(xr>0){var Tr=Yt+Math.floor(xr/2),hn=Ir[Tr],Cn=bt[Tr],tr=new y(hn,Cn);return tr.left=Ie(Ir,bt,Yt,Tr),tr.right=Ie(Ir,bt,Tr+1,Pt),tr}return null}function we(Ir,bt){for(var Yt=new y(null,null),Pt=Yt,xr=0;xr0?(bt=Tr=Tr.next=Yt.pop(),bt=bt.right):Pt=!0;return Tr.next=null,xr.next}function qe(Ir,bt,Yt){var Pt=Yt-bt;if(Pt>0){var xr=bt+Math.floor(Pt/2),Tr=qe(Ir,bt,xr),hn=Ir.head;return hn.left=Tr,Ir.head=Ir.head.next,hn.right=qe(Ir,xr+1,Yt),hn}return null}function Xe(Ir,bt,Yt){for(var Pt=new y(null,null),xr=Pt,Tr=Ir,hn=bt;Tr!==null&&hn!==null;)Yt(Tr.key,hn.key)<0?(xr.next=Tr,Tr=Tr.next):(xr.next=hn,hn=hn.next),xr=xr.next;return Tr!==null?xr.next=Tr:hn!==null&&(xr.next=hn),Pt.next}function ft(Ir,bt,Yt,Pt,xr){if(!(Yt>=Pt)){for(var Tr=Ir[Yt+Pt>>1],hn=Yt-1,Cn=Pt+1;;){do hn++;while(xr(Ir[hn],Tr)<0);do Cn--;while(xr(Ir[Cn],Tr)>0);if(hn>=Cn)break;var tr=Ir[hn];Ir[hn]=Ir[Cn],Ir[Cn]=tr,tr=bt[hn],bt[hn]=bt[Cn],bt[Cn]=tr}ft(Ir,bt,Yt,Cn,xr),ft(Ir,bt,Cn+1,Pt,xr)}}const Ge=(Ir,bt)=>Ir.ll.x<=bt.x&&bt.x<=Ir.ur.x&&Ir.ll.y<=bt.y&&bt.y<=Ir.ur.y,lt=(Ir,bt)=>{if(bt.ur.x{if(-Yejt==He>-jt?(Tr=jt,jt=bt[++We]):(Tr=He,He=Pt[++_t]);let Zt=0;if(Wejt==He>-jt?(hn=jt+Tr,Cn=Tr-(hn-jt),jt=bt[++We]):(hn=He+Tr,Cn=Tr-(hn-He),He=Pt[++_t]),Tr=hn,Cn!==0&&(xr[Zt++]=Cn);Wejt==He>-jt?(hn=Tr+jt,tr=hn-Tr,Cn=Tr-(hn-tr)+(jt-tr),jt=bt[++We]):(hn=Tr+He,tr=hn-Tr,Cn=Tr-(hn-tr)+(He-tr),He=Pt[++_t]),Tr=hn,Cn!==0&&(xr[Zt++]=Cn);for(;We=Fa||-ki>=Fa||(We=Ir-Wn,Cn=Ir-(Wn+We)+(We-xr),We=Yt-Tn,jt=Yt-(Tn+We)+(We-xr),We=bt-ai,tr=bt-(ai+We)+(We-Tr),We=Pt-Ii,He=Pt-(Ii+We)+(We-Tr),Cn===0&&tr===0&&jt===0&&He===0)||(Fa=Rt*hn+Et*Math.abs(ki),ki+=Wn*He+Ii*Cn-(ai*jt+Tn*tr),ki>=Fa||-ki>=Fa))return ki;on=Cn*Ii,_t=st*Cn,Zt=_t-(_t-Cn),rr=Cn-Zt,_t=st*Ii,fr=_t-(_t-Ii),mr=Ii-fr,ri=rr*mr-(on-Zt*fr-rr*fr-Zt*mr),nn=tr*Tn,_t=st*tr,Zt=_t-(_t-tr),rr=tr-Zt,_t=st*Tn,fr=_t-(_t-Tn),mr=Tn-fr,ln=rr*mr-(nn-Zt*fr-rr*fr-Zt*mr),Qe=ri-ln,We=ri-Qe,et[0]=ri-(Qe+We)+(We-ln),er=on+Qe,We=er-on,jr=on-(er-We)+(Qe-We),Qe=jr-nn,We=jr-Qe,et[1]=jr-(Qe+We)+(We-nn),Yn=er+Qe,We=Yn-er,et[2]=er-(Yn-We)+(Qe-We),et[3]=Yn;const sa=at(4,vt,4,et,Je);on=Wn*He,_t=st*Wn,Zt=_t-(_t-Wn),rr=Wn-Zt,_t=st*He,fr=_t-(_t-He),mr=He-fr,ri=rr*mr-(on-Zt*fr-rr*fr-Zt*mr),nn=ai*jt,_t=st*ai,Zt=_t-(_t-ai),rr=ai-Zt,_t=st*jt,fr=_t-(_t-jt),mr=jt-fr,ln=rr*mr-(nn-Zt*fr-rr*fr-Zt*mr),Qe=ri-ln,We=ri-Qe,et[0]=ri-(Qe+We)+(We-ln),er=on+Qe,We=er-on,jr=on-(er-We)+(Qe-We),Qe=jr-nn,We=jr-Qe,et[1]=jr-(Qe+We)+(We-nn),Yn=er+Qe,We=Yn-er,et[2]=er-(Yn-We)+(Qe-We),et[3]=Yn;const vo=at(sa,Je,4,et,Ce);on=Cn*He,_t=st*Cn,Zt=_t-(_t-Cn),rr=Cn-Zt,_t=st*He,fr=_t-(_t-He),mr=He-fr,ri=rr*mr-(on-Zt*fr-rr*fr-Zt*mr),nn=tr*jt,_t=st*tr,Zt=_t-(_t-tr),rr=tr-Zt,_t=st*jt,fr=_t-(_t-jt),mr=jt-fr,ln=rr*mr-(nn-Zt*fr-rr*fr-Zt*mr),Qe=ri-ln,We=ri-Qe,et[0]=ri-(Qe+We)+(We-ln),er=on+Qe,We=er-on,jr=on-(er-We)+(Qe-We),Qe=jr-nn,We=jr-Qe,et[1]=jr-(Qe+We)+(We-nn),Yn=er+Qe,We=Yn-er,et[2]=er-(Yn-We)+(Qe-We),et[3]=Yn;const Ro=at(vo,Ce,4,et,pt);return pt[Ro-1]}function Jt(Ir,bt,Yt,Pt,xr,Tr){const hn=(bt-Tr)*(Yt-xr),Cn=(Ir-xr)*(Pt-Tr),tr=hn-Cn,jt=Math.abs(hn+Cn);return Math.abs(tr)>=Me*jt?tr:-br(Ir,bt,Yt,Pt,xr,Tr,jt)}const Vr=(Ir,bt)=>Ir.x*bt.y-Ir.y*bt.x,gn=(Ir,bt)=>Ir.x*bt.x+Ir.y*bt.y,yn=(Ir,bt,Yt)=>{const Pt=Jt(Ir.x,Ir.y,bt.x,bt.y,Yt.x,Yt.y);return Pt>0?-1:Pt<0?1:0},_i=Ir=>Math.sqrt(gn(Ir,Ir)),Hn=(Ir,bt,Yt)=>{const Pt={x:bt.x-Ir.x,y:bt.y-Ir.y},xr={x:Yt.x-Ir.x,y:Yt.y-Ir.y};return Vr(xr,Pt)/_i(xr)/_i(Pt)},Ln=(Ir,bt,Yt)=>{const Pt={x:bt.x-Ir.x,y:bt.y-Ir.y},xr={x:Yt.x-Ir.x,y:Yt.y-Ir.y};return gn(xr,Pt)/_i(xr)/_i(Pt)},Ia=(Ir,bt,Yt)=>bt.y===0?null:{x:Ir.x+bt.x/bt.y*(Yt-Ir.y),y:Yt},Zi=(Ir,bt,Yt)=>bt.x===0?null:{x:Yt,y:Ir.y+bt.y/bt.x*(Yt-Ir.x)},Ua=(Ir,bt,Yt,Pt)=>{if(bt.x===0)return Zi(Yt,Pt,Ir.x);if(Pt.x===0)return Zi(Ir,bt,Yt.x);if(bt.y===0)return Ia(Yt,Pt,Ir.y);if(Pt.y===0)return Ia(Ir,bt,Yt.y);const xr=Vr(bt,Pt);if(xr==0)return null;const Tr={x:Yt.x-Ir.x,y:Yt.y-Ir.y},hn=Vr(Tr,bt)/xr,Cn=Vr(Tr,Pt)/xr,tr=Ir.x+Cn*bt.x,jt=Yt.x+hn*Pt.x,He=Ir.y+Cn*bt.y,We=Yt.y+hn*Pt.y,_t=(tr+jt)/2,Zt=(He+We)/2;return{x:_t,y:Zt}};class fa{static compare(bt,Yt){const Pt=fa.comparePoints(bt.point,Yt.point);return Pt!==0?Pt:(bt.point!==Yt.point&&bt.link(Yt),bt.isLeft!==Yt.isLeft?bt.isLeft?1:-1:mo.compare(bt.segment,Yt.segment))}static comparePoints(bt,Yt){return bt.xYt.x?1:bt.yYt.y?1:0}constructor(bt,Yt){bt.events===void 0?bt.events=[this]:bt.events.push(this),this.point=bt,this.isLeft=Yt}link(bt){if(bt.point===this.point)throw new Error("Tried to link already linked events");const Yt=bt.point.events;for(let Pt=0,xr=Yt.length;Pt{const Tr=xr.otherSE;Yt.set(xr,{sine:Hn(this.point,bt.point,Tr.point),cosine:Ln(this.point,bt.point,Tr.point)})};return(xr,Tr)=>{Yt.has(xr)||Pt(xr),Yt.has(Tr)||Pt(Tr);const{sine:hn,cosine:Cn}=Yt.get(xr),{sine:tr,cosine:jt}=Yt.get(Tr);return hn>=0&&tr>=0?Cnjt?-1:0:hn<0&&tr<0?Cnjt?1:0:trhn?1:0}}}let ka=0;class mo{static compare(bt,Yt){const Pt=bt.leftSE.point.x,xr=Yt.leftSE.point.x,Tr=bt.rightSE.point.x,hn=Yt.rightSE.point.x;if(hnCn&&tr>jt)return-1;const We=bt.comparePoint(Yt.leftSE.point);if(We<0)return 1;if(We>0)return-1;const _t=Yt.comparePoint(bt.rightSE.point);return _t!==0?_t:-1}if(Pt>xr){if(Cntr&&Cn>He)return 1;const We=Yt.comparePoint(bt.leftSE.point);if(We!==0)return We;const _t=bt.comparePoint(Yt.rightSE.point);return _t<0?1:_t>0?-1:1}if(Cntr)return 1;if(Trhn){const We=bt.comparePoint(Yt.rightSE.point);if(We<0)return 1;if(We>0)return-1}if(Tr!==hn){const We=jt-Cn,_t=Tr-Pt,Zt=He-tr,rr=hn-xr;if(We>_t&&Ztrr)return-1}return Tr>hn?1:TrHe?1:bt.idYt.id?1:0}constructor(bt,Yt,Pt,xr){this.id=++ka,this.leftSE=bt,bt.segment=this,bt.otherSE=Yt,this.rightSE=Yt,Yt.segment=this,Yt.otherSE=bt,this.rings=Pt,this.windings=xr}static fromRing(bt,Yt,Pt){let xr,Tr,hn;const Cn=fa.comparePoints(bt,Yt);if(Cn<0)xr=bt,Tr=Yt,hn=1;else if(Cn>0)xr=Yt,Tr=bt,hn=-1;else throw new Error(`Tried to create degenerate segment at [${bt.x}, ${bt.y}]`);const tr=new fa(xr,!0),jt=new fa(Tr,!1);return new mo(tr,jt,[Pt],[hn])}replaceRightSE(bt){this.rightSE=bt,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const bt=this.leftSE.point.y,Yt=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:btYt?bt:Yt}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(bt){return bt.x===this.leftSE.point.x&&bt.y===this.leftSE.point.y||bt.x===this.rightSE.point.x&&bt.y===this.rightSE.point.y}comparePoint(bt){if(this.isAnEndpoint(bt))return 0;const Yt=this.leftSE.point,Pt=this.rightSE.point,xr=this.vector();if(Yt.x===Pt.x)return bt.x===Yt.x?0:bt.x0&&Cn.swapEvents(),fa.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),Pt&&(xr.checkForConsuming(),Tr.checkForConsuming()),Yt}swapEvents(){const bt=this.rightSE;this.rightSE=this.leftSE,this.leftSE=bt,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let Yt=0,Pt=this.windings.length;Yt0){const Tr=Yt;Yt=Pt,Pt=Tr}if(Yt.prev===Pt){const Tr=Yt;Yt=Pt,Pt=Tr}for(let Tr=0,hn=Pt.rings.length;Trxr.length===1&&xr[0].isSubject;this._isInResult=Pt(bt)!==Pt(Yt);break}default:throw new Error(`Unrecognized operation type found ${ei.type}`)}return this._isInResult}}class _n{constructor(bt,Yt,Pt){if(!Array.isArray(bt)||bt.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=Yt,this.isExterior=Pt,this.segments=[],typeof bt[0][0]!="number"||typeof bt[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const xr=Ze.round(bt[0][0],bt[0][1]);this.bbox={ll:{x:xr.x,y:xr.y},ur:{x:xr.x,y:xr.y}};let Tr=xr;for(let hn=1,Cn=bt.length;hnthis.bbox.ur.x&&(this.bbox.ur.x=tr.x),tr.y>this.bbox.ur.y&&(this.bbox.ur.y=tr.y),Tr=tr)}(xr.x!==Tr.x||xr.y!==Tr.y)&&this.segments.push(mo.fromRing(Tr,xr,this))}getSweepEvents(){const bt=[];for(let Yt=0,Pt=this.segments.length;Ytthis.bbox.ur.x&&(this.bbox.ur.x=Tr.bbox.ur.x),Tr.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=Tr.bbox.ur.y),this.interiorRings.push(Tr)}this.multiPoly=Yt}getSweepEvents(){const bt=this.exteriorRing.getSweepEvents();for(let Yt=0,Pt=this.interiorRings.length;Ytthis.bbox.ur.x&&(this.bbox.ur.x=Tr.bbox.ur.x),Tr.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=Tr.bbox.ur.y),this.polys.push(Tr)}this.isSubject=Yt}getSweepEvents(){const bt=[];for(let Yt=0,Pt=this.polys.length;Yt0&&(bt=hn)}let Yt=bt.segment.prevInResult(),Pt=Yt?Yt.prevInResult():null;for(;;){if(!Yt)return null;if(!Pt)return Yt.ringOut;if(Pt.ringOut!==Yt.ringOut)return Pt.ringOut.enclosingRing()!==Yt.ringOut?Yt.ringOut:Yt.ringOut.enclosingRing();Yt=Pt.prevInResult(),Pt=Yt?Yt.prevInResult():null}}}class Ea{constructor(bt){this.exteriorRing=bt,bt.poly=this,this.interiorRings=[]}addInterior(bt){this.interiorRings.push(bt),bt.poly=this}getGeom(){const bt=[this.exteriorRing.getGeom()];if(bt[0]===null)return null;for(let Yt=0,Pt=this.interiorRings.length;Yt1&&arguments[1]!==void 0?arguments[1]:mo.compare;this.queue=bt,this.tree=new ce(Yt),this.segments=[]}process(bt){const Yt=bt.segment,Pt=[];if(bt.consumedBy)return bt.isLeft?this.queue.remove(bt.otherSE):this.tree.remove(Yt),Pt;const xr=bt.isLeft?this.tree.add(Yt):this.tree.find(Yt);if(!xr)throw new Error(`Unable to find segment #${Yt.id} [${Yt.leftSE.point.x}, ${Yt.leftSE.point.y}] -> [${Yt.rightSE.point.x}, ${Yt.rightSE.point.y}] in SweepLine tree.`);let Tr=xr,hn=xr,Cn,tr;for(;Cn===void 0;)Tr=this.tree.prev(Tr),Tr===null?Cn=null:Tr.key.consumedBy===void 0&&(Cn=Tr.key);for(;tr===void 0;)hn=this.tree.next(hn),hn===null?tr=null:hn.key.consumedBy===void 0&&(tr=hn.key);if(bt.isLeft){let jt=null;if(Cn){const We=Cn.getIntersection(Yt);if(We!==null&&(Yt.isAnEndpoint(We)||(jt=We),!Cn.isAnEndpoint(We))){const _t=this._splitSafely(Cn,We);for(let Zt=0,rr=_t.length;Zt0?(this.tree.remove(Yt),Pt.push(bt)):(this.segments.push(Yt),Yt.prev=Cn)}else{if(Cn&&tr){const jt=Cn.getIntersection(tr);if(jt!==null){if(!Cn.isAnEndpoint(jt)){const He=this._splitSafely(Cn,jt);for(let We=0,_t=He.length;We<_t;We++)Pt.push(He[We])}if(!tr.isAnEndpoint(jt)){const He=this._splitSafely(tr,jt);for(let We=0,_t=He.length;We<_t;We++)Pt.push(He[We])}}}this.tree.remove(Yt)}return Pt}_splitSafely(bt,Yt){this.tree.remove(bt);const Pt=bt.rightSE;this.queue.remove(Pt);const xr=bt.split(Yt);return xr.push(Pt),bt.consumedBy===void 0&&this.tree.add(bt),xr}}const oa=typeof M!="undefined"&&{NODE_ENV:"production",PUBLIC_PATH:"/back-home-route-weather/"}.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,ji=typeof M!="undefined"&&{NODE_ENV:"production",PUBLIC_PATH:"/back-home-route-weather/"}.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class so{run(bt,Yt,Pt){ei.type=bt,Ze.reset();const xr=[new Zn(Yt,!0)];for(let We=0,_t=Pt.length;We<_t;We++)xr.push(new Zn(Pt[We],!1));if(ei.numMultiPolys=xr.length,ei.type==="difference"){const We=xr[0];let _t=1;for(;_toa)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const hn=new Qa(Tr);let Cn=Tr.size,tr=Tr.pop();for(;tr;){const We=tr.key;if(Tr.size===Cn){const Zt=We.segment;throw new Error(`Unable to pop() ${We.isLeft?"left":"right"} SweepEvent [${We.point.x}, ${We.point.y}] from segment #${Zt.id} [${Zt.leftSE.point.x}, ${Zt.leftSE.point.y}] -> [${Zt.rightSE.point.x}, ${Zt.rightSE.point.y}] from queue.`)}if(Tr.size>oa)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(hn.segments.length>ji)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const _t=hn.process(We);for(let Zt=0,rr=_t.length;Zt1?bt-1:0),Pt=1;Pt1?bt-1:0),Pt=1;Pt1?bt-1:0),Pt=1;Pt1?bt-1:0),Pt=1;Pt1)for(var ft=1;ft$;){if(X-$>600){var re=X-$+1,le=d-$+1,ce=Math.log(re),Ie=.5*Math.exp(2*ce/3),we=.5*Math.sqrt(ce*Ie*(re-Ie)/re)*(le-re/2<0?-1:1),Ee=Math.max($,Math.floor(d-le*Ie/re+we)),qe=Math.min(X,Math.floor(d+(re-le)*Ie/re+we));_(y,d,Ee,qe,oe)}var Xe=y[d],ft=$,Ge=X;for(M(y,$,d),oe(y[X],Xe)>0&&M(y,$,X);ft0;)Ge--}oe(y[$],Xe)===0?M(y,$,Ge):(Ge++,M(y,Ge,X)),Ge<=d&&($=Ge+1),d<=Ge&&(X=Ge-1)}}function M(y,d,$){var X=y[d];y[d]=y[$],y[$]=X}function V(y,d){return yd?1:0}return ye})},85475:function(Ke,ye,_){"use strict";Ke.exports=V,Ke.exports.default=V;var M=_(13664);function V(Ge,lt){if(!(this instanceof V))return new V(Ge,lt);this._maxEntries=Math.max(4,Ge||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),lt&&this._initFormat(lt),this.clear()}V.prototype={all:function(){return this._all(this.data,[])},search:function(Ge){var lt=this.data,Ye=[],It=this.toBBox;if(!qe(Ge,lt))return Ye;for(var At=[],Ue,rt,Ze,Ct;lt;){for(Ue=0,rt=lt.children.length;Ue=0&&Ue[lt].children.length>this._maxEntries;)this._split(Ue,lt),lt--;this._adjustParentBBoxes(At,Ue,lt)},_split:function(Ge,lt){var Ye=Ge[lt],It=Ye.children.length,At=this._minEntries;this._chooseSplitAxis(Ye,At,It);var Ue=this._chooseSplitIndex(Ye,At,It),rt=Xe(Ye.children.splice(Ue,Ye.children.length-Ue));rt.height=Ye.height,rt.leaf=Ye.leaf,d(Ye,this.toBBox),d(rt,this.toBBox),lt?Ge[lt-1].children.push(rt):this._splitRoot(Ye,rt)},_splitRoot:function(Ge,lt){this.data=Xe([Ge,lt]),this.data.height=Ge.height+1,this.data.leaf=!1,d(this.data,this.toBBox)},_chooseSplitIndex:function(Ge,lt,Ye){var It,At,Ue,rt,Ze,Ct,st,Et;for(Ct=st=1/0,It=lt;It<=Ye-lt;It++)At=$(Ge,0,It,this.toBBox),Ue=$(Ge,It,Ye,this.toBBox),rt=we(At,Ue),Ze=le(At)+le(Ue),rt=lt;Ct--)st=Ge.children[Ct],X(rt,Ge.leaf?At(st):st),Ze+=ce(rt);return Ze},_adjustParentBBoxes:function(Ge,lt,Ye){for(var It=Ye;It>=0;It--)X(lt[It],Ge)},_condense:function(Ge){for(var lt=Ge.length-1,Ye;lt>=0;lt--)Ge[lt].children.length===0?lt>0?(Ye=Ge[lt-1].children,Ye.splice(Ye.indexOf(Ge[lt]),1)):this.clear():d(Ge[lt],this.toBBox)},_initFormat:function(Ge){var lt=["return a"," - b",";"];this.compareMinX=new Function("a","b",lt.join(Ge[0])),this.compareMinY=new Function("a","b",lt.join(Ge[1])),this.toBBox=new Function("a","return {minX: a"+Ge[0]+", minY: a"+Ge[1]+", maxX: a"+Ge[2]+", maxY: a"+Ge[3]+"};")}};function y(Ge,lt,Ye){if(!Ye)return lt.indexOf(Ge);for(var It=0;It=Ge.minX&<.maxY>=Ge.minY}function Xe(Ge){return{children:Ge,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ft(Ge,lt,Ye,It,At){for(var Ue=[lt,Ye],rt;Ue.length;)Ye=Ue.pop(),lt=Ue.pop(),!(Ye-lt<=It)&&(rt=lt+Math.ceil((Ye-lt)/It/2)*It,M(Ge,rt,lt,Ye,At),Ue.push(lt,rt,rt,Ye))}},79535:function(Ke){(function(ye,_){Ke.exports=_()})(this,function(){"use strict";function ye(Xe,ft,Ge,lt,Ye){(function It(At,Ue,rt,Ze,Ct){for(;Ze>rt;){if(Ze-rt>600){var st=Ze-rt+1,Et=Ue-rt+1,at=Math.log(st),mt=.5*Math.exp(2*at/3),Mt=.5*Math.sqrt(at*mt*(st-mt)/st)*(Et-st/2<0?-1:1),Me=Math.max(rt,Math.floor(Ue-Et*mt/st+Mt)),Ht=Math.min(Ze,Math.floor(Ue+(st-Et)*mt/st+Mt));It(At,Ue,Me,Ht,Ct)}var Rt=At[Ue],vt=rt,Je=Ze;for(_(At,rt,Ue),Ct(At[Ze],Rt)>0&&_(At,rt,Ze);vt0;)Je--}Ct(At[rt],Rt)===0?_(At,rt,Je):_(At,++Je,Ze),Je<=Ue&&(rt=Je+1),Ue<=Je&&(Ze=Je-1)}})(Xe,ft,Ge||0,lt||Xe.length-1,Ye||M)}function _(Xe,ft,Ge){var lt=Xe[ft];Xe[ft]=Xe[Ge],Xe[Ge]=lt}function M(Xe,ft){return Xeft?1:0}var V=function(Xe){Xe===void 0&&(Xe=9),this._maxEntries=Math.max(4,Xe),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function y(Xe,ft,Ge){if(!Ge)return ft.indexOf(Xe);for(var lt=0;lt=Xe.minX&&ft.maxY>=Xe.minY}function Ee(Xe){return{children:Xe,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function qe(Xe,ft,Ge,lt,Ye){for(var It=[ft,Ge];It.length;)if(!((Ge=It.pop())-(ft=It.pop())<=lt)){var At=ft+Math.ceil((Ge-ft)/lt/2)*lt;ye(Xe,At,ft,Ge,Ye),It.push(ft,At,At,Ge)}}return V.prototype.all=function(){return this._all(this.data,[])},V.prototype.search=function(Xe){var ft=this.data,Ge=[];if(!we(Xe,ft))return Ge;for(var lt=this.toBBox,Ye=[];ft;){for(var It=0;It=0&&Ye[ft].children.length>this._maxEntries;)this._split(Ye,ft),ft--;this._adjustParentBBoxes(lt,Ye,ft)},V.prototype._split=function(Xe,ft){var Ge=Xe[ft],lt=Ge.children.length,Ye=this._minEntries;this._chooseSplitAxis(Ge,Ye,lt);var It=this._chooseSplitIndex(Ge,Ye,lt),At=Ee(Ge.children.splice(It,Ge.children.length-It));At.height=Ge.height,At.leaf=Ge.leaf,d(Ge,this.toBBox),d(At,this.toBBox),ft?Xe[ft-1].children.push(At):this._splitRoot(Ge,At)},V.prototype._splitRoot=function(Xe,ft){this.data=Ee([Xe,ft]),this.data.height=Xe.height+1,this.data.leaf=!1,d(this.data,this.toBBox)},V.prototype._chooseSplitIndex=function(Xe,ft,Ge){for(var lt,Ye,It,At,Ue,rt,Ze,Ct=1/0,st=1/0,Et=ft;Et<=Ge-ft;Et++){var at=$(Xe,0,Et,this.toBBox),mt=$(Xe,Et,Ge,this.toBBox),Mt=(Ye=at,It=mt,At=void 0,Ue=void 0,rt=void 0,Ze=void 0,At=Math.max(Ye.minX,It.minX),Ue=Math.max(Ye.minY,It.minY),rt=Math.min(Ye.maxX,It.maxX),Ze=Math.min(Ye.maxY,It.maxY),Math.max(0,rt-At)*Math.max(0,Ze-Ue)),Me=le(at)+le(mt);Mt=ft;Ct--){var st=Xe.children[Ct];X(At,Xe.leaf?Ye(st):st),Ue+=ce(At)}return Ue},V.prototype._adjustParentBBoxes=function(Xe,ft,Ge){for(var lt=Ge;lt>=0;lt--)X(ft[lt],Xe)},V.prototype._condense=function(Xe){for(var ft=Xe.length-1,Ge=void 0;ft>=0;ft--)Xe[ft].children.length===0?ft>0?(Ge=Xe[ft-1].children).splice(Ge.indexOf(Xe[ft]),1):this.clear():d(Xe[ft],this.toBBox)},V})},44516:function(Ke,ye,_){"use strict";_.d(ye,{V4:function(){return Pt},zt:function(){return Ee},ZP:function(){return xr}});var M=_(16514),V=_(54131),y=_(35372),d=_(13255),$=_(92310),X=_.n($),oe=_(58035),re=_(88831),le=_(77617),ce=_(56348),Ie=["children"],we=le.createContext({});function Ee(Tr){var hn=Tr.children,Cn=(0,ce.Z)(Tr,Ie);return le.createElement(we.Provider,{value:Cn},hn)}var qe=_(61577),Xe=_(22946),ft=_(3711),Ge=_(71038),lt=function(Tr){(0,ft.Z)(Cn,Tr);var hn=(0,Ge.Z)(Cn);function Cn(){return(0,qe.Z)(this,Cn),hn.apply(this,arguments)}return(0,Xe.Z)(Cn,[{key:"render",value:function(){return this.props.children}}]),Cn}(le.Component),Ye=lt,It=_(30462),At="none",Ue="appear",rt="enter",Ze="leave",Ct="none",st="prepare",Et="start",at="active",mt="end",Mt="prepared",Me=_(42871);function Ht(Tr,hn){var Cn={};return Cn[Tr.toLowerCase()]=hn.toLowerCase(),Cn["Webkit".concat(Tr)]="webkit".concat(hn),Cn["Moz".concat(Tr)]="moz".concat(hn),Cn["ms".concat(Tr)]="MS".concat(hn),Cn["O".concat(Tr)]="o".concat(hn.toLowerCase()),Cn}function Rt(Tr,hn){var Cn={animationend:Ht("Animation","AnimationEnd"),transitionend:Ht("Transition","TransitionEnd")};return Tr&&("AnimationEvent"in hn||delete Cn.animationend.animation,"TransitionEvent"in hn||delete Cn.transitionend.transition),Cn}var vt=Rt((0,Me.Z)(),typeof window!="undefined"?window:{}),Je={};if((0,Me.Z)()){var Ce=document.createElement("div");Je=Ce.style}var pt={};function et(Tr){if(pt[Tr])return pt[Tr];var hn=vt[Tr];if(hn)for(var Cn=Object.keys(hn),tr=Cn.length,jt=0;jt1&&arguments[1]!==void 0?arguments[1]:2;hn();var He=(0,Zi.Z)(function(){jt<=1?tr({isCanceled:function(){return He!==Tr.current}}):Cn(tr,jt-1)});Tr.current=He}return le.useEffect(function(){return function(){hn()}},[]),[Cn,hn]},fa=[st,Et,at,mt],ka=[st,Mt],mo=!1,_n=!0;function yi(Tr){return Tr===at||Tr===mt}var Zn=function(Tr,hn,Cn){var tr=(0,It.Z)(Ct),jt=(0,y.Z)(tr,2),He=jt[0],We=jt[1],_t=Ua(),Zt=(0,y.Z)(_t,2),rr=Zt[0],fr=Zt[1];function mr(){We(st,!0)}var Qe=hn?ka:fa;return Ia(function(){if(He!==Ct&&He!==mt){var er=Qe.indexOf(He),jr=Qe[er+1],on=Cn(He);on===mo?We(jr,!0):jr&&rr(function(ri){function nn(){ri.isCanceled()||We(jr,!0)}on===!0?nn():Promise.resolve(on).then(nn)})}},[Tr,He]),le.useEffect(function(){return function(){fr()}},[]),[mr,He]};function gr(Tr,hn,Cn,tr){var jt=tr.motionEnter,He=jt===void 0?!0:jt,We=tr.motionAppear,_t=We===void 0?!0:We,Zt=tr.motionLeave,rr=Zt===void 0?!0:Zt,fr=tr.motionDeadline,mr=tr.motionLeaveImmediately,Qe=tr.onAppearPrepare,er=tr.onEnterPrepare,jr=tr.onLeavePrepare,on=tr.onAppearStart,ri=tr.onEnterStart,nn=tr.onLeaveStart,ln=tr.onAppearActive,Yn=tr.onEnterActive,Wn=tr.onLeaveActive,Tn=tr.onAppearEnd,ai=tr.onEnterEnd,Ii=tr.onLeaveEnd,ki=tr.onVisibleChanged,Fa=(0,It.Z)(),sa=(0,y.Z)(Fa,2),vo=sa[0],Ro=sa[1],Za=(0,It.Z)(At),Os=(0,y.Z)(Za,2),ro=Os[0],Tu=Os[1],Do=(0,It.Z)(null),qa=(0,y.Z)(Do,2),ss=qa[0],ca=qa[1],Mn=(0,le.useRef)(!1),wi=(0,le.useRef)(null);function Fu(){return Cn()}var Hs=(0,le.useRef)(!1);function us(){Tu(At,!0),ca(null,!0)}function Ts(Au){var On=Fu();if(!(Au&&!Au.deadline&&Au.target!==On)){var tn=Hs.current,Pi;ro===Ue&&tn?Pi=Tn==null?void 0:Tn(On,Au):ro===rt&&tn?Pi=ai==null?void 0:ai(On,Au):ro===Ze&&tn&&(Pi=Ii==null?void 0:Ii(On,Au)),ro!==At&&tn&&Pi!==!1&&us()}}var Qs=Hn(Ts),ko=(0,y.Z)(Qs,1),_o=ko[0],Js=function(On){var tn,Pi,ut;switch(On){case Ue:return tn={},(0,M.Z)(tn,st,Qe),(0,M.Z)(tn,Et,on),(0,M.Z)(tn,at,ln),tn;case rt:return Pi={},(0,M.Z)(Pi,st,er),(0,M.Z)(Pi,Et,ri),(0,M.Z)(Pi,at,Yn),Pi;case Ze:return ut={},(0,M.Z)(ut,st,jr),(0,M.Z)(ut,Et,nn),(0,M.Z)(ut,at,Wn),ut;default:return{}}},fo=le.useMemo(function(){return Js(ro)},[ro]),El=Zn(ro,!Tr,function(Au){if(Au===st){var On=fo[st];return On?On(Fu()):mo}if(Es in fo){var tn;ca(((tn=fo[Es])===null||tn===void 0?void 0:tn.call(fo,Fu(),null))||null)}return Es===at&&(_o(Fu()),fr>0&&(clearTimeout(wi.current),wi.current=setTimeout(function(){Ts({deadline:!0})},fr))),Es===Mt&&us(),_n}),ju=(0,y.Z)(El,2),_l=ju[0],Es=ju[1],yc=yi(Es);Hs.current=yc,Ia(function(){Ro(hn);var Au=Mn.current;Mn.current=!0;var On;!Au&&hn&&_t&&(On=Ue),Au&&hn&&He&&(On=rt),(Au&&!hn&&rr||!Au&&mr&&!hn&&rr)&&(On=Ze);var tn=Js(On);On&&(Tr||tn[st])?(Tu(On),_l()):Tu(At)},[hn]),(0,le.useEffect)(function(){(ro===Ue&&!_t||ro===rt&&!He||ro===Ze&&!rr)&&Tu(At)},[_t,He,rr]),(0,le.useEffect)(function(){return function(){Mn.current=!1,clearTimeout(wi.current)}},[]);var Vl=le.useRef(!1);(0,le.useEffect)(function(){vo&&(Vl.current=!0),vo!==void 0&&ro===At&&((Vl.current||vo)&&(ki==null||ki(vo)),Vl.current=!0)},[vo,ro]);var tc=ss;return fo[st]&&Es===Et&&(tc=(0,V.Z)({transition:"none"},tc)),[ro,Es,tc,vo!=null?vo:hn]}function Ea(Tr){var hn=Tr;(0,d.Z)(Tr)==="object"&&(hn=Tr.transitionSupport);function Cn(jt,He){return!!(jt.motionName&&hn&&He!==!1)}var tr=le.forwardRef(function(jt,He){var We=jt.visible,_t=We===void 0?!0:We,Zt=jt.removeOnLeave,rr=Zt===void 0?!0:Zt,fr=jt.forceRender,mr=jt.children,Qe=jt.motionName,er=jt.leavedClassName,jr=jt.eventProps,on=le.useContext(we),ri=on.motion,nn=Cn(jt,ri),ln=(0,le.useRef)(),Yn=(0,le.useRef)();function Wn(){try{return ln.current instanceof HTMLElement?ln.current:(0,oe.Z)(Yn.current)}catch(ca){return null}}var Tn=gr(nn,_t,Wn,jt),ai=(0,y.Z)(Tn,4),Ii=ai[0],ki=ai[1],Fa=ai[2],sa=ai[3],vo=le.useRef(sa);sa&&(vo.current=!0);var Ro=le.useCallback(function(ca){ln.current=ca,(0,re.mH)(He,ca)},[He]),Za,Os=(0,V.Z)((0,V.Z)({},jr),{},{visible:_t});if(!mr)Za=null;else if(Ii===At)sa?Za=mr((0,V.Z)({},Os),Ro):!rr&&vo.current&&er?Za=mr((0,V.Z)((0,V.Z)({},Os),{},{className:er}),Ro):fr||!rr&&!er?Za=mr((0,V.Z)((0,V.Z)({},Os),{},{style:{display:"none"}}),Ro):Za=null;else{var ro,Tu;ki===st?Tu="prepare":yi(ki)?Tu="active":ki===Et&&(Tu="start");var Do=_i(Qe,"".concat(Ii,"-").concat(Tu));Za=mr((0,V.Z)((0,V.Z)({},Os),{},{className:X()(_i(Qe,Ii),(ro={},(0,M.Z)(ro,Do,Do&&Tu),(0,M.Z)(ro,Qe,typeof Qe=="string"),ro)),style:Fa}),Ro)}if(le.isValidElement(Za)&&(0,re.Yr)(Za)){var qa=Za,ss=qa.ref;ss||(Za=le.cloneElement(Za,{ref:Ro}))}return le.createElement(Ye,{ref:Yn},Za)});return tr.displayName="CSSMotion",tr}var co=Ea(Vr),Qa=_(79384),oa=_(7963),ji="add",so="keep",ei="remove",Kn="removed";function Jn(Tr){var hn;return Tr&&(0,d.Z)(Tr)==="object"&&"key"in Tr?hn=Tr:hn={key:Tr},(0,V.Z)((0,V.Z)({},hn),{},{key:String(hn.key)})}function da(){var Tr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Tr.map(Jn)}function pa(){var Tr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Cn=[],tr=0,jt=hn.length,He=da(Tr),We=da(hn);He.forEach(function(rr){for(var fr=!1,mr=tr;mr1});return Zt.forEach(function(rr){Cn=Cn.filter(function(fr){var mr=fr.key,Qe=fr.status;return mr!==rr||Qe!==ei}),Cn.forEach(function(fr){fr.key===rr&&(fr.status=so)})}),Cn}var uo=["component","children","onVisibleChanged","onAllRemoved"],Ir=["status"],bt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Yt(Tr){var hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:co,Cn=function(tr){(0,ft.Z)(He,tr);var jt=(0,Ge.Z)(He);function He(){var We;(0,qe.Z)(this,He);for(var _t=arguments.length,Zt=new Array(_t),rr=0;rr<_t;rr++)Zt[rr]=arguments[rr];return We=jt.call.apply(jt,[this].concat(Zt)),(0,M.Z)((0,oa.Z)(We),"state",{keyEntities:[]}),(0,M.Z)((0,oa.Z)(We),"removeKey",function(fr){var mr=We.state.keyEntities,Qe=mr.map(function(er){return er.key!==fr?er:(0,V.Z)((0,V.Z)({},er),{},{status:Kn})});return We.setState({keyEntities:Qe}),Qe.filter(function(er){var jr=er.status;return jr!==Kn}).length}),We}return(0,Xe.Z)(He,[{key:"render",value:function(){var _t=this,Zt=this.state.keyEntities,rr=this.props,fr=rr.component,mr=rr.children,Qe=rr.onVisibleChanged,er=rr.onAllRemoved,jr=(0,ce.Z)(rr,uo),on=fr||le.Fragment,ri={};return bt.forEach(function(nn){ri[nn]=jr[nn],delete jr[nn]}),delete jr.keys,le.createElement(on,jr,Zt.map(function(nn,ln){var Yn=nn.status,Wn=(0,ce.Z)(nn,Ir),Tn=Yn===ji||Yn===so;return le.createElement(hn,(0,Qa.Z)({},ri,{key:Wn.key,visible:Tn,eventProps:Wn,onVisibleChanged:function(Ii){if(Qe==null||Qe(Ii,{key:Wn.key}),!Ii){var ki=_t.removeKey(Wn.key);ki===0&&er&&er()}}}),function(ai,Ii){return mr((0,V.Z)((0,V.Z)({},ai),{},{index:ln}),Ii)})}))}}],[{key:"getDerivedStateFromProps",value:function(_t,Zt){var rr=_t.keys,fr=Zt.keyEntities,mr=da(rr),Qe=pa(fr,mr);return{keyEntities:Qe.filter(function(er){var jr=fr.find(function(on){var ri=on.key;return er.key===ri});return!(jr&&jr.status===Kn&&er.status===ei)})}}}]),He}(le.Component);return(0,M.Z)(Cn,"defaultProps",{component:"div"}),Cn}var Pt=Yt(Vr),xr=co},1439:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Je}});var M=_(79384),V=_(54131),y=_(35372),d=_(56348),$=_(77617),X=_(92310),oe=_.n(X),re=_(28647),le=_(70658),ce=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ie=void 0;function we(Ce,pt){var et=Ce.prefixCls,br=Ce.invalidate,Jt=Ce.item,Vr=Ce.renderItem,gn=Ce.responsive,yn=Ce.responsiveDisabled,_i=Ce.registerSize,Hn=Ce.itemKey,Ln=Ce.className,Ia=Ce.style,Zi=Ce.children,Ua=Ce.display,fa=Ce.order,ka=Ce.component,mo=ka===void 0?"div":ka,_n=(0,d.Z)(Ce,ce),yi=gn&&!Ua;function Zn(oa){_i(Hn,oa)}$.useEffect(function(){return function(){Zn(null)}},[]);var gr=Vr&&Jt!==Ie?Vr(Jt):Zi,Ea;br||(Ea={opacity:yi?0:1,height:yi?0:Ie,overflowY:yi?"hidden":Ie,order:gn?fa:Ie,pointerEvents:yi?"none":Ie,position:yi?"absolute":Ie});var co={};yi&&(co["aria-hidden"]=!0);var Qa=$.createElement(mo,(0,M.Z)({className:oe()(!br&&et,Ln),style:(0,V.Z)((0,V.Z)({},Ea),Ia)},co,_n,{ref:pt}),gr);return gn&&(Qa=$.createElement(re.Z,{onResize:function(ji){var so=ji.offsetWidth;Zn(so)},disabled:yn},Qa)),Qa}var Ee=$.forwardRef(we);Ee.displayName="Item";var qe=Ee,Xe=_(60402),ft=_(79161),Ge=_(90571);function lt(Ce){if(typeof MessageChannel=="undefined")(0,Ge.Z)(Ce);else{var pt=new MessageChannel;pt.port1.onmessage=function(){return Ce()},pt.port2.postMessage(void 0)}}function Ye(){var Ce=$.useRef(null),pt=function(br){Ce.current||(Ce.current=[],lt(function(){(0,ft.unstable_batchedUpdates)(function(){Ce.current.forEach(function(Jt){Jt()}),Ce.current=null})})),Ce.current.push(br)};return pt}function It(Ce,pt){var et=$.useState(pt),br=(0,y.Z)(et,2),Jt=br[0],Vr=br[1],gn=(0,Xe.Z)(function(yn){Ce(function(){Vr(yn)})});return[Jt,gn]}var At=$.createContext(null),Ue=["component"],rt=["className"],Ze=["className"],Ct=function(pt,et){var br=$.useContext(At);if(!br){var Jt=pt.component,Vr=Jt===void 0?"div":Jt,gn=(0,d.Z)(pt,Ue);return $.createElement(Vr,(0,M.Z)({},gn,{ref:et}))}var yn=br.className,_i=(0,d.Z)(br,rt),Hn=pt.className,Ln=(0,d.Z)(pt,Ze);return $.createElement(At.Provider,{value:null},$.createElement(qe,(0,M.Z)({ref:et,className:oe()(yn,Hn)},_i,Ln)))},st=$.forwardRef(Ct);st.displayName="RawItem";var Et=st,at=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],mt="responsive",Mt="invalidate";function Me(Ce){return"+ ".concat(Ce.length," ...")}function Ht(Ce,pt){var et=Ce.prefixCls,br=et===void 0?"rc-overflow":et,Jt=Ce.data,Vr=Jt===void 0?[]:Jt,gn=Ce.renderItem,yn=Ce.renderRawItem,_i=Ce.itemKey,Hn=Ce.itemWidth,Ln=Hn===void 0?10:Hn,Ia=Ce.ssr,Zi=Ce.style,Ua=Ce.className,fa=Ce.maxCount,ka=Ce.renderRest,mo=Ce.renderRawRest,_n=Ce.suffix,yi=Ce.component,Zn=yi===void 0?"div":yi,gr=Ce.itemComponent,Ea=Ce.onVisibleChange,co=(0,d.Z)(Ce,at),Qa=Ia==="full",oa=Ye(),ji=It(oa,null),so=(0,y.Z)(ji,2),ei=so[0],Kn=so[1],Jn=ei||0,da=It(oa,new Map),pa=(0,y.Z)(da,2),uo=pa[0],Ir=pa[1],bt=It(oa,0),Yt=(0,y.Z)(bt,2),Pt=Yt[0],xr=Yt[1],Tr=It(oa,0),hn=(0,y.Z)(Tr,2),Cn=hn[0],tr=hn[1],jt=It(oa,0),He=(0,y.Z)(jt,2),We=He[0],_t=He[1],Zt=(0,$.useState)(null),rr=(0,y.Z)(Zt,2),fr=rr[0],mr=rr[1],Qe=(0,$.useState)(null),er=(0,y.Z)(Qe,2),jr=er[0],on=er[1],ri=$.useMemo(function(){return jr===null&&Qa?Number.MAX_SAFE_INTEGER:jr||0},[jr,ei]),nn=(0,$.useState)(!1),ln=(0,y.Z)(nn,2),Yn=ln[0],Wn=ln[1],Tn="".concat(br,"-item"),ai=Math.max(Pt,Cn),Ii=fa===mt,ki=Vr.length&&Ii,Fa=fa===Mt,sa=ki||typeof fa=="number"&&Vr.length>fa,vo=(0,$.useMemo)(function(){var _o=Vr;return ki?ei===null&&Qa?_o=Vr:_o=Vr.slice(0,Math.min(Vr.length,Jn/Ln)):typeof fa=="number"&&(_o=Vr.slice(0,fa)),_o},[Vr,Ln,ei,fa,ki]),Ro=(0,$.useMemo)(function(){return ki?Vr.slice(ri+1):Vr.slice(vo.length)},[Vr,vo,ki,ri]),Za=(0,$.useCallback)(function(_o,Js){var fo;return typeof _i=="function"?_i(_o):(fo=_i&&(_o==null?void 0:_o[_i]))!==null&&fo!==void 0?fo:Js},[_i]),Os=(0,$.useCallback)(gn||function(_o){return _o},[gn]);function ro(_o,Js,fo){jr===_o&&(Js===void 0||Js===fr)||(on(_o),fo||(Wn(_oJn){ro(El-1,_o-ju-We+Cn);break}}_n&&ca(0)+We>Jn&&mr(null)}},[Jn,uo,Cn,We,Za,vo]);var Mn=Yn&&!!Ro.length,wi={};fr!==null&&ki&&(wi={position:"absolute",left:fr,top:0});var Fu={prefixCls:Tn,responsive:ki,component:gr,invalidate:Fa},Hs=yn?function(_o,Js){var fo=Za(_o,Js);return $.createElement(At.Provider,{key:fo,value:(0,V.Z)((0,V.Z)({},Fu),{},{order:Js,item:_o,itemKey:fo,registerSize:Do,display:Js<=ri})},yn(_o,Js))}:function(_o,Js){var fo=Za(_o,Js);return $.createElement(qe,(0,M.Z)({},Fu,{order:Js,key:fo,item:_o,renderItem:Os,itemKey:fo,registerSize:Do,display:Js<=ri}))},us,Ts={order:Mn?ri:Number.MAX_SAFE_INTEGER,className:"".concat(Tn,"-rest"),registerSize:qa,display:Mn};if(mo)mo&&(us=$.createElement(At.Provider,{value:(0,V.Z)((0,V.Z)({},Fu),Ts)},mo(Ro)));else{var Qs=ka||Me;us=$.createElement(qe,(0,M.Z)({},Fu,Ts),typeof Qs=="function"?Qs(Ro):Qs)}var ko=$.createElement(Zn,(0,M.Z)({className:oe()(!Fa&&br,Ua),style:Zi,ref:pt},co),vo.map(Hs),sa?us:null,_n&&$.createElement(qe,(0,M.Z)({},Fu,{responsive:Ii,responsiveDisabled:!ki,order:ri,className:"".concat(Tn,"-suffix"),registerSize:ss,display:!0,style:wi}),_n));return Ii&&(ko=$.createElement(re.Z,{onResize:Tu,disabled:!ki},ko)),ko}var Rt=$.forwardRef(Ht);Rt.displayName="Overflow",Rt.Item=Et,Rt.RESPONSIVE=mt,Rt.INVALIDATE=Mt;var vt=Rt,Je=vt},28647:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return Mt}});var M=_(79384),V=_(77617),y=_(45659),d=_(36014),$=_(54131),X=_(13255),oe=_(58035),re=_(88831),le=V.createContext(null);function ce(Me){var Ht=Me.children,Rt=Me.onBatchResize,vt=V.useRef(0),Je=V.useRef([]),Ce=V.useContext(le),pt=V.useCallback(function(et,br,Jt){vt.current+=1;var Vr=vt.current;Je.current.push({size:et,element:br,data:Jt}),Promise.resolve().then(function(){Vr===vt.current&&(Rt==null||Rt(Je.current),Je.current=[])}),Ce==null||Ce(et,br,Jt)},[Rt,Ce]);return V.createElement(le.Provider,{value:pt},Ht)}var Ie=_(76374),we=new Map;function Ee(Me){Me.forEach(function(Ht){var Rt,vt=Ht.target;(Rt=we.get(vt))===null||Rt===void 0||Rt.forEach(function(Je){return Je(vt)})})}var qe=new Ie.Z(Ee),Xe=null,ft=null;function Ge(Me,Ht){we.has(Me)||(we.set(Me,new Set),qe.observe(Me)),we.get(Me).add(Ht)}function lt(Me,Ht){we.has(Me)&&(we.get(Me).delete(Ht),we.get(Me).size||(qe.unobserve(Me),we.delete(Me)))}var Ye=_(61577),It=_(22946),At=_(3711),Ue=_(71038),rt=function(Me){(0,At.Z)(Rt,Me);var Ht=(0,Ue.Z)(Rt);function Rt(){return(0,Ye.Z)(this,Rt),Ht.apply(this,arguments)}return(0,It.Z)(Rt,[{key:"render",value:function(){return this.props.children}}]),Rt}(V.Component);function Ze(Me,Ht){var Rt=Me.children,vt=Me.disabled,Je=V.useRef(null),Ce=V.useRef(null),pt=V.useContext(le),et=typeof Rt=="function",br=et?Rt(Je):Rt,Jt=V.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Vr=!et&&V.isValidElement(br)&&(0,re.Yr)(br),gn=Vr?br.ref:null,yn=(0,re.x1)(gn,Je),_i=function(){var Zi;return(0,oe.Z)(Je.current)||(Je.current&&(0,X.Z)(Je.current)==="object"?(0,oe.Z)((Zi=Je.current)===null||Zi===void 0?void 0:Zi.nativeElement):null)||(0,oe.Z)(Ce.current)};V.useImperativeHandle(Ht,function(){return _i()});var Hn=V.useRef(Me);Hn.current=Me;var Ln=V.useCallback(function(Ia){var Zi=Hn.current,Ua=Zi.onResize,fa=Zi.data,ka=Ia.getBoundingClientRect(),mo=ka.width,_n=ka.height,yi=Ia.offsetWidth,Zn=Ia.offsetHeight,gr=Math.floor(mo),Ea=Math.floor(_n);if(Jt.current.width!==gr||Jt.current.height!==Ea||Jt.current.offsetWidth!==yi||Jt.current.offsetHeight!==Zn){var co={width:gr,height:Ea,offsetWidth:yi,offsetHeight:Zn};Jt.current=co;var Qa=yi===Math.round(mo)?mo:yi,oa=Zn===Math.round(_n)?_n:Zn,ji=(0,$.Z)((0,$.Z)({},co),{},{offsetWidth:Qa,offsetHeight:oa});pt==null||pt(ji,Ia,fa),Ua&&Promise.resolve().then(function(){Ua(ji,Ia)})}},[]);return V.useEffect(function(){var Ia=_i();return Ia&&!vt&&Ge(Ia,Ln),function(){return lt(Ia,Ln)}},[Je.current,vt]),V.createElement(rt,{ref:Ce},Vr?V.cloneElement(br,{ref:yn}):br)}var Ct=V.forwardRef(Ze),st=Ct,Et="rc-observer-key";function at(Me,Ht){var Rt=Me.children,vt=typeof Rt=="function"?[Rt]:(0,y.Z)(Rt);return vt.map(function(Je,Ce){var pt=(Je==null?void 0:Je.key)||"".concat(Et,"-").concat(Ce);return V.createElement(st,(0,M.Z)({},Me,{key:pt,ref:Ce===0?Ht:void 0}),Je)})}var mt=V.forwardRef(at);mt.Collection=ce;var Mt=mt},53662:function(Ke,ye,_){"use strict";_.d(ye,{Xo:function(){return uo},Wx:function(){return bt},ZP:function(){return zr}});var M=_(79384),V=_(49397),y=_(16514),d=_(54131),$=_(35372),X=_(56348),oe=_(13255),re=_(84381),le=_(36014),ce=_(77617),Ie=_(92310),we=_.n(Ie),Ee=_(70658),qe=_(15639),Xe=_(84821),ft=_(88831),Ge=function(Nt){var lr=Nt.className,$r=Nt.customizeIcon,Yr=Nt.customizeIconProps,un=Nt.children,Sn=Nt.onMouseDown,qn=Nt.onClick,ti=typeof $r=="function"?$r(Yr):$r;return ce.createElement("span",{className:lr,onMouseDown:function(ra){ra.preventDefault(),Sn==null||Sn(ra)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:qn,"aria-hidden":!0},ti!==void 0?ti:ce.createElement("span",{className:we()(lr.split(/\s+/).map(function(Ui){return"".concat(Ui,"-icon")}))},un))},lt=Ge,Ye=function(Nt,lr,$r,Yr,un){var Sn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,qn=arguments.length>6?arguments[6]:void 0,ti=arguments.length>7?arguments[7]:void 0,Ui=ce.useMemo(function(){if((0,oe.Z)(Yr)==="object")return Yr.clearIcon;if(un)return un},[Yr,un]),ra=ce.useMemo(function(){return!!(!Sn&&Yr&&($r.length||qn)&&!(ti==="combobox"&&qn===""))},[Yr,Sn,$r.length,qn,ti]);return{allowClear:ra,clearIcon:ce.createElement(lt,{className:"".concat(Nt,"-clear"),onMouseDown:lr,customizeIcon:Ui},"\xD7")}},It=ce.createContext(null);function At(){return ce.useContext(It)}function Ue(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Nt=ce.useState(!1),lr=(0,$.Z)(Nt,2),$r=lr[0],Yr=lr[1],un=ce.useRef(null),Sn=function(){window.clearTimeout(un.current)};ce.useEffect(function(){return Sn},[]);var qn=function(Ui,ra){Sn(),un.current=window.setTimeout(function(){Yr(Ui),ra&&ra()},xt)};return[$r,qn,Sn]}function rt(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Nt=ce.useRef(null),lr=ce.useRef(null);ce.useEffect(function(){return function(){window.clearTimeout(lr.current)}},[]);function $r(Yr){(Yr||Nt.current===null)&&(Nt.current=Yr),window.clearTimeout(lr.current),lr.current=window.setTimeout(function(){Nt.current=null},xt)}return[function(){return Nt.current},$r]}function Ze(xt,Nt,lr,$r){var Yr=ce.useRef(null);Yr.current={open:Nt,triggerOpen:lr,customizedTrigger:$r},ce.useEffect(function(){function un(Sn){var qn;if(!((qn=Yr.current)!==null&&qn!==void 0&&qn.customizedTrigger)){var ti=Sn.target;ti.shadowRoot&&Sn.composed&&(ti=Sn.composedPath()[0]||ti),Yr.current.open&&xt().filter(function(Ui){return Ui}).every(function(Ui){return!Ui.contains(ti)&&Ui!==ti})&&Yr.current.triggerOpen(!1)}}return window.addEventListener("mousedown",un),function(){return window.removeEventListener("mousedown",un)}},[])}var Ct=_(3286),st=_(1439),Et=function(Nt,lr){var $r,Yr=Nt.prefixCls,un=Nt.id,Sn=Nt.inputElement,qn=Nt.disabled,ti=Nt.tabIndex,Ui=Nt.autoFocus,ra=Nt.autoComplete,ia=Nt.editable,vi=Nt.activeDescendantId,gi=Nt.value,ma=Nt.maxLength,Yi=Nt.onKeyDown,ua=Nt.onMouseDown,La=Nt.onChange,aa=Nt.onPaste,ho=Nt.onCompositionStart,Po=Nt.onCompositionEnd,Ms=Nt.open,Mu=Nt.attrs,vs=Sn||ce.createElement("input",null),Xs=vs,iu=Xs.ref,js=Xs.props,Vs=js.onKeyDown,sl=js.onChange,al=js.onMouseDown,ul=js.onCompositionStart,_c=js.onCompositionEnd,Yo=js.style;return(0,le.Kp)(!("maxLength"in vs.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),vs=ce.cloneElement(vs,(0,d.Z)((0,d.Z)((0,d.Z)({type:"search"},js),{},{id:un,ref:(0,ft.sQ)(lr,iu),disabled:qn,tabIndex:ti,autoComplete:ra||"off",autoFocus:Ui,className:we()("".concat(Yr,"-selection-search-input"),($r=vs)===null||$r===void 0||($r=$r.props)===null||$r===void 0?void 0:$r.className),role:"combobox","aria-expanded":Ms||!1,"aria-haspopup":"listbox","aria-owns":"".concat(un,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(un,"_list"),"aria-activedescendant":Ms?vi:void 0},Mu),{},{value:ia?gi:"",maxLength:ma,readOnly:!ia,unselectable:ia?null:"on",style:(0,d.Z)((0,d.Z)({},Yo),{},{opacity:ia?null:0}),onKeyDown:function(Ku){Yi(Ku),Vs&&Vs(Ku)},onMouseDown:function(Ku){ua(Ku),al&&al(Ku)},onChange:function(Ku){La(Ku),sl&&sl(Ku)},onCompositionStart:function(Ku){ho(Ku),ul&&ul(Ku)},onCompositionEnd:function(Ku){Po(Ku),_c&&_c(Ku)},onPaste:aa})),vs},at=ce.forwardRef(Et),mt=at;function Mt(xt){return Array.isArray(xt)?xt:xt!==void 0?[xt]:[]}var Me=typeof window!="undefined"&&window.document&&window.document.documentElement,Ht=Me;function Rt(xt){return xt!=null}function vt(xt){return!xt&&xt!==0}function Je(xt){return["string","number"].includes((0,oe.Z)(xt))}function Ce(xt){var Nt=void 0;return xt&&(Je(xt.title)?Nt=xt.title.toString():Je(xt.label)&&(Nt=xt.label.toString())),Nt}function pt(xt,Nt){Ht?ce.useLayoutEffect(xt,Nt):ce.useEffect(xt,Nt)}function et(xt){var Nt;return(Nt=xt.key)!==null&&Nt!==void 0?Nt:xt.value}var br=function(Nt){Nt.preventDefault(),Nt.stopPropagation()},Jt=function(Nt){var lr=Nt.id,$r=Nt.prefixCls,Yr=Nt.values,un=Nt.open,Sn=Nt.searchValue,qn=Nt.autoClearSearchValue,ti=Nt.inputRef,Ui=Nt.placeholder,ra=Nt.disabled,ia=Nt.mode,vi=Nt.showSearch,gi=Nt.autoFocus,ma=Nt.autoComplete,Yi=Nt.activeDescendantId,ua=Nt.tabIndex,La=Nt.removeIcon,aa=Nt.maxTagCount,ho=Nt.maxTagTextLength,Po=Nt.maxTagPlaceholder,Ms=Po===void 0?function(zu){return"+ ".concat(zu.length," ...")}:Po,Mu=Nt.tagRender,vs=Nt.onToggleOpen,Xs=Nt.onRemove,iu=Nt.onInputChange,js=Nt.onInputPaste,Vs=Nt.onInputKeyDown,sl=Nt.onInputMouseDown,al=Nt.onInputCompositionStart,ul=Nt.onInputCompositionEnd,_c=ce.useRef(null),Yo=(0,ce.useState)(0),No=(0,$.Z)(Yo,2),Ku=No[0],Rc=No[1],Wa=(0,ce.useState)(!1),mf=(0,$.Z)(Wa,2),yf=mf[0],yl=mf[1],Ec="".concat($r,"-selection"),Zf=un||ia==="multiple"&&qn===!1||ia==="tags"?Sn:"",Vu=ia==="tags"||ia==="multiple"&&qn===!1||vi&&(un||yf);pt(function(){Rc(_c.current.scrollWidth)},[Zf]);var lc=function(Zu,St,qu,hl,rc){return ce.createElement("span",{title:Ce(Zu),className:we()("".concat(Ec,"-item"),(0,y.Z)({},"".concat(Ec,"-item-disabled"),qu))},ce.createElement("span",{className:"".concat(Ec,"-item-content")},St),hl&&ce.createElement(lt,{className:"".concat(Ec,"-item-remove"),onMouseDown:br,onClick:rc,customizeIcon:La},"\xD7"))},fl=function(Zu,St,qu,hl,rc){var bs=function(ks){br(ks),vs(!un)};return ce.createElement("span",{onMouseDown:bs},Mu({label:St,value:Zu,disabled:qu,closable:hl,onClose:rc}))},lf=function(Zu){var St=Zu.disabled,qu=Zu.label,hl=Zu.value,rc=!ra&&!St,bs=qu;if(typeof ho=="number"&&(typeof qu=="string"||typeof qu=="number")){var Il=String(bs);Il.length>ho&&(bs="".concat(Il.slice(0,ho),"..."))}var ks=function(Al){Al&&Al.stopPropagation(),Xs(Zu)};return typeof Mu=="function"?fl(hl,bs,St,rc,ks):lc(Zu,bs,St,rc,ks)},gu=function(Zu){var St=typeof Ms=="function"?Ms(Zu):Ms;return lc({title:St},St,!1)},Pu=ce.createElement("div",{className:"".concat(Ec,"-search"),style:{width:Ku},onFocus:function(){yl(!0)},onBlur:function(){yl(!1)}},ce.createElement(mt,{ref:ti,open:un,prefixCls:$r,id:lr,inputElement:null,disabled:ra,autoFocus:gi,autoComplete:ma,editable:Vu,activeDescendantId:Yi,value:Zf,onKeyDown:Vs,onMouseDown:sl,onChange:iu,onPaste:js,onCompositionStart:al,onCompositionEnd:ul,tabIndex:ua,attrs:(0,Ct.Z)(Nt,!0)}),ce.createElement("span",{ref:_c,className:"".concat(Ec,"-search-mirror"),"aria-hidden":!0},Zf,"\xA0")),Co=ce.createElement(st.Z,{prefixCls:"".concat(Ec,"-overflow"),data:Yr,renderItem:lf,renderRest:gu,suffix:Pu,itemKey:et,maxCount:aa});return ce.createElement(ce.Fragment,null,Co,!Yr.length&&!Zf&&ce.createElement("span",{className:"".concat(Ec,"-placeholder")},Ui))},Vr=Jt,gn=function(Nt){var lr=Nt.inputElement,$r=Nt.prefixCls,Yr=Nt.id,un=Nt.inputRef,Sn=Nt.disabled,qn=Nt.autoFocus,ti=Nt.autoComplete,Ui=Nt.activeDescendantId,ra=Nt.mode,ia=Nt.open,vi=Nt.values,gi=Nt.placeholder,ma=Nt.tabIndex,Yi=Nt.showSearch,ua=Nt.searchValue,La=Nt.activeValue,aa=Nt.maxLength,ho=Nt.onInputKeyDown,Po=Nt.onInputMouseDown,Ms=Nt.onInputChange,Mu=Nt.onInputPaste,vs=Nt.onInputCompositionStart,Xs=Nt.onInputCompositionEnd,iu=Nt.title,js=ce.useState(!1),Vs=(0,$.Z)(js,2),sl=Vs[0],al=Vs[1],ul=ra==="combobox",_c=ul||Yi,Yo=vi[0],No=ua||"";ul&&La&&!sl&&(No=La),ce.useEffect(function(){ul&&al(!1)},[ul,La]);var Ku=ra!=="combobox"&&!ia&&!Yi?!1:!!No,Rc=iu===void 0?Ce(Yo):iu,Wa=ce.useMemo(function(){return Yo?null:ce.createElement("span",{className:"".concat($r,"-selection-placeholder"),style:Ku?{visibility:"hidden"}:void 0},gi)},[Yo,Ku,gi,$r]);return ce.createElement(ce.Fragment,null,ce.createElement("span",{className:"".concat($r,"-selection-search")},ce.createElement(mt,{ref:un,prefixCls:$r,id:Yr,open:ia,inputElement:lr,disabled:Sn,autoFocus:qn,autoComplete:ti,editable:_c,activeDescendantId:Ui,value:No,onKeyDown:ho,onMouseDown:Po,onChange:function(yf){al(!0),Ms(yf)},onPaste:Mu,onCompositionStart:vs,onCompositionEnd:Xs,tabIndex:ma,attrs:(0,Ct.Z)(Nt,!0),maxLength:ul?aa:void 0})),!ul&&Yo?ce.createElement("span",{className:"".concat($r,"-selection-item"),title:Rc,style:Ku?{visibility:"hidden"}:void 0},Yo.label):null,Wa)},yn=gn;function _i(xt){return![Xe.Z.ESC,Xe.Z.SHIFT,Xe.Z.BACKSPACE,Xe.Z.TAB,Xe.Z.WIN_KEY,Xe.Z.ALT,Xe.Z.META,Xe.Z.WIN_KEY_RIGHT,Xe.Z.CTRL,Xe.Z.SEMICOLON,Xe.Z.EQUALS,Xe.Z.CAPS_LOCK,Xe.Z.CONTEXT_MENU,Xe.Z.F1,Xe.Z.F2,Xe.Z.F3,Xe.Z.F4,Xe.Z.F5,Xe.Z.F6,Xe.Z.F7,Xe.Z.F8,Xe.Z.F9,Xe.Z.F10,Xe.Z.F11,Xe.Z.F12].includes(xt)}var Hn=function(Nt,lr){var $r=(0,ce.useRef)(null),Yr=(0,ce.useRef)(!1),un=Nt.prefixCls,Sn=Nt.open,qn=Nt.mode,ti=Nt.showSearch,Ui=Nt.tokenWithEnter,ra=Nt.autoClearSearchValue,ia=Nt.onSearch,vi=Nt.onSearchSubmit,gi=Nt.onToggleOpen,ma=Nt.onInputKeyDown,Yi=Nt.domRef;ce.useImperativeHandle(lr,function(){return{focus:function(){$r.current.focus()},blur:function(){$r.current.blur()}}});var ua=rt(0),La=(0,$.Z)(ua,2),aa=La[0],ho=La[1],Po=function(No){var Ku=No.which;(Ku===Xe.Z.UP||Ku===Xe.Z.DOWN)&&No.preventDefault(),ma&&ma(No),Ku===Xe.Z.ENTER&&qn==="tags"&&!Yr.current&&!Sn&&(vi==null||vi(No.target.value)),_i(Ku)&&gi(!0)},Ms=function(){ho(!0)},Mu=(0,ce.useRef)(null),vs=function(No){ia(No,!0,Yr.current)!==!1&&gi(!0)},Xs=function(){Yr.current=!0},iu=function(No){Yr.current=!1,qn!=="combobox"&&vs(No.target.value)},js=function(No){var Ku=No.target.value;if(Ui&&Mu.current&&/[\r\n]/.test(Mu.current)){var Rc=Mu.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Ku=Ku.replace(Rc,Mu.current)}Mu.current=null,vs(Ku)},Vs=function(No){var Ku=No.clipboardData,Rc=Ku==null?void 0:Ku.getData("text");Mu.current=Rc||""},sl=function(No){var Ku=No.target;if(Ku!==$r.current){var Rc=document.body.style.msTouchAction!==void 0;Rc?setTimeout(function(){$r.current.focus()}):$r.current.focus()}},al=function(No){var Ku=aa();No.target!==$r.current&&!Ku&&qn!=="combobox"&&No.preventDefault(),(qn!=="combobox"&&(!ti||!Ku)||!Sn)&&(Sn&&ra!==!1&&ia("",!0,!1),gi())},ul={inputRef:$r,onInputKeyDown:Po,onInputMouseDown:Ms,onInputChange:js,onInputPaste:Vs,onInputCompositionStart:Xs,onInputCompositionEnd:iu},_c=qn==="multiple"||qn==="tags"?ce.createElement(Vr,(0,M.Z)({},Nt,ul)):ce.createElement(yn,(0,M.Z)({},Nt,ul));return ce.createElement("div",{ref:Yi,className:"".concat(un,"-selector"),onClick:sl,onMouseDown:al},_c)},Ln=ce.forwardRef(Hn),Ia=Ln,Zi=_(35593),Ua=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],fa=function(Nt){var lr=Nt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:lr,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:lr,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:lr,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:lr,adjustY:1},htmlRegion:"scroll"}}},ka=function(Nt,lr){var $r=Nt.prefixCls,Yr=Nt.disabled,un=Nt.visible,Sn=Nt.children,qn=Nt.popupElement,ti=Nt.animation,Ui=Nt.transitionName,ra=Nt.dropdownStyle,ia=Nt.dropdownClassName,vi=Nt.direction,gi=vi===void 0?"ltr":vi,ma=Nt.placement,Yi=Nt.builtinPlacements,ua=Nt.dropdownMatchSelectWidth,La=Nt.dropdownRender,aa=Nt.dropdownAlign,ho=Nt.getPopupContainer,Po=Nt.empty,Ms=Nt.getTriggerDOMNode,Mu=Nt.onPopupVisibleChange,vs=Nt.onPopupMouseEnter,Xs=(0,X.Z)(Nt,Ua),iu="".concat($r,"-dropdown"),js=qn;La&&(js=La(qn));var Vs=ce.useMemo(function(){return Yi||fa(ua)},[Yi,ua]),sl=ti?"".concat(iu,"-").concat(ti):Ui,al=typeof ua=="number",ul=ce.useMemo(function(){return al?null:ua===!1?"minWidth":"width"},[ua,al]),_c=ra;al&&(_c=(0,d.Z)((0,d.Z)({},_c),{},{width:ua}));var Yo=ce.useRef(null);return ce.useImperativeHandle(lr,function(){return{getPopupElement:function(){return Yo.current}}}),ce.createElement(Zi.Z,(0,M.Z)({},Xs,{showAction:Mu?["click"]:[],hideAction:Mu?["click"]:[],popupPlacement:ma||(gi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Vs,prefixCls:iu,popupTransitionName:sl,popup:ce.createElement("div",{ref:Yo,onMouseEnter:vs},js),stretch:ul,popupAlign:aa,popupVisible:un,getPopupContainer:ho,popupClassName:we()(ia,(0,y.Z)({},"".concat(iu,"-empty"),Po)),popupStyle:_c,getTriggerDOMNode:Ms,onPopupVisibleChange:Mu}),Sn)},mo=ce.forwardRef(ka),_n=mo,yi=_(89514);function Zn(xt,Nt){var lr=xt.key,$r;return"value"in xt&&($r=xt.value),lr!=null?lr:$r!==void 0?$r:"rc-index-key-".concat(Nt)}function gr(xt,Nt){var lr=xt||{},$r=lr.label,Yr=lr.value,un=lr.options,Sn=lr.groupLabel,qn=$r||(Nt?"children":"label");return{label:qn,value:Yr||"value",options:un||"options",groupLabel:Sn||qn}}function Ea(xt){var Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lr=Nt.fieldNames,$r=Nt.childrenAsData,Yr=[],un=gr(lr,!1),Sn=un.label,qn=un.value,ti=un.options,Ui=un.groupLabel;function ra(ia,vi){Array.isArray(ia)&&ia.forEach(function(gi){if(vi||!(ti in gi)){var ma=gi[qn];Yr.push({key:Zn(gi,Yr.length),groupOption:vi,data:gi,label:gi[Sn],value:ma})}else{var Yi=gi[Ui];Yi===void 0&&$r&&(Yi=gi.label),Yr.push({key:Zn(gi,Yr.length),group:!0,data:gi,label:Yi}),ra(gi[ti],!0)}})}return ra(xt,!1),Yr}function co(xt){var Nt=(0,d.Z)({},xt);return"props"in Nt||Object.defineProperty(Nt,"props",{get:function(){return(0,le.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Nt}}),Nt}var Qa=function(Nt,lr,$r){if(!lr||!lr.length)return null;var Yr=!1,un=function qn(ti,Ui){var ra=(0,yi.Z)(Ui),ia=ra[0],vi=ra.slice(1);if(!ia)return[ti];var gi=ti.split(ia);return Yr=Yr||gi.length>1,gi.reduce(function(ma,Yi){return[].concat((0,V.Z)(ma),(0,V.Z)(qn(Yi,vi)))},[]).filter(Boolean)},Sn=un(Nt,lr);return Yr?typeof $r!="undefined"?Sn.slice(0,$r):Sn:null},oa=ce.createContext(null),ji=oa,so=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],ei=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Kn=function(Nt){return Nt==="tags"||Nt==="multiple"},Jn=ce.forwardRef(function(xt,Nt){var lr,$r,Yr=xt.id,un=xt.prefixCls,Sn=xt.className,qn=xt.showSearch,ti=xt.tagRender,Ui=xt.direction,ra=xt.omitDomProps,ia=xt.displayValues,vi=xt.onDisplayValuesChange,gi=xt.emptyOptions,ma=xt.notFoundContent,Yi=ma===void 0?"Not Found":ma,ua=xt.onClear,La=xt.mode,aa=xt.disabled,ho=xt.loading,Po=xt.getInputElement,Ms=xt.getRawInputElement,Mu=xt.open,vs=xt.defaultOpen,Xs=xt.onDropdownVisibleChange,iu=xt.activeValue,js=xt.onActiveValueChange,Vs=xt.activeDescendantId,sl=xt.searchValue,al=xt.autoClearSearchValue,ul=xt.onSearch,_c=xt.onSearchSplit,Yo=xt.tokenSeparators,No=xt.allowClear,Ku=xt.suffixIcon,Rc=xt.clearIcon,Wa=xt.OptionList,mf=xt.animation,yf=xt.transitionName,yl=xt.dropdownStyle,Ec=xt.dropdownClassName,Zf=xt.dropdownMatchSelectWidth,Vu=xt.dropdownRender,lc=xt.dropdownAlign,fl=xt.placement,lf=xt.builtinPlacements,gu=xt.getPopupContainer,Pu=xt.showAction,Co=Pu===void 0?[]:Pu,zu=xt.onFocus,Zu=xt.onBlur,St=xt.onKeyUp,qu=xt.onKeyDown,hl=xt.onMouseDown,rc=(0,X.Z)(xt,so),bs=Kn(La),Il=(qn!==void 0?qn:bs)||La==="combobox",ks=(0,d.Z)({},rc);ei.forEach(function(ic){delete ks[ic]}),ra==null||ra.forEach(function(ic){delete ks[ic]});var au=ce.useState(!1),Al=(0,$.Z)(au,2),cc=Al[0],Gl=Al[1];ce.useEffect(function(){Gl((0,qe.Z)())},[]);var yh=ce.useRef(null),ah=ce.useRef(null),qf=ce.useRef(null),Ac=ce.useRef(null),Xf=ce.useRef(null),_f=ce.useRef(!1),zc=Ue(),bh=(0,$.Z)(zc,3),Nn=bh[0],Pn=bh[1],xi=bh[2];ce.useImperativeHandle(Nt,function(){var ic,Ws;return{focus:(ic=Ac.current)===null||ic===void 0?void 0:ic.focus,blur:(Ws=Ac.current)===null||Ws===void 0?void 0:Ws.blur,scrollTo:function(ac){var $l;return($l=Xf.current)===null||$l===void 0?void 0:$l.scrollTo(ac)}}});var qi=ce.useMemo(function(){var ic;if(La!=="combobox")return sl;var Ws=(ic=ia[0])===null||ic===void 0?void 0:ic.value;return typeof Ws=="string"||typeof Ws=="number"?String(Ws):""},[sl,La,ia]),Xa=La==="combobox"&&typeof Po=="function"&&Po()||null,To=typeof Ms=="function"&&Ms(),Gs=(0,ft.x1)(ah,To==null||(lr=To.props)===null||lr===void 0?void 0:lr.ref),xs=ce.useState(!1),Jo=(0,$.Z)(xs,2),ou=Jo[0],Iu=Jo[1];(0,Ee.Z)(function(){Iu(!0)},[]);var ll=(0,re.Z)(!1,{defaultValue:vs,value:Mu}),Uu=(0,$.Z)(ll,2),Oc=Uu[0],fc=Uu[1],Lu=ou?Oc:!1,su=!Yi&&gi;(aa||su&&Lu&&La==="combobox")&&(Lu=!1);var Ys=su?!1:Lu,_s=ce.useCallback(function(ic){var Ws=ic!==void 0?ic:!Lu;aa||(fc(Ws),Lu!==Ws&&(Xs==null||Xs(Ws)))},[aa,Lu,fc,Xs]),Fs=ce.useMemo(function(){return(Yo||[]).some(function(ic){return[` -`,`\r -`].includes(ic)})},[Yo]),Qu=ce.useContext(ji)||{},Sl=Qu.maxCount,nc=Qu.rawValues,dl=function(Ws,$u,ac){if(!((nc==null?void 0:nc.size)>=Sl)){var $l=!0,Fl=Ws;js==null||js(null);var Oe=Qa(Ws,Yo,Sl&&Sl-nc.size),Ft=ac?null:Oe;return La!=="combobox"&&Ft&&(Fl="",_c==null||_c(Ft),_s(!1),$l=!1),ul&&qi!==Fl&&ul(Fl,{source:$u?"typing":"effect"}),$l}},Ml=function(Ws){!Ws||!Ws.trim()||ul(Ws,{source:"submit"})};ce.useEffect(function(){!Lu&&!bs&&La!=="combobox"&&dl("",!1,!1)},[Lu]),ce.useEffect(function(){Oc&&aa&&fc(!1),aa&&!_f.current&&Pn(!1)},[aa]);var Vc=rt(),kl=(0,$.Z)(Vc,2),Qf=kl[0],ds=kl[1],Eu=function(Ws){var $u=Qf(),ac=Ws.which;if(ac===Xe.Z.ENTER&&(La!=="combobox"&&Ws.preventDefault(),Lu||_s(!0)),ds(!!qi),ac===Xe.Z.BACKSPACE&&!$u&&bs&&!qi&&ia.length){for(var $l=(0,V.Z)(ia),Fl=null,Oe=$l.length-1;Oe>=0;Oe-=1){var Ft=$l[Oe];if(!Ft.disabled){$l.splice(Oe,1),Fl=Ft;break}}Fl&&vi($l,{type:"remove",values:[Fl]})}for(var dr=arguments.length,Wr=new Array(dr>1?dr-1:0),Jr=1;Jr1?$u-1:0),$l=1;$l<$u;$l++)ac[$l-1]=arguments[$l];if(Lu){var Fl;(Fl=Xf.current)===null||Fl===void 0||Fl.onKeyUp.apply(Fl,[Ws].concat(ac))}St==null||St.apply(void 0,[Ws].concat(ac))},Fc=function(Ws){var $u=ia.filter(function(ac){return ac!==Ws});vi($u,{type:"remove",values:[Ws]})},Yc=ce.useRef(!1),xh=function(){Pn(!0),aa||(zu&&!Yc.current&&zu.apply(void 0,arguments),Co.includes("focus")&&_s(!0)),Yc.current=!0},Lf=function(){_f.current=!0,Pn(!1,function(){Yc.current=!1,_f.current=!1,_s(!1)}),!aa&&(qi&&(La==="tags"?ul(qi,{source:"submit"}):La==="multiple"&&ul("",{source:"blur"})),Zu&&Zu.apply(void 0,arguments))},If=[];ce.useEffect(function(){return function(){If.forEach(function(ic){return clearTimeout(ic)}),If.splice(0,If.length)}},[]);var wd=function(Ws){var $u,ac=Ws.target,$l=($u=qf.current)===null||$u===void 0?void 0:$u.getPopupElement();if($l&&$l.contains(ac)){var Fl=setTimeout(function(){var Wr=If.indexOf(Fl);if(Wr!==-1&&If.splice(Wr,1),xi(),!cc&&!$l.contains(document.activeElement)){var Jr;(Jr=Ac.current)===null||Jr===void 0||Jr.focus()}});If.push(Fl)}for(var Oe=arguments.length,Ft=new Array(Oe>1?Oe-1:0),dr=1;dr0&&arguments[0]!==void 0?arguments[0]:!1;ra();var ma=function(){qn.current.forEach(function(ua,La){if(ua&&ua.offsetParent){var aa=(0,rr.Z)(ua),ho=aa.offsetHeight;ti.current.get(La)!==ho&&ti.current.set(La,aa.offsetHeight)}}),Sn(function(ua){return ua+1})};gi?ma():Ui.current=(0,tr.Z)(ma)}function vi(gi,ma){var Yi=xt(gi),ua=qn.current.get(Yi);ma?(qn.current.set(Yi,ma),ia()):qn.current.delete(Yi),!ua!=!ma&&(ma?Nt==null||Nt(gi):lr==null||lr(gi))}return(0,ce.useEffect)(function(){return ra},[]),[vi,ia,ti.current,un]}var on=_(33401),ri=10;function nn(xt,Nt,lr,$r,Yr,un,Sn,qn){var ti=ce.useRef(),Ui=ce.useState(null),ra=(0,$.Z)(Ui,2),ia=ra[0],vi=ra[1];return(0,Ee.Z)(function(){if(ia&&ia.times=0;ul-=1){var _c=Yr(Nt[ul]),Yo=lr.get(_c);if(Yo===void 0){aa=!0;break}if(al-=Yo,al<=0)break}switch(Ms){case"top":Po=vs-ua;break;case"bottom":Po=Xs-La+ua;break;default:{var No=xt.current.scrollTop,Ku=No+La;vsKu&&(ho="bottom")}}Po!==null&&Sn(Po),Po!==ia.lastTop&&(aa=!0)}aa&&vi((0,d.Z)((0,d.Z)({},ia),{},{times:ia.times+1,targetAlign:ho,lastTop:Po}))}},[ia,xt.current]),function(gi){if(gi==null){qn();return}if(tr.Z.cancel(ti.current),typeof gi=="number")Sn(gi);else if(gi&&(0,oe.Z)(gi)==="object"){var ma,Yi=gi.align;"index"in gi?ma=gi.index:ma=Nt.findIndex(function(aa){return Yr(aa)===gi.key});var ua=gi.offset,La=ua===void 0?0:ua;vi({times:0,index:ma,offset:La,originAlign:Yi})}}}function ln(xt,Nt,lr,$r){var Yr=lr-xt,un=Nt-lr,Sn=Math.min(Yr,un)*2;if($r<=Sn){var qn=Math.floor($r/2);return $r%2?lr+qn+1:lr-qn}return Yr>un?lr-($r-un):lr+($r-Yr)}function Yn(xt,Nt,lr){var $r=xt.length,Yr=Nt.length,un,Sn;if($r===0&&Yr===0)return null;$r1&&arguments[1]!==void 0?arguments[1]:!1,ti=Sn<0&&un.current.top||Sn>0&&un.current.bottom;return qn&&ti?(clearTimeout($r.current),lr.current=!1):(!ti||lr.current)&&Yr(),!lr.current&&ti}};function ki(xt,Nt,lr,$r,Yr){var un=(0,ce.useRef)(0),Sn=(0,ce.useRef)(null),qn=(0,ce.useRef)(null),ti=(0,ce.useRef)(!1),Ui=Ii(Nt,lr);function ra(ua,La){tr.Z.cancel(Sn.current),un.current+=La,qn.current=La,!Ui(La)&&(ai||ua.preventDefault(),Sn.current=(0,tr.Z)(function(){var aa=ti.current?10:1;Yr(un.current*aa),un.current=0}))}function ia(ua,La){Yr(La,!0),ai||ua.preventDefault()}var vi=(0,ce.useRef)(null),gi=(0,ce.useRef)(null);function ma(ua){if(xt){tr.Z.cancel(gi.current),gi.current=(0,tr.Z)(function(){vi.current=null},2);var La=ua.deltaX,aa=ua.deltaY,ho=ua.shiftKey,Po=La,Ms=aa;(vi.current==="sx"||!vi.current&&ho&&aa&&!La)&&(Po=aa,Ms=0,vi.current="sx");var Mu=Math.abs(Po),vs=Math.abs(Ms);vi.current===null&&(vi.current=$r&&Mu>vs?"x":"y"),vi.current==="y"?ra(ua,Ms):ia(ua,Po)}}function Yi(ua){xt&&(ti.current=ua.detail===qn.current)}return[ma,Yi]}var Fa=14/15;function sa(xt,Nt,lr){var $r=(0,ce.useRef)(!1),Yr=(0,ce.useRef)(0),un=(0,ce.useRef)(null),Sn=(0,ce.useRef)(null),qn,ti=function(vi){if($r.current){var gi=Math.ceil(vi.touches[0].pageY),ma=Yr.current-gi;Yr.current=gi,lr(ma)&&vi.preventDefault(),clearInterval(Sn.current),Sn.current=setInterval(function(){ma*=Fa,(!lr(ma,!0)||Math.abs(ma)<=.1)&&clearInterval(Sn.current)},16)}},Ui=function(){$r.current=!1,qn()},ra=function(vi){qn(),vi.touches.length===1&&!$r.current&&($r.current=!0,Yr.current=Math.ceil(vi.touches[0].pageY),un.current=vi.target,un.current.addEventListener("touchmove",ti),un.current.addEventListener("touchend",Ui))};qn=function(){un.current&&(un.current.removeEventListener("touchmove",ti),un.current.removeEventListener("touchend",Ui))},(0,Ee.Z)(function(){return xt&&Nt.current.addEventListener("touchstart",ra),function(){var ia;(ia=Nt.current)===null||ia===void 0||ia.removeEventListener("touchstart",ra),qn(),clearInterval(Sn.current)}},[xt])}var vo=20;function Ro(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,lr=xt/Nt*xt;return isNaN(lr)&&(lr=0),lr=Math.max(lr,vo),Math.floor(lr)}function Za(xt,Nt,lr,$r){var Yr=ce.useMemo(function(){return[new Map,[]]},[xt,lr.id,$r]),un=(0,$.Z)(Yr,2),Sn=un[0],qn=un[1],ti=function(ra){var ia=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ra,vi=Sn.get(ra),gi=Sn.get(ia);if(vi===void 0||gi===void 0)for(var ma=xt.length,Yi=qn.length;Yiun||!!Yi),Vs=ma==="rtl",sl=we()($r,(0,y.Z)({},"".concat($r,"-rtl"),Vs),Yr),al=ra||ro,ul=(0,ce.useRef)(),_c=(0,ce.useRef)(),Yo=(0,ce.useState)(0),No=(0,$.Z)(Yo,2),Ku=No[0],Rc=No[1],Wa=(0,ce.useState)(0),mf=(0,$.Z)(Wa,2),yf=mf[0],yl=mf[1],Ec=(0,ce.useState)(!1),Zf=(0,$.Z)(Ec,2),Vu=Zf[0],lc=Zf[1],fl=function(){lc(!0)},lf=function(){lc(!1)},gu=ce.useCallback(function(ds){return typeof vi=="function"?vi(ds):ds==null?void 0:ds[vi]},[vi]),Pu={getKey:gu};function Co(ds){Rc(function(Eu){var Rl;typeof ds=="function"?Rl=ds(Eu):Rl=ds;var Fc=Gs(Rl);return ul.current.scrollTop=Fc,Fc})}var zu=(0,ce.useRef)({start:0,end:al.length}),Zu=(0,ce.useRef)(),St=Wn(al,gu),qu=(0,$.Z)(St,1),hl=qu[0];Zu.current=hl;var rc=jr(gu,null,null),bs=(0,$.Z)(rc,4),Il=bs[0],ks=bs[1],au=bs[2],Al=bs[3],cc=ce.useMemo(function(){if(!iu)return{scrollHeight:void 0,start:0,end:al.length-1,offset:void 0};if(!js){var ds;return{scrollHeight:((ds=_c.current)===null||ds===void 0?void 0:ds.offsetHeight)||0,start:0,end:al.length-1,offset:void 0}}for(var Eu=0,Rl,Fc,Yc,xh=al.length,Lf=0;Lf=Ku&&Rl===void 0&&(Rl=Lf,Fc=Eu),Df>Ku+un&&Yc===void 0&&(Yc=Lf),Eu=Df}return Rl===void 0&&(Rl=0,Fc=0,Yc=Math.ceil(un/Sn)),Yc===void 0&&(Yc=al.length-1),Yc=Math.min(Yc+1,al.length-1),{scrollHeight:Eu,start:Rl,end:Yc,offset:Fc}},[js,iu,Ku,al,Al,un]),Gl=cc.scrollHeight,yh=cc.start,ah=cc.end,qf=cc.offset;zu.current.start=yh,zu.current.end=ah;var Ac=ce.useState({width:0,height:un}),Xf=(0,$.Z)(Ac,2),_f=Xf[0],zc=Xf[1],bh=function(Eu){zc({width:Eu.width||Eu.offsetWidth,height:Eu.height||Eu.offsetHeight})},Nn=(0,ce.useRef)(),Pn=(0,ce.useRef)(),xi=ce.useMemo(function(){return Ro(_f.width,Yi)},[_f.width,Yi]),qi=ce.useMemo(function(){return Ro(_f.height,Gl)},[_f.height,Gl]),Xa=Gl-un,To=(0,ce.useRef)(Xa);To.current=Xa;function Gs(ds){var Eu=ds;return Number.isNaN(To.current)||(Eu=Math.min(Eu,To.current)),Eu=Math.max(Eu,0),Eu}var xs=Ku<=0,Jo=Ku>=Xa,ou=Ii(xs,Jo),Iu=function(){return{x:Vs?-yf:yf,y:Ku}},ll=(0,ce.useRef)(Iu()),Uu=(0,on.zX)(function(){if(ho){var ds=Iu();(ll.current.x!==ds.x||ll.current.y!==ds.y)&&(ho(ds),ll.current=ds)}});function Oc(ds,Eu){var Rl=ds;Eu?((0,xr.flushSync)(function(){yl(Rl)}),Uu()):Co(Rl)}function fc(ds){var Eu=ds.currentTarget.scrollTop;Eu!==Ku&&Co(Eu),aa==null||aa(ds),Uu()}var Lu=function(Eu){var Rl=Eu,Fc=Yi-_f.width;return Rl=Math.max(Rl,0),Rl=Math.min(Rl,Fc),Rl},su=(0,on.zX)(function(ds,Eu){Eu?((0,xr.flushSync)(function(){yl(function(Rl){var Fc=Rl+(Vs?-ds:ds);return Lu(Fc)})}),Uu()):Co(function(Rl){var Fc=Rl+ds;return Fc})}),Ys=ki(iu,xs,Jo,!!Yi,su),_s=(0,$.Z)(Ys,2),Fs=_s[0],Qu=_s[1];sa(iu,ul,function(ds,Eu){return ou(ds,Eu)?!1:(Fs({preventDefault:function(){},deltaY:ds}),!0)}),(0,Ee.Z)(function(){function ds(Rl){iu&&Rl.preventDefault()}var Eu=ul.current;return Eu.addEventListener("wheel",Fs),Eu.addEventListener("DOMMouseScroll",Qu),Eu.addEventListener("MozMousePixelScroll",ds),function(){Eu.removeEventListener("wheel",Fs),Eu.removeEventListener("DOMMouseScroll",Qu),Eu.removeEventListener("MozMousePixelScroll",ds)}},[iu]),(0,Ee.Z)(function(){Yi&&yl(function(ds){return Lu(ds)})},[_f.width,Yi]);var Sl=function(){var Eu,Rl;(Eu=Nn.current)===null||Eu===void 0||Eu.delayHidden(),(Rl=Pn.current)===null||Rl===void 0||Rl.delayHidden()},nc=nn(ul,al,au,Sn,gu,function(){return ks(!0)},Co,Sl);ce.useImperativeHandle(Nt,function(){return{getScrollInfo:Iu,scrollTo:function(Eu){function Rl(Fc){return Fc&&(0,oe.Z)(Fc)==="object"&&("left"in Fc||"top"in Fc)}Rl(Eu)?(Eu.left!==void 0&&yl(Lu(Eu.left)),nc(Eu.top)):nc(Eu)}}}),(0,Ee.Z)(function(){if(Po){var ds=al.slice(yh,ah+1);Po(ds,al)}},[yh,ah,al]);var dl=Za(al,gu,au,Sn),Ml=Mu==null?void 0:Mu({start:yh,end:ah,virtual:js,offsetX:yf,offsetY:qf,rtl:Vs,getSize:dl}),Vc=Zt(al,yh,ah,Yi,Il,ia,Pu),kl=null;un&&(kl=(0,d.Z)((0,y.Z)({},ti?"height":"maxHeight",un),Tu),iu&&(kl.overflowY="hidden",Yi&&(kl.overflowX="hidden"),Vu&&(kl.pointerEvents="none")));var Qf={};return Vs&&(Qf.dir="rtl"),ce.createElement("div",(0,M.Z)({style:(0,d.Z)((0,d.Z)({},Ui),{},{position:"relative"}),className:sl},Qf,Xs),ce.createElement(Tr.Z,{onResize:bh},ce.createElement(La,{className:"".concat($r,"-holder"),style:kl,ref:ul,onScroll:fc,onMouseEnter:Sl},ce.createElement(Cn,{prefixCls:$r,height:Gl,offsetX:yf,offsetY:qf,scrollWidth:Yi,onInnerResize:ks,ref:_c,innerProps:Ms,rtl:Vs,extra:Ml},Vc))),js&&Gl>un&&ce.createElement(We,{ref:Nn,prefixCls:$r,scrollOffset:Ku,scrollRange:Gl,rtl:Vs,onScroll:Oc,onStartMove:fl,onStopMove:lf,spinSize:qi,containerSize:_f.height,style:vs==null?void 0:vs.verticalScrollBar,thumbStyle:vs==null?void 0:vs.verticalScrollBarThumb}),js&&Yi>_f.width&&ce.createElement(We,{ref:Pn,prefixCls:$r,scrollOffset:yf,scrollRange:Yi,rtl:Vs,onScroll:Oc,onStartMove:fl,onStopMove:lf,spinSize:xi,containerSize:_f.width,horizontal:!0,style:vs==null?void 0:vs.horizontalScrollBar,thumbStyle:vs==null?void 0:vs.horizontalScrollBarThumb}))}var qa=ce.forwardRef(Do);qa.displayName="List";var ss=qa,ca=ss;function Mn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var wi=["disabled","title","children","style","className"];function Fu(xt){return typeof xt=="string"||typeof xt=="number"}var Hs=function(Nt,lr){var $r=At(),Yr=$r.prefixCls,un=$r.id,Sn=$r.open,qn=$r.multiple,ti=$r.mode,Ui=$r.searchValue,ra=$r.toggleOpen,ia=$r.notFoundContent,vi=$r.onPopupScroll,gi=ce.useContext(ji),ma=gi.maxCount,Yi=gi.flattenOptions,ua=gi.onActiveValue,La=gi.defaultActiveFirstOption,aa=gi.onSelect,ho=gi.menuItemSelectedIcon,Po=gi.rawValues,Ms=gi.fieldNames,Mu=gi.virtual,vs=gi.direction,Xs=gi.listHeight,iu=gi.listItemHeight,js=gi.optionRender,Vs="".concat(Yr,"-item"),sl=(0,Yt.Z)(function(){return Yi},[Sn,Yi],function(gu,Pu){return Pu[0]&&gu[1]!==Pu[1]}),al=ce.useRef(null),ul=ce.useMemo(function(){return qn&&typeof ma!="undefined"&&(Po==null?void 0:Po.size)>=ma},[qn,ma,Po==null?void 0:Po.size]),_c=function(Pu){Pu.preventDefault()},Yo=function(Pu){var Co;(Co=al.current)===null||Co===void 0||Co.scrollTo(typeof Pu=="number"?{index:Pu}:Pu)},No=function(Pu){for(var Co=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,zu=sl.length,Zu=0;Zu1&&arguments[1]!==void 0?arguments[1]:!1;mf(Pu);var zu={source:Co?"keyboard":"mouse"},Zu=sl[Pu];if(!Zu){ua(null,-1,zu);return}ua(Zu.value,Pu,zu)};(0,ce.useEffect)(function(){yf(La!==!1?No(0):-1)},[sl.length,Ui]);var yl=ce.useCallback(function(gu){return Po.has(gu)&&ti!=="combobox"},[ti,(0,V.Z)(Po).toString(),Po.size]);(0,ce.useEffect)(function(){var gu=setTimeout(function(){if(!qn&&Sn&&Po.size===1){var Co=Array.from(Po)[0],zu=sl.findIndex(function(Zu){var St=Zu.data;return St.value===Co});zu!==-1&&(yf(zu),Yo(zu))}});if(Sn){var Pu;(Pu=al.current)===null||Pu===void 0||Pu.scrollTo(void 0)}return function(){return clearTimeout(gu)}},[Sn,Ui]);var Ec=function(Pu){Pu!==void 0&&aa(Pu,{selected:!Po.has(Pu)}),qn||ra(!1)};if(ce.useImperativeHandle(lr,function(){return{onKeyDown:function(Pu){var Co=Pu.which,zu=Pu.ctrlKey;switch(Co){case Xe.Z.N:case Xe.Z.P:case Xe.Z.UP:case Xe.Z.DOWN:{var Zu=0;if(Co===Xe.Z.UP?Zu=-1:Co===Xe.Z.DOWN?Zu=1:Mn()&&zu&&(Co===Xe.Z.N?Zu=1:Co===Xe.Z.P&&(Zu=-1)),Zu!==0){var St=No(Wa+Zu,Zu);Yo(St),yf(St,!0)}break}case Xe.Z.ENTER:{var qu,hl=sl[Wa];hl&&!(hl!=null&&(qu=hl.data)!==null&&qu!==void 0&&qu.disabled)&&!ul?Ec(hl.value):Ec(void 0),Sn&&Pu.preventDefault();break}case Xe.Z.ESC:ra(!1),Sn&&Pu.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Pu){Yo(Pu)}}}),sl.length===0)return ce.createElement("div",{role:"listbox",id:"".concat(un,"_list"),className:"".concat(Vs,"-empty"),onMouseDown:_c},ia);var Zf=Object.keys(Ms).map(function(gu){return Ms[gu]}),Vu=function(Pu){return Pu.label};function lc(gu,Pu){var Co=gu.group;return{role:Co?"presentation":"option",id:"".concat(un,"_list_").concat(Pu)}}var fl=function(Pu){var Co=sl[Pu];if(!Co)return null;var zu=Co.data||{},Zu=zu.value,St=Co.group,qu=(0,Ct.Z)(zu,!0),hl=Vu(Co);return Co?ce.createElement("div",(0,M.Z)({"aria-label":typeof hl=="string"&&!St?hl:null},qu,{key:Pu},lc(Co,Pu),{"aria-selected":yl(Zu)}),Zu):null},lf={role:"listbox",id:"".concat(un,"_list")};return ce.createElement(ce.Fragment,null,Mu&&ce.createElement("div",(0,M.Z)({},lf,{style:{height:0,width:0,overflow:"hidden"}}),fl(Wa-1),fl(Wa),fl(Wa+1)),ce.createElement(ca,{itemKey:"key",ref:al,data:sl,height:Xs,itemHeight:iu,fullHeight:!1,onMouseDown:_c,onScroll:vi,virtual:Mu,direction:vs,innerProps:Mu?null:lf},function(gu,Pu){var Co,zu=gu.group,Zu=gu.groupOption,St=gu.data,qu=gu.label,hl=gu.value,rc=St.key;if(zu){var bs,Il=(bs=St.title)!==null&&bs!==void 0?bs:Fu(qu)?qu.toString():void 0;return ce.createElement("div",{className:we()(Vs,"".concat(Vs,"-group")),title:Il},qu!==void 0?qu:rc)}var ks=St.disabled,au=St.title,Al=St.children,cc=St.style,Gl=St.className,yh=(0,X.Z)(St,wi),ah=(0,Pt.Z)(yh,Zf),qf=yl(hl),Ac=ks||!qf&&ul,Xf="".concat(Vs,"-option"),_f=we()(Vs,Xf,Gl,(Co={},(0,y.Z)(Co,"".concat(Xf,"-grouped"),Zu),(0,y.Z)(Co,"".concat(Xf,"-active"),Wa===Pu&&!Ac),(0,y.Z)(Co,"".concat(Xf,"-disabled"),Ac),(0,y.Z)(Co,"".concat(Xf,"-selected"),qf),Co)),zc=Vu(gu),bh=!ho||typeof ho=="function"||qf,Nn=typeof zc=="number"?zc:zc||hl,Pn=Fu(Nn)?Nn.toString():void 0;return au!==void 0&&(Pn=au),ce.createElement("div",(0,M.Z)({},(0,Ct.Z)(ah),Mu?{}:lc(gu,Pu),{"aria-selected":qf,className:_f,title:Pn,onMouseMove:function(){Wa===Pu||Ac||yf(Pu)},onClick:function(){Ac||Ec(hl)},style:cc}),ce.createElement("div",{className:"".concat(Xf,"-content")},typeof js=="function"?js(gu,{index:Pu}):Nn),ce.isValidElement(ho)||qf,bh&&ce.createElement(lt,{className:"".concat(Vs,"-option-state"),customizeIcon:ho,customizeIconProps:{value:hl,disabled:Ac,isSelected:qf}},qf?"\u2713":null))}))},us=ce.forwardRef(Hs),Ts=us,Qs=function(xt,Nt){var lr=ce.useRef({values:new Map,options:new Map}),$r=ce.useMemo(function(){var un=lr.current,Sn=un.values,qn=un.options,ti=xt.map(function(ia){if(ia.label===void 0){var vi;return(0,d.Z)((0,d.Z)({},ia),{},{label:(vi=Sn.get(ia.value))===null||vi===void 0?void 0:vi.label})}return ia}),Ui=new Map,ra=new Map;return ti.forEach(function(ia){Ui.set(ia.value,ia),ra.set(ia.value,Nt.get(ia.value)||qn.get(ia.value))}),lr.current.values=Ui,lr.current.options=ra,ti},[xt,Nt]),Yr=ce.useCallback(function(un){return Nt.get(un)||lr.current.options.get(un)},[Nt]);return[$r,Yr]};function ko(xt,Nt){return Mt(xt).join("").toUpperCase().includes(Nt)}var _o=function(xt,Nt,lr,$r,Yr){return ce.useMemo(function(){if(!lr||$r===!1)return xt;var un=Nt.options,Sn=Nt.label,qn=Nt.value,ti=[],Ui=typeof $r=="function",ra=lr.toUpperCase(),ia=Ui?$r:function(gi,ma){return Yr?ko(ma[Yr],ra):ma[un]?ko(ma[Sn!=="children"?Sn:"label"],ra):ko(ma[qn],ra)},vi=Ui?function(gi){return co(gi)}:function(gi){return gi};return xt.forEach(function(gi){if(gi[un]){var ma=ia(lr,vi(gi));if(ma)ti.push(gi);else{var Yi=gi[un].filter(function(ua){return ia(lr,vi(ua))});Yi.length&&ti.push((0,d.Z)((0,d.Z)({},gi),{},(0,y.Z)({},un,Yi)))}return}ia(lr,vi(gi))&&ti.push(gi)}),ti},[xt,$r,Yr,lr,Nt])},Js=_(42871),fo=0,El=(0,Js.Z)();function ju(){var xt;return El?(xt=fo,fo+=1):xt="TEST_OR_SSR",xt}function _l(xt){var Nt=ce.useState(),lr=(0,$.Z)(Nt,2),$r=lr[0],Yr=lr[1];return ce.useEffect(function(){Yr("rc_select_".concat(ju()))},[]),xt||$r}var Es=_(45659),yc=["children","value"],Vl=["children"];function tc(xt){var Nt=xt,lr=Nt.key,$r=Nt.props,Yr=$r.children,un=$r.value,Sn=(0,X.Z)($r,yc);return(0,d.Z)({key:lr,value:un!==void 0?un:lr,children:Yr},Sn)}function Au(xt){var Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Es.Z)(xt).map(function(lr,$r){if(!ce.isValidElement(lr)||!lr.type)return null;var Yr=lr,un=Yr.type.isSelectOptGroup,Sn=Yr.key,qn=Yr.props,ti=qn.children,Ui=(0,X.Z)(qn,Vl);return Nt||!un?tc(lr):(0,d.Z)((0,d.Z)({key:"__RC_SELECT_GRP__".concat(Sn===null?$r:Sn,"__"),label:Sn},Ui),{},{options:Au(ti)})}).filter(function(lr){return lr})}var On=function(Nt,lr,$r,Yr,un){return ce.useMemo(function(){var Sn=Nt,qn=!Nt;qn&&(Sn=Au(lr));var ti=new Map,Ui=new Map,ra=function(gi,ma,Yi){Yi&&typeof Yi=="string"&&gi.set(ma[Yi],ma)},ia=function vi(gi){for(var ma=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Yi=0;Yi1&&arguments[1]!==void 0?arguments[1]:!1,Sn=0;Sn2&&arguments[2]!==void 0?arguments[2]:{},Fs=_s.source,Qu=Fs===void 0?"keyboard":Fs;xs(Ys),Sn&&$r==="combobox"&&su!==null&&Qu==="keyboard"&&qi(String(su))},[Sn,$r]),Iu=function(Ys,_s,Fs){var Qu=function(){var Rl,Fc=cc(Ys);return[Ku?{label:Fc==null?void 0:Fc[Vu.label],value:Ys,key:(Rl=Fc==null?void 0:Fc.key)!==null&&Rl!==void 0?Rl:Ys}:Ys,co(Fc)]};if(_s&&gi){var Sl=Qu(),nc=(0,$.Z)(Sl,2),dl=nc[0],Ml=nc[1];gi(dl,Ml)}else if(!_s&&ma&&Fs!=="clear"){var Vc=Qu(),kl=(0,$.Z)(Vc,2),Qf=kl[0],ds=kl[1];ma(Qf,ds)}},ll=Pi(function(su,Ys){var _s,Fs=yl?Ys.selected:!0;Fs?_s=yl?[].concat((0,V.Z)(Al),[su]):[su]:_s=Al.filter(function(Qu){return Qu.value!==su}),bh(_s),Iu(su,Fs),$r==="combobox"?qi(""):(!Kn||vi)&&(gu(""),qi(""))}),Uu=function(Ys,_s){bh(Ys);var Fs=_s.type,Qu=_s.values;(Fs==="remove"||Fs==="clear")&&Qu.forEach(function(Sl){Iu(Sl.value,!1,Fs)})},Oc=function(Ys,_s){if(gu(Ys),qi(null),_s.source==="submit"){var Fs=(Ys||"").trim();if(Fs){var Qu=Array.from(new Set([].concat((0,V.Z)(yh),[Fs])));bh(Qu),Iu(Fs,!0),gu("")}return}_s.source!=="blur"&&($r==="combobox"&&bh(Ys),ra==null||ra(Ys))},fc=function(Ys){var _s=Ys;$r!=="tags"&&(_s=Ys.map(function(Qu){var Sl=zu.get(Qu);return Sl==null?void 0:Sl.value}).filter(function(Qu){return Qu!==void 0}));var Fs=Array.from(new Set([].concat((0,V.Z)(yh),(0,V.Z)(_s))));bh(Fs),Fs.forEach(function(Qu){Iu(Qu,!0)})},Lu=ce.useMemo(function(){var su=js!==!1&&ua!==!1;return(0,d.Z)((0,d.Z)({},Pu),{},{flattenOptions:zc,onActiveValue:ou,defaultActiveFirstOption:Jo,onSelect:ll,menuItemSelectedIcon:iu,rawValues:yh,fieldNames:Vu,virtual:su,direction:Vs,listHeight:al,listItemHeight:_c,childrenAsData:Ec,maxCount:Wa,optionRender:Mu})},[Wa,Pu,zc,ou,Jo,ll,iu,yh,Vu,js,ua,Vs,al,_c,Ec,Mu]);return ce.createElement(ji.Provider,{value:Lu},ce.createElement(da,(0,M.Z)({},mf,{id:yf,prefixCls:un,ref:Nt,omitDomProps:vn,mode:$r,displayValues:Gl,onDisplayValuesChange:Uu,direction:Vs,searchValue:lf,onSearch:Oc,autoClearSearchValue:vi,onSearchSplit:fc,dropdownMatchSelectWidth:ua,OptionList:Ts,emptyOptions:!zc.length,activeValue:xi,activeDescendantId:"".concat(yf,"_list_").concat(Gs)})))}),Bo=ya;Bo.Option=bt,Bo.OptGroup=uo;var xn=Bo,zr=xn},45659:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return y}});var M=_(77617),V=_(92888);function y(d){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=[];return M.Children.forEach(d,function(oe){oe==null&&!$.keepEmpty||(Array.isArray(oe)?X=X.concat(y(oe)):(0,V.isFragment)(oe)&&oe.props?X=X.concat(y(oe.props.children,$)):X.push(oe))}),X}},42871:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return M}});function M(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}},99569:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return M}});function M(V,y){if(!V)return!1;if(V.contains)return V.contains(y);for(var d=y;d;){if(d===V)return!0;d=d.parentNode}return!1}},75966:function(Ke,ye,_){"use strict";_.d(ye,{hq:function(){return ft},jL:function(){return Ee}});var M=_(42871),V=_(99569),y="data-rc-order",d="data-rc-priority",$="rc-util-key",X=new Map;function oe(){var Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},lt=Ge.mark;return lt?lt.startsWith("data-")?lt:"data-".concat(lt):$}function re(Ge){if(Ge.attachTo)return Ge.attachTo;var lt=document.querySelector("head");return lt||document.body}function le(Ge){return Ge==="queue"?"prependQueue":Ge?"prepend":"append"}function ce(Ge){return Array.from((X.get(Ge)||Ge).children).filter(function(lt){return lt.tagName==="STYLE"})}function Ie(Ge){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,M.Z)())return null;var Ye=lt.csp,It=lt.prepend,At=lt.priority,Ue=At===void 0?0:At,rt=le(It),Ze=rt==="prependQueue",Ct=document.createElement("style");Ct.setAttribute(y,rt),Ze&&Ue&&Ct.setAttribute(d,"".concat(Ue)),Ye!=null&&Ye.nonce&&(Ct.nonce=Ye==null?void 0:Ye.nonce),Ct.innerHTML=Ge;var st=re(lt),Et=st.firstChild;if(It){if(Ze){var at=ce(st).filter(function(mt){if(!["prepend","prependQueue"].includes(mt.getAttribute(y)))return!1;var Mt=Number(mt.getAttribute(d)||0);return Ue>=Mt});if(at.length)return st.insertBefore(Ct,at[at.length-1].nextSibling),Ct}st.insertBefore(Ct,Et)}else st.appendChild(Ct);return Ct}function we(Ge){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ye=re(lt);return ce(Ye).find(function(It){return It.getAttribute(oe(lt))===Ge})}function Ee(Ge){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ye=we(Ge,lt);if(Ye){var It=re(lt);It.removeChild(Ye)}}function qe(Ge,lt){var Ye=X.get(Ge);if(!Ye||!(0,V.Z)(document,Ye)){var It=Ie("",lt),At=It.parentNode;X.set(Ge,At),Ge.removeChild(It)}}function Xe(){X.clear()}function ft(Ge,lt){var Ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},It=re(Ye);qe(It,Ye);var At=we(lt,Ye);if(At){var Ue,rt;if((Ue=Ye.csp)!==null&&Ue!==void 0&&Ue.nonce&&At.nonce!==((rt=Ye.csp)===null||rt===void 0?void 0:rt.nonce)){var Ze;At.nonce=(Ze=Ye.csp)===null||Ze===void 0?void 0:Ze.nonce}return At.innerHTML!==Ge&&(At.innerHTML=Ge),At}var Ct=Ie(Ge,Ye);return Ct.setAttribute(oe(Ye),lt),Ct}},58035:function(Ke,ye,_){"use strict";_.d(ye,{S:function(){return y},Z:function(){return d}});var M=_(77617),V=_(79161);function y($){return $ instanceof HTMLElement||$ instanceof SVGElement}function d($){return y($)?$:$ instanceof M.Component?V.findDOMNode($):null}},95077:function(Ke,ye){"use strict";ye.Z=function(_){if(!_)return!1;if(_ instanceof Element){if(_.offsetParent)return!0;if(_.getBBox){var M=_.getBBox(),V=M.width,y=M.height;if(V||y)return!0}if(_.getBoundingClientRect){var d=_.getBoundingClientRect(),$=d.width,X=d.height;if($||X)return!0}}return!1}},39057:function(Ke,ye,_){"use strict";_.d(ye,{A:function(){return y}});function M(d){var $;return d==null||($=d.getRootNode)===null||$===void 0?void 0:$.call(d)}function V(d){return M(d)instanceof ShadowRoot}function y(d){return V(d)?M(d):null}},84821:function(Ke,ye){"use strict";var _={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(V){var y=V.keyCode;if(V.altKey&&!V.ctrlKey||V.metaKey||y>=_.F1&&y<=_.F12)return!1;switch(y){case _.ALT:case _.CAPS_LOCK:case _.CONTEXT_MENU:case _.CTRL:case _.DOWN:case _.END:case _.ESC:case _.HOME:case _.INSERT:case _.LEFT:case _.MAC_FF_META:case _.META:case _.NUMLOCK:case _.NUM_CENTER:case _.PAGE_DOWN:case _.PAGE_UP:case _.PAUSE:case _.PRINT_SCREEN:case _.RIGHT:case _.SHIFT:case _.UP:case _.WIN_KEY:case _.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(V){if(V>=_.ZERO&&V<=_.NINE||V>=_.NUM_ZERO&&V<=_.NUM_MULTIPLY||V>=_.A&&V<=_.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&V===0)return!0;switch(V){case _.SPACE:case _.QUESTION_MARK:case _.NUM_PLUS:case _.NUM_MINUS:case _.NUM_PERIOD:case _.NUM_DIVISION:case _.SEMICOLON:case _.DASH:case _.EQUALS:case _.COMMA:case _.PERIOD:case _.SLASH:case _.APOSTROPHE:case _.SINGLE_QUOTE:case _.OPEN_SQUARE_BRACKET:case _.BACKSLASH:case _.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};ye.Z=_},41522:function(Ke,ye,_){"use strict";var M;_.d(ye,{s:function(){return lt},v:function(){return rt}});var V=_(33202),y=_(90304),d=_(13255),$=_(54131),X=_(79161),oe=(0,$.Z)({},M||(M=_.t(X,2))),re=oe.version,le=oe.render,ce=oe.unmountComponentAtNode,Ie;try{var we=Number((re||"").split(".")[0]);we>=18&&(Ie=oe.createRoot)}catch(Ct){}function Ee(Ct){var st=oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;st&&(0,d.Z)(st)==="object"&&(st.usingClientEntryPoint=Ct)}var qe="__rc_react_root__";function Xe(Ct,st){Ee(!0);var Et=st[qe]||Ie(st);Ee(!1),Et.render(Ct),st[qe]=Et}function ft(Ct,st){le(Ct,st)}function Ge(Ct,st){}function lt(Ct,st){if(Ie){Xe(Ct,st);return}ft(Ct,st)}function Ye(Ct){return It.apply(this,arguments)}function It(){return It=(0,y.Z)((0,V.Z)().mark(function Ct(st){return(0,V.Z)().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return at.abrupt("return",Promise.resolve().then(function(){var mt;(mt=st[qe])===null||mt===void 0||mt.unmount(),delete st[qe]}));case 1:case"end":return at.stop()}},Ct)})),It.apply(this,arguments)}function At(Ct){ce(Ct)}function Ue(Ct){}function rt(Ct){return Ze.apply(this,arguments)}function Ze(){return Ze=(0,y.Z)((0,V.Z)().mark(function Ct(st){return(0,V.Z)().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(Ie===void 0){at.next=2;break}return at.abrupt("return",Ye(st));case 2:At(st);case 3:case"end":return at.stop()}},Ct)})),Ze.apply(this,arguments)}},60402:function(Ke,ye,_){"use strict";_.d(ye,{Z:function(){return V}});var M=_(77617);function V(y){var d=M.useRef();d.current=y;var $=M.useCallback(function(){for(var X,oe=arguments.length,re=new Array(oe),le=0;le2&&arguments[2]!==void 0?arguments[2]:!1,oe=new Set;function re(le,ce){var Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,we=oe.has(le);if((0,V.ZP)(!we,"Warning: There may be circular references"),we)return!1;if(le===ce)return!0;if(X&&Ie>1)return!1;oe.add(le);var Ee=Ie+1;if(Array.isArray(le)){if(!Array.isArray(ce)||le.length!==ce.length)return!1;for(var qe=0;qe